function lf(a,b,d,e,f){this.Init(a,b,d,e,f)}m("AdfMatchMediaBehavior",lf);r.v(lf,Aa);lf.Xga="adfinternal.matchMedia.unmatchedPropertyKey";lf.U1="adfinternal.matchMedia.mediaQueryListeners";lf.XMa=function(a){var b=A.c.Pe(lf.U1)[a.media];b&&0<b.length&&b.forEach(function(b){try{b.listener.call(b.av,a)}catch(e){v.l.dv(e,"Failed while calling mediaQuery change handler")}})};
lf.prototype.Init=function(a,b,d,e,f){lf.h.Init.call(this);u.J(a);u.J(b);u.J(d);this.ng=a;this.UMa=b;this.mNa=a=window.matchMedia(d);this.Lma=a.media;this.eY=e;this.rjb="true"===f};r.a("AdfMatchMediaBehavior.prototype.Init",{Init:lf.prototype.Init});
lf.prototype.Qa=function(a){this.gb=a;a=this.gb.g()+":"+this.ng;var b=page.Pe(lf.Xga);null!=this.eY&&(null==b&&(b=[]),null==b[a]&&(b[a]=this.eY),null!=b[a]&&this.rjb&&(b[a]=this.eY),page.Df(lf.Xga,b));(a=page.Pe(lf.U1))||(a={});var b=this.mNa,d=a[this.Lma];!d||d&&0==d.length?(b.addListener(lf.XMa),d=[{av:this,listener:this.YKa,krb:b}],a[this.Lma]=d,page.Df(lf.U1,a)):d.push({av:this,listener:this.YKa,krb:b})};r.a("AdfMatchMediaBehavior.prototype.initialize",{Qa:lf.prototype.Qa});
lf.prototype.YKa=function(a){var b=this.gb.g()+":"+this.ng;this.eY=page.Pe(lf.Xga)[b];a.matches?this.gb.setProperty(this.ng,this.UMa):this.gb.K(this.ng)==this.UMa&&this.gb.setProperty(this.ng,this.eY)};lf.prototype.Jd=function(){var a=page.Pe(lf.U1)[this.Lma];if(a&&0<a.length){for(var b=0;b<a.length&&a[b].av!=this;b++);1==a.length&&this.mNa.removeListener(lf.XMa);a.splice(b,1)}};r.a("AdfMatchMediaBehavior.prototype.destroy",{Jd:lf.prototype.Jd});