text: function setMetrics(e){$("#audience-data_visits").html(e.overview.sessions),$("#audience-data_visitors").html(e.overview.users),$("#audience-data_pageviews").html(e.overview.pageViews),$("#audience-data_pages_per_visit").html(e.overview.pagesPerSession),$("#audience-data_avg_visit_duration").html(e.overview.avgSessionDuration),$("#audience-data_new_users").html(e.overview.newUsers),0==e.goals.length?$(".dashboard-chart-list").removeClass("dashboard-chart-list__sidebar"):$(".dashboard-chart-list").addClass("dashboard-chart-list__sidebar")}
  $(function(){function a(a,e){$("#data_overview").addClass("dashboard__content--loading"),$(".dashboard-tabs__item").removeClass("active"),$("#tab"+a).addClass("active"),$.ajax({type:"get",url:e,cache:!1,success:function(a){if(a.overview&&0!=a.overview.sessions){$("#data_no_overview").css("display","none"),$("#data_overview > .dashboard__content").css("display","block"),$("#data_overview").removeClass("dashboard__content--loading"),$("#dashboard-chart--audience").html("");var e=100;a.overview.chartDataMaxValue<100&&(e=10);new Morris.Area({element:"dashboard-chart--audience",lineWidth:1,lineColors:["#8ac9e1","#ce77b6","#ee9c27","#d13f37"],fillOpacity:".9",hideHover:"auto",pointSize:0,data:a.overview.chartData,xkey:"timestamp",ykeys:["pageviews","sessions","users","newusers"],labels:["Pageviews","Sessions","Users","New Sessions"],behaveLikeLine:!0,gridTextColor:"#a7a7a7",smooth:!0,resize:!0,redraw:!0,ymax:Math.ceil(a.overview.chartDataMaxValue/e)*e});setMetrics(a),setGoals(a)}else $("#data_no_overview").css("display","block"),$("#data_overview > .dashboard__content").css("display","none"),$("#data_overview").removeClass("dashboard__content--loading")}})}var e=$(".dashboard-tabs__item:nth-child(2) > a");a(e.attr("data-id"),e.attr("data-path")),$(".dashboard-tabs__item").on("click",function(){a($(this).find(".dashboard-tabs__controller").attr("data-id"),$(this).find(".dashboard-tabs__controller").attr("data-path"))}),$("#segment-menu select").change(function(){var a=$(this).find("option:selected").attr("data-segment-id"),e=$(this).find("option:selected").attr("data-config-id");a&&(location.href="#"!=a?"?segment="+a+"&config="+e:"?config="+e)}),$(".dashboard_update").click(function(){var a=$(this).attr("data-path");$(".dashboard_update").html("Updating..."),$(".dashboard_update").attr("disabled","disabled"),$.ajax({type:"get",url:a,success:function(a){location.reload()},error:function(){location.reload()}})})});
  function setGoals(a){if(!$("#disable-goals").attr("data-disable-goals")){$(".dashboard-goals-list").attr("style","display:none;"),$("#goalOverview"+a.overview.id).attr("style","display:block;");for(var o=0;o<a.goals.length;o++)addGoalBox(a,o)}}function addGoalBox(a,o){$("#goal"+a.goals[o].id+" .dashboard-goals-list__chart").html("");var l=$("#goal"+a.goals[o].id+" .dashboard-goals-list__chart");$("#goal"+a.goals[o].id+" .dashboard-goals-list__item__title").html(a.goals[o].name),$("#goal"+a.goals[o].id+" .dashboard-goals-list__item__number").html("<strong>"+a.goals[o].visits+"</strong>"),new Morris.Area({element:l,lineWidth:2,lineColors:["#8ac9e1"],fillOpacity:".9",hideHover:"auto",pointSize:0,data:a.goals[o].chartData,xkey:"timestamp",ykeys:["conversions"],labels:["Conversions"],gridTextSize:10,gridTextColor:"#a7a7a7",resize:!0,redraw:!0})}
  (function(){var t,i,e,o,n=[].slice,s=function(t,i){return function(){return t.apply(i,arguments)}},r={}.hasOwnProperty,h=function(t,i){function e(){this.constructor=t}for(var o in i)r.call(i,o)&&(t[o]=i[o]);return e.prototype=i.prototype,t.prototype=new e,t.__super__=i.prototype,t},a=[].indexOf||function(t){for(var i=0,e=this.length;i<e;i++)if(i in this&&this[i]===t)return i;return-1};i=window.Morris={},t=jQuery,i.EventEmitter=function(){function t(){}return t.prototype.on=function(t,i){return null==this.handlers&&(this.handlers={}),null==this.handlers[t]&&(this.handlers[t]=[]),this.handlers[t].push(i),this},t.prototype.fire=function(){var t,i,e,o,s,r,h;if(e=arguments[0],t=2<=arguments.length?n.call(arguments,1):[],null!=this.handlers&&null!=this.handlers[e]){for(r=this.handlers[e],h=[],o=0,s=r.length;o<s;o++)i=r[o],h.push(i.apply(null,t));return h}},t}(),i.commas=function(t){var i,e,o,n;return null!=t?(o=t<0?"-":"",i=Math.abs(t),e=Math.floor(i).toFixed(0),o+=e.replace(/(?=(?:\d{3})+$)(?!^)/g,","),n=i.toString(),n.length>e.length&&(o+=n.slice(e.length)),o):"-"},i.pad2=function(t){return(t<10?"0":"")+t},i.Grid=function(e){function o(i){this.resizeHandler=s(this.resizeHandler,this);var e=this;if("string"==typeof i.element?this.el=t(document.getElementById(i.element)):this.el=t(i.element),null==this.el||0===this.el.length)throw new Error("Graph container element not found");"static"===this.el.css("position")&&this.el.css("position","relative"),this.options=t.extend({},this.gridDefaults,this.defaults||{},i),"string"==typeof this.options.units&&(this.options.postUnits=i.units),this.raphael=new Raphael(this.el[0]),this.elementWidth=null,this.elementHeight=null,this.dirty=!1,this.selectFrom=null,this.init&&this.init(),this.setData(this.options.data),this.el.bind("mousemove",function(t){var i,o,n,s,r;return o=e.el.offset(),r=t.pageX-o.left,e.selectFrom?(i=e.data[e.hitTest(Math.min(r,e.selectFrom))]._x,n=e.data[e.hitTest(Math.max(r,e.selectFrom))]._x,s=n-i,e.selectionRect.attr({x:i,width:s})):e.fire("hovermove",r,t.pageY-o.top)}),this.el.bind("mouseleave",function(t){return e.selectFrom&&(e.selectionRect.hide(),e.selectFrom=null),e.fire("hoverout")}),this.el.bind("touchstart touchmove touchend",function(t){var i,o;return o=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0],i=e.el.offset(),e.fire("hover",o.pageX-i.left,o.pageY-i.top),o}),this.el.bind("click",function(t){var i;return i=e.el.offset(),e.fire("gridclick",t.pageX-i.left,t.pageY-i.top)}),this.options.rangeSelect&&(this.selectionRect=this.raphael.rect(0,0,0,this.el.innerHeight()).attr({fill:this.options.rangeSelectColor,stroke:!1}).toBack().hide(),this.el.bind("mousedown",function(t){var i;return i=e.el.offset(),e.startRange(t.pageX-i.left)}),this.el.bind("mouseup",function(t){var i;return i=e.el.offset(),e.endRange(t.pageX-i.left),e.fire("hovermove",t.pageX-i.left,t.pageY-i.top)})),this.options.resize&&t(window).bind("resize",function(t){return null!=e.timeoutId&&window.clearTimeout(e.timeoutId),e.timeoutId=window.setTimeout(e.resizeHandler,100)}),this.postInit&&this.postInit()}return h(o,e),o.prototype.gridDefaults={dateFormat:null,axes:!0,grid:!0,gridLineColor:"#aaa",gridStrokeWidth:.5,gridTextColor:"#888",gridTextSize:12,gridTextFamily:"sans-serif",gridTextWeight:"normal",hideHover:!1,yLabelFormat:null,xLabelAngle:0,numLines:5,padding:25,parseTime:!0,postUnits:"",preUnits:"",ymax:"auto",ymin:"auto 0",goals:[],goalStrokeWidth:1,goalLineColors:["#666633","#999966","#cc6666","#663333"],events:[],eventStrokeWidth:1,eventLineColors:["#005a04","#ccffbb","#3a5f0b","#005502"],rangeSelect:null,rangeSelectColor:"#eef",resize:!1},o.prototype.setData=function(t,e){var o,n,s,r,h,a,l,p,u,c,d,f,g,m,y;return null==e&&(e=!0),this.options.data=t,null==t||0===t.length?(this.data=[],this.raphael.clear(),void(null!=this.hover&&this.hover.hide())):(f=this.cumulative?0:null,g=this.cumulative?0:null,this.options.goals.length>0&&(h=Math.min.apply(Math,this.options.goals),r=Math.max.apply(Math,this.options.goals),g=null!=g?Math.min(g,h):h,f=null!=f?Math.max(f,r):r),this.data=function(){var e,o,r;for(r=[],s=e=0,o=t.length;e<o;s=++e)l=t[s],a={src:l},a.label=l[this.options.xkey],this.options.parseTime?(a.x=i.parseDate(a.label),this.options.dateFormat?a.label=this.options.dateFormat(a.x):"number"==typeof a.label&&(a.label=new Date(a.label).toString())):(a.x=s,this.options.xLabelFormat&&(a.label=this.options.xLabelFormat(a))),u=0,a.y=function(){var t,i,e,o;for(e=this.options.ykeys,o=[],n=t=0,i=e.length;t<i;n=++t)d=e[n],m=l[d],"string"==typeof m&&(m=parseFloat(m)),null!=m&&"number"!=typeof m&&(m=null),null!=m&&(this.cumulative?u+=m:null!=f?(f=Math.max(m,f),g=Math.min(m,g)):f=g=m),this.cumulative&&null!=u&&(f=Math.max(u,f),g=Math.min(u,g)),o.push(m);return o}.call(this),r.push(a);return r}.call(this),this.options.parseTime&&(this.data=this.data.sort(function(t,i){return(t.x>i.x)-(i.x>t.x)})),this.xmin=this.data[0].x,this.xmax=this.data[this.data.length-1].x,this.events=[],this.options.events.length>0&&(this.options.parseTime?this.events=function(){var t,e,n,s;for(n=this.options.events,s=[],t=0,e=n.length;t<e;t++)o=n[t],s.push(i.parseDate(o));return s}.call(this):this.events=this.options.events,this.xmax=Math.max(this.xmax,Math.max.apply(Math,this.events)),this.xmin=Math.min(this.xmin,Math.min.apply(Math,this.events))),this.xmin===this.xmax&&(this.xmin-=1,this.xmax+=1),this.ymin=this.yboundary("min",g),this.ymax=this.yboundary("max",f),this.ymin===this.ymax&&(g&&(this.ymin-=1),this.ymax+=1),!0!==(y=this.options.axes)&&"both"!==y&&"y"!==y&&!0!==this.options.grid||(this.options.ymax===this.gridDefaults.ymax&&this.options.ymin===this.gridDefaults.ymin?(this.grid=this.autoGridLines(this.ymin,this.ymax,this.options.numLines),this.ymin=Math.min(this.ymin,this.grid[0]),this.ymax=Math.max(this.ymax,this.grid[this.grid.length-1])):(p=(this.ymax-this.ymin)/(this.options.numLines-1),this.grid=function(){var t,i,e;for(e=[],c=t=this.ymin,i=this.ymax;p>0?t<=i:t>=i;c=t+=p)e.push(c);return e}.call(this))),this.dirty=!0,e?this.redraw():void 0)},o.prototype.yboundary=function(t,i){var e,o;return e=this.options["y"+t],"string"==typeof e?"auto"===e.slice(0,4)?e.length>5?(o=parseInt(e.slice(5),10),null==i?o:Math[t](i,o)):null!=i?i:0:parseInt(e,10):e},o.prototype.autoGridLines=function(t,i,e){var o,n,s,r,h,a,l,p,u;return h=i-t,u=Math.floor(Math.log(h)/Math.log(10)),l=Math.pow(10,u),n=Math.floor(t/l)*l,o=Math.ceil(i/l)*l,a=(o-n)/(e-1),1===l&&a>1&&Math.ceil(a)!==a&&(a=Math.ceil(a),o=n+a*(e-1)),n<0&&o>0&&(n=Math.floor(t/a)*a,o=Math.ceil(i/a)*a),a<1?(r=Math.floor(Math.log(a)/Math.log(10)),s=function(){var t,i;for(i=[],p=t=n;a>0?t<=o:t>=o;p=t+=a)i.push(parseFloat(p.toFixed(1-r)));return i}()):s=function(){var t,i;for(i=[],p=t=n;a>0?t<=o:t>=o;p=t+=a)i.push(p);return i}(),s},o.prototype._calc=function(){var t,i,e,o,n,s,r,h;if(n=this.el.width(),e=this.el.height(),(this.elementWidth!==n||this.elementHeight!==e||this.dirty)&&(this.elementWidth=n,this.elementHeight=e,this.dirty=!1,this.left=this.options.padding,this.right=this.elementWidth-this.options.padding,this.top=this.options.padding,this.bottom=this.elementHeight-this.options.padding,!0!==(r=this.options.axes)&&"both"!==r&&"y"!==r||(s=function(){var t,e,o,n;for(o=this.grid,n=[],t=0,e=o.length;t<e;t++)i=o[t],n.push(this.measureText(this.yAxisFormat(i)).width);return n}.call(this),this.left+=Math.max.apply(Math,s)),!0!==(h=this.options.axes)&&"both"!==h&&"x"!==h||(t=function(){var t,i,e;for(e=[],o=t=0,i=this.data.length;0<=i?t<i:t>i;o=0<=i?++t:--t)e.push(this.measureText(this.data[o].text,-this.options.xLabelAngle).height);return e}.call(this),this.bottom-=Math.max.apply(Math,t)),this.width=Math.max(1,this.right-this.left),this.height=Math.max(1,this.bottom-this.top),this.dx=this.width/(this.xmax-this.xmin),this.dy=this.height/(this.ymax-this.ymin),this.calc))return this.calc()},o.prototype.transY=function(t){return this.bottom-(t-this.ymin)*this.dy},o.prototype.transX=function(t){return 1===this.data.length?(this.left+this.right)/2:this.left+(t-this.xmin)*this.dx},o.prototype.redraw=function(){if(this.raphael.clear(),this._calc(),this.drawGrid(),this.drawGoals(),this.drawEvents(),this.draw)return this.draw()},o.prototype.measureText=function(t,i){var e,o;return null==i&&(i=0),o=this.raphael.text(100,100,t).attr("font-size",this.options.gridTextSize).attr("font-family",this.options.gridTextFamily).attr("font-weight",this.options.gridTextWeight).rotate(i),e=o.getBBox(),o.remove(),e},o.prototype.yAxisFormat=function(t){return this.yLabelFormat(t)},o.prototype.yLabelFormat=function(t){return"function"==typeof this.options.yLabelFormat?this.options.yLabelFormat(t):""+this.options.preUnits+i.commas(t)+this.options.postUnits},o.prototype.drawGrid=function(){var t,i,e,o,n,s,r,h;if(!1!==this.options.grid||!0===(n=this.options.axes)||"both"===n||"y"===n){for(s=this.grid,h=[],e=0,o=s.length;e<o;e++)t=s[e],i=this.transY(t),!0!==(r=this.options.axes)&&"both"!==r&&"y"!==r||this.drawYAxisLabel(this.left-this.options.padding/2,i,this.yAxisFormat(t)),this.options.grid?h.push(this.drawGridLine("M"+this.left+","+i+"H"+(this.left+this.width))):h.push(void 0);return h}},o.prototype.drawGoals=function(){var t,i,e,o,n,s,r;for(s=this.options.goals,r=[],e=o=0,n=s.length;o<n;e=++o)i=s[e],t=this.options.goalLineColors[e%this.options.goalLineColors.length],r.push(this.drawGoal(i,t));return r},o.prototype.drawEvents=function(){var t,i,e,o,n,s,r;for(s=this.events,r=[],e=o=0,n=s.length;o<n;e=++o)i=s[e],t=this.options.eventLineColors[e%this.options.eventLineColors.length],r.push(this.drawEvent(i,t));return r},o.prototype.drawGoal=function(t,i){return this.raphael.path("M"+this.left+","+this.transY(t)+"H"+this.right).attr("stroke",i).attr("stroke-width",this.options.goalStrokeWidth)},o.prototype.drawEvent=function(t,i){return this.raphael.path("M"+this.transX(t)+","+this.bottom+"V"+this.top).attr("stroke",i).attr("stroke-width",this.options.eventStrokeWidth)},o.prototype.drawYAxisLabel=function(t,i,e){return this.raphael.text(t,i,e).attr("font-size",this.options.gridTextSize).attr("font-family",this.options.gridTextFamily).attr("font-weight",this.options.gridTextWeight).attr("fill",this.options.gridTextColor).attr("text-anchor","end")},o.prototype.drawGridLine=function(t){return this.raphael.path(t).attr("stroke",this.options.gridLineColor).attr("stroke-width",this.options.gridStrokeWidth)},o.prototype.startRange=function(t){return this.hover.hide(),this.selectFrom=t,this.selectionRect.attr({x:t,width:0}).show()},o.prototype.endRange=function(t){var i,e;if(this.selectFrom)return e=Math.min(this.selectFrom,t),i=Math.max(this.selectFrom,t),this.options.rangeSelect.call(this.el,{start:this.data[this.hitTest(e)].x,end:this.data[this.hitTest(i)].x}),this.selectFrom=null},o.prototype.resizeHandler=function(){return this.timeoutId=null,this.raphael.setSize(this.el.width(),this.el.height()),this.redraw()},o}(i.EventEmitter),i.parseDate=function(t){var i,e,o,n,s,r,h,a,l,p,u;return"number"==typeof t?t:(e=t.match(/^(\d+) Q(\d)$/),n=t.match(/^(\d+)-(\d+)$/),s=t.match(/^(\d+)-(\d+)-(\d+)$/),h=t.match(/^(\d+) W(\d+)$/),a=t.match(/^(\d+)-(\d+)-(\d+)[ T](\d+):(\d+)(Z|([+-])(\d\d):?(\d\d))?$/),l=t.match(/^(\d+)-(\d+)-(\d+)[ T](\d+):(\d+):(\d+(\.\d+)?)(Z|([+-])(\d\d):?(\d\d))?$/),e?new Date(parseInt(e[1],10),3*parseInt(e[2],10)-1,1).getTime():n?new Date(parseInt(n[1],10),parseInt(n[2],10)-1,1).getTime():s?new Date(parseInt(s[1],10),parseInt(s[2],10)-1,parseInt(s[3],10)).getTime():h?(p=new Date(parseInt(h[1],10),0,1),4!==p.getDay()&&p.setMonth(0,1+(4-p.getDay()+7)%7),p.getTime()+6048e5*parseInt(h[2],10)):a?a[6]?(r=0,"Z"!==a[6]&&(r=60*parseInt(a[8],10)+parseInt(a[9],10),"+"===a[7]&&(r=0-r)),Date.UTC(parseInt(a[1],10),parseInt(a[2],10)-1,parseInt(a[3],10),parseInt(a[4],10),parseInt(a[5],10)+r)):new Date(parseInt(a[1],10),parseInt(a[2],10)-1,parseInt(a[3],10),parseInt(a[4],10),parseInt(a[5],10)).getTime():l?(u=parseFloat(l[6]),i=Math.floor(u),o=Math.round(1e3*(u-i)),l[8]?(r=0,"Z"!==l[8]&&(r=60*parseInt(l[10],10)+parseInt(l[11],10),"+"===l[9]&&(r=0-r)),Date.UTC(parseInt(l[1],10),parseInt(l[2],10)-1,parseInt(l[3],10),parseInt(l[4],10),parseInt(l[5],10)+r,i,o)):new Date(parseInt(l[1],10),parseInt(l[2],10)-1,parseInt(l[3],10),parseInt(l[4],10),parseInt(l[5],10),i,o).getTime()):new Date(parseInt(t,10),0,1).getTime())},i.Hover=function(){function e(e){null==e&&(e={}),this.options=t.extend({},i.Hover.defaults,e),this.el=t("<div class='"+this.options.class+"'></div>"),this.el.hide(),this.options.parent.append(this.el)}return e.defaults={class:"morris-hover morris-default-style"},e.prototype.update=function(t,i,e){return this.html(t),this.show(),this.moveTo(i,e)},e.prototype.html=function(t){return this.el.html(t)},e.prototype.moveTo=function(t,i){var e,o,n,s,r,h;return r=this.options.parent.innerWidth(),s=this.options.parent.innerHeight(),o=this.el.outerWidth(),e=this.el.outerHeight(),n=Math.min(Math.max(0,t-o/2),r-o),null!=i?(h=i-e-10)<0&&(h=i+10)+e>s&&(h=s/2-e/2):h=s/2-e/2,this.el.css({left:n+"px",top:parseInt(h)+"px"})},e.prototype.show=function(){return this.el.show()},e.prototype.hide=function(){return this.el.hide()},e}(),i.Line=function(t){function e(t){if(this.hilight=s(this.hilight,this),this.onHoverOut=s(this.onHoverOut,this),this.onHoverMove=s(this.onHoverMove,this),this.onGridClick=s(this.onGridClick,this),!(this instanceof i.Line))return new i.Line(t);e.__super__.constructor.call(this,t)}return h(e,t),e.prototype.init=function(){if("always"!==this.options.hideHover)return this.hover=new i.Hover({parent:this.el}),this.on("hovermove",this.onHoverMove),this.on("hoverout",this.onHoverOut),this.on("gridclick",this.onGridClick)},e.prototype.defaults={lineWidth:3,pointSize:4,lineColors:["#0b62a4","#7A92A3","#4da74d","#afd8f8","#edc240","#cb4b4b","#9440ed"],pointStrokeWidths:[1],pointStrokeColors:["#ffffff"],pointFillColors:[],smooth:!0,xLabels:"auto",xLabelFormat:null,xLabelMargin:24,continuousLine:!0,hideHover:!1},e.prototype.calc=function(){return this.calcPoints(),this.generatePaths()},e.prototype.calcPoints=function(){var t,i,e,o,n,s;for(n=this.data,s=[],e=0,o=n.length;e<o;e++)t=n[e],t._x=this.transX(t.x),t._y=function(){var e,o,n,s;for(n=t.y,s=[],e=0,o=n.length;e<o;e++)i=n[e],null!=i?s.push(this.transY(i)):s.push(i);return s}.call(this),s.push(t._ymax=Math.min.apply(Math,[this.bottom].concat(function(){var e,o,n,s;for(n=t._y,s=[],e=0,o=n.length;e<o;e++)null!=(i=n[e])&&s.push(i);return s}())));return s},e.prototype.hitTest=function(t){var i,e,o,n,s;if(0===this.data.length)return null;for(s=this.data.slice(1),i=o=0,n=s.length;o<n&&(e=s[i],!(t<(e._x+this.data[i]._x)/2));i=++o);return i},e.prototype.onGridClick=function(t,i){var e;return e=this.hitTest(t),this.fire("click",e,this.data[e].src,t,i)},e.prototype.onHoverMove=function(t,i){var e;return e=this.hitTest(t),this.displayHoverForRow(e)},e.prototype.onHoverOut=function(){if(!1!==this.options.hideHover)return this.displayHoverForRow(null)},e.prototype.displayHoverForRow=function(t){var i;return null!=t?((i=this.hover).update.apply(i,this.hoverContentForRow(t)),this.hilight(t)):(this.hover.hide(),this.hilight())},e.prototype.hoverContentForRow=function(t){var i,e,o,n,s,r,h;for(o=this.data[t],i="<div class='morris-hover-row-label'>"+o.label+"</div>",h=o.y,e=s=0,r=h.length;s<r;e=++s)n=h[e],i+="<div class='morris-hover-point' style='color: "+this.colorFor(o,e,"label")+"'>\n  "+this.options.labels[e]+":\n  "+this.yLabelFormat(n)+"\n</div>";return"function"==typeof this.options.hoverCallback&&(i=this.options.hoverCallback(t,this.options,i,o.src)),[i,o._x,o._ymax]},e.prototype.generatePaths=function(){var t,e,o,n,s;return this.paths=function(){var r,h,l,p;for(p=[],o=r=0,h=this.options.ykeys.length;0<=h?r<h:r>h;o=0<=h?++r:--r)s="boolean"==typeof this.options.smooth?this.options.smooth:(l=this.options.ykeys[o],a.call(this.options.smooth,l)>=0),e=function(){var t,i,e,s;for(e=this.data,s=[],t=0,i=e.length;t<i;t++)n=e[t],void 0!==n._y[o]&&s.push({x:n._x,y:n._y[o]});return s}.call(this),this.options.continuousLine&&(e=function(){var i,o,n;for(n=[],i=0,o=e.length;i<o;i++)t=e[i],null!==t.y&&n.push(t);return n}()),e.length>1?p.push(i.Line.createPath(e,s,this.bottom)):p.push(null);return p}.call(this)},e.prototype.draw=function(){var t;if(!0!==(t=this.options.axes)&&"both"!==t&&"x"!==t||this.drawXAxis(),this.drawSeries(),!1===this.options.hideHover)return this.displayHoverForRow(this.data.length-1)},e.prototype.drawXAxis=function(){var t,e,o,n,s,r,h,a,l,p,u=this;for(h=this.bottom+this.options.padding/2,s=null,n=null,t=function(t,i){var e,o,r,a,l;return e=u.drawXAxisLabel(u.transX(i),h,t),l=e.getBBox(),e.transform("r"+-u.options.xLabelAngle),o=e.getBBox(),e.transform("t0,"+o.height/2+"..."),0!==u.options.xLabelAngle&&(a=-.5*l.width*Math.cos(u.options.xLabelAngle*Math.PI/180),e.transform("t"+a+",0...")),o=e.getBBox(),(null==s||s>=o.x+o.width||null!=n&&n>=o.x)&&o.x>=0&&o.x+o.width<u.el.width()?(0!==u.options.xLabelAngle&&(r=1.25*u.options.gridTextSize/Math.sin(u.options.xLabelAngle*Math.PI/180),n=o.x-r),s=o.x-u.options.xLabelMargin):e.remove()},o=this.options.parseTime?1===this.data.length&&"auto"===this.options.xLabels?[[this.data[0].label,this.data[0].x]]:i.labelSeries(this.xmin,this.xmax,this.width,this.options.xLabels,this.options.xLabelFormat):function(){var t,i,e,o;for(e=this.data,o=[],t=0,i=e.length;t<i;t++)r=e[t],o.push([r.label,r.x]);return o}.call(this),o.reverse(),p=[],a=0,l=o.length;a<l;a++)e=o[a],p.push(t(e[0],e[1]));return p},e.prototype.drawSeries=function(){var t,i,e,o,n,s;for(this.seriesPoints=[],t=i=o=this.options.ykeys.length-1;o<=0?i<=0:i>=0;t=o<=0?++i:--i)this._drawLineFor(t);for(s=[],t=e=n=this.options.ykeys.length-1;n<=0?e<=0:e>=0;t=n<=0?++e:--e)s.push(this._drawPointFor(t));return s},e.prototype._drawPointFor=function(t){var i,e,o,n,s,r;for(this.seriesPoints[t]=[],s=this.data,r=[],o=0,n=s.length;o<n;o++)e=s[o],i=null,null!=e._y[t]&&(i=this.drawLinePoint(e._x,e._y[t],this.colorFor(e,t,"point"),t)),r.push(this.seriesPoints[t].push(i));return r},e.prototype._drawLineFor=function(t){var i;if(null!==(i=this.paths[t]))return this.drawLinePath(i,this.colorFor(null,t,"line"),t)},e.createPath=function(t,e,o){var n,s,r,h,a,l,p,u,c,d,f,g,m,y;for(p="",e&&(r=i.Line.gradients(t)),u={y:null},h=m=0,y=t.length;m<y;h=++m)n=t[h],null!=n.y&&(null!=u.y?e?(s=r[h],l=r[h-1],a=(n.x-u.x)/4,c=u.x+a,f=Math.min(o,u.y+a*l),d=n.x-a,g=Math.min(o,n.y-a*s),p+="C"+c+","+f+","+d+","+g+","+n.x+","+n.y):p+="L"+n.x+","+n.y:e&&null==r[h]||(p+="M"+n.x+","+n.y)),u=n;return p},e.gradients=function(t){var i,e,o,n,s,r,h,a;for(e=function(t,i){return(t.y-i.y)/(t.x-i.x)},a=[],o=r=0,h=t.length;r<h;o=++r)i=t[o],null!=i.y?(n=t[o+1]||{y:null},s=t[o-1]||{y:null},null!=s.y&&null!=n.y?a.push(e(s,n)):null!=s.y?a.push(e(s,i)):null!=n.y?a.push(e(i,n)):a.push(null)):a.push(null);return a},e.prototype.hilight=function(t){var i,e,o,n,s;if(null!==this.prevHilight&&this.prevHilight!==t)for(i=e=0,n=this.seriesPoints.length-1;0<=n?e<=n:e>=n;i=0<=n?++e:--e)this.seriesPoints[i][this.prevHilight]&&this.seriesPoints[i][this.prevHilight].animate(this.pointShrinkSeries(i));if(null!==t&&this.prevHilight!==t)for(i=o=0,s=this.seriesPoints.length-1;0<=s?o<=s:o>=s;i=0<=s?++o:--o)this.seriesPoints[i][t]&&this.seriesPoints[i][t].animate(this.pointGrowSeries(i));return this.prevHilight=t},e.prototype.colorFor=function(t,i,e){return"function"==typeof this.options.lineColors?this.options.lineColors.call(this,t,i,e):"point"===e?this.options.pointFillColors[i%this.options.pointFillColors.length]||this.options.lineColors[i%this.options.lineColors.length]:this.options.lineColors[i%this.options.lineColors.length]},e.prototype.drawXAxisLabel=function(t,i,e){return this.raphael.text(t,i,e).attr("font-size",this.options.gridTextSize).attr("font-family",this.options.gridTextFamily).attr("font-weight",this.options.gridTextWeight).attr("fill",this.options.gridTextColor)},e.prototype.drawLinePath=function(t,i,e){return this.raphael.path(t).attr("stroke",i).attr("stroke-width",this.lineWidthForSeries(e))},e.prototype.drawLinePoint=function(t,i,e,o){return this.raphael.circle(t,i,this.pointSizeForSeries(o)).attr("fill",e).attr("stroke-width",this.pointStrokeWidthForSeries(o)).attr("stroke",this.pointStrokeColorForSeries(o))},e.prototype.pointStrokeWidthForSeries=function(t){return this.options.pointStrokeWidths[t%this.options.pointStrokeWidths.length]},e.prototype.pointStrokeColorForSeries=function(t){return this.options.pointStrokeColors[t%this.options.pointStrokeColors.length]},e.prototype.lineWidthForSeries=function(t){return this.options.lineWidth instanceof Array?this.options.lineWidth[t%this.options.lineWidth.length]:this.options.lineWidth},e.prototype.pointSizeForSeries=function(t){return this.options.pointSize instanceof Array?this.options.pointSize[t%this.options.pointSize.length]:this.options.pointSize},e.prototype.pointGrowSeries=function(t){return Raphael.animation({r:this.pointSizeForSeries(t)+3},25,"linear")},e.prototype.pointShrinkSeries=function(t){return Raphael.animation({r:this.pointSizeForSeries(t)},25,"linear")},e}(i.Grid),i.labelSeries=function(e,o,n,s,r){var h,a,l,p,u,c,d,f,g,m,y;if(l=200*(o-e)/n,a=new Date(e),void 0===(d=i.LABEL_SPECS[s]))for(y=i.AUTO_LABEL_ORDER,g=0,m=y.length;g<m;g++)if(p=y[g],c=i.LABEL_SPECS[p],l>=c.span){d=c;break}for(void 0===d&&(d=i.LABEL_SPECS.second),r&&(d=t.extend({},d,{fmt:r})),h=d.start(a),u=[];(f=h.getTime())<=o;)f>=e&&u.push([d.fmt(h),f]),d.incr(h);return u},e=function(t){return{span:60*t*1e3,start:function(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours())},fmt:function(t){return i.pad2(t.getHours())+":"+i.pad2(t.getMinutes())},incr:function(i){return i.setUTCMinutes(i.getUTCMinutes()+t)}}},o=function(t){return{span:1e3*t,start:function(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes())},fmt:function(t){return i.pad2(t.getHours())+":"+i.pad2(t.getMinutes())+":"+i.pad2(t.getSeconds())},incr:function(i){return i.setUTCSeconds(i.getUTCSeconds()+t)}}},i.LABEL_SPECS={decade:{span:1728e8,start:function(t){return new Date(t.getFullYear()-t.getFullYear()%10,0,1)},fmt:function(t){return""+t.getFullYear()},incr:function(t){return t.setFullYear(t.getFullYear()+10)}},year:{span:1728e7,start:function(t){return new Date(t.getFullYear(),0,1)},fmt:function(t){return""+t.getFullYear()},incr:function(t){return t.setFullYear(t.getFullYear()+1)}},month:{span:24192e5,start:function(t){return new Date(t.getFullYear(),t.getMonth(),1)},fmt:function(t){return t.getFullYear()+"-"+i.pad2(t.getMonth()+1)},incr:function(t){return t.setMonth(t.getMonth()+1)}},week:{span:6048e5,start:function(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate())},fmt:function(t){return t.getFullYear()+"-"+i.pad2(t.getMonth()+1)+"-"+i.pad2(t.getDate())},incr:function(t){return t.setDate(t.getDate()+7)}},day:{span:864e5,start:function(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate())},fmt:function(t){return t.getFullYear()+"-"+i.pad2(t.getMonth()+1)+"-"+i.pad2(t.getDate())},incr:function(t){return t.setDate(t.getDate()+1)}},hour:e(60),"30min":e(30),"15min":e(15),"10min":e(10),"5min":e(5),minute:e(1),"30sec":o(30),"15sec":o(15),"10sec":o(10),"5sec":o(5),second:o(1)},i.AUTO_LABEL_ORDER=["decade","year","month","week","day","hour","30min","15min","10min","5min","minute","30sec","15sec","10sec","5sec","second"],i.Area=function(e){function o(e){var s;if(!(this instanceof i.Area))return new i.Area(e);s=t.extend({},n,e),this.cumulative=!s.behaveLikeLine,"auto"===s.fillOpacity&&(s.fillOpacity=s.behaveLikeLine?.8:1),o.__super__.constructor.call(this,s)}var n;return h(o,e),n={fillOpacity:"auto",behaveLikeLine:!1},o.prototype.calcPoints=function(){var t,i,e,o,n,s,r;for(s=this.data,r=[],o=0,n=s.length;o<n;o++)t=s[o],t._x=this.transX(t.x),i=0,t._y=function(){var o,n,s,r;for(s=t.y,r=[],o=0,n=s.length;o<n;o++)e=s[o],this.options.behaveLikeLine?r.push(this.transY(e)):(i+=e||0,r.push(this.transY(i)));return r}.call(this),r.push(t._ymax=Math.max.apply(Math,t._y));return r},o.prototype.drawSeries=function(){var t,i,e,o,n,s,r,h;for(this.seriesPoints=[],i=this.options.behaveLikeLine?function(){s=[];for(var t=0,i=this.options.ykeys.length-1;0<=i?t<=i:t>=i;0<=i?t++:t--)s.push(t);return s}.apply(this):function(){r=[];for(var t=n=this.options.ykeys.length-1;n<=0?t<=0:t>=0;n<=0?t++:t--)r.push(t);return r}.apply(this),h=[],e=0,o=i.length;e<o;e++)t=i[e],this._drawFillFor(t),this._drawLineFor(t),h.push(this._drawPointFor(t));return h},o.prototype._drawFillFor=function(t){var i;if(null!==(i=this.paths[t]))return i=i+"L"+this.transX(this.xmax)+","+this.bottom+"L"+this.transX(this.xmin)+","+this.bottom+"Z",this.drawFilledPath(i,this.fillForSeries(t))},o.prototype.fillForSeries=function(t){var i;return i=Raphael.rgb2hsl(this.colorFor(this.data[t],t,"line")),Raphael.hsl(i.h,this.options.behaveLikeLine?.9*i.s:.75*i.s,Math.min(.98,this.options.behaveLikeLine?1.2*i.l:1.25*i.l))},o.prototype.drawFilledPath=function(t,i){return this.raphael.path(t).attr("fill",i).attr("fill-opacity",this.options.fillOpacity).attr("stroke","none")},o}(i.Line),i.Bar=function(e){function o(e){if(this.onHoverOut=s(this.onHoverOut,this),this.onHoverMove=s(this.onHoverMove,this),this.onGridClick=s(this.onGridClick,this),!(this instanceof i.Bar))return new i.Bar(e);o.__super__.constructor.call(this,t.extend({},e,{parseTime:!1}))}return h(o,e),o.prototype.init=function(){if(this.cumulative=this.options.stacked,"always"!==this.options.hideHover)return this.hover=new i.Hover({parent:this.el}),this.on("hovermove",this.onHoverMove),this.on("hoverout",this.onHoverOut),this.on("gridclick",this.onGridClick)},o.prototype.defaults={barSizeRatio:.75,barGap:3,barColors:["#0b62a4","#7a92a3","#4da74d","#afd8f8","#edc240","#cb4b4b","#9440ed"],barOpacity:1,barRadius:[0,0,0,0],xLabelMargin:50},o.prototype.calc=function(){var t;if(this.calcBars(),!1===this.options.hideHover)return(t=this.hover).update.apply(t,this.hoverContentForRow(this.data.length-1))},o.prototype.calcBars=function(){var t,i,e,o,n,s,r;for(s=this.data,r=[],t=o=0,n=s.length;o<n;t=++o)i=s[t],i._x=this.left+this.width*(t+.5)/this.data.length,r.push(i._y=function(){var t,o,n,s;for(n=i.y,s=[],t=0,o=n.length;t<o;t++)e=n[t],null!=e?s.push(this.transY(e)):s.push(null);return s}.call(this));return r},o.prototype.draw=function(){var t;return!0!==(t=this.options.axes)&&"both"!==t&&"x"!==t||this.drawXAxis(),this.drawSeries()},o.prototype.drawXAxis=function(){var t,i,e,o,n,s,r,h,a,l,p,u,c;for(l=this.bottom+(this.options.xAxisLabelTopPadding||this.options.padding/2),r=null,s=null,c=[],t=p=0,u=this.data.length;0<=u?p<u:p>u;t=0<=u?++p:--p)h=this.data[this.data.length-1-t],i=this.drawXAxisLabel(h._x,l,h.label),a=i.getBBox(),i.transform("r"+-this.options.xLabelAngle),e=i.getBBox(),i.transform("t0,"+e.height/2+"..."),0!==this.options.xLabelAngle&&(n=-.5*a.width*Math.cos(this.options.xLabelAngle*Math.PI/180),i.transform("t"+n+",0...")),(null==r||r>=e.x+e.width||null!=s&&s>=e.x)&&e.x>=0&&e.x+e.width<this.el.width()?(0!==this.options.xLabelAngle&&(o=1.25*this.options.gridTextSize/Math.sin(this.options.xLabelAngle*Math.PI/180),s=e.x-o),c.push(r=e.x-this.options.xLabelMargin)):c.push(i.remove());return c},o.prototype.drawSeries=function(){var t,i,e,o,n,s,r,h,a,l,p,u,c,d,f;return e=this.width/this.options.data.length,h=null!=this.options.stacked?1:this.options.ykeys.length,t=(e*this.options.barSizeRatio-this.options.barGap*(h-1))/h,this.options.barSize&&(t=Math.min(t,this.options.barSize)),u=e-t*h-this.options.barGap*(h-1),r=u/2,f=this.ymin<=0&&this.ymax>=0?this.transY(0):null,this.bars=function(){var h,u,g,m;for(g=this.data,m=[],o=h=0,u=g.length;h<u;o=++h)a=g[o],n=0,m.push(function(){var h,u,g,m;for(g=a._y,m=[],l=h=0,u=g.length;h<u;l=++h)d=g[l],null!==d?(f?(c=Math.min(d,f),i=Math.max(d,f)):(c=d,i=this.bottom),s=this.left+o*e+r,this.options.stacked||(s+=l*(t+this.options.barGap)),p=i-c,this.options.stacked&&(c-=n),this.drawBar(s,c,t,p,this.colorFor(a,l,"bar"),this.options.barOpacity,this.options.barRadius),m.push(n+=p)):m.push(null);return m}.call(this));return m}.call(this)},o.prototype.colorFor=function(t,i,e){var o,n;return"function"==typeof this.options.barColors?(o={x:t.x,y:t.y[i],label:t.label},n={index:i,key:this.options.ykeys[i],label:this.options.labels[i]},this.options.barColors.call(this,o,n,e)):this.options.barColors[i%this.options.barColors.length]},o.prototype.hitTest=function(t){return 0===this.data.length?null:(t=Math.max(Math.min(t,this.right),this.left),Math.min(this.data.length-1,Math.floor((t-this.left)/(this.width/this.data.length))))},o.prototype.onGridClick=function(t,i){var e;return e=this.hitTest(t),this.fire("click",e,this.data[e].src,t,i)},o.prototype.onHoverMove=function(t,i){var e,o;return e=this.hitTest(t),(o=this.hover).update.apply(o,this.hoverContentForRow(e))},o.prototype.onHoverOut=function(){if(!1!==this.options.hideHover)return this.hover.hide()},o.prototype.hoverContentForRow=function(t){var i,e,o,n,s,r,h,a;for(o=this.data[t],i="<div class='morris-hover-row-label'>"+o.label+"</div>",a=o.y,e=r=0,h=a.length;r<h;e=++r)s=a[e],i+="<div class='morris-hover-point' style='color: "+this.colorFor(o,e,"label")+"'>\n  "+this.options.labels[e]+":\n  "+this.yLabelFormat(s)+"\n</div>";return"function"==typeof this.options.hoverCallback&&(i=this.options.hoverCallback(t,this.options,i,o.src)),n=this.left+(t+.5)*this.width/this.data.length,[i,n]},o.prototype.drawXAxisLabel=function(t,i,e){return this.raphael.text(t,i,e).attr("font-size",this.options.gridTextSize).attr("font-family",this.options.gridTextFamily).attr("font-weight",this.options.gridTextWeight).attr("fill",this.options.gridTextColor)},o.prototype.drawBar=function(t,i,e,o,n,s,r){var h,a;return h=Math.max.apply(Math,r),a=0===h||h>o?this.raphael.rect(t,i,e,o):this.raphael.path(this.roundedRect(t,i,e,o,r)),a.attr("fill",n).attr("fill-opacity",s).attr("stroke","none")},o.prototype.roundedRect=function(t,i,e,o,n){return null==n&&(n=[0,0,0,0]),["M",t,n[0]+i,"Q",t,i,t+n[0],i,"L",t+e-n[1],i,"Q",t+e,i,t+e,i+n[1],"L",t+e,i+o-n[2],"Q",t+e,i+o,t+e-n[2],i+o,"L",t+n[3],i+o,"Q",t,i+o,t,i+o-n[3],"Z"]},o}(i.Grid),i.Donut=function(e){function o(e){this.resizeHandler=s(this.resizeHandler,this),this.select=s(this.select,this),this.click=s(this.click,this);var o=this;if(!(this instanceof i.Donut))return new i.Donut(e);if(this.options=t.extend({},this.defaults,e),"string"==typeof e.element?this.el=t(document.getElementById(e.element)):this.el=t(e.element),null===this.el||0===this.el.length)throw new Error("Graph placeholder not found.");void 0!==e.data&&0!==e.data.length&&(this.raphael=new Raphael(this.el[0]),this.options.resize&&t(window).bind("resize",function(t){return null!=o.timeoutId&&window.clearTimeout(o.timeoutId),o.timeoutId=window.setTimeout(o.resizeHandler,100)}),this.setData(e.data))}return h(o,e),o.prototype.defaults={colors:["#0B62A4","#3980B5","#679DC6","#95BBD7","#B0CCE1","#095791","#095085","#083E67","#052C48","#042135"],backgroundColor:"#FFFFFF",labelColor:"#000000",formatter:i.commas,resize:!1},o.prototype.redraw=function(){var t,e,o,n,s,r,h,a,l,p,u,c,d,f,g,m,y,v,x,w,b,M,F;for(this.raphael.clear(),e=this.el.width()/2,o=this.el.height()/2,d=(Math.min(e,o)-10)/3,u=0,w=this.values,f=0,y=w.length;f<y;f++)c=w[f],u+=c;for(a=5/(2*d),t=1.9999*Math.PI-a*this.data.length,r=0,s=0,this.segments=[],b=this.values,n=g=0,v=b.length;g<v;n=++g)c=b[n],l=r+a+t*(c/u),p=new i.DonutSegment(e,o,2*d,d,r,l,this.data[n].color||this.options.colors[s%this.options.colors.length],this.options.backgroundColor,s,this.raphael),p.render(),this.segments.push(p),p.on("hover",this.select),p.on("click",this.click),r=l,s+=1;for(this.text1=this.drawEmptyDonutLabel(e,o-10,this.options.labelColor,15,800),this.text2=this.drawEmptyDonutLabel(e,o+10,this.options.labelColor,14),h=Math.max.apply(Math,this.values),s=0,M=this.values,F=[],m=0,x=M.length;m<x;m++){if((c=M[m])===h){this.select(s);break}F.push(s+=1)}return F},
  o.prototype.setData=function(t){var i;return this.data=t,this.values=function(){var t,e,o,n;for(o=this.data,n=[],t=0,e=o.length;t<e;t++)i=o[t],n.push(parseFloat(i.value));return n}.call(this),this.redraw()},o.prototype.click=function(t){return this.fire("click",t,this.data[t])},o.prototype.select=function(t){var i,e,o,n,s,r;for(r=this.segments,n=0,s=r.length;n<s;n++)e=r[n],e.deselect();return o=this.segments[t],o.select(),i=this.data[t],this.setLabels(i.label,this.options.formatter(i.value,i))},o.prototype.setLabels=function(t,i){var e,o,n,s,r,h,a,l;return e=2*(Math.min(this.el.width()/2,this.el.height()/2)-10)/3,s=1.8*e,n=e/2,o=e/3,this.text1.attr({text:t,transform:""}),r=this.text1.getBBox(),h=Math.min(s/r.width,n/r.height),this.text1.attr({transform:"S"+h+","+h+","+(r.x+r.width/2)+","+(r.y+r.height)}),this.text2.attr({text:i,transform:""}),a=this.text2.getBBox(),l=Math.min(s/a.width,o/a.height),this.text2.attr({transform:"S"+l+","+l+","+(a.x+a.width/2)+","+a.y})},o.prototype.drawEmptyDonutLabel=function(t,i,e,o,n){var s;return s=this.raphael.text(t,i,"").attr("font-size",o).attr("fill",e),null!=n&&s.attr("font-weight",n),s},o.prototype.resizeHandler=function(){return this.timeoutId=null,this.raphael.setSize(this.el.width(),this.el.height()),this.redraw()},o}(i.EventEmitter),i.DonutSegment=function(t){function i(t,i,e,o,n,r,h,a,l,p){this.cx=t,this.cy=i,this.inner=e,this.outer=o,this.color=h,this.backgroundColor=a,this.index=l,this.raphael=p,this.deselect=s(this.deselect,this),this.select=s(this.select,this),this.sin_p0=Math.sin(n),this.cos_p0=Math.cos(n),this.sin_p1=Math.sin(r),this.cos_p1=Math.cos(r),this.is_long=r-n>Math.PI?1:0,this.path=this.calcSegment(this.inner+3,this.inner+this.outer-5),this.selectedPath=this.calcSegment(this.inner+3,this.inner+this.outer),this.hilight=this.calcArc(this.inner)}return h(i,t),i.prototype.calcArcPoints=function(t){return[this.cx+t*this.sin_p0,this.cy+t*this.cos_p0,this.cx+t*this.sin_p1,this.cy+t*this.cos_p1]},i.prototype.calcSegment=function(t,i){var e,o,n,s,r,h,a,l,p,u;return p=this.calcArcPoints(t),e=p[0],n=p[1],o=p[2],s=p[3],u=this.calcArcPoints(i),r=u[0],a=u[1],h=u[2],l=u[3],"M"+e+","+n+"A"+t+","+t+",0,"+this.is_long+",0,"+o+","+s+"L"+h+","+l+"A"+i+","+i+",0,"+this.is_long+",1,"+r+","+a+"Z"},i.prototype.calcArc=function(t){var i,e,o,n,s;return s=this.calcArcPoints(t),i=s[0],o=s[1],e=s[2],n=s[3],"M"+i+","+o+"A"+t+","+t+",0,"+this.is_long+",0,"+e+","+n},i.prototype.render=function(){var t=this;return this.arc=this.drawDonutArc(this.hilight,this.color),this.seg=this.drawDonutSegment(this.path,this.color,this.backgroundColor,function(){return t.fire("hover",t.index)},function(){return t.fire("click",t.index)})},i.prototype.drawDonutArc=function(t,i){return this.raphael.path(t).attr({stroke:i,"stroke-width":2,opacity:0})},i.prototype.drawDonutSegment=function(t,i,e,o,n){return this.raphael.path(t).attr({fill:i,stroke:e,"stroke-width":3}).hover(o).click(n)},i.prototype.select=function(){if(!this.selected)return this.seg.animate({path:this.selectedPath},150,"<>"),this.arc.animate({opacity:1},150,"<>"),this.selected=!0},i.prototype.deselect=function(){if(this.selected)return this.seg.animate({path:this.path},150,"<>"),this.arc.animate({opacity:0},150,"<>"),this.selected=!1},i}(i.EventEmitter)}).call(this);
  !function(t){var e,r,i="hasOwnProperty",n=/[\.\/]/,a=function(){},s=function(t,e){return t-e},o={n:{}},l=function(t,i){t=String(t);var n,a=r,o=Array.prototype.slice.call(arguments,2),h=l.listeners(t),u=0,c=[],f={},p=[],d=e;e=t,r=0;for(var g=0,x=h.length;g<x;g++)"zIndex"in h[g]&&(c.push(h[g].zIndex),h[g].zIndex<0&&(f[h[g].zIndex]=h[g]));for(c.sort(s);c[u]<0;)if(n=f[c[u++]],p.push(n.apply(i,o)),r)return r=a,p;for(g=0;g<x;g++)if("zIndex"in(n=h[g]))if(n.zIndex==c[u]){if(p.push(n.apply(i,o)),r)break;do{if(u++,n=f[c[u]],n&&p.push(n.apply(i,o)),r)break}while(n)}else f[n.zIndex]=n;else if(p.push(n.apply(i,o)),r)break;return r=a,e=d,p.length?p:null};l._events=o,l.listeners=function(t){var e,r,i,a,s,l,h,u,c=t.split(n),f=o,p=[f],d=[];for(a=0,s=c.length;a<s;a++){for(u=[],l=0,h=p.length;l<h;l++)for(f=p[l].n,r=[f[c[a]],f["*"]],i=2;i--;)(e=r[i])&&(u.push(e),d=d.concat(e.f||[]));p=u}return d},l.on=function(t,e){if(t=String(t),"function"!=typeof e)return function(){};for(var r=t.split(n),i=o,s=0,l=r.length;s<l;s++)i=i.n,i=i.hasOwnProperty(r[s])&&i[r[s]]||(i[r[s]]={n:{}});for(i.f=i.f||[],s=0,l=i.f.length;s<l;s++)if(i.f[s]==e)return a;return i.f.push(e),function(t){+t==+t&&(e.zIndex=+t)}},l.f=function(t){var e=[].slice.call(arguments,1);return function(){l.apply(null,[t,null].concat(e).concat([].slice.call(arguments,0)))}},l.stop=function(){r=1},l.nt=function(t){return t?new RegExp("(?:\\.|\\/|^)"+t+"(?:\\.|\\/|$)").test(e):e},l.nts=function(){return e.split(n)},l.off=l.unbind=function(t,e){if(!t)return void(l._events=o={n:{}});var r,a,s,h,u,c,f,p=t.split(n),d=[o];for(h=0,u=p.length;h<u;h++)for(c=0;c<d.length;c+=s.length-2){if(s=[c,1],r=d[c].n,"*"!=p[h])r[p[h]]&&s.push(r[p[h]]);else for(a in r)r[i](a)&&s.push(r[a]);d.splice.apply(d,s)}for(h=0,u=d.length;h<u;h++)for(r=d[h];r.n;){if(e){if(r.f){for(c=0,f=r.f.length;c<f;c++)if(r.f[c]==e){r.f.splice(c,1);break}!r.f.length&&delete r.f}for(a in r.n)if(r.n[i](a)&&r.n[a].f){var g=r.n[a].f;for(c=0,f=g.length;c<f;c++)if(g[c]==e){g.splice(c,1);break}!g.length&&delete r.n[a].f}}else{delete r.f;for(a in r.n)r.n[i](a)&&r.n[a].f&&delete r.n[a].f}r=r.n}},l.once=function(t,e){var r=function(){return l.unbind(t,r),e.apply(this,arguments)};return l.on(t,r)},l.version="0.4.2",l.toString=function(){return"You are running Eve 0.4.2"},"undefined"!=typeof module&&module.exports?module.exports=l:"undefined"!=typeof define?define("eve",[],function(){return l}):t.eve=l}(window||this),function(t,e){"function"==typeof define&&define.amd?define(["eve"],function(r){return e(t,r)}):e(t,t.eve)}(this,function(t,e){function r(t){if(r.is(t,"function"))return b?t():e.on("raphael.DOMload",t);if(r.is(t,X))return r._engine.create[N](r,t.splice(0,3+r.is(t[0],W))).add(t);var i=Array.prototype.slice.call(arguments,0);if(r.is(i[i.length-1],"function")){var n=i.pop();return b?n.call(r._engine.create[N](r,i)):e.on("raphael.DOMload",function(){n.call(r._engine.create[N](r,i))})}return r._engine.create[N](r,arguments)}function i(t){if("function"==typeof t||Object(t)!==t)return t;var e=new t.constructor;for(var r in t)t[B](r)&&(e[r]=i(t[r]));return e}function n(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return t.push(t.splice(r,1)[0])}function a(t,e,r){function i(){var a=Array.prototype.slice.call(arguments,0),s=a.join("␀"),o=i.cache=i.cache||{},l=i.count=i.count||[];return o[B](s)?(n(l,s),r?r(o[s]):o[s]):(l.length>=1e3&&delete o[l.shift()],l.push(s),o[s]=t[N](e,a),r?r(o[s]):o[s])}return i}function s(){return this.hex}function o(t,e){for(var r=[],i=0,n=t.length;n-2*!e>i;i+=2){var a=[{x:+t[i-2],y:+t[i-1]},{x:+t[i],y:+t[i+1]},{x:+t[i+2],y:+t[i+3]},{x:+t[i+4],y:+t[i+5]}];e?i?n-4==i?a[3]={x:+t[0],y:+t[1]}:n-2==i&&(a[2]={x:+t[0],y:+t[1]},a[3]={x:+t[2],y:+t[3]}):a[0]={x:+t[n-2],y:+t[n-1]}:n-4==i?a[3]=a[2]:i||(a[0]={x:+t[i],y:+t[i+1]}),r.push(["C",(-a[0].x+6*a[1].x+a[2].x)/6,(-a[0].y+6*a[1].y+a[2].y)/6,(a[1].x+6*a[2].x-a[3].x)/6,(a[1].y+6*a[2].y-a[3].y)/6,a[2].x,a[2].y])}return r}function l(t,e,r,i,n){return t*(t*(-3*e+9*r-9*i+3*n)+6*e-12*r+6*i)-3*e+3*r}function h(t,e,r,i,n,a,s,o,h){null==h&&(h=1),h=h>1?1:h<0?0:h;for(var u=h/2,c=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],f=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],p=0,d=0;d<12;d++){var g=u*c[d]+u,x=l(g,t,r,n,s),v=l(g,e,i,a,o),y=x*x+v*v;p+=f[d]*q.sqrt(y)}return u*p}function u(t,e,r,i,n,a,s,o,l){if(!(l<0||h(t,e,r,i,n,a,s,o)<l)){var u,c=.5,f=1-c;for(u=h(t,e,r,i,n,a,s,o,f);V(u-l)>.01;)c/=2,f+=(u<l?1:-1)*c,u=h(t,e,r,i,n,a,s,o,f);return f}}function c(t,e,r,i,n,a,s,o){if(!(D(t,r)<O(n,s)||O(t,r)>D(n,s)||D(e,i)<O(a,o)||O(e,i)>D(a,o))){var l=(t*i-e*r)*(n-s)-(t-r)*(n*o-a*s),h=(t*i-e*r)*(a-o)-(e-i)*(n*o-a*s),u=(t-r)*(a-o)-(e-i)*(n-s);if(u){var c=l/u,f=h/u,p=+c.toFixed(2),d=+f.toFixed(2);if(!(p<+O(t,r).toFixed(2)||p>+D(t,r).toFixed(2)||p<+O(n,s).toFixed(2)||p>+D(n,s).toFixed(2)||d<+O(e,i).toFixed(2)||d>+D(e,i).toFixed(2)||d<+O(a,o).toFixed(2)||d>+D(a,o).toFixed(2)))return{x:c,y:f}}}}function f(t,e,i){var n=r.bezierBBox(t),a=r.bezierBBox(e);if(!r.isBBoxIntersect(n,a))return i?0:[];for(var s=h.apply(0,t),o=h.apply(0,e),l=D(~~(s/5),1),u=D(~~(o/5),1),f=[],p=[],d={},g=i?0:[],x=0;x<l+1;x++){var v=r.findDotsAtSegment.apply(r,t.concat(x/l));f.push({x:v.x,y:v.y,t:x/l})}for(x=0;x<u+1;x++)v=r.findDotsAtSegment.apply(r,e.concat(x/u)),p.push({x:v.x,y:v.y,t:x/u});for(x=0;x<l;x++)for(var y=0;y<u;y++){var m=f[x],b=f[x+1],_=p[y],w=p[y+1],k=V(b.x-m.x)<.001?"y":"x",C=V(w.x-_.x)<.001?"y":"x",B=c(m.x,m.y,b.x,b.y,_.x,_.y,w.x,w.y);if(B){if(d[B.x.toFixed(4)]==B.y.toFixed(4))continue;d[B.x.toFixed(4)]=B.y.toFixed(4);var S=m.t+V((B[k]-m[k])/(b[k]-m[k]))*(b.t-m.t),T=_.t+V((B[C]-_[C])/(w[C]-_[C]))*(w.t-_.t);S>=0&&S<=1.001&&T>=0&&T<=1.001&&(i?g++:g.push({x:B.x,y:B.y,t1:O(S,1),t2:O(T,1)}))}}return g}function p(t,e,i){t=r._path2curve(t),e=r._path2curve(e);for(var n,a,s,o,l,h,u,c,p,d,g=i?0:[],x=0,v=t.length;x<v;x++){var y=t[x];if("M"==y[0])n=l=y[1],a=h=y[2];else{"C"==y[0]?(p=[n,a].concat(y.slice(1)),n=p[6],a=p[7]):(p=[n,a,n,a,l,h,l,h],n=l,a=h);for(var m=0,b=e.length;m<b;m++){var _=e[m];if("M"==_[0])s=u=_[1],o=c=_[2];else{"C"==_[0]?(d=[s,o].concat(_.slice(1)),s=d[6],o=d[7]):(d=[s,o,s,o,u,c,u,c],s=u,o=c);var w=f(p,d,i);if(i)g+=w;else{for(var k=0,C=w.length;k<C;k++)w[k].segment1=x,w[k].segment2=m,w[k].bez1=p,w[k].bez2=d;g=g.concat(w)}}}}}return g}function d(t,e,r,i,n,a){null!=t?(this.a=+t,this.b=+e,this.c=+r,this.d=+i,this.e=+n,this.f=+a):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0)}function g(){return this.x+P+this.y+P+this.width+" × "+this.height}function x(t,e,r,i,n,a){function s(t){return((u*t+h)*t+l)*t}function o(t,e){var r,i,n,a,o,c;for(n=t,c=0;c<8;c++){if(a=s(n)-t,V(a)<e)return n;if(o=(3*u*n+2*h)*n+l,V(o)<1e-6)break;n-=a/o}if(r=0,i=1,(n=t)<r)return r;if(n>i)return i;for(;r<i;){if(a=s(n),V(a-t)<e)return n;t>a?r=n:i=n,n=(i-r)/2+r}return n}var l=3*e,h=3*(i-e)-l,u=1-l-h,c=3*r,f=3*(n-r)-c,p=1-c-f;return function(t,e){var r=o(t,e);return((p*r+f)*r+c)*r}(t,1/(200*a))}function v(t,e){var r=[],i={};if(this.ms=e,this.times=1,t){for(var n in t)t[B](n)&&(i[J(n)]=t[n],r.push(J(n)));r.sort(ut)}this.anim=i,this.top=r[r.length-1],this.percents=r}function y(t,i,n,a,s,o){n=J(n);var l,h,u,c,f,p,g=t.ms,v={},y={},m={};if(a)for(_=0,k=oe.length;_<k;_++){var b=oe[_];if(b.el.id==i.id&&b.anim==t){b.percent!=n?(oe.splice(_,1),u=1):h=b,i.attr(b.totalOrigin);break}}else a=+y;for(var _=0,k=t.percents.length;_<k;_++){if(t.percents[_]==n||t.percents[_]>a*t.top){n=t.percents[_],f=t.percents[_-1]||0,g=g/t.top*(n-f),c=t.percents[_+1],l=t.anim[n];break}a&&i.attr(t.anim[t.percents[_]])}if(l){if(h)h.initstatus=a,h.start=new Date-h.ms*a;else{for(var C in l)if(l[B](C)&&(rt[B](C)||i.paper.customAttributes[B](C)))switch(v[C]=i.attr(C),null==v[C]&&(v[C]=et[C]),y[C]=l[C],rt[C]){case W:m[C]=(y[C]-v[C])/g;break;case"colour":v[C]=r.getRGB(v[C]);var S=r.getRGB(y[C]);m[C]={r:(S.r-v[C].r)/g,g:(S.g-v[C].g)/g,b:(S.b-v[C].b)/g};break;case"path":var T=Ft(v[C],y[C]),A=T[1];for(v[C]=T[0],m[C]=[],_=0,k=v[C].length;_<k;_++){m[C][_]=[0];for(var N=1,L=v[C][_].length;N<L;N++)m[C][_][N]=(A[_][N]-v[C][_][N])/g}break;case"transform":var M=i._,P=Dt(M[C],y[C]);if(P)for(v[C]=P.from,y[C]=P.to,m[C]=[],m[C].real=!0,_=0,k=v[C].length;_<k;_++)for(m[C][_]=[v[C][_][0]],N=1,L=v[C][_].length;N<L;N++)m[C][_][N]=(y[C][_][N]-v[C][_][N])/g;else{var R=i.matrix||new d,I={_:{transform:M.transform},getBBox:function(){return i.getBBox(1)}};v[C]=[R.a,R.b,R.c,R.d,R.e,R.f],jt(I,y[C]),y[C]=I._.transform,m[C]=[(I.matrix.a-R.a)/g,(I.matrix.b-R.b)/g,(I.matrix.c-R.c)/g,(I.matrix.d-R.d)/g,(I.matrix.e-R.e)/g,(I.matrix.f-R.f)/g]}break;case"csv":var j=z(l[C])[F](w),q=z(v[C])[F](w);if("clip-rect"==C)for(v[C]=q,m[C]=[],_=q.length;_--;)m[C][_]=(j[_]-v[C][_])/g;y[C]=j;break;default:for(j=[][E](l[C]),q=[][E](v[C]),m[C]=[],_=i.paper.customAttributes[C].length;_--;)m[C][_]=((j[_]||0)-(q[_]||0))/g}var D=l.easing,O=r.easing_formulas[D];if(!O)if((O=z(D).match(Z))&&5==O.length){var V=O;O=function(t){return x(t,+V[1],+V[2],+V[3],+V[4],g)}}else O=ft;if(p=l.start||t.start||+new Date,b={anim:t,percent:n,timestamp:p,start:p+(t.del||0),status:0,initstatus:a||0,stop:!1,ms:g,easing:O,from:v,diff:m,to:y,el:i,callback:l.callback,prev:f,next:c,repeat:o||t.times,origin:i.attr(),totalOrigin:s},oe.push(b),a&&!h&&!u&&(b.stop=!0,b.start=new Date-g*a,1==oe.length))return he();u&&(b.start=new Date-b.ms*a),1==oe.length&&le(he)}e("raphael.anim.start."+i.id,i,t)}}function m(t){for(var e=0;e<oe.length;e++)oe[e].el.paper==t&&oe.splice(e--,1)}r.version="2.1.2",r.eve=e;var b,_,w=/[, ]+/,k={circle:1,rect:1,path:1,ellipse:1,text:1,image:1},C=/\{(\d+)\}/g,B="hasOwnProperty",S={doc:document,win:t},T={was:Object.prototype[B].call(S.win,"Raphael"),is:S.win.Raphael},A=function(){this.ca=this.customAttributes={}},N="apply",E="concat",L="ontouchstart"in S.win||S.win.DocumentTouch&&S.doc instanceof DocumentTouch,M="",P=" ",z=String,F="split",R="click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel"[F](P),I={mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},j=z.prototype.toLowerCase,q=Math,D=q.max,O=q.min,V=q.abs,Y=q.pow,G=q.PI,W="number",X="array",H=Object.prototype.toString,U=(r._ISURL=/^url\(['"]?([^\)]+?)['"]?\)$/i,/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i),$={NaN:1,Infinity:1,"-Infinity":1},Z=/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,Q=q.round,J=parseFloat,K=parseInt,tt=z.prototype.toUpperCase,et=r._availableAttrs={"arrow-end":"none","arrow-start":"none",blur:0,"clip-rect":"0 0 1e9 1e9",cursor:"default",cx:0,cy:0,fill:"#fff","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:0,height:0,href:"http://raphaeljs.com/","letter-spacing":0,opacity:1,path:"M0,0",r:0,rx:0,ry:0,src:"",stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank","text-anchor":"middle",title:"Raphael",transform:"",width:0,x:0,y:0},rt=r._availableAnimAttrs={blur:W,"clip-rect":"csv",cx:W,cy:W,fill:"colour","fill-opacity":W,"font-size":W,height:W,opacity:W,path:"path",r:W,rx:W,ry:W,stroke:"colour","stroke-opacity":W,"stroke-width":W,transform:"transform",width:W,x:W,y:W},it=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/,nt={hs:1,rg:1},at=/,?([achlmqrstvxz]),?/gi,st=/([achlmrqstvz])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,ot=/([rstm])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,lt=/(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/gi,ht=(r._radial_gradient=/^r(?:\(([^,]+?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*([^\)]+?)\))?/,{}),ut=function(t,e){return J(t)-J(e)},ct=function(){},ft=function(t){return t},pt=r._rectPath=function(t,e,r,i,n){return n?[["M",t+n,e],["l",r-2*n,0],["a",n,n,0,0,1,n,n],["l",0,i-2*n],["a",n,n,0,0,1,-n,n],["l",2*n-r,0],["a",n,n,0,0,1,-n,-n],["l",0,2*n-i],["a",n,n,0,0,1,n,-n],["z"]]:[["M",t,e],["l",r,0],["l",0,i],["l",-r,0],["z"]]},dt=function(t,e,r,i){return null==i&&(i=r),[["M",t,e],["m",0,-i],["a",r,i,0,1,1,0,2*i],["a",r,i,0,1,1,0,-2*i],["z"]]},gt=r._getPath={path:function(t){return t.attr("path")},circle:function(t){var e=t.attrs;return dt(e.cx,e.cy,e.r)},ellipse:function(t){var e=t.attrs;return dt(e.cx,e.cy,e.rx,e.ry)},rect:function(t){var e=t.attrs;return pt(e.x,e.y,e.width,e.height,e.r)},image:function(t){var e=t.attrs;return pt(e.x,e.y,e.width,e.height)},text:function(t){var e=t._getBBox();return pt(e.x,e.y,e.width,e.height)},set:function(t){var e=t._getBBox();return pt(e.x,e.y,e.width,e.height)}},xt=r.mapPath=function(t,e){if(!e)return t;var r,i,n,a,s,o,l;for(t=Ft(t),n=0,s=t.length;n<s;n++)for(l=t[n],a=1,o=l.length;a<o;a+=2)r=e.x(l[a],l[a+1]),i=e.y(l[a],l[a+1]),l[a]=r,l[a+1]=i;return t};if(r._g=S,r.type=S.win.SVGAngle||S.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML","VML"==r.type){var vt,yt=S.doc.createElement("div");if(yt.innerHTML='<v:shape adj="1"/>',vt=yt.firstChild,vt.style.behavior="url(#default#VML)",!vt||"object"!=typeof vt.adj)return r.type=M;yt=null}r.svg=!(r.vml="VML"==r.type),r._Paper=A,r.fn=_=A.prototype=r.prototype,r._id=0,r._oid=0,r.is=function(t,e){return e=j.call(e),"finite"==e?!$[B](+t):"array"==e?t instanceof Array:"null"==e&&null===t||e==typeof t&&null!==t||"object"==e&&t===Object(t)||"array"==e&&Array.isArray&&Array.isArray(t)||H.call(t).slice(8,-1).toLowerCase()==e},r.angle=function(t,e,i,n,a,s){if(null==a){var o=t-i,l=e-n;return o||l?(180+180*q.atan2(-l,-o)/G+360)%360:0}return r.angle(t,e,a,s)-r.angle(i,n,a,s)},r.rad=function(t){return t%360*G/180},r.deg=function(t){return 180*t/G%360},r.snapTo=function(t,e,i){if(i=r.is(i,"finite")?i:10,r.is(t,X)){for(var n=t.length;n--;)if(V(t[n]-e)<=i)return t[n]}else{t=+t;var a=e%t;if(a<i)return e-a;if(a>t-i)return e-a+t}return e};r.createUUID=function(t,e){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(t,e).toUpperCase()}}(/[xy]/g,function(t){var e=16*q.random()|0;return("x"==t?e:3&e|8).toString(16)});r.setWindow=function(t){e("raphael.setWindow",r,S.win,t),S.win=t,S.doc=S.win.document,r._engine.initWin&&r._engine.initWin(S.win)};var mt=function(t){if(r.vml){var e,i=/^\s+|\s+$/g;try{var n=new ActiveXObject("htmlfile");n.write("<body>"),n.close(),e=n.body}catch(t){e=createPopup().document.body}var s=e.createTextRange();mt=a(function(t){try{e.style.color=z(t).replace(i,M);var r=s.queryCommandValue("ForeColor");return r=(255&r)<<16|65280&r|(16711680&r)>>>16,"#"+("000000"+r.toString(16)).slice(-6)}catch(t){return"none"}})}else{var o=S.doc.createElement("i");o.title="Raphaël Colour Picker",o.style.display="none",S.doc.body.appendChild(o),mt=a(function(t){return o.style.color=t,S.doc.defaultView.getComputedStyle(o,M).getPropertyValue("color")})}return mt(t)},bt=function(){return"hsb("+[this.h,this.s,this.b]+")"},_t=function(){return"hsl("+[this.h,this.s,this.l]+")"},wt=function(){return this.hex},kt=function(t,e,i){if(null==e&&r.is(t,"object")&&"r"in t&&"g"in t&&"b"in t&&(i=t.b,e=t.g,t=t.r),null==e&&r.is(t,"string")){var n=r.getRGB(t);t=n.r,e=n.g,i=n.b}return(t>1||e>1||i>1)&&(t/=255,e/=255,i/=255),[t,e,i]},Ct=function(t,e,i,n){t*=255,e*=255,i*=255;var a={r:t,g:e,b:i,hex:r.rgb(t,e,i),toString:wt};return r.is(n,"finite")&&(a.opacity=n),a};r.color=function(t){var e;return r.is(t,"object")&&"h"in t&&"s"in t&&"b"in t?(e=r.hsb2rgb(t),t.r=e.r,t.g=e.g,t.b=e.b,t.hex=e.hex):r.is(t,"object")&&"h"in t&&"s"in t&&"l"in t?(e=r.hsl2rgb(t),t.r=e.r,t.g=e.g,t.b=e.b,t.hex=e.hex):(r.is(t,"string")&&(t=r.getRGB(t)),r.is(t,"object")&&"r"in t&&"g"in t&&"b"in t?(e=r.rgb2hsl(t),t.h=e.h,t.s=e.s,t.l=e.l,e=r.rgb2hsb(t),t.v=e.b):(t={hex:"none"},t.r=t.g=t.b=t.h=t.s=t.v=t.l=-1)),t.toString=wt,t},r.hsb2rgb=function(t,e,r,i){this.is(t,"object")&&"h"in t&&"s"in t&&"b"in t&&(r=t.b,e=t.s,t=t.h,i=t.o),t*=360;var n,a,s,o,l;return t=t%360/60,l=r*e,o=l*(1-V(t%2-1)),n=a=s=r-l,t=~~t,n+=[l,o,0,0,o,l][t],a+=[o,l,l,o,0,0][t],s+=[0,0,o,l,l,o][t],Ct(n,a,s,i)},r.hsl2rgb=function(t,e,r,i){this.is(t,"object")&&"h"in t&&"s"in t&&"l"in t&&(r=t.l,e=t.s,t=t.h),(t>1||e>1||r>1)&&(t/=360,e/=100,r/=100),t*=360;var n,a,s,o,l;return t=t%360/60,l=2*e*(r<.5?r:1-r),o=l*(1-V(t%2-1)),n=a=s=r-l/2,t=~~t,n+=[l,o,0,0,o,l][t],a+=[o,l,l,o,0,0][t],s+=[0,0,o,l,l,o][t],Ct(n,a,s,i)},r.rgb2hsb=function(t,e,r){r=kt(t,e,r),t=r[0],e=r[1],r=r[2];var i,n,a,s;return a=D(t,e,r),s=a-O(t,e,r),i=0==s?null:a==t?(e-r)/s:a==e?(r-t)/s+2:(t-e)/s+4,i=(i+360)%6*60/360,n=0==s?0:s/a,{h:i,s:n,b:a,toString:bt}},r.rgb2hsl=function(t,e,r){r=kt(t,e,r),t=r[0],e=r[1],r=r[2];var i,n,a,s,o,l;return s=D(t,e,r),o=O(t,e,r),l=s-o,i=0==l?null:s==t?(e-r)/l:s==e?(r-t)/l+2:(t-e)/l+4,i=(i+360)%6*60/360,a=(s+o)/2,n=0==l?0:a<.5?l/(2*a):l/(2-2*a),{h:i,s:n,l:a,toString:_t}},r._path2string=function(){return this.join(",").replace(at,"$1")};r._preload=function(t,e){var r=S.doc.createElement("img");r.style.cssText="position:absolute;left:-9999em;top:-9999em",r.onload=function(){e.call(this),this.onload=null,S.doc.body.removeChild(this)},r.onerror=function(){S.doc.body.removeChild(this)},S.doc.body.appendChild(r),r.src=t};r.getRGB=a(function(t){if(!t||(t=z(t)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:s};if("none"==t)return{r:-1,g:-1,b:-1,hex:"none",toString:s};!(nt[B](t.toLowerCase().substring(0,2))||"#"==t.charAt())&&(t=mt(t));var e,i,n,a,o,l,h=t.match(U);return h?(h[2]&&(n=K(h[2].substring(5),16),i=K(h[2].substring(3,5),16),e=K(h[2].substring(1,3),16)),h[3]&&(n=K((o=h[3].charAt(3))+o,16),i=K((o=h[3].charAt(2))+o,16),e=K((o=h[3].charAt(1))+o,16)),h[4]&&(l=h[4][F](it),e=J(l[0]),"%"==l[0].slice(-1)&&(e*=2.55),i=J(l[1]),"%"==l[1].slice(-1)&&(i*=2.55),n=J(l[2]),"%"==l[2].slice(-1)&&(n*=2.55),"rgba"==h[1].toLowerCase().slice(0,4)&&(a=J(l[3])),l[3]&&"%"==l[3].slice(-1)&&(a/=100)),h[5]?(l=h[5][F](it),e=J(l[0]),"%"==l[0].slice(-1)&&(e*=2.55),i=J(l[1]),"%"==l[1].slice(-1)&&(i*=2.55),n=J(l[2]),"%"==l[2].slice(-1)&&(n*=2.55),("deg"==l[0].slice(-3)||"°"==l[0].slice(-1))&&(e/=360),"hsba"==h[1].toLowerCase().slice(0,4)&&(a=J(l[3])),l[3]&&"%"==l[3].slice(-1)&&(a/=100),r.hsb2rgb(e,i,n,a)):h[6]?(l=h[6][F](it),e=J(l[0]),"%"==l[0].slice(-1)&&(e*=2.55),i=J(l[1]),"%"==l[1].slice(-1)&&(i*=2.55),n=J(l[2]),"%"==l[2].slice(-1)&&(n*=2.55),("deg"==l[0].slice(-3)||"°"==l[0].slice(-1))&&(e/=360),"hsla"==h[1].toLowerCase().slice(0,4)&&(a=J(l[3])),l[3]&&"%"==l[3].slice(-1)&&(a/=100),r.hsl2rgb(e,i,n,a)):(h={r:e,g:i,b:n,toString:s},h.hex="#"+(16777216|n|i<<8|e<<16).toString(16).slice(1),r.is(a,"finite")&&(h.opacity=a),h)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:s}},r),r.hsb=a(function(t,e,i){return r.hsb2rgb(t,e,i).hex}),r.hsl=a(function(t,e,i){return r.hsl2rgb(t,e,i).hex}),r.rgb=a(function(t,e,r){return"#"+(16777216|r|e<<8|t<<16).toString(16).slice(1)}),r.getColor=function(t){var e=this.getColor.start=this.getColor.start||{h:0,s:1,b:t||.75},r=this.hsb2rgb(e.h,e.s,e.b);return e.h+=.075,e.h>1&&(e.h=0,e.s-=.2,e.s<=0&&(this.getColor.start={h:0,s:1,b:e.b})),r.hex},r.getColor.reset=function(){delete this.start},r.parsePathString=function(t){if(!t)return null;var e=Bt(t);if(e.arr)return Tt(e.arr);var i={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},n=[];return r.is(t,X)&&r.is(t[0],X)&&(n=Tt(t)),n.length||z(t).replace(st,function(t,e,r){var a=[],s=e.toLowerCase();if(r.replace(lt,function(t,e){e&&a.push(+e)}),"m"==s&&a.length>2&&(n.push([e][E](a.splice(0,2))),s="l",e="m"==e?"l":"L"),"r"==s)n.push([e][E](a));else for(;a.length>=i[s]&&(n.push([e][E](a.splice(0,i[s]))),i[s]););}),n.toString=r._path2string,e.arr=Tt(n),n},r.parseTransformString=a(function(t){if(!t)return null;var e=[];return r.is(t,X)&&r.is(t[0],X)&&(e=Tt(t)),e.length||z(t).replace(ot,function(t,r,i){var n=[];j.call(r);i.replace(lt,function(t,e){e&&n.push(+e)}),e.push([r][E](n))}),e.toString=r._path2string,e});var Bt=function(t){var e=Bt.ps=Bt.ps||{};return e[t]?e[t].sleep=100:e[t]={sleep:100},setTimeout(function(){for(var r in e)e[B](r)&&r!=t&&!--e[r].sleep&&delete e[r]}),e[t]};r.findDotsAtSegment=function(t,e,r,i,n,a,s,o,l){var h=1-l,u=Y(h,3),c=Y(h,2),f=l*l,p=f*l,d=u*t+3*c*l*r+3*h*l*l*n+p*s,g=u*e+3*c*l*i+3*h*l*l*a+p*o,x=t+2*l*(r-t)+f*(n-2*r+t),v=e+2*l*(i-e)+f*(a-2*i+e),y=r+2*l*(n-r)+f*(s-2*n+r),m=i+2*l*(a-i)+f*(o-2*a+i),b=h*t+l*r,_=h*e+l*i,w=h*n+l*s,k=h*a+l*o,C=90-180*q.atan2(x-y,v-m)/G;return(x>y||v<m)&&(C+=180),{x:d,y:g,m:{x:x,y:v},n:{x:y,y:m},start:{x:b,y:_},end:{x:w,y:k},alpha:C}},r.bezierBBox=function(t,e,i,n,a,s,o,l){r.is(t,"array")||(t=[t,e,i,n,a,s,o,l]);var h=zt.apply(null,t);return{x:h.min.x,y:h.min.y,x2:h.max.x,y2:h.max.y,width:h.max.x-h.min.x,height:h.max.y-h.min.y}},r.isPointInsideBBox=function(t,e,r){return e>=t.x&&e<=t.x2&&r>=t.y&&r<=t.y2},r.isBBoxIntersect=function(t,e){var i=r.isPointInsideBBox;return i(e,t.x,t.y)||i(e,t.x2,t.y)||i(e,t.x,t.y2)||i(e,t.x2,t.y2)||i(t,e.x,e.y)||i(t,e.x2,e.y)||i(t,e.x,e.y2)||i(t,e.x2,e.y2)||(t.x<e.x2&&t.x>e.x||e.x<t.x2&&e.x>t.x)&&(t.y<e.y2&&t.y>e.y||e.y<t.y2&&e.y>t.y)},r.pathIntersection=function(t,e){return p(t,e)},r.pathIntersectionNumber=function(t,e){return p(t,e,1)},r.isPointInsidePath=function(t,e,i){var n=r.pathBBox(t);return r.isPointInsideBBox(n,e,i)&&p(t,[["M",e,i],["H",n.x2+10]],1)%2==1},r._removedFactory=function(t){return function(){e("raphael.log",null,"Raphaël: you are calling to method “"+t+"” of removed object",t)}};var St=r.pathBBox=function(t){var e=Bt(t);if(e.bbox)return i(e.bbox);if(!t)return{x:0,y:0,width:0,height:0,x2:0,y2:0};t=Ft(t);for(var r,n=0,a=0,s=[],o=[],l=0,h=t.length;l<h;l++)if(r=t[l],"M"==r[0])n=r[1],a=r[2],s.push(n),o.push(a);else{var u=zt(n,a,r[1],r[2],r[3],r[4],r[5],r[6]);s=s[E](u.min.x,u.max.x),o=o[E](u.min.y,u.max.y),n=r[5],a=r[6]}var c=O[N](0,s),f=O[N](0,o),p=D[N](0,s),d=D[N](0,o),g=p-c,x=d-f,v={x:c,y:f,x2:p,y2:d,width:g,height:x,cx:c+g/2,cy:f+x/2};return e.bbox=i(v),v},Tt=function(t){var e=i(t);return e.toString=r._path2string,e},At=r._pathToRelative=function(t){var e=Bt(t);if(e.rel)return Tt(e.rel);r.is(t,X)&&r.is(t&&t[0],X)||(t=r.parsePathString(t));var i=[],n=0,a=0,s=0,o=0,l=0;"M"==t[0][0]&&(n=t[0][1],a=t[0][2],s=n,o=a,l++,i.push(["M",n,a]));for(var h=l,u=t.length;h<u;h++){var c=i[h]=[],f=t[h];if(f[0]!=j.call(f[0]))switch(c[0]=j.call(f[0]),c[0]){case"a":c[1]=f[1],c[2]=f[2],c[3]=f[3],c[4]=f[4],c[5]=f[5],c[6]=+(f[6]-n).toFixed(3),c[7]=+(f[7]-a).toFixed(3);break;case"v":c[1]=+(f[1]-a).toFixed(3);break;case"m":s=f[1],o=f[2];default:for(var p=1,d=f.length;p<d;p++)c[p]=+(f[p]-(p%2?n:a)).toFixed(3)}else{c=i[h]=[],"m"==f[0]&&(s=f[1]+n,o=f[2]+a);for(var g=0,x=f.length;g<x;g++)i[h][g]=f[g]}var v=i[h].length;switch(i[h][0]){case"z":n=s,a=o;break;case"h":n+=+i[h][v-1];break;case"v":a+=+i[h][v-1];break;default:n+=+i[h][v-2],a+=+i[h][v-1]}}return i.toString=r._path2string,e.rel=Tt(i),i},Nt=r._pathToAbsolute=function(t){var e=Bt(t);if(e.abs)return Tt(e.abs);if(r.is(t,X)&&r.is(t&&t[0],X)||(t=r.parsePathString(t)),!t||!t.length)return[["M",0,0]];var i=[],n=0,a=0,s=0,l=0,h=0;"M"==t[0][0]&&(n=+t[0][1],a=+t[0][2],s=n,l=a,h++,i[0]=["M",n,a]);for(var u,c,f=3==t.length&&"M"==t[0][0]&&"R"==t[1][0].toUpperCase()&&"Z"==t[2][0].toUpperCase(),p=h,d=t.length;p<d;p++){if(i.push(u=[]),c=t[p],c[0]!=tt.call(c[0]))switch(u[0]=tt.call(c[0]),u[0]){case"A":u[1]=c[1],u[2]=c[2],u[3]=c[3],u[4]=c[4],u[5]=c[5],u[6]=+(c[6]+n),u[7]=+(c[7]+a);break;case"V":u[1]=+c[1]+a;break;case"H":u[1]=+c[1]+n;break;case"R":for(var g=[n,a][E](c.slice(1)),x=2,v=g.length;x<v;x++)g[x]=+g[x]+n,g[++x]=+g[x]+a;i.pop(),i=i[E](o(g,f));break;case"M":s=+c[1]+n,l=+c[2]+a;default:for(x=1,v=c.length;x<v;x++)u[x]=+c[x]+(x%2?n:a)}else if("R"==c[0])g=[n,a][E](c.slice(1)),i.pop(),i=i[E](o(g,f)),u=["R"][E](c.slice(-2));else for(var y=0,m=c.length;y<m;y++)u[y]=c[y];switch(u[0]){case"Z":n=s,a=l;break;case"H":n=u[1];break;case"V":a=u[1];break;case"M":s=u[u.length-2],l=u[u.length-1];default:n=u[u.length-2],a=u[u.length-1]}}return i.toString=r._path2string,e.abs=Tt(i),i},Et=function(t,e,r,i){return[t,e,r,i,r,i]},Lt=function(t,e,r,i,n,a){return[1/3*t+2/3*r,1/3*e+2/3*i,1/3*n+2/3*r,1/3*a+2/3*i,n,a]},Mt=function(t,e,r,i,n,s,o,l,h,u){var c,f=120*G/180,p=G/180*(+n||0),d=[],g=a(function(t,e,r){return{x:t*q.cos(r)-e*q.sin(r),y:t*q.sin(r)+e*q.cos(r)}});if(u)C=u[0],B=u[1],w=u[2],k=u[3];else{c=g(t,e,-p),t=c.x,e=c.y,c=g(l,h,-p),l=c.x,h=c.y;var x=(q.cos(G/180*n),q.sin(G/180*n),(t-l)/2),v=(e-h)/2,y=x*x/(r*r)+v*v/(i*i);y>1&&(y=q.sqrt(y),r*=y,i*=y);var m=r*r,b=i*i,_=(s==o?-1:1)*q.sqrt(V((m*b-m*v*v-b*x*x)/(m*v*v+b*x*x))),w=_*r*v/i+(t+l)/2,k=_*-i*x/r+(e+h)/2,C=q.asin(((e-k)/i).toFixed(9)),B=q.asin(((h-k)/i).toFixed(9));C=t<w?G-C:C,B=l<w?G-B:B,C<0&&(C=2*G+C),B<0&&(B=2*G+B),o&&C>B&&(C-=2*G),!o&&B>C&&(B-=2*G)}var S=B-C;if(V(S)>f){var T=B,A=l,N=h;B=C+f*(o&&B>C?1:-1),l=w+r*q.cos(B),h=k+i*q.sin(B),d=Mt(l,h,r,i,n,0,o,A,N,[B,T,w,k])}S=B-C;var L=q.cos(C),M=q.sin(C),P=q.cos(B),z=q.sin(B),R=q.tan(S/4),I=4/3*r*R,j=4/3*i*R,D=[t,e],O=[t+I*M,e-j*L],Y=[l+I*z,h-j*P],W=[l,h];if(O[0]=2*D[0]-O[0],O[1]=2*D[1]-O[1],u)return[O,Y,W][E](d);d=[O,Y,W][E](d).join()[F](",");for(var X=[],H=0,U=d.length;H<U;H++)X[H]=H%2?g(d[H-1],d[H],p).y:g(d[H],d[H+1],p).x;return X},Pt=function(t,e,r,i,n,a,s,o,l){var h=1-l;return{x:Y(h,3)*t+3*Y(h,2)*l*r+3*h*l*l*n+Y(l,3)*s,y:Y(h,3)*e+3*Y(h,2)*l*i+3*h*l*l*a+Y(l,3)*o}},zt=a(function(t,e,r,i,n,a,s,o){var l,h=n-2*r+t-(s-2*n+r),u=2*(r-t)-2*(n-r),c=t-r,f=(-u+q.sqrt(u*u-4*h*c))/2/h,p=(-u-q.sqrt(u*u-4*h*c))/2/h,d=[e,o],g=[t,s];return V(f)>"1e12"&&(f=.5),V(p)>"1e12"&&(p=.5),f>0&&f<1&&(l=Pt(t,e,r,i,n,a,s,o,f),g.push(l.x),d.push(l.y)),p>0&&p<1&&(l=Pt(t,e,r,i,n,a,s,o,p),g.push(l.x),d.push(l.y)),h=a-2*i+e-(o-2*a+i),u=2*(i-e)-2*(a-i),c=e-i,f=(-u+q.sqrt(u*u-4*h*c))/2/h,p=(-u-q.sqrt(u*u-4*h*c))/2/h,V(f)>"1e12"&&(f=.5),V(p)>"1e12"&&(p=.5),f>0&&f<1&&(l=Pt(t,e,r,i,n,a,s,o,f),g.push(l.x),d.push(l.y)),p>0&&p<1&&(l=Pt(t,e,r,i,n,a,s,o,p),g.push(l.x),d.push(l.y)),{min:{x:O[N](0,g),y:O[N](0,d)},max:{x:D[N](0,g),y:D[N](0,d)}}}),Ft=r._path2curve=a(function(t,e){var r=!e&&Bt(t);if(!e&&r.curve)return Tt(r.curve);for(var i=Nt(t),n=e&&Nt(e),a={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},s={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},o=(function(t,e,r){var i,n,a={T:1,Q:1};if(!t)return["C",e.x,e.y,e.x,e.y,e.x,e.y];switch(!(t[0]in a)&&(e.qx=e.qy=null),t[0]){case"M":e.X=t[1],e.Y=t[2];break;case"A":t=["C"][E](Mt[N](0,[e.x,e.y][E](t.slice(1))));break;case"S":"C"==r||"S"==r?(i=2*e.x-e.bx,n=2*e.y-e.by):(i=e.x,n=e.y),t=["C",i,n][E](t.slice(1));break;case"T":"Q"==r||"T"==r?(e.qx=2*e.x-e.qx,e.qy=2*e.y-e.qy):(e.qx=e.x,e.qy=e.y),t=["C"][E](Lt(e.x,e.y,e.qx,e.qy,t[1],t[2]));break;case"Q":e.qx=t[1],e.qy=t[2],t=["C"][E](Lt(e.x,e.y,t[1],t[2],t[3],t[4]));break;case"L":t=["C"][E](Et(e.x,e.y,t[1],t[2]));break;case"H":t=["C"][E](Et(e.x,e.y,t[1],e.y));break;case"V":t=["C"][E](Et(e.x,e.y,e.x,t[1]));break;case"Z":t=["C"][E](Et(e.x,e.y,e.X,e.Y))}return t}),l=function(t,e){if(t[e].length>7){t[e].shift();for(var r=t[e];r.length;)t.splice(e++,0,["C"][E](r.splice(0,6)));t.splice(e,1),c=D(i.length,n&&n.length||0)}},h=function(t,e,r,a,s){t&&e&&"M"==t[s][0]&&"M"!=e[s][0]&&(e.splice(s,0,["M",a.x,a.y]),r.bx=0,r.by=0,r.x=t[s][1],r.y=t[s][2],c=D(i.length,n&&n.length||0))},u=0,c=D(i.length,n&&n.length||0);u<c;u++){i[u]=o(i[u],a),l(i,u),n&&(n[u]=o(n[u],s)),n&&l(n,u),h(i,n,a,s,u),h(n,i,s,a,u);var f=i[u],p=n&&n[u],d=f.length,g=n&&p.length;a.x=f[d-2],a.y=f[d-1],a.bx=J(f[d-4])||a.x,a.by=J(f[d-3])||a.y,s.bx=n&&(J(p[g-4])||s.x),s.by=n&&(J(p[g-3])||s.y),s.x=n&&p[g-2],s.y=n&&p[g-1]}return n||(r.curve=Tt(i)),n?[i,n]:i},null,Tt),Rt=(r._parseDots=a(function(t){for(var e=[],i=0,n=t.length;i<n;i++){var a={},s=t[i].match(/^([^:]*):?([\d\.]*)/);if(a.color=r.getRGB(s[1]),a.color.error)return null;a.color=a.color.hex,s[2]&&(a.offset=s[2]+"%"),e.push(a)}for(i=1,n=e.length-1;i<n;i++)if(!e[i].offset){for(var o=J(e[i-1].offset||0),l=0,h=i+1;h<n;h++)if(e[h].offset){l=e[h].offset;break}l||(l=100,h=n),l=J(l);for(var u=(l-o)/(h-i+1);i<h;i++)o+=u,e[i].offset=o+"%"}return e}),r._tear=function(t,e){t==e.top&&(e.top=t.prev),t==e.bottom&&(e.bottom=t.next),t.next&&(t.next.prev=t.prev),t.prev&&(t.prev.next=t.next)}),It=(r._tofront=function(t,e){e.top!==t&&(Rt(t,e),t.next=null,t.prev=e.top,e.top.next=t,e.top=t)},r._toback=function(t,e){e.bottom!==t&&(Rt(t,e),t.next=e.bottom,t.prev=null,e.bottom.prev=t,e.bottom=t)},r._insertafter=function(t,e,r){Rt(t,r),e==r.top&&(r.top=t),e.next&&(e.next.prev=t),t.next=e.next,t.prev=e,e.next=t},r._insertbefore=function(t,e,r){Rt(t,r),e==r.bottom&&(r.bottom=t),e.prev&&(e.prev.next=t),t.prev=e.prev,e.prev=t,t.next=e},r.toMatrix=function(t,e){var r=St(t),i={_:{transform:M},getBBox:function(){return r}};return jt(i,e),i.matrix}),jt=(r.transformPath=function(t,e){return xt(t,It(t,e))},r._extractTransform=function(t,e){if(null==e)return t._.transform;e=z(e).replace(/\.{3}|\u2026/g,t._.transform||M);var i=r.parseTransformString(e),n=0,a=0,s=0,o=1,l=1,h=t._,u=new d;if(h.transform=i||[],i)for(var c=0,f=i.length;c<f;c++){var p,g,x,v,y,m=i[c],b=m.length,_=z(m[0]).toLowerCase(),w=m[0]!=_,k=w?u.invert():0;"t"==_&&3==b?w?(p=k.x(0,0),g=k.y(0,0),x=k.x(m[1],m[2]),v=k.y(m[1],m[2]),u.translate(x-p,v-g)):u.translate(m[1],m[2]):"r"==_?2==b?(y=y||t.getBBox(1),u.rotate(m[1],y.x+y.width/2,y.y+y.height/2),n+=m[1]):4==b&&(w?(x=k.x(m[2],m[3]),v=k.y(m[2],m[3]),u.rotate(m[1],x,v)):u.rotate(m[1],m[2],m[3]),n+=m[1]):"s"==_?2==b||3==b?(y=y||t.getBBox(1),u.scale(m[1],m[b-1],y.x+y.width/2,y.y+y.height/2),o*=m[1],l*=m[b-1]):5==b&&(w?(x=k.x(m[3],m[4]),v=k.y(m[3],m[4]),u.scale(m[1],m[2],x,v)):u.scale(m[1],m[2],m[3],m[4]),o*=m[1],l*=m[2]):"m"==_&&7==b&&u.add(m[1],m[2],m[3],m[4],m[5],m[6]),h.dirtyT=1,t.matrix=u}t.matrix=u,h.sx=o,h.sy=l,h.deg=n,h.dx=a=u.e,h.dy=s=u.f,1==o&&1==l&&!n&&h.bbox?(h.bbox.x+=+a,h.bbox.y+=+s):h.dirtyT=1}),qt=function(t){var e=t[0];switch(e.toLowerCase()){case"t":return[e,0,0];case"m":return[e,1,0,0,1,0,0];case"r":return 4==t.length?[e,0,t[2],t[3]]:[e,0];case"s":return 5==t.length?[e,1,1,t[3],t[4]]:3==t.length?[e,1,1]:[e,1]}},Dt=r._equaliseTransform=function(t,e){e=z(e).replace(/\.{3}|\u2026/g,t),t=r.parseTransformString(t)||[],e=r.parseTransformString(e)||[];for(var i,n,a,s,o=D(t.length,e.length),l=[],h=[],u=0;u<o;u++){if(a=t[u]||qt(e[u]),s=e[u]||qt(a),a[0]!=s[0]||"r"==a[0].toLowerCase()&&(a[2]!=s[2]||a[3]!=s[3])||"s"==a[0].toLowerCase()&&(a[3]!=s[3]||a[4]!=s[4]))return;for(l[u]=[],h[u]=[],i=0,
  n=D(a.length,s.length);i<n;i++)i in a&&(l[u][i]=a[i]),i in s&&(h[u][i]=s[i])}return{from:l,to:h}};r._getContainer=function(t,e,i,n){var a;if(null!=(a=null!=n||r.is(t,"object")?t:S.doc.getElementById(t)))return a.tagName?null==e?{container:a,width:a.style.pixelWidth||a.offsetWidth,height:a.style.pixelHeight||a.offsetHeight}:{container:a,width:e,height:i}:{container:1,x:t,y:e,width:i,height:n}},r.pathToRelative=At,r._engine={},r.path2curve=Ft,r.matrix=function(t,e,r,i,n,a){return new d(t,e,r,i,n,a)},function(t){function e(t){return t[0]*t[0]+t[1]*t[1]}function i(t){var r=q.sqrt(e(t));t[0]&&(t[0]/=r),t[1]&&(t[1]/=r)}t.add=function(t,e,r,i,n,a){var s,o,l,h,u=[[],[],[]],c=[[this.a,this.c,this.e],[this.b,this.d,this.f],[0,0,1]],f=[[t,r,n],[e,i,a],[0,0,1]];for(t&&t instanceof d&&(f=[[t.a,t.c,t.e],[t.b,t.d,t.f],[0,0,1]]),s=0;s<3;s++)for(o=0;o<3;o++){for(h=0,l=0;l<3;l++)h+=c[s][l]*f[l][o];u[s][o]=h}this.a=u[0][0],this.b=u[1][0],this.c=u[0][1],this.d=u[1][1],this.e=u[0][2],this.f=u[1][2]},t.invert=function(){var t=this,e=t.a*t.d-t.b*t.c;return new d(t.d/e,-t.b/e,-t.c/e,t.a/e,(t.c*t.f-t.d*t.e)/e,(t.b*t.e-t.a*t.f)/e)},t.clone=function(){return new d(this.a,this.b,this.c,this.d,this.e,this.f)},t.translate=function(t,e){this.add(1,0,0,1,t,e)},t.scale=function(t,e,r,i){null==e&&(e=t),(r||i)&&this.add(1,0,0,1,r,i),this.add(t,0,0,e,0,0),(r||i)&&this.add(1,0,0,1,-r,-i)},t.rotate=function(t,e,i){t=r.rad(t),e=e||0,i=i||0;var n=+q.cos(t).toFixed(9),a=+q.sin(t).toFixed(9);this.add(n,a,-a,n,e,i),this.add(1,0,0,1,-e,-i)},t.x=function(t,e){return t*this.a+e*this.c+this.e},t.y=function(t,e){return t*this.b+e*this.d+this.f},t.get=function(t){return+this[z.fromCharCode(97+t)].toFixed(4)},t.toString=function(){return r.svg?"matrix("+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)].join()+")":[this.get(0),this.get(2),this.get(1),this.get(3),0,0].join()},t.toFilter=function(){return"progid:DXImageTransform.Microsoft.Matrix(M11="+this.get(0)+", M12="+this.get(2)+", M21="+this.get(1)+", M22="+this.get(3)+", Dx="+this.get(4)+", Dy="+this.get(5)+", sizingmethod='auto expand')"},t.offset=function(){return[this.e.toFixed(4),this.f.toFixed(4)]},t.split=function(){var t={};t.dx=this.e,t.dy=this.f;var n=[[this.a,this.c],[this.b,this.d]];t.scalex=q.sqrt(e(n[0])),i(n[0]),t.shear=n[0][0]*n[1][0]+n[0][1]*n[1][1],n[1]=[n[1][0]-n[0][0]*t.shear,n[1][1]-n[0][1]*t.shear],t.scaley=q.sqrt(e(n[1])),i(n[1]),t.shear/=t.scaley;var a=-n[0][1],s=n[1][1];return s<0?(t.rotate=r.deg(q.acos(s)),a<0&&(t.rotate=360-t.rotate)):t.rotate=r.deg(q.asin(a)),t.isSimple=!(+t.shear.toFixed(9)||t.scalex.toFixed(9)!=t.scaley.toFixed(9)&&t.rotate),t.isSuperSimple=!+t.shear.toFixed(9)&&t.scalex.toFixed(9)==t.scaley.toFixed(9)&&!t.rotate,t.noRotation=!+t.shear.toFixed(9)&&!t.rotate,t},t.toTransformString=function(t){var e=t||this[F]();return e.isSimple?(e.scalex=+e.scalex.toFixed(4),e.scaley=+e.scaley.toFixed(4),e.rotate=+e.rotate.toFixed(4),(e.dx||e.dy?"t"+[e.dx,e.dy]:M)+(1!=e.scalex||1!=e.scaley?"s"+[e.scalex,e.scaley,0,0]:M)+(e.rotate?"r"+[e.rotate,0,0]:M)):"m"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)]}}(d.prototype);var Ot=navigator.userAgent.match(/Version\/(.*?)\s/)||navigator.userAgent.match(/Chrome\/(\d+)/);"Apple Computer, Inc."==navigator.vendor&&(Ot&&Ot[1]<4||"iP"==navigator.platform.slice(0,2))||"Google Inc."==navigator.vendor&&Ot&&Ot[1]<8?_.safari=function(){var t=this.rect(-99,-99,this.width+99,this.height+99).attr({stroke:"none"});setTimeout(function(){t.remove()})}:_.safari=ct;for(var Vt=function(){this.returnValue=!1},Yt=function(){return this.originalEvent.preventDefault()},Gt=function(){this.cancelBubble=!0},Wt=function(){return this.originalEvent.stopPropagation()},Xt=function(t){var e=S.doc.documentElement.scrollTop||S.doc.body.scrollTop,r=S.doc.documentElement.scrollLeft||S.doc.body.scrollLeft;return{x:t.clientX+r,y:t.clientY+e}},Ht=function(){return S.doc.addEventListener?function(t,e,r,i){var n=function(t){var e=Xt(t);return r.call(i,t,e.x,e.y)};if(t.addEventListener(e,n,!1),L&&I[e]){var a=function(e){for(var n=Xt(e),a=e,s=0,o=e.targetTouches&&e.targetTouches.length;s<o;s++)if(e.targetTouches[s].target==t){e=e.targetTouches[s],e.originalEvent=a,e.preventDefault=Yt,e.stopPropagation=Wt;break}return r.call(i,e,n.x,n.y)};t.addEventListener(I[e],a,!1)}return function(){return t.removeEventListener(e,n,!1),L&&I[e]&&t.removeEventListener(I[e],n,!1),!0}}:S.doc.attachEvent?function(t,e,r,i){var n=function(t){t=t||S.win.event;var e=S.doc.documentElement.scrollTop||S.doc.body.scrollTop,n=S.doc.documentElement.scrollLeft||S.doc.body.scrollLeft,a=t.clientX+n,s=t.clientY+e;return t.preventDefault=t.preventDefault||Vt,t.stopPropagation=t.stopPropagation||Gt,r.call(i,t,a,s)};return t.attachEvent("on"+e,n),function(){return t.detachEvent("on"+e,n),!0}}:void 0}(),Ut=[],$t=function(t){for(var r,i=t.clientX,n=t.clientY,a=S.doc.documentElement.scrollTop||S.doc.body.scrollTop,s=S.doc.documentElement.scrollLeft||S.doc.body.scrollLeft,o=Ut.length;o--;){if(r=Ut[o],L&&t.touches){for(var l,h=t.touches.length;h--;)if(l=t.touches[h],l.identifier==r.el._drag.id){i=l.clientX,n=l.clientY,(t.originalEvent?t.originalEvent:t).preventDefault();break}}else t.preventDefault();var u,c=r.el.node,f=c.nextSibling,p=c.parentNode,d=c.style.display;S.win.opera&&p.removeChild(c),c.style.display="none",u=r.el.paper.getElementByPoint(i,n),c.style.display=d,S.win.opera&&(f?p.insertBefore(c,f):p.appendChild(c)),u&&e("raphael.drag.over."+r.el.id,r.el,u),i+=s,n+=a,e("raphael.drag.move."+r.el.id,r.move_scope||r.el,i-r.el._drag.x,n-r.el._drag.y,i,n,t)}},Zt=function(t){r.unmousemove($t).unmouseup(Zt);for(var i,n=Ut.length;n--;)i=Ut[n],i.el._drag={},e("raphael.drag.end."+i.el.id,i.end_scope||i.start_scope||i.move_scope||i.el,t);Ut=[]},Qt=r.el={},Jt=R.length;Jt--;)!function(t){r[t]=Qt[t]=function(e,i){return r.is(e,"function")&&(this.events=this.events||[],this.events.push({name:t,f:e,unbind:Ht(this.shape||this.node||S.doc,t,e,i||this)})),this},r["un"+t]=Qt["un"+t]=function(e){for(var i=this.events||[],n=i.length;n--;)i[n].name!=t||!r.is(e,"undefined")&&i[n].f!=e||(i[n].unbind(),i.splice(n,1),!i.length&&delete this.events);return this}}(R[Jt]);Qt.data=function(t,i){var n=ht[this.id]=ht[this.id]||{};if(0==arguments.length)return n;if(1==arguments.length){if(r.is(t,"object")){for(var a in t)t[B](a)&&this.data(a,t[a]);return this}return e("raphael.data.get."+this.id,this,n[t],t),n[t]}return n[t]=i,e("raphael.data.set."+this.id,this,i,t),this},Qt.removeData=function(t){return null==t?ht[this.id]={}:ht[this.id]&&delete ht[this.id][t],this},Qt.getData=function(){return i(ht[this.id]||{})},Qt.hover=function(t,e,r,i){return this.mouseover(t,r).mouseout(e,i||r)},Qt.unhover=function(t,e){return this.unmouseover(t).unmouseout(e)};var Kt=[];Qt.drag=function(t,i,n,a,s,o){function l(l){(l.originalEvent||l).preventDefault();var h=l.clientX,u=l.clientY,c=S.doc.documentElement.scrollTop||S.doc.body.scrollTop,f=S.doc.documentElement.scrollLeft||S.doc.body.scrollLeft;if(this._drag.id=l.identifier,L&&l.touches)for(var p,d=l.touches.length;d--;)if(p=l.touches[d],this._drag.id=p.identifier,p.identifier==this._drag.id){h=p.clientX,u=p.clientY;break}this._drag.x=h+f,this._drag.y=u+c,!Ut.length&&r.mousemove($t).mouseup(Zt),Ut.push({el:this,move_scope:a,start_scope:s,end_scope:o}),i&&e.on("raphael.drag.start."+this.id,i),t&&e.on("raphael.drag.move."+this.id,t),n&&e.on("raphael.drag.end."+this.id,n),e("raphael.drag.start."+this.id,s||a||this,l.clientX+f,l.clientY+c,l)}return this._drag={},Kt.push({el:this,start:l}),this.mousedown(l),this},Qt.onDragOver=function(t){t?e.on("raphael.drag.over."+this.id,t):e.unbind("raphael.drag.over."+this.id)},Qt.undrag=function(){for(var t=Kt.length;t--;)Kt[t].el==this&&(this.unmousedown(Kt[t].start),Kt.splice(t,1),e.unbind("raphael.drag.*."+this.id));!Kt.length&&r.unmousemove($t).unmouseup(Zt),Ut=[]},_.circle=function(t,e,i){var n=r._engine.circle(this,t||0,e||0,i||0);return this.__set__&&this.__set__.push(n),n},_.rect=function(t,e,i,n,a){var s=r._engine.rect(this,t||0,e||0,i||0,n||0,a||0);return this.__set__&&this.__set__.push(s),s},_.ellipse=function(t,e,i,n){var a=r._engine.ellipse(this,t||0,e||0,i||0,n||0);return this.__set__&&this.__set__.push(a),a},_.path=function(t){t&&!r.is(t,"string")&&!r.is(t[0],X)&&(t+=M);var e=r._engine.path(r.format[N](r,arguments),this);return this.__set__&&this.__set__.push(e),e},_.image=function(t,e,i,n,a){var s=r._engine.image(this,t||"about:blank",e||0,i||0,n||0,a||0);return this.__set__&&this.__set__.push(s),s},_.text=function(t,e,i){var n=r._engine.text(this,t||0,e||0,z(i));return this.__set__&&this.__set__.push(n),n},_.set=function(t){!r.is(t,"array")&&(t=Array.prototype.splice.call(arguments,0,arguments.length));var e=new ce(t);return this.__set__&&this.__set__.push(e),e.paper=this,e.type="set",e},_.setStart=function(t){this.__set__=t||this.set()},_.setFinish=function(t){var e=this.__set__;return delete this.__set__,e},_.setSize=function(t,e){return r._engine.setSize.call(this,t,e)},_.setViewBox=function(t,e,i,n,a){return r._engine.setViewBox.call(this,t,e,i,n,a)},_.top=_.bottom=null,_.raphael=r;var te=function(t){var e=t.getBoundingClientRect(),r=t.ownerDocument,i=r.body,n=r.documentElement,a=n.clientTop||i.clientTop||0,s=n.clientLeft||i.clientLeft||0;return{y:e.top+(S.win.pageYOffset||n.scrollTop||i.scrollTop)-a,x:e.left+(S.win.pageXOffset||n.scrollLeft||i.scrollLeft)-s}};_.getElementByPoint=function(t,e){var r=this,i=r.canvas,n=S.doc.elementFromPoint(t,e);if(S.win.opera&&"svg"==n.tagName){var a=te(i),s=i.createSVGRect();s.x=t-a.x,s.y=e-a.y,s.width=s.height=1;var o=i.getIntersectionList(s,null);o.length&&(n=o[o.length-1])}if(!n)return null;for(;n.parentNode&&n!=i.parentNode&&!n.raphael;)n=n.parentNode;return n==r.canvas.parentNode&&(n=i),n=n&&n.raphael?r.getById(n.raphaelid):null},_.getElementsByBBox=function(t){var e=this.set();return this.forEach(function(i){r.isBBoxIntersect(i.getBBox(),t)&&e.push(i)}),e},_.getById=function(t){for(var e=this.bottom;e;){if(e.id==t)return e;e=e.next}return null},_.forEach=function(t,e){for(var r=this.bottom;r;){if(!1===t.call(e,r))return this;r=r.next}return this},_.getElementsByPoint=function(t,e){var r=this.set();return this.forEach(function(i){i.isPointInside(t,e)&&r.push(i)}),r},Qt.isPointInside=function(t,e){var i=this.realPath=gt[this.type](this);return this.attr("transform")&&this.attr("transform").length&&(i=r.transformPath(i,this.attr("transform"))),r.isPointInsidePath(i,t,e)},Qt.getBBox=function(t){if(this.removed)return{};var e=this._;return t?(!e.dirty&&e.bboxwt||(this.realPath=gt[this.type](this),e.bboxwt=St(this.realPath),e.bboxwt.toString=g,e.dirty=0),e.bboxwt):((e.dirty||e.dirtyT||!e.bbox)&&(!e.dirty&&this.realPath||(e.bboxwt=0,this.realPath=gt[this.type](this)),e.bbox=St(xt(this.realPath,this.matrix)),e.bbox.toString=g,e.dirty=e.dirtyT=0),e.bbox)},Qt.clone=function(){if(this.removed)return null;var t=this.paper[this.type]().attr(this.attr());return this.__set__&&this.__set__.push(t),t},Qt.glow=function(t){if("text"==this.type)return null;t=t||{};var e={width:(t.width||10)+(+this.attr("stroke-width")||1),fill:t.fill||!1,opacity:t.opacity||.5,offsetx:t.offsetx||0,offsety:t.offsety||0,color:t.color||"#000"},r=e.width/2,i=this.paper,n=i.set(),a=this.realPath||gt[this.type](this);a=this.matrix?xt(a,this.matrix):a;for(var s=1;s<r+1;s++)n.push(i.path(a).attr({stroke:e.color,fill:e.fill?e.color:"none","stroke-linejoin":"round","stroke-linecap":"round","stroke-width":+(e.width/r*s).toFixed(3),opacity:+(e.opacity/r).toFixed(3)}));return n.insertBefore(this).translate(e.offsetx,e.offsety)};var ee=function(t,e,i,n,a,s,o,l,c){return null==c?h(t,e,i,n,a,s,o,l):r.findDotsAtSegment(t,e,i,n,a,s,o,l,u(t,e,i,n,a,s,o,l,c))},re=function(t,e){return function(i,n,a){i=Ft(i);for(var s,o,l,h,u,c="",f={},p=0,d=0,g=i.length;d<g;d++){if(l=i[d],"M"==l[0])s=+l[1],o=+l[2];else{if(h=ee(s,o,l[1],l[2],l[3],l[4],l[5],l[6]),p+h>n){if(e&&!f.start){if(u=ee(s,o,l[1],l[2],l[3],l[4],l[5],l[6],n-p),c+=["C"+u.start.x,u.start.y,u.m.x,u.m.y,u.x,u.y],a)return c;f.start=c,c=["M"+u.x,u.y+"C"+u.n.x,u.n.y,u.end.x,u.end.y,l[5],l[6]].join(),p+=h,s=+l[5],o=+l[6];continue}if(!t&&!e)return u=ee(s,o,l[1],l[2],l[3],l[4],l[5],l[6],n-p),{x:u.x,y:u.y,alpha:u.alpha}}p+=h,s=+l[5],o=+l[6]}c+=l.shift()+l}return f.end=c,u=t?p:e?f:r.findDotsAtSegment(s,o,l[0],l[1],l[2],l[3],l[4],l[5],1),u.alpha&&(u={x:u.x,y:u.y,alpha:u.alpha}),u}},ie=re(1),ne=re(),ae=re(0,1);r.getTotalLength=ie,r.getPointAtLength=ne,r.getSubpath=function(t,e,r){if(this.getTotalLength(t)-r<1e-6)return ae(t,e).end;var i=ae(t,r,1);return e?ae(i,e).end:i},Qt.getTotalLength=function(){var t=this.getPath();if(t)return this.node.getTotalLength?this.node.getTotalLength():ie(t)},Qt.getPointAtLength=function(t){var e=this.getPath();if(e)return ne(e,t)},Qt.getPath=function(){var t,e=r._getPath[this.type];if("text"!=this.type&&"set"!=this.type)return e&&(t=e(this)),t},Qt.getSubpath=function(t,e){var i=this.getPath();if(i)return r.getSubpath(i,t,e)};var se=r.easing_formulas={linear:function(t){return t},"<":function(t){return Y(t,1.7)},">":function(t){return Y(t,.48)},"<>":function(t){var e=.48-t/1.04,r=q.sqrt(.1734+e*e),i=r-e,n=Y(V(i),1/3)*(i<0?-1:1),a=-r-e,s=Y(V(a),1/3)*(a<0?-1:1),o=n+s+.5;return 3*(1-o)*o*o+o*o*o},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){t-=1;var e=1.70158;return t*t*((e+1)*t+e)+1},elastic:function(t){return t==!!t?t:Y(2,-10*t)*q.sin(2*G*(t-.075)/.3)+1},bounce:function(t){var e,r=7.5625,i=2.75;return t<1/i?e=r*t*t:t<2/i?(t-=1.5/i,e=r*t*t+.75):t<2.5/i?(t-=2.25/i,e=r*t*t+.9375):(t-=2.625/i,e=r*t*t+.984375),e}};se.easeIn=se["ease-in"]=se["<"],se.easeOut=se["ease-out"]=se[">"],se.easeInOut=se["ease-in-out"]=se["<>"],se["back-in"]=se.backIn,se["back-out"]=se.backOut;var oe=[],le=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||t.msRequestAnimationFrame||function(t){setTimeout(t,16)},he=function(){for(var t=+new Date,i=0;i<oe.length;i++){var n=oe[i];if(!n.el.removed&&!n.paused){var a,s,o=t-n.start,l=n.ms,h=n.easing,u=n.from,c=n.diff,f=n.to,p=(n.t,n.el),d={},g={};if(n.initstatus?(o=(n.initstatus*n.anim.top-n.prev)/(n.percent-n.prev)*l,n.status=n.initstatus,delete n.initstatus,n.stop&&oe.splice(i--,1)):n.status=(n.prev+(n.percent-n.prev)*(o/l))/n.anim.top,!(o<0))if(o<l){var x=h(o/l);for(var v in u)if(u[B](v)){switch(rt[v]){case W:a=+u[v]+x*l*c[v];break;case"colour":a="rgb("+[ue(Q(u[v].r+x*l*c[v].r)),ue(Q(u[v].g+x*l*c[v].g)),ue(Q(u[v].b+x*l*c[v].b))].join(",")+")";break;case"path":a=[];for(var m=0,b=u[v].length;m<b;m++){a[m]=[u[v][m][0]];for(var _=1,w=u[v][m].length;_<w;_++)a[m][_]=+u[v][m][_]+x*l*c[v][m][_];a[m]=a[m].join(P)}a=a.join(P);break;case"transform":if(c[v].real)for(a=[],m=0,b=u[v].length;m<b;m++)for(a[m]=[u[v][m][0]],_=1,w=u[v][m].length;_<w;_++)a[m][_]=u[v][m][_]+x*l*c[v][m][_];else{var k=function(t){return+u[v][t]+x*l*c[v][t]};a=[["m",k(0),k(1),k(2),k(3),k(4),k(5)]]}break;case"csv":if("clip-rect"==v)for(a=[],m=4;m--;)a[m]=+u[v][m]+x*l*c[v][m];break;default:var C=[][E](u[v]);for(a=[],m=p.paper.customAttributes[v].length;m--;)a[m]=+C[m]+x*l*c[v][m]}d[v]=a}p.attr(d),function(t,r,i){setTimeout(function(){e("raphael.anim.frame."+t,r,i)})}(p.id,p,n.anim)}else{if(function(t,i,n){setTimeout(function(){e("raphael.anim.frame."+i.id,i,n),e("raphael.anim.finish."+i.id,i,n),r.is(t,"function")&&t.call(i)})}(n.callback,p,n.anim),p.attr(f),oe.splice(i--,1),n.repeat>1&&!n.next){for(s in f)f[B](s)&&(g[s]=n.totalOrigin[s]);n.el.attr(g),y(n.anim,n.el,n.anim.percents[0],null,n.totalOrigin,n.repeat-1)}n.next&&!n.stop&&y(n.anim,n.el,n.next,null,n.totalOrigin,n.repeat)}}}r.svg&&p&&p.paper&&p.paper.safari(),oe.length&&le(he)},ue=function(t){return t>255?255:t<0?0:t};Qt.animateWith=function(t,e,i,n,a,s){var o=this;if(o.removed)return s&&s.call(o),o;var l=i instanceof v?i:r.animation(i,n,a,s);y(l,o,l.percents[0],null,o.attr());for(var h=0,u=oe.length;h<u;h++)if(oe[h].anim==e&&oe[h].el==t){oe[u-1].start=oe[h].start;break}return o},Qt.onAnimation=function(t){return t?e.on("raphael.anim.frame."+this.id,t):e.unbind("raphael.anim.frame."+this.id),this},v.prototype.delay=function(t){var e=new v(this.anim,this.ms);return e.times=this.times,e.del=+t||0,e},v.prototype.repeat=function(t){var e=new v(this.anim,this.ms);return e.del=this.del,e.times=q.floor(D(t,0))||1,e},r.animation=function(t,e,i,n){if(t instanceof v)return t;!r.is(i,"function")&&i||(n=n||i||null,i=null),t=Object(t),e=+e||0;var a,s,o={};for(s in t)t[B](s)&&J(s)!=s&&J(s)+"%"!=s&&(a=!0,o[s]=t[s]);return a?(i&&(o.easing=i),n&&(o.callback=n),new v({100:o},e)):new v(t,e)},Qt.animate=function(t,e,i,n){var a=this;if(a.removed)return n&&n.call(a),a;var s=t instanceof v?t:r.animation(t,e,i,n);return y(s,a,s.percents[0],null,a.attr()),a},Qt.setTime=function(t,e){return t&&null!=e&&this.status(t,O(e,t.ms)/t.ms),this},Qt.status=function(t,e){var r,i,n=[],a=0;if(null!=e)return y(t,this,-1,O(e,1)),this;for(r=oe.length;a<r;a++)if(i=oe[a],i.el.id==this.id&&(!t||i.anim==t)){if(t)return i.status;n.push({anim:i.anim,status:i.status})}return t?0:n},Qt.pause=function(t){for(var r=0;r<oe.length;r++)oe[r].el.id!=this.id||t&&oe[r].anim!=t||!1!==e("raphael.anim.pause."+this.id,this,oe[r].anim)&&(oe[r].paused=!0);return this},Qt.resume=function(t){for(var r=0;r<oe.length;r++)if(oe[r].el.id==this.id&&(!t||oe[r].anim==t)){var i=oe[r];!1!==e("raphael.anim.resume."+this.id,this,i.anim)&&(delete i.paused,this.status(i.anim,i.status))}return this},Qt.stop=function(t){for(var r=0;r<oe.length;r++)oe[r].el.id!=this.id||t&&oe[r].anim!=t||!1!==e("raphael.anim.stop."+this.id,this,oe[r].anim)&&oe.splice(r--,1);return this},e.on("raphael.remove",m),e.on("raphael.clear",m),Qt.toString=function(){return"Raphaël’s object"};var ce=function(t){if(this.items=[],this.length=0,this.type="set",t)for(var e=0,r=t.length;e<r;e++)!t[e]||t[e].constructor!=Qt.constructor&&t[e].constructor!=ce||(this[this.items.length]=this.items[this.items.length]=t[e],this.length++)},fe=ce.prototype;fe.push=function(){for(var t,e,r=0,i=arguments.length;r<i;r++)!(t=arguments[r])||t.constructor!=Qt.constructor&&t.constructor!=ce||(e=this.items.length,this[e]=this.items[e]=t,this.length++);return this},fe.pop=function(){return this.length&&delete this[this.length--],this.items.pop()},fe.forEach=function(t,e){for(var r=0,i=this.items.length;r<i;r++)if(!1===t.call(e,this.items[r],r))return this;return this};for(var pe in Qt)Qt[B](pe)&&(fe[pe]=function(t){return function(){var e=arguments;return this.forEach(function(r){r[t][N](r,e)})}}(pe));return fe.attr=function(t,e){if(t&&r.is(t,X)&&r.is(t[0],"object"))for(var i=0,n=t.length;i<n;i++)this.items[i].attr(t[i]);else for(var a=0,s=this.items.length;a<s;a++)this.items[a].attr(t,e);return this},fe.clear=function(){for(;this.length;)this.pop()},fe.splice=function(t,e,r){t=t<0?D(this.length+t,0):t,e=D(0,O(this.length-t,e));var i,n=[],a=[],s=[];for(i=2;i<arguments.length;i++)s.push(arguments[i]);for(i=0;i<e;i++)a.push(this[t+i]);for(;i<this.length-t;i++)n.push(this[t+i]);var o=s.length;for(i=0;i<o+n.length;i++)this.items[t+i]=this[t+i]=i<o?s[i]:n[i-o];for(i=this.items.length=this.length-=e-o;this[i];)delete this[i++];return new ce(a)},fe.exclude=function(t){for(var e=0,r=this.length;e<r;e++)if(this[e]==t)return this.splice(e,1),!0},fe.animate=function(t,e,i,n){(r.is(i,"function")||!i)&&(n=i||null);var a,s,o=this.items.length,l=o,h=this;if(!o)return this;n&&(s=function(){!--o&&n.call(h)}),i=r.is(i,"string")?i:s;var u=r.animation(t,e,i,s);for(a=this.items[--l].animate(u);l--;)this.items[l]&&!this.items[l].removed&&this.items[l].animateWith(a,u,u),this.items[l]&&!this.items[l].removed||o--;return this},fe.insertAfter=function(t){for(var e=this.items.length;e--;)this.items[e].insertAfter(t);return this},fe.getBBox=function(){for(var t=[],e=[],r=[],i=[],n=this.items.length;n--;)if(!this.items[n].removed){var a=this.items[n].getBBox();t.push(a.x),e.push(a.y),r.push(a.x+a.width),i.push(a.y+a.height)}return t=O[N](0,t),e=O[N](0,e),r=D[N](0,r),i=D[N](0,i),{x:t,y:e,x2:r,y2:i,width:r-t,height:i-e}},fe.clone=function(t){t=this.paper.set();for(var e=0,r=this.items.length;e<r;e++)t.push(this.items[e].clone());return t},fe.toString=function(){return"Raphaël‘s set"},fe.glow=function(t){var e=this.paper.set();return this.forEach(function(r,i){var n=r.glow(t);null!=n&&n.forEach(function(t,r){e.push(t)})}),e},fe.isPointInside=function(t,e){var r=!1;return this.forEach(function(i){if(i.isPointInside(t,e))return r=!0,!1}),r},r.registerFont=function(t){if(!t.face)return t;this.fonts=this.fonts||{};var e={w:t.w,face:{},glyphs:{}},r=t.face["font-family"];for(var i in t.face)t.face[B](i)&&(e.face[i]=t.face[i]);if(this.fonts[r]?this.fonts[r].push(e):this.fonts[r]=[e],!t.svg){e.face["units-per-em"]=K(t.face["units-per-em"],10);for(var n in t.glyphs)if(t.glyphs[B](n)){var a=t.glyphs[n];if(e.glyphs[n]={w:a.w,k:{},d:a.d&&"M"+a.d.replace(/[mlcxtrv]/g,function(t){return{l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"}[t]||"M"})+"z"},a.k)for(var s in a.k)a[B](s)&&(e.glyphs[n].k[s]=a.k[s])}}return t},_.getFont=function(t,e,i,n){if(n=n||"normal",i=i||"normal",e=+e||{normal:400,bold:700,lighter:300,bolder:800}[e]||400,r.fonts){var a=r.fonts[t];if(!a){var s=new RegExp("(^|\\s)"+t.replace(/[^\w\d\s+!~.:_-]/g,M)+"(\\s|$)","i");for(var o in r.fonts)if(r.fonts[B](o)&&s.test(o)){a=r.fonts[o];break}}var l;if(a)for(var h=0,u=a.length;h<u&&(l=a[h],l.face["font-weight"]!=e||l.face["font-style"]!=i&&l.face["font-style"]||l.face["font-stretch"]!=n);h++);return l}},_.print=function(t,e,i,n,a,s,o,l){s=s||"middle",o=D(O(o||0,1),-1),l=D(O(l||1,3),1);var h,u=z(i)[F](M),c=0,f=0,p=M;if(r.is(n,"string")&&(n=this.getFont(n)),n){h=(a||16)/n.face["units-per-em"];for(var d=n.face.bbox[F](w),g=+d[0],x=d[3]-d[1],v=0,y=+d[1]+("baseline"==s?x+ +n.face.descent:x/2),m=0,b=u.length;m<b;m++){if("\n"==u[m])c=0,k=0,f=0,v+=x*l;else{var _=f&&n.glyphs[u[m-1]]||{},k=n.glyphs[u[m]];c+=f?(_.w||n.w)+(_.k&&_.k[u[m]]||0)+n.w*o:0,f=1}k&&k.d&&(p+=r.transformPath(k.d,["t",c*h,v*h,"s",h,h,g,y,"t",(t-g)/h,(e-y)/h]))}}return this.path(p).attr({fill:"#000",stroke:"none"})},_.add=function(t){if(r.is(t,"array"))for(var e,i=this.set(),n=0,a=t.length;n<a;n++)e=t[n]||{},k[B](e.type)&&i.push(this[e.type]().attr(e));return i},r.format=function(t,e){var i=r.is(e,X)?[0][E](e):arguments;return t&&r.is(t,"string")&&i.length-1&&(t=t.replace(C,function(t,e){return null==i[++e]?M:i[e]})),t||M},r.fullfill=function(){var t=/\{([^\}]+)\}/g,e=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g,r=function(t,r,i){var n=i;return r.replace(e,function(t,e,r,i,a){e=e||i,n&&(e in n&&(n=n[e]),"function"==typeof n&&a&&(n=n()))}),n=(null==n||n==i?t:n)+""};return function(e,i){return String(e).replace(t,function(t,e){return r(t,e,i)})}}(),r.ninja=function(){return T.was?S.win.Raphael=T.is:delete Raphael,r},r.st=fe,function(t,e,i){function n(){/in/.test(t.readyState)?setTimeout(n,9):r.eve("raphael.DOMload")}null==t.readyState&&t.addEventListener&&(t.addEventListener("DOMContentLoaded",i=function(){t.removeEventListener("DOMContentLoaded",i,!1),t.readyState="complete"},!1),t.readyState="loading"),n()}(document),e.on("raphael.DOMload",function(){b=!0}),function(){if(r.svg){var t="hasOwnProperty",e=String,i=parseFloat,n=parseInt,a=Math,s=a.max,o=a.abs,l=a.pow,h=/[, ]+/,u=r.eve,c="",f=" ",p="http://www.w3.org/1999/xlink",d={block:"M5,0 0,2.5 5,5z",classic:"M5,0 0,2.5 5,5 3.5,3 3.5,2z",diamond:"M2.5,0 5,2.5 2.5,5 0,2.5z",open:"M6,1 1,3.5 6,6",oval:"M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z"},g={};r.toString=function(){return"Your browser supports SVG.\nYou are running Raphaël "+this.version};var x=function(i,n){if(n){"string"==typeof i&&(i=x(i));for(var a in n)n[t](a)&&("xlink:"==a.substring(0,6)?i.setAttributeNS(p,a.substring(6),e(n[a])):i.setAttribute(a,e(n[a])))}else i=r._g.doc.createElementNS("http://www.w3.org/2000/svg",i),i.style&&(i.style.webkitTapHighlightColor="rgba(0,0,0,0)");return i},v=function(t,n){var h="linear",u=t.id+n,f=.5,p=.5,d=t.node,g=t.paper,v=d.style,y=r._g.doc.getElementById(u);if(!y){if(n=e(n).replace(r._radial_gradient,function(t,e,r){if(h="radial",e&&r){f=i(e),p=i(r);var n=2*(p>.5)-1;l(f-.5,2)+l(p-.5,2)>.25&&(p=a.sqrt(.25-l(f-.5,2))*n+.5)&&.5!=p&&(p=p.toFixed(5)-1e-5*n)}return c}),n=n.split(/\s*\-\s*/),"linear"==h){var m=n.shift();if(m=-i(m),isNaN(m))return null;var b=[0,0,a.cos(r.rad(m)),a.sin(r.rad(m))],_=1/(s(o(b[2]),o(b[3]))||1);b[2]*=_,b[3]*=_,b[2]<0&&(b[0]=-b[2],b[2]=0),b[3]<0&&(b[1]=-b[3],b[3]=0)}var w=r._parseDots(n);if(!w)return null;if(u=u.replace(/[\(\)\s,\xb0#]/g,"_"),t.gradient&&u!=t.gradient.id&&(g.defs.removeChild(t.gradient),delete t.gradient),!t.gradient){y=x(h+"Gradient",{id:u}),t.gradient=y,x(y,"radial"==h?{fx:f,fy:p}:{x1:b[0],y1:b[1],x2:b[2],y2:b[3],gradientTransform:t.matrix.invert()}),g.defs.appendChild(y);for(var k=0,C=w.length;k<C;k++)y.appendChild(x("stop",{offset:w[k].offset?w[k].offset:k?"100%":"0%","stop-color":w[k].color||"#fff"}))}}return x(d,{fill:"url(#"+u+")",opacity:1,"fill-opacity":1}),v.fill=c,v.opacity=1,v.fillOpacity=1,1},y=function(t){var e=t.getBBox(1);x(t.pattern,{patternTransform:t.matrix.invert()+" translate("+e.x+","+e.y+")"})},m=function(i,n,a){if("path"==i.type){for(var s,o,l,h,u,f=e(n).toLowerCase().split("-"),p=i.paper,v=a?"end":"start",y=i.node,m=i.attrs,b=m["stroke-width"],_=f.length,w="classic",k=3,C=3,B=5;_--;)switch(f[_]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":w=f[_];break;case"wide":C=5;break;case"narrow":C=2;break;case"long":k=5;break;case"short":k=2}if("open"==w?(k+=2,C+=2,B+=2,l=1,h=a?4:1,u={fill:"none",stroke:m.stroke}):(h=l=k/2,u={fill:m.stroke,stroke:"none"}),i._.arrows?a?(i._.arrows.endPath&&g[i._.arrows.endPath]--,i._.arrows.endMarker&&g[i._.arrows.endMarker]--):(i._.arrows.startPath&&g[i._.arrows.startPath]--,i._.arrows.startMarker&&g[i._.arrows.startMarker]--):i._.arrows={},"none"!=w){var S="raphael-marker-"+w,T="raphael-marker-"+v+w+k+C;r._g.doc.getElementById(S)?g[S]++:(p.defs.appendChild(x(x("path"),{"stroke-linecap":"round",d:d[w],id:S})),g[S]=1);var A,N=r._g.doc.getElementById(T);N?(g[T]++,A=N.getElementsByTagName("use")[0]):(N=x(x("marker"),{id:T,markerHeight:C,markerWidth:k,orient:"auto",refX:h,refY:C/2}),A=x(x("use"),{"xlink:href":"#"+S,transform:(a?"rotate(180 "+k/2+" "+C/2+") ":c)+"scale("+k/B+","+C/B+")","stroke-width":(1/((k/B+C/B)/2)).toFixed(4)}),N.appendChild(A),p.defs.appendChild(N),g[T]=1),x(A,u);var E=l*("diamond"!=w&&"oval"!=w);a?(s=i._.arrows.startdx*b||0,o=r.getTotalLength(m.path)-E*b):(s=E*b,o=r.getTotalLength(m.path)-(i._.arrows.enddx*b||0)),u={},u["marker-"+v]="url(#"+T+")",(o||s)&&(u.d=r.getSubpath(m.path,s,o)),x(y,u),i._.arrows[v+"Path"]=S,i._.arrows[v+"Marker"]=T,i._.arrows[v+"dx"]=E,i._.arrows[v+"Type"]=w,i._.arrows[v+"String"]=n}else a?(s=i._.arrows.startdx*b||0,o=r.getTotalLength(m.path)-s):(s=0,o=r.getTotalLength(m.path)-(i._.arrows.enddx*b||0)),i._.arrows[v+"Path"]&&x(y,{d:r.getSubpath(m.path,s,o)}),delete i._.arrows[v+"Path"],delete i._.arrows[v+"Marker"],delete i._.arrows[v+"dx"],delete i._.arrows[v+"Type"],delete i._.arrows[v+"String"];for(u in g)if(g[t](u)&&!g[u]){var L=r._g.doc.getElementById(u);L&&L.parentNode.removeChild(L)}}},b={"":[0],none:[0],"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,1,1,1,1],". ":[1,3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]},_=function(t,r,i){if(r=b[e(r).toLowerCase()]){for(var n=t.attrs["stroke-width"]||"1",a={round:n,square:n,butt:0}[t.attrs["stroke-linecap"]||i["stroke-linecap"]]||0,s=[],o=r.length;o--;)s[o]=r[o]*n+(o%2?1:-1)*a;x(t.node,{"stroke-dasharray":s.join(",")})}},w=function(i,a){var l=i.node,u=i.attrs,f=l.style.visibility;l.style.visibility="hidden";for(var d in a)if(a[t](d)){if(!r._availableAttrs[t](d))continue;var g=a[d];switch(u[d]=g,d){case"blur":i.blur(g);break;case"title":var b=l.getElementsByTagName("title");if(b.length&&(b=b[0]))b.firstChild.nodeValue=g;else{b=x("title");var w=r._g.doc.createTextNode(g);b.appendChild(w),l.appendChild(b)}break;case"href":case"target":var C=l.parentNode;if("a"!=C.tagName.toLowerCase()){var B=x("a");C.insertBefore(B,l),B.appendChild(l),C=B}"target"==d?C.setAttributeNS(p,"show","blank"==g?"new":g):C.setAttributeNS(p,d,g);break;case"cursor":l.style.cursor=g;break;case"transform":i.transform(g);break;case"arrow-start":m(i,g);break;case"arrow-end":m(i,g,1);break;case"clip-rect":var S=e(g).split(h);if(4==S.length){i.clip&&i.clip.parentNode.parentNode.removeChild(i.clip.parentNode);var T=x("clipPath"),A=x("rect");T.id=r.createUUID(),x(A,{x:S[0],y:S[1],width:S[2],height:S[3]}),T.appendChild(A),i.paper.defs.appendChild(T),x(l,{"clip-path":"url(#"+T.id+")"}),i.clip=A}if(!g){var N=l.getAttribute("clip-path");if(N){var E=r._g.doc.getElementById(N.replace(/(^url\(#|\)$)/g,c));E&&E.parentNode.removeChild(E),x(l,{"clip-path":c}),delete i.clip}}break;case"path":"path"==i.type&&(x(l,{d:g?u.path=r._pathToAbsolute(g):"M0,0"}),i._.dirty=1,i._.arrows&&("startString"in i._.arrows&&m(i,i._.arrows.startString),"endString"in i._.arrows&&m(i,i._.arrows.endString,1)));break;case"width":if(l.setAttribute(d,g),i._.dirty=1,!u.fx)break;d="x",g=u.x;case"x":u.fx&&(g=-u.x-(u.width||0));case"rx":if("rx"==d&&"rect"==i.type)break;case"cx":l.setAttribute(d,g),i.pattern&&y(i),i._.dirty=1;break;case"height":if(l.setAttribute(d,g),i._.dirty=1,!u.fy)break;d="y",g=u.y;case"y":u.fy&&(g=-u.y-(u.height||0));case"ry":if("ry"==d&&"rect"==i.type)break;case"cy":l.setAttribute(d,g),i.pattern&&y(i),i._.dirty=1;break;case"r":"rect"==i.type?x(l,{rx:g,ry:g}):l.setAttribute(d,g),i._.dirty=1;break;case"src":"image"==i.type&&l.setAttributeNS(p,"href",g);break;case"stroke-width":1==i._.sx&&1==i._.sy||(g/=s(o(i._.sx),o(i._.sy))||1),i.paper._vbSize&&(g*=i.paper._vbSize),l.setAttribute(d,g),u["stroke-dasharray"]&&_(i,u["stroke-dasharray"],a),i._.arrows&&("startString"in i._.arrows&&m(i,i._.arrows.startString),"endString"in i._.arrows&&m(i,i._.arrows.endString,1));break;case"stroke-dasharray":_(i,g,a);break;case"fill":var L=e(g).match(r._ISURL);if(L){T=x("pattern");var M=x("image");T.id=r.createUUID(),x(T,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1}),x(M,{x:0,y:0,"xlink:href":L[1]}),T.appendChild(M),function(t){r._preload(L[1],function(){var e=this.offsetWidth,r=this.offsetHeight;x(t,{width:e,height:r}),x(M,{width:e,height:r}),i.paper.safari()})}(T),i.paper.defs.appendChild(T),x(l,{fill:"url(#"+T.id+")"}),i.pattern=T,i.pattern&&y(i);break}var P=r.getRGB(g);if(P.error){if(("circle"==i.type||"ellipse"==i.type||"r"!=e(g).charAt())&&v(i,g)){if("opacity"in u||"fill-opacity"in u){var z=r._g.doc.getElementById(l.getAttribute("fill").replace(/^url\(#|\)$/g,c));if(z){var F=z.getElementsByTagName("stop");x(F[F.length-1],{"stop-opacity":("opacity"in u?u.opacity:1)*("fill-opacity"in u?u["fill-opacity"]:1)})}}u.gradient=g,u.fill="none";break}}else delete a.gradient,delete u.gradient,!r.is(u.opacity,"undefined")&&r.is(a.opacity,"undefined")&&x(l,{opacity:u.opacity}),!r.is(u["fill-opacity"],"undefined")&&r.is(a["fill-opacity"],"undefined")&&x(l,{"fill-opacity":u["fill-opacity"]});P[t]("opacity")&&x(l,{"fill-opacity":P.opacity>1?P.opacity/100:P.opacity});case"stroke":P=r.getRGB(g),l.setAttribute(d,P.hex),"stroke"==d&&P[t]("opacity")&&x(l,{"stroke-opacity":P.opacity>1?P.opacity/100:P.opacity}),"stroke"==d&&i._.arrows&&("startString"in i._.arrows&&m(i,i._.arrows.startString),"endString"in i._.arrows&&m(i,i._.arrows.endString,1));break;case"gradient":("circle"==i.type||"ellipse"==i.type||"r"!=e(g).charAt())&&v(i,g);break;case"opacity":u.gradient&&!u[t]("stroke-opacity")&&x(l,{"stroke-opacity":g>1?g/100:g});case"fill-opacity":if(u.gradient){z=r._g.doc.getElementById(l.getAttribute("fill").replace(/^url\(#|\)$/g,c)),z&&(F=z.getElementsByTagName("stop"),x(F[F.length-1],{"stop-opacity":g}));break}default:"font-size"==d&&(g=n(g,10)+"px");var R=d.replace(/(\-.)/g,function(t){return t.substring(1).toUpperCase()});l.style[R]=g,i._.dirty=1,
  l.setAttribute(d,g)}}k(i,a),l.style.visibility=f},k=function(i,a){if("text"==i.type&&(a[t]("text")||a[t]("font")||a[t]("font-size")||a[t]("x")||a[t]("y"))){var s=i.attrs,o=i.node,l=o.firstChild?n(r._g.doc.defaultView.getComputedStyle(o.firstChild,c).getPropertyValue("font-size"),10):10;if(a[t]("text")){for(s.text=a.text;o.firstChild;)o.removeChild(o.firstChild);for(var h,u=e(a.text).split("\n"),f=[],p=0,d=u.length;p<d;p++)h=x("tspan"),p&&x(h,{dy:1.2*l,x:s.x}),h.appendChild(r._g.doc.createTextNode(u[p])),o.appendChild(h),f[p]=h}else for(f=o.getElementsByTagName("tspan"),p=0,d=f.length;p<d;p++)p?x(f[p],{dy:1.2*l,x:s.x}):x(f[0],{dy:0});x(o,{x:s.x,y:s.y}),i._.dirty=1;var g=i._getBBox(),v=s.y-(g.y+g.height/2);v&&r.is(v,"finite")&&x(f[0],{dy:v})}},C=function(t,e){this[0]=this.node=t,t.raphael=!0,this.id=r._oid++,t.raphaelid=this.id,this.matrix=r.matrix(),this.realPath=null,this.paper=e,this.attrs=this.attrs||{},this._={transform:[],sx:1,sy:1,deg:0,dx:0,dy:0,dirty:1},!e.bottom&&(e.bottom=this),this.prev=e.top,e.top&&(e.top.next=this),e.top=this,this.next=null},B=r.el;C.prototype=B,B.constructor=C,r._engine.path=function(t,e){var r=x("path");e.canvas&&e.canvas.appendChild(r);var i=new C(r,e);return i.type="path",w(i,{fill:"none",stroke:"#000",path:t}),i},B.rotate=function(t,r,n){if(this.removed)return this;if(t=e(t).split(h),t.length-1&&(r=i(t[1]),n=i(t[2])),t=i(t[0]),null==n&&(r=n),null==r||null==n){var a=this.getBBox(1);r=a.x+a.width/2,n=a.y+a.height/2}return this.transform(this._.transform.concat([["r",t,r,n]])),this},B.scale=function(t,r,n,a){if(this.removed)return this;if(t=e(t).split(h),t.length-1&&(r=i(t[1]),n=i(t[2]),a=i(t[3])),t=i(t[0]),null==r&&(r=t),null==a&&(n=a),null==n||null==a)var s=this.getBBox(1);return n=null==n?s.x+s.width/2:n,a=null==a?s.y+s.height/2:a,this.transform(this._.transform.concat([["s",t,r,n,a]])),this},B.translate=function(t,r){return this.removed?this:(t=e(t).split(h),t.length-1&&(r=i(t[1])),t=i(t[0])||0,r=+r||0,this.transform(this._.transform.concat([["t",t,r]])),this)},B.transform=function(e){var i=this._;if(null==e)return i.transform;if(r._extractTransform(this,e),this.clip&&x(this.clip,{transform:this.matrix.invert()}),this.pattern&&y(this),this.node&&x(this.node,{transform:this.matrix}),1!=i.sx||1!=i.sy){var n=this.attrs[t]("stroke-width")?this.attrs["stroke-width"]:1;this.attr({"stroke-width":n})}return this},B.hide=function(){return!this.removed&&this.paper.safari(this.node.style.display="none"),this},B.show=function(){return!this.removed&&this.paper.safari(this.node.style.display=""),this},B.remove=function(){if(!this.removed&&this.node.parentNode){var t=this.paper;t.__set__&&t.__set__.exclude(this),u.unbind("raphael.*.*."+this.id),this.gradient&&t.defs.removeChild(this.gradient),r._tear(this,t),"a"==this.node.parentNode.tagName.toLowerCase()?this.node.parentNode.parentNode.removeChild(this.node.parentNode):this.node.parentNode.removeChild(this.node);for(var e in this)this[e]="function"==typeof this[e]?r._removedFactory(e):null;this.removed=!0}},B._getBBox=function(){if("none"==this.node.style.display){this.show();var t=!0}var e={};try{e=this.node.getBBox()}catch(t){}finally{e=e||{}}return t&&this.hide(),e},B.attr=function(e,i){if(this.removed)return this;if(null==e){var n={};for(var a in this.attrs)this.attrs[t](a)&&(n[a]=this.attrs[a]);return n.gradient&&"none"==n.fill&&(n.fill=n.gradient)&&delete n.gradient,n.transform=this._.transform,n}if(null==i&&r.is(e,"string")){if("fill"==e&&"none"==this.attrs.fill&&this.attrs.gradient)return this.attrs.gradient;if("transform"==e)return this._.transform;for(var s=e.split(h),o={},l=0,c=s.length;l<c;l++)e=s[l],e in this.attrs?o[e]=this.attrs[e]:r.is(this.paper.customAttributes[e],"function")?o[e]=this.paper.customAttributes[e].def:o[e]=r._availableAttrs[e];return c-1?o:o[s[0]]}if(null==i&&r.is(e,"array")){for(o={},l=0,c=e.length;l<c;l++)o[e[l]]=this.attr(e[l]);return o}if(null!=i){var f={};f[e]=i}else null!=e&&r.is(e,"object")&&(f=e);for(var p in f)u("raphael.attr."+p+"."+this.id,this,f[p]);for(p in this.paper.customAttributes)if(this.paper.customAttributes[t](p)&&f[t](p)&&r.is(this.paper.customAttributes[p],"function")){var d=this.paper.customAttributes[p].apply(this,[].concat(f[p]));this.attrs[p]=f[p];for(var g in d)d[t](g)&&(f[g]=d[g])}return w(this,f),this},B.toFront=function(){if(this.removed)return this;"a"==this.node.parentNode.tagName.toLowerCase()?this.node.parentNode.parentNode.appendChild(this.node.parentNode):this.node.parentNode.appendChild(this.node);var t=this.paper;return t.top!=this&&r._tofront(this,t),this},B.toBack=function(){if(this.removed)return this;var t=this.node.parentNode;"a"==t.tagName.toLowerCase()?t.parentNode.insertBefore(this.node.parentNode,this.node.parentNode.parentNode.firstChild):t.firstChild!=this.node&&t.insertBefore(this.node,this.node.parentNode.firstChild),r._toback(this,this.paper);this.paper;return this},B.insertAfter=function(t){if(this.removed)return this;var e=t.node||t[t.length-1].node;return e.nextSibling?e.parentNode.insertBefore(this.node,e.nextSibling):e.parentNode.appendChild(this.node),r._insertafter(this,t,this.paper),this},B.insertBefore=function(t){if(this.removed)return this;var e=t.node||t[0].node;return e.parentNode.insertBefore(this.node,e),r._insertbefore(this,t,this.paper),this},B.blur=function(t){var e=this;if(0!=+t){var i=x("filter"),n=x("feGaussianBlur");e.attrs.blur=t,i.id=r.createUUID(),x(n,{stdDeviation:+t||1.5}),i.appendChild(n),e.paper.defs.appendChild(i),e._blur=i,x(e.node,{filter:"url(#"+i.id+")"})}else e._blur&&(e._blur.parentNode.removeChild(e._blur),delete e._blur,delete e.attrs.blur),e.node.removeAttribute("filter");return e},r._engine.circle=function(t,e,r,i){var n=x("circle");t.canvas&&t.canvas.appendChild(n);var a=new C(n,t);return a.attrs={cx:e,cy:r,r:i,fill:"none",stroke:"#000"},a.type="circle",x(n,a.attrs),a},r._engine.rect=function(t,e,r,i,n,a){var s=x("rect");t.canvas&&t.canvas.appendChild(s);var o=new C(s,t);return o.attrs={x:e,y:r,width:i,height:n,r:a||0,rx:a||0,ry:a||0,fill:"none",stroke:"#000"},o.type="rect",x(s,o.attrs),o},r._engine.ellipse=function(t,e,r,i,n){var a=x("ellipse");t.canvas&&t.canvas.appendChild(a);var s=new C(a,t);return s.attrs={cx:e,cy:r,rx:i,ry:n,fill:"none",stroke:"#000"},s.type="ellipse",x(a,s.attrs),s},r._engine.image=function(t,e,r,i,n,a){var s=x("image");x(s,{x:r,y:i,width:n,height:a,preserveAspectRatio:"none"}),s.setAttributeNS(p,"href",e),t.canvas&&t.canvas.appendChild(s);var o=new C(s,t);return o.attrs={x:r,y:i,width:n,height:a,src:e},o.type="image",o},r._engine.text=function(t,e,i,n){var a=x("text");t.canvas&&t.canvas.appendChild(a);var s=new C(a,t);return s.attrs={x:e,y:i,"text-anchor":"middle",text:n,font:r._availableAttrs.font,stroke:"none",fill:"#000"},s.type="text",w(s,s.attrs),s},r._engine.setSize=function(t,e){return this.width=t||this.width,this.height=e||this.height,this.canvas.setAttribute("width",this.width),this.canvas.setAttribute("height",this.height),this._viewBox&&this.setViewBox.apply(this,this._viewBox),this},r._engine.create=function(){var t=r._getContainer.apply(0,arguments),e=t&&t.container,i=t.x,n=t.y,a=t.width,s=t.height;if(!e)throw new Error("SVG container not found.");var o,l=x("svg"),h="overflow:hidden;";return i=i||0,n=n||0,a=a||512,s=s||342,x(l,{height:s,version:1.1,width:a,xmlns:"http://www.w3.org/2000/svg"}),1==e?(l.style.cssText=h+"position:absolute;left:"+i+"px;top:"+n+"px",r._g.doc.body.appendChild(l),o=1):(l.style.cssText=h+"position:relative",e.firstChild?e.insertBefore(l,e.firstChild):e.appendChild(l)),e=new r._Paper,e.width=a,e.height=s,e.canvas=l,e.clear(),e._left=e._top=0,o&&(e.renderfix=function(){}),e.renderfix(),e},r._engine.setViewBox=function(t,e,r,i,n){u("raphael.setViewBox",this,this._viewBox,[t,e,r,i,n]);var a,o,l=s(r/this.width,i/this.height),h=this.top,c=n?"xMidYMid meet":"xMinYMin";for(null==t?(this._vbSize&&(l=1),delete this._vbSize,a="0 0 "+this.width+f+this.height):(this._vbSize=l,a=t+f+e+f+r+f+i),x(this.canvas,{viewBox:a,preserveAspectRatio:c});l&&h;)o="stroke-width"in h.attrs?h.attrs["stroke-width"]:1,h.attr({"stroke-width":o}),h._.dirty=1,h._.dirtyT=1,h=h.prev;return this._viewBox=[t,e,r,i,!!n],this},r.prototype.renderfix=function(){var t,e=this.canvas,r=e.style;try{t=e.getScreenCTM()||e.createSVGMatrix()}catch(r){t=e.createSVGMatrix()}var i=-t.e%1,n=-t.f%1;(i||n)&&(i&&(this._left=(this._left+i)%1,r.left=this._left+"px"),n&&(this._top=(this._top+n)%1,r.top=this._top+"px"))},r.prototype.clear=function(){r.eve("raphael.clear",this);for(var t=this.canvas;t.firstChild;)t.removeChild(t.firstChild);this.bottom=this.top=null,(this.desc=x("desc")).appendChild(r._g.doc.createTextNode("Created with Raphaël "+r.version)),t.appendChild(this.desc),t.appendChild(this.defs=x("defs"))},r.prototype.remove=function(){u("raphael.remove",this),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas);for(var t in this)this[t]="function"==typeof this[t]?r._removedFactory(t):null};var S=r.st;for(var T in B)B[t](T)&&!S[t](T)&&(S[T]=function(t){return function(){var e=arguments;return this.forEach(function(r){r[t].apply(r,e)})}}(T))}}(),function(){if(r.vml){var t="hasOwnProperty",e=String,i=parseFloat,n=Math,a=n.round,s=n.max,o=n.min,l=n.abs,h=/[, ]+/,u=r.eve,c=" ",f="",p={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},d=/([clmz]),?([^clmz]*)/gi,g=/ progid:\S+Blur\([^\)]+\)/g,x=/-?[^,\s-]+/g,v="position:absolute;left:0;top:0;width:1px;height:1px",y=21600,m={path:1,rect:1,image:1},b={circle:1,ellipse:1},_=function(t){var i=/[ahqstv]/gi,n=r._pathToAbsolute;if(e(t).match(i)&&(n=r._path2curve),i=/[clmz]/g,n==r._pathToAbsolute&&!e(t).match(i)){var s=e(t).replace(d,function(t,e,r){var i=[],n="m"==e.toLowerCase(),s=p[e];return r.replace(x,function(t){n&&2==i.length&&(s+=i+p["m"==e?"l":"L"],i=[]),i.push(a(t*y))}),s+i});return s}var o,l,h=n(t);s=[];for(var u=0,g=h.length;u<g;u++){o=h[u],l=h[u][0].toLowerCase(),"z"==l&&(l="x");for(var v=1,m=o.length;v<m;v++)l+=a(o[v]*y)+(v!=m-1?",":f);s.push(l)}return s.join(c)},w=function(t,e,i){var n=r.matrix();return n.rotate(-t,.5,.5),{dx:n.x(e,i),dy:n.y(e,i)}},k=function(t,e,r,i,n,a){var s=t._,o=t.matrix,h=s.fillpos,u=t.node,f=u.style,p=1,d="",g=y/e,x=y/r;if(f.visibility="hidden",e&&r){if(u.coordsize=l(g)+c+l(x),f.rotation=a*(e*r<0?-1:1),a){var v=w(a,i,n);i=v.dx,n=v.dy}if(e<0&&(d+="x"),r<0&&(d+=" y")&&(p=-1),f.flip=d,u.coordorigin=i*-g+c+n*-x,h||s.fillsize){var m=u.getElementsByTagName("fill");m=m&&m[0],u.removeChild(m),h&&(v=w(a,o.x(h[0],h[1]),o.y(h[0],h[1])),m.position=v.dx*p+c+v.dy*p),s.fillsize&&(m.size=s.fillsize[0]*l(e)+c+s.fillsize[1]*l(r)),u.appendChild(m)}f.visibility="visible"}};r.toString=function(){return"Your browser doesn’t support SVG. Falling down to VML.\nYou are running Raphaël "+this.version};var C=function(t,r,i){for(var n=e(r).toLowerCase().split("-"),a=i?"end":"start",s=n.length,o="classic",l="medium",h="medium";s--;)switch(n[s]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":o=n[s];break;case"wide":case"narrow":h=n[s];break;case"long":case"short":l=n[s]}var u=t.node.getElementsByTagName("stroke")[0];u[a+"arrow"]=o,u[a+"arrowlength"]=l,u[a+"arrowwidth"]=h},B=function(n,l){n.attrs=n.attrs||{};var u=n.node,p=n.attrs,d=u.style,g=m[n.type]&&(l.x!=p.x||l.y!=p.y||l.width!=p.width||l.height!=p.height||l.cx!=p.cx||l.cy!=p.cy||l.rx!=p.rx||l.ry!=p.ry||l.r!=p.r),x=b[n.type]&&(p.cx!=l.cx||p.cy!=l.cy||p.r!=l.r||p.rx!=l.rx||p.ry!=l.ry),v=n;for(var w in l)l[t](w)&&(p[w]=l[w]);if(g&&(p.path=r._getPath[n.type](n),n._.dirty=1),l.href&&(u.href=l.href),l.title&&(u.title=l.title),l.target&&(u.target=l.target),l.cursor&&(d.cursor=l.cursor),"blur"in l&&n.blur(l.blur),(l.path&&"path"==n.type||g)&&(u.path=_(~e(p.path).toLowerCase().indexOf("r")?r._pathToAbsolute(p.path):p.path),"image"==n.type&&(n._.fillpos=[p.x,p.y],n._.fillsize=[p.width,p.height],k(n,1,1,0,0,0))),"transform"in l&&n.transform(l.transform),x){var B=+p.cx,T=+p.cy,A=+p.rx||+p.r||0,E=+p.ry||+p.r||0;u.path=r.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x",a((B-A)*y),a((T-E)*y),a((B+A)*y),a((T+E)*y),a(B*y)),n._.dirty=1}if("clip-rect"in l){var L=e(l["clip-rect"]).split(h);if(4==L.length){L[2]=+L[2]+ +L[0],L[3]=+L[3]+ +L[1];var M=u.clipRect||r._g.doc.createElement("div"),P=M.style;P.clip=r.format("rect({1}px {2}px {3}px {0}px)",L),u.clipRect||(P.position="absolute",P.top=0,P.left=0,P.width=n.paper.width+"px",P.height=n.paper.height+"px",u.parentNode.insertBefore(M,u),M.appendChild(u),u.clipRect=M)}l["clip-rect"]||u.clipRect&&(u.clipRect.style.clip="auto")}if(n.textpath){var z=n.textpath.style;l.font&&(z.font=l.font),l["font-family"]&&(z.fontFamily='"'+l["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g,f)+'"'),l["font-size"]&&(z.fontSize=l["font-size"]),l["font-weight"]&&(z.fontWeight=l["font-weight"]),l["font-style"]&&(z.fontStyle=l["font-style"])}if("arrow-start"in l&&C(v,l["arrow-start"]),"arrow-end"in l&&C(v,l["arrow-end"],1),null!=l.opacity||null!=l["stroke-width"]||null!=l.fill||null!=l.src||null!=l.stroke||null!=l["stroke-width"]||null!=l["stroke-opacity"]||null!=l["fill-opacity"]||null!=l["stroke-dasharray"]||null!=l["stroke-miterlimit"]||null!=l["stroke-linejoin"]||null!=l["stroke-linecap"]){var F=u.getElementsByTagName("fill");if(F=F&&F[0],!F&&(F=N("fill")),"image"==n.type&&l.src&&(F.src=l.src),l.fill&&(F.on=!0),null!=F.on&&"none"!=l.fill&&null!==l.fill||(F.on=!1),F.on&&l.fill){var R=e(l.fill).match(r._ISURL);if(R){F.parentNode==u&&u.removeChild(F),F.rotate=!0,F.src=R[1],F.type="tile";var I=n.getBBox(1);F.position=I.x+c+I.y,n._.fillpos=[I.x,I.y],r._preload(R[1],function(){n._.fillsize=[this.offsetWidth,this.offsetHeight]})}else F.color=r.getRGB(l.fill).hex,F.src=f,F.type="solid",r.getRGB(l.fill).error&&(v.type in{circle:1,ellipse:1}||"r"!=e(l.fill).charAt())&&S(v,l.fill,F)&&(p.fill="none",p.gradient=l.fill,F.rotate=!1)}if("fill-opacity"in l||"opacity"in l){var j=((+p["fill-opacity"]+1||2)-1)*((+p.opacity+1||2)-1)*((+r.getRGB(l.fill).o+1||2)-1);j=o(s(j,0),1),F.opacity=j,F.src&&(F.color="none")}u.appendChild(F);var q=u.getElementsByTagName("stroke")&&u.getElementsByTagName("stroke")[0],D=!1;!q&&(D=q=N("stroke")),(l.stroke&&"none"!=l.stroke||l["stroke-width"]||null!=l["stroke-opacity"]||l["stroke-dasharray"]||l["stroke-miterlimit"]||l["stroke-linejoin"]||l["stroke-linecap"])&&(q.on=!0),("none"==l.stroke||null===l.stroke||null==q.on||0==l.stroke||0==l["stroke-width"])&&(q.on=!1);var O=r.getRGB(l.stroke);q.on&&l.stroke&&(q.color=O.hex),j=((+p["stroke-opacity"]+1||2)-1)*((+p.opacity+1||2)-1)*((+O.o+1||2)-1);var V=.75*(i(l["stroke-width"])||1);if(j=o(s(j,0),1),null==l["stroke-width"]&&(V=p["stroke-width"]),l["stroke-width"]&&(q.weight=V),V&&V<1&&(j*=V)&&(q.weight=1),q.opacity=j,l["stroke-linejoin"]&&(q.joinstyle=l["stroke-linejoin"]||"miter"),q.miterlimit=l["stroke-miterlimit"]||8,l["stroke-linecap"]&&(q.endcap="butt"==l["stroke-linecap"]?"flat":"square"==l["stroke-linecap"]?"square":"round"),"stroke-dasharray"in l){var Y={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};q.dashstyle=Y[t](l["stroke-dasharray"])?Y[l["stroke-dasharray"]]:f}D&&u.appendChild(q)}if("text"==v.type){v.paper.canvas.style.display=f;var G=v.paper.span,W=p.font&&p.font.match(/\d+(?:\.\d*)?(?=px)/);d=G.style,p.font&&(d.font=p.font),p["font-family"]&&(d.fontFamily=p["font-family"]),p["font-weight"]&&(d.fontWeight=p["font-weight"]),p["font-style"]&&(d.fontStyle=p["font-style"]),W=i(p["font-size"]||W&&W[0])||10,d.fontSize=100*W+"px",v.textpath.string&&(G.innerHTML=e(v.textpath.string).replace(/</g,"&#60;").replace(/&/g,"&#38;").replace(/\n/g,"<br>"));var X=G.getBoundingClientRect();v.W=p.w=(X.right-X.left)/100,v.H=p.h=(X.bottom-X.top)/100,v.X=p.x,v.Y=p.y+v.H/2,("x"in l||"y"in l)&&(v.path.v=r.format("m{0},{1}l{2},{1}",a(p.x*y),a(p.y*y),a(p.x*y)+1));for(var H=["x","y","text","font","font-family","font-weight","font-style","font-size"],U=0,$=H.length;U<$;U++)if(H[U]in l){v._.dirty=1;break}switch(p["text-anchor"]){case"start":v.textpath.style["v-text-align"]="left",v.bbx=v.W/2;break;case"end":v.textpath.style["v-text-align"]="right",v.bbx=-v.W/2;break;default:v.textpath.style["v-text-align"]="center",v.bbx=0}v.textpath.style["v-text-kern"]=!0}},S=function(t,a,s){t.attrs=t.attrs||{};var o=(t.attrs,Math.pow),l="linear",h=".5 .5";if(t.attrs.gradient=a,a=e(a).replace(r._radial_gradient,function(t,e,r){return l="radial",e&&r&&(e=i(e),r=i(r),o(e-.5,2)+o(r-.5,2)>.25&&(r=n.sqrt(.25-o(e-.5,2))*(2*(r>.5)-1)+.5),h=e+c+r),f}),a=a.split(/\s*\-\s*/),"linear"==l){var u=a.shift();if(u=-i(u),isNaN(u))return null}var p=r._parseDots(a);if(!p)return null;if(t=t.shape||t.node,p.length){t.removeChild(s),s.on=!0,s.method="none",s.color=p[0].color,s.color2=p[p.length-1].color;for(var d=[],g=0,x=p.length;g<x;g++)p[g].offset&&d.push(p[g].offset+c+p[g].color);s.colors=d.length?d.join():"0% "+s.color,"radial"==l?(s.type="gradientTitle",s.focus="100%",s.focussize="0 0",s.focusposition=h,s.angle=0):(s.type="gradient",s.angle=(270-u)%360),t.appendChild(s)}return 1},T=function(t,e){this[0]=this.node=t,t.raphael=!0,this.id=r._oid++,t.raphaelid=this.id,this.X=0,this.Y=0,this.attrs={},this.paper=e,this.matrix=r.matrix(),this._={transform:[],sx:1,sy:1,dx:0,dy:0,deg:0,dirty:1,dirtyT:1},!e.bottom&&(e.bottom=this),this.prev=e.top,e.top&&(e.top.next=this),e.top=this,this.next=null},A=r.el;T.prototype=A,A.constructor=T,A.transform=function(t){if(null==t)return this._.transform;var i,n=this.paper._viewBoxShift,a=n?"s"+[n.scale,n.scale]+"-1-1t"+[n.dx,n.dy]:f;n&&(i=t=e(t).replace(/\.{3}|\u2026/g,this._.transform||f)),r._extractTransform(this,a+t);var s,o=this.matrix.clone(),l=this.skew,h=this.node,u=~e(this.attrs.fill).indexOf("-"),p=!e(this.attrs.fill).indexOf("url(");if(o.translate(1,1),p||u||"image"==this.type)if(l.matrix="1 0 0 1",l.offset="0 0",s=o.split(),u&&s.noRotation||!s.isSimple){h.style.filter=o.toFilter();var d=this.getBBox(),g=this.getBBox(1),x=d.x-g.x,v=d.y-g.y;h.coordorigin=x*-y+c+v*-y,k(this,1,1,x,v,0)}else h.style.filter=f,k(this,s.scalex,s.scaley,s.dx,s.dy,s.rotate);else h.style.filter=f,l.matrix=e(o),l.offset=o.offset();return i&&(this._.transform=i),this},A.rotate=function(t,r,n){if(this.removed)return this;if(null!=t){if(t=e(t).split(h),t.length-1&&(r=i(t[1]),n=i(t[2])),t=i(t[0]),null==n&&(r=n),null==r||null==n){var a=this.getBBox(1);r=a.x+a.width/2,n=a.y+a.height/2}return this._.dirtyT=1,this.transform(this._.transform.concat([["r",t,r,n]])),this}},A.translate=function(t,r){return this.removed?this:(t=e(t).split(h),t.length-1&&(r=i(t[1])),t=i(t[0])||0,r=+r||0,this._.bbox&&(this._.bbox.x+=t,this._.bbox.y+=r),this.transform(this._.transform.concat([["t",t,r]])),this)},A.scale=function(t,r,n,a){if(this.removed)return this;if(t=e(t).split(h),t.length-1&&(r=i(t[1]),n=i(t[2]),a=i(t[3]),isNaN(n)&&(n=null),isNaN(a)&&(a=null)),t=i(t[0]),null==r&&(r=t),null==a&&(n=a),null==n||null==a)var s=this.getBBox(1);return n=null==n?s.x+s.width/2:n,a=null==a?s.y+s.height/2:a,this.transform(this._.transform.concat([["s",t,r,n,a]])),this._.dirtyT=1,this},A.hide=function(){return!this.removed&&(this.node.style.display="none"),this},A.show=function(){return!this.removed&&(this.node.style.display=f),this},A._getBBox=function(){return this.removed?{}:{x:this.X+(this.bbx||0)-this.W/2,y:this.Y-this.H,width:this.W,height:this.H}},A.remove=function(){if(!this.removed&&this.node.parentNode){this.paper.__set__&&this.paper.__set__.exclude(this),r.eve.unbind("raphael.*.*."+this.id),r._tear(this,this.paper),this.node.parentNode.removeChild(this.node),this.shape&&this.shape.parentNode.removeChild(this.shape);for(var t in this)this[t]="function"==typeof this[t]?r._removedFactory(t):null;this.removed=!0}},A.attr=function(e,i){if(this.removed)return this;if(null==e){var n={};for(var a in this.attrs)this.attrs[t](a)&&(n[a]=this.attrs[a]);return n.gradient&&"none"==n.fill&&(n.fill=n.gradient)&&delete n.gradient,n.transform=this._.transform,n}if(null==i&&r.is(e,"string")){if("fill"==e&&"none"==this.attrs.fill&&this.attrs.gradient)return this.attrs.gradient;for(var s=e.split(h),o={},l=0,c=s.length;l<c;l++)e=s[l],e in this.attrs?o[e]=this.attrs[e]:r.is(this.paper.customAttributes[e],"function")?o[e]=this.paper.customAttributes[e].def:o[e]=r._availableAttrs[e];return c-1?o:o[s[0]]}if(this.attrs&&null==i&&r.is(e,"array")){for(o={},l=0,c=e.length;l<c;l++)o[e[l]]=this.attr(e[l]);return o}var f;null!=i&&(f={},f[e]=i),null==i&&r.is(e,"object")&&(f=e);for(var p in f)u("raphael.attr."+p+"."+this.id,this,f[p]);if(f){for(p in this.paper.customAttributes)if(this.paper.customAttributes[t](p)&&f[t](p)&&r.is(this.paper.customAttributes[p],"function")){var d=this.paper.customAttributes[p].apply(this,[].concat(f[p]));this.attrs[p]=f[p];for(var g in d)d[t](g)&&(f[g]=d[g])}f.text&&"text"==this.type&&(this.textpath.string=f.text),B(this,f)}return this},A.toFront=function(){return!this.removed&&this.node.parentNode.appendChild(this.node),this.paper&&this.paper.top!=this&&r._tofront(this,this.paper),this},A.toBack=function(){return this.removed?this:(this.node.parentNode.firstChild!=this.node&&(this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild),r._toback(this,this.paper)),this)},A.insertAfter=function(t){return this.removed?this:(t.constructor==r.st.constructor&&(t=t[t.length-1]),t.node.nextSibling?t.node.parentNode.insertBefore(this.node,t.node.nextSibling):t.node.parentNode.appendChild(this.node),r._insertafter(this,t,this.paper),this)},A.insertBefore=function(t){return this.removed?this:(t.constructor==r.st.constructor&&(t=t[0]),t.node.parentNode.insertBefore(this.node,t.node),r._insertbefore(this,t,this.paper),this)},A.blur=function(t){var e=this.node.runtimeStyle,i=e.filter;return i=i.replace(g,f),0!=+t?(this.attrs.blur=t,e.filter=i+c+" progid:DXImageTransform.Microsoft.Blur(pixelradius="+(+t||1.5)+")",e.margin=r.format("-{0}px 0 0 -{0}px",a(+t||1.5))):(e.filter=i,e.margin=0,delete this.attrs.blur),this},r._engine.path=function(t,e){var r=N("shape");r.style.cssText=v,r.coordsize=y+c+y,r.coordorigin=e.coordorigin;var i=new T(r,e),n={fill:"none",stroke:"#000"};t&&(n.path=t),i.type="path",i.path=[],i.Path=f,B(i,n),e.canvas.appendChild(r);var a=N("skew");return a.on=!0,r.appendChild(a),i.skew=a,i.transform(f),i},r._engine.rect=function(t,e,i,n,a,s){var o=r._rectPath(e,i,n,a,s),l=t.path(o),h=l.attrs;return l.X=h.x=e,l.Y=h.y=i,l.W=h.width=n,l.H=h.height=a,h.r=s,h.path=o,l.type="rect",l},r._engine.ellipse=function(t,e,r,i,n){var a=t.path();a.attrs;return a.X=e-i,a.Y=r-n,a.W=2*i,a.H=2*n,a.type="ellipse",B(a,{cx:e,cy:r,rx:i,ry:n}),a},r._engine.circle=function(t,e,r,i){var n=t.path();n.attrs;return n.X=e-i,n.Y=r-i,n.W=n.H=2*i,n.type="circle",B(n,{cx:e,cy:r,r:i}),n},r._engine.image=function(t,e,i,n,a,s){var o=r._rectPath(i,n,a,s),l=t.path(o).attr({stroke:"none"}),h=l.attrs,u=l.node,c=u.getElementsByTagName("fill")[0];return h.src=e,l.X=h.x=i,l.Y=h.y=n,l.W=h.width=a,l.H=h.height=s,h.path=o,l.type="image",c.parentNode==u&&u.removeChild(c),c.rotate=!0,c.src=e,c.type="tile",l._.fillpos=[i,n],l._.fillsize=[a,s],u.appendChild(c),k(l,1,1,0,0,0),l},r._engine.text=function(t,i,n,s){var o=N("shape"),l=N("path"),h=N("textpath");i=i||0,n=n||0,s=s||"",l.v=r.format("m{0},{1}l{2},{1}",a(i*y),a(n*y),a(i*y)+1),l.textpathok=!0,h.string=e(s),h.on=!0,o.style.cssText=v,o.coordsize=y+c+y,o.coordorigin="0 0";var u=new T(o,t),p={fill:"#000",stroke:"none",font:r._availableAttrs.font,text:s};u.shape=o,u.path=l,u.textpath=h,u.type="text",u.attrs.text=e(s),u.attrs.x=i,u.attrs.y=n,u.attrs.w=1,u.attrs.h=1,B(u,p),o.appendChild(h),o.appendChild(l),t.canvas.appendChild(o);var d=N("skew");return d.on=!0,o.appendChild(d),u.skew=d,u.transform(f),u},r._engine.setSize=function(t,e){var i=this.canvas.style;return this.width=t,this.height=e,t==+t&&(t+="px"),e==+e&&(e+="px"),i.width=t,i.height=e,i.clip="rect(0 "+t+" "+e+" 0)",this._viewBox&&r._engine.setViewBox.apply(this,this._viewBox),this},r._engine.setViewBox=function(t,e,i,n,a){r.eve("raphael.setViewBox",this,this._viewBox,[t,e,i,n,a]);var o,l,h=this.width,u=this.height,c=1/s(i/h,n/u);return a&&(o=u/n,l=h/i,i*o<h&&(t-=(h-i*o)/2/o),n*l<u&&(e-=(u-n*l)/2/l)),this._viewBox=[t,e,i,n,!!a],this._viewBoxShift={dx:-t,dy:-e,scale:c},this.forEach(function(t){t.transform("...")}),this};var N;r._engine.initWin=function(t){var e=t.document;e.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)");try{!e.namespaces.rvml&&e.namespaces.add("rvml","urn:schemas-microsoft-com:vml"),N=function(t){return e.createElement("<rvml:"+t+' class="rvml">')}}catch(t){N=function(t){return e.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},r._engine.initWin(r._g.win),r._engine.create=function(){var t=r._getContainer.apply(0,arguments),e=t.container,i=t.height,n=t.width,a=t.x,s=t.y;if(!e)throw new Error("VML container not found.");var o=new r._Paper,l=o.canvas=r._g.doc.createElement("div"),h=l.style;return a=a||0,s=s||0,n=n||512,i=i||342,o.width=n,o.height=i,n==+n&&(n+="px"),i==+i&&(i+="px"),o.coordsize=216e5+c+216e5,o.coordorigin="0 0",o.span=r._g.doc.createElement("span"),o.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",l.appendChild(o.span),h.cssText=r.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",n,i),1==e?(r._g.doc.body.appendChild(l),h.left=a+"px",h.top=s+"px",h.position="absolute"):e.firstChild?e.insertBefore(l,e.firstChild):e.appendChild(l),o.renderfix=function(){},o},r.prototype.clear=function(){r.eve("raphael.clear",this),this.canvas.innerHTML=f,this.span=r._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},r.prototype.remove=function(){r.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas);for(var t in this)this[t]="function"==typeof this[t]?r._removedFactory(t):null;return!0};var E=r.st;for(var L in A)A[t](L)&&!E[t](L)&&(E[L]=function(t){return function(){var e=arguments;return this.forEach(function(r){r[t].apply(r,e)})}}(L))}}(),T.was?S.win.Raphael=r:Raphael=r,r});