//>>built
define("dojox/mvc/StatefulSeries",["dojo/_base/array","dojo/_base/declare","dojo/_base/lang","dojox/mvc/at"],function(m,n,d,q){return n("dojox.mvc.StatefulSeries",null,{constructor:function(b){function g(){c.series&&(c.series.chart.updateSeries(c.series.name,c),c.series.chart.delayedRender())}var c=this;this._handles=[];this.data=m.map(b,function(e,p){if("dojox.mvc.at"==(e||{}).atsignature){var a=e.target,f=e.targetProp;if(d.isString(a))throw Error("Literal-based dojox/mvc/at is not supported in dojox/mvc/StatefulSeries.");
if(f&&d.isFunction(a.set)&&d.isFunction(a.watch)){var h=e.converter,k=(h||{}).format&&d.hitch({target:a,source:this},h.format);this._handles.push(a.watch(f,function(r,t,l){c.data[p]=k?k(l):l;g()}))}return f?d.isFunction(a.get)?a.get(f):a[f]:a}return e},this);g()},destroy:function(){for(var b=null;b=this._handles.pop();)b.unwatch()},setSeriesObject:function(b){this.series=b}})});