//>>built
define("dojox/widget/Rotator","dojo/aspect,dojo/_base/declare,dojo/_base/Deferred,dojo/_base/lang,dojo/_base/array,dojo/_base/fx,dojo/dom,dojo/dom-attr,dojo/dom-construct,dojo/dom-geometry,dojo/dom-style,dojo/topic,dojo/on,dojo/parser,dojo/query,dojo/fx/easing,dojo/NodeList-dom".split(","),function(t,n,u,g,i,v,w,j,r,p,h,q,z,x,s){n=n("dojox.widget.Rotator",null,{transition:"dojox.widget.rotator.swap",transitionParams:"duration:500",panes:null,constructor:function(c,a){g.mixin(this,c);var b=this,d=
b.transition,k=b._transitions={},y=b._idMap={},f=b.transitionParams=eval("({ "+b.transitionParams+" })"),a=b._domNode=w.byId(a);b._domNodeContentBox=p.getContentBox(a);var e={left:0,top:0},l=function(){};b.id=a.id||(new Date).getTime();"static"==h.get(a,"position")&&h.set(a,"position","relative");k[d]=g.getObject(d);if(!k[d])k[b.transition="dojox.widget.rotator.swap"]=g.getObject("dojox.widget.rotator.swap");if(!f.duration)f.duration=500;i.forEach(b.panes,function(b){r.create("div",b,a)});var m=b.panes=
[];s(">",a).forEach(function(a,c){var d={node:a,idx:c,params:g.mixin({},f,eval("({ "+(j.get(a,"transitionParams")||"")+" })"))},o=d.trans=j.get(a,"transition")||b.transition;i.forEach(["id","title","duration","waitForEvent"],function(b){d[b]=j.get(a,b)});d.id&&(y[d.id]=c);if(!k[o]&&!(k[o]=g.getObject(o)))l(o,d.trans=b.transition);e.position="absolute";e.display="none";if(null==b.idx||j.get(a,"selected"))null!=b.idx&&h.set(m[b.idx].node,"display","none"),b.idx=c,e.display="";h.set(a,e);s("> script[type^='dojo/method']",
a).orphan().forEach(function(a){var b=j.get(a,"event");b&&(d[b]=x._functionFromScript(a))});m.push(d)});b._controlSub=q.subscribe(b.id+"/rotator/control",g.hitch(b,this.control))},destroy:function(){i.forEach([this._controlSub,this.wfe],function(c){c.remove()});r.destroy(this._domNode)},next:function(){return this.go(this.idx+1)},prev:function(){return this.go(this.idx-1)},go:function(c){var a=this,b=a.idx,d=a.panes,k=d.length,j=a._idMap[c];a._resetWaitForEvent();c=null!=j?j:c||0;c=c<k?0>c?k-1:c:
0;if(c==b||a.anim)return null;var f=d[b],e=d[c];h.set(f.node,"zIndex",2);h.set(e.node,"zIndex",1);var l={current:f,next:e,rotator:a};if(b=a.anim=a._transitions[e.trans](g.mixin({rotatorBox:a._domNodeContentBox},l,e.params))){var m=new u,i=e.waitForEvent,n=t.after(b,"onEnd",function(){h.set(f.node,{display:"none",left:0,opacity:1,top:0,zIndex:0});n.remove();a.anim=null;a.idx=c;if(f.onAfterOut)f.onAfterOut(l);if(e.onAfterIn)e.onAfterIn(l);a.onUpdate("onAfterTransition");i||(a._resetWaitForEvent(),m.callback())},
!0);a.wfe=i?q.subscribe(i,function(){a._resetWaitForEvent();m.callback(!0)}):null;a.onUpdate("onBeforeTransition");if(f.onBeforeOut)f.onBeforeOut(l);if(e.onBeforeIn)e.onBeforeIn(l);b.play();return m}},onUpdate:function(c,a){q.publish(this.id+"/rotator/update",c,this,a||{})},_resetWaitForEvent:function(){this.wfe&&(this.wfe.remove(),delete this.wfe)},control:function(c){var a=g._toArray(arguments),b=this;a.shift();b._resetWaitForEvent();b[c]&&((a=b[c].apply(b,a))&&a.addCallback(function(){b.onUpdate(c)}),
b.onManualChange(c))},resize:function(c,a){var b=this._domNodeContentBox={w:c,h:a};p.setContentSize(this._domNode,b);i.forEach(this.panes,function(a){p.setContentSize(a.node,b)})},onManualChange:function(){}});g.setObject("dojox.widget.rotator.swap",function(c){return new v.Animation({play:function(){h.set(c.current.node,"display","none");h.set(c.next.node,"display","");this._fire("onEnd")}})});return n});