require.def("tabs/pageStats",["domplate/domplate","core/lib","i18n!nls/pageStats","preview/harSchema","preview/harModel","core/cookies","domplate/infoTip","core/trace"],function(p,f,e,q,r,s,t){with(p){var h=function(){};h.prototype={data:[],title:"",getLabelTooltipText:function(a){return a.label+": "+f.formatSize(a.value)},cleanUp:function(){for(var a=0;a0)k.data[2].value-=c.timings.ssl;var n=c.response,g=n.bodySize>0?n.bodySize:0,j=n.content.mimeType;j=(j=j?j.match(/^([^;]+)/)[1]:null)?j:n.content.mimeType;if(v[j]){i.data[0].value+=g;i.data[0].count++}else if(u[j]){i.data[1].value+=g;i.data[1].count++}else if(w[j]){i.data[2].value+=g;i.data[2].count++}else if(x[j]){i.data[3].value+= g;i.data[3].count++}else if(y[j]){i.data[4].value+=g;i.data[4].count++}else{i.data[5].value+=g;i.data[5].count++}o.data[0].value+=c.request.headersSize>0?c.request.headersSize:0;o.data[1].value+=c.request.bodySize>0?c.request.bodySize:0;o.data[2].value+=c.response.headersSize>0?c.response.headersSize:0;o.data[3].value+=g;if(c.response.status==206){l.data[1].value+=g;l.data[1].count++}else if(c.response.status==304){l.data[2].value+=g;l.data[2].count++}else if(g>0){l.data[0].value+=g;l.data[0].count++}}}h.draw(f.$(this.timingPie, "pieGraph"),k);h.draw(f.$(this.contentPie,"pieGraph"),i);h.draw(f.$(this.trafficPie,"pieGraph"),o);h.draw(f.$(this.cachePie,"pieGraph"),l)}},cleanUp:function(){k.cleanUp();i.cleanUp();o.cleanUp();l.cleanUp()},showInfoTip:function(a,d,b,m){return h.showInfoTip(a,d,b,m)},onSelectionChange:function(a){this.update(a)},show:function(a){if(!this.isVisible()){t.addListener(this);f.setClass(this.element,"opened");if(!a||$.browser.msie)this.element.style.display="block";else $(this.element).slideDown();this.update(this.timeline.getSelection())}}, hide:function(a){if(this.isVisible()){t.removeListener(this);f.removeClass(this.element,"opened");if(!a||$.browser.msie)this.element.style.display="none";else $(this.element).slideUp()}},isVisible:function(){return f.hasClass(this.element,"opened")},toggle:function(a){this.isVisible()?this.hide(a):this.show(a)},render:function(a){this.element=this.tag.replace({},a);this.timingPie=h.render(k,this.element);this.contentPie=h.render(i,this.element);this.trafficPie=h.render(o,this.element);this.cachePie= h.render(l,this.element);this.cachePie.style.borderRight=0;return this.element}});h=domplate({tag:TABLE({"class":"pagePieTable",cellpadding:0,cellspacing:0,_repObject:"$pie"},TBODY(TR(TD({"class":"pieBox",title:"$pie.title"}),TD(FOR("item","$pie.data",DIV({"class":"pieLabel",_repObject:"$item"},SPAN({"class":"box",style:"background-color: $item.color"}," "),SPAN({"class":"label"},"$item.label"))))))),render:function(a,d){a=this.tag.append({pie:a},d);d=f.$(a,"pieBox");var b=document.createElement("canvas"); b.setAttribute("class","pieGraph ");b.setAttribute("height","100");b.setAttribute("width","100");d.appendChild(b);typeof G_vmlCanvasManager!="undefined"&&G_vmlCanvasManager.initElement(b);return a},draw:function(a,d){if(a&&a.getContext){var b=a.getContext("2d"),m=Math.min(a.width,a.height)/2,c=[a.width/2,a.height/2];b.clearRect(0,0,a.width,a.height);a=0;d=d.data;var n=0;for(var g in d)n+=d[g].value;if(n)for(g=0;g