/* Highcharts JS v5.0.9 (2017-03-08) Boost module (c) 2010-2016 Highsoft AS Author: Torstein Honsi License: www.highcharts.com/license */ (function(H){"object"===typeof module&&module.exports?module.exports=H:H(Highcharts)})(function(H){(function(h){function w(a){return a.series.length>=D(a.options.boost&&a.options.boost.seriesThreshold,10)}function x(a){function c(){var a=Array.prototype.slice.call(arguments),c=-Number.MAX_VALUE;y(a,function(a){if("undefined"!==typeof a&&"undefined"!==typeof a.length&&0=(a.options.boostThreshold|| Number.MAX_VALUE)}function H(a){function c(b,c){c=a.createShader("vertex"===c?a.VERTEX_SHADER:a.FRAGMENT_SHADER);a.shaderSource(c,b);a.compileShader(c);return a.getShaderParameter(c,a.COMPILE_STATUS)?c:!1}function d(){function d(b){return a.getUniformLocation(l,b)}var e=c("#version 100\nprecision highp float;\nattribute vec4 aVertexPosition;\nattribute vec4 aColor;\nvarying highp vec2 position;\nvarying highp vec4 vColor;\nuniform mat4 uPMatrix;\nuniform float pSize;\nuniform float translatedThreshold;\nuniform bool hasThreshold;\nuniform bool skipTranslation;\nuniform float xAxisTrans;\nuniform float xAxisMin;\nuniform float xAxisMinPad;\nuniform float xAxisPointRange;\nuniform float xAxisLen;\nuniform bool xAxisPostTranslate;\nuniform float xAxisOrdinalSlope;\nuniform float xAxisOrdinalOffset;\nuniform float xAxisPos;\nuniform bool xAxisCVSCoord;\nuniform float yAxisTrans;\nuniform float yAxisMin;\nuniform float yAxisMinPad;\nuniform float yAxisPointRange;\nuniform float yAxisLen;\nuniform bool yAxisPostTranslate;\nuniform float yAxisOrdinalSlope;\nuniform float yAxisOrdinalOffset;\nuniform float yAxisPos;\nuniform bool yAxisCVSCoord;\nuniform bool isBubble;\nuniform bool bubbleSizeByArea;\nuniform float bubbleZMin;\nuniform float bubbleZMax;\nuniform float bubbleZThreshold;\nuniform float bubbleMinSize;\nuniform float bubbleMaxSize;\nuniform bool bubbleSizeAbs;\nuniform bool isInverted;\nfloat bubbleRadius(){\nfloat value \x3d aVertexPosition.w;\nfloat zMax \x3d bubbleZMax;\nfloat zMin \x3d bubbleZMin;\nfloat radius \x3d 0.0;\nfloat pos \x3d 0.0;\nfloat zRange \x3d zMax - zMin;\nif (bubbleSizeAbs){\nvalue \x3d value - bubbleZThreshold;\nzMax \x3d max(zMax - bubbleZThreshold, zMin - bubbleZThreshold);\nzMin \x3d 0.0;\n}\nif (value \x3c zMin){\nradius \x3d bubbleZMin / 2.0 - 1.0;\n} else {\npos \x3d zRange \x3e 0.0 ? (value - zMin) / zRange : 0.5;\nif (bubbleSizeByArea \x26\x26 pos \x3e 0.0){\npos \x3d sqrt(pos);\n}\nradius \x3d ceil(bubbleMinSize + pos * (bubbleMaxSize - bubbleMinSize)) / 2.0;\n}\nreturn radius * 2.0;\n}\nfloat translate(float val,\nfloat pointPlacement,\nfloat localA,\nfloat localMin,\nfloat minPixelPadding,\nfloat pointRange,\nfloat len,\nbool cvsCoord\n){\nfloat sign \x3d 1.0;\nfloat cvsOffset \x3d 0.0;\nif (cvsCoord) {\nsign *\x3d -1.0;\ncvsOffset \x3d len;\n}\nreturn sign * (val - localMin) * localA + cvsOffset + \n(sign * minPixelPadding);\n}\nfloat xToPixels(float value){\nif (skipTranslation){\nreturn value;// + xAxisPos;\n}\nreturn translate(value, 0.0, xAxisTrans, xAxisMin, xAxisMinPad, xAxisPointRange, xAxisLen, xAxisCVSCoord);// + xAxisPos;\n}\nfloat yToPixels(float value, float checkTreshold){\nfloat v;\nif (skipTranslation){\nv \x3d value;// + yAxisPos;\n} else {\nv \x3d translate(value, 0.0, yAxisTrans, yAxisMin, yAxisMinPad, yAxisPointRange, yAxisLen, yAxisCVSCoord);// + yAxisPos;\n}\nif (checkTreshold \x3e 0.0 \x26\x26 hasThreshold) {\nv \x3d min(v, translatedThreshold);\n}\nreturn v;\n}\nvoid main(void) {\nif (isBubble){\ngl_PointSize \x3d bubbleRadius();\n} else {\ngl_PointSize \x3d pSize;\n}\nvColor \x3d aColor;\nif (isInverted) {\ngl_Position \x3d uPMatrix * vec4(xToPixels(aVertexPosition.y) + yAxisPos, yToPixels(aVertexPosition.x, aVertexPosition.z) + xAxisPos, 0.0, 1.0);\n} else {\ngl_Position \x3d uPMatrix * vec4(xToPixels(aVertexPosition.x) + xAxisPos, yToPixels(aVertexPosition.y, aVertexPosition.z) + yAxisPos, 0.0, 1.0);\n}\n}", "vertex"),k=c("precision highp float;\nuniform vec4 fillColor;\nvarying highp vec2 position;\nvarying highp vec4 vColor;\nuniform sampler2D uSampler;\nuniform bool isCircle;\nuniform bool hasColor;\nvoid main(void) {\nvec4 col \x3d fillColor;\nif (hasColor) {\ncol \x3d vColor;\n}\nif (isCircle) {\ngl_FragColor \x3d col * texture2D(uSampler, gl_PointCoord.st);\n} else {\ngl_FragColor \x3d col;\n}\n}","fragment");if(!e||!k)return l=!1;l=a.createProgram();a.attachShader(l,e);a.attachShader(l,k);a.linkProgram(l); a.useProgram(l);a.bindAttribLocation(l,0,"aVertexPosition");h=d("uPMatrix");v=d("pSize");E=d("fillColor");F=d("isBubble");f=d("bubbleSizeAbs");r=d("bubbleSizeByArea");z=d("uSampler");b=d("skipTranslation");n=d("isCircle");g=d("isInverted");return!0}function k(b,c){b=e[b]=e[b]||a.getUniformLocation(l,b);a.uniform1f(b,c)}var e={},l,h,v,E,F,f,r,b,n,g,z;a&&d();return{psUniform:function(){return v},pUniform:function(){return h},fillColorUniform:function(){return E},setBubbleUniforms:function(b,c,d){var e= b.options,l=Number.MAX_VALUE,h=-Number.MAX_VALUE;"bubble"===b.type&&(l=D(e.zMin,Math.min(l,Math.max(c,!1===e.displayNegative?e.zThreshold:-Number.MAX_VALUE))),h=D(e.zMax,Math.max(h,d)),a.uniform1i(F,1),a.uniform1i(n,1),a.uniform1i(r,"width"!==b.options.sizeBy),a.uniform1i(f,b.options.sizeByAbsoluteValue),k("bubbleZMin",l),k("bubbleZMax",h),k("bubbleZThreshold",b.options.zThreshold),k("bubbleMinSize",b.minPxSize),k("bubbleMaxSize",b.maxPxSize))},bind:function(){a.useProgram(l)},program:function(){return l}, create:d,setUniform:k,setPMatrix:function(b){a.uniformMatrix4fv(h,!1,b)},setColor:function(b){a.uniform4f(E,b[0]/255,b[1]/255,b[2]/255,b[3])},setPointSize:function(b){a.uniform1f(v,b)},setSkipTranslation:function(c){a.uniform1i(b,!0===c?1:0)},setTexture:function(){a.uniform1i(z,0)},setDrawAsCircle:function(b){a.uniform1i(n,b?1:0)},reset:function(){a.uniform1i(F,0);a.uniform1i(n,0)},setInverted:function(b){a.uniform1i(g,b)},destroy:function(){a&&l&&a.deleteProgram(l)}}}function X(a,c,d){var k=!1,e= !1,l=d||2,h=!1,v=0,g;return{destroy:function(){k&&a.deleteBuffer(k)},bind:function(){if(!k)return!1;a.vertexAttribPointer(e,l,a.FLOAT,!1,0,0)},data:g,build:function(d,f,r){g=d||[];if(!(g&&0!==g.length||h))return k=!1;l=r||l;k&&a.deleteBuffer(k);k=a.createBuffer();a.bindBuffer(a.ARRAY_BUFFER,k);a.bufferData(a.ARRAY_BUFFER,h||new Float32Array(g),a.STATIC_DRAW);e=a.getAttribLocation(c.program(),f);a.enableVertexAttribArray(e);return!0},render:function(c,d,e){var b=h?h.length:g.length;if(!k||!b)return!1; if(!c||c>b||0>c)c=0;if(!d||d>b)d=b;a.drawArrays(a[(e||"points").toUpperCase()],c/l,(d-c)/l);return!0},allocate:function(a){v=-1;h=new Float32Array(4*a)},push:function(a,c,d,b){h&&(h[++v]=a,h[++v]=c,h[++v]=d,h[++v]=b)}}}function ga(a){function c(a){var b,c;return x(a)?(b=!!a.options.stacking,c=a.xData||a.options.xData||a.processedXData,b=(b?a.data:c||a.options.data).length,"treemap"===a.type?b*=12:"heatmap"===a.type?b*=6:O[a.type]&&(b*=2),b):0}function d(){b.clear(b.COLOR_BUFFER_BIT|b.DEPTH_BUFFER_BIT)} function k(a,b){function c(a){a&&(b.colorData.push(a[0]),b.colorData.push(a[1]),b.colorData.push(a[2]),b.colorData.push(a[3]))}function d(a,b,d,e,k){c(k);p.usePreallocated?r.push(a,b,d?1:0,e||1):(z.push(a),z.push(b),z.push(d?1:0),z.push(e||1))}function e(a,b,e,k,f){c(f);d(a+e,b);c(f);d(a,b);c(f);d(a,b+k);c(f);d(a,b+k);c(f);d(a+e,b+k);c(f);d(a+e,b)}var k=a.pointArrayMap&&"low,high"===a.pointArrayMap.join(","),B=a.chart,f=a.options,N=!!f.stacking,l=f.data,g=a.xAxis.getExtremes(),v=g.min,n=g.max,g=a.yAxis.getExtremes(), u=g.min,q=g.max,g=a.xData||f.xData||a.processedXData,w=a.yData||f.yData||a.processedYData,m=a.zData||f.zData||a.processedZData,F=a.yAxis,A=a.xAxis,x=!g||0===g.length,t=a.points||!1,C=!1,E,I,J,G=N?a.data:g||l;f.boostData&&0b.node.levelDynamic)return 1;if(a.node.levelDynamicb.zMax&&(b.zMax=c[2]),c[2]b.zMax&&(b.zMax=m[e]),m[e]=v&&K<=n&&(Y=!0);g&&g>=v&&g<=n&&(Z=!0);k?(x&&(h=c.slice(1,3)),h=h[1]):N&&(f=c.x,h=c.stackY);a.requireSorting||(T=h>=u&&h<=q);h&&T&&(f>=v&&f<=n&&(t=!0),t||Y||Z)&&(p.useGPUTranslations||(b.skipTranslation=!0,f=A.toPixels(f,!0),h=F.toPixels(h,!0)),r&& (E=0,0>h&&(E=h,h=0),p.useGPUTranslations||(E=F.toPixels(E,!0)),d(f,E,0,0,!1)),b.hasMarkers&&!1!==C&&(a.closestPointRangePx=Math.min(a.closestPointRangePx,Math.abs(f-C))),d(f,h,0,"bubble"===a.type?l||1:2,!1),C=f)}))}function e(){u=[];C.data=z=[];w=[]}function l(a){f&&(f.setUniform("xAxisTrans",a.transA),f.setUniform("xAxisMin",a.min),f.setUniform("xAxisMinPad",a.minPixelPadding),f.setUniform("xAxisPointRange",a.pointRange),f.setUniform("xAxisLen",a.len),f.setUniform("xAxisPos",a.pos),f.setUniform("xAxisCVSCoord", !a.horiz))}function g(a){f&&(f.setUniform("yAxisTrans",a.transA),f.setUniform("yAxisMin",a.min),f.setUniform("yAxisMinPad",a.minPixelPadding),f.setUniform("yAxisPointRange",a.pointRange),f.setUniform("yAxisLen",a.len),f.setUniform("yAxisPos",a.pos),f.setUniform("yAxisCVSCoord",!a.horiz))}function v(a,b){f.setUniform("hasThreshold",a);f.setUniform("translatedThreshold",b)}function q(c){if(c)n=c.chartWidth||800,A=c.chartHeight||400;else return!1;if(!b||!n||!A)return!1;p.timeRendering&&console.time("gl rendering"); f.bind();b.viewport(0,0,n,A);f.setPMatrix([2/n,0,0,0,0,-(2/A),0,0,0,0,-2,0,-1,1,-1,1]);b.lineWidth(p.lineWidth);r.build(C.data,"aVertexPosition",4);r.bind();m&&(b.bindTexture(b.TEXTURE_2D,L),f.setTexture(L));f.setInverted(c.options.chart?c.options.chart.inverted:!1);y(u,function(a,c){var d=a.series.options,e=d.threshold,k=P(e),e=a.series.yAxis.getThreshold(e),K=D(d.marker?d.marker.enabled:null,a.series.xAxis.isRadial?!0:null,a.series.closestPointRangePx>2*((d.marker?d.marker.radius:10)||10)),B=a.series.fillOpacity? (new aa(a.series.color)).setOpacity(D(d.fillOpacity,.85)).get():a.series.color;r.bind();d.colorByPoint&&(B=a.series.chart.options.colors[c]);B=h.color(B).rgba;p.useAlpha||(B[3]=1);"add"===d.boostBlending?(b.blendFunc(b.SRC_ALPHA,b.ONE),b.blendEquation(b.FUNC_ADD)):"mult"===d.boostBlending?b.blendFunc(b.DST_COLOR,b.ZERO):"darken"===d.boostBlending?(b.blendFunc(b.ONE,b.ONE),b.blendEquation(b.FUNC_MIN)):(b.blendFunc(b.SRC_ALPHA,b.ONE_MINUS_SRC_ALPHA),b.blendEquation(b.FUNC_ADD));f.reset();0(c.boostThreshold||Number.MAX_VALUE)&&P(k.min)&&P(k.max)&&(!a||P(d.min)&&P(d.max))},destroyGraphics:function(){var a=this,c=this.points, d,k;if(c)for(k=0;k=r&&g<=b),null!==g&&d>=x&&d<=f&&q))if(a=Math.ceil(e.toPixels(d,!0)),z){if(void 0===p||a===A){t||(l=g);if(void 0===B||g>D)D=g,B=c;if(void 0===p||l