//>>built
define("dojo/NodeList-traverse",["./query","./_base/lang","./_base/array"],function(f,g,i){var h=f.NodeList;g.extend(h,{_buildArrayFromCallback:function(b){for(var a=[],c=0;c<this.length;c++){var d=b.call(this[c],this[c],a);d&&(a=a.concat(d))}return a},_getUniqueAsNodeList:function(b){for(var a=[],c=0,d;d=b[c];c++)1==d.nodeType&&-1==i.indexOf(a,d)&&a.push(d);return this._wrap(a,null,this._NodeListCtor)},_getUniqueNodeListWithParent:function(b,a){var c=this._getUniqueAsNodeList(b),c=a?f._filterResult(c,
a):c;return c._stash(this)},_getRelatedUniqueNodes:function(b,a){return this._getUniqueNodeListWithParent(this._buildArrayFromCallback(a),b)},children:function(b){return this._getRelatedUniqueNodes(b,function(a){return g._toArray(a.childNodes)})},closest:function(b,a){return this._getRelatedUniqueNodes(null,function(c){do if(f._filterResult([c],b,a).length)return c;while(c!=a&&(c=c.parentNode)&&1==c.nodeType);return null})},parent:function(b){return this._getRelatedUniqueNodes(b,function(a){return a.parentNode})},
parents:function(b){return this._getRelatedUniqueNodes(b,function(a){for(var c=[];a.parentNode;)a=a.parentNode,c.push(a);return c})},siblings:function(b){return this._getRelatedUniqueNodes(b,function(a){for(var c=[],b=a.parentNode&&a.parentNode.childNodes,e=0;e<b.length;e++)b[e]!=a&&c.push(b[e]);return c})},next:function(b){return this._getRelatedUniqueNodes(b,function(a){for(a=a.nextSibling;a&&1!=a.nodeType;)a=a.nextSibling;return a})},nextAll:function(b){return this._getRelatedUniqueNodes(b,function(a){for(var b=
[];a=a.nextSibling;)1==a.nodeType&&b.push(a);return b})},prev:function(b){return this._getRelatedUniqueNodes(b,function(a){for(a=a.previousSibling;a&&1!=a.nodeType;)a=a.previousSibling;return a})},prevAll:function(b){return this._getRelatedUniqueNodes(b,function(a){for(var b=[];a=a.previousSibling;)1==a.nodeType&&b.push(a);return b})},andSelf:function(){return this.concat(this._parent)},first:function(){return this._wrap(this[0]&&[this[0]]||[],this)},last:function(){return this._wrap(this.length?
[this[this.length-1]]:[],this)},even:function(){return this.filter(function(b,a){return 0!=a%2})},odd:function(){return this.filter(function(b,a){return 0==a%2})}});return h});