//>>built
define("dojox/calendar/RendererManager","dojo/_base/declare dojo/_base/array dojo/_base/html dojo/_base/lang dojo/dom-class dojo/dom-style dojo/Stateful dojo/Evented".split(" "),function(f,m,g,n,p,h,k,l,q){return f("dojox.calendar.RendererManager",[k,l],{owner:null,rendererPool:null,rendererList:null,itemToRenderer:null,constructor:function(a){this.rendererPool=[];this.rendererList=[];this.itemToRenderer={}},destroy:function(){for(;0<this.rendererList.length;)this.destroyRenderer(this.rendererList.pop());
for(var a in this._rendererPool){var b=this._rendererPool[a];if(b)for(;0<b.length;)this.destroyRenderer(b.pop())}},recycleItemRenderers:function(a){for(;0<this.rendererList.length;){var b=this.rendererList.pop();this.recycleRenderer(b,a)}this.itemToRenderer={}},getRenderers:function(a){if(null==a||null==a.id)return null;a=this.itemToRenderer[a.id];return null==a?null:a.concat()},createRenderer:function(a,b,e,c){if(null!=a&&null!=b&&null!=e){var d=c=null;d=this.rendererPool[b];null!=d&&(c=d.shift());
null==c?(d=new e,c={renderer:d,container:d.domNode,kind:b},this.emit("rendererCreated",{renderer:c,source:this.owner,item:a})):(d=c.renderer,this.emit("rendererReused",{renderer:d,source:this.owner,item:a}));d.owner=this.owner;d.set("rendererKind",b);d.set("item",a);b=this.itemToRenderer[a.id];null==b&&(this.itemToRenderer[a.id]=b=[]);b.push(c);this.rendererList.push(c);return c}return null},recycleRenderer:function(a,b){this.emit("rendererRecycled",{renderer:a,source:this.owner});var e=this.rendererPool[a.kind];
null==e?this.rendererPool[a.kind]=[a]:e.push(a);b&&a.container.parentNode.removeChild(a.container);h.set(a.container,"display","none");a.renderer.owner=null;a.renderer.set("item",null)},destroyRenderer:function(a){this.emit("rendererDestroyed",{renderer:a,source:this.owner});var b=a.renderer;b.destroy&&b.destroy();g.destroy(a.container)},destroyRenderersByKind:function(a){for(var b=[],e=0;e<this.rendererList.length;e++){var c=this.rendererList[e];c.kind==a?this.destroyRenderer(c):b.push(c)}this.rendererList=
b;if(a=this.rendererPool[a])for(;0<a.length;)this.destroyRenderer(a.pop())}})});