(function(o,y,d,n,f){"use strict";const{ScrollView:R}=d.findByProps("ScrollView"),{TableRowGroup:b,TableSwitchRow:w,Stack:m}=d.findByProps("TableSwitchRow","TableRowGroup","Stack");functionT(){const[,e]=n.React.useReducer(function(t){return~t},0);returnn.React.createElement(R,{style:{flex:1}},n.React.createElement(m,{style:{padding:16},spacing:16},n.React.createElement(b,{title:"General"},n.React.createElement(w,{label:"Play on reactions",subLabel:"Play the sound when someone reacts with moyai",value:f.plugin.storage.allowReactions??!0,onValueChange:function(t){f.plugin.storage.allowReactions=t,e()}}))))}const{DCDSoundManager:c}=n.ReactNative.NativeModules,h=d.findByStoreName("SelectedChannelStore"),A="https://raw.githubusercontent.com/Metastruct/garrysmod-chatsounds/master/sound/chatsounds/autoadd/memes/overused%20thud.ogg",u=6969;letg=-1;constD=function(){returnnewPromise(function(e){try{c.prepare(A,"media",u,function(t,a){returne(a)})}catch{e({duration:1e3})}})};leti=null,s=!1;asyncfunctionE(){if(r)try{s&&(i!=null&&clearTimeout(i),c.stop(u),s=!1),s=!0,awaitc.play(u),i=setTimeout(function(){s=!1,r&&c.stop(u),i=null},g)}catch{s=!1}}constv=/🗿|<a?:.*?moy?ai.*?:\d+>/gi;functionS(e){try{if(e.message?.content&&e.channelId==h.getChannelId()&&!e.message.state){constt=e.message.content.match(v);if(t)for(leta=0;a<t.length;a++)setTimeout(E,a*350)}}catch{}}constl=newSet;functionp(e){try{if((y.storage.allowReactions??!0)&&e.channelId==h.getChannelId()){constt=e.emoji?.name;if(t==="\u{1F5FF}"||t&&/moy?ai/i.test(t)){consta=`${e.messageId}:${t}`;if(l.has(a))return;l.add(a),setTimeout(function(){returnl.delete(a)},500),E()}}}catch{}}letr=!1;varC={onLoad:function(){r||D().then(function(e){r=!0,g=e.duration}),n.FluxDispatcher.subscribe("MESSAGE_CREATE",S),n.FluxDispatcher.subscribe("MESSAGE_REACTION_ADD",p)},onUnload:function(){n.FluxDispatcher.unsubscribe("MESSAGE_CREATE",S),n.FluxDispatcher.unsubscribe("MESSAGE_REACTION_ADD",p),l.clear()},settings:T};returno.default=C,Object.defineProperty(o,"__esModule",{value:!0}),o})({},vendetta.plugin,vendetta.metro,vendetta.metro.common,vendetta);