{"version":3,"sources":["wx-f2.min.js"],"names":[],"mappings":";;;;;;;AAAA","file":"index.js","sourcesContent":["!function(t,e){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define([],e):\"object\"==typeof exports?exports.wxF2=e():t.wxF2=e()}(\"undefined\"!=typeof self?self:this,function(){return function(t){function e(n){if(i[n])return i[n].exports;var r=i[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var i={};return e.m=t,e.c=i,e.d=function(t,i,n){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,\"a\",i),i},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p=\"\",e(e.s=51)}([function(t,e,i){var n=i(57),r={upperFirst:i(58),lowerFirst:i(59),isString:i(15),isNumber:i(16),isBoolean:i(60),isFunction:i(61),isDate:i(33),isArray:i(13),isNil:i(10),isObject:i(18),isPlainObject:i(34),deepMix:i(63),mix:i(19),each:i(4),isObjectValueEqual:function(t,e){t=Object.assign({},t),e=Object.assign({},e);var i=Object.getOwnPropertyNames(t),n=Object.getOwnPropertyNames(e);if(i.length!==n.length)return!1;for(var r=0,a=i.length;r0){var a=e.strokeOpacity;n.isNil(a)||1===a||(t.globalAlpha=a),t.stroke()}}},i.getBBox=function(){var t=this._attrs.bbox;return t||((t=this.calculateBox())&&(t.x=t.minX,t.y=t.minY,t.width=t.maxX-t.minX,t.height=t.maxY-t.minY),this._attrs.bbox=t),t},i.calculateBox=function(){return null},i.createPath=function(){},e}(i(27));t.exports=r},function(t,e,i){var n={Canvas:i(82),Group:i(39),Shape:i(2),Matrix:i(28),Vector2:i(9)};i(84),i(85),i(86),i(87),i(88),i(89),i(90),i(91),i(92),t.exports=n},function(t,e,i){var n=i(18),r=i(13);t.exports=function(t,e){if(t)if(r(t))for(var i=0,a=t.length;is&&(s=u)}(ae.max)&&e.change({min:a,max:s})},i._sort=function(t){var e=this.getXScale(),i=e.field,n=e.type;\"identity\"!==n&&e.values.length>1&&r.each(t,function(t){t.sort(function(t,r){return\"timeCat\"===n?e._toTimeStamp(t._origin[i])-e._toTimeStamp(r._origin[i]):e.translate(t._origin[i])-e.translate(r._origin[i])})}),this.set(\"hasSorted\",!0),this.set(\"dataArray\",t)},i.paint=function(){var t=this.get(\"dataArray\"),e=[],i=this.getShapeFactory();i.setCoord(this.get(\"coord\")),this._beforeMapping(t);for(var n=0,r=t.length;n1)for(var p=0,g=f.length;p=0?e:0:e},i._normalizeValues=function(t,e){var i=[];if(r.isArray(t))for(var n=0,a=t.length;ne);r++){if(n[n.length-1][1]<=e){r=n.length-1;break}if(n[r][0]<=e&&n[r][1]>e)break}}else{(n=t.values).sort(function(t,e){return t-e});for(var o=n.length;re)&&!((n[r-1]+n[r])/2<=e&&(n[r+1]+n[r])/2>e);r++)if((n[n.length-2]+n[n.length-1])/2<=e){r=n.length-1;break}}return n[r]},i.getSnapRecords=function(t){var e=this,i=e.get(\"coord\"),n=e.getXScale(),a=e.getYScale(),s=n.field,o=e.get(\"dataArray\");this.get(\"hasSorted\")||this._sort(o);var c=[],h=i.invertPoint(t),l=h.x;e.isInCircle()&&!i.transposed&&l>(1+n.rangeMax())/2&&(l=n.rangeMin());var u=n.invert(l);n.isCategory||(u=e._getSnap(n,u));var f=[];if(o.forEach(function(t){t.forEach(function(t){var i=r.isNil(t._origin)?t[s]:t._origin[s];e._isEqual(i,u,n)&&f.push(t)})}),this.hasAdjust(\"stack\")&&i.isPolar&&i.transposed&&1===n.values.length){if(l>=0&&l<=1){var p=a.invert(h.y);p=e._getSnap(a,p,f),f.forEach(function(t){(r.isArray(p)?t._originY.toString()===p.toString():t._originY===p)&&c.push(t)})}}else c=f;return c},i._isEqual=function(t,e,i){return\"timeCat\"===i.type?i._toTimeStamp(t)===e:e===t},i.position=function(t){return this._setAttrOptions(\"position\",{field:t}),this},i.color=function(t,e){return this._createAttrOption(\"color\",t,e,o.colors),this},i.size=function(t,e){return this._createAttrOption(\"size\",t,e,o.sizes),this},i.shape=function(t,e){var i=this.get(\"type\"),n=o.shapes[i]||[];return this._createAttrOption(\"shape\",t,e,n),this},i.style=function(t,e){var i=this.get(\"styleOptions\");i||(i={},this.set(\"styleOptions\",i)),r.isObject(t)&&(e=t,t=null);var a;return t&&(a=n(t)),i.fields=a,i.style=e,this},i.adjust=function(t){return r.isString(t)&&(t={type:t}),this.set(\"adjust\",t),this},i.animate=function(t){return this.set(\"animateCfg\",t),this},i.reset=function(){this.set(\"attrOptions\",{}),this.set(\"adjust\",null),this.clearInner()},i.clearInner=function(){var t=this.get(\"container\");t&&(t.clear(),t.setMatrix([1,0,0,1,0,0])),t&&t.clear(),this.set(\"attrs\",{}),this.set(\"groupScales\",null),this.set(\"xDistance\",null),this.set(\"_width\",null)},i.clear=function(){this.clearInner(),this.set(\"scales\",{})},i.destroy=function(){this.clear(),t.prototype.destroy.call(this)},i._display=function(t){this.set(\"visible\",t);var e=this.get(\"container\"),i=e.get(\"canvas\");e.set(\"visible\",t),i.draw()},i.show=function(){this._display(!0)},i.hide=function(){this._display(!1)},e}(a);t.exports=u},function(t,e,i){var n=i(0),r={min:0,median:.5,max:1},a=function(){function t(t){this._initDefaultCfg(),n.deepMix(this,t)}var e=t.prototype;return e._initDefaultCfg=function(){},e._getNormalizedValue=function(t,e){return n.isNil(r[t])?e.scale(t):r[t]},e.parsePercentPoint=function(t,e){var i=parseFloat(e[0])/100,n=parseFloat(e[1])/100,r=t.start,a=t.end,s=Math.abs(r.x-a.x),o=Math.abs(r.y-a.y);return{x:s*i+Math.min(r.x,a.x),y:o*n+Math.min(r.y,a.y)}},e.parsePoint=function(t,e){var i=this.xScale,r=this.yScales;if(n.isFunction(e)&&(e=e(i,r)),n.isString(e[0])&&-1!==e[0].indexOf(\"%\"))return this.parsePercentPoint(t,e);var a=this._getNormalizedValue(e[0],i),s=this._getNormalizedValue(e[1],r[0]),o=t.convertPoint({x:a,y:s});return this.limitInPlot?a>=0&&a<=1&&s>=0&&s<=1?o:null:o},e.render=function(){},e.repaint=function(){this.remove();var t=this.coord,e=this.container,i=this.canvas;e&&!e.isDestroyed()&&(this.render(t,e),i.draw())},e.remove=function(){var t=this.element;t&&t.remove(!0)},e.changeVisible=function(t){this.visible=t;var e=this.element;e&&(e.set?e.set(\"visible\",t):e.style.display=t?\"\":\"none\")},t}();t.exports=a},function(t,e,i){function n(t){if(void 0===t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return t}function r(t,e){return t-e}var a=i(35),s=i(64),o=i(0),c=i(65),h=i(5),l=i(73),u=i(79),f=i(1),p=i(3).Canvas,g=i(21),d=function(t){function e(e){var i,r=n(n(i=t.call(this,e)||this));return o.each(h,function(t,e){var i=o.lowerFirst(e);r[i]=function(e){var i=new t(e);return r.addGeom(i),i}}),r._init(),i}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}(e,t),e.initPlugins=function(){return{_plugins:[],_cacheId:0,register:function(t){var e=this._plugins;[].concat(t).forEach(function(t){-1===e.indexOf(t)&&e.push(t)}),this._cacheId++},unregister:function(t){var e=this._plugins;[].concat(t).forEach(function(t){var i=e.indexOf(t);-1!==i&&e.splice(i,1)}),this._cacheId++},clear:function(){this._plugins=[],this._cacheId++},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(t,e,i){var n,r,a,s,o,c=this.descriptors(t),h=c.length;for(n=0;n0?l.change({min:0}):g<=0&&l.change({max:0}))}}},i._removeGeoms=function(){for(var t=this.get(\"geoms\");t.length>0;){t.shift().destroy()}},i._clearGeoms=function(){for(var t=this.get(\"geoms\"),e=0,i=t.length;e=0;return i?r?2*Math.PI-n:n:r?n:2*Math.PI-n},zero:function(t){return 0===t[0]&&0===t[1]},distance:function(t,e){var i=e[0]-t[0],n=e[1]-t[1];return Math.sqrt(i*i+n*n)},clone:function(t){return[t[0],t[1]]},min:function(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t},max:function(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t},transformMat2d:function(t,e,i){var n=e[0],r=e[1];return t[0]=i[0]*n+i[2]*r+i[4],t[1]=i[1]*n+i[3]*r+i[5],t}}},function(t,e){t.exports=function(t){return null===t||void 0===t}},function(t,e){var i={}.toString;t.exports=function(t,e){return i.call(t)===\"[object \"+e+\"]\"}},function(t,e,i){var n,r=i(0),a=i(7);r.isWx||r.isMy||(n=i(139));var s=[\"touchstart\",\"touchmove\",\"touchend\"],o=function(){function t(t,e){var i=this.getDefaultCfg();r.deepMix(this,i,t),this.chart=e,this.canvas=e.get(\"canvas\"),this.el=e.get(\"canvas\").get(\"el\"),this._bindEvents()}var e=t.prototype;return e.getDefaultCfg=function(){return{startEvent:s[0],processEvent:s[1],endEvent:s[2],resetEvent:null}},e._start=function(t){this.preStart&&this.preStart(t),this.start(t),this.onStart&&this.onStart(t)},e._process=function(t){this.preProcess&&this.preProcess(t),this.process(t),this.onProcess&&this.onProcess(t)},e._end=function(t){this.preEnd&&this.preEnd(t),this.end(t),this.onEnd&&this.onEnd(t)},e._reset=function(t){this.preReset&&this.preReset(t),this.reset(t),this.onReset&&this.onReset(t)},e.start=function(){},e.process=function(){},e.end=function(){},e.reset=function(){},e._bindEvents=function(){this._clearEvents();var t=this.startEvent,e=this.processEvent,i=this.endEvent,r=this.resetEvent,a=this.el;n&&(this.hammer=new n(a)),this._bindEvent(t,\"_start\"),this._bindEvent(e,\"_process\"),this._bindEvent(i,\"_end\"),this._bindEvent(r,\"_reset\")},e._clearEvents=function(){var t=this.startEvent,e=this.processEvent,i=this.endEvent,n=this.resetEvent;this.hammer&&(this.hammer.destroy(),this.hammer=null),this._clearTouchEvent(t,\"_start\"),this._clearTouchEvent(e,\"_process\"),this._clearTouchEvent(i,\"_end\"),this._clearTouchEvent(n,\"_reset\")},e._bindEvent=function(t,e){var i=this.el;t&&(-1!==s.indexOf(t)?r.addEventListener(i,t,r.wrapBehavior(this,e)):this.hammer&&this.hammer.on(t,r.wrapBehavior(this,e)))},e._clearTouchEvent=function(t,e){var i=this.el;t&&-1!==s.indexOf(t)&&r.removeEventListener(i,t,r.getWrapBehavior(this,e))},e.destroy=function(){this._clearEvents()},t}();a._Interactions={},a.registerInteraction=function(t,e){a._Interactions[t]=e},a.getInteraction=function(t){return a._Interactions[t]},a.prototype.interaction=function(t,e){var i=this._interactions||{};i[t]&&i[t].destroy();var n=new(a.getInteraction(t))(e,this);return i[t]=n,this._interactions=i,this},a.prototype.clearInteraction=function(t){var e=this._interactions;if(e)return t?(e[t]&&e[t].destroy(),delete e[t]):r.each(e,function(t,i){t.destroy(),delete e[i]}),this},t.exports=o},function(t,e,i){var n=i(11),r=Array.isArray?Array.isArray:function(t){return n(t,\"Array\")};t.exports=r},function(t,e,i){function n(t,e,i,n,a){return{x:r(a,t.x,e.x,i.x,n.x),y:r(a,t.y,e.y,i.y,n.y)}}function r(t,e,i,n,r){var a=t*t;return e+(3*-e+t*(3*e-e*t))*t+(3*i+t*(-6*i+3*i*t))*t+(3*n-3*n*t)*a+r*(a*t)}function a(t){for(var e=1/0,i=-1/0,r=1/0,a=-1/0,s={x:t[0],y:t[1]},o={x:t[2],y:t[3]},c={x:t[4],y:t[5]},h={x:t[6],y:t[7]},l=0;l<100;l++){var u=n(s,o,c,h,l/100);u.xi&&(i=u.x),u.ya&&(a=u.y)}return{minX:e,minY:r,maxX:i,maxY:a}}var s=i(9),o=s.create(),c=s.create(),h=s.create();t.exports={getBBoxFromPoints:function(t,e){if(0!==t.length){for(var i=t[0],n=i.x,r=i.x,a=i.y,s=i.y,o=t.length,c=1;c1e-4)return{minX:t-i,minY:e-i,maxX:t+i,maxY:e+i};o[0]=Math.cos(n)*i+t,o[1]=Math.sin(n)*i+e,c[0]=Math.cos(r)*i+t,c[1]=Math.sin(r)*i+e;var u=[0,0],f=[0,0];if(s.min(u,o,c),s.max(f,o,c),(n%=2*Math.PI)<0&&(n+=2*Math.PI),(r%=2*Math.PI)<0&&(r+=2*Math.PI),n>r&&!a?r+=2*Math.PI:nn&&(h[0]=Math.cos(g)*i+t,h[1]=Math.sin(g)*i+e,s.min(u,h,u),s.max(f,h,f));return{minX:u[0],minY:u[1],maxX:f[0],maxY:f[1]}},getBBoxFromBezierGroup:function(t,e){for(var i=1/0,n=-1/0,r=1/0,s=-1/0,o=0,c=t.length;on&&(n=h.maxX),h.minYs&&(s=h.maxY)}return e=e/2||0,{minX:i-e,minY:r-e,maxX:n+e,maxY:s+e}}}},function(t,e,i){var n=i(11);t.exports=function(t){return n(t,\"String\")}},function(t,e,i){var n=i(11);t.exports=function(t){return n(t,\"Number\")}},function(t,e,i){var n=i(19),r=i(4),a=i(18),s=i(10),o=function(){function t(t){this._initDefaultCfg(),n(this,t),this.init()}var e=t.prototype;return e._initDefaultCfg=function(){this.type=\"base\",this.formatter=null,this.range=[0,1],this.ticks=null,this.values=[]},e.init=function(){},e.getTicks=function(){var t=this,e=t.ticks,i=[];return r(e,function(e){var n;n=a(e)?e:{text:t.getText(e),tickValue:e,value:t.scale(e)},i.push(n)}),i},e.getText=function(t,e){var i=this.formatter;return t=i?i(t,e):t,!s(t)&&t.toString||(t=\"\"),t.toString()},e.rangeMin=function(){return this.range[0]},e.rangeMax=function(){var t=this.range;return t[t.length-1]},e.invert=function(t){return t},e.translate=function(t){return t},e.scale=function(t){return t},e.clone=function(){var t=this,e=t.constructor,i={};return r(t,function(e,n){i[n]=t[n]}),new e(i)},e.change=function(t){return this.ticks=null,n(this,t),this.init(),this},t}();t.exports=o},function(t,e){var i=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t};t.exports=function(t){var e=void 0===t?\"undefined\":i(t);return null!==t&&\"object\"===e||\"function\"===e}},function(t,e){function i(t,e){for(var i in e)e.hasOwnProperty(i)&&\"constructor\"!==i&&void 0!==e[i]&&(t[i]=e[i])}t.exports=function(t,e,n,r){return e&&i(t,e),n&&i(t,n),r&&i(t,r),t}},function(t,e,i){function n(t,e){return r(e)?e:t.invert(t.scale(e))}var r=i(15),a=i(13),s=i(19),o=i(4),c=function(){function t(t){this.type=\"base\",this.name=null,this.method=null,this.values=[],this.scales=[],this.linear=null,s(this,t)}var e=t.prototype;return e._getAttrValue=function(t,e){var i=this.values;if(t.isCategory&&!this.linear){return i[t.translate(e)%i.length]}var n=t.scale(e);return this.getLinearValue(n)},e.getLinearValue=function(t){var e=this.values,i=e.length-1,n=Math.floor(i*t),r=i*t-n,a=e[n];return a+((n===i?a:e[n+1])-a)*r},e.callback=function(t){var e=this.scales[0];return\"identity\"===e.type?e.value:this._getAttrValue(e,t)},e.getNames=function(){for(var t=this.scales,e=this.names,i=Math.min(t.length,e.length),n=[],r=0;r=r.x&&i<=a.x&&n>=r.y&&n<=s.y}}},function(t,e,i){var n=i(0),r={splitPoints:function(t){var e=[],i=t.x,r=t.y;return(r=n.isArray(r)?r:[r]).forEach(function(t,r){var a={x:n.isArray(i)?i[r]:i,y:t};e.push(a)}),e},splitArray:function(t,e,i){if(!t.length)return[];var r,a=[],s=[];return n.each(t,function(t){r=t._origin?t._origin[e]:t[e],i?n.isNil(r)||s.push(t):n.isArray(r)&&n.isNil(r[0])||n.isNil(r)?s.length&&(a.push(s),s=[]):s.push(t)}),s.length&&a.push(s),a}};t.exports=r},function(t,e,i){var n=i(29),r=i(0);t.exports={getColDef:function(t,e){var i;return t.get(\"colDefs\")&&t.get(\"colDefs\")[e]&&(i=t.get(\"colDefs\")[e]),i},getFieldRange:function(t,e,i){if(!t)return[0,1];var n=0,r=0;if(\"linear\"===i){var a=e.min,s=e.max;n=(t.min-a)/(s-a),r=(t.max-a)/(s-a)}else{var o=e,c=t.values,h=o.indexOf(c[0]),l=o.indexOf(c[c.length-1]);n=h/(o.length-1),r=l/(o.length-1)}return[n,r]},getLimitRange:function(t,e){var i,a=e.field,s=e.type,o=r.Array.values(t,a);return\"linear\"===s?(i=r.Array.getRange(o),e.mini.max&&(i.max=e.max)):\"timeCat\"===s?(r.each(o,function(t,e){o[e]=n.toTimeStamp(t)}),o.sort(function(t,e){return t-e}),i=o):i=o,i}}},function(t,e,i){var n=i(0),r=function(){function t(t){this._initDefaultCfg(),n.mix(this,t);var e,i;this.plot?(e=this.plot.bl,i=this.plot.tr,this.start=e,this.end=i):(e=this.start,i=this.end),this.init(e,i)}var e=t.prototype;return e._initDefaultCfg=function(){},e.init=function(){},e.convertPoint=function(t){return t},e.invertPoint=function(t){return t},e.reset=function(t){this.plot=t;var e=t.bl,i=t.tr;this.start=e,this.end=i,this.init(e,i)},t}();t.exports=r},function(t,e,i){var n=i(19),r=function(){function t(t){this._initDefaultCfg(),n(this,t)}var e=t.prototype;return e._initDefaultCfg=function(){this.adjustNames=[\"x\",\"y\"]},e.processAdjust=function(){},t}();t.exports=r},function(t,e,i){var n=i(0),r=i(1),a=i(9),s=function(){function t(t){this._initDefaultCfg(),n.mix(this,t),this.draw()}var e=t.prototype;return e._initDefaultCfg=function(){this.ticks=[],this.tickLine={},this.offsetFactor=1,this.frontContainer=null,this.backContainer=null,this.gridPoints=[]},e.draw=function(){var t=this.line,e=this.tickLine,i=this.label,n=this.grid;n&&this.drawGrid(n),e&&this.drawTicks(e),t&&this.drawLine(t),i&&this.drawLabels()},e.drawTicks=function(t){var e=this,i=e.ticks,r=t.length,a=e.getContainer(t.top);n.each(i,function(i){var s=e.getOffsetPoint(i.value),o=e.getSidePoint(s,r);a.addShape(\"line\",{className:\"axis-tick\",attrs:n.mix({x1:s.x,y1:s.y,x2:o.x,y2:o.y},t)})._id=e._id+\"-ticks\"})},e.drawLabels=function(){var t=this,e=t.labelOffset,i=t.labels;n.each(i,function(i){var r=t.getContainer(i.get(\"top\")),a=t.getOffsetPoint(i.get(\"value\")),s=t.getSidePoint(a,e),o=s.x,c=s.y;i.attr(n.mix({x:o,y:c},t.getTextAlignInfo(a,e),i.get(\"textStyle\"))),i._id=t._id+\"-\"+i.attr(\"text\"),r.add(i)})},e.drawLine=function(){},e.drawGrid=function(t){var e=this,i=e.gridPoints,s=e.ticks,o=t,c=i.length;n.each(i,function(i,h){if(n.isFunction(t)){var l=s[h]||{},u=t(l.text,h,c);o=u?n.mix({},r._defaultAxis.grid,u):null}if(o){var f,p=o.type,g=i.points,d=e.getContainer(o.top);if(\"arc\"===p){var v=e.center,y=e.startAngle,m=e.endAngle,x=a.length([g[0].x-v.x,g[0].y-v.y]);f=d.addShape(\"Arc\",{className:\"axis-grid\",attrs:n.mix({x:v.x,y:v.y,startAngle:y,endAngle:m,r:x},o)})}else f=d.addShape(\"Polyline\",{className:\"axis-grid\",attrs:n.mix({points:g},o)});f._id=i._id}})},e.getOffsetPoint=function(){},e.getAxisVector=function(){},e.getOffsetVector=function(t,e){var i=this.getAxisVector(t),n=a.normalize([],i),r=this.offsetFactor,s=[-1*n[1]*r,n[0]*r];return a.scale([],s,e)},e.getSidePoint=function(t,e){var i=this.getOffsetVector(t,e);return{x:t.x+i[0],y:t.y+i[1]}},e.getTextAlignInfo=function(t,e){var i,n,r=this.getOffsetVector(t,e);return i=r[0]>0?\"left\":r[0]<0?\"right\":\"center\",n=r[1]>0?\"top\":r[1]<0?\"bottom\":\"middle\",{textAlign:i,textBaseline:n}},e.getContainer=function(t){var e=this.frontContainer,i=this.backContainer;return t?e:i},t}();t.exports=s},function(t,e,i){var n=i(0),r=i(28),a=i(9),s=i(83),o={stroke:\"strokeStyle\",fill:\"fillStyle\",opacity:\"globalAlpha\"},c=[\"fillStyle\",\"font\",\"globalAlpha\",\"lineCap\",\"lineWidth\",\"lineJoin\",\"miterLimit\",\"shadowBlur\",\"shadowColor\",\"shadowOffsetX\",\"shadowOffsetY\",\"strokeStyle\",\"textAlign\",\"textBaseline\",\"lineDash\"],h=[\"circle\",\"sector\",\"polygon\",\"rect\",\"polyline\"],l=function(){function t(t){this._initProperties(),n.mix(this._attrs,t);var e=this._attrs.attrs;e&&this.initAttrs(e),this.initTransform()}var e=t.prototype;return e._initProperties=function(){this._attrs={zIndex:0,visible:!0,destroyed:!1}},e.get=function(t){return this._attrs[t]},e.set=function(t,e){this._attrs[t]=e},e.isGroup=function(){return this.get(\"isGroup\")},e.isShape=function(){return this.get(\"isShape\")},e.initAttrs=function(t){this.attr(n.mix(this.getDefaultAttrs(),t))},e.getDefaultAttrs=function(){return{}},e._setAttr=function(t,e){var i=this._attrs.attrs;if(\"clip\"===t)e=this._setAttrClip(e);else{var n=o[t];n&&(i[n]=e)}i[t]=e},e._getAttr=function(t){return this._attrs.attrs[t]},e._setAttrClip=function(t){return t&&h.indexOf(t._attrs.type)>-1?(null===t.get(\"canvas\")&&(t=Object.assign({},t)),t.set(\"parent\",this.get(\"parent\")),t.set(\"context\",this.get(\"context\")),t):null},e.attr=function(t,e){if(this.get(\"destroyed\"))return null;var i=arguments.length;if(0===i)return this._attrs.attrs;if(n.isObject(t)){this._attrs.bbox=null;for(var r in t)this._setAttr(r,t[r]);return this._afterAttrsSet&&this._afterAttrsSet(),this}return 2===i?(this._attrs.bbox=null,this._setAttr(t,e),this._afterAttrsSet&&this._afterAttrsSet(),this):this._getAttr(t)},e.getParent=function(){return this.get(\"parent\")},e.draw=function(t){this.get(\"destroyed\")||this.get(\"visible\")&&(this.setContext(t),this.drawInner(t),this.restoreContext(t))},e.setContext=function(t){var e=this._attrs.attrs.clip;t.save(),e&&(e.resetTransform(t),e.createPath(t),t.clip()),this.resetContext(t),this.resetTransform(t)},e.restoreContext=function(t){t.restore()},e.resetContext=function(t){var e=this._attrs.attrs;if(!this._attrs.isGroup)for(var i in e)if(c.indexOf(i)>-1){var r=e[i];\"fillStyle\"!==i&&\"strokeStyle\"!==i||(r=s.parseStyle(r,this,t)),\"lineDash\"===i&&t.setLineDash&&n.isArray(r)?t.setLineDash(r):t[i]=r}},e.hasFill=function(){return this.get(\"canFill\")&&this._attrs.attrs.fillStyle},e.hasStroke=function(){return this.get(\"canStroke\")&&this._attrs.attrs.strokeStyle},e.drawInner=function(){},e.show=function(){return this.set(\"visible\",!0),this},e.hide=function(){return this.set(\"visible\",!1),this},e.isVisible=function(){return this.get(\"visible\")},e._removeFromParent=function(){var t=this.get(\"parent\");if(t){var e=t.get(\"children\");n.Array.remove(e,this)}return this},e.remove=function(t){t?this.destroy():this._removeFromParent()},e.destroy=function(){if(this.get(\"destroyed\"))return null;this._removeFromParent(),this._attrs={},this.set(\"destroyed\",!0)},e.getBBox=function(){return{minX:0,maxX:0,minY:0,maxY:0,width:0,height:0}},e.initTransform=function(){var t=this._attrs.attrs||{};t.matrix||(t.matrix=[1,0,0,1,0,0]),this._attrs.attrs=t},e.getMatrix=function(){return this._attrs.attrs.matrix},e.setMatrix=function(t){this._attrs.attrs.matrix=[t[0],t[1],t[2],t[3],t[4],t[5]]},e.transform=function(t){var e=this._attrs.attrs.matrix;return this._attrs.attrs.matrix=r.transform(e,t),this},e.setTransform=function(t){return this._attrs.attrs.matrix=[1,0,0,1,0,0],this.transform(t)},e.translate=function(t,e){var i=this._attrs.attrs.matrix;r.translate(i,i,[t,e])},e.rotate=function(t){var e=this._attrs.attrs.matrix;r.rotate(e,e,t)},e.scale=function(t,e){var i=this._attrs.attrs.matrix;r.scale(i,i,[t,e])},e.moveTo=function(t,e){var i=this._attrs.x||0,n=this._attrs.y||0;this.translate(t-i,e-n),this.set(\"x\",t),this.set(\"y\",e)},e.apply=function(t){var e=this._attrs.attrs.matrix;return a.transformMat2d(t,t,e),this},e.resetTransform=function(t){var e=this._attrs.attrs.matrix;(function(t){return 1===t[0]&&0===t[1]&&0===t[2]&&1===t[3]&&0===t[4]&&0===t[5]})(e)||t.transform(e[0],e[1],e[2],e[3],e[4],e[5])},e.isDestroyed=function(){return this.get(\"destroyed\")},t}();t.exports=l},function(t,e){var i={multiply:function(t,e){return[t[0]*e[0]+t[2]*e[1],t[1]*e[0]+t[3]*e[1],t[0]*e[2]+t[2]*e[3],t[1]*e[2]+t[3]*e[3],t[0]*e[4]+t[2]*e[5]+t[4],t[1]*e[4]+t[3]*e[5]+t[5]]},scale:function(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[0],t[2]=e[2]*i[1],t[3]=e[3]*i[1],t[4]=e[4],t[5]=e[5],t},rotate:function(t,e,i){var n=Math.cos(i),r=Math.sin(i),a=e[0]*n+e[2]*r,s=e[1]*n+e[3]*r,o=e[0]*-r+e[2]*n,c=e[1]*-r+e[3]*n;return t[0]=a,t[1]=s,t[2]=o,t[3]=c,t[4]=e[4],t[5]=e[5],t},translate:function(t,e,i){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+e[0]*i[0]+e[2]*i[1],t[5]=e[5]+e[1]*i[0]+e[3]*i[1],t},transform:function(t,e){for(var n=[].concat(t),r=0,a=e.length;r0?new Date(t).getTime():new Date(t.replace(/-/gi,\"/\")).getTime()),r(t)&&(t=t.getTime()),t}}},function(t,e,i){var n=i(0),r=i(29);t.exports={beforeGeomInit:function(t){t.set(\"limitInPlot\",!0);var e=t.get(\"data\"),i=t.get(\"colDefs\");if(!i)return e;var a=t.get(\"geoms\"),s=!1;n.each(a,function(t){if(-1!==[\"area\",\"line\",\"path\"].indexOf(t.get(\"type\")))return s=!0,!1});var o=[];if(n.each(i,function(t,e){!s&&t&&(t.values||t.min||t.max)&&o.push(e)}),0===o.length)return e;var c=[];n.each(e,function(t){var e=!0;n.each(o,function(a){var s=t[a];if(s){var o=i[a];if(\"timeCat\"===o.type){var c=o.values;n.isNumber(c[0])&&(s=r.toTimeStamp(s))}(o.values&&-1===o.values.indexOf(s)||o.min&&so.max)&&(e=!1)}}),e&&c.push(t)}),t.set(\"filteredData\",c)}}},function(t,e,i){var n=i(23),r=i(0);t.exports={updateLinearScale:function(t,e,i){var a=this.chart,s=n.getColDef(a,t);a.scale(t,r.mix({},s,{min:e,max:i,nice:!1}))},updateCatScale:function(t,e,i,a,s,o){var c=this.chart,h=n.getColDef(c,t);c.scale(t,r.mix({},h,{values:e,ticks:i,scale:function(t){\"timeCat\"===this.type&&(t=this._toTimeStamp(t));var e,i,n,r=this.rangeMin(),c=this.rangeMax(),h=c-r,l=a.indexOf(t);if(l>=0&&l0?-.1:r-.1)-h,n=l/s;else if(l>=0&&l>o)i=(e=c<1?1.1:c+.1)+h,n=(l-o-1)/(a.length-1-o);else{var u=this.translate(t);n=1===this.values.length?u:u/(this.values.length-1),e=r,i=c}return e+n*(i-e)},getTicks:function(){var t=this,e=this.ticks,i=[];return r.each(e,function(e){var n;if(r.isObject(e))n=e;else{var a=t.scale(e);a=a>=0&&a<=1?a:NaN,n={text:r.isString(e)?e:t.getText(e),value:a,tickValue:e}}i.push(n)}),i}}))}}},function(t,e,i){var n=i(10);t.exports=function(t){return n(t)?\"\":t.toString()}},function(t,e,i){var n=i(11);t.exports=function(t){return n(t,\"Date\")}},function(t,e,i){var n=i(62),r=i(11);t.exports=function(t){if(!n(t)||!r(t,\"Object\"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}},function(t,e,i){var n=i(0),r=function(){function t(t){var e={},i=this.getDefaultCfg();this._attrs=e,n.mix(e,i,t)}var e=t.prototype;return e.getDefaultCfg=function(){return{}},e.get=function(t){return this._attrs[t]},e.set=function(t,e){this._attrs[t]=e},e.destroy=function(){this._attrs={},this.destroyed=!0},t}();t.exports=r},function(t,e,i){var n=i(17),r=i(37),a=i(4),s=i(16),o=i(15),c=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}(e,t);var i=e.prototype;return i._initDefaultCfg=function(){t.prototype._initDefaultCfg.call(this),this.type=\"cat\",this.isCategory=!0,this.isRounding=!0},i.init=function(){var t=this.values,e=this.tickCount;if(a(t,function(e,i){t[i]=e.toString()}),!this.ticks){var i=t;if(e){i=r({maxCount:e,data:t,isRounding:this.isRounding}).ticks}this.ticks=i}},i.getText=function(e){return-1===this.values.indexOf(e)&&s(e)&&(e=this.values[Math.round(e)]),t.prototype.getText.call(this,e)},i.translate=function(t){var e=this.values.indexOf(t);return-1===e&&s(t)?e=t:-1===e&&(e=NaN),e},i.scale=function(t){var e,i=this.rangeMin(),n=this.rangeMax();return(o(t)||-1!==this.values.indexOf(t))&&(t=this.translate(t)),e=this.values.length>1?t/(this.values.length-1):t,i+e*(n-i)},i.invert=function(t){if(o(t))return t;var e=this.rangeMin(),i=this.rangeMax();ti&&(t=i);var n=(t-e)/(i-e),r=Math.round(n*(this.values.length-1))%this.values.length;return r=r||0,this.values[r]},e}(n);n.Cat=c,t.exports=c},function(t,e,i){var n=i(4);t.exports=function(t){var e,i={},r=[],a=t.isRounding,s=function(t){var e=[];return n(t,function(t){e=e.concat(t)}),e}(t.data),o=s.length,c=t.maxCount||8;if(a?2===(e=function(t,e){var i;for(i=e;i>0&&t%i!=0;i--);if(1===i)for(i=e;i>0&&(t-1)%i!=0;i--);return i}(o-1,c-1)+1)?e=c:e-1},sort:function(){for(var t=this.get(\"children\"),e=0,i=t.length;e=0&&(e.lineWidth=t.size),n.mix(e,t.style),n.mix({},s.shape.line,e)}(e);return\"dash\"===t&&(o.lineDash=s.lineDash),function(t,e,i,r){var s=t.points;if(s.length&&n.isArray(s[0].y)){for(var o=[],c=[],h=0,l=s.length;h1?n.widthRatio.multiplePie:n.widthRatio.rose:(i.isLinear&&(o*=s[1]-s[0]),c=n.widthRatio.column),o*=c,this.hasAdjust(\"dodge\")&&(o/=r.length),t=o,this.set(\"defaultSize\",t)}return t},getDimWidth:function(t){var e=this.get(\"coord\"),i=e.convertPoint({x:0,y:0}),n=e.convertPoint({x:\"x\"===t?1:0,y:\"x\"===t?0:1}),r=0;return i&&n&&(r=Math.sqrt(Math.pow(n.x-i.x,2)+Math.pow(n.y-i.y,2))),r},_getWidth:function(){var t=this.get(\"_width\");if(!t){var e=this.get(\"coord\");t=e&&e.isPolar&&!e.transposed?(e.endAngle-e.startAngle)*e.circleRadius:this.getDimWidth(\"x\"),this.set(\"_width\",t)}return t},_toNormalizedSize:function(t){return t/this._getWidth()},_toCoordSize:function(t){return this._getWidth()*t},getNormalizedSize:function(t){var e=this.getAttrValue(\"size\",t);return e=r.isNil(e)?this.getDefalutSize():this._toNormalizedSize(e)},getSize:function(t){var e=this.getAttrValue(\"size\",t);if(r.isNil(e)){var i=this.getDefalutSize();e=this._toCoordSize(i)}return e}};t.exports=a},function(t,e,i){var n=i(0),r={circle:function(t,e,i,n){n.arc(t,e,i,0,2*Math.PI,!1)},square:function(t,e,i,n){n.moveTo(t-i,e-i),n.lineTo(t+i,e-i),n.lineTo(t+i,e+i),n.lineTo(t-i,e+i),n.closePath()}},a=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}(e,t);var i=e.prototype;return i._initProperties=function(){t.prototype._initProperties.call(this),this._attrs.canFill=!0,this._attrs.canStroke=!0,this._attrs.type=\"marker\"},i.getDefaultAttrs=function(){return{x:0,y:0,lineWidth:0}},i.createPath=function(t){var e,i=this.get(\"attrs\"),a=i.x,s=i.y,o=i.radius,c=i.symbol||\"circle\";e=n.isFunction(c)?c:r[c],t.beginPath(),e(a,s,o,t,this)},i.calculateBox=function(){var t=this.get(\"attrs\"),e=t.x,i=t.y,n=t.radius;return{minX:e-n,minY:i-n,maxX:e+n,maxY:i+n}},e}(i(3).Shape);t.exports=a},function(t,e,i){var n=i(0),r=i(3).Group,a=i(45),s=function(){function t(t){n.deepMix(this,this.getDefaultCfg(),t),this._init(),this._renderTitle(),this._renderItems()}var e=t.prototype;return e.getDefaultCfg=function(){return{showTitle:!1,title:null,items:null,titleGap:12,itemGap:10,itemMarginBottom:12,itemFormatter:null,itemWidth:null,wordSpace:6,x:0,y:0,layout:\"horizontal\",joinString:\": \"}},e._init=function(){var t=new r({zIndex:this.zIndex||0});this.container=t;var e=t.addGroup();this.wrapper=e;var i=e.addGroup({className:\"itemsGroup\"});this.itemsGroup=i,this.parent&&this.parent.add(t)},e._renderTitle=function(t){t=t||this.title;var e=this.titleShape,i=0;if(this.showTitle&&t){if(e&&!e.get(\"destroyed\"))e.attr(\"text\",t);else{var r=this.wrapper,a=this.titleStyle;e=r.addShape(\"text\",{className:\"title\",attrs:n.mix({x:0,y:0,text:t},a)}),this.titleShape=e}i=e.getBBox().height+this.titleGap}this._titleHeight=i},e._renderItems=function(t){var e=this;(t=t||e.items)&&(e.reversed&&t.reverse(),n.each(t,function(t,i){e._addItem(t,i)}),t.length>1&&this._adjustItems(),this._renderBackground())},e._renderBackground=function(){var t=this.background;if(t){var e=this.container,i=this.wrapper.getBBox(),r=i.minX,a=i.minY,s=i.width,o=i.height,c=t.padding||[0,0,0,0];c=n.parsePadding(c);var h=n.mix({x:r-c[3],y:a-c[0],width:s+c[1]+c[3],height:o+c[0]+c[2]},t),l=this.backShape;l?l.attr(h):l=e.addShape(\"Rect\",{zIndex:-1,attrs:h}),this.backShape=l,e.sort()}},e._addItem=function(t){var e=this.itemsGroup.addGroup({name:t.name,value:t.value,dataValue:t.dataValue,checked:t.checked}),i=this.unCheckStyle,r=this.unCheckColor,s=this.nameStyle,o=this.valueStyle,c=this.wordSpace,h=t.marker,l=t.value,u=0;if(r&&(i.fill=r),h){var f=h.radius||3,p=n.mix({x:f,y:this._titleHeight},h);!1===t.checked&&n.mix(p,i);var g=new a({className:\"item-marker\",attrs:p});e.add(g),u+=g.getBBox().width+c}var d,v=t.name;if(v){var y=this.joinString||\"\";v=l?v+y:v,d=e.addShape(\"text\",{className:\"name\",attrs:n.mix({x:u,y:this._titleHeight,text:this._formatItemValue(v)},s,!1===t.checked?i:null)})}if(l){var m=u;d&&(m+=d.getBBox().width),e.addShape(\"text\",{className:\"value\",attrs:n.mix({x:m,y:this._titleHeight,text:l},o,!1===t.checked?i:null)})}return e},e._formatItemValue=function(t){var e=this.itemFormatter;return e&&(t=e.call(this,t)),t},e._getMaxItemWidth=function(){var t=this.itemWidth;if(n.isNumber(t)||n.isNil(t))return t;if(\"auto\"===t){for(var e=this.itemsGroup.get(\"children\"),i=e.length,r=0,a=0;a1e-4&&(o++,c=0),p.moveTo(c,o*e),l.push({x:c,y:o*e+s-d/2,width:1.375*v,height:1.375*d}),c+=t+r}this.legendHitBoxes=l},e._adjustVertical=function(){for(var t,e,i=this.maxLength,r=this.itemsGroup,a=this.itemGap,s=this.itemMarginBottom,o=this.itemWidth,c=this._titleHeight,h=r.get(\"children\"),l=0,u=0,f=0,p=[],g=0,d=h.length;gu&&(u=t+a),i-l350)return null;var e,i,n=this.currentDeltaX,r=this.currentDeltaY,s=this.lastPoint;if(-1!==a.indexOf(t.type)){var o=t.touches[0];e=o.x-s.x,i=o.y-s.y,this.lastPoint=o}else null!==n&&null!==r&&(e=t.deltaX-n,i=t.deltaY-r,this.currentDeltaX=t.deltaX,this.currentDeltaY=t.deltaY);if(Math.abs(e)>0||Math.abs(i)>0){var c=this._timestamp,h=+new Date;h-c>16&&(this._doMove(e,i),this._timestamp=h)}},_doMove:function(t,e){var i=this,a=i.mode,s=i.chart,o=i.limitRange,c=s.get(\"coord\"),h=c.start,l=c.end,u=s.get(\"data\");if(n.directionEnabled(a,\"x\")&&0!==t){var f=s.getXScale(),p=f.field;o[p]||(o[p]=r.getLimitRange(u,f));var g=l.x-h.x;f.isCategory?i._handleCatScale(f,t,g):f.isLinear&&i._handleLinearScale(f,t,g,\"x\");var d=r.getColDef(s,p);i.xRange=r.getFieldRange(d,o[p],f.type)}if(n.directionEnabled(a,\"y\")&&0!==e){var v=h.y-l.y,y=s.getYScales();n.each(y,function(t){var n=t.field;o[n]||(o[n]=r.getLimitRange(u,t)),t.isLinear&&i._handleLinearScale(t,e,v,\"y\")});var m=r.getColDef(s,y[0].field);i.yRange=r.getFieldRange(m,o[y[0].field],y[0].type)}s.repaint()},_handleLinearScale:function(t,e,i,r){var a=t.field,s=t.min,o=t.max,c=this.limitRange;if(s!==c[a].min||o!==c[a].max){var h=e/i*(o-s),l=\"x\"===r?o-h:o+h,u=\"x\"===r?s-h:s+h;c[a]&&!n.isNil(c[a].min)&&u<=c[a].min&&(l=o-s+(u=c[a].min)),c[a]&&!n.isNil(c[a].max)&&l>=c[a].max&&(u=(l=c[a].max)-(o-s)),this.updateLinearScale(a,u,l)}},_handleCatScale:function(t,e,i){var n=t.type,r=t.field,a=t.values,s=t.ticks,o=this.limitRange[r],c=o.length-1,h=a.length,l=i/(h*(this.speed||1)),u=o.indexOf(a[0]),f=o.indexOf(a[h-1]),p=u,g=f,d=Math.abs(e/i),v=this.step||Math.max(1,parseInt(d*h));if(this._panCumulativeDelta+=e,p=this._panCumulativeDelta>l?Math.max(0,p-v):this._panCumulativeDelta<-l?Math.min(c-h+1,p+v):p,g=Math.min(c,p+h-1),p===u&&g===f)return null;var y=o.slice(p,g+1),m=null;if(\"timeCat\"===n){var x=s.length>2?s[1]-s[0]:864e5;if(this._panCumulativeDelta>l)for(var _=s[0]-x;_>=y[0];_-=x)s.unshift(_);else if(this._panCumulativeDelta<-l)for(var S=s[s.length-1]+x;S<=y[y.length-1];S+=x)s.push(S);m=s}this.updateCatScale(r,y,m,o,p,g),this._panCumulativeDelta=p!==u?0:this._panCumulativeDelta}}},function(t,e,i){var n=i(0);t.exports={_bindPress:function(){var t=this.chart,e=this.hammer,i=this.el,r=this.pressThreshold,a=this.pressTime,s=t.get(\"tooltipController\");s&&s.enable&&(t.set(\"_closeTooltip\",!0),e?(e.get(\"press\").set({threshold:r,time:a}),e.on(\"press\",n.wrapBehavior(this,\"_handlePress\"))):n.addEventListener(i,\"press\",n.wrapBehavior(this,\"_handlePress\")))},reset:function(){var t=this.chart,e=t.get(\"tooltipController\");e&&(this.pressed=!1,!e.cfg.alwaysShow&&t.hideTooltip(),t.set(\"_closeTooltip\",!0))},_handlePress:function(t){this.pressed=!0;var e=t.center||t.touches[0];this.chart.set(\"_closeTooltip\",!1),this.chart.showTooltip(e)}}},function(t,e,i){var n=i(52),r=i(54);r.Util.measureText=function(t,e,i){if(!i){var n=12;return e&&(n=parseInt(e.split(\" \")[3],10)),n/=2,{width:function(t){for(var e=0,i=0;i0&&t.charCodeAt(i)<128?e++:e+=2;return e}(t)*n}}return i.font=e||\"12px sans-serif\",i.measureText(t)},r.Util.addEventListener=function(t,e,i){t.addListener(e,i)},r.Util.removeEventListener=function(t,e,i){t.removeListener(e,i)},r.Util.createEvent=function(t,e){var i=0,n=0,r=t.touches;return r&&r.length>0&&(i=r[0].x,n=r[0].y),{type:t.type,chart:e,x:i,y:n}},r.Renderer=n,t.exports=r},function(t,e,i){function n(t){if(void 0===t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return t}var r={fontSize:\"FontSize\",opacity:\"GlobalAlpha\",lineDash:\"LineDash\",textAlign:\"TextAlign\"},a={start:\"left\",end:\"right\"},s=function(t){function e(e){var i,r=n(n(i=t.call(this)||this));return r.ctx=e,r.style={},r._initContext(e),i}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}(e,t);var i=e.prototype;return i.getContext=function(t){if(\"2d\"===t)return this.ctx},i._initContext=function(t){Object.keys(r).map(function(e){return Object.defineProperty(t,e,{set:function(i){\"textAlign\"===e&&(i=a[i]?a[i]:i);t[\"set\"+r[e]](i)}}),e})},e}(i(53));t.exports=s},function(t,e,i){var n;!function(e){function r(){}function a(t,e){for(var i=t.length;i--;)if(t[i].listener===e)return i;return-1}function s(t){return function(){return this[t].apply(this,arguments)}}function o(t){return\"function\"==typeof t||t instanceof RegExp||!(!t||\"object\"!=typeof t)&&o(t.listener)}var c=r.prototype,h=e.EventEmitter;c.getListeners=function(t){var e,i,n=this._getEvents();if(t instanceof RegExp){e={};for(i in n)n.hasOwnProperty(i)&&t.test(i)&&(e[i]=n[i])}else e=n[t]||(n[t]=[]);return e},c.flattenListeners=function(t){var e,i=[];for(e=0;e0?(r.x=a[0].clientX,r.y=a[0].clientY):(r.x=t.clientX,r.y=t.clientY);var s=e.get(\"canvas\"),o=i.getRelativePosition(r,s);return function(e,i,n,r,a){return{type:e,chart:i,native:t||null,x:void 0!==n?n:null,y:void 0!==r?r:null}}(n,e,o.x,o.y)}(t,e)},measureText:function(t,e,i){return i||(i=document.createElement(\"canvas\").getContext(\"2d\")),i.font=e||\"12px sans-serif\",i.measureText(t)}},t.exports=i},function(t,e,i){var n=i(32);t.exports=function(t){var e=n(t);return e.charAt(0).toUpperCase()+e.substring(1)}},function(t,e,i){var n=i(32);t.exports=function(t){var e=n(t);return e.charAt(0).toLowerCase()+e.substring(1)}},function(t,e,i){var n=i(11);t.exports=function(t){return n(t,\"Boolean\")}},function(t,e,i){var n=i(11);t.exports=function(t){return n(t,\"Function\")}},function(t,e){var i=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t};t.exports=function(t){return\"object\"===(void 0===t?\"undefined\":i(t))&&null!==t}},function(t,e,i){function n(t,e,i,o){i=i||0,o=o||s;for(var c in e)if(e.hasOwnProperty(c)){var h=e[c];null!==h&&r(h)?(r(t[c])||(t[c]={}),ie)&&(this.min=e),(n(this.max)||this.max=t.min&&e<=t.max&&i.push(e)}),i.length||(i.push(t.min),i.push(t.max)),t.ticks=i}},i.scale=function(t){if(n(t))return NaN;var e=this.max,i=this.min;if(e===i)return 0;var r=(t-i)/(e-i),a=this.rangeMin();return a+r*(this.rangeMax()-a)},i.invert=function(t){var e=(t-this.rangeMin())/(this.rangeMax()-this.rangeMin());return this.min+e*(this.max-this.min)},e}(a);a.Linear=o,t.exports=o},function(t,e,i){var n=i(10),r=i(16),a=i(77),s=[0,1,1.2,1.5,1.6,2,2.2,2.4,2.5,3,4,5,6,7.5,8,10],o=[0,1,2,4,5,10];t.exports=function(t){var e=t.min,i=t.max,c=t.interval,h=t.minTickInterval,l=[],u=t.minCount||5,f=t.maxCount||7,p=u===f,g=n(t.minLimit)?-1/0:t.minLimit,d=n(t.maxLimit)?1/0:t.maxLimit,v=(u+f)/2,y=v,m=t.snapArray?t.snapArray:p?s:o;if(e===g&&i===d&&p&&(c=(i-e)/(y-1)),n(e)&&(e=0),n(i)&&(i=0),i===e&&(0===e?i=1:e>0?e=0:i=0,i-e<5&&!c&&i-e>=1&&(c=1)),n(c)){var x=(i-e)/(v-1);c=a.snapFactorTo(x,m,\"ceil\"),f!==u&&((y=parseInt((i-e)/c,10))>f&&(y=f),ye&&(_-=c),i=a.fixedBase(P,c),e=a.fixedBase(_,c)}i=Math.min(i,d),e=Math.max(e,g),l.push(e);for(var w=1;w=t[i-1])return t[i-1];for(var r=1;rt[i-1])return NaN;if(er&&(e=parseFloat(e.toFixed(i)))}else for(;t>10;)e*=10,t/=10;return e}(t*=n);n*=s,t/=s}var o=(t=\"floor\"===i?a.snapFloor(e,t):\"ceil\"===i?a.snapCeiling(e,t):a.snapTo(e,t))*n;if(Math.abs(n)<1&&o.toString().length>r){o=t/parseInt(1/n)*(n>0?1:-1)}return o},snapMultiple:function(t,e,i){return(\"ceil\"===i?Math.ceil(t/e):\"floor\"===i?Math.floor(t/e):Math.round(t/e))*e},snapTo:function(t,e){var r=i(t,e),a=n(t,e);if(isNaN(r)||isNaN(a)){if(t[0]>=e)return t[0];var s=t[t.length-1];if(s<=e)return s}return Math.abs(e-r)20&&(r=20),parseFloat(t.toFixed(r))}};t.exports=a},function(t,e,i){var n=i(17),r=i(16),a=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}(e,t);var i=e.prototype;return i._initDefaultCfg=function(){t.prototype._initDefaultCfg.call(this),this.isIdentity=!0,this.type=\"identity\",this.value=null},i.getText=function(){return this.value.toString()},i.scale=function(t){return this.value!==t&&r(t)?t:this.range[0]},i.invert=function(){return this.value},e}(n);n.Identity=a,t.exports=a},function(t,e,i){var n=i(0),r=i(80),a=i(1),s=i(3).Shape,o=function(){function t(t){this.axisCfg={},this.frontPlot=null,this.backPlot=null,this.axes={},n.mix(this,t)}var e=t.prototype;return e._isHide=function(t){var e=this.axisCfg;return!e||!1===e[t]},e._getLinePosition=function(t,e,i,n){var r=\"\",a=t.field,s=this.axisCfg;return s[a]&&s[a].position?r=s[a].position:\"x\"===e?r=n?\"left\":\"bottom\":\"y\"===e&&(r=i?\"right\":\"left\",n&&(r=\"bottom\")),r},e._getLineCfg=function(t,e,i){var n,r,a=1;return\"x\"===e?(n={x:0,y:0},r={x:1,y:0}):\"right\"===i?(n={x:1,y:0},r={x:1,y:1}):(n={x:0,y:0},r={x:0,y:1},a=-1),t.transposed&&(a*=-1),{offsetFactor:a,start:t.convertPoint(n),end:t.convertPoint(r)}},e._getCircleCfg=function(t){return{startAngle:t.startAngle,endAngle:t.endAngle,center:t.center,radius:t.circleRadius}},e._getRadiusCfg=function(t){var e,i;return t.transposed?(e={x:0,y:0},i={x:1,y:0}):(e={x:0,y:0},i={x:0,y:1}),{offsetFactor:-1,start:t.convertPoint(e),end:t.convertPoint(i)}},e._getAxisCfg=function(t,e,i,r,o){var c=this,h=this.axisCfg,l=e.getTicks(),u=n.deepMix({ticks:l,frontContainer:this.frontPlot,backContainer:this.backPlot},o,h[e.field]),f=[],p=u.label,g=l.length,d=0,v=0,y=p;return n.each(l,function(t,e){if(n.isFunction(p)){var i=p(t.text,e,g);y=i?n.mix({},a._defaultAxis.label,i):null}if(y){var r={};y.textAlign&&(r.textAlign=y.textAlign),y.textBaseline&&(r.textBaseline=y.textBaseline);var o=new s.Text({className:\"axis-label\",attrs:n.mix({x:0,y:0,text:t.text,fontFamily:c.chart.get(\"canvas\").get(\"fontFamily\")},y),value:t.value,textStyle:r,top:y.top,context:c.chart.get(\"canvas\").get(\"context\")});f.push(o);var h=o.getBBox(),l=h.width,u=h.height;d=Math.max(d,l),v=Math.max(v,u)}}),u.labels=f,u.maxWidth=d,u.maxHeight=v,u},e._createAxis=function(t,e,i,n,r){void 0===r&&(r=\"\");var s,o,c,h=t.type,l=t.transposed;if(\"cartesian\"===h||\"rect\"===h){var u=this._getLinePosition(e,n,r,l);(c=a.axis[u]).position=u,s=\"Line\",o=u}else\"x\"===n&&!l||\"y\"===n&&l?(c=a.axis.circle,s=\"Circle\",o=\"circle\"):(c=a.axis.radius,s=\"Line\",o=\"radius\");var f=this._getAxisCfg(t,e,i,n,c);f.type=s,f.dimType=n,f.verticalScale=i,f.index=r,this.axes[o]=f},e.createAxis=function(t,e,i){var a=this;e&&!a._isHide(e.field)&&a._createAxis(t,e,i[0],\"x\"),n.each(i,function(i,n){a._isHide(i.field)||a._createAxis(t,i,e,\"y\",n)});var s=this.axes,o=a.chart;if(o._isAutoPadding()){var c=n.parsePadding(o.get(\"padding\")),h=n.parsePadding(o.get(\"appendPadding\")),l=o.get(\"legendRange\")||{top:0,right:0,bottom:0,left:0},u=[\"auto\"===c[0]?l.top+2*h[0]:c[0],\"auto\"===c[1]?l.right+h[1]:c[1],\"auto\"===c[2]?l.bottom+h[2]:c[2],\"auto\"===c[3]?l.left+h[3]:c[3]];if(t.isPolar){var f=s.circle;if(f){var p=f.maxHeight,g=f.maxWidth,d=f.labelOffset;u[0]+=p+d,u[1]+=g+d,u[2]+=p+d,u[3]+=g+d}}else{if(s.right&&\"auto\"===c[1]){var v=s.right,y=v.maxWidth,m=v.labelOffset;u[1]+=y+m}if(s.left&&\"auto\"===c[3]){var x=s.left,_=x.maxWidth,S=x.labelOffset;u[3]+=_+S}if(s.bottom&&\"auto\"===c[2]){var b=s.bottom,C=b.maxHeight,P=b.labelOffset;u[2]+=C+P}}o.set(\"_padding\",u),o._updateLayout(u)}n.each(s,function(e){var i,s=e.type,o=e.grid,c=e.verticalScale,h=e.ticks,l=e.dimType,u=e.position,f=e.index;if(t.isPolar?\"Line\"===s?i=a._getRadiusCfg(t):\"Circle\"===s&&(i=a._getCircleCfg(t)):i=a._getLineCfg(t,l,u),o&&c){var p=[],g=function(t){var e=t.slice(0);if(e.length>0){var i=e[0],n=e[e.length-1];0!==i.value&&e.unshift({value:0}),1!==n.value&&e.push({value:1})}return e}(c.getTicks());n.each(h,function(e){var i=[];n.each(g,function(n){var r=\"x\"===l?e.value:n.value,a=\"x\"===l?n.value:e.value;if(r>=0&&r<=1&&a>=0&&a<=1){var s=t.convertPoint({x:r,y:a});i.push(s)}}),p.push({points:i,_id:\"axis-\"+l+f+\"-grid-\"+e.tickValue})}),e.gridPoints=p,t.isPolar&&(e.center=t.center,e.startAngle=t.startAngle,e.endAngle=t.endAngle)}i._id=\"axis-\"+l,n.isNil(f)||(i._id=\"axis-\"+l+f),new r[s](n.mix(e,i))})},e.clear=function(){this.axes={},this.frontPlot.clear(),this.backPlot.clear()},t}();t.exports=o},function(t,e,i){var n=i(26);i(81),t.exports=n},function(t,e,i){var n=i(0),r=i(26),a=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}(e,t);var i=e.prototype;return i._initDefaultCfg=function(){t.prototype._initDefaultCfg.call(this),this.start=null,this.end=null},i.getOffsetPoint=function(t){var e=this.start,i=this.end;return{x:e.x+(i.x-e.x)*t,y:e.y+(i.y-e.y)*t}},i.getAxisVector=function(){var t=this.start,e=this.end;return[e.x-t.x,e.y-t.y]},i.drawLine=function(t){var e=this.getContainer(t.top),i=this.start,r=this.end;e.addShape(\"line\",{className:\"axis-line\",attrs:n.mix({x1:i.x,y1:i.y,x2:r.x,y2:r.y},t)})},e}(r);r.Line=a,t.exports=a},function(t,e,i){var n=i(0),r=i(38),a=i(39),s=i(40).requestAnimationFrame,o=function(){function t(t){this._attrs=n.mix({type:\"canvas\",children:[]},t),this._initPixelRatio(),this._initCanvas()}var e=t.prototype;return e.get=function(t){return this._attrs[t]},e.set=function(t,e){this._attrs[t]=e},e._initPixelRatio=function(){this.get(\"pixelRatio\")||this.set(\"pixelRatio\",n.getPixelRatio())},e.beforeDraw=function(){var t=this._attrs.context,e=this._attrs.el;!n.isWx&&!n.isMy&&t&&t.clearRect(0,0,e.width,e.height)},e._initCanvas=function(){var t,e=this.get(\"el\"),i=this.get(\"context\");if(!(t=i?i.canvas:n.isString(e)?n.getDomById(e):e))throw new Error(\"Please specify the id or el of the chart!\");i&&t&&!t.getContext&&(t.getContext=function(){return i});var r=this.get(\"width\");r||(r=n.getWidth(t));var a=this.get(\"height\");a||(a=n.getHeight(t)),this.set(\"canvas\",this),this.set(\"el\",t),this.set(\"context\",i||t.getContext(\"2d\")),this.changeSize(r,a)},e.changeSize=function(t,e){var i=this.get(\"pixelRatio\"),r=this.get(\"el\");if(n.isBrowser&&(r.style.width=t+\"px\",r.style.height=e+\"px\"),!n.isWx&&!n.isMy&&(r.width=t*i,r.height=e*i,1!==i)){this.get(\"context\").scale(i,i)}this.set(\"width\",t),this.set(\"height\",e)},e.getWidth=function(){var t=this.get(\"pixelRatio\");return this.get(\"width\")*t},e.getHeight=function(){var t=this.get(\"pixelRatio\");return this.get(\"height\")*t},e.getPointByClient=function(t,e){var i=this.get(\"el\"),n=i.getBoundingClientRect(),r=n.right-n.left,a=n.bottom-n.top;return{x:(t-n.left)*(i.width/r),y:(e-n.top)*(i.height/a)}},e._beginDraw=function(){this._attrs.toDraw=!0},e._endDraw=function(){this._attrs.toDraw=!1},e.draw=function(){function t(){e.set(\"animateHandler\",s(function(){e.set(\"animateHandler\",void 0),e.get(\"toDraw\")&&t()})),e.beforeDraw();try{for(var i=e._attrs.context,r=e._attrs.children,a=0,o=r.length;a=0&&a<.5*Math.PI?(s={x:l,y:u},o={x:f,y:p}):.5*Math.PI<=a&&a1){return i*e+this._getSpaceingY()*(e-1)}return i},i._getSpaceingY=function(){var t=this._attrs.attrs,e=t.lineHeight,i=1*t.fontSize;return e?e-i:.14*i},i.drawInner=function(t){var e=this._attrs.attrs,i=e.text,r=e.x,a=e.y;if(!(n.isNil(i)||isNaN(r)||isNaN(a))){var s=e.textArr,o=1*e.fontSize,c=this._getSpaceingY();e.rotate&&(t.translate(r,a),t.rotate(e.rotate),r=0,a=0);var h,l=e.textBaseline;s&&(h=this._getTextHeight());var u;if(this.hasFill()){var f=e.fillOpacity;if(n.isNil(f)||1===f||(t.globalAlpha=f),s)for(var p=0,g=s.length;p5e3&&(a=0,s={}),a++,s[c]=h,h}},e}(r);r.Text=o,t.exports=o},function(t,e,i){var n=i(2),r=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}(e,t);var i=e.prototype;return i._initProperties=function(){t.prototype._initProperties.call(this),this._attrs.canFill=!0,this._attrs.canStroke=!0,this._attrs.createPath=null,this._attrs.type=\"custom\"},i.createPath=function(t){var e=this.get(\"createPath\");e&&e.call(this,t)},i.calculateBox=function(){var t=this.get(\"calculateBox\");return t&&t.call(this)},e}(n);n.Custom=r,t.exports=r},function(t,e,i){var n=i(1),r=i(0);setTimeout(function(){if(n.trackable&&r.isBrowser){var t=new Image,e={pg:document.URL,r:(new Date).getTime(),f2:!0,version:n.version,page_type:\"syslog\"},i=encodeURIComponent(JSON.stringify([e]));t.src=\"https://kcart.alipay.com/web/bi.do?BIProfile=merge&d=\"+i}},3e3)},function(t,e,i){var n=i(5);i(95),i(42),i(97),i(98),i(100),i(102),i(104),t.exports=n},function(t,e,i){var n=i(0),r=i(5);i(96);var a=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}(e,t);var i=e.prototype;return i.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.type=\"point\",e.shapeType=\"point\",e.generatePoints=!0,e},i.draw=function(t,e){var i=this,r=i.get(\"container\");n.each(t,function(t){var a=t.shape,s=i.getDrawCfg(t);if(n.isArray(t.y)){var o=i.hasAdjust(\"stack\");n.each(t.y,function(n,c){s.y=n,o&&0===c||i.drawShape(a,t,s,r,e)})}else n.isNil(t.y)||i.drawShape(a,t,s,r,e)})},e}(r);r.Point=a,t.exports=a},function(t,e,i){function n(t,e,i){if(0!==t.size){var n=function(t){var e={lineWidth:0,stroke:t.color,fill:t.color};return t.size&&(e.size=t.size),r.mix(e,t.style),r.mix({},a.shape.point,e)}(t),s=n.r||n.size,o=t.x,c=r.isArray(t.y)?t.y:[t.y];\"hollowCircle\"===i&&(n.lineWidth=1,n.fill=null);for(var h=0,l=c.length;h=1.5*Math.PI&&(d-=2*Math.PI),v>=1.5*Math.PI&&(v-=2*Math.PI),e.addShape(\"Sector\",{className:\"interval\",attrs:n.mix({x:h,y:l,r:m,r0:y,startAngle:d,endAngle:v},r)})}var x=function(t){for(var e=[],i=[],n=0,r=t.length;n=0?\"positive\":\"negative\";s[d][g]||(s[d][g]=0),u[i]=[s[d][g],p+s[d][g]],s[d][g]+=p}}},e}(a);a.Stack=s,t.exports=s},function(t,e,i){var n=i(110);t.exports=n},function(t,e,i){var n=i(25),r=i(4),a=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}(e,t);var i=e.prototype;return i._initDefaultCfg=function(){this.marginRatio=.5,this.dodgeRatio=.5,this.adjustNames=[\"x\",\"y\"]},i.getDodgeOffset=function(t,e,i){var n=t.pre,r=t.next,a=r-n,s=a*this.dodgeRatio/i,o=this.marginRatio*s;return(n+r)/2+(.5*(a-i*s-(i-1)*o)+((e+1)*s+e*o)-.5*s-.5*a)},i.processAdjust=function(t){var e=this,i=t.length,n=e.xField;r(t,function(t,r){for(var a=0,s=t.length;a0&&o<=1&&(i*=o),this.x={start:this.startAngle,end:this.endAngle},this.y={start:i*r,end:i},this.center=n,this.circleRadius=i},i.convertPoint=function(t){var e=this.center,i=this.transposed,n=i?\"y\":\"x\",r=i?\"x\":\"y\",a=this.x,s=this.y,o=a.start+(a.end-a.start)*t[n],c=s.start+(s.end-s.start)*t[r];return{x:e.x+Math.cos(o)*c,y:e.y+Math.sin(o)*c}},i.invertPoint=function(t){var e=this.center,i=this.transposed,n=this.x,s=this.y,o=i?\"y\":\"x\",c=i?\"x\":\"y\",h=[1,0,0,1,0,0];a.rotate(h,h,n.start);var l=[1,0];r.transformMat2d(l,l,h),l=[l[0],l[1]];var u=[t.x-e.x,t.y-e.y];if(r.zero(u))return{x:0,y:0};var f=r.angleTo(l,u,n.end0?g:-g;var d=(p-s.start)/(s.end-s.start),v={};return v[o]=g,v[c]=d,v},e}(n);n.Polar=s,t.exports=s},function(t,e,i){var n=i(0),r=i(26),a=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}(e,t);var i=e.prototype;return i._initDefaultCfg=function(){t.prototype._initDefaultCfg.call(this),this.startAngle=-Math.PI/2,this.endAngle=3*Math.PI/2,this.radius=null,this.center=null},i.getOffsetPoint=function(t){var e=this.startAngle,i=e+(this.endAngle-e)*t;return this._getCirclePoint(i)},i._getCirclePoint=function(t,e){var i=this.center;return e=e||this.radius,{x:i.x+Math.cos(t)*e,y:i.y+Math.sin(t)*e}},i.getTextAlignInfo=function(t,e){var i,n=this.getOffsetVector(t,e),r=\"middle\";return n[0]>0?i=\"left\":n[0]<0?i=\"right\":(i=\"center\",n[1]>0?r=\"top\":n[1]<0&&(r=\"bottom\")),{textAlign:i,textBaseline:r}},i.getAxisVector=function(t){var e=this.center,i=this.offsetFactor;return[(t.y-e.y)*i,-1*(t.x-e.x)*i]},i.drawLine=function(t){var e=this.center,i=this.radius,r=this.startAngle,a=this.endAngle;this.getContainer(t.top).addShape(\"arc\",{className:\"axis-line\",attrs:n.mix({x:e.x,y:e.y,r:i,startAngle:r,endAngle:a},t)})},e}(r);r.Circle=a,t.exports=a},function(t,e,i){var n=i(114);t.exports=n},function(t,e,i){var n=i(17),r=i(36),a=i(115),s=i(37),o=i(29),c=i(4),h=i(16),l=i(18),u=i(15),f=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}(e,t);var i=e.prototype;return i._initDefaultCfg=function(){t.prototype._initDefaultCfg.call(this),this.type=\"timeCat\",this.sortable=!0,this.tickCount=5,this.mask=\"YYYY-MM-DD\"},i.init=function(){var t=this,e=this.values;c(e,function(i,n){e[n]=t._toTimeStamp(i)}),this.sortable&&e.sort(function(t,e){return t-e}),t.ticks||(t.ticks=this.calculateTicks())},i.calculateTicks=function(){var t,e=this.tickCount;if(e){t=s({maxCount:e,data:this.values,isRounding:this.isRounding}).ticks}else t=this.values;return t},i.translate=function(t){t=this._toTimeStamp(t);var e=this.values.indexOf(t);return-1===e&&(e=h(t)&&t-1?r/(this.values.length-1):0,i+e*(n-i)},i.getText=function(t){var e=\"\",i=this.translate(t);e=i>-1?this.values[i]:t;var n=this.formatter;return e=parseInt(e,10),e=n?n(e):a.format(e,this.mask)},i.getTicks=function(){var t=this,e=this.ticks,i=[];return c(e,function(e){var n;n=l(e)?e:{text:u(e)?e:t.getText(e),value:t.scale(e),tickValue:e},i.push(n)}),i},i._toTimeStamp=function(t){return o.toTimeStamp(t)},e}(r);n.TimeCat=f,t.exports=f},function(t,e,i){var n;!function(r){function a(t,e){for(var i=[],n=0,r=t.length;n3?0:(t-t%10!=10)*t%10]}};var m={D:function(t){return t.getDate()},DD:function(t){return o(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return t.getDay()},dd:function(t){return o(t.getDay())},ddd:function(t,e){return e.dayNamesShort[t.getDay()]},dddd:function(t,e){return e.dayNames[t.getDay()]},M:function(t){return t.getMonth()+1},MM:function(t){return o(t.getMonth()+1)},MMM:function(t,e){return e.monthNamesShort[t.getMonth()]},MMMM:function(t,e){return e.monthNames[t.getMonth()]},YY:function(t){return String(t.getFullYear()).substr(2)},YYYY:function(t){return o(t.getFullYear(),4)},h:function(t){return t.getHours()%12||12},hh:function(t){return o(t.getHours()%12||12)},H:function(t){return t.getHours()},HH:function(t){return o(t.getHours())},m:function(t){return t.getMinutes()},mm:function(t){return o(t.getMinutes())},s:function(t){return t.getSeconds()},ss:function(t){return o(t.getSeconds())},S:function(t){return Math.round(t.getMilliseconds()/100)},SS:function(t){return o(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return o(t.getMilliseconds(),3)},a:function(t,e){return t.getHours()<12?e.amPm[0]:e.amPm[1]},A:function(t,e){return t.getHours()<12?e.amPm[0].toUpperCase():e.amPm[1].toUpperCase()},ZZ:function(t){var e=t.getTimezoneOffset();return(e>0?\"-\":\"+\")+o(100*Math.floor(Math.abs(e)/60)+Math.abs(e)%60,4)}},x={D:[l,function(t,e){t.day=e}],Do:[new RegExp(l.source+u.source),function(t,e){t.day=parseInt(e,10)}],M:[l,function(t,e){t.month=e-1}],YY:[l,function(t,e){var i=+(\"\"+(new Date).getFullYear()).substr(0,2);t.year=\"\"+(e>68?i-1:i)+e}],h:[l,function(t,e){t.hour=e}],m:[l,function(t,e){t.minute=e}],s:[l,function(t,e){t.second=e}],YYYY:[/\\d{4}/,function(t,e){t.year=e}],S:[/\\d/,function(t,e){t.millisecond=100*e}],SS:[/\\d{2}/,function(t,e){t.millisecond=10*e}],SSS:[/\\d{3}/,function(t,e){t.millisecond=e}],d:[l,p],ddd:[u,p],MMM:[u,s(\"monthNamesShort\")],MMMM:[u,s(\"monthNames\")],a:[u,function(t,e,i){var n=e.toLowerCase();n===i.amPm[0]?t.isPm=!1:n===i.amPm[1]&&(t.isPm=!0)}],ZZ:[/([\\+\\-]\\d\\d:?\\d\\d|Z)/,function(t,e){\"Z\"===e&&(e=\"+00:00\");var i,n=(e+\"\").match(/([\\+\\-]|\\d\\d)/gi);n&&(i=60*n[1]+parseInt(n[2],10),t.timezoneOffset=\"+\"===n[0]?i:-i)}]};x.dd=x.d,x.dddd=x.ddd,x.DD=x.D,x.mm=x.m,x.hh=x.H=x.HH=x.h,x.MM=x.M,x.ss=x.s,x.A=x.a,c.masks={default:\"ddd MMM DD YYYY HH:mm:ss\",shortDate:\"M/D/YY\",mediumDate:\"MMM D, YYYY\",longDate:\"MMMM D, YYYY\",fullDate:\"dddd, MMMM D, YYYY\",shortTime:\"HH:mm\",mediumTime:\"HH:mm:ss\",longTime:\"HH:mm:ss.SSS\"},c.format=function(t,e,i){var n=i||c.i18n;if(\"number\"==typeof t&&(t=new Date(t)),\"[object Date]\"!==Object.prototype.toString.call(t)||isNaN(t.getTime()))throw new Error(\"Invalid Date in fecha.format\");var r=[];return e=(e=c.masks[e]||e||c.masks.default).replace(f,function(t,e){return r.push(e),\"??\"}),(e=e.replace(h,function(e){return e in m?m[e](t,n):e.slice(1,e.length-1)})).replace(/\\?\\?/g,function(){return r.shift()})},c.parse=function(t,e,i){var n=i||c.i18n;if(\"string\"!=typeof e)throw new Error(\"Invalid format in fecha.parse\");if(e=c.masks[e]||e,t.length>1e3)return!1;var r=!0,a={};if(e.replace(h,function(e){if(x[e]){var i=x[e],s=t.search(i[0]);~s?t.replace(i[0],function(e){return i[1](a,e,n),t=t.substr(s+e.length),e}):r=!1}return x[e]?\"\":e.slice(1,e.length-1)}),!r)return!1;var s=new Date;!0===a.isPm&&null!=a.hour&&12!=+a.hour?a.hour=+a.hour+12:!1===a.isPm&&12==+a.hour&&(a.hour=0);var o;return null!=a.timezoneOffset?(a.minute=+(a.minute||0)-+a.timezoneOffset,o=new Date(Date.UTC(a.year||s.getFullYear(),a.month||0,a.day||1,a.hour||0,a.minute||0,a.second||0,a.millisecond||0))):o=new Date(a.year||s.getFullYear(),a.month||0,a.day||1,a.hour||0,a.minute||0,a.second||0,a.millisecond||0),o},void 0!==t&&t.exports?t.exports=c:void 0!==(n=function(){return c}.call(e,i,e,t))&&(t.exports=n)}()},function(t,e,i){t.exports={Text:i(117),Line:i(118),Arc:i(119),Rect:i(120),Html:i(121),Tag:i(122),Point:i(123),RegionFilter:i(124)}},function(t,e,i){var n=i(0),r=i(6),a=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}(e,t);var i=e.prototype;return i._initDefaultCfg=function(){this.type=\"text\",this.position=null,this.content=null,this.style={fill:\"#000\"},this.offsetX=0,this.offsetY=0},i.render=function(t,e){var i=this.position,r=this.parsePoint(t,i);if(r){var a=this.content,s=this.style,o=this.offsetX,c=this.offsetY;o&&(r.x+=o),c&&(r.y+=c);var h=e.addShape(\"text\",{className:\"guide-text\",attrs:n.mix({x:r.x,y:r.y,text:a},s)});return this.element=h,h}},e}(r);r.Text=a,t.exports=a},function(t,e,i){var n=i(0),r=i(6),a=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}(e,t);var i=e.prototype;return i._initDefaultCfg=function(){this.type=\"line\",this.start=[],this.end=[],this.style={stroke:\"#000\",lineWidth:1}},i.render=function(t,e){var i=[];if(i[0]=this.parsePoint(t,this.start),i[1]=this.parsePoint(t,this.end),i[0]&&i[1]){var r=e.addShape(\"Line\",{className:\"guide-line\",attrs:n.mix({x1:i[0].x,y1:i[0].y,x2:i[1].x,y2:i[1].y},this.style)});return this.element=r,r}},e}(r);r.Line=a,t.exports=a},function(t,e,i){var n=i(0),r=i(6),a=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}(e,t);var i=e.prototype;return i._initDefaultCfg=function(){this.type=\"arc\",this.start=[],this.end=[],this.style={stroke:\"#999\",lineWidth:1}},i.render=function(t,e){var i=this.parsePoint(t,this.start),r=this.parsePoint(t,this.end);if(i&&r){var a=t.center,s=Math.sqrt((i.x-a.x)*(i.x-a.x)+(i.y-a.y)*(i.y-a.y)),o=Math.atan2(i.y-a.y,i.x-a.x),c=Math.atan2(r.y-a.y,r.x-a.x),h=e.addShape(\"arc\",{className:\"guide-arc\",attrs:n.mix({x:a.x,y:a.y,r:s,startAngle:o,endAngle:c},this.style)});return this.element=h,h}},e}(r);r.Arc=a,t.exports=a},function(t,e,i){var n=i(0),r=i(6),a=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}(e,t);var i=e.prototype;return i._initDefaultCfg=function(){this.type=\"rect\",this.start=[],this.end=[],this.style={fill:\"#CCD7EB\",opacity:.4}},i.render=function(t,e){var i=this.parsePoint(t,this.start),r=this.parsePoint(t,this.end);if(i&&r){var a=e.addShape(\"rect\",{className:\"guide-rect\",attrs:n.mix({x:Math.min(i.x,r.x),y:Math.min(i.y,r.y),width:Math.abs(r.x-i.x),height:Math.abs(i.y-r.y)},this.style)});return this.element=a,a}},e}(r);r.Rect=a,t.exports=a},function(t,e,i){function n(t,e){for(var i in e)e.hasOwnProperty(i)&&(t.style[i]=e[i]);return t}function r(t){var e=document.createElement(\"div\");return t=t.replace(/(^\\s*)|(\\s*$)/g,\"\"),e.innerHTML=\"\"+t,e.childNodes[0]}var a=i(0),s=i(6),o=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}(e,t);var i=e.prototype;return i._initDefaultCfg=function(){this.type=\"html\",this.position=null,this.alignX=\"center\",this.alignY=\"middle\",this.offsetX=null,this.offsetY=null,this.html=null},i.render=function(t,e){var i=this.parsePoint(t,this.position);if(i){var s=r(this.html);s=n(s,{position:\"absolute\",top:Math.floor(i.y)+\"px\",left:Math.floor(i.x)+\"px\",visibility:\"hidden\"});var o=e.get(\"canvas\").get(\"el\"),c=o.parentNode;c=n(c,{position:\"relative\"});var h=r('
');c.appendChild(h),h.appendChild(s);var l=o.offsetTop,u=o.offsetLeft,f=this.alignX,p=this.alignY,g=this.offsetX,d=this.offsetY,v=function(t,e,i,n){var r=[];return\"left\"===t&&\"top\"===e?(r[0]=0,r[1]=0):\"right\"===t&&\"top\"===e?(r[0]=-i,r[1]=0):\"left\"===t&&\"bottom\"===e?(r[0]=0,r[1]=Math.floor(-n)):\"right\"===t&&\"bottom\"===e?(r[0]=Math.floor(-i),r[1]=Math.floor(-n)):\"right\"===t&&\"middle\"===e?(r[0]=Math.floor(-i),r[1]=Math.floor(-n/2)):\"left\"===t&&\"middle\"===e?(r[0]=0,r[1]=Math.floor(-n/2)):\"center\"===t&&\"bottom\"===e?(r[0]=Math.floor(-i/2),r[1]=Math.floor(-n)):\"center\"===t&&\"top\"===e?(r[0]=Math.floor(-i/2),r[1]=0):(r[0]=Math.floor(-i/2),r[1]=Math.floor(-n/2)),r}(f,p,a.getWidth(s),a.getHeight(s));i.x=i.x+v[0]+u,i.y=i.y+v[1]+l,g&&(i.x+=g),d&&(i.y+=d),n(s,{top:Math.floor(i.y)+\"px\",left:Math.floor(i.x)+\"px\",visibility:\"visible\"}),this.element=h}},i.remove=function(){var t=this.element;t&&t.parentNode&&t.parentNode.removeChild(t)},e}(s);s.Html=o,t.exports=o},function(t,e,i){var n=i(0),r=i(6),a=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}(e,t);var i=e.prototype;return i._initDefaultCfg=function(){this.type=\"tag\",this.position=null,this.content=null,this.direct=\"tl\",this.autoAdjust=!0,this.offsetX=0,this.offsetY=0,this.side=4,this.background={padding:5,radius:2,fill:\"#1890FF\"},this.textStyle={fontSize:12,fill:\"#fff\",textAlign:\"center\",textBaseline:\"middle\"},this.withPoint=!0,this.pointStyle={fill:\"#1890FF\",r:3,lineWidth:1,stroke:\"#fff\"}},i._getDirect=function(t,e,i,n){var r=this.direct,a=this.side,s=t.get(\"canvas\"),o=s.get(\"width\"),c=s.get(\"height\"),h=e.x,l=e.y,u=r[0],f=r[1];\"t\"===u&&l-a-n<0?u=\"b\":\"b\"===u&&l+a+n>c&&(u=\"t\");var p=\"c\"===u?a:0;return\"l\"===f&&h-p-i<0?f=\"r\":\"r\"===f&&h+p+i>o?f=\"l\":\"c\"===f&&(i/2+h+p>o?f=\"l\":h-i/2-p<0&&(f=\"r\")),r=u+f},i.render=function(t,e){var i=this.parsePoint(t,this.position);if(i){var r=this.content,a=this.background,s=this.textStyle,o=[],c=e.addGroup({className:\"guide-tag\"});if(this.withPoint){var h=c.addShape(\"Circle\",{className:\"guide-tag-point\",attrs:n.mix({x:i.x,y:i.y},this.pointStyle)});o.push(h)}var l=c.addGroup(),u=l.addShape(\"text\",{className:\"guide-tag-text\",zIndex:1,attrs:n.mix({x:0,y:0,text:r},s)});o.push(u);var f=u.getBBox(),p=n.parsePadding(a.padding),g=f.width+p[1]+p[3],d=f.height+p[0]+p[2],v=f.minY-p[0],y=f.minX-p[3],m=l.addShape(\"rect\",{className:\"guide-tag-bg\",zIndex:-1,attrs:n.mix({x:y,y:v,width:g,height:d},a)});o.push(m);var x,_=this.autoAdjust?this._getDirect(e,i,g,d):this.direct,S=this.side,b=i.x+this.offsetX,C=i.y+this.offsetY,P=n.parsePadding(a.radius);\"tl\"===_?(x=[{x:g+y-S-1,y:d+v-1},{x:g+y,y:d+v-1},{x:g+y,y:d+S+v}],P[2]=0,b-=g,C=C-S-d):\"cl\"===_?(x=[{x:g+y-1,y:(d-S)/2+v-1},{x:g+y-1,y:(d+S)/2+v+1},{x:g+S+y,y:d/2+v}],b=b-g-S,C-=d/2):\"bl\"===_?(x=[{x:g+y,y:-S+v},{x:g+y-S-1,y:v+1},{x:g+y,y:v+1}],P[1]=0,b-=g,C+=S):\"bc\"===_?(x=[{x:g/2+y,y:-S+v},{x:(g-S)/2+y-1,y:v+1},{x:(g+S)/2+y+1,y:v+1}],b-=g/2,C+=S):\"br\"===_?(x=[{x:y,y:v-S},{x:y,y:v+1},{x:y+S+1,y:v+1}],P[0]=0,C+=S):\"cr\"===_?(x=[{x:y-S,y:d/2+v},{x:y+1,y:(d-S)/2+v-1},{x:y+1,y:(d+S)/2+v+1}],b+=S,C-=d/2):\"tr\"===_?(x=[{x:y,y:d+S+v},{x:y,y:d+v-1},{x:S+y+1,y:d+v-1}],P[3]=0,C=C-d-S):\"tc\"===_&&(x=[{x:(g-S)/2+y-1,y:d+v-1},{x:(g+S)/2+y+1,y:d+v-1},{x:g/2+y,y:d+S+v}],b-=g/2,C=C-d-S);var w=l.addShape(\"Polygon\",{className:\"guide-tag-side\",zIndex:0,attrs:{points:x,fill:a.fill}});return o.push(w),m.attr(\"radius\",P),l.moveTo(b-y,C-v),l.sort(),this.element=c,o}},e}(r);r.Tag=a,t.exports=a},function(t,e,i){var n=i(0),r=i(6),a=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}(e,t);var i=e.prototype;return i._initDefaultCfg=function(){this.type=\"point\",this.position=null,this.offsetX=0,this.offsetY=0,this.style={fill:\"#1890FF\",r:3,lineWidth:1,stroke:\"#fff\"}},i.render=function(t,e){var i=this.parsePoint(t,this.position);if(!i)return null;var r=e.addShape(\"Circle\",{className:\"guide-point\",attrs:n.mix({x:i.x+this.offsetX,y:i.y+this.offsetY},this.style)});return this.element=r,r},e}(r);r.Point=a,t.exports=a},function(t,e,i){var n=i(0),r=i(6),a=i(2).Rect,s=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}(e,t);var i=e.prototype;return i._initDefaultCfg=function(){this.type=\"regionFilter\",this.start=[],this.end=[],this.color=null,this.style=null},i.render=function(t){var e=this.parsePoint(t,this.start),i=this.parsePoint(t,this.end);if(e&&i){var r=new a({attrs:{x:Math.min(e.x,i.x),y:Math.min(e.y,i.y),width:Math.abs(i.x-e.x),height:Math.abs(i.y-e.y)}});this.clip=r;var s=this.chart,o=this.color,c=this.style||{},h=[];s.get(\"geoms\").map(function(t){var e=t.get(\"container\"),i=e.get(\"children\"),a=e.addGroup({zIndex:10,className:\"guide-region-filter\"});return i.map(function(t){if(t.get(\"isShape\")){var e=t.get(\"type\"),i=n.mix({},t.get(\"attrs\"),c);o&&(i.fill||i.fillStyle)&&(i.fill=i.fillStyle=o),o&&(i.stroke||i.strokeStyle)&&(i.stroke=i.strokeStyle=o);var r={attrs:i};\"custom\"!==e&&\"Custom\"!==e||(r.createPath=t.get(\"createPath\"),r.calculateBox=t.get(\"calculateBox\")),a.addShape(e,r)}return t}),a.attr(\"clip\",r),e.sort(),h.push(a),t}),this.element=h}},i.remove=function(){var t=this.element;n.each(t,function(t){t&&t.remove(!0)}),this.clip&&this.clip.remove(!0)},e}(r);r.RegionFilter=s,t.exports=s},function(t,e,i){function n(t){var e=t.getAttr(\"color\");if(e){var i=e.getScale(e.type);if(i.isLinear)return i}var n=t.getXScale(),r=t.getYScale();return r||n}function r(t){var e=[];return a.each(t,function(t){var i=function(t,e){var i=-1;return a.each(t,function(t,n){if(t.title===e.title&&t.name===e.name&&t.value===e.value&&t.color===e.color)return i=n,!1}),i}(e,t);-1===i?e.push(t):e[i]=t}),e}var a=i(0),s=i(1),o=i(126),c=i(21);s.tooltip=a.deepMix({triggerOn:[\"touchstart\",\"touchmove\"],alwaysShow:!1,showTitle:!1,showCrosshairs:!1,crosshairsStyle:{stroke:\"rgba(0, 0, 0, 0.25)\",lineWidth:1},showTooltipMarker:!0,background:{radius:1,fill:\"rgba(0, 0, 0, 0.65)\",padding:[3,5]},titleStyle:{fontSize:12,fill:\"#fff\",textAlign:\"start\",textBaseline:\"top\"},nameStyle:{fontSize:12,fill:\"rgba(255, 255, 255, 0.65)\",textAlign:\"start\",textBaseline:\"middle\"},valueStyle:{fontSize:12,fill:\"#fff\",textAlign:\"start\",textBaseline:\"middle\"},showItemMarker:!0,itemMarkerStyle:{radius:3,symbol:\"circle\",lineWidth:1,stroke:\"#fff\"},layout:\"horizontal\",snap:!1},s.tooltip||{});var h=function(){function t(t){this.enable=!0,this.cfg={},this.tooltip=null,this.chart=null,this.timeStamp=0,a.mix(this,t);var e=this.chart;this.canvasDom=e.get(\"canvas\").get(\"el\")}var e=t.prototype;return e._setCrosshairsCfg=function(){var t=this.chart,e=a.mix({},s.tooltip),i=t.get(\"geoms\"),n=[];a.each(i,function(t){var e=t.get(\"type\");-1===n.indexOf(e)&&n.push(e)});var r=t.get(\"coord\").type;return!i.length||\"cartesian\"!==r&&\"rect\"!==r||1===n.length&&-1!==[\"line\",\"area\",\"path\",\"point\"].indexOf(n[0])&&a.mix(e,{showCrosshairs:!0}),e},e._getMaxLength=function(t){void 0===t&&(t={});var e=t,i=e.layout,n=e.plotRange;return\"horizontal\"===i?n.br.x-n.bl.x:n.bl.y-n.tr.y},e.render=function(){if(!this.tooltip){var t=this.chart,e=t.get(\"canvas\"),i=t.get(\"frontPlot\").addGroup({className:\"tooltipContainer\",zIndex:10}),n=t.get(\"backPlot\").addGroup({className:\"tooltipContainer\"}),r=t.get(\"plotRange\"),s=t.get(\"coord\"),c=this._setCrosshairsCfg(),h=this.cfg;(h=a.deepMix({plotRange:r,frontPlot:i,backPlot:n,canvas:e,fixed:s.transposed||s.isPolar},c,h)).maxLength=this._getMaxLength(h),this.cfg=h;var l=new o(h);this.tooltip=l,this.bindEvents()}},e.clear=function(){var t=this.tooltip;t&&t.destroy(),this.tooltip=null,this.prePoint=null,this._lastActive=null,this.unBindEvents()},e._getTooltipMarkerStyle=function(t){void 0===t&&(t={});var e=t,i=e.type,n=e.items,r=this.cfg;if(\"rect\"===i){var s,o,c,h,l=this.chart,u=l.get(\"plotRange\"),f=u.tl,p=u.br,g=l.get(\"coord\"),d=n[0],v=n[n.length-1],y=d.width;g.transposed?(s=f.x,o=v.y-.75*y,c=p.x-f.x,h=d.y-v.y+1.5*y):(s=d.x-.75*y,o=f.y,c=v.x-d.x+1.5*y,h=p.y-f.y),t.style=a.mix({x:s,y:o,width:c,height:h,fill:\"#CCD6EC\",opacity:.3},r.tooltipMarkerStyle)}else t.style=a.mix({radius:4,fill:\"#fff\",lineWidth:2},r.tooltipMarkerStyle);return t},e._setTooltip=function(t,e,i){void 0===i&&(i={});var n=this._lastActive,s=this.tooltip,o=this.cfg;e=r(e);var h=this.chart,l=h.get(\"coord\"),u=h.getYScales()[0],f=o.snap;if(!1===f&&u.isLinear){var p,g,d=l.invertPoint(t),v=h.get(\"plotRange\");c.isPointInPlot(t,v)&&(l.transposed?(p=u.invert(d.x),g=t.x,s.setXTipContent(p),s.setXTipPosition(g),s.setYCrosshairPosition(g)):(p=u.invert(d.y),g=t.y,s.setYTipContent(p),s.setYTipPosition(g),s.setXCrosshairPosition(g)))}if(o.onShow&&o.onShow({x:t.x,y:t.y,tooltip:s,items:e,tooltipMarkerCfg:i}),function(t,e){return JSON.stringify(t)===JSON.stringify(e)}(n,e)){if(!1===f&&(a.directionEnabled(o.crosshairsType,\"y\")||o.showYTip)){this.chart.get(\"canvas\").draw()}}else{this._lastActive=e;var y=o.onChange;y&&y({x:t.x,y:t.y,tooltip:s,items:e,tooltipMarkerCfg:i});var m=e[0],x=m.title||m.name,_=m.x;if(e.length>1&&(_=(e[0].x+e[e.length-1].x)/2),s.setContent(x,e,l.transposed),s.setPosition(e,t),l.transposed){var S=m.y;e.length>1&&(S=(e[0].y+e[e.length-1].y)/2),s.setYTipContent(x),s.setYTipPosition(S),s.setXCrosshairPosition(S),f&&(s.setXTipContent(m.value),s.setXTipPosition(_),s.setYCrosshairPosition(_))}else s.setXTipContent(x),s.setXTipPosition(_),s.setYCrosshairPosition(_),f&&(s.setYTipContent(m.value),s.setYTipPosition(m.y),s.setXCrosshairPosition(m.y));var b=i.items;o.showTooltipMarker&&b.length?(i=this._getTooltipMarkerStyle(i),s.setMarkers(i)):s.clearMarkers(),s.show()}},e.showTooltip=function(t){var e,i,r=this.chart,o=[],c=[],h=this.cfg;h.showItemMarker&&(i=h.itemMarkerStyle);var l=r.get(\"geoms\"),u=r.get(\"coord\");if(a.each(l,function(r){if(r.get(\"visible\")){var h=r.get(\"type\"),l=r.getSnapRecords(t);a.each(l,function(t){if(t.x&&t.y){var l=t.x,f=t.y,p=t._origin,g=t.color,d={x:l,y:a.isArray(f)?f[1]:f,color:g||s.defaultColor,origin:p,name:function(t,e){var i,r,s=t._getGroupScales();if(s.length&&a.each(s,function(t){return r=t,!1}),r){var o=r.field;i=r.getText(e[o])}else{var c=n(t);i=c.alias||c.field}return i}(r,p),value:function(t,e){var i=n(t);return i.getText(e[i.field])}(r,p),title:function(t,e){var i=t.getAttr(\"position\").getFields()[0],n=t.get(\"scales\")[i];return n.getText(e[n.field])}(r,p)};i&&(d.marker=a.mix({fill:g||s.defaultColor},i)),c.push(d),-1!==[\"line\",\"area\",\"path\"].indexOf(h)?(e=\"circle\",o.push(d)):\"interval\"!==h||\"cartesian\"!==u.type&&\"rect\"!==u.type||(e=\"rect\",d.width=r.getSize(t._origin),o.push(d))}})}}),c.length){var f={items:o,type:e};this._setTooltip(t,c,f)}else this.hideTooltip()},e.hideTooltip=function(){var t=this.cfg;this._lastActive=null;var e=this.tooltip;if(e){e.hide(),t.onHide&&t.onHide({tooltip:e});this.chart.get(\"canvas\").draw()}},e.handleShowEvent=function(t){var e=this.chart;if(this.enable&&!e.get(\"_closeTooltip\")){var i=e.get(\"plotRange\"),n=a.createEvent(t,e);if(c.isPointInPlot(n,i)||this.cfg.alwaysShow){var r=this.timeStamp,s=+new Date;s-r>16&&(this.showTooltip(n),this.timeStamp=s)}else this.hideTooltip()}},e.handleHideEvent=function(){var t=this.chart;this.enable&&!t.get(\"_closeTooltip\")&&this.hideTooltip()},e.handleDocEvent=function(t){var e=this.chart;if(this.enable&&!e.get(\"_closeTooltip\")){var i=this.canvasDom;t.target!==i&&this.hideTooltip()}},e._handleEvent=function(t,e,i){var n=this.canvasDom;a.each([].concat(t),function(t){\"bind\"===i?a.addEventListener(n,t,e):a.removeEventListener(n,t,e)})},e.bindEvents=function(){var t=this.cfg,e=t.triggerOn,i=t.triggerOff,n=t.alwaysShow,r=a.wrapBehavior(this,\"handleShowEvent\"),s=a.wrapBehavior(this,\"handleHideEvent\");if(e&&this._handleEvent(e,r,\"bind\"),i&&this._handleEvent(i,s,\"bind\"),!n){var o=a.wrapBehavior(this,\"handleDocEvent\");a.isBrowser&&a.addEventListener(document,\"touchstart\",o)}},e.unBindEvents=function(){var t=this.cfg,e=t.triggerOn,i=t.triggerOff,n=t.alwaysShow,r=a.getWrapBehavior(this,\"handleShowEvent\"),s=a.getWrapBehavior(this,\"handleHideEvent\");if(e&&this._handleEvent(e,r,\"unBind\"),i&&this._handleEvent(i,s,\"unBind\"),!n){var o=a.getWrapBehavior(this,\"handleDocEvent\");a.isBrowser&&a.removeEventListener(document,\"touchstart\",o)}},t}();t.exports={init:function(t){var e=new h({chart:t});t.set(\"tooltipController\",e),t.tooltip=function(t,i){return a.isObject(t)&&(i=t,t=!0),e.enable=t,i&&(e.cfg=i),this}},afterGeomDraw:function(t){var e=t.get(\"tooltipController\");e.render(),t.showTooltip=function(t){return e.showTooltip(t),this},t.hideTooltip=function(){return e.hideTooltip(),this}},clearInner:function(t){t.get(\"tooltipController\").clear()}}},function(t,e,i){var n=i(0),r=i(45),a=i(46),s=i(127),o=function(){function t(t){n.deepMix(this,this.getDefaultCfg(),t);var e=this.frontPlot;if(!this.custom){var i=new a(n.mix({parent:e,zIndex:3},t));this.container=i;var r=this.fixed,o=this.background;r||(this.tooltipArrow=e.addShape(\"Polygon\",{className:\"tooltip-arrow\",visible:!1,zIndex:2,attrs:n.mix({points:[]},o)}))}if(this.showXTip){var c=this.xTipBackground,h=new s({className:\"xTip\",background:c,visible:!1});e.add(h.container),this.xTipBox=h}if(this.showYTip){var l=this.yTipBackground,u=new s({className:\"yTip\",background:l,visible:!1});e.add(u.container),this.yTipBox=u}this.showCrosshairs&&this._renderCrosshairs(),e.sort()}var e=t.prototype;return e.getDefaultCfg=function(){return{showCrosshairs:!1,crosshairsStyle:{stroke:\"rgba(0, 0, 0, 0.25)\",lineWidth:1},crosshairsType:\"y\",showXTip:!1,showYTip:!1,xTip:null,xTipBackground:{radius:1,fill:\"rgba(0, 0, 0, 0.65)\",padding:[3,5]},yTip:null,yTipBackground:{radius:1,fill:\"rgba(0, 0, 0, 0.65)\",padding:[3,5]},background:null,layout:\"horizontal\",offsetX:0,offsetY:0}},e.setContent=function(t,e){if(this.title=t,this.items=e,!this.custom){var i=this.container;i.setTitle(t),i.setItems(e)}},e.setYTipContent=function(t){var e=this.yTip;t=n.isFunction(e)?e(t):n.mix({text:t},e),this.yTipBox&&this.yTipBox.updateContent(t)},e.setYTipPosition=function(t){var e=this.plotRange,i=this.crosshairsShapeX;if(this.showYTip){var n=this.yTipBox,r=n.getHeight(),a=n.getWidth(),s=e.tl.x-a,o=t-r/2;o<=e.tl.y&&(o=e.tl.y),o+r>=e.br.y&&(o=e.br.y-r),s<0&&(s=e.tl.x,i&&i.attr(\"x1\",e.tl.x+a)),n.updatePosition(s,o)}},e.setXTipContent=function(t){var e=this.xTip;t=n.isFunction(e)?e(t):n.mix({text:t},e),this.xTipBox&&this.xTipBox.updateContent(t)},e.setXTipPosition=function(t){var e=this.showXTip,i=this.canvas,n=this.plotRange,r=this.xTipBox,a=this.crosshairsShapeY;if(e){var s=i.get(\"height\"),o=r.getWidth(),c=r.getHeight(),h=t-o/2,l=n.br.y;h<=n.tl.x&&(h=n.tl.x),h+o>=n.tr.x&&(h=n.tr.x-o),s-l1?(t[0].x+t[t.length-1].x)/2:t[0].x,(d=y-u/2+r)g.x&&(d=g.x-u),o){o.attr(\"points\",[{x:y-3,y:p.y-4+a},{x:y+3,y:p.y-4+a},{x:y,y:p.y+a}]);var m=e.backShape,x=n.parsePadding(m.attr(\"radius\"));y===p.x?(x[3]=0,o.attr(\"points\",[{x:p.x,y:p.y+a},{x:p.x,y:p.y-4+a},{x:p.x+4,y:p.y-4+a}])):y===g.x&&(x[2]=0,o.attr(\"points\",[{x:g.x,y:p.y+a},{x:g.x-4,y:p.y-4+a},{x:g.x,y:p.y-4+a}])),m.attr(\"radius\",x)}}e.moveTo(d-h,v-l)}},e.setMarkers=function(t){void 0===t&&(t={});var e=t,i=e.items,a=e.style,s=e.type,o=this._getMarkerGroup(s);if(\"circle\"===s)for(var c=0,h=i.length;c0&&(h=0),\"right\"===i&&c>0&&(c=0),t.moveTo(d+c,v+h)},e.alignLegends=function(){var t=this,e=t.legends;return n.each(e,function(e,i){n.each(e,function(n,r){var a=e[r-1];t._alignLegend(n,a,i)})}),t},e.handleEvent=function(t){var e=this,i=e.chart,r=n.createEvent(t,i),a=function(t,i){var r=null,a=e.legends;return n.each(a,function(e){n.each(e,function(e){var a=e.itemsGroup,s=e.legendHitBoxes,o=a.get(\"children\");if(o.length){var c=e.x,h=e.y;n.each(s,function(n,a){if(t>=n.x+c&&t<=n.x+n.width+c&&i>=n.y+h&&i<=n.height+n.y+h)return r={clickedItem:o[a],clickedLegend:e},!1})}})}),r}(r.x,r.y);if(a&&!1!==a.clickedLegend.clickable){var s=a.clickedItem,o=a.clickedLegend;if(o.onClick)t.clickedItem=s,o.onClick(t);else if(!o.custom){var c=s.get(\"checked\"),h=s.get(\"dataValue\"),l=o.filterVals,u=o.field;\"single\"===o.selectedMode?i.filter(u,function(t){return t===h}):(c?n.Array.remove(l,h):l.push(h),i.filter(u,function(t){return-1!==l.indexOf(t)})),i.repaint()}}},e.bindEvents=function(){var t=this.legendCfg.triggerOn||\"touchstart\",e=n.wrapBehavior(this,\"handleEvent\");n.addEventListener(this.canvasDom,t,e)},e.unBindEvents=function(){var t=this.legendCfg.triggerOn||\"touchstart\",e=n.getWrapBehavior(this,\"handleEvent\");n.removeEventListener(this.canvasDom,t,e)},t}();t.exports={init:function(t){var e=new o({container:t.get(\"backPlot\"),plotRange:t.get(\"plotRange\"),chart:t});t.set(\"legendController\",e),t.legend=function(t,i){var r=e.legendCfg;return e.enable=!0,n.isBoolean(t)?(e.enable=t,r=i||{}):n.isObject(t)?r=t:r[t]=i,e.legendCfg=r,this}},beforeGeomDraw:function(t){var e=t.get(\"legendController\");if(!e.enable)return null;var i=e.legendCfg;if(i&&i.custom)e.addCustomLegend();else{var r=t.getLegendItems(),a=t.get(\"scales\"),s=t.get(\"filters\");n.each(r,function(t,i){var n,r=a[i],o=r.values;n=s&&s[i]?o.filter(s[i]):o.slice(0),e.addLegend(r,t,n)})}i&&!1!==i.clickable&&e.bindEvents();var o=e.legends,c={top:0,right:0,bottom:0,left:0};n.each(o,function(e,i){var r=0;n.each(e,function(t){var e=t.getWidth(),n=t.getHeight();\"top\"===i||\"bottom\"===i?(r=Math.max(r,n),t.offsetY>0&&(r+=t.offsetY)):(r=Math.max(r,e),t.offsetX>0&&(r+=t.offsetX))}),c[i]=r+function(t,e){var i=0;switch(e=n.parsePadding(e),t){case\"top\":i=e[0];break;case\"right\":i=e[1];break;case\"bottom\":i=e[2];break;case\"left\":i=e[3]}return i}(i,t.get(\"appendPadding\"))}),t.set(\"legendRange\",c)},afterGeomDraw:function(t){t.get(\"legendController\").alignLegends()},clearInner:function(t){t.get(\"legendController\").clear(),t.set(\"legendRange\",null)}}},function(t,e,i){function n(t,e,i){var n=[];return h.each(t,function(t,r){var a=t.get(\"container\").get(\"children\"),s=t.get(\"type\"),c=h.isNil(t.get(\"animateCfg\"))?o(s,e):t.get(\"animateCfg\");!1!==c&&h.each(a,function(e,a){e.get(\"className\")===s&&(e._id=function(t,e,i){var n,r=t.get(\"type\"),a=\"geom\"+i+\"-\"+r,s=t.getXScale(),o=t.getYScale(),c=s.field||\"x\",l=o.field||\"y\",u=e[l];n=s.isIdentity?s.value:e[c],a+=\"interval\"===r||\"schema\"===r?\"-\"+n:\"line\"===r||\"area\"===r||\"path\"===r?\"-\"+r:s.isCategory?\"-\"+n:\"-\"+n+\"-\"+u;var f=t._getGroupScales();return h.each(f,function(t){var i=t.field;\"identity\"!==t.type&&(a+=\"-\"+e[i])}),a}(t,e.get(\"origin\")._origin,r),e.set(\"coord\",i),e.set(\"animateCfg\",c),e.set(\"index\",a),n.push(e))}),t.set(\"shapes\",a)}),n}function r(t,e,i,n){return h.isFunction(n)?n:h.isString(n)?p.Action[n]:p.getAnimation(t,e,i)}function a(t,e,i){if(!1===i||h.isObject(i)&&!1===i[e])return!1;var n=p.getAnimateCfg(t,e);return i&&i[e]?h.deepMix({},n,i[e]):n}function s(t,e,i){var n,s,o=[],c=[];h.each(e,function(e){var i=t[e._id];i?(e.set(\"cacheShape\",i),o.push(e),delete t[e._id]):c.push(e)}),h.each(t,function(t){var e=t.className,o=t.coord,c=t._id,l=t.attrs,u=t.index,f=t.type;if(!1===(s=a(e,\"leave\",t.animateCfg)))return!0;if(n=r(e,o,\"leave\",s.animation),h.isFunction(n)){var p=i.addShape(f,{attrs:l,index:u,canvas:i,className:e});p._id=c,n(p,s,o)}}),h.each(o,function(t){var e=t.get(\"className\");if(!1===(s=a(e,\"update\",t.get(\"animateCfg\"))))return!0;var i=t.get(\"coord\"),o=t.get(\"cacheShape\").attrs,c=function(t,e){var i={};for(var n in e)h.isNumber(t[n])&&t[n]!==e[n]?i[n]=e[n]:h.isArray(t[n])&&JSON.stringify(t[n])!==JSON.stringify(e[n])&&(i[n]=e[n]);return i}(o,t._attrs.attrs);Object.keys(c).length&&(n=r(e,i,\"update\",s.animation),h.isFunction(n)?n(t,s,i):(t.attr(o),t.animate().to({attrs:c,duration:s.duration,easing:s.easing,delay:s.delay}).onEnd(function(){t.set(\"cacheShape\",null)})))}),h.each(c,function(t){var e=t.get(\"className\"),i=t.get(\"coord\");if(!1===(s=a(e,\"enter\",t.get(\"animateCfg\"))))return!0;if(n=r(e,i,\"enter\",s.animation),h.isFunction(n))if(\"interval\"===e&&i.isPolar&&i.transposed){var c=t.get(\"index\"),l=o[c-1];n(t,s,l)}else n(t,s,i)})}function o(t,e){if(!t)return null;var i=e.get(\"animate\");return t.indexOf(\"guide-tag\")>-1&&(t=\"guide-tag\"),h.isObject(i)?i[t]:!1!==i&&null}var c,h=i(0),l=i(27),u=i(131),f=i(132),p=i(47),g=i(134),d=i(135),v=i(7);l.prototype.animate=function(){var t=h.mix({},this.get(\"attrs\"));return new f(this,t,c)},v.prototype.animate=function(t){return this.set(\"animate\",t),this},p.Action=g,p.defaultCfg={interval:{enter:function(t){return t.isPolar&&t.transposed?function(t){t.set(\"zIndex\",-1);t.get(\"parent\").sort()}:g.fadeIn}},area:{enter:function(t){return t.isPolar?null:g.fadeIn}},line:{enter:function(t){return t.isPolar?null:g.fadeIn}},path:{enter:function(t){return t.isPolar?null:g.fadeIn}}};var y={line:function(t){return t.isPolar?d.groupScaleInXY:d.groupWaveIn},area:function(t){return t.isPolar?d.groupScaleInXY:d.groupWaveIn},path:function(t){return t.isPolar?d.groupScaleInXY:d.groupWaveIn},point:function(){return d.shapesScaleInXY},interval:function(t){var e;return t.isPolar?(e=d.groupScaleInXY,t.transposed&&(e=d.groupWaveIn)):e=t.transposed?d.groupScaleInX:d.groupScaleInY,e},schema:function(){return d.groupWaveIn}};t.exports={afterCanvasInit:function(){(c=new u).play()},beforeCanvasDraw:function(t){if(!1!==t.get(\"animate\")){var e=t.get(\"isUpdate\"),i=t.get(\"canvas\"),c=t.get(\"coord\"),l=t.get(\"geoms\"),u=i.get(\"caches\")||[];0===u.length&&(e=!1);var f=n(l,t,c),g=t.get(\"axisController\"),v=g.frontPlot,m=g.backPlot,x=v.get(\"children\").concat(m.get(\"children\")),_=[];t.get(\"guideController\")&&(_=t.get(\"guideController\").guideShapes);var S=[];if(x.concat(_).forEach(function(e){var i=o(e.get(\"className\"),t);e.set(\"coord\",c),e.set(\"animateCfg\",i),S.push(e),f.push(e)}),i.set(\"caches\",function(t){for(var e={},i=0,n=t.length;i=i.startTime&&!i.hasStarted&&(i.hasStarted=!0,i.onStart&&i.onStart());var h=(t-i.startTime)/c;if(h=Math.max(0,Math.min(h,1)),h=i.easing(h),i.onFrame)i.onFrame(h);else for(var l in o){var u=(0,o[l])(h),f=void 0;if(\"points\"===l){f=[];for(var p=Math.max(a.points.length,s.points.length),g=0;g=i.endTime&&!i.hasEnded&&(i.hasEnded=!0,i.onEnd&&i.onEnd()),1===h&&(this.anims.splice(e,1),e--)}}}this.canvas.map(function(t){return t.draw(),t}),this.time=r.now()},t}();t.exports=a},function(t,e,i){function n(t){for(var e=[],i=0,n=t.length;il.x?n.x:l.x,c=l.y+p/2):\"xy\"===r&&(i.isPolar?(s=i.center.x,c=i.center.y):(s=(l.x+u.x)/2,c=(l.y+u.y)/2));var d=a.getScaledMatrix(g,[s,c],r);g.isClip=!0,g.endState={matrix:d},g.set(\"canvas\",t.get(\"canvas\")),t.attr(\"clip\",g);a.doAnimation(g,g.endState,e,function(){t.attr(\"clip\",null),g.remove(!0)})}function r(t,e,i){for(var n,r,s,o=t.get(\"children\"),c=0,h=o.length;cD&&e.splice(D,e.length-D),e.sort(function(t,e){return t.y-e.y});var i=t._antiCollision(e);S=S.concat(i)})}this.drawnLabels=S},e.bindEvents=function(){var t=this.pieLabelCfg.triggerOn||\"touchstart\",e=a.wrapBehavior(this,\"_handleEvent\");a.addEventListener(this.canvasDom,t,e)},e.unBindEvents=function(){var t=this.pieLabelCfg.triggerOn||\"touchstart\",e=a.getWrapBehavior(this,\"_handleEvent\");a.removeEventListener(this.canvasDom,t,e)},e.clear=function(){this.labelGroup&&this.labelGroup.clear(),this.halo&&this.halo.remove(!0),this.lastSelectedData=null,this.drawnLabels=[],this.unBindEvents()},e._drawLabel=function(t){var e=this.pieLabelCfg,i=this.chart.get(\"width\"),n=e.sidePadding,r=t.y,a=t.textGroup,s=a.get(\"children\"),o={textAlign:\"left\"===t._side?\"left\":\"right\",x:\"left\"===t._side?n:i-n};return s.forEach(function(t){t.attr(o),t.attr(\"y\",r+t.get(\"offsetY\"))}),a},e._drawLabelLine=function(t,e){var i=this.chart,n=this.pieLabelCfg,r=this.labelGroup,s=i.get(\"width\"),o=n.sidePadding,c=n.adjustOffset,h=n.lineStyle,l=n.anchorStyle,u=n.skipOverlapLabels,f=t._anchor,p=t._inflection,g=t.fill,d=t.y,v={x:\"left\"===t._side?o:s-o,y:d},y=[f,p,v];if(!u&&p.y!==d)if(p.ym.x)&&(y=[f,_,v])}else y=[f,{x:p.x,y:d},v];r.addShape(\"Polyline\",{attrs:a.mix({points:y,lineWidth:1,stroke:g},h)}),r.addShape(\"Circle\",{attrs:a.mix({x:f.x,y:f.y,r:2,fill:g},l)})},e._antiCollision=function(t){var e,i=this,n=i.chart,r=i.pieLabelCfg,a=n.get(\"coord\"),s=n.get(\"height\"),o=a.center,c=a.circleRadius,h=r.inflectionOffset,l=r.lineHeight,u=o.y-c-h-l,f=!0,p=s,g=0,d=Number.MIN_VALUE,v=0,y=t.map(function(t){var e=t.y;e>g&&(g=e),e=v&&(v=i),{size:l,targets:[e-u]}});g-u>p&&(p=g-u);for(var m=function(t){t.forEach(function(t){var e=(Math.min.apply(d,t.targets)+Math.max.apply(d,t.targets))/2;t.pos=Math.min(Math.max(d,e-t.size/2),p-t.size)})};f;)for(m(y),f=!1,e=y.length;e--;)if(e>0){var x=y[e-1],_=y[e];x.pos+x.size>_.pos&&(x.size+=_.size,x.targets=x.targets.concat(_.targets),x.pos+x.size>p&&(x.pos=p-x.size),y.splice(e,1),f=!0)}e=0,y.forEach(function(i){var n=u;i.targets.forEach(function(){t[e].y=i.pos+n+l/2,n+=l,e++})});var S=[];return t.forEach(function(t){var e=i._drawLabel(t);i.labelGroup.add(e),i._drawLabelLine(t,v),S.push(e)}),S},e._handleEvent=function(t){for(var e,i=this.chart,n=this.drawnLabels,r=this.pieLabelCfg,s=r.onClick,o=r.activeShape,c=a.createEvent(t,i),h=c.x,l=c.y,u=0,f=n.length;u=g.minX&&h<=g.maxX&&l>=g.minY&&l<=g.maxY){e=p;break}}var d=i.getSnapRecords({x:h,y:l});e?c.data=e.get(\"data\"):d.length&&(c.data=d[0]._origin),s&&s(c),c.data&&o&&this._activeShape(c.data)},e._getSelectedShapeByData=function(t){var e=null,i=this.chart.get(\"geoms\")[0],n=i.get(\"container\").get(\"children\");return a.each(n,function(n){if(n.get(\"isShape\")&&n.get(\"className\")===i.get(\"type\")){var r=n.get(\"origin\")._origin;if(a.isObjectValueEqual(r,t))return e=n,!1}}),e},e._activeShape=function(t){var e=this.chart,i=this.lastSelectedData,n=this.pieLabelCfg;if(t!==i){this.lastSelectedData=t;var r=n.activeStyle,s=this._getSelectedShapeByData(t)._attrs.attrs,o=s.x,c=s.y,h=s.startAngle,l=s.endAngle,u=s.r,f=s.fill,p=e.get(\"frontPlot\");this.halo&&this.halo.remove(!0);var g=p.addShape(\"sector\",{attrs:a.mix({x:o,y:c,r:u+r.offset+r.appendRadius,r0:u+r.offset,fill:f,startAngle:h,endAngle:l},r)});this.halo=g,e.get(\"canvas\").draw()}},t}();t.exports={init:function(t){var e=t.get(\"frontPlot\").addGroup({className:\"pie-label\",zIndex:0}),i=new c({chart:t,labelGroup:e});t.set(\"pieLabelController\",i),t.pieLabel=function(t){return t=a.deepMix({},o,t),i.pieLabelCfg=t,this}},afterGeomDraw:function(t){var e=t.get(\"pieLabelController\");e.pieLabelCfg&&(e.renderLabels(),e.bindEvents())},clearInner:function(t){var e=t.get(\"pieLabelController\");e.pieLabelCfg&&e.clear()}}},function(t,e,i){t.exports={Interaction:i(12),PieSelect:i(140),IntervalSelect:i(141),Swipe:i(142),Pan:i(143),Pinch:i(144)}},function(t,e,i){var n;!function(r,a,s,o){function c(t,e,i){return setTimeout(p(t,i),e)}function h(t,e,i){return!!Array.isArray(t)&&(l(t,i[e],i),!0)}function l(t,e,i){var n;if(t)if(t.forEach)t.forEach(e,i);else if(t.length!==o)for(n=0;n\\s*\\(/gm,\"{anonymous}()@\"):\"Unknown Stack Trace\",a=r.console&&(r.console.warn||r.console.log);return a&&a.call(r.console,n,i),t.apply(this,arguments)}}function f(t,e,i){var n,r=e.prototype;(n=t.prototype=Object.create(r)).constructor=t,n._super=r,i&&et(n,i)}function p(t,e){return function(){return t.apply(e,arguments)}}function g(t,e){return typeof t==rt?t.apply(e?e[0]||o:o,e):t}function d(t,e){return t===o?e:t}function v(t,e,i){l(_(e),function(e){t.addEventListener(e,i,!1)})}function y(t,e,i){l(_(e),function(e){t.removeEventListener(e,i,!1)})}function m(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function x(t,e){return t.indexOf(e)>-1}function _(t){return t.trim().split(/\\s+/g)}function S(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var n=0;ni[e]}):n.sort()),n}function P(t,e){for(var i,n,r=e[0].toUpperCase()+e.slice(1),a=0;a1&&!i.firstMultiple?i.firstMultiple=A(e):1===r&&(i.firstMultiple=!1);var a=i.firstInput,s=i.firstMultiple,c=s?s.center:a.center,h=e.center=D(n);e.timeStamp=ot(),e.deltaTime=e.timeStamp-a.timeStamp,e.angle=E(c,h),e.distance=O(c,h),function(t,e){var i=e.center,n=t.offsetDelta||{},r=t.prevDelta||{},a=t.prevInput||{};e.eventType!==dt&&a.eventType!==yt||(r=t.prevDelta={x:a.deltaX||0,y:a.deltaY||0},n=t.offsetDelta={x:i.x,y:i.y});e.deltaX=r.x+(i.x-n.x),e.deltaY=r.y+(i.y-n.y)}(i,e),e.offsetDirection=I(e.deltaX,e.deltaY);var l=k(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=l.x,e.overallVelocityY=l.y,e.overallVelocity=st(l.x)>st(l.y)?l.x:l.y,e.scale=s?function(t,e){return O(e[0],e[1],At)/O(t[0],t[1],At)}(s.pointers,n):1,e.rotation=s?function(t,e){return E(e[1],e[0],At)+E(t[1],t[0],At)}(s.pointers,n):0,e.maxPointers=i.prevInput?e.pointers.length>i.prevInput.maxPointers?e.pointers.length:i.prevInput.maxPointers:e.pointers.length,function(t,e){var i,n,r,a,s=t.lastInterval||e,c=e.timeStamp-s.timeStamp;if(e.eventType!=mt&&(c>gt||s.velocity===o)){var h=e.deltaX-s.deltaX,l=e.deltaY-s.deltaY,u=k(c,h,l);n=u.x,r=u.y,i=st(u.x)>st(u.y)?u.x:u.y,a=I(h,l),t.lastInterval=e}else i=s.velocity,n=s.velocityX,r=s.velocityY,a=s.direction;e.velocity=i,e.velocityX=n,e.velocityY=r,e.direction=a}(i,e);var u=t.element;m(e.srcEvent.target,u)&&(u=e.srcEvent.target);e.target=u}(t,i),t.emit(\"hammer.input\",i),t.recognize(i),t.session.prevInput=i}function A(t){for(var e=[],i=0;i=st(e)?t<0?_t:St:e<0?bt:Ct}function O(t,e,i){i||(i=Tt);var n=e[i[0]]-t[i[0]],r=e[i[1]]-t[i[1]];return Math.sqrt(n*n+r*r)}function E(t,e,i){i||(i=Tt);var n=e[i[0]]-t[i[0]],r=e[i[1]]-t[i[1]];return 180*Math.atan2(r,n)/Math.PI}function Y(){this.evEl=kt,this.evWin=It,this.pressed=!1,M.apply(this,arguments)}function B(){this.evEl=Yt,this.evWin=Bt,M.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function F(){this.evTarget=Nt,this.evWin=Lt,this.started=!1,M.apply(this,arguments)}function N(){this.evTarget=Xt,this.targetIds={},M.apply(this,arguments)}function L(){M.apply(this,arguments);var t=p(this.handler,this);this.touch=new N(this.manager,t),this.mouse=new Y(this.manager,t),this.primaryTouch=null,this.lastTouches=[]}function R(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var i={x:e.clientX,y:e.clientY};this.lastTouches.push(i);var n=this.lastTouches;setTimeout(function(){var t=n.indexOf(i);t>-1&&n.splice(t,1)},zt)}}function X(t,e){this.manager=t,this.set(e)}function z(t){this.options=et({},this.defaults,t||{}),this.id=lt++,this.manager=null,this.options.enable=d(this.options.enable,!0),this.state=$t,this.simultaneous={},this.requireFail=[]}function j(t){return t&ie?\"cancel\":t&te?\"end\":t&Qt?\"move\":t&Kt?\"start\":\"\"}function G(t){return t==Ct?\"down\":t==bt?\"up\":t==_t?\"left\":t==St?\"right\":\"\"}function W(t,e){var i=e.manager;return i?i.get(t):t}function H(){z.apply(this,arguments)}function V(){H.apply(this,arguments),this.pX=null,this.pY=null}function q(){H.apply(this,arguments)}function U(){z.apply(this,arguments),this._timer=null,this._input=null}function Z(){H.apply(this,arguments)}function J(){H.apply(this,arguments)}function $(){z.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function K(t,e){return e=e||{},e.recognizers=d(e.recognizers,K.defaults.preset),new Q(t,e)}function Q(t,e){this.options=et({},K.defaults,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=function(t){var e=t.options.inputClass;return new(e||(ft?B:pt?N:ut?L:Y))(t,T)}(this),this.touchAction=new X(this,this.options.touchAction),tt(this,!0),l(this.options.recognizers,function(t){var e=this.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])},this)}function tt(t,e){var i=t.element;if(i.style){var n;l(t.options.cssProps,function(r,a){n=P(i.style,a),e?(t.oldCssProps[n]=i.style[n],i.style[n]=r):i.style[n]=t.oldCssProps[n]||\"\"}),e||(t.oldCssProps={})}}var et,it=[\"\",\"webkit\",\"Moz\",\"MS\",\"ms\",\"o\"],nt=a.createElement(\"div\"),rt=\"function\",at=Math.round,st=Math.abs,ot=Date.now;et=\"function\"!=typeof Object.assign?function(t){if(t===o||null===t)throw new TypeError(\"Cannot convert undefined or null to object\");for(var e=Object(t),i=1;i-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){function e(e){i.manager.emit(e,t)}var i=this,n=this.state;n=te&&e(i.options.event+j(n))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=32},canEmit:function(){for(var t=0;te.threshold&&r&e.direction},attrTest:function(t){return H.prototype.attrTest.call(this,t)&&(this.state&Kt||!(this.state&Kt)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=G(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),f(q,H,{defaults:{event:\"pinch\",threshold:0,pointers:2},getTouchAction:function(){return[qt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&Kt)},emit:function(t){if(1!==t.scale){var e=t.scale<1?\"in\":\"out\";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),f(U,z,{defaults:{event:\"press\",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Ht]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,n=t.distancee.time;if(this._input=t,!n||!i||t.eventType&(yt|mt)&&!r)this.reset();else if(t.eventType&dt)this.reset(),this._timer=c(function(){this.state=ee,this.tryEmit()},e.time,this);else if(t.eventType&yt)return ee;return 32},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===ee&&(t&&t.eventType&yt?this.manager.emit(this.options.event+\"up\",t):(this._input.timeStamp=ot(),this.manager.emit(this.options.event,this._input)))}}),f(Z,H,{defaults:{event:\"rotate\",threshold:0,pointers:2},getTouchAction:function(){return[qt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&Kt)}}),f(J,H,{defaults:{event:\"swipe\",threshold:10,velocity:.3,direction:Pt|wt,pointers:1},getTouchAction:function(){return V.prototype.getTouchAction.call(this)},attrTest:function(t){var e,i=this.options.direction;return i&(Pt|wt)?e=t.overallVelocity:i&Pt?e=t.overallVelocityX:i&wt&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&i&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&st(e)>this.options.velocity&&t.eventType&yt},emit:function(t){var e=G(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),f($,z,{defaults:{event:\"tap\",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Vt]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,n=t.distance=e.x&&s<=e.x+e.width&&o>=e.y&&o<=e.height+e.y?i=t:l.push(t)})}else if(\"range\"===c){var f=e.getSnapRecords({x:s,y:o});if(!f.length)return void this.reset();var p=f[0]._origin,g=this._selectShapesByData(p);i=g.selectedShape,l=g.unSelectedShapes}if(i)if(this.selectedShape=i,i.get(\"_selected\")){if(!this.cancelable)return void this._setEventData(t);this.reset()}else this._selectShapes(i,l);else this.reset();this._setEventData(t)},i.end=function(t){this._setEventData(t)},e}(a);s.registerInteraction(\"interval-select\",o),t.exports=o},function(t,e,i){function n(t){if(void 0===t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return t}var r=i(0),a=i(12),s=i(7),o=i(30),c=i(49),h=i(31),l=function(t){function e(e,i){var a,s=n(n(a=t.call(this,e,i)||this)),l=s.hammer,u=s.threshold,f=s.velocity;return l&&l.get(\"swipe\").set({direction:6,threshold:u,velocity:f}),i.registerPlugins([o,{changeData:function(){s.limitRange={}},clear:function(){s.limitRange={}}}]),s.mode=\"x\",r.mix(s,h,c),a}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}(e,t);var i=e.prototype;return i.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e=r.mix({},e,{startEvent:\"touchstart\",processEvent:\"swipe\",endEvent:\"touchend\",currentDeltaX:null,threshold:10,velocity:.3,limitRange:{},_timestamp:0,_panCumulativeDelta:0,speed:5})},i.process=function(t){this.currentDeltaX=0,this._handleMove(t)},i.end=function(){this.currentDeltaX=null,this._panCumulativeDelta=0},e}(a);s.registerInteraction(\"swipe\",l),t.exports=l},function(t,e,i){function n(t){if(void 0===t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return t}var r=i(0),a=i(12),s=i(7),o=i(30),c=i(49),h=i(50),l=i(31),u=function(t){function e(e,i){var a,s=n(n(a=t.call(this,e,i)||this)),u=s.hammer,f=s.panThreshold;return u&&u.get(\"pan\").set({threshold:f}),i.registerPlugins([o,{changeData:function(){s.limitRange={}},clear:function(){s.limitRange={}}}]),r.mix(n(n(a)),l,c,h),a._bindPress(),a}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}(e,t);var i=e.prototype;return i.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e=r.mix({},e,{startEvent:\"panstart\",processEvent:\"panmove\",endEvent:\"panend\",resetEvent:\"touchend\",mode:\"x\",panThreshold:10,pressThreshold:9,pressTime:251,currentDeltaX:null,currentDeltaY:null,limitRange:{},_timestamp:0,lastPoint:null,_panCumulativeDelta:0,speed:5}),(r.isWx||r.isMy)&&(e.startEvent=\"touchstart\",e.processEvent=\"touchmove\",e.endEvent=\"touchend\"),e},i.start=function(t){this.pressed||(this.currentDeltaX=0,this.currentDeltaY=0,\"touchstart\"!==t.type&&\"touchStart\"!==t.type||(this.lastPoint=t.touches[0]),this._handleMove(t))},i.process=function(t){this.pressed||this._handleMove(t)},i.end=function(){this.pressed||(this.currentDeltaX=null,this.currentDeltaY=null,this.lastPoint=null,this._panCumulativeDelta=0)},e}(a);s.registerInteraction(\"pan\",u),t.exports=u},function(t,e,i){function n(t){if(void 0===t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return t}var r=i(0),a=i(23),s=i(12),o=i(7),c=i(30),h=i(50),l=i(31),u=function(t){function e(e,i){var a,s=n(n(a=t.call(this,e,i)||this));return s.hammer.get(\"pinch\").set({enable:!0}),i.registerPlugins([c,{changeData:function(){s.limitRange={},s.originTicks=null},clear:function(){s.limitRange={},s.originTicks=null}}]),r.mix(s,h,l),s._bindPress(),a}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}(e,t);var i=e.prototype;return i.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return r.mix({},e,{startEvent:\"pinchstart\",processEvent:\"pinch\",endEvent:\"pinchend\",resetEvent:\"touchend\",pressThreshold:9,pressTime:251,mode:\"x\",currentPinchScaling:null,originValues:null,minScale:null,maxScale:null,limitRange:{},sensitivity:1,_pinchCumulativeDelta:0,_timestamp:0})},i.start=function(){this.pressed||(this.currentPinchScaling=1)},i.process=function(t){this.pressed||this._handlePinch(t)},i.end=function(t){this.pressed||(this._handlePinch(t),this.currentPinchScaling=null,this.pinchCumulativeDelta=0)},i._handlePinch=function(t){var e,i=1/this.currentPinchScaling*t.scale,n=t.target.getBoundingClientRect(),r={x:t.center.x-n.left,y:t.center.y-n.top},a=Math.abs(t.pointers[0].clientX-t.pointers[1].clientX),s=Math.abs(t.pointers[0].clientY-t.pointers[1].clientY),o=a/s;e=o>.3&&o<1.7?\"xy\":a>s?\"x\":\"y\";var c=this._timestamp,h=+new Date;h-c>16&&(this._doZoom(i,r,e),this._timestamp=h),this.currentPinchScaling=t.scale},i._doZoom=function(t,e,i){var n,s=this,o=s.mode,c=s.chart,h=s.limitRange;n=\"xy\"===o&&void 0!==i?i:\"xy\";var l=c.get(\"data\");if(r.directionEnabled(o,\"x\")&&r.directionEnabled(n,\"x\")){var u=c.getXScale(),f=u.field;h[f]||(h[f]=a.getLimitRange(l,u)),u.isCategory?s._zoomCatScale(u,t,e):u.isLinear&&s._zoomLinearScale(u,t,e,\"x\");var p=a.getColDef(c,f);this.xRange=a.getFieldRange(p,h[f],u.type)}if(r.directionEnabled(o,\"y\")&&r.directionEnabled(n,\"y\")){var g=c.getYScales();r.each(g,function(i){var n=i.field;h[n]||(h[n]=a.getLimitRange(l,i)),i.isLinear&&s._zoomLinearScale(i,t,e,\"y\")});var d=a.getColDef(c,g[0].field);this.yRange=a.getFieldRange(d,h[g[0].field],g[0].type)}c.repaint()},i._zoomLinearScale=function(t,e,i,n){var r=this.chart,a=t.min,s=t.max,o=t.field,c=s-a,h=this.limitRange,l=h[o].max-h[o].min,u=r.get(\"coord\"),f=c*(e-1);if(this.minScale&&e<1){var p=l/this.minScale;f=Math.max(c-p,f)}if(this.maxScale&&e>=1){var g=l/this.maxScale;f=Math.min(c-g,f)}var d=u.invertPoint(i),v=\"x\"===n?d.x:d.y,y=s-f*(1-v),m=a+f*v;this.updateLinearScale(o,m,y)},i._zoomCatScale=function(t,e,i){var n=this._pinchCumulativeDelta,r=this.sensitivity;n=e>1?n+1:n-1,this._pinchCumulativeDelta=n;var a=t.field,s=t.values,o=this.chart.get(\"coord\");this.originTicks||(this.originTicks=t.ticks);var c=this.limitRange[a],h=c.length,l=this.minScale||1,u=this.maxScale||5,f=parseInt(h/u),p=parseInt(h/l),g=s.length;if(n>0&&g<=f)return null;if(n<0&&g>=p)return null;var d=h-1,v=s[0],y=s[g-1],m=c.indexOf(v),x=c.indexOf(y),_=(o.start.x+o.end.x)/2,S=i.x;if(Math.abs(n)>r){var b=Math.max(1,parseInt(g*Math.abs(e-1)));n<0?(S>=_?m<=0?x=Math.min(d,x+b):m=Math.max(0,m-b):S<_&&(x>=d?m=Math.max(0,m-b):x=Math.min(d,x+b)),this._pinchCumulativeDelta=0):n>0&&(S>=_?m=mm?x=Math.max(m,x-b):x),this._pinchCumulativeDelta=0);var C=c.slice(m,x+1);this.updateCatScale(a,C,this.originTicks,c,m,x)}},e}(s);o.registerInteraction(\"pinch\",u),t.exports=u}])});"]}