/*
	Copyright (c) 2004-2016, The JS 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/NodeList-dom","./_base/kernel ./query ./_base/array ./_base/lang ./dom-class ./dom-construct ./dom-geometry ./dom-attr ./dom-style".split(" "),function(k,f,z,l,q,m,r,t,A){function u(a){return function(b,d,c){return 2==arguments.length?a["string"==typeof d?"get":"set"](b,d):a.set(b,d,c)}}var v=function(a){return 1==a.length&&"string"==typeof a[0]},B=function(a){var b=a.parentNode;b&&b.removeChild(a)},g=f.NodeList,w=g._adaptWithCondition,h=g._adaptAsForEach,x=g._adaptAsMap;l.extend(g,{_normalize:function(a,
b){var d=!0===a.parse;if("string"==typeof a.template){var c=a.templateFunc||k.string&&k.string.substitute;a=c?c(a.template,a):a}c=typeof a;"string"==c||"number"==c?(a=m.toDom(a,b&&b.ownerDocument),a=11==a.nodeType?l._toArray(a.childNodes):[a]):l.isArrayLike(a)?l.isArray(a)||(a=l._toArray(a)):a=[a];d&&(a._runParse=!0);return a},_cloneNode:function(a){return a.cloneNode(!0)},_place:function(a,b,d,c){if(1==b.nodeType||"only"!=d)for(var e,y=a.length,n=y-1;0<=n;n--){var p=c?this._cloneNode(a[n]):a[n];
if(a._runParse&&k.parser&&k.parser.parse)for(e||(e=b.ownerDocument.createElement("div")),e.appendChild(p),k.parser.parse(e),p=e.firstChild;e.firstChild;)e.removeChild(e.firstChild);n==y-1?m.place(p,b,d):b.parentNode.insertBefore(p,b);b=p}},position:x(r.position),attr:w(u(t),v),style:w(u(A),v),addClass:h(q.add),removeClass:h(q.remove),toggleClass:h(q.toggle),replaceClass:h(q.replace),empty:h(m.empty),removeAttr:h(t.remove),marginBox:x(r.getMarginBox),place:function(a,b){var d=f(a)[0];return this.forEach(function(c){m.place(c,
d,b)})},orphan:function(a){return(a?f._filterResult(this,a):this).forEach(B)},adopt:function(a,b){return f(a).place(this[0],b)._stash(this)},query:function(a){if(!a)return this;var b=new g;this.map(function(d){f(a,d).forEach(function(c){void 0!==c&&b.push(c)})});return b._stash(this)},filter:function(a){var b=arguments,d=this,c=0;if("string"==typeof a){d=f._filterResult(this,b[0]);if(1==b.length)return d._stash(this);c=1}return this._wrap(z.filter(d,b[c],b[c+1]),this)},addContent:function(a,b){a=
this._normalize(a,this[0]);for(var d=0,c;c=this[d];d++)a.length?this._place(a,c,b,0<d):m.empty(c);return this}});return g});