//>>built
define("dojox/mvc/Repeat","dojo/_base/declare dojo/_base/lang dojo/_base/sniff dojo/_base/window dojo/dom dojo/dom-construct dojo/_base/array dojo/query dojo/when dijit/registry ./_Container".split(" "),function(t,h,p,q,g,k,x,y,u,l,v){return t("dojox.mvc.Repeat",v,{index:0,useParent:"",removeRepeatNode:!1,children:null,_relTargetProp:"children",startup:function(){this.removeRepeatNode&&h.isFunction(this.getParent)&&this.getParent()&&(this.select=this.getParent().select,this.onCheckStateChanged=this.getParent().onCheckStateChanged);
this.inherited(arguments);this._setChildrenAttr(this.children)},postscript:function(a,b){this.useParent&&g.byId(this.useParent)?this.srcNodeRef=g.byId(this.useParent):this.srcNodeRef=g.byId(b);if(this.srcNodeRef){var e=this._attachTemplateNodes?"inlineTemplateString":"templateString";""==this[e]&&(this[e]=this.srcNodeRef.innerHTML);try{this.srcNodeRef.innerHTML=""}catch(d){for(;this.srcNodeRef.firstChild;)this.srcNodeRef.removeChild(this.srcNodeRef.firstChild)}}this.inherited(arguments)},_setChildrenAttr:function(a){var b=
this.children;this._set("children",a);this.binding!=a&&this.set("ref",a);!this._started||this._builtOnce&&b==a||(this._builtOnce=!0,this._buildContained(a))},_buildContained:function(a){if(a){this.useParent&&g.byId(this.useParent)&&(this.srcNodeRef=g.byId(this.useParent));this._destroyBody();this._updateAddRemoveWatch(a);var b=[],e=this._attachTemplateNodes?"inlineTemplateString":"templateString";for(this.index=0;h.isFunction(a.get)?a.get(this.index):a[this.index];this.index++)b.push(this._exprRepl(this[e]));
a=this.containerNode||this.srcNodeRef||this.domNode;if(p("ie")&&/^(table|tbody)$/i.test(a.tagName))for(e=q.doc.createElement("div"),e.innerHTML="\x3ctable\x3e\x3ctbody\x3e"+b.join("")+"\x3c/tbody\x3e\x3c/table\x3e",b=e.getElementsByTagName("tbody")[0];b.firstChild;)a.appendChild(b.firstChild);else if(p("ie")&&/^td$/i.test(a.tagName))for(e=q.doc.createElement("div"),e.innerHTML="\x3ctable\x3e\x3ctbody\x3e\x3ctr\x3e"+b.join("")+"\x3c/tr\x3e\x3c/tbody\x3e\x3c/table\x3e",b=e.getElementsByTagName("tr")[0];b.firstChild;)a.appendChild(b.firstChild);
else a.innerHTML=b.join("");this.srcNodeRef=a;var d=this;u(this._createBody(),function(){if(d.removeRepeatNode){var c=d.domNode;!d.savedParentId&&d.domNode.parentNode&&d.domNode.parentNode.id&&(d.savedParentId=d.domNode.parentNode.id);var m=g.byId(d.savedParentId);if(c&&c.children){for(var r=l.findWidgets(c),f=r.length;0<f;f--)if("dojox.mvc.Group"==r[f-1].declaredClass)for(var n=c.children[f-1].children.length,w=l.byId(m.id).select;0<n;n--)l.byId(c.children[f-1].id).select=w,k.place(c.children[f-
1].removeChild(c.children[f-1].children[n-1]),m,"first");else k.place(c.removeChild(c.children[f-1]),m,"first");k.destroy(c)}}})}},_updateAddRemoveWatch:function(a){this._addRemoveWatch&&this._addRemoveWatch.unwatch();var b=this;this._addRemoveWatch=h.isFunction(a.watchElements)&&a.watchElements(function(e,d,c){d&&c&&!d.length&&!c.length||b._buildContained(b.children)})}})});