function ca(a){this.Init(a)}m("AdfResizeTrackManager",ca);r.v(ca);ca.prototype.Init=function(a){ca.h.Init.call(this);this.Ln=[];this.xb=a;this.Y4a=2;this.loa=0;this.hna=this.vX=this.foa=this.$t=this.kg=this.t6=this.iN=this.cG=null};r.a("AdfResizeTrackManager.prototype.Init",{Init:ca.prototype.Init});ca.prototype.addListener=function(a){this.Ln.push(a)};r.a("AdfResizeTrackManager.prototype.addListener",{addListener:ca.prototype.addListener});
ca.prototype.removeListener=function(a){for(var b=this.Ln.length-1;0<=b;b--)if(this.Ln[b]===a){this.Ln.splice(b,1);break}};r.a("AdfResizeTrackManager.prototype.removeListener",{removeListener:ca.prototype.removeListener});ca.prototype.zc=function(){return 0==this.Ln.length};r.a("AdfResizeTrackManager.prototype.isEmpty",{zc:ca.prototype.zc});
ca.prototype.start=function(){this.vX=this.D(ca.Qka);if(this.xb.attachEvent)this.foa=this.D(ca.Fn),this.xb.attachEvent("onresize",this.foa);else{var a=this.xb.childNodes[0];this.kg=document.createElement("div");C.jm(this.kg,"position:absolute; overflow:hidden; visibility:hidden; top:0; left:0; right:0; bottom:0; direction:ltr;");this.kg.className="AFDetectExpansion";this.kg.appendChild(document.createElement("div"));null!=a?this.xb.insertBefore(this.kg,a):this.xb.appendChild(this.kg);this.kg.addEventListener("scroll",
this.vX,!1);this.$t=document.createElement("div");this.$t.className="AFDetectContraction";C.jm(this.$t,"position:absolute; overflow:hidden; visibility:hidden; top:0; left:0; right:0; bottom:0; direction:ltr;");a=document.createElement("div");a.style.width="200%";a.style.height="200%";this.$t.appendChild(a);this.xb.insertBefore(this.$t,this.kg);this.$t.addEventListener("scroll",this.vX,!1);this.$sa(!1)}};r.a("AdfResizeTrackManager.prototype.start",{start:ca.prototype.start});
ca.prototype.stop=function(){null!=this.cG&&(ca.EHa(this.cG),this.cG=null);null!=this.kg?(this.kg.removeEventListener("scroll",this.vX,!1),this.$t.removeEventListener("scroll",this.vX,!1),this.xb.removeChild(this.kg),this.xb.removeChild(this.$t)):this.xb.detachEvent("onresize",this.foa)};r.a("AdfResizeTrackManager.prototype.stop",{stop:ca.prototype.stop});ca.prototype.$sa=function(a){var b=va(this,a);a&&!b&&null!=this.kg.offsetParent&&wa(this,this.iN,this.t6)};
r.a("AdfResizeTrackManager.prototype.initializeElements",{$sa:ca.prototype.$sa});function va(a,b){var d=!1;if(null!=a.kg.offsetParent){var e=a.kg.offsetWidth,f=a.kg.offsetHeight,g=q.b.Y().innerHeight;if(a.iN!==e||a.t6!==f&&f<g)a.loa=a.Y4a,wa(a,e,f),d=!0,b&&a.nh(!0)}return d}ca.prototype.nh=function(a){if(0<this.Ln.length)if(a){null!==this.cG&&ca.EHa(this.cG);var b=this;this.cG=ca.Phb(function(){b.cG=null;for(var a=0;a<b.Ln.length;a++)b.Ln[a]()})}else for(a=0;a<this.Ln.length;a++)this.Ln[a]()};
ca.Qka=function(a){a.stopPropagation();this.hna||(this.hna=A.c.ta(this,ca.tkb,{},100))};ca.tkb=function(){!va(this,!0)&&0<this.loa&&null!=this.kg.offsetParent&&(0==this.kg.scrollLeft||0==this.kg.scrollTop)&&(this.loa--,wa(this,this.iN,this.t6));this.hna=null};ca.Fn=function(){this.nh(!1)};
function wa(a,b,d){a.iN=b;a.t6=d;var e=a.kg.firstChild.style,f=1;do e.width=b+f+"px",e.height=d+f+"px",a.kg.scrollLeft=a.kg.scrollTop=f,f++;while((0==a.kg.scrollTop||0==a.kg.scrollLeft)&&5>=f);a.$t.scrollLeft=b;a.$t.scrollTop=d}ca.Phb=function(a){var b=q.b;return b.Y().requestAnimationFrame?b.Y().requestAnimationFrame(a):b.Y().mozRequestAnimationFrame?b.Y().mozRequestAnimationFrame(a):b.Y().webkitRequestAnimationFrame?b.Y().webkitRequestAnimationFrame(a):b.Y().setTimeout(a,0)};
ca.EHa=function(a){var b=q.b;b.Y().cancelAnimationFrame?b.Y().cancelAnimationFrame(a):b.Y().mozCancelAnimationFrame?b.Y().mozCancelAnimationFrame(a):b.Y().webkitCancelAnimationFrame?b.Y().webkitCancelAnimationFrame(a):b.Y().clearTimeout(a)};