define("dojo/store/util/SimpleQueryEngine",["../../_base/array"],function(_1){returnfunction(_2,_3){switch(typeof_2){default:thrownewError("Can not query with a "+typeof_2);case"object":case"undefined":var_4=_2;_2=function(_5){for(var_6in_4){var_7=_4[_6];if(_7&&_7.test){if(!_7.test(_5[_6],_5)){returnfalse;}}else{if(_7!=_5[_6]){returnfalse;}}}returntrue;};break;case"string":if(!this[_2]){thrownewError("No filter function "+_2+" was found in store");}_2=this[_2];case"function":}function_8(_9){var_a=_1.filter(_9,_2);var_b=_3&&_3.sort;if(_b){_a.sort(typeof_b=="function"?_b:function(a,b){for(var_c,i=0;_c=_b[i];i++){var_d=a[_c.attribute];var_e=b[_c.attribute];if(_d!=_e){return!!_c.descending==(_d==null||_d>_e)?-1:1;}}return0;});}if(_3&&(_3.start||_3.count)){var_f=_a.length;_a=_a.slice(_3.start||0,(_3.start||0)+(_3.count||Infinity));_a.total=_f;}return_a;};_8.matches=_2;return_8;};});