//>>built
define("dojox/image/Badge","dojo,dijit,dojox/main,dijit/_Widget,dijit/_TemplatedMixin,dojo/fx/easing".split(","),function(c,l,h,j,k){c.experimental("dojox.image.Badge");c.getObject("image",!0,h);c.declare("dojox.image.Badge",[j,k],{baseClass:"dojoxBadge",templateString:'<div class="dojoxBadge" dojoAttachPoint="containerNode"></div>',children:"div.dojoxBadgeImage",rows:4,cols:5,cellSize:50,cellMargin:1,delay:2E3,threads:1,easing:"dojo.fx.easing.backOut",startup:function(){if(!this._started){if(c.isString(this.easing))this.easing=
c.getObject(this.easing);this.inherited(arguments);this._init()}},_init:function(){var a=0,b=this.cellSize;c.style(this.domNode,{width:b*this.cols+"px",height:b*this.rows+"px"});this._nl=c.query(this.children,this.containerNode).forEach(function(d,f){var g=f%this.cols,e=2*this.cellMargin;c.style(d,{top:a*b+"px",left:g*b+"px",width:b-e+"px",height:b-e+"px"});g==this.cols-1&&a++;c.addClass(d,this.baseClass+"Image")},this);for(var d=this._nl.length;this.threads--;){var e=Math.floor(Math.random()*d);
setTimeout(c.hitch(this,"_enbiggen",{target:this._nl[e]}),this.delay*this.threads)}},_getCell:function(a){a=this._nl.indexOf(a);if(0<=a)return{x:a%this.cols,y:Math.floor(a/this.cols),n:this._nl[a],io:a}},_getImage:function(){return"url('')"},_enbiggen:function(a){if(a=this._getCell(a.target||a)){var b=this.cellMargin,d=2*this.cellSize-2*b,d={height:d,width:d};if(a.x==this.cols-1||0<a.x&&Math.round(Math.random()))d.left=this.cellSize*(a.x-b);if(a.y==this.rows-1||0<a.y&&Math.round(Math.random()))d.top=
this.cellSize*(a.y-b);b=this.baseClass;c.addClass(a.n,b+"Top");c.addClass(a.n,b+"Seen");c.animateProperty({node:a.n,properties:d,onEnd:c.hitch(this,"_loadUnder",a,d),easing:this.easing}).play()}},_loadUnder:function(a,b){var d=a.io,e=0<=b.left,h=0<=b.top,f=this.cols,g=d+(e?-1:1),d=d+(h?-f:f),i=this.baseClass;c.forEach([g,d,h?e?g-f:d+1:e?d-1:g+f],function(a){(a=this._nl[a])&&c.hasClass(a,i+"Seen")&&c.removeClass(a,i+"Seen")},this);setTimeout(c.hitch(this,"_disenbiggen",a,b),1.25*this.delay)},_disenbiggen:function(a,
b){0<=b.top&&(b.top+=this.cellSize);0<=b.left&&(b.left+=this.cellSize);var d=this.cellSize-2*this.cellMargin;c.animateProperty({node:a.n,properties:c.mixin(b,{width:d,height:d}),onEnd:c.hitch(this,"_cycle",a,b)}).play(5)},_cycle:function(a){var b=this.baseClass;c.removeClass(a.n,b+"Top");a=this._nl.filter(function(a){return!c.hasClass(a,b+"Seen")});a=a[Math.floor(Math.random()*a.length)];setTimeout(c.hitch(this,"_enbiggen",{target:a}),this.delay/2)}});return h.image.Badge});