/*!CK:305894666!*//*1425869077,*/ if (self.CavalryLogger) { CavalryLogger.start_js(["+LqFA"]); } __d("AppUseTrackerLogger",["AsyncRequest","PageTransitions","Run","copyProperties","isInIframe"],function(a,b,c,d,e,f,g,h,i,j,k){b.__markCompiled&&b.__markCompiled();function l(){if(!l.instance)l.instance=this;return l.instance;}j(l,{setup:function(m,n,o,p,q,r){(new l()).init(m,n,o,p,q,r);}});j(l.prototype,{instance:null,endpoint:'/ajax/apps/usage_update.php',heartbeat_endpoint:'/ajax/apps/heartbeat.php',INITIAL_PING:0,ONGOING_PING:1,DISCOVERY_PING:2,ENDING_PING:3,_application_id:0,_is_game:0,_createRequest:function(m){return new g().setURI(this.endpoint).setMethod('POST').setData({app:this._application_id,is_game:this._is_game,type:m,condition:this._signal_on_page_transition});},_createHeartbeatRequest:function(){return new g().setURI(this.heartbeat_endpoint).setMethod('POST').setData({app:this._application_id});},init:function(m,n,o,p,q,r){if(k())return;this.cleanup();h.registerHandler(this.catchPageTransition.bind(this));this._application_id=m;this._is_game=n;if(r){var s=this._createHeartbeatRequest();this._timers.push(setInterval(s.send.bind(s),r));}this._timers.push(setTimeout(function(){this._createRequest(this.INITIAL_PING).send();var t=this._createRequest(this.ONGOING_PING);this._timers.push(setInterval(t.send.bind(t),p));}.bind(this),o));if(q)this._timers.push(setTimeout(function(){this._createRequest(this.DISCOVERY_PING).send();}.bind(this),q));i.onBeforeUnload(this.onBeforeUnload.bind(this));},catchPageTransition:function(m){this._createRequest(this.ENDING_PING).send();this.cleanup();},onBeforeUnload:function(){this._createRequest(this.ENDING_PING).setOption('asynchronous',false).send();this.cleanup();},cleanup:function(){if(this._timers)for(var m=0;m=o){while(p--&&m[p]!=l);if(p<0){throw "Maximum path length was exceeded";}else throw "Illegal cycle has occured";}m[p]=l;}return p;},recoverSolution:function(l,m,n,o,p,q,r){var s=function(){};s.prototype.add=function(y){this[y]=true;};s.prototype.remove=function(y){delete this[y];};var t=[],u=new s();u.add([n[0],o[0]]);while(l--)u.add([n[(l+1)&~1],n[(l|1)]]);while(m--)u.add([o[m|1],o[(m+1)&~1]]);var v=0;for(var w=0;w