!function(){var Helpers={create:function(e,t){var n=document.createElement(e);if(t)for(var o in t)"html"===o?n.innerHTML=t[o]:"class"==[o]?n.className=t[o]:n.setAttribute([o],t[o]);return n},removeClass:function(e,t){var n=e.className.replace(/(^\s+|\s+$)/g,""),o=new RegExp("(^|\\s)"+t+"(\\s|$)","g");e.className=n.replace(o," ").replace(/(^\s+|\s+$)/g,"")},hasClass:function(e,t){var n=new RegExp("(^|\\s)"+t+"(\\s|$)");return n.test(e.className)},addClass:function(e,t){var n=e.className.replace(/(^\s+|\s+$)/g,""),o=0===n.length?t:n+" "+t;this.hasClass(e,t)||(e.className=o)},isMobile:function(){var e=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i;return!!e.test(navigator.userAgent)},$:function(e){return document.getElementById(e)},isHtmlEl:function(e){return!(e.length?!e[0].nodeType:1!==e.nodeType)},isIE8or9:function(){var e=-1;if("Microsoft Internet Explorer"==navigator.appName){var t=navigator.userAgent,n=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");null!==n.exec(t)&&(e=parseFloat(RegExp.$1))}return 8===e||9===e},getWinH:function(){var e=0,t=window,n=document,o=n.documentElement;return e="undefined"!=typeof t.innerHeight?window.innerHeight:"undefined"!=typeof o&&"undefined"!=typeof o.clientHeight&&0!==o.clientHeight?o.clientHeight:n.getElementsByTagName("body")[0].clientHeight},ObjString:function(e){var t=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,n="",o="",s={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()};for(var r=function(e){return t.lastIndex=0,t.test(e)?'"'+e.replace(t,function(e){var t=s[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'},i=0;i<2;i+=1)o+=" ";var a=function(e,t){var s,i,l=0,c=null,p=null,d=n,u=t[e];switch(u&&"object"==typeof u&&"function"==typeof u.toJSON&&(u=u.toJSON(e)),typeof u){case"string":return r(u);case"number":return isFinite(u)?String(u):"null";case"boolean":case"null":case"function":return String(u);case"object":if(!u)return"null";if(n+=o,i=[],"[object Array]"===Object.prototype.toString.apply(u)){for(s=u.length,l=0;l").replace(/ /g," ")}},CL={show:!0,height:0,synColor:{err:"#FF0000",_null:"#808080",obj:"#881391",str:"#C41A16",numBoo:"#1C00CF",tag:"#881280",tagAttr:"#994500",tagVal:"#1A1AA6",time:"#0080FF"},textareaVal:"",funcs:{log:function(){"[native code]"},debug:function(){"[native code]"},time:function(){"[native code]"},timeEnd:function(){"[native code]"},clear:function(){"[native code]"},error:function(){"[native code]"},warn:function(){"[native code]"},assert:function(){"[native code]"},count:function(){"[native code]"}},_el:null,_liExec:null,_entries:null,init:function(){this.setup(),this.insertRules(document.styleSheets[document.styleSheets.length-1],'.CL{position:fixed;bottom:0;width:100%;left:0;border-top:1px solid #a3a3a3;z-index:2;font-size:12px}* html{height:100%}* html body{margin:0;padding:0;height:100%;zoom:1}* html #customconsole{position:absolute;right:auto;bottom:auto;top:expression((0 - customconsole.offsetHeight + (document.documentElement.clientHeight ? document.documentElement.clientHeight:document.body.clientHeight) + (ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop:document.body.scrollTop)) + "px")}.CL-header{overflow:auto;background:#ececec;border-bottom:1px solid #a3a3a3;*height:32px}.CL-header,.CL-title{font-family:Lucida Grande;font-size:12px}.CL-title{margin:0 0 0 10px;line-height:15px;border:1px solid #a3a3a3;border-bottom:0;float:left;background:#fff;padding:5px 8px 6px;font-weight:400;*margin:0 0 0 5px}.CL-tog{color:#333;display:block;text-decoration:none;outline:none;padding:4px 0;text-align:right;font-family:Lucida Grande;font-size:12px}.CL-togtxt{background:#a3a3a3;color:#fff;font-size:11px;padding:4px;margin-right:4px;display:inline-block}.CL-menu{background:#fff;overflow:auto;border-bottom:1px solid #e6e6e6;*height:31px}.CL-label{float:left;font-size:11px;padding:4px 0 4px 8px;margin:4px 0;text-transform:uppercase;border-left:1px solid #a3a3a3}.CL-clear{color:#333;display:block;text-decoration:none;outline:none;padding:8px 10px;color:#666;float:left}.CL-inp{width:23px;padding:2px;margin:4px;float:left;border:0}.CL-rad{margin:8px;border:2px solid #a3a3a3}.CL-entries{background:#fff;overflow:auto;position:relative;margin:0;padding:0;list-style-type:none;font-family:Lucida Grande;font-size:12px;width:100%}.CL-entries.show-timestamps .CL-timest{display:block}.CL-entry{clear:both;position:relative;min-height:16px;list-style-type:none;font-size:11px;z-index:1;border-bottom:1px solid #f0f0f0;overflow:auto;*zoom:1}.CL-entry .CL-timest{display:none}.CL-entry.CL-err{color:red;background:#fff0f0;border-top:1px solid #ffd6d6;border-bottom:1px solid #ffd6d6;margin-top:-1px}.CL-entry.CL-err .CL-sym{color:red}.CL-entry.CL-cleared .CL-sym{display:none}.CL-entry.CL-warn{background:#fffbe6;color:#5c3b00}.CL-entry.CL-exec{overflow:hidden;border-bottom:0}.CL-entry.CL-exec .CL-sym{color:#2d7df9;top:0!important}.CL-entry.CL-exec .CL-entrytxt{overflow:auto;padding-right:0;*zoom:0}.CL-sym{border:0;position:absolute;margin-left:10px;font-family:Arial;font-weight:900;color:#939393;font-size:12px;padding:3px 0;left:0}.CL-sym2{color:#bababa}.CL-entrytxt{margin-left:24px;display:block;padding:4px 22px 4px 0;word-wrap:break-word;position:relative;font-family:Menlo,monospace,Lucida Sans Unicode,Courier,Courier New;font-size:11px;*zoom:1}.CL-entrytxt.CL-timest{padding-right:6px;color:gray;font-size:10px;padding-bottom:0;display:none;float:right}.CL-txtarea{width:76%;float:left;padding:3px;height:30px;border:0;font-family:Menlo,monospace,Lucida Sans Unicode,Courier,Courier New;font-size:11px}.CL-execbtn{color:#333;text-decoration:none;outline:none;display:block;float:right;width:21%;text-align:center;text-transform:uppercase;line-height:38px}'),this.scriptParams(),Helpers.isIE8or9()&&alert("IE 8 & 9 support the console. The developer tools need to be opened for the console to work."),this.setHeight(this.height,!0),this.toggle(),this.bindEvents()},setup:function(){var e=Helpers.create("style",{type:"text/css"});this._entries=Helpers.create("ul",{"class":"CL-entries"}),this._el=Helpers.create("div",{"class":"CL",id:"customconsole",html:'
Console
Click to hide
CLEARHeight:
'}),this._liExec=Helpers.create("li",{"class":"CL-entry CL-exec",id:"CLExecute",html:'>Execute'}),document.getElementsByTagName("head")[0].appendChild(e),this._el.appendChild(this._entries),this._entries.appendChild(this._liExec),document.body.appendChild(this._el)},override:function(){for(var e=!1,t=document.getElementsByTagName("script"),n="",o="",s=0,r=t.length;s0){o=n.substring(n.indexOf("?")+1,n.length).split("&");for(var i=0,a=o.length;i0){n=t.substring(t.indexOf("?")+1,t.length).split("&");for(var a=0,l=n.length;a>',console.log(val),sym='<',console.log(eval(val));else if("console"===val)sym='>',console.log(val),sym='<',console.log(this.funcs);else for(var key in this.funcs)val==="console."+key&&(sym='>',console.log(val),sym='<',console.log(this.funcs[key]));else sym='>',console.log(val),sym='<',console.log(eval(val))},toggle:function(){var e=this.show?"hide":"show",t=Helpers.$("CLTogText");t.innerHTML="Click to "+e,this._entries.style.display=this.show?"block":"none",Helpers.$("CLMenu").style.display=this.show?"block":"none",this.show&&this.scrl2Btm()},setHeight:function(e,t){var n=Number(e);n>=90&&n<=Helpers.getWinH()-150?this.height=n:this.height=Helpers.getWinH()/3,t&&(Helpers.$("CLHeight").value=this.height),this._entries.style.height=this.height+"px",this.scrl2Btm()},newLog:function(){var e=Helpers.$("CLTextarea");this._entries.appendChild(this._liExec),e.value="",e.focus(),this.scrl2Btm(),isExec=isError=consoleError=consoleAssert=!1,entryClass="CL-entry",sym=""},scrl2Btm:function(){this._entries.scrollTop=this._entries.scrollHeight},syntax:function(e,t){var n=t,o=this;if("object"==e)n=null===t?''+t+"":t.replace(new RegExp(/(\w+)(\:)/g),'$1$2').replace(new RegExp(/( )(-?\d+\D?\d+)|( )(-?\d)|( )(true|false)/g),'$1$3$5$2$4$6').replace(new RegExp(/( )(".*?")/g),'$1$2');else if("html"==e){var s=t.replace(new RegExp(/<(.*?)>/gi),function(e){return''+e+""});n=s.replace(new RegExp(/<(?!\/)(.*?)>/gi),function(e){var t=new RegExp(/ (.*?)="(.*?)"/gi);return e.replace(t,' $1="$2"')})}else"number"==e||"boolean"==e?n=''+t+"":"undefined"===e&&(n=''+t+"");return n},printHTML:function(e){var t=Helpers.create("div"),n=null,o="",s=null;t.innerHTML="";try{n=e.cloneNode(!0),t.appendChild(n)}catch(r){for(var i=0,a=e.length;i/g,">"),o=o.replace(/<\/?([A-Z]+)/g,function(e){return e.toLowerCase()}).replace(/([a-zA-Z]+)=([a-zA-Z]+-?[a-zA-Z]+)/g,'$1="$2"'),o.replace(/\n/g,"
")},insertRules:function(e,t){for(var n=[],o=null,s=[],r=null,i=t.split("}"),a=[],l=0,c=i.length;l'+(new Date).toISOString().replace(/z|t/gi," ")+' '+e+"\n"+t+"\n on line: "+n+""});CL._entries.insertBefore(o,CL._liExec),CL.newLog()}},window.console={ID:"%CL%ML101417",log:function(){var li=null,param=null,pString="%CL%ML101417";output="",consoleAssert&&(output="Assertion failed: "),isExec&&(space="
");try{for(var i=0,ii=arguments.length;i'+param+""}),CL._entries.appendChild(li),eval(param)),"object"==(typeof param).toLowerCase()?(pString=param.toString(),entryClass="CL-entry","[object Object]"==pString?(strObj=Helpers.ObjString(param),/\%CL\%ML101417/g.test(strObj)&&(strObj=Helpers.ObjString(CL.funcs)),output+="Object "+CL.syntax("object",strObj)+space):pString.match(/^\[object */i)?pString.match(/^\[object HTML*/i)||Helpers.isHtmlEl(param)?output+=CL.syntax("html",CL.printHTML(param))+space:(entryClass+=" CL-err",isError=!0,output+='ERROR: Maximum call stack size exceeded.
Object is too deeply nested.
'+space):param.length>1&&(output+="["+param+"]")):(/\%CL\%ML101417/g.test(param)&&(param=Helpers.ObjString(CL.funcs.log)),output+=CL.syntax(typeof param,param)+space)}catch(e){"object"==(typeof param).toLowerCase()?output+=CL.syntax(typeof param,param)+space:(entryClass+=" CL-err",output+=''+e+""+space)}isError&&(entryClass="CL-entry CL-err",sym='x'),""!==output&&(li=Helpers.create("li",{"class":entryClass,html:sym+''+(new Date).toISOString().replace(/z|t/gi," ")+' '+output.replace(/(){3,}/gi,"
")+"
"}),CL._entries.appendChild(li),CL.newLog())},clear:function(){var e=CL._entries.getElementsByTagName("li"),t=e.length;if(entryClass+=" CL-cleared",1!==t)for(;t--;)"CLExecute"!==e[t].id&&e[t].parentNode.removeChild(e[t]);console.log("Console was cleared")},error:function(){var e=arguments;entryClass="CL-entry CL-err",isError=!0,consoleError=!0,console.log(void 0===e[0]?"":e[0],void 0===e[1]?"":e[1],void 0===e[2]?"":e[2],void 0===e[3]?"":e[3],void 0===e[4]?"":e[4],void 0===e[5]?"":e[5],void 0===e[6]?"":e[6],void 0===e[7]?"":e[7],void 0===e[8]?"":e[8],void 0===e[9]?"":e[9],void 0===e[10]?"":e[10])},warn:function(){var e=arguments;entryClass="CL-entry CL-warn",console.log(void 0===e[0]?"":e[0],void 0===e[1]?"":e[1],void 0===e[2]?"":e[2],void 0===e[3]?"":e[3],void 0===e[4]?"":e[4],void 0===e[5]?"":e[5],void 0===e[6]?"":e[6],void 0===e[7]?"":e[7],void 0===e[8]?"":e[8],void 0===e[9]?"":e[9],void 0===e[10]?"":e[10])},assert:function(){var e=[];isError=consoleError=consoleAssert=!0;for(var t=0,n=arguments.length;t'+(new Date).toISOString().replace(/z|t/gi," ")+' '+arguments[0]+": "+Math.abs(start-end)+"ms"}),CL._entries.appendChild(e),CL.newLog()},count:function(){var e=""===arguments[0]||void 0===arguments[0]?"":arguments[0]+": ";console.log(e+count(arguments[0]).toString())}}}}();