"use strict";functione(e,n,t,r,o,a,u){try{varc=e[a](u),i=c.value}catch(s){returnvoidt(s)}c.done?n(i):Promise.resolve(i).then(r,o)}functionn(n){returnfunction(){vart=this,r=arguments;returnnewPromise(function(o,a){varu=n.apply(t,r);functionc(n){e(u,o,a,c,i,"next",n)}functioni(n){e(u,o,a,c,i,"throw",n)}c(void0)})}}vart;Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void0;varr={goosemodHandlers:{onImport:function(){vare=n(regeneratorRuntime.mark(functione(){varr;returnregeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case0:r=function(){vare=n(regeneratorRuntime.mark(functione(){varn,t,r,o,a;returnregeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case0:n=goosemodScope.webpackModules.common.React,t=goosemodScope.webpackModules,r=t.findByDisplayName,o=t.findByProps,a=r("Text"),(0,o("openModal").openModal)(function(e){returnn.createElement(r("ConfirmModal"),{header:"Relaunch",confirmText:"Relaunch",cancelText:o("Messages").Messages.CANCEL,onClose:function(){},onCancel:e.onClose,onConfirm:function(){returnDiscordNative.app.relaunch()},transitionState:e.transitionState},n.createElement(a,{size:a.Sizes.SIZE_16},"Are you sure you want to relaunch Discord? This will completely terminate Discord and start the updater."))});case4:case"end":returne.stop()}},e)}));returnfunction(){returne.apply(this,arguments)}}(),t=function(){vare=n(regeneratorRuntime.mark(functione(n){returnregeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case0:"F4"==n.code&&(n.preventDefault(),r());case1:case"end":returne.stop()}},e)}));returnfunction(n){returne.apply(this,arguments)}}(),goosemodScope.settings.createItem("Relaunch",[""],n(regeneratorRuntime.mark(functione(){returnregeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case0:r();case1:case"end":returne.stop()}},e)})),!0),document.addEventListener("keydown",t);case4:case"end":returne.stop()}},e)}));returnfunction(){returne.apply(this,arguments)}}(),onRemove:function(){vare=n(regeneratorRuntime.mark(functione(){returnregeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case0:goosemod.settings.removeItem("Relaunch"),document.removeEventListener("keydown",t);case2:case"end":returne.stop()}},e)}));returnfunction(){returne.apply(this,arguments)}}()}};exports.default=r;