Array.prototype.push||(Array.prototype.push=function(){for(var e=0,t=arguments.length;t>e;e++)this[this.length]=arguments[e];return this.length}),Array.prototype.shift||(Array.prototype.shift=function(){if(this.length>0){for(var e=this[0],t=0,i=this.length-1;i>t;t++)this[t]=this[t+1];return this.length=this.length-1,e}}),Array.prototype.splice||(Array.prototype.splice=function(e,t){var i=this.slice(e+t),n=this.slice(e,e+t);this.length=e;for(var r=[],o=0,s=arguments.length;s>o;o++)r[o]=arguments[o];var a=r.length>2?i=r.slice(2).concat(i):i;for(o=0,s=a.length;s>o;o++)this.push(a[o]);return n});var log4javascript=function(){function isUndefined(e){return e===void 0}function EventSupport(){}function Log4JavaScript(){}function toStr(e){return e&&e.toString?""+e:e+""}function getExceptionMessage(e){return e.message?e.message:e.description?e.description:toStr(e)}function getUrlFileName(e){var t=Math.max(e.lastIndexOf("/"),e.lastIndexOf("\\"));return e.substr(t+1)}function getExceptionStringRep(e){if(e){var t="Exception: "+getExceptionMessage(e);try{e.lineNumber&&(t+=" on line number "+e.lineNumber),e.fileName&&(t+=" in file "+getUrlFileName(e.fileName))}catch(i){logLog.warn("Unable to obtain file and line information for error")}return showStackTraces&&e.stack&&(t+=newLine+"Stack trace:"+newLine+e.stack),t}return null}function bool(e){return Boolean(e)}function trim(e){return e.replace(/^\s+/,"").replace(/\s+$/,"")}function splitIntoLines(e){var t=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n");return t.split("\n")}function array_remove(e,t){for(var i=-1,n=0,r=e.length;r>n;n++)if(e[n]===t){i=n;break}return i>=0?(e.splice(i,1),!0):!1}function array_contains(e,t){for(var i=0,n=e.length;n>i;i++)if(e[i]==t)return!0;return!1}function extractBooleanFromParam(e,t){return isUndefined(e)?t:bool(e)}function extractStringFromParam(e,t){return isUndefined(e)?t:e+""}function extractIntFromParam(e,t){if(isUndefined(e))return t;try{var i=parseInt(e,10);return isNaN(i)?t:i}catch(n){return logLog.warn("Invalid int param "+e,n),t}}function extractFunctionFromParam(e,t){return"function"==typeof e?e:t}function isError(e){return e instanceof Error}function getListenersPropertyName(e){return"__log4javascript_listeners__"+e}function addEvent(e,t,i,n,r){if(r=r?r:window,e.addEventListener)e.addEventListener(t,i,n);else if(e.attachEvent)e.attachEvent("on"+t,i);else{var o=getListenersPropertyName(t);e[o]||(e[o]=[],e["on"+t]=function(e){e=getEvent(e,r);for(var i,n=getListenersPropertyName(t),o=this[n].concat([]);i=o.shift();)i.call(this,e)}),e[o].push(i)}}function removeEvent(e,t,i,n){if(e.removeEventListener)e.removeEventListener(t,i,n);else if(e.detachEvent)e.detachEvent("on"+t,i);else{var r=getListenersPropertyName(t);e[r]&&array_remove(e[r],i)}}function getEvent(e,t){return t=t?t:window,e?e:t.event}function stopEventPropagation(e){e.stopPropagation?e.stopPropagation():e.cancelBubble!==void 0&&(e.cancelBubble=!0),e.returnValue=!1}function handleError(e,t){logLog.error(e,t),log4javascript.dispatchEvent("error",{message:e,exception:t})}function Timer(e,t){this.name=e,this.level=isUndefined(t)?Level.INFO:t,this.start=new Date}function Logger(e){this.name=e,this.parent=null,this.children=[];var t=[],i=null,n=this.name===rootLoggerName,r=this.name===nullLoggerName,o=null,s=!1;this.addChild=function(e){this.children.push(e),e.parent=this,e.invalidateAppenderCache()};var a=!0;this.getAdditivity=function(){return a},this.setAdditivity=function(e){var t=a!=e;a=e,t&&this.invalidateAppenderCache()},this.addAppender=function(e){r?handleError("Logger.addAppender: you may not add an appender to the null logger"):e instanceof log4javascript.Appender?array_contains(t,e)||(t.push(e),e.setAddedToLogger(this),this.invalidateAppenderCache()):handleError("Logger.addAppender: appender supplied ('"+toStr(e)+"') is not a subclass of Appender")},this.removeAppender=function(e){array_remove(t,e),e.setRemovedFromLogger(this),this.invalidateAppenderCache()},this.removeAllAppenders=function(){var e=t.length;if(e>0){for(var i=0;e>i;i++)t[i].setRemovedFromLogger(this);t.length=0,this.invalidateAppenderCache()}},this.getEffectiveAppenders=function(){if(null===o||s){var e=n||!this.getAdditivity()?[]:this.parent.getEffectiveAppenders();o=e.concat(t),s=!1}return o},this.invalidateAppenderCache=function(){s=!0;for(var e=0,t=this.children.length;t>e;e++)this.children[e].invalidateAppenderCache()},this.log=function(e,t){if(enabled&&e.isGreaterOrEqual(this.getEffectiveLevel())){var i,n=t.length-1,r=t[n];t.length>1&&isError(r)&&(i=r,n--);for(var o=[],s=0;n>=s;s++)o[s]=t[s];var a=new LoggingEvent(this,new Date,e,o,i);this.callAppenders(a)}},this.callAppenders=function(e){for(var t=this.getEffectiveAppenders(),i=0,n=t.length;n>i;i++)t[i].doAppend(e)},this.setLevel=function(e){n&&null===e?handleError("Logger.setLevel: you cannot set the level of the root logger to null"):e instanceof Level?i=e:handleError("Logger.setLevel: level supplied to logger "+this.name+" is not an instance of log4javascript.Level")},this.getLevel=function(){return i},this.getEffectiveLevel=function(){for(var e=this;null!==e;e=e.parent){var t=e.getLevel();if(null!==t)return t}},this.group=function(e,t){if(enabled)for(var i=this.getEffectiveAppenders(),n=0,r=i.length;r>n;n++)i[n].group(e,t)},this.groupEnd=function(){if(enabled)for(var e=this.getEffectiveAppenders(),t=0,i=e.length;i>t;t++)e[t].groupEnd()};var l={};this.time=function(e,t){enabled&&(isUndefined(e)?handleError("Logger.time: a name for the timer must be supplied"):!t||t instanceof Level?l[e]=new Timer(e,t):handleError("Logger.time: level supplied to timer "+e+" is not an instance of log4javascript.Level"))},this.timeEnd=function(e){if(enabled)if(isUndefined(e))handleError("Logger.timeEnd: a name for the timer must be supplied");else if(l[e]){var t=l[e],i=t.getElapsedTime();this.log(t.level,["Timer "+toStr(e)+" completed in "+i+"ms"]),delete l[e]}else logLog.warn("Logger.timeEnd: no timer found with name "+e)},this.assert=function(e){if(enabled&&!e){for(var t=[],i=1,n=arguments.length;n>i;i++)t.push(arguments[i]);t=t.length>0?t:["Assertion Failure"],t.push(newLine),t.push(e),this.log(Level.ERROR,t)}},this.toString=function(){return"Logger["+this.name+"]"}}function SimpleLayout(){this.customFields=[]}function NullLayout(){this.customFields=[]}function XmlLayout(e){this.combineMessages=extractBooleanFromParam(e,!0),this.customFields=[]}function escapeNewLines(e){return e.replace(/\r\n|\r|\n/g,"\\r\\n")}function JsonLayout(e,t){this.readable=extractBooleanFromParam(e,!1),this.combineMessages=extractBooleanFromParam(t,!0),this.batchHeader=this.readable?"["+newLine:"[",this.batchFooter=this.readable?"]"+newLine:"]",this.batchSeparator=this.readable?","+newLine:",",this.setKeys(),this.colon=this.readable?": ":":",this.tab=this.readable?" ":"",this.lineBreak=this.readable?newLine:"",this.customFields=[]}function HttpPostDataLayout(){this.setKeys(),this.customFields=[],this.returnsPostData=!0}function formatObjectExpansion(e,t,i){function n(e,t,i){function o(e){for(var t=splitIntoLines(e),n=1,r=t.length;r>n;n++)t[n]=i+t[n];return t.join(newLine)}var s,a,l,c,h,u,d;if(i||(i=""),null===e)return"null";if(e===void 0)return"undefined";if("string"==typeof e)return o(e);if("object"==typeof e&&array_contains(r,e)){try{u=toStr(e)}catch(p){u="Error formatting property. Details: "+getExceptionStringRep(p)}return u+" [already expanded]"}if(e instanceof Array&&t>0){for(r.push(e),u="["+newLine,l=t-1,c=i+" ",h=[],s=0,a=e.length;a>s;s++)try{d=n(e[s],l,c),h.push(c+d)}catch(p){h.push(c+"Error formatting array member. Details: "+getExceptionStringRep(p))}return u+=h.join(","+newLine)+newLine+i+"]"}if("[object Date]"==Object.prototype.toString.call(e))return""+e;if("object"==typeof e&&t>0){r.push(e),u="{"+newLine,l=t-1,c=i+" ",h=[];for(s in e)try{d=n(e[s],l,c),h.push(c+s+": "+d)}catch(p){h.push(c+s+": Error formatting property. Details: "+getExceptionStringRep(p))}return u+=h.join(","+newLine)+newLine+i+"}"}return o(toStr(e))}var r=[];return n(e,t,i)}function PatternLayout(e){this.pattern=e?e:PatternLayout.DEFAULT_CONVERSION_PATTERN,this.customFields=[]}function AlertAppender(){}function BrowserConsoleAppender(){}function isHttpRequestSuccessful(e){return isUndefined(e.status)||0===e.status||e.status>=200&&300>e.status}function AjaxAppender(e){function t(e){return k?(handleError("AjaxAppender: configuration option '"+e+"' may not be set after the appender has been initialized"),!1):!0}function i(){if(h&&enabled){w=!0;var e;if(d)_.length>0?(e=_.shift(),a(r(e),i)):(w=!1,u&&o());else{for(;e=_.shift();)a(r(e));w=!1,u&&o()}}}function n(){var e=!1;if(h&&enabled){for(var t,n=c.getLayout().allowBatching()?p:1,r=[];t=x.shift();)r.push(t),x.length>=n&&(_.push(r),r=[]);r.length>0&&_.push(r),e=_.length>0,d=!1,u=!1,i()}return e}function r(e){for(var t,i=[],n="";t=e.shift();){var r=c.getLayout().format(t);c.getLayout().ignoresThrowable()&&(r+=t.getThrowableStrRep()),i.push(r)}return n=1==e.length?i.join(""):c.getLayout().batchHeader+i.join(c.getLayout().batchSeparator)+c.getLayout().batchFooter,n=c.getLayout().returnsPostData?n:urlEncode(v)+"="+urlEncode(n),n.length>0&&(n+="&"),n+"layout="+urlEncode(""+c.getLayout())}function o(){window.setTimeout(i,f)}function s(){var e="AjaxAppender: could not create XMLHttpRequest object. AjaxAppender disabled";handleError(e),h=!1,m&&m(e)}function a(t,i){try{var n=getXmlHttp(s);if(h){n.overrideMimeType&&n.overrideMimeType(c.getLayout().getContentType()),n.onreadystatechange=function(){if(4==n.readyState){if(isHttpRequestSuccessful(n))g&&g(n),i&&i(n);else{var t="AjaxAppender.append: XMLHttpRequest request to URL "+e+" returned status code "+n.status;handleError(t),m&&m(t)}n.onreadystatechange=emptyFunction,n=null}},n.open("POST",e,!0);try{n.setRequestHeader("Content-Type","application/x-www-form-urlencoded");for(var r,o=0;r=C[o++];)n.setRequestHeader(r.name,r.value)}catch(a){var l="AjaxAppender.append: your browser's XMLHttpRequest implementation does not support setRequestHeader, therefore cannot post data. AjaxAppender disabled";return handleError(l),h=!1,m&&m(l),void 0}n.send(t)}}catch(u){var d="AjaxAppender.append: error sending log message to "+e;handleError(d,u),h=!1,m&&m(d+". Details: "+getExceptionStringRep(u))}}function l(){if(k=!0,b){var e=window.onbeforeunload;window.onbeforeunload=function(){return e&&e(),n()?"Sending log messages":void 0}}u&&o()}var c=this,h=!0;e||(handleError("AjaxAppender: URL must be specified in constructor"),h=!1);var u=this.defaults.timed,d=this.defaults.waitForResponse,p=this.defaults.batchSize,f=this.defaults.timerInterval,g=this.defaults.requestSuccessCallback,m=this.defaults.failCallback,v=this.defaults.postVarName,b=this.defaults.sendAllOnUnload,y=null,x=[],_=[],C=[],w=!1,k=!1;this.getSessionId=function(){return y},this.setSessionId=function(e){y=extractStringFromParam(e,null),this.layout.setCustomField("sessionid",y)},this.setLayout=function(e){t("layout")&&(this.layout=e,null!==y&&this.setSessionId(y))},this.isTimed=function(){return u},this.setTimed=function(e){t("timed")&&(u=bool(e))},this.getTimerInterval=function(){return f},this.setTimerInterval=function(e){t("timerInterval")&&(f=extractIntFromParam(e,f))},this.isWaitForResponse=function(){return d},this.setWaitForResponse=function(e){t("waitForResponse")&&(d=bool(e))},this.getBatchSize=function(){return p},this.setBatchSize=function(e){t("batchSize")&&(p=extractIntFromParam(e,p))},this.isSendAllOnUnload=function(){return b},this.setSendAllOnUnload=function(e){t("sendAllOnUnload")&&(b=extractBooleanFromParam(e,b))},this.setRequestSuccessCallback=function(e){g=extractFunctionFromParam(e,g)},this.setFailCallback=function(e){m=extractFunctionFromParam(e,m)},this.getPostVarName=function(){return v},this.setPostVarName=function(e){t("postVarName")&&(v=extractStringFromParam(e,v))},this.getHeaders=function(){return C},this.addHeader=function(e,t){C.push({name:e,value:t})},this.sendAll=i,this.append=function(e){if(h){k||l(),x.push(e);var t=this.getLayout().allowBatching()?p:1;if(x.length>=t){for(var n,r=[];n=x.shift();)r.push(n);_.push(r),u||d&&(!d||w)||i()}}}}function setCookie(e,t,i,n){var r;if(n=n?"; path="+n:"",i){var o=new Date;o.setTime(o.getTime()+1e3*60*60*24*i),r="; expires="+o.toGMTString()}else r="";document.cookie=escape(e)+"="+escape(t)+r+n}function getCookie(e){for(var t=escape(e)+"=",i=document.cookie.split(";"),n=0,r=i.length;r>n;n++){for(var o=i[n];" "===o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(t))return unescape(o.substring(t.length,o.length))}return null}function getBaseUrl(){for(var e=document.getElementsByTagName("script"),t=0,i=e.length;i>t;++t)if(-1!=e[t].src.indexOf("log4javascript")){var n=e[t].src.lastIndexOf("/");return-1==n?"":e[t].src.substr(0,n+1)}return null}function isLoaded(e){try{return bool(e.loaded)}catch(t){return!1}}function padWithSpaces(e,t){if(t>e.length){for(var i=[],n=Math.max(0,t-e.length),r=0;n>r;r++)i[r]=" ";e+=i.join("")}return e}EventSupport.prototype={eventTypes:[],eventListeners:{},setEventTypes:function(e){if(e instanceof Array){this.eventTypes=e,this.eventListeners={};for(var t=0,i=this.eventTypes.length;i>t;t++)this.eventListeners[this.eventTypes[t]]=[]}else handleError("log4javascript.EventSupport ["+this+"]: setEventTypes: eventTypes parameter must be an Array")},addEventListener:function(e,t){"function"==typeof t?(array_contains(this.eventTypes,e)||handleError("log4javascript.EventSupport ["+this+"]: addEventListener: no event called '"+e+"'"),this.eventListeners[e].push(t)):handleError("log4javascript.EventSupport ["+this+"]: addEventListener: listener must be a function")},removeEventListener:function(e,t){"function"==typeof t?(array_contains(this.eventTypes,e)||handleError("log4javascript.EventSupport ["+this+"]: removeEventListener: no event called '"+e+"'"),array_remove(this.eventListeners[e],t)):handleError("log4javascript.EventSupport ["+this+"]: removeEventListener: listener must be a function")},dispatchEvent:function(e,t){if(array_contains(this.eventTypes,e))for(var i=this.eventListeners[e],n=0,r=i.length;r>n;n++)i[n](this,e,t);else handleError("log4javascript.EventSupport ["+this+"]: dispatchEvent: no event called '"+e+"'")}};var applicationStartDate=new Date,uniqueId="log4javascript_"+applicationStartDate.getTime()+"_"+Math.floor(1e8*Math.random()),emptyFunction=function(){},newLine="\r\n",pageLoaded=!1;Log4JavaScript.prototype=new EventSupport,log4javascript=new Log4JavaScript,log4javascript.version="1.4.3",log4javascript.edition="log4javascript";var urlEncode=window.encodeURIComponent!==void 0?function(e){return encodeURIComponent(e)}:function(e){return escape(e).replace(/\+/g,"%2B").replace(/"/g,"%22").replace(/'/g,"%27").replace(/\//g,"%2F").replace(/=/g,"%3D")},urlDecode=window.decodeURIComponent!==void 0?function(e){return decodeURIComponent(e)}:function(e){return unescape(e).replace(/%2B/g,"+").replace(/%22/g,'"').replace(/%27/g,"'").replace(/%2F/g,"/").replace(/%3D/g,"=")};Function.prototype.apply||(Function.prototype.apply=function(obj,args){var methodName="__apply__";obj[methodName]!==void 0&&(methodName+=(Math.random()+"").substr(2)),obj[methodName]=this;for(var argsStrings=[],i=0,len=args.length;len>i;i++)argsStrings[i]="args["+i+"]";var script="obj."+methodName+"("+argsStrings.join(",")+")",returnValue=eval(script);return delete obj[methodName],returnValue}),Function.prototype.call||(Function.prototype.call=function(e){for(var t=[],i=1,n=arguments.length;n>i;i++)t[i-1]=arguments[i];return this.apply(e,t)});var logLog={quietMode:!1,debugMessages:[],setQuietMode:function(e){this.quietMode=bool(e)},numberOfErrors:0,alertAllErrors:!1,setAlertAllErrors:function(e){this.alertAllErrors=e},debug:function(e){this.debugMessages.push(e)},displayDebug:function(){alert(this.debugMessages.join(newLine))},warn:function(){},error:function(e,t){if((1==++this.numberOfErrors||this.alertAllErrors)&&!this.quietMode){var i="log4javascript error: "+e;t&&(i+=newLine+newLine+"Original error: "+getExceptionStringRep(t)),alert(i)}}};log4javascript.logLog=logLog,log4javascript.setEventTypes(["load","error"]),log4javascript.handleError=handleError;var enabled=!("undefined"!=typeof log4javascript_disabled&&log4javascript_disabled);log4javascript.setEnabled=function(e){enabled=bool(e)},log4javascript.isEnabled=function(){return enabled};var useTimeStampsInMilliseconds=!0;log4javascript.setTimeStampsInMilliseconds=function(e){useTimeStampsInMilliseconds=bool(e)},log4javascript.isTimeStampsInMilliseconds=function(){return useTimeStampsInMilliseconds},log4javascript.evalInScope=function(expr){return eval(expr)};var showStackTraces=!1;log4javascript.setShowStackTraces=function(e){showStackTraces=bool(e)};var Level=function(e,t){this.level=e,this.name=t};Level.prototype={toString:function(){return this.name},equals:function(e){return this.level==e.level},isGreaterOrEqual:function(e){return this.level>=e.level}},Level.ALL=new Level(Number.MIN_VALUE,"ALL"),Level.TRACE=new Level(1e4,"TRACE"),Level.DEBUG=new Level(2e4,"DEBUG"),Level.INFO=new Level(3e4,"INFO"),Level.WARN=new Level(4e4,"WARN"),Level.ERROR=new Level(5e4,"ERROR"),Level.FATAL=new Level(6e4,"FATAL"),Level.OFF=new Level(Number.MAX_VALUE,"OFF"),log4javascript.Level=Level,Timer.prototype.getElapsedTime=function(){return(new Date).getTime()-this.start.getTime()};var anonymousLoggerName="[anonymous]",defaultLoggerName="[default]",nullLoggerName="[null]",rootLoggerName="root";Logger.prototype={trace:function(){this.log(Level.TRACE,arguments)},debug:function(){this.log(Level.DEBUG,arguments)},info:function(){this.log(Level.INFO,arguments)},warn:function(){this.log(Level.WARN,arguments)},error:function(){this.log(Level.ERROR,arguments)},fatal:function(){this.log(Level.FATAL,arguments)},isEnabledFor:function(e){return e.isGreaterOrEqual(this.getEffectiveLevel())},isTraceEnabled:function(){return this.isEnabledFor(Level.TRACE)},isDebugEnabled:function(){return this.isEnabledFor(Level.DEBUG)},isInfoEnabled:function(){return this.isEnabledFor(Level.INFO)},isWarnEnabled:function(){return this.isEnabledFor(Level.WARN)},isErrorEnabled:function(){return this.isEnabledFor(Level.ERROR)},isFatalEnabled:function(){return this.isEnabledFor(Level.FATAL)}},Logger.prototype.trace.isEntryPoint=!0,Logger.prototype.debug.isEntryPoint=!0,Logger.prototype.info.isEntryPoint=!0,Logger.prototype.warn.isEntryPoint=!0,Logger.prototype.error.isEntryPoint=!0,Logger.prototype.fatal.isEntryPoint=!0;var loggers={},loggerNames=[],ROOT_LOGGER_DEFAULT_LEVEL=Level.DEBUG,rootLogger=new Logger(rootLoggerName);rootLogger.setLevel(ROOT_LOGGER_DEFAULT_LEVEL),log4javascript.getRootLogger=function(){return rootLogger},log4javascript.getLogger=function(e){if("string"!=typeof e&&(e=anonymousLoggerName,logLog.warn("log4javascript.getLogger: non-string logger name "+toStr(e)+" supplied, returning anonymous logger")),e==rootLoggerName&&handleError("log4javascript.getLogger: root logger may not be obtained by name"),!loggers[e]){var t=new Logger(e);loggers[e]=t,loggerNames.push(e);var i,n=e.lastIndexOf(".");if(n>-1){var r=e.substring(0,n);i=log4javascript.getLogger(r)}else i=rootLogger;i.addChild(t)}return loggers[e]};var defaultLogger=null;log4javascript.getDefaultLogger=function(){if(!defaultLogger){defaultLogger=log4javascript.getLogger(defaultLoggerName);var e=new log4javascript.PopUpAppender;defaultLogger.addAppender(e)}return defaultLogger};var nullLogger=null;log4javascript.getNullLogger=function(){return nullLogger||(nullLogger=new Logger(nullLoggerName),nullLogger.setLevel(Level.OFF)),nullLogger},log4javascript.resetConfiguration=function(){rootLogger.setLevel(ROOT_LOGGER_DEFAULT_LEVEL),loggers={}};var LoggingEvent=function(e,t,i,n,r){this.logger=e,this.timeStamp=t,this.timeStampInMilliseconds=t.getTime(),this.timeStampInSeconds=Math.floor(this.timeStampInMilliseconds/1e3),this.milliseconds=this.timeStamp.getMilliseconds(),this.level=i,this.messages=n,this.exception=r};LoggingEvent.prototype={getThrowableStrRep:function(){return this.exception?getExceptionStringRep(this.exception):""},getCombinedMessages:function(){return 1==this.messages.length?this.messages[0]:this.messages.join(newLine)},toString:function(){return"LoggingEvent["+this.level+"]"}},log4javascript.LoggingEvent=LoggingEvent;var Layout=function(){};Layout.prototype={defaults:{loggerKey:"logger",timeStampKey:"timestamp",millisecondsKey:"milliseconds",levelKey:"level",messageKey:"message",exceptionKey:"exception",urlKey:"url"},loggerKey:"logger",timeStampKey:"timestamp",millisecondsKey:"milliseconds",levelKey:"level",messageKey:"message",exceptionKey:"exception",urlKey:"url",batchHeader:"",batchFooter:"",batchSeparator:"",returnsPostData:!1,overrideTimeStampsSetting:!1,useTimeStampsInMilliseconds:null,format:function(){handleError("Layout.format: layout supplied has no format() method")},ignoresThrowable:function(){handleError("Layout.ignoresThrowable: layout supplied has no ignoresThrowable() method")},getContentType:function(){return"text/plain"},allowBatching:function(){return!0},setTimeStampsInMilliseconds:function(e){this.overrideTimeStampsSetting=!0,this.useTimeStampsInMilliseconds=bool(e)},isTimeStampsInMilliseconds:function(){return this.overrideTimeStampsSetting?this.useTimeStampsInMilliseconds:useTimeStampsInMilliseconds},getTimeStampValue:function(e){return this.isTimeStampsInMilliseconds()?e.timeStampInMilliseconds:e.timeStampInSeconds},getDataValues:function(e,t){var i=[[this.loggerKey,e.logger.name],[this.timeStampKey,this.getTimeStampValue(e)],[this.levelKey,e.level.name],[this.urlKey,window.location.href],[this.messageKey,t?e.getCombinedMessages():e.messages]];if(this.isTimeStampsInMilliseconds()||i.push([this.millisecondsKey,e.milliseconds]),e.exception&&i.push([this.exceptionKey,getExceptionStringRep(e.exception)]),this.hasCustomFields())for(var n=0,r=this.customFields.length;r>n;n++){var o=this.customFields[n].value;"function"==typeof o&&(o=o(this,e)),i.push([this.customFields[n].name,o])}return i},setKeys:function(e,t,i,n,r,o,s){this.loggerKey=extractStringFromParam(e,this.defaults.loggerKey),this.timeStampKey=extractStringFromParam(t,this.defaults.timeStampKey),this.levelKey=extractStringFromParam(i,this.defaults.levelKey),this.messageKey=extractStringFromParam(n,this.defaults.messageKey),this.exceptionKey=extractStringFromParam(r,this.defaults.exceptionKey),this.urlKey=extractStringFromParam(o,this.defaults.urlKey),this.millisecondsKey=extractStringFromParam(s,this.defaults.millisecondsKey)},setCustomField:function(e,t){for(var i=!1,n=0,r=this.customFields.length;r>n;n++)this.customFields[n].name===e&&(this.customFields[n].value=t,i=!0);i||this.customFields.push({name:e,value:t})},hasCustomFields:function(){return this.customFields.length>0},toString:function(){handleError("Layout.toString: all layouts must override this method")}},log4javascript.Layout=Layout;var Appender=function(){};Appender.prototype=new EventSupport,Appender.prototype.layout=new PatternLayout,Appender.prototype.threshold=Level.ALL,Appender.prototype.loggers=[],Appender.prototype.doAppend=function(e){enabled&&e.level.level>=this.threshold.level&&this.append(e)},Appender.prototype.append=function(){},Appender.prototype.setLayout=function(e){e instanceof Layout?this.layout=e:handleError("Appender.setLayout: layout supplied to "+(""+this)+" is not a subclass of Layout")},Appender.prototype.getLayout=function(){return this.layout},Appender.prototype.setThreshold=function(e){e instanceof Level?this.threshold=e:handleError("Appender.setThreshold: threshold supplied to "+(""+this)+" is not a subclass of Level")},Appender.prototype.getThreshold=function(){return this.threshold},Appender.prototype.setAddedToLogger=function(e){this.loggers.push(e)},Appender.prototype.setRemovedFromLogger=function(e){array_remove(this.loggers,e)},Appender.prototype.group=emptyFunction,Appender.prototype.groupEnd=emptyFunction,Appender.prototype.toString=function(){handleError("Appender.toString: all appenders must override this method")},log4javascript.Appender=Appender,SimpleLayout.prototype=new Layout,SimpleLayout.prototype.format=function(e){return e.level.name+" - "+e.getCombinedMessages()},SimpleLayout.prototype.ignoresThrowable=function(){return!0},SimpleLayout.prototype.toString=function(){return"SimpleLayout"},log4javascript.SimpleLayout=SimpleLayout,NullLayout.prototype=new Layout,NullLayout.prototype.format=function(e){return e.messages},NullLayout.prototype.ignoresThrowable=function(){return!0},NullLayout.prototype.toString=function(){return"NullLayout"},log4javascript.NullLayout=NullLayout,XmlLayout.prototype=new Layout,XmlLayout.prototype.isCombinedMessages=function(){return this.combineMessages},XmlLayout.prototype.getContentType=function(){return"text/xml"},XmlLayout.prototype.escapeCdata=function(e){return e.replace(/\]\]>/,"]]>]]>"}var i,n,r=this,o=''+newLine,this.combineMessages)o+=t(e.getCombinedMessages());else{for(o+=""+newLine,i=0,n=e.messages.length;n>i;i++)o+=t(e.messages[i])+newLine;o+=""+newLine}if(this.hasCustomFields())for(i=0,n=this.customFields.length;n>i;i++)o+='"+newLine;return e.exception&&(o+=""+newLine),o+=""+newLine+newLine},XmlLayout.prototype.ignoresThrowable=function(){return!1},XmlLayout.prototype.toString=function(){return"XmlLayout"},log4javascript.XmlLayout=XmlLayout,JsonLayout.prototype=new Layout,JsonLayout.prototype.isReadable=function(){return this.readable},JsonLayout.prototype.isCombinedMessages=function(){return this.combineMessages},JsonLayout.prototype.format=function(e){function t(e,i,n){var o,s=typeof e;if(e instanceof Date)o=e.getTime()+"";else if(n&&e instanceof Array){o="["+r.lineBreak;for(var a=0,l=e.length;l>a;a++){var c=i+r.tab;o+=c+t(e[a],c,!1),e.length-1>a&&(o+=","),o+=r.lineBreak}o+=i+"]"}else o="number"!==s&&"boolean"!==s?'"'+escapeNewLines(toStr(e).replace(/\"/g,'\\"'))+'"':e;return o}var i,n,r=this,o=this.getDataValues(e,this.combineMessages),s="{"+this.lineBreak;for(i=0,n=o.length-1;n>=i;i++)s+=this.tab+'"'+o[i][0]+'"'+this.colon+t(o[i][1],this.tab,!0),n>i&&(s+=","),s+=this.lineBreak;return s+="}"+this.lineBreak},JsonLayout.prototype.ignoresThrowable=function(){return!1},JsonLayout.prototype.toString=function(){return"JsonLayout"},JsonLayout.prototype.getContentType=function(){return"application/json"},log4javascript.JsonLayout=JsonLayout,HttpPostDataLayout.prototype=new Layout,HttpPostDataLayout.prototype.allowBatching=function(){return!1},HttpPostDataLayout.prototype.format=function(e){for(var t=this.getDataValues(e),i=[],n=0,r=t.length;r>n;n++){var o=t[n][1]instanceof Date?t[n][1].getTime()+"":t[n][1];i.push(urlEncode(t[n][0])+"="+urlEncode(o))}return i.join("&")},HttpPostDataLayout.prototype.ignoresThrowable=function(){return!1},HttpPostDataLayout.prototype.toString=function(){return"HttpPostDataLayout"},log4javascript.HttpPostDataLayout=HttpPostDataLayout;var SimpleDateFormat;(function(){var e=/('[^']*')|(G+|y+|M+|w+|W+|D+|d+|F+|E+|a+|H+|k+|K+|h+|m+|s+|S+|Z+)|([a-zA-Z]+)|([^a-zA-Z']+)/,t=["January","February","March","April","May","June","July","August","September","October","November","December"],i=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],n=0,r=1,o=2,s=3,a=4,l=5,c={G:n,y:s,M:a,w:o,W:o,D:o,d:o,F:o,E:r,a:n,H:o,k:o,K:o,h:o,m:o,s:o,S:o,Z:l},h=864e5,u=7*h,d=1,p=function(e,t,i){var n=new Date(e,t,i,0,0,0);return n.setMilliseconds(0),n};Date.prototype.getDifference=function(e){return this.getTime()-e.getTime()},Date.prototype.isBefore=function(e){return this.getTime()r&&o--,o},Date.prototype.getWeekInMonth=function(e){isUndefined(this.minimalDaysInFirstWeek)&&(e=d);var t=this.getPreviousSunday(),i=p(this.getFullYear(),this.getMonth(),1),n=t.isBefore(i)?0:1+Math.floor(t.getTimeSince(i)/u),r=7-i.getDay(),o=n;return r>=e&&o++,o},Date.prototype.getDayInYear=function(){var e=p(this.getFullYear(),0,1);return 1+Math.floor(this.getTimeSince(e)/h)},SimpleDateFormat=function(e){this.formatString=e},SimpleDateFormat.prototype.setMinimalDaysInFirstWeek=function(e){this.minimalDaysInFirstWeek=e},SimpleDateFormat.prototype.getMinimalDaysInFirstWeek=function(){return isUndefined(this.minimalDaysInFirstWeek)?d:this.minimalDaysInFirstWeek};var f=function(e,t){for(;t>e.length;)e="0"+e;return e},g=function(e,t,i){return t>=4?e:e.substr(0,Math.max(i,t))},m=function(e,t){var i=""+e;return f(i,t)};SimpleDateFormat.prototype.format=function(h){for(var u,d="",p=this.formatString;u=e.exec(p);){var v=u[1],b=u[2],y=u[3],x=u[4];if(v)d+="''"==v?"'":v.substring(1,v.length-1);else if(y);else if(x)d+=x;else if(b){var _=b.charAt(0),C=b.length,w="";switch(_){case"G":w="AD";break;case"y":w=h.getFullYear();break;case"M":w=h.getMonth();break;case"w":w=h.getWeekInYear(this.getMinimalDaysInFirstWeek());break;case"W":w=h.getWeekInMonth(this.getMinimalDaysInFirstWeek());break;case"D":w=h.getDayInYear();break;case"d":w=h.getDate();break;case"F":w=1+Math.floor((h.getDate()-1)/7);break;case"E":w=i[h.getDay()];break;case"a":w=h.getHours()>=12?"PM":"AM";break;case"H":w=h.getHours();break;case"k":w=h.getHours()||24;break;case"K":w=h.getHours()%12;break;case"h":w=h.getHours()%12||12;break;case"m":w=h.getMinutes();break;case"s":w=h.getSeconds();break;case"S":w=h.getMilliseconds();break;case"Z":w=h.getTimezoneOffset()}switch(c[_]){case n:d+=g(w,C,2);break;case r:d+=g(w,C,3);break;case o:d+=m(w,C);break;case s:if(3>=C){var k=""+w;d+=k.substr(2,2)}else d+=m(w,C);break;case a:d+=C>=3?g(t[w],C,C):m(w+1,C);break;case l:var T=w>0,E=T?"-":"+",S=Math.abs(w),P=""+Math.floor(S/60);P=f(P,2);var A=""+S%60;A=f(A,2),d+=E+P+A}}p=p.substr(u.index+u[0].length)}return d}})(),log4javascript.SimpleDateFormat=SimpleDateFormat,PatternLayout.TTCC_CONVERSION_PATTERN="%r %p %c - %m%n",PatternLayout.DEFAULT_CONVERSION_PATTERN="%m%n",PatternLayout.ISO8601_DATEFORMAT="yyyy-MM-dd HH:mm:ss,SSS",PatternLayout.DATETIME_DATEFORMAT="dd MMM yyyy HH:mm:ss,SSS",PatternLayout.ABSOLUTETIME_DATEFORMAT="HH:mm:ss,SSS",PatternLayout.prototype=new Layout,PatternLayout.prototype.format=function(e){for(var t,i=/%(-?[0-9]+)?(\.?[0-9]+)?([acdfmMnpr%])(\{([^\}]+)\})?|([^%]+)/,n="",r=this.pattern;t=i.exec(r);){var o=t[0],s=t[1],a=t[2],l=t[3],c=t[5],h=t[6];if(h)n+=""+h;else{var u="";switch(l){case"a":case"m":var d=0;c&&(d=parseInt(c,10),isNaN(d)&&(handleError("PatternLayout.format: invalid specifier '"+c+"' for conversion character '"+l+"' - should be a number"),d=0));for(var p="a"===l?e.messages[0]:e.messages,f=0,g=p.length;g>f;f++)f>0&&" "!==u.charAt(u.length-1)&&(u+=" "),u+=0===d?p[f]:formatObjectExpansion(p[f],d);break;case"c":var m=e.logger.name; if(c){var v=parseInt(c,10),b=e.logger.name.split(".");u=v>=b.length?m:b.slice(b.length-v).join(".")}else u=m;break;case"d":var y=PatternLayout.ISO8601_DATEFORMAT;c&&(y=c,"ISO8601"==y?y=PatternLayout.ISO8601_DATEFORMAT:"ABSOLUTE"==y?y=PatternLayout.ABSOLUTETIME_DATEFORMAT:"DATE"==y&&(y=PatternLayout.DATETIME_DATEFORMAT)),u=new SimpleDateFormat(y).format(e.timeStamp);break;case"f":if(this.hasCustomFields()){var x=0;c&&(x=parseInt(c,10),isNaN(x)?handleError("PatternLayout.format: invalid specifier '"+c+"' for conversion character 'f' - should be a number"):0===x?handleError("PatternLayout.format: invalid specifier '"+c+"' for conversion character 'f' - must be greater than zero"):x>this.customFields.length?handleError("PatternLayout.format: invalid specifier '"+c+"' for conversion character 'f' - there aren't that many custom fields"):x-=1);var _=this.customFields[x].value;"function"==typeof _&&(_=_(this,e)),u=_}break;case"n":u=newLine;break;case"p":u=e.level.name;break;case"r":u=""+e.timeStamp.getDifference(applicationStartDate);break;case"%":u="%";break;default:u=o}var C;if(a){C=parseInt(a.substr(1),10);var w=u.length;w>C&&(u=u.substring(w-C,w))}if(s)if("-"==s.charAt(0))for(C=parseInt(s.substr(1),10);C>u.length;)u+=" ";else for(C=parseInt(s,10);C>u.length;)u=" "+u;n+=u}r=r.substr(t.index+t[0].length)}return n},PatternLayout.prototype.ignoresThrowable=function(){return!0},PatternLayout.prototype.toString=function(){return"PatternLayout"},log4javascript.PatternLayout=PatternLayout,AlertAppender.prototype=new Appender,AlertAppender.prototype.layout=new SimpleLayout,AlertAppender.prototype.append=function(e){var t=this.getLayout().format(e);this.getLayout().ignoresThrowable()&&(t+=e.getThrowableStrRep()),alert(t)},AlertAppender.prototype.toString=function(){return"AlertAppender"},log4javascript.AlertAppender=AlertAppender,BrowserConsoleAppender.prototype=new log4javascript.Appender,BrowserConsoleAppender.prototype.layout=new NullLayout,BrowserConsoleAppender.prototype.threshold=Level.DEBUG,BrowserConsoleAppender.prototype.append=function(e){var t=this,i=function(){var i=t.getLayout(),n=i.format(e);return i.ignoresThrowable()&&e.exception&&(n+=e.getThrowableStrRep()),n};if("undefined"!=typeof opera&&opera.postError)opera.postError(i());else if(window.console&&window.console.log){var n=i();window.console.debug&&Level.DEBUG.isGreaterOrEqual(e.level)?window.console.debug(n):window.console.info&&Level.INFO.equals(e.level)?window.console.info(n):window.console.warn&&Level.WARN.equals(e.level)?window.console.warn(n):window.console.error&&e.level.isGreaterOrEqual(Level.ERROR)?window.console.error(n):window.console.log(n)}},BrowserConsoleAppender.prototype.group=function(e){window.console&&window.console.group&&window.console.group(e)},BrowserConsoleAppender.prototype.groupEnd=function(){window.console&&window.console.groupEnd&&window.console.groupEnd()},BrowserConsoleAppender.prototype.toString=function(){return"BrowserConsoleAppender"},log4javascript.BrowserConsoleAppender=BrowserConsoleAppender;var xmlHttpFactories=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],getXmlHttp=function(e){for(var t,i=null,n=0,r=xmlHttpFactories.length;r>n;n++){t=xmlHttpFactories[n];try{return i=t(),getXmlHttp=t,i}catch(o){}}e?e():handleError("getXmlHttp: unable to obtain XMLHttpRequest object")};AjaxAppender.prototype=new Appender,AjaxAppender.prototype.defaults={waitForResponse:!1,timed:!1,timerInterval:1e3,batchSize:1,sendAllOnUnload:!1,requestSuccessCallback:null,failCallback:null,postVarName:"data"},AjaxAppender.prototype.layout=new HttpPostDataLayout,AjaxAppender.prototype.toString=function(){return"AjaxAppender"},log4javascript.AjaxAppender=AjaxAppender;var ConsoleAppender;if(function(){function e(e,t,i,n,r){this.create(!1,null,e,t,i,n,r,this.defaults.focusPopUp)}function t(e,t,i,n,r,o){this.create(!0,e,t,i,n,r,o,!1)}var i=function(){return['','',"","log4javascript",'',"",'','','','','",'","",'','','','',"Filters:",'trace','debug','info','warn','error','fatal','all',"",'','Search: ','','Regex','Match case','Disable','','','','Filter','Highlight all',"","",'',"Options:",'Log','Wrap','Newest at the top','Scroll to latest','','','',"","","",'','','','','',"","","","",""] },n=[];ConsoleAppender=function(){};var r=1;ConsoleAppender.prototype=new Appender,ConsoleAppender.prototype.create=function(e,t,o,s,a,l,c,h){function u(e,t){this.loggingEvent=e,this.levelName=e.level.name,this.formattedMessage=t}function d(e,t){this.name=e,this.initiallyExpanded=t}function p(){}var f=this,g=!1,m=!1,v=!1,b=!1,y=[],x=!0,_=r++;s=extractBooleanFromParam(s,this.defaults.initiallyMinimized),o=extractBooleanFromParam(o,this.defaults.lazyInit),a=extractBooleanFromParam(a,this.defaults.useDocumentWrite);var C=this.defaults.newestMessageAtTop,w=this.defaults.scrollToLatestMessage;l=l?l:this.defaults.width,c=c?c:this.defaults.height;var k=this.defaults.maxMessages,T=this.defaults.showCommandLine,E=this.defaults.commandLineObjectExpansionDepth,S=this.defaults.showHideButton,P=this.defaults.showCloseButton;this.defaults.showLogEntryDeleteButtons,this.setLayout(this.defaults.layout);var A,O,L,R,I,D=e?"InPageAppender":"PopUpAppender",M=function(e){return m?(handleError(D+": configuration option '"+e+"' may not be set after the appender has been initialized"),!1):!0},G=function(){return v&&x&&!b};this.isNewestMessageAtTop=function(){return C},this.setNewestMessageAtTop=function(e){C=bool(e),G()&&R().setNewestAtTop(C)},this.isScrollToLatestMessage=function(){return w},this.setScrollToLatestMessage=function(e){w=bool(e),G()&&R().setScrollToLatest(w)},this.getWidth=function(){return l},this.setWidth=function(e){M("width")&&(l=extractStringFromParam(e,l))},this.getHeight=function(){return c},this.setHeight=function(e){M("height")&&(c=extractStringFromParam(e,c))},this.getMaxMessages=function(){return k},this.setMaxMessages=function(e){k=extractIntFromParam(e,k),G()&&R().setMaxMessages(k)},this.isShowCommandLine=function(){return T},this.setShowCommandLine=function(e){T=bool(e),G()&&R().setShowCommandLine(T)},this.isShowHideButton=function(){return S},this.setShowHideButton=function(e){S=bool(e),G()&&R().setShowHideButton(S)},this.isShowCloseButton=function(){return P},this.setShowCloseButton=function(e){P=bool(e),G()&&R().setShowCloseButton(P)},this.getCommandLineObjectExpansionDepth=function(){return E},this.setCommandLineObjectExpansionDepth=function(e){E=extractIntFromParam(e,E)};var X=s;this.isInitiallyMinimized=function(){return s},this.setInitiallyMinimized=function(e){M("initiallyMinimized")&&(s=bool(e),X=s)},this.isUseDocumentWrite=function(){return a},this.setUseDocumentWrite=function(e){M("useDocumentWrite")&&(a=bool(e))},u.prototype.append=function(){R().log(this.levelName,this.formattedMessage)},d.prototype.append=function(){R().group(this.name,this.initiallyExpanded)},p.prototype.append=function(){R().groupEnd()};var N=function(){L(),g?b&&tt&&O():A(),L()&&B()};this.append=function(e){if(x){var t=f.getLayout().format(e);this.getLayout().ignoresThrowable()&&(t+=e.getThrowableStrRep()),y.push(new u(e,t)),N()}},this.group=function(e,t){x&&(y.push(new d(e,t)),N())},this.groupEnd=function(){x&&(y.push(new p),N())};var B=function(){for(;y.length>0;)y.shift().append();h&&R().focus()};this.setAddedToLogger=function(e){this.loggers.push(e),enabled&&!o&&A()},this.clear=function(){G()&&R().clearLog(),y.length=0},this.focus=function(){G()&&R().focus()},this.focusCommandLine=function(){G()&&R().focusCommandLine()},this.focusSearch=function(){G()&&R().focusSearch()};var J=window;this.getCommandWindow=function(){return J},this.setCommandWindow=function(e){J=e},this.executeLastCommand=function(){G()&&R().evalLastCommand()};var F=new PatternLayout("%m");this.getCommandLayout=function(){return F},this.setCommandLayout=function(e){F=e},this.evalCommandAndAppend=function(e){var t={appendResult:!0,isError:!1},i="";try{var n,r;!J.eval&&J.execScript&&J.execScript("null");var o={};for(r=0,len=j.length;len>r;r++)o[j[r][0]]=j[r][1];var s=[],a=function(e){s.push([e,J[e]])};a("appender"),J.appender=f,a("commandReturnValue"),J.commandReturnValue=t,a("commandLineFunctionsHash"),J.commandLineFunctionsHash=o;var l=function(e){a(e),J[e]=function(){return this.commandLineFunctionsHash[e](f,arguments,t)}};for(r=0,len=j.length;len>r;r++)l(j[r][0]);for(J===window&&J.execScript?(a("evalExpr"),a("result"),window.evalExpr=e,J.execScript("window.result=eval(window.evalExpr);"),n=window.result):n=J.eval(e),i=isUndefined(n)?n:formatObjectExpansion(n,E),r=0,len=s.length;len>r;r++)J[s[r][0]]=s[r][1]}catch(c){i="Error evaluating command: "+getExceptionStringRep(c),t.isError=!0}if(t.appendResult){var h=">>> "+e;isUndefined(i)||(h+=newLine+i);var u=t.isError?Level.ERROR:Level.INFO,d=new LoggingEvent(null,new Date,u,[h],null),p=this.getLayout();this.setLayout(F),this.append(d),this.setLayout(p)}};var j=n.concat([]);this.addCommandLineFunction=function(e,t){j.push([e,t])};var z="log4javascriptCommandHistory";this.storeCommandHistory=function(e){setCookie(z,e.join(","))};var H=function(e){var t=i();e.open();for(var n=0,r=t.length;r>n;n++)e.writeln(t[n]);e.close()};this.setEventTypes(["load","unload"]);var U=function(){var e=R();e.setAppender(f),e.setNewestAtTop(C),e.setScrollToLatest(w),e.setMaxMessages(k),e.setShowCommandLine(T),e.setShowHideButton(S),e.setShowCloseButton(P),e.setMainWindow(window);var t=getCookie(z);t&&(e.commandHistory=t.split(","),e.currentCommandIndex=e.commandHistory.length),f.dispatchEvent("load",{win:e})};this.unload=function(){logLog.debug("unload "+this+", caller: "+this.unload.caller),b||(logLog.debug("really doing unload "+this),b=!0,v=!1,m=!1,f.dispatchEvent("unload",{}))};var $=function(e,t,i,n){function r(){try{b&&clearInterval(o),e(R())&&(clearInterval(o),i())}catch(t){clearInterval(o),x=!1,handleError(n,t)}}var o=setInterval(r,t)},Y=function(){var e=document.domain!=location.hostname;return a?"":getBaseUrl()+"console.html"+(e?"?log4javascript_domain="+escape(document.domain):"")};if(e){var W=null,V=[];this.addCssProperty=function(e,t){M("cssProperties")&&V.push([e,t])};var K,q=!1,Z=uniqueId+"_InPageAppender_"+_;this.hide=function(){g&&m&&(G()&&R().$("command").blur(),K.style.display="none",X=!0)},this.show=function(){g&&(m?(K.style.display="block",this.setShowCommandLine(T),X=!1):q||O(!0))},this.isVisible=function(){return!X&&!b},this.close=function(e){b||e&&!confirm("This will permanently remove the console from the page. No more messages will be logged. Do you wish to continue?")||(K.parentNode.removeChild(K),this.unload())},I=function(){function e(){try{s||f.show(),U(),v=!0,B()}catch(e){x=!1,handleError(i,e)}}function t(){try{var t=function(e){return isLoaded(e)};a&&H(R().document),t(R())?e():$(t,100,e,i)}catch(n){x=!1,handleError(i,n)}}var i="InPageAppender.open: unable to create console iframe";X=!1,K=W.appendChild(document.createElement("div")),K.style.width=l,K.style.height=c,K.style.border="solid gray 1px";for(var n=0,r=V.length;r>n;n++)K.style[V[n][0]]=V[n][1];var o=a?"":" src='"+Y()+"'";K.innerHTML="",b=!1;var h=function(e){try{return bool(e)&&bool(e.document)}catch(t){return!1}};h(R())?t():$(h,100,t,i),m=!0},O=function(e){if(e||!s){var i=function(){if(t)try{var e=document.getElementById(t);1==e.nodeType&&(W=e),I()}catch(i){handleError("InPageAppender.init: invalid container element '"+t+"' supplied",i)}else W=document.createElement("div"),W.style.position="fixed",W.style.left="0",W.style.right="0",W.style.bottom="0",document.body.appendChild(W),f.addCssProperty("borderWidth","1px 0 0 0"),f.addCssProperty("zIndex",1e6),I()};pageLoaded&&t&&t.appendChild?(W=t,I()):pageLoaded?i():log4javascript.addEventListener("load",i),q=!0}},A=function(){O(),g=!0},R=function(){var e=window.frames[Z];return e?e:void 0},L=function(){return x&&!b?(m&&!v&&R()&&isLoaded(R())&&(v=!0),v):!1}}else{var Q=f.defaults.useOldPopUp,et=f.defaults.complainAboutPopUpBlocking,tt=this.defaults.reopenWhenClosed;this.isUseOldPopUp=function(){return Q},this.setUseOldPopUp=function(e){M("useOldPopUp")&&(Q=bool(e))},this.isComplainAboutPopUpBlocking=function(){return et},this.setComplainAboutPopUpBlocking=function(e){M("complainAboutPopUpBlocking")&&(et=bool(e))},this.isFocusPopUp=function(){return h},this.setFocusPopUp=function(e){h=bool(e)},this.isReopenWhenClosed=function(){return tt},this.setReopenWhenClosed=function(e){tt=bool(e)},this.close=function(){logLog.debug("close "+this);try{it.close(),this.unload()}catch(e){}},this.hide=function(){logLog.debug("hide "+this),G()&&this.close()},this.show=function(){logLog.debug("show "+this),m||I()},this.isVisible=function(){return L()};var it;I=function(){function e(){R().setCloseIfOpenerCloses(!Q||!a),U(),v=!0,B(),$(n,500,r,"PopUpAppender.checkPopUpClosed: error checking pop-up window")}var t="width="+l+",height="+c+",status,resizable",i="PopUp_"+location.host.replace(/[^a-z0-9]/gi,"_")+"_"+_;Q&&a||(i=i+"_"+uniqueId);var n=function(e){if(b)return!0;try{return bool(e)&&e.closed}catch(t){}return!1},r=function(){b||f.unload()};try{if(it=window.open(Y(),i,t),b=!1,m=!0,it&&it.document)if(a&&Q&&isLoaded(it))it.mainPageReloaded(),e();else{a&&H(it.document);var o=function(e){return bool(e)&&isLoaded(e)};isLoaded(it)?e():$(o,100,e,"PopUpAppender.init: unable to create console window")}else x=!1,logLog.warn("PopUpAppender.init: pop-ups blocked, please unblock to use PopUpAppender"),et&&handleError("log4javascript: pop-up windows appear to be blocked. Please unblock them to use pop-up logging.")}catch(s){handleError("PopUpAppender.init: error creating pop-up",s)}},O=function(){s||I()},A=function(){O(),g=!0},R=function(){return it},L=function(){if(x&&!isUndefined(it)&&!b){if(it.closed||v&&isUndefined(it.closed))return f.unload(),logLog.debug("PopUpAppender: pop-up closed"),!1;!v&&isLoaded(it)&&(v=!0)}return x&&v&&!b}}this.getConsoleWindow=R},ConsoleAppender.addGlobalCommandLineFunction=function(e,t){n.push([e,t])},e.prototype=new ConsoleAppender,e.prototype.defaults={layout:new PatternLayout("%d{HH:mm:ss} %-5p - %m{1}%n"),initiallyMinimized:!1,focusPopUp:!1,lazyInit:!0,useOldPopUp:!0,complainAboutPopUpBlocking:!0,newestMessageAtTop:!1,scrollToLatestMessage:!0,width:"600",height:"400",reopenWhenClosed:!1,maxMessages:null,showCommandLine:!0,commandLineObjectExpansionDepth:1,showHideButton:!1,showCloseButton:!0,showLogEntryDeleteButtons:!0,useDocumentWrite:!0},e.prototype.toString=function(){return"PopUpAppender"},log4javascript.PopUpAppender=e,t.prototype=new ConsoleAppender,t.prototype.defaults={layout:new PatternLayout("%d{HH:mm:ss} %-5p - %m{1}%n"),initiallyMinimized:!1,lazyInit:!0,newestMessageAtTop:!1,scrollToLatestMessage:!0,width:"100%",height:"220px",maxMessages:null,showCommandLine:!0,commandLineObjectExpansionDepth:1,showHideButton:!1,showCloseButton:!1,showLogEntryDeleteButtons:!0,useDocumentWrite:!0},t.prototype.toString=function(){return"InPageAppender"},log4javascript.InPageAppender=t,log4javascript.InlineAppender=t}(),function(){function e(e){var t=0;for(var i in e)t=Math.max(toStr(i).length,t);var n=[];for(i in e){var r,o=" "+padWithSpaces(toStr(i),t+2);try{r=splitIntoLines(toStr(e[i])).join(padWithSpaces(newLine,t+6))}catch(s){r="[Error obtaining property. Details: "+getExceptionMessage(s)+"]"}n.push(o+r)}return n.join(newLine)}function t(e,i,n,l,c){function h(e){return e.nodeType==r.TEXT_NODE&&/^[ \t\r\n]*$/.test(e.nodeValue)}function u(e){return(""+e).replace(/&/g,"&").replace(/n;n++){var o=t[n].split(":"),s=[];/^\s*$/.test(o[0])||s.push(trim(o[0]).toLowerCase()+":"+trim(o[1])),i=s.join(";")}return i}function p(e){if(e.prefix)return e.prefix;if(e.outerHTML){var t=RegExp("<([^:]+):"+e.tagName+"[^>]*>","i");if(t.test(e.outerHTML))return RegExp.$1.toLowerCase()}return""}i=i===void 0?!0:!!i,"string"!=typeof n&&(n=""),l=!!l,c=!!c;var f,g="<",m=">";if(!i||e.nodeType==r.DOCUMENT_FRAGMENT_NODE){f="";for(var v=0,b=e.childNodes.length;b>v;v++)f+=t(e.childNodes[v],!0,n+a);return f}switch(e.nodeType){case r.ELEMENT_NODE:var y=e.tagName.toLowerCase();f=l?newLine+n:"",f+=g;var x=p(e),_=!!x;for(_&&(f+=x+":"),f+=y,v=0,b=e.attributes.length;b>v;v++){var C=e.attributes[v];C.specified&&null!==C.nodeValue&&"style"!==C.nodeName.toLowerCase()&&"string"==typeof C.nodeValue&&0!==C.nodeName.indexOf("_moz")&&(f+=" "+C.nodeName.toLowerCase()+'="',f+=u(C.nodeValue),f+='"')}if(e.style.cssText){var w=d(e);""!==w&&(f+=' style="'+d(e)+'"')}if(array_contains(s,y)||_&&!e.hasChildNodes())f+="/"+m;else{f+=m;for(var k=!(1===e.childNodes.length&&e.childNodes[0].nodeType===r.TEXT_NODE),T=array_contains(o,y),v=0,b=e.childNodes.length;b>v;v++)f+=t(e.childNodes[v],!0,n+a,k,T);var E=g+"/"+y+m;f+=k?newLine+n+E:E}return f;case r.TEXT_NODE:if(h(e))f="";else{if(c)f=e.nodeValue;else{for(var S=splitIntoLines(trim(e.nodeValue)),P=[],v=0,b=S.length;b>v;v++)P[v]=trim(S[v]);f=P.join(newLine+n)}l&&(f=newLine+n+f)}return f;case r.CDATA_SECTION_NODE:return""+newLine;case r.DOCUMENT_NODE:f="";for(var v=0,b=e.childNodes.length;b>v;v++)f+=t(e.childNodes[v],!0,n);return f;default:return""}}function i(){ConsoleAppender.addGlobalCommandLineFunction("$",function(e,t){return document.getElementById(t[0])}),ConsoleAppender.addGlobalCommandLineFunction("dir",function(t,i){for(var n=[],r=0,o=i.length;o>r;r++)n[r]=e(i[r]);return n.join(newLine+newLine)}),ConsoleAppender.addGlobalCommandLineFunction("dirxml",function(e,i){for(var n=[],r=0,o=i.length;o>r;r++)e.getCommandWindow(),n[r]=t(i[r]);return n.join(newLine+newLine)}),ConsoleAppender.addGlobalCommandLineFunction("cd",function(e,t,i){var n,r;return 0===t.length||""===t[0]?(n=window,r="Command line set to run in main window"):t[0].window==t[0]?(n=t[0],r="Command line set to run in frame '"+t[0].name+"'"):(n=window.frames[t[0]],n?r="Command line set to run in frame '"+t[0]+"'":(i.isError=!0,r="Frame '"+t[0]+"' does not exist",n=e.getCommandWindow())),e.setCommandWindow(n),r}),ConsoleAppender.addGlobalCommandLineFunction("clear",function(e,t,i){i.appendResult=!1,e.clear()}),ConsoleAppender.addGlobalCommandLineFunction("keys",function(e,t){var i=[];for(var n in t[0])i.push(n);return i}),ConsoleAppender.addGlobalCommandLineFunction("values",function(e,t){var i=[];for(var n in t[0])try{i.push(t[0][n])}catch(r){logLog.warn("values(): Unable to obtain value for key "+n+". Details: "+getExceptionMessage(r))}return i}),ConsoleAppender.addGlobalCommandLineFunction("expansionDepth",function(e,t,i){var n=parseInt(t[0],10);return isNaN(n)||0>n?(i.isError=!0,""+t[0]+" is not a valid expansion depth"):(e.setCommandLineObjectExpansionDepth(n),"Object expansion depth set to "+n)})}function n(){i()}var r={ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12},o=["script","pre"],s=["br","img","hr","param","link","area","input","col","base","meta"],a=" ";n()}(),log4javascript.setDocumentReady=function(){pageLoaded=!0,log4javascript.dispatchEvent("load",{})},window.addEventListener)window.addEventListener("load",log4javascript.setDocumentReady,!1);else if(window.attachEvent)window.attachEvent("onload",log4javascript.setDocumentReady);else{var oldOnload=window.onload;window.onload="function"!=typeof window.onload?log4javascript.setDocumentReady:function(e){oldOnload&&oldOnload(e),log4javascript.setDocumentReady()}}return window.log4javascript=log4javascript,log4javascript}();