function jf(){this.Init()}v("AdfDhtmlActiveData",jf);z.l(jf);jf.prototype.Init=function(){jf.f.Init.call(this);this.Om={};this.uda=0;this.$X=p;this.rba=n;this.fu=this.wB=0;this.g0a=jf.hA.P4a;this.Gba=jf.hA.u4a;this.Oya=jf.hA.J4a;this.hY=jf.hA.m4a;this.bC=jf.hA.F5a;this.sH=jf.hA.G4a;this.iba=jf.hA.j4a;this.yx=n;this.N8=[];this.hH=0};z.a("AdfDhtmlActiveData.prototype.Init",{Init:jf.prototype.Init});jf.prototype.Qn=function(a){a.Ld()==Se.xm&&200==a.Ep()&&a.Fy()&&F.c.Qn(a)};
z.a("AdfDhtmlActiveData.prototype.requestStatusChanged",{Qn:jf.prototype.Qn});jf.CH=function(a){D.i.finer("Request complete:",a);var b=F.c.yf(l,l);b&&gf(b,a)};jf.prototype.TCa=function(a,b){B.pc(a);this.Hma=a?b+"/adwwls/wls.ads":"adw.jspx"};z.a("AdfDhtmlActiveData.prototype.initializeActiveForm",{TCa:jf.prototype.TCa});
jf.prototype.$Ea=function(a,b,d,e,f,g){B.s(a);this.Bk=a;this.tx=b;F.c.bq(d);var h=arguments.length;B.assert(0==h%2,"An equal number of clientId and changeCount parameters are required");for(var m=this.Om,q=4;q<h;q++){var s=arguments[q];B.s(s);q++;var y=arguments[q];B.Ea(y);var A=!(s in m);m[s]={};m[s].s_=y;if(e||A)D.i.fine("Register active data on:",s),this.NV||this.G0(),F.c.bFa(e,s),(s=F.c.j(s))&&s.iD()}};z.a("AdfDhtmlActiveData.prototype.updateActiveDataComponents",{$Ea:jf.prototype.$Ea});
function ui(a,b){B.assert(b);a.hp[b.name]=b}
function vi(a,b,d,e,f,g,h){B.s(b);B.assert(d!==k);B.Ea(e);B.pc(h);B.Ql(g);var m=F.c.j(b);m?(f&&D.i.fine("Event received beyond the configured threshold for component:",b),f=a.Om[b].s_,f===k?D.i.severe("Active data for unregistered component:",b):e>f?(m.ps(d,e),g!==k&&(d=(new Date).getTime(),0==g%500&&D.i.info("ADS: GENERAL: component finished processing event : "," windowId:",F.c.He()," pageId:",F.c.Kh," clientId:",b," eventId:",e," client time:",d," event number:",g),h&&D.i.info("ADS: component finished processing event : ",
" windowId:",F.c.He()," pageId:",F.c.Kh," clientId:",b," eventId:",e," client time:",d)),a.Om[b].s_=e):D.i.fine("Old active data for",b," declined")):D.i.fine("No active component:",b," Deregestering component")}
jf.prototype.ADa=function(a,b,d,e,f,g,h,m){B.s(a);B.s(b);B.s(d);B.zc(e);B.Ea(f);B.Ea(g);B.Ea(m);B.Ql(h);this.wB=(new Date).getTime();this.hH++;h!==k&&(0==h%500&&D.i.info("ADS: GENERAL: active data manager receives event : "," windowId:",a," pageId:",b," clientId:",d," eventId:",f," event generation time:",g," client time:",this.wB," event number:",h),m&&D.i.info("ADS: active data manager receives event : "," windowId:",a," pageId:",b," clientId:",d," eventId:",f," event generation time:",g," client time:",
this.wB));var q;B.s(a);if(a==F.c.He())q=F.c;else{q=n;var s=this.hp;s!=n&&(q=s[a]);s=n;if(wi(q))try{s=q.ge.c}catch(y){D.i.fine("Could not access active window:",a)}q=s}q&&(q.Kh==b?(a=jf.V$(g)-this.uda>this.hY,h!==k?vi(q.bd(),d,e,f,a,h,1==m):vi(q.bd(),d,e,f,a)):(d=q.Kh,e=Number(d),f=Number(b),isNaN(e)?D.i.error("Invalid target pageId: ",d," windowId: ",a):isNaN(f)?D.i.error("Invalid request pageId: ",b," windowId: ",a):e<f?D.i.error("Data update is newer than current page"," request pageId: ",b," current pageId: ",
d," windowId: ",a):e>f&&D.i.info("Old data update is discarded for pageId: ",b," current pageId: ",d," windowId: ",a)))};z.a("AdfDhtmlActiveData.prototype.processActiveDataEvent",{ADa:jf.prototype.ADa});jf.prototype.PDa=function(){this.hH=1;var a=Ci(this),b;for(b in a)if(currWindow=a[b],wi(currWindow)){var d=currWindow.ge.c;d.zi()&&(d.bd(),F.c.fsa())}};z.a("AdfDhtmlActiveData.prototype.restartAllPushComponents",{PDa:jf.prototype.PDa});
function Di(a,b){B.assert(a.Bk==F.c.He(),"_notifyADSConnectionStateChange should not be called on a non-master window");var d=k,e=Ci(a),f;for(f in e)if(d=e[f],wi(d))try{var g=d.ge.c.bd(),d=b,h=g.xH;if(h==d)D.i.finest("broadcastADSConnectionStateChange called without a change in state");else{g.xH=d;var m=g.N8;if(m){var q=m.length;if(0<q)for(var s=new Ra(g,"adsConnectionState",h,d),d=0;d<q;d++){var y=m[d];d++;var A=m[d];try{A!=n?y.call(A,s):y(s)}catch(C){D.i.ee(C,"Error broadcasting ADS connection state")}}}}}catch(G){D.i.ee(G,
"Error broadcasting ADS connection state to window ",f)}}function Ei(a,b){B.s(b);delete a.Om[b];F.c.nja(b)}
jf.prototype.G0=function(){if(!this.NV&&this.Bk!=n){var a=F.c.R();B.assert(a.AdfDhtmlActiveData,"AdfActiveDataService JavaScript feature not loaded. Please make sure it is not blocked by ad block software.");var b=this.Bk,d=this.tx,e=F.c.Kh,f=n,f=a.name?a.name:this.s8a;if(!this.NV){if(w.b.G()==w.ed){var g=F.c.w(),h=F.c.Dp("/afr/default_arrow_black.cur");w.b.ph()==w.ST&&(h=F.c.Dp("/afr/default_arrow_white.cur"));g.body.style.cursor="url('"+h+"'), progress"}this.NV=l;D.i.fine("Initialize active data manager");
this.KB=this.tx=this.gu=this.oY=this.Bk=k;this.Tna="establishChannel";this.pNa="reconnect";this.Lpa="pollEvents";this.UT="afr::PushIframe";this.a6a="_activeDataForm";this.b6a=this.hp;g=Fi(b);b==F.c.He()?(D.i.info("self is master window: ",b),this.hp==n&&(this.hp={}),a.name=g,F.c.V1(f),this.gu=this.Bk=b,F.c.bq(e),this.KB=this.tx=d,this.oY=a,ui(this,a),b=this.UT,a=F.c.R(),b=a.frames[b],F.c.w(),d=this.Hma,d+="?action\x3d"+this.Tna+"\x26windowId\x3d"+F.c.He()+"\x26pageId\x3d"+F.c.Kh+"\x26replaceMasterWindowId\x3d"+
this.gu+"\x26replaceMasterPageId\x3d"+this.KB,D.i.fine("Connecting for master window:",F.c.He()," in window:",a.name),Di(this,R.Ii.CONNECTING),b.location.replace(d)):a.name==g?Gi(this,b,d):(D.i.info("non-master window, needs to register with: ",b),a.name=f,g=n,h=Hi(b),h!=n?(g=h.ge.c,ui(g.bd(),a),F.c.V1(f),this.gu=this.Bk=b,F.c.bq(e),this.KB=this.tx=d,this.oY=h):(F.c.V1(a.name),F.c.bq(e),Gi(this,b,d)))}}};z.a("AdfDhtmlActiveData.prototype.initActivePage",{G0:jf.prototype.G0});
function Hi(a){B.s(a);var b=F.c.R().open("",a,"height\x3d1,width\x3d1,top\x3d0,left\x3d0,status\x3dno,toolbar\x3dno,menubar\x3dno,location\x3dno"),d;if(!(d=!wi(b)))d=b.ge.c.bd().Bk!=a;if(d){D.i.warning("can't get the master window for: ",a);try{var e=b.location;(e==n||"about:blank"==e||"about:Tabs"==e)&&b.close()}catch(f){}b=n}return b}function Ci(a){a.hp==n&&(a.hp={});return a.hp}
jf.prototype.d1=function(){this.$X=l;var a=this.Bk;if(a){if(a==F.c.He()&&this.jXa!=l)try{Ii(this);var b=Ci(this),d,e=a=k,f=F.c.R(),g;for(g in b)a=b[g],a!=f&&wi(a)&&(a.ge.c.bd().R0()||(e=b[g]));d=e;if(d==n)D.i.fine("Could not find candidate window to migrate to");else{var h=d.ge.c,m=h.bd(),q=Ci(m);ya.qb(q,b);d.name=Fi(h.He());var s=page.He();m.gu=s;m.KB=page.Kh;var y=h.He();m.Bk=y;m.tx=h.Kh;h.oa(m,m.D9,n,50)}}catch(A){D.i.info("Can not migrate the active channel to other windows")}F.c.o8(p,"")}};
z.a("AdfDhtmlActiveData.prototype.onBeforeUnload",{d1:jf.prototype.d1});function Ii(a){var b=F.c,d=a.OV;if(d){try{b.ac(d)}catch(e){D.i.zf(e,"Error clearing connection check timer")}a.OV=n}if(d=a.yx){try{b.ac(d)}catch(f){D.i.zf(f,"Error clearing polling timer")}a.yx=n}}
jf.prototype.D9=function(a){var b=k;this.gu==n&&(this.gu=this.Bk);b=k;b=a!=l?this.Tna:this.pNa;b={action:b,windowId:F.c.He(),replaceMasterWindowId:this.gu,pageId:F.c.Kh,replaceMasterPageId:this.KB};a?b.messageCount=this.hH:this.hH=0;a=b;F.c.R();Di(this,R.Ii.vT);Ji(this,a,{})};jf.prototype.Qha=function(a,b){F.c.oa(this,this.M_a,{L5a:a,C4a:b},3E3)};z.a("AdfDhtmlActiveData.prototype.registerWithNewMaster",{Qha:jf.prototype.Qha});
jf.prototype.M_a=function(a){var b=a.L5a;a=a.C4a;D.i.info("register with new master ",b);this.Bk=b;this.tx=a;try{var d=Hi(b);if(d!=n){this.oY=d;var e=d.ge.c;if(e!=n){ui(e.bd(),F.c.R());var f=Ci(this),g=Ci(e.bd());ya.qb(g,f)}}else D.i.fine("can't find the master page "+b),Gi(this,b,a);this.xH!=R.Ii.Hs&&Di(e.bd(),R.Ii.Hs);this.HZ();this.gea=p}catch(h){D.i.info("ADS register with new master failed"),this.gea?(Gi(this,b,a),this.gea=p,this.xH!=R.Ii.Hs&&Di(e.bd(),R.Ii.Hs)):(this.gea=l,this.Qha(b,a))}this.hp=
n};function Gi(a,b,d){B.s(b);B.s(d);var e=F.c.He(),f=F.c.Kh;a.hp==n&&(a.hp={});a.Bk=e;a.gu=b;a.tx=f;a.KB=d;b=F.c.R();a.oY=b;ui(a,b);a.D9()}function Fi(a){return a.replace(/\//g,"S").replace(/-/g,"M").replace(/\./g,"D")}function wi(a){var b=n;try{b=a.ge.c}catch(d){D.i.zf(d,"Could not access active window")}return b!=n?l:p}jf.hA={restartInterval:15,maxReconnectionRetries:10,reconnectWaitTime:1E4,latencyThreshold:1E4,transport:"STREAMING",pollingInterval:5E3,keepAliveInterval:1E4};
jf.prototype.Xga=function(){var a=F.c,b=a.Wq();if(b&&b.TC())return this.nY||(this.nY=a.oa(this,this.Xga,n,300)),300;this.nY&&(a.ac(this.nY),this.nY=n);a={action:this.Lpa,windowId:a.He(),pageId:a.Kh};Ji(this,a,n);this.oia()};z.a("AdfDhtmlActiveData.prototype.initLongPolling",{Xga:jf.prototype.Xga});
jf.prototype.YDa=function(a){try{this.bC=a.F5a,this.sH=a.G4a,this.Gba=a.u4a,this.Oya=a.J4a,this.hY=a.m4a,this.g0a=a.P4a,this.iba=a.j4a}catch(b){D.i.warning("Exception occurred while setting configuration. Name: "+b.name+", Message: "+b.message)}};z.a("AdfDhtmlActiveData.prototype.setConfiguration",{YDa:jf.prototype.YDa});
jf.prototype.GDa=function(a,b,d){B.s(a);B.s(b);B.s(d);this.wB=(new Date).getTime();this.hH++;b=n;var e=this.hp;e!=n&&(b=e[a]);if(wi(b))try{var f=b.ge.c.bd();B.s(d);if(d in f.Om){var g=F.c.j(d);g?F.c.jc(g):(Ei(f,d),D.i.info("No active component:",d))}else D.i.info("ADS: active data component is not refreshed because it's not active, clientId\x3d",d)}catch(h){D.i.fine("can't access the window ",a)}else D.i.info("No window found for refreshing component: windowId \x3d ",a)};
z.a("AdfDhtmlActiveData.prototype.refreshPushComponent",{GDa:jf.prototype.GDa});
function Ji(a,b,d){var e=F.c.R().frames[a.UT],f="",g;for(g in b)f+="\x26"+g+"\x3d"+b[g];b=1;for(var h in d){g=d[h];if(!ya.Bc(g)){var f=f+("\x26pageKey"+b+"\x3d"+h),m;for(m in g)var q="componentIndex"+b,f=f+("\x26componentId"+b+"\x3d"+m),f=f+("\x26"+q+"\x3d"+g[m].s_)}b+=1}d=f.indexOf("\x26");0<f.length&&0==d&&(f=f.substring(1));f=a.Hma+"?"+f;"STREAMING"==a.bC?(2E3<f.length&&Ki(a,[]),e.location.replace(f)):a.KY=F.c.yf(p,l).sv(f,[a])}
jf.prototype.pEa=function(a){this.uda=jf.V$(a);this.Ti&&D.Dc.info("ADS: Server time difference: ",this.uda,";;")};z.a("AdfDhtmlActiveData.prototype.setServerTimestamp",{pEa:jf.prototype.pEa});jf.V$=function(a){return a==n?0:new Date-new Date(a)};jf.prototype.FDa=function(){this.hH++;var a=(new Date).getTime();this.wB=a;D.i.finer(a,": got keep alive")};z.a("AdfDhtmlActiveData.prototype.recordActiveDataActivity",{FDa:jf.prototype.FDa});
jf.prototype.oia=function(){D.i.finer("ADS Channel Connected");Di(this,R.Ii.Hs);"POLLING"==this.bC&&(this.wca=l);this.wB=this.fu=0;var a=F.c.Kh;this.KB=this.tx=a;this.gu=this.Bk=a=F.c.He();"POLLING"==this.bC?this.JZ():(F.c.R(),this.OV&&F.c.ac(this.OV),this.OV=F.c.oa(this,this.wV,n,this.hY+this.iba));F.c.hd(p,p,p,"ADS channel connected")};z.a("AdfDhtmlActiveData.prototype.setConnected",{oia:jf.prototype.oia});
jf.prototype.stop=function(){D.i.finer("ADS stopped due to user inactivity timeout.");var a=F.c;if("LONG_POLLING"==this.bC){if(this.KY)try{this.KY.abort(),delete this.KY,this.KY=n}catch(b){D.i.fine("Failed to abort Long-Polling request due to error: ",b.message)}}else if("STREAMING"==this.bC){var d=this.UT,e=a.R();if((d=e.frames[d])&&d.frameElement)d.frameElement.src="";D.i.fine("Terminate the push channel for master window:",a.He()," in window:",e.name)}};
z.a("AdfDhtmlActiveData.prototype.stop",{stop:jf.prototype.stop});jf.prototype.wV=function(){var a=F.c,b=a.Wq();if(b&&b.TC())return 300;var b=this.hY,d=this.iba;if(this.xH==R.Ii.Hs&&this.Bk==F.c.He()){var e=p;"STREAMING"==this.bC&&(e="complete"==a.R().frames[this.UT].document.readyState);a=jf.V$(this.wB);if(e||a>b+d)D.i.finer("ADS Channel Disconnected"),this.fu=0,this.$X?D.i.finer("Closing window ... will not try to reconnect"):(Di(this,R.Ii.vT),this.Nya())}return b+d};
z.a("AdfDhtmlActiveData.prototype.__checkAdsConnection",{wV:jf.prototype.wV});jf.prototype.Nya=function(){this.$X?this.fu=0:(D.i.fine("Reconnect called ",this.fu+1," time(s)"),this.xH!=R.Ii.Hs&&(this.fu<=this.Gba?(this.fu++,w.b.G()==w.ed&&3<this.fu&&F.c.R().stop(),this.D9(l),F.c.oa(this,this.Nya,n,this.Oya)):(D.i.warning("Cannot connect. Exceeded number of retries for reconnection"),Di(this,R.Ii.a3))))};jf.prototype.wfa=r("xH");z.a("AdfDhtmlActiveData.prototype.getADSConnectionState",{wfa:jf.prototype.wfa});
jf.prototype.uea=function(a,b){B.Da(a);B.ih(b);this.N8.push(a,b)};z.a("AdfDhtmlActiveData.prototype.addADSConnectionStateListener",{uea:jf.prototype.uea});jf.prototype.Rha=function(a,b){B.Da(a);B.ih(b);var d=this.N8;B.assert(d,"adsConnectionStateListeners array must exist");for(var e=d.length,f=0;f<e;f++){var g=d[f];f++;g==a&&d[f]===b&&d.splice(f-1,2)}};z.a("AdfDhtmlActiveData.prototype.removeADSConnectionStateListener",{Rha:jf.prototype.Rha});
jf.prototype.JZ=function(){if(F.c.IR()&&ya.Bc(this.Om))this.yx=F.c.oa(this,this.JZ,n,this.sH);else{if(!this.wca&&(this.fu++,this.fu>this.Gba)){D.i.warning("Cannot connect. Exceeded number of retries for reconnection");Di(this,R.Ii.a3);return}Di(this,R.Ii.Hs);if(this.yx!=n){try{clearTimeout(this.yx)}catch(a){}this.yx=n}var b=new Date,d=this.sH;this.rba!=n&&(d=b.getTime()-this.rba);b=0;d<this.sH&&(b=this.sH-d);if(200>=b){d=F.c.Wq();if(!d||!d.TC()){var d={action:this.Lpa,windowId:F.c.He(),pageId:F.c.Kh},
b={},e=Ci(this),f;for(f in e){var g=e[f];try{if(wi(g)){var h=g.ge.c,g=b,m=f+":"+h.Kh,q=h.bd();g[m]=q.Om}}catch(s){D.i.zf(s,"Could not access active page:"+f)}}this.rba=(new Date).getTime();Di(this,this.wca?R.Ii.CONNECTING:R.Ii.vT);this.wca=p;Ji(this,d,b)}this.yx=F.c.oa(this,this.JZ,n,this.sH)}else D.i.finer("Timer is fired much before the _pollingInterval, scheduling timer for ",b),this.yx=F.c.oa(this,this.JZ,n,b)}};jf.prototype.xBa=function(a){this.jXa=l;Ki(this,a)};
z.a("AdfDhtmlActiveData.prototype.failover",{xBa:jf.prototype.xBa});function Li(a){a.tia(p);var b=F.c.R();a.$X||b.location.reload(l)}function Ki(a,b){var d=Ci(a),e=k,f=F.c.R(),g=k;ya.isArray(b)||(e=b,b=[],b=b.concat(e));for(var h in d)-1==ya.indexOf(b,h)&&(e=d[h],e!=f?wi(e)&&(e=e.ge.c,e.bd().R0()||Li(e.bd())):g=l);g&&wi(f)&&Li(f.ge.c.bd())}jf.prototype.tia=function(a){B.pc(a);this.$Va=a};z.a("AdfDhtmlActiveData.prototype.setHAMigrated",{tia:jf.prototype.tia});jf.prototype.R0=r("$Va");
z.a("AdfDhtmlActiveData.prototype.isHAMigrated",{R0:jf.prototype.R0});jf.prototype.Bv=function(a){a in this.Om&&Ei(this,a)};z.a("AdfDhtmlActiveData.prototype.unmapComponent",{Bv:jf.prototype.Bv});jf.prototype.Gha=function(a,b,d){var e=this.Om;a.push(d);b.push(e[d].s_)};z.a("AdfDhtmlActiveData.prototype.populateStartActiveDataArray",{Gha:jf.prototype.Gha});jf.prototype.GC=r("Om");z.a("AdfDhtmlActiveData.prototype.getActiveComponents",{GC:jf.prototype.GC});
jf.prototype.reset=function(){Ii(this);this.Om={};this.NV=p};z.a("AdfDhtmlActiveData.prototype.reset",{reset:jf.prototype.reset});jf.prototype.VDa=da("Om");z.a("AdfDhtmlActiveData.prototype.setActiveComponents",{VDa:jf.prototype.VDa});