function Ac(a,b){this.Init(a,b)}v("AdfClientFileLogWriter",Ac);z.l(Ac,zc);Ac.prototype.Init=function(a,b){B.J(b,sa);Ac.f.Init.call(this);var d=w.b;this.sZ=n;this.Rm=b;this.Ce=a;this.mc=d.w();d.S(this.Ce,"load",Ac.mTa)};z.a("AdfClientFileLogWriter.prototype.Init",{Init:Ac.prototype.Init});
Ac.mTa=function(){var a=F.c.Cfa(),b=w.b.w(),d=b.createElement("applet");d.setAttribute("name","AdfClientFileWriter");d.setAttribute("archive",a+"/afr/archives/AdfSignedClientFileWriterApplet.jar");d.setAttribute("code","oracle.adfinternal.view.resource.rich.AdfClientFileWriterApplet.class");d.setAttribute("height","1");d.setAttribute("width","1");b.getElementsByTagName("body")[0].appendChild(d)};
Ac.prototype.Afa=function(){var a,b=this.mc.applets.length;if(0<b){var d=this.mc.getElementsByTagName("applet");for(i=0;i<b;i++)if("AdfClientFileWriter"==d[i].name){a=d[i];break}}return a};z.a("AdfClientFileLogWriter.prototype.getApplet",{Afa:Ac.prototype.Afa});Ac.prototype.flush=function(){this.ng()};z.a("AdfClientFileLogWriter.prototype.flush",{flush:Ac.prototype.flush});Ac.prototype.close=function(){this.KQ();this.v9=l};z.a("AdfClientFileLogWriter.prototype.close",{close:Ac.prototype.close});
Ac.prototype.KQ=function(){var a=this.Afa();if(a){this.ng();var b=this.$I(),d="\x3crecord\x3e\n\t\x3cheader\x3e\n\t\t\x3cdate\x3e"+(new Date).toUTCString()+"\x3c/date\x3e\n\t\t\x3cecId\x3e"+R.P5+"\x3c/ecId\x3e\n\t\t\x3cpage\x3e"+this.mc.title+"\x3c/page\x3e\n\t\t\x3cserverHost\x3e"+this.Ce.location.host+"\x3c/serverHost\x3e\n\t\t\x3cpath\x3e"+this.Ce.location.pathname+"\x3c/path\x3e\n\t\x3c/header\x3e\n";if(b.length){for(var e=b.length,f=0;f<e;f++)b[f]=this.co(b[f]);var d=d+b.join("\n"),d=d+("\n\x3c/record\x3e\n"+
Ac.Rna+"\n"),b=w.b.G(),e=n,e=R.EGa!=n?R.EGa:(new Date).getTime(),b=b+"_"+e+".xml",g;try{"false"==a.H9a(b)&&(d=Ac.iQa+Ac.BOa+"\n"+Ac.lNa+Ac.VGa+d),g=a.log(b,d,Ac.Rna)}catch(h){g="Error: "+h}"ok"!=g&&this.Rm.jg(new Bc(D.WARNING,g))}}else this.Rm.jg(new Bc(D.WARNING,"The AdfClientFileWriter applet is undefined or unavailable."));this.OD()};z.a("AdfClientFileLogWriter.prototype.closeRecord",{KQ:Ac.prototype.KQ});Ac.prototype.Gia=function(a){this.sZ=a!=n?a:(new Date).getTime()};
z.a("AdfClientFileLogWriter.prototype.setSessionId",{Gia:Ac.prototype.Gia});Ac.prototype.oq=function(a){a=a.split(";");var b="",d=a.length;if(2>d)return b;a[0]&&(b+="\t\t\t\x3cdescription\x3e\x3c![CDATA["+a[0]+"]]\x3e\x3c/description\x3e\n");a[1]&&(b+="\t\t\t\x3ctimestamp\x3e"+a[1]+"\x3c/timestamp\x3e\n");a[2]&&(b+="\t\t\t\x3ctiming\x3e"+a[2]+"\x3c/timing\x3e\n");for(i=3;i<d;++i)b+="\t\t\t"+a[i]+"\n";return b};z.a("AdfClientFileLogWriter.prototype.FormatMessage",{oq:Ac.prototype.oq});
Ac.prototype.co=function(a){this.ZS(a[Bc.ht]);var b="\t\x3centry\x3e\n\t\t\x3ctime\x3e"+this.Pv(a[Bc.mw])+"\x3c/time\x3e\n",d=this.rz(a[Bc.Mv]);d&&(b+="\t\t\x3cerror\x3e"+d+"\x3c/error\x3e\n");return b+="\t\t\x3cmessage\x3e\n"+this.oq(a[Bc.$v])+"\t\t\x3c/message\x3e\n\t\x3c/entry\x3e"};z.a("AdfClientFileLogWriter.prototype.FormatLogRecord",{co:Ac.prototype.co});Ac.prototype.Pv=function(a){a||(a=new Date);return a.getUTCHours()+":"+a.getUTCMinutes()+":"+a.getUTCSeconds()+"."+a.getUTCMilliseconds()};
z.a("AdfClientFileLogWriter.prototype.FormatWhen",{Pv:Ac.prototype.Pv});Ac.iQa='\x3c?xml version \x3d"1.0" encoding\x3d"ISO-8859-1"?\x3e\n';Ac.lNa='\x3cAdfRcProfiler version\x3d"3.0"/\x3e\n';Ac.VGa="\x3cbrowser\x3e"+navigator.appName+" "+navigator.appVersion+"\x3c/browser\x3e\n";Ac.BOa="\x3clog\x3e";Ac.Rna="\x3c/log\x3e";