var require=function(a,b){var c=require.resolve(a,b||"/"),d=require.modules[c];if(!d)throw new Error("Failed to resolve module "+a+", tried "+c);var e=d._cached?d._cached:d();return e};require.paths=[],require.modules={},require.extensions=[".js",".coffee"],require._core={assert:!0,events:!0,fs:!0,path:!0,vm:!0},require.resolve=function(){return function(a,b){function g(a){if(require.modules[a])return a;for(var b=0;b=0;e--){if(b[e]==="node_modules")continue;var f=b.slice(0,e+1).join("/")+"/node_modules";d.push(f)}return d}b||(b="/");if(require._core[a])return a;var c=require.modules.path(),d=b||".";if(a.match(/^(?:\.\.?\/|\/)/)){var e=g(c.resolve(d,a))||h(c.resolve(d,a));if(e)return e}var f=i(a,d);if(f)return f;throw new Error("Cannot find module '"+a+"'")}}(),require.alias=function(a,b){var c=require.modules.path(),d=null;try{d=require.resolve(a+"/package.json","/")}catch(e){d=require.resolve(a,"/")}var f=c.dirname(d),g=Object_keys(require.modules);for(var h=0;h=0;d--){var e=a[d];e=="."?a.splice(d,1):e===".."?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c--;c)a.unshift("..");return a}var h=/^(.+\/(?!$)|\/)?((?:.+?)?(\.[^.]*)?)$/;c.resolve=function(){var a="",b=!1;for(var c=arguments.length;c>=-1&&!b;c--){var d=c>=0?arguments[c]:process.cwd();if(typeof d!="string"||!d)continue;a=d+"/"+a,b=d.charAt(0)==="/"}return a=g(f(a.split("/"),function(a){return!!a}),!b).join("/"),(b?"/":"")+a||"."},c.normalize=function(a){var b=a.charAt(0)==="/",c=a.slice(-1)==="/";return a=g(f(a.split("/"),function(a){return!!a}),!b).join("/"),!a&&!b&&(a="."),a&&c&&(a+="/"),(b?"/":"")+a},c.join=function(){var a=Array.prototype.slice.call(arguments,0);return c.normalize(f(a,function(a,b){return a&&typeof a=="string"}).join("/"))},c.dirname=function(a){var b=h.exec(a)[1]||"",c=!1;return b?b.length===1||c&&b.length<=3&&b.charAt(1)===":"?b:b.substring(0,b.length-1):"."},c.basename=function(a,b){var c=h.exec(a)[2]||"";return b&&c.substr(-1*b.length)===b&&(c=c.substr(0,c.length-b.length)),c},c.extname=function(a){return h.exec(a)[3]||""}}),require.define("/lexer.coffee",function(a,b,c,d,e){((function(){var a,b,d,e,f,g,h,i,j,k=Object.prototype.hasOwnProperty,l=Array.prototype.indexOf||function(a){for(var b=0,c=this.length;b":"GT","<":"LT","*":"STAR",".":"DOT",",":"COMMA","(":"LPAREN",")":"RPAREN",";":"TERMINATOR"},i=function(){var a;a=[];for(j in h)a.push(j);return a}(),g=/^'[^\\']*(?:\\.[^\\']*)*'/,f=/^-?\d+/,b=/^[A-Za-z]\w*/,c.Lexer=e=function(){function c(){}return c.prototype.token=function(a,b){return this.tokens.push([a,b,this.line])},c.prototype.error=function(a){throw SyntaxError(function(){switch(a){case"mismatch":return"MISMATCHED PARENS";case"unrecognized":return"UNRECOGNIZED TOKEN "+this.chunk.match(/([^\s]*)\b/)[1]}}.call(this))},c.prototype.tokenize=function(a){var b,c;this.code=a,this.tokens=[],this.stackMatch=[],this.line=0,c=0;while(this.chunk=this.code.slice(c))b=this.whitespace()||this.wordMatch()||this.identifierMatch()||this.literalMatch()||this.charMatch(),b===0&&this.error("unrecognized"),c+=b;return this.tokens.slice(-1)[0][0]!=="TERMINATOR"&&this.tokens.push(["TERMINATOR",";",this.line]),this.tokens},c.prototype.whitespace=function(){var a,b;return(a=this.chunk.match(/^[ \n\r]+/))?(b=a[0].split(/\n/).length-1,this.line+=b,a[0].length):0},c.prototype.wordMatch=function(){var b,c;if(!(b=this.chunk.match(/^\w+/)))return 0;c=b[0].toUpperCase();if(l.call(d,c)>=0)this.token(c,c);else if(l.call(a,c)>=0)this.token("FUNCTION",c);else return 0;return c.length},c.prototype.identifierMatch=function(){var a;return(a=this.chunk.match(b))?(this.token("IDENTIFIER",a[0]),a[0].length):0},c.prototype.literalMatch=function(){var a;return(a=this.chunk.match(g))?(this.token("STRING",a[0].slice(1,-1)),a[0].length):(a=this.chunk.match(f))?(this.token("NUMBER",a[0]),a[0].length):0},c.prototype.charMatch=function(){var a;return a=this.chunk[0],l.call(i,a)>=0?(this.token(h[a],a),1):a==="-"&&this.chunk[1]==="-"?this.code.length:0},c}()})).call(this)}),require.define("/parser.js",function(a,b,c,d,e){var f=function(){undefined;var a={trace:function(){},yy:{},symbols_:{error:2,Root:3,QueryList:4,Query:5,TERMINATOR:6,SelectQuery:7,UpdateQuery:8,DeleteQuery:9,CreateQuery:10,InsertQuery:11,DropQuery:12,Select:13,Where:14,Update:15,Delete:16,CREATE:17,ELEMENT:18,IDENTIFIER:19,LPAREN:20,Attributes:21,RPAREN:22,INSERT:23,INTO:24,Table:25,VALUES:26,Queries:27,DROP:28,COMMA:29,SELECT:30,Fields:31,FROM:32,DOT:33,ALL:34,FunctionCall:35,FUNCTION:36,DELETE:37,Field:38,STAR:39,UPDATE:40,SET:41,Settings:42,Setting:43,EQ:44,Value:45,WHERE:46,WhereClause:47,Logic:48,Expression:49,NOT:50,AttributeCompare:51,ROWNUM:52,RownumCompare:53,AND:54,OR:55,LT:56,GT:57,LIKE:58,IN:59,Values:60,NUMBER:61,BETWEEN:62,Attribute:63,STRING:64,$accept:0,$end:1},terminals_:{2:"error",6:"TERMINATOR",17:"CREATE",18:"ELEMENT",19:"IDENTIFIER",20:"LPAREN",22:"RPAREN",23:"INSERT",24:"INTO",26:"VALUES",28:"DROP",29:"COMMA",30:"SELECT",32:"FROM",33:"DOT",34:"ALL",36:"FUNCTION",37:"DELETE",39:"STAR",40:"UPDATE",41:"SET",44:"EQ",46:"WHERE",50:"NOT",52:"ROWNUM",54:"AND",55:"OR",56:"LT",57:"GT",58:"LIKE",59:"IN",61:"NUMBER",62:"BETWEEN",64:"STRING"},productions_:[0,[3,1],[4,2],[4,3],[5,1],[5,1],[5,1],[5,1],[5,1],[5,1],[7,1],[7,2],[8,1],[8,2],[9,1],[9,2],[10,6],[11,7],[12,3],[27,1],[27,3],[13,4],[13,6],[13,4],[13,6],[35,4],[16,4],[16,6],[31,1],[31,3],[38,1],[38,1],[15,4],[42,1],[42,3],[43,3],[25,1],[25,3],[14,2],[47,3],[47,1],[49,2],[49,2],[49,2],[48,1],[48,1],[51,2],[51,3],[51,2],[51,4],[53,2],[53,2],[53,2],[53,4],[53,4],[60,1],[60,3],[21,0],[21,1],[21,3],[63,2],[45,1],[45,1]],performAction:function(b,c,d,e,f,g,h){var i=g.length-1;switch(f){case 1:return this.$=g[i];case 2:this.$=new e.QueryList(g[i-1]);break;case 3:this.$=g[i-2].add(g[i-1]);break;case 4:this.$=g[i];break;case 5:this.$=g[i];break;case 6:this.$=g[i];break;case 7:this.$=g[i];break;case 8:this.$=g[i];break;case 9:this.$=g[i];break;case 10:this.$=g[i];break;case 11:this.$=function(){return g[i-1].where=g[i],g[i-1]}();break;case 12:this.$=g[i];break;case 13:this.$=function(){return g[i-1].where=g[i],g[i-1]}();break;case 14:this.$=g[i];break;case 15:this.$=function(){return g[i-1].where=g[i],g[i-1]}();break;case 16:this.$=new e.Create(g[i-3],g[i-1]);break;case 17:this.$=new e.Insert(g[i-4],g[i-1]);break;case 18:this.$=new e.Drop(g[i]);break;case 19:this.$=[g[i]];break;case 20:this.$=function(){return g[i-2].push(g[i]),g[i-2]}();break;case 21:this.$=new e.Select(g[i-2],g[i],!1);break;case 22:this.$=new e.Select(g[i-4],g[i-2],!0);break;case 23:this.$=new e.Select(g[i-2],g[i],!1);break;case 24:this.$=new e.Select(g[i-4],g[i-2],!0);break;case 25:this.$=new e.Function(g[i-3],g[i-1]);break;case 26:this.$=new e.Delete(g[i-2],g[i],!1);break;case 27:this.$=new e.Delete(g[i-4],g[i-2],!0);break;case 28:this.$=[g[i]];break;case 29:this.$=g[i-2].concat(g[i]);break;case 30:this.$=g[i];break;case 31:this.$=g[i];break;case 32:this.$=new e.Update(g[i-2],g[i]);break;case 33:this.$=[g[i]];break;case 34:this.$=function(){return g[i-2].push(g[i]),g[i-2]}();break;case 35:this.$=[g[i-2],g[i]];break;case 36:this.$=g[i];break;case 37:this.$=g[i-1];break;case 38:this.$=new e.Where(g[i]);break;case 39:this.$=g[i-2]+g[i-1]+g[i];break;case 40:this.$=g[i];break;case 41:this.$=":not("+g[i]+")";break;case 42:this.$=(new e.AttrOper(g[i-1],g[i])).compile();break;case 43:this.$=(new e.NumOper(g[i])).compile();break;case 44:this.$="";break;case 45:this.$=",";break;case 46:this.$=[g[i-1],g[i]];break;case 47:this.$=[g[i-2]+g[i-1],g[i]];break;case 48:this.$=[g[i-1],g[i]];break;case 49:this.$=[g[i-3],g[i-1]];break;case 50:this.$=[g[i-1],g[i]];break;case 51:this.$=[g[i-1],g[i]];break;case 52:this.$=[g[i-1],g[i]];break;case 53:this.$=[g[i-3],g[i-1]];break;case 54:this.$=[g[i-3],g[i-2],g[i]];break;case 55:this.$=[g[i]];break;case 56:this.$=g[i-2].concat(g[i]);break;case 57:this.$=[];break;case 58:this.$=[g[i]];break;case 59:this.$=function(){return g[i-2].push(g[i]),g[i-2]}();break;case 60:this.$=[g[i-1],g[i]];break;case 61:this.$=g[i];break;case 62:this.$=g[i]}},table:[{3:1,4:2,5:3,7:4,8:5,9:6,10:7,11:8,12:9,13:10,15:11,16:12,17:[1,13],23:[1,14],28:[1,15],30:[1,16],37:[1,18],40:[1,17]},{1:[3]},{1:[2,1],5:19,7:4,8:5,9:6,10:7,11:8,12:9,13:10,15:11,16:12,17:[1,13],23:[1,14],28:[1,15],30:[1,16],37:[1,18],40:[1,17]},{6:[1,20]},{6:[2,4],22:[2,4],29:[2,4]},{6:[2,5],22:[2,5],29:[2,5]},{6:[2,6],22:[2,6],29:[2,6]},{6:[2,7],22:[2,7],29:[2,7]},{6:[2,8],22:[2,8],29:[2,8]},{6:[2,9],22:[2,9],29:[2,9]},{6:[2,10],14:21,22:[2,10],29:[2,10],46:[1,22]},{6:[2,12],14:23,22:[2,12],29:[2,12],46:[1,22]},{6:[2,14],14:24,22:[2,14],29:[2,14],46:[1,22]},{18:[1,25]},{24:[1,26]},{18:[1,27]},{19:[1,32],31:28,35:29,36:[1,31],38:30,39:[1,33]},{19:[1,35],20:[1,36],25:34},{19:[1,32],31:37,38:30,39:[1,33]},{6:[1,38]},{1:[2,2],17:[2,2],23:[2,2],28:[2,2],30:[2,2],37:[2,2],40:[2,2]},{6:[2,11],22:[2,11],29:[2,11]},{19:[1,42],47:39,49:40,50:[1,41],52:[1,43]},{6:[2,13],22:[2,13],29:[2,13]},{6:[2,15],22:[2,15],29:[2,15]},{19:[1,44]},{19:[1,35],20:[1,36],25:45},{19:[1,35],20:[1,36],25:46},{29:[1,48],32:[1,47]},{32:[1,49]},{22:[2,28],29:[2,28],32:[2,28]},{20:[1,50]},{22:[2,30],29:[2,30],32:[2,30]},{22:[2,31],29:[2,31],32:[2,31]},{41:[1,51]},{6:[2,36],22:[2,36],26:[2,36],29:[2,36],33:[2,36],41:[2,36],46:[2,36]},{5:52,7:4,8:5,9:6,10:7,11:8,12:9,13:10,15:11,16:12,17:[1,13],23:[1,14],28:[1,15],30:[1,16],37:[1,18],40:[1,17]},{29:[1,48],32:[1,53]},{1:[2,3],17:[2,3],23:[2,3],28:[2,3],30:[2,3],37:[2,3],40:[2,3]},{6:[2,38],22:[2,38],29:[2,38],48:54,54:[1,55],55:[1,56]},{6:[2,40],22:[2,40],29:[2,40],54:[2,40],55:[2,40]},{19:[1,42],49:57,50:[1,41],52:[1,43]},{44:[1,59],51:58,56:[1,60],58:[1,61],59:[1,62]},{44:[1,64],53:63,56:[1,65],57:[1,66],59:[1,67],62:[1,68]},{20:[1,69]},{26:[1,70]},{6:[2,18],22:[2,18],29:[2,18]},{19:[1,35],20:[1,36],25:71},{19:[1,32],38:72,39:[1,33]},{19:[1,35],20:[1,36],25:73},{19:[1,32],31:74,38:30,39:[1,33]},{19:[1,77],42:75,43:76},{22:[1,78]},{19:[1,35],20:[1,36],25:79},{19:[1,42],49:80,50:[1,41],52:[1,43]},{19:[2,44],50:[2,44],52:[2,44]},{19:[2,45],50:[2,45],52:[2,45]},{6:[2,41],22:[2,41],29:[2,41],54:[2,41],55:[2,41]},{6:[2,42],22:[2,42],29:[2,42],54:[2,42],55:[2,42]},{45:81,61:[1,83],64:[1,82]},{57:[1,84]},{45:85,61:[1,83],64:[1,82]},{20:[1,86]},{6:[2,43],22:[2,43],29:[2,43],54:[2,43],55:[2,43]},{61:[1,87]},{61:[1,88]},{61:[1,89]},{20:[1,90]},{61:[1,91]},{19:[1,94],21:92,22:[2,57],29:[2,57],63:93},{20:[1,95]},{6:[2,21],22:[2,21],29:[2,21],33:[1,96],46:[2,21]},{22:[2,29],29:[2,29],32:[2,29]},{6:[2,23],22:[2,23],29:[2,23],33:[1,97],46:[2,23]},{22:[1,98],29:[1,48]},{6:[2,32],22:[2,32],29:[1,99],46:[2,32]},{6:[2,33],22:[2,33],29:[2,33],46:[2,33]},{44:[1,100]},{6:[2,37],22:[2,37],26:[2,37],29:[2,37],33:[2,37],41:[2,37],46:[2,37]},{6:[2,26],22:[2,26],29:[2,26],33:[1,101],46:[2,26]},{6:[2,39],22:[2,39],29:[2,39],54:[2,39],55:[2,39]},{6:[2,46],22:[2,46],29:[2,46],54:[2,46],55:[2,46]},{6:[2,61],22:[2,61],29:[2,61],46:[2,61],54:[2,61],55:[2,61]},{6:[2,62],22:[2,62],29:[2,62],46:[2,62],54:[2,62],55:[2,62]},{45:102,61:[1,83],64:[1,82]},{6:[2,48],22:[2,48],29:[2,48],54:[2,48],55:[2,48]},{45:104,60:103,61:[1,83],64:[1,82]},{6:[2,50],22:[2,50],29:[2,50],54:[2,50],55:[2,50]},{6:[2,51],22:[2,51],29:[2,51],54:[2,51],55:[2,51]},{6:[2,52],22:[2,52],29:[2,52],54:[2,52],55:[2,52]},{45:104,60:105,61:[1,83],64:[1,82]},{54:[1,106]},{22:[1,107],29:[1,108]},{22:[2,58],29:[2,58]},{45:109,61:[1,83],64:[1,82]},{5:111,7:4,8:5,9:6,10:7,11:8,12:9,13:10,15:11,16:12,17:[1,13],23:[1,14],27:110,28:[1,15],30:[1,16],37:[1,18],40:[1,17]},{34:[1,112]},{34:[1,113]},{32:[2,25]},{19:[1,77],43:114},{45:115,61:[1,83],64:[1,82]},{34:[1,116]},{6:[2,47],22:[2,47],29:[2,47],54:[2,47],55:[2,47]},{22:[1,117],29:[1,118]},{22:[2,55],29:[2,55]},{22:[1,119],29:[1,118]},{61:[1,120]},{6:[2,16],22:[2,16],29:[2,16]},{19:[1,94],63:121},{22:[2,60],29:[2,60]},{22:[1,122],29:[1,123]},{22:[2,19],29:[2,19]},{6:[2,22],22:[2,22],29:[2,22],46:[2,22]},{6:[2,24],22:[2,24],29:[2,24],46:[2,24]},{6:[2,34],22:[2,34],29:[2,34],46:[2,34]},{6:[2,35],22:[2,35],29:[2,35],46:[2,35]},{6:[2,27],22:[2,27],29:[2,27],46:[2,27]},{6:[2,49],22:[2,49],29:[2,49],54:[2,49],55:[2,49]},{45:124,61:[1,83],64:[1,82]},{6:[2,53],22:[2,53],29:[2,53],54:[2,53],55:[2,53]},{6:[2,54],22:[2,54],29:[2,54],54:[2,54],55:[2,54]},{22:[2,59],29:[2,59]},{6:[2,17],22:[2,17],29:[2,17]},{5:125,7:4,8:5,9:6,10:7,11:8,12:9,13:10,15:11,16:12,17:[1,13],23:[1,14],28:[1,15],30:[1,16],37:[1,18],40:[1,17]},{22:[2,56],29:[2,56]},{22:[2,20],29:[2,20]}],defaultActions:{98:[2,25]},parseError:function(b,c){throw new Error(b)},parse:function(b){function o(a){d.length=d.length-2*a,e.length=e.length-a,f.length=f.length-a}function p(){var a;return a=c.lexer.lex()||1,typeof a!="number"&&(a=c.symbols_[a]||a),a}var c=this,d=[0],e=[null],f=[],g=this.table,h="",i=0,j=0,k=0,l=2,m=1;this.lexer.setInput(b),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,typeof this.lexer.yylloc=="undefined"&&(this.lexer.yylloc={});var n=this.lexer.yylloc;f.push(n),typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);var q,r,s,t,u,v,w={},x,y,z,A;for(;;){s=d[d.length-1],this.defaultActions[s]?t=this.defaultActions[s]:(q==null&&(q=p()),t=g[s]&&g[s][q]);if(typeof t=="undefined"||!t.length||!t[0]){if(!k){A=[];for(x in g[s])this.terminals_[x]&&x>2&&A.push("'"+this.terminals_[x]+"'");var B="";this.lexer.showPosition?B="Parse error on line "+(i+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+A.join(", ")+", got '"+this.terminals_[q]+"'":B="Parse error on line "+(i+1)+": Unexpected "+(q==1?"end of input":"'"+(this.terminals_[q]||q)+"'"),this.parseError(B,{text:this.lexer.match,token:this.terminals_[q]||q,line:this.lexer.yylineno,loc:n,expected:A})}if(k==3){if(q==m)throw new Error(B||"Parsing halted.");j=this.lexer.yyleng,h=this.lexer.yytext,i=this.lexer.yylineno,n=this.lexer.yylloc,q=p()}for(;;){if(l.toString()in g[s])break;if(s==0)throw new Error(B||"Parsing halted.");o(1),s=d[d.length-1]}r=q,q=l,s=d[d.length-1],t=g[s]&&g[s][l],k=3}if(t[0]instanceof Array&&t.length>1)throw new Error("Parse Error: multiple actions possible at state: "+s+", token: "+q);switch(t[0]){case 1:d.push(q),e.push(this.lexer.yytext),f.push(this.lexer.yylloc),d.push(t[1]),q=null,r?(q=r,r=null):(j=this.lexer.yyleng,h=this.lexer.yytext,i=this.lexer.yylineno,n=this.lexer.yylloc,k>0&&k--);break;case 2:y=this.productions_[t[1]][1],w.$=e[e.length-y],w._$={first_line:f[f.length-(y||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(y||1)].first_column,last_column:f[f.length-1].last_column},v=this.performAction.call(w,h,j,i,this.yy,t[1],e,f);if(typeof v!="undefined")return v;y&&(d=d.slice(0,-1*y*2),e=e.slice(0,-1*y),f=f.slice(0,-1*y)),d.push(this.productions_[t[1]][0]),e.push(w.$),f.push(w._$),z=g[d[d.length-2]][d[d.length-1]],d.push(z);break;case 3:return!0}}return!0}};return a}();typeof a!="undefined"&&typeof c!="undefined"&&(c.parser=f,c.parse=function(){return f.parse.apply(f,arguments)},c.main=function(d){if(!d[1])throw new Error("Usage: "+d[0]+" FILE");if(typeof process!="undefined")var e=a("fs").readFileSync(a("path").join(process.cwd(),d[1]),"utf8");else var f=a("file").path(a("file").cwd()),e=f.join(d[1]).read({charset:"utf-8"});return c.parser.parse(e)},typeof b!="undefined"&&a.main===b&&c.main(typeof process!="undefined"?process.argv.slice(1):a("system").args))}),require.define("fs",function(a,b,c,d,e){}),require.define("/lib/sizzle.js",function(a,b,c,d,e){(function(){function u(a,c,d,e,f,g){for(var h=0,i=e.length;h0){l=j;break}}j=j[a]}e[h]=l}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,b="sizcache"+(Math.random()+"").replace(".",""),d=0,e=Object.prototype.toString,f=!1,g=!0,h=/\\/g,i=/\r\n/g,j=/\W/;[0,0].sort(function(){return g=!1,0});var k=function(b,c,d,f){d=d||[],c=c||document;var g=c;if(c.nodeType!==1&&c.nodeType!==9)return[];if(!b||typeof b!="string")return d;var h,i,j,l,o,p,r,s,t=!0,u=k.isXML(c),v=[],x=b;do{a.exec(""),h=a.exec(x);if(h){x=h[3],v.push(h[1]);if(h[2]){l=h[3];break}}}while(h);if(v.length>1&&n.exec(b))if(v.length===2&&m.relative[v[0]])i=w(v[0]+v[1],c,f);else{i=m.relative[v[0]]?[c]:k(v.shift(),c);while(v.length)b=v.shift(),m.relative[b]&&(b+=v.shift()),i=w(b,i,f)}else{!f&&v.length>1&&c.nodeType===9&&!u&&m.match.ID.test(v[0])&&!m.match.ID.test(v[v.length-1])&&(o=k.find(v.shift(),c,u),c=o.expr?k.filter(o.expr,o.set)[0]:o.set[0]);if(c){o=f?{expr:v.pop(),set:q(f)}:k.find(v.pop(),v.length!==1||v[0]!=="~"&&v[0]!=="+"||!c.parentNode?c:c.parentNode,u),i=o.expr?k.filter(o.expr,o.set):o.set,v.length>0?j=q(i):t=!1;while(v.length)p=v.pop(),r=p,m.relative[p]?r=v.pop():p="",r==null&&(r=c),m.relative[p](j,r,u)}else j=v=[]}j||(j=i),j||k.error(p||b);if(e.call(j)==="[object Array]")if(!t)d.push.apply(d,j);else if(c&&c.nodeType===1)for(s=0;j[s]!=null;s++)j[s]&&(j[s]===!0||j[s].nodeType===1&&k.contains(c,j[s]))&&d.push(i[s]);else for(s=0;j[s]!=null;s++)j[s]&&j[s].nodeType===1&&d.push(i[s]);else q(j,d);return l&&(k(l,g,d,f),k.uniqueSort(d)),d};k.uniqueSort=function(a){if(s){f=g,a.sort(s);if(f)for(var b=1;b0},k.find=function(a,b,c){var d,e,f,g,i,j;if(!a)return[];for(e=0,f=m.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(i):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(h,"")},TAG:function(a,b){return a[1].replace(h,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||k.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&k.error(a[0]);return a[0]=d++,a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(h,"");return!f&&m.attrMap[g]&&(a[1]=m.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(h,""),a[2]==="~="&&(a[4]=" "+a[4]+" "),a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=k(b[3],null,null,c);else{var g=k.filter(b[3],c,d,!0^f);return d||e.push.apply(e,g),!1}else if(m.match.POS.test(b[0])||m.match.CHILD.test(b[0]))return!0;return b},POS:function(a){return a.unshift(!0),a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!k(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=m.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||l([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=k.attr?k.attr(a,c):m.attrHandle[c]?m.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&k.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=m.setFilters[e];if(f)return f(a,c,b,d)}}},n=m.match.POS,o=function(a,b){return"\\"+(b-0+1)};for(var p in m.match)m.match[p]=new RegExp(m.match[p].source+/(?![^\[]*\])(?![^\(]*\))/.source),m.leftMatch[p]=new RegExp(/(^(?:.|\r|\n)*?)/.source+m.match[p].source.replace(/\\(\d+)/g,o));var q=function(a,b){return a=Array.prototype.slice.call(a,0),b?(b.push.apply(b,a),b):a};try{Array.prototype.slice.call(document.documentElement.childNodes,0)[0].nodeType}catch(r){q=function(a,b){var c=0,d=b||[];if(e.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var f=a.length;c",c.insertBefore(a,c.firstChild),document.getElementById(b)&&(m.find.ID=function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d?d.id===a[1]||typeof d.getAttributeNode!="undefined"&&d.getAttributeNode("id").nodeValue===a[1]?[d]:undefined:[]}},m.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),c.removeChild(a),c=a=null}(),function(){var a=document.createElement("div");a.appendChild(document.createComment("")),a.getElementsByTagName("*").length>0&&(m.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(m.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),document.querySelectorAll&&function(){var a=k,b=document.createElement("div"),c="__sizzle__";b.innerHTML="

";if(b.querySelectorAll&&b.querySelectorAll(".TEST").length===0)return;k=function(b,d,e,f){d=d||document;if(!f&&!k.isXML(d)){var g=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(g&&(d.nodeType===1||d.nodeType===9)){if(g[1])return q(d.getElementsByTagName(b),e);if(g[2]&&m.find.CLASS&&d.getElementsByClassName)return q(d.getElementsByClassName(g[2]),e)}if(d.nodeType===9){if(b==="body"&&d.body)return q([d.body],e);if(g&&g[3]){var h=d.getElementById(g[3]);if(!h||!h.parentNode)return q([],e);if(h.id===g[3])return q([h],e)}try{return q(d.querySelectorAll(b),e)}catch(i){}}else if(d.nodeType===1&&d.nodeName.toLowerCase()!=="object"){var j=d,l=d.getAttribute("id"),n=l||c,o=d.parentNode,p=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):d.setAttribute("id",n),p&&o&&(d=d.parentNode);try{if(!p||o)return q(d.querySelectorAll("[id='"+n+"'] "+b),e)}catch(r){}finally{l||j.removeAttribute("id")}}}return a(b,d,e,f)};for(var d in a)k[d]=a[d];b=null}(),function(){var a=document.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var c=!b.call(document.createElement("div"),"div"),d=!1;try{b.call(document.documentElement,"[test!='']:sizzle")}catch(e){d=!0}k.matchesSelector=function(a,e){e=e.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(d||!m.match.PSEUDO.test(e)&&!/!=/.test(e)){var f=b.call(a,e);if(f||!c||a.document&&a.document.nodeType!==11)return f}}catch(g){}return k(e,null,null,[a]).length>0}}}(),function(){var a=document.createElement("div");a.innerHTML="
";if(!a.getElementsByClassName||a.getElementsByClassName("e").length===0)return;a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;m.order.splice(1,0,"CLASS"),m.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}(),document.documentElement.contains?k.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:document.documentElement.compareDocumentPosition?k.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:k.contains=function(){return!1},k.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var w=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=m.match.PSEUDO.exec(a))f+=d[0],a=a.replace(m.match.PSEUDO,"");a=m.relative[a]?a+"*":a;for(var h=0,i=g.length;h",d=[];for(f=0,h=e.length;f":return"["+this.op1+"!="+this.op2+"]";case"LIKE":return"["+this.op1+"*="+this.op2+"]";case"IN":return function(){var b,c,d,e;d=this.op2,e=[];for(b=0,c=d.length;b":return":gt("+this.op1+")";case"<":return":lt("+this.op1+")";case"=":return":eq("+this.op1+")";case"BETWEEN":return":lt("+this.op2+"):gt("+this.op1+")";case"IN":return function(){var b,c,d,e;d=this.op1,e=[];for(b=0,c=d.length;b=d)return a;switch(a){case"%s":return String(b[c++]);case"%d":return Number(b[c++]);case"%j":return JSON.stringify(b[c++]);case"%%":return"%";default:return a}})},b=function(){var a,b,c;return b=arguments[0],a=2<=arguments.length?i.call(arguments,1):[],b=e(b,a),c=g.tokenize(b),h.parse(c).eval()},b.tmpls={},b.addTmpl=function(a,c){return b.tmpls[a]=c},b.tmpl=function(){var a,c,d;c=arguments[0],a=2<=arguments.length?i.call(arguments,1):[],d=b.tmpls[c];if(d!=null)return b.apply(null,[d].concat(i.call(a)));throw new Error("Template not found.")},b.ready=function(){var a,b,c,d,e,f,g,h,i,j,k,l;return g=[],d=!1,b=document,l=b.documentElement,h=l.doScroll,c="DOMContentLoaded",a="addEventListener",j="onreadystatechange",i=/^loade|c/.test(b.readyState),e=function(a){var b;i=1,b=[];while(a=g.shift())b.push(a());return b},b[a]&&b[a](c,f=function(){return b.removeEventListener(c,f,d),e()},d),h&&b.attachEvent(j,f=function(){if(/^c/.test(b.readyState))return b.detachEvent(j,f),e()}),(k=h)?function(a){return self!==top?i?a():g.push(a):function(){try{l.doScroll("left")}catch(b){return setTimeout(function(){return k(a)},50)}return a()}()}:function(a){return i?a():g.push(a)}}(),b.ready(function(){var a,c,e,f,g,h,i,j,k;i=d('script[type="text/domql-tmpl"]');for(e=0,g=i.length;e