//>>built
define("dojox/grid/enhanced/plugins/filter/FilterBuilder",["dojo/_base/declare","dojo/_base/array","dojo/_base/lang","./_FilterExpr"],function(k,l,f,b){var c=function(a){return f.partial(function(d,e){return new b[d](e)},a)},g=function(a){return f.partial(function(d,e){return new b.LogicNOT(new b[d](e))},a)};return k("dojox.grid.enhanced.plugins.filter.FilterBuilder",null,{buildExpression:function(a){if("op"in a)return this.supportedOps[a.op.toLowerCase()](l.map(a.data,this.buildExpression,this));
var d=f.mixin(this.defaultArgs[a.datatype],a.args||{});return new this.supportedTypes[a.datatype](a.data,a.isColumn,d)},supportedOps:{equalto:c("EqualTo"),lessthan:c("LessThan"),lessthanorequalto:c("LessThanOrEqualTo"),largerthan:c("LargerThan"),largerthanorequalto:c("LargerThanOrEqualTo"),contains:c("Contains"),startswith:c("StartsWith"),endswith:c("EndsWith"),notequalto:g("EqualTo"),notcontains:g("Contains"),notstartswith:g("StartsWith"),notendswith:g("EndsWith"),isempty:c("IsEmpty"),range:function(a){return new b.LogicALL(new b.LargerThanOrEqualTo(a.slice(0,
2)),new b.LessThanOrEqualTo(a[0],a[2]))},logicany:c("LogicANY"),logicall:c("LogicALL")},supportedTypes:{number:b.NumberExpr,string:b.StringExpr,"boolean":b.BooleanExpr,date:b.DateExpr,time:b.TimeExpr},defaultArgs:{"boolean":{falseValue:"false",convert:function(a,d){var e=d.falseValue,h=d.trueValue;if(f.isString(a)){if(h&&a.toLowerCase()==h)return!0;if(e&&a.toLowerCase()==e)return!1}return!!a}}}})});