"use strict";functione(e,r,t,n,o,a,i){try{vars=e[a](i),c=s.value}catch(u){returnvoidt(u)}s.done?r(c):Promise.resolve(c).then(n,o)}functionr(r){returnfunction(){vart=this,n=arguments;returnnewPromise(function(o,a){vari=r.apply(t,n);functions(r){e(i,o,a,s,c,"next",r)}functionc(r){e(i,o,a,s,c,"throw",r)}s(void0)})}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void0;vart="1.0.2",n={goosemodHandlers:{onImport:function(){vare=r(regeneratorRuntime.mark(functione(){returnregeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case0:void0===window.localStorage&&alert("Clear Recent Games: Could not find localStorage, will not work");case1:case"end":returne.stop()}},e)}));returnfunction(){returne.apply(this,arguments)}}(),onLoadingFinished:function(){vare=r(regeneratorRuntime.mark(functione(){returnregeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case0:goosemodScope.settings.createItem("Clear Recent Games",[""],r(regeneratorRuntime.mark(functione(){varr;returnregeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case0:returne.next=2,goosemodScope.confirmDialog("Clear","Clear Recent Games","Are you sure you want to clear your recent games?");case2:if(e.sent){e.next=4;break}returne.abrupt("return");case4:return(r=JSON.parse(localStorage.getItem("RunningGameStore"))).gamesSeen=[],localStorage.setItem("RunningGameStore",JSON.stringify(r)),e.next=9,goosemodScope.confirmDialog("Reload","Reload Discord","To actually update the recent games after clearing it, Discord requires a reload. Without it, it will still look like recent games have not been cleared. This will also uninstall GooseMod due to reloading.");case9:if(!e.sent){e.next=11;break}window.location.reload();case11:case"end":returne.stop()}},e)})));case1:case"end":returne.stop()}},e)}));returnfunction(){returne.apply(this,arguments)}}(),onRemove:function(){vare=r(regeneratorRuntime.mark(functione(){varr;returnregeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case0:r=goosemodScope.settings.items.find(function(e){return"Clear Recent Games"===e[1]}),goosemodScope.settings.items.splice(goosemodScope.settings.items.indexOf(r),1);case2:case"end":returne.stop()}},e)}));returnfunction(){returne.apply(this,arguments)}}(),logRegionColor:"darkred"}};exports.default=n;