"use strict";functione(e,r){returni(e)||o(e,r)||n(e,r)||t()}functiont(){thrownewTypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}functionn(e,t){if(e){if("string"==typeofe)returnr(e,t);varn=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void0}}functionr(e,t){(null==t||t>e.length)&&(t=e.length);for(varn=0,r=newArray(t);n<t;n++)r[n]=e[n];returnr}functiono(e,t){if("undefined"!=typeofSymbol&&Symbol.iteratorinObject(e)){varn=[],r=!0,o=!1,i=void0;try{for(varc,s=e[Symbol.iterator]();!(r=(c=s.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(a){o=!0,i=a}finally{try{r||null==s.return||s.return()}finally{if(o)throwi}}returnn}}functioni(e){if(Array.isArray(e))returne}functionc(e,t,n,r,o,i,c){try{vars=e[i](c),a=s.value}catch(u){returnvoidn(u)}s.done?t(a):Promise.resolve(a).then(r,o)}functions(e){returnfunction(){vart=this,n=arguments;returnnewPromise(function(r,o){vari=e.apply(t,n);functions(e){c(i,r,o,s,a,"next",e)}functiona(e){c(i,r,o,s,a,"throw",e)}s(void0)})}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void0;vara="2.1.0",u={compat:"2.1.0",science:!0,sentry:!0,crash:!0},f={analytics:void0,crash:void0},p=function(e){e?d():l()},l=function(){goosemodScope.webpackModules.findByProps("getSuperPropertiesBase64").track=f.analytics},d=function(){vare=goosemodScope.webpackModules.findByProps("getSuperPropertiesBase64");f.analytics=e.track,e.track=function(){}},g=function(e){e?m():y()},y=function(){goosemodScope.webpackModules.findByProps("submitLiveCrashReport").submitLiveCrashReport=f.crash},m=function(){vare=goosemodScope.webpackModules.findByProps("submitLiveCrashReport");f.crash=e.submitLiveCrashReport,e.submitLiveCrashReport=function(){}},h=function(e){e?b():v()},v=function(){window.__SENTRY__.hub.getClient().getOptions().enabled=!0},b=function(){window.__SENTRY__.hub.getClient().getOptions().enabled=!1},S={goosemodHandlers:{onImport:function(){vare=s(regeneratorRuntime.mark(functione(){returnregeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case0:p(u.science),h(u.sentry),g(u.crash);case3:case"end":returne.stop()}},e)}));returnfunction(){returne.apply(this,arguments)}}(),onLoadingFinished:function(){vare=s(regeneratorRuntime.mark(functione(){returnregeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case0:goosemodScope.settings.createItem("Fucklytics",["(v".concat(a,")"),{type:"header",text:"What to block"},{type:"toggle",text:"Science (Discord API)",subtext:"Discord's own analytics, most used.",onToggle:function(e){u.science=e,p(e)},isToggled:function(){returnu.science}},{type:"toggle",text:"Crash Reports",subtext:"Automatically sends Discord a crash report on crash (without your consent).",onToggle:function(e){u.crash=e,g(e)},isToggled:function(){returnu.crash}},{type:"toggle",text:"Sentry",subtext:"Used to track console / JS errors.",onToggle:function(e){u.sentry=e,h(e)},isToggled:function(){returnu.sentry}}]);case1:case"end":returne.stop()}},e)}));returnfunction(){returne.apply(this,arguments)}}(),onRemove:function(){vare=s(regeneratorRuntime.mark(functione(){vart;returnregeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case0:try{l(),v(),y()}catch(n){}t=goosemodScope.settings.items.find(function(e){return"Fucklytics"===e[1]}),goosemodScope.settings.items.splice(goosemodScope.settings.items.indexOf(t),1);case3:case"end":returne.stop()}},e)}));returnfunction(){returne.apply(this,arguments)}}(),getSettings:function(){return[u]},loadSettings:function(t){varn=e(t,1)[0];n.compat===a&&(p((u=n).science),h(u.sentry),g(u.crash))}}};exports.default=S;