IO.include("frame/Opt.js");IO.include("frame/Chain.js");IO.include("frame/Link.js");IO.include("frame/String.js");IO.include("frame/Hash.js");IO.include("frame/Namespace.js");//IO.include("frame/Reflection.js");/** A few helper functions to make life a little easier. */functiondefined(o){return(o!==undefined);}functioncopy(o){// todo check for circular refsif(o==null||typeof(o)!='object')returno;varc=newo.constructor();for(varpino)c[p]=copy(o[p]);returnc;}functionisUnique(arr){varl=arr.length;for(vari=0;i<l;i++){if(arr.lastIndexOf(arr[i])>i)returnfalse;}returntrue;}/** Returns the given string with all regex meta characters backslashed. */RegExp.escapeMeta=function(str){returnstr.replace(/([$^\\\/()|?+*\[\]{}.-])/g,"\\$1");}