/* Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved. Available via Academic Free License >= 2.1 OR the modified BSD license. see: http://dojotoolkit.org/license for details */ //>>built define("dojo/query",["./_base/kernel","./has","./dom","./on","./_base/array","./_base/lang","./selector/_loader","./selector/_loader!default"],function(_1,_2,_3,on,_4,_5,_6,_7){ "use strict"; _2.add("array-extensible",function(){ return _5.delegate([],{length:1}).length==1&&!_2("bug-for-in-skips-shadowed"); }); var ap=Array.prototype,_8=ap.slice,_9=ap.concat,_a=_4.forEach; var _b=function(a,_c,_d){ var _e=new (_d||this._NodeListCtor||nl)(a); return _c?_e._stash(_c):_e; }; var _f=function(f,a,o){ a=[0].concat(_8.call(a,0)); o=o||_1.global; return function(_10){ a[0]=_10; return f.apply(o,a); }; }; var _11=function(f,o){ return function(){ this.forEach(_f(f,arguments,o)); return this; }; }; var _12=function(f,o){ return function(){ return this.map(_f(f,arguments,o)); }; }; var _13=function(f,o){ return function(){ return this.filter(_f(f,arguments,o)); }; }; var _14=function(f,g,o){ return function(){ var a=arguments,_15=_f(f,a,o); if(g.call(o||_1.global,a)){ return this.map(_15); } this.forEach(_15); return this; }; }; var _16=function(_17){ var _18=this instanceof nl&&_2("array-extensible"); if(typeof _17=="number"){ _17=Array(_17); } var _19=(_17&&"length" in _17)?_17:arguments; if(_18||!_19.sort){ var _1a=_18?this:[],l=_1a.length=_19.length; for(var i=0;i0; }; _31.filter=_2f.filter||function(_38,_39,_3a){ return _31(_39,_3a).filter(function(_3b){ return _4.indexOf(_38,_3b)>-1; }); }; if(typeof _2f!="function"){ var _3c=_2f.search; _2f=function(_3d,_3e){ return _3c(_3e||document,_3d); }; } return _31; }; var _2a=_2e(_7,_16); _1.query=_2e(_7,function(_3f){ return _16(_3f); }); _2a.load=function(id,_40,_41,_42){ _6.load(id,_40,function(_43){ _41(_2e(_43,_16)); }); }; _1._filterQueryResult=_2a._filterResult=function(_44,_45,_46){ return new _16(_2a.filter(_44,_45,_46)); }; _1.NodeList=_2a.NodeList=_16; return _2a; });