Function.prototype.method=function(A,B){this.prototype[A]=B;return this};function isAlien(A){return isObject(A)&&typeof A.constructor!="function"}function isArray(A){return isObject(A)&&A.constructor==Array}function isBoolean(A){return typeof A=="boolean"}function isEmpty(C){var B,A;if(isObject(C)){for(B in C){A=C[B];if(isUndefined(A)&&isFunction(A)){return false}}}return true}function isFunction(A){return typeof A=="function"}function isNull(A){return typeof A=="object"&&!A}function isNumber(A){return typeof A=="number"&&isFinite(A)}function isObject(A){return(A&&typeof A=="object")||isFunction(A)}function isString(A){return typeof A=="string"}function isUndefined(A){return typeof A=="undefined"}String.method("entityify",function(){return this.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}).method("quote",function(){var D,B,A=this.length,C='"';for(B=0;B<A;B+=1){D=this.charAt(B);if(D>=" "){if(D=="\\"||D=='"'){C+="\\"}C+=D}else{switch(D){case"\b":C+="\\b";break;case"\f":C+="\\f";break;case"\n":C+="\\n";break;case"\r":C+="\\r";break;case"\t":C+="\\t";break;default:D=D.charCodeAt();C+="\\u00"+Math.floor(D/16).toString(16)+(D%16).toString(16)}}}return C+'"'}).method("supplant",function(E){var C,B,D=this,A;for(;;){C=D.lastIndexOf("{");if(C<0){break}B=D.indexOf("}",C);if(C+1>=B){break}A=E[D.substring(C+1,B)];if(!isString(A)&&!isNumber(A)){break}D=D.substring(0,C)+A+D.substring(B+1)}return D}).method("trim",function(){return this.replace(/^\s*(\S*(\s+\S+)*)\s*$/,"$1")});