!function(e){var t={};function n(c){if(t[c])return t[c].exports;var i=t[c]={i:c,l:!1,exports:{}};return e[c].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,c){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:c})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var c=Object.create(null);if(n.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(c,i,function(t){return e[t]}.bind(null,i));return c},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}({3:function(e,t,n){"use strict";function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;nt.scrollHeight-60&&(t.scrollTop=t.scrollHeight)}},{key:"handleMC",value:function(e){var t=N.music;if(t.pause(),t.src=u+e[1],t.play(),e[2]>=0){var n=this.chars[e[2]].name;M("".concat(n," changed music to ").concat(e[1]))}else M("The music was changed to ".concat(e[1]))}},{key:"handleRMC",value:function(e){N.music.pause(),N.music=new Audio(this.musicList[e[1]]);var t=N.music;t.totime=e[1],t.offset=(new Date).getTime()/1e3,t.addEventListener("loadedmetadata",function(){t.currentTime+=parseFloat(t.totime+((new Date).getTime()/1e3-t.offset)).toFixed(3),t.play()},!1)}},{key:"handleCI",value:function(e){document.getElementById("client_loadingtext").innerHTML="Loading Character "+e[1],this.serv.send("AN#"+(e[1]/10+1)+"#%");for(var t=2;t",n.appendChild(c),t%8==0&&document.getElementById("client_chartable").appendChild(n)}C("def")}},{key:"handlePV",value:function(e){this.charID=e[3],document.getElementById("client_charselect").style.display="none";var t=this.me(),n=this.emotes,c=new XMLHttpRequest;c.open("GET",l+"characters/"+escape(this.me().name)+"/char.ini",!0),c.responseType="text",c.onload=function(e){if(200==this.status){var c=this.responseText,i=f.parse(c);t.side=i.Options.side;for(var o=1;o"}O(1)}},c.send()}}]),e}(),g=function(){function e(){c(this,e),this.textnow="",this.chatmsg={isnew:!1,content:"",objection:"0",sound:"",startspeaking:!1,side:null,color:"0",snddelay:0},this.blip=new Audio(l+"sounds/general/sfx-blipmale.wav"),this.blip.volume=.5,this.blipChannels=new Array(6);for(var t=0;t=this.shoutTimer)if(this.chatmsg.startspeaking){C(this.chatmsg.side),document.getElementById("client_char").src=l+"characters/"+escape(this.chatmsg.name)+"/"+this.chatmsg.speaking+".gif",document.getElementById("client_name").style.fontSize=.7*document.getElementById("client_name").offsetHeight+"px",document.getElementById("client_chat").style.fontSize=.25*document.getElementById("client_chat").offsetHeight+"px",document.getElementById("client_name").innerHTML="

"+this.chatmsg.nameplate.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")+"

";var n="color: "+({0:"#ffffff",1:"#00ff00",2:"#ff0000",3:"#ffaa00",4:"#0000ff",5:"#ffff00",6:"#aa00aa"}[this.chatmsg.color]||"#ffffff");document.getElementById("client_inner_chat").style=n,this.chatmsg.startspeaking=!1,this.textnow==this.chatmsg.content&&(document.getElementById("client_char").src=l+"characters/"+escape(this.chatmsg.name)+"/"+this.chatmsg.silent+".gif",this._animating=!1,clearTimeout(this.updater))}else this.textnow!=this.chatmsg.content&&(" "!=this.chatmsg.content.charAt(this.textnow.length)&&(this.blipChannels[this.currentBlipChannel].play(),this.currentBlipChannel++,this.currentBlipChannel%=this.blipChannels.length),this.textnow=this.chatmsg.content.substring(0,this.textnow.length+1),document.getElementById("client_inner_chat").innerHTML=this.textnow,this.textnow==this.chatmsg.content&&(this.textTimer=0,this._animating=!1,document.getElementById("client_char").src=l+"characters/"+escape(this.chatmsg.name)+"/"+this.chatmsg.silent+".gif",clearTimeout(this.updater)));!this.sfxplayed&&this.chatmsg.snddelay+this.shoutTimer>=this.textTimer&&(this.sfxaudio.pause(),this.sfxplayed=1,"0"!=this.chatmsg.sound&&"1"!=this.chatmsg.sound&&(this.sfxaudio.src=l+"sounds/general/"+escape(this.chatmsg.sound)+".wav",this.sfxaudio.play())),this.textTimer=this.textTimer+65}}]),e}(),f=function(){function e(){c(this,e)}return o(e,null,[{key:"parse",value:function(e){var t={section:/^\s*\[\s*([^\]]*)\s*\]\s*$/,param:/^\s*([\w\.\-\_]+)\s*=\s*(.*?)\s*$/,comment:/^\s*;.*$/},n={},c=e.split(/\r\n|\r|\n/),i=null;return c.forEach(function(e){if(!t.comment.test(e)&&0!=e.length)if(t.param.test(e)){var c=e.match(t.param);i?n[i][c[1]]=c[2]:n[c[1]]=c[2]}else if(t.section.test(e)){var o=e.match(t.section);n[o[1]]={},i=o[1]}}),n}}]),e}();function y(e){13==e.keyCode&&(L.sendOOC(document.getElementById("client_oocinputbox").value),document.getElementById("client_oocinputbox").value="")}function v(e){if(13==e.keyCode){var t=L.me(),n=L.myEmote(),c="0",i="0";document.getElementById("sendsfx").checked&&(c=n.sfx,i=n.sfxdelay),L.sendIC(n.speaking,t.name,n.silent,document.getElementById("client_inputbox").value,t.side,c,n.zoom,i,h)}}function E(e){var t=document.getElementById("client_musiclist").value;L.sendMusicChange(t)}function _(){N.music.volume=document.getElementById("client_mvolume").value/100}function I(){N.sfxaudio.volume=document.getElementById("client_svolume").value/100}function B(){N.setBlipVolume(document.getElementById("client_bvolume").value/100)}function b(e){L.sendLeaveRoom(),document.getElementById("client_charselect").style.display="block",document.getElementById("client_emo").innerHTML=""}function k(e){return e.onerror="",e.src="/misc/placeholder.gif",!0}function w(e){return e.onerror="",e.src="/misc/placeholder.png",!0}function C(e){var t,n=N.bgFolder();switch(document.getElementById("client_fg").style.display="none",document.getElementById("client_bench").style.display="none",e){case"def":document.getElementById("client_court").src=n+"defenseempty.png",document.getElementById("client_bench").style.display="block",document.getElementById("client_bench").src=n+"defensedesk.png",t="defense";break;case"pro":document.getElementById("client_court").src=n+"prosecutorempty.png",document.getElementById("client_bench").style.display="block",document.getElementById("client_bench").src=n+"prosecutiondesk.png",t="prosecution";break;case"hld":document.getElementById("client_court").src=n+"helperstand.png",t="defense";break;case"hlp":document.getElementById("client_court").src=n+"prohelperstand.png",t="prosecution";break;case"wit":document.getElementById("client_court").src=n+"witnessempty.png",document.getElementById("client_bench").style.display="block",document.getElementById("client_bench").src=n+"estrado.png",t="prosecution";break;case"jud":document.getElementById("client_court").src=n+"judgestand.png",t="prosecution"}5==N.chatmsg.type&&(document.getElementById("client_bench").style.display="none",document.getElementById("client_court").src=l+"themes/default/"+t+"_speedlines.gif")}function x(){L.cleanup(),(L=new p(a))&&(r="join",document.getElementById("client_error").style.display="none")}function T(){L.joinServer()}function M(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Date,c=document.createElement("p"),i=document.createElement("span");if(i.id="iclog_name",i.appendChild(document.createTextNode(t)),c.appendChild(i),c.appendChild(document.createTextNode(e)),m.getMinutes()!==n.getMinutes()){var o=document.createElement("span");o.id="iclog_time",o.innerText=n.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"}),c.appendChild(o)}var s=document.getElementById("client_log");s.appendChild(c),s.scrollTop>s.scrollHeight-600&&(s.scrollTop=s.scrollHeight),m=new Date}function S(e){e<1e3?L.sendCharacter(e):(document.getElementById("client_charselect").style.display="none",document.getElementById("client_inputbox").style.display="none",document.getElementById("client_emo").style.display="none")}function O(e){-1!=L.selectedEmote&&(document.getElementById("emo_"+L.selectedEmote).src=L.myEmote().button_off),L.selectedEmote=e,document.getElementById("emo_"+e).src=L.myEmote().button_on}function D(e){e==h?(document.getElementById("button_"+e).className="client_button",h=0):(document.getElementById("button_"+e).className="client_button dark",h&&(document.getElementById("button_"+h).className="client_button"),h=e)}function H(e){return e.replace(/#/g,"").replace(/&/g,"").replace(/%/g,"").replace(/\$/g,"")}window.onOOCEnter=y,window.onEnter=v,window.musiclist_click=E,window.changeMusicVolume=_,window.changeSFXVolume=I,window.changeBlipVolume=B,window.changeCharacter=b,window.imgError=k,window.demoError=w,window.ReconnectButton=x,window.RetryButton=T,window.pickchar=S,window.pickemotion=O,window.toggleshout=D,void 0===String.prototype.trim&&(String.prototype.trim=function(){return String(this).replace(/^\s+|\s+$/g,"")}),String.prototype.hashCode=function(){var e,t=0;if(0===this.length)return t;for(e=0;e