class vs_v9_chat{constructor(){const m="vs_v9_chat",a="vs_chatv9_input_box",b=!0,u={MODERN:0,COMPACT:1,CLASSIC:2};let f=u.MODERN,t=null,L=!1,B=null,V=!1,X=!1,A=!1,z=10,P=!1,ss=!1,U=!1,ts=!1,G=10,R=null,D=!1,es=!1,W=!1,_s=0,q=0,H=null,Y=null,e=null,_=null,is,as=null,vs=null,w,y,Q=null,J=null,os,s=!0,i=null,x=null,p=null,C=200,k,S,I=!1,cs=!1,j=!1;let M=!1,v="";let hs=!1;let o=0,ns=!1;var c=new Map,N=new Map,h=new Map;let n=new Map,T=[0,1,2,3,4,5,9,10,11],F=["guest","chatter","mod","streamer","tech","crew","staff","mvn","vip"],O=["fuck","shit","bitch","biatch","cunt","f_ck","f uck","fu ck","fuc k","fuk","shlt","bltch","cunt","f u c k","s h i t","b i t c h","c u n t","nigg","n1gg","n!gg","ni66","n166","n!66","n i g g","n 1 g g","n ! g g","n i 6 6","n 1 6 6","n ! 6 6","n*gg","kill","k1ll","k!ll","murder","rape","sex","anal","goddam","godamn","goddamn","god damn","god dam","blowjob","fag","pedo","pеdo","p3d","pussy","dick","penis","death to","blowing up","nazi","honky","h0nky","kike","dyke","queer","𝐢𝐠𝐠","wetback","wet back","spic","puszy","pu33y","pu55y","pussies","you will die","you die","u will die","u die","retard","ra pin","f@ g","f@g","shit","cock","cum","piss","wank","tit","slut","gook","ngger","niggr","nggar","nig","nggr","fukin","ni*gg","bastard","cis","fggot","c ock","co ck","fhagg","asshole","stfu","wh0re","p0rn","f u c k","whore","diϲk","ass","a s s","a55","a 5 5","fa g","f ag","re tard","dlck","pe do","fvck","f u k","shìt","bìtch","kìll","nìgg","fucc","rett","badazz","azzh","s'tfu","homo","făğ","făg","fağ","a$$"," die","die ","suck off","sucking off","rapе","nеgro","negro","nІg","NІG","nіg","4ss","s t f u","ret4rd","@ss","sh¡t","b¡tch","semen","s e m e n","wh0r€","n¡gg","fu k","ni gg","nignog","faag","burn some jew","gas some jew","burn jew","gas jew","hitler","heil","ɴɪɢ","tard","r@pe","gas some jews","fąg","dikk","kil your","suck jew","fuсk","nig ","p u 3 3 y","f u 3 k","fu3k","suicide","nig","nig/","p*ed","𝗡𝗜𝗚𝗚","𝙉𝙄𝙂𝙂","ｆｕｃｋ","n_g","negg","f uk","k unt","t its","fggit","cawk","ngr","kneeg","kn33g","paedo","phag","peddo","peeddo","pedddo","s 3 x","lynch","peedo","incest","𝐍𝐈𝐆𝐆","-nig","molest","卐","𝘕𝘐𝘎","𝙽𝙸𝙶","ℕ𝕀𝔾","n&#039;ig","𝖭𝖨𝖦","nlg","n͏i͏g͏","nіg","𝒩𝐼𝒢","𝓝𝓘𝓖","knee grow","kneegrow","νι","nᛁg","nᛂg","卍","curb","stomp","crash","porn","r*pe","stab","nickgur","nhig","beat your meat","beat my meat","beat his meat","phuck","drown","is a jew","n-gg","p*do","jew","j3w","fúçk"],K=(this.filterBadWords=t=>{let s=!1;return s=O.some(s=>t.toLowerCase().includes(s))&&(s=!0,t.contains("ass")&&(s=!(!t.contains(" ass")&&!t.startsWith("ass"))),t.contains("rape")&&(s=!(!t.contains(" rape")&&!t.startsWith("rape"))),t.contains("jew"))?!t.contains("jewl"):s},s=>{b&&console.log(" >> [ "+m+" ] "+s)}),d=(this.send=s=>{t.send(s+"\0\n")},this.monitor=()=>{for(;;)t.readyState!=WebSocket.CLOSED||I||setTimeout(function(){I=!0,vs_chatv9.connect()},2e3)},this.isVip=()=>J,this.getChatProfileUserName=()=>v,this.connect=()=>{B=window.vs_streamname,R=window.vs_username,i=window.vs_token,vs_chatv9.hideInfo(),L||vs_chatv9.showLoading(),"WebSocket"in window?((t=new WebSocket("wss://"+us(B)+"/mvn")).onopen=function(){K("chatSocket.onopen"),I=!1,window.vs_gm?this.send("MVN AUTHGM "+R+" "+i+" "+B+" "+window.vs_gm):this.send("MVN AUTH "+R+" "+i+" "+B)},t.onmessage=function(s){var t,e,_,i,a,v,o,c,h,n,d,r,l,g,m,u,f,p,b,w,y,x=(s=(s=(s=s.data.toString()).replace("\n","")).replace("\0","")).split(" "),C="",k="";if(0<x.length&&(C=x[0]),1<x.length&&(k=x[1]),"ACK"==C)k.contains(";")&&0<(S=k.split(";")).length&&((R=S[0]).startsWith("Guest_")&&(D=!0),is=S[1],Q=S[2],H=vs_chatv9.fontIdToClass(S[3]),Y=vs_chatv9.colorIdToClass(S[4]),as=vs_chatv9.fontIdToClass(S[5]),vs=vs_chatv9.colorIdToClass(S[6]),1==S[7]?vs_chatv9.interface_chatclearing=!0:vs_chatv9.interface_chatclearing=!1,1==S[8]?vs_chatv9.interface_secondarytimestamps=!0:vs_chatv9.interface_secondarytimestamps=!1,D?(vs_chatv9.interface_chatclearing=!0,vs_chatv9.interface_secondarytimestamps=!1,vs_chatv9.interface_font_size=0,vs_chatv9.SetInterfaceFontSize(vs_chatv9.interface_font_size),vs_chatv9.interface_chat_theme=0,vs_chatv9.interface_chat_theme_color=0):(vs_chatv9.interface_font_size=S[9],vs_chatv9.SetInterfaceFontSize(vs_chatv9.interface_font_size),vs_chatv9.interface_chat_theme=S[10],vs_chatv9.interface_chat_theme_color=S[11]),1==S[12]&&(es=!0),$("#vs_chatv9_settings_text_preview_username").text(R),vs_chatv9.hideLoading(),vs_chatv9.RenderInterfaceSettings(),window.vs_gm)&&vs_chatv9.showGhostModeEnabled(),this.send("JOIN "+B);else if("PING"==C)this.send("PONG");else if("MVN"==C){var S=x[1];if("CLEAR"==S){x[2];var I=x[3];ms("vs_chatv9_chatbox"),vs_chatv9.drawStatusMessage(" Chat cleared by "+I)}else if("SYNCD"==S){$("div.vs_chatv9_overlay_input").css("display","none");var I=x[3].split(";"),j=(I[0],I[1],I[4]),M=I[5],I=I[6];"1"==j?(W=!0,_s=M,q=I,K("userFollowing_seconds: "+q),vs_chatv9.hideInfo()):W=!1,vs_chatv9.renderFollowersBox()}else if("SYNCD_FOLLOWER"==S){var j=x[3].split(";"),M=j[0],I=j[1],j=j[2];"1"==M?(W=!0,_s=I,q=j,K("userFollowing_seconds: "+q),vs_chatv9.hideInfo()):W=!1,vs_chatv9.renderFollowersBox()}else if("PURGE"==S){x[2];M=x[3],I=x[4];gs(M),vs_chatv9.drawStatusMessage(I+" purged "+M)}else if("MUTE"==S){x[2];j=x[3],I=x[4];gs(j),vs_chatv9.drawStatusMessage(I+" muted "+j)}else if("UNMUTE"==S){x[2];M=x[3],I=x[4];null==I||""==I?vs_chatv9.drawStatusMessage(M+" is unmuted"):vs_chatv9.drawStatusMessage(I+" unmuted "+M)}else if("BAN"==S){x[2];j=x[3],I=x[4];vs_chatv9.chattersRemove(j),vs_chatv9.RemoveChatter(j),vs_chatv9.drawStatusMessage(I+" banned "+j),gs(j)}else if("UNBAN"==S){x[2];M=x[3],I=x[4];vs_chatv9.drawStatusMessage(I+" unbanned "+M),vs_chatv9.settingsBans_unban_ui(M)}else if("MOD"==S){x[2];j=x[3];vs_chatv9.chattersRemove(j),vs_chatv9.RemoveChatter(j),vs_chatv9.chattersAdd(2,j,!1),vs_chatv9.AddChatter(2,j,!1),vs_chatv9.drawStatusMessage("Modded "+j),R.toLowerCase()==j.toLowerCase()&&(Q=2)}else if("UNMOD"==S){x[2];I=x[3];vs_chatv9.chattersRemove(I),vs_chatv9.RemoveChatter(I),vs_chatv9.chattersAdd(1,I,!1),vs_chatv9.AddChatter(1,I,!1),vs_chatv9.drawStatusMessage("Unmodded "+I),vs_chatv9.settingsMods_unmod_ui(I),R.toLowerCase()==I.toLowerCase()&&(Q=1)}else if("GUESTON"==S){x[2];V=!0,vs_chatv9.drawStatusMessage("Guest chat enabled")}else if("GUESTOFF"==S){x[2];V=!1,vs_chatv9.drawStatusMessage("Guest chat disabled")}else if("GUESTVPN_ON"==S)X=!0;else if("GUESTVPN_OFF"==S)X=!1;else if("ACTON"==S){x[2];P=!0}else if("ACTOFF"==S){x[2];P=!1}else if("ACTVPN_ON"==S)ss=!0;else if("ACTVPN_OFF"==S)ss=!1;else if("SLOWON"==S){x[2];M=x[3];A=!0,z=parseInt(M),vs_chatv9.showInfo("Slow mode enabled: "+z+"s")}else if("SLOWOFF"==S){x[2];A=!1,vs_chatv9.drawStatusMessage("Slow mode disabled"),vs_chatv9.hideInfo()}else if("FOLLOWERS_ON"==S){j=x[3];U=!0,G=parseInt(j),vs_chatv9.showInfo("Followers Only Enabled"),vs_chatv9.renderFollowersBox()}else if("FOLLOWERS_OFF"==S)U=!1,vs_chatv9.drawStatusMessage("Followers Only Disabled"),vs_chatv9.renderFollowersBox();else if("FOLLOWERSVPN_ON"==S)ts=!0,vs_chatv9.renderFollowersBox();else if("FOLLOWERSVPN_OFF"==S)ts=!1,vs_chatv9.renderFollowersBox();else if("NOTICE"==S)vs_chatv9.drawStatusMessage(s.replace("MVN NOTICE ",""));else if("VPN"==S)cs=!0,$("div.vs_chatv9_chatter_vpn").show();else if("HISTORYEND"==k)vs_chatv9.hideLoading(),vs_chatv9.hideLoadingInput(),L=!0,V&&window.vs_gm&&(vs_chatv9.hideGhostModeEnabled(),vs_chatv9.showInfo("Ghost Mode Guest Chat")),V&&D&&vs_chatv9.showInfo("Guest chat enabled"),A&&vs_chatv9.showInfo("Slow mode enabled: "+z+"s"),vs_chatv9.show_infobox_welcome&&!hs&&(hs=!0,vs_chatv9.showChatWelcomeBox()),vs_chatv9.renderFollowersBox();else if("CHATTERS"==k){ns=!1;for(var N=x[3].split(","),T=0;T<=N.length-1;T++){var F,O,E=N[T];E.contains(";")&&(F=(E=E.split(";"))[0],E[1],O=E[2],E=E[3],vs_chatv9.chattersAdd(O,F,E),vs_chatv9.AddChatter(O,F,E))}}else"CHATTERSEND"==k?(vs_chatv9.chattersRenderList(),vs_chatv9.hideLoadingChatters()):"BANNED"==k&&($("div.vs_chatv9_chatter_banned").show(),$("div.vs_chatv9_input").css("visibility","hidden"))}else"JOIN"==k?(r=d=n=h=c=o=v=i=_=e=a=t=S=j=M=I="",I=(l=C.split(";"))[0],l[1],M=l[2],j=l[3],S=l[4],t=(l=x[3].split(";"))[0],e=l[1],_=l[2],i=l[3],a=l[8],v=l[9],o=l[10],c=l[11],h=l[12],n=l[13],d=l[14],r=l[15],I.toLowerCase()==R.toLowerCase()&&(Q=M,J=j,os=S,V="1"==(V=t),"1"==(A=e)?(A=!0,z=_):A=!1,P="1"==(P=i),ss="1"==v,X="1"==a,U="1"==o,G=c,ts="1"==h,W="1"==n,_s=d,q=r,vs_chatv9.hideLoading(),vs_chatv9.hideLoadingInput(),vs_chatv9.renderFollowersBox()),vs_chatv9.chattersAdd(M,I,j)):"PART"==k?(l=C.split(";")[0],vs_chatv9.chattersRemove(l),vs_chatv9.RemoveChatter(l)):"HISTORY"==k?""==C?K("EMPTY HISTORY DATA?"):L||(S=f=u=0,w=b=p=m=g="",3<(y=C.split(";")).length&&(m=y[0],y[1],u=y[2],f=y[3],S=x[2],g=x[3],b=vs_chatv9.fontIdToClass(y[5]),w=vs_chatv9.colorIdToClass(y[6]),vs_chatv9.fontIdToClass(y[7]),vs_chatv9.colorIdToClass(y[8]),p=s.split(C+" HISTORY "+S+" "+g+" :")[1],vs_privacy.IsBlockedUser(m)||Z(k,m,u,w,b,f,p,S))):"CHAT"==k&&(""==C?K("EMPTY CHAT DATA?"):(f=u=0,w=b=p=m=g="",3<(y=C.split(";")).length&&(m=y[0],y[1],u=y[2],f=y[3],g=x[2],b=vs_chatv9.fontIdToClass(y[5]),w=vs_chatv9.colorIdToClass(y[6]),vs_chatv9.fontIdToClass(y[7]),vs_chatv9.colorIdToClass(y[8]),p=s.split(C+" CHAT "+g+" :")[1],vs_privacy.IsBlockedUser(m)||Z(k,m,u,w,b,f,p,-1))))},t.onclose=function(){K("chatSocket.onclose"),vs_chatv9.showLoadingInput(),vs_chatv9.showLoadingSettings(),vs_chatv9.showLoading(),vs_chatv9.showLoadingDisconnected(),vs_chatv9.showInfo("Lost connection"),cs||setTimeout(function(){I=!0,vs_chatv9.connect()},2e3)},t.onerror=function(s){K("chatSocket.onerror: "+s),console.log(s),vs_chatv9.showLoadingInput(),vs_chatv9.showLoadingSettings(),vs_chatv9.showLoading(),vs_chatv9.showLoadingDisconnected(),vs_chatv9.showInfo("Lost connection"),t.close()}):vs_chatv9.drawStatusMessage("Browser does not support WebSockets")},this.Sync=()=>{$("div.vs_chatv9_overlay_input").css("display","flex"),vs_chatv9.send("MVN SYNC "+B+" "+i)},this.SyncFollower=()=>{vs_chatv9.send("MVN SYNC_FOLLOWER "+B+" "+i)},this.SyncSubscriber=()=>{vs_chatv9.send("MVN SYNC_SUBSCRIBER "+B+" "+i)},null),E=!1,Z=(this.renderFollowersBox=()=>{U?(vs_chatv9.showInfo("Followers Only"),K("streamFollowersModeDuration: "+G),K("userFollowing_seconds: "+q),G>q?0<q?(K("Let's go!"),vs_chatv9.startFollowersTimer()):(K("Welp"),null!=d&&clearInterval(d)):(K("Wait a minute..."),null!=d&&clearInterval(d),E||(E=!0,setTimeout(function(){vs_chatv9.renderFollowersBox()},5e3)))):(vs_chatv9.hideInfo(),null!=d&&clearInterval(d))},this.startFollowersTimer=()=>{K("startFollowersTimer"),null!=d&&clearInterval(d),d=setInterval(function(){var s=G-q;q++,0<s?$("#vs_chatv9_input_info_msg").text("Followers Only -> "+vs_core.SecondsToString(s)):vs_chatv9.renderFollowersBox()},1e3)},this.SetThemeColor=()=>{0==this.interface_chat_theme_color?($("div.the_chat").removeClass("the_chat_psycho"),$("div.vs_chatv9_chatarea_spacer").removeClass("vs_chatv9_chatarea_spacer_psycho"),$("li.vs_chatv9_msg").removeClass("vs_chatv9_msg_psycho"),$("div.vs_chatv9_msg_body").removeClass("vs_chatv9_msg_body_psycho"),$("div.vs_chatv9_msg_body_multi").removeClass("vs_chatv9_msg_body_multi_psycho").addClass("vs_chatv9_msg_body_multi"),$("span.vs_chatv9_color_01").removeClass("vs_chatv9_color_01_psycho"),$("a.vs_chatv9_url").removeClass("vs_chatv9_url_psycho"),$("div.vs_chatv9_msg_timestamp_multi").removeClass("vs_chatv9_msg_timestamp_multi_psycho"),$("img.vs_chatv9_msg_tools").show(),$("img.vs_chatv9_msg_tools_psycho").hide()):1==this.interface_chat_theme_color&&($("div.the_chat").removeClass("the_chat_psycho").addClass("the_chat_psycho"),$("div.vs_chatv9_chatarea_spacer").removeClass("vs_chatv9_chatarea_spacer_psycho").addClass("vs_chatv9_chatarea_spacer_psycho"),$("li.vs_chatv9_msg").removeClass("vs_chatv9_msg_psycho").addClass("vs_chatv9_msg_psycho"),$("div.vs_chatv9_msg_body").removeClass("vs_chatv9_msg_body_psycho").addClass("vs_chatv9_msg_body_psycho"),$("div.vs_chatv9_msg_body_multi").removeClass("vs_chatv9_msg_body_multi_psycho").addClass("vs_chatv9_msg_body_multi_psycho"),$("span.vs_chatv9_color_01").removeClass("vs_chatv9_color_01_psycho").addClass("vs_chatv9_color_01_psycho"),$("a.vs_chatv9_url").removeClass("vs_chatv9_url_psycho").addClass("vs_chatv9_url_psycho"),$("div.vs_chatv9_msg_timestamp_multi").removeClass("vs_chatv9_msg_timestamp_multi_psycho").addClass("vs_chatv9_msg_timestamp_multi_psycho"),$("img.vs_chatv9_msg_tools").hide(),$("img.vs_chatv9_msg_tools_psycho").show())},this.RenderThemeColor=()=>{1==this.interface_chat_theme_color&&($("div.the_chat").removeClass("the_chat_psycho").addClass("the_chat_psycho"),$("div.vs_chatv9_chatarea_spacer").removeClass("vs_chatv9_chatarea_spacer_psycho").addClass("vs_chatv9_chatarea_spacer_psycho"),$("li.vs_chatv9_msg").removeClass("vs_chatv9_msg_psycho").addClass("vs_chatv9_msg_psycho"),$("div.vs_chatv9_msg_body").removeClass("vs_chatv9_msg_body_psycho").addClass("vs_chatv9_msg_body_psycho"),$("div.vs_chatv9_msg_body_multi").removeClass("vs_chatv9_msg_body_multi_psycho").addClass("vs_chatv9_msg_body_multi_psycho"),$("span.vs_chatv9_color_01").removeClass("vs_chatv9_color_01_psycho").addClass("vs_chatv9_color_01_psycho"),$("a.vs_chatv9_url").removeClass("vs_chatv9_url_psycho").addClass("vs_chatv9_url_psycho"),$("div.vs_chatv9_msg_timestamp_multi").removeClass("vs_chatv9_msg_timestamp_multi_psycho").addClass("vs_chatv9_msg_timestamp_multi_psycho"),$("img.vs_chatv9_msg_tools").hide(),$("img.vs_chatv9_msg_tools_psycho").show())},this.showLoading=()=>{null!=this.settingsScreen&&""!=this.settingsScreen||L||$("div.vs_chatv9_overlay").css("display","flex")},this.showLoadingDisconnected=()=>{this.emojisBoxOpen&&$("div.vs_chatv9_overlay").css("display","flex")},this.hideLoading=()=>{$("div.vs_chatv9_overlay").fadeOut(250)},this.showLoadingInput=()=>{!L||this.emojisBoxOpen||$("div.vs_chatv9_overlay_input").css("display","flex")},this.hideLoadingInput=()=>{$("div.vs_chatv9_overlay_input").fadeOut(250)},this.showLoadingSettings=()=>{this.settingsWindowOpen&&$("div.vs_chatv9_overlay_settings").css("display","flex")},this.hideLoadingSettings=()=>{$("div.vs_chatv9_overlay_chatters").fadeOut(250)},this.showLoadingChatters=()=>{$("div.vs_chatv9_overlay_chatters").css("display","flex")},this.hideLoadingChatters=()=>{$("div.vs_chatv9_overlay_chatters").fadeOut(250)},this.showInfo=s=>{!L||this.emojisBoxOpen||(vs_chatv9_input_info=!0,$("#vs_chatv9_input_info_msg").text(s),$(".vs_chatv9_input_info").show(),$(".vs_chatv9_wrapper").height($(".vs_chatv9_wrapper").height()+$(".vs_chatv9_input_info").height()),vs_v9_resize_chat(),vs_chatv9.scrollChat())},this.hideInfo=()=>{vs_chatv9_input_info=!1,$(".vs_chatv9_input_info").hide(),$(".vs_chatv9_wrapper").height($(".vs_chatv9_wrapper").height()-$(".vs_chatv9_input_info").height()),vs_v9_resize_chat(),vs_chatv9.scrollChat()},this.clickInfo=()=>{U&&($("div.vs_chatv9_followersonly_box").show(),U)&&vs_chatv9.showFollowersOnlyBox()},this.scroll=s=>{s=$(s).prop("scrollHeight");null!=vs_chatv9_scroller&&vs_chatv9_scroller.getScrollElement().scrollTo({top:s,behavior:"auto"})},this.scrollChat=()=>{s?vs_chatv9.scroll("#vs_chatv9_chatbox"):$("#vs_v9_resume_scrolling_chat").fadeIn(250)},this.setChatScroll=()=>{s=!0},this.disableChatScroll=()=>{s=!1},this.stopChatScroll=()=>{s=!1,$("#vs_v9_resume_scrolling_chat").show()},this.resumeChatScroll=()=>{s=!0,$("#vs_v9_resume_scrolling_chat").hide(),vs_chatv9.scrollChat()},this.resumeChatScrollManually=()=>{s=!0,$("#vs_v9_resume_scrolling_chat").hide(),vs_chatv9.scroll("#vs_chatv9_chatbox")},this.drawStatusMessage=s=>{$('<li class="vs_chatv9_msg_status">'+s+"</li>").appendTo($("#vs_chatv9_chatbox")),x="",vs_chatv9.scrollChat()},(s,e,t,_,i,a,v,o)=>{var c=e.toLowerCase()+"-"+Math.random().toString(36).substring(4)+Math.random().toString(36).substring(3);let h="",n="",d="",r="",l=!1,g=(e.toLowerCase().startsWith("guest_")&&(l=!0),0);v=v.replaceAll("<","&lt;");var m='<div class="vs_chatv9_name_highlight">'+R+"</div>";if(e.toLowerCase()!=R.toLowerCase()&&(v=v.replace(new RegExp("@"+R,"i"),m)),1==a)if(v.contains("youtube.com/watch?v=")||v.contains("youtu.be/")){g=1;let s=v.match(/\b(?:https?|ftp):\/\/[a-z0-9-+&@#\/%?=~_|!:,.;]*[a-z0-9-+&@#\/%=~_|]/i)+"";(s=(s=(s=(s=s.replace("https://www.youtube.com/watch?v=","")).replace("https://youtube.com/watch?v=","")).replace("https://youtu.be/","")).contains("?")?s.split("?")[0]:s).contains("&")&&(s=s.split("&")[0]),v=v.replace(new RegExp(/((http|https):\/\/[\w?=&.\/-;#~%-]+(?![\w\s?&.\/;#~%"=-]*>))/,"i"),'<a href="https://www.youtube.com/watch?v='+s+'" target="_blank" class="vs_chatv9_url" rel=”noopener nofollow”>https://www.youtube.com/watch?v='+s+'</a><br /><br /><div class="vs_v9_chat_youtube_embed_big" id="vs_youtube_embed-'+c+'" onclick="vs_chatv9.LoadYouTubeEmbed(\''+c+"', '"+s+"')\" style=\"background-image:url('https://i.ytimg.com/vi/"+s+'/mqdefault.jpg\')"><img src="https://cdn.vaughnsoft.net/img/svg/youtube_logo_red.svg" class="vs_v9_chat_youtube_embed_big" /></div>')}else if((v.match(/https?:\/\/([a-z0-9]+[.])tenor[.]com\//i)||v.match(/https?:\/\/s3[.]vaughnsoft[.]net\/tenor\//i)||v.match(/https?:\/\/s3-iad[.]vaughnsoft[.]net\/tenor\//i))&&!v.contains(" ")){g=2;let s="0",t=1;v.contains("#")&&((m=v.split("#"))[0],(m=m[1]).contains("-"))&&(m=m.split("-"),s=m[0],t=m[1]),h=e+"-gif-"+Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2)+"-"+s,"0"==s?v=v.replace(v,'<img src="'+v+'" class="vs_chatv9_emojis_gif" id="vs_gif_tenor-'+h+'" onclick="vs_chatv9.displayGIF(\''+v+"', '"+s+"');\" onmouseover=\"vs_chatv9.heartGIFvalidate('"+h+"', '"+s+"');\" />"):1!=t&&2!=t||(v=v.replace(v,'<img src="'+v+'" class="vs_chatv9_emojis_gif" id="vs_gif_tenor-'+h+'" onclick="vs_chatv9.displayGIF(\''+v+"', '"+s+"');\" onmouseover=\"vs_chatv9.heartGIFvalidate('"+h+"', '"+s+'\');" /><img src="//cdn.vaughnsoft.net/img/svg/repost2.svg" class="vs_chatv9_emojis_gif_repost" id="vs_gif_tenor_repost-'+h+'" onclick="vs_chatv9.repostGIF(\''+h+"', '"+v+"', '"+s+'\');" /><img src="//cdn.vaughnsoft.net/img/svg/heart.svg" class="vs_chatv9_emojis_gif_heart" id="vs_gif_tenor_heart-'+h+'" onclick="vs_chatv9.heartGIF(\''+h+"', '"+s+'\');" /><img src="//cdn.vaughnsoft.net/img/svg/unheart.svg" class="vs_chatv9_emojis_gif_unheart" id="vs_gif_tenor_unheart-'+h+'" onclick="vs_chatv9.unheartGIF(\''+h+"', '"+s+"', false);\" />"))}else!v.match(/https?:\/\/s3-iad[.]vaughnsoft[.]net\/imgur\//i)&&!v.match(/https?:\/\/i[.]imgur[.]com\//i)||v.contains(" ")||(g=3,v=(v=(v=v.replace("i.imgur.com","s3-iad.vaughnsoft.net/imgur")).replace(".mp4",".gif")).replace(".webm",".gif"),n=e+"-imgur-"+Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2),v=v.replace(v,'<img src="'+v+'" class="vs_chatv9_emojis_imgur" id="vs_img_imgur-'+n+'" onclick="vs_chatv9.displayImgur(\''+v+"');\" />"));if((!D||!vs_chatv9.filterBadWords(v)||2==g||window.vs_gm)&&(!e.toLowerCase().startsWith("guest_")||!vs_chatv9.filterBadWords(v))){if(l?(l=!0,v=v.replace(new RegExp(/([\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&amp;:\/~\+#]*[\w\-\@?^=%&amp;\/~\+#])?)/gi),"&lt;Removed URL&gt;"),v=ChatV2emoticons.Handle("",v,"e",l)):0==g&&(v=(v=ChatV2emoticons.Handle("",v,"e",l)).replace(/((http|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&amp;:\/~\+#]*[\w\-\@?^=%&amp;\/~\+#])?)/gi,'<a href="$1" target="_blank" class="vs_chatv9_url" rel=”noopener nofollow”>$1</a>')),(v=$.trim(v)).startsWith("/me ")&&(v='<span class="vs_chatv9_msg_me">'+(v=v.replace("/me ",""))+"</span>"),"vaughn"==e.toLowerCase()&&(r+='<div class="vs_chatv9_msg_badge vs_chatv9_msg_badge_bot">bot</div>'),10==t&&(r+='<div class="vs_chatv9_msg_badge vs_chatv9_msg_badge_mvn">mvn</div>'),9==t&&(r+='<div class="vs_chatv9_msg_badge vs_chatv9_msg_badge_staff">staff</div>'),2==t&&(r+='<div class="vs_chatv9_msg_badge vs_chatv9_msg_badge_mod">mod</div>'),3==t&&(r+='<div class="vs_chatv9_msg_badge vs_chatv9_msg_badge_streamer">streamer</div>'),4==t&&(r+='<div class="vs_chatv9_msg_badge vs_chatv9_msg_badge_tech">tech</div>'),1==a&&(r+='<div class="vs_chatv9_msg_badge vs_chatv9_msg_badge_vip" onclick="vs_chatv9.showModalVIPinfo()">vip</div>'),i=""==i?" vs_chatv9_font_00":" "+i,_=""==_?" vs_chatv9_color_01":" "+_,"HISTORY"==s||"CHAT"==s)if(f==u.MODERN||f==u.COMPACT){let s=N.get(e);null==s&&(s=0,N.set(e,s)),e==x&&s<=5&&f!=u.COMPACT?(f==u.MODERN&&(d='<div class="vs_chatv9_msg_body_wrapper vs_chatv9_msg_flex_multi"><div class="vs_chatv9_box_left"></div><div class="vs_chatv9_box_right"><div class="vs_chatv9_msg_flex"><div class="vs_chatv9_msg_timestamp_multi">'+rs(o)+'</div><div class="vs_chatv9_msg_body_multi" id="chatv9msg-'+c+'">'+v+'</div><div class="vs_chatv9_msg_tools_multi" onclick="vs_chatv9.showCtxChatboxTools(\''+e.toLowerCase()+"','"+c+'\');"><img src="//cdn.vaughnsoft.net/img/svg/more.svg" class="vs_chatv9_msg_tools" /></div></div></div></div>'),vs_chatv9.scrollChat(),$(d).appendTo($("#chatv9-"+p)),vs_chatv9.scrollChat(),N.set(e,s+1)):(N.set(e,1),f==u.MODERN?d='<li class="vs_chatv9_msg" id="chatv9-container-'+c+'"><div class="vs_chatv9_box_left"><div class="vs_chatv9_msg_profile"><div class="vs_chatv9_msg_profile_photo" onclick="vs_chatv9.showChatProfile(\''+e.toLowerCase()+"','"+c+'\');"><img src="//cdn.vaughnsoft.net/get_profile_photo.php?u='+e.toLowerCase()+'" class="vs_chatv9_msg_profile_photo" /></div></div></div><div class="vs_chatv9_box_right" id="chatv9-'+c+'"><div class="vs_chatv9_msg_flex"><div class="vs_chatv9_msg_user_info"><div class="vs_chatv9_msg_flex"><div class="vs_chatv9_msg_username" onclick="vs_chatv9.insertUserReplyName(\''+e+"');\" oncontextmenu=\"vs_chatv9.showCtxChatboxTools('"+e.toLowerCase()+"','"+c+'\', true);return false;"><span class="'+_+i+'" data-'+_.replaceAll("_","-")+'-username="'+e+'">'+e+'</span></div><div class="vs_chatv9_msg_badges">'+r+'</div><div class="vs_chatv9_msg_timestamp">'+ds(o)+'</div></div></div></div><div class="vs_chatv9_msg_body_wrapper vs_chatv9_msg_flex_firstline"><div class="vs_chatv9_msg_flex"><div class="vs_chatv9_msg_timestamp_multi"></div><div class="vs_chatv9_msg_body" id="chatv9msg-'+c+'">'+v+'</div><div class="vs_chatv9_msg_tools" onclick="vs_chatv9.showCtxChatboxTools(\''+e.toLowerCase()+"','"+c+'\');"><img src="//cdn.vaughnsoft.net/img/svg/more.svg" class="vs_chatv9_msg_tools" /><img src="//cdn.vaughnsoft.net/img/svg/more_black.svg" class="vs_chatv9_msg_tools_psycho" /></div></div></div></div></li>':f==u.COMPACT&&(d='<li class="vs_chatv9_msg" id="chatv9-container-'+c+'"><div class="vs_chatv9_box_right">'+e+': <span class="vs_chatv9_msg_body" id="chatv9msg-'+c+'">'+v+"</span></div></li>"),vs_chatv9.scrollChat(),$(d).appendTo($("#vs_chatv9_chatbox")),vs_chatv9.scrollChat(),null==p&&$("#chatv9-"+c).css("marginTop","0px"),vs_chatv9.scrollChat(),p=c,x=e)}else f==u.CLASSIC&&($(d).appendTo($("#vs_chatv9_chatbox")),null==p&&$("#chatv9-"+c).css("marginTop","0px"),p=c,x=e);if(ls("vs_chatv9_chatbox"),this.SetInterfaceFontSize(this.interfaceFontSize),this.SetInterfaceSecondaryTimestamps(),this.RenderThemeColor(),vs_chatv9.scrollChat(),2==g)try{$("#vs_gif_tenor-"+h).on("load",function(){vs_chatv9.scrollChat()}).each(function(){if(vs_chatv9.scrollChat(),null!=this&&$(this).prop("complete"))try{$(this).load()}catch(s){$(this).load()}})}catch(s){}if(3==g)try{$("#vs_img_imgur-"+n).on("load",function(){vs_chatv9.scrollChat()}).each(function(){if(vs_chatv9.scrollChat(),null!=this&&$(this).prop("complete"))try{$(this).load()}catch(s){$(this).load()}})}catch(s){}vs_chatv9.scrollChat()}}),r=(this.IsRiskyChatter=()=>"1"==window.vs_risky,this.ToggleInterfaceChatClearing=()=>{this.interface_chatclearing?this.interface_chatclearing=!1:this.interface_chatclearing=!0},this.InterfaceChatClearing_enable=()=>{this.interface_chatclearing=!0},this.InterfaceChatClearing_disable=()=>{this.interface_chatclearing=!1},this.SetInterfaceSecondaryTimestamps=()=>{this.interface_secondarytimestamps?$("div.vs_chatv9_msg_timestamp_multi").css("opacity","1"):$("div.vs_chatv9_msg_timestamp_multi").css("opacity","0")},this.InterfaceSecondaryTimestamps_enable=()=>{this.interface_secondarytimestamps=!0,$("div.vs_chatv9_msg_timestamp_multi").css("opacity","1")},this.InterfaceSecondaryTimestamps_disable=()=>{this.interface_secondarytimestamps=!1,$("div.vs_chatv9_msg_timestamp_multi").css("opacity","0")},this.ToggleInterfaceSecondaryTimestamps=()=>{this.interface_secondarytimestamps?(this.interface_secondarytimestamps=!1,$("div.vs_chatv9_msg_timestamp_multi").css("opacity","0")):(this.interface_secondarytimestamps=!0,$("div.vs_chatv9_msg_timestamp_multi").css("opacity","1"))},this.SetInterfaceFontSize=s=>{-1==(this.interfaceFontSize=s)?($("div.vs_chatv9_msg_username").css("font-size","12px"),$("div.vs_chatv9_msg_body").css("font-size","11px"),$("div.vs_chatv9_msg_body_multi").css("font-size","11px"),$("div.vs_chatv9_msg_timestamp").css("font-size","9px"),$("li.vs_chatv9_msg_status").css("font-size","12px"),$("div.vs_chatv9_settings_body_list_chatters_name").css("font-size","12px"),$("div.vs_chatv9_settings_body_list_header").css("font-size","12px"),$("div.vs_chatv9_settings_body_list_left").css("font-size","12px"),$("div.vs_chatv9_settings_section_description").css("font-size","12px"),$("div.vs_chatv9_settings_section_body_left").css("font-size","12px"),$("div.vs_chatv9_settings_moderation_bans_row_left").css("font-size","12px"),$("div.vs_chatv9_settings_moderation_bans_row_left_baninfo").css("font-size","10px"),$("div.vs_chatv9_settings_moderation_bans_row_left_bandt").css("font-size","10px"),$("div.vs_chatv9_settings_title").css("font-size","14px")):0==s?($("div.vs_chatv9_msg_username").css("font-size","14px"),$("div.vs_chatv9_msg_body").css("font-size","13px"),$("div.vs_chatv9_msg_body_multi").css("font-size","13px"),$("div.vs_chatv9_msg_timestamp").css("font-size","10px"),$("li.vs_chatv9_msg_status").css("font-size","12px"),$("div.vs_chatv9_settings_body_list_chatters_name").css("font-size","14px"),$("div.vs_chatv9_settings_body_list_header").css("font-size","14px"),$("div.vs_chatv9_settings_body_list_left").css("font-size","14px"),$("div.vs_chatv9_settings_section_description").css("font-size","14px"),$("div.vs_chatv9_settings_section_body_left").css("font-size","14px"),$("div.vs_chatv9_settings_moderation_bans_row_left").css("font-size","14px"),$("div.vs_chatv9_settings_moderation_bans_row_left_baninfo").css("font-size","12px"),$("div.vs_chatv9_settings_moderation_bans_row_left_bandt").css("font-size","12px"),$("div.vs_chatv9_settings_title").css("font-size","16px")):1==s?($("div.vs_chatv9_msg_username").css("font-size","16px"),$("div.vs_chatv9_msg_body").css("font-size","16px"),$("div.vs_chatv9_msg_body_multi").css("font-size","16px"),$("div.vs_chatv9_msg_timestamp").css("font-size","12px"),$("li.vs_chatv9_msg_status").css("font-size","15px"),$("div.vs_chatv9_settings_body_list_chatters_name").css("font-size","18px"),$("div.vs_chatv9_settings_body_list_header").css("font-size","18px"),$("div.vs_chatv9_settings_body_list_left").css("font-size","18px"),$("div.vs_chatv9_settings_section_description").css("font-size","18px"),$("div.vs_chatv9_settings_section_body_left").css("font-size","18px"),$("div.vs_chatv9_settings_moderation_bans_row_left").css("font-size","18px"),$("div.vs_chatv9_settings_moderation_bans_row_left_baninfo").css("font-size","16px"),$("div.vs_chatv9_settings_moderation_bans_row_left_bandt").css("font-size","16px"),$("div.vs_chatv9_settings_title").css("font-size","18px")):2==s?($("div.vs_chatv9_msg_username").css("font-size","22px"),$("div.vs_chatv9_msg_body").css("font-size","22px"),$("div.vs_chatv9_msg_body_multi").css("font-size","22px"),$("div.vs_chatv9_msg_timestamp").css("font-size","18px"),$("li.vs_chatv9_msg_status").css("font-size","22px"),$("div.vs_chatv9_settings_body_list_chatters_name").css("font-size","22px"),$("div.vs_chatv9_settings_body_list_header").css("font-size","22px"),$("div.vs_chatv9_settings_body_list_left").css("font-size","22px"),$("div.vs_chatv9_settings_section_description").css("font-size","22px"),$("div.vs_chatv9_settings_section_body_left").css("font-size","22px"),$("div.vs_chatv9_settings_moderation_bans_row_left").css("font-size","22px"),$("div.vs_chatv9_settings_moderation_bans_row_left_baninfo").css("font-size","20px"),$("div.vs_chatv9_settings_moderation_bans_row_left_bandt").css("font-size","20px"),$("div.vs_chatv9_settings_title").css("font-size","22px")):3==s&&($("div.vs_chatv9_msg_username").css("font-size","24px"),$("div.vs_chatv9_msg_body").css("font-size","24px"),$("div.vs_chatv9_msg_body_multi").css("font-size","24px"),$("div.vs_chatv9_msg_timestamp").css("font-size","20px"),$("li.vs_chatv9_msg_status").css("font-size","24px"),$("div.vs_chatv9_settings_body_list_chatters_name").css("font-size","24px"),$("div.vs_chatv9_settings_body_list_header").css("font-size","24px"),$("div.vs_chatv9_settings_body_list_left").css("font-size","24px"),$("div.vs_chatv9_settings_section_description").css("font-size","24px"),$("div.vs_chatv9_settings_section_body_left").css("font-size","24px"),$("div.vs_chatv9_settings_moderation_bans_row_left").css("font-size","24px"),$("div.vs_chatv9_settings_moderation_bans_row_left_baninfo").css("font-size","22px"),$("div.vs_chatv9_settings_moderation_bans_row_left_bandt").css("font-size","22px"),$("div.vs_chatv9_settings_title").css("font-size","24px"))},null),ds=(this.renderLockoutBox=(s,t)=>{null!=r&&clearInterval(r);let e=Math.floor(t/60),_=t-60*e,i=(60<t?vs_chatv9.showInfo(s+" for "+e+"m "+_+"s"):vs_chatv9.showInfo(s+" for "+t+"s"),t--);r=setInterval(function(){0<i&&(e=Math.floor(i/60),_=i-60*e,60<i?$("#vs_chatv9_input_info_msg").text(s+" for "+e+"m "+_+"s"):$("#vs_chatv9_input_info_msg").text(s+" for "+i+"s"),i--),i<=0&&vs_chatv9.hideLockoutBox()},1e3)},this.hideLockoutBox=()=>{vs_chatv9.hideInfo(),$("span.vs_chatv9_input_box_overlay_action").text(""),$("span.vs_chatv9_input_box_overlay_time").text(""),null!=r&&clearInterval(r)},s=>{var t="",s=-1==s?new Date:new Date(1e3*s),e=s.getHours(),t=e<12?"AM":"PM",_=(12<(e=0==e?12:e)&&(e-=12),s.getMinutes()),s=(_+="",s.getSeconds());return e+":"+(_=1==_.length?"0"+_:_)+":"+(s=1==(s+="").length?"0"+s:s)+" "+t}),rs=s=>{var t="",s=-1==s?new Date:new Date(1e3*s),e=s.getHours(),t=e<12?"AM":"PM",_=(12<(e=0==e?12:e)&&(e-=12),s.getMinutes()),s=(_+="",s.getSeconds());return 1==_.length&&(_="0"+_),1==(s+="").length&&(s="0"+s),e+":"+_+" "+t},ls=(this.LoadYouTubeEmbed=(s,t)=>{$("#vs_youtube_embed-"+s).html('<iframe width="320" height="180" src="https://www.youtube-nocookie.com/embed/'+t+'?autoplay=1" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>')},s=>{s=$("#"+s).children().filter("li");s.length>=C&&$("#"+s.first().attr("id")).remove()}),gs=s=>{$("div[id^=chatv9msg-"+s.toLowerCase()+"-]").html("&lt;purged message&gt;"),$("div[id^=chatv9msg2-"+s.toLowerCase()+"-]").html("&lt;purged message&gt;")},ms=s=>{this.interface_chatclearing&&$("#"+s).empty()},us=s=>{if(null==s)K("chanName undefined");else{if("#vl-tech_corner"==s||"#btv-tech_corner"==s)return s="#vl-tech_corner","chat-ws-1x02.vaughnsoft.net";if("#vl-mark"==s||"#btv-mark"==s)return s="#vl-mark","chat-ws-1x03.vaughnsoft.net";if("#vl-vtest"==s)return"chat-127.vaughnsoft.net";if(s.startsWith("#btv-"))return"chat-ws-1x08.vaughnsoft.net";if("#vl-community"==s||"#btv-community"==s)return s="#vl-community","chat-ws-1x02.vaughnsoft.net";try{var t=["chat-ws-1x02.vaughnsoft.net","chat-ws-1x03.vaughnsoft.net","chat-ws-1x04.vaughnsoft.net","chat-ws-1x05.vaughnsoft.net","chat-ws-1x06.vaughnsoft.net","chat-ws-1x07.vaughnsoft.net"],e=s.charCodeAt(0),_=s.length-1;return t[(e+s.charCodeAt(_))%t.length]}catch(s){return"error"}}},fs=(this.AddChatter=(s,t,e)=>{var _=t.toLowerCase();h.has(_)||h.set(_,t+";"+s+";"+e)},this.RemoveChatter=s=>{s=s.toLowerCase();h.has(s)&&h.delete(s)},this.RenderChattersList=()=>{new Map([...h.entries()].sort()).forEach(function(s,t){var s=s.split(";"),e=s[0],_=s[1],s=s[2];K(e+", level: "+_+", vip: "+s)}),K("RenderChattersList: "+h.size)},this.chattersAdd=(s,t,e)=>{var _=t.toLowerCase(),i=T.indexOf(parseInt(s)),i=(s=F[i])+"!"+_;"chatter"==s&&1==e&&(s="vip"),1!=e||n.has(t)||n.set(t.toLowerCase(),t),(c=null==c?new Map:c).has(i)||c.set(i,t),this.chattersRenderList()},this.chattersListCount=e=>{let _=0;return"vip"==e?null!=n&&(_=n.size):c.forEach(function(s,t){t.startsWith(e+"!")&&_++}),_},this.chattersRemove=s=>{let e=s.toLowerCase();c.forEach(function(s,t){e==s.toLowerCase()&&c.delete(t)}),this.chattersRenderList()},this.chattersResetList=()=>{c=new Map,n=new Array},this.chattersRenderList=()=>{if(this.chattersWindowOpen)for(let s=0;s<=F.length-1;s++){let i=F[s];null!=i&&($("#vs_chatv9_chatters_"+i).html(""),new Map([...c.entries()].sort()).forEach(function(s,t){let e=t.split("!")[0],_="";vs_chatv9.chattersIsVip(s)&&(_='<div class="vs_chatv9_msg_badge vs_chatv9_msg_badge_vip">vip</div> ',"chatter"==e)&&(e="vip"),i==e&&(t='<div class="vs_chatv9_settings_body_list_chatters_name" title="'+s+'" id="vs_chatv9_chatter-'+s+'-name" onclick="vs_chatv9.showChatProfile(\''+s.toLowerCase()+"', '');\" oncontextmenu=\"vs_chatv9.showCtxChatboxTools('"+s.toLowerCase()+"', '');return false;\">"+_+s+"</div>",$("#vs_chatv9_chatters_"+e).append(t))}),0<this.chattersListCount(i)&&"guest"!=i?$("#vs_chat_v9_chatters_category_"+i).show():$("#vs_chat_v9_chatters_category_"+i).hide())}this.SetInterfaceFontSize(this.interfaceFontSize)},this.chattersSortCategory=s=>{c.has(s)&&c[s].sort((s,t)=>s.localeCompare(t))},this.chattersIsVip=s=>null!=n&&!!n.has(s.toLowerCase()),null),ps=(this.startSlowCooldown=s=>{j=!0;let t="Slow Mode",e=(D&&(t="Guest Chat"),window.vs_gm&&(t="Ghost Mode Guest Chat"),null!=fs&&clearInterval(fs),Math.floor(s/60)),_=s-60*e,i=(60<s?vs_chatv9.showInfo(t+" "+e+"m "+_+"s"):vs_chatv9.showInfo(t+" "+s+"s"),s--);fs=setInterval(function(){0<i&&(e=Math.floor(i/60),_=i-60*e,60<i?$("#vs_chatv9_input_info_msg").text(t+" "+e+"m "+_+"s"):$("#vs_chatv9_input_info_msg").text(t+" "+i+"s"),i--),i<=0&&vs_chatv9.hideSlowCooldown()},1e3)},this.hideSlowCooldown=()=>{j=!1,vs_chatv9.hideInfo(),$("span.vs_chatv9_input_box_overlay_action").text(""),$("span.vs_chatv9_input_box_overlay_time").text(""),null!=fs&&clearInterval(fs),window.vs_gm&&vs_chatv9.showInfo("Ghost Mode Guest Chat")},this.submitChat=(s,t)=>{s=s||window.event;var e=$("#vs_chatv9_input_box").val().length;if("click"==s.type&&!V&&D)return Modal.SignIn2(),s.preventDefault(),!1;if("click"==s.type&&P&&!es)return Modal.ConfirmEmail(),s.preventDefault(),!1;if(!t){if(13===s.keyCode||13===s.which)return j?s.preventDefault():(0==e&&s.preventDefault(),e<window.vs_chatv9_input_max?(vs_chatv9.handleChatInput(),s.preventDefault(),$("#vs_chatv9_input_options_input_counter").text(0),D&&vs_chatv9.startSlowCooldown(z)):s.preventDefault()),!1;50==s.keyCode?(t=$("#"+a).prop("selectionStart"),console.log("cursorPost: "+t)):s.keyCode}e>window.vs_chatv9_input_max?$("#vs_chatv9_input_options_input_counter").removeClass("vs_chatv9_input_options_input_counter").removeClass("vs_chatv9_input_options_input_counter_yellow").addClass("vs_chatv9_input_options_input_counter_red"):e<window.vs_chatv9_input_max&&$("#vs_chatv9_input_options_input_counter").removeClass("vs_chatv9_input_options_input_counter_yellow").removeClass("vs_chatv9_input_options_input_counter_red").addClass("vs_chatv9_input_options_input_counter"),$("#vs_chatv9_input_options_input_counter").text(e)},this.handleChatInput=()=>{var s,t,e=$("#"+a).val();e=(e=(e=(e=(e=e.replaceAll("<","&lt;")).replaceAll(">","&gt;")).replace(/\\/g,"&#092;")).replace(/(\r\n|\n|\r)/gm," ")).replace(/\s+/g," "),""!=(e=$.trim(e))&&(e.startsWith("/")&&!e.startsWith("/me ")?e.contains(" ")?(s=(t=e.split(" "))[0],t=t[1],"/ban"==s?this.send("MVN BAN "+B+" "+t):"/unban"==s?this.send("MVN UNBAN "+B+" "+t):"/mute"==s?this.send("MVN MUTE "+B+" "+t):"/unmute"==s?this.send("MVN UNMUTE "+B+" "+t):"/mod"==s?this.send("MVN MOD "+B+" "+t):"/unmod"==s?this.send("MVN UNMOD "+B+" "+t):"/purge"==s?this.send("MVN PURGE "+B+" "+t):"/slow"!=s&&"/slowon"!=s||this.send("MVN SLOWON "+B+" "+t)):"/clear"==e?this.send("MVN CLEAR "+B):"/bans"==e?this.send("MVN BANS "+B):"/random"==e?this.send("MVN RANDOM "+B):"/unbanall"==e?this.send("MVN UNBANALL "+B):"/unmuteall"==e?this.send("MVN UNMUTEALL "+B):"/mods"==e?this.send("MVN MODS "+B):"/unmodall"==e?this.send("MVN UNMODALL "+B):"/gueston"==e?this.send("MVN GUESTON "+B):"/guestoff"==e?this.send("MVN GUESTOFF "+B):"/acton"==e||"/confon"==e?this.send("MVN ACTON "+B):"/actoff"==e||"/confoff"==e?this.send("MVN ACTOFF "+B):"/slow"==e||"/slowon"==e?this.send("MVN SLOWON "+B):"/slowoff"==e&&this.send("MVN SLOWOFF "+B):(Z("CHAT",R,Q,Y,H,J,e,-1),this.send("CHAT "+B+" :"+e+"\n")),document.getElementById(a).value="",document.getElementById(a).focus()),this.hideEmojisBox()},s=>{var t=$("#"+a).prop("selectionStart"),e=$("#"+a).val(),_=e.substring(0,t),t=e.substring(t,e.length);$("#"+a).val(_+s+t)});this.setsize=(s,t)=>{k=s,S=t,$(".vs_chatv9_wrapper").width(s),$(".vs_chatv9_wrapper").height(t),vs_chatv9.chattersWindowOpen?($(".vs_chatv9_chatarea").width(s-$("div.vs_chatv9_chatters").width()),$(".vs_chatv9_chatbox").width(s-$("div.vs_chatv9_chatters").width())):($(".vs_chatv9_chatarea").width(s),$(".vs_chatv9_chatbox").width(s)),$(".vs_chatv9_chatarea .simplebar-wrapper").width(s),$(".vs_chatv9_chatarea").height(t),K("! resized chat box: "+s+"x"+t)},this.resize=()=>{$(window).width(),$(window).height();documentWidth},this.showGhostModeEnabled=()=>{$("div.vs_chatv9_ghostmode_overlay").show(),$("div.vs_chatv9_input_box_overlay").show()},this.hideGhostModeEnabled=()=>{$("div.vs_chatv9_ghostmode_overlay").hide(),$("div.vs_chatv9_input_box_overlay").hide()},this.CanModerate=s=>2==s||3==s||4==s||5==s||9==s||10==s,this.getUserLevel=()=>Q,this.IsUserStreamer=s=>{let t=!1;return null==s&&(s=Q),t=3==s?!0:t},this.IsUserMarkVaughnDotLive=s=>{let t=!1;return null==s&&(s=Q),t=10==s?!0:t},this.IsUserStaff=s=>{let t=!1;return null==s&&(s=Q),t=9==s?!0:t},this.IsUserModerator=s=>{let t=!1;return null==s&&(s=Q),t=2==s?!0:t},this.IsUserGuest=s=>{let t=!1;return null==s&&(s=Q),t=0==s?!0:t},this.showCtxChatboxTools=(c,s,t)=>{v=c;var e=vs_mouse_x;let h=vs_mouse_y,_=($("#vs_chatv9_toolbox_header_username").html(v),e-$("div.vs_chatv9_profilebox_actions_box_quick").width()-20),n=(t&&"mobile"==window.vs_type&&(_=10),"popout"==window.vs_windowtype?$("div.vs_chatv9_profilebox_actions_box_quick").css({left:0,top:0,display:"block"}):$("div.vs_chatv9_profilebox_actions_box_quick").css({left:_,top:h-+$("div.vs_chatv9_profilebox_actions_box_quick").height(),display:"block"}),$("#vs_chatv9_action_quick_mod").show(),$("#vs_chatv9_action_quick_unmod").show(),$("#vs_chatv9_action_quick_ban").show(),$("#vs_chatv9_action_quick_unban").show(),$("#vs_chatv9_action_quick_mute").show(),$("#vs_chatv9_action_quick_unmute").show(),$("#vs_chatv9_action_quick_purge").show(),$("#vs_chatv9_action_quick_divider_bottom").show(),[]);$.get("/app/chatv9.php?a=get_chatter&c="+window.vs_channel+"&u="+c,function(s,t){var e=s.split(";");for(let s=0;s<=e.length-1;s++){var _=e[s].split("="),i=_[0],_=_[1];n[i]=_}c.toLowerCase().startsWith("guest_");c.toLowerCase(),R.toLowerCase();let a="",v="",o="";1==n.isBot&&(a+='<div class="vs_chatv9_msg_badge vs_chatv9_msg_badge_bot">bot</div>'),1==n.isMvn&&(a+='<div class="vs_chatv9_msg_badge vs_chatv9_msg_badge_mvn">mvn</div>'),1==n.isStaff&&(a+='<div class="vs_chatv9_msg_badge vs_chatv9_msg_badge_staff">staff</div>'),1==n.isModerator&&(a+='<div class="vs_chatv9_msg_badge vs_chatv9_msg_badge_mod">mod</div>'),1==n.isStreamer&&(a+='<div class="vs_chatv9_msg_badge vs_chatv9_msg_badge_streamer">streamer</div>'),1==n.isTech&&(a+='<div class="vs_chatv9_msg_badge vs_chatv9_msg_badge_tech">tech</div>'),1==n.vip_gold&&(a+='<div class="vs_chatv9_msg_badge vs_chatv9_msg_badge_vip">vip</div>'),v=""==v?" vs_chatv9_font_00":" "+v,o=""==o?" vs_chatv9_color_01":" "+o,1==n.isModerator||1==n.isStreamer||1==n.isStaff||1==n.isBot||1==n.isTech||1==n.isMvn?($("#vs_chatv9_action_quick_mod").hide(),$("#vs_chatv9_action_quick_unmod").hide(),$("#vs_chatv9_action_quick_ban").hide(),$("#vs_chatv9_action_quick_unban").hide(),$("#vs_chatv9_action_quick_mute").hide(),$("#vs_chatv9_action_quick_unmute").hide(),$("#vs_chatv9_action_quick_purge").hide(),$("#vs_chatv9_action_quick_divider_bottom").hide()):($("#vs_chatv9_action_quick_mod").show(),$("#vs_chatv9_action_quick_unmod").show(),$("#vs_chatv9_action_quick_ban").show(),$("#vs_chatv9_action_quick_unban").show(),$("#vs_chatv9_action_quick_mute").show(),$("#vs_chatv9_action_quick_unmute").show(),$("#vs_chatv9_action_quick_purge").show(),$("#vs_chatv9_action_quick_divider_bottom").show()),"popout"==window.vs_windowtype?$("div.vs_chatv9_profilebox_actions_box_quick").css({top:0}):$("div.vs_chatv9_profilebox_actions_box_quick").css({top:h-+$("div.vs_chatv9_profilebox_actions_box_quick").height()}),K("QUICK TOOLS LOADED")})},this.hideCtxChatboxTools=()=>{$("div.vs_chatv9_profilebox_actions_box_quick").hide(),$("#vs_chatv9_toolbox_header_username").html(""),$("#vs_chatv9_action_quick_mod").show(),$("#vs_chatv9_action_quick_unmod").show(),$("#vs_chatv9_action_quick_ban").show(),$("#vs_chatv9_action_quick_unban").show(),$("#vs_chatv9_action_quick_mute").show(),$("#vs_chatv9_action_quick_unmute").show(),$("#vs_chatv9_action_quick_purge").show(),$("#vs_chatv9_action_quick_divider_bottom").show(),this.hoverCtxChatboxTools(!1)},this.hoverCtxChatboxTools=s=>{this.toolsbox_quick_hover=s},this.CopyUsername=s=>{$("#vs_chatv9_copy_text").val(s),document.getElementById("vs_chatv9_copy_text").select(),document.execCommand("copy"),vs_chatv9.hideCtxChatboxTools()},this.showChatProfile=(n,s)=>{""==n||null==n?n=v:v=n,vs_chatv9.hideCtxChatboxTools();var t=window.vs_streamname.split("-")[1];$("div.vs_chatv9_overlay_profilebox").width($("div.vs_chatv9_profilebox").width()),$("div.vs_chatv9_overlay_profilebox").height($("div.vs_chatv9_profilebox").height()-$("div.vs_chatv9_chattools_header").height()),$("#vs_chatv9_profilebox_header_username").text(""),$("#vs_chatv9_profilebox_header_username_badges").text(""),$("#vs_chatv9_profilebox_sendmessage").hide(),$("#vs_chatv9_profilebox_sendmessage_spacer").hide(),$("#vs_chatv9_profilebox_giftvip").hide(),$("div.vs_chatv9_overlay_profilebox").show();let d=[];$.get("/app/chatv9.php?a=get_chatter&c="+t+"&u="+n,function(s,t){var e=s.split(";");for(let s=0;s<=e.length-1;s++){var _=e[s].split("="),i=_[0],_=_[1];d[i]=_}let a=!1,v=(n.toLowerCase().startsWith("guest_")&&(a=!0),!1),o=(n.toLowerCase()==R.toLowerCase()&&(v=!0),""),c="",h="";1==d.isBot&&(o+='<div class="vs_chatv9_msg_badge vs_chatv9_msg_badge_bot">bot</div>'),1==d.isMvn&&(o+='<div class="vs_chatv9_msg_badge vs_chatv9_msg_badge_mvn">mvn</div>'),1==d.isStaff&&(o+='<div class="vs_chatv9_msg_badge vs_chatv9_msg_badge_staff">staff</div>'),1==d.isModerator&&(o+='<div class="vs_chatv9_msg_badge vs_chatv9_msg_badge_mod">mod</div>'),1==d.isStreamer&&(o+='<div class="vs_chatv9_msg_badge vs_chatv9_msg_badge_streamer">streamer</div>'),1==d.isTech&&(o+='<div class="vs_chatv9_msg_badge vs_chatv9_msg_badge_tech">tech</div>'),1==d.vip_gold&&(o+='<div class="vs_chatv9_msg_badge vs_chatv9_msg_badge_vip">vip</div>'),c=""==c?" vs_chatv9_font_00":" "+c,h=""==h?" vs_chatv9_color_01":" "+h,$("#vs_chatv9_profilebox_header_username").html(d.username_display),$("#vs_chatv9_profilebox_header_username_badges").html(o),$("#vs_chatv9_profilebox_profile_created").html(d.account_created),1==d.vip?(console.log("HIDE GIFT VIP"),$("#vs_chatv9_profilebox_giftvip").hide(),$("#vs_chatv9_profilebox_sendmessage_spacer").hide()):(console.log("SHOW GIFT VIP"),$("#vs_chatv9_profilebox_giftvip").show(),$("#vs_chatv9_profilebox_sendmessage_spacer").show()),$("#vs_chatv9_profilebox_sendmessage").show(),$("#vs_chatv9_profilebox_sendmessage_spacer").show(),vs_chatv9.IsUserStreamer()||vs_chatv9.CanModerate(Q)?(console.log("CAN MODERATE!"),$("#vs_chatv9_action_mod").hide(),$("#vs_chatv9_action_unmod").hide(),$("#vs_chatv9_action_ban").hide(),$("#vs_chatv9_action_unban").hide(),$("#vs_chatv9_action_mute").hide(),$("#vs_chatv9_action_unmute").hide(),$("#vs_chatv9_action_purge").hide(),(1==d.isBanned?($("#vs_chatv9_action_ban").show(),$("#vs_chatv9_action_unban")):1==d.isMuted?($("#vs_chatv9_action_mute").show(),$("#vs_chatv9_action_unmute")):(1==d.isModerator?(console.log("TARGET IS MOD"),vs_chatv9.IsUserStreamer()||vs_chatv9.IsUserStaff()||vs_chatv9.IsUserMarkVaughnDotLive()?($("#vs_chatv9_action_unmod").show(),console.log("SHOWING UNMOD BUTTON")):($("#vs_chatv9_action_unmod").hide(),console.log("HIDING UNMOD BUTTON"))):vs_chatv9.IsUserModerator()&&$("#vs_chatv9_action_mod").hide(),$("#vs_chatv9_action_ban").show(),$("#vs_chatv9_action_mute").show(),$("#vs_chatv9_action_purge"))).show()):($("#vs_chatv9_action_mod").hide(),$("#vs_chatv9_action_unmod").hide(),$("#vs_chatv9_action_ban").hide(),$("#vs_chatv9_action_unban").hide(),$("#vs_chatv9_action_purge").hide()),a?($("#vs_chatv9_action_mod").hide(),$("#vs_chatv9_action_unmod").hide(),$("#vs_chatv9_action_ban").hide(),$("#vs_chatv9_action_unban").hide(),$("#vs_chatv9_action_mute").hide(),$("#vs_chatv9_action_unmute").hide(),$("#vs_chatv9_action_purge").hide(),$("#vs_chatv9_profilebox_sendmessage").hide(),$("#vs_chatv9_profilebox_sendmessage_spacer").hide(),$("#vs_chatv9_profilebox_giftvip").hide()):D?($("#vs_chatv9_action_mod").hide(),$("#vs_chatv9_action_unmod").hide(),$("#vs_chatv9_action_ban").hide(),$("#vs_chatv9_action_unban").hide(),$("#vs_chatv9_action_mute").hide(),$("#vs_chatv9_action_unmute").hide(),$("#vs_chatv9_action_purge").hide(),$("#vs_chatv9_profilebox_sendmessage").hide(),$("#vs_chatv9_profilebox_sendmessage_spacer").hide()):1!=d.isModerator&&1!=d.isStreamer&&1!=d.isStaff&&1!=d.isBot&&1!=d.isTech&&1!=d.isMvn||($("#vs_chatv9_action_mod").hide(),$("#vs_chatv9_action_unmod").hide(),$("#vs_chatv9_action_ban").hide(),$("#vs_chatv9_action_unban").hide(),$("#vs_chatv9_action_mute").hide(),$("#vs_chatv9_action_unmute").hide(),$("#vs_chatv9_action_purge").hide()),v?($("#vs_chatv9_profilebox_actions").hide(),$("#vs_chatv9_profilebox_sendmessage").hide(),$("#vs_chatv9_profilebox_sendmessage_spacer").hide()):($("#vs_chatv9_profilebox_actions").show(),$("#vs_chatv9_profilebox_sendmessage").show(),$("#vs_chatv9_profilebox_sendmessage_spacer").show()),1!=d.isStaff&&1!=d.isBot&&1!=d.isTech&&1!=d.isMvn||$("#vs_chatv9_profilebox_actions").hide(),1==d.isModerator&&(vs_chatv9.IsUserStreamer()||vs_chatv9.IsUserStaff()||vs_chatv9.IsUserMarkVaughnDotLive())&&($("#vs_chatv9_action_unmod").show(),$("#vs_chatv9_action_ban").show(),$("#vs_chatv9_action_unban").show(),$("#vs_chatv9_action_mute").show(),$("#vs_chatv9_action_unmute").show(),$("#vs_chatv9_action_purge").show()),0==d.isModerator&&0==d.isStreamer&&0==d.isStaff&&0==d.isBot&&0==d.isTech&&0==d.isMvn&&(vs_chatv9.IsUserStreamer()||vs_chatv9.IsUserStaff()||vs_chatv9.IsUserMarkVaughnDotLive()?(a?$("#vs_chatv9_action_mod").hide():$("#vs_chatv9_action_mod").show(),$("#vs_chatv9_action_ban").show(),$("#vs_chatv9_action_unban").show(),$("#vs_chatv9_action_mute").show(),$("#vs_chatv9_action_unmute").show(),$("#vs_chatv9_action_purge").show(),1==d.isBanned?($("#vs_chatv9_action_ban").show(),$("#vs_chatv9_action_unban").show()):d):vs_chatv9.IsUserModerator()&&($("#vs_chatv9_action_mod").hide(),$("#vs_chatv9_action_unmod").hide(),$("#vs_chatv9_action_ban").show(),$("#vs_chatv9_action_unban").show(),$("#vs_chatv9_action_mute").show(),$("#vs_chatv9_action_unmute").show(),$("#vs_chatv9_action_purge").show(),1==d.isBanned?($("#vs_chatv9_action_ban").show(),$("#vs_chatv9_action_unban").show()):d)),$("div.vs_chatv9_overlay_profilebox").hide()}),$("#vs_chatv9_profilebox_header_username").text(n),$("img.vs_chatv9_profilebox_header_profileimg").attr("src","//cdn.vaughnsoft.net/get_profile_photo.php?u="+n.toLowerCase()),vs_privacy.IsBlockedUser(n)?($("#vs_chatv9_action_block").hide(),$("#vs_chatv9_action_unblock").show()):($("#vs_chatv9_action_block").show(),$("#vs_chatv9_action_unblock").hide()),$("div.vs_chatv9_profilebox").show(),this.chatProfileOpen=!0,this.hideEmojisBox()},this.hideChatProfile=()=>{v="",$("div.vs_chatv9_profilebox").hide(),$("#vs_chatv9_profilebox_header_username").text(""),$("#vs_chatv9_profilebox_header_username_badges").text(""),$("#vs_chatv9_profilebox_sendmessage").hide(),$("#vs_chatv9_profilebox_sendmessage_spacer").hide(),$("#vs_chatv9_profilebox_giftvip").hide(),this.chatProfileOpen=!1,this.hideChatProfileActions()},this.showChatToolsQuick=(s,t)=>{v=s,this.chatProfileActionsQuickOpen?(M=!1,$("div.vs_chatv9_profilebox_actions_box_quick").hide()):(M=!0,$("div.vs_chatv9_profilebox_actions_box_quick").show())},this.showChatProfileActions=()=>{this.chatProfileActionsOpen?this.hideChatProfileActions():($("div.vs_chatv9_profilebox_actions_box").show(),this.chatProfileActionsOpen=!0)},this.hideChatProfileActions=()=>{$("div.vs_chatv9_profilebox_actions_box").hide(),this.chatProfileActionsOpen=!1},this.ChatterInfoAction_mod=()=>{this.send("MVN MOD "+B+" "+v+"\n"),this.hideChatProfile()},this.ChatterInfoAction_unmod=()=>{this.send("MVN UNMOD "+B+" "+v+"\n"),this.hideChatProfile()},this.ChatterInfoAction_ban=()=>{this.send("MVN BAN "+B+" "+v+"\n"),this.hideChatProfile()},this.ChatterInfoAction_unban=()=>{this.send("MVN UNBAN "+B+" "+v+"\n"),this.hideChatProfile()},this.ChatterInfoAction_mute=()=>{this.send("MVN MUTE "+B+" "+v+"\n"),this.hideChatProfile()},this.ChatterInfoAction_unmute=()=>{this.send("MVN UNMUTE "+B+" "+v+"\n"),this.hideChatProfile()},this.ChatterInfoAction_purge=()=>{this.send("MVN PURGE "+B+" "+v+"\n"),this.hideChatProfile()},this.ChatterInfoAction_report=()=>{Modal.Report(v),this.hideChatProfile()},this.sendMessage=s=>{MvnMIM.vm_new_conversation(v)},this.giftVIP=s=>{Modal.Vip(v)},this.insertUserReplyName=s=>{ps("@"+s+" "),document.getElementById(a).focus()},this.insertVmojiTrigger=s=>{ps(s),document.getElementById(a).focus(),ws=!1,$.post("/app/emojis.php?a=insert&trigger="+s)},this.showChatTools=(s,t)=>{$("div.vs_chatv9_chattools").show(),this.chatToolsBoxOpen=!0,this.hideEmojisBox()},this.hideChatTools=()=>{$("div.vs_chatv9_chattools").hide(),this.chatToolsBoxOpen=!1},this.hideInfobox=()=>{$("div.vs_chatv9_infobox").hide(),$("div.vs_chatv9_infobox_welcome").hide(),$("div.vs_chatv9_infobox_money").hide(),$("div.vs_chatv9_infobox_followersonly").hide()},this.showChatWelcomeBox=()=>{$("div.vs_chatv9_infobox").show(),$("div.vs_chatv9_infobox_welcome").show(),$("div.vs_chatv9_infobox_money").hide(),$("div.vs_chatv9_infobox_followersonly").hide()},this.showDonationBox=()=>{$("div.vs_chatv9_infobox").show(),$("div.vs_chatv9_infobox_welcome").hide(),$("div.vs_chatv9_infobox_followersonly").hide(),$("div.vs_chatv9_infobox_money").show()};this.showFollowersOnlyBox=()=>{$("div.vs_chatv9_infobox").show(),$("div.vs_chatv9_infobox_welcome").hide(),$("div.vs_chatv9_infobox_followersonly").show(),$("div.vs_chatv9_infobox_money").hide()};this.toggleEmojisBox=()=>{this.emojisBoxOpen?this.hideEmojisBox():(this.showEmojisBox(),this.loadVmojis())},this.toggleGifsBox=()=>{this.emojisBoxOpen?this.hideEmojisBox():(this.showEmojisBox(),this.loadGIFs())},this.showEmojisBox=()=>{$("div.vs_chatv9_emojis").show(),this.emojisBoxOpen=!0,this.hideChatTools()},this.hideEmojisBox=()=>{$("div.vs_chatv9_emojis").hide(),$("#vs_chatv9_emojis_gifs_search_box").val(""),$("#vs_chatv9_emojis_stickers_search_box").val(""),$("div.vs_chatv9_emojis_gifs_search_nav").hide(),this.emojisBoxOpen=!1},this.insertEmoji=(s,t)=>{var e=$("#"+a).prop("selectionStart"),_=$("#"+a).val(),i=_.substring(0,e),e=_.substring(e,_.length);$("#"+a).val(i+t+" "+e),this.hideEmojisBox(),this.emojisBoxOpen=!1,document.getElementById(a).focus(),ws=!1,$.post("/app/emojis.php?a=insert&id="+s)};let $s;this.searchGIFs=s=>{s=s||window.event;let t=$("#vs_chatv9_emojis_gifs_search_box").val();clearTimeout($s),t&&($s=setTimeout(function(){vs_chatv9.loadGIFsSearch(t)},800))};let bs;var ws=!(this.searchStickers=s=>{s=s||window.event;let t=$("#vs_chatv9_emojis_stickers_search_box").val();clearTimeout(bs),t&&(bs=setTimeout(function(){vs_chatv9.loadStickerSearch(t)},800))});this.loadVmojis=()=>{$("div.vs_chatv9_emojis_gifs_search").hide(),$("div.vs_chatv9_emojis_gifs_search_spacer").hide(),$("div.vs_chatv9_emojis_stickers_search").hide(),$("div.vs_chatv9_emojis_stickers_search_spacer").hide(),$("div.vs_chatv9_emojis_body").height(234),$("div.vs_chatv9_emojis_body_result_vmojis").height(234),$("div.vs_chatv9_emojis_body_loading").height(234),$("div.vs_chatv9_emojis_body_vip").height(234),$("div.vs_chatv9_emojis_body_vip").hide(),vs_chatv9_emojis_scroller.getScrollElement().scrollTop=0,$("#vs_chatv9_emojis_menu_button_vmojis").addClass("vs_chatv9_emojis_menu_button_selected"),$("#vs_chatv9_emojis_menu_button_gifs").removeClass("vs_chatv9_emojis_menu_button_selected"),$("#vs_chatv9_emojis_menu_button_stickers").removeClass("vs_chatv9_emojis_menu_button_selected"),$("div.vs_chatv9_emojis_body_result_vmojis").show(),$("div.vs_chatv9_emojis_body_result_gifs").hide(),$("div.vs_chatv9_emojis_body_result_stickers").hide(),ws||($("div.vs_chatv9_emojis_body").hide(),$("div.vs_chatv9_emojis_body_loading").show(),$.get("/app/emojis.php",function(s,t){var s=s.split("</end_group>"),e=s[0].split(";");if(0<e.length){$("div.vs_chatv9_emojis_body_result_vmojis_recent_empty").hide(),$("div.vs_chatv9_emojis_body_result_vmojis_recent").html("");for(let s=0;s<=e.length-1;s++){var _=e[s].split(","),i=_[0],a=_[1],v=_[2],o=_[3],_=_[4];null!=a&&$("div.vs_chatv9_emojis_body_result_vmojis_recent").append('<div class="vs_chatv9_emoji_item" onclick="vs_chatv9.insertEmoji(\''+_+"', '"+i+'\');"><img loading="lazy" src="//cdn.vaughnsoft.net/img/emoticons/'+a+'" width="'+v+'" height="'+o+'" /></div>')}}var c=s[1].split(";");if(0<c.length){$("div.vs_chatv9_emojis_body_result_vmojis_all").html("");for(let s=0;s<=c.length-1;s++){var h=c[s].split(","),n=h[0],d=h[1],r=h[2],l=h[3],h=h[4];null!=d&&$("div.vs_chatv9_emojis_body_result_vmojis_all").append('<div class="vs_chatv9_emoji_item" onclick="vs_chatv9.insertEmoji(\''+h+"', '"+n+'\');"><img loading="lazy" src="//cdn.vaughnsoft.net/img/emoticons/'+d+'" width="'+r+'" height="'+l+'" /></div>')}}ws=!0,$("div.vs_chatv9_emojis_body").show(),$("div.vs_chatv9_emojis_body_loading").hide(),vs_chatv9_emojis_scroller.getScrollElement().scrollTop=0}))},this.loadGIFs=()=>{o=1,$("div.vs_chatv9_emojis_gifs_search").show(),$("div.vs_chatv9_emojis_gifs_search_spacer").show(),$("div.vs_chatv9_emojis_stickers_search").hide(),$("div.vs_chatv9_emojis_stickers_search_spacer").hide(),$("div.vs_chatv9_emojis_body").height(197),$("div.vs_chatv9_emojis_body_loading").height(197),$("div.vs_chatv9_emojis_body_vip").height(197),vs_chatv9_emojis_scroller.getScrollElement().scrollTop=0,$("#vs_chatv9_emojis_gifs_search_box").val(""),$("div.vs_chatv9_emojis_gifs_search_nav").hide(),$("div.vs_chatv9_emojis_stickers_search_nav").hide(),$("#vs_chatv9_emojis_menu_button_vmojis").removeClass("vs_chatv9_emojis_menu_button_selected"),$("#vs_chatv9_emojis_menu_button_stickers").removeClass("vs_chatv9_emojis_menu_button_selected"),$("#vs_chatv9_emojis_menu_button_gifs").addClass("vs_chatv9_emojis_menu_button_selected"),$("div.vs_chatv9_emojis_body_result_vmojis").hide(),$("div.vs_chatv9_emojis_body_result_gifs").show(),$("div.vs_chatv9_emojis_body_result_gifs").text(""),$("div.vs_chatv9_emojis_body_result_stickers").hide(),$("div.vs_chatv9_emojis_body_result_stickers").text(""),$("div.vs_chatv9_emojis_body").hide(),$("div.vs_chatv9_emojis_body_loading").show(),$("div.vs_chatv9_emojis_body_vip").hide(),$("div.vs_chatv9_emojis_gifs_search_box").show(),$("div.vs_chatv9_emojis_gifs_search_box_label").hide(),document.getElementById("vs_chatv9_emojis_gifs_search_box").focus(),$.get("/app/gifs.php",function(s,t){var _=s.split(";");if(0<_.length){let e="";for(let t=0;t<=_.length-1;t++){0!=t&&t;var i=_[t].split(",");if(1<i.length){var a=i[0];let s=i[1];null!=s&&(s=s.replace("media.tenor.com","s3-iad.vaughnsoft.net/tenor"),0==t?e+='<div class="vs_chatv9_emojis_gifs_category_box2"><div class="vs_chatv9_emojis_gifs_category2" style="background-image:url(\''+s+"');\" onclick=\"vs_chatv9.loadGIFsSearch('vs_chatv9_favorites')\">Favorites</div></div>":1==t?e+='<div class="vs_chatv9_emojis_gifs_category_box2"><div class="vs_chatv9_emojis_gifs_category2" style="background-image:url(\''+s+"');\" onclick=\"vs_chatv9.loadGIFsSearch('vs_chatv9_recent')\">Recent</div></div>":e+='<div class="vs_chatv9_emojis_gifs_category_box"><div class="vs_chatv9_emojis_gifs_category" style="background-image:url(\''+s+"');\" onclick=\"vs_chatv9.loadGIFsSearch('"+a+"')\">"+a+"</div></div>")}}$("div.vs_chatv9_emojis_body_result_gifs").append(e)}$("div.vs_chatv9_emojis_body").show(),$("div.vs_chatv9_emojis_body_vip").show(),$("div.vs_chatv9_emojis_body_loading").hide(),vs_v9_resize_chat(),vs_chatv9_emojis_scroller.getScrollElement().scrollTop=0})},this.loadGIFsSearch=h=>{o=1,""!=(h=h.replace("#",""))&&(document.getElementById("vs_chatv9_emojis_gifs_search_box").focus(),vs_chatv9_emojis_scroller.getScrollElement().scrollTop=0,$("div.vs_chatv9_emojis_gifs_search_nav").show(),$("div.vs_chatv9_emojis_stickers_search_nav").hide(),$("div.vs_chatv9_emojis_body").hide(),$("div.vs_chatv9_emojis_body_vip").hide(),$("div.vs_chatv9_emojis_body_loading").show(),$("#vs_chatv9_emojis_gifs_search_box").val(h),"vs_chatv9_favorites"==h?($("div.vs_chatv9_emojis_gifs_search_box").hide(),$("div.vs_chatv9_emojis_gifs_search_box_label").show(),$("#vs_chatv9_emojis_gifs_search_box_label").text("Favorites")):"vs_chatv9_recent"==h?($("div.vs_chatv9_emojis_gifs_search_box").hide(),$("div.vs_chatv9_emojis_gifs_search_box_label").show(),$("#vs_chatv9_emojis_gifs_search_box_label").text("Recent")):($("div.vs_chatv9_emojis_gifs_search_box").show(),$("div.vs_chatv9_emojis_gifs_search_box_label").hide()),h=encodeURI(h),$.get("/app/gifs.php?search="+h+"&gif_type=1",function(s,t){$("div.vs_chatv9_emojis_body_result_gifs").text(""),$("div.vs_chatv9_emojis_body_result_stickers").text("");var i=s.split(";");if(0<i.length){let _="";for(let e=0;e<=i.length-1;e++){var a=i[e].split(",");if(1<a.length){var v=a[3],o=a[0];let t=a[1];a=a[2];if((175<t||t<175)&&(t=175),null!=o){let s="";var c="vs_gif_tenor_preview-tenor_"+e;"vs_chatv9_favorites"==h?s='<img src="//cdn.vaughnsoft.net/img/svg/unheart.svg" class="vs_chatv9_emojis_gif_unheart2" id="vs_gif_tenor_unheart-tenor_'+e+'" onclick="vs_chatv9.unheartGIF(\'tenor_'+e+"', '"+v+"', true);\" />":"vs_chatv9_recent"==h?s='<img src="//cdn.vaughnsoft.net/img/svg/trash.svg" class="vs_chatv9_emojis_gif_unheart2" id="vs_gif_tenor_unrecent-tenor_'+e+'" onclick="vs_chatv9.unrecentGIF(\'tenor_'+e+"', '"+v+"', true);\" />":"0"!=vs_chatv9.isVip()&&(s=vs_chatv9.IsGIFhearted(v)?'<img src="//cdn.vaughnsoft.net/img/svg/heart.svg" class="vs_chatv9_emojis_gif_heart3" id="vs_gif_tenor_heart-tenorgs_'+e+'" onclick="vs_chatv9.heartGIF(\'tenorgs_'+e+"', '"+v+'\', false, true);" style="visibility:hidden;" /><img src="//cdn.vaughnsoft.net/img/svg/unheart.svg" class="vs_chatv9_emojis_gif_unheart3" id="vs_gif_tenor_unheart-tenorgs_'+e+'" onclick="vs_chatv9.unheartGIF(\'tenorgs_'+e+"', '"+v+'\', false, true);" style="visibility:visible;" />':'<img src="//cdn.vaughnsoft.net/img/svg/heart.svg" class="vs_chatv9_emojis_gif_heart3" id="vs_gif_tenor_heart-tenorgs_'+e+'" onclick="vs_chatv9.heartGIF(\'tenorgs_'+e+"', '"+v+'\', false, true);" style="visibility:visible;" /><img src="//cdn.vaughnsoft.net/img/svg/unheart.svg" class="vs_chatv9_emojis_gif_unheart3" id="vs_gif_tenor_unheart-tenorgs_'+e+'" onclick="vs_chatv9.unheartGIF(\'tenorgs_'+e+"', '"+v+'\', false, true);" style="visibility:hidden;" />'),_+='<div class="vs_chatv9_emojis_gifs_image_box" style="width:'+t+'px;" id="'+c+'"><img src="'+o+'" loading="lazy" class="vs_chatv9_emojis_gifs_image" style="width:'+t+'px;" onclick="vs_chatv9.insertGIF(\''+o+"', '"+v+"', '"+t+"', '"+a+"');\" />"+s+"</div>"}}}$("div.vs_chatv9_emojis_body_result_gifs").append(_)}$("div.vs_chatv9_emojis_body").show(),$("div.vs_chatv9_emojis_body_vip").show(),$("div.vs_chatv9_emojis_body_loading").hide(),vs_v9_resize_chat(),vs_chatv9_emojis_scroller.getScrollElement().scrollTop=0}))},this.insertGIF=(s,t,e,_)=>{"0"!=vs_chatv9.isVip()?(this.hideEmojisBox(),document.getElementById(a).value="",document.getElementById(a).focus(),Z("CHAT",R,Q,Y,H,J,s+"#"+t+"-"+o,-1),this.send("CHAT_GIF "+B+" :"+s+"#"+t+"-"+o+"\n"),vs_chatv9.scrollChat(),$.post("/app/gifs.php?a=gif&gif_id="+t+"&gif_type="+o)):vs_chatv9.showModalVIP()},this.repostGIF=(s,t,e)=>{"0"!=vs_chatv9.isVip()?(this.hideEmojisBox(),document.getElementById(a).value="",document.getElementById(a).focus(),Z("CHAT",R,Q,Y,H,J,t,-1),this.send("CHAT_GIF "+B+" :"+t+"\n"),vs_chatv9.scrollChat(),$.post("/app/gifs.php?a=gif&gif_id="+e+"&gif_type=1")):vs_chatv9.showModalVIP()},this.displayGIF=s=>{$("div.vs_chatv9_gifs_box_img").html('<img src="'+s+'" class="vs_chatv9_gifs_image">'),$("div.vs_chatv9_gifs_display").show(),$("div.vs_chatv9_gifs_background").show()},this.IsGIFhearted=s=>{var t=!1;return t=null!=vs_chatv9.tenor_gifs_hearted&&null!=vs_chatv9.tenor_gifs_hearted&&vs_chatv9.tenor_gifs_hearted.includes(s)?!0:t},this.heartGIF=(s,t,e,_)=>{"0"!=vs_chatv9.isVip()?(_?($("#vs_gif_tenor_heart-"+s).css("visibility","hidden"),$("#vs_gif_tenor_unheart-"+s).css("visibility","visible")):($("#vs_gif_tenor_heart-"+s).hide(),$("#vs_gif_tenor_unheart-"+s).show()),e&&$("#vs_gif_tenor_preview-"+s).hide(),null==vs_chatv9.tenor_gifs_hearted||null==vs_chatv9.tenor_gifs_hearted||vs_chatv9.tenor_gifs_hearted.includes(t)||vs_chatv9.tenor_gifs_hearted.push(t),$.post("/app/gifs.php?a=save_favorite&gif_id="+t+"&gif_type=1")):vs_chatv9.showModalVIP()},this.unheartGIF=(s,t,e,_)=>{"0"!=vs_chatv9.isVip()?(_?($("#vs_gif_tenor_heart-"+s).css("visibility","visible"),$("#vs_gif_tenor_unheart-"+s).css("visibility","hidden")):($("#vs_gif_tenor_heart-"+s).show(),$("#vs_gif_tenor_unheart-"+s).hide()),e&&$("#vs_gif_tenor_preview-"+s).hide(),null!=vs_chatv9.tenor_gifs_hearted&&null!=vs_chatv9.tenor_gifs_hearted&&vs_chatv9.tenor_gifs_hearted.includes(t)&&-1<(_=vs_chatv9.tenor_gifs_hearted.indexOf(t))&&vs_chatv9.tenor_gifs_hearted.splice(_,1),$.post("/app/gifs.php?a=delete_favorite&gif_id="+t+"&gif_type=1")):vs_chatv9.showModalVIP()},this.unrecentGIF=(s,t,e)=>{"0"!=vs_chatv9.isVip()?($("#vs_gif_tenor_unrecent-"+s).hide(),e&&$("#vs_gif_tenor_preview-"+s).hide(),$.post("/app/gifs.php?a=delete_recent&gif_id="+t+"&gif_type=1")):vs_chatv9.showModalVIP()},this.heartGIFvalidate=(s,t)=>{"0"!=vs_chatv9.isVip()&&(vs_chatv9.tenor_gifs_hearted.includes(t)?($("#vs_gif_tenor_heart-"+s).hide(),$("#vs_gif_tenor_unheart-"+s).show()):($("#vs_gif_tenor_heart-"+s).show(),$("#vs_gif_tenor_unheart-"+s).hide()))},this.heartGIFvalidateGS=(s,t)=>{"0"!=vs_chatv9.isVip()&&(vs_chatv9.tenor_gifs_hearted.includes(t)?($("#vs_gif_tenor_heart-tenorgs_"+s).hide(),$("#vs_gif_tenor_unheart-tenorgs_"+s).show()):($("#vs_gif_tenor_heart-tenorgs_"+s).show(),$("#vs_gif_tenor_unheart-tenorgs_"+s).hide()))},this.loadHeartedGIFs=()=>{null==vs_chatv9.tenor_gifs_hearted&&(vs_chatv9.tenor_gifs_hearted=Array()),"0"!=vs_chatv9.isVip()&&$.get("/app/gifs.php?a=load&gif_type=1",function(s){var t=s.split(",");for(let s=0;s<=t.length-1;s++){var e=t[s];null==e||""==e||0==e||null==vs_chatv9.tenor_gifs_hearted||null==vs_chatv9.tenor_gifs_hearted||vs_chatv9.tenor_gifs_hearted.includes(e)||vs_chatv9.tenor_gifs_hearted.push(e)}})},this.getHeartedGIFs=()=>{vs_chatv9.tenor_gifs_hearted.forEach(s=>{null!=s&&K(s)})},this.displayImgur=s=>{$("div.vs_chatv9_gifs_box_img").html('<a href="'+s+'" target="_blank" rel="noopener nofollow" class="vs_chatv9_imgur_image"><img src="'+s+'" class="vs_chatv9_imgur_image"></a>'),$("div.vs_chatv9_gifs_display").show(),$("div.vs_chatv9_gifs_background").show()},this.hideGIF=s=>{$("div.vs_chatv9_gifs_box_img").html(""),$("div.vs_chatv9_gifs_display").hide(),$("div.vs_chatv9_gifs_background").hide()},this.loadStickers=()=>{o=2,$("div.vs_chatv9_emojis_stickers_search_box").show(),$("div.vs_chatv9_emojis_stickers_search_box_label").hide(),$("div.vs_chatv9_emojis_gifs_search").hide(),$("div.vs_chatv9_emojis_gifs_search_spacer").show(),$("div.vs_chatv9_emojis_stickers_search").show(),$("div.vs_chatv9_emojis_stickers_search_spacer").show(),$("div.vs_chatv9_emojis_body").height(197),$("div.vs_chatv9_emojis_body_loading").height(197),$("div.vs_chatv9_emojis_body_vip").height(197),vs_chatv9_emojis_scroller.getScrollElement().scrollTop=0,$("#vs_chatv9_emojis_stickers_search_box").val(""),$("div.vs_chatv9_emojis_stickers_search_nav").hide(),$("#vs_chatv9_emojis_menu_button_vmojis").removeClass("vs_chatv9_emojis_menu_button_selected"),$("#vs_chatv9_emojis_menu_button_gifs").removeClass("vs_chatv9_emojis_menu_button_selected"),$("#vs_chatv9_emojis_menu_button_stickers").addClass("vs_chatv9_emojis_menu_button_selected"),$("div.vs_chatv9_emojis_body_result_vmojis").hide(),$("div.vs_chatv9_emojis_body_result_gifs").hide(),$("div.vs_chatv9_emojis_body_result_stickers").show(),$("div.vs_chatv9_emojis_body_result_stickers").text(""),$("div.vs_chatv9_emojis_body").hide(),$("div.vs_chatv9_emojis_body_loading").show(),$("div.vs_chatv9_emojis_body_vip").hide(),document.getElementById("vs_chatv9_emojis_stickers_search_box").focus(),$.get("/app/gifs.php?stickers=1",function(s,t){var _=s.split(";");if(0<_.length){let e="";for(let t=0;t<=_.length-1;t++){var i=_[t].split(","),a=i[0];let s=i[1];null!=s&&(s=s.replace("media.tenor.com","s3-iad.vaughnsoft.net/tenor"),0==t?e+='<div class="vs_chatv9_emojis_gifs_category_box2"><div class="vs_chatv9_emojis_gifs_category2" style="background-image:url(\''+s+"');\" onclick=\"vs_chatv9.loadStickerSearch('vs_chatv9_favorites')\">Favorites</div></div>":1==t?e+='<div class="vs_chatv9_emojis_gifs_category_box2"><div class="vs_chatv9_emojis_gifs_category2" style="background-image:url(\''+s+"');\" onclick=\"vs_chatv9.loadStickerSearch('vs_chatv9_recent')\">Recent</div></div>":e+='<div class="vs_chatv9_emojis_gifs_category_box"><div class="vs_chatv9_emojis_gifs_category" style="background-image:url(\''+s+"');\" onclick=\"vs_chatv9.loadStickerSearch('"+a+"')\">"+a+"</div></div>")}$("div.vs_chatv9_emojis_body_result_stickers").append(e)}$("div.vs_chatv9_emojis_body").show(),$("div.vs_chatv9_emojis_body_vip").show(),$("div.vs_chatv9_emojis_body_loading").hide(),vs_v9_resize_chat(),vs_chatv9_emojis_scroller.getScrollElement().scrollTop=0})},this.loadStickerSearch=s=>{o=2,""!=(s=s.replace("#",""))&&(document.getElementById("vs_chatv9_emojis_stickers_search_box").focus(),vs_chatv9_emojis_scroller.getScrollElement().scrollTop=0,$("div.vs_chatv9_emojis_gifs_search_nav").hide(),$("div.vs_chatv9_emojis_stickers_search_nav").show(),$("div.vs_chatv9_emojis_body").hide(),$("div.vs_chatv9_emojis_body_vip").hide(),$("div.vs_chatv9_emojis_body_loading").show(),$("#vs_chatv9_emojis_stickers_search_box").val(s),"vs_chatv9_favorites"==s?($("div.vs_chatv9_emojis_stickers_search_box").hide(),$("div.vs_chatv9_emojis_stickers_search_box_label").show(),$("#vs_chatv9_emojis_stickers_search_box_label").text("Favorites")):"vs_chatv9_recent"==s?($("div.vs_chatv9_emojis_stickers_search_box").hide(),$("div.vs_chatv9_emojis_stickers_search_box_label").show(),$("#vs_chatv9_emojis_stickers_search_box_label").text("Recent")):($("div.vs_chatv9_emojis_stickers_search_box").show(),$("div.vs_chatv9_emojis_stickers_search_box_label").hide()),s=encodeURI(s),$.get("/app/gifs.php?search="+s+"&stickers=1&gif_type=2",function(s,t){$("div.vs_chatv9_emojis_body_result_gifs").text(""),$("div.vs_chatv9_emojis_body_result_stickers").text("");var i=s.split(";");if(0<i.length){let _="";for(let e=0;e<=i.length-1;e++){var a=i[e].split(","),v=a[3];let s=a[0],t=a[1];a=a[2];(175<t||t<175)&&(t=175),null!=s&&(s=s.replace("media.tenor.com","s3-iad.vaughnsoft.net/tenor"),_+='<div class="vs_chatv9_emojis_gifs_image_box" style="width:'+t+'px;"><img src="'+s+'" loading="lazy" class="vs_chatv9_emojis_gifs_image" style="width:'+t+'px;" onclick="vs_chatv9.insertSticker(\''+s+"', '"+v+"', '"+t+"', '"+a+"');\" /></div>")}$("div.vs_chatv9_emojis_body_result_stickers").append(_)}$("div.vs_chatv9_emojis_body").show(),$("div.vs_chatv9_emojis_body_vip").show(),$("div.vs_chatv9_emojis_body_loading").hide(),vs_chatv9_emojis_scroller.getScrollElement().scrollTop=0}))},this.insertSticker=(s,t,e,_)=>{"0"!=vs_chatv9.isVip()?(this.hideEmojisBox(),document.getElementById(a).value="",document.getElementById(a).focus(),Z("CHAT",R,Q,Y,H,J,s+"#"+t+"-"+o,-1),this.send("CHAT_GIF "+B+" :"+s+"#"+t+"-"+o+"\n"),vs_chatv9.scrollChat(),$.post("/app/gifs.php?a=gif&gif_id="+t+"&gif_type="+o)):vs_chatv9.showModalVIP()},this.displaySticker=s=>{$("div.vs_chatv9_gifs_box_img").html('<img src="'+s+'" class="vs_chatv9_gifs_image">'),$("div.vs_chatv9_gifs_display").show(),$("div.vs_chatv9_gifs_background").show()},this.hideSticker=s=>{$("div.vs_chatv9_gifs_box_img").html(""),$("div.vs_chatv9_gifs_display").hide(),$("div.vs_chatv9_gifs_background").hide()},this.openSettings=()=>{this.settingsWindowOpen=!0,this.settingsScreen="home",$("div.vs_chatv9_settings").show(),vs_chatv9_settings_scroller.getScrollElement().scrollTop=0,this.emojisBoxOpen&&this.hideEmojisBox()},this.closeSettings=()=>{this.settingsWindowOpen=!1,this.settingsScreen="",$("div.vs_chatv9_settings").hide()},this.closeSettingsFull=()=>{this.settingsWindowOpen=!1,this.settingsScreen="",this.settingsNavigate(""),document.getElementById(a).value="",document.getElementById(a).focus(),$("div.vs_chatv9_settings").hide()},this.toggleSettings=()=>{this.settingsWindowOpen?this.closeSettings():this.openSettings()},this.getSettingsScreen=()=>this.settingsScreen,this.settingsNavigate=s=>{var t,e;""!=s&&(this.settingsScreen=s),console.log("settingsNavigate: "+this.settingsScreen),"chatfont_username"==this.settingsScreen||"chatfont_text"==this.settingsScreen||"modes_guestchat"==this.settingsScreen||"modes_confirmed"==this.settingsScreen||"modes_followers"==this.settingsScreen||"modes_slowmode"==this.settingsScreen||"tools_interface"==this.settingsScreen?$("#vs_chatv9_settings_body").height($("div.vs_chatv9_settings").height()-90):$("#vs_chatv9_settings_body").height($("div.vs_chatv9_settings").height()-45),"chatfont_username"==this.settingsScreen?($("div.vs_chatv9_settings_chatfont").show(),$("div.vs_chatv9_settings_chatfont_username").show(),$("div.vs_chatv9_settings_chatfont_nav").hide(),$("div.vs_chatv9_settings_modes_nav").hide(),$("div.vs_chatv9_settings_moderation_nav").hide(),$("div.vs_chatv9_settings_bot_nav").hide(),$("div.vs_chatv9_settings_tools_nav").hide(),this.settingsLoadUsernameStyle()):"chatfont_text"==this.settingsScreen?($("div.vs_chatv9_settings_chatfont").show(),$("div.vs_chatv9_settings_chatfont_text").show(),$("div.vs_chatv9_settings_chatfont_nav").hide(),$("div.vs_chatv9_settings_modes_nav").hide(),$("div.vs_chatv9_settings_moderation_nav").hide(),$("div.vs_chatv9_settings_bot_nav").hide(),$("div.vs_chatv9_settings_tools_nav").hide()):"modes_guestchat"==this.settingsScreen?($("div.vs_chatv9_settings_modes").show(),$("div.vs_chatv9_settings_modes_guestchat").show(),$("div.vs_chatv9_settings_chatfont_nav").hide(),$("div.vs_chatv9_settings_modes_nav").hide(),$("div.vs_chatv9_settings_moderation_nav").hide(),$("div.vs_chatv9_settings_bot_nav").hide(),$("div.vs_chatv9_settings_tools_nav").hide(),this.settingsGuestChat()):"modes_confirmed"==this.settingsScreen?($("div.vs_chatv9_settings_modes").show(),$("div.vs_chatv9_settings_modes_confirmed").show(),$("div.vs_chatv9_settings_chatfont_nav").hide(),$("div.vs_chatv9_settings_modes_nav").hide(),$("div.vs_chatv9_settings_moderation_nav").hide(),$("div.vs_chatv9_settings_bot_nav").hide(),$("div.vs_chatv9_settings_tools_nav").hide(),this.settingsConfirmedMode()):"modes_followers"==this.settingsScreen?($("div.vs_chatv9_settings_modes").show(),$("div.vs_chatv9_settings_modes_followers").show(),$("div.vs_chatv9_settings_chatfont_nav").hide(),$("div.vs_chatv9_settings_modes_nav").hide(),$("div.vs_chatv9_settings_moderation_nav").hide(),$("div.vs_chatv9_settings_bot_nav").hide(),$("div.vs_chatv9_settings_tools_nav").hide(),this.settingsFollowersMode()):"modes_slowmode"==this.settingsScreen?($("div.vs_chatv9_settings_modes").show(),$("div.vs_chatv9_settings_modes_slowmode").show(),$("div.vs_chatv9_settings_chatfont_nav").hide(),$("div.vs_chatv9_settings_modes_nav").hide(),$("div.vs_chatv9_settings_moderation_nav").hide(),$("div.vs_chatv9_settings_bot_nav").hide(),$("div.vs_chatv9_settings_tools_nav").hide(),this.settingsSlowMode()):"moderation_manage"==this.settingsScreen?($("div.vs_chatv9_settings_moderation").show(),$("div.vs_chatv9_settings_moderation_manage").show(),$("div.vs_chatv9_settings_chatfont_nav").hide(),$("div.vs_chatv9_settings_modes_nav").hide(),$("div.vs_chatv9_settings_moderation_nav").hide(),$("div.vs_chatv9_settings_bot_nav").hide(),$("div.vs_chatv9_settings_tools_nav").hide(),this.settingsMods()):"moderation_bans"==this.settingsScreen?($("div.vs_chatv9_settings_moderation").show(),$("div.vs_chatv9_settings_moderation_bans").show(),$("div.vs_chatv9_settings_chatfont_nav").hide(),$("div.vs_chatv9_settings_modes_nav").hide(),$("div.vs_chatv9_settings_moderation_nav").hide(),$("div.vs_chatv9_settings_bot_nav").hide(),$("div.vs_chatv9_settings_tools_nav").hide(),this.settingsBans()):"bot_automod"==this.settingsScreen?($("div.vs_chatv9_settings_bot").show(),$("div.vs_chatv9_settings_bot_automod").show(),$("div.vs_chatv9_settings_chatfont_nav").hide(),$("div.vs_chatv9_settings_modes_nav").hide(),$("div.vs_chatv9_settings_moderation_nav").hide(),$("div.vs_chatv9_settings_bot_nav").hide(),$("div.vs_chatv9_settings_tools_nav").hide()):"bot_promos"==this.settingsScreen?($("div.vs_chatv9_settings_bot").show(),$("div.vs_chatv9_settings_bot_promos").show(),$("div.vs_chatv9_settings_chatfont_nav").hide(),$("div.vs_chatv9_settings_modes_nav").hide(),$("div.vs_chatv9_settings_moderation_nav").hide(),$("div.vs_chatv9_settings_bot_nav").hide(),$("div.vs_chatv9_settings_tools_nav").hide()):"bot_manage"==this.settingsScreen?($("div.vs_chatv9_settings_bot").show(),$("div.vs_chatv9_settings_bot_manage").show(),$("div.vs_chatv9_settings_chatfont_nav").hide(),$("div.vs_chatv9_settings_modes_nav").hide(),$("div.vs_chatv9_settings_moderation_nav").hide(),$("div.vs_chatv9_settings_bot_nav").hide(),$("div.vs_chatv9_settings_tools_nav").hide()):"tools_interface"==this.settingsScreen?($("div.vs_chatv9_settings_tools").show(),$("div.vs_chatv9_settings_tools_interface").show(),$("div.vs_chatv9_settings_chatfont_nav").hide(),$("div.vs_chatv9_settings_modes_nav").hide(),$("div.vs_chatv9_settings_moderation_nav").hide(),$("div.vs_chatv9_settings_bot_nav").hide(),$("div.vs_chatv9_settings_tools_nav").hide()):"tools_popout"==this.settingsScreen?(t="/popout/chat/"+(s=B.split("-"))[1],e=parseInt($(window).width()/2-350)+"px",window.open(t,"vs_popoutchat_"+s[1],"height=855,width=700,left="+e+",top=150,resizable=no,scrollbars=yes,toolbar=no,menubar=no,location=no,directories=no,status=no")):"tools_clear"==this.settingsScreen?(this.send("MVN CLEAR "+B),this.settingsScreen="",this.settingsNavigate(""),this.closeSettings()):($("div.vs_chatv9_settings_chatfont_nav").show(),$("div.vs_chatv9_settings_modes_nav").show(),$("div.vs_chatv9_settings_moderation_nav").show(),$("div.vs_chatv9_settings_bot_nav").show(),$("div.vs_chatv9_settings_tools_nav").show(),$("div.vs_chatv9_settings_chatfont").hide(),$("div.vs_chatv9_settings_chatfont_username").hide(),$("div.vs_chatv9_settings_chatfont_text").hide(),$("div.vs_chatv9_settings_modes").hide(),$("div.vs_chatv9_settings_modes_guestchat").hide(),$("div.vs_chatv9_settings_modes_confirmed").hide(),$("div.vs_chatv9_settings_modes_followers").hide(),$("div.vs_chatv9_settings_modes_slowmode").hide(),$("div.vs_chatv9_settings_moderation").hide(),$("div.vs_chatv9_settings_moderation_manage").hide(),$("div.vs_chatv9_settings_moderation_bans").hide(),$("div.vs_chatv9_settings_bot").hide(),$("div.vs_chatv9_settings_bot_automod").hide(),$("div.vs_chatv9_settings_bot_promos").hide(),$("div.vs_chatv9_settings_bot_manage").hide(),$("div.vs_chatv9_settings_tools").hide())},this.navigateSettingsBack=()=>{console.log("navigateSettingsBack: "+this.settingsScreen),"home"==this.settingsScreen?(this.settingsScreen="",this.closeSettings()):"chatfont_text"==this.settingsScreen||"chatfont_username"==this.settingsScreen||"modes_guestchat"==this.settingsScreen||"modes_confirmed"==this.settingsScreen||"modes_slowmode"==this.settingsScreen||"modes_followers"==this.settingsScreen||"moderation_manage"==this.settingsScreen||"moderation_bans"==this.settingsScreen||"bot_automod"==this.settingsScreen||"bot_promos"==this.settingsScreen||"bot_manage"==this.settingsScreen||"tools_interface"==this.settingsScreen?(this.settingsScreen="home",this.settingsNavigate("")):(this.settingsScreen="",this.settingsNavigate(""),this.closeSettings())},this.navigateChattersBack=()=>{this.closeChatters()};this.openChatters=()=>{this.chattersWindowOpen=!0,$("div.vs_chatv9_chatters").show(),vs_chatv9_chatters_scroller.getScrollElement().scrollTop=0,this.emojisBoxOpen&&this.hideEmojisBox(),ns||(this.send("MVN CHATTERS "+B),vs_chatv9.showLoadingChatters()),console.log("chattersListLoaded: "+ns),vs_chatv9.chattersRenderList(),vs_v9_resize_chat()},this.closeChatters=()=>{this.chattersWindowOpen=!1,$("div.vs_chatv9_chatters").hide(),vs_v9_resize_chat()},this.toggleChatters=()=>{this.chattersWindowOpen?(this.closeChatters(),this.chattersWindowOpen=!1):(this.openChatters(),this.chattersWindowOpen=!0)},this.settingsBans=()=>{var s=B.split("-");$.get("/app/chatv9.php?a=bans&n="+s[0].replace("#","")+"&c="+s[1],function(s,t){$(".vs_chatv9_settings_moderation_bans_container").html("");var e=s.split(",");for(let s=0;s<=e.length-1;s++){var _,i,a=e[s].split(";"),v=a[0];""!=v&&(_=a[1],i=new Date(1e3*a[2]),console.log("banDt: "+a[2]),i.setMinutes(i.getMinutes()+(new Date).getTimezoneOffset()),a=i.toDateString()+" "+i.getHours()+":"+i.getMinutes()+":"+i.getSeconds(),i='<div class="vs_chatv9_settings_moderation_bans_row" id="vs_chatv9_banlist-'+v.toLowerCase()+'-item"><div class="vs_chatv9_settings_moderation_bans_row_left"><div class="vs_chatv9_settings_moderation_bans_row_left_banname">'+v+'</div><div class="vs_chatv9_settings_moderation_bans_row_left_baninfo">Banned by '+_+'</div><div class="vs_chatv9_settings_moderation_bans_row_left_bandt">'+a+'</div></div><div class="vs_chatv9_settings_moderation_bans_row_right"><div class="vs_chatv9_action_button" onclick="vs_chatv9.settingsBans_unban(\''+v.toLowerCase()+'\')">Remove Ban</div></div></div><div class="vs_chatv9_settings_body_list_divider3" id="vs_chatv9_banlist-'+v.toLowerCase()+'-divider"></div>',$(".vs_chatv9_settings_moderation_bans_container").append(i))}vs_chatv9.SetInterfaceFontSize(vs_chatv9.interfaceFontSize)})},this.settingsBans_unban=s=>{this.send("MVN UNBAN "+B+" "+s)},this.settingsBans_unban_ui=s=>{$("#vs_chatv9_banlist-"+s+"-item").remove(),$("#vs_chatv9_banlist-"+s+"-divider").remove()},this.settingsManage_mods_unbanall=()=>{Modal.Chatv9_unbanall()},this.settingsManage_mods_unmodall=()=>{Modal.Chatv9_unmodall()},this.handle_unbanall=()=>{this.send("MVN UNBANALL "+B),this.settingsScreen="",this.settingsNavigate(""),this.closeSettings(),Modal.Hide("chatv9_unbanall")},this.handle_unmodall=()=>{this.send("MVN UNMODALL "+B),this.settingsScreen="",this.settingsNavigate(""),this.closeSettings(),Modal.Hide("chatv9_unmodall")},this.settingsMods=()=>{var s=B.split("-");$.get("/app/chatv9.php?a=mods&n="+s[0].replace("#","")+"&c="+s[1],function(s,t){$(".vs_chatv9_settings_moderation_mods_container").html("");var e=s.split(",");for(let s=0;s<=e.length-1;s++){var _=e[s].split(";"),i=_[0];""!=i&&(_[1],_='<div class="vs_chatv9_settings_moderation_mods_row" id="vs_chatv9_modslist-'+i.toLowerCase()+'-item"><div class="vs_chatv9_settings_moderation_mods_row_left">'+i+'</div><div class="vs_chatv9_settings_moderation_mods_row_right"><div class="vs_chatv9_action_button" onclick="vs_chatv9.settingsMods_unmod(\''+i.toLowerCase()+'\')">Remove Mod</div></div></div><div class="vs_chatv9_settings_body_list_divider3" id="vs_chatv9_modslist-'+i.toLowerCase()+'-divider"></div>',$(".vs_chatv9_settings_moderation_mods_container").append(_))}})},this.settingsMods_unmod=s=>{this.send("MVN UNMOD "+B+" "+s)},this.settingsMods_unmod_ui=s=>{$("#vs_chatv9_modslist-"+s+"-item").remove(),$("#vs_chatv9_modslist-"+s+"-divider").remove()},this.settingsModes_slowmode_save=()=>{if(null==$("#slowmode_status:checked").val())this.send("MVN SLOWOFF "+B);else{let s=$("#slowmode_duration").val();null==s&&(s=0),this.send("MVN SLOWON "+B+" "+s)}this.settingsScreen="",this.settingsNavigate(""),this.closeSettings(),document.getElementById(a).value="",document.getElementById(a).focus()},this.settingsGuestChat=()=>{V?$("#guestchat_status").prop("checked",!0):$("#guestchat_status").prop("checked",!1),X?$("#guestchat_filtervpn").prop("checked",!0):$("#guestchat_filtervpn").prop("checked",!1)},this.settingsModes_guestchat_save=()=>{var s=$("#guestchat_status:checked").val(),t=$("#guestchat_filtervpn:checked").val();null==s&&null==t?this.send("MVN GUESTOFF_VPNOFF "+B):null==s&&"on"==t?this.send("MVN GUESTOFF_VPNON "+B):"on"==s&&"on"==t?this.send("MVN GUESTON_VPNON "+B):"on"==s&&null==t&&this.send("MVN GUESTON_VPNOFF "+B),this.settingsScreen="",this.settingsNavigate(""),this.closeSettings(),document.getElementById(a).value="",document.getElementById(a).focus()},this.saveInterfaceSettings=()=>{let s=0,t=0;this.interface_secondarytimestamps&&(s=1),this.interface_chatclearing&&(t=1),this.interfaceFontSize,Modal.Processing(),$.post("/app/chatv9.php?a=save_settings",{secondary_timestamp:s,chat_clearing:t,font_size:this.interfaceFontSize,chat_theme:this.interface_chat_theme,chat_theme_color:this.interface_chat_theme_color},function(s){Modal.Finished(),1==s?(vs_chatv9.SetThemeColor(),vs_chatv9.closeSettingsFull(),vs_chatv9.send("MVN SYNC "+B+" "+i)):Modal.Alert("Interface Settings Error",s)})},this.RenderInterfaceSettings=(s,t,e)=>{null==e&&(e=this.interfaceFontSize),null==s&&(s=this.interface_chatclearing),null==t&&(t=this.interface_secondarytimestamps),$("#vs_v9_interface_font_size").val(e),$("#chat_clearing").prop("checked",s),$("#secondary_timestamps").prop("checked",t),$('#vs_chatv9_chat_theme_color option[value="'+this.interface_chat_theme_color+'"]').prop("selected",!0)},this.settingsConfirmedMode=()=>{P?$("#confirmed_status").prop("checked",!0):$("#confirmed_status").prop("checked",!1),ss?$("#confirmed_filtervpn").prop("checked",!0):$("#confirmed_filtervpn").prop("checked",!1)},this.settingsModes_confirmed_save=()=>{var s=$("#confirmed_status:checked").val(),t=$("#confirmed_filtervpn:checked").val();null==s&&null==t?this.send("MVN ACTOFF_VPNOFF "+B):null==s&&"on"==t?this.send("MVN ACTOFF_VPNON "+B):"on"==s&&"on"==t?this.send("MVN ACTON_VPNON "+B):"on"==s&&null==t&&this.send("MVN ACTON_VPNOFF "+B),this.settingsScreen="",this.settingsNavigate(""),this.closeSettings(),document.getElementById(a).value="",document.getElementById(a).focus()},this.settingsFollowersMode=()=>{U?$("#followers_status").prop("checked",!0):$("#followers_status").prop("checked",!1),ts?$("#followers_filtervpn").prop("checked",!0):$("#followers_filtervpn").prop("checked",!1),$("#followers_duration").val(G)},this.settingsModes_followers_save=()=>{var s=$("#followers_status:checked").val(),t=$("#followers_filtervpn:checked").val();let e=$("#followers_duration").val();null==e&&(e=0),null==s&&null==t?this.send("MVN FOLLOWERSOFF_VPNOFF "+B+" "+e):null==s&&"on"==t?this.send("MVN FOLLOWERSOFF_VPNON "+B+" "+e):"on"==s&&"on"==t?this.send("MVN FOLLOWERSON_VPNON "+B+" "+e):"on"==s&&null==t&&this.send("MVN FOLLOWERSON_VPNOFF "+B+" "+e),this.settingsScreen="",this.settingsNavigate(""),this.closeSettings(),document.getElementById(a).value="",document.getElementById(a).focus()},this.settingsSlowMode=()=>{A?($("#slowmode_status").prop("checked",!0),$("#slowmode_duration").val(z)):$("#slowmode_status").prop("checked",!1)},this.settingsPreviewUsernameColor=(s,t)=>{t&&0==vs_chatv9.isVip()?vs_chatv9.showModalVIP():(null==_&&(_=Y),null==e&&(e=H),console.log("remove class: "+_),$("#vs_chatv9_settings_text_preview_username").removeClass(_).addClass(s),console.log("settingsPreviewUsernameColor css_class: "+s),_=s,console.log("settingsPreviewUsernameColor: "+s))},this.settingsPreviewUsernameFont=s=>{null==_&&(_=Y),null==e&&(e=H),$("#vs_chatv9_settings_text_preview_username").removeClass(e).addClass(s),console.log("settingsPreviewUsernameFont css_class: "+s),e=s,console.log("settingsPreviewUsernameFont: "+s)},this.settingsPreviewChatColor=s=>{$("#vs_chatv9_settings_text_preview_body").removeClass(vs).addClass(s),y=s,console.log("settingsPreviewChatColor: "+s)},this.settingsPreviewChatFont=s=>{$("#vs_chatv9_settings_text_preview_body").removeClass(as).addClass(s),w=s,console.log("settingsPreviewChatFont: "+s)},this.settingsLoadUsernameStyle=()=>{null==_&&(_=Y),null==e&&(e=H);var s=H,t=Y;$("#vs_chatv9_settings_text_preview_username").removeClass(s).addClass(s),$("#vs_chatv9_settings_text_preview_username").removeClass(t).addClass(t),$('#vs_chatv9_username_font option[value="'+s+'"]').prop("selected",!0)};let l=[],g=[];this.settingsLoadChatStyles=()=>{l[0]="",l[1]="vs_chatv9_font_03",l[2]="vs_chatv9_font_04",l[3]="vs_chatv9_font_05",l[4]="vs_chatv9_font_07",l[5]="vs_chatv9_font_08",l[6]="vs_chatv9_font_10",l[7]="vs_chatv9_font_11",l[8]="vs_chatv9_font_12",l[9]="vs_chatv9_font_13",l[10]="vs_chatv9_font_14",l[11]="vs_chatv9_font_16",l[12]="vs_chatv9_font_17",l[13]="vs_chatv9_font_18",l[14]="vs_chatv9_font_19",l[15]="vs_chatv9_font_20",l[16]="vs_chatv9_font_21",l[17]="vs_chatv9_font_22",l[18]="vs_chatv9_font_23",l[19]="vs_chatv9_font_24",l[20]="vs_chatv9_font_25",l[21]="vs_chatv9_font_26",l[22]="vs_chatv9_font_27",l[23]="vs_chatv9_font_28",l[24]="vs_chatv9_font_29",l[25]="vs_chatv9_font_30",l[26]="vs_chatv9_font_31",l[27]="vs_chatv9_font_32",l[28]="vs_chatv9_font_33",l[29]="vs_chatv9_font_34",l[30]="vs_chatv9_font_35",l[31]="vs_chatv9_font_36",l[32]="vs_chatv9_font_37",g[0]="",g[1]="vs_chatv9_color_01",g[2]="vs_chatv9_color_02",g[3]="vs_chatv9_color_03",g[4]="vs_chatv9_color_04",g[5]="vs_chatv9_color_05",g[6]="vs_chatv9_color_06",g[7]="vs_chatv9_color_07",g[8]="vs_chatv9_color_08",g[9]="vs_chatv9_color_09",g[10]="vs_chatv9_neon_01",g[11]="vs_chatv9_neon_02",g[12]="vs_chatv9_gradient_01",g[13]="vs_chatv9_gradient_02",g[14]="vs_chatv9_gradient_03",g[15]="vs_chatv9_gradient_04",g[16]="vs_chatv9_gradient_05",g[17]="vs_chatv9_gradient_06",g[18]="vs_chatv9_gradient_07",g[19]="vs_chatv9_gradient_08",g[20]="vs_chatv9_gradient_09",g[21]="vs_chatv9_gradient_10",g[22]="vs_chatv9_gradient_11",g[23]="vs_chatv9_gradient_12",g[24]="vs_chatv9_gradient_13",g[25]="vs_chatv9_gradient_14",g[26]="vs_chatv9_gradient_15",g[27]="vs_chatv9_gradient_16",g[28]="vs_chatv9_gradient_17",g[29]="vs_chatv9_neon_03",g[30]="vs_chatv9_neon_04",g[31]="vs_chatv9_neon_05",g[32]="vs_chatv9_neon_06",g[33]="vs_chatv9_neon_07",g[36]="vs_chatv9_gradient_18",g[37]="vs_chatv9_gradient_19",g[38]="vs_chatv9_gradient_20",g[39]="vs_chatv9_gradient_21",g[40]="vs_chatv9_gradient_22",g[41]="vs_chatv9_gradient_23",g[42]="vs_chatv9_gradient_24"},this.fontIdToClass=s=>{let t="";return t=null==l[s]?"":l[s]},this.colorIdToClass=s=>{let t="";return t=null==g[s]?"":g[s]},this.saveUsernameStyle=()=>{null==_&&(_=Y);var s=e=null==e?H:e,t=_;Modal.Processing(),$.post("/app/chatv9.php?a=save_style_user",{username_font:s,username_color:t},function(s){Modal.Finished(),1==s?(H=e,Y=_,console.log("saveUsernameStyle userNameFont_preview: "+e),console.log("saveUsernameStyle userNameColor_preview: "+_),console.log("saveUsernameStyle userNameFont: "+H),console.log("saveUsernameStyle userNameColor: "+Y),vs_chatv9.closeSettingsFull(),vs_chatv9.send("MVN SYNC "+B+" "+i)):Modal.Alert("Chat Settings Error",s)})},this.saveChatStyle=()=>{var s=as,t=vs;Modal.Processing(),$.post("/app/chatv9.php?a=save_style_chat",{chat_font:s,chat_color:t},function(s){Modal.Finished(),1==s?(vs_chatv9.closeSettingsFull(),vs_chatv9.send("MVN SYNC "+B+" "+i)):Modal.Alert("Chat Settings Error",s)})},this.showModalVIP=()=>{$("div.vs_chatv9_modal_vip").show(),$("div.vs_chatv9_modal_overlay").show(),$("#vs_chatv9_modal_vip_buy").show(),$("#vs_chatv9_modal_vip_info").hide()},this.hideModalVIP=()=>{$("div.vs_chatv9_modal_vip").hide(),$("div.vs_chatv9_modal_overlay").hide(),$("#vs_chatv9_modal_vip_buy").hide(),$("#vs_chatv9_modal_vip_info").hide()},this.showModalVIPinfo=()=>{$("div.vs_chatv9_modal_vip").show(),$("div.vs_chatv9_modal_overlay").show(),$("#vs_chatv9_modal_vip_buy").hide(),$("#vs_chatv9_modal_vip_info").show()},this.hideModalVIPinfo=()=>{$("div.vs_chatv9_modal_vip").hide(),$("div.vs_chatv9_modal_overlay").hide(),$("#vs_chatv9_modal_vip_buy").hide(),$("#vs_chatv9_modal_vip_info").hide()}}}var vs_chatv9=new vs_v9_chat,vs_chatv9_scroller=null,vs_chatv9_emojis_scroller=null,vs_chatv9_settings_scroller=null,vs_chatv9_chatters_scroller=null;function vtrace(s){console.log("! VTRACE >> "+s)}String.prototype.contains=function(s){var t=-1;try{t=-1!=this.indexOf(s)}catch(s){}return t};let ready_device_chat=setInterval(function(){window.vsm_device_ready&&(vtrace("DEVICE READY"),clearInterval(ready_device_chat),device_loaded_chat())},500),device_loaded_chat=()=>{vs_chatv9_scroller=new SimpleBar(document.getElementById("vs_chatv9_chatarea"),{autoHide:!1}),vs_chatv9_emojis_scroller=new SimpleBar(document.getElementById("vs_chatv9_emojis_body_scroll"),{autoHide:!0}),vs_chatv9_settings_scroller=new SimpleBar(document.getElementById("vs_chatv9_settings_body"),{autoHide:!1}),vs_chatv9_chatters_scroller=new SimpleBar(document.getElementById("vs_chatv9_chatters_body"),{autoHide:!1}),vs_chatv9_scroller.getScrollElement().addEventListener("scroll",function(s){var t=$(vs_chatv9_scroller.getScrollElement()).prop("scrollHeight"),e=$(vs_chatv9_scroller.getScrollElement()).prop("scrollTop"),e=$(vs_chatv9_scroller.getScrollElement()).prop("clientHeight")+e;t==e?vs_chatv9.resumeChatScroll():e+300<=t&&vs_chatv9.disableChatScroll()}),vs_chatv9_emojis_scroller.getScrollElement().addEventListener("scroll",function(s){}),vs_chatv9_settings_scroller.getScrollElement().addEventListener("scroll",function(s){}),vs_chatv9_chatters_scroller.getScrollElement().addEventListener("scroll",function(s){}),$(".vs_v9_modal").width($(window).width()),$(".vs_v9_modal").height($(window).height()),vs_chatv9.settingsLoadChatStyles();let s=setInterval(function(){try{vs_privacy.getIsLoaded()&&(clearInterval(s),vs_chatv9.connect())}catch(s){}},500)};$(window).resize(function(){$(".vs_v9_modal").width($(window).width()),$(".vs_v9_modal").height($(window).height())}),$(document).resize(function(){$(".vs_v9_modal").width($(window).width()),$(".vs_v9_modal").height($(window).height())}),document.fonts.ready.then(function(){vtrace("All fonts in use by visible text have loaded."),vs_chatv9.scrollChat()}),document.fonts.onloadingdone=function(s){vtrace("onloadingdone we have "+s.fontfaces.length+" font faces loaded"),vs_chatv9.scrollChat()},$("div.vs_chatv9_input_options_btn_send").click(function(){vs_chatv9.handleChatInput()}),$("img.vs_chatv9_input_emojis").click(function(){"guest"==window.vs_username?Modal.SignIn2():vs_chatv9.toggleEmojisBox()}),$("img.vs_chatv9_input_gifs").click(function(){"guest"==window.vs_username?Modal.SignIn2():vs_chatv9.toggleGifsBox()}),$("#vs_chatv9_emojis_menu_button_vmojis").click(function(){vs_chatv9.loadVmojis()}),$("#vs_chatv9_emojis_menu_button_gifs").click(function(){"0"!=vs_chatv9.isVip()?vs_chatv9.loadGIFs():vs_chatv9.showModalVIP()}),$("#vs_chatv9_emojis_menu_button_stickers").click(function(){"0"!=vs_chatv9.isVip()?vs_chatv9.loadStickers():vs_chatv9.showModalVIP()}),$("div.vs_chatv9_emojis_gifs_search_nav").click(function(){vs_chatv9.loadGIFs()}),$("div.vs_chatv9_emojis_stickers_search_nav").click(function(){vs_chatv9.loadStickers()}),$("#vs_chatv9_input_box").click(function(){vs_chatv9.hideEmojisBox()}),$("div.vs_chatv9_input_options_btn_settings").click(function(){vs_chatv9.openSettings()}),$("div.vs_chatv9_input_options_btn_chatters").click(function(){vs_chatv9.toggleChatters()}),$("div.vs_chatv9_input_options_btn_donate").click(function(){vs_chatv9.showDonationBox()}),$("div.vs_chatv9_settings_back").click(function(){vs_chatv9.navigateSettingsBack()}),$("div.vs_chatv9_chatters_back").click(function(){vs_chatv9.navigateChattersBack()}),$("#vs_chatv9_save_chatfont_username").click(function(){vs_chatv9.saveUsernameStyle()}),$("#vs_chatv9_save_chatfont_text").click(function(){vs_chatv9.saveChatStyle()}),$("#vs_chatv9_username_font").change(function(){var s=$("#vs_chatv9_username_font").val();vs_chatv9.settingsPreviewUsernameFont(s)}),$("#vs_chatv9_chat_font").change(function(){var s=$("#vs_chatv9_chat_font").val();vs_chatv9.settingsPreviewChatFont(s)}),$("#vs_settings_chatfont_username").click(function(){vs_chatv9.settingsNavigate("chatfont_username")}),$("#vs_settings_chatfont_text").click(function(){vs_chatv9.settingsNavigate("chatfont_text")}),$("#vs_settings_modes_guestchat").click(function(){vs_chatv9.settingsNavigate("modes_guestchat")}),$("#vs_settings_modes_confirmed").click(function(){vs_chatv9.settingsNavigate("modes_confirmed")}),$("#vs_settings_modes_followers").click(function(){vs_chatv9.settingsNavigate("modes_followers")}),$("#vs_settings_modes_slowmode").click(function(){vs_chatv9.settingsNavigate("modes_slowmode")}),$("#vs_settings_moderation_manage").click(function(){vs_chatv9.settingsNavigate("moderation_manage")}),$("#vs_settings_moderation_bans").click(function(){vs_chatv9.settingsNavigate("moderation_bans")}),$("#vs_settings_bot_automod").click(function(){vs_chatv9.settingsNavigate("bot_automod")}),$("#vs_settings_bot_promos").click(function(){vs_chatv9.settingsNavigate("bot_promos")}),$("#vs_settings_bot_manage").click(function(){vs_chatv9.settingsNavigate("bot_manage")}),$("#vs_settings_tools_interface").click(function(){vs_chatv9.settingsNavigate("tools_interface")}),$("#vs_settings_tools_popout").click(function(){vs_chatv9.settingsNavigate("tools_popout")}),$("#vs_settings_tools_clear").click(function(){vs_chatv9.settingsNavigate("tools_clear")}),$("#vs_chatv9_save_slowmode").click(function(){vs_chatv9.settingsModes_slowmode_save()}),$("#vs_chatv9_save_guestchat").click(function(){vs_chatv9.settingsModes_guestchat_save()}),$("#vs_chatv9_save_confirmed").click(function(){vs_chatv9.settingsModes_confirmed_save()}),$("#vs_chatv9_save_interface").click(function(){vs_chatv9.saveInterfaceSettings()}),$("#vs_chatv9_unmodall").click(function(){vs_chatv9.settingsManage_mods_unmodall()}),$("#vs_chatv9_unbanall").click(function(){vs_chatv9.settingsManage_mods_unbanall()}),$("div.vs_chatv9_chattools_close").click(function(){vs_chatv9.hideChatTools()}),$("div.vs_chatv9_profilebox_close").click(function(){vs_chatv9.hideChatProfile()}),$("#vs_chatv9_userbox_x").click(function(){vs_chatv9.hideChatProfile()}),$("#vs_chatv9_usertoolbox_x").click(function(){vs_chatv9.hideCtxChatboxTools()}),$("#vs_chatv9_emojis_menu_x").click(function(){vs_chatv9.hideEmojisBox()}),$("#vs_chatv9_emojis_menu_button_add").click(function(){window.open("/howto/custom_emoticon")}),$("#vs_v9_resume_scrolling_chat_button").click(function(){vs_chatv9.resumeChatScrollManually()}),$("#vs_chatv9_modal_vip_x").click(function(){vs_chatv9.hideModalVIP()}),$("#vs_chatv9_save").click(function(){"chatfont_username"==vs_chatv9.getSettingsScreen()?vs_chatv9.saveUsernameStyle():"chatfont_text"==vs_chatv9.getSettingsScreen()?vs_chatv9.saveChatStyle():"modes_confirmed"==vs_chatv9.getSettingsScreen()?vs_chatv9.settingsModes_confirmed_save():"modes_followers"==vs_chatv9.getSettingsScreen()?vs_chatv9.settingsModes_followers_save():"modes_slowmode"==vs_chatv9.getSettingsScreen()?vs_chatv9.settingsModes_slowmode_save():"modes_guestchat"==vs_chatv9.getSettingsScreen()?vs_chatv9.settingsModes_guestchat_save():"tools_interface"==vs_chatv9.getSettingsScreen()&&vs_chatv9.saveInterfaceSettings()}),$("#vs_chatv9_action_block").click(function(){vs_privacy.BlockUser(vs_chatv9.getChatProfileUserName(),"stream")}),$("#vs_chatv9_action_unblock").click(function(){vs_privacy.UnblockUser(vs_chatv9.getChatProfileUserName(),"stream")}),$("#vs_chatv9_vip_modal").click(function(){window.open("/settings/vip")}),$("#vs_chatv9_vip_modal_info").click(function(){window.open("/howto/vip")}),$("#vs_chatv9_vip_gifs").click(function(){window.open("/settings/vip")}),$("#secondary_timestamps").change(function(){var s=$("#secondary_timestamps").is(":checked");console.log("SECONDARY TIMESTAMP: "+s),s?vs_chatv9.InterfaceSecondaryTimestamps_enable():vs_chatv9.InterfaceSecondaryTimestamps_disable()}),$("#chat_clearing").change(function(){var s=$("#chat_clearing").is(":checked");console.log("CHAT CLEARING: "+s),s?vs_chatv9.InterfaceChatClearing_enable():vs_chatv9.InterfaceChatClearing_disable()}),$("#vs_chatv9_chat_theme_color").change(function(){var s=$("#vs_chatv9_chat_theme_color").val();console.log("CHAT CLEARING: "+s),vs_chatv9.interface_chat_theme_color=s}),$("#vs_v9_interface_font_size").bind("input",function(){var s=$("#vs_v9_interface_font_size").val();console.log("FONT SIZE: "+s),vs_chatv9.SetInterfaceFontSize(s)}),$("#vs_chatv9_action_mod").click(function(){vs_chatv9.ChatterInfoAction_mod()}),$("#vs_chatv9_action_unmod").click(function(){vs_chatv9.ChatterInfoAction_unmod()}),$("#vs_chatv9_action_ban").click(function(){vs_chatv9.ChatterInfoAction_ban()}),$("#vs_chatv9_action_unban").click(function(){vs_chatv9.ChatterInfoAction_unban()}),$("#vs_chatv9_action_mute").click(function(){vs_chatv9.ChatterInfoAction_mute()}),$("#vs_chatv9_action_unmute").click(function(){vs_chatv9.ChatterInfoAction_unmute()}),$("#vs_chatv9_action_purge").click(function(){vs_chatv9.ChatterInfoAction_purge()}),$("#vs_chatv9_action_quick_profile").click(function(){vs_chatv9.showChatProfile(vs_chatv9.getChatProfileUserName()),vs_chatv9.hideCtxChatboxTools()}),$("#vs_chatv9_action_quick_ban").click(function(){vs_chatv9.ChatterInfoAction_ban(),vs_chatv9.hideCtxChatboxTools()}),$("#vs_chatv9_action_quick_unban").click(function(){vs_chatv9.ChatterInfoAction_unban(),vs_chatv9.hideCtxChatboxTools()}),$("#vs_chatv9_action_quick_mute").click(function(){vs_chatv9.ChatterInfoAction_mute(),vs_chatv9.hideCtxChatboxTools()}),$("#vs_chatv9_action_quick_unmute").click(function(){vs_chatv9.ChatterInfoAction_unmute(),vs_chatv9.hideCtxChatboxTools()}),$("#vs_chatv9_action_quick_purge").click(function(){vs_chatv9.ChatterInfoAction_purge(),vs_chatv9.hideCtxChatboxTools()}),$("#vs_chatv9_action_quick_copy").click(function(){vs_chatv9.CopyUsername(vs_chatv9.getChatProfileUserName()),vs_chatv9.hideCtxChatboxTools()}),$("#vs_chatv9_action_report").click(function(){vs_chatv9.ChatterInfoAction_report()}),$("div.vs_chatv9_gifs_background").click(function(){vs_chatv9.hideGIF()}),$("#vs_chatv9_viewgif_x").click(function(){vs_chatv9.hideGIF()}),$("#vs_chatv9_infobox_x").click(function(){vs_chatv9.hideInfobox()}),$("#vs_chatv9_infobox_welcome_x").click(function(){vs_chatv9.hideInfobox()}),$("#vs_chatv9_infobox_welcome_ok").click(function(){vs_chatv9.hideInfobox()}),$("#vs_chatv9_infobox_followersonly_x").click(function(){vs_chatv9.hideInfobox()}),$("#vs_chatv9_infobox_followersonly_ok").click(function(){vs_chatv9.hideInfobox(),vs_v9_stream_share=!1,$("div.vs_v9_stream_nav_share_box").hide(),vs_v9_stream_actions=!1,$("#vs_v9_stream_actions_more").hide(),vs_cls_channel.Follow()}),$("div.vs_chatv9_input_info").click(function(){vs_chatv9.clickInfo()});