!function(n){jQuery.plot.plugins.push({init:function(n){n.hooks.processDatapoints.push(function(n,s,t){if(null!=s.stack){var i=function(n,s){for(var t=null,i=0;i<s.length&&n!=s[i];++i)s[i].stack==n.stack&&(t=s[i]);return t}(s,n.getData());if(i){for(var l,o,e,u,f,p,r,a=t.pointsize,h=t.points,c=i.datapoints.pointsize,g=i.datapoints.points,k=[],v=s.lines.show,z=s.bars.horizontal,d=a>2&&(z?t.format[2].x:t.format[2].y),y=v&&s.lines.steps,D=!0,b=z?1:0,j=z?0:1,w=0,x=0;!(w>=h.length);){if(r=k.length,null==h[w]){for(m=0;m<a;++m)k.push(h[w+m]);w+=a}else if(x>=g.length){if(!v)for(m=0;m<a;++m)k.push(h[w+m]);w+=a}else if(null==g[x]){for(m=0;m<a;++m)k.push(null);D=!0,x+=c}else{if(l=h[w+b],o=h[w+j],u=g[x+b],f=g[x+j],p=0,l==u){for(m=0;m<a;++m)k.push(h[w+m]);k[r+j]+=f,p=f,w+=a,x+=c}else if(l>u){if(v&&w>0&&null!=h[w-a]){for(e=o+(h[w-a+j]-o)*(u-l)/(h[w-a+b]-l),k.push(u),k.push(e+f),m=2;m<a;++m)k.push(h[w+m]);p=f}x+=c}else{if(D&&v){w+=a;continue}for(m=0;m<a;++m)k.push(h[w+m]);v&&x>0&&null!=g[x-c]&&(p=f+(g[x-c+j]-f)*(l-u)/(g[x-c+b]-u)),k[r+j]+=p,w+=a}D=!1,r!=k.length&&d&&(k[r+2]+=p)}if(y&&r!=k.length&&r>0&&null!=k[r]&&k[r]!=k[r-a]&&k[r+1]!=k[r-a+1]){for(m=0;m<a;++m)k[r+a+m]=k[r+m];k[r+1]=k[r-a+1]}}t.points=k}}})},options:{series:{stack:null}},name:"stack",version:"1.2"})}();