diff --git a/javascripts/pageviews/pageviews.js b/javascripts/pageviews/pageviews.js index 0e77de177..ec105db4a 100644 --- a/javascripts/pageviews/pageviews.js +++ b/javascripts/pageviews/pageviews.js @@ -567,7 +567,7 @@ class PageViews extends mix(Pv).with(ChartHelpers) { num_users: this.entityInfo.totals ? this.entityInfo.totals.num_users : null, length: datasets.reduce((a, b) => a + b.length, 0), protection: $.i18n('num-protections', this.formatNumber(numProtections), numProtections), - watchers: datasets.reduce((a, b) => a + b.watchers || 0, 0) + watchers: datasets.reduce((a, b) => a + (b.watchers || 0), 0) }; this.$outputList.append(this.config.templates.tableRow(this, totals, true)); diff --git a/public_html/pageviews/application-a549d7d2a1.js b/public_html/pageviews/application-f3e320f008.js similarity index 99% rename from public_html/pageviews/application-a549d7d2a1.js rename to public_html/pageviews/application-f3e320f008.js index 849309f85..4f68df359 100644 --- a/public_html/pageviews/application-a549d7d2a1.js +++ b/public_html/pageviews/application-f3e320f008.js @@ -12,7 +12,7 @@ h=C[f],isNaN(w))switch(h){case"MM":b=t(m[r].months).filter(c),w=t.inArray(b[0],m o.borderWidth=a.borderWidth?a.borderWidth:e.getValueAtIndexOrDefault(i.borderWidth,n,r.borderWidth)}}),t.defaults.horizontalBar={hover:{mode:"label"},scales:{xAxes:[{type:"linear",position:"bottom"}],yAxes:[{position:"left",type:"category",categoryPercentage:.8,barPercentage:.9,gridLines:{offsetGridLines:!0}}]},elements:{rectangle:{borderSkipped:"left"}},tooltips:{callbacks:{title:function(t,e){var i="";return t.length>0&&(t[0].yLabel?i=t[0].yLabel:e.labels.length>0&&t[0].indexd;d++)e.lineTo.apply(e,t(d));e.fill(),i.borderWidth&&e.stroke()},inRange:function(t,e){var i=this._view,n=!1;return i&&(n=i.x=i.y-i.height/2&&e<=i.y+i.height/2&&t>=i.x&&t<=i.base:e>=i.y-i.height/2&&e<=i.y+i.height/2&&t>=i.base&&t<=i.x),n}}),t.pivot()},calculateBarBase:function(t,e){var i=this,n=i.getMeta(),a=i.getScaleForId(n.xAxisID),o=0;if(a.options.stacked){for(var r=i.chart,s=r.data.datasets,l=Number(s[t].data[e]),c=0;t>c;c++){var u=s[c],d=r.getDatasetMeta(c);if(d.bar&&d.xAxisID===a.id&&r.isDatasetVisible(c)){var h=Number(u.data[e]);o+=0>l?Math.min(h,0):Math.max(h,0)}}return a.getPixelForValue(o)}return a.getBasePixel()},getRuler:function(t){var e,i=this,n=i.getMeta(),a=i.getScaleForId(n.yAxisID),o=i.getBarCount();e="category"===a.options.type?a.getPixelForTick(t+1)-a.getPixelForTick(t):a.width/a.ticks.length;var r=e*a.options.categoryPercentage,s=(e-e*a.options.categoryPercentage)/2,l=r/o;if(a.ticks.length!==i.chart.data.labels.length){l*=a.ticks.length/i.chart.data.labels.length}return{datasetCount:o,tickHeight:e,categoryHeight:r,categorySpacing:s,fullBarHeight:l,barHeight:l*a.options.barPercentage,barSpacing:l-l*a.options.barPercentage}},calculateBarHeight:function(t){var e=this,i=e.getScaleForId(e.getMeta().yAxisID);if(i.options.barThickness)return i.options.barThickness;var n=e.getRuler(t);return i.options.stacked?n.categoryHeight:n.barHeight},calculateBarX:function(t,e){var i=this,n=i.getMeta(),a=i.getScaleForId(n.xAxisID),o=Number(i.getDataset().data[t]);if(a.options.stacked){for(var r=0,s=0,l=0;e>l;l++){var c=i.chart.data.datasets[l],u=i.chart.getDatasetMeta(l);if(u.bar&&u.xAxisID===a.id&&i.chart.isDatasetVisible(l)){var d=Number(c.data[t]);0>d?s+=d||0:r+=d||0}}return 0>o?a.getPixelForValue(s+o):a.getPixelForValue(r+o)}return a.getPixelForValue(o)},calculateBarY:function(t,e){var i=this,n=i.getMeta(),a=i.getScaleForId(n.yAxisID),o=i.getBarIndex(e),r=i.getRuler(t),s=a.getPixelForValue(null,t,e,i.chart.isCombo);return s-=i.chart.isCombo?r.tickHeight/2:0,a.options.stacked?s+r.categoryHeight/2+r.categorySpacing:s+r.barHeight/2+r.categorySpacing+r.barHeight*o+r.barSpacing/2+r.barSpacing*o}})}},{}],16:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.bubble={hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-0"}],yAxes:[{type:"linear",position:"left",id:"y-axis-0"}]},tooltips:{callbacks:{title:function(){return""},label:function(t,e){var i=e.datasets[t.datasetIndex].label||"",n=e.datasets[t.datasetIndex].data[t.index];return i+": ("+n.x+", "+n.y+", "+n.r+")"}}}},t.controllers.bubble=t.DatasetController.extend({dataElementType:t.elements.Point,update:function(t){var i=this,n=i.getMeta(),a=n.data;e.each(a,function(e,n){i.updateElement(e,n,t)})},updateElement:function(i,n,a){var o=this,r=o.getMeta(),s=o.getScaleForId(r.xAxisID),l=o.getScaleForId(r.yAxisID),c=i.custom||{},u=o.getDataset(),d=u.data[n],h=o.chart.options.elements.point,p=o.index;e.extend(i,{_xScale:s,_yScale:l,_datasetIndex:p,_index:n,_model:{x:a?s.getPixelForDecimal(.5):s.getPixelForValue("object"==typeof d?d:NaN,n,p,o.chart.isCombo),y:a?l.getBasePixel():l.getPixelForValue(d,n,p),radius:a?0:c.radius?c.radius:o.getRadius(d),hitRadius:c.hitRadius?c.hitRadius:e.getValueAtIndexOrDefault(u.hitRadius,n,h.hitRadius)}}),t.DatasetController.prototype.removeHoverStyle.call(o,i,h);var f=i._model;f.skip=c.skip?c.skip:isNaN(f.x)||isNaN(f.y),i.pivot()},getRadius:function(t){return t.r||this.chart.options.elements.point.radius},setHoverStyle:function(i){var n=this;t.DatasetController.prototype.setHoverStyle.call(n,i);var a=n.chart.data.datasets[i._datasetIndex],o=i._index,r=i.custom||{};i._model.radius=r.hoverRadius?r.hoverRadius:e.getValueAtIndexOrDefault(a.hoverRadius,o,n.chart.options.elements.point.hoverRadius)+n.getRadius(a.data[o])},removeHoverStyle:function(e){var i=this;t.DatasetController.prototype.removeHoverStyle.call(i,e,i.chart.options.elements.point);var n=i.chart.data.datasets[e._datasetIndex].data[e._index],a=e.custom||{};e._model.radius=a.radius?a.radius:i.getRadius(n)}})}},{}],17:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i=t.defaults;i.doughnut={animation:{animateRotate:!0,animateScale:!1},aspectRatio:1,hover:{mode:"single"},legendCallback:function(t){var e=[];e.push('"),e.join("")},legend:{labels:{generateLabels:function(t){var i=t.data;return i.labels.length&&i.datasets.length?i.labels.map(function(n,a){var o=t.getDatasetMeta(0),r=i.datasets[0],s=o.data[a],l=s&&s.custom||{},c=e.getValueAtIndexOrDefault,u=t.options.elements.arc;return{text:n,fillStyle:l.backgroundColor?l.backgroundColor:c(r.backgroundColor,a,u.backgroundColor),strokeStyle:l.borderColor?l.borderColor:c(r.borderColor,a,u.borderColor),lineWidth:l.borderWidth?l.borderWidth:c(r.borderWidth,a,u.borderWidth),hidden:isNaN(r.data[a])||o.data[a].hidden,index:a}}):[]}},onClick:function(t,e){var i,n,a,o=e.index,r=this.chart;for(i=0,n=(r.data.datasets||[]).length;n>i;++i)a=r.getDatasetMeta(i),a.data[o]&&(a.data[o].hidden=!a.data[o].hidden);r.update()}},cutoutPercentage:50,rotation:-.5*Math.PI,circumference:2*Math.PI,tooltips:{callbacks:{title:function(){return""},label:function(t,e){return e.labels[t.index]+": "+e.datasets[t.datasetIndex].data[t.index]}}}},i.pie=e.clone(i.doughnut),e.extend(i.pie,{cutoutPercentage:0}),t.controllers.doughnut=t.controllers.pie=t.DatasetController.extend({dataElementType:t.elements.Arc,linkScales:e.noop,getRingIndex:function(t){for(var e=0,i=0;t>i;++i)this.chart.isDatasetVisible(i)&&++e;return e},update:function(t){var i=this,n=i.chart,a=n.chartArea,o=n.options,r=o.elements.arc,s=a.right-a.left-r.borderWidth,l=a.bottom-a.top-r.borderWidth,c=Math.min(s,l),u={x:0,y:0},d=i.getMeta(),h=o.cutoutPercentage,p=o.circumference;if(p<2*Math.PI){var f=o.rotation%(2*Math.PI);f+=2*Math.PI*(f>=Math.PI?-1:f<-Math.PI?1:0);var g=f+p,m={x:Math.cos(f),y:Math.sin(f)},v={x:Math.cos(g),y:Math.sin(g)},k=0>=f&&g>=0||f<=2*Math.PI&&2*Math.PI<=g,y=f<=.5*Math.PI&&.5*Math.PI<=g||f<=2.5*Math.PI&&2.5*Math.PI<=g,w=f<=-Math.PI&&-Math.PI<=g||f<=Math.PI&&Math.PI<=g,b=f<=.5*-Math.PI&&.5*-Math.PI<=g||f<=1.5*Math.PI&&1.5*Math.PI<=g,D=h/100,x={x:w?-1:Math.min(m.x*(m.x<0?1:D),v.x*(v.x<0?1:D)),y:b?-1:Math.min(m.y*(m.y<0?1:D),v.y*(v.y<0?1:D))},_={x:k?1:Math.max(m.x*(m.x>0?1:D),v.x*(v.x>0?1:D)),y:y?1:Math.max(m.y*(m.y>0?1:D),v.y*(v.y>0?1:D))},C={width:.5*(_.x-x.x),height:.5*(_.y-x.y)};c=Math.min(s/C.width,l/C.height),u={x:-.5*(_.x+x.x),y:-.5*(_.y+x.y)}}n.borderWidth=i.getMaxBorderWidth(d.data),n.outerRadius=Math.max((c-n.borderWidth)/2,0),n.innerRadius=Math.max(h?n.outerRadius/100*h:1,0),n.radiusLength=(n.outerRadius-n.innerRadius)/n.getVisibleDatasetCount(),n.offsetX=u.x*n.outerRadius,n.offsetY=u.y*n.outerRadius,d.total=i.calculateTotal(),i.outerRadius=n.outerRadius-n.radiusLength*i.getRingIndex(i.index),i.innerRadius=i.outerRadius-n.radiusLength,e.each(d.data,function(e,n){i.updateElement(e,n,t)})},updateElement:function(t,i,n){var a=this,o=a.chart,r=o.chartArea,s=o.options,l=s.animation,c=(r.left+r.right)/2,u=(r.top+r.bottom)/2,d=s.rotation,h=s.rotation,p=a.getDataset(),f=n&&l.animateRotate?0:t.hidden?0:a.calculateCircumference(p.data[i])*(s.circumference/(2*Math.PI)),g=n&&l.animateScale?0:a.innerRadius,m=n&&l.animateScale?0:a.outerRadius,v=e.getValueAtIndexOrDefault;e.extend(t,{_datasetIndex:a.index,_index:i,_model:{x:c+o.offsetX,y:u+o.offsetY,startAngle:d,endAngle:h,circumference:f,outerRadius:m,innerRadius:g,label:v(p.label,i,o.data.labels[i])}});var k=t._model;this.removeHoverStyle(t),n&&l.animateRotate||(k.startAngle=0===i?s.rotation:a.getMeta().data[i-1]._model.endAngle,k.endAngle=k.startAngle+k.circumference),t.pivot()},removeHoverStyle:function(e){t.DatasetController.prototype.removeHoverStyle.call(this,e,this.chart.options.elements.arc)},calculateTotal:function(){var t,i=this.getDataset(),n=this.getMeta(),a=0;return e.each(n.data,function(e,n){t=i.data[n],isNaN(t)||e.hidden||(a+=Math.abs(t))}),a},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?2*Math.PI*(t/e):0},getMaxBorderWidth:function(t){for(var e,i,n=0,a=this.index,o=t.length,r=0;o>r;r++)e=t[r]._model?t[r]._model.borderWidth:0,i=t[r]._chart?t[r]._chart.config.data.datasets[a].hoverBorderWidth:0,n=e>n?e:n,n=i>n?i:n;return n}})}},{}],18:[function(t,e,i){"use strict";e.exports=function(t){function e(t,e){return i.getValueOrDefault(t.showLine,e.showLines)}var i=t.helpers;t.defaults.line={showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}},t.controllers.line=t.DatasetController.extend({datasetElementType:t.elements.Line,dataElementType:t.elements.Point,addElementAndReset:function(i){var n=this,a=n.chart.options,o=n.getMeta();t.DatasetController.prototype.addElementAndReset.call(n,i),e(n.getDataset(),a)&&0!==o.dataset._model.tension&&n.updateBezierControlPoints()},update:function(t){var n,a,o,r=this,s=r.getMeta(),l=s.dataset,c=s.data||[],u=r.chart.options,d=u.elements.line,h=r.getScaleForId(s.yAxisID),p=r.getDataset(),f=e(p,u);for(f&&(o=l.custom||{},void 0!==p.tension&&void 0===p.lineTension&&(p.lineTension=p.tension),l._scale=h,l._datasetIndex=r.index,l._children=c,l._model={spanGaps:p.spanGaps?p.spanGaps:u.spanGaps,tension:o.tension?o.tension:i.getValueOrDefault(p.lineTension,d.tension),backgroundColor:o.backgroundColor?o.backgroundColor:p.backgroundColor||d.backgroundColor,borderWidth:o.borderWidth?o.borderWidth:p.borderWidth||d.borderWidth,borderColor:o.borderColor?o.borderColor:p.borderColor||d.borderColor,borderCapStyle:o.borderCapStyle?o.borderCapStyle:p.borderCapStyle||d.borderCapStyle,borderDash:o.borderDash?o.borderDash:p.borderDash||d.borderDash,borderDashOffset:o.borderDashOffset?o.borderDashOffset:p.borderDashOffset||d.borderDashOffset,borderJoinStyle:o.borderJoinStyle?o.borderJoinStyle:p.borderJoinStyle||d.borderJoinStyle,fill:o.fill?o.fill:void 0!==p.fill?p.fill:d.fill,steppedLine:o.steppedLine?o.steppedLine:i.getValueOrDefault(p.steppedLine,d.stepped),cubicInterpolationMode:o.cubicInterpolationMode?o.cubicInterpolationMode:i.getValueOrDefault(p.cubicInterpolationMode,d.cubicInterpolationMode),scaleTop:h.top,scaleBottom:h.bottom,scaleZero:h.getBasePixel()},l.pivot()),n=0,a=c.length;a>n;++n)r.updateElement(c[n],n,t);for(f&&0!==l._model.tension&&r.updateBezierControlPoints(),n=0,a=c.length;a>n;++n)c[n].pivot()},getPointBackgroundColor:function(t,e){var n=this.chart.options.elements.point.backgroundColor,a=this.getDataset(),o=t.custom||{};return o.backgroundColor?n=o.backgroundColor:a.pointBackgroundColor?n=i.getValueAtIndexOrDefault(a.pointBackgroundColor,e,n):a.backgroundColor&&(n=a.backgroundColor),n},getPointBorderColor:function(t,e){var n=this.chart.options.elements.point.borderColor,a=this.getDataset(),o=t.custom||{};return o.borderColor?n=o.borderColor:a.pointBorderColor?n=i.getValueAtIndexOrDefault(a.pointBorderColor,e,n):a.borderColor&&(n=a.borderColor),n},getPointBorderWidth:function(t,e){var n=this.chart.options.elements.point.borderWidth,a=this.getDataset(),o=t.custom||{};return o.borderWidth?n=o.borderWidth:a.pointBorderWidth?n=i.getValueAtIndexOrDefault(a.pointBorderWidth,e,n):a.borderWidth&&(n=a.borderWidth),n},updateElement:function(t,e,n){var a,o,r=this,s=r.getMeta(),l=t.custom||{},c=r.getDataset(),u=r.index,d=c.data[e],h=r.getScaleForId(s.yAxisID),p=r.getScaleForId(s.xAxisID),f=r.chart.options.elements.point,g=r.chart.data.labels||[],m=1===g.length||1===c.data.length||r.chart.isCombo;void 0!==c.radius&&void 0===c.pointRadius&&(c.pointRadius=c.radius),void 0!==c.hitRadius&&void 0===c.pointHitRadius&&(c.pointHitRadius=c.hitRadius),a=p.getPixelForValue("object"==typeof d?d:NaN,e,u,m),o=n?h.getBasePixel():r.calculatePointY(d,e,u),t._xScale=p,t._yScale=h,t._datasetIndex=u,t._index=e,t._model={x:a,y:o,skip:l.skip||isNaN(a)||isNaN(o),radius:l.radius||i.getValueAtIndexOrDefault(c.pointRadius,e,f.radius),pointStyle:l.pointStyle||i.getValueAtIndexOrDefault(c.pointStyle,e,f.pointStyle),backgroundColor:r.getPointBackgroundColor(t,e),borderColor:r.getPointBorderColor(t,e),borderWidth:r.getPointBorderWidth(t,e),tension:s.dataset._model?s.dataset._model.tension:0,steppedLine:!!s.dataset._model&&s.dataset._model.steppedLine,hitRadius:l.hitRadius||i.getValueAtIndexOrDefault(c.pointHitRadius,e,f.hitRadius)}},calculatePointY:function(t,e,i){var n,a,o,r=this,s=r.chart,l=r.getMeta(),c=r.getScaleForId(l.yAxisID),u=0,d=0;if(c.options.stacked){for(n=0;i>n;n++)if(a=s.data.datasets[n],o=s.getDatasetMeta(n),"line"===o.type&&o.yAxisID===c.id&&s.isDatasetVisible(n)){var h=Number(c.getRightValue(a.data[e]));0>h?d+=h||0:u+=h||0}var p=Number(c.getRightValue(t));return 0>p?c.getPixelForValue(d+p):c.getPixelForValue(u+p)}return c.getPixelForValue(t)},updateBezierControlPoints:function(){function t(t,e,i){return Math.max(Math.min(t,i),e)}var e,n,a,o,r,s=this,l=s.getMeta(),c=s.chart.chartArea,u=l.data||[];if(l.dataset._model.spanGaps&&(u=u.filter(function(t){return!t._model.skip})),"monotone"===l.dataset._model.cubicInterpolationMode)i.splineCurveMonotone(u);else for(e=0,n=u.length;n>e;++e)a=u[e],o=a._model,r=i.splineCurve(i.previousItem(u,e)._model,o,i.nextItem(u,e)._model,l.dataset._model.tension),o.controlPointPreviousX=r.previous.x,o.controlPointPreviousY=r.previous.y,o.controlPointNextX=r.next.x,o.controlPointNextY=r.next.y;if(s.chart.options.elements.line.capBezierPoints)for(e=0,n=u.length;n>e;++e)o=u[e]._model,o.controlPointPreviousX=t(o.controlPointPreviousX,c.left,c.right),o.controlPointPreviousY=t(o.controlPointPreviousY,c.top,c.bottom),o.controlPointNextX=t(o.controlPointNextX,c.left,c.right),o.controlPointNextY=t(o.controlPointNextY,c.top,c.bottom)},draw:function(t){var i,n,a=this,o=a.getMeta(),r=o.data||[],s=t||1;for(i=0,n=r.length;n>i;++i)r[i].transition(s);for(e(a.getDataset(),a.chart.options)&&o.dataset.transition(s).draw(),i=0,n=r.length;n>i;++i)r[i].draw()},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t._index,a=t.custom||{},o=t._model;o.radius=a.hoverRadius||i.getValueAtIndexOrDefault(e.pointHoverRadius,n,this.chart.options.elements.point.hoverRadius),o.backgroundColor=a.hoverBackgroundColor||i.getValueAtIndexOrDefault(e.pointHoverBackgroundColor,n,i.getHoverColor(o.backgroundColor)),o.borderColor=a.hoverBorderColor||i.getValueAtIndexOrDefault(e.pointHoverBorderColor,n,i.getHoverColor(o.borderColor)),o.borderWidth=a.hoverBorderWidth||i.getValueAtIndexOrDefault(e.pointHoverBorderWidth,n,o.borderWidth)},removeHoverStyle:function(t){var e=this,n=e.chart.data.datasets[t._datasetIndex],a=t._index,o=t.custom||{},r=t._model;void 0!==n.radius&&void 0===n.pointRadius&&(n.pointRadius=n.radius),r.radius=o.radius||i.getValueAtIndexOrDefault(n.pointRadius,a,e.chart.options.elements.point.radius),r.backgroundColor=e.getPointBackgroundColor(t,a),r.borderColor=e.getPointBorderColor(t,a),r.borderWidth=e.getPointBorderWidth(t,a)}})}},{}],19:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.polarArea={scale:{type:"radialLinear",lineArc:!0,ticks:{beginAtZero:!0}},animation:{animateRotate:!0,animateScale:!0},startAngle:-.5*Math.PI,aspectRatio:1,legendCallback:function(t){var e=[];e.push('"),e.join("")},legend:{labels:{generateLabels:function(t){var i=t.data;return i.labels.length&&i.datasets.length?i.labels.map(function(n,a){var o=t.getDatasetMeta(0),r=i.datasets[0],s=o.data[a],l=s.custom||{},c=e.getValueAtIndexOrDefault,u=t.options.elements.arc;return{text:n,fillStyle:l.backgroundColor?l.backgroundColor:c(r.backgroundColor,a,u.backgroundColor),strokeStyle:l.borderColor?l.borderColor:c(r.borderColor,a,u.borderColor),lineWidth:l.borderWidth?l.borderWidth:c(r.borderWidth,a,u.borderWidth),hidden:isNaN(r.data[a])||o.data[a].hidden,index:a}}):[]}},onClick:function(t,e){var i,n,a,o=e.index,r=this.chart;for(i=0,n=(r.data.datasets||[]).length;n>i;++i)a=r.getDatasetMeta(i),a.data[o].hidden=!a.data[o].hidden;r.update()}},tooltips:{callbacks:{title:function(){return""},label:function(t,e){return e.labels[t.index]+": "+t.yLabel}}}},t.controllers.polarArea=t.DatasetController.extend({dataElementType:t.elements.Arc,linkScales:e.noop,update:function(t){var i=this,n=i.chart,a=n.chartArea,o=i.getMeta(),r=n.options,s=r.elements.arc,l=Math.min(a.right-a.left,a.bottom-a.top);n.outerRadius=Math.max((l-s.borderWidth/2)/2,0),n.innerRadius=Math.max(r.cutoutPercentage?n.outerRadius/100*r.cutoutPercentage:1,0),n.radiusLength=(n.outerRadius-n.innerRadius)/n.getVisibleDatasetCount(),i.outerRadius=n.outerRadius-n.radiusLength*i.index,i.innerRadius=i.outerRadius-n.radiusLength,o.count=i.countVisibleElements(),e.each(o.data,function(e,n){i.updateElement(e,n,t)})},updateElement:function(t,i,n){for(var a=this,o=a.chart,r=a.getDataset(),s=o.options,l=s.animation,c=o.scale,u=e.getValueAtIndexOrDefault,d=o.data.labels,h=a.calculateCircumference(r.data[i]),p=c.xCenter,f=c.yCenter,g=0,m=a.getMeta(),v=0;i>v;++v)isNaN(r.data[v])||m.data[v].hidden||++g;var k=s.startAngle,y=t.hidden?0:c.getDistanceFromCenterForValue(r.data[i]),w=k+h*g,b=w+(t.hidden?0:h),D=l.animateScale?0:c.getDistanceFromCenterForValue(r.data[i]);e.extend(t,{_datasetIndex:a.index,_index:i,_scale:c,_model:{x:p,y:f,innerRadius:0,outerRadius:n?D:y,startAngle:n&&l.animateRotate?k:w,endAngle:n&&l.animateRotate?k:b,label:u(d,i,d[i])}}),a.removeHoverStyle(t),t.pivot()},removeHoverStyle:function(e){t.DatasetController.prototype.removeHoverStyle.call(this,e,this.chart.options.elements.arc)},countVisibleElements:function(){var t=this.getDataset(),i=this.getMeta(),n=0;return e.each(i.data,function(e,i){isNaN(t.data[i])||e.hidden||n++}),n},calculateCircumference:function(t){var e=this.getMeta().count;return e>0&&!isNaN(t)?2*Math.PI/e:0}})}},{}],20:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.radar={scale:{type:"radialLinear"},elements:{line:{tension:0}}},t.controllers.radar=t.DatasetController.extend({datasetElementType:t.elements.Line,dataElementType:t.elements.Point,linkScales:e.noop,addElementAndReset:function(e){t.DatasetController.prototype.addElementAndReset.call(this,e),this.updateBezierControlPoints()},update:function(t){var i=this,n=i.getMeta(),a=n.dataset,o=n.data,r=a.custom||{},s=i.getDataset(),l=i.chart.options.elements.line,c=i.chart.scale;void 0!==s.tension&&void 0===s.lineTension&&(s.lineTension=s.tension),e.extend(n.dataset,{_datasetIndex:i.index,_children:o,_loop:!0,_model:{tension:r.tension?r.tension:e.getValueOrDefault(s.lineTension,l.tension),backgroundColor:r.backgroundColor?r.backgroundColor:s.backgroundColor||l.backgroundColor,borderWidth:r.borderWidth?r.borderWidth:s.borderWidth||l.borderWidth,borderColor:r.borderColor?r.borderColor:s.borderColor||l.borderColor,fill:r.fill?r.fill:void 0!==s.fill?s.fill:l.fill,borderCapStyle:r.borderCapStyle?r.borderCapStyle:s.borderCapStyle||l.borderCapStyle,borderDash:r.borderDash?r.borderDash:s.borderDash||l.borderDash,borderDashOffset:r.borderDashOffset?r.borderDashOffset:s.borderDashOffset||l.borderDashOffset,borderJoinStyle:r.borderJoinStyle?r.borderJoinStyle:s.borderJoinStyle||l.borderJoinStyle,scaleTop:c.top,scaleBottom:c.bottom,scaleZero:c.getBasePosition()}}),n.dataset.pivot(),e.each(o,function(e,n){i.updateElement(e,n,t)},i),i.updateBezierControlPoints()},updateElement:function(t,i,n){var a=this,o=t.custom||{},r=a.getDataset(),s=a.chart.scale,l=a.chart.options.elements.point,c=s.getPointPositionForValue(i,r.data[i]);e.extend(t,{_datasetIndex:a.index,_index:i,_scale:s,_model:{x:n?s.xCenter:c.x,y:n?s.yCenter:c.y,tension:o.tension?o.tension:e.getValueOrDefault(r.tension,a.chart.options.elements.line.tension),radius:o.radius?o.radius:e.getValueAtIndexOrDefault(r.pointRadius,i,l.radius),backgroundColor:o.backgroundColor?o.backgroundColor:e.getValueAtIndexOrDefault(r.pointBackgroundColor,i,l.backgroundColor),borderColor:o.borderColor?o.borderColor:e.getValueAtIndexOrDefault(r.pointBorderColor,i,l.borderColor),borderWidth:o.borderWidth?o.borderWidth:e.getValueAtIndexOrDefault(r.pointBorderWidth,i,l.borderWidth),pointStyle:o.pointStyle?o.pointStyle:e.getValueAtIndexOrDefault(r.pointStyle,i,l.pointStyle),hitRadius:o.hitRadius?o.hitRadius:e.getValueAtIndexOrDefault(r.hitRadius,i,l.hitRadius)}}),t._model.skip=o.skip?o.skip:isNaN(t._model.x)||isNaN(t._model.y)},updateBezierControlPoints:function(){var t=this.chart.chartArea,i=this.getMeta();e.each(i.data,function(n,a){var o=n._model,r=e.splineCurve(e.previousItem(i.data,a,!0)._model,o,e.nextItem(i.data,a,!0)._model,o.tension);o.controlPointPreviousX=Math.max(Math.min(r.previous.x,t.right),t.left),o.controlPointPreviousY=Math.max(Math.min(r.previous.y,t.bottom),t.top),o.controlPointNextX=Math.max(Math.min(r.next.x,t.right),t.left),o.controlPointNextY=Math.max(Math.min(r.next.y,t.bottom),t.top),n.pivot()})},draw:function(t){var i=this.getMeta(),n=t||1;e.each(i.data,function(t){t.transition(n)}),i.dataset.transition(n).draw(),e.each(i.data,function(t){t.draw()})},setHoverStyle:function(t){var i=this.chart.data.datasets[t._datasetIndex],n=t.custom||{},a=t._index,o=t._model;o.radius=n.hoverRadius?n.hoverRadius:e.getValueAtIndexOrDefault(i.pointHoverRadius,a,this.chart.options.elements.point.hoverRadius),o.backgroundColor=n.hoverBackgroundColor?n.hoverBackgroundColor:e.getValueAtIndexOrDefault(i.pointHoverBackgroundColor,a,e.getHoverColor(o.backgroundColor)),o.borderColor=n.hoverBorderColor?n.hoverBorderColor:e.getValueAtIndexOrDefault(i.pointHoverBorderColor,a,e.getHoverColor(o.borderColor)),o.borderWidth=n.hoverBorderWidth?n.hoverBorderWidth:e.getValueAtIndexOrDefault(i.pointHoverBorderWidth,a,o.borderWidth)},removeHoverStyle:function(t){var i=this.chart.data.datasets[t._datasetIndex],n=t.custom||{},a=t._index,o=t._model,r=this.chart.options.elements.point;o.radius=n.radius?n.radius:e.getValueAtIndexOrDefault(i.radius,a,r.radius),o.backgroundColor=n.backgroundColor?n.backgroundColor:e.getValueAtIndexOrDefault(i.pointBackgroundColor,a,r.backgroundColor),o.borderColor=n.borderColor?n.borderColor:e.getValueAtIndexOrDefault(i.pointBorderColor,a,r.borderColor),o.borderWidth=n.borderWidth?n.borderWidth:e.getValueAtIndexOrDefault(i.pointBorderWidth,a,r.borderWidth)}})}},{}],21:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.global.animation={duration:1e3,easing:"easeOutQuart",onProgress:e.noop,onComplete:e.noop},t.Animation=t.Element.extend({currentStep:null,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),t.animationService={frameDuration:17,animations:[],dropFrames:0,request:null,addAnimation:function(t,e,i,n){var a=this;n||(t.animating=!0);for(var o=0;o1&&(i=Math.floor(t.dropFrames),t.dropFrames=t.dropFrames%1);for(var n=0;nt.animations[n].animationObject.numSteps&&(t.animations[n].animationObject.currentStep=t.animations[n].animationObject.numSteps),t.animations[n].animationObject.render(t.animations[n].chartInstance,t.animations[n].animationObject),t.animations[n].animationObject.onAnimationProgress&&t.animations[n].animationObject.onAnimationProgress.call&&t.animations[n].animationObject.onAnimationProgress.call(t.animations[n].chartInstance,t.animations[n]),t.animations[n].animationObject.currentStep===t.animations[n].animationObject.numSteps?(t.animations[n].animationObject.onAnimationComplete&&t.animations[n].animationObject.onAnimationComplete.call&&t.animations[n].animationObject.onAnimationComplete.call(t.animations[n].chartInstance,t.animations[n]),t.animations[n].chartInstance.animating=!1,t.animations.splice(n,1)):++n;var a=Date.now(),o=(a-e)/t.frameDuration;t.dropFrames+=o,t.animations.length>0&&t.requestAnimationFrame()}}}},{}],22:[function(t,e,i){"use strict";e.exports=function(t){(t.canvasHelpers={}).drawPoint=function(t,e,i,n,a){var o,r,s,l,c,u;if("object"==typeof e&&("[object HTMLImageElement]"===(o=e.toString())||"[object HTMLCanvasElement]"===o))return void t.drawImage(e,n-e.width/2,a-e.height/2);if(!(isNaN(i)||0>=i)){switch(e){default:t.beginPath(),t.arc(n,a,i,0,2*Math.PI),t.closePath(),t.fill();break;case"triangle":t.beginPath(),r=3*i/Math.sqrt(3),c=r*Math.sqrt(3)/2,t.moveTo(n-r/2,a+c/3),t.lineTo(n+r/2,a+c/3),t.lineTo(n,a-2*c/3),t.closePath(),t.fill();break;case"rect":u=1/Math.SQRT2*i,t.beginPath(),t.fillRect(n-u,a-u,2*u,2*u),t.strokeRect(n-u,a-u,2*u,2*u);break;case"rectRot":u=1/Math.SQRT2*i,t.beginPath(),t.moveTo(n-u,a),t.lineTo(n,a+u),t.lineTo(n+u,a),t.lineTo(n,a-u),t.closePath(),t.fill();break;case"cross":t.beginPath(),t.moveTo(n,a+i),t.lineTo(n,a-i),t.moveTo(n-i,a),t.lineTo(n+i,a),t.closePath();break;case"crossRot":t.beginPath(),s=Math.cos(Math.PI/4)*i,l=Math.sin(Math.PI/4)*i,t.moveTo(n-s,a-l),t.lineTo(n+s,a+l),t.moveTo(n-s,a+l),t.lineTo(n+s,a-l),t.closePath();break;case"star":t.beginPath(),t.moveTo(n,a+i),t.lineTo(n,a-i),t.moveTo(n-i,a),t.lineTo(n+i,a),s=Math.cos(Math.PI/4)*i,l=Math.sin(Math.PI/4)*i,t.moveTo(n-s,a-l),t.lineTo(n+s,a+l),t.moveTo(n-s,a+l),t.lineTo(n+s,a-l),t.closePath();break;case"line":t.beginPath(),t.moveTo(n-i,a),t.lineTo(n+i,a),t.closePath();break;case"dash":t.beginPath(),t.moveTo(n,a),t.lineTo(n+i,a),t.closePath()}t.stroke()}}}},{}],23:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.types={},t.instances={},t.controllers={},t.Controller=function(i){return this.chart=i,this.config=i.config,this.options=this.config.options=e.configMerge(t.defaults.global,t.defaults[this.config.type],this.config.options||{}),this.id=e.uid(),Object.defineProperty(this,"data",{get:function(){return this.config.data}}),t.instances[this.id]=this,this.options.responsive&&this.resize(!0),this.initialize(),this},e.extend(t.Controller.prototype,{initialize:function(){var e=this;return t.plugins.notify("beforeInit",[e]),e.bindEvents(),e.ensureScalesHaveIDs(),e.buildOrUpdateControllers(),e.buildScales(),e.updateLayout(),e.resetElements(),e.initToolTip(),e.update(),t.plugins.notify("afterInit",[e]),e},clear:function(){return e.clear(this.chart),this},stop:function(){return t.animationService.cancelAnimation(this),this},resize:function(i){var n=this,a=n.chart,o=a.canvas,r=e.getMaximumWidth(o),s=a.aspectRatio,l=n.options.maintainAspectRatio&&!1===isNaN(s)&&isFinite(s)&&0!==s?r/s:e.getMaximumHeight(o);if(a.width===r&&a.height===l)return n;o.width=a.width=r,o.height=a.height=l,e.retinaScale(a);var c={width:r,height:l};return t.plugins.notify("resize",[n,c]),n.options.onResize&&n.options.onResize(n,c),i||(n.stop(),n.update(n.options.responsiveAnimationDuration)),n},ensureScalesHaveIDs:function(){var t=this.options,i=t.scales||{},n=t.scale;e.each(i.xAxes,function(t,e){t.id=t.id||"x-axis-"+e}),e.each(i.yAxes,function(t,e){t.id=t.id||"y-axis-"+e}),n&&(n.id=n.id||"scale")},buildScales:function(){var i=this,n=i.options,a=i.scales={},o=[];n.scales&&(o=o.concat((n.scales.xAxes||[]).map(function(t){return{options:t,dtype:"category"}}),(n.scales.yAxes||[]).map(function(t){return{options:t,dtype:"linear"}}))),n.scale&&o.push({options:n.scale,dtype:"radialLinear",isDefault:!0}),e.each(o,function(n){var o=n.options,r=e.getValueOrDefault(o.type,n.dtype),s=t.scaleService.getScaleConstructor(r);if(s){var l=new s({id:o.id,options:o,ctx:i.chart.ctx,chart:i});a[l.id]=l,n.isDefault&&(i.scale=l)}}),t.scaleService.addScalesToLayout(this)},updateLayout:function(){t.layoutService.update(this,this.chart.width,this.chart.height)},buildOrUpdateControllers:function(){var i=this,n=[],a=[];if(e.each(i.data.datasets,function(e,o){var r=i.getDatasetMeta(o);r.type||(r.type=e.type||i.config.type),n.push(r.type),r.controller?r.controller.updateIndex(o):(r.controller=new t.controllers[r.type](i,o),a.push(r.controller))},i),n.length>1)for(var o=1;oe;++e)n.getDatasetMeta(e).controller.update();t.plugins.notify("afterDatasetsUpdate",[n])}},render:function(i,n){var a=this;t.plugins.notify("beforeRender",[a]);var o=a.options.animation;if(o&&(void 0!==i&&0!==i||void 0===i&&0!==o.duration)){var r=new t.Animation;r.numSteps=(i||o.duration)/16.66,r.easing=o.easing,r.render=function(t,i){var n=e.easingEffects[i.easing],a=i.currentStep/i.numSteps,o=n(a) ;t.draw(o,a,i.currentStep)},r.onAnimationProgress=o.onProgress,r.onAnimationComplete=o.onComplete,t.animationService.addAnimation(a,r,i,n)}else a.draw(),o&&o.onComplete&&o.onComplete.call&&o.onComplete.call(a);return a},draw:function(i){var n=this,a=i||1;n.clear(),t.plugins.notify("beforeDraw",[n,a]),e.each(n.boxes,function(t){t.draw(n.chartArea)},n),n.scale&&n.scale.draw(),t.plugins.notify("beforeDatasetsDraw",[n,a]),e.each(n.data.datasets,function(t,e){n.isDatasetVisible(e)&&n.getDatasetMeta(e).controller.draw(i)},n,!0),t.plugins.notify("afterDatasetsDraw",[n,a]),n.tooltip.transition(a).draw(),t.plugins.notify("afterDraw",[n,a])},getElementAtEvent:function(t){var i=this,n=e.getRelativePosition(t,i.chart),a=[];return e.each(i.data.datasets,function(t,o){if(i.isDatasetVisible(o)){var r=i.getDatasetMeta(o);e.each(r.data,function(t){return t.inRange(n.x,n.y)?(a.push(t),a):void 0})}}),a.slice(0,1)},getElementsAtEvent:function(t){var i=this,n=e.getRelativePosition(t,i.chart),a=[],o=function(){if(i.data.datasets)for(var t=0;t0&&(e=this.getDatasetMeta(e[0]._datasetIndex).data),e},getDatasetMeta:function(t){var e=this,i=e.data.datasets[t];i._meta||(i._meta={});var n=i._meta[e.id];return n||(n=i._meta[e.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null}),n},getVisibleDatasetCount:function(){for(var t=0,e=0,i=this.data.datasets.length;i>e;++e)this.isDatasetVisible(e)&&t++;return t},isDatasetVisible:function(t){var e=this.getDatasetMeta(t);return"boolean"==typeof e.hidden?!e.hidden:!this.data.datasets[t].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroy:function(){var i=this;i.stop(),i.clear(),e.unbindEvents(i,i.events),e.removeResizeListener(i.chart.canvas.parentNode);var n=i.chart.canvas;n.width=i.chart.width,n.height=i.chart.height,void 0!==i.chart.originalDevicePixelRatio&&i.chart.ctx.scale(1/i.chart.originalDevicePixelRatio,1/i.chart.originalDevicePixelRatio),n.style.width=i.chart.originalCanvasStyleWidth,n.style.height=i.chart.originalCanvasStyleHeight,t.plugins.notify("destroy",[i]),delete t.instances[i.id]},toBase64Image:function(){return this.chart.canvas.toDataURL.apply(this.chart.canvas,arguments)},initToolTip:function(){var e=this;e.tooltip=new t.Tooltip({_chart:e.chart,_chartInstance:e,_data:e.data,_options:e.options.tooltips},e)},bindEvents:function(){var t=this;e.bindEvents(t,t.options.events,function(e){t.eventHandler(e)})},updateHoverStyle:function(t,e,i){var n,a,o,r=i?"setHoverStyle":"removeHoverStyle";switch(e){case"single":t=[t[0]];break;case"label":case"dataset":case"x-axis":break;default:return}for(a=0,o=t.length;o>a;++a)(n=t[a])&&this.getDatasetMeta(n._datasetIndex).controller[r](n)},eventHandler:function(t){var i=this,n=i.tooltip,a=i.options||{},o=a.hover,r=a.tooltips;return i.lastActive=i.lastActive||[],i.lastTooltipActive=i.lastTooltipActive||[],"mouseout"===t.type?(i.active=[],i.tooltipActive=[]):(i.active=i.getElementsAtEventForMode(t,o.mode),i.tooltipActive=i.getElementsAtEventForMode(t,r.mode)),o.onHover&&o.onHover.call(i,i.active),i.legend&&i.legend.handleEvent&&i.legend.handleEvent(t),("mouseup"===t.type||"click"===t.type)&&a.onClick&&a.onClick.call(i,t,i.active),i.lastActive.length&&i.updateHoverStyle(i.lastActive,o.mode,!1),i.active.length&&o.mode&&i.updateHoverStyle(i.active,o.mode,!0),(r.enabled||r.custom)&&(n.initialize(),n._active=i.tooltipActive,n.update(!0)),n.pivot(),i.animating||e.arrayEquals(i.active,i.lastActive)&&e.arrayEquals(i.tooltipActive,i.lastTooltipActive)||(i.stop(),(r.enabled||r.custom)&&n.update(!0),i.render(o.animationDuration,!0)),i.lastActive=i.active,i.lastTooltipActive=i.tooltipActive,i}})}},{}],24:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i=e.noop;t.DatasetController=function(t,e){this.initialize(t,e)},e.extend(t.DatasetController.prototype,{datasetElementType:null,dataElementType:null,initialize:function(t,e){var i=this;i.chart=t,i.index=e,i.linkScales(),i.addElements()},updateIndex:function(t){this.index=t},linkScales:function(){var t=this,e=t.getMeta(),i=t.getDataset();null===e.xAxisID&&(e.xAxisID=i.xAxisID||t.chart.options.scales.xAxes[0].id),null===e.yAxisID&&(e.yAxisID=i.yAxisID||t.chart.options.scales.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(t){return this.chart.scales[t]},reset:function(){this.update(!0)},createMetaDataset:function(){var t=this,e=t.datasetElementType;return e&&new e({_chart:t.chart.chart,_datasetIndex:t.index})},createMetaData:function(t){var e=this,i=e.dataElementType;return i&&new i({_chart:e.chart.chart,_datasetIndex:e.index,_index:t})},addElements:function(){var t,e,i=this,n=i.getMeta(),a=i.getDataset().data||[],o=n.data;for(t=0,e=a.length;e>t;++t)o[t]=o[t]||i.createMetaData(n,t);n.dataset=n.dataset||i.createMetaDataset()},addElementAndReset:function(t){var e=this,i=e.createMetaData(t);e.getMeta().data.splice(t,0,i),e.updateElement(i,t,!0)},buildOrUpdateElements:function(){var t=this.getMeta(),e=t.data,i=this.getDataset().data.length,n=e.length;if(n>i)e.splice(i,n-i);else if(i>n)for(var a=n;i>a;++a)this.addElementAndReset(a)},update:i,draw:function(t){var i=t||1;e.each(this.getMeta().data,function(t){t.transition(i).draw()})},removeHoverStyle:function(t,i){var n=this.chart.data.datasets[t._datasetIndex],a=t._index,o=t.custom||{},r=e.getValueAtIndexOrDefault,s=t._model;s.backgroundColor=o.backgroundColor?o.backgroundColor:r(n.backgroundColor,a,i.backgroundColor),s.borderColor=o.borderColor?o.borderColor:r(n.borderColor,a,i.borderColor),s.borderWidth=o.borderWidth?o.borderWidth:r(n.borderWidth,a,i.borderWidth)},setHoverStyle:function(t){var i=this.chart.data.datasets[t._datasetIndex],n=t._index,a=t.custom||{},o=e.getValueAtIndexOrDefault,r=e.getHoverColor,s=t._model;s.backgroundColor=a.hoverBackgroundColor?a.hoverBackgroundColor:o(i.hoverBackgroundColor,n,r(s.backgroundColor)),s.borderColor=a.hoverBorderColor?a.hoverBorderColor:o(i.hoverBorderColor,n,r(s.borderColor)),s.borderWidth=a.hoverBorderWidth?a.hoverBorderWidth:o(i.hoverBorderWidth,n,s.borderWidth)}}),t.DatasetController.extend=e.inherits}},{}],25:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.elements={},t.Element=function(t){e.extend(this,t),this.initialize.apply(this,arguments)},e.extend(t.Element.prototype,{initialize:function(){this.hidden=!1},pivot:function(){var t=this;return t._view||(t._view=e.clone(t._model)),t._start=e.clone(t._view),t},transition:function(t){var i=this;return i._view||(i._view=e.clone(i._model)),1===t?(i._view=i._model,i._start=null,i):(i._start||i.pivot(),e.each(i._model,function(n,a){if("_"===a[0]);else if(i._view.hasOwnProperty(a))if(n===i._view[a]);else if("string"==typeof n)try{var o=e.color(i._model[a]).mix(e.color(i._start[a]),t);i._view[a]=o.rgbString()}catch(t){i._view[a]=n}else if("number"==typeof n){var r=void 0!==i._start[a]&&!1===isNaN(i._start[a])?i._start[a]:0;i._view[a]=(i._model[a]-r)*t+r}else i._view[a]=n;else"number"!=typeof n||isNaN(i._view[a])?i._view[a]=n:i._view[a]=n*t},i),i)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return e.isNumber(this._model.x)&&e.isNumber(this._model.y)}}),t.Element.extend=e.inherits}},{}],26:[function(t,e,i){"use strict";var n=t(3);e.exports=function(t){function e(t,e,i){var n;return"string"==typeof t?(n=parseInt(t,10),-1!==t.indexOf("%")&&(n=n/100*e.parentNode[i])):n=t,n}function i(t){return void 0!==t&&null!==t&&"none"!==t}function a(t,n,a){var o=document.defaultView,r=t.parentNode,s=o.getComputedStyle(t)[n],l=o.getComputedStyle(r)[n],c=i(s),u=i(l),d=Number.POSITIVE_INFINITY;return c||u?Math.min(c?e(s,t,a):d,u?e(l,r,a):d):"none"}var o=t.helpers={};o.each=function(t,e,i,n){var a,r;if(o.isArray(t))if(r=t.length,n)for(a=r-1;a>=0;a--)e.call(i,t[a],a);else for(a=0;r>a;a++)e.call(i,t[a],a);else if("object"==typeof t){var s=Object.keys(t);for(r=s.length,a=0;r>a;a++)e.call(i,t[s[a]],s[a])}},o.clone=function(t){var e={};return o.each(t,function(t,i){o.isArray(t)?e[i]=t.slice(0):e[i]="object"==typeof t&&null!==t?o.clone(t):t}),e},o.extend=function(t){for(var e=function(e,i){t[i]=e},i=1,n=arguments.length;n>i;i++)o.each(arguments[i],e);return t},o.configMerge=function(e){var i=o.clone(e);return o.each(Array.prototype.slice.call(arguments,1),function(e){o.each(e,function(e,n){if("scales"===n)i[n]=o.scaleMerge(i.hasOwnProperty(n)?i[n]:{},e);else if("scale"===n)i[n]=o.configMerge(i.hasOwnProperty(n)?i[n]:{},t.scaleService.getScaleDefaults(e.type),e);else if(i.hasOwnProperty(n)&&o.isArray(i[n])&&o.isArray(e)){var a=i[n];o.each(e,function(t,e){e=n[i].length||!n[i][a].type?n[i].push(o.configMerge(s,e)):e.type&&e.type!==n[i][a].type?n[i][a]=o.configMerge(n[i][a],s,e):n[i][a]=o.configMerge(n[i][a],e)}):(n[i]=[],o.each(e,function(e){var a=o.getValueOrDefault(e.type,"xAxes"===i?"category":"linear");n[i].push(o.configMerge(t.scaleService.getScaleDefaults(a),e))})):n.hasOwnProperty(i)&&"object"==typeof n[i]&&null!==n[i]&&"object"==typeof e?n[i]=o.configMerge(n[i],e):n[i]=e}),n},o.getValueAtIndexOrDefault=function(t,e,i){return void 0===t||null===t?i:o.isArray(t)?ei;++i)if(t[i]===e)return i;return-1},o.where=function(t,e){if(o.isArray(t)&&Array.prototype.filter)return t.filter(e);var i=[];return o.each(t,function(t){e(t)&&i.push(t)}),i},o.findIndex=Array.prototype.findIndex?function(t,e,i){return t.findIndex(e,i)}:function(t,e,i){i=void 0===i?t:i;for(var n=0,a=t.length;a>n;++n)if(e.call(i,t[n],n,t))return n;return-1},o.findNextWhere=function(t,e,i){(void 0===i||null===i)&&(i=-1);for(var n=i+1;n=0;n--){var a=t[n];if(e(a))return a}},o.inherits=function(t){var e=this,i=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},n=function(){this.constructor=i};return n.prototype=e.prototype,i.prototype=new n,i.extend=o.inherits,t&&o.extend(i.prototype,t),i.__super__=e.prototype,i},o.noop=function(){},o.uid=function(){var t=0;return function(){return t++}}(),o.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},o.almostEquals=function(t,e,i){return Math.abs(t-e)0?1:-1},o.log10=Math.log10?function(t){return Math.log10(t)}:function(t){return Math.log(t)/Math.LN10},o.toRadians=function(t){return t*(Math.PI/180)},o.toDegrees=function(t){return t*(180/Math.PI)},o.getAngleFromPoint=function(t,e){var i=e.x-t.x,n=e.y-t.y,a=Math.sqrt(i*i+n*n),o=Math.atan2(n,i);return o<-.5*Math.PI&&(o+=2*Math.PI),{angle:o,distance:a}},o.aliasPixel=function(t){return t%2==0?0:.5},o.splineCurve=function(t,e,i,n){var a=t.skip?e:t,o=e,r=i.skip?e:i,s=Math.sqrt(Math.pow(o.x-a.x,2)+Math.pow(o.y-a.y,2)),l=Math.sqrt(Math.pow(r.x-o.x,2)+Math.pow(r.y-o.y,2)),c=s/(s+l),u=l/(s+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;var d=n*c,h=n*u;return{previous:{x:o.x-d*(r.x-a.x),y:o.y-d*(r.y-a.y)},next:{x:o.x+h*(r.x-a.x),y:o.y+h*(r.y-a.y)}}},o.EPSILON=Number.EPSILON||1e-14,o.splineCurveMonotone=function(t){var e,i,n,a,r=(t||[]).map(function(t){return{model:t._model,deltaK:0,mK:0}}),s=r.length;for(e=0;s>e;++e)n=r[e],n.model.skip||(i=e>0?r[e-1]:null,a=s-1>e?r[e+1]:null,a&&!a.model.skip&&(n.deltaK=(a.model.y-n.model.y)/(a.model.x-n.model.x)),!i||i.model.skip?n.mK=n.deltaK:!a||a.model.skip?n.mK=i.deltaK:this.sign(i.deltaK)!==this.sign(n.deltaK)?n.mK=0:n.mK=(i.deltaK+n.deltaK)/2);var l,c,u,d;for(e=0;s-1>e;++e)n=r[e],a=r[e+1],n.model.skip||a.model.skip||(o.almostEquals(n.deltaK,0,this.EPSILON)?n.mK=a.mK=0:(l=n.mK/n.deltaK,c=a.mK/n.deltaK,9>=(d=Math.pow(l,2)+Math.pow(c,2))||(u=3/Math.sqrt(d),n.mK=l*u*n.deltaK,a.mK=c*u*n.deltaK)));var h;for(e=0;s>e;++e)n=r[e],n.model.skip||(i=e>0?r[e-1]:null,a=s-1>e?r[e+1]:null,i&&!i.model.skip&&(h=(n.model.x-i.model.x)/3,n.model.controlPointPreviousX=n.model.x-h,n.model.controlPointPreviousY=n.model.y-h*n.mK),a&&!a.model.skip&&(h=(a.model.x-n.model.x)/3,n.model.controlPointNextX=n.model.x+h,n.model.controlPointNextY=n.model.y+h*n.mK))},o.nextItem=function(t,e,i){return i?e>=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},o.previousItem=function(t,e,i){return i?0>=e?t[t.length-1]:t[e-1]:0>=e?t[0]:t[e-1]},o.niceNum=function(t,e){var i=Math.floor(o.log10(t)),n=t/Math.pow(10,i);return(e?1.5>n?1:3>n?2:7>n?5:10:1>=n?1:2>=n?2:5>=n?5:10)*Math.pow(10,i)};var r=o.easingEffects={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-1*t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return 1*((t=t/1-1)*t*t+1)},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-1*((t=t/1-1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return 1*(t/=1)*t*t*t*t},easeOutQuint:function(t){return 1*((t=t/1-1)*t*t*t*t+1)},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return-1*Math.cos(t/1*(Math.PI/2))+1},easeOutSine:function(t){return 1*Math.sin(t/1*(Math.PI/2))},easeInOutSine:function(t){return-.5*(Math.cos(Math.PI*t/1)-1)},easeInExpo:function(t){return 0===t?1:1*Math.pow(2,10*(t/1-1))},easeOutExpo:function(t){return 1===t?1:1*(1-Math.pow(2,-10*t/1))},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},easeInCirc:function(t){return t>=1?t:-1*(Math.sqrt(1-(t/=1)*t)-1)},easeOutCirc:function(t){return 1*Math.sqrt(1-(t=t/1-1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:1==(t/=1)?1:(i||(i=.3),nt?n*Math.pow(2,10*(t-=1))*Math.sin((1*t-e)*(2*Math.PI)/i)*-.5:n*Math.pow(2,-10*(t-=1))*Math.sin((1*t-e)*(2*Math.PI)/i)*.5+1)},easeInBack:function(t){var e=1.70158;return 1*(t/=1)*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return 1*((t=t/1-1)*t*((e+1)*t+e)+1)},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-r.easeOutBounce(1-t)},easeOutBounce:function(t){return(t/=1)<1/2.75?7.5625*t*t*1:2/2.75>t?1*(7.5625*(t-=1.5/2.75)*t+.75):2.5/2.75>t?1*(7.5625*(t-=2.25/2.75)*t+.9375):1*(7.5625*(t-=2.625/2.75)*t+.984375)},easeInOutBounce:function(t){return.5>t?.5*r.easeInBounce(2*t):.5*r.easeOutBounce(2*t-1)+.5}};o.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)}}(),o.cancelAnimFrame=function(){return window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame||function(t){return window.clearTimeout(t,1e3/60)}}(),o.getRelativePosition=function(t,e){var i,n,a=t.originalEvent||t,r=t.currentTarget||t.srcElement,s=r.getBoundingClientRect(),l=a.touches;l&&l.length>0?(i=l[0].clientX,n=l[0].clientY):(i=a.clientX,n=a.clientY);var c=parseFloat(o.getStyle(r,"padding-left")),u=parseFloat(o.getStyle(r,"padding-top")),d=parseFloat(o.getStyle(r,"padding-right")),h=parseFloat(o.getStyle(r,"padding-bottom")),p=s.right-s.left-c-d,f=s.bottom-s.top-u-h;return i=Math.round((i-s.left-c)/p*r.width/e.currentDevicePixelRatio),n=Math.round((n-s.top-u)/f*r.height/e.currentDevicePixelRatio),{x:i,y:n}},o.addEvent=function(t,e,i){t.addEventListener?t.addEventListener(e,i):t.attachEvent?t.attachEvent("on"+e,i):t["on"+e]=i},o.removeEvent=function(t,e,i){t.removeEventListener?t.removeEventListener(e,i,!1):t.detachEvent?t.detachEvent("on"+e,i):t["on"+e]=o.noop},o.bindEvents=function(t,e,i){var n=t.events=t.events||{};o.each(e,function(e){n[e]=function(){i.apply(t,arguments)},o.addEvent(t.chart.canvas,e,n[e])})},o.unbindEvents=function(t,e){var i=t.chart.canvas;o.each(e,function(t,e){o.removeEvent(i,e,t)})},o.getConstraintWidth=function(t){return a(t,"max-width","clientWidth")},o.getConstraintHeight=function(t){return a(t,"max-height","clientHeight")},o.getMaximumWidth=function(t){var e=t.parentNode,i=parseInt(o.getStyle(e,"padding-left"),10),n=parseInt(o.getStyle(e,"padding-right"),10),a=e.clientWidth-i-n,r=o.getConstraintWidth(t);return isNaN(r)?a:Math.min(a,r)},o.getMaximumHeight=function(t){var e=t.parentNode,i=parseInt(o.getStyle(e,"padding-top"),10),n=parseInt(o.getStyle(e,"padding-bottom"),10),a=e.clientHeight-i-n,r=o.getConstraintHeight(t);return isNaN(r)?a:Math.min(a,r)},o.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},o.retinaScale=function(t){var e=t.ctx,i=t.canvas,n=i.width,a=i.height,o=t.currentDevicePixelRatio=window.devicePixelRatio||1;1!==o&&(i.height=a*o,i.width=n*o,e.scale(o,o),t.originalDevicePixelRatio=t.originalDevicePixelRatio||o),i.style.width=n+"px",i.style.height=a+"px"},o.clear=function(t){t.ctx.clearRect(0,0,t.width,t.height)},o.fontString=function(t,e,i){return e+" "+t+"px "+i},o.longestText=function(t,e,i,n){n=n||{};var a=n.data=n.data||{},r=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(a=n.data={},r=n.garbageCollect=[],n.font=e),t.font=e;var s=0;o.each(i,function(e){void 0!==e&&null!==e&&!0!==o.isArray(e)?s=o.measureText(t,a,r,s,e):o.isArray(e)&&o.each(e,function(e){void 0===e||null===e||o.isArray(e)||(s=o.measureText(t,a,r,s,e))})});var l=r.length/2;if(l>i.length){for(var c=0;l>c;c++)delete a[r[c]];r.splice(0,l)}return s},o.measureText=function(t,e,i,n,a){var o=e[a];return o||(o=e[a]=t.measureText(a).width,i.push(a)),o>n&&(n=o),n},o.numberOfLabelLines=function(t){var e=1;return o.each(t,function(t){o.isArray(t)&&t.length>e&&(e=t.length)}),e},o.drawRoundedRectangle=function(t,e,i,n,a,o){t.beginPath(),t.moveTo(e+o,i),t.lineTo(e+n-o,i),t.quadraticCurveTo(e+n,i,e+n,i+o),t.lineTo(e+n,i+a-o),t.quadraticCurveTo(e+n,i+a,e+n-o,i+a),t.lineTo(e+o,i+a),t.quadraticCurveTo(e,i+a,e,i+a-o),t.lineTo(e,i+o),t.quadraticCurveTo(e,i,e+o,i),t.closePath()},o.color=function(e){return n?n(e instanceof CanvasGradient?t.defaults.global.defaultColor:e):(console.error("Color.js not found!"),e)},o.addResizeListener=function(t,e){var i=document.createElement("iframe"),n="chartjs-hidden-iframe";i.classlist?i.classlist.add(n):i.setAttribute("class",n),i.tabIndex=-1;var a=i.style;a.width="100%",a.display="block",a.border=0,a.height=0,a.margin=0,a.position="absolute",a.left=0,a.right=0,a.top=0,a.bottom=0,t.insertBefore(i,t.firstChild),(i.contentWindow||i).onresize=function(){return e?e():void 0}},o.removeResizeListener=function(t){var e=t.querySelector(".chartjs-hidden-iframe");e&&e.parentNode.removeChild(e)},o.isArray=Array.isArray?function(t){return Array.isArray(t)}:function(t){return"[object Array]"===Object.prototype.toString.call(t)},o.arrayEquals=function(t,e){var i,n,a,r;if(!t||!e||t.length!==e.length)return!1;for(i=0,n=t.length;n>i;++i)if(a=t[i],r=e[i],a instanceof Array&&r instanceof Array){if(!o.arrayEquals(a,r))return!1}else if(a!==r)return!1;return!0},o.callCallback=function(t,e,i){t&&"function"==typeof t.call&&t.apply(i,e)},o.getHoverColor=function(t){return t instanceof CanvasPattern?t:o.color(t).saturate(.5).darken(.1).rgbString()}}},{3:3}],27:[function(t,e,i){"use strict";e.exports=function(){var t=function(e,i){var n=this,a=t.helpers;return n.config=i||{data:{datasets:[]}},e.length&&e[0].getContext&&(e=e[0]),e.getContext&&(e=e.getContext("2d")),n.ctx=e,n.canvas=e.canvas,e.canvas.style.display=e.canvas.style.display||"block",n.width=e.canvas.width||parseInt(a.getStyle(e.canvas,"width"),10)||a.getMaximumWidth(e.canvas),n.height=e.canvas.height||parseInt(a.getStyle(e.canvas,"height"),10)||a.getMaximumHeight(e.canvas),n.aspectRatio=n.width/n.height,(isNaN(n.aspectRatio)||!1===isFinite(n.aspectRatio))&&(n.aspectRatio=void 0!==i.aspectRatio?i.aspectRatio:2),n.originalCanvasStyleWidth=e.canvas.style.width,n.originalCanvasStyleHeight=e.canvas.style.height,a.retinaScale(n),n.controller=new t.Controller(n),a.addResizeListener(e.canvas.parentNode,function(){n.controller&&n.controller.config.options.responsive&&n.controller.resize()}),n.controller?n.controller:n};return t.defaults={global:{responsive:!0,responsiveAnimationDuration:0,maintainAspectRatio:!0,events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"single",animationDuration:400},onClick:null,defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",showLines:!0,elements:{},legendCallback:function(t){var e=[];e.push('
    ');for(var i=0;i'),t.data.datasets[i].label&&e.push(t.data.datasets[i].label),e.push("");return e.push("
"),e.join("")}}},t.Chart=t,t}},{}],28:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.layoutService={defaults:{},addBox:function(t,e){t.boxes||(t.boxes=[]),t.boxes.push(e)},removeBox:function(t,e){t.boxes&&t.boxes.splice(t.boxes.indexOf(e),1)},update:function(t,i,n){function a(t){var e,i=t.isHorizontal();i?(e=t.update(t.options.fullWidth?f:w,y),b-=e.height):(e=t.update(k,v),w-=e.width),D.push({horizontal:i,minSize:e,box:t})}function o(t){var i=e.findNextWhere(D,function(e){return e.box===t});if(i)if(t.isHorizontal()){var n={left:x,right:_,top:0,bottom:0};t.update(t.options.fullWidth?f:w,g/2,n)}else t.update(i.minSize.width,b)}function r(t){var i=e.findNextWhere(D,function(e){return e.box===t}),n={left:0,right:0,top:C,bottom:M};i&&t.update(i.minSize.width,b,n)}function s(t){t.isHorizontal()?(t.left=t.options.fullWidth?l:x,t.right=t.options.fullWidth?i-l:x+w,t.top=A,t.bottom=A+t.height,A=t.bottom):(t.left=Y,t.right=Y+t.width,t.top=C,t.bottom=C+b,Y=t.right)}if(t){var l=0,c=e.where(t.boxes,function(t){return"left"===t.options.position}),u=e.where(t.boxes,function(t){return"right"===t.options.position}),d=e.where(t.boxes,function(t){return"top"===t.options.position}),h=e.where(t.boxes,function(t){return"bottom"===t.options.position}),p=e.where(t.boxes,function(t){return"chartArea"===t.options.position});d.sort(function(t,e){return(e.options.fullWidth?1:0)-(t.options.fullWidth?1:0)}),h.sort(function(t,e){return(t.options.fullWidth?1:0)-(e.options.fullWidth?1:0)});var f=i-2*l,g=n-0,m=f/2,v=g/2,k=(i-m)/(c.length+u.length),y=(n-v)/(d.length+h.length),w=f,b=g,D=[];e.each(c.concat(u,d,h),a);var x=l,_=l,C=0,M=0;e.each(c.concat(u),o),e.each(c,function(t){x+=t.width}),e.each(u,function(t){_+=t.width}),e.each(d.concat(h),o),e.each(d,function(t){C+=t.height}),e.each(h,function(t){M+=t.height}),e.each(c.concat(u),r),x=l,_=l,C=0,M=0,e.each(c,function(t){x+=t.width}),e.each(u,function(t){_+=t.width}),e.each(d,function(t){C+=t.height}),e.each(h,function(t){M+=t.height});var S=n-C-M,T=i-x-_;(T!==w||S!==b)&&(e.each(c,function(t){t.height=S}),e.each(u,function(t){t.height=S}),e.each(d,function(t){t.options.fullWidth||(t.width=T)}),e.each(h,function(t){t.options.fullWidth||(t.width=T)}),b=S,w=T);var Y=l,A=0;e.each(c.concat(d),s),Y+=w,A+=b,e.each(u,s),e.each(h,s),t.chartArea={left:x,top:C,right:x+w,bottom:C+b},e.each(p,function(e){e.left=t.chartArea.left,e.top=t.chartArea.top,e.right=t.chartArea.right,e.bottom=t.chartArea.bottom,e.update(w,b)})}}}}},{}],29:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i=e.noop;t.defaults.global.legend={display:!0,position:"top",fullWidth:!0,reverse:!1,onClick:function(t,e){var i=e.datasetIndex,n=this.chart,a=n.getDatasetMeta(i);a.hidden=null===a.hidden?!n.data.datasets[i].hidden:null,n.update()},onHover:null,labels:{boxWidth:40,padding:10,generateLabels:function(t){var i=t.data;return e.isArray(i.datasets)?i.datasets.map(function(i,n){return{text:i.label,fillStyle:e.isArray(i.backgroundColor)?i.backgroundColor[0]:i.backgroundColor,hidden:!t.isDatasetVisible(n),lineCap:i.borderCapStyle,lineDash:i.borderDash,lineDashOffset:i.borderDashOffset,lineJoin:i.borderJoinStyle,lineWidth:i.borderWidth,strokeStyle:i.borderColor,pointStyle:i.pointStyle,datasetIndex:n}},this):[]}}},t.Legend=t.Element.extend({initialize:function(t){e.extend(this,t),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:i,update:function(t,e,i){var n=this;return n.beforeUpdate(),n.maxWidth=t,n.maxHeight=e,n.margins=i,n.beforeSetDimensions(),n.setDimensions(),n.afterSetDimensions(),n.beforeBuildLabels(),n.buildLabels(),n.afterBuildLabels(),n.beforeFit(),n.fit(),n.afterFit(),n.afterUpdate(),n.minSize},afterUpdate:i,beforeSetDimensions:i,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:i,beforeBuildLabels:i,buildLabels:function(){var t=this;t.legendItems=t.options.labels.generateLabels.call(t,t.chart),t.options.reverse&&t.legendItems.reverse()},afterBuildLabels:i,beforeFit:i,fit:function(){var i=this,n=i.options,a=n.labels,o=n.display,r=i.ctx,s=t.defaults.global,l=e.getValueOrDefault,c=l(a.fontSize,s.defaultFontSize),u=l(a.fontStyle,s.defaultFontStyle),d=l(a.fontFamily,s.defaultFontFamily),h=e.fontString(c,u,d),p=i.legendHitBoxes=[],f=i.minSize,g=i.isHorizontal();if(g?(f.width=i.maxWidth,f.height=o?10:0):(f.width=o?10:0,f.height=i.maxHeight),o)if(r.font=h,g){var m=i.lineWidths=[0],v=i.legendItems.length?c+a.padding:0;r.textAlign="left",r.textBaseline="top",e.each(i.legendItems,function(t,e){var n=a.usePointStyle?c*Math.sqrt(2):a.boxWidth,o=n+c/2+r.measureText(t.text).width;m[m.length-1]+o+a.padding>=i.width&&(v+=c+a.padding,m[m.length]=i.left),p[e]={left:0,top:0,width:o,height:c},m[m.length-1]+=o+a.padding}),f.height+=v}else{var k=a.padding,y=i.columnWidths=[],w=a.padding,b=0,D=0,x=c+k;e.each(i.legendItems,function(t,e){var i=a.usePointStyle?2*a.boxWidth:a.boxWidth,n=i+c/2+r.measureText(t.text).width;D+x>f.height&&(w+=b+a.padding,y.push(b),b=0,D=0),b=Math.max(b,n),D+=x,p[e]={left:0,top:0,width:n,height:c}}),w+=b,y.push(b),f.width+=w}i.width=f.width,i.height=f.height},afterFit:i,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var i=this,n=i.options,a=n.labels,o=t.defaults.global,r=o.elements.line,s=i.width,l=i.lineWidths;if(n.display){var c,u=i.ctx,d=e.getValueOrDefault,h=d(a.fontColor,o.defaultFontColor),p=d(a.fontSize,o.defaultFontSize),f=d(a.fontStyle,o.defaultFontStyle),g=d(a.fontFamily,o.defaultFontFamily),m=e.fontString(p,f,g);u.textAlign="left",u.textBaseline="top",u.lineWidth=.5,u.strokeStyle=h,u.fillStyle=h,u.font=m;var v=a.boxWidth,k=i.legendHitBoxes,y=function(e,i,a){if(!(isNaN(v)||0>=v)){u.save(),u.fillStyle=d(a.fillStyle,o.defaultColor),u.lineCap=d(a.lineCap,r.borderCapStyle),u.lineDashOffset=d(a.lineDashOffset,r.borderDashOffset),u.lineJoin=d(a.lineJoin,r.borderJoinStyle),u.lineWidth=d(a.lineWidth,r.borderWidth),u.strokeStyle=d(a.strokeStyle,o.defaultColor);var s=0===d(a.lineWidth,r.borderWidth);if(u.setLineDash&&u.setLineDash(d(a.lineDash,r.borderDash)),n.labels&&n.labels.usePointStyle){var l=p*Math.SQRT2/2,c=l/Math.SQRT2,h=e+c,f=i+c;t.canvasHelpers.drawPoint(u,a.pointStyle,l,h,f)}else s||u.strokeRect(e,i,v,p),u.fillRect(e,i,v,p);u.restore()}},w=function(t,e,i,n){u.fillText(i.text,v+p/2+t,e),i.hidden&&(u.beginPath(),u.lineWidth=2,u.moveTo(v+p/2+t,e+p/2),u.lineTo(v+p/2+t+n,e+p/2),u.stroke())},b=i.isHorizontal();c=b?{x:i.left+(s-l[0])/2,y:i.top+a.padding,line:0}:{x:i.left+a.padding,y:i.top+a.padding,line:0};var D=p+a.padding;e.each(i.legendItems,function(t,e){var n=u.measureText(t.text).width,o=a.usePointStyle?p+p/2+n:v+p/2+n,r=c.x,d=c.y;b?r+o>=s&&(d=c.y+=D,c.line++,r=c.x=i.left+(s-l[c.line])/2):d+D>i.bottom&&(r=c.x=r+i.columnWidths[c.line]+a.padding,d=c.y=i.top,c.line++),y(r,d,t),k[e].left=r,k[e].top=d,w(r,d,t,n),b?c.x+=o+a.padding:c.y+=D})}},handleEvent:function(t){var i=this,n=i.options,a="mouseup"===t.type?"click":t.type;if("mousemove"===a){if(!n.onHover)return}else{if("click"!==a)return;if(!n.onClick)return}var o=e.getRelativePosition(t,i.chart.chart),r=o.x,s=o.y;if(r>=i.left&&r<=i.right&&s>=i.top&&s<=i.bottom)for(var l=i.legendHitBoxes,c=0;c=u.left&&r<=u.left+u.width&&s>=u.top&&s<=u.top+u.height){if("click"===a){n.onClick.call(i,t,i.legendItems[c]);break}if("mousemove"===a){n.onHover.call(i,t,i.legendItems[c]);break}}}}}),t.plugins.register({beforeInit:function(e){var i=e.options,n=i.legend;n&&(e.legend=new t.Legend({ctx:e.chart.ctx,options:n,chart:e}),t.layoutService.addBox(e,e.legend))}})}},{}],30:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers.noop;t.plugins={_plugins:[],register:function(t){var e=this._plugins;[].concat(t).forEach(function(t){-1===e.indexOf(t)&&e.push(t)})},unregister:function(t){var e=this._plugins;[].concat(t).forEach(function(t){var i=e.indexOf(t);-1!==i&&e.splice(i,1)})},clear:function(){this._plugins=[]},count:function(){return this._plugins.length},getAll:function(){return this._plugins}, notify:function(t,e){var i,n,a=this._plugins,o=a.length;for(i=0;o>i;++i)if(n=a[i],"function"==typeof n[t]&&!1===n[t].apply(n,e||[]))return!1;return!0}},t.PluginBase=t.Element.extend({beforeInit:e,afterInit:e,beforeUpdate:e,afterUpdate:e,beforeDraw:e,afterDraw:e,destroy:e}),t.pluginService=t.plugins}},{}],31:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.scale={display:!0,position:"left",gridLines:{display:!0,color:"rgba(0, 0, 0, 0.1)",lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",offsetGridLines:!1,borderDash:[],borderDashOffset:0},scaleLabel:{labelString:"",display:!1},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:10,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:function(t){return e.isArray(t)?t:""+t}}},t.Scale=t.Element.extend({beforeUpdate:function(){e.callCallback(this.options.beforeUpdate,[this])},update:function(t,i,n){var a=this;return a.beforeUpdate(),a.maxWidth=t,a.maxHeight=i,a.margins=e.extend({left:0,right:0,top:0,bottom:0},n),a.beforeSetDimensions(),a.setDimensions(),a.afterSetDimensions(),a.beforeDataLimits(),a.determineDataLimits(),a.afterDataLimits(),a.beforeBuildTicks(),a.buildTicks(),a.afterBuildTicks(),a.beforeTickToLabelConversion(),a.convertTicksToLabels(),a.afterTickToLabelConversion(),a.beforeCalculateTickRotation(),a.calculateTickRotation(),a.afterCalculateTickRotation(),a.beforeFit(),a.fit(),a.afterFit(),a.afterUpdate(),a.minSize},afterUpdate:function(){e.callCallback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){e.callCallback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0},afterSetDimensions:function(){e.callCallback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){e.callCallback(this.options.beforeDataLimits,[this])},determineDataLimits:e.noop,afterDataLimits:function(){e.callCallback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){e.callCallback(this.options.beforeBuildTicks,[this])},buildTicks:e.noop,afterBuildTicks:function(){e.callCallback(this.options.afterBuildTicks,[this])},beforeTickToLabelConversion:function(){e.callCallback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var t=this;t.ticks=t.ticks.map(function(e,i,n){return t.options.ticks.userCallback?t.options.ticks.userCallback(e,i,n):t.options.ticks.callback(e,i,n)},t)},afterTickToLabelConversion:function(){e.callCallback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){e.callCallback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var i=this,n=i.ctx,a=t.defaults.global,o=i.options.ticks,r=e.getValueOrDefault(o.fontSize,a.defaultFontSize),s=e.getValueOrDefault(o.fontStyle,a.defaultFontStyle),l=e.getValueOrDefault(o.fontFamily,a.defaultFontFamily),c=e.fontString(r,s,l);n.font=c;var u,d=n.measureText(i.ticks[0]).width,h=n.measureText(i.ticks[i.ticks.length-1]).width;if(i.labelRotation=o.minRotation||0,i.paddingRight=0,i.paddingLeft=0,i.options.display&&i.isHorizontal()){i.paddingRight=h/2+3,i.paddingLeft=d/2+3,i.longestTextCache||(i.longestTextCache={});for(var p,f,g=e.longestText(n,c,i.ticks,i.longestTextCache),m=g,v=i.getPixelForTick(1)-i.getPixelForTick(0)-6;m>v&&i.labelRotationi.yLabelWidth&&(i.paddingLeft=u+r/2),i.paddingRight=r/2,f*g>i.maxHeight){i.labelRotation--;break}i.labelRotation++,m=p*g}}i.margins&&(i.paddingLeft=Math.max(i.paddingLeft-i.margins.left,0),i.paddingRight=Math.max(i.paddingRight-i.margins.right,0))},afterCalculateTickRotation:function(){e.callCallback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){e.callCallback(this.options.beforeFit,[this])},fit:function(){var i=this,n=i.minSize={width:0,height:0},a=i.options,o=t.defaults.global,r=a.ticks,s=a.scaleLabel,l=a.gridLines,c=a.display,u=i.isHorizontal(),d=e.getValueOrDefault(r.fontSize,o.defaultFontSize),h=e.getValueOrDefault(r.fontStyle,o.defaultFontStyle),p=e.getValueOrDefault(r.fontFamily,o.defaultFontFamily),f=e.fontString(d,h,p),g=e.getValueOrDefault(s.fontSize,o.defaultFontSize),m=a.gridLines.tickMarkLength;if(n.width=u?i.isFullWidth()?i.maxWidth-i.margins.left-i.margins.right:i.maxWidth:c&&l.drawTicks?m:0,n.height=u?c&&l.drawTicks?m:0:i.maxHeight,s.display&&c&&(u?n.height+=1.5*g:n.width+=1.5*g),r.display&&c){i.longestTextCache||(i.longestTextCache={});var v=e.longestText(i.ctx,f,i.ticks,i.longestTextCache),k=e.numberOfLabelLines(i.ticks),y=.5*d;if(u){i.longestLabelWidth=v;var w=Math.sin(e.toRadians(i.labelRotation))*i.longestLabelWidth+d*k+y*k;n.height=Math.min(i.maxHeight,n.height+w),i.ctx.font=f;var b=i.ctx.measureText(i.ticks[0]).width,D=i.ctx.measureText(i.ticks[i.ticks.length-1]).width,x=Math.cos(e.toRadians(i.labelRotation)),_=Math.sin(e.toRadians(i.labelRotation));i.paddingLeft=0!==i.labelRotation?x*b+3:b/2+3,i.paddingRight=0!==i.labelRotation?_*(d/2)+3:D/2+3}else{var C=i.maxWidth-n.width;r.mirror?v=0:v+=i.options.ticks.padding,C>v?n.width+=v:n.width=i.maxWidth,i.paddingTop=d/2,i.paddingBottom=d/2}}i.margins&&(i.paddingLeft=Math.max(i.paddingLeft-i.margins.left,0),i.paddingTop=Math.max(i.paddingTop-i.margins.top,0),i.paddingRight=Math.max(i.paddingRight-i.margins.right,0),i.paddingBottom=Math.max(i.paddingBottom-i.margins.bottom,0)),i.width=n.width,i.height=n.height},afterFit:function(){e.callCallback(this.options.afterFit,[this])},isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){return null===t||void 0===t?NaN:"number"==typeof t&&isNaN(t)?NaN:"object"==typeof t?t instanceof Date||t.isValid?t:this.getRightValue(this.isHorizontal()?t.x:t.y):t},getLabelForIndex:e.noop,getPixelForValue:e.noop,getValueForPixel:e.noop,getPixelForTick:function(t,e){var i=this;if(i.isHorizontal()){var n=i.width-(i.paddingLeft+i.paddingRight),a=n/Math.max(i.ticks.length-(i.options.gridLines.offsetGridLines?0:1),1),o=a*t+i.paddingLeft;e&&(o+=a/2);var r=i.left+Math.round(o);return r+=i.isFullWidth()?i.margins.left:0}var s=i.height-(i.paddingTop+i.paddingBottom);return i.top+t*(s/(i.ticks.length-1))},getPixelForDecimal:function(t){var e=this;if(e.isHorizontal()){var i=e.width-(e.paddingLeft+e.paddingRight),n=i*t+e.paddingLeft,a=e.left+Math.round(n);return a+=e.isFullWidth()?e.margins.left:0}return e.top+t*e.height},getBasePixel:function(){var t=this,e=t.min,i=t.max;return t.getPixelForValue(t.beginAtZero?0:0>e&&0>i?i:e>0&&i>0?e:0)},draw:function(i){var n=this,a=n.options;if(a.display){var o,r,s=n.ctx,l=t.defaults.global,c=a.ticks,u=a.gridLines,d=a.scaleLabel,h=0!==n.labelRotation,p=c.autoSkip,f=n.isHorizontal();c.maxTicksLimit&&(r=c.maxTicksLimit);var g=e.getValueOrDefault(c.fontColor,l.defaultFontColor),m=e.getValueOrDefault(c.fontSize,l.defaultFontSize),v=e.getValueOrDefault(c.fontStyle,l.defaultFontStyle),k=e.getValueOrDefault(c.fontFamily,l.defaultFontFamily),y=e.fontString(m,v,k),w=u.tickMarkLength,b=e.getValueOrDefault(u.borderDash,l.borderDash),D=e.getValueOrDefault(u.borderDashOffset,l.borderDashOffset),x=e.getValueOrDefault(d.fontColor,l.defaultFontColor),_=e.getValueOrDefault(d.fontSize,l.defaultFontSize),C=e.getValueOrDefault(d.fontStyle,l.defaultFontStyle),M=e.getValueOrDefault(d.fontFamily,l.defaultFontFamily),S=e.fontString(_,C,M),T=e.toRadians(n.labelRotation),Y=Math.cos(T),A=n.longestLabelWidth*Y;s.fillStyle=g;var O=[];if(f){if(o=!1,h&&(A/=2),(A+c.autoSkipPadding)*n.ticks.length>n.width-(n.paddingLeft+n.paddingRight)&&(o=1+Math.floor((A+c.autoSkipPadding)*n.ticks.length/(n.width-(n.paddingLeft+n.paddingRight)))),r&&n.ticks.length>r)for(;!o||n.ticks.length/(o||1)>r;)o||(o=1),o+=1;p||(o=!1)}var $="right"===a.position?n.left:n.right-w,I="right"===a.position?n.left+w:n.right,P="bottom"===a.position?n.top:n.bottom-w,E="bottom"===a.position?n.top+w:n.bottom;if(e.each(n.ticks,function(t,r){if(void 0!==t&&null!==t){var s=n.ticks.length===r+1;if((!(o>1&&r%o>0||r%o==0&&r+o>=n.ticks.length)||s)&&void 0!==t&&null!==t){var l,d;r===(void 0!==n.zeroLineIndex?n.zeroLineIndex:0)?(l=u.zeroLineWidth,d=u.zeroLineColor):(l=e.getValueAtIndexOrDefault(u.lineWidth,r),d=e.getValueAtIndexOrDefault(u.color,r));var p,g,m,v,k,y,x,_,C,M,S="middle",Y="middle";if(f){h||(Y="top"===a.position?"bottom":"top"),S=h?"right":"center";var A=n.getPixelForTick(r)+e.aliasPixel(l);C=n.getPixelForTick(r,u.offsetGridLines)+c.labelOffset,M=h?n.top+12:"top"===a.position?n.bottom-w:n.top+w,p=m=k=x=A,g=P,v=E,y=i.top,_=i.bottom}else{"left"===a.position?c.mirror?(C=n.right+c.padding,S="left"):(C=n.right-c.padding,S="right"):c.mirror?(C=n.left-c.padding,S="right"):(C=n.left+c.padding,S="left");var L=n.getPixelForTick(r);L+=e.aliasPixel(l),M=n.getPixelForTick(r,u.offsetGridLines),p=$,m=I,k=i.left,x=i.right,g=v=y=_=L}O.push({tx1:p,ty1:g,tx2:m,ty2:v,x1:k,y1:y,x2:x,y2:_,labelX:C,labelY:M,glWidth:l,glColor:d,glBorderDash:b,glBorderDashOffset:D,rotation:-1*T,label:t,textBaseline:Y,textAlign:S})}}}),e.each(O,function(t){if(u.display&&(s.save(),s.lineWidth=t.glWidth,s.strokeStyle=t.glColor,s.setLineDash&&(s.setLineDash(t.glBorderDash),s.lineDashOffset=t.glBorderDashOffset),s.beginPath(),u.drawTicks&&(s.moveTo(t.tx1,t.ty1),s.lineTo(t.tx2,t.ty2)),u.drawOnChartArea&&(s.moveTo(t.x1,t.y1),s.lineTo(t.x2,t.y2)),s.stroke(),s.restore()),c.display){s.save(),s.translate(t.labelX,t.labelY),s.rotate(t.rotation),s.font=y,s.textBaseline=t.textBaseline,s.textAlign=t.textAlign;var i=t.label;if(e.isArray(i))for(var n=0,a=-(i.length-1)*m*.75;ne;++e){var o=t[e];if(o&&o.hasValue()){var r=o.tooltipPosition();n.push(r.x),a.push(r.y)}}var s=0,l=0;for(e=0;e0){var o=t[0];o.xLabel?i=o.xLabel:a>0&&o.indexe;++e)f.push(n(c[e]));s.itemSort&&(f=f.sort(function(t,e){return s.itemSort(t,e,u)})),c.length>1&&a.each(f,function(t){h.push(s.callbacks.labelColor.call(r,t,d))}),a.extend(l,{title:r.getTitle(f,u),beforeBody:r.getBeforeBody(f,u),body:r.getBody(f,u),afterBody:r.getAfterBody(f,u),footer:r.getFooter(f,u),x:Math.round(p.x),y:Math.round(p.y),caretPadding:a.getValueOrDefault(p.padding,2),labelColors:h});var g=r.getTooltipSize(l);r.determineAlignment(g),a.extend(l,r.getBackgroundPoint(l,g))}else r._model.opacity=0;return t&&s.custom&&s.custom.call(r,l),r},getTooltipSize:function(t){var e=this._chart.ctx,i={height:2*t.yPadding,width:0},n=t.body,o=n.reduce(function(t,e){return t+e.before.length+e.lines.length+e.after.length},0);o+=t.beforeBody.length+t.afterBody.length;var r=t.title.length,s=t.footer.length,l=t.titleFontSize,c=t.bodyFontSize,u=t.footerFontSize;i.height+=r*l,i.height+=(r-1)*t.titleSpacing,i.height+=r?t.titleMarginBottom:0,i.height+=o*c,i.height+=o?(o-1)*t.bodySpacing:0,i.height+=s?t.footerMarginTop:0,i.height+=s*u,i.height+=s?(s-1)*t.footerSpacing:0;var d=0,h=function(t){i.width=Math.max(i.width,e.measureText(t).width+d)};return e.font=a.fontString(l,t._titleFontStyle,t._titleFontFamily),a.each(t.title,h),e.font=a.fontString(c,t._bodyFontStyle,t._bodyFontFamily),a.each(t.beforeBody.concat(t.afterBody),h),d=n.length>1?c+2:0,a.each(n,function(t){a.each(t.before,h),a.each(t.lines,h),a.each(t.after,h)}),d=0,e.font=a.fontString(u,t._footerFontStyle,t._footerFontFamily),a.each(t.footer,h),i.width+=2*t.xPadding,i},determineAlignment:function(t){var e=this,i=e._model,n=e._chart,a=e._chartInstance.chartArea;i.yn.height-t.height&&(i.yAlign="bottom");var o,r,s,l,c,u=(a.left+a.right)/2,d=(a.top+a.bottom)/2;"center"===i.yAlign?(o=function(t){return u>=t},r=function(t){return t>u}):(o=function(e){return e<=t.width/2},r=function(e){return e>=n.width-t.width/2}),s=function(e){return e+t.width>n.width},l=function(e){return e-t.width<0},c=function(t){return d>=t?"top":"bottom"},o(i.x)?(i.xAlign="left",s(i.x)&&(i.xAlign="center",i.yAlign=c(i.y))):r(i.x)&&(i.xAlign="right",l(i.x)&&(i.xAlign="center",i.yAlign=c(i.y)))},getBackgroundPoint:function(t,e){var i={x:t.x,y:t.y},n=t.caretSize,a=t.caretPadding,o=t.cornerRadius,r=t.xAlign,s=t.yAlign,l=n+a,c=o+a;return"right"===r?i.x-=e.width:"center"===r&&(i.x-=e.width/2),"top"===s?i.y+=l:i.y-="bottom"===s?e.height+l:e.height/2,"center"===s?"left"===r?i.x+=l:"right"===r&&(i.x-=l):"left"===r?i.x-=c:"right"===r&&(i.x+=c),i},drawCaret:function(t,e,i){var n,o,r,s,l,c,u=this._view,d=this._chart.ctx,h=u.caretSize,p=u.cornerRadius,f=u.xAlign,g=u.yAlign,m=t.x,v=t.y,k=e.width,y=e.height;"center"===g?("left"===f?(n=m,o=n-h,r=n):(n=m+k,o=n+h,r=n),l=v+y/2,s=l-h,c=l+h):("left"===f?(n=m+p,o=n+h,r=o+h):"right"===f?(n=m+k-p,o=n-h,r=o-h):(o=m+k/2,n=o-h,r=o+h),"top"===g?(s=v,l=s-h,c=s):(s=v+y,l=s+h,c=s));var w=a.color(u.backgroundColor);d.fillStyle=w.alpha(i*w.alpha()).rgbString(),d.beginPath(),d.moveTo(n,s),d.lineTo(o,l),d.lineTo(r,c),d.closePath(),d.fill()},drawTitle:function(t,e,i,n){var o=e.title;if(o.length){i.textAlign=e._titleAlign,i.textBaseline="top";var r=e.titleFontSize,s=e.titleSpacing,l=a.color(e.titleFontColor);i.fillStyle=l.alpha(n*l.alpha()).rgbString(),i.font=a.fontString(r,e._titleFontStyle,e._titleFontFamily);var c,u;for(c=0,u=o.length;u>c;++c)i.fillText(o[c],t.x,t.y),t.y+=r+s,c+1===o.length&&(t.y+=e.titleMarginBottom-s)}},drawBody:function(t,e,i,n){var o=e.bodyFontSize,r=e.bodySpacing,s=e.body;i.textAlign=e._bodyAlign,i.textBaseline="top";var l=a.color(e.bodyFontColor),c=l.alpha(n*l.alpha()).rgbString();i.fillStyle=c,i.font=a.fontString(o,e._bodyFontStyle,e._bodyFontFamily);var u=0,d=function(e){i.fillText(e,t.x+u,t.y),t.y+=o+r};a.each(e.beforeBody,d);var h=s.length>1;u=h?o+2:0,a.each(s,function(r,s){a.each(r.before,d),a.each(r.lines,function(r){h&&(i.fillStyle=a.color(e.legendColorBackground).alpha(n).rgbaString(),i.fillRect(t.x,t.y,o,o),i.strokeStyle=a.color(e.labelColors[s].borderColor).alpha(n).rgbaString(),i.strokeRect(t.x,t.y,o,o),i.fillStyle=a.color(e.labelColors[s].backgroundColor).alpha(n).rgbaString(),i.fillRect(t.x+1,t.y+1,o-2,o-2),i.fillStyle=c),d(r)}),a.each(r.after,d)}),u=0,a.each(e.afterBody,d),t.y-=r},drawFooter:function(t,e,i,n){var o=e.footer;if(o.length){t.y+=e.footerMarginTop,i.textAlign=e._footerAlign,i.textBaseline="top";var r=a.color(e.footerFontColor);i.fillStyle=r.alpha(n*r.alpha()).rgbString(),i.font=a.fontString(e.footerFontSize,e._footerFontStyle,e._footerFontFamily),a.each(o,function(n){i.fillText(n,t.x,t.y),t.y+=e.footerFontSize+e.footerSpacing})}},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var i=this.getTooltipSize(e),n={x:e.x,y:e.y},o=Math.abs(e.opacity<.001)?0:e.opacity;if(this._options.enabled){var r=a.color(e.backgroundColor);t.fillStyle=r.alpha(o*r.alpha()).rgbString(),a.drawRoundedRectangle(t,n.x,n.y,i.width,i.height,e.cornerRadius),t.fill(),this.drawCaret(n,i,o),n.x+=e.xPadding,n.y+=e.yPadding,this.drawTitle(n,e,t,o),this.drawBody(n,e,t,o),this.drawFooter(n,e,t,o)}}}})}},{}],35:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i=t.defaults.global;i.elements.arc={backgroundColor:i.defaultColor,borderColor:"#fff",borderWidth:2},t.elements.Arc=t.Element.extend({inLabelRange:function(t){var e=this._view;return!!e&&Math.pow(t-e.x,2)l;)l+=2*Math.PI;for(;o>l;)o-=2*Math.PI;for(;s>o;)o+=2*Math.PI;var c=o>=s&&l>=o,u=r>=n.innerRadius&&r<=n.outerRadius;return c&&u}return!1},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,i=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*i,y:t.y+Math.sin(e)*i}},draw:function(){var t=this._chart.ctx,e=this._view,i=e.startAngle,n=e.endAngle;t.beginPath(),t.arc(e.x,e.y,e.outerRadius,i,n),t.arc(e.x,e.y,e.innerRadius,n,i,!0),t.closePath(),t.strokeStyle=e.borderColor,t.lineWidth=e.borderWidth,t.fillStyle=e.backgroundColor,t.fill(),t.lineJoin="bevel",e.borderWidth&&t.stroke()}})}},{}],36:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i=t.defaults.global;t.defaults.global.elements.line={tension:.4,backgroundColor:i.defaultColor,borderWidth:3,borderColor:i.defaultColor,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0},t.elements.Line=t.Element.extend({draw:function(){function t(t,e){var i=e._view;!0===e._view.steppedLine?(l.lineTo(i.x,t._view.y),l.lineTo(i.x,i.y)):0===e._view.tension?l.lineTo(i.x,i.y):l.bezierCurveTo(t._view.controlPointNextX,t._view.controlPointNextY,i.controlPointPreviousX,i.controlPointPreviousY,i.x,i.y)}var n=this,a=n._view,o=a.spanGaps,r=a.scaleZero,s=n._loop,l=n._chart.ctx;l.save();var c=n._children.slice(),u=-1;s&&c.length&&c.push(c[0]);var d,h,p,f;if(c.length&&a.fill){for(l.beginPath(),d=0;dd;d++)e.lineTo.apply(e,t(d));e.fill(),i.borderWidth&&e.stroke()},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){var i=this._view;return!!i&&(i.y=i.x-i.width/2&&t<=i.x+i.width/2&&e>=i.y&&e<=i.base:t>=i.x-i.width/2&&t<=i.x+i.width/2&&e>=i.base&&e<=i.y)},inLabelRange:function(t){var e=this._view;return!!e&&(t>=e.x-e.width/2&&t<=e.x+e.width/2)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}})}},{}],39:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i={position:"bottom"},n=t.Scale.extend({getLabels:function(){var t=this.chart.data;return(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels},determineDataLimits:function(){var t=this,i=t.getLabels();t.minIndex=0,t.maxIndex=i.length-1;var n;void 0!==t.options.ticks.min&&(n=e.indexOf(i,t.options.ticks.min),t.minIndex=-1!==n?n:t.minIndex),void 0!==t.options.ticks.max&&(n=e.indexOf(i,t.options.ticks.max),t.maxIndex=-1!==n?n:t.maxIndex),t.min=i[t.minIndex],t.max=i[t.maxIndex]},buildTicks:function(){var t=this,e=t.getLabels();t.ticks=0===t.minIndex&&t.maxIndex===e.length-1?e:e.slice(t.minIndex,t.maxIndex+1)},getLabelForIndex:function(t,e){var i=this,n=i.chart.data,a=i.isHorizontal();return n.xLabels&&a||n.yLabels&&!a?i.getRightValue(n.datasets[e].data[t]):i.ticks[t]},getPixelForValue:function(t,e,i,n){var a=this,o=Math.max(a.maxIndex+1-a.minIndex-(a.options.gridLines.offsetGridLines?0:1),1);if(void 0!==t&&isNaN(e)){var r=a.getLabels(),s=r.indexOf(t);e=-1!==s?s:e}if(a.isHorizontal()){var l=a.width-(a.paddingLeft+a.paddingRight),c=l/o,u=c*(e-a.minIndex)+a.paddingLeft;return(a.options.gridLines.offsetGridLines&&n||a.maxIndex===a.minIndex&&n)&&(u+=c/2),a.left+Math.round(u)}var d=a.height-(a.paddingTop+a.paddingBottom),h=d/o,p=h*(e-a.minIndex)+a.paddingTop;return a.options.gridLines.offsetGridLines&&n&&(p+=h/2),a.top+Math.round(p)},getPixelForTick:function(t,e){return this.getPixelForValue(this.ticks[t],t+this.minIndex,null,e)},getValueForPixel:function(t){var e=this,i=Math.max(e.ticks.length-(e.options.gridLines.offsetGridLines?0:1),1),n=e.isHorizontal(),a=n?e.width-(e.paddingLeft+e.paddingRight):e.height-(e.paddingTop+e.paddingBottom),o=a/i;return t-=n?e.left:e.top,e.options.gridLines.offsetGridLines&&(t-=o/2),t-=n?e.paddingLeft:e.paddingTop,0>=t?0:Math.round(t/o)},getBasePixel:function(){return this.bottom}});t.scaleService.registerScaleType("category",n,i)}},{}],40:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i={position:"left",ticks:{callback:function(t,i,n){var a=n.length>3?n[2]-n[1]:n[1]-n[0];Math.abs(a)>1&&t!==Math.floor(t)&&(a=t-Math.floor(t));var o=e.log10(Math.abs(a)),r="";if(0!==t){var s=-1*Math.floor(o);s=Math.max(Math.min(s,20),0),r=t.toFixed(s)}else r="0";return r}}},n=t.LinearScaleBase.extend({determineDataLimits:function(){function t(t){return s?t.xAxisID===i.id:t.yAxisID===i.id}var i=this,n=i.options,a=i.chart,o=a.data,r=o.datasets,s=i.isHorizontal();if(i.min=null,i.max=null,n.stacked){var l={};e.each(r,function(o,r){var s=a.getDatasetMeta(r);void 0===l[s.type]&&(l[s.type]={positiveValues:[],negativeValues:[]});var c=l[s.type].positiveValues,u=l[s.type].negativeValues;a.isDatasetVisible(r)&&t(s)&&e.each(o.data,function(t,e){var a=+i.getRightValue(t);isNaN(a)||s.data[e].hidden||(c[e]=c[e]||0,u[e]=u[e]||0,n.relativePoints?c[e]=100:0>a?u[e]+=a:c[e]+=a)})}),e.each(l,function(t){var n=t.positiveValues.concat(t.negativeValues),a=e.min(n),o=e.max(n);i.min=null===i.min?a:Math.min(i.min,a),i.max=null===i.max?o:Math.max(i.max,o)})}else e.each(r,function(n,o){var r=a.getDatasetMeta(o);a.isDatasetVisible(o)&&t(r)&&e.each(n.data,function(t,e){var n=+i.getRightValue(t);isNaN(n)||r.data[e].hidden||(null===i.min?i.min=n:ni.max&&(i.max=n))})});this.handleTickRangeOptions()},getTickLimit:function(){var i,n=this,a=n.options.ticks;if(n.isHorizontal())i=Math.min(a.maxTicksLimit?a.maxTicksLimit:11,Math.ceil(n.width/50));else{var o=e.getValueOrDefault(a.fontSize,t.defaults.global.defaultFontSize);i=Math.min(a.maxTicksLimit?a.maxTicksLimit:11,Math.ceil(n.height/(2*o)))}return i},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){var e,i,n=this,a=n.paddingLeft,o=n.paddingBottom,r=n.start,s=+n.getRightValue(t),l=n.end-r;return n.isHorizontal()?(i=n.width-(a+n.paddingRight),e=n.left+i/l*(s-r),Math.round(e+a)):(i=n.height-(n.paddingTop+o),e=n.bottom-o-i/l*(s-r),Math.round(e))},getValueForPixel:function(t){var e=this,i=e.isHorizontal(),n=e.paddingLeft,a=e.paddingBottom,o=i?e.width-(n+e.paddingRight):e.height-(e.paddingTop+a),r=(i?t-e.left-n:e.bottom-a-t)/o;return e.start+(e.end-e.start)*r},getPixelForTick:function(t){return this.getPixelForValue(this.ticksAsNumbers[t])}});t.scaleService.registerScaleType("linear",n,i)}},{}],41:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i=e.noop -;t.LinearScaleBase=t.Scale.extend({handleTickRangeOptions:function(){var t=this,i=t.options,n=i.ticks;if(n.beginAtZero){var a=e.sign(t.min),o=e.sign(t.max);0>a&&0>o?t.max=0:a>0&&o>0&&(t.min=0)}void 0!==n.min?t.min=n.min:void 0!==n.suggestedMin&&(t.min=Math.min(t.min,n.suggestedMin)),void 0!==n.max?t.max=n.max:void 0!==n.suggestedMax&&(t.max=Math.max(t.max,n.suggestedMax)),t.min===t.max&&(t.max++,n.beginAtZero||t.min--)},getTickLimit:i,handleDirectionalChanges:i,buildTicks:function(){var t=this,i=t.options,n=t.ticks=[],a=i.ticks,o=e.getValueOrDefault,r=t.getTickLimit();r=Math.max(2,r);var s;if(a.fixedStepSize&&a.fixedStepSize>0||a.stepSize&&a.stepSize>0)s=o(a.fixedStepSize,a.stepSize);else{var l=e.niceNum(t.max-t.min,!1);s=e.niceNum(l/(r-1),!0)}var c=Math.floor(t.min/s)*s,u=Math.ceil(t.max/s)*s,d=(u-c)/s;d=e.almostEquals(d,Math.round(d),s/1e3)?Math.round(d):Math.ceil(d),n.push(void 0!==a.min?a.min:c);for(var h=1;d>h;++h)n.push(c+h*s);n.push(void 0!==a.max?a.max:u),t.handleDirectionalChanges(),t.max=e.max(n),t.min=e.min(n),a.reverse?(n.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max)},convertTicksToLabels:function(){var e=this;e.ticksAsNumbers=e.ticks.slice(),e.zeroLineIndex=e.ticks.indexOf(0),t.Scale.prototype.convertTicksToLabels.call(e)}})}},{}],42:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i={position:"left",ticks:{callback:function(t,i,n){var a=t/Math.pow(10,Math.floor(e.log10(t)));return 0===t?"0":1===a||2===a||5===a||0===i||i===n.length-1?t.toExponential():""}}},n=t.Scale.extend({determineDataLimits:function(){function t(t){return c?t.xAxisID===i.id:t.yAxisID===i.id}var i=this,n=i.options,a=n.ticks,o=i.chart,r=o.data,s=r.datasets,l=e.getValueOrDefault,c=i.isHorizontal();if(i.min=null,i.max=null,i.minNotZero=null,n.stacked){var u={};e.each(s,function(a,r){var s=o.getDatasetMeta(r);o.isDatasetVisible(r)&&t(s)&&(void 0===u[s.type]&&(u[s.type]=[]),e.each(a.data,function(t,e){var a=u[s.type],o=+i.getRightValue(t);isNaN(o)||s.data[e].hidden||(a[e]=a[e]||0,n.relativePoints?a[e]=100:a[e]+=o)}))}),e.each(u,function(t){var n=e.min(t),a=e.max(t);i.min=null===i.min?n:Math.min(i.min,n),i.max=null===i.max?a:Math.max(i.max,a)})}else e.each(s,function(n,a){var r=o.getDatasetMeta(a);o.isDatasetVisible(a)&&t(r)&&e.each(n.data,function(t,e){var n=+i.getRightValue(t);isNaN(n)||r.data[e].hidden||(null===i.min?i.min=n:ni.max&&(i.max=n),0!==n&&(null===i.minNotZero||nt.max&&(t.max=n))})}}),t.handleTickRangeOptions()},getTickLimit:function(){var t=this.options.ticks,n=e.getValueOrDefault(t.fontSize,i.defaultFontSize);return Math.min(t.maxTicksLimit?t.maxTicksLimit:11,Math.ceil(this.drawingArea/(1.5*n)))},convertTicksToLabels:function(){var e=this;t.LinearScaleBase.prototype.convertTicksToLabels.call(e),e.pointLabels=e.chart.data.labels.map(e.options.pointLabels.callback,e)},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){var t,n,a,o,r,s,l,c,u,d,h,p,f=this.options.pointLabels,g=e.getValueOrDefault(f.fontSize,i.defaultFontSize),m=e.getValueOrDefault(f.fontStyle,i.defaultFontStyle),v=e.getValueOrDefault(f.fontFamily,i.defaultFontFamily),k=e.fontString(g,m,v),y=e.min([this.height/2-g-5,this.width/2]),w=this.width,b=0;for(this.ctx.font=k,n=0;nw&&(w=t.x+o,r=n),t.x-ox?t.x+a>w&&(w=t.x+a,r=n):t.x-ae&&0>i?i:e>0&&i>0?e:0)},draw:function(){var t=this,n=t.options,a=n.gridLines,o=n.ticks,r=n.angleLines,s=n.pointLabels,l=e.getValueOrDefault;if(n.display){var c=t.ctx,u=l(o.fontSize,i.defaultFontSize),d=l(o.fontStyle,i.defaultFontStyle),h=l(o.fontFamily,i.defaultFontFamily),p=e.fontString(u,d,h);if(e.each(t.ticks,function(r,s){if(s>0||n.reverse){var d=t.getDistanceFromCenterForValue(t.ticksAsNumbers[s]),h=t.yCenter-d;if(a.display&&0!==s)if(c.strokeStyle=e.getValueAtIndexOrDefault(a.color,s-1),c.lineWidth=e.getValueAtIndexOrDefault(a.lineWidth,s-1),n.lineArc)c.beginPath(),c.arc(t.xCenter,t.yCenter,d,0,2*Math.PI),c.closePath(),c.stroke();else{c.beginPath();for(var f=0;f=0;y--){if(r.display){var w=t.getPointPosition(y,f);c.beginPath(),c.moveTo(t.xCenter,t.yCenter),c.lineTo(w.x,w.y),c.stroke(),c.closePath()}var b=t.getPointPosition(y,f+5),D=l(s.fontColor,i.defaultFontColor);c.font=k,c.fillStyle=D;var x=t.pointLabels,_=this.getIndexAngle(y)+Math.PI/2,C=360*_/(2*Math.PI)%360;c.textAlign=0===C||180===C?"center":180>C?"left":"right",c.textBaseline=90===C||270===C?"middle":C>270||90>C?"bottom":"top",c.fillText(x[y]?x[y]:"",b.x,b.y)}}}}});t.scaleService.registerScaleType("radialLinear",a,n)}},{}],44:[function(t,e,i){"use strict";var n=t(1);n="function"==typeof n?n:window.moment,e.exports=function(t){var e=t.helpers,i={units:[{name:"millisecond",steps:[1,2,5,10,20,50,100,250,500]},{name:"second",steps:[1,2,5,10,30]},{name:"minute",steps:[1,2,5,10,30]},{name:"hour",steps:[1,2,3,6,12]},{name:"day",steps:[1,2,5]},{name:"week",maxStep:4},{name:"month",maxStep:3},{name:"quarter",maxStep:4},{name:"year",maxStep:!1}]},a={position:"bottom",time:{parser:!1,format:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm:ss a",hour:"MMM D, hA",day:"ll",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"}},ticks:{autoSkip:!1}},o=t.Scale.extend({initialize:function(){if(!n)throw new Error("Chart.js - Moment.js could not be found! You must include it before Chart.js to use the time scale. Download at https://momentjs.com");t.Scale.prototype.initialize.call(this)},getLabelMoment:function(t,e){return null===t||null===e?null:void 0!==this.labelMoments[t]?this.labelMoments[t][e]:null},getLabelDiff:function(t,e){var i=this;return null===t||null===e?null:(void 0===i.labelDiffs&&i.buildLabelDiffs(),void 0!==i.labelDiffs[t]?i.labelDiffs[t][e]:null)},getMomentStartOf:function(t){var e=this;return"week"===e.options.time.unit&&!1!==e.options.time.isoWeekday?t.clone().startOf("isoWeek").isoWeekday(e.options.time.isoWeekday):t.clone().startOf(e.tickUnit)},determineDataLimits:function(){var t=this;t.labelMoments=[];var i=[];t.chart.data.labels&&t.chart.data.labels.length>0?(e.each(t.chart.data.labels,function(e){var n=t.parseTime(e);n.isValid()&&(t.options.time.round&&n.startOf(t.options.time.round),i.push(n))},t),t.firstTick=n.min.call(t,i),t.lastTick=n.max.call(t,i)):(t.firstTick=null,t.lastTick=null),e.each(t.chart.data.datasets,function(a,o){var r=[],s=t.chart.isDatasetVisible(o);"object"==typeof a.data[0]&&null!==a.data[0]?e.each(a.data,function(e){var i=t.parseTime(t.getRightValue(e));i.isValid()&&(t.options.time.round&&i.startOf(t.options.time.round),r.push(i),s&&(t.firstTick=null!==t.firstTick?n.min(t.firstTick,i):i,t.lastTick=null!==t.lastTick?n.max(t.lastTick,i):i))},t):r=i,t.labelMoments.push(r)},t),t.options.time.min&&(t.firstTick=t.parseTime(t.options.time.min)),t.options.time.max&&(t.lastTick=t.parseTime(t.options.time.max)),t.firstTick=(t.firstTick||n()).clone(),t.lastTick=(t.lastTick||n()).clone()},buildLabelDiffs:function(){var t=this;t.labelDiffs=[];var i=[];t.chart.data.labels&&t.chart.data.labels.length>0&&e.each(t.chart.data.labels,function(e){var n=t.parseTime(e);n.isValid()&&(t.options.time.round&&n.startOf(t.options.time.round),i.push(n.diff(t.firstTick,t.tickUnit,!0)))},t),e.each(t.chart.data.datasets,function(n){var a=[];"object"==typeof n.data[0]&&null!==n.data[0]?e.each(n.data,function(e){var i=t.parseTime(t.getRightValue(e));i.isValid()&&(t.options.time.round&&i.startOf(t.options.time.round),a.push(i.diff(t.firstTick,t.tickUnit,!0)))},t):a=i,t.labelDiffs.push(a)},t)},buildTicks:function(){var n=this;n.ctx.save();var a=e.getValueOrDefault(n.options.ticks.fontSize,t.defaults.global.defaultFontSize),o=e.getValueOrDefault(n.options.ticks.fontStyle,t.defaults.global.defaultFontStyle),r=e.getValueOrDefault(n.options.ticks.fontFamily,t.defaults.global.defaultFontFamily),s=e.fontString(a,o,r);if(n.ctx.font=s,n.ticks=[],n.unitScale=1,n.scaleSizeInUnits=0,n.options.time.unit)n.tickUnit=n.options.time.unit||"day",n.displayFormat=n.options.time.displayFormats[n.tickUnit],n.scaleSizeInUnits=n.lastTick.diff(n.firstTick,n.tickUnit,!0),n.unitScale=e.getValueOrDefault(n.options.time.unitStepSize,1);else{var l=n.isHorizontal()?n.width-(n.paddingLeft+n.paddingRight):n.height-(n.paddingTop+n.paddingBottom),c=n.tickFormatFunction(n.firstTick,0,[]),u=n.ctx.measureText(c).width;u=u*Math.cos(e.toRadians(n.options.ticks.maxRotation))+a*Math.sin(e.toRadians(n.options.ticks.maxRotation));var d=l/u;n.tickUnit=n.options.time.minUnit,n.scaleSizeInUnits=n.lastTick.diff(n.firstTick,n.tickUnit,!0),n.displayFormat=n.options.time.displayFormats[n.tickUnit];for(var h=0,p=i.units[h];h=Math.ceil(n.scaleSizeInUnits/d)){n.unitScale=e.getValueOrDefault(n.options.time.unitStepSize,p.steps[f]);break}break}if(!1===p.maxStep||Math.ceil(n.scaleSizeInUnits/d)y?n.lastTick=n.getMomentStartOf(n.lastTick.add(1,n.tickUnit)):y>=0&&(n.lastTick=k),n.scaleSizeInUnits=n.lastTick.diff(n.firstTick,n.tickUnit,!0)}n.options.time.displayFormat&&(n.displayFormat=n.options.time.displayFormat),n.ticks.push(n.firstTick.clone());for(var w=1;w<=n.scaleSizeInUnits;++w){var b=v.clone().add(w,n.tickUnit);if(n.options.time.max&&b.diff(n.lastTick,n.tickUnit,!0)>=0)break;w%n.unitScale==0&&n.ticks.push(b)}(0!==n.ticks[n.ticks.length-1].diff(n.lastTick,n.tickUnit)||0===n.scaleSizeInUnits)&&(n.options.time.max?(n.ticks.push(n.lastTick.clone()),n.scaleSizeInUnits=n.lastTick.diff(n.ticks[0],n.tickUnit,!0)):(n.ticks.push(n.lastTick.clone()),n.scaleSizeInUnits=n.lastTick.diff(n.firstTick,n.tickUnit,!0))),n.ctx.restore(),n.labelDiffs=void 0},getLabelForIndex:function(t,e){var i=this,n=i.chart.data.labels&&t10?this.massviewsRedirectWithPagePile(e.pages).then(i):(this.setInitialChartType(e.pages.length),i(e.pages)):this.getDefaultPages().done(function(e){t.setInitialChartType(e.length),i(e)}).fail(function(){t.resetView(),t.setInitialChartType(),t.focusSelect2()})}},{key:"getDefaultPages",value:function(){var t=this,e=$.Deferred(),i=function(){t.fetchSiteInfo(t.project).done(function(i){e.resolve([i[t.project].general.mainpage])}).fail(e.reject)};if("en.wikipedia"===this.project)e.resolve(["Cat","Dog"]);else if(this.project.includes("wikipedia")){$.getJSON("https://www.wikidata.org/w/api.php?action=wbgetentities&sites=enwiki&titles=Cat|Dog&props=sitelinks/urls|datatype&format=json&callback=?").done(function(n){if(n.error)return e.resolve();var a=Object.keys(d).find(function(e){return d[e]===t.project+".org"}),o=Object.keys(n.entities).map(function(t){return n.entities[t].sitelinks[a]?n.entities[t].sitelinks[a].title:null}).filter(Boolean);if(!o.length)return i();e.resolve(o)})}else i();return e}},{key:"processSearchResults",value:function(t){var e=t?t.query:{},i=[];return e?("autocomplete"===this.autocomplete?e.prefixsearch.length&&(i=e.prefixsearch.map(function(t){return{id:t.title.score(),text:t.title}})):"autocomplete_redirects"===this.autocomplete&&(e.redirects&&(i=e.redirects.map(function(t){return{id:t.from.score(),text:t.from}})),Object.keys(e.pages).forEach(function(t){var n=e.pages[t];i.push({id:n.title.score(),text:n.title})})),{results:i}):{results:i}}},{key:"getParams",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e={project:this.$projectInput.val(),platform:this.$platformSelector.val(),agent:this.$agentSelector.val(),redirects:this.includeRedirects()?"1":"0"};if(this.specialRange&&t)e.range=this.specialRange.range;else{var i=this.getDates(!0),n=r(i,2);e.start=n[0],e.end=n[1]}return this.noLogScale&&(e.autolog="false"),e}},{key:"pushParams",value:function(){l(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"pushParams",this).call(this,"pages")}},{key:"setupSelect2",value:function(){var t=this,i={ajax:this.getArticleSelectorAjax(),tags:"no_autocomplete"===this.autocomplete,placeholder:$.i18n("article-placeholder"),maximumSelectionLength:10,minimumInputLength:1};l(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"setupSelect2",this).call(this,i),this.$select2Input.off("select2:open").on("select2:open",function(e){$(e.target).val()&&10===$(e.target).val().length&&$(".select2-search__field").one("keyup",function(){var e=$.i18n("massviews-notice",10,""+$.i18n("massviews")+"");t.toastInfo(e)})})}},{key:"getArticleSelectorAjax",value:function(){var t=this;return"no_autocomplete"!==this.autocomplete?{url:"https://"+this.project+".org/w/api.php",dataType:"jsonp",delay:200,jsonpCallback:"articleSuggestionCallback",data:function(e){return t.getSearchParams(e.term)},processResults:this.processSearchResults.bind(this),cache:!0}:null}},{key:"resetView",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];l(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"resetView",this).call(this,t,i),this.$outputList.html(""),$(".single-entity-ranking").html(""),$(".single-page-stats").html(""),$(".single-page-legend").html("")}},{key:"validateProject",value:function(){l(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"validateProject",this).call(this)&&(this.resetView(!0),this.focusSelect2())}},{key:"setupListeners",value:function(){l(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"setupListeners",this).call(this),this.$platformSelector.add(this.$agentSelector).add(this.$redirectsCheckbox).on("change",this.processInput.bind(this))}},{key:"consolidateRedirectData",value:function(t,e){var i=this,n=Object.keys(t);if(!this.includeRedirects()||!n.length||!e.entities.length)return e;var a={entities:n,labels:e.labels,datasets:new Array(n.length),errors:e.errors,fatalErrors:e.fatalErrors,promises:e.promises},o=this.getDateHeadings(!1),r=this.isMonthly()?"YYYY-MM":"YYYY-MM-DD";return Object.keys(t).forEach(function(n,s){t[n].map(function(t){return t.title}).forEach(function(t){var n=e.entities.indexOf(t);-1!==n&&e.datasets[n].map(function(e){var n=moment(e.timestamp,i.config.timestampFormat).format(r),l=o.indexOf(n),c=a.datasets[s]&&a.datasets[s][l]?a.datasets[s][l].views:0;e.article=t,e.views=e.views+c,a.datasets[s]=a.datasets[s]||new Array(o.length),a.datasets[s][l]=e})})}),a}},{key:"processInput",value:function(t,e){var i=this,n=this.beforeProcessInput(t);if(n){var a=function(t){i.getRedirects(t).done(function(e){Object.keys(e).forEach(function(i){t=t.concat(e[i].map(function(t){return t.title}))}),i.getPageViewsData(t.unique()).done(function(t){i.updateChart(i.consolidateRedirectData(e,t))})})};e?(this.removeEntity(e),this.getEditData(Object.keys(this.entityInfo.entities)).done(function(t){Object.assign(i.entityInfo.totals,t.totals),i.updateChart()})):this.initialQuery?(a(n),this.initialQuery=!1):this.getPageAndEditInfo(n.map(function(t){return encodeURIComponent(t)})).then(function(){a(n)})}}},{key:"showSingleEntityLegend",value:function(){var t=this,e=this.outputData[0],i=this.getTopviewsMonth(!1),n=i.format("YYYY")+"/"+i.format("MM")+"/all-days";$.ajax({url:"https://wikimedia.org/api/rest_v1/metrics/pageviews/top/"+this.project+"/"+this.$platformSelector.val()+"/"+n,dataType:"json"}).done(function(n){var a=n.items[0].articles.find(function(t){return t.article===e.label.score()});if(a){var o=t.daterangepicker.locale.monthNames[i.month()],r=""+$.i18n("most-viewed-pages").toLowerCase()+"";$(".single-entity-ranking").html($.i18n("most-viewed-rank",a.rank,r,o+" "+i.year()))}}).always(function(){$(".table-view").hide(),$(".single-page-stats").html("\n "+t.getPageLink(e.label)+"\n "+(e.assessment?"·\n"+t.getAssessmentBadge(e):"")+"\n ·\n \n "+t.$dateRangeSelector.val()+"\n \n ·\n "+$.i18n("num-pageviews",t.formatNumber(e.sum),e.sum)+"\n \n "),$(".single-page-legend").html(t.config.templates.chartLegend(t))})}},{key:"updateTable",value:function(){var t=this,e=this.beforeUpdateTable();if(e){$.isNumeric(this.outputData[0].num_edits)||$(".legend-block--revisions .legend-block--body").html(""+$.i18n("data-unavailable")+"");var i=!1,n=!1;e.forEach(function(e){e.protection!==$.i18n("none").toLowerCase()&&(i=!0),e.assessment&&e.assessment.length&&(n=!0),t.$outputList.append(t.config.templates.tableRow(t,e))});var a=e.reduce(function(t,e){return t+e.sum},0),o=e.filter(function(t){return"none"!==t.protection}).length,r={label:$.i18n("num-pages",this.formatNumber(e.length),e.length),sum:a,average:Math.round(a/e[0].data.filter(function(t){return null!==t}).length),num_edits:this.entityInfo.totals?this.entityInfo.totals.num_edits:null,num_users:this.entityInfo.totals?this.entityInfo.totals.num_users:null,length:e.reduce(function(t,e){return t+e.length},0),protection:$.i18n("num-protections",this.formatNumber(o),o),watchers:e.reduce(function(t,e){return t+e.watchers||0},0)};this.$outputList.append(this.config.templates.tableRow(this,r,!0)),$(".table-view--protection").toggle(i),$(".table-view--class").toggle(n),$(".table-view").show()}}},{key:"getSortProperty",value:function(t,e){switch(e){case"title":return t.label;case"class":return t.assessment;case"views":return Number(t.sum);case"average":return Number(t.average);case"edits":return Number(t.num_edits);case"editors":return Number(t.num_users);case"size":return Number(t.length);case"watchers":return Number(t.watchers)}}},{key:"getPageAndEditInfo",value:function(t){var e=this,i=$.Deferred();return this.getPageInfo(t).done(function(t){for(var n in t)t[n].missing&&!t[n].known&&(e.writeMessage(e.getPageLink(n)+": "+$.i18n("api-error-no-data")),delete t[n]);e.entityInfo={entities:t};var a=Object.keys(t);if(!a.length)return i.resolve(e.entityInfo);e.getEditData(a).done(function(t){a.forEach(function(i){var n=t.pages[i]||{},a=e.entityInfo.entities[i].protection||[];Array.isArray(a)&&(a=a.find(function(t){return"edit"===t.type})),n.protection=a?a.level:$.i18n("none").toLowerCase(),Object.assign(e.entityInfo.entities[i],n)}),e.entityInfo.totals=t.totals,i.resolve(e.entityInfo)}).fail(function(){i.resolve(e.entityInfo)})}).fail(function(){i.resolve({})}),i}},{key:"massviewsRedirectWithPagePile",value:function(t){var e=this,i=$.Deferred();return $.ajax({url:"https://pagepile.wmflabs.org/api.php",data:{action:"create_pile_with_data",wiki:this.dbName(this.project),data:t.join("\n")}}).success(function(t){var i=e.getParams();delete i.project,document.location="/massviews?overflow=1&"+$.param(i)+"&source=pagepile&target="+t.pile.id}).fail(function(){e.toastError($.i18n("auto-pagepile-error","PagePile",10)),i.resolve(t.slice(0,10))}),i}}]),e}(mix(u).with(h));$(function(){new p})},{"../shared/chart_helpers":4,"../shared/pv":7,"../shared/site_map":9,"./config":1}],3:[function(t,e,i){"use strict";function n(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var a=function(){function t(t,e){var i=[],n=!0,a=!1,o=void 0;try{for(var r,s=t[Symbol.iterator]();!(n=(r=s.next()).done)&&(i.push(r.value),!e||i.length!==e);n=!0);}catch(t){a=!0,o=t}finally{try{!n&&s.return&&s.return()}finally{if(a)throw o}}return i}return function(e,i){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o={chartLegend:function(t){var e=function(e){var i,o,r,s=arguments.length>1&&void 0!==arguments[1]&&arguments[1],l=void 0;if(s)l=t.formatNumber(e.num_edits);else{var c=t.getDates(),u=a(c,2),d=u[1] +;t.LinearScaleBase=t.Scale.extend({handleTickRangeOptions:function(){var t=this,i=t.options,n=i.ticks;if(n.beginAtZero){var a=e.sign(t.min),o=e.sign(t.max);0>a&&0>o?t.max=0:a>0&&o>0&&(t.min=0)}void 0!==n.min?t.min=n.min:void 0!==n.suggestedMin&&(t.min=Math.min(t.min,n.suggestedMin)),void 0!==n.max?t.max=n.max:void 0!==n.suggestedMax&&(t.max=Math.max(t.max,n.suggestedMax)),t.min===t.max&&(t.max++,n.beginAtZero||t.min--)},getTickLimit:i,handleDirectionalChanges:i,buildTicks:function(){var t=this,i=t.options,n=t.ticks=[],a=i.ticks,o=e.getValueOrDefault,r=t.getTickLimit();r=Math.max(2,r);var s;if(a.fixedStepSize&&a.fixedStepSize>0||a.stepSize&&a.stepSize>0)s=o(a.fixedStepSize,a.stepSize);else{var l=e.niceNum(t.max-t.min,!1);s=e.niceNum(l/(r-1),!0)}var c=Math.floor(t.min/s)*s,u=Math.ceil(t.max/s)*s,d=(u-c)/s;d=e.almostEquals(d,Math.round(d),s/1e3)?Math.round(d):Math.ceil(d),n.push(void 0!==a.min?a.min:c);for(var h=1;d>h;++h)n.push(c+h*s);n.push(void 0!==a.max?a.max:u),t.handleDirectionalChanges(),t.max=e.max(n),t.min=e.min(n),a.reverse?(n.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max)},convertTicksToLabels:function(){var e=this;e.ticksAsNumbers=e.ticks.slice(),e.zeroLineIndex=e.ticks.indexOf(0),t.Scale.prototype.convertTicksToLabels.call(e)}})}},{}],42:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i={position:"left",ticks:{callback:function(t,i,n){var a=t/Math.pow(10,Math.floor(e.log10(t)));return 0===t?"0":1===a||2===a||5===a||0===i||i===n.length-1?t.toExponential():""}}},n=t.Scale.extend({determineDataLimits:function(){function t(t){return c?t.xAxisID===i.id:t.yAxisID===i.id}var i=this,n=i.options,a=n.ticks,o=i.chart,r=o.data,s=r.datasets,l=e.getValueOrDefault,c=i.isHorizontal();if(i.min=null,i.max=null,i.minNotZero=null,n.stacked){var u={};e.each(s,function(a,r){var s=o.getDatasetMeta(r);o.isDatasetVisible(r)&&t(s)&&(void 0===u[s.type]&&(u[s.type]=[]),e.each(a.data,function(t,e){var a=u[s.type],o=+i.getRightValue(t);isNaN(o)||s.data[e].hidden||(a[e]=a[e]||0,n.relativePoints?a[e]=100:a[e]+=o)}))}),e.each(u,function(t){var n=e.min(t),a=e.max(t);i.min=null===i.min?n:Math.min(i.min,n),i.max=null===i.max?a:Math.max(i.max,a)})}else e.each(s,function(n,a){var r=o.getDatasetMeta(a);o.isDatasetVisible(a)&&t(r)&&e.each(n.data,function(t,e){var n=+i.getRightValue(t);isNaN(n)||r.data[e].hidden||(null===i.min?i.min=n:ni.max&&(i.max=n),0!==n&&(null===i.minNotZero||nt.max&&(t.max=n))})}}),t.handleTickRangeOptions()},getTickLimit:function(){var t=this.options.ticks,n=e.getValueOrDefault(t.fontSize,i.defaultFontSize);return Math.min(t.maxTicksLimit?t.maxTicksLimit:11,Math.ceil(this.drawingArea/(1.5*n)))},convertTicksToLabels:function(){var e=this;t.LinearScaleBase.prototype.convertTicksToLabels.call(e),e.pointLabels=e.chart.data.labels.map(e.options.pointLabels.callback,e)},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){var t,n,a,o,r,s,l,c,u,d,h,p,f=this.options.pointLabels,g=e.getValueOrDefault(f.fontSize,i.defaultFontSize),m=e.getValueOrDefault(f.fontStyle,i.defaultFontStyle),v=e.getValueOrDefault(f.fontFamily,i.defaultFontFamily),k=e.fontString(g,m,v),y=e.min([this.height/2-g-5,this.width/2]),w=this.width,b=0;for(this.ctx.font=k,n=0;nw&&(w=t.x+o,r=n),t.x-ox?t.x+a>w&&(w=t.x+a,r=n):t.x-ae&&0>i?i:e>0&&i>0?e:0)},draw:function(){var t=this,n=t.options,a=n.gridLines,o=n.ticks,r=n.angleLines,s=n.pointLabels,l=e.getValueOrDefault;if(n.display){var c=t.ctx,u=l(o.fontSize,i.defaultFontSize),d=l(o.fontStyle,i.defaultFontStyle),h=l(o.fontFamily,i.defaultFontFamily),p=e.fontString(u,d,h);if(e.each(t.ticks,function(r,s){if(s>0||n.reverse){var d=t.getDistanceFromCenterForValue(t.ticksAsNumbers[s]),h=t.yCenter-d;if(a.display&&0!==s)if(c.strokeStyle=e.getValueAtIndexOrDefault(a.color,s-1),c.lineWidth=e.getValueAtIndexOrDefault(a.lineWidth,s-1),n.lineArc)c.beginPath(),c.arc(t.xCenter,t.yCenter,d,0,2*Math.PI),c.closePath(),c.stroke();else{c.beginPath();for(var f=0;f=0;y--){if(r.display){var w=t.getPointPosition(y,f);c.beginPath(),c.moveTo(t.xCenter,t.yCenter),c.lineTo(w.x,w.y),c.stroke(),c.closePath()}var b=t.getPointPosition(y,f+5),D=l(s.fontColor,i.defaultFontColor);c.font=k,c.fillStyle=D;var x=t.pointLabels,_=this.getIndexAngle(y)+Math.PI/2,C=360*_/(2*Math.PI)%360;c.textAlign=0===C||180===C?"center":180>C?"left":"right",c.textBaseline=90===C||270===C?"middle":C>270||90>C?"bottom":"top",c.fillText(x[y]?x[y]:"",b.x,b.y)}}}}});t.scaleService.registerScaleType("radialLinear",a,n)}},{}],44:[function(t,e,i){"use strict";var n=t(1);n="function"==typeof n?n:window.moment,e.exports=function(t){var e=t.helpers,i={units:[{name:"millisecond",steps:[1,2,5,10,20,50,100,250,500]},{name:"second",steps:[1,2,5,10,30]},{name:"minute",steps:[1,2,5,10,30]},{name:"hour",steps:[1,2,3,6,12]},{name:"day",steps:[1,2,5]},{name:"week",maxStep:4},{name:"month",maxStep:3},{name:"quarter",maxStep:4},{name:"year",maxStep:!1}]},a={position:"bottom",time:{parser:!1,format:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm:ss a",hour:"MMM D, hA",day:"ll",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"}},ticks:{autoSkip:!1}},o=t.Scale.extend({initialize:function(){if(!n)throw new Error("Chart.js - Moment.js could not be found! You must include it before Chart.js to use the time scale. Download at https://momentjs.com");t.Scale.prototype.initialize.call(this)},getLabelMoment:function(t,e){return null===t||null===e?null:void 0!==this.labelMoments[t]?this.labelMoments[t][e]:null},getLabelDiff:function(t,e){var i=this;return null===t||null===e?null:(void 0===i.labelDiffs&&i.buildLabelDiffs(),void 0!==i.labelDiffs[t]?i.labelDiffs[t][e]:null)},getMomentStartOf:function(t){var e=this;return"week"===e.options.time.unit&&!1!==e.options.time.isoWeekday?t.clone().startOf("isoWeek").isoWeekday(e.options.time.isoWeekday):t.clone().startOf(e.tickUnit)},determineDataLimits:function(){var t=this;t.labelMoments=[];var i=[];t.chart.data.labels&&t.chart.data.labels.length>0?(e.each(t.chart.data.labels,function(e){var n=t.parseTime(e);n.isValid()&&(t.options.time.round&&n.startOf(t.options.time.round),i.push(n))},t),t.firstTick=n.min.call(t,i),t.lastTick=n.max.call(t,i)):(t.firstTick=null,t.lastTick=null),e.each(t.chart.data.datasets,function(a,o){var r=[],s=t.chart.isDatasetVisible(o);"object"==typeof a.data[0]&&null!==a.data[0]?e.each(a.data,function(e){var i=t.parseTime(t.getRightValue(e));i.isValid()&&(t.options.time.round&&i.startOf(t.options.time.round),r.push(i),s&&(t.firstTick=null!==t.firstTick?n.min(t.firstTick,i):i,t.lastTick=null!==t.lastTick?n.max(t.lastTick,i):i))},t):r=i,t.labelMoments.push(r)},t),t.options.time.min&&(t.firstTick=t.parseTime(t.options.time.min)),t.options.time.max&&(t.lastTick=t.parseTime(t.options.time.max)),t.firstTick=(t.firstTick||n()).clone(),t.lastTick=(t.lastTick||n()).clone()},buildLabelDiffs:function(){var t=this;t.labelDiffs=[];var i=[];t.chart.data.labels&&t.chart.data.labels.length>0&&e.each(t.chart.data.labels,function(e){var n=t.parseTime(e);n.isValid()&&(t.options.time.round&&n.startOf(t.options.time.round),i.push(n.diff(t.firstTick,t.tickUnit,!0)))},t),e.each(t.chart.data.datasets,function(n){var a=[];"object"==typeof n.data[0]&&null!==n.data[0]?e.each(n.data,function(e){var i=t.parseTime(t.getRightValue(e));i.isValid()&&(t.options.time.round&&i.startOf(t.options.time.round),a.push(i.diff(t.firstTick,t.tickUnit,!0)))},t):a=i,t.labelDiffs.push(a)},t)},buildTicks:function(){var n=this;n.ctx.save();var a=e.getValueOrDefault(n.options.ticks.fontSize,t.defaults.global.defaultFontSize),o=e.getValueOrDefault(n.options.ticks.fontStyle,t.defaults.global.defaultFontStyle),r=e.getValueOrDefault(n.options.ticks.fontFamily,t.defaults.global.defaultFontFamily),s=e.fontString(a,o,r);if(n.ctx.font=s,n.ticks=[],n.unitScale=1,n.scaleSizeInUnits=0,n.options.time.unit)n.tickUnit=n.options.time.unit||"day",n.displayFormat=n.options.time.displayFormats[n.tickUnit],n.scaleSizeInUnits=n.lastTick.diff(n.firstTick,n.tickUnit,!0),n.unitScale=e.getValueOrDefault(n.options.time.unitStepSize,1);else{var l=n.isHorizontal()?n.width-(n.paddingLeft+n.paddingRight):n.height-(n.paddingTop+n.paddingBottom),c=n.tickFormatFunction(n.firstTick,0,[]),u=n.ctx.measureText(c).width;u=u*Math.cos(e.toRadians(n.options.ticks.maxRotation))+a*Math.sin(e.toRadians(n.options.ticks.maxRotation));var d=l/u;n.tickUnit=n.options.time.minUnit,n.scaleSizeInUnits=n.lastTick.diff(n.firstTick,n.tickUnit,!0),n.displayFormat=n.options.time.displayFormats[n.tickUnit];for(var h=0,p=i.units[h];h=Math.ceil(n.scaleSizeInUnits/d)){n.unitScale=e.getValueOrDefault(n.options.time.unitStepSize,p.steps[f]);break}break}if(!1===p.maxStep||Math.ceil(n.scaleSizeInUnits/d)y?n.lastTick=n.getMomentStartOf(n.lastTick.add(1,n.tickUnit)):y>=0&&(n.lastTick=k),n.scaleSizeInUnits=n.lastTick.diff(n.firstTick,n.tickUnit,!0)}n.options.time.displayFormat&&(n.displayFormat=n.options.time.displayFormat),n.ticks.push(n.firstTick.clone());for(var w=1;w<=n.scaleSizeInUnits;++w){var b=v.clone().add(w,n.tickUnit);if(n.options.time.max&&b.diff(n.lastTick,n.tickUnit,!0)>=0)break;w%n.unitScale==0&&n.ticks.push(b)}(0!==n.ticks[n.ticks.length-1].diff(n.lastTick,n.tickUnit)||0===n.scaleSizeInUnits)&&(n.options.time.max?(n.ticks.push(n.lastTick.clone()),n.scaleSizeInUnits=n.lastTick.diff(n.ticks[0],n.tickUnit,!0)):(n.ticks.push(n.lastTick.clone()),n.scaleSizeInUnits=n.lastTick.diff(n.firstTick,n.tickUnit,!0))),n.ctx.restore(),n.labelDiffs=void 0},getLabelForIndex:function(t,e){var i=this,n=i.chart.data.labels&&t10?this.massviewsRedirectWithPagePile(e.pages).then(i):(this.setInitialChartType(e.pages.length),i(e.pages)):this.getDefaultPages().done(function(e){t.setInitialChartType(e.length),i(e)}).fail(function(){t.resetView(),t.setInitialChartType(),t.focusSelect2()})}},{key:"getDefaultPages",value:function(){var t=this,e=$.Deferred(),i=function(){t.fetchSiteInfo(t.project).done(function(i){e.resolve([i[t.project].general.mainpage])}).fail(e.reject)};if("en.wikipedia"===this.project)e.resolve(["Cat","Dog"]);else if(this.project.includes("wikipedia")){$.getJSON("https://www.wikidata.org/w/api.php?action=wbgetentities&sites=enwiki&titles=Cat|Dog&props=sitelinks/urls|datatype&format=json&callback=?").done(function(n){if(n.error)return e.resolve();var a=Object.keys(d).find(function(e){return d[e]===t.project+".org"}),o=Object.keys(n.entities).map(function(t){return n.entities[t].sitelinks[a]?n.entities[t].sitelinks[a].title:null}).filter(Boolean);if(!o.length)return i();e.resolve(o)})}else i();return e}},{key:"processSearchResults",value:function(t){var e=t?t.query:{},i=[];return e?("autocomplete"===this.autocomplete?e.prefixsearch.length&&(i=e.prefixsearch.map(function(t){return{id:t.title.score(),text:t.title}})):"autocomplete_redirects"===this.autocomplete&&(e.redirects&&(i=e.redirects.map(function(t){return{id:t.from.score(),text:t.from}})),Object.keys(e.pages).forEach(function(t){var n=e.pages[t];i.push({id:n.title.score(),text:n.title})})),{results:i}):{results:i}}},{key:"getParams",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e={project:this.$projectInput.val(),platform:this.$platformSelector.val(),agent:this.$agentSelector.val(),redirects:this.includeRedirects()?"1":"0"};if(this.specialRange&&t)e.range=this.specialRange.range;else{var i=this.getDates(!0),n=r(i,2);e.start=n[0],e.end=n[1]}return this.noLogScale&&(e.autolog="false"),e}},{key:"pushParams",value:function(){l(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"pushParams",this).call(this,"pages")}},{key:"setupSelect2",value:function(){var t=this,i={ajax:this.getArticleSelectorAjax(),tags:"no_autocomplete"===this.autocomplete,placeholder:$.i18n("article-placeholder"),maximumSelectionLength:10,minimumInputLength:1};l(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"setupSelect2",this).call(this,i),this.$select2Input.off("select2:open").on("select2:open",function(e){$(e.target).val()&&10===$(e.target).val().length&&$(".select2-search__field").one("keyup",function(){var e=$.i18n("massviews-notice",10,""+$.i18n("massviews")+"");t.toastInfo(e)})})}},{key:"getArticleSelectorAjax",value:function(){var t=this;return"no_autocomplete"!==this.autocomplete?{url:"https://"+this.project+".org/w/api.php",dataType:"jsonp",delay:200,jsonpCallback:"articleSuggestionCallback",data:function(e){return t.getSearchParams(e.term)},processResults:this.processSearchResults.bind(this),cache:!0}:null}},{key:"resetView",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];l(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"resetView",this).call(this,t,i),this.$outputList.html(""),$(".single-entity-ranking").html(""),$(".single-page-stats").html(""),$(".single-page-legend").html("")}},{key:"validateProject",value:function(){l(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"validateProject",this).call(this)&&(this.resetView(!0),this.focusSelect2())}},{key:"setupListeners",value:function(){l(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"setupListeners",this).call(this),this.$platformSelector.add(this.$agentSelector).add(this.$redirectsCheckbox).on("change",this.processInput.bind(this))}},{key:"consolidateRedirectData",value:function(t,e){var i=this,n=Object.keys(t);if(!this.includeRedirects()||!n.length||!e.entities.length)return e;var a={entities:n,labels:e.labels,datasets:new Array(n.length),errors:e.errors,fatalErrors:e.fatalErrors,promises:e.promises},o=this.getDateHeadings(!1),r=this.isMonthly()?"YYYY-MM":"YYYY-MM-DD";return Object.keys(t).forEach(function(n,s){t[n].map(function(t){return t.title}).forEach(function(t){var n=e.entities.indexOf(t);-1!==n&&e.datasets[n].map(function(e){var n=moment(e.timestamp,i.config.timestampFormat).format(r),l=o.indexOf(n),c=a.datasets[s]&&a.datasets[s][l]?a.datasets[s][l].views:0;e.article=t,e.views=e.views+c,a.datasets[s]=a.datasets[s]||new Array(o.length),a.datasets[s][l]=e})})}),a}},{key:"processInput",value:function(t,e){var i=this,n=this.beforeProcessInput(t);if(n){var a=function(t){i.getRedirects(t).done(function(e){Object.keys(e).forEach(function(i){t=t.concat(e[i].map(function(t){return t.title}))}),i.getPageViewsData(t.unique()).done(function(t){i.updateChart(i.consolidateRedirectData(e,t))})})};e?(this.removeEntity(e),this.getEditData(Object.keys(this.entityInfo.entities)).done(function(t){Object.assign(i.entityInfo.totals,t.totals),i.updateChart()})):this.initialQuery?(a(n),this.initialQuery=!1):this.getPageAndEditInfo(n.map(function(t){return encodeURIComponent(t)})).then(function(){a(n)})}}},{key:"showSingleEntityLegend",value:function(){var t=this,e=this.outputData[0],i=this.getTopviewsMonth(!1),n=i.format("YYYY")+"/"+i.format("MM")+"/all-days";$.ajax({url:"https://wikimedia.org/api/rest_v1/metrics/pageviews/top/"+this.project+"/"+this.$platformSelector.val()+"/"+n,dataType:"json"}).done(function(n){var a=n.items[0].articles.find(function(t){return t.article===e.label.score()});if(a){var o=t.daterangepicker.locale.monthNames[i.month()],r=""+$.i18n("most-viewed-pages").toLowerCase()+"";$(".single-entity-ranking").html($.i18n("most-viewed-rank",a.rank,r,o+" "+i.year()))}}).always(function(){$(".table-view").hide(),$(".single-page-stats").html("\n "+t.getPageLink(e.label)+"\n "+(e.assessment?"·\n"+t.getAssessmentBadge(e):"")+"\n ·\n \n "+t.$dateRangeSelector.val()+"\n \n ·\n "+$.i18n("num-pageviews",t.formatNumber(e.sum),e.sum)+"\n \n "),$(".single-page-legend").html(t.config.templates.chartLegend(t))})}},{key:"updateTable",value:function(){var t=this,e=this.beforeUpdateTable();if(e){$.isNumeric(this.outputData[0].num_edits)||$(".legend-block--revisions .legend-block--body").html(""+$.i18n("data-unavailable")+"");var i=!1,n=!1;e.forEach(function(e){e.protection!==$.i18n("none").toLowerCase()&&(i=!0),e.assessment&&e.assessment.length&&(n=!0),t.$outputList.append(t.config.templates.tableRow(t,e))});var a=e.reduce(function(t,e){return t+e.sum},0),o=e.filter(function(t){return"none"!==t.protection}).length,r={label:$.i18n("num-pages",this.formatNumber(e.length),e.length),sum:a,average:Math.round(a/e[0].data.filter(function(t){return null!==t}).length),num_edits:this.entityInfo.totals?this.entityInfo.totals.num_edits:null,num_users:this.entityInfo.totals?this.entityInfo.totals.num_users:null,length:e.reduce(function(t,e){return t+e.length},0),protection:$.i18n("num-protections",this.formatNumber(o),o),watchers:e.reduce(function(t,e){return t+(e.watchers||0)},0)};this.$outputList.append(this.config.templates.tableRow(this,r,!0)),$(".table-view--protection").toggle(i),$(".table-view--class").toggle(n),$(".table-view").show()}}},{key:"getSortProperty",value:function(t,e){switch(e){case"title":return t.label;case"class":return t.assessment;case"views":return Number(t.sum);case"average":return Number(t.average);case"edits":return Number(t.num_edits);case"editors":return Number(t.num_users);case"size":return Number(t.length);case"watchers":return Number(t.watchers)}}},{key:"getPageAndEditInfo",value:function(t){var e=this,i=$.Deferred();return this.getPageInfo(t).done(function(t){for(var n in t)t[n].missing&&!t[n].known&&(e.writeMessage(e.getPageLink(n)+": "+$.i18n("api-error-no-data")),delete t[n]);e.entityInfo={entities:t};var a=Object.keys(t);if(!a.length)return i.resolve(e.entityInfo);e.getEditData(a).done(function(t){a.forEach(function(i){var n=t.pages[i]||{},a=e.entityInfo.entities[i].protection||[];Array.isArray(a)&&(a=a.find(function(t){return"edit"===t.type})),n.protection=a?a.level:$.i18n("none").toLowerCase(),Object.assign(e.entityInfo.entities[i],n)}),e.entityInfo.totals=t.totals,i.resolve(e.entityInfo)}).fail(function(){i.resolve(e.entityInfo)})}).fail(function(){i.resolve({})}),i}},{key:"massviewsRedirectWithPagePile",value:function(t){var e=this,i=$.Deferred();return $.ajax({url:"https://pagepile.wmflabs.org/api.php",data:{action:"create_pile_with_data",wiki:this.dbName(this.project),data:t.join("\n")}}).success(function(t){var i=e.getParams();delete i.project,document.location="/massviews?overflow=1&"+$.param(i)+"&source=pagepile&target="+t.pile.id}).fail(function(){e.toastError($.i18n("auto-pagepile-error","PagePile",10)),i.resolve(t.slice(0,10))}),i}}]),e}(mix(u).with(h));$(function(){new p})},{"../shared/chart_helpers":4,"../shared/pv":7,"../shared/site_map":9,"./config":1}],3:[function(t,e,i){"use strict";function n(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var a=function(){function t(t,e){var i=[],n=!0,a=!1,o=void 0;try{for(var r,s=t[Symbol.iterator]();!(n=(r=s.next()).done)&&(i.push(r.value),!e||i.length!==e);n=!0);}catch(t){a=!0,o=t}finally{try{!n&&s.return&&s.return()}finally{if(a)throw o}}return i}return function(e,i){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o={chartLegend:function(t){var e=function(e){var i,o,r,s=arguments.length>1&&void 0!==arguments[1]&&arguments[1],l=void 0;if(s)l=t.formatNumber(e.num_edits);else{var c=t.getDates(),u=a(c,2),d=u[1] ;l=t.getHistoryLink(e.label,t.formatNumber(e.num_edits),t.isMonthly()?d.endOf("month"):d,e.num_edits)}var h=$.i18n("basic-information"),p=n({},$.i18n("pageviews"),t.formatNumber(e.sum));t.shouldBeLogarithmic(t.outputData.map(function(t){return t.data}))&&(p[$.i18n("median")]=t.formatNumber(e.median)),p[$.i18n($("#date-type-select").val()+"-average")]=t.formatNumber(e.average);var f=(r={},n(r,$.i18n("pageviews"),p),n(r,$.i18n("revisions"),(i={},n(i,$.i18n("edits"),l),n(i,$.i18n("editors"),t.formatNumber(e.num_users)),i)),n(r,h,(o={},n(o,$.i18n("watchers"),e.watchers?t.formatNumber(e.watchers):$.i18n("unknown")),n(o,$.i18n("size"),e.length?t.formatNumber(e.length):""),o)),r);if(!s){var g,m=e.assessment?t.getAssessmentBadge(e)+" "+e.assessment.upcase():"";Object.assign(f[h],(g={},n(g,$.i18n("protection"),e.protection),n(g,$.i18n("class"),m),g))}var v="";for(var k in f){v+="
\n
"+k+"

\n
";for(var y in f[k]){var w=f[k][y];w&&(v+='\n
\n '+y+":\n \n "+w+"\n \n
")}v+="
"}return s||(v+='\n "),v};if(1===t.outputData.length)return e(t.outputData[0]);var i=t.outputData.reduce(function(t,e){return t+e.sum},0),o=new Array(t.outputData[0].data.length).fill(0);return t.outputData.forEach(function(t){t.data.forEach(function(t,e){o[e]+=t})}),e({sum:i,median:t.getMedian(o),average:Math.round(i/t.outputData[0].data.filter(function(t){return null!==t}).length),num_edits:t.entityInfo.totals?t.entityInfo.totals.num_edits:null,num_users:t.entityInfo.totals?t.entityInfo.totals.num_users:null,watchers:t.outputData.reduce(function(t,e){return t+e.watchers||0},0),length:t.outputData.reduce(function(t,e){return t+e.length},0)},!0)},tableRow:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=i?"th":"td",o=i?"":'\n '+$.i18n("all-languages")+'\n •\n '+$.i18n("redirects")+"\n ",r=$.isNumeric(e.num_users)?t.formatNumber(e.num_users):"?",s=void 0;if($.isNumeric(e.num_edits)){s=i?t.formatNumber(e.num_edits):function(){var i=t.getDates(),n=a(i,2),o=n[1];return t.getHistoryLink(e.label,t.formatNumber(e.num_edits),t.isMonthly()?o.endOf("month"):o,e.num_edits)}()}else s="?";return $(".table-view--average .col-heading").text($.i18n($("#date-type-select").val()+"-average")),"\n \n <"+n+" class='table-view--color-col'>\n \n \n <"+n+" class='table-view--title'>"+(i?e.label:t.getPageLink(e.label))+"\n <"+n+" class='table-view--class'>"+t.getAssessmentBadge(e)+"\n <"+n+" class='table-view--views'>"+t.formatNumber(e.sum)+"\n <"+n+" class='table-view--average'>"+t.formatNumber(e.average)+"\n <"+n+" class='table-view-edits table-view--edit-data'>"+s+"\n <"+n+" class='table-view-editors table-view--edit-data'>"+r+"\n <"+n+" class='table-view--size'>"+(e.length?t.formatNumber(e.length):"?")+"\n <"+n+" class='table-view--protection'>"+e.protection+"\n <"+n+" class='table-view--watchers'>"+(e.watchers?t.formatNumber(e.watchers):$.i18n("unknown"))+"\n <"+n+">"+o+"\n \n "}};e.exports=o},{}],4:[function(t,e,i){"use strict";function n(t){if(Array.isArray(t)){for(var e=0,i=Array(t.length);e0&&void 0!==arguments[0]?arguments[0]:1;"true"===this.rememberChart?this.chartType=localStorage.getItem("pageviews-chart-preference")||this.config.defaults.chartType(t):this.chartType=this.config.defaults.chartType(t)}},{key:"destroyChart",value:function(){this.chartObj&&(this.chartObj.destroy(),$(".chart-legend").html(""))}},{key:"exportCSV",value:function(){var t="data:text/csv;charset=utf-8,Date,",e=[],i=[],n=this.getDateHeadings(!1);n.forEach(function(t,e){i[e]=[t]}),this.chartObj.data.datasets.forEach(function(t){var a='"'+t.label.replace(/"/g,'""')+'"';e.push(a),n.forEach(function(e,n){i[n].push(t.data[n])})}),t=t+e.join(",")+"\n",i.forEach(function(e){t+=e.join(",")+"\n"}),this.downloadData(t,"csv")}},{key:"exportJSON",value:function(){var t=this,e=[];this.chartObj.data.datasets.forEach(function(i,n){var a={page:i.label.replace(/"/g,'"').replace(/'/g,"'"),color:i.strokeColor,sum:i.sum,daily_average:Math.round(i.sum/t.numDaysInRange())};t.getDateHeadings(!1).forEach(function(t,e){a[t.replace(/\\/,"")]=i.data[e]}),e.push(a)});var i="data:text/json;charset=utf-8,"+JSON.stringify(e);this.downloadData(i,"json")}},{key:"exportPNG",value:function(){this.downloadData(this.chartObj.toBase64Image(),"png")}},{key:"fillInZeros",value:function(t,e,i){var n=this,o={};t.items.forEach(function(t){var e=moment(t.timestamp,n.config.timestampFormat).format("YYYYMMDD");o[e]=t}),t.items=[];for(var r=moment(e);r<=i;r.add(1,"day"))if(o[r.format("YYYYMMDD")])t.items.push(o[r.format("YYYYMMDD")]);else{var s=r.isSame(this.maxDate)||r.isSame(moment(this.maxDate).subtract(1,"days"));t.items.push(a({timestamp:r.format(this.config.timestampFormat)},this.isPageviews()?"views":"devices",s?null:0))}return t}},{key:"buildChartData",value:function(t,e,i){var n=this,a=void 0,o=this.isMonthly()?"YYYY-MM":"YYYY-MM-DD",r=this.getDateHeadings(!1);return a=i||(this.isPageviews()?"views":"mediaviews"===this.app?"requests":"metaviews"===this.app||this.isPagecounts()?"count":"devices"),t.map(function(t,i){var s=new Array(r.length),l=0,c=void 0,u=0;t.forEach(function(t){var e=t[a],i=void 0;i="metaviews"===n.app?t.date:moment(t.timestamp,n.config.timestampFormat).format(o),s[r.indexOf(i)]=e,l+=e||0,e>u&&(u=e),(void 0===c||e"+$.i18n("learn-more").toLowerCase()+"";e.toastWarn($.i18n("new-article-warning",n))}}),!u(c))return;var h="siteviews"===e.app?e.getSiteLink(c):e.getPageLink(c,e.project),p="pageviews";e.isUniqueDevices()?p="unique-devices":e.isPagecounts()&&(p="pagecounts"),d.errors.push(h+": "+$.i18n("api-error",p.upcase()+" API")+" - "+n)}}).always(function(){++n===o&&(e.pageViewsData=d,i.resolve(d),r.length&&e.writeMessage($.i18n("api-error-timeout","
    "+r.map(function(t){return"
  • "+e.getPageLink(t,e.project.escape())+"
  • "}).join("")+"
")))})};return t.forEach(function(t){return h(t)}),i}},{key:"getPermaLink",value:function(){var t=this.getParams(!1);return delete t.range,t}},{key:"isMonthly",value:function(){return"monthly"===$("#date-type-select").val()}},{key:"isLogarithmic",value:function(){return this.$logarithmicCheckbox.is(":checked")&&this.isLogarithmicCapable()}},{key:"isLogarithmicCapable",value:function(){return["line","bar"].includes(this.chartType)}},{key:"printChart",value:function(){var t=window.open();t.document.write(''),t.print(),t.close()}},{key:"resetView",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];try{this.destroyChart(),t&&this.resetSelect2()}catch(t){}finally{this.stopSpinny(),$("body").addClass("initial"),this.$chart.hide(),e&&this.clearMessages()}}},{key:"setChartPointDetectionRadius",value:function(){if("line"===this.chartType){var t=this.getDateHeadings().length;Chart.defaults.global.elements.point.hitRadius=t>50?3:t>30?5:t>20?10:30}}},{key:"shouldBeLogarithmic",value:function(t){var e;if(!this.isLogarithmicCapable()||this.noLogScale)return!1;var i=[];t.forEach(function(t){i.push(t.map(function(t){return t||0}))});var a=Math.max.apply(Math,n((e=[]).concat.apply(e,i)));if(a<=10)return!1;var o=!1;return i.forEach(function(t){t.push(a);var e=t.reduce(function(t,e){return t+e}),i=e/t.length,n=0;if(t.forEach(function(t){return n+=t?t*Math.log(t/i):0}),n/e>.5)return o=!0}),o}},{key:"setupSelect2",value:function(t){var e=this;this.$select2Input.select2(t),this.$select2Input.off("select2:select").on("select2:select",this.processInput.bind(this)),this.$select2Input.off("select2:unselect").on("select2:unselect",function(t){e.processInput(!1,t.params.data.text),e.$select2Input.trigger("select2:close")})}},{key:"setupDateRangeSelector",value:function(){var t=this;if(u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"setupDateRangeSelector",this).call(this),this.isChartApp()){var i=this.$dateRangeSelector;$(".date-latest a").on("click",function(e){var i=$(e.target).data("value");t.setSpecialRange("latest-"+i),$(".latest-text").text($.i18n("latest-days",i))}),i.on("change",function(e){t.processInput(),$(".latest-text").text($.i18n("latest")),t.specialRange&&t.specialRange.value!==e.target.value&&(t.specialRange=null)})}}},{key:"setupMonthSelector",value:function(t,e){var i=this;this.monthDatepicker&&this.monthDatepicker.destroy(),$(".month-selector").datepicker({autoclose:!0,format:"M yyyy",viewMode:"months",minViewMode:"months",startDate:this.minDate.toDate(),endDate:this.maxMonth,disableTouchKeyboard:!0}),t=t||this.initialMonthStart,e=e||this.maxMonth;var n=function(t,e){return ti.maxMonth&&(e=i.maxMonth),(ee)&&(t=e),[t,e]},a=n(t,e),o=l(a,2);t=o[0],e=o[1],this.monthStartDatepicker.setDate(t),this.monthEndDatepicker.setDate(e),this.daterangepicker.startDate=moment(t).startOf("month"),this.daterangepicker.setEndDate(moment(e).endOf("month"));var r=function(){var t=n(i.monthStartDatepicker.getDate(),i.monthEndDatepicker.getDate()),e=l(t,2),a=e[0],o=e[1];i.daterangepicker.startDate=moment(a).startOf("month"),i.daterangepicker.setEndDate(moment(o).endOf("month"))};$(".month-selector-start").on("hide",r),$(".month-selector-end").on("hide",r)}},{key:"getDates",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=void 0,i=void 0,n="YYYY-MM-DD";return this.isMonthly()?(e=moment(this.monthStartDatepicker.getDate()),i=moment(this.monthEndDatepicker.getDate()),n="YYYY-MM"):(e=this.daterangepicker.startDate,i=this.daterangepicker.endDate),t&&(e=e.format(n),i=i.format(n)),[e,i]}},{key:"beforeUpdateTable",value:function(){var t=this;if(1===this.outputData.length)return this.showSingleEntityLegend(),!1;$(".single-entity-stats").html(""),["pageviews","siteviews"].includes(this.app)&&$(".single-entity-ranking").html(""),this.$outputList.html("");var e=this.outputData.slice().sort(function(e,i){var n=t.getSortProperty(e,t.sort),a=t.getSortProperty(i,t.sort);return na?-t.direction:0});$(".sort-link .glyphicon").removeClass("glyphicon-sort-by-alphabet-alt glyphicon-sort-by-alphabet").addClass("glyphicon-sort");var i=1===parseInt(this.direction,10)?"glyphicon-sort-by-alphabet-alt":"glyphicon-sort-by-alphabet";return $(".sort-link--"+this.sort+" .glyphicon").addClass(i).removeClass("glyphicon-sort"),e}},{key:"updateChart",value:function(t){var e=this;$(".chart-legend").html("");var i=t?t.entities:this.$select2Input.val();if(!t||!this.showErrors(t)){if(!i.length)return this.stopSpinny();if(1===i.length?$(".multi-page-chart-node").hide():$(".multi-page-chart-node").show(),t&&(this.outputData=this.buildChartData(t.datasets,i)),"true"===this.autoLogDetection){var a=this.shouldBeLogarithmic(this.outputData.map(function(t){return t.data}));this.$logarithmicCheckbox.prop("checked",a),$(".begin-at-zero").toggleClass("disabled",a)}this.outputData=this.setColorsAndLogValues(this.outputData);var o=Object.assign({scales:{}},this.config.chartConfig[this.chartType].opts,this.config.globalChartOpts);this.isLogarithmic()&&(o.scales=Object.assign({},o.scales,{yAxes:[{type:"logarithmic",ticks:{callback:function(t,i,n){var a=t/Math.pow(10,Math.floor(Chart.helpers.log10(t)));return 1===a||2===a||5===a||0===i||i===n.length-1?e.formatNumber(t):""}}}]})),this.stopSpinny();try{$(".chart-container").html("").append(""),this.setChartPointDetectionRadius();var r=this.$chart[0].getContext("2d"),s=Math.min.apply(Math,n(this.outputData.map(function(t){return t.min})));if(this.config.linearCharts.includes(this.chartType)){var l={labels:this.getDateHeadings(),datasets:this.outputData,dateFormat:this.dateFormat};"radar"===this.chartType?o.scale.ticks.beginAtZero=0===s||$(".begin-at-zero-option").is(":checked"):(o.scales.yAxes[0].ticks.beginAtZero=0===s||$(".begin-at-zero-option").is(":checked"),o.zoom=["pageviews","siteviews","mediaviews"].includes(this.app)&&this.numDaysInRange()>1&&!this.isMonthly()),$(".show-labels-option").is(":checked")?o=this.showPointLabels(o):(delete o.animation.onComplete,delete o.animation.onProgress),this.chartObj=new Chart(r,{type:this.chartType,data:l,options:o})}else delete o.animation.onComplete,delete o.animation.onProgress,this.chartObj=new Chart(r,{type:this.chartType,data:{labels:this.outputData.map(function(t){return t.label}),datasets:[{data:this.outputData.map(function(t){return t.value}),backgroundColor:this.outputData.map(function(t){return t.backgroundColor}),hoverBackgroundColor:this.outputData.map(function(t){return t.hoverBackgroundColor}),averages:this.outputData.map(function(t){return t.average})}]},options:o})}catch(t){return this.showErrors({errors:[],fatalErrors:[t]})}$(".chart-legend").html(this.chartObj.generateLegend()),$(".data-links").removeClass("invisible"),["metaviews","pageviews","siteviews","mediaviews"].includes(this.app)&&this.updateTable()}}},{key:"showPointLabels",value:function(t){var e=this;if(["bar","line"].includes(this.chartType)){var i=function(t){return t.textAlign="center",t.textBaseline="bottom",t.fillStyle="#444",t.font=Chart.helpers.fontString(Chart.defaults.global.defaultFontSize,Chart.defaults.global.defaultFontStyle,Chart.defaults.global.defaultFontFamily),t},n=function(t,n){var a=t.chart,o=i(a.ctx);Chart.helpers.each(t.data.datasets.forEach(function(i,r){var s=a.controller.getDatasetMeta(r);Chart.helpers.each(s.data.forEach(function(t,a){o.fillStyle="rgba(68,68,68,"+n+")";var r=i._meta[Object.keys(i._meta)[0]].data[a]._yScale.maxHeight,s=(r-t._model.y)/r>=.93?t._model.y+5:t._model.y-10;o.fillText(e.n(i.data[a]),t._model.x,s)}),t)}),t)};return t.animation.onComplete=function(){n(this,1)},t.animation.onProgress=function(t){var e=t.animationObject;n(this,e.currentStep/e.numSteps)},t}}},{key:"showErrors",value:function(t){var e=this;if(t.fatalErrors.length){this.resetView(!0);var i=t.fatalErrors.unique();return this.showFatalErrors(i),!0}return t.errors.length&&(!t.entities||t.errors.length!==t.entities.length&&t.entities.length||this.resetView(),t.errors.unique().forEach(function(t){return e.writeMessage(t)})),!1}},{key:"setupListeners",value:function(){var t=this;u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"setupListeners",this).call(this),$(".clear-pages").on("click",function(){t.resetView(!0),t.focusSelect2()}),$("#date-type-select").on("change",function(e){$(".date-selector").toggle("daily"===e.target.value),$(".month-selector").toggle("monthly"===e.target.value),"monthly"===e.target.value?(t.specialRange=null,t.setupMonthSelector(),t.daterangepicker.setStartDate(t.monthStartDatepicker.getDate()),t.daterangepicker.setEndDate(moment(t.monthEndDatepicker.getDate()).endOf("month"))):t.processInput()})}},{key:"monthDatepicker",get:function(){return this.cachedElement(".month-selector").data("datepicker")}},{key:"monthStartDatepicker",get:function(){return this.cachedElement(".month-selector-start").data("datepicker")}},{key:"monthEndDatepicker",get:function(){return this.cachedElement(".month-selector-end").data("datepicker")}},{key:"$outputList",get:function(){return this.cachedElement(".output-list")}},{key:"$logarithmicCheckbox",get:function(){return this.cachedElement("#logarithmic-checkbox")}},{key:"$beginAtZeroCheckbox",get:function(){return this.cachedElement(".begin-at-zero")}},{key:"$showLabelsCheckbox",get:function(){return this.cachedElement(".show-labels-option")}}]),e}(t)};e.exports=d},{"./zoom_plugin":10}],5:[function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var a=function(){function t(t,e){for(var i=0;i":">",'"':""","'":"'","/":"/"};return this.replace(/[&<>"'\/]/g,function(e){return t[e]})},Array.prototype.unique=function(){return this.filter(function(t,e,i){return i.indexOf(t)===e})},window.mix=function(t){return new o(t)};var o=function(){function t(e){n(this,t),this.superclass=e}return a(t,[{key:"with",value:function(){for(var t=arguments.length,e=Array(t),i=0;ithis.length)&&-1!==this.indexOf(t,e)}),"function"!=typeof Object.assign&&function(){Object.assign=function(t){if(void 0===t||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;i>>0,n=arguments[1],a=void 0,o=0;o>>0,n=arguments[1],a=n>>0,o=a<0?Math.max(i+a,0):Math.min(a,i),r=arguments[2],s=void 0===r?i:r>>0,l=s<0?Math.max(i+s,0):Math.min(s,i);oThis is the staging environment!

\n

To use the staging app, append debug=true to the URL

\n

Otherwise, please update your links to use\n https://"+location.host+s+"\n

\n

\n Redirecting you to the production "+document.title+" in\n 10...\n

\n ");var l=10;return setInterval(function(){if(0==--l)return document.location=s;$(".countdown").text(l)},1e3),o(i)}return i.debug?window.app=i:i.splash(),/\/(faq|url_structure)\/?$/.test(document.location.pathname)?o(i):(i.loadTranslations().then(function(){}),$.extend($.i18n.parser.emitter,{link:function(t){return''+t[0].escape()+""}}),i.setupNavCollapsing(),toastr.options={closeButton:!0,debug:location.host.includes("localhost"),newestOnTop:!1,progressBar:!1,positionClass:"toast-top-center",preventDuplicates:!0,onclick:null,showDuration:"300",hideDuration:"1000",timeOut:"5000",extendedTimeOut:"3000",showEasing:"swing",hideEasing:"linear",showMethod:"fadeIn",hideMethod:"fadeOut",toastClass:"alert",iconClasses:{error:"alert-danger",info:"alert-info",success:"alert-success",warning:"alert-warning"}},i)}return r(e,t),l(e,[{key:"loadTranslations",value:function(){var t=n({},i18nLang,"/messages/"+i18nLang+".json");return"en"!==i18nLang&&($.i18n.fallbacks[i18nLang]&&$.i18n.fallbacks[i18nLang].forEach(function(e){t[e]="/messages/"+e+".json"}),t.en="/messages/en.json"),$.i18n({locale:i18nLang}).load(t).then(this.initialize.bind(this))}},{key:"setupNavCollapsing",value:function(){var t=$(window).width(),e=$(".nav-buttons").outerWidth(),i=$(".home-link").outerWidth(),n=$(".interapp-links").outerWidth();if(!(t<768)){n+e+i>t&&$(".interapp-links--more").removeClass("hidden");for(var a=$(".interapp-links--entry").length;a>0&&n+e+i>t;){var o=$(".interapp-links > .interapp-links--entry:not(.active)").last().remove();o.addClass("interapp-links--more-entry"),$(".interapp-links--more .dropdown-menu").append(o),n=$(".interapp-links").outerWidth()+i,a--}}}},{key:"toast",value:function(t){var e=t.title?""+t.title+" ":"";t.message=e+t.message,t=Object.assign({level:"warning",timeout:10},t),toastr.options.timeOut=1e3*t.timeout,toastr[t.level](t.message)}},{key:"toastSuccess",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10 ;this.toast({message:t,level:"success",timeout:e})}},{key:"toastInfo",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;this.toast({message:t,level:"info",timeout:e})}},{key:"toastWarn",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;this.toast({message:t,level:"warning",timeout:e})}},{key:"toastError",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;this.toast({message:t,level:"error",timeout:e})}},{key:"addInvalidParamNotice",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"error",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"/url_structure";if(!this.muteValidations){t=t.replace(/\.+$/,"")+".";var n=""+$.i18n("documentation").toLowerCase()+"";this.toast({message:t+" "+$.i18n("param-error-see-docs",n),level:e,title:$.i18n("invalid-params")})}}},{key:"validateDateRange",value:function(t){if(t.range)this.setSpecialRange(t.range)||(this.addInvalidParamNotice($.i18n("param-error-3","range")),this.setSpecialRange(this.config.defaults.dateRange));else if(t.start){var e=/\d{4}-\d{2}-\d{2}$/;t.start&&/^\d{4}-\d{2}$/.test(t.start)&&(t.start=t.start+"-01",t.monthly=!0),t.end&&/^\d{4}-\d{2}$/.test(t.end)?t.end=moment(t.end+"-01").endOf("month").format("YYYY-MM-DD"):t.monthly=!1;var i=void 0,n=void 0;if(t.start&&e.test(t.start))i=moment(t.start);else{if("earliest"!==t.start)return this.addInvalidParamNotice($.i18n("param-error-3","start")),!1;i=this.minDate}if(t.end&&e.test(t.end))n=moment(t.end);else{if("latest"!==t.end)return this.addInvalidParamNotice($.i18n("param-error-3","end")),!1;n=this.config.maxDate}if(i>n)return this.addInvalidParamNotice($.i18n("param-error-2")),!1;ithis.maxDate&&(this.addInvalidParamNotice($.i18n("param-error-4"),"warning"),n=this.maxDate),t.monthly&&["pageviews","siteviews"].includes(this.app)?($("#date-type-select").val("monthly"),$(".date-selector").hide(),$(".month-selector").show(),this.monthStart=moment(t.start).toDate(),this.monthEnd=moment(t.end).startOf("month").toDate(),this.setupMonthSelector(this.monthStart,this.monthEnd)):(this.daterangepicker.startDate=i,this.daterangepicker.setEndDate(n))}else this.setSpecialRange(this.config.defaults.dateRange);return!0}},{key:"clearMessages",value:function(){$(".message-container").html("")}},{key:"dbName",value:function(t){return Object.keys(u).find(function(e){return u[e]===t.replace(/\.org$/,"")+".org"})}},{key:"downloadData",value:function(t,e){var i=encodeURI(t),n=document.createElement("a");"string"==typeof n.download?(document.body.appendChild(n),n.download=this.getExportFilename()+"."+e,n.href=i,n.click(),document.body.removeChild(n)):window.open(i)}},{key:"fillInSettings",value:function(){var t=this;$.each($("#settings-modal input"),function(e,i){"checkbox"===i.type?i.checked="true"===t[i.name]:i.checked=t[i.name]===i.value})}},{key:"focusSelect2",value:function(){$(".select2-selection").trigger("click"),$(".select2-search__field").focus()}},{key:"getDateHeadings",value:function(){for(var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=[],i="monthly"===$("#date-type-select").val(),n=moment(this.daterangepicker.endDate).add(i?0:1,"day"),a=i?"month":"day",o=i?"YYYY-MM":"YYYY-MM-DD",r=moment(this.daterangepicker.startDate);r.isBefore(n);r.add(1,a))t?e.push(r.format(this.dateFormat)):e.push(r.format(o));return e}},{key:"getExpandedPageURL",value:function(t){return"//"+this.project+".org/w/index.php?title="+encodeURIComponent(t.score()).replace(/'/,escape)}},{key:"getHistoryLink",value:function(t,e,i,n){var a=this.getExpandedPageURL(t)+"&action=history";return i&&n&&(a+="&offset="+moment(i).format("YYYYMMDD")+"235959&limit="+(n>500?500:n)),''+e+""}},{key:"getExportFilename",value:function(){var t=this.daterangepicker.startDate.startOf("day").format("YYYYMMDD"),e=this.daterangepicker.endDate.startOf("day").format("YYYYMMDD");return this.app+"-"+t+"-"+e}},{key:"getPageLink",value:function(t,e,i,n){var a='target="_blank" href="'+this.getPageURL(t,e)+(n?"#"+n.score():"")+'"';if(this.isMultilangProject(e)){var o=this.getProjectLang(e);a+=" lang="+o+' dir="'+(this.config.rtlLangs.includes(o)?"rtl":"ltr")+'"'}return'"+(i||t.descore().escape())+""}},{key:"getPageURL",value:function(t){return"https://"+(arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.project).replace(/\.org$/,"").escape()+".org/wiki/"+encodeURIComponent(t.score()).replace(/%3A|%2F/g,unescape)}},{key:"getSiteLink",value:function(t){return''+t+""}},{key:"getProjectLang",value:function(t){return(t||this.project).split(".")[0]}},{key:"getBugReportURL",value:function(t){return"https://meta.wikimedia.org/w/index.php?title=Talk:Pageviews_Analysis&action=edit§ion=new&preloadtitle="+this.app.upcase()+" bug report"}},{key:"fetchSiteInfo",value:function(t){var e=this;t=t.replace(/\.org$/,"");var i=$.Deferred(),n="pageviews-siteinfo-"+t;return this.siteInfo[t]?i.resolve(this.siteInfo):(simpleStorage.hasKey(n)?(this.siteInfo[t]=simpleStorage.get(n),i.resolve(this.siteInfo)):$.ajax({url:"https://"+t+".org/w/api.php",data:{action:"query",meta:"siteinfo",siprop:"general|namespaces",format:"json"},dataType:"jsonp"}).done(function(a){e.siteInfo[t]=a.query,simpleStorage.set(n,e.siteInfo[t],{TTL:6048e5}),i.resolve(e.siteInfo)}).fail(function(t){i.reject(t)}),i)}},{key:"getEditData",value:function(t){var e=$.Deferred();return $.ajax({url:"/"+this.app+"/api.php",data:{pages:t.join("|"),project:this.project+".org",start:this.daterangepicker.startDate.format("YYYY-MM-DD"),end:this.daterangepicker.endDate.format("YYYY-MM-DD"),totals:!0,ttl:this.config.cacheTime},timeout:8e3}).done(function(t){return e.resolve(t)}).fail(function(){var i={};t.forEach(function(t){return i[t]={}}),e.resolve({pages:i})}),e}},{key:"getAssessmentBadge",value:function(t){return t.assessment?t.assessment_img?""+t.assessment+"":t.assessment:""}},{key:"getSiteInfo",value:function(t){return this.siteInfo[t.replace(/\.org$/,"")]}},{key:"getTopviewsMonth",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=t?"startDate":"endDate",i=moment(this.daterangepicker[e]);return i.month()!==moment().month()&&i.month()!==moment().subtract(2,"days").month()||i.subtract(1,"month"),i}},{key:"getTopviewsMonthURL",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getTopviewsMonth(),i={project:t,platform:"all-access",date:e.startOf("month").format("YYYY-MM")};return"/topviews?"+$.param(i)}},{key:"hashCode",value:function(t){return t.split("").reduce(function(t,e){return(t<<5)-t+e.charCodeAt(0)},0)}},{key:"isChartApp",value:function(){return!this.isListApp()}},{key:"isListApp",value:function(){return["langviews","massviews","redirectviews","userviews"].includes(this.app)}},{key:"isPageviews",value:function(){return"pageviews"===this.app||"pageviews"===this.$dataSourceSelector.val()}},{key:"isUniqueDevices",value:function(){return"unique-devices"===this.$dataSourceSelector.val()}},{key:"isPagecounts",value:function(){return"pagecounts"===this.$dataSourceSelector.val()}},{key:"isMultilangProject",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.project;return new RegExp(".*?\\.("+this.multilangProjects.join("|")+")").test(t)}},{key:"includeRedirects",value:function(){return"redirectviews"===this.app||this.$redirectsCheckbox[0].checked}},{key:"massApi",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"continue",n=arguments[3],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.config.apiLimit;/\.org$/.test(e)||(e+=".org");var o=$.Deferred(),r={pages:[]};return function s(l){var c=Object.assign({action:"query",format:"json",formatversion:"2"},t);l&&(c[i]=l),$.ajax({url:"https://"+e+"/w/api.php",jsonp:"callback",dataType:"jsonp",data:c}).done(function(t){if(t.error||!t.query)return o.resolve(t);var e=void 0;"function"==typeof n?(r.pages=r.pages.concat(n(t.query)),e=r.pages.length>=a):(t.query.pages&&(r.pages=r.pages.concat(t.query.pages)),t.query[n]&&(r[n]=(r[n]||[]).concat(t.query[n])),e=r.pages.length>=a||r[n].length>=a),!e&&t.continue&&t.continue[i]?setTimeout(function(){s(t.continue[i])},100):(t.continue&&(r.continue=!0),o.resolve(r))}).fail(function(t){o.reject(t)})}(),o}},{key:"n",value:function(t){return Number(t).toLocaleString()}},{key:"getPageInfo",value:function(t){var e=$.Deferred();try{t=t.map(function(t){return encodeURIComponent(decodeURIComponent(t))})}catch(t){}return $.ajax({url:"https://"+this.project+".org/w/api.php?action=query&prop=info&inprop=protection|watchers&formatversion=2&format=json&titles="+t.join("|"),dataType:"jsonp"}).then(function(i){i.query.normalized&&i.query.normalized.forEach(function(e){t[t.indexOf(encodeURIComponent(e.from))]=encodeURIComponent(e.to)});var n={};return t.forEach(function(t){try{t=decodeURIComponent(t)}catch(t){}n[t]=i.query.pages.find(function(e){return e.title===t})}),e.resolve(n)})}},{key:"getRedirects",value:function(t){var e=this,i=$.Deferred(),n=(Array.isArray(t)?t:[t]).join("|");return this.includeRedirects()&&n.length?($.ajax({url:"https://"+this.project+".org/w/api.php",jsonp:"callback",dataType:"jsonp",data:{action:"query",format:"json",formatversion:2,prop:"redirects",rdprop:"title|fragment",rdlimit:500,titles:n}}).done(function(t){if(t.error)return e.setState("initial",function(){e.writeMessage($.i18n("api-error","Redirect API")+": "+t.error.info.escape())});var n={};return t.query.pages.forEach(function(t){n[t.title]=[{title:t.title}].concat(t.redirects||[])}),i.resolve(n)}),i):i.resolve({})}},{key:"numDaysInRange",value:function(){return this.daterangepicker.endDate.diff(this.daterangepicker.startDate,"days")+1}},{key:"parseQueryString",value:function(t){for(var e=location.search.slice(1).replace(/\+/g,"%20").replace(/%7C/g,"|"),i=e.split("&"),n={},a=0;a0&&void 0!==arguments[0])||arguments[0];this.$select2Input.data("select2")&&(this.$select2Input.off("change"),this.$select2Input.select2("val",null),this.$select2Input.select2("data",null),this.$select2Input.select2("destroy")),t&&this.setupSelect2()}},{key:"rgba",value:function(t,e){return t.replace(/,\s*\d\)/,", "+e+")")}},{key:"saveSetting",value:function(t,e){this[t]=e,localStorage.setItem("pageviews-settings-"+t,e)}},{key:"saveSettings",value:function(){var t=this,e="no_autocomplete"===this.autocomplete;$.each($("#settings-modal input"),function(e,i){"checkbox"===i.type?t.saveSetting(i.name,i.checked?"true":"false"):i.checked&&t.saveSetting(i.name,i.value)}),"topviews"!==this.app&&(this.daterangepicker.locale.format=this.dateFormat,this.daterangepicker.updateElement(),this.setupSelect2Colors(),"no_autocomplete"===this.autocomplete!==e&&this.resetSelect2(),"true"===this.beginAtZero&&$(".begin-at-zero-option").prop("checked",!0),"true"===this.alwaysRedirects&&this.$redirectsCheckbox.prop("checked",!0)),this.processInput(!0)}},{key:"setSelect2Defaults",value:function(t){var e=this;return t.forEach(function(t){var i=$("
").text(t).html();$("").appendTo(e.$select2Input)}),this.$select2Input.select2("val",t),this.$select2Input.trigger("select2:select"),t}},{key:"setSpecialRange",value:function(t){var e=Object.keys(this.config.specialRanges).indexOf(t),i=void 0,n=void 0,a=void 0;if(t.includes("latest-")){a=parseInt(t.replace("latest-",""),10)||20;var o=this.config.specialRanges.latest(a),r=s(o,2);i=r[0],n=r[1]}else{if(!(e>=0))return;var l="latest"===t?this.config.specialRanges.latest():this.config.specialRanges[t],c=s(l,2);i=c[0],n=c[1],$(".daterangepicker .ranges li").eq(e).trigger("click")}return this.specialRange={range:t,value:i.format(this.dateFormat)+" - "+n.format(this.dateFormat)},this.daterangepicker.startDate=i,this.daterangepicker.setEndDate(n),$(".latest-text").text(a?$.i18n("latest-days",a):$.i18n("latest")),this.specialRange}},{key:"setupSelect2Colors",value:function(){var t=this;return this.colorsStyleEl&&this.colorsStyleEl.remove(),this.colorsStyleEl=document.createElement("style"),this.colorsStyleEl.appendChild(document.createTextNode("")),document.head.appendChild(this.colorsStyleEl),this.config.colors.forEach(function(e,i){t.colorsStyleEl.sheet.insertRule(".select2-selection__choice:nth-of-type("+(i+1)+") { background: "+e+" !important }",0)}),this.colorsStyleEl.sheet}},{key:"setupListeners",value:function(){var t=this;$("a[href='#']").on("click",function(t){return t.preventDefault()}),$(".download-csv").on("click",this.exportCSV.bind(this)),$(".download-json").on("click",this.exportJSON.bind(this)),this.$projectInput.on("focusin",function(){this.dataset.value=this.value}),this.$projectInput.on("change",function(){return t.validateProject()}),$(".permalink").on("click",function(e){$(".permalink-copy").val($(".permalink").prop("href"))[0].select();try{document.execCommand("copy"),t.toastSuccess($.i18n("permalink-copied")),e.preventDefault(),document.activeElement.blur()}catch(e){}}),$(".sort-link").on("click",function(e){var i=$(e.currentTarget).data("type");t.direction=t.sort===i?-t.direction:1,t.sort=i,t.isChartApp()?t.updateTable():t.renderData()})}},{key:"setupSettingsModal",value:function(){this.fillInSettings(),$(".save-settings-btn").on("click",this.saveSettings.bind(this)),$(".cancel-settings-btn").on("click",this.fillInSettings.bind(this))}},{key:"setupDateRangeSelector",value:function(){var t=this,e={},i=void 0;this.isPagecounts()?(e=n({},$.i18n("all-time"),[this.config.minDatePagecounts,this.config.maxDatePagecounts]),i=moment(this.config.maxDatePagecounts).subtract(this.config.daysAgo,"days")):(Object.keys(this.config.specialRanges).forEach(function(i){["latest","current","last-week"].includes(i)||(e[$.i18n(i)]=t.config.specialRanges[i])}),i=moment().subtract(this.config.daysAgo,"days"));var a={locale:{format:this.dateFormat,applyLabel:$.i18n("apply"),cancelLabel:$.i18n("cancel"),customRangeLabel:$.i18n("custom-range"),daysOfWeek:[$.i18n("su"),$.i18n("mo"),$.i18n("tu"),$.i18n("we"),$.i18n("th"),$.i18n("fr"),$.i18n("sa")],monthNames:[$.i18n("january"),$.i18n("february"),$.i18n("march"),$.i18n("april"),$.i18n("may"),$.i18n("june"),$.i18n("july"),$.i18n("august"),$.i18n("september"),$.i18n("october"),$.i18n("november"),$.i18n("december")]},startDate:i,minDate:this.minDate,maxDate:this.maxDate,ranges:e};if(this.config.dateLimit&&(a.dateLimit={days:this.config.dateLimit}),this.daterangepicker){this.$dateRangeSelector.data("daterangepicker").remove();var o=this.$dateRangeSelector.remove();$(".date-selector").append(o)}this.$dateRangeSelector.daterangepicker(a),this.isPagecounts()||"mediaviews"===this.app||$(".daterangepicker").append($("
").addClass("daterange-notice").html($.i18n("date-notice",$.i18n("pageviews"===this.app?"title":this.app+"-title")))),$(".daterangepicker .ranges li").off("click").on("click",function(e){if(e.target.innerText===$.i18n("custom-range"))return t.specialRange=null,t.daterangepicker.clickApply();var i=t.daterangepicker.container,n=i.find(".daterangepicker_input input"),a=Object.keys(t.config.specialRanges).find(function(t){return $.i18n(t)===e.target.innerText});t.specialRange={range:a,value:n[0].value+" - "+n[1].value}}),this.$dateRangeSelector.off("apply.daterangepicker").on("apply.daterangepicker",function(e,i){i.chosenLabel===$.i18n("custom-range")&&(t.specialRange=null,t.daterangepicker.updateElement())})}},{key:"showFatalErrors",value:function(t){var e=this;if(this.resetView(),t.forEach(function(t){e.writeMessage(""+$.i18n("fatal-error")+": "+t+"")}),this.debug)throw t[0];t&&t[0]&&t[0].stack&&this.toastError("\n "+$.i18n("fatal-error")+": "+$.i18n("error-please-report",this.getBugReportURL(t))+"\n ",0)}},{key:"splash",value:function(){var t="background: #eee; color: #555; padding: 4px; font-family:monospace";console.log("%c ___ __ _ _ ",t),console.log("%c | _ \\ __ _ / _` | ___ __ __ (_) ___ __ __ __ ___ ",t),console.log("%c | _/ / _` | \\__, | / -_) \\ V / | | / -_) \\ V V / (_-< ",t),console.log("%c _|_|_ \\__,_| |___/ \\___| _\\_/_ _|_|_ \\___| \\_/\\_/ /__/_ ",t),console.log('%c _| """ |_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""| ',t),console.log("%c \"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-' ",t),console.log("%c ___ _ _ _ _ ",t),console.log("%c o O O / \\ _ _ __ _ | || | | | ___ (_) ___ ",t),console.log("%c o | - | | ' \\ / _` | \\_, | | | (_-< | | (_-< ",t),console.log("%c TS__[O] |_|_| |_||_| \\__,_| _|__/ _|_|_ /__/_ _|_|_ /__/_ ",t),console.log('%c {======|_|"""""|_|"""""|_|"""""|_| """"|_|"""""|_|"""""|_|"""""|_|"""""| ',t),console.log("%c ./o--000'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-'\"`-0-0-' ",t),console.log("%c ",t),console.log("%c Copyright © "+(new Date).getFullYear()+" MusikAnimal, Kaldari, Marcel Ruiz Forns ",t)}},{key:"startSpinny",value:function(){var t=this;$("body").addClass("loading"),setTimeout(function(){return document.activeElement.blur()}),clearTimeout(this.timeout),this.timeout=setTimeout(function(){t.resetView(),t.toastError("\n "+$.i18n("fatal-error")+":\n "+$.i18n("error-timed-out")+"\n "+$.i18n("error-please-report",t.getBugReportURL())+"\n ")},6e4)}},{key:"stopSpinny",value:function(){$("body").removeClass("loading initial"),clearTimeout(this.timeout)}},{key:"underscorePageNames",value:function(t){return t.map(function(t){return t.score()})}},{key:"updateInterAppLinks",value:function(){var t=this;$(".interapp-link").each(function(e,i){var n=i.href.split("?")[0];i.classList.contains("interapp-link--siteviews")?i.href=n+"?sites="+t.project.escape()+".org":i.href=n+"?project="+t.project.escape()+".org"})}},{key:"triggerUpdate",value:function(){this.isChartApp()?this.updateChart():this.renderData()}},{key:"getEntities",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=[];return this.$select2Input.length?e=this.$select2Input.select2("val")||[]:this.$sourceInput&&this.$sourceInput.length?e=[this.$sourceInput.val()]:console.warn("["+this.app+"] No select2 or source input found."),t&&(e=e.map(function(t){return t.score()})),e}},{key:"pushParams",value:function(t,e){if(e)return void history.replaceState(null,document.title,location.href.split("?")[0]);var i=this.getEntities().join("|").replace(/[&%?+]/g,encodeURIComponent);window.history&&window.history.replaceState&&window.history.replaceState({},document.title,"?"+$.param(this.getParams())+"&"+t+"="+i),$(".permalink").prop("href","?"+$.param(this.getPermaLink())+"&"+t+"="+i.replace(/\|/g,escape))}},{key:"validateParams",value:function(t){var e=this;return this.config.validateParams.forEach(function(i){"project"===i&&t.project&&(t.project=t.project.replace(/^www\./,""));var n=e.config.defaults[i],a=t[i];void 0===n||e.config.validParams[i].includes(a)||(a&&e.addInvalidParamNotice($.i18n("param-error-3",i)),t[i]=n)}),t}},{key:"validateProject",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.$projectInput[0],i=e.value.replace(/^www\./,""),n=!1;return t&&!this.isMultilangProject()?(this.toastWarn($.i18n("invalid-lang-project",""+i.escape()+"")),i=e.dataset.value):d.includes(i)?(this.updateInterAppLinks(),n=!0):(this.toastWarn($.i18n("invalid-project",""+i.escape()+"")),i=e.dataset.value),n&&this.$projectInput.trigger("updated"),e.value=i,n}},{key:"writeMessage",value:function(t){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&this.clearMessages(),$(".message-container").append("
"+t+"
")}},{key:"dateFormat",get:function(){var t="monthly"===$("#date-type-select").val();return"true"===this.localizeDateFormat?t?"MMM YYYY":this.getLocaleDateString():t?"YYYY-MM":this.config.defaults.dateFormat}},{key:"daterangepicker",get:function(){return this.$dateRangeSelector.data("daterangepicker")}},{key:"minDate",get:function(){return this.isPagecounts()?this.config.minDatePagecounts:this.config.minDate}},{key:"maxDate",get:function(){return this.isPagecounts()?this.config.maxDatePagecounts:this.config.maxDate}},{key:"maxMonth",get:function(){return this.isPagecounts()?this.config.maxMonthPagecounts:this.config.maxMonth}},{key:"project",get:function(){var t=this.$projectInput.val();return t?t.toLowerCase().replace(/.org$/,""):null}},{key:"multilangProjects",get:function(){return["wikipedia","wikibooks","wikinews","wikiquote","wikisource","wikiversity","wikivoyage"]}}]),e}(c);e.exports=h},{"./core_extensions":5,"./polyfills":6,"./pv_config":8,"./site_map":9}],8:[function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var a=function(){function t(t,e){for(var i=0;i1?"line":"bar"},dateFormat:"YYYY-MM-DD",localizeDateFormat:"true",numericalFormatting:"true",bezierCurve:"false",autoLogDetection:"false",beginAtZero:"false",rememberChart:"false",agent:"user",platform:"all-access",project:"en.wikipedia.org"},globalChartOpts:{animation:{duration:500,easing:"easeInOutQuart"},hover:{animationDuration:0},legend:{display:!1}},linearCharts:["line","bar","radar"],linearOpts:{scales:{yAxes:[{ticks:{callback:function(t){return e.formatNumber(t)}}}]},legendCallback:function(t){return e.config.chartLegend(t.data.datasets,i)}},daysAgo:20,minDate:moment("2015-07-01").startOf("day"),minDatePagecounts:moment("2007-12-09").startOf("day"),maxDate:o,maxMonth:s,maxDatePagecounts:l,maxMonthPagecounts:c,specialRanges:{current:[o,o],"this-week":[moment().startOf("week"),moment().startOf("week").isAfter(o)?moment().startOf("week"):o],"last-week":[moment().subtract(1,"week").startOf("isoweek"),moment().subtract(1,"week").endOf("isoweek")],"this-month":[moment().startOf("month"),moment().startOf("month").isAfter(o)?moment().startOf("month"):o],"last-month":[moment().subtract(1,"month").startOf("month"),moment().subtract(1,"month").endOf("month")],"this-year":[moment().startOf("year"),moment().startOf("year").isAfter(o)?moment().startOf("year"):o],"last-year":[moment().subtract(1,"year").startOf("year"),moment().subtract(1,"year").endOf("year")],"all-time":[moment("2015-07-01").startOf("day"),o],latest:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.config.daysAgo,e=i.isPagecounts()?l:o;return[moment(e).subtract(t,"days").startOf("day"),e]}},timestampFormat:"YYYYMMDD00",validParams:{agent:["all-agents","user","spider","automated"],platform:["all-access","desktop","mobile-app","mobile-web"],project:r},rtlLangs:["ar","he","fa","ps","ur"]}}return a(t,[{key:"formatYAxisNumber",value:function(t){return t%1==0?this.formatNumber(t):null}},{key:"linearTooltips",value:function(t){var e=this;return{mode:t||"x-axis",callbacks:{label:function(t){return Number.isNaN(t.yLabel)?" "+$.i18n("unknown"):" "+e.formatNumber(t.yLabel)}},bodyFontSize:14,bodySpacing:7,caretSize:0,titleFontSize:14}}},{key:"formatNumber",value:function(t){return"true"===(localStorage.getItem("pageviews-settings-numericalFormatting")||this.config.defaults.numericalFormatting)?this.n(t):t}},{key:"getLocaleDateString",value:function(){return navigator.language?{"ar-sa":"DD/MM/YY","bg-bg":"DD.M.YYYY","ca-es":"DD/MM/YYYY","zh-tw":"YYYY/M/D","cs-cz":"D.M.YYYY","da-dk":"DD-MM-YYYY","de-de":"DD.MM.YYYY","el-gr":"D/M/YYYY","en-us":"M/D/YYYY","fi-fi":"D.M.YYYY","fr-fr":"DD/MM/YYYY","he-il":"DD/MM/YYYY","hu-hu":"YYYY. MM. DD.","is-is":"D.M.YYYY","it-it":"DD/MM/YYYY","ja-jp":"YYYY/MM/DD","ko-kr":"YYYY-MM-DD","nl-nl":"D-M-YYYY","nb-no":"DD.MM.YYYY","pl-pl":"YYYY-MM-DD","pt-br":"D/M/YYYY","ro-ro":"DD.MM.YYYY","ru-ru":"DD.MM.YYYY","hr-hr":"D.M.YYYY","sk-sk":"D. M. YYYY","sq-al":"YYYY-MM-DD","sv-se":"YYYY-MM-DD","th-th":"D/M/YYYY","tr-tr":"DD.MM.YYYY","ur-pk":"DD/MM/YYYY","id-id":"DD/MM/YYYY","uk-ua":"DD.MM.YYYY","be-by":"DD.MM.YYYY","sl-si":"D.M.YYYY","et-ee":"D.MM.YYYY","lv-lv":"YYYY.MM.DD.","lt-lt":"YYYY.MM.DD","fa-ir":"MM/DD/YYYY","vi-vn":"DD/MM/YYYY","hy-am":"DD.MM.YYYY","az-latn-az":"DD.MM.YYYY","eu-es":"YYYY/MM/DD","mk-mk":"DD.MM.YYYY","af-za":"YYYY/MM/DD","ka-ge":"DD.MM.YYYY","fo-fo":"DD-MM-YYYY","hi-in":"DD-MM-YYYY","ms-my":"DD/MM/YYYY","kk-kz":"DD.MM.YYYY","ky-kg":"DD.MM.YY","sw-ke":"M/d/YYYY","uz-latn-uz":"DD/MM YYYY","tt-ru":"DD.MM.YYYY","pa-in":"DD-MM-YY","gu-in":"DD-MM-YY","ta-in":"DD-MM-YYYY","te-in":"DD-MM-YY","kn-in":"DD-MM-YY","mr-in":"DD-MM-YYYY","sa-in":"DD-MM-YYYY","mn-mn":"YY.MM.DD","gl-es":"DD/MM/YY","kok-in":"DD-MM-YYYY","syr-sy":"DD/MM/YYYY","dv-mv":"DD/MM/YY","ar-iq":"DD/MM/YYYY","zh-cn":"YYYY/M/D","de-ch":"DD.MM.YYYY","en-gb":"DD/MM/YYYY","es-mx":"DD/MM/YYYY","fr-be":"D/MM/YYYY","it-ch":"DD.MM.YYYY","nl-be":"D/MM/YYYY","nn-no":"DD.MM.YYYY","pt-pt":"DD-MM-YYYY","sr-latn-cs":"D.M.YYYY","sv-fi":"D.M.YYYY","az-cyrl-az":"DD.MM.YYYY","ms-bn":"DD/MM/YYYY","uz-cyrl-uz":"DD.MM.YYYY","ar-eg":"DD/MM/YYYY","zh-hk":"D/M/YYYY","de-at":"DD.MM.YYYY","en-au":"D/MM/YYYY","es-es":"DD/MM/YYYY","fr-ca":"YYYY-MM-DD","sr-cyrl-cs":"D.M.YYYY","ar-ly":"DD/MM/YYYY","zh-sg":"D/M/YYYY","de-lu":"DD.MM.YYYY","en-ca":"DD/MM/YYYY","es-gt":"DD/MM/YYYY","fr-ch":"DD.MM.YYYY","ar-dz":"DD-MM-YYYY","zh-mo":"D/M/YYYY","de-li":"DD.MM.YYYY","en-nz":"D/MM/YYYY","es-cr":"DD/MM/YYYY","fr-lu":"DD/MM/YYYY","ar-ma":"DD-MM-YYYY","en-ie":"DD/MM/YYYY","es-pa":"MM/DD/YYYY","fr-mc":"DD/MM/YYYY","ar-tn":"DD-MM-YYYY","en-za":"YYYY/MM/DD","es-do":"DD/MM/YYYY","ar-om":"DD/MM/YYYY","en-jm":"DD/MM/YYYY","es-ve":"DD/MM/YYYY","ar-ye":"DD/MM/YYYY","en-029":"MM/DD/YYYY","es-co":"DD/MM/YYYY","ar-sy":"DD/MM/YYYY","en-bz":"DD/MM/YYYY","es-pe":"DD/MM/YYYY","ar-jo":"DD/MM/YYYY","en-tt":"DD/MM/YYYY","es-ar":"DD/MM/YYYY","ar-lb":"DD/MM/YYYY","en-zw":"M/D/YYYY","es-ec":"DD/MM/YYYY","ar-kw":"DD/MM/YYYY","en-ph":"M/D/YYYY","es-cl":"DD-MM-YYYY","ar-ae":"DD/MM/YYYY","es-uy":"DD/MM/YYYY","ar-bh":"DD/MM/YYYY","es-py":"DD/MM/YYYY","ar-qa":"DD/MM/YYYY","es-bo":"DD/MM/YYYY","es-sv":"DD/MM/YYYY","es-hn":"DD/MM/YYYY","es-ni":"DD/MM/YYYY","es-pr":"DD/MM/YYYY","am-et":"D/M/YYYY","tzm-latn-dz":"DD-MM-YYYY","iu-latn-ca":"D/MM/YYYY","sma-no":"DD.MM.YYYY","mn-mong-cn":"YYYY/M/D","gd-gb":"DD/MM/YYYY","en-my":"D/M/YYYY","prs-af":"DD/MM/YY","bn-bd":"DD-MM-YY","wo-sn":"DD/MM/YYYY","rw-rw":"M/D/YYYY","qut-gt":"DD/MM/YYYY","sah-ru":"MM.DD.YYYY","gsw-fr":"DD/MM/YYYY","co-fr":"DD/MM/YYYY","oc-fr":"DD/MM/YYYY","mi-nz":"DD/MM/YYYY","ga-ie":"DD/MM/YYYY","se-se":"YYYY-MM-DD","br-fr":"DD/MM/YYYY","smn-fi":"D.M.YYYY","moh-ca":"M/D/YYYY","arn-cl":"DD-MM-YYYY","ii-cn":"YYYY/M/D","dsb-de":"D. M. YYYY","ig-ng":"D/M/YYYY","kl-gl":"DD-MM-YYYY","lb-lu":"DD/MM/YYYY","ba-ru":"DD.MM.YY","nso-za":"YYYY/MM/DD", "quz-bo":"DD/MM/YYYY","yo-ng":"D/M/YYYY","ha-latn-ng":"D/M/YYYY","fil-ph":"M/D/YYYY","ps-af":"DD/MM/YY","fy-nl":"D-M-YYYY","ne-np":"M/D/YYYY","se-no":"DD.MM.YYYY","iu-cans-ca":"D/M/YYYY","sr-latn-rs":"D.M.YYYY","si-lk":"YYYY-MM-DD","sr-cyrl-rs":"D.M.YYYY","lo-la":"DD/MM/YYYY","km-kh":"YYYY-MM-DD","cy-gb":"DD/MM/YYYY","bo-cn":"YYYY/M/D","sms-fi":"D.M.YYYY","as-in":"DD-MM-YYYY","ml-in":"DD-MM-YY","en-in":"DD-MM-YYYY","or-in":"DD-MM-YY","bn-in":"DD-MM-YY","tk-tm":"DD.MM.YY","bs-latn-ba":"D.M.YYYY","mt-mt":"DD/MM/YYYY","sr-cyrl-me":"D.M.YYYY","se-fi":"D.M.YYYY","zu-za":"YYYY/MM/DD","xh-za":"YYYY/MM/DD","tn-za":"YYYY/MM/DD","hsb-de":"D. M. YYYY","bs-cyrl-ba":"D.M.YYYY","tg-cyrl-tj":"DD.MM.yy","sr-latn-ba":"D.M.YYYY","smj-no":"DD.MM.YYYY","rm-ch":"DD/MM/YYYY","smj-se":"YYYY-MM-DD","quz-ec":"DD/MM/YYYY","quz-pe":"DD/MM/YYYY","hr-ba":"D.M.YYYY.","sr-latn-me":"D.M.YYYY","sma-se":"YYYY-MM-DD","en-sg":"D/M/YYYY","ug-cn":"YYYY-M-D","sr-cyrl-ba":"D.M.YYYY","es-us":"M/D/YYYY"}[navigator.language.toLowerCase()]||this.config.defaults.dateFormat:this.config.defaults.dateFormat}},{key:"cachedElement",value:function(t){return this.jQueryCache[t]?this.jQueryCache[t]:this.jQueryCache[t]=$(t)}},{key:"circularTooltips",get:function(){var t=this;return{callbacks:{label:function(e,i){var n=i.datasets[e.datasetIndex].data[e.index],a=i.labels[e.index];return Number.isNaN(n)?a+": "+$.i18n("unknown"):a+": "+t.formatNumber(n)}},bodyFontSize:14,bodySpacing:7,caretSize:0,titleFontSize:14}}},{key:"initialMonthStart",get:function(){return moment(this.maxMonth).subtract(11,"months").toDate()}},{key:"$dateRangeSelector",get:function(){return this.cachedElement(".date-range-selector")}},{key:"$agentSelector",get:function(){return this.cachedElement("#agent-select")}},{key:"$platformSelector",get:function(){return this.cachedElement("#platform-select")}},{key:"$projectInput",get:function(){return this.cachedElement("#project-input")}},{key:"$chart",get:function(){return $("#chart")}},{key:"$select2Input",get:function(){return this.cachedElement("#select2-input")}},{key:"$dataSourceSelector",get:function(){return this.cachedElement("#data-source-select")}},{key:"$redirectsCheckbox",get:function(){return this.cachedElement("#redirects-checkbox")}}]),t}();e.exports=s},{"./site_map":9}],9:[function(t,e,i){"use strict";var n={aawiki:"aa.wikipedia.org",aawikibooks:"aa.wikibooks.org",aawiktionary:"aa.wiktionary.org",abwiki:"ab.wikipedia.org",abwiktionary:"ab.wiktionary.org",acewiki:"ace.wikipedia.org",advisorywiki:"advisory.wikimedia.org",adywiki:"ady.wikipedia.org",afwiki:"af.wikipedia.org",afwikibooks:"af.wikibooks.org",afwikiquote:"af.wikiquote.org",afwiktionary:"af.wiktionary.org",akwiki:"ak.wikipedia.org",akwikibooks:"ak.wikibooks.org",akwiktionary:"ak.wiktionary.org",alswiki:"als.wikipedia.org",alswikibooks:"als.wikibooks.org",alswikiquote:"als.wikiquote.org",alswiktionary:"als.wiktionary.org",altwiki:"alt.wikipedia.org",amiwiki:"ami.wikipedia.org",amwiki:"am.wikipedia.org",amwikimedia:"am.wikimedia.org",amwikiquote:"am.wikiquote.org",amwiktionary:"am.wiktionary.org",angwiki:"ang.wikipedia.org",angwikibooks:"ang.wikibooks.org",angwikiquote:"ang.wikiquote.org",angwikisource:"ang.wikisource.org",angwiktionary:"ang.wiktionary.org",anwiki:"an.wikipedia.org",anwiktionary:"an.wiktionary.org",arcwiki:"arc.wikipedia.org",arwiki:"ar.wikipedia.org",arwikibooks:"ar.wikibooks.org",arwikimedia:"ar.wikimedia.org",arwikinews:"ar.wikinews.org",arwikiquote:"ar.wikiquote.org",arwikisource:"ar.wikisource.org",arwikiversity:"ar.wikiversity.org",arwiktionary:"ar.wiktionary.org",arywiki:"ary.wikipedia.org",arzwiki:"arz.wikipedia.org",astwiki:"ast.wikipedia.org",astwikibooks:"ast.wikibooks.org",astwikiquote:"ast.wikiquote.org",astwiktionary:"ast.wiktionary.org",aswiki:"as.wikipedia.org",aswikibooks:"as.wikibooks.org",aswikisource:"as.wikisource.org",aswiktionary:"as.wiktionary.org",atjwiki:"atj.wikipedia.org",avkwiki:"avk.wikipedia.org",avwiki:"av.wikipedia.org",avwiktionary:"av.wiktionary.org",awawiki:"awa.wikipedia.org",aywiki:"ay.wikipedia.org",aywikibooks:"ay.wikibooks.org",aywiktionary:"ay.wiktionary.org",azbwiki:"azb.wikipedia.org",azwiki:"az.wikipedia.org",azwikibooks:"az.wikibooks.org",azwikiquote:"az.wikiquote.org",azwikisource:"az.wikisource.org",azwiktionary:"az.wiktionary.org",banwiki:"ban.wikipedia.org",banwikisource:"ban.wikisource.org",barwiki:"bar.wikipedia.org",bat_smgwiki:"bat-smg.wikipedia.org",bawiki:"ba.wikipedia.org",bawikibooks:"ba.wikibooks.org",bclwiki:"bcl.wikipedia.org",bclwiktionary:"bcl.wiktionary.org",bdwikimedia:"bd.wikimedia.org",be_x_oldwiki:"be-tarask.wikipedia.org",betawikiversity:"beta.wikiversity.org",bewiki:"be.wikipedia.org",bewikibooks:"be.wikibooks.org",bewikimedia:"be.wikimedia.org",bewikiquote:"be.wikiquote.org",bewikisource:"be.wikisource.org",bewiktionary:"be.wiktionary.org",bgwiki:"bg.wikipedia.org",bgwikibooks:"bg.wikibooks.org",bgwikinews:"bg.wikinews.org",bgwikiquote:"bg.wikiquote.org",bgwikisource:"bg.wikisource.org",bgwiktionary:"bg.wiktionary.org",bhwiki:"bh.wikipedia.org",bhwiktionary:"bh.wiktionary.org",biwiki:"bi.wikipedia.org",biwikibooks:"bi.wikibooks.org",biwiktionary:"bi.wiktionary.org",bjnwiki:"bjn.wikipedia.org",bmwiki:"bm.wikipedia.org",bmwikibooks:"bm.wikibooks.org",bmwikiquote:"bm.wikiquote.org",bmwiktionary:"bm.wiktionary.org",bnwiki:"bn.wikipedia.org",bnwikibooks:"bn.wikibooks.org",bnwikisource:"bn.wikisource.org",bnwikivoyage:"bn.wikivoyage.org",bnwiktionary:"bn.wiktionary.org",bowiki:"bo.wikipedia.org",bowikibooks:"bo.wikibooks.org",bowiktionary:"bo.wiktionary.org",bpywiki:"bpy.wikipedia.org",brwiki:"br.wikipedia.org",brwikimedia:"br.wikimedia.org",brwikiquote:"br.wikiquote.org",brwikisource:"br.wikisource.org",brwiktionary:"br.wiktionary.org",bswiki:"bs.wikipedia.org",bswikibooks:"bs.wikibooks.org",bswikinews:"bs.wikinews.org",bswikiquote:"bs.wikiquote.org",bswikisource:"bs.wikisource.org",bswiktionary:"bs.wiktionary.org",bugwiki:"bug.wikipedia.org",bxrwiki:"bxr.wikipedia.org",cawiki:"ca.wikipedia.org",cawikibooks:"ca.wikibooks.org",cawikimedia:"ca.wikimedia.org",cawikinews:"ca.wikinews.org",cawikiquote:"ca.wikiquote.org",cawikisource:"ca.wikisource.org",cawiktionary:"ca.wiktionary.org",cbk_zamwiki:"cbk-zam.wikipedia.org",cdowiki:"cdo.wikipedia.org",cebwiki:"ceb.wikipedia.org",cewiki:"ce.wikipedia.org",chowiki:"cho.wikipedia.org",chrwiki:"chr.wikipedia.org",chrwiktionary:"chr.wiktionary.org",chwiki:"ch.wikipedia.org",chwikibooks:"ch.wikibooks.org",chwiktionary:"ch.wiktionary.org",chywiki:"chy.wikipedia.org",ckbwiki:"ckb.wikipedia.org",cnwikimedia:"cn.wikimedia.org",commonswiki:"commons.wikimedia.org",cowiki:"co.wikipedia.org",cowikibooks:"co.wikibooks.org",cowikimedia:"co.wikimedia.org",cowikiquote:"co.wikiquote.org",cowiktionary:"co.wiktionary.org",crhwiki:"crh.wikipedia.org",crwiki:"cr.wikipedia.org",crwikiquote:"cr.wikiquote.org",crwiktionary:"cr.wiktionary.org",csbwiki:"csb.wikipedia.org",csbwiktionary:"csb.wiktionary.org",cswiki:"cs.wikipedia.org",cswikibooks:"cs.wikibooks.org",cswikinews:"cs.wikinews.org",cswikiquote:"cs.wikiquote.org",cswikisource:"cs.wikisource.org",cswikiversity:"cs.wikiversity.org",cswiktionary:"cs.wiktionary.org",cuwiki:"cu.wikipedia.org",cvwiki:"cv.wikipedia.org",cvwikibooks:"cv.wikibooks.org",cywiki:"cy.wikipedia.org",cywikibooks:"cy.wikibooks.org",cywikiquote:"cy.wikiquote.org",cywikisource:"cy.wikisource.org",cywiktionary:"cy.wiktionary.org",dagwiki:"dag.wikipedia.org",dawiki:"da.wikipedia.org",dawikibooks:"da.wikibooks.org",dawikiquote:"da.wikiquote.org",dawikisource:"da.wikisource.org",dawiktionary:"da.wiktionary.org",dewiki:"de.wikipedia.org",dewikibooks:"de.wikibooks.org",dewikinews:"de.wikinews.org",dewikiquote:"de.wikiquote.org",dewikisource:"de.wikisource.org",dewikiversity:"de.wikiversity.org",dewikivoyage:"de.wikivoyage.org",dewiktionary:"de.wiktionary.org",dinwiki:"din.wikipedia.org",diqwiki:"diq.wikipedia.org",dkwikimedia:"dk.wikimedia.org",dsbwiki:"dsb.wikipedia.org",dtywiki:"dty.wikipedia.org",dvwiki:"dv.wikipedia.org",dvwiktionary:"dv.wiktionary.org",dzwiki:"dz.wikipedia.org",dzwiktionary:"dz.wiktionary.org",eewiki:"ee.wikipedia.org",elwiki:"el.wikipedia.org",elwikibooks:"el.wikibooks.org",elwikinews:"el.wikinews.org",elwikiquote:"el.wikiquote.org",elwikisource:"el.wikisource.org",elwikiversity:"el.wikiversity.org",elwikivoyage:"el.wikivoyage.org",elwiktionary:"el.wiktionary.org",emlwiki:"eml.wikipedia.org",enwiki:"en.wikipedia.org",enwikibooks:"en.wikibooks.org",enwikinews:"en.wikinews.org",enwikiquote:"en.wikiquote.org",enwikisource:"en.wikisource.org",enwikiversity:"en.wikiversity.org",enwikivoyage:"en.wikivoyage.org",enwiktionary:"en.wiktionary.org",eowiki:"eo.wikipedia.org",eowikibooks:"eo.wikibooks.org",eowikinews:"eo.wikinews.org",eowikiquote:"eo.wikiquote.org",eowikisource:"eo.wikisource.org",eowikivoyage:"eo.wikivoyage.org",eowiktionary:"eo.wiktionary.org",eswiki:"es.wikipedia.org",eswikibooks:"es.wikibooks.org",eswikinews:"es.wikinews.org",eswikiquote:"es.wikiquote.org",eswikisource:"es.wikisource.org",eswikiversity:"es.wikiversity.org",eswikivoyage:"es.wikivoyage.org",eswiktionary:"es.wiktionary.org",etwiki:"et.wikipedia.org",etwikibooks:"et.wikibooks.org",etwikimedia:"ee.wikimedia.org",etwikiquote:"et.wikiquote.org",etwikisource:"et.wikisource.org",etwiktionary:"et.wiktionary.org",euwiki:"eu.wikipedia.org",euwikibooks:"eu.wikibooks.org",euwikiquote:"eu.wikiquote.org",euwikisource:"eu.wikisource.org",euwiktionary:"eu.wiktionary.org",extwiki:"ext.wikipedia.org",fawiki:"fa.wikipedia.org",fawikibooks:"fa.wikibooks.org",fawikinews:"fa.wikinews.org",fawikiquote:"fa.wikiquote.org",fawikisource:"fa.wikisource.org",fawikivoyage:"fa.wikivoyage.org",fawiktionary:"fa.wiktionary.org",ffwiki:"ff.wikipedia.org",fiu_vrowiki:"fiu-vro.wikipedia.org",fiwiki:"fi.wikipedia.org",fiwikibooks:"fi.wikibooks.org",fiwikimedia:"fi.wikimedia.org",fiwikinews:"fi.wikinews.org",fiwikiquote:"fi.wikiquote.org",fiwikisource:"fi.wikisource.org",fiwikiversity:"fi.wikiversity.org",fiwikivoyage:"fi.wikivoyage.org",fiwiktionary:"fi.wiktionary.org",fjwiki:"fj.wikipedia.org",fjwiktionary:"fj.wiktionary.org",foundationwiki:"foundation.wikimedia.org",fowiki:"fo.wikipedia.org",fowikisource:"fo.wikisource.org",fowiktionary:"fo.wiktionary.org",frpwiki:"frp.wikipedia.org",frrwiki:"frr.wikipedia.org",frwiki:"fr.wikipedia.org",frwikibooks:"fr.wikibooks.org",frwikinews:"fr.wikinews.org",frwikiquote:"fr.wikiquote.org",frwikisource:"fr.wikisource.org",frwikiversity:"fr.wikiversity.org",frwikivoyage:"fr.wikivoyage.org",frwiktionary:"fr.wiktionary.org",furwiki:"fur.wikipedia.org",fywiki:"fy.wikipedia.org",fywikibooks:"fy.wikibooks.org",fywiktionary:"fy.wiktionary.org",gagwiki:"gag.wikipedia.org",ganwiki:"gan.wikipedia.org",gawiki:"ga.wikipedia.org",gawikibooks:"ga.wikibooks.org",gawikiquote:"ga.wikiquote.org",gawiktionary:"ga.wiktionary.org",gcrwiki:"gcr.wikipedia.org",gdwiki:"gd.wikipedia.org",gdwiktionary:"gd.wiktionary.org",gewikimedia:"ge.wikimedia.org",glkwiki:"glk.wikipedia.org",glwiki:"gl.wikipedia.org",glwikibooks:"gl.wikibooks.org",glwikiquote:"gl.wikiquote.org",glwikisource:"gl.wikisource.org",glwiktionary:"gl.wiktionary.org",gnwiki:"gn.wikipedia.org",gnwikibooks:"gn.wikibooks.org",gnwiktionary:"gn.wiktionary.org",gomwiki:"gom.wikipedia.org",gomwiktionary:"gom.wiktionary.org",gorwiki:"gor.wikipedia.org",gotwiki:"got.wikipedia.org",gotwikibooks:"got.wikibooks.org",grwikimedia:"gr.wikimedia.org",guwiki:"gu.wikipedia.org",guwikibooks:"gu.wikibooks.org",guwikiquote:"gu.wikiquote.org",guwikisource:"gu.wikisource.org",guwiktionary:"gu.wiktionary.org",gvwiki:"gv.wikipedia.org",gvwiktionary:"gv.wiktionary.org",hakwiki:"hak.wikipedia.org",hawiki:"ha.wikipedia.org",hawiktionary:"ha.wiktionary.org",hawwiki:"haw.wikipedia.org",hewiki:"he.wikipedia.org",hewikibooks:"he.wikibooks.org",hewikinews:"he.wikinews.org",hewikiquote:"he.wikiquote.org",hewikisource:"he.wikisource.org",hewikivoyage:"he.wikivoyage.org",hewiktionary:"he.wiktionary.org",hifwiki:"hif.wikipedia.org",hifwiktionary:"hif.wiktionary.org",hiwiki:"hi.wikipedia.org",hiwikimedia:"hi.wikimedia.org",hiwikibooks:"hi.wikibooks.org",hiwikisource:"hi.wikisource.org",hiwikiquote:"hi.wikiquote.org",hiwikiversity:"hi.wikiversity.org",hiwikivoyage:"hi.wikivoyage.org",hiwiktionary:"hi.wiktionary.org",howiki:"ho.wikipedia.org",hrwiki:"hr.wikipedia.org",hrwikibooks:"hr.wikibooks.org",hrwikiquote:"hr.wikiquote.org",hrwikisource:"hr.wikisource.org",hrwiktionary:"hr.wiktionary.org",hsbwiki:"hsb.wikipedia.org",hsbwiktionary:"hsb.wiktionary.org",htwiki:"ht.wikipedia.org",htwikisource:"ht.wikisource.org",huwiki:"hu.wikipedia.org",huwikibooks:"hu.wikibooks.org",huwikinews:"hu.wikinews.org",huwikiquote:"hu.wikiquote.org",huwikisource:"hu.wikisource.org",huwiktionary:"hu.wiktionary.org",hywiki:"hy.wikipedia.org",hywikibooks:"hy.wikibooks.org",hywikiquote:"hy.wikiquote.org",hywikisource:"hy.wikisource.org",hywiktionary:"hy.wiktionary.org",hywwiki:"hyw.wikipedia.org",hzwiki:"hz.wikipedia.org",iawiki:"ia.wikipedia.org",iawikibooks:"ia.wikibooks.org",iawiktionary:"ia.wiktionary.org",idwiki:"id.wikipedia.org",idwikibooks:"id.wikibooks.org",idwikimedia:"id.wikimedia.org",idwikiquote:"id.wikiquote.org",idwikisource:"id.wikisource.org",idwiktionary:"id.wiktionary.org",iegcomwiki:"iegcom.wikimedia.org",iewiki:"ie.wikipedia.org",iewikibooks:"ie.wikibooks.org",iewiktionary:"ie.wiktionary.org",igwiki:"ig.wikipedia.org",iiwiki:"ii.wikipedia.org",ikwiki:"ik.wikipedia.org",ikwiktionary:"ik.wiktionary.org",ilowiki:"ilo.wikipedia.org",ilwikimedia:"il.wikimedia.org",incubatorwiki:"incubator.wikimedia.org",inhwiki:"inh.wikipedia.org",iowiki:"io.wikipedia.org",iowiktionary:"io.wiktionary.org",iswiki:"is.wikipedia.org",iswikibooks:"is.wikibooks.org",iswikiquote:"is.wikiquote.org",iswikisource:"is.wikisource.org",iswiktionary:"is.wiktionary.org",itwiki:"it.wikipedia.org",itwikibooks:"it.wikibooks.org",itwikinews:"it.wikinews.org",itwikiquote:"it.wikiquote.org",itwikisource:"it.wikisource.org",itwikiversity:"it.wikiversity.org",itwikivoyage:"it.wikivoyage.org",itwiktionary:"it.wiktionary.org",iuwiki:"iu.wikipedia.org",iuwiktionary:"iu.wiktionary.org",jamwiki:"jam.wikipedia.org",jawiki:"ja.wikipedia.org",jawikibooks:"ja.wikibooks.org",jawikinews:"ja.wikinews.org",jawikiquote:"ja.wikiquote.org",jawikisource:"ja.wikisource.org",jawikiversity:"ja.wikiversity.org",jawikivoyage:"ja.wikivoyage.org",jawiktionary:"ja.wiktionary.org",jbowiki:"jbo.wikipedia.org",jbowiktionary:"jbo.wiktionary.org",jvwiki:"jv.wikipedia.org",jvwikisource:"jv.wikisource.org",jvwiktionary:"jv.wiktionary.org",kaawiki:"kaa.wikipedia.org",kabwiki:"kab.wikipedia.org",kawiki:"ka.wikipedia.org",kawikibooks:"ka.wikibooks.org",kawikiquote:"ka.wikiquote.org",kawiktionary:"ka.wiktionary.org",kbdwiki:"kbd.wikipedia.org",kgwiki:"kg.wikipedia.org",kiwiki:"ki.wikipedia.org",kjwiki:"kj.wikipedia.org",kkwiki:"kk.wikipedia.org",kkwikibooks:"kk.wikibooks.org",kkwikiquote:"kk.wikiquote.org",kkwiktionary:"kk.wiktionary.org",klwiki:"kl.wikipedia.org",klwiktionary:"kl.wiktionary.org",kmwiki:"km.wikipedia.org",kmwikibooks:"km.wikibooks.org",kmwiktionary:"km.wiktionary.org",knwiki:"kn.wikipedia.org",knwikibooks:"kn.wikibooks.org",knwikiquote:"kn.wikiquote.org",knwikisource:"kn.wikisource.org",knwiktionary:"kn.wiktionary.org",koiwiki:"koi.wikipedia.org",kowiki:"ko.wikipedia.org",kowikibooks:"ko.wikibooks.org",kowikinews:"ko.wikinews.org",kowikiquote:"ko.wikiquote.org",kowikisource:"ko.wikisource.org",kowikiversity:"ko.wikiversity.org",kowiktionary:"ko.wiktionary.org",kbpwiki:"kbp.wikipedia.org",krcwiki:"krc.wikipedia.org",krwiki:"kr.wikipedia.org",krwikiquote:"kr.wikiquote.org",kshwiki:"ksh.wikipedia.org",kswiki:"ks.wikipedia.org",kswikibooks:"ks.wikibooks.org",kswikiquote:"ks.wikiquote.org",kswiktionary:"ks.wiktionary.org",kuwiki:"ku.wikipedia.org",kuwikibooks:"ku.wikibooks.org",kuwikiquote:"ku.wikiquote.org",kuwiktionary:"ku.wiktionary.org",kvwiki:"kv.wikipedia.org",kwwiki:"kw.wikipedia.org",kwwikiquote:"kw.wikiquote.org",kwwiktionary:"kw.wiktionary.org",kywiki:"ky.wikipedia.org",kywikibooks:"ky.wikibooks.org",kywikiquote:"ky.wikiquote.org",kywiktionary:"ky.wiktionary.org",labswiki:"wikitech.wikimedia.org",ladwiki:"lad.wikipedia.org",lawiki:"la.wikipedia.org",lawikibooks:"la.wikibooks.org",lawikiquote:"la.wikiquote.org",lawikisource:"la.wikisource.org",lawiktionary:"la.wiktionary.org",lbewiki:"lbe.wikipedia.org",lbwiki:"lb.wikipedia.org",lbwikibooks:"lb.wikibooks.org",lbwikiquote:"lb.wikiquote.org",lbwiktionary:"lb.wiktionary.org",lezwiki:"lez.wikipedia.org",lfnwiki:"lfn.wikipedia.org",lgwiki:"lg.wikipedia.org",lijwiki:"lij.wikipedia.org",lijwikisource:"lij.wikisource.org",liwiki:"li.wikipedia.org",liwikibooks:"li.wikibooks.org",liwikiquote:"li.wikiquote.org",liwikisource:"li.wikisource.org",liwiktionary:"li.wiktionary.org",lldwiki:"lld.wikipedia.org",lmowiki:"lmo.wikipedia.org",lmowiktionary:"lmo.wiktionary.org",lnwiki:"ln.wikipedia.org",lnwikibooks:"ln.wikibooks.org",lnwiktionary:"ln.wiktionary.org",loginwiki:"login.wikimedia.org",lowiki:"lo.wikipedia.org",lowiktionary:"lo.wiktionary.org",lrcwiki:"lrc.wikipedia.org",ltgwiki:"ltg.wikipedia.org",ltwiki:"lt.wikipedia.org",ltwikibooks:"lt.wikibooks.org",ltwikiquote:"lt.wikiquote.org",ltwikisource:"lt.wikisource.org",ltwiktionary:"lt.wiktionary.org",lvwiki:"lv.wikipedia.org",lvwikibooks:"lv.wikibooks.org",lvwiktionary:"lv.wiktionary.org",madwiki:"mad.wikipedia.org",maiwiki:"mai.wikipedia.org",maiwikimedia:"mai.wikimedia.org",map_bmswiki:"map-bms.wikipedia.org",mdfwiki:"mdf.wikipedia.org",mediawikiwiki:"mediawiki.org",metawiki:"meta.wikimedia.org",mgwiki:"mg.wikipedia.org",mgwikibooks:"mg.wikibooks.org",mgwiktionary:"mg.wiktionary.org",mhrwiki:"mhr.wikipedia.org",mhwiki:"mh.wikipedia.org",mhwiktionary:"mh.wiktionary.org",minwiki:"min.wikipedia.org",minwiktionary:"min.wiktionary.org",miwiki:"mi.wikipedia.org",miwikibooks:"mi.wikibooks.org",miwiktionary:"mi.wiktionary.org",mkwiki:"mk.wikipedia.org",mkwikibooks:"mk.wikibooks.org",mkwikimedia:"mk.wikimedia.org",mkwikisource:"mk.wikisource.org",mkwiktionary:"mk.wiktionary.org",mlwiki:"ml.wikipedia.org",mlwikibooks:"ml.wikibooks.org",mlwikiquote:"ml.wikiquote.org",mlwikisource:"ml.wikisource.org",mlwiktionary:"ml.wiktionary.org",mniwiki:"mni.wikipedia.org",mniwiktionary:"mni.wiktionary.org",mnwiki:"mn.wikipedia.org",mnwikibooks:"mn.wikibooks.org",mnwiktionary:"mn.wiktionary.org",mnwwiki:"mnw.wikipedia.org",mowiki:"mo.wikipedia.org",mowiktionary:"mo.wiktionary.org",mrjwiki:"mrj.wikipedia.org",mrwiki:"mr.wikipedia.org",mrwikibooks:"mr.wikibooks.org",mrwikiquote:"mr.wikiquote.org",mrwikisource:"mr.wikisource.org",mrwiktionary:"mr.wiktionary.org",mswiki:"ms.wikipedia.org",mswikibooks:"ms.wikibooks.org",mswiktionary:"ms.wiktionary.org",mtwiki:"mt.wikipedia.org",mtwiktionary:"mt.wiktionary.org",muswiki:"mus.wikipedia.org",mwlwiki:"mwl.wikipedia.org",mxwikimedia:"mx.wikimedia.org",myvwiki:"myv.wikipedia.org",mywiki:"my.wikipedia.org",mywikibooks:"my.wikibooks.org",mywiktionary:"my.wiktionary.org",mznwiki:"mzn.wikipedia.org",nahwiki:"nah.wikipedia.org",nahwikibooks:"nah.wikibooks.org",nahwiktionary:"nah.wiktionary.org",napwiki:"nap.wikipedia.org",napwikisource:"nap.wikisource.org",nawiki:"na.wikipedia.org",nawikibooks:"na.wikibooks.org",nawikiquote:"na.wikiquote.org",nawiktionary:"na.wiktionary.org",nds_nlwiki:"nds-nl.wikipedia.org",ndswiki:"nds.wikipedia.org",ndswikibooks:"nds.wikibooks.org",ndswikiquote:"nds.wikiquote.org",ndswiktionary:"nds.wiktionary.org",newiki:"ne.wikipedia.org",newikibooks:"ne.wikibooks.org",newiktionary:"ne.wiktionary.org",newwiki:"new.wikipedia.org",ngwiki:"ng.wikipedia.org",ngwikimedia:"ng.wikimedia.org",niawiki:"nia.wikipedia.org",niawiktionary:"nia.wiktionary.org",nlwiki:"nl.wikipedia.org",nlwikibooks:"nl.wikibooks.org",nlwikimedia:"nl.wikimedia.org",nlwikinews:"nl.wikinews.org",nlwikiquote:"nl.wikiquote.org",nlwikisource:"nl.wikisource.org",nlwikivoyage:"nl.wikivoyage.org",nlwiktionary:"nl.wiktionary.org",nnwiki:"nn.wikipedia.org",nnwikiquote:"nn.wikiquote.org",nnwiktionary:"nn.wiktionary.org",nostalgiawiki:"nostalgia.wikipedia.org",novwiki:"nov.wikipedia.org",nowiki:"no.wikipedia.org",nowikibooks:"no.wikibooks.org",nowikimedia:"no.wikimedia.org",nowikinews:"no.wikinews.org",nowikiquote:"no.wikiquote.org",nowikisource:"no.wikisource.org",nowiktionary:"no.wiktionary.org",nqowiki:"nqo.wikipedia.org",nrmwiki:"nrm.wikipedia.org",nsowiki:"nso.wikipedia.org",nvwiki:"nv.wikipedia.org",nycwikimedia:"nyc.wikimedia.org",nywiki:"ny.wikipedia.org",nzwikimedia:"nz.wikimedia.org",ocwiki:"oc.wikipedia.org",ocwikibooks:"oc.wikibooks.org",ocwiktionary:"oc.wiktionary.org",olowiki:"olo.wikipedia.org",omwiki:"om.wikipedia.org",omwiktionary:"om.wiktionary.org",orwiki:"or.wikipedia.org",orwikisource:"or.wikisource.org",orwiktionary:"or.wiktionary.org",oswiki:"os.wikipedia.org",outreachwiki:"outreach.wikimedia.org",pa_uswikimedia:"pa-us.wikimedia.org",pagwiki:"pag.wikipedia.org",pamwiki:"pam.wikipedia.org",papwiki:"pap.wikipedia.org",pawiki:"pa.wikipedia.org",pawikibooks:"pa.wikibooks.org",pawikisource:"pa.wikisource.org",pawiktionary:"pa.wiktionary.org",pcdwiki:"pcd.wikipedia.org",pdcwiki:"pdc.wikipedia.org",pflwiki:"pfl.wikipedia.org",pihwiki:"pih.wikipedia.org",piwiki:"pi.wikipedia.org",piwiktionary:"pi.wiktionary.org",plwiki:"pl.wikipedia.org",plwikibooks:"pl.wikibooks.org",plwikimedia:"pl.wikimedia.org",plwikinews:"pl.wikinews.org",plwikiquote:"pl.wikiquote.org",plwikisource:"pl.wikisource.org",plwikivoyage:"pl.wikivoyage.org",plwiktionary:"pl.wiktionary.org",pmswiki:"pms.wikipedia.org",pmswikisource:"pms.wikisource.org",pnbwiki:"pnb.wikipedia.org",pnbwiktionary:"pnb.wiktionary.org",pntwiki:"pnt.wikipedia.org",pswiki:"ps.wikipedia.org",pswikibooks:"ps.wikibooks.org",pswikivoyage:"ps.wikivoyage.org",pswiktionary:"ps.wiktionary.org",ptwiki:"pt.wikipedia.org",ptwikibooks:"pt.wikibooks.org",ptwikimedia:"pt.wikimedia.org",ptwikinews:"pt.wikinews.org",ptwikiquote:"pt.wikiquote.org",ptwikisource:"pt.wikisource.org",ptwikiversity:"pt.wikiversity.org",ptwikivoyage:"pt.wikivoyage.org",ptwiktionary:"pt.wiktionary.org",pwnwiki:"pwn.wikipedia.org",quwiki:"qu.wikipedia.org",quwikibooks:"qu.wikibooks.org",quwikiquote:"qu.wikiquote.org",quwiktionary:"qu.wiktionary.org",rmwiki:"rm.wikipedia.org",rmwikibooks:"rm.wikibooks.org",rmwiktionary:"rm.wiktionary.org",rmywiki:"rmy.wikipedia.org",rnwiki:"rn.wikipedia.org",rnwiktionary:"rn.wiktionary.org",roa_rupwiki:"roa-rup.wikipedia.org",roa_rupwiktionary:"roa-rup.wiktionary.org",roa_tarawiki:"roa-tara.wikipedia.org",rowiki:"ro.wikipedia.org",rowikibooks:"ro.wikibooks.org",rowikinews:"ro.wikinews.org",rowikiquote:"ro.wikiquote.org",rowikisource:"ro.wikisource.org",rowikivoyage:"ro.wikivoyage.org",rowiktionary:"ro.wiktionary.org",rswikimedia:"rs.wikimedia.org",ruewiki:"rue.wikipedia.org",ruwiki:"ru.wikipedia.org",ruwikibooks:"ru.wikibooks.org",ruwikimedia:"ru.wikimedia.org",ruwikinews:"ru.wikinews.org",ruwikiquote:"ru.wikiquote.org",ruwikisource:"ru.wikisource.org",ruwikiversity:"ru.wikiversity.org",ruwikivoyage:"ru.wikivoyage.org",ruwiktionary:"ru.wiktionary.org",rwwiki:"rw.wikipedia.org",rwwiktionary:"rw.wiktionary.org",sahwiki:"sah.wikipedia.org",sahwikisource:"sah.wikisource.org",sahwikiquote:"sah.wikiquote.org",satwiki:"sat.wikipedia.org",sawiki:"sa.wikipedia.org",sawikibooks:"sa.wikibooks.org",sawikiquote:"sa.wikiquote.org",sawikisource:"sa.wikisource.org",sawiktionary:"sa.wiktionary.org",scnwiki:"scn.wikipedia.org",scnwiktionary:"scn.wiktionary.org",scowiki:"sco.wikipedia.org",scwiki:"sc.wikipedia.org",scwiktionary:"sc.wiktionary.org",sdwiki:"sd.wikipedia.org",sdwikinews:"sd.wikinews.org",sdwiktionary:"sd.wiktionary.org",sewiki:"se.wikipedia.org",sewikibooks:"se.wikibooks.org",sewikimedia:"se.wikimedia.org",sgwiki:"sg.wikipedia.org",sgwiktionary:"sg.wiktionary.org",shiwiki:"shi.wikipedia.org",shwiki:"sh.wikipedia.org",shwiktionary:"sh.wiktionary.org",shnwiktionary:"shn.wiktionary.org",shywiktionary:"shy.wiktionary.org",simplewiki:"simple.wikipedia.org",simplewikibooks:"simple.wikibooks.org",simplewikiquote:"simple.wikiquote.org",simplewiktionary:"simple.wiktionary.org",siwiki:"si.wikipedia.org",siwikibooks:"si.wikibooks.org",siwiktionary:"si.wiktionary.org",skrwiki:"skr.wikipedia.org",skrwiktionary:"skr.wiktionary.org",skwiki:"sk.wikipedia.org",skwikibooks:"sk.wikibooks.org",skwikiquote:"sk.wikiquote.org",skwikisource:"sk.wikisource.org",skwiktionary:"sk.wiktionary.org",slwiki:"sl.wikipedia.org",slwikibooks:"sl.wikibooks.org",slwikiquote:"sl.wikiquote.org",slwikisource:"sl.wikisource.org",slwikiversity:"sl.wikiversity.org",slwiktionary:"sl.wiktionary.org",smnwiki:"smn.wikipedia.org",smwiki:"sm.wikipedia.org",smwiktionary:"sm.wiktionary.org",snwiki:"sn.wikipedia.org",snwiktionary:"sn.wiktionary.org",sourceswiki:"wikisource.org",sowiki:"so.wikipedia.org",sowiktionary:"so.wiktionary.org",specieswiki:"species.wikimedia.org",sqwiki:"sq.wikipedia.org",sqwikibooks:"sq.wikibooks.org",sqwikinews:"sq.wikinews.org",sqwikiquote:"sq.wikiquote.org",sqwiktionary:"sq.wiktionary.org",srnwiki:"srn.wikipedia.org",srwiki:"sr.wikipedia.org",srwikibooks:"sr.wikibooks.org",srwikinews:"sr.wikinews.org",srwikiquote:"sr.wikiquote.org",srwikisource:"sr.wikisource.org",srwiktionary:"sr.wiktionary.org",strategywiki:"strategy.wikimedia.org",sswiki:"ss.wikipedia.org",sswiktionary:"ss.wiktionary.org",stqwiki:"stq.wikipedia.org",stwiki:"st.wikipedia.org",stwiktionary:"st.wiktionary.org",suwiki:"su.wikipedia.org",suwikibooks:"su.wikibooks.org",suwikiquote:"su.wikiquote.org",suwiktionary:"su.wiktionary.org",svwiki:"sv.wikipedia.org",svwikibooks:"sv.wikibooks.org",svwikinews:"sv.wikinews.org",svwikiquote:"sv.wikiquote.org",svwikisource:"sv.wikisource.org",svwikiversity:"sv.wikiversity.org",svwikivoyage:"sv.wikivoyage.org",svwiktionary:"sv.wiktionary.org",swwiki:"sw.wikipedia.org",swwikibooks:"sw.wikibooks.org",swwiktionary:"sw.wiktionary.org",szlwiki:"szl.wikipedia.org",szywiki:"szy.wikipedia.org",tawiki:"ta.wikipedia.org",tawikibooks:"ta.wikibooks.org",tawikinews:"ta.wikinews.org",tawikiquote:"ta.wikiquote.org",tawikisource:"ta.wikisource.org",tawiktionary:"ta.wiktionary.org",taywiki:"tay.wikipedia.org",tcywiki:"tcy.wikipedia.org",testwiki:"test.wikipedia.org",test2wiki:"test2.wikipedia.org",tetwiki:"tet.wikipedia.org",tewiki:"te.wikipedia.org",tewikibooks:"te.wikibooks.org",tewikiquote:"te.wikiquote.org",tewikisource:"te.wikisource.org",tewiktionary:"te.wiktionary.org",tgwiki:"tg.wikipedia.org",tgwikibooks:"tg.wikibooks.org",tgwiktionary:"tg.wiktionary.org",thankyouwiki:"thankyou.wikipedia.org",thwiki:"th.wikipedia.org",thwikibooks:"th.wikibooks.org",thwikinews:"th.wikinews.org",thwikiquote:"th.wikiquote.org",thwikisource:"th.wikisource.org",thwiktionary:"th.wiktionary.org",tiwiki:"ti.wikipedia.org",tiwiktionary:"ti.wiktionary.org",tkwiki:"tk.wikipedia.org",tkwikibooks:"tk.wikibooks.org",tkwikiquote:"tk.wikiquote.org",tkwiktionary:"tk.wiktionary.org",tlwiki:"tl.wikipedia.org",tlwikibooks:"tl.wikibooks.org",tlwiktionary:"tl.wiktionary.org",tnwiki:"tn.wikipedia.org",tnwiktionary:"tn.wiktionary.org",towiki:"to.wikipedia.org",towiktionary:"to.wiktionary.org",tpiwiki:"tpi.wikipedia.org",tpiwiktionary:"tpi.wiktionary.org",trwiki:"tr.wikipedia.org",trwikibooks:"tr.wikibooks.org",trwikimedia:"tr.wikimedia.org",trwikinews:"tr.wikinews.org",trwikiquote:"tr.wikiquote.org",trwikisource:"tr.wikisource.org",trwikivoyage:"tr.wikivoyage.org",trwiktionary:"tr.wiktionary.org",trvwiki:"trv.wikipedia.org",tswiki:"ts.wikipedia.org",tswiktionary:"ts.wiktionary.org",ttwiki:"tt.wikipedia.org",ttwikibooks:"tt.wikibooks.org",ttwikiquote:"tt.wikiquote.org",ttwiktionary:"tt.wiktionary.org",tumwiki:"tum.wikipedia.org",twwiki:"tw.wikipedia.org",twwiktionary:"tw.wiktionary.org",tyvwiki:"tyv.wikipedia.org",tywiki:"ty.wikipedia.org",uawikimedia:"ua.wikimedia.org",udmwiki:"udm.wikipedia.org",ugwiki:"ug.wikipedia.org",ugwikibooks:"ug.wikibooks.org",ugwikiquote:"ug.wikiquote.org",ugwiktionary:"ug.wiktionary.org",ukwiki:"uk.wikipedia.org",ukwikibooks:"uk.wikibooks.org",ukwikimedia:"uk.wikimedia.org",ukwikinews:"uk.wikinews.org",ukwikiquote:"uk.wikiquote.org",ukwikisource:"uk.wikisource.org",ukwikivoyage:"uk.wikivoyage.org",ukwiktionary:"uk.wiktionary.org",urwiki:"ur.wikipedia.org",urwikibooks:"ur.wikibooks.org",urwikiquote:"ur.wikiquote.org",urwiktionary:"ur.wiktionary.org",uzwiki:"uz.wikipedia.org",uzwikibooks:"uz.wikibooks.org",uzwikiquote:"uz.wikiquote.org",uzwiktionary:"uz.wiktionary.org",vecwiki:"vec.wikipedia.org",vecwikisource:"vec.wikisource.org",vecwiktionary:"vec.wiktionary.org",vepwiki:"vep.wikipedia.org",vewiki:"ve.wikipedia.org",viwiki:"vi.wikipedia.org",viwikibooks:"vi.wikibooks.org",viwikiquote:"vi.wikiquote.org",viwikisource:"vi.wikisource.org",viwikivoyage:"vi.wikivoyage.org",viwiktionary:"vi.wiktionary.org",vlswiki:"vls.wikipedia.org",vowiki:"vo.wikipedia.org",vowikibooks:"vo.wikibooks.org",vowikiquote:"vo.wikiquote.org",vowiktionary:"vo.wiktionary.org",warwiki:"war.wikipedia.org",wawiki:"wa.wikipedia.org",wawikibooks:"wa.wikibooks.org",wawikisource:"wa.wikisource.org",wawiktionary:"wa.wiktionary.org",wbwikimedia:"wb.wikimedia.org",wg_enwiki:"wg-en.wikipedia.org",wikidatawiki:"wikidata.org",wikimaniawiki:"wikimania.wikimedia.org",wowiki:"wo.wikipedia.org",wowikiquote:"wo.wikiquote.org",wowiktionary:"wo.wiktionary.org",wuuwiki:"wuu.wikipedia.org",xalwiki:"xal.wikipedia.org",xhwiki:"xh.wikipedia.org",xhwikibooks:"xh.wikibooks.org",xhwiktionary:"xh.wiktionary.org",xmfwiki:"xmf.wikipedia.org",yiwiki:"yi.wikipedia.org",yiwikisource:"yi.wikisource.org",yiwiktionary:"yi.wiktionary.org",yowiki:"yo.wikipedia.org",yowikibooks:"yo.wikibooks.org",yowiktionary:"yo.wiktionary.org",zawiki:"za.wikipedia.org",zawikibooks:"za.wikibooks.org",zawikiquote:"za.wikiquote.org",zawiktionary:"za.wiktionary.org",zeawiki:"zea.wikipedia.org",zh_classicalwiki:"zh-classical.wikipedia.org",zh_min_nanwiki:"zh-min-nan.wikipedia.org",zh_min_nanwikibooks:"zh-min-nan.wikibooks.org",zh_min_nanwikiquote:"zh-min-nan.wikiquote.org",zh_min_nanwikisource:"zh-min-nan.wikisource.org",zh_min_nanwiktionary:"zh-min-nan.wiktionary.org",zh_yuewiki:"zh-yue.wikipedia.org",zhwiki:"zh.wikipedia.org",zhwikibooks:"zh.wikibooks.org",zhwikinews:"zh.wikinews.org",zhwikiquote:"zh.wikiquote.org",zhwikisource:"zh.wikisource.org",zhwikivoyage:"zh.wikivoyage.org",zhwikiversity:"zh.wikiversity.org",zhwiktionary:"zh.wiktionary.org",zuwiki:"zu.wikipedia.org",zuwikibooks:"zu.wikibooks.org",zuwiktionary:"zu.wiktionary.org"};e.exports=n},{}],10:[function(t,e,i){"use strict";var n=(Chart.Zoom=Chart.Zoom||{},{beforeInit:function(t){if(t.options.zoom){t.zoom={};var e=t.chart.ctx.canvas;t.zoom._mouseDownHandler=function(e){t.zoom._dragZoomStart=e},e.addEventListener("mousedown",t.zoom._mouseDownHandler),t.zoom._mouseMoveHandler=function(e){t.zoom._dragZoomStart&&(t.zoom._dragZoomEnd=e,t.update(0))},e.addEventListener("mousemove",t.zoom._mouseMoveHandler),t.zoom._mouseUpHandler=function(e){if(t.zoom._dragZoomStart){var i=t.zoom._dragZoomStart,n=i.target.getBoundingClientRect().left,a=Math.min(i.clientX,e.clientX)-n,o=Math.max(i.clientX,e.clientX)-n,r=t.scales["x-axis-0"],s=r.getValueForPixel(a),l=r.getValueForPixel(o);if(o-a<=0)return void(t.zoom._dragZoomStart=null);t.zoom._dragZoomStart=null,t.zoom._dragZoomEnd=null;var c=t.data.labels,u=$(".date-range-selector").data("daterangepicker");if(l-s+1===c.length)return t.update(0);u.startDate=moment(c[s],t.data.dateFormat),u.setEndDate(moment(c[l],t.data.dateFormat)),u.updateElement()}},e.addEventListener("mouseup",t.zoom._mouseUpHandler)}},beforeDatasetsDraw:function(t){if(t.options.zoom&&t.zoom._dragZoomStart&&t.zoom._dragZoomEnd){var e=t.chart.ctx,i=t.chartArea;e.save(),e.beginPath();var n=t.scales["y-axis-0"],a=t.zoom._dragZoomStart,o=t.zoom._dragZoomEnd,r=a.target.getBoundingClientRect().left,s=Math.min(a.clientX,o.clientX)-r,l=Math.max(a.clientX,o.clientX)-r,c=l-s;e.fillStyle="rgba(225,225,225,0.3)",e.lineWidth=5,e.fillRect(s,n.top,c,n.bottom-n.top), diff --git a/public_html/pageviews/rev-manifest.json b/public_html/pageviews/rev-manifest.json index 56525aee6..634e16050 100644 --- a/public_html/pageviews/rev-manifest.json +++ b/public_html/pageviews/rev-manifest.json @@ -1,4 +1,4 @@ { "application.css": "application-a01dec23b5.css", - "application.js": "application-a549d7d2a1.js" + "application.js": "application-f3e320f008.js" } \ No newline at end of file