//>>built
define("dojox/widget/Standby","dojo/_base/kernel dojo/_base/declare dojo/_base/array dojo/_base/event dojo/_base/sniff dojo/dom dojo/dom-attr dojo/dom-construct dojo/dom-geometry dojo/dom-style dojo/window dojo/_base/window dojo/_base/fx dojo/fx dijit/_Widget dijit/_TemplatedMixin dijit/registry".split(" "),function(D,E,F,G,m,A,p,t,q,f,H,g,u,B,I,J,C){D.experimental("dojox.widget.Standby");return E("dojox.widget.Standby",[I,J],{image:require.toUrl("dojox/widget/Standby/images/loading.gif").toString(),
imageText:"Please Wait...",text:"Please wait...",centerIndicator:"image",target:"",color:"#C0C0C0",duration:500,zIndex:"auto",opacity:.75,templateString:'\x3cdiv\x3e\x3cdiv style\x3d"display: none; opacity: 0; z-index: 9999; position: absolute; cursor:wait;" dojoAttachPoint\x3d"_underlayNode"\x3e\x3c/div\x3e\x3cimg src\x3d"${image}" style\x3d"opacity: 0; display: none; z-index: -10000; position: absolute; top: 0px; left: 0px; cursor:wait;" dojoAttachPoint\x3d"_imageNode"\x3e\x3cdiv style\x3d"opacity: 0; display: none; z-index: -10000; position: absolute; top: 0px;" dojoAttachPoint\x3d"_textNode"\x3e\x3c/div\x3e\x3c/div\x3e',
_underlayNode:null,_imageNode:null,_textNode:null,_centerNode:null,_displayed:!1,_resizeCheck:null,_started:!1,_parent:null,startup:function(a){if(!this._started){if("string"===typeof this.target){var d=C.byId(this.target);this.target=d?d.domNode:A.byId(this.target)}this.text&&(this._textNode.innerHTML=this.text);"image"===this.centerIndicator?(this._centerNode=this._imageNode,p.set(this._imageNode,"src",this.image),p.set(this._imageNode,"alt",this.imageText)):this._centerNode=this._textNode;f.set(this._underlayNode,
{display:"none",backgroundColor:this.color});f.set(this._centerNode,"display","none");this.connect(this._underlayNode,"onclick","_ignore");this.domNode.parentNode&&this.domNode.parentNode!=g.body()&&g.body().appendChild(this.domNode);7==m("ie")&&(this._ieFixNode=t.create("div"),f.set(this._ieFixNode,{opacity:"0",zIndex:"-1000",position:"absolute",top:"-1000px"}),g.body().appendChild(this._ieFixNode));this.inherited(arguments)}},show:function(){this._displayed||(this._anim&&(this._anim.stop(),delete this._anim),
this._displayed=!0,this._size(),this._disableOverflow(),this._fadeIn())},hide:function(){if(this._displayed)try{this._anim&&(this._anim.stop(),delete this._anim),this._size()}catch(a){}finally{this._fadeOut(),this._displayed=!1,null!==this._resizeCheck&&(clearInterval(this._resizeCheck),this._resizeCheck=null)}},isVisible:function(){return this._displayed},onShow:function(){},onHide:function(){},uninitialize:function(){this._displayed=!1;this._resizeCheck&&clearInterval(this._resizeCheck);f.set(this._centerNode,
"display","none");f.set(this._underlayNode,"display","none");7==m("ie")&&this._ieFixNode&&(g.body().removeChild(this._ieFixNode),delete this._ieFixNode);this._anim&&(this._anim.stop(),delete this._anim);this._centerNode=this._textNode=this._imageNode=this.target=null;this.inherited(arguments)},_size:function(){if(this._displayed){var a=p.get(g.body(),"dir");a&&(a=a.toLowerCase());var d=this._scrollerWidths(),c=this.target,e=f.get(this._centerNode,"display");f.set(this._centerNode,"display","block");
var b=q.position(c,!0);if(c===g.body()||c===g.doc)b=H.getBox(),b.x=b.l,b.y=b.t;var v=q.getMarginBox(this._centerNode);f.set(this._centerNode,"display",e);if(this._ieFixNode){var h=-this._ieFixNode.offsetTop/1E3;b.x=Math.floor((b.x+.9)/h);b.y=Math.floor((b.y+.9)/h);b.w=Math.floor((b.w+.9)/h);b.h=Math.floor((b.h+.9)/h)}var k=f.get(c,"zIndex"),n=e=k;if("auto"===this.zIndex)if("auto"!=k)e=parseInt(e,10),n=parseInt(n,10);else{var l=c;if(l&&l!==g.body()&&l!==g.doc)for(l=c.parentNode,h=-1E5;l&&l!==g.body();)(k=
f.get(l,"zIndex"))&&"auto"!==k&&(k=parseInt(k,10),h<k&&(h=k,e=k+1,n=k+1)),l=l.parentNode}else e=parseInt(this.zIndex,10),n=parseInt(this.zIndex,10);f.set(this._centerNode,"zIndex",n);f.set(this._underlayNode,"zIndex",e);if((e=c.parentNode)&&e!==g.body()&&c!==g.body()&&c!==g.doc){l=b.h;n=b.w;c=q.position(e,!0);this._ieFixNode&&(h=-this._ieFixNode.offsetTop/1E3,c.x=Math.floor((c.x+.9)/h),c.y=Math.floor((c.y+.9)/h),c.w=Math.floor((c.w+.9)/h),c.h=Math.floor((c.h+.9)/h));c.w-=e.scrollHeight>e.clientHeight&&
0<e.clientHeight?d.v:0;c.h-=e.scrollWidth>e.clientWidth&&0<e.clientWidth?d.h:0;"rtl"===a&&(m("opera")?(b.x+=e.scrollHeight>e.clientHeight&&0<e.clientHeight?d.v:0,c.x+=e.scrollHeight>e.clientHeight&&0<e.clientHeight?d.v:0):m("ie")?c.x+=e.scrollHeight>e.clientHeight&&0<e.clientHeight?d.v:0:m("webkit"));c.w<b.w&&(b.w-=c.w);c.h<b.h&&(b.h-=c.h);var w=c.y,x=c.y+c.h,r=b.y,y=b.y+l;a=c.x;h=c.x+c.w;k=b.x;var z=b.x+n;if(y>w&&r<w)b.y=c.y,l-=w-r,b.h=l<c.h?l:b.h-2*(e.scrollWidth>e.clientWidth&&0<e.clientWidth?
d.h:0);else if(r<x&&y>x)b.h=x-r;else if(y<=w||r>=x)b.h=0;if(z>a&&k<a)b.x=c.x,n-=a-k,b.w=n<c.w?n:b.w-2*(e.scrollHeight>e.clientHeight&&0<e.clientHeight?d.w:0);else if(k<h&&z>h)b.w=h-k;else if(z<=a||k>=h)b.w=0}0<b.h&&0<b.w?(f.set(this._underlayNode,{display:"block",width:b.w+"px",height:b.h+"px",top:b.y+"px",left:b.x+"px"}),d=["borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],this._cloneStyles(d),m("ie")||(d="MozBorderRadius MozBorderRadiusTopleft MozBorderRadiusTopright MozBorderRadiusBottomleft MozBorderRadiusBottomright WebkitBorderRadius WebkitBorderTopLeftRadius WebkitBorderTopRightRadius WebkitBorderBottomLeftRadius WebkitBorderBottomRightRadius".split(" "),
this._cloneStyles(d,this)),d=b.h/2-v.h/2,e=b.w/2-v.w/2,b.h>=v.h&&b.w>=v.w?f.set(this._centerNode,{top:d+b.y+"px",left:e+b.x+"px",display:"block"}):f.set(this._centerNode,"display","none")):(f.set(this._underlayNode,"display","none"),f.set(this._centerNode,"display","none"));if(null===this._resizeCheck){var K=this;this._resizeCheck=setInterval(function(){K._size()},100)}}},_cloneStyles:function(a){F.forEach(a,function(d){f.set(this._underlayNode,d,f.get(this.target,d))},this)},_fadeIn:function(){var a=
this,d=u.animateProperty({duration:a.duration,node:a._underlayNode,properties:{opacity:{start:0,end:a.opacity}}}),c=u.animateProperty({duration:a.duration,node:a._centerNode,properties:{opacity:{start:0,end:1}},onEnd:function(){a.onShow();delete a._anim}});this._anim=B.combine([d,c]);this._anim.play()},_fadeOut:function(){var a=this,d=u.animateProperty({duration:a.duration,node:a._underlayNode,properties:{opacity:{start:a.opacity,end:0}},onEnd:function(){f.set(this.node,{display:"none",zIndex:"-1000"})}}),
c=u.animateProperty({duration:a.duration,node:a._centerNode,properties:{opacity:{start:1,end:0}},onEnd:function(){f.set(this.node,{display:"none",zIndex:"-1000"});a.onHide();a._enableOverflow();delete a._anim}});this._anim=B.combine([d,c]);this._anim.play()},_ignore:function(a){a&&G.stop(a)},_scrollerWidths:function(){var a=t.create("div");f.set(a,{position:"absolute",opacity:0,overflow:"hidden",width:"50px",height:"50px",zIndex:"-100",top:"-200px",padding:"0px",margin:"0px"});var d=t.create("div");
f.set(d,{width:"200px",height:"10px"});a.appendChild(d);g.body().appendChild(a);d=q.getContentBox(a);f.set(a,"overflow","scroll");var c=q.getContentBox(a);g.body().removeChild(a);return{v:d.w-c.w,h:d.h-c.h}},_setTextAttr:function(a){this.text=this._textNode.innerHTML=a},_setColorAttr:function(a){f.set(this._underlayNode,"backgroundColor",a);this.color=a},_setImageTextAttr:function(a){p.set(this._imageNode,"alt",a);this.imageText=a},_setImageAttr:function(a){p.set(this._imageNode,"src",a);this.image=
a},_setCenterIndicatorAttr:function(a){this.centerIndicator=a;"image"===a?(this._centerNode=this._imageNode,f.set(this._textNode,"display","none")):(this._centerNode=this._textNode,f.set(this._imageNode,"display","none"))},_setTargetAttr:function(a){if("string"===typeof a){var d=C.byId(a);this._set("target",d?d.domNode:A.byId(a))}else this._set("target",a)},_disableOverflow:function(){if(this.target===g.body()||this.target===g.doc){this._overflowDisabled=!0;var a=g.body();this._oldOverflow=a.style&&
a.style.overflow?f.get(a,"overflow"):"";if(m("ie")&&!m("quirks")){if(a.parentNode&&a.parentNode.style&&a.parentNode.style.overflow)this._oldBodyParentOverflow=a.parentNode.style.overflow;else try{this._oldBodyParentOverflow=f.get(a.parentNode,"overflow")}catch(d){this._oldBodyParentOverflow="scroll"}f.set(a.parentNode,"overflow","hidden")}f.set(a,"overflow","hidden")}},_enableOverflow:function(){if(this._overflowDisabled){delete this._overflowDisabled;var a=g.body();m("ie")&&!m("quirks")&&(a.parentNode.style.overflow=
this._oldBodyParentOverflow,delete this._oldBodyParentOverflow);f.set(a,"overflow",this._oldOverflow);if(m("webkit")){var d=t.create("div",{style:{height:"2px"}});a.appendChild(d);setTimeout(function(){a.removeChild(d)},0)}delete this._oldOverflow}}})});