function Tf(){this.Init()}m("AdfDhtmlActiveData",Tf);r.v(Tf);Tf.prototype.Init=function(){Tf.h.Init.call(this);this.cp={};this.Goa=0;this.M5=!1;this.uma=null;this.Hx=this.oG=0;this.Ima=Tf.EK.frb;this.vOa=Tf.EK.yrb;this.W5=Tf.EK.Yqb;this.XB=Tf.EK.wsb;this.mN=Tf.EK.trb;this.jma=Tf.EK.Vqb;this.yB=null;this.M7=0;this.hia=[];this.aN=0};r.a("AdfDhtmlActiveData.prototype.Init",{Init:Tf.prototype.Init});Tf.prototype.pq=function(a){a.se()==yf.Oo&&200==a.ls()&&a.LC()&&A.c.pq(a)};
r.a("AdfDhtmlActiveData.prototype.requestStatusChanged",{pq:Tf.prototype.pq});Tf.xN=function(a){v.l.finer("Request complete:",a);var b=A.c.Yf(!0,!0);b&&Qf(b,a)};Tf.prototype.rTa=function(a,b){u.dc(a);this.Dza=a?b+"/adwwls/wls.ads":"adw.jspx"};r.a("AdfDhtmlActiveData.prototype.initializeActiveForm",{rTa:Tf.prototype.rTa});
Tf.prototype.UVa=function(a,b,d,e,f,g){u.J(a);this.bm=a;this.sB=b;A.c.Ms(d);var h=arguments.length;u.assert(0==h%2,"An equal number of clientId and changeCount parameters are required");for(var l=this.cp,n=4;n<h;n++){var t=arguments[n];u.J(t);n++;var y=arguments[n];u.Da(y);var z=!(t in l);l[t]={};l[t].n8=y;if(e||z)v.l.fine("Register active data on:",t),this.m3||this.Y9(),A.c.XVa(e,t),(t=A.c.m(t))&&t.gI()}};r.a("AdfDhtmlActiveData.prototype.updateActiveDataComponents",{UVa:Tf.prototype.UVa});
function Vk(a,b){u.assert(b);a.yu[b.name]=b}
function Wk(a,b,d,e,f,g,h){u.J(b);u.assert(void 0!==d);u.Da(e);u.dc(h);u.co(g);var l=A.c.m(b);l?(f&&v.l.fine("Event received beyond the configured threshold for component:",b),f=a.cp[b].n8,void 0===f?v.l.severe("Active data for unregistered component:",b):e>f?(l.iv(d,e),void 0!==g&&(d=(new Date).getTime(),0==g%500&&v.l.info("ADS: GENERAL: component finished processing event : "," windowId:",A.c.pf()," pageId:",A.c.oh," clientId:",b," eventId:",e," client time:",d," event number:",g),h&&v.l.info("ADS: component finished processing event : ",
" windowId:",A.c.pf()," pageId:",A.c.oh," clientId:",b," eventId:",e," client time:",d)),a.cp[b].n8=e):v.l.fine("Old active data for",b," declined")):v.l.fine("No active component:",b," Deregestering component")}
Tf.prototype.hUa=function(a,b,d,e,f,g,h,l,n){u.J(a);u.J(b);u.J(d);u.Tc(e);u.Da(f);u.Da(g);u.Da(h);u.Da(n);u.co(l);"STREAMING"==this.XB&&(this.M7+=h,25E6<=this.M7&&(v.l.info("ADS: Reached max events threshold. Rloading the streming iframe."),this.M7=0,Xk(this,!0,!0)));this.oG=(new Date).getTime();this.aN++;void 0!==l&&(0==l%500&&v.l.info("ADS: GENERAL: active data manager receives event : "," windowId:",a," pageId:",b," clientId:",d," eventId:",f," event generation time:",g," client time:",this.oG,
" event number:",l),n&&v.l.info("ADS: active data manager receives event : "," windowId:",a," pageId:",b," clientId:",d," eventId:",f," event generation time:",g," client time:",this.oG));u.J(a);if(a==A.c.pf())h=A.c;else{h=null;var t=this.yu;null!=t&&(h=t[a]);t=null;if(Yk(h))try{t=h.Re.c}catch(y){v.l.fine("Could not access active window:",a)}h=t}h&&(h.oh==b?(a=Tf.Bka(g)-this.Goa>this.W5,void 0!==l?Wk(h.Ud(),d,e,f,a,l,1==n):Wk(h.Ud(),d,e,f,a)):(d=h.oh,e=Number(d),f=Number(b),isNaN(e)?v.l.error("Invalid target pageId: ",
d," windowId: ",a):isNaN(f)?v.l.error("Invalid request pageId: ",b," windowId: ",a):e<f?v.l.error("Data update is newer than current page"," request pageId: ",b," current pageId: ",d," windowId: ",a):e>f&&v.l.info("Old data update is discarded for pageId: ",b," current pageId: ",d," windowId: ",a)))};r.a("AdfDhtmlActiveData.prototype.processActiveDataEvent",{hUa:Tf.prototype.hUa});
Tf.prototype.AUa=function(){this.aN=1;var a=Zk(this),b;for(b in a)if(currWindow=a[b],Yk(currWindow)){var d=currWindow.Re.c;d.wj()&&(d.Ud(),A.c.mGa())}};r.a("AdfDhtmlActiveData.prototype.restartAllPushComponents",{AUa:Tf.prototype.AUa});
function $k(a,b){u.assert(a.bm==A.c.pf(),"_notifyADSConnectionStateChange should not be called on a non-master window");var d=void 0,e=Zk(a),f;for(f in e)if(d=e[f],Yk(d))try{var g=d.Re.c.Ud(),d=b,h=g.sN;if(h==d)v.l.finest("broadcastADSConnectionStateChange called without a change in state");else{g.sN=d;var l=g.hia;if(l){var n=l.length;if(0<n)for(var t=new Oa(g,"adsConnectionState",h,d),d=0;d<n;d++){var y=l[d];d++;var z=l[d];try{null!=z?y.call(z,t):y(t)}catch(B){v.l.Ge(B,"Error broadcasting ADS connection state")}}}}}catch(B){v.l.Ge(B,
"Error broadcasting ADS connection state to window ",f)}}function fl(a,b){u.J(b);delete a.cp[b];A.c.Lva(b)}
Tf.prototype.Y9=function(){if(!this.m3&&null!=this.bm){var a=A.c.Y();u.assert(a.AdfDhtmlActiveData,"AdfActiveDataService JavaScript feature not loaded. Please make sure it is not blocked by ad block software.");var b=this.bm,d=this.sB,e=A.c.oh,f=null,f=a.name?a.name:this.Eub;if(!this.m3){if(q.b.S()==q.ed){var g=A.c.R(),h=A.c.ml("/afr/default_arrow_black.cur");q.b.Mi()==q.gS&&(h=A.c.ml("/afr/default_arrow_white.cur"));g.body.style.cursor="url('"+h+"'), progress"}this.m3=!0;v.l.fine("Initialize active data manager");
this.IG=this.sB=this.Jx=this.bm=void 0;this.jBa="establishChannel";this.y4a="reconnect";this.pDa="pollEvents";this.$0="afr::PushIframe";g=gl(b);b==A.c.pf()?(v.l.info("self is master window: ",b),null==this.yu&&(this.yu={}),a.name=g,A.c.vaa(f),this.Jx=this.bm=b,A.c.Ms(e),this.IG=this.sB=d,Vk(this,a),b=this.$0,a=A.c.Y(),b=a.frames[b],A.c.R(),d=this.Dza,d+="?action\x3d"+this.jBa+"\x26windowId\x3d"+A.c.pf()+"\x26pageId\x3d"+A.c.oh+"\x26replaceMasterWindowId\x3d"+this.Jx+"\x26replaceMasterPageId\x3d"+
this.IG,v.l.fine("Connecting for master window:",A.c.pf()," in window:",a.name),$k(this,M.Dj.CONNECTING),b.location.replace(d)):a.name==g?hl(this,b,d):(v.l.info("non-master window, needs to register with: ",b),a.name=f,g=null,g=il(b),null!=g?(g=g.Re.c,Vk(g.Ud(),a),A.c.vaa(f),this.Jx=this.bm=b,A.c.Ms(e),this.IG=this.sB=d):(A.c.vaa(a.name),A.c.Ms(e),hl(this,b,d)))}}};r.a("AdfDhtmlActiveData.prototype.initActivePage",{Y9:Tf.prototype.Y9});
function il(a){u.J(a);var b=A.c.Y().open("",a,"height\x3d1,width\x3d1,top\x3d0,left\x3d0,status\x3dno,toolbar\x3dno,menubar\x3dno,location\x3dno");if(!Yk(b)||b.Re.c.Ud().bm!=a){v.l.warning("can't get the master window for: ",a);try{var d=b.location;null!=d&&"about:blank"!=d&&"about:Tabs"!=d||b.close()}catch(e){}b=null}return b}function Zk(a){null==a.yu&&(a.yu={});return a.yu}
Tf.prototype.B$=function(){this.M5=!0;var a=this.bm;if(a){if(a==A.c.pf()&&1!=this.Qgb)try{jl(this);var b=Zk(this),d,e=a=void 0,f=A.c.Y(),g;for(g in b)a=b[g],a!=f&&Yk(a)&&(a.Re.c.Ud().k$()||(e=b[g]));d=e;if(null==d)v.l.fine("Could not find candidate window to migrate to");else{var h=d.Re.c,l=h.Ud(),n=Zk(l);E.Rb(n,b);d.name=gl(h.pf());var t=page.pf();l.Jx=t;l.IG=page.oh;var y=h.pf();l.bm=y;l.sB=h.oh;h.ta(l,l.bja,null,50)}}catch(z){v.l.info("Can not migrate the active channel to other windows")}A.c.Aha(!1,
"")}};r.a("AdfDhtmlActiveData.prototype.onBeforeUnload",{B$:Tf.prototype.B$});function jl(a){var b=A.c,d=a.n3;if(d){try{b.ic(d)}catch(e){v.l.rg(e,"Error clearing connection check timer")}a.n3=null}if(d=a.yB){try{b.ic(d)}catch(e){v.l.rg(e,"Error clearing polling timer")}a.yB=null}}Tf.prototype.bja=function(a){Xk(this,a)};Tf.prototype.bua=function(a,b){A.c.ta(this,this.mlb,{Esb:a,prb:b},3E3)};r.a("AdfDhtmlActiveData.prototype.registerWithNewMaster",{bua:Tf.prototype.bua});
Tf.prototype.mlb=function(a){var b=a.Esb;a=a.prb;v.l.info("register with new master ",b);this.bm=b;this.sB=a;try{var d=il(b);if(null!=d){var e=d.Re.c;if(null!=e){Vk(e.Ud(),A.c.Y());var f=Zk(this),g=Zk(e.Ud());E.Rb(g,f)}}else v.l.fine("can't find the master page "+b),hl(this,b,a);this.sN!=M.Dj.Fv&&$k(e.Ud(),M.Dj.Fv);this.x7();this.Cpa=!1}catch(h){v.l.info("ADS register with new master failed"),this.Cpa?(hl(this,b,a),this.Cpa=!1,this.sN!=M.Dj.Fv&&$k(e.Ud(),M.Dj.Fv)):(this.Cpa=!0,this.bua(b,a))}this.yu=
null};function Xk(a,b,d){var e=void 0;null==a.Jx&&(a.Jx=a.bm);e=void 0;e=1!=b?a.jBa:a.y4a;e={action:e,windowId:A.c.pf(),replaceMasterWindowId:a.Jx,pageId:A.c.oh,replaceMasterPageId:a.IG};b?e.messageCount=a.aN:a.aN=0;b=e;A.c.Y();$k(a,M.Dj.C0);kl(a,b,{},d)}function hl(a,b,d){u.J(b);u.J(d);var e=A.c.pf(),f=A.c.oh;null==a.yu&&(a.yu={});a.bm=e;a.Jx=b;a.sB=f;a.IG=d;b=A.c.Y();Vk(a,b);a.bja()}function gl(a){return a.replace(/\//g,"S").replace(/-/g,"M").replace(/\./g,"D")}
function Yk(a){var b=null;try{b=a.Re.c}catch(d){v.l.rg(d,"Could not access active window")}return null!=b?!0:!1}Tf.EK={restartInterval:15,maxReconnectionRetries:10,reconnectWaitTime:1E4,latencyThreshold:1E4,transport:"STREAMING",pollingInterval:5E3,keepAliveInterval:1E4};Tf.prototype.Zsa=function(){var a=A.c,b=a.Ot();if(b&&b.RH())return this.d6||(this.d6=a.ta(this,this.Zsa,null,300)),300;this.d6&&(a.ic(this.d6),this.d6=null);a={action:this.pDa,windowId:a.pf(),pageId:a.oh};kl(this,a,null);this.Fua()};
r.a("AdfDhtmlActiveData.prototype.initLongPolling",{Zsa:Tf.prototype.Zsa});Tf.prototype.MUa=function(a){try{this.XB=a.wsb,this.mN=a.trb,this.Ima=a.frb,this.vOa=a.yrb,this.W5=a.Yqb,this.jma=a.Vqb}catch(b){v.l.warning("Exception occurred while setting configuration. Name: "+b.name+", Message: "+b.message)}};r.a("AdfDhtmlActiveData.prototype.setConfiguration",{MUa:Tf.prototype.MUa});
Tf.prototype.pUa=function(a,b,d){u.J(a);u.J(b);u.J(d);this.oG=(new Date).getTime();this.aN++;b=null;var e=this.yu;null!=e&&(b=e[a]);if(Yk(b))try{var f=b.Re.c.Ud();u.J(d);if(d in f.cp){var g=A.c.m(d);g?A.c.Kc(g):(fl(f,d),v.l.info("No active component:",d))}else v.l.info("ADS: active data component is not refreshed because it's not active, clientId\x3d",d)}catch(h){v.l.fine("can't access the window ",a)}else v.l.info("No window found for refreshing component: windowId \x3d ",a)};
r.a("AdfDhtmlActiveData.prototype.refreshPushComponent",{pUa:Tf.prototype.pUa});
function kl(a,b,d,e){var f=A.c.Y().frames[a.$0],g="",h;for(h in b)g+="\x26"+h+"\x3d"+b[h];b=1;for(var l in d){h=d[l];if(!E.zc(h)){var g=g+("\x26pageKey"+b+"\x3d"+l),n;for(n in h)var t="componentIndex"+b,g=g+("\x26componentId"+b+"\x3d"+n),g=g+("\x26"+t+"\x3d"+h[n].n8)}b+=1}d=g.indexOf("\x26");0<g.length&&0==d&&(g=g.substring(1));g=a.Dza+"?"+g;"STREAMING"==a.XB?(1==e&&(g+="\x26discEvt\x3dtrue"),2E3<g.length&&ll(a,[]),f.location.replace(g)):a.C6=A.c.Yf(!1,!0).ez(g,[a])}
Tf.prototype.eVa=function(a){this.Goa=Tf.Bka(a);this.Tj&&v.Yc.info("ADS: Server time difference: ",this.Goa,";;")};r.a("AdfDhtmlActiveData.prototype.setServerTimestamp",{eVa:Tf.prototype.eVa});Tf.Bka=function(a){return null==a?0:new Date-new Date(a)};Tf.prototype.oUa=function(){this.aN++;var a=(new Date).getTime();this.oG=a;v.l.finer(a,": got keep alive")};r.a("AdfDhtmlActiveData.prototype.recordActiveDataActivity",{oUa:Tf.prototype.oUa});
Tf.prototype.Fua=function(){v.l.finer("ADS Channel Connected");$k(this,M.Dj.Fv);"POLLING"==this.XB&&(this.Cna=!0);this.oG=this.Hx=0;var a=A.c.oh;this.IG=this.sB=a;this.Jx=this.bm=a=A.c.pf();"POLLING"==this.XB?this.z7():(A.c.Y(),this.n3&&A.c.ic(this.n3),this.n3=A.c.ta(this,this.O2,null,this.W5+this.jma));A.c.Cc(!1,!1,!1,"ADS channel connected")};r.a("AdfDhtmlActiveData.prototype.setConnected",{Fua:Tf.prototype.Fua});
Tf.prototype.stop=function(){v.l.finer("ADS stopped due to user inactivity timeout.");var a=A.c;if("LONG_POLLING"==this.XB){if(this.C6)try{this.C6.abort(),delete this.C6,this.C6=null}catch(e){v.l.fine("Failed to abort Long-Polling request due to error: ",e.message)}}else if("STREAMING"==this.XB){var b=this.$0,d=a.Y();(b=d.frames[b])&&b.frameElement&&(b.frameElement.src="");v.l.fine("Terminate the push channel for master window:",a.pf()," in window:",d.name)}};
r.a("AdfDhtmlActiveData.prototype.stop",{stop:Tf.prototype.stop});Tf.prototype.O2=function(){var a=A.c,b=a.Ot();if(b&&b.RH())return 300;var b=this.W5,d=this.jma;if(this.sN==M.Dj.Fv&&this.bm==A.c.pf()){var e=!1;"STREAMING"==this.XB&&(e="complete"==a.Y().frames[this.$0].document.readyState);a=Tf.Bka(this.oG);if(e||a>b+d)v.l.finer("ADS Channel Disconnected"),this.Hx=0,this.M5?v.l.finer("Closing window ... will not try to reconnect"):($k(this,M.Dj.C0),this.uOa())}return b+d};
r.a("AdfDhtmlActiveData.prototype.__checkAdsConnection",{O2:Tf.prototype.O2});Tf.prototype.uOa=function(){this.M5?this.Hx=0:(v.l.fine("Reconnect called ",this.Hx+1," time(s)"),this.sN!=M.Dj.Fv&&(this.Hx<=this.Ima?(this.Hx++,q.b.S()==q.ed&&3<this.Hx&&A.c.Y().stop(),this.bja(!0),A.c.ta(this,this.uOa,null,this.vOa)):(v.l.warning("Cannot connect. Exceeded number of retries for reconnection"),$k(this,M.Dj.Dba))))};Tf.prototype.bra=function(){return this.sN};
r.a("AdfDhtmlActiveData.prototype.getADSConnectionState",{bra:Tf.prototype.bra});Tf.prototype.Spa=function(a,b){u.Ja(a);u.ji(b);this.hia.push(a,b)};r.a("AdfDhtmlActiveData.prototype.addADSConnectionStateListener",{Spa:Tf.prototype.Spa});Tf.prototype.cua=function(a,b){u.Ja(a);u.ji(b);var d=this.hia;u.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)}};
r.a("AdfDhtmlActiveData.prototype.removeADSConnectionStateListener",{cua:Tf.prototype.cua});
Tf.prototype.z7=function(){if(A.c.yZ()&&E.zc(this.cp))this.yB=A.c.ta(this,this.z7,null,this.mN);else{if(!this.Cna&&(this.Hx++,this.Hx>this.Ima)){v.l.warning("Cannot connect. Exceeded number of retries for reconnection");$k(this,M.Dj.Dba);return}$k(this,M.Dj.Fv);if(null!=this.yB){try{clearTimeout(this.yB)}catch(h){}this.yB=null}var a=new Date,b=this.mN;null!=this.uma&&(b=a.getTime()-this.uma);a=0;b<this.mN&&(a=this.mN-b);if(200>=a){b=A.c.Ot();if(!b||!b.RH()){var b={action:this.pDa,windowId:A.c.pf(),
pageId:A.c.oh},a={},d=Zk(this),e;for(e in d){var f=d[e];try{if(Yk(f)){var g=f.Re.c;a[e+":"+g.oh]=g.Ud().cp}}catch(h){v.l.rg(h,"Could not access active page:"+e)}}this.uma=(new Date).getTime();$k(this,this.Cna?M.Dj.CONNECTING:M.Dj.C0);this.Cna=!1;kl(this,b,a)}this.yB=A.c.ta(this,this.z7,null,this.mN)}else v.l.finer("Timer is fired much before the _pollingInterval, scheduling timer for ",a),this.yB=A.c.ta(this,this.z7,null,a)}};Tf.prototype.GRa=function(a){this.Qgb=!0;ll(this,a)};
r.a("AdfDhtmlActiveData.prototype.failover",{GRa:Tf.prototype.GRa});function ml(a){a.Jua(!1);var b=A.c.Y();a.M5||b.location.reload(!0)}function ll(a,b){var d=Zk(a),e=void 0,f=A.c.Y(),g=void 0;E.isArray(b)||(e=b,b=[],b=b.concat(e));for(var h in d)-1==E.indexOf(b,h)&&(e=d[h],e!=f?Yk(e)&&(e=e.Re.c,e.Ud().k$()||ml(e.Ud())):g=!0);g&&Yk(f)&&ml(f.Re.c.Ud())}Tf.prototype.Jua=function(a){u.dc(a);this.Cfb=a};r.a("AdfDhtmlActiveData.prototype.setHAMigrated",{Jua:Tf.prototype.Jua});Tf.prototype.k$=function(){return this.Cfb};
r.a("AdfDhtmlActiveData.prototype.isHAMigrated",{k$:Tf.prototype.k$});Tf.prototype.nz=function(a){a in this.cp&&fl(this,a)};r.a("AdfDhtmlActiveData.prototype.unmapComponent",{nz:Tf.prototype.nz});Tf.prototype.Qta=function(a,b,d){var e=this.cp;a.push(d);b.push(e[d].n8)};r.a("AdfDhtmlActiveData.prototype.populateStartActiveDataArray",{Qta:Tf.prototype.Qta});Tf.prototype.FO=function(){return this.cp};r.a("AdfDhtmlActiveData.prototype.getActiveComponents",{FO:Tf.prototype.FO});
Tf.prototype.reset=function(){jl(this);this.cp={};this.m3=!1};r.a("AdfDhtmlActiveData.prototype.reset",{reset:Tf.prototype.reset});Tf.prototype.JUa=function(a){this.cp=a};r.a("AdfDhtmlActiveData.prototype.setActiveComponents",{JUa:Tf.prototype.JUa});