function Zc(){this.Init()}m("AdfServerLogWriter",Zc);r.v(Zc,qa);Zc.prototype.flush=function(){this.ug();if(this.vp.length){if(window.JSON){var a=q.b.eC();a&&this.AX(a,this.vp)}this.lU()}};r.a("AdfServerLogWriter.prototype.flush",{flush:Zc.prototype.flush});Zc.itb=function(a){try{return JSON.stringify(a)}catch(b){return null}};Zc.C4a=["level","message","error","when","responseId"];
Zc.Gib=function(a,b){if(void 0===b)return null;var d;switch(typeof b){case "boolean":case "number":d=""+b;break;default:d='"'+b+'"'}return'"'+a+'":'+d};Zc.bvb=function(a){try{for(var b=Zc.C4a,d=b.length,e=Array(d),f=0;f<d;f++){var g=b[f],h=Zc.Gib(g,a[g]);h&&e.push(h)}return"{"+e.join(",")+"}"}catch(l){return null}};
Zc.prototype.AX=function(a,b){var d=JSON.stringify(b),d="logRecords\x3d"+encodeURIComponent(d).replace(/\'/g,"%27").replace(/%20/g,"+"),e=null,f=document.forms[0];f&&(e=f.action);e||(e=document.location.href);a.open("POST",e,!0);a.setRequestHeader("Content-type","application/x-www-form-urlencoded");a.setRequestHeader("Adf-Rich-Log","true");a.send(d)};Zc.prototype.Init=function(){Zc.h.Init.call(this);this.lU()};r.a("AdfServerLogWriter.prototype.Init",{Init:Zc.prototype.Init});
Zc.prototype.lU=function(){this.vp=[]};Zc.prototype.md=function(a){this.ug();u.assert(a,"null logRecord");this.vp.push(a)};r.a("AdfServerLogWriter.prototype.PublishImpl",{md:Zc.prototype.md});