!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.G2_3=e():t.G2_3=e()}("undefined"!=typeof self?self:this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=369)}([function(t,e,n){var r=n(76),i=r.CommonUtil,a=n(65),o=i.assign({DomUtil:r.DomUtil,MatrixUtil:r.MatrixUtil,PathUtil:r.PathUtil,cloneDeep:a.clone,isFinite:isFinite,isNaN:isNaN,snapEqual:function(t,e){return Math.abs(t-e)<.001},inArray:a.contains,toAllPadding:function(t){var e=0,n=0,r=0,i=0;return o.isNumber(t)||o.isString(t)?e=n=r=i=t:o.isArray(t)?(e=t[0],r=o.isNil(t[1])?t[0]:t[1],i=o.isNil(t[2])?t[0]:t[2],n=o.isNil(t[3])?r:t[3]):o.isObject(t)&&(e=t.top||0,r=t.right||0,i=t.bottom||0,n=t.left||0),[e,r,i,n]}},a,i);o.Array={groupToMap:a.groupToMap,group:a.group,merge:a.merge,values:a.values,getRange:a.getRange,firstValue:a.firstValue,remove:i.remove},t.exports=o},function(t,e,n){var r=n(23),i=n(88),a={};r.merge(a,r,i,{mixin:function(t,e){var n=t.CFG?"CFG":"ATTRS";if(t&&e){t._mixins=e,t[n]=t[n]||{};var r={};a.each(e,function(e){a.augment(t,e);var i=e[n];i&&a.merge(r,i)}),t[n]=a.merge(r,t[n])}}}),t.exports=a},function(t,e,n){var r=n(0),i=n(121),a={version:"3.2.8-beta.5",renderer:"canvas",trackable:!0,trackingInfo:{},animate:!0,widthRatio:{column:.5,rose:.9999999,multiplePie:1/1.3},showSinglePoint:!1,connectNulls:!1,scales:{},registerTheme:function(t,e){i[t]=e},setTheme:function(t){var e={};e=r.isObject(t)?t:-1!==r.indexOf(Object.keys(i),t)?i[t]:i.default,r.deepMix(a,e)}};a.setTheme("default"),t.exports=a},function(t,e,n){var r=n(31),i=n(7);t.exports=function(t,e){if(t)if(i(t))for(var n=0,a=t.length;n0){var a=e.strokeOpacity;r.isNil(a)||1===a||(t.globalAlpha=a),t.stroke()}}this.afterPath(t)},afterPath:function(){},isHitBox:function(){return!0},isHit:function(t,e){var n=[t,e,1];if(this.invert(n),this.isHitBox()){var r=this.getBBox();if(r&&!o.box(r.minX,r.maxX,r.minY,r.maxY,n[0],n[1]))return!1}var i=this._attrs.clip;return i?(i.invert(n,this.get("canvas")),!!i.isPointInPath(n[0],n[1])&&this.isPointInPath(n[0],n[1])):this.isPointInPath(n[0],n[1])},calculateBox:function(){return null},getHitLineWidth:function(){var t=this._attrs,e=t.lineAppendWidth||0;return(t.lineWidth||0)+e},clearTotalMatrix:function(){this._cfg.totalMatrix=null,this._cfg.region=null},clearBBox:function(){this._cfg.box=null,this._cfg.region=null},getBBox:function(){var t=this._cfg.box;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._cfg.box=t),t}}),t.exports=s},function(t,e,n){var r=n(76);t.exports=r},function(t,e,n){var r=n(23),i=n(137),a=n(138),o=n(139);o.angle=function(t,e){var n=o.dot(t,e)/(o.length(t)*o.length(e));return Math.acos(r.clamp(n,-1,1))},o.direction=function(t,e){return t[0]*e[1]-e[0]*t[1]},o.angleTo=function(t,e,n){var r=o.angle(t,e),i=o.direction(t,e)>=0;return n?i?2*Math.PI-r:r:i?r:2*Math.PI-r},o.vertical=function(t,e,n){return n?(t[0]=e[1],t[1]=-1*e[0]):(t[0]=-1*e[1],t[1]=e[0]),t},i.translate=function(t,e,n){var r=new Array(9);return i.fromTranslation(r,n),i.multiply(t,r,e)},i.rotate=function(t,e,n){var r=new Array(9);return i.fromRotation(r,n),i.multiply(t,r,e)},i.scale=function(t,e,n){var r=new Array(9);return i.fromScaling(r,n),i.multiply(t,r,e)},t.exports={mat3:i,vec2:o,vec3:a,transform:function(t,e){return t=r.clone(t),r.each(e,function(e){switch(e[0]){case"t":i.translate(t,t,[e[1],e[2]]);break;case"s":i.scale(t,t,[e[1],e[2]]);break;case"r":i.rotate(t,t,e[1]);break;case"m":i.multiply(t,t,e[1]);break;default:return!1}}),t}}},function(t,e,n){var r=n(12),i=Array.isArray?Array.isArray:function(t){return r(t,"Array")};t.exports=i},function(t,e,n){var r=n(309),i=n(351),a={};r.merge(a,r,i,{mixin:function(t,e){var n=t.CFG?"CFG":"ATTRS";if(t&&e){t._mixins=e,t[n]=t[n]||{};var r={};a.each(e,function(e){a.augment(t,e);var i=e[n];i&&a.merge(r,i)}),t[n]=a.merge(r,t[n])}}}),t.exports=a},function(t,e,n){var r=n(12);t.exports=function(t){return r(t,"Number")}},function(t,e){t.exports=function(t){return null===t||void 0===t}},function(t,e){t.exports=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)}},function(t,e){var n={}.toString;t.exports=function(t,e){return n.call(t)==="[object "+e+"]"}},function(t,e,n){var r=n(30),i=n(3),a=n(31),o=n(10),s=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._initDefaultCfg(),r(this,e),this.init()}return t.prototype._initDefaultCfg=function(){this.type="base",this.formatter=null,this.range=[0,1],this.ticks=null,this.values=[]},t.prototype.init=function(){},t.prototype.getTicks=function(){var t=this,e=t.ticks,n=[];return i(e,function(e){var r=void 0;r=a(e)?e:{text:t.getText(e),tickValue:e,value:t.scale(e)},n.push(r)}),n},t.prototype.getText=function(t,e){var n=this.formatter;return t=n?n(t,e):t,!o(t)&&t.toString||(t=""),t.toString()},t.prototype.rangeMin=function(){return this.range[0]},t.prototype.rangeMax=function(){var t=this.range;return t[t.length-1]},t.prototype.invert=function(t){return t},t.prototype.translate=function(t){return t},t.prototype.scale=function(t){return t},t.prototype.clone=function(){var t=this,e=t.constructor,n={};return i(t,function(e,r){n[r]=t[r]}),new e(n)},t.prototype.change=function(t){return this.ticks=null,r(this,t),this.init(),this},t}();t.exports=s},function(t,e,n){var r=n(256),i=n(16);t.exports=function(t,e){if(t)if(i(t))for(var n=0,a=t.length;n1){var v=p[1];v.change({nice:!1,min:0,max:Math.max.apply(null,v.values)})}l.scales=p;var m=new a[h](l);t[s]=m}},e.prototype._processData=function(){for(var t=this.get("data"),e=[],n=this._groupData(t),r=0;ra&&(a=l)}(ie.max)&&e.change({min:i,max:a})},e.prototype._adjust=function(t){var e=this,n=e.get("adjusts"),r=this.viewTheme||c,i=e.getYScale(),a=e.getXScale(),s=a.field,l=i?i.field:null;u.each(n,function(n){var c=u.mix({xField:s,yField:l},n),h=u.upperFirst(n.type);if("Dodge"===h){var f=[];if(a.isCategory||a.isIdentity)f.push("x");else{if(i)throw new Error("dodge is not support linear attribute, please use category attribute!");f.push("y")}c.adjustNames=f,c.dodgeRatio=r.widthRatio.column}else if("Stack"===h){var p=e.get("coord");if(!i){c.height=p.getHeight();var d=e.getDefaultValue("size")||3;c.size=d}!p.isTransposed&&u.isNil(c.reverseOrder)&&(c.reverseOrder=!0)}new o[h](c).processAdjust(t),"Stack"===h&&i&&e._updateStackRange(l,i,t)})},e.prototype.setCoord=function(t){this.set("coord",t);var e=this.getAttr("position");this.get("shapeContainer").setMatrix(t.matrix),e&&(e.coord=t)},e.prototype.paint=function(){var t=this.get("dataArray"),e=[],n=this.getShapeFactory();n.setCoord(this.get("coord"));var r=this.get("shapeContainer");this._beforeMapping(t);for(var i=0;i=0?e:n<=0?n:0},e.prototype._normalizeValues=function(t,e){var n=[];if(u.isArray(t))for(var r=0;r1)for(var h=0;h0)u.each(n,function(n){e+="-"+t[n]});else{var r=this.get("type"),i=this.getXScale(),a=this.getYScale(),o=i.field||"x",s=a.field||"y",c=t[s],l=void 0;l=i.isIdentity?i.value:t[o],e+="interval"===r||"schema"===r?"-"+l:"line"===r||"area"===r||"path"===r?"-"+r:"-"+l+"-"+c;var h=this._getGroupScales();u.isEmpty(h)||u.each(h,function(n){var r=n.field;"identity"!==n.type&&(e+="-"+t[r])})}return e},e.prototype.getDrawCfg=function(t){var e={origin:t,x:t.x,y:t.y,color:t.color,size:t.size,shape:t.shape,isInCircle:this.isInCircle(),opacity:t.opacity},n=this.get("styleOptions");return n&&n.style&&(e.style=this.getCallbackCfg(n.fields,n.style,t._origin)),this.get("generatePoints")&&(e.points=t.points,e.nextPoints=t.nextPoints),this.get("animate")&&(e._id=this._getShapeId(t._origin)),e},e.prototype.appendShapeInfo=function(t,e){t&&(t.setSilent("index",e),t.setSilent("coord",this.get("coord")),this.get("animate")&&this.get("animateCfg")&&t.setSilent("animateCfg",this.get("animateCfg")))},e.prototype.drawPoint=function(t,e,n,r){var i=t.shape,a=this.getDrawCfg(t),o=n.drawShape(i,a,e);this.appendShapeInfo(o,r)},e.prototype.getAttr=function(t){return this.get("attrs")[t]},e.prototype.getXScale=function(){return this.getAttr("position").scales[0]},e.prototype.getYScale=function(){return this.getAttr("position").scales[1]},e.prototype.getShapes=function(){var t=[],e=this.get("shapeContainer").get("children");return u.each(e,function(e){e.get("origin")&&t.push(e)}),t},e.prototype.getAttrsForLegend=function(){var t=this.get("attrs"),e=[];return u.each(t,function(t){-1!==g.indexOf(t.type)&&e.push(t)}),e},e.prototype.getFieldsForLegend=function(){var t=[],e=this.get("attrOptions");return u.each(g,function(n){var r=e[n];r&&r.field&&u.isString(r.field)&&(t=t.concat(r.field.split("*")))}),u.uniq(t)},e.prototype.changeVisible=function(t,e){this.set("visible",t);var n=this.get("shapeContainer");n&&n.set("visible",t);var r=this.get("labelContainer");if(r&&r.set("visible",t),!e&&n){n.get("canvas").draw()}},e.prototype.reset=function(){this.set("attrOptions",{}),this.clearInner()},e.prototype.clearInner=function(){this.clearActivedShapes(),this.clearSelected();var t=this.get("shapeContainer");t&&t.clear();var e=this.get("labelContainer");e&&e.remove(),this.set("attrs",{}),this.set("groupScales",null),this.set("labelContainer",null),this.set("xDistance",null),this.set("isStacked",null)},e.prototype.clear=function(){this.clearInner(),this.set("scales",{})},e.prototype.destroy=function(){this.clear();var e=this.get("shapeContainer");e&&e.remove(),this.offEvents(),t.prototype.destroy.call(this)},e.prototype.bindEvents=function(){this.get("view")&&(this._bindActiveAction(),this._bindSelectedAction())},e.prototype.offEvents=function(){this.get("view")&&(this._offActiveAction(),this._offSelectedAction())},e}(s);t.exports=y},function(t,e,n){var r=n(10);t.exports=function(t){return r(t)?"":t.toString()}},function(t,e,n){var r=n(65);t.exports={isFunction:r.isFunction,isObject:r.isObject,isBoolean:r.isBoolean,isNil:r.isNil,isString:r.isString,isArray:r.isArray,isNumber:r.isNumber,isEmpty:r.isEmpty,uniqueId:r.uniqueId,clone:r.clone,deepMix:r.deepMix,assign:r.mix,merge:r.deepMix,upperFirst:r.upperFirst,each:r.each,isEqual:r.isEqual,toArray:r.toArray,extend:r.extend,augment:r.augment,remove:r.arrayUtil.pull,isNumberEqual:r.isNumberEqual,toRadian:r.toRadian,toDegree:r.toDegree,mod:r.mod,clamp:r.clamp}},function(t,e,n){var r=n(1),i=/[MLHVQTCSAZ]([^MLHVQTCSAZ]*)/gi,a=/[^\s\,]+/gi,o={};t.exports={parseRadius:function(t){var e=0,n=0,i=0,a=0;return r.isArray(t)?1===t.length?e=n=i=a=t[0]:2===t.length?(e=i=t[0],n=a=t[1]):3===t.length?(e=t[0],n=a=t[1],i=t[2]):(e=t[0],n=t[1],i=t[2],a=t[3]):e=n=i=a=t,{r1:e,r2:n,r3:i,r4:a}},parsePath:function(t){return t=t||[],r.isArray(t)?t:r.isString(t)?(t=t.match(i),r.each(t,function(e,n){if((e=e.match(a))[0].length>1){var i=e[0].charAt(0);e.splice(1,0,e[0].substr(1)),e[0]=i}r.each(e,function(t,n){isNaN(t)||(e[n]=+t)}),t[n]=e}),t):void 0},numberToColor:function(t){var e=o[t];if(!e){for(var n=t.toString(16),r=n.length;r<6;r++)n="0"+n;e="#"+n,o[t]=e}return e}}},function(t,e,n){"use strict";function r(t,e){return function(n){return t+n*e}}function i(t,e){var n=e-t;return n?r(t,n):Object(a.a)(isNaN(t)?e:t)}e.c=function(t,e){var n=e-t;return n?r(t,n>180||n<-180?n-360*Math.round(n/360):n):Object(a.a)(isNaN(t)?e:t)},e.b=function(t){return 1==(t=+t)?i:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):Object(a.a)(isNaN(e)?n:e)}},e.a=i;var a=n(110)},function(t,e,n){function r(t,e){return i(e)?e:t.invert(t.scale(e))}var i=n(59),a=n(56),o=n(248),s=n(58),u=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.type="base",this.name=null,this.method=null,this.values=[],this.scales=[],this.linear=null,o(this,e)}return t.prototype._getAttrValue=function(t,e){var n=this.values;if(t.isCategory&&!this.linear){return n[t.translate(e)%n.length]}var r=t.scale(e);return this.getLinearValue(r)},t.prototype.getLinearValue=function(t){var e=this.values,n=e.length-1,r=Math.floor(n*t),i=n*t-r,a=e[r];return a+((r===n?a:e[r+1])-a)*i},t.prototype.callback=function(t){var e=this.scales[0];return"identity"===e.type?e.value:this._getAttrValue(e,t)},t.prototype.getNames=function(){for(var t=this.scales,e=this.names,n=Math.min(t.length,e.length),r=[],i=0;i=s[l]?1:0,p=h>Math.PI?1:0,d=n.convertPoint(u),g=r(n,d);if(g>=.5)if(h===2*Math.PI){var y={x:(u.x+s.x)/2,y:(u.y+s.y)/2},v=n.convertPoint(y);c.push(["A",g,g,0,p,f,v.x,v.y]),c.push(["A",g,g,0,p,f,d.x,d.y])}else c.push(["A",g,g,0,p,f,d.x,d.y]);return c}(o,s,t)):n.push(i(a,t));break;case"z":default:n.push(a)}}),function(t){a.each(t,function(e,n){if("a"===e[0].toLowerCase()){var r=t[n-1],i=t[n+1];i&&"a"===i[0].toLowerCase()?r&&"l"===r[0].toLowerCase()&&(r[0]="M"):r&&"a"===r[0].toLowerCase()&&i&&"l"===i[0].toLowerCase()&&(i[0]="M")}})}(n),n}};t.exports=s},function(t,e,n){var r=n(8),i=n(450),a=n(354),o=n(334),s=function t(e){t.superclass.constructor.call(this,e)};s.ATTRS={},r.extend(s,a),r.augment(s,i,{isShape:!0,drawInner:function(t){var e=this._attrs;this.createPath(t);var n=t.globalAlpha;if(this.hasFill()){var i=e.fillOpacity;r.isNil(i)||1===i?t.fill():(t.globalAlpha=i,t.fill(),t.globalAlpha=n)}if(this.hasStroke()){if(this._attrs.lineWidth>0){var a=e.strokeOpacity;r.isNil(a)||1===a||(t.globalAlpha=a),t.stroke()}}this.afterPath(t)},afterPath:function(){},isHitBox:function(){return!0},isHit:function(t,e){var n=[t,e,1];if(this.invert(n),this.isHitBox()){var r=this.getBBox();if(r&&!o.box(r.minX,r.maxX,r.minY,r.maxY,n[0],n[1]))return!1}var i=this._attrs.clip;return i?(i.invert(n,this.get("canvas")),!!i.isPointInPath(n[0],n[1])&&this.isPointInPath(n[0],n[1])):this.isPointInPath(n[0],n[1])},calculateBox:function(){return null},getHitLineWidth:function(){var t=this._attrs,e=t.lineAppendWidth||0;return(t.lineWidth||0)+e},clearTotalMatrix:function(){this._cfg.totalMatrix=null,this._cfg.region=null},clearBBox:function(){this._cfg.box=null,this._cfg.region=null},getBBox:function(){var t=this._cfg.box;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._cfg.box=t),t}}),t.exports=s},function(t,e){function n(t,e){for(var n in e)e.hasOwnProperty(n)&&"constructor"!==n&&void 0!==e[n]&&(t[n]=e[n])}t.exports=function(t,e,r,i){return e&&n(t,e),r&&n(t,r),i&&n(t,i),t}},function(t,e){var n="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},r="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(t){return void 0===t?"undefined":n(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":void 0===t?"undefined":n(t)};t.exports=function(t){var e=void 0===t?"undefined":r(t);return null!==t&&"object"===e||"function"===e}},function(t,e,n){var r="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},i=n(10),a=n(3),o=n(13),s=n(143),u=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":r(e))&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":r(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype._initDefaultCfg=function(){t.prototype._initDefaultCfg.call(this);this.type="linear",this.isLinear=!0,this.nice=!1,this.min=null,this.minLimit=null,this.max=null,this.maxLimit=null,this.tickCount=null,this.tickInterval=null,this.minTickInterval=null,this.snapArray=null},e.prototype.init=function(){if(this.ticks){var t=this.ticks,e=this.translate(t[0]),n=this.translate(t[t.length-1]);(i(this.min)||this.min>e)&&(this.min=e),(i(this.max)||this.max=t.min&&e<=t.max&&n.push(e)}),n.length||(n.push(t.min),n.push(t.max)),t.ticks=n}},e.prototype.scale=function(t){if(i(t))return NaN;var e=this.max,n=this.min;if(e===n)return 0;var r=(t-n)/(e-n),a=this.rangeMin();return a+r*(this.rangeMax()-a)},e.prototype.invert=function(t){var e=(t-this.rangeMin())/(this.rangeMax()-this.rangeMin());return this.min+e*(this.max-this.min)},e}(o);o.Linear=u,t.exports=u},function(t,e,n){var r=n(43),i=n(12);t.exports=function(t){if(!r(t)||!i(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,n){var r=n(6).vec2;t.exports={at:function(t,e,n){return(e-t)*n+t},pointDistance:function(t,e,n,i,a,o){var s=[n-t,i-e];if(r.exactEquals(s,[0,0]))return NaN;var u=[-s[1],s[0]];r.normalize(u,u);var c=[a-t,o-e];return Math.abs(r.dot(c,u))},box:function(t,e,n,r,i){var a=i/2,o=Math.min(t,n),s=Math.max(t,n);return{minX:o-a,minY:Math.min(e,r)-a,maxX:s+a,maxY:Math.max(e,r)+a}},len:function(t,e,n,r){return Math.sqrt((n-t)*(n-t)+(r-e)*(r-e))}}},function(t,e,n){function r(t,e,n,r){return{x:Math.cos(r)*n+t,y:Math.sin(r)*n+e}}function i(t,e,n,r){var i=void 0,a=void 0;return r?tn&&(i=2*Math.PI-t+e,a=t-n):(i=t-e,a=n-t),i>a?n:e}function a(t,e,n,r){var a=0;return n-e>=2*Math.PI&&(a=2*Math.PI),e=s.mod(e,2*Math.PI),n=s.mod(n,2*Math.PI)+a,t=s.mod(t,2*Math.PI),r?e>=n?t>n&&tn?t:i(t,e,n):e<=n?ee||tt.x&&(d=t.x),gt.y&&(y=t.y),v0&&p>0?h=Math.PI/2-d:f<0&&p<0?h=-Math.PI/2-d:f>=0&&p<0?h=-d-Math.PI/2:f<=0&&p>0&&(h=Math.PI/2-d);var g=function(t){var e=[],n=s.parsePath(t.path),r=void 0;if(!Array.isArray(n)||0===n.length||"M"!==n[0][0]&&"m"!==n[0][0])return!1;for(var i=n.length,a=0;a=0,u=a?n.toUpperCase():n,c=t,l=void 0,h=void 0,f=void 0,p=void 0,g=e.endPoint,y=c[1],v=c[2];switch(u){default:break;case"M":p=a?r(y,v,g):{x:y,y:v},this.command="M",this.params=[g,p],this.subStart=p,this.endPoint=p;break;case"L":p=a?r(y,v,g):{x:y,y:v},this.command="L",this.params=[g,p],this.subStart=e.subStart,this.endPoint=p,this.endTangent=function(){return[p.x-g.x,p.y-g.y]},this.startTangent=function(){return[g.x-p.x,g.y-p.y]};break;case"H":p=a?r(y,0,g):{x:y,y:g.y},this.command="L",this.params=[g,p],this.subStart=e.subStart,this.endPoint=p,this.endTangent=function(){return[p.x-g.x,p.y-g.y]},this.startTangent=function(){return[g.x-p.x,g.y-p.y]};break;case"V":p=a?r(0,y,g):{x:g.x,y:y},this.command="L",this.params=[g,p],this.subStart=e.subStart,this.endPoint=p,this.endTangent=function(){return[p.x-g.x,p.y-g.y]},this.startTangent=function(){return[g.x-p.x,g.y-p.y]};break;case"Q":a?(l=r(y,v,g),h=r(c[3],c[4],g)):(l={x:y,y:v},h={x:c[3],y:c[4]}),this.command="Q",this.params=[g,l,h],this.subStart=e.subStart,this.endPoint=h,this.endTangent=function(){return[h.x-l.x,h.y-l.y]},this.startTangent=function(){return[g.x-l.x,g.y-l.y]};break;case"T":h=a?r(y,v,g):{x:y,y:v},"Q"===e.command?(l=i(e.params[1],g),this.command="Q",this.params=[g,l,h],this.subStart=e.subStart,this.endPoint=h,this.endTangent=function(){return[h.x-l.x,h.y-l.y]},this.startTangent=function(){return[g.x-l.x,g.y-l.y]}):(this.command="TL",this.params=[g,h],this.subStart=e.subStart,this.endPoint=h,this.endTangent=function(){return[h.x-g.x,h.y-g.y]},this.startTangent=function(){return[g.x-h.x,g.y-h.y]});break;case"C":a?(l=r(y,v,g),h=r(c[3],c[4],g),f=r(c[5],c[6],g)):(l={x:y,y:v},h={x:c[3],y:c[4]},f={x:c[5],y:c[6]}),this.command="C",this.params=[g,l,h,f],this.subStart=e.subStart,this.endPoint=f,this.endTangent=function(){return[f.x-h.x,f.y-h.y]},this.startTangent=function(){return[g.x-l.x,g.y-l.y]};break;case"S":a?(h=r(y,v,g),f=r(c[3],c[4],g)):(h={x:y,y:v},f={x:c[3],y:c[4]}),"C"===e.command?(l=i(e.params[2],g),this.command="C",this.params=[g,l,h,f],this.subStart=e.subStart,this.endPoint=f,this.endTangent=function(){return[f.x-h.x,f.y-h.y]},this.startTangent=function(){return[g.x-l.x,g.y-l.y]}):(this.command="SQ",this.params=[g,h,f],this.subStart=e.subStart,this.endPoint=f,this.endTangent=function(){return[f.x-h.x,f.y-h.y]},this.startTangent=function(){return[g.x-h.x,g.y-h.y]});break;case"A":var m=y,x=v,b=c[3],w=c[4],_=c[5];p=a?r(c[6],c[7],g):{x:c[6],y:c[7]},this.command="A";var S=function(t,e,n,r,i,a,u){var c=s.mod(s.toRadian(u),2*Math.PI),l=t.x,h=t.y,f=e.x,p=e.y,d=Math.cos(c)*(l-f)/2+Math.sin(c)*(h-p)/2,g=-1*Math.sin(c)*(l-f)/2+Math.cos(c)*(h-p)/2,y=d*d/(i*i)+g*g/(a*a);y>1&&(i*=Math.sqrt(y),a*=Math.sqrt(y));var v=i*i*(g*g)+a*a*(d*d),m=Math.sqrt((i*i*(a*a)-v)/v);n===r&&(m*=-1),isNaN(m)&&(m=0);var x=m*i*g/a,b=m*-a*d/i,w=(l+f)/2+Math.cos(c)*x-Math.sin(c)*b,_=(h+p)/2+Math.sin(c)*x+Math.cos(c)*b,S=o([1,0],[(d-x)/i,(g-b)/a]),M=o([(d-x)/i,(g-b)/a],[(-1*d-x)/i,(-1*g-b)/a]);return 0===r&&M>0&&(M-=2*Math.PI),1===r&&M<0&&(M+=2*Math.PI),[t,w,_,i,a,S,M,c,r]}(g,p,w,_,m,x,b);this.params=S;var M=e.subStart;this.subStart=M,this.endPoint=p;var A=S[5]%(2*Math.PI);s.isNumberEqual(A,2*Math.PI)&&(A=0);var C=S[6]%(2*Math.PI);s.isNumberEqual(C,2*Math.PI)&&(C=0);var P=.001;this.startTangent=function(){0===_&&(P*=-1);var t=S[3]*Math.cos(A-P)+S[1],e=S[4]*Math.sin(A-P)+S[2];return[t-M.x,e-M.y]},this.endTangent=function(){var t=S[6];t-2*Math.PI<1e-4&&(t=0);var e=S[3]*Math.cos(A+t+P)+S[1],n=S[4]*Math.sin(A+t-P)+S[2];return[g.x-e,g.y-n]};break;case"Z":this.command="Z",this.params=[g,e.subStart],this.subStart=e.subStart,this.endPoint=e.subStart}},isInside:function(t,e,n){var r=this.command,i=this.params,a=this.box;if(a&&!u.box(a.minX,a.maxX,a.minY,a.maxY,t,e))return!1;switch(r){default:break;case"M":return!1;case"TL":case"L":case"Z":return u.line(i[0].x,i[0].y,i[1].x,i[1].y,n,t,e);case"SQ":case"Q":return u.quadraticline(i[0].x,i[0].y,i[1].x,i[1].y,i[2].x,i[2].y,n,t,e);case"C":return u.cubicline(i[0].x,i[0].y,i[1].x,i[1].y,i[2].x,i[2].y,i[3].x,i[3].y,n,t,e);case"A":var o=i,s=o[1],c=o[2],l=o[3],h=o[4],d=o[5],g=o[6],y=o[7],v=o[8],m=l>h?l:h,x=l>h?1:l/h,b=l>h?h/l:1;o=[t,e,1];var w=[1,0,0,0,1,0,0,0,1];return p.translate(w,w,[-s,-c]),p.rotate(w,w,-y),p.scale(w,w,[1/x,1/b]),f.transformMat3(o,o,w),u.arcline(0,0,m,d,d+g,1-v,n,o[0],o[1])}return!1},draw:function(t){var e=this.command,n=this.params,r=void 0,i=void 0,a=void 0;switch(e){default:break;case"M":t.moveTo(n[1].x,n[1].y);break;case"TL":case"L":t.lineTo(n[1].x,n[1].y);break;case"SQ":case"Q":r=n[1],i=n[2],t.quadraticCurveTo(r.x,r.y,i.x,i.y);break;case"C":r=n[1],i=n[2],a=n[3],t.bezierCurveTo(r.x,r.y,i.x,i.y,a.x,a.y);break;case"A":var o=n,s=o[1],u=o[2],c=o[3],l=o[4],h=o[5],f=o[6],p=o[7],d=o[8],g=c>l?c:l,y=c>l?1:c/l,v=c>l?l/c:1;t.translate(s,u),t.rotate(p),t.scale(y,v),t.arc(0,0,g,h,h+f,1-d),t.scale(1/y,1/v),t.rotate(-p),t.translate(-s,-u);break;case"Z":t.closePath()}},getBBox:function(t){var e=t/2,n=this.params,r=void 0,i=void 0,a=void 0,o=void 0;switch(this.command){default:case"M":case"Z":break;case"TL":case"L":this.box={minX:Math.min(n[0].x,n[1].x)-e,maxX:Math.max(n[0].x,n[1].x)+e,minY:Math.min(n[0].y,n[1].y)-e,maxY:Math.max(n[0].y,n[1].y)+e};break;case"SQ":case"Q":for(a=0,o=(i=l.extrema(n[0].x,n[1].x,n[2].x)).length;aS&&(S=C)}var P=h.yExtrema(v,p,d),k=1/0,T=-1/0,O=[x,b];for(a=2*-Math.PI;a<=2*Math.PI;a+=Math.PI){var I=P+a;1===m?xT&&(T=E)}this.box={minX:_-e,maxX:S+e,minY:k-e,maxY:T+e}}}}),t.exports=g},function(t,e,n){"use strict";e.a=function(t,e){return t=+t,e-=t,function(n){return t+e*n}}},function(t,e,n){var r=n(14),i=n(118),a=n(16);t.exports=function(t,e){for(var n=[],o={},s=0;s2&&void 0!==arguments[2]?arguments[2]:0,r=this.matrix,i=[t,e,n];return o.transformMat3(i,i,r),i},t.prototype.invertMatrix=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=this.matrix,i=a.invert([],r),s=[t,e,n];return o.transformMat3(s,s,i),s},t.prototype.convert=function(t){var e=this.convertPoint(t),n=e.x,r=e.y,i=this.applyMatrix(n,r,1);return{x:i[0],y:i[1]}},t.prototype.invert=function(t){var e=this.invertMatrix(t.x,t.y,1);return this.invertPoint({x:e[0],y:e[1]})},t.prototype.rotate=function(t){var e=this.matrix,n=this.center;return a.translate(e,e,[-n.x,-n.y]),a.rotate(e,e,t),a.translate(e,e,[n.x,n.y]),this},t.prototype.reflect=function(t){switch(t){case"x":this._swapDim("x");break;case"y":this._swapDim("y");break;default:this._swapDim("y")}return this},t.prototype.scale=function(t,e){var n=this.matrix,r=this.center;return a.translate(n,n,[-r.x,-r.y]),a.scale(n,n,[t,e]),a.translate(n,n,[r.x,r.y]),this},t.prototype.translate=function(t,e){var n=this.matrix;return a.translate(n,n,[t,e]),this},t.prototype.transpose=function(){return this.isTransposed=!this.isTransposed,this},t}();t.exports=s},function(t,e,n){var r=n(0),i=n(124).LabelsRenderer,a=n(5).Group,o=n(283),s=n(2),u=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){return{_id:null,zIndex:4,ticks:null,line:null,tickLine:null,subTickCount:0,subTickLine:null,grid:null,label:{textStyle:{},autoRotate:!0,formatter:null},title:{autoRotate:!0,textStyle:{}},autoPaint:!0}},e.prototype._beforeRenderUI=function(){var t=this.get("title"),e=this.get("label"),n=this.get("grid"),i=this.get("viewTheme")||s;t&&this.setSilent("title",r.deepMix({autoRotate:!0,textStyle:{fontSize:12,fill:"#ccc",textBaseline:"middle",fontFamily:i.fontFamily,textAlign:"center"},offset:48},t)),e&&this.setSilent("label",r.deepMix({autoRotate:!0,textStyle:{fontSize:12,fill:"#ccc",textBaseline:"middle",fontFamily:i.fontFamily},offset:10},e)),n&&this.setSilent("grid",r.deepMix({lineStyle:{lineWidth:1,stroke:"#C0D0E0"}},n))},e.prototype._renderUI=function(){this.get("label")&&this.renderLabels(),this.get("autoPaint")&&this.paint(),r.isNil(this.get("title"))||this.renderTitle(),this.sort()},e.prototype._parseTicks=function(t){for(var e=(t=t||[]).length,n=0;n3&&void 0!==arguments[3]?arguments[3]:"",i=this.get("tickItems"),a=this.get("subTickItems"),o=this.getTickEnd(e,n,t),s={x1:e.x,y1:e.y,x2:o.x,y2:o.y};i||(i=[]),a||(a=[]),"sub"===r?a.push(s):i.push(s),this.set("tickItems",i),this.set("subTickItems",a)},e.prototype._renderLine=function(){var t=this.get("line"),e=void 0;if(t){e=this.getLinePath(),t=r.mix({path:e},t);var n=this.addShape("path",{attrs:t});n.name="axis-line",this.get("appendInfo")&&n.setSilent("appendInfo",this.get("appendInfo")),this.set("lineShape",n)}},e.prototype._processCatTicks=function(){var t=this.get("label"),e=this.get("tickLine"),n=this.get("ticks");n=this._parseTicks(n);for(var r=this._getNormalizedTicks(n),i=0;i1&&(e=(t[1].value-t[0].value)/2);for(var n=[],i=0;i0){var s=e.value-a[r-1].value;s/=t.get("subTickCount")+1;for(var u=1;u<=n;u++){var c={text:"",value:r?a[r-1].value+u*s:u*s},l=t.getTickPoint(c.value),h=void 0;h=o&&o.length?o.length:parseInt(.6*i.length,10),t._addTickItem(u-1,l,h,"sub")}}})}},e.prototype._addTickLine=function(t,e){var n=r.mix({},e),i=[];r.each(t,function(t){i.push(["M",t.x1,t.y1]),i.push(["L",t.x2,t.y2])}),delete n.length,n.path=i;var a=this.addShape("path",{attrs:n});a.name="axis-ticks",a._id=this.get("_id")+"-ticks",a.set("coord",this.get("coord")),this.get("appendInfo")&&a.setSilent("appendInfo",this.get("appendInfo"))},e.prototype._renderTicks=function(){var t=this.get("tickItems"),e=this.get("subTickItems");if(!r.isEmpty(t)){var n=this.get("tickLine");this._addTickLine(t,n)}if(!r.isEmpty(e)){var i=this.get("subTickLine")||this.get("tickLine");this._addTickLine(e,i)}},e.prototype._renderGrid=function(){var t=this.get("grid");t&&(t.coord=this.get("coord"),t.appendInfo=this.get("appendInfo"),this.set("gridGroup",this.addGroup(o,t)))},e.prototype.paint=function(){var t=this.get("tickLine"),e=!0;t&&t.hasOwnProperty("alignWithLabel")&&(e=t.alignWithLabel),this._renderLine();var n=this.get("type");("cat"===n||"timeCat"===n)&&!1===e?this._processCatTicks():this._processTicks(),this._renderTicks(),this._renderGrid();var r=this.get("label");r&&r.autoRotate&&this.autoRotateLabels()},e.prototype.parseTick=function(t,e,n){return{text:t,value:e/(n-1)}},e.prototype.getTextAnchor=function(t){return Math.abs(t[1]/t[0])>=1?"center":t[0]>0?"start":"end"},e.prototype.getMaxLabelWidth=function(t){var e=t.get("children"),n=0;return r.each(e,function(t){var e=t.getBBox().width;n=0;return n?i?2*Math.PI-r:r:i?r:2*Math.PI-r},o.vertical=function(t,e,n){return n?(t[0]=e[1],t[1]=-1*e[0]):(t[0]=-1*e[1],t[1]=e[0]),t},i.translate=function(t,e,n){var r=new Array(9);return i.fromTranslation(r,n),i.multiply(t,r,e)},i.rotate=function(t,e,n){var r=new Array(9);return i.fromRotation(r,n),i.multiply(t,r,e)},i.scale=function(t,e,n){var r=new Array(9);return i.fromScaling(r,n),i.multiply(t,r,e)},t.exports={mat3:i,vec2:o,vec3:a,transform:function(t,e){return t=r.clone(t),r.each(e,function(e){switch(e[0]){case"t":i.translate(t,t,[e[1],e[2]]);break;case"s":i.scale(t,t,[e[1],e[2]]);break;case"r":i.rotate(t,t,e[1]);break;case"m":i.multiply(t,t,e[1]);break;default:return!1}}),t}}},function(t,e){var n="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},r="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(t){return void 0===t?"undefined":n(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":void 0===t?"undefined":n(t)};t.exports=function(t){return"object"===(void 0===t?"undefined":r(t))&&null!==t}},function(t,e,n){var r=n(11);t.exports=function(t){return r(t)?Array.prototype.slice.call(t):[]}},function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.setMatrixArrayType=function(t){e.ARRAY_TYPE=r=t},e.toRadian=function(t){return t*i},e.equals=function(t,e){return Math.abs(t-e)<=n*Math.max(1,Math.abs(t),Math.abs(e))};var n=e.EPSILON=1e-6,r=e.ARRAY_TYPE="undefined"!=typeof Float32Array?Float32Array:Array,i=(e.RANDOM=Math.random,Math.PI/180)},function(t,e,n){var r=n(34),i=n(92),a=n(47),o=n(35);t.exports={line:function(t,e,n,i,a,o,s){var u=r.box(t,e,n,i,a);if(!this.box(u.minX,u.maxX,u.minY,u.maxY,o,s))return!1;var c=r.pointDistance(t,e,n,i,o,s);return!isNaN(c)&&c<=a/2},polyline:function(t,e,n,r){var i=t.length-1;if(i<1)return!1;for(var a=0;a=0&&m=0&&c<=1&&u.push(c);else{var f=a*a-4*i*s;o.isNumberEqual(f,0)?u.push(-a/(2*i)):f>0&&(l=(-a-(h=Math.sqrt(f)))/(2*i),(c=(-a+h)/(2*i))>=0&&c<=1&&u.push(c),l>=0&&l<=1&&u.push(l))}return u},len:function(t,e,n,r,i,s,u,c,l){o.isNil(l)&&(l=1);for(var h=(l=l>1?1:l<0?0:l)/2,f=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],p=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],d=0,g=0;g<12;g++){var y=h*f[g]+h,v=a(y,t,n,i,u),m=a(y,e,r,s,c),x=v*v+m*m;d+=p[g]*Math.sqrt(x)}return h*d}}},function(t,e,n){var r=n(1),i=n(4),a=n(24),o=n(37),s=function t(e){t.superclass.constructor.call(this,e)};s.Symbols={circle:function(t,e,n){return[["M",t,e],["m",-n,0],["a",n,n,0,1,0,2*n,0],["a",n,n,0,1,0,2*-n,0]]},square:function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]]},diamond:function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]},triangle:function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["z"]]},"triangle-down":function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]}},s.ATTRS={path:null,lineWidth:1},r.extend(s,i),r.augment(s,{type:"marker",canFill:!0,canStroke:!0,getDefaultAttrs:function(){return{x:0,y:0,lineWidth:1}},calculateBox:function(){var t=this._attrs,e=t.x,n=t.y,r=t.radius,i=this.getHitLineWidth()/2+r;return{minX:e-i,minY:n-i,maxX:e+i,maxY:n+i}},_getPath:function(){var t=this._attrs,e=t.x,n=t.y,i=t.radius||t.r,a=t.symbol||"circle";return(r.isFunction(a)?a:s.Symbols[a])(e,n,i)},createPath:function(t){var e=this._cfg.segments;if(!e||this._cfg.hasUpdate){var n=a.parsePath(this._getPath());t.beginPath();var r=void 0;e=[];for(var i=0;i2&&(n.push([r].concat(a.splice(0,2))),o="l",r="m"===r?"l":"L"),"o"===o&&1===a.length&&n.push([r,a[0]]),"r"===o)n.push([r].concat(a));else for(;a.length>=e[o]&&(n.push([r].concat(a.splice(0,e[o]))),e[o]););}),n},d=function(t,e){for(var n=[],r=0,i=t.length;i-2*!e>r;r+=2){var a=[{x:+t[r-2],y:+t[r-1]},{x:+t[r],y:+t[r+1]},{x:+t[r+2],y:+t[r+3]},{x:+t[r+4],y:+t[r+5]}];e?r?i-4===r?a[3]={x:+t[0],y:+t[1]}:i-2===r&&(a[2]={x:+t[0],y:+t[1]},a[3]={x:+t[2],y:+t[3]}):a[0]={x:+t[i-2],y:+t[i-1]}:i-4===r?a[3]=a[2]:r||(a[0]={x:+t[r],y:+t[r+1]}),n.push(["C",(-a[0].x+6*a[1].x+a[2].x)/6,(-a[0].y+6*a[1].y+a[2].y)/6,(a[1].x+6*a[2].x-a[3].x)/6,(a[1].y+6*a[2].y-a[3].y)/6,a[2].x,a[2].y])}return n},g=function(t,e,n,r,i){var a=[];if(null===i&&null===r&&(r=n),t=+t,e=+e,n=+n,r=+r,null!==i){var o=Math.PI/180,s=t+n*Math.cos(-r*o),u=t+n*Math.cos(-i*o);a=[["M",s,e+n*Math.sin(-r*o)],["A",n,n,0,+(i-r>180),0,u,e+n*Math.sin(-i*o)]]}else a=[["M",t,e],["m",0,-r],["a",n,r,0,1,1,0,2*r],["a",n,r,0,1,1,0,-2*r],["z"]];return a},y=function(t){if(!(t=p(t))||!t.length)return[["M",0,0]];var e=[],n=0,r=0,i=0,a=0,o=0,s=void 0,u=void 0;"M"===t[0][0]&&(i=n=+t[0][1],a=r=+t[0][2],o++,e[0]=["M",n,r]);for(var c,l,h=3===t.length&&"M"===t[0][0]&&"R"===t[1][0].toUpperCase()&&"Z"===t[2][0].toUpperCase(),f=o,y=t.length;f1&&(r*=_=Math.sqrt(_),i*=_);var S=r*r,M=i*i,A=(o===s?-1:1)*Math.sqrt(Math.abs((S*M-S*w*w-M*b*b)/(S*w*w+M*b*b)));v=A*r*w/i+(e+u)/2,m=A*-i*b/r+(n+c)/2,g=Math.asin(((n-m)/i).toFixed(9)),y=Math.asin(((c-m)/i).toFixed(9)),g=ey&&(g-=2*Math.PI),!s&&y>g&&(y-=2*Math.PI)}var C=y-g;if(Math.abs(C)>h){var P=y,k=u,T=c;y=g+h*(s&&y>g?1:-1),p=t(u=v+r*Math.cos(y),c=m+i*Math.sin(y),r,i,a,0,s,k,T,[y,P,v,m])}C=y-g;var O=Math.cos(g),I=Math.sin(g),E=Math.cos(y),L=Math.sin(y),D=Math.tan(C/4),j=4/3*r*D,F=4/3*i*D,R=[e,n],B=[e+j*I,n-F*O],N=[u+j*L,c-F*E],Y=[u,c];if(B[0]=2*R[0]-B[0],B[1]=2*R[1]-B[1],l)return[B,N,Y].concat(p);for(var z=[],X=0,V=(p=[B,N,Y].concat(p).join().split(",")).length;X7){t[e].shift();for(var i=t[e];i.length;)o[e]="A",r&&(s[e]="A"),t.splice(e++,0,["C"].concat(i.splice(0,6)));t.splice(e,1),l=Math.max(n.length,r&&r.length||0)}},p=function(t,e,i,a,o){t&&e&&"M"===t[o][0]&&"M"!==e[o][0]&&(e.splice(o,0,["M",a.x,a.y]),i.bx=0,i.by=0,i.x=t[o][1],i.y=t[o][2],l=Math.max(n.length,r&&r.length||0))};l=Math.max(n.length,r&&r.length||0);for(var d=0;d1?1:u<0?0:u)/2,l=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],h=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],f=0,p=0;p<12;p++){var d=c*l[p]+c,g=_(d,t,n,i,o),y=_(d,e,r,a,s),v=g*g+y*y;f+=h[p]*Math.sqrt(v)}return c*f},M=function(t,e,n,r,i,a,o,s){if(!(Math.max(t,n)Math.max(i,o)||Math.max(e,r)Math.max(a,s))){var u=(t-n)*(a-s)-(e-r)*(i-o);if(u){var c=((t*r-e*n)*(i-o)-(t-n)*(i*s-a*o))/u,l=((t*r-e*n)*(a-s)-(e-r)*(i*s-a*o))/u,h=+c.toFixed(2),f=+l.toFixed(2);if(!(h<+Math.min(t,n).toFixed(2)||h>+Math.max(t,n).toFixed(2)||h<+Math.min(i,o).toFixed(2)||h>+Math.max(i,o).toFixed(2)||f<+Math.min(e,r).toFixed(2)||f>+Math.max(e,r).toFixed(2)||f<+Math.min(a,s).toFixed(2)||f>+Math.max(a,s).toFixed(2)))return{x:c,y:l}}}},A=function(t,e,n){return e>=t.x&&e<=t.x+t.width&&n>=t.y&&n<=t.y+t.height},C=function(t,e,n,r,i){if(i)return[["M",+t+ +i,e],["l",n-2*i,0],["a",i,i,0,0,1,i,i],["l",0,r-2*i],["a",i,i,0,0,1,-i,i],["l",2*i-n,0],["a",i,i,0,0,1,-i,-i],["l",0,2*i-r],["a",i,i,0,0,1,i,-i],["z"]];var a=[["M",t,e],["l",n,0],["l",0,r],["l",-n,0],["z"]];return a.parsePathArray=w,a},P=function(t,e,n,r){return null===t&&(t=e=n=r=0),null===e&&(e=t.y,n=t.width,r=t.height,t=t.x),{x:t,y:e,width:n,w:n,height:r,h:r,x2:t+n,y2:e+r,cx:t+n/2,cy:e+r/2,r1:Math.min(n,r)/2,r2:Math.max(n,r)/2,r0:Math.sqrt(n*n+r*r)/2,path:C(t,e,n,r),vb:[t,e,n,r].join(" ")}},k=function(t,e,n,r,i,a,o,s){c.isArray(t)||(t=[t,e,n,r,i,a,o,s]);var u=function(t,e,n,r,i,a,o,s){for(var u=[],c=[[],[]],l=void 0,h=void 0,f=void 0,p=void 0,d=0;d<2;++d)if(0===d?(h=6*t-12*n+6*i,l=-3*t+9*n-9*i+3*o,f=3*n-3*t):(h=6*e-12*r+6*a,l=-3*e+9*r-9*a+3*s,f=3*r-3*e),Math.abs(l)<1e-12){if(Math.abs(h)<1e-12)continue;(p=-f/h)>0&&p<1&&u.push(p)}else{var g=h*h-4*f*l,y=Math.sqrt(g);if(!(g<0)){var v=(-h+y)/(2*l);v>0&&v<1&&u.push(v);var m=(-h-y)/(2*l);m>0&&m<1&&u.push(m)}}for(var x=u.length,b=x,w=void 0;x--;)w=1-(p=u[x]),c[0][x]=w*w*w*t+3*w*w*p*n+3*w*p*p*i+p*p*p*o,c[1][x]=w*w*w*e+3*w*w*p*r+3*w*p*p*a+p*p*p*s;return c[0][b]=t,c[1][b]=e,c[0][b+1]=o,c[1][b+1]=s,c[0].length=c[1].length=b+2,{min:{x:Math.min.apply(0,c[0]),y:Math.min.apply(0,c[1])},max:{x:Math.max.apply(0,c[0]),y:Math.max.apply(0,c[1])}}}.apply(null,t);return P(u.min.x,u.min.y,u.max.x-u.min.x,u.max.y-u.min.y)},T=function(t,e,n,r,i,a,o,s,u){var c=1-u,l=Math.pow(c,3),h=Math.pow(c,2),f=u*u,p=f*u,d=t+2*u*(n-t)+f*(i-2*n+t),g=e+2*u*(r-e)+f*(a-2*r+e),y=n+2*u*(i-n)+f*(o-2*i+n),v=r+2*u*(a-r)+f*(s-2*a+r);return{x:l*t+3*h*u*n+3*c*u*u*i+p*o,y:l*e+3*h*u*r+3*c*u*u*a+p*s,m:{x:d,y:g},n:{x:y,y:v},start:{x:c*t+u*n,y:c*e+u*r},end:{x:c*i+u*o,y:c*a+u*s},alpha:90-180*Math.atan2(d-y,g-v)/Math.PI}},O=function(t,e,n){if(!function(t,e){return t=P(t),e=P(e),A(e,t.x,t.y)||A(e,t.x2,t.y)||A(e,t.x,t.y2)||A(e,t.x2,t.y2)||A(t,e.x,e.y)||A(t,e.x2,e.y)||A(t,e.x,e.y2)||A(t,e.x2,e.y2)||(t.xe.x||e.xt.x)&&(t.ye.y||e.yt.y)}(k(t),k(e)))return n?0:[];for(var r=~~(S.apply(0,t)/8),i=~~(S.apply(0,e)/8),a=[],o=[],s={},u=n?0:[],c=0;c=0&&_<=1&&C>=0&&C<=1&&(n?u++:u.push({x:w.x,y:w.y,t1:_,t2:C}))}}return u},I=function(t,e,n){if(1===n)return[[].concat(t)];var i=[];if("L"===e[0]||"C"===e[0]||"Q"===e[0])i=i.concat(function(t,e,n){var i=[[t[1],t[2]]];n=n||2;var a=[];"A"===e[0]?(i.push(e[6]),i.push(e[7])):"C"===e[0]?(i.push([e[1],e[2]]),i.push([e[3],e[4]]),i.push([e[5],e[6]])):"S"===e[0]||"Q"===e[0]?(i.push([e[1],e[2]]),i.push([e[3],e[4]])):i.push([e[1],e[2]]);for(var o=i,s=1/n,u=0;u=3&&(3===t.length&&e.push("Q"),e=e.concat(t[1])),2===t.length&&e.push("L"),e=e.concat(t[t.length-1])})}(t,e,n));else{var a=[].concat(t);"M"===a[0]&&(a[0]="L");for(var o=0;o<=n-1;o++)i.push(a)}return i},E=function(t,e){if(t.length!==e.length)return!1;var n=!0;return c.each(t,function(t,r){if(t!==e[r])return n=!1,!1}),n};t.exports={parsePathString:p,parsePathArray:w,pathTocurve:x,pathToAbsolute:y,catmullRomToBezier:d,rectPath:C,fillPath:function(t,e){if(1===t.length)return t;var n=t.length-1,r=e.length-1,i=n/r,a=[];if(1===t.length&&"M"===t[0][0]){for(var o=0;o=0;f--)s=o[f].index,"add"===o[f].type?t.splice(s,0,[].concat(t[s])):t.splice(s,1)}if((r=t.length)0)){t[r]=e[r];break}n=a(n,t[r-1],1)}t[r]=["Q"].concat(n.reduce(function(t,e){return t.concat(e)},[]));break;case"T":t[r]=["T"].concat(n[0]);break;case"C":if(n.length<3){if(!(r>0)){t[r]=e[r];break}n=a(n,t[r-1],2)}t[r]=["C"].concat(n.reduce(function(t,e){return t.concat(e)},[]));break;case"S":if(n.length<2){if(!(r>0)){t[r]=e[r];break}n=a(n,t[r-1],1)}t[r]=["S"].concat(n.reduce(function(t,e){return t.concat(e)},[]));break;default:t[r]=e[r]}return t},intersection:function(t,e){return function(t,e,n){t=x(t),e=x(e);for(var r=void 0,i=void 0,a=void 0,o=void 0,s=void 0,u=void 0,c=void 0,l=void 0,h=void 0,f=void 0,p=n?0:[],d=0,g=t.length;d=0&&e._call.call(null,t),e=e._next;--d}function u(){x=(m=w.now())+b,d=g=0;try{s()}finally{d=0,function(){var t,e,n=h,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:h=e);f=t,l(r)}(),x=0}}function c(){var t=w.now(),e=t-m;e>v&&(b-=e,m=t)}function l(t){if(!d){g&&(g=clearTimeout(g));t-x>24?(t<1/0&&(g=setTimeout(u,t-w.now()-b)),y&&(y=clearInterval(y))):(y||(m=w.now(),y=setInterval(c,v)),d=1,_(u))}}e.b=r,e.a=a,e.c=o,e.d=s;var h,f,p="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},d=0,g=0,y=0,v=1e3,m=0,x=0,b=0,w="object"===("undefined"==typeof performance?"undefined":p(performance))&&performance.now?performance:Date,_="object"===("undefined"==typeof window?"undefined":p(window))&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};a.prototype=o.prototype={constructor:a,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?r():+n)+(null==e?0:+e),this._next||f===this||(f?f._next=this:h=this,f=this),this._call=t,this._time=n,l()},stop:function(){this._call&&(this._call=null,this._time=1/0,l())}}},function(t,e,n){"use strict";var r=n(19),i=n(108),a=n(111),o=n(112),s=n(38),u=n(113),c=n(114),l=n(110),h="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};e.a=function(t,e){var n,f=void 0===e?"undefined":h(e);return null==e||"boolean"===f?Object(l.a)(e):("number"===f?s.a:"string"===f?(n=Object(r.a)(e))?(e=n,i.a):c.a:e instanceof r.a?i.a:e instanceof Date?o.a:Array.isArray(e)?a.a:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?u.a:s.a)(t,e)}},function(t,e,n){"use strict";function r(){}function i(t){var e;return t=(t+"").trim().toLowerCase(),(e=b.exec(t))?(e=parseInt(e[1],16),new c(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1)):(e=w.exec(t))?a(parseInt(e[1],16)):(e=_.exec(t))?new c(e[1],e[2],e[3],1):(e=S.exec(t))?new c(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=M.exec(t))?o(e[1],e[2],e[3],e[4]):(e=A.exec(t))?o(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=C.exec(t))?l(e[1],e[2]/100,e[3]/100,1):(e=P.exec(t))?l(e[1],e[2]/100,e[3]/100,e[4]):k.hasOwnProperty(t)?a(k[t]):"transparent"===t?new c(NaN,NaN,NaN,0):null}function a(t){return new c(t>>16&255,t>>8&255,255&t,1)}function o(t,e,n,r){return r<=0&&(t=e=n=NaN),new c(t,e,n,r)}function s(t){return t instanceof r||(t=i(t)),t?(t=t.rgb(),new c(t.r,t.g,t.b,t.opacity)):new c}function u(t,e,n,r){return 1===arguments.length?s(t):new c(t,e,n,null==r?1:r)}function c(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function l(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new f(t,e,n,r)}function h(t,e,n,a){return 1===arguments.length?function(t){if(t instanceof f)return new f(t.h,t.s,t.l,t.opacity);if(t instanceof r||(t=i(t)),!t)return new f;if(t instanceof f)return t;var e=(t=t.rgb()).r/255,n=t.g/255,a=t.b/255,o=Math.min(e,n,a),s=Math.max(e,n,a),u=NaN,c=s-o,l=(s+o)/2;return c?(u=e===s?(n-a)/c+6*(n0&&l<1?0:u,new f(u,c,l,t.opacity)}(t):new f(t,e,n,null==a?1:a)}function f(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function p(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}e.a=r,n.d(e,"d",function(){return g}),n.d(e,"c",function(){return y}),e.e=i,e.h=s,e.g=u,e.b=c,e.f=h;var d=n(53),g=.7,y=1/g,v="\\s*([+-]?\\d+)\\s*",m="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",x="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",b=/^#([0-9a-f]{3})$/,w=/^#([0-9a-f]{6})$/,_=new RegExp("^rgb\\("+[v,v,v]+"\\)$"),S=new RegExp("^rgb\\("+[x,x,x]+"\\)$"),M=new RegExp("^rgba\\("+[v,v,v,m]+"\\)$"),A=new RegExp("^rgba\\("+[x,x,x,m]+"\\)$"),C=new RegExp("^hsl\\("+[m,x,x]+"\\)$"),P=new RegExp("^hsla\\("+[m,x,x,m]+"\\)$"),k={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Object(d.a)(r,i,{displayable:function(){return this.rgb().displayable()},toString:function(){return this.rgb()+""}}),Object(d.a)(c,u,Object(d.b)(r,{brighter:function(t){return t=null==t?y:Math.pow(y,t),new c(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?g:Math.pow(g,t),new c(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},toString:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}})),Object(d.a)(f,h,Object(d.b)(r,{brighter:function(t){return t=null==t?y:Math.pow(y,t),new f(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?g:Math.pow(g,t),new f(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new c(p(t>=240?t-240:t+120,i,r),p(t,i,r),p(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}))},function(t,e,n){"use strict";e.b=function(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n},e.a=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t}},function(t,e,n){"use strict";function r(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}e.a=r,e.b=function(t){var e=t.length-1;return function(n){var i=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),a=t[i],o=t[i+1],s=i>0?t[i-1]:2*a-o,u=iu)throw new Error("too late; already scheduled");return n},e.h=function(t,e){var n=r(t,e);if(n.state>l)throw new Error("too late; already started");return n},e.f=r;var i=n(417),a=n(106),o=Object(i.a)("start","end","interrupt"),s=[],u=0,c=1,l=2,h=3,f=4,p=5,d=6;e.e=function(t,e,n,r,i,g){var y=t.__transition;if(y){if(n in y)return}else t.__transition={};!function(t,e,n){function r(p){var g,y,v,m;if(n.state!==c)return o();for(g in u)if((m=u[g]).name===n.name){if(m.state===h)return Object(a.timeout)(r);m.state===f?(m.state=d,m.timer.stop(),m.on.call("interrupt",t,t.__data__,m.index,m.group),delete u[g]):+g=0},t.exports=i},function(t,e,n){var r=n(22);t.exports=function(t){var e=r(t);return e.charAt(0).toLowerCase()+e.substring(1)}},function(t,e){function n(t,e){var n=t.length;if(0===n)return NaN;var r=t[0];if(e=t[n-1])return t[n-1];for(var i=1;it[n-1])return NaN;if(ei&&(e=parseFloat(e.toFixed(n)))}else for(;t>10;)e*=10,t/=10;return e}(t*=r);r*=o,t/=o}var s=(t="floor"===n?a.snapFloor(e,t):"ceil"===n?a.snapCeiling(e,t):a.snapTo(e,t))*r;if(Math.abs(r)<1&&s.toString().length>i){s=t/parseInt(1/r)*(r>0?1:-1)}return s},snapMultiple:function(t,e,n){return("ceil"===n?Math.ceil(t/e):"floor"===n?Math.floor(t/e):Math.round(t/e))*e},snapTo:function(t,e){var i=n(t,e),a=r(t,e);if(isNaN(i)||isNaN(a)){if(t[0]>=e)return t[0];var o=t[t.length-1];if(o<=e)return o}return Math.abs(e-i)20&&(i=20),parseFloat(t.toFixed(i))}};t.exports=a},function(t,e,n){var r="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},i=n(13),a=n(73),o=n(3),s=n(9),u=n(20),c=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":r(e))&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":r(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype._initDefaultCfg=function(){t.prototype._initDefaultCfg.call(this),this.type="cat",this.isCategory=!0,this.isRounding=!0},e.prototype.init=function(){var t=this.values,e=this.tickCount;if(o(t,function(e,n){t[n]=e.toString()}),!this.ticks){var n=t;if(e){n=a({maxCount:e,data:t,isRounding:this.isRounding}).ticks}this.ticks=n}},e.prototype.getText=function(e){return-1===this.values.indexOf(e)&&s(e)&&(e=this.values[Math.round(e)]),t.prototype.getText.call(this,e)},e.prototype.translate=function(t){var e=this.values.indexOf(t);return-1===e&&s(t)?e=t:-1===e&&(e=NaN),e},e.prototype.scale=function(t){var e=this.rangeMin(),n=this.rangeMax(),r=void 0;return(u(t)||-1!==this.values.indexOf(t))&&(t=this.translate(t)),r=this.values.length>1?t/(this.values.length-1):t,e+r*(n-e)},e.prototype.invert=function(t){if(u(t))return t;var e=this.rangeMin(),n=this.rangeMax();tn&&(t=n);var r=(t-e)/(n-e),i=Math.round(r*(this.values.length-1))%this.values.length;return i=i||0,this.values[i]},e}(i);i.Cat=c,t.exports=c},function(t,e,n){var r=n(3);t.exports=function(t){var e={},n=[],i=t.isRounding,a=function(t){var e=[];return r(t,function(t){e=e.concat(t)}),e}(t.data),o=a.length,s=t.maxCount||8,u=void 0;if(i?2===(u=function(t,e){var n=void 0;for(n=e;n>0&&t%n!=0;n--);if(1===n)for(n=e;n>0&&(t-1)%n!=0;n--);return n}(o-1,s-1)+1)?u=s:u3?0:(t-t%10!=10)*t%10]}};var m={D:function(t){return t.getDate()},DD:function(t){return s(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return t.getDay()},dd:function(t){return s(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 s(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 s(t.getFullYear(),4)},h:function(t){return t.getHours()%12||12},hh:function(t){return s(t.getHours()%12||12)},H:function(t){return t.getHours()},HH:function(t){return s(t.getHours())},m:function(t){return t.getMinutes()},mm:function(t){return s(t.getMinutes())},s:function(t){return t.getSeconds()},ss:function(t){return s(t.getSeconds())},S:function(t){return Math.round(t.getMilliseconds()/100)},SS:function(t){return s(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return s(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?"-":"+")+s(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+h.source),function(t,e){t.day=parseInt(e,10)}],M:[l,function(t,e){t.month=e-1}],YY:[l,function(t,e){var n=+(""+(new Date).getFullYear()).substr(0,2);t.year=""+(e>68?n-1:n)+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:[h,p],MMM:[h,o("monthNamesShort")],MMMM:[h,o("monthNames")],a:[h,function(t,e,n){var r=e.toLowerCase();r===n.amPm[0]?t.isPm=!1:r===n.amPm[1]&&(t.isPm=!0)}],ZZ:[/([\+\-]\d\d:?\d\d|Z)/,function(t,e){"Z"===e&&(e="+00:00");var n,r=(e+"").match(/([\+\-]|\d\d)/gi);r&&(n=60*r[1]+parseInt(r[2],10),t.timezoneOffset="+"===r[0]?n:-n)}]};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,u.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"},u.format=function(t,e,n){var r=n||u.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 i=[];return e=(e=u.masks[e]||e||u.masks.default).replace(f,function(t,e){return i.push(e),"??"}),(e=e.replace(c,function(e){return e in m?m[e](t,r):e.slice(1,e.length-1)})).replace(/\?\?/g,function(){return i.shift()})},u.parse=function(t,e,n){var r=n||u.i18n;if("string"!=typeof e)throw new Error("Invalid format in fecha.parse");if(e=u.masks[e]||e,t.length>1e3)return!1;var i=!0,a={};if(e.replace(c,function(e){if(x[e]){var n=x[e],o=t.search(n[0]);~o?t.replace(n[0],function(e){return n[1](a,e,r),t=t.substr(o+e.length),e}):i=!1}return x[e]?"":e.slice(1,e.length-1)}),!i)return!1;var o=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 s;return null!=a.timezoneOffset?(a.minute=+(a.minute||0)-+a.timezoneOffset,s=new Date(Date.UTC(a.year||o.getFullYear(),a.month||0,a.day||1,a.hour||0,a.minute||0,a.second||0,a.millisecond||0))):s=new Date(a.year||o.getFullYear(),a.month||0,a.day||1,a.hour||0,a.minute||0,a.second||0,a.millisecond||0),s},void 0!==t&&t.exports?t.exports=u:void 0!==(r=function(){return u}.call(e,n,e,t))&&(t.exports=r)}()},function(t,e,n){var r=n(20),i=n(147);t.exports={toTimeStamp:function(t){return r(t)&&(t=t.indexOf("T")>0?new Date(t).getTime():new Date(t.replace(/-/gi,"/")).getTime()),i(t)&&(t=t.getTime()),t}}},function(t,e,n){t.exports={Canvas:n(151),Group:n(90),Shape:n(4),Arc:n(94),Circle:n(95),Dom:n(96),Ellipse:n(97),Fan:n(98),Image:n(99),Line:n(100),Marker:n(48),Path:n(101),Polygon:n(102),Polyline:n(103),Rect:n(104),Text:n(105),PathSegment:n(37),CommonUtil:n(23),DomUtil:n(88),MatrixUtil:n(6),PathUtil:n(49),Event:n(89),version:"3.1.1"}},function(t,e,n){var r=n(11),i=Array.prototype.indexOf;t.exports=function(t,e){return!!r(t)&&i.call(t,e)>-1}},function(t,e,n){var r=n(3),i=n(11);t.exports=function(t,e){if(!i(t))return t;var n=[];return r(t,function(t,r){e(t,r)&&n.push(t)}),n}},function(t,e,n){var r=n(11),i=Array.prototype.splice;t.exports=function(t,e){if(!r(t))return[];for(var n=t?e.length:0,a=n-1;n--;){var o=void 0,s=e[n];n!==a&&s===o||(o=s,i.call(t,s,1))}return t}},function(t,e){t.exports=parseInt},function(t,e,n){var r=n(22);t.exports=function(t){return r(t).toLowerCase()}},function(t,e,n){var r=n(22);t.exports=function(t){return r(t).toUpperCase()}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).replace(/^\[object /,"").replace(/\]$/,"")}},function(t,e){var n=Object.prototype;t.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||n)}},function(t,e,n){var r=n(15),i=n(7),a=n(86);t.exports=function(t,e){if(!e)return{0:t};if(!r(e)){var n=i(e)?e:e.replace(/\s+/g,"").split("*");e=function(t){for(var e="_",r=0,i=n.length;r]*>/,s={tr:document.createElement("tbody"),tbody:i,thead:i,tfoot:i,td:a,th:a,"*":document.createElement("div")};t.exports={getBoundingClientRect:function(t,e){if(t&&t.getBoundingClientRect){var n=t.getBoundingClientRect(),r=document.documentElement.clientTop,i=document.documentElement.clientLeft;return{top:n.top-r,bottom:n.bottom-r,left:n.left-i,right:n.right-i}}return e||null},getStyle:function(t,e,n){try{return window.getComputedStyle?window.getComputedStyle(t,null)[e]:t.currentStyle[e]}catch(t){return r.isNil(n)?null:n}},modifyCSS:function(t,e){if(t)for(var n in e)e.hasOwnProperty(n)&&(t.style[n]=e[n]);return t},createDom:function(t){var e=o.test(t)&&RegExp.$1;e in s||(e="*");var n=s[e];t=t.replace(/(^\s*)|(\s*$)/g,""),n.innerHTML=""+t;var r=n.childNodes[0];return n.removeChild(r),r},getRatio:function(){return window.devicePixelRatio?window.devicePixelRatio:2},getWidth:function(t,e){var n=this.getStyle(t,"width",e);return"auto"===n&&(n=t.offsetWidth),parseFloat(n)},getHeight:function(t,e){var n=this.getStyle(t,"height",e);return"auto"===n&&(n=t.offsetHeight),parseFloat(n)},getOuterHeight:function(t,e){var n=this.getHeight(t,e),r=parseFloat(this.getStyle(t,"borderTopWidth"))||0,i=parseFloat(this.getStyle(t,"paddingTop"))||0,a=parseFloat(this.getStyle(t,"paddingBottom"))||0;return n+r+(parseFloat(this.getStyle(t,"borderBottomWidth"))||0)+i+a},getOuterWidth:function(t,e){var n=this.getWidth(t,e),r=parseFloat(this.getStyle(t,"borderLeftWidth"))||0,i=parseFloat(this.getStyle(t,"paddingLeft"))||0,a=parseFloat(this.getStyle(t,"paddingRight"))||0;return n+r+(parseFloat(this.getStyle(t,"borderRightWidth"))||0)+i+a},addEventListener:function(t,e,n){if(t){if(t.addEventListener)return t.addEventListener(e,n,!1),{remove:function(){t.removeEventListener(e,n,!1)}};if(t.attachEvent)return t.attachEvent("on"+e,n),{remove:function(){t.detachEvent("on"+e,n)}}}},requestAnimationFrame:function(t){return(window.requestAnimationFrame||window.webkitRequestAnimationFrame||function(t){return setTimeout(t,16)})(t)}}},function(t,e,n){var r=n(1),i=function(t,e,n,r){this.type=t,this.target=null,this.currentTarget=null,this.bubbles=n,this.cancelable=r,this.timeStamp=(new Date).getTime(),this.defaultPrevented=!1,this.propagationStopped=!1,this.removed=!1,this.event=e};r.augment(i,{preventDefault:function(){this.defaultPrevented=this.cancelable&&!0},stopPropagation:function(){this.propagationStopped=!0},remove:function(){this.remove=!0},clone:function(){return r.clone(this)},toString:function(){return"[Event (type="+this.type+")]"}}),t.exports=i},function(t,e,n){function r(t,e,n){for(var r=void 0,i=t.length-1;i>=0;i--){var a=t[i];if(a._cfg.visible&&a._cfg.capture&&(a.isGroup?r=a.getShape(e,n):a.isHit(e,n)&&(r=a)),r)break}return r}function i(t){if(!t._cfg&&t!==l){var e=t.superclass.constructor;e&&!e._cfg&&i(e),t._cfg={},a.merge(t._cfg,e._cfg),a.merge(t._cfg,t.CFG)}}var a=n(1),o=n(91),s=n(204),u={},c="_INDEX",l=function t(e){t.superclass.constructor.call(this,e),this.set("children",[]),this.set("tobeRemoved",[]),this._beforeRenderUI(),this._renderUI(),this._bindUI()};a.extend(l,o),a.augment(l,{isGroup:!0,type:"group",canFill:!0,canStroke:!0,getDefaultCfg:function(){return i(this.constructor),a.merge({},this.constructor._cfg)},_beforeRenderUI:function(){},_renderUI:function(){},_bindUI:function(){},addShape:function(t,e){var n=this.get("canvas");e=e||{};var r=u[t];if(r||(r=a.upperFirst(t),u[t]=r),e.attrs&&n){var i=e.attrs;if("text"===t){var o=n.get("fontFamily");o&&(i.fontFamily=i.fontFamily?i.fontFamily:o)}}e.canvas=n,e.type=t;var c=new s[r](e);return this.add(c),c},addGroup:function(t,e){var n=this.get("canvas"),r=void 0;if(e=a.merge({},e),a.isFunction(t))e?(e.canvas=n,e.parent=this,r=new t(e)):r=new t({canvas:n,parent:this}),this.add(r);else if(a.isObject(t))t.canvas=n,r=new l(t),this.add(r);else{if(void 0!==t)return!1;r=new l,this.add(r)}return r},renderBack:function(t,e){var n=this.get("backShape"),r=this.getBBox();return a.merge(e,{x:r.minX-t[3],y:r.minY-t[0],width:r.width+t[1]+t[3],height:r.height+t[0]+t[2]}),n?n.attr(e):n=this.addShape("rect",{zIndex:-1,attrs:e}),this.set("backShape",n),this.sort(),n},removeChild:function(t,e){if(arguments.length>=2)this.contain(t)&&t.remove(e);else{if(1===arguments.length){if(!a.isBoolean(t))return this.contain(t)&&t.remove(!0),this;e=t}0===arguments.length&&(e=!0),l.superclass.remove.call(this,e)}return this},add:function(t){var e=this,n=e.get("children");if(a.isArray(t))a.each(t,function(t){var n=t.get("parent");n&&n.removeChild(t,!1),e._setCfgProperty(t)}),e._cfg.children=n.concat(t);else{var r=t,i=r.get("parent");i&&i.removeChild(r,!1),e._setCfgProperty(r),n.push(r)}return e},_setCfgProperty:function(t){var e=this._cfg;t.set("parent",this),t.set("canvas",e.canvas),e.timeline&&t.set("timeline",e.timeline)},contain:function(t){return this.get("children").indexOf(t)>-1},getChildByIndex:function(t){return this.get("children")[t]},getFirst:function(){return this.getChildByIndex(0)},getLast:function(){var t=this.get("children").length-1;return this.getChildByIndex(t)},getBBox:function(){var t=1/0,e=-1/0,n=1/0,r=-1/0,i=this.get("children");i.length>0?a.each(i,function(i){if(i.get("visible")){var a=i.getBBox();if(!a)return!0;var o=[a.minX,a.minY,1],s=[a.minX,a.maxY,1],u=[a.maxX,a.minY,1],c=[a.maxX,a.maxY,1];i.apply(o),i.apply(s),i.apply(u),i.apply(c);var l=Math.min(o[0],s[0],u[0],c[0]),h=Math.max(o[0],s[0],u[0],c[0]),f=Math.min(o[1],s[1],u[1],c[1]),p=Math.max(o[1],s[1],u[1],c[1]);le&&(e=h),fr&&(r=p)}}):(t=0,e=0,n=0,r=0);var o={minX:t,minY:n,maxX:e,maxY:r};return o.x=o.minX,o.y=o.minY,o.width=o.maxX-o.minX,o.height=o.maxY-o.minY,o},getCount:function(){return this.get("children").length},sort:function(){var t=this.get("children");return a.each(t,function(t,e){return t[c]=e,t}),t.sort(function(t){return function(e,n){var r=t(e,n);return 0===r?e[c]-n[c]:r}}(function(t,e){return t.get("zIndex")-e.get("zIndex")})),this},findById:function(t){return this.find(function(e){return e.get("id")===t})},find:function(t){if(a.isString(t))return this.findById(t);var e=this.get("children"),n=null;return a.each(e,function(e){if(t(e)?n=e:e.find&&(n=e.find(t)),n)return!1}),n},findAll:function(t){var e=this.get("children"),n=[],r=[];return a.each(e,function(e){t(e)&&n.push(e),e.findAllBy&&(r=e.findAllBy(t),n=n.concat(r))}),n},findBy:function(t){var e=this.get("children"),n=null;return a.each(e,function(e){if(t(e)?n=e:e.findBy&&(n=e.findBy(t)),n)return!1}),n},findAllBy:function(t){var e=this.get("children"),n=[],r=[];return a.each(e,function(e){t(e)&&n.push(e),e.findAllBy&&(r=e.findAllBy(t),n=n.concat(r))}),n},getShape:function(t,e){var n=this._attrs.clip,i=this._cfg.children,a=void 0;if(n){var o=[t,e,1];n.invert(o,this.get("canvas")),n.isPointInPath(o[0],o[1])&&(a=r(i,t,e))}else a=r(i,t,e);return a},clearTotalMatrix:function(){if(this.get("totalMatrix")){this.setSilent("totalMatrix",null);for(var t=this._cfg.children,e=0;e=0;e--)t[e].remove();return this._cfg.children=[],this},destroy:function(){this.get("destroyed")||(this.clear(),l.superclass.destroy.call(this))}}),t.exports=l},function(t,e,n){var r=n(1),i=n(201),a=n(202),o=n(203),s=n(67),u=function(t){this._cfg={zIndex:0,capture:!0,visible:!0,destroyed:!1},r.assign(this._cfg,this.getDefaultCfg(),t),this.initAttrs(this._cfg.attrs),this._cfg.attrs={},this.initTransform(),this.init()};u.CFG={id:null,zIndex:0,canvas:null,parent:null,capture:!0,context:null,visible:!0,destroyed:!1},r.augment(u,i,a,s,o,{init:function(){this.setSilent("animable",!0),this.setSilent("animating",!1)},getParent:function(){return this._cfg.parent},getDefaultCfg:function(){return{}},set:function(t,e){return"zIndex"===t&&this._beforeSetZIndex&&this._beforeSetZIndex(e),"loading"===t&&this._beforeSetLoading&&this._beforeSetLoading(e),this._cfg[t]=e,this},setSilent:function(t,e){this._cfg[t]=e},get:function(t){return this._cfg[t]},show:function(){return this._cfg.visible=!0,this},hide:function(){return this._cfg.visible=!1,this},remove:function(t){var e=this._cfg,n=e.parent,i=e.el;return n&&(i&&n._cfg.tobeRemoved.push(i),r.remove(n.get("children"),this)),(t||void 0===t)&&this.destroy(),this},destroy:function(){this.get("destroyed")||(this._attrs=null,this.removeEvent(),this._cfg={destroyed:!0})},toFront:function(){var t=this._cfg,e=t.parent;if(e){var n=e._cfg.children,r=t.el,i=n.indexOf(this);n.splice(i,1),n.push(this),r&&(r.parentNode.removeChild(r),t.el=null)}},toBack:function(){var t=this._cfg,e=t.parent;if(e){var n=e._cfg.children,r=t.el,i=n.indexOf(this);if(n.splice(i,1),n.unshift(this),r){var a=r.parentNode;a.removeChild(r),a.insertBefore(r,a.firstChild)}}},_beforeSetZIndex:function(t){var e=this._cfg.parent;this._cfg.zIndex=t,r.isNil(e)||e.sort();var n=this._cfg.el;if(n){var i=e._cfg.children,a=i.indexOf(this),o=n.parentNode;o.removeChild(n),a===i.length-1?o.appendChild(n):o.insertBefore(n,o.childNodes[a])}return t},_setAttrs:function(t){return this.attr(t),t},setZIndex:function(t){return this._cfg.zIndex=t,this._beforeSetZIndex(t)},clone:function(){return r.clone(this)},getBBox:function(){}}),t.exports=u},function(t,e,n){function r(t,e,n,r){var i=1-r;return i*(i*t+2*r*e)+r*r*n}function i(t,e,n,i,a,s,u,c,l){var h=void 0,f=.005,p=1/0,d=void 0,g=void 0,y=void 0,v=void 0,m=void 0,x=void 0,b=[u,c];for(v=0;v<1;v+=.05)g=[r(t,n,a,v),r(e,i,s,v)],(d=o.squaredDistance(b,g))=0&&d=0?[i]:[]}}},function(t,e){t.exports={xAt:function(t,e,n,r,i){return e*Math.cos(t)*Math.cos(i)-n*Math.sin(t)*Math.sin(i)+r},yAt:function(t,e,n,r,i){return e*Math.sin(t)*Math.cos(i)+n*Math.cos(t)*Math.sin(i)+r},xExtrema:function(t,e,n){return Math.atan(-n/e*Math.tan(t))},yExtrema:function(t,e,n){return Math.atan(n/(e*Math.tan(t)))}}},function(t,e,n){function r(t,e,n){return t+e*Math.cos(n)}function i(t,e,n){return t+e*Math.sin(n)}var a=n(1),o=n(4),s=n(35),u=n(36),c=function t(e){t.superclass.constructor.call(this,e)};c.ATTRS={x:0,y:0,r:0,startAngle:0,endAngle:0,clockwise:!1,lineWidth:1,startArrow:!1,endArrow:!1},a.extend(c,o),a.augment(c,{canStroke:!0,type:"arc",getDefaultAttrs:function(){return{x:0,y:0,r:0,startAngle:0,endAngle:0,clockwise:!1,lineWidth:1,startArrow:!1,endArrow:!1}},calculateBox:function(){var t=this._attrs,e=t.x,n=t.y,r=t.r,i=t.startAngle,a=t.endAngle,o=t.clockwise,u=this.getHitLineWidth()/2,c=s.box(e,n,r,i,a,o);return c.minX-=u,c.minY-=u,c.maxX+=u,c.maxY+=u,c},getStartTangent:function(){var t=this._attrs,e=t.x,n=t.y,a=t.startAngle,o=t.r,s=t.clockwise,u=Math.PI/180;s&&(u*=-1);var c=[],l=r(e,o,a+u),h=i(n,o,a+u),f=r(e,o,a),p=i(n,o,a);return c.push([l,h]),c.push([f,p]),c},getEndTangent:function(){var t=this._attrs,e=t.x,n=t.y,a=t.endAngle,o=t.r,s=t.clockwise,u=Math.PI/180,c=[];s&&(u*=-1);var l=r(e,o,a+u),h=i(n,o,a+u),f=r(e,o,a),p=i(n,o,a);return c.push([f,p]),c.push([l,h]),c},createPath:function(t){var e=this._attrs,n=e.x,r=e.y,i=e.r,a=e.startAngle,o=e.endAngle,s=e.clockwise;(t=t||self.get("context")).beginPath(),t.arc(n,r,i,a,o,s)},afterPath:function(t){var e=this._attrs;if(t=t||this.get("context"),e.startArrow){var n=this.getStartTangent();u.addStartArrow(t,e,n[0][0],n[0][1],n[1][0],n[1][1])}if(e.endArrow){var r=this.getEndTangent();u.addEndArrow(t,e,r[0][0],r[0][1],r[1][0],r[1][1])}}}),t.exports=c},function(t,e,n){var r=n(1),i=n(4),a=function t(e){t.superclass.constructor.call(this,e)};a.ATTRS={x:0,y:0,r:0,lineWidth:1},r.extend(a,i),r.augment(a,{canFill:!0,canStroke:!0,type:"circle",getDefaultAttrs:function(){return{lineWidth:1}},calculateBox:function(){var t=this._attrs,e=t.x,n=t.y,r=t.r,i=this.getHitLineWidth()/2+r;return{minX:e-i,minY:n-i,maxX:e+i,maxY:n+i}},createPath:function(t){var e=this._attrs,n=e.x,r=e.y,i=e.r;t.beginPath(),t.arc(n,r,i,0,2*Math.PI,!1),t.closePath()}}),t.exports=a},function(t,e,n){var r=n(1),i=n(4),a=function t(e){t.superclass.constructor.call(this,e)};r.extend(a,i),r.augment(a,{canFill:!0,canStroke:!0,type:"dom",calculateBox:function(){var t=this._attrs,e=t.x,n=t.y,r=t.width,i=t.height,a=this.getHitLineWidth()/2;return{minX:e-a,minY:n-a,maxX:e+r+a,maxY:n+i+a}}}),t.exports=a},function(t,e,n){var r=n(1),i=n(4),a=n(6).mat3,o=function t(e){t.superclass.constructor.call(this,e)};o.ATTRS={x:0,y:0,rx:1,ry:1,lineWidth:1},r.extend(o,i),r.augment(o,{canFill:!0,canStroke:!0,type:"ellipse",getDefaultAttrs:function(){return{lineWidth:1}},calculateBox:function(){var t=this._attrs,e=t.x,n=t.y,r=t.rx,i=t.ry,a=this.getHitLineWidth(),o=r+a/2,s=i+a/2;return{minX:e-o,minY:n-s,maxX:e+o,maxY:n+s}},createPath:function(t){var e=this._attrs,n=e.x,r=e.y,i=e.rx,o=e.ry;t=t||self.get("context");var s=i>o?i:o,u=i>o?1:i/o,c=i>o?o/i:1,l=[1,0,0,0,1,0,0,0,1];a.scale(l,l,[u,c]),a.translate(l,l,[n,r]),t.beginPath(),t.save(),t.transform(l[0],l[1],l[3],l[4],l[6],l[7]),t.arc(0,0,s,0,2*Math.PI),t.restore(),t.closePath()}}),t.exports=o},function(t,e,n){var r=n(1),i=n(4),a=n(35),o=function t(e){t.superclass.constructor.call(this,e)};o.ATTRS={x:0,y:0,rs:0,re:0,startAngle:0,endAngle:0,clockwise:!1,lineWidth:1},r.extend(o,i),r.augment(o,{canFill:!0,canStroke:!0,type:"fan",getDefaultAttrs:function(){return{clockwise:!1,lineWidth:1,rs:0,re:0}},calculateBox:function(){var t=this._attrs,e=t.x,n=t.y,r=t.rs,i=t.re,o=t.startAngle,s=t.endAngle,u=t.clockwise,c=this.getHitLineWidth(),l=a.box(e,n,r,o,s,u),h=a.box(e,n,i,o,s,u),f=c/2;return{minX:Math.min(l.minX,h.minX)-f,minY:Math.min(l.minY,h.minY)-f,maxX:Math.max(l.maxX,h.maxX)+f,maxY:Math.max(l.maxY,h.maxY)+f}},createPath:function(t){var e=this._attrs,n=e.x,r=e.y,i=e.rs,a=e.re,o=e.startAngle,s=e.endAngle,u=e.clockwise,c={x:Math.cos(o)*i+n,y:Math.sin(o)*i+r},l={x:Math.cos(o)*a+n,y:Math.sin(o)*a+r},h={x:Math.cos(s)*i+n,y:Math.sin(s)*i+r};(t=t||self.get("context")).beginPath(),t.moveTo(c.x,c.y),t.lineTo(l.x,l.y),t.arc(n,r,a,o,s,u),t.lineTo(h.x,h.y),t.arc(n,r,i,s,o,!u),t.closePath()}}),t.exports=o},function(t,e,n){var r=n(1),i=n(4),a=function t(e){t.superclass.constructor.call(this,e)};a.ATTRS={x:0,y:0,img:void 0,width:0,height:0,sx:null,sy:null,swidth:null,sheight:null},r.extend(a,i),r.augment(a,{type:"image",isHitBox:function(){return!1},calculateBox:function(){var t=this._attrs;this._cfg.attrs&&this._cfg.attrs.img===t.img||this._setAttrImg();var e=t.x,n=t.y;return{minX:e,minY:n,maxX:e+t.width,maxY:n+t.height}},_beforeSetLoading:function(t){var e=this.get("canvas");return!1===t&&!0===this.get("toDraw")&&(this._cfg.loading=!1,e.draw()),t},_setAttrImg:function(){var t=this,e=t._attrs,n=e.img;if(!r.isString(n))return n instanceof Image?(e.width||t.attr("width",n.width),e.height||t.attr("height",n.height),n):n instanceof HTMLElement&&r.isString(n.nodeName)&&"CANVAS"===n.nodeName.toUpperCase()?(e.width||t.attr("width",Number(n.getAttribute("width"))),e.height||t.attr("height",Number(n.getAttribute("height"))),n):n instanceof ImageData?(e.width||t.attr("width",n.width),e.height||t.attr("height",n.height),n):null;var i=new Image;i.onload=function(){if(t.get("destroyed"))return!1;t.attr("imgSrc",n),t.attr("img",i);var e=t.get("callback");e&&e.call(t),t.set("loading",!1)},i.src=n,i.crossOrigin="Anonymous",t.set("loading",!0)},drawInner:function(t){this._cfg.hasUpdate&&this._setAttrImg(),this.get("loading")?this.set("toDraw",!0):(this._drawImage(t),this._cfg.hasUpdate=!1)},_drawImage:function(t){var e=this._attrs,n=e.x,i=e.y,a=e.img,o=e.width,s=e.height,u=e.sx,c=e.sy,l=e.swidth,h=e.sheight;this.set("toDraw",!1);var f=a;if(f instanceof ImageData&&((f=new Image).src=a),f instanceof Image||f instanceof HTMLElement&&r.isString(f.nodeName)&&"CANVAS"===f.nodeName.toUpperCase()){if(r.isNil(u)||r.isNil(c)||r.isNil(l)||r.isNil(h))return void t.drawImage(f,n,i,o,s);if(!(r.isNil(u)||r.isNil(c)||r.isNil(l)||r.isNil(h)))return void t.drawImage(f,u,c,l,h,n,i,o,s)}}}),t.exports=a},function(t,e,n){var r=n(1),i=n(4),a=n(36),o=n(34),s=function t(e){t.superclass.constructor.call(this,e)};s.ATTRS={x1:0,y1:0,x2:0,y2:0,lineWidth:1,startArrow:!1,endArrow:!1},r.extend(s,i),r.augment(s,{canStroke:!0,type:"line",getDefaultAttrs:function(){return{lineWidth:1,startArrow:!1,endArrow:!1}},calculateBox:function(){var t=this._attrs,e=t.x1,n=t.y1,r=t.x2,i=t.y2,a=this.getHitLineWidth();return o.box(e,n,r,i,a)},createPath:function(t){var e=this._attrs,n=e.x1,r=e.y1,i=e.x2,a=e.y2;(t=t||self.get("context")).beginPath(),t.moveTo(n,r),t.lineTo(i,a)},afterPath:function(t){var e=this._attrs,n=e.x1,r=e.y1,i=e.x2,o=e.y2;t=t||this.get("context"),e.startArrow&&a.addStartArrow(t,e,i,o,n,r),e.endArrow&&a.addEndArrow(t,e,n,r,i,o)},getPoint:function(t){var e=this._attrs;return{x:o.at(e.x1,e.x2,t),y:o.at(e.y1,e.y2,t)}}}),t.exports=s},function(t,e,n){var r=n(1),i=n(4),a=n(37),o=n(24),s=n(36),u=n(49),c=n(47),l=function t(e){t.superclass.constructor.call(this,e)};l.ATTRS={path:null,lineWidth:1,curve:null,tCache:null,startArrow:!1,endArrow:!1},r.extend(l,i),r.augment(l,{canFill:!0,canStroke:!0,type:"path",getDefaultAttrs:function(){return{lineWidth:1,startArrow:!1,endArrow:!1}},_afterSetAttrPath:function(t){if(r.isNil(t))return this.setSilent("segments",null),void this.setSilent("box",void 0);var e=o.parsePath(t),n=void 0,i=[];if(r.isArray(e)&&0!==e.length&&("M"===e[0][0]||"m"===e[0][0])){for(var s=e.length,u=0;ui&&(i=r.maxX),r.minYo&&(o=r.maxY))}),{minX:n,minY:a,maxX:i,maxY:o}},_setTcache:function(){var t=0,e=0,n=[],i=void 0,a=void 0,o=void 0,s=void 0,u=this.curve;u&&(r.each(u,function(e,n){o=u[n+1],s=e.length,o&&(t+=c.len(e[s-2],e[s-1],o[1],o[2],o[3],o[4],o[5],o[6]))}),r.each(u,function(r,l){o=u[l+1],s=r.length,o&&((i=[])[0]=e/t,a=c.len(r[s-2],r[s-1],o[1],o[2],o[3],o[4],o[5],o[6]),e+=a,i[1]=e/t,n.push(i))}),this.tCache=n)},_calculateCurve:function(){var t=this._attrs.path;this.curve=u.pathTocurve(t)},getStartTangent:function(){var t=this.get("segments"),e=void 0,n=void 0,i=void 0,a=void 0;if(t.length>1)if(e=t[0].endPoint,n=t[1].endPoint,i=t[1].startTangent,a=[],r.isFunction(i)){var o=i();a.push([e.x-o[0],e.y-o[1]]),a.push([e.x,e.y])}else a.push([n.x,n.y]),a.push([e.x,e.y]);return a},getEndTangent:function(){var t=this.get("segments"),e=t.length,n=void 0,i=void 0,a=void 0,o=void 0;if(e>1)if(n=t[e-2].endPoint,i=t[e-1].endPoint,a=t[e-1].endTangent,o=[],r.isFunction(a)){var s=a();o.push([i.x-s[0],i.y-s[1]]),o.push([i.x,i.y])}else o.push([n.x,n.y]),o.push([i.x,i.y]);return o},getPoint:function(t){var e=this.tCache,n=void 0,i=void 0;e||(this._calculateCurve(),this._setTcache(),e=this.tCache);var a=this.curve;if(!e)return a?{x:a[0][1],y:a[0][2]}:null;r.each(e,function(e,r){t>=e[0]&&t<=e[1]&&(n=(t-e[0])/(e[1]-e[0]),i=r)});var o=a[i];if(r.isNil(o)||r.isNil(i))return null;var s=o.length,u=a[i+1];return{x:c.at(o[s-2],u[1],u[3],u[5],1-n),y:c.at(o[s-1],u[2],u[4],u[6],1-n)}},createPath:function(t){var e=this.get("segments");if(r.isArray(e)){(t=t||this.get("context")).beginPath();for(var n=e.length,i=0;ia&&(a=e),ro&&(o=r)});var s=e/2;return{minX:n-s,minY:i-s,maxX:a+s,maxY:o+s}},createPath:function(t){var e=this._attrs.points;e.length<2||((t=t||this.get("context")).beginPath(),r.each(e,function(e,n){0===n?t.moveTo(e[0],e[1]):t.lineTo(e[0],e[1])}),t.closePath())}}),t.exports=a},function(t,e,n){var r=n(1),i=n(4),a=n(36),o=n(34),s=function t(e){t.superclass.constructor.call(this,e)};s.ATTRS={points:null,lineWidth:1,startArrow:!1,endArrow:!1,tCache:null},r.extend(s,i),r.augment(s,{canStroke:!0,type:"polyline",tCache:null,getDefaultAttrs:function(){return{lineWidth:1,startArrow:!1,endArrow:!1}},calculateBox:function(){var t=this._attrs,e=this.getHitLineWidth(),n=t.points;if(!n||0===n.length)return null;var i=1/0,a=1/0,o=-1/0,s=-1/0;r.each(n,function(t){var e=t[0],n=t[1];eo&&(o=e),ns&&(s=n)});var u=e/2;return{minX:i-u,minY:a-u,maxX:o+u,maxY:s+u}},_setTcache:function(){var t=this._attrs.points,e=0,n=0,i=[],a=void 0,s=void 0;t&&0!==t.length&&(r.each(t,function(n,r){t[r+1]&&(e+=o.len(n[0],n[1],t[r+1][0],t[r+1][1]))}),e<=0||(r.each(t,function(r,u){t[u+1]&&((a=[])[0]=n/e,s=o.len(r[0],r[1],t[u+1][0],t[u+1][1]),n+=s,a[1]=n/e,i.push(a))}),this.tCache=i))},createPath:function(t){var e=this._attrs.points,n=void 0,r=void 0;if(!(e.length<2)){for((t=t||this.get("context")).beginPath(),t.moveTo(e[0][0],e[0][1]),r=1,n=e.length-1;r=e[0]&&t<=e[1]&&(i=(t-e[0])/(e[1]-e[0]),a=n)}),{x:o.at(e[a][0],e[a+1][0],i),y:o.at(e[a][1],e[a+1][1],i)}}}),t.exports=s},function(t,e,n){var r=n(1),i=n(24).parseRadius,a=n(4),o=function t(e){t.superclass.constructor.call(this,e)};o.ATTRS={x:0,y:0,width:0,height:0,radius:0,lineWidth:1},r.extend(o,a),r.augment(o,{canFill:!0,canStroke:!0,type:"rect",getDefaultAttrs:function(){return{lineWidth:1,radius:0}},calculateBox:function(){var t=this._attrs,e=t.x,n=t.y,r=t.width,i=t.height,a=this.getHitLineWidth()/2;return{minX:e-a,minY:n-a,maxX:e+r+a,maxY:n+i+a}},createPath:function(t){var e=this._attrs,n=e.x,r=e.y,a=e.width,o=e.height,s=e.radius;if((t=t||this.get("context")).beginPath(),0===s)t.rect(n,r,a,o);else{var u=i(s);t.moveTo(n+u.r1,r),t.lineTo(n+a-u.r2,r),0!==u.r2&&t.arc(n+a-u.r2,r+u.r2,u.r2,-Math.PI/2,0),t.lineTo(n+a,r+o-u.r3),0!==u.r3&&t.arc(n+a-u.r3,r+o-u.r3,u.r3,0,Math.PI/2),t.lineTo(n+u.r4,r+o),0!==u.r4&&t.arc(n+u.r4,r+o-u.r4,u.r4,Math.PI/2,Math.PI),t.lineTo(n,r+u.r1),0!==u.r1&&t.arc(n+u.r1,r+u.r1,u.r1,Math.PI,1.5*Math.PI),t.closePath()}}}),t.exports=o},function(t,e,n){var r=n(1),i=n(4),a=function t(e){t.superclass.constructor.call(this,e)};a.ATTRS={x:0,y:0,text:null,fontSize:12,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",textAlign:"start",textBaseline:"bottom",lineHeight:null,textArr:null},r.extend(a,i),r.augment(a,{canFill:!0,canStroke:!0,type:"text",getDefaultAttrs:function(){return{lineWidth:1,lineCount:1,fontSize:12,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",textAlign:"start",textBaseline:"bottom"}},initTransform:function(){var t=this._attrs.fontSize;t&&+t<12&&this.transform([["t",-1*this._attrs.x,-1*this._attrs.y],["s",+t/12,+t/12],["t",this._attrs.x,this._attrs.y]])},_assembleFont:function(){var t=this._attrs,e=t.fontSize,n=t.fontFamily,r=t.fontWeight,i=t.fontStyle,a=t.fontVariant;t.font=[i,a,r,e+"px",n].join(" ")},_setAttrText:function(){var t=this._attrs,e=t.text,n=void 0;if(r.isString(e)&&-1!==e.indexOf("\n")){var i=(n=e.split("\n")).length;t.lineCount=i,t.textArr=n}},_getTextHeight:function(){var t=this._attrs,e=t.lineCount,n=1*t.fontSize;if(e>1){return n*e+this._getSpaceingY()*(e-1)}return n},isHitBox:function(){return!1},calculateBox:function(){var t=this._attrs,e=this._cfg;e.attrs&&!e.hasUpdate||(this._assembleFont(),this._setAttrText());var n=t.x,r=t.y,i=this.measureText();if(!i)return{minX:n,minY:r,maxX:n,maxY:r};var a=this._getTextHeight(),o=t.textAlign,s=t.textBaseline,u=this.getHitLineWidth(),c={x:n,y:r-a};o&&("end"===o||"right"===o?c.x-=i:"center"===o&&(c.x-=i/2)),s&&("top"===s?c.y+=a:"middle"===s&&(c.y+=a/2)),this.set("startPoint",c);var l=u/2;return{minX:c.x-l,minY:c.y-l,maxX:c.x+i+l,maxY:c.y+a+l}},_getSpaceingY:function(){var t=this._attrs,e=t.lineHeight,n=1*t.fontSize;return e?e-n:.14*n},drawInner:function(t){var e=this._attrs,n=this._cfg;n.attrs&&!n.hasUpdate||(this._assembleFont(),this._setAttrText()),t.font=e.font;var i=e.text;if(i){var a=e.textArr,o=e.x,s=e.y;if(t.beginPath(),this.hasStroke()){var u=e.strokeOpacity;r.isNil(u)||1===u||(t.globalAlpha=u),a?this._drawTextArr(t,!1):t.strokeText(i,o,s),t.globalAlpha=1}if(this.hasFill()){var c=e.fillOpacity;r.isNil(c)||1===c||(t.globalAlpha=c),a?this._drawTextArr(t,!0):t.fillText(i,o,s)}n.hasUpdate=!1}},_drawTextArr:function(t,e){var n=this._attrs.textArr,i=this._attrs.textBaseline,a=1*this._attrs.fontSize,o=this._getSpaceingY(),s=this._attrs.x,u=this._attrs.y,c=this.getBBox(),l=c.maxY-c.minY,h=void 0;r.each(n,function(n,r){h=u+r*(o+a)-l+a,"middle"===i&&(h+=l-a-(l-a)/2),"top"===i&&(h+=l-a),e?t.fillText(n,s,h):t.strokeText(n,s,h)})},measureText:function(){var t=this._attrs,e=t.text,n=t.font,i=t.textArr,a=void 0,o=0;if(!r.isNil(e)){var s=document.createElement("canvas").getContext("2d");return s.save(),s.font=n,i?r.each(i,function(t){a=s.measureText(t).width,ou&&(s=e.slice(u,s),l[c]?l[c]+=s:l[++c]=s),(n=n[0])===(o=o[0])?l[c]?l[c]+=o:l[++c]=o:(l[++c]=null,h.push({i:c,x:Object(r.a)(n,o)})),u=a.lastIndex;return u=0},_getDimValues:function(t){var e={},n=[];if(this.xField&&this.isAdjust("x")&&n.push(this.xField),this.yField&&this.isAdjust("y")&&n.push(this.yField),r(n,function(n){var r=i.values(t,n);r.sort(function(t,e){return t-e}),e[n]=r}),!this.yField&&this.isAdjust("y")){var a=[0,1];e.y=a}return e},adjustData:function(t,e){var n=this,i=n._getDimValues(e);r(t,function(e,a){r(i,function(r,i){n.adjustDim(i,r,e,t.length,a)})})},getAdjustRange:function(t,e,n){var r=n.indexOf(e),i=n.length,a=void 0,o=void 0;return!this.yField&&this.isAdjust("y")?(a=0,o=1):i>1?(a=0===r?n[0]:n[r-1],o=r===i-1?n[i-1]:n[r+1],0!==r?a+=(e-a)/2:a-=(o-e)/2,r!==i-1?o-=(o-e)/2:o+=(e-n[i-2])/2):(a=0===e?0:e-.5,o=0===e?1:e+.5),{pre:a,next:o}},groupData:function(t,e){var n={};return r(t,function(t){var r=t[e];void 0===r&&(r=t[e]=0),n[r]||(n[r]=[]),n[r].push(t)}),n}}},function(t,e,n){var r=n(117);t.exports=function(t){return r(t,"Function")}},function(t,e,n){var r={default:n(122),dark:n(266)};t.exports=r},function(t,e){var n,r,i='"-apple-system", BlinkMacSystemFont, "Segoe UI", Roboto,"Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",SimSun, "sans-serif"',a={defaultColor:"#1890FF",plotCfg:{padding:[20,20,95,80]},fontFamily:i,defaultLegendPosition:"bottom",colors:["#1890FF","#2FC25B","#FACC14","#223273","#8543E0","#13C2C2","#3436C7","#F04864"],colors_16:["#1890FF","#41D9C7","#2FC25B","#FACC14","#E6965C","#223273","#7564CC","#8543E0","#5C8EE6","#13C2C2","#5CA3E6","#3436C7","#B381E6","#F04864","#D598D9"],colors_24:["#1890FF","#66B5FF","#41D9C7","#2FC25B","#6EDB8F","#9AE65C","#FACC14","#E6965C","#57AD71","#223273","#738AE6","#7564CC","#8543E0","#A877ED","#5C8EE6","#13C2C2","#70E0E0","#5CA3E6","#3436C7","#8082FF","#DD81E6","#F04864","#FA7D92","#D598D9"],colors_pie:["#1890FF","#13C2C2","#2FC25B","#FACC14","#F04864","#8543E0","#3436C7","#223273"],colors_pie_16:["#1890FF","#73C9E6","#13C2C2","#6CD9B3","#2FC25B","#9DD96C","#FACC14","#E6965C","#F04864","#D66BCA","#8543E0","#8E77ED","#3436C7","#737EE6","#223273","#7EA2E6"],shapes:{point:["hollowCircle","hollowSquare","hollowDiamond","hollowBowtie","hollowTriangle","hollowHexagon","cross","tick","plus","hyphen","line"],line:["line","dash","dot"],area:["area"]},sizes:[1,10],opacities:[.1,.9],axis:{top:{position:"top",title:null,label:{offset:14,textStyle:{fill:"#545454",fontSize:12,lineHeight:20,textBaseline:"middle",fontFamily:i},autoRotate:!0},line:{lineWidth:1,stroke:"#BFBFBF"},tickLine:{lineWidth:1,stroke:"#BFBFBF",length:4,alignWithLabel:!0}},bottom:{position:"bottom",title:null,label:{offset:22,autoRotate:!0,textStyle:{fill:"#545454",fontSize:12,lineHeight:20,textBaseline:"middle",fontFamily:i}},line:{lineWidth:1,stroke:"#BFBFBF"},tickLine:{lineWidth:1,stroke:"#BFBFBF",length:4,alignWithLabel:!0}},left:{position:"left",title:null,label:{offset:12,autoRotate:!0,textStyle:{fill:"#545454",fontSize:12,lineHeight:20,textBaseline:"middle",fontFamily:i}},line:null,tickLine:null,grid:{zIndex:-1,lineStyle:{stroke:"#E9E9E9",lineWidth:1,lineDash:[3,3]},hideFirstLine:!0}},right:{position:"right",title:null,label:{offset:12,autoRotate:!0,textStyle:{fill:"#545454",fontSize:12,lineHeight:20,textBaseline:"middle",fontFamily:i}},line:null,tickLine:null,grid:{lineStyle:{stroke:"#E9E9E9",lineWidth:1,lineDash:[3,3]},hideFirstLine:!0}},circle:{zIndex:1,title:null,label:{offset:12,textStyle:{fill:"#545454",fontSize:12,lineHeight:20,fontFamily:i}},line:{lineWidth:1,stroke:"#BFBFBF"},tickLine:{lineWidth:1,stroke:"#BFBFBF",length:4,alignWithLabel:!0},grid:{lineStyle:{stroke:"#E9E9E9",lineWidth:1,lineDash:[3,3]},hideFirstLine:!0}},radius:{zIndex:0,label:{offset:12,textStyle:{fill:"#545454",fontSize:12,textBaseline:"middle",lineHeight:20,fontFamily:i}},line:{lineWidth:1,stroke:"#BFBFBF"},tickLine:{lineWidth:1,stroke:"#BFBFBF",length:4,alignWithLabel:!0},grid:{lineStyle:{stroke:"#E9E9E9",lineWidth:1,lineDash:[3,3]},type:"circle"}},helix:{grid:null,label:null,title:null,line:{lineWidth:1,stroke:"#BFBFBF"},tickLine:{lineWidth:1,length:4,stroke:"#BFBFBF",alignWithLabel:!0}}},label:{offset:20,textStyle:{fill:"#545454",fontSize:12,textBaseline:"middle",fontFamily:i}},treemapLabels:{offset:10,textStyle:{fill:"#fff",fontSize:12,textBaseline:"top",fontStyle:"bold",fontFamily:i}},innerLabels:{textStyle:{fill:"#fff",fontSize:12,textBaseline:"middle",fontFamily:i}},thetaLabels:{labelLine:{lineWidth:1},labelHeight:14,offset:30},legend:{right:{position:"right",layout:"vertical",itemMarginBottom:8,width:16,height:156,title:null,textStyle:{fill:"#8C8C8C",fontSize:12,textAlign:"start",textBaseline:"middle",lineHeight:20,fontFamily:i},unCheckColor:"#bfbfbf"},left:{position:"left",layout:"vertical",itemMarginBottom:8,width:16,height:156,title:null,textStyle:{fill:"#8C8C8C",fontSize:12,textAlign:"start",textBaseline:"middle",lineHeight:20,fontFamily:i},unCheckColor:"#bfbfbf"},top:{position:"top",offset:6,layout:"horizontal",title:null,itemGap:10,width:156,height:16,textStyle:{fill:"#8C8C8C",fontSize:12,textAlign:"start",textBaseline:"middle",lineHeight:20,fontFamily:i},unCheckColor:"#bfbfbf"},bottom:{position:"bottom",offset:6,layout:"horizontal",title:null,itemGap:10,width:156,height:16,textStyle:{fill:"#8C8C8C",fontSize:12,textAlign:"start",textBaseline:"middle",lineHeight:20,fontFamily:i},unCheckColor:"#bfbfbf"},html:(n={},n["g2-legend"]={height:"auto",width:"auto",position:"absolute",overflow:"auto",fontSize:"12px",fontFamily:i,lineHeight:"20px",color:"#8C8C8C"},n["g2-legend-title"]={marginBottom:"4px"},n["g2-legend-list"]={listStyleType:"none",margin:0,padding:0},n["g2-legend-list-item"]={cursor:"pointer",marginBottom:"5px",marginRight:"24px"},n["g2-legend-marker"]={width:"9px",height:"9px",borderRadius:"50%",display:"inline-block",marginRight:"8px",verticalAlign:"middle"},n),gradient:{textStyle:{fill:"#8C8C8C",fontSize:12,textAlign:"center",textBaseline:"middle",lineHeight:20,fontFamily:i},lineStyle:{lineWidth:1,stroke:"#fff"},unCheckColor:"#bfbfbf"},margin:[0,20,24,5],legendMargin:24},tooltip:(r={crosshairs:!1,offset:15},r["g2-tooltip"]={position:"absolute",visibility:"hidden",zIndex:8,transition:"visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1), left 0.4s cubic-bezier(0.23, 1, 0.32, 1), top 0.4s cubic-bezier(0.23, 1, 0.32, 1)",backgroundColor:"rgba(255, 255, 255, 0.9)",boxShadow:"0px 0px 10px #aeaeae",borderRadius:"3px",color:"rgb(87, 87, 87)",fontSize:"12px",fontFamily:i,lineHeight:"20px",padding:"10px 10px 6px 10px"},r["g2-tooltip-title"]={marginBottom:"4px"},r["g2-tooltip-list"]={margin:0,listStyleType:"none",padding:0},r["g2-tooltip-list-item"]={marginBottom:"4px"},r["g2-tooltip-marker"]={width:"5px",height:"5px",borderRadius:"50%",display:"inline-block",marginRight:"8px"},r["g2-tooltip-value"]={display:"inline-block",float:"right",marginLeft:"30px"},r),tooltipMarker:{symbol:function(t,e,n){return[["M",t,e],["m",-n,0],["a",n,n,0,1,0,2*n,0],["a",n,n,0,1,0,2*-n,0]]},stroke:"#fff",shadowBlur:8,shadowOffsetX:0,shadowOffSetY:0,radius:4},tooltipCrosshairsRect:{type:"rect",style:{fill:"#CCD6EC",opacity:.3}},tooltipCrosshairsLine:{style:{stroke:"rgba(0, 0, 0, 0.25)",lineWidth:1}},shape:{point:{lineWidth:1,fill:"#1890FF",radius:4},hollowPoint:{fill:"#fff",lineWidth:1,stroke:"#1890FF",radius:3},interval:{lineWidth:0,fill:"#1890FF",fillOpacity:.85},hollowInterval:{fill:"#fff",stroke:"#1890FF",fillOpacity:0,lineWidth:2},area:{lineWidth:0,fill:"#1890FF",fillOpacity:.3},polygon:{lineWidth:0,fill:"#1890FF",fillOpacity:1},hollowPolygon:{fill:"#fff",stroke:"#1890FF",fillOpacity:0,lineWidth:2},hollowArea:{fill:"#fff",stroke:"#1890FF",fillOpacity:0,lineWidth:2},line:{stroke:"#1890FF",lineWidth:2,fill:null},edge:{stroke:"#1890FF",lineWidth:1,fill:null},schema:{stroke:"#1890FF",lineWidth:1,fill:null}},guide:{line:{lineStyle:{stroke:"#1890FF",lineDash:[0,2,2],lineWidth:1},text:{position:"end",autoRotate:!0,style:{fill:"#545454",fontSize:12,textAlign:"center",fontFamily:i}}},text:{style:{fill:"#545454",fontSize:12,textBaseline:"middle",textAlign:"start",fontFamily:i}},region:{style:{lineWidth:0,fill:"#000",fillOpacity:.04}},html:{alignX:"middle",alignY:"middle"}},pixelRatio:null};t.exports=a},function(t,e,n){var r=n(5).Group,i=n(124),a=n(2),o=n(0),s=["line","point","path"],u=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){return{label:a.label,labelCfg:null,coord:null,geomType:null,zIndex:6}},e.prototype._renderUI=function(){t.prototype._renderUI.call(this),this.initLabelsCfg(),this.renderLabels()},e.prototype._getLabelValue=function(t){var e=t._origin,n=this.get("labelCfg"),r=n.scales,i=n.cfg&&n.cfg.content,a=void 0;if(i){var s=[];o.each(r,function(t){s.push(e[t.field])}),a=i.apply(null,s)}else{var u=r[0];if(a=e[u.field],o.isArray(a)){var c=[];o.each(a,function(t){c.push(u.getText(t))}),a=c}else a=u.getText(a)}return a},e.prototype.initLabelsCfg=function(){var t=this.getDefaultLabelCfg(),e=this.get("labelCfg");o.deepMix(t,e.cfg),this.set("label",t)},e.prototype.getDefaultLabelCfg=function(){var t=this.get("labelCfg").cfg,e=this.get("geomType"),n=this.get("viewTheme")||a;return"polygon"===e||t&&t.offset<0&&-1===o.indexOf(s,e)?o.deepMix({},this.get("label"),n.innerLabels):o.deepMix({},n.label,this.get("label"))},e.prototype.getLabelsItems=function(t){var e=this,n=[],r=e.get("label"),i=e.get("geom"),a=void 0;return o.each(t,function(t){a=t._origin;var s=e._getLabelValue(t);o.isArray(s)||(s=[s]);var u=s.length;o.each(s,function(c,l){var h=e.getLabelPoint(s,t,l);if(h&&!o.isNil(h.text)&&""!==h.text){h=o.mix({},a,h);var f=void 0;f=r&&r.label&&r.label.textAlign?r.label.textAlign:e.getLabelAlign(h,l,u),h.textAlign=f,i&&(h._id=i._getShapeId(a)+"-glabel-"+l+"-"+h.text),h.coord=e.get("coord"),n.push(h)}})}),n},e.prototype.adjustItems=function(t){return t},e.prototype.drawLines=function(t,e){var n=this;n.getDefaultOffset()>0&&o.each(t,function(t){n.lineToLabel(t,e)})},e.prototype.lineToLabel=function(t,e){var n=this.get("coord"),r={x:t.x-t._offset.x,y:t.y-t._offset.y},i={x:(r.x+t.x)/2,y:(r.y+t.y)/2},a=this.get("lineGroup");a||(a=this.addGroup({elCls:"x-line-group"}),this.set("lineGroup",a));var s=a.addShape("path",{attrs:o.mix({path:["M"+r.x,r.y+" Q"+i.x,i.y+" "+t.x,t.y].join(","),fill:null,stroke:t.color},e)});s.name="labelLine",s._id=t._id&&t._id.replace("glabel","glabelline"),s.set("coord",n)},e.prototype.getLabelPoint=function(t,e,n){function r(e,n){return o.isArray(e)&&(e=1===t.length?e.length<=2?e[e.length-1]:function(t){var e=0;return o.each(t,function(t){e+=t}),e/t.length}(e):e[n]),e}var i=this.get("coord"),a={x:r(e.x,n),y:r(e.y,n),text:t[n]};if(e&&e.nextPoints&&("funnel"===e.shape||"pyramid"===e.shape)){var s=-1/0;e.nextPoints.forEach(function(t){(t=i.convert(t)).x>s&&(s=t.x)}),a.x=(a.x+s)/2}"pyramid"===e.shape&&!e.nextPoints&&e.points&&e.points.forEach(function(t){t=i.convert(t),(o.isArray(t.x)&&-1===e.x.indexOf(t.x)||o.isNumber(t.x)&&e.x!==t.x)&&(a.x=(a.x+t.x)/2)});var u=this.getLabelOffset(a,n,t.length);return this.transLabelPoint(a),a.x+=u.x,a.y+=u.y,a.color=e.color,a._offset=u,a},e.prototype.transLabelPoint=function(t){var e=this.get("coord").applyMatrix(t.x,t.y,1);t.x=e[0],t.y=e[1]},e.prototype.getOffsetVector=function(){var t=this.get("label").offset||0,e=this.get("coord");return e.isTransposed?e.applyMatrix(t,0):e.applyMatrix(0,t)},e.prototype.getDefaultOffset=function(){var t=this.get("coord"),e=this.getOffsetVector();return t.isTransposed?e[0]:e[1]},e.prototype.getLabelOffset=function(t,e,n){var r=this.getDefaultOffset(),i=this.get("coord").isTransposed,a=i?"x":"y",o=i?1:-1,s={x:0,y:0};return s[a]=e>0||1===n?r*o:r*o*-1,s},e.prototype.getLabelAlign=function(t,e,n){var r="center";if(this.get("coord").isTransposed){var i=this.getDefaultOffset();r=i<0?"right":0===i?"center":"left",n>1&&0===e&&("right"===r?r="left":"left"===r&&(r="right"))}return r},e.prototype.showLabels=function(t){var e=this.getLabelsItems(t),n=this.get("label");e=this.adjustItems(e),this.resetLabels(e),n.labelLine&&this.drawLines(e,n.labelLine)},e.prototype.destroy=function(){this.removeLabels(),t.prototype.destroy.call(this)},e}(r);o.assign(u.prototype,i.LabelsRenderer),t.exports=u},function(t,e,n){var r=n(125);r.LabelsRenderer=n(268),t.exports=r},function(t,e,n){var r=n(0),i=n(5).Group,a=r.DomUtil,o=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){return{zIndex:6,items:null,textStyle:null,formatter:null,htmlTemplate:null,_containerTpl:'
',_itemTpl:'
{text}
'}},e.prototype._renderUI=function(){this._drawLabels()},e.prototype._drawLabels=function(){var t=this,e=t.get("items");r.each(e,function(e,n){t._addLabel(e,n)})},e.prototype._addLabel=function(t,e){var n=this._getLabelCfg(t,e);return this._createText(n)},e.prototype._getLabelCfg=function(t,e){var n=this.get("textStyle")||{},i=this.get("formatter"),a=this.get("htmlTemplate");if(!r.isObject(t)){var o=t;(t={}).text=o}r.isFunction(n)&&(n=n(t.text,t,e)),i&&(t.text=i(t.text,t,e)),r.isFunction(a)&&(t.text=a(t.text,t,e)),r.isNil(t.text)&&(t.text=""),t.text=t.text+"";return r.mix({},t,n,{x:t.x||0,y:t.y||0})},e.prototype._createText=function(t){var e=this.get("htmlTemplate"),n=this.get("customDiv"),r=void 0;if(!e){var i=t.point;return r=this.addShape("text"),this._setLabelAttrs(r,t),r.setSilent("origin",i),r.name="label",this.get("appendInfo")&&r.setSilent("appendInfo",this.get("appendInfo")),r}if(!n){var o=this.get("_containerTpl"),s=this.get("canvas").get("el").parentNode;n=a.createDom(o),s.style.position="relative",s.appendChild(n),this.set("customDiv",n)}var u=this._createDom(t);n.appendChild(u),this._setCustomPosition(t,u)},e.prototype._setLabelAttrs=function(t,e){var n=e.rotate;delete e.rotate,delete e.point,t.attr(e),n&&t.transform([["t",-e.x,-e.y],["r",n],["t",e.x,e.y]])},e.prototype._setCustomPosition=function(t,e){var n=t.textAlign||"left",r=t.y,i=t.x,o=a.getOuterWidth(e);r-=a.getOuterHeight(e)/2,"center"===n?i-=o/2:"right"===n&&(i-=o),e.style.top=parseInt(r,10)+"px",e.style.left=parseInt(i,10)+"px"},e.prototype._createDom=function(t){var e=this.get("_itemTpl"),n=this.get("htmlTemplate");r.isString(n)&&(t.text=r.substitute(n,{text:t.text}));var i=r.substitute(e,{text:t.text});return a.createDom(i)},e.prototype.getLabels=function(){var t=this.get("customDiv");return t?r.toArray(t.childNodes):this.get("children")},e.prototype.addLabel=function(t){var e=this.get("items"),n=e.length;return e.push(t),this._addLabel(t,n)},e.prototype.changeLabel=function(t,e){if(t){var n=this.get("htmlTemplate"),i=r.indexOf(this.getLabels(),t),a=this._getLabelCfg(e,i);if(n){var o=this._createDom(a);t.innerHTML=o.innerHTML,this._setCustomPosition(a,t)}else t._id=e._id,t.resetMatrix(),this._setLabelAttrs(t,a)}},e.prototype.clear=function(){var e=this.get("customDiv");e&&(e.innerHTML=""),t.prototype.clear.call(this)},e.prototype.setItems=function(t){this.clear(),this.set("items",t),this._drawLabels()},e.prototype.remove=function(){var e=this.get("customDiv");e&&e.parentNode.removeChild(e),t.prototype.remove.call(this)},e}(i);t.exports=o},function(t,e,n){var r=n(123),i=n(28),a=n(0),o=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getPointRauis=function(t,e){return i.getPointRadius(t,e)},e.prototype.getCirclePoint=function(t,e,n){var r=this.get("coord"),i=r.getCenter(),a=this._isEmitLabels(),o=this.getPointRauis(r,n);if(r.isTransposed&&o>e&&!a){t+=2*Math.asin(e/(2*o))}else o+=e;return{x:i.x+o*Math.cos(t),y:i.y+o*Math.sin(t),angle:t,r:o}},e.prototype.getArcPoint=function(t,e){var n=void 0;return e=e||0,n=a.isArray(t.x)||a.isArray(t.y)?{x:a.isArray(t.x)?t.x[e]:t.x,y:a.isArray(t.y)?t.y[e]:t.y}:t,this.transLabelPoint(n),n},e.prototype.getPointAngle=function(t){var e=this.get("coord");return i.getPointAngle(e,t)},e.prototype.getMiddlePoint=function(t){var e=this.get("coord"),n=t.length,r={x:0,y:0};return a.each(t,function(t){r.x+=t.x,r.y+=t.y}),r.x/=n,r.y/=n,r=e.convert(r)},e.prototype._isToMiddle=function(t){return t.x.length>2},e.prototype.getLabelPoint=function(t,e,n){var r=t[n],i=1,a=void 0;this._isToMiddle(e)?a=this.getMiddlePoint(e.points):(1===t.length&&0===n?n=1:0===n&&(i=-1),a=this.getArcPoint(e,n));var o=this.getDefaultOffset();o*=i;var s=this.getPointAngle(a),u=this.getCirclePoint(s,o,a);return u.text=r,u.angle=s,u.color=e.color,u.rotate=this.getLabelRotate(s,o,e),u},e.prototype._isEmitLabels=function(){return this.get("label").labelEmit},e.prototype.getLabelRotate=function(t){var e=void 0;return e=180*t/Math.PI,e+=90,this._isEmitLabels()&&(e-=90),e&&(e>90?e-=180:e<-90&&(e+=180)),e/180*Math.PI},e.prototype.getLabelAlign=function(t){var e=this.get("coord"),n=void 0;if(this._isEmitLabels())n=t.angle<=Math.PI/2&&t.angle>-Math.PI/2?"left":"right";else if(e.isTransposed){var r=e.getCenter(),i=this.getDefaultOffset();n=Math.abs(t.x-r.x)<1?"center":t.angle>Math.PI||t.angle<=0?i>0?"left":"right":i>0?"right":"left"}else n="center";return n},e}(r);t.exports=o},function(t,e,n){t.exports={Scale:n(274),Coord:n(275),Axis:n(280),Guide:n(287),Legend:n(296),Tooltip:n(302),Event:n(304)}},function(t,e,n){var r=n(0),i=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return r.mix({},e,{type:"text",position:null,content:null,style:{fill:"#999",fontSize:12,fontWeight:500,textAlign:"center"},offsetX:null,offsetY:null,top:!0})},e.prototype.render=function(t,e){var n=this.position,i=this.parsePoint(t,n),a=r.mix({},this.style);this.offsetX&&(i.x+=this.offsetX),this.offsetY&&(i.y+=this.offsetY),a.rotate&&(a.rotate=a.rotate*Math.PI/180);var o=e.addShape("Text",{zIndex:this.zIndex,attrs:r.mix({text:this.content},a,i)});o.name="guide-text",this.appendInfo&&o.setSilent("appendInfo",this.appendInfo),this.el=o},e}(n(17));t.exports=i},function(t,e,n){var r=n(128),i=n(0),a=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return i.mix({},e,{type:"dataMarker",zIndex:1,top:!0,position:null,style:{point:{r:4,fill:"#FFFFFF",stroke:"#1890FF",lineWidth:2},line:{stroke:"#000000",lineWidth:1,opacity:.25},text:{fill:"#000000",opacity:.65,fontSize:14,fontWeight:500,textAlign:"center"}},display:{point:!0,line:!0,text:!0},lineLength:30,direction:"upward"})},e.prototype.render=function(t,e){var n=this.position,r=this.parsePoint(t,n),i=e.addGroup();i.name="marker-group",i.translate(r.x,r.y);var a=this._getElementPosition();if(this.display.line){var o=a.line;this._drawLine(o,i)}if(this.display.text&&this.content){var s=a.text;this._drawText(s,i)}if(this.display.point){var u=a.point;this._drawPoint(u,i)}this.appendInfo&&i.setSilent("marker-group",this.appendInfo),this.el=i},e.prototype.set=function(t,e){this[t]=e},e.prototype._getElementPosition=function(){var t=this.display.line?this.lineLength:5;this.style.text.textBaseline="upward"===this.direction?"bottom":"top";var e="upward"===this.direction?-1:1;return{point:{x:0,y:0},line:[{x:0,y:0},{x:0,y:t*e}],text:{x:0,y:t*e}}},e.prototype._drawLine=function(t,e){var n=this.style.line,r=[["M",t[0].x,t[0].y],["L",t[1].x,t[1].y]];e.addShape("path",{attrs:i.mix({path:r},n)})},e.prototype._drawText=function(t,e){var n=this.style.text;e.addShape("text",{attrs:i.mix({text:this.content},n,t)})},e.prototype._drawPoint=function(t,e){var n=this.style.point;e.addShape("circle",{attrs:i.mix({},n,t)})},e}(r);t.exports=a},function(t,e,n){function r(t,e){return t.getElementsByClassName(e)[0]}function i(t,e){var n=t.className;return s.isNil(n)?t:(n=n.split(" ")).indexOf(e)>-1?t:t.parentNode?t.parentNode.className===d?t.parentNode:i(t.parentNode,e):null}function a(t,e){var n=null,r=e instanceof f?e.get("value"):e;return s.each(t,function(t){if(t.value===r)return n=t,!1}),n}function o(t,e){return t.findBy(function(t){return t.name===e})}var s=n(0),u=n(131),c=s.DomUtil,l=n(5),h=l.Event,f=l.Group,p=n(2),d="g2-legend",g="g2-legend-list",y="g2-legend-list-item",v="g2-legend-marker",m=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return s.mix({},e,{type:"category-legend",items:null,itemGap:5,titleGap:15,itemMarginBottom:8,itemsGroup:null,layout:"horizontal",allowAllCanceled:!1,backPadding:[0,0,0,0],checkable:!0,unCheckColor:"#ccc",background:{fill:"#fff",fillOpacity:0},itemWidth:null,textStyle:{fill:"#333",fontSize:12,textAlign:"start",textBaseline:"middle",fontFamily:p.fontFamily},_wordSpaceing:8,useHtml:!1,container:null,containerTpl:'

    ',_defaultItemTpl:'
  • {value}
  • ',itemTpl:null,clickable:!0,selectedMode:"multiple",reversed:!1,autoWrap:!0})},e.prototype._beforeRenderUI=function(){t.prototype._beforeRenderUI.call(this)},e.prototype._renderUI=function(){this.get("useHtml")?this._renderHTML():(t.prototype._renderUI.call(this),this._renderItems(),this.get("autoWrap")&&this._adjustItems())},e.prototype._bindUI=function(){this.get("hoverable")&&(this.on("mousemove",s.wrapBehavior(this,"_onMousemove")),this.on("mouseleave",s.wrapBehavior(this,"_onMouseleave"))),this.get("clickable")&&this.on("click",s.wrapBehavior(this,"_onClick"))},e.prototype._getLegendItem=function(t){var e=t.get("parent");return e&&"legendGroup"===e.name?e:null},e.prototype._onMousemove=function(t){var e=this._getLegendItem(t.currentTarget);if(e&&e.get("checked")){var n=this.get("items"),r=new h("itemhover",t,!0,!0);r.item=a(n,e),r.checked=e.get("checked"),this.emit("itemhover",r)}else e||this.emit("itemunhover",t)},e.prototype._onMouseleave=function(t){this.emit("itemunhover",t)},e.prototype._onClick=function(t){var e=this._getLegendItem(t.currentTarget),n=this.get("items");if(e&&!e.get("destroyed")){var r=e.get("checked");if(!this.get("allowAllCanceled")&&r&&1===this.getCheckedCount())return;var i=this.get("selectedMode"),u=a(n,e),c=new h("itemclick",t,!0,!0);c.item=u,c.currentTarget=e,c.appendInfo=t.currentTarget.get("appendInfo"),c.checked="single"===i||!r;var l=this.get("unCheckColor"),f=this.get("textStyle").fill,p=void 0,d=void 0,g=void 0;if("single"===i){var y=this.get("itemsGroup").get("children");s.each(y,function(t){p=o(t,"legend-marker"),d=o(t,"legend-text"),g=o(t,"legend-item"),t!==e?(p.attr("fill")&&p.attr("fill",l),p.attr("stroke")&&p.attr("stroke",l),d.attr("fill",l),p.setSilent("checked",!1),d.setSilent("checked",!1),g.setSilent("checked",!1),t.setSilent("checked",!1)):(p.attr("fill")&&p.attr("fill",u.marker.fill),p.attr("stroke")&&p.attr("stroke",u.marker.stroke),d.attr("fill",f),p.setSilent("checked",!0),d.setSilent("checked",!0),g.setSilent("checked",!0),t.setSilent("checked",!0))})}else p=o(e,"legend-marker"),d=o(e,"legend-text"),g=o(e,"legend-item"),p.attr("fill")&&p.attr("fill",r?l:u.marker.fill),p.attr("stroke")&&p.attr("stroke",r?l:u.marker.stroke),d.attr("fill",r?l:f),e.setSilent("checked",!r),p.setSilent("checked",!r),d.setSilent("checked",!r),g.setSilent("checked",!r);this.emit("itemclick",c)}},e.prototype._renderHTML=function(){var t=this,e=this,n=e.get("canvas"),o=e.get("viewTheme")||p,u=n.get("el").parentNode,l=this.get("title"),h=e.get("containerTpl"),f=c.createDom(h),m=r(f,"g2-legend-title"),x=r(f,g),b=e.get("unCheckColor"),w=e.get("selectedMode"),_=o.legend.html,S=e.get("container");if(/^\#/.test(S)){var M=S.replace("#","");(S=document.getElementById(M)).appendChild(f)}else{var A=e.get("position"),C=e.get("canvas"),P={};P="left"===A||"right"===A?{maxHeight:(e.get("maxLength")||C.get("height"))+"px"}:{maxWidth:(e.get("maxLength")||C.get("width"))+"px"},c.modifyCSS(f,s.mix({},_[d],P,e.get(d))),u.appendChild(f)}c.modifyCSS(x,s.mix({},_[g],e.get(g))),m&&(l&&l.text?(m.innerHTML=l.text,c.modifyCSS(m,s.mix({},_["g2-legend-title"],e.get("g2-legend-title")))):f.removeChild(m));var k=e.get("items"),T=e.get("_defaultItemTpl"),O=e.get("itemTpl");O&&O!==T&&(T=O),e.get("reversed")&&k.reverse();var I=e.get("position"),E=s.mix({},_[y],{display:"right"===I||"left"===I?"block":"inline-block"},e.get(y)),L=s.mix({},_[v],e.get(v));if(s.each(k,function(t,n){var i=t.checked,a=e._formatItemValue(t.value),o=t.marker.fill||t.marker.stroke,u=i?o:b,l=void 0;l=s.isFunction(T)?T(a,u,i,n):T;var h=s.substitute(l,{index:n,checked:i?"checked":"unChecked",value:a,color:u,originColor:o,originValue:t.value.replace(/\"/g,""")}),f=c.createDom(h),p=r(f,v);c.modifyCSS(f,E),p&&c.modifyCSS(p,L),i||(f.style.color=b,p&&(p.style.backgroundColor=b)),x.appendChild(f)}),e.get("clickable")){var D=x.childNodes;x.onclick=function(n){var o=n.target,u=o.className;if(!((u=u.split(" ")).indexOf(d)>-1||u.indexOf(g)>-1)){var c=i(o,y),l=r(c,"g2-legend-text"),h=r(c,v),f=a(k,c.getAttribute("data-value"));if(f){var p=c.className,m=c.getAttribute("data-color");if("single"===w)f.checked=!0,s.each(D,function(t){if(t!==c){r(t,v).style.backgroundColor=b,t.className=t.className.replace("checked","unChecked"),t.style.color=b;a(k,t.getAttribute("data-value")).checked=!1}else l&&(l.style.color=e.get("textStyle").fill),h&&(h.style.backgroundColor=m),c.className=p.replace("unChecked","checked")});else{var x=p.includes("checked"),_=0;if(s.each(D,function(t){t.className.includes("checked")&&_++}),!t.get("allowAllCanceled")&&x&&1===_)return;f.checked=!f.checked,x?(h&&(h.style.backgroundColor=b),c.className=p.replace("checked","unChecked"),c.style.color=b):(h&&(h.style.backgroundColor=m),c.className=p.replace("unChecked","checked"),c.style.color=e.get("textStyle").fill)}e.emit("itemclick",{item:f,currentTarget:c,checked:"single"===w||f.checked})}}}}e.get("hoverable")&&(x.onmousemove=function(t){var n=t.target,r=n.className;if(!((r=r.split(" ")).indexOf(d)>-1||r.indexOf(g)>-1)){var o=i(n,y),s=o.className,u=a(k,o.getAttribute("data-value"));u&&s.includes("checked")?e.emit("itemhover",{item:u,currentTarget:o,checked:u.checked}):u||e.emit("itemunhover",t)}},x.onmouseout=function(t){e.emit("itemunhover",t)}),e.set("legendWrapper",f)},e.prototype._renderItems=function(){var t=this,e=t.get("items");t.get("reversed")&&e.reverse(),s.each(e,function(e,n){t._addItem(e,n)})},e.prototype._renderBack=function(){var t=this.get("backPadding"),e=this.get("background");this.renderBack(t,e)},e.prototype._formatItemValue=function(t){var e=this.get("itemFormatter");return e&&(t=e.call(this,t)),t},e.prototype._getNextX=function(){var t=this.get("layout"),e=this.get("itemGap"),n=this.get("itemsGroup"),r=this.get("itemWidth"),i=n.get("children"),a=0;return"horizontal"===t&&s.each(i,function(t){a+=(r||t.getBBox().width)+e}),a},e.prototype._getNextY=function(){var t=this.get("itemMarginBottom"),e=this.get("titleShape")?this.get("titleGap"):0,n=this.get("layout"),r=this.get("itemsGroup"),i=this.get("titleShape"),a=r.get("children"),o=e;return i&&(o+=i.getBBox().height),"vertical"===n&&s.each(a,function(e){o+=e.getBBox().height+t}),o},e.prototype._addItem=function(t){var e=this.get("itemsGroup"),n=this._getNextX(),r=this._getNextY(),i=this.get("unCheckColor"),a=e.addGroup({x:n,y:r,value:t.value,checked:t.checked});a.set("viewId",e.get("viewId"));var o=this.get("textStyle"),u=this.get("_wordSpaceing"),c=0;if(t.marker){var l=s.mix({},t.marker,{x:t.marker.radius+n,y:r});t.checked||(l.fill&&(l.fill=i),l.stroke&&(l.stroke=i));var h=a.addShape("marker",{type:"marker",attrs:l});h.attr("cursor","pointer"),h.name="legend-marker",c+=h.getBBox().width+u}var f=s.mix({},o,{x:c+n,y:r,text:this._formatItemValue(t.value)});t.checked||s.mix(f,{fill:i});var p=a.addShape("text",{attrs:f});p.attr("cursor","pointer"),p.name="legend-text",this.get("appendInfo")&&p.setSilent("appendInfo",this.get("appendInfo"));var d=a.getBBox(),g=this.get("itemWidth"),y=a.addShape("rect",{attrs:{x:n,y:r-d.height/2,fill:"#fff",fillOpacity:0,width:g||d.width,height:d.height}});return y.attr("cursor","pointer"),y.setSilent("origin",t),y.name="legend-item",this.get("appendInfo")&&y.setSilent("appendInfo",this.get("appendInfo")),a.name="legendGroup",a},e.prototype._adjustHorizontal=function(){var t=this.get("itemsGroup"),e=t.get("children"),n=this.get("maxLength"),r=this.get("itemGap"),i=this.get("itemMarginBottom"),a=this.get("titleShape")?this.get("titleGap"):0,o=0,u=0,c=void 0,l=void 0,h=void 0,f=this.get("itemWidth");t.getBBox().width>n&&s.each(e,function(t){h=t.getBBox(),c=f||h.width,l=h.height+i,n-ur&&s.each(n,function(t){p=t.getBBox(),h=p.width,f=p.height,c?d=c+i:h>d&&(d=h+i),r-l1&&(t=parseInt(t,10),e=parseInt(e,10)),n.attr("text",this._formatItemValue(t)+""),r.attr("text",this._formatItemValue(e)+""),"color-legend"===this.get("type")&&this.get("attr")){var i=this.get("attr"),a=this.get("minButtonElement"),o=this.get("maxButtonElement");a.attr("fill",i.mapping(t).join("")),o.attr("fill",i.mapping(e).join(""))}},e}(a);t.exports=l},function(t,e,n){"use strict";function r(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function i(t){return Object(a.selection)().transition(t)}e.a=r,e.b=i,e.c=function(){return++S};var a=n(62),o=n(420),s=n(421),u=n(422),c=n(423),l=n(424),h=n(425),f=n(426),p=n(427),d=n(428),g=n(429),y=n(430),v=n(431),m=n(432),x=n(433),b=n(434),w=n(435),_=n(315),S=0,M=a.selection.prototype;r.prototype=i.prototype={constructor:r,select:g.a,selectAll:y.a,filter:h.a,merge:f.a,selection:v.a,transition:w.a,call:M.call,nodes:M.nodes,node:M.node,size:M.size,empty:M.empty,each:M.each,on:p.a,attr:o.a,attrTween:s.a,style:m.a,styleTween:x.a,text:b.a,remove:d.a,tween:_.a,delay:u.a,duration:c.a,ease:l.a}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(209);n.d(e,"easeLinear",function(){return r.a});var i=n(210);n.d(e,"easeQuad",function(){return i.b}),n.d(e,"easeQuadIn",function(){return i.a}),n.d(e,"easeQuadOut",function(){return i.c}),n.d(e,"easeQuadInOut",function(){return i.b});var a=n(211);n.d(e,"easeCubic",function(){return a.b}),n.d(e,"easeCubicIn",function(){return a.a}),n.d(e,"easeCubicOut",function(){return a.c}),n.d(e,"easeCubicInOut",function(){return a.b});var o=n(212);n.d(e,"easePoly",function(){return o.b}),n.d(e,"easePolyIn",function(){return o.a}),n.d(e,"easePolyOut",function(){return o.c}),n.d(e,"easePolyInOut",function(){return o.b});var s=n(213);n.d(e,"easeSin",function(){return s.b}),n.d(e,"easeSinIn",function(){return s.a}),n.d(e,"easeSinOut",function(){return s.c}),n.d(e,"easeSinInOut",function(){return s.b});var u=n(214);n.d(e,"easeExp",function(){return u.b}),n.d(e,"easeExpIn",function(){return u.a}),n.d(e,"easeExpOut",function(){return u.c}),n.d(e,"easeExpInOut",function(){return u.b});var c=n(215);n.d(e,"easeCircle",function(){return c.b}),n.d(e,"easeCircleIn",function(){return c.a}),n.d(e,"easeCircleOut",function(){return c.c}),n.d(e,"easeCircleInOut",function(){return c.b});var l=n(216);n.d(e,"easeBounce",function(){return l.c}),n.d(e,"easeBounceIn",function(){return l.a}),n.d(e,"easeBounceOut",function(){return l.c}),n.d(e,"easeBounceInOut",function(){return l.b});var h=n(217);n.d(e,"easeBack",function(){return h.b}),n.d(e,"easeBackIn",function(){return h.a}),n.d(e,"easeBackOut",function(){return h.c}),n.d(e,"easeBackInOut",function(){return h.b});var f=n(218);n.d(e,"easeElastic",function(){return f.c}),n.d(e,"easeElasticIn",function(){return f.a}),n.d(e,"easeElasticOut",function(){return f.c}),n.d(e,"easeElasticInOut",function(){return f.b})},function(t,e,n){var r=n(69),i=n(5),a=n(115),o=n(140),s=n(2),u=n(18),c=n(0),l={version:s.version,Animate:a,Chart:o,Global:s,Scale:r,Shape:u,Util:c,G:i,DomUtil:i.DomUtil,MatrixUtil:i.MatrixUtil,PathUtil:i.PathUtil};l.track=function(t){s.trackable=t},n(307),"undefined"!=typeof window&&(window.G2?console.warn("There are multiple versions of G2. Version "+l.version+"'s reference is 'window.G2_3'"):window.G2=l),t.exports=l},function(t,e,n){t.exports={getWrapBehavior:n(163),wrapBehavior:n(164)}},function(t,e,n){function r(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=n[0],p=n[1],d=n[2],g=n[3],y=n[4],v=n[5],m=n[6],x=n[7],b=n[8];return t[0]=f*r+p*o+d*c,t[1]=f*i+p*s+d*l,t[2]=f*a+p*u+d*h,t[3]=g*r+y*o+v*c,t[4]=g*i+y*s+v*l,t[5]=g*a+y*u+v*h,t[6]=m*r+x*o+b*c,t[7]=m*i+x*s+b*l,t[8]=m*a+x*u+b*h,t}function i(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t}Object.defineProperty(e,"__esModule",{value:!0}),e.sub=e.mul=void 0,e.create=function(){var t=new a.ARRAY_TYPE(9);return a.ARRAY_TYPE!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t},e.fromMat4=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t},e.clone=function(t){var e=new a.ARRAY_TYPE(9);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e},e.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},e.fromValues=function(t,e,n,r,i,o,s,u,c){var l=new a.ARRAY_TYPE(9);return l[0]=t,l[1]=e,l[2]=n,l[3]=r,l[4]=i,l[5]=o,l[6]=s,l[7]=u,l[8]=c,l},e.set=function(t,e,n,r,i,a,o,s,u,c){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=u,t[8]=c,t},e.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.transpose=function(t,e){if(t===e){var n=e[1],r=e[2],i=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=r,t[7]=i}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t},e.invert=function(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=l*o-s*c,f=-l*a+s*u,p=c*a-o*u,d=n*h+r*f+i*p;return d?(d=1/d,t[0]=h*d,t[1]=(-l*r+i*c)*d,t[2]=(s*r-i*o)*d,t[3]=f*d,t[4]=(l*n-i*u)*d,t[5]=(-s*n+i*a)*d,t[6]=p*d,t[7]=(-c*n+r*u)*d,t[8]=(o*n-r*a)*d,t):null},e.adjoint=function(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],u=e[6],c=e[7],l=e[8];return t[0]=o*l-s*c,t[1]=i*c-r*l,t[2]=r*s-i*o,t[3]=s*u-a*l,t[4]=n*l-i*u,t[5]=i*a-n*s,t[6]=a*c-o*u,t[7]=r*u-n*c,t[8]=n*o-r*a,t},e.determinant=function(t){var e=t[0],n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],u=t[7],c=t[8];return e*(c*a-o*u)+n*(-c*i+o*s)+r*(u*i-a*s)},e.multiply=r,e.translate=function(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=n[0],p=n[1];return t[0]=r,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=u,t[6]=f*r+p*o+c,t[7]=f*i+p*s+l,t[8]=f*a+p*u+h,t},e.rotate=function(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=Math.sin(n),p=Math.cos(n);return t[0]=p*r+f*o,t[1]=p*i+f*s,t[2]=p*a+f*u,t[3]=p*o-f*r,t[4]=p*s-f*i,t[5]=p*u-f*a,t[6]=c,t[7]=l,t[8]=h,t},e.scale=function(t,e,n){var r=n[0],i=n[1];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},e.fromTranslation=function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t},e.fromRotation=function(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=-n,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.fromScaling=function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.fromMat2d=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t},e.fromQuat=function(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=n+n,s=r+r,u=i+i,c=n*o,l=r*o,h=r*s,f=i*o,p=i*s,d=i*u,g=a*o,y=a*s,v=a*u;return t[0]=1-h-d,t[3]=l-v,t[6]=f+y,t[1]=l+v,t[4]=1-c-d,t[7]=p-g,t[2]=f-y,t[5]=p+g,t[8]=1-c-h,t},e.normalFromMat4=function(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=e[9],f=e[10],p=e[11],d=e[12],g=e[13],y=e[14],v=e[15],m=n*s-r*o,x=n*u-i*o,b=n*c-a*o,w=r*u-i*s,_=r*c-a*s,S=i*c-a*u,M=l*g-h*d,A=l*y-f*d,C=l*v-p*d,P=h*y-f*g,k=h*v-p*g,T=f*v-p*y,O=m*T-x*k+b*P+w*C-_*A+S*M;return O?(O=1/O,t[0]=(s*T-u*k+c*P)*O,t[1]=(u*C-o*T-c*A)*O,t[2]=(o*k-s*C+c*M)*O,t[3]=(i*k-r*T-a*P)*O,t[4]=(n*T-i*C+a*A)*O,t[5]=(r*C-n*k-a*M)*O,t[6]=(g*S-y*_+v*w)*O,t[7]=(y*b-d*S-v*x)*O,t[8]=(d*_-g*b+v*m)*O,t):null},e.projection=function(t,e,n){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/n,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},e.str=function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},e.frob=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2)+Math.pow(t[3],2)+Math.pow(t[4],2)+Math.pow(t[5],2)+Math.pow(t[6],2)+Math.pow(t[7],2)+Math.pow(t[8],2))},e.add=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t},e.subtract=i,e.multiplyScalar=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t},e.multiplyScalarAndAdd=function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]},e.equals=function(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],s=t[4],u=t[5],c=t[6],l=t[7],h=t[8],f=e[0],p=e[1],d=e[2],g=e[3],y=e[4],v=e[5],m=e[6],x=e[7],b=e[8];return Math.abs(n-f)<=a.EPSILON*Math.max(1,Math.abs(n),Math.abs(f))&&Math.abs(r-p)<=a.EPSILON*Math.max(1,Math.abs(r),Math.abs(p))&&Math.abs(i-d)<=a.EPSILON*Math.max(1,Math.abs(i),Math.abs(d))&&Math.abs(o-g)<=a.EPSILON*Math.max(1,Math.abs(o),Math.abs(g))&&Math.abs(s-y)<=a.EPSILON*Math.max(1,Math.abs(s),Math.abs(y))&&Math.abs(u-v)<=a.EPSILON*Math.max(1,Math.abs(u),Math.abs(v))&&Math.abs(c-m)<=a.EPSILON*Math.max(1,Math.abs(c),Math.abs(m))&&Math.abs(l-x)<=a.EPSILON*Math.max(1,Math.abs(l),Math.abs(x))&&Math.abs(h-b)<=a.EPSILON*Math.max(1,Math.abs(h),Math.abs(b))};var a=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(45));e.mul=r,e.sub=i},function(t,e,n){function r(){var t=new d.ARRAY_TYPE(3);return d.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function i(t){var e=t[0],n=t[1],r=t[2];return Math.sqrt(e*e+n*n+r*r)}function a(t,e,n){var r=new d.ARRAY_TYPE(3);return r[0]=t,r[1]=e,r[2]=n,r}function o(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function s(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function u(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function c(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return Math.sqrt(n*n+r*r+i*i)}function l(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return n*n+r*r+i*i}function h(t){var e=t[0],n=t[1],r=t[2];return e*e+n*n+r*r}function f(t,e){var n=e[0],r=e[1],i=e[2],a=n*n+r*r+i*i;return a>0&&(a=1/Math.sqrt(a),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a),t}function p(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}Object.defineProperty(e,"__esModule",{value:!0}),e.forEach=e.sqrLen=e.len=e.sqrDist=e.dist=e.div=e.mul=e.sub=void 0,e.create=r,e.clone=function(t){var e=new d.ARRAY_TYPE(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},e.length=i,e.fromValues=a,e.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t},e.set=function(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t},e.add=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t},e.subtract=o,e.multiply=s,e.divide=u,e.ceil=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t},e.floor=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t},e.min=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t},e.max=function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t},e.round=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t},e.scale=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t},e.scaleAndAdd=function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t},e.distance=c,e.squaredDistance=l,e.squaredLength=h,e.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t},e.inverse=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t},e.normalize=f,e.dot=p,e.cross=function(t,e,n){var r=e[0],i=e[1],a=e[2],o=n[0],s=n[1],u=n[2];return t[0]=i*u-a*s,t[1]=a*o-r*u,t[2]=r*s-i*o,t},e.lerp=function(t,e,n,r){var i=e[0],a=e[1],o=e[2];return t[0]=i+r*(n[0]-i),t[1]=a+r*(n[1]-a),t[2]=o+r*(n[2]-o),t},e.hermite=function(t,e,n,r,i,a){var o=a*a,s=o*(2*a-3)+1,u=o*(a-2)+a,c=o*(a-1),l=o*(3-2*a);return t[0]=e[0]*s+n[0]*u+r[0]*c+i[0]*l,t[1]=e[1]*s+n[1]*u+r[1]*c+i[1]*l,t[2]=e[2]*s+n[2]*u+r[2]*c+i[2]*l,t},e.bezier=function(t,e,n,r,i,a){var o=1-a,s=o*o,u=a*a,c=s*o,l=3*a*s,h=3*u*o,f=u*a;return t[0]=e[0]*c+n[0]*l+r[0]*h+i[0]*f,t[1]=e[1]*c+n[1]*l+r[1]*h+i[1]*f,t[2]=e[2]*c+n[2]*l+r[2]*h+i[2]*f,t},e.random=function(t,e){e=e||1;var n=2*d.RANDOM()*Math.PI,r=2*d.RANDOM()-1,i=Math.sqrt(1-r*r)*e;return t[0]=Math.cos(n)*i,t[1]=Math.sin(n)*i,t[2]=r*e,t},e.transformMat4=function(t,e,n){var r=e[0],i=e[1],a=e[2],o=n[3]*r+n[7]*i+n[11]*a+n[15];return o=o||1,t[0]=(n[0]*r+n[4]*i+n[8]*a+n[12])/o,t[1]=(n[1]*r+n[5]*i+n[9]*a+n[13])/o,t[2]=(n[2]*r+n[6]*i+n[10]*a+n[14])/o,t},e.transformMat3=function(t,e,n){var r=e[0],i=e[1],a=e[2];return t[0]=r*n[0]+i*n[3]+a*n[6],t[1]=r*n[1]+i*n[4]+a*n[7],t[2]=r*n[2]+i*n[5]+a*n[8],t},e.transformQuat=function(t,e,n){var r=n[0],i=n[1],a=n[2],o=n[3],s=e[0],u=e[1],c=e[2],l=i*c-a*u,h=a*s-r*c,f=r*u-i*s,p=i*f-a*h,d=a*l-r*f,g=r*h-i*l,y=2*o;return l*=y,h*=y,f*=y,p*=2,d*=2,g*=2,t[0]=s+l+p,t[1]=u+h+d,t[2]=c+f+g,t},e.rotateX=function(t,e,n,r){var i=[],a=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],a[0]=i[0],a[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),a[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),t[0]=a[0]+n[0],t[1]=a[1]+n[1],t[2]=a[2]+n[2],t},e.rotateY=function(t,e,n,r){var i=[],a=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],a[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),a[1]=i[1],a[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),t[0]=a[0]+n[0],t[1]=a[1]+n[1],t[2]=a[2]+n[2],t},e.rotateZ=function(t,e,n,r){var i=[],a=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],a[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),a[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),a[2]=i[2],t[0]=a[0]+n[0],t[1]=a[1]+n[1],t[2]=a[2]+n[2],t},e.angle=function(t,e){var n=a(t[0],t[1],t[2]),r=a(e[0],e[1],e[2]);f(n,n),f(r,r);var i=p(n,r);return i>1?0:i<-1?Math.PI:Math.acos(i)},e.str=function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]},e.equals=function(t,e){var n=t[0],r=t[1],i=t[2],a=e[0],o=e[1],s=e[2];return Math.abs(n-a)<=d.EPSILON*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-o)<=d.EPSILON*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(i-s)<=d.EPSILON*Math.max(1,Math.abs(i),Math.abs(s))};var d=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(45));e.sub=o,e.mul=s,e.div=u,e.dist=c,e.sqrDist=l,e.len=i,e.sqrLen=h,e.forEach=function(){var t=r();return function(e,n,r,i,a,o){var s=void 0,u=void 0;for(n||(n=3),r||(r=0),u=i?Math.min(i*n+r,e.length):e.length,s=r;s0&&(i=1/Math.sqrt(i),t[0]=e[0]*i,t[1]=e[1]*i),t},e.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]},e.cross=function(t,e,n){var r=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=r,t},e.lerp=function(t,e,n,r){var i=e[0],a=e[1];return t[0]=i+r*(n[0]-i),t[1]=a+r*(n[1]-a),t},e.random=function(t,e){e=e||1;var n=2*h.RANDOM()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t},e.transformMat2=function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i,t[1]=n[1]*r+n[3]*i,t},e.transformMat2d=function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i+n[4],t[1]=n[1]*r+n[3]*i+n[5],t},e.transformMat3=function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[3]*i+n[6],t[1]=n[1]*r+n[4]*i+n[7],t},e.transformMat4=function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[4]*i+n[12],t[1]=n[1]*r+n[5]*i+n[13],t},e.rotate=function(t,e,n,r){var i=e[0]-n[0],a=e[1]-n[1],o=Math.sin(r),s=Math.cos(r);return t[0]=i*s-a*o+n[0],t[1]=i*o+a*s+n[1],t},e.angle=function(t,e){var n=t[0],r=t[1],i=e[0],a=e[1],o=n*n+r*r;o>0&&(o=1/Math.sqrt(o));var s=i*i+a*a;s>0&&(s=1/Math.sqrt(s));var u=(n*i+r*a)*o*s;return u>1?0:u<-1?Math.PI:Math.acos(u)},e.str=function(t){return"vec2("+t[0]+", "+t[1]+")"},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]},e.equals=function(t,e){var n=t[0],r=t[1],i=e[0],a=e[1];return Math.abs(n-i)<=h.EPSILON*Math.max(1,Math.abs(n),Math.abs(i))&&Math.abs(r-a)<=h.EPSILON*Math.max(1,Math.abs(r),Math.abs(a))};var h=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(45));e.len=c,e.sub=i,e.mul=a,e.div=o,e.dist=s,e.sqrDist=u,e.sqrLen=l,e.forEach=function(){var t=r();return function(e,n,r,i,a,o){var s=void 0,u=void 0;for(n||(n=2),r||(r=0),u=i?Math.min(i*n+r,e.length):e.length,s=r;s');t.appendChild(a),this.set("wrapperEl",a),this.get("forceFit")&&(n=s.getWidth(t,n),this.set("width",n));var u=new o({containerDOM:a,width:n,height:r,pixelRatio:this.get("pixelRatio"),renderer:this.get("renderer")});this.set("canvas",u)},e.prototype._initPlot=function(){this._initPlotBack();var t=this.get("canvas"),e=t.addGroup({zIndex:1}),n=t.addGroup({zIndex:2}),r=t.addGroup({zIndex:3});this.set("backPlot",e),this.set("middlePlot",n),this.set("frontPlot",r)},e.prototype._initPlotBack=function(){var t=this.get("canvas"),e=this.get("viewTheme"),n=t.addGroup(c,{padding:this.get("padding"),plotBackground:i.mix({},e.plotBackground,this.get("plotBackground")),background:i.mix({},e.background,this.get("background"))});this.set("plot",n),this.set("plotRange",n.get("plotRange"))},e.prototype._initEvents=function(){this.get("forceFit")&&window.addEventListener("resize",i.wrapBehavior(this,"_initForceFitEvent"))},e.prototype._initForceFitEvent=function(){var t=setTimeout(i.wrapBehavior(this,"forceFit"),200);clearTimeout(this.get("resizeTimer")),this.set("resizeTimer",t)},e.prototype._renderLegends=function(){var t=this.get("options").legends;if(i.isNil(t)||!1!==t){var e=this.get("legendController");if(e.options=t||{},e.plotRange=this.get("plotRange"),t&&t.custom)e.addCustomLegend();else{var n=this.getAllGeoms(),r=[];i.each(n,function(t){var n=t.get("view"),a=t.getAttrsForLegend();i.each(a,function(a){var o=a.type,s=a.getScale(o);if(s.field&&"identity"!==s.type&&!function(t,e){var n=!1;return i.each(t,function(t){var r=[].concat(t.values),i=[].concat(e.values);t.type!==e.type||t.field!==e.field||r.sort().toString()!==i.sort().toString()||(n=!0)}),n}(r,s)){r.push(s);var u=n.getFilteredOutValues(s.field);e.addLegend(s,a,t,u)}})});var a=this.getYScales();0===r.length&&a.length>1&&e.addMixedLegend(a,n)}e.alignLegends()}},e.prototype._renderTooltips=function(){var t=this.get("options");if(i.isNil(t.tooltip)||!1!==t.tooltip){var e=this.get("tooltipController");e.options=t.tooltip||{},e.renderTooltip()}},e.prototype.getAllGeoms=function(){var t=[];t=t.concat(this.get("geoms"));var e=this.get("views");return i.each(e,function(e){t=t.concat(e.get("geoms"))}),t},e.prototype.forceFit=function(){if(this&&!this.destroyed){var t=this.get("container"),e=this.get("width"),n=s.getWidth(t,e);if(0!==n&&n!==e){var r=this.get("height");this.changeSize(n,r)}return this}},e.prototype.resetPlot=function(){var t=this.get("plot"),e=this.get("padding");r(e,t.get("padding"))||(t.set("padding",e),t.repaint())},e.prototype.changeSize=function(t,e){this.get("canvas").changeSize(t,e);var n=this.get("plot");return this.set("width",t),this.set("height",e),n.repaint(),this.set("keepPadding",!0),this.repaint(),this.set("keepPadding",!1),this.emit("afterchangesize"),this},e.prototype.changeWidth=function(t){return this.changeSize(t,this.get("height"))},e.prototype.changeHeight=function(t){return this.changeSize(this.get("width"),t)},e.prototype.view=function(t){(t=t||{}).theme=this.get("theme"),t.parent=this,t.backPlot=this.get("backPlot"),t.middlePlot=this.get("middlePlot"),t.frontPlot=this.get("frontPlot"),t.canvas=this.get("canvas"),i.isNil(t.animate)&&(t.animate=this.get("animate")),t.options=i.mix({},this._getSharedOptions(),t.options);var e=new a(t);return e.set("_id","view"+this.get("views").length),this.get("views").push(e),this.emit("addview",{view:e}),e},e.prototype.removeView=function(t){var e=this.get("views");i.Array.remove(e,t),t.destroy()},e.prototype._getSharedOptions=function(){var t=this.get("options"),e={};return i.each(["scales","coord","axes"],function(n){e[n]=i.cloneDeep(t[n])}),e},e.prototype.getViewRegion=function(){var t=this.get("plotRange");return{start:t.bl,end:t.tr}},e.prototype.legend=function(t,e){var n=this.get("options");n.legends||(n.legends={});var r={};return!1===t?n.legends=!1:i.isObject(t)?r=t:i.isString(t)?r[t]=e:r=e,i.mix(n.legends,r),this},e.prototype.tooltip=function(t,e){var n=this.get("options");return n.tooltip||(n.tooltip={}),!1===t?n.tooltip=!1:i.isObject(t)?i.mix(n.tooltip,t):i.mix(n.tooltip,e),this},e.prototype.clear=function(){this.emit("beforeclear");for(var e=this.get("views");e.length>0;){e.shift().destroy()}t.prototype.clear.call(this);var n=this.get("canvas");return this.resetPlot(),n.draw(),this.emit("afterclear"),this},e.prototype.clearInner=function(){var e=this.get("views");i.each(e,function(t){t.clearInner()});var n=this.get("tooltipController");if(n&&n.clear(),!this.get("keepLegend")){var r=this.get("legendController");r&&r.clear()}t.prototype.clearInner.call(this)},e.prototype.drawComponents=function(){t.prototype.drawComponents.call(this),this.get("keepLegend")||this._renderLegends()},e.prototype.render=function(){if(!this.get("keepPadding")&&this._isAutoPadding()){this.beforeRender(),this.drawComponents();var e=this._getAutoPadding(),n=this.get("plot");r(n.get("padding"),e)||(n.set("padding",e),n.repaint())}t.prototype.render.call(this),this._renderTooltips()},e.prototype.repaint=function(){this.get("keepPadding")||this.resetPlot(),t.prototype.repaint.call(this)},e.prototype.changeVisible=function(t){var e=this.get("wrapperEl"),n=t?"":"none";e.style.display=n},e.prototype.toDataURL=function(){var t=this.get("canvas"),e=this.get("renderer"),n=t.get("el"),r="";if("svg"===e){var i=n.cloneNode(!0),a=document.implementation.createDocumentType("svg","-//W3C//DTD SVG 1.1//EN","http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"),o=document.implementation.createDocument("http://www.w3.org/2000/svg","svg",a);o.replaceChild(i,o.documentElement);var s=(new XMLSerializer).serializeToString(o);r="data:image/svg+xml;charset=utf8,"+encodeURIComponent(s)}else"canvas"===e&&(r=n.toDataURL("image/png"));return r},e.prototype.downloadImage=function(t){var e=this,n=document.createElement("a"),r=e.get("renderer"),i=(t||"chart")+("svg"===r?".svg":".png");e.get("canvas").get("timeline").stopAllAnimations(),setTimeout(function(){var t=e.toDataURL();if(window.Blob&&window.URL&&"svg"!==r){for(var a=t.split(","),o=a[0].match(/:(.*?);/)[1],s=atob(a[1]),u=s.length,c=new Uint8Array(u);u--;)c[u]=s.charCodeAt(u);var l=new Blob([c],{type:o});window.navigator.msSaveBlob?window.navigator.msSaveBlob(l,i):n.addEventListener("click",function(){n.download=i,n.href=window.URL.createObjectURL(l)})}else n.addEventListener("click",function(){n.download=i,n.href=t});var h=document.createEvent("MouseEvents");h.initEvent("click",!1,!1),n.dispatchEvent(h)},16)},e.prototype.showTooltip=function(t){var e=this.getViewsByPoint(t);if(e.length){this.get("tooltipController").showTooltip(t,e)}return this},e.prototype.hideTooltip=function(){return this.get("tooltipController").hideTooltip(),this},e.prototype.getTooltipItems=function(t){var e=this.getViewsByPoint(t),n=[];return i.each(e,function(e){var r=e.get("geoms");i.each(r,function(e){var r=e.get("dataArray"),a=[];i.each(r,function(n){var r=e.findPoint(t,n);if(r){var i=e.getTipItems(r);a=a.concat(i)}}),n=n.concat(a)})}),n},e.prototype.destroy=function(){this.emit("beforedestroy"),clearTimeout(this.get("resizeTimer"));var e=this.get("canvas"),n=this.get("wrapperEl");n.parentNode.removeChild(n),t.prototype.destroy.call(this),e.destroy(),window.removeEventListener("resize",i.getWrapBehavior(this,"_initForceFitEvent")),this.emit("afterdestroy")},e}(a);t.exports=h},function(t,e,n){function r(t,e,n){var r=(t-e)/(n-e);return r>=0&&r<=1}function i(t,e){var n=!1;if(t){if("theta"===t.type){var i=t.start,a=t.end;n=r(e.x,i.x,a.x)&&r(e.y,i.y,a.y)}else{var o=t.invert(e);n=o.x>=0&&o.y>=0&&o.x<=1&&o.y<=1}}return n}var a=n(55),o=n(21),s=n(0),u=n(127),c=n(2),l=n(121),h=n(305),f={};s.each(o,function(t,e){var n=s.lowerFirst(e);f[n]=function(e){var n=new t(e);return this.addGeom(n),n}});var p=function(t){function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,n)),i=r;return i._setTheme(),s.each(o,function(t,e){var n=s.lowerFirst(e);i[n]=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.viewTheme=i.get("viewTheme");var n=new t(e);return i.addGeom(n),n}}),i.init(),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){return{viewContainer:null,coord:null,start:{x:0,y:0},end:{x:1,y:1},geoms:[],scales:{},options:{},scaleController:null,padding:0,theme:null,parent:null,tooltipEnable:!0,animate:c.animate,visible:!0}},e.prototype._setTheme=function(){var t=this.get("theme"),e={},n={};s.isObject(t)?n=t:-1!==s.indexOf(Object.keys(l),t)&&(n=l[t]),s.deepMix(e,c,n),this.set("viewTheme",e)},e.prototype.init=function(){this._initViewPlot(),this.get("data")&&this._initData(this.get("data")),this._initOptions(),this._initControllers(),this._bindEvents()},e.prototype._initOptions=function(){var t=this,e=s.mix({},t.get("options"));e.scales||(e.scales={}),e.coord||(e.coord={}),!1===e.animate&&this.set("animate",!1),(!1===e.tooltip||s.isNull(e.tooltip))&&this.set("tooltipEnable",!1),e.geoms&&e.geoms.length&&s.each(e.geoms,function(e){t._createGeom(e)});var n=t.get("scaleController");n&&(n.defs=e.scales);var r=t.get("coordController");r&&r.reset(e.coord),this.set("options",e)},e.prototype._createGeom=function(t){var e=t.type,n=void 0;this[e]&&(n=this[e](),s.each(t,function(t,e){if(n[e])if(s.isObject(t)&&t.field)if("label"===t)n[e](t.field,t.callback,t.cfg);else{var r=void 0;s.each(t,function(t,e){"field"!==e&&(r=t)}),n[e](t.field,r)}else n[e](t)}))},e.prototype._initControllers=function(){var t=this.get("options"),e=this.get("viewTheme"),n=new u.Scale({viewTheme:e,defs:t.scales}),r=new u.Coord(t.coord);this.set("scaleController",n),this.set("coordController",r);var i=new u.Axis({viewTheme:e});this.set("axisController",i);var a=new u.Guide({viewTheme:e,options:t.guides||[]});this.set("guideController",a)},e.prototype._initViewPlot=function(){this.get("viewContainer")||this.set("viewContainer",this.get("middlePlot"))},e.prototype._initGeoms=function(){for(var t=this.get("geoms"),e=this.get("filteredData"),n=this.get("coord"),r=this.get("_id"),i=0;i0;){t.shift().destroy()}},e.prototype._drawGeoms=function(){for(var t=this.get("geoms"),e=this.get("coord"),n=0;n0?i.change({min:0}):s<=0&&i.change({max:0}))}}},e.prototype._setCatScalesRange=function(){var t=this.get("coord"),e=this.get("viewTheme"),n=this.getXScale(),r=this.getYScales(),i=[];n&&i.push(n),i=i.concat(r);var a=t.isPolar&&function(t){var e=t.startAngle,n=t.endAngle;return!(!s.isNil(e)&&!s.isNil(n)&&n-e<2*Math.PI)}(t),o=this.get("scaleController").defs;s.each(i,function(n){if((n.isCategory||n.isIdentity)&&n.values&&(!o[n.field]||!o[n.field].range)){var r=n.values.length,i=void 0;if(1===r)i=[.5,1];else{var s=0;i=a?t.isTransposed?[(s=1/r*e.widthRatio.multiplePie)/2,1-s/2]:[0,1-1/r]:[s=1/r*1/2,1-s]}n.range=i}})},e.prototype.getXScale=function(){var t=this.get("geoms"),e=null;return s.isEmpty(t)||(e=t[0].getXScale()),e},e.prototype.getYScales=function(){for(var t=this.get("geoms"),e=[],n=0;n0?e=0:n=0,n-e<5&&!u&&n-e>=1&&(u=1)),r(u)){var x=(n-e)/(y-1);u=a.snapFactorTo(x,m,"ceil"),f!==h&&((v=parseInt((n-e)/u,10))>f&&(v=f),ve&&(M-=u),n=a.fixedBase(S,u),e=a.fixedBase(M,u)}n=Math.min(n,g),e=Math.max(e,d),l.push(e);for(var A=1;An?(s=i,i=n):s>n&&(s=n),u1&&(e.minTickInterval=s-i),(o(e.min)||e._toTimeStamp(e.min)>i)&&(e.min=i),(o(e.max)||e._toTimeStamp(e.max)d&&(d=e);var x=d/m,b=r(f);if(x>.51){for(var w=Math.ceil(x),_=r(p),S=b;S<=_+w;S+=w)n.push(i(S));d=null}else if(x>.0834){for(var M=Math.ceil(x/.0834),A=a(f),C=function(t,e){var n=r(t),i=r(e),o=a(t);return 12*(i-n)+(a(e)-o)%12}(f,p),P=0;P<=C+M;P+=M)n.push(o(b,P+A));d=null}else if(d>.5*v){var k=new Date(f),T=k.getFullYear(),O=k.getMonth(f),I=k.getDate(),E=Math.ceil(d/v),L=function(t,e){return Math.ceil((e-t)/h)}(f,p);d=E*v;for(var D=0;Dl){var j=new Date(f),F=j.getFullYear(),R=j.getMonth(f),B=j.getDate(),N=j.getHours(),Y=s.snapTo(c,Math.ceil(d/l)),z=function(t,e){return Math.ceil((e-t)/l)}(f,p);d=Y*l;for(var X=0;X<=z+Y;X+=Y)n.push(new Date(F,R,B,N+X).getTime())}else if(d>6e4){var V=function(t,e){return Math.ceil((e-t)/6e4)}(f,p),W=Math.ceil(d/6e4);d=6e4*W;for(var H=0;H<=V+W;H+=W)n.push(f+6e4*H)}else{d<1e3&&(d=1e3),f=1e3*Math.floor(f/1e3);var q=Math.ceil((p-f)/1e3),G=Math.ceil(d/1e3);d=1e3*G;for(var U=0;U-1?r/(this.values.length-1):0,e+i*(n-e)},e.prototype.getText=function(t){var e="",n=this.translate(t);e=n>-1?this.values[n]:t;var r=this.formatter;return e=parseInt(e,10),e=r?r(e):o.format(e,this.mask)},e.prototype.getTicks=function(){var t=this,e=this.ticks,n=[];return c(e,function(e){var r=void 0;r=h(e)?e:{text:f(e)?e:t.getText(e),value:t.scale(e),tickValue:e},n.push(r)}),n},e.prototype._toTimeStamp=function(t){return u.toTimeStamp(t)},e}(a);i.TimeCat=p,t.exports=p},function(t,e,n){function r(t,e){return 1===t?1:Math.log(e)/Math.log(t)}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},a=n(3),o=n(13),s=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":i(e))&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":i(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype._initDefaultCfg=function(){t.prototype._initDefaultCfg.call(this),this.type="log",this.tickCount=10,this.base=2,this._minTick=null},e.prototype.calculateTicks=function(){var t=this.base,e=void 0;if(this.min<0)throw new Error("The minimum value must be greater than zero!");var n=r(t,this.max);if(this.min>0)e=Math.floor(r(t,this.min));else{var i=this.values,o=this.max;a(i,function(t){t>0&&t1&&(o=1),e=Math.floor(r(t,o)),this._minTick=e,this.positiveMin=o}for(var s=n-e,u=this.tickCount,c=Math.ceil(s/u),l=[],h=e;h=0?Math.floor(r(t,this.min)):0)>n){var i=n;n=e,e=i}for(var a=n-e,o=this.tickCount,s=Math.ceil(a/o),u=[],c=e;c-1;)r.call(t,s,1);return t}},function(t,e,n){var r=n(7),i=n(33),a=n(3);t.exports=function(t,e,n){if(!r(t)&&!i(t))return t;var o=n;return a(t,function(t,n){o=e(o,t,n)}),o}},function(t,e,n){var r=n(11),i=n(79);t.exports=function(t,e){var n=[];if(!r(t))return n;for(var a=-1,o=[],s=t.length;++an?n:t}},function(t,e){t.exports=function(t,e){var n=e.toString(),r=n.indexOf(".");if(-1===r)return Math.round(t);var i=n.substr(r+1).length;return i>20&&(i=20),parseFloat(t.toFixed(i))}},function(t,e,n){var r=n(9);t.exports=function(t){return r(t)&&t%1!=0}},function(t,e,n){var r=n(9);t.exports=function(t){return r(t)&&t%2==0}},function(t,e,n){var r=n(9),i=Number.isInteger?Number.isInteger:function(t){return r(t)&&t%1==0};t.exports=i},function(t,e,n){var r=n(9);t.exports=function(t){return r(t)&&t<0}},function(t,e){t.exports=function(t,e){return Math.abs(t-e)<1e-5}},function(t,e,n){var r=n(9);t.exports=function(t){return r(t)&&t%2!=0}},function(t,e,n){var r=n(9);t.exports=function(t){return r(t)&&t>0}},function(t,e,n){var r=n(7),i=n(15),a=n(3);t.exports=function(t,e){if(r(t)){var n=t[0],o=void 0;o=i(e)?e(t[0]):t[0][e];var s=void 0;return a(t,function(t){(s=i(e)?e(t):t[e])>o&&(n=t,o=s)}),n}}},function(t,e,n){var r=n(7),i=n(15),a=n(3);t.exports=function(t,e){if(r(t)){var n=t[0],o=void 0;o=i(e)?e(t[0]):t[0][e];var s=void 0;return a(t,function(t){(s=i(e)?e(t):t[e])2*Math.PI&&(t=t/180*Math.PI),this.transform([["t",-e,-n],["r",t],["t",e,n]])},move:function(t,e){var n=this.get("x")||0,r=this.get("y")||0;return this.translate(t-n,e-r),this.set("x",t),this.set("y",e),this},transform:function(t){var e=this,n=this._attrs.matrix;return o.each(t,function(t){switch(t[0]){case"t":e.translate(t[1],t[2]);break;case"s":e.scale(t[1],t[2]);break;case"r":e.rotate(t[1]);break;case"m":e.attr("matrix",s.multiply([],n,t[1])),e.clearTotalMatrix()}}),e},setTransform:function(t){return this.attr("matrix",[1,0,0,0,1,0,0,0,1]),this.transform(t)},getMatrix:function(){return this.attr("matrix")},setMatrix:function(t){return this.attr("matrix",t),this.clearTotalMatrix(),this},apply:function(t,e){var n=void 0;return n=e?this._getMatrixByRoot(e):this.attr("matrix"),u.transformMat3(t,t,n),this},_getMatrixByRoot:function(t){t=t||this;for(var e=this,n=[];e!==t;)n.unshift(e),e=e.get("parent");n.unshift(e);var r=[1,0,0,0,1,0,0,0,1];return o.each(n,function(t){s.multiply(r,t.attr("matrix"),r)}),r},getTotalMatrix:function(){var t=this._cfg.totalMatrix;if(!t){t=[1,0,0,0,1,0,0,0,1];var e=this._cfg.parent;if(e){a(t,e.getTotalMatrix())}a(t,this.attr("matrix")),this._cfg.totalMatrix=t}return t},clearTotalMatrix:function(){},invert:function(t){var e=this.getTotalMatrix();if(i(e))t[0]/=e[0],t[1]/=e[4];else{var n=s.invert([],e);n&&u.transformMat3(t,t,n)}return this},resetTransform:function(t){var e=this.attr("matrix");r(e)||t.transform(e[0],e[1],e[3],e[4],e[6],e[7])}}},function(t,e,n){var r=n(1),i=n(6),a={delay:"delay",rotate:"rotate"};t.exports={animate:function(t,e,n,o){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;this.set("animating",!0);var u=this.get("timeline");u||(u=this.get("canvas").get("timeline"),this.setSilent("timeline",u));var c=this.get("animators")||[];u._timer||u.initTimer(),r.isNumber(o)&&(s=o,o=null),r.isFunction(n)?(o=n,n="easeLinear"):n=n||"easeLinear";var l=function(t,e){var n={matrix:null,attrs:{}},r=e._attrs;for(var o in t)"transform"===o?n.matrix=i.transform(e.getMatrix(),t[o]):"rotate"===o?n.matrix=i.transform(e.getMatrix(),[["r",t[o]]]):"matrix"===o?n.matrix=t[o]:a[o]||r[o]===t[o]||(n.attrs[o]=t[o]);return n}(t,this),h={fromAttrs:function(t,e){var n={},r=e._attrs;for(var i in t.attrs)n[i]=r[i];return n}(l,this),toAttrs:l.attrs,fromMatrix:r.clone(this.getMatrix()),toMatrix:l.matrix,duration:e,easing:n,callback:o,delay:s,startTime:u.getTime(),id:r.uniqueId()};c.length>0?c=function(t,e){var n=Object.prototype.hasOwnProperty;return r.each(e.toAttrs,function(e,i){r.each(t,function(t){n.call(t.toAttrs,i)&&(delete t.toAttrs[i],delete t.fromAttrs[i])})}),t}(c,h):u.addAnimator(this),c.push(h),this.setSilent("animators",c),this.setSilent("pause",{isPaused:!1})},stopAnimate:function(){var t=this,e=this.get("animators");r.each(e,function(e){t.attr(e.toAttrs),e.toMatrix&&t.attr("matrix",e.toMatrix),e.callback&&e.callback()}),this.setSilent("animating",!1),this.setSilent("animators",[])},pauseAnimate:function(){var t=this.get("timeline");return this.setSilent("pause",{isPaused:!0,pauseTime:t.getTime()}),this},resumeAnimate:function(){var t=this.get("timeline").getTime(),e=this.get("animators"),n=this.get("pause").pauseTime;return r.each(e,function(e){e.startTime=e.startTime+(t-n),e._paused=!1,e._pauseTime=null}),this.setSilent("pause",{isPaused:!1}),this.setSilent("animators",e),this}}},function(t,e,n){var r=n(4);r.Arc=n(94),r.Circle=n(95),r.Dom=n(96),r.Ellipse=n(97),r.Fan=n(98),r.Image=n(99),r.Line=n(100),r.Marker=n(48),r.Path=n(101),r.Polygon=n(102),r.Polyline=n(103),r.Rect=n(104),r.Text=n(105),t.exports=r},function(t,e,n){function r(t,e,n){return n.createPath(l),l.isPointInPath(t,e)}var i=n(1),a=n(46),o=n(6).mat3,s=n(6).vec2,u=n(6).vec3,c={arc:n(35),ellipse:n(93),line:n(34)},l=i.createDom('').getContext("2d"),h={arc:function(t,e){var n=this._attrs,r=n.x,i=n.y,o=n.r,s=n.startAngle,u=n.endAngle,c=n.clockwise,l=this.getHitLineWidth();return!!this.hasStroke()&&a.arcline(r,i,o,s,u,c,l,t,e)},circle:function(t,e){var n=this._attrs,r=n.x,i=n.y,o=n.r,s=this.getHitLineWidth(),u=this.hasFill(),c=this.hasStroke();return u&&c?a.circle(r,i,o,t,e)||a.arcline(r,i,o,0,2*Math.PI,!1,s,t,e):u?a.circle(r,i,o,t,e):!!c&&a.arcline(r,i,o,0,2*Math.PI,!1,s,t,e)},dom:function(t,e){var n=this._cfg.el.getBBox();return a.box(n.x,n.x+n.width,n.y,n.y+n.height,t,e)},ellipse:function(t,e){var n=this._attrs,r=this.hasFill(),i=this.hasStroke(),s=n.x,c=n.y,l=n.rx,h=n.ry,f=this.getHitLineWidth(),p=l>h?l:h,d=l>h?1:l/h,g=l>h?h/l:1,y=[t,e,1],v=[1,0,0,0,1,0,0,0,1];o.scale(v,v,[d,g]),o.translate(v,v,[s,c]);var m=o.invert([],v);return u.transformMat3(y,y,m),r&&i?a.circle(0,0,p,y[0],y[1])||a.arcline(0,0,p,0,2*Math.PI,!1,f,y[0],y[1]):r?a.circle(0,0,p,y[0],y[1]):!!i&&a.arcline(0,0,p,0,2*Math.PI,!1,f,y[0],y[1])},fan:function(t,e){function n(){var t=c.arc.nearAngle(b,y,v,m);if(i.isNumberEqual(b,t)){var e=s.squaredLength(x);if(d*d<=e&&e<=g*g)return!0}return!1}function r(){var n=o.getHitLineWidth(),r={x:Math.cos(y)*d+f,y:Math.sin(y)*d+p},i={x:Math.cos(y)*g+f,y:Math.sin(y)*g+p},s={x:Math.cos(v)*d+f,y:Math.sin(v)*d+p},u={x:Math.cos(v)*g+f,y:Math.sin(v)*g+p};return!!(a.line(r.x,r.y,i.x,i.y,n,t,e)||a.line(s.x,s.y,u.x,u.y,n,t,e)||a.arcline(f,p,d,y,v,m,n,t,e)||a.arcline(f,p,g,y,v,m,n,t,e))}var o=this,u=o.hasFill(),l=o.hasStroke(),h=o._attrs,f=h.x,p=h.y,d=h.rs,g=h.re,y=h.startAngle,v=h.endAngle,m=h.clockwise,x=[t-f,e-p],b=s.angleTo([1,0],x);return u&&l?n()||r():u?n():!!l&&r()},image:function(t,e){var n=this._attrs;if(this.get("toDraw")||!n.img)return!1;this._cfg.attrs&&this._cfg.attrs.img===n.img||this._setAttrImg();var r=n.x,i=n.y,o=n.width,s=n.height;return a.rect(r,i,o,s,t,e)},line:function(t,e){var n=this._attrs,r=n.x1,i=n.y1,o=n.x2,s=n.y2,u=this.getHitLineWidth();return!!this.hasStroke()&&a.line(r,i,o,s,u,t,e)},path:function(t,e){function n(){if(!i.isEmpty(o)){for(var n=a.getHitLineWidth(),r=0,s=o.length;r=3&&o.push(n[0]),a.polyline(o,r,t,e)}var i=this,o=i.hasFill(),s=i.hasStroke();return o&&s?r(t,e,i)||n():o?r(t,e,i):!!s&&n()},polyline:function(t,e){var n=this._attrs;if(this.hasStroke()){var r=n.points;if(r.length<2)return!1;var i=n.lineWidth;return a.polyline(r,i,t,e)}return!1},rect:function(t,e){function n(){var n=i._attrs,r=n.x,o=n.y,s=n.width,u=n.height,c=n.radius,l=i.getHitLineWidth();if(0===c){var h=l/2;return a.line(r-h,o,r+s+h,o,l,t,e)||a.line(r+s,o-h,r+s,o+u+h,l,t,e)||a.line(r+s+h,o+u,r-h,o+u,l,t,e)||a.line(r,o+u+h,r,o-h,l,t,e)}return a.line(r+c,o,r+s-c,o,l,t,e)||a.line(r+s,o+c,r+s,o+u-c,l,t,e)||a.line(r+s-c,o+u,r+c,o+u,l,t,e)||a.line(r,o+u-c,r,o+c,l,t,e)||a.arcline(r+s-c,o+c,c,1.5*Math.PI,2*Math.PI,!1,l,t,e)||a.arcline(r+s-c,o+u-c,c,0,.5*Math.PI,!1,l,t,e)||a.arcline(r+c,o+u-c,c,.5*Math.PI,Math.PI,!1,l,t,e)||a.arcline(r+c,o+c,c,Math.PI,1.5*Math.PI,!1,l,t,e)}var i=this,o=i.hasFill(),s=i.hasStroke();return o&&s?r(t,e,i)||n():o?r(t,e,i):!!s&&n()},text:function(t,e){var n=this.getBBox();if(this.hasFill()||this.hasStroke())return a.box(n.minX,n.maxX,n.minY,n.maxY,t,e)}};t.exports={isPointInPath:function(t,e){var n=h[this.type];return!!n&&n.call(this,t,e)}}},function(t,e,n){function r(t,e,n){var r=e.startTime;if(nd.length?(p=a.parsePathString(o[f]),d=a.parsePathString(s[f]),d=a.fillPathByDiff(d,p),d=a.formatPath(d,p),e.fromAttrs.path=d,e.toAttrs.path=p):e.pathFormatted||(p=a.parsePathString(o[f]),d=a.parsePathString(s[f]),d=a.formatPath(d,p),e.fromAttrs.path=d,e.toAttrs.path=p,e.pathFormatted=!0),r[f]=[];for(var g=0;g0){for(var u=t._animators.length-1;u>=0;u--)if((i=t._animators[u]).get("destroyed"))e.removeAnimator(u);else{if(!i.get("pause").isPaused)for(var c=(a=i.get("animators")).length-1;c>=0;c--)s=a[c],(n=r(i,s,o))&&(a.splice(c,1),n=!1,s.callback&&s.callback());0===a.length&&e.removeAnimator(u)}t.canvas.draw()}})},addAnimator:function(t){this._animators.push(t)},removeAnimator:function(t){this._animators.splice(t,1)},isAnimating:function(){return!!this._animators.length},stop:function(){this._timer&&this._timer.stop()},stopAllAnimations:function(){this._animators.forEach(function(t){t.stopAnimate()}),this._animators=[],this.canvas.draw()},getTime:function(){return this._current}}),t.exports=h},function(t,e,n){"use strict";var r=n(50);e.a=function(t,e,n){var i=new r.a;return e=null==e?0:+e,i.restart(function(n){i.stop(),t(n+e)},e,n),i}},function(t,e,n){"use strict";var r=n(50);e.a=function(t,e,n){var i=new r.a,a=e;return null==e?(i.restart(t,e,n),i):(e=+e,n=null==n?Object(r.b)():+n,i.restart(function r(o){o+=a,i.restart(r,a+=e,n),t(o)},e,n),i)}},function(t,e,n){"use strict";e.a=function(t){return+t}},function(t,e,n){"use strict";e.a=function(t){return t*t},e.c=function(t){return t*(2-t)},e.b=function(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}},function(t,e,n){"use strict";e.a=function(t){return t*t*t},e.c=function(t){return--t*t*t+1},e.b=function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}},function(t,e,n){"use strict";n.d(e,"a",function(){return r}),n.d(e,"c",function(){return i}),n.d(e,"b",function(){return a});var r=function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n}(3),i=function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(3),a=function t(e){function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,n.exponent=t,n}(3)},function(t,e,n){"use strict";e.a=function(t){return 1-Math.cos(t*i)},e.c=function(t){return Math.sin(t*i)},e.b=function(t){return(1-Math.cos(r*t))/2};var r=Math.PI,i=r/2},function(t,e,n){"use strict";e.a=function(t){return Math.pow(2,10*t-10)},e.c=function(t){return 1-Math.pow(2,-10*t)},e.b=function(t){return((t*=2)<=1?Math.pow(2,10*t-10):2-Math.pow(2,10-10*t))/2}},function(t,e,n){"use strict";e.a=function(t){return 1-Math.sqrt(1-t*t)},e.c=function(t){return Math.sqrt(1- --t*t)},e.b=function(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}},function(t,e,n){"use strict";function r(t){return(t=+t)w?Math.pow(t,1/3):t/b+m}function s(t){return t>x?t*t*t:b*(t-m)}function u(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function c(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function l(t,e,n,i){return 1===arguments.length?function(t){if(t instanceof h)return new h(t.h,t.c,t.l,t.opacity);t instanceof a||(t=r(t));var e=Math.atan2(t.b,t.a)*d.b;return new h(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}(t):new h(t,e,n,null==i?1:i)}function h(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}e.a=i,e.b=l;var f=n(53),p=n(52),d=n(107),g=.95047,y=1,v=1.08883,m=4/29,x=6/29,b=3*x*x,w=x*x*x;Object(f.a)(a,i,Object(f.b)(p.a,{brighter:function(t){return new a(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new a(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return t=y*s(t),e=g*s(e),n=v*s(n),new p.b(u(3.2404542*e-1.5371385*t-.4985314*n),u(-.969266*e+1.8760108*t+.041556*n),u(.0556434*e-.2040259*t+1.0572252*n),this.opacity)}})),Object(f.a)(h,l,Object(f.b)(p.a,{brighter:function(t){return new h(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new h(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return r(this).rgb()}}))},function(t,e,n){"use strict";function r(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof i)return new i(t.h,t.s,t.l,t.opacity);t instanceof o.b||(t=Object(o.h)(t));var e=t.r/255,n=t.g/255,r=t.b/255,a=(g*r+p*e-d*n)/(g+p-d),u=r-a,c=(f*(n-a)-l*u)/h,y=Math.sqrt(c*c+u*u)/(f*a*(1-a)),v=y?Math.atan2(c,u)*s.b-120:NaN;return new i(v<0?v+360:v,y,a,t.opacity)}(t):new i(t,e,n,null==r?1:r)}function i(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}e.a=r;var a=n(53),o=n(52),s=n(107),u=-.14861,c=1.78277,l=-.29227,h=-.90649,f=1.97294,p=f*h,d=f*c,g=c*l-h*u;Object(a.a)(i,r,Object(a.b)(o.a,{brighter:function(t){return t=null==t?o.c:Math.pow(o.c,t),new i(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?o.d:Math.pow(o.d,t),new i(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*s.a,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new o.b(255*(e+n*(u*r+c*i)),255*(e+n*(l*r+h*i)),255*(e+n*(f*r)),this.opacity)}}))},function(t,e,n){"use strict";e.a=function(t,e){return t=+t,e-=t,function(n){return Math.round(t+e*n)}}},function(t,e,n){"use strict";function r(t,e,n,r){function a(t){return t.length?t.pop()+" ":""}return function(o,s){var u=[],c=[];return o=t(o),s=t(s),function(t,r,a,o,s,u){if(t!==a||r!==o){var c=s.push("translate(",null,e,null,n);u.push({i:c-4,x:Object(i.a)(t,a)},{i:c-2,x:Object(i.a)(r,o)})}else(a||o)&&s.push("translate("+a+e+o+n)}(o.translateX,o.translateY,s.translateX,s.translateY,u,c),function(t,e,n,o){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(a(n)+"rotate(",null,r)-2,x:Object(i.a)(t,e)})):e&&n.push(a(n)+"rotate("+e+r)}(o.rotate,s.rotate,u,c),function(t,e,n,o){t!==e?o.push({i:n.push(a(n)+"skewX(",null,r)-2,x:Object(i.a)(t,e)}):e&&n.push(a(n)+"skewX("+e+r)}(o.skewX,s.skewX,u,c),function(t,e,n,r,o,s){if(t!==n||e!==r){var u=o.push(a(o)+"scale(",null,",",null,")");s.push({i:u-4,x:Object(i.a)(t,n)},{i:u-2,x:Object(i.a)(e,r)})}else 1===n&&1===r||o.push(a(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,s.scaleX,s.scaleY,u,c),o=s=null,function(t){for(var e,n=-1,r=c.length;++n');return e.appendChild(i),this.type="canvas",this.canvas=i,this.context=i.getContext("2d"),this.toDraw=!1,this}return t.prototype.beforeDraw=function(){var t=this.canvas;this.context&&this.context.clearRect(0,0,t.width,t.height)},t.prototype.draw=function(t){function e(){n.animateHandler=r.requestAnimationFrame(function(){n.animateHandler=void 0,n.toDraw&&e()}),n.beforeDraw();try{n._drawGroup(t)}catch(t){console.warn("error in draw canvas, detail as:"),console.warn(t),n.toDraw=!1}n.toDraw=!1}var n=this;n.animateHandler?n.toDraw=!0:e()},t.prototype.drawSync=function(t){this.beforeDraw(),this._drawGroup(t)},t.prototype._drawGroup=function(t){if(!t._cfg.removed&&!t._cfg.destroyed&&t._cfg.visible){var e=t._cfg.children,n=null;this.setContext(t);for(var r=0;r-1){var s=n[o];"fillStyle"===o&&(s=i.parseStyle(s,t,e)),"strokeStyle"===o&&(s=i.parseStyle(s,t,e)),"lineDash"===o&&e.setLineDash?r.isArray(s)?e.setLineDash(s):r.isString(s)&&e.setLineDash(s.split(" ")):e[o]=s}},t}();t.exports=o},function(t,e,n){function r(t,e){var n=t.match(l);i.each(n,function(t){t=t.split(":"),e.addColorStop(t[0],t[1])})}var i=n(1),a=/[MLHVQTCSAZ]([^MLHVQTCSAZ]*)/gi,o=/[^\s\,]+/gi,s=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,u=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,c=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,l=/[\d.]+:(#[^\s]+|[^\)]+\))/gi,h={};t.exports={parsePath:function(t){return t=t||[],i.isArray(t)?t:i.isString(t)?(t=t.match(a),i.each(t,function(e,n){if((e=e.match(o))[0].length>1){var r=e[0].charAt(0);e.splice(1,0,e[0].substr(1)),e[0]=r}i.each(e,function(t,n){isNaN(t)||(e[n]=+t)}),t[n]=e}),t):void 0},parseStyle:function(t,e,n){if(i.isString(t)){if("("===t[1]||"("===t[2]){if("l"===t[0])return function(t,e,n){var a=s.exec(t),o=i.mod(i.toRadian(parseFloat(a[1])),2*Math.PI),u=a[2],c=e.getBBox(),l=void 0,h=void 0;o>=0&&o<.5*Math.PI?(l={x:c.minX,y:c.minY},h={x:c.maxX,y:c.maxY}):.5*Math.PI<=o&&o');return e.appendChild(i),this.type="svg",this.canvas=i,this.context=new o(i),this.toDraw=!1,this}return t.prototype.draw=function(t){function e(){n.animateHandler=r.requestAnimationFrame(function(){n.animateHandler=void 0,n.toDraw&&e()});try{n._drawChildren(t._cfg.children,!1)}catch(t){console.warn("error in draw canvas, detail as:"),console.warn(t),n.toDraw=!1}n.toDraw=!1}var n=this;n.animateHandler?n.toDraw=!0:e()},t.prototype.drawSync=function(t){this._drawChildren(t._cfg.children,!1)},t.prototype._drawGroup=function(t,e){var n=t._cfg;n.removed||n.destroyed||(!n.el&&n.attrs&&(e=!0),n.tobeRemoved&&(r.each(n.tobeRemoved,function(t){t.parentNode&&t.parentNode.removeChild(t)}),n.tobeRemoved=[]),this._drawShape(t,e),n.children&&n.children.length>0&&this._drawChildren(n.children,e))},t.prototype._drawChildren=function(t,e){var n=void 0;if(t)for(var r=0;rs?1:0,f=Math.abs(u-s)>Math.PI?1:0,p=n.rs,d=n.re,g=e(s,n.rs,a),y=e(u,n.rs,a);n.rs>0?(o.push("M "+l.x+","+l.y),o.push("L "+y.x+","+y.y),o.push("A "+p+","+p+",0,"+f+","+(1===h?0:1)+","+g.x+","+g.y),o.push("L "+c.x+" "+c.y)):(o.push("M "+a.x+","+a.y),o.push("L "+c.x+","+c.y)),o.push("A "+d+","+d+",0,"+f+","+h+","+l.x+","+l.y),n.rs>0?o.push("L "+y.x+","+y.y):o.push("Z"),i.el.setAttribute("d",o.join(" "))},t.prototype._updateText=function(t){var e=t._attrs,n=t._cfg.attrs,r=t._cfg.el;this._setFont(t);for(var i in e)if(e[i]!==n[i]){if("text"===i){this._setText(t,""+e[i]);continue}if("fillStyle"===i||"strokeStyle"===i){this._setColor(t,i,e[i]);continue}if("matrix"===i){this._setTransform(t);continue}u[i]&&r.setAttribute(u[i],e[i])}t._cfg.attrs=Object.assign({},t._attrs),t._cfg.hasUpdate=!1},t.prototype._setFont=function(t){var e=t.get("el"),n=t._attrs,r=n.fontSize;e.setAttribute("alignment-baseline",c[n.textBaseline]||"baseline"),e.setAttribute("text-anchor",l[n.textAlign]||"left"),r&&+r<12&&(n.matrix=[1,0,0,0,1,0,0,0,1],t.transform([["t",-n.x,-n.y],["s",+r/12,+r/12],["t",n.x,n.y]]))},t.prototype._setText=function(t,e){var n=t._cfg.el,i=t._attrs.textBaseline||"bottom";if(e)if(~e.indexOf("\n")){var a=t._attrs.x,o=e.split("\n"),s=o.length-1,u="";r.each(o,function(t,e){0===e?"alphabetic"===i?u+=''+t+"":"top"===i?u+=''+t+"":"middle"===i?u+=''+t+"":"bottom"===i?u+=''+t+"":"hanging"===i&&(u+=''+t+""):u+=''+t+""}),n.innerHTML=u}else n.innerHTML=e;else n.innerHTML=""},t.prototype._setClip=function(t,e){var n=t._cfg.el;if(e)if(n.hasAttribute("clip-path"))e._cfg.hasUpdate&&this._updateShape(e);else{this._createDom(e),this._updateShape(e);var r=this.context.addClip(e);n.setAttribute("clip-path","url(#"+r+")")}else n.removeAttribute("clip-path")},t.prototype._setColor=function(t,e,n){var r=t._cfg.el,i=this.context;if(n)if(n=n.trim(),/^[r,R,L,l]{1}[\s]*\(/.test(n)){var a=i.find("gradient",n);a||(a=i.addGradient(n)),r.setAttribute(u[e],"url(#"+a+")")}else if(/^[p,P]{1}[\s]*\(/.test(n)){var o=i.find("pattern",n);o||(o=i.addPattern(n)),r.setAttribute(u[e],"url(#"+o+")")}else r.setAttribute(u[e],n);else r.setAttribute(u[e],"none")},t.prototype._setShadow=function(t){var e=t._cfg.el,n=t._attrs,r={dx:n.shadowOffsetX,dy:n.shadowOffsetY,blur:n.shadowBlur,color:n.shadowColor},i=this.context.find("filter",r);i||(i=this.context.addShadow(r,this)),e.setAttribute("filter","url(#"+i+")")},t}();t.exports=h},function(t,e,n){var r=n(1),i=n(238),a=n(239),o=n(240),s=n(241),u=n(242),c=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var n=document.createElementNS("http://www.w3.org/2000/svg","defs"),i=r.uniqueId("defs_");n.id=i,e.appendChild(n),this.children=[],this.defaultArrow={},this.el=n,this.canvas=e}return t.prototype.find=function(t,e){for(var n=this.children,r=null,i=0;i'}),n}var i=n(1),a=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,o=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,s=/[\d.]+:(#[^\s]+|[^\)]+\))/gi,u=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var n=null,s=i.uniqueId("gradient_");return"l"===e.toLowerCase()[0]?function(t,e){var n=a.exec(t),o=i.mod(i.toRadian(parseFloat(n[1])),2*Math.PI),s=n[2],u=void 0,c=void 0;o>=0&&o<.5*Math.PI?(u={x:0,y:0},c={x:1,y:1}):.5*Math.PI<=o&&o';e.innerHTML=n},t}();t.exports=a},function(t,e,n){var r=n(1),i=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var i=document.createElementNS("http://www.w3.org/2000/svg","marker"),a=r.uniqueId("marker_");i.setAttribute("id",a);var o=document.createElementNS("http://www.w3.org/2000/svg","path");return o.setAttribute("stroke","none"),o.setAttribute("fill",e.stroke||"#000"),i.appendChild(o),i.setAttribute("overflow","visible"),i.setAttribute("orient","auto-start-reverse"),this.el=i,this.child=o,this.id=a,this.cfg=e["marker-start"===n?"startArrow":"endArrow"],this.stroke=e.stroke||"#000",!0===this.cfg?this._setDefaultPath(n,o):this._setMarker(e.lineWidth,o),this}return t.prototype.match=function(){return!1},t.prototype._setDefaultPath=function(t,e){var n=this.el;e.setAttribute("d","M0,0 L6,3 L0,6 L3,3Z"),n.setAttribute("refX",3),n.setAttribute("refY",3)},t.prototype._setMarker=function(t,e){var n=this.el,i=this.cfg.path,a=this.cfg.d;r.isArray(i)&&(i=i.map(function(t){return t.join(" ")}).join("")),e.setAttribute("d",i),n.appendChild(e),a&&n.setAttribute("refX",a/t)},t.prototype.update=function(t){var e=this.child;e.attr?e.attr("fill",t):e.setAttribute("fill",t)},t}();t.exports=i},function(t,e,n){var r=n(1),i=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.type="clip";var n=document.createElementNS("http://www.w3.org/2000/svg","clipPath");return this.el=n,this.id=r.uniqueId("clip_"),n.id=this.id,n.appendChild(e._cfg.el),this.cfg=e,this}return t.prototype.match=function(){return!1},t.prototype.remove=function(){var t=this.el;t.parentNode.removeChild(t)},t}();t.exports=i},function(t,e,n){var r=n(1),i=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,a=function(){function t(e){function n(){console.log(c.width,c.height),a.setAttribute("width",c.width),a.setAttribute("height",c.height)}!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var a=document.createElementNS("http://www.w3.org/2000/svg","pattern");a.setAttribute("patternUnits","userSpaceOnUse");var o=document.createElementNS("http://www.w3.org/2000/svg","image");a.appendChild(o);var s=r.uniqueId("pattern_");a.id=s,this.el=a,this.id=s,this.cfg=e;var u=i.exec(e)[2];o.setAttribute("href",u);var c=new Image;return u.match(/^data:/i)||(c.crossOrigin="Anonymous"),c.src=u,c.complete?n():(c.onload=n,c.src=c.src),this}return t.prototype.match=function(t,e){return this.cfg===e},t}();t.exports=a},function(t,e){var n={svg:"svg",circle:"circle",rect:"rect",text:"text",path:"path",foreignObject:"foreignObject",polygon:"polygon",ellipse:"ellipse",image:"image"};t.exports=function(t,e,r){var i=r.target||r.srcElement;if(!n[i.tagName]){for(var a=i.parentNode;a&&!n[a.tagName];)a=a.parentNode;i=a}return this._cfg.el===i?this:this.find(function(t){return t._cfg&&t._cfg.el===i})}},function(t,e,n){function r(t,e){var n=function(t){if(f.isEmpty(t))return null;var e=t[0].x,n=t[0].x,r=t[0].y,i=t[0].y;return f.each(t,function(t){e=e>t.x?t.x:e,n=nt.y?t.y:r,i=i0?a.maxX:a.minX,u,1];t.apply(c),t.attr({transform:[["t",-s,-u],["s",.01,1],["t",s,u]]});var l={transform:[["t",-s,-u],["s",100,1],["t",s,u]]},h=i(e,r,n);t.animate(l,h.duration,h.easing,h.callback,h.delay)}function s(t,e,n){var r=t._id,a=t.get("index"),o=void 0,s=void 0;if(n.isPolar&&"point"!==t.name)o=n.getCenter().x,s=n.getCenter().y;else{var u=t.getBBox();o=(u.minX+u.maxX)/2,s=(u.minY+u.maxY)/2}var c=[o,s,1];t.apply(c),t.attr({transform:[["t",-o,-s],["s",.01,.01],["t",o,s]]});var l={transform:[["t",-o,-s],["s",100,100],["t",o,s]]},h=i(e,a,r);t.animate(l,h.duration,h.easing,h.callback,h.delay)}function u(t,e){if("path"===t.get("type")){var n=t._id,r=t.get("index"),a=d.pathToAbsolute(t.attr("path"));t.attr("path",[a[0]]);var o={path:a},s=i(e,r,n);t.animate(o,s.duration,s.easing,s.callback,s.delay)}}function c(t,e,n,r,a){var o=function(t){var e=t.start,n=t.end,r=t.getWidth(),i=t.getHeight(),a=void 0,o=void 0,s=void 0,u=void 0,c=void 0;return t.isPolar?(u=t.getRadius(),s=t.getCenter(),a=t.startAngle,o=t.endAngle,(c=new p.Fan({attrs:{x:s.x,y:s.y,rs:0,re:u+200,startAngle:a,endAngle:a}})).endState={endAngle:o}):(c=new p.Rect({attrs:{x:e.x-200,y:n.y-200,width:t.isTransposed?r+400:0,height:t.isTransposed?0:i+400}}),t.isTransposed?c.endState={height:i+400}:c.endState={width:r+400}),c.isClip=!0,c}(n),s=t.get("canvas"),u=t._id,c=t.get("index"),l=void 0;r?(o.attr("startAngle",r),o.attr("endAngle",r),l={endAngle:a}):l=o.endState,o.set("canvas",s),t.attr("clip",o),t.setSilent("animating",!0);var h=i(e,c,u);o.animate(l,h.duration,h.easing,function(){t&&!t.get("destroyed")&&(t.attr("clip",null),t.setSilent("cacheShape",null),t.setSilent("animating",!1),o.remove())},h.delay)}function l(t,e){var n=t._id,r=t.get("index"),a=f.isNil(t.attr("fillOpacity"))?1:t.attr("fillOpacity"),o=f.isNil(t.attr("strokeOpacity"))?1:t.attr("strokeOpacity");t.attr("fillOpacity",0),t.attr("strokeOpacity",0);var s={fillOpacity:a,strokeOpacity:o},u=i(e,r,n);t.animate(s,u.duration,u.easing,u.callback,u.delay)}function h(t,e,n){var i=r(t,n),a=i.endAngle;c(t,e,n,i.startAngle,a)}var f=n(0),p=n(5),d=f.PathUtil;t.exports={enter:{clipIn:c,zoomIn:s,pathIn:u,scaleInY:a,scaleInX:o,fanIn:h,fadeIn:l},leave:{lineWidthOut:function(t,e){var n={lineWidth:0,opacity:0},r=t._id,a=i(e,t.get("index"),r);t.animate(n,a.duration,a.easing,function(){t.remove()},a.delay)},zoomOut:function(t,e,n){var r=t._id,a=t.get("index"),o=void 0,s=void 0;if(n.isPolar&&"point"!==t.name)o=n.getCenter().x,s=n.getCenter().y;else{var u=t.getBBox();o=(u.minX+u.maxX)/2,s=(u.minY+u.maxY)/2}var c=[o,s,1];t.apply(c);var l={transform:[["t",-o,-s],["s",.01,.01],["t",o,s]]},h=i(e,a,r);t.animate(l,h.duration,h.easing,function(){t.remove()},h.delay)},pathOut:function(t,e){if("path"===t.get("type")){var n=t._id,r=t.get("index"),a={path:[d.pathToAbsolute(t.attr("path"))[0]]},o=i(e,r,n);t.animate(a,o.duration,o.easing,function(){t.remove()},o.delay)}},fadeOut:function(t,e){var n=t._id,r={fillOpacity:0,strokeOpacity:0},a=i(e,t.get("index"),n);t.animate(r,a.duration,a.easing,function(){t.remove()},a.delay)}},appear:{clipIn:c,zoomIn:s,pathIn:u,scaleInY:a,scaleInX:o,fanIn:h,fadeIn:l},update:{fadeIn:l,fanIn:h}}},function(t,e,n){var r="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},i=n(246),a=n(56),o=n(58),s=function(t){function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":r(e))&&"function"!=typeof e?t:e}(this,t.call(this,n));return i.names=["x","y"],i.type="position",i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":r(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.mapping=function(t,e){var n=this.scales,r=this.coord,s=n[0],u=n[1],c=void 0,l=void 0,h=void 0;if(i(t)||i(e))return[];if(a(e)&&a(t)){c=[],l=[];for(var f=0,p=0,d=t.length,g=e.length;f=0?"positive":"negative";o[g][d]||(o[g][d]=0),h[n]=[o[g][d],p+o[g][d]],o[g][d]+=p}}},e}(o);o.Stack=s,t.exports=s},function(t,e,n){var r={merge:n(61),values:n(39)},i=n(259),a=n(14);t.exports={processAdjust:function(t){var e=r.merge(t),n=this.dodgeBy,a=t;n&&(a=i(e,n)),this.cacheMap={},this.adjDataArray=a,this.mergeData=e,this.adjustData(a,e),this.adjDataArray=null,this.mergeData=null},getDistribution:function(t){var e=this.adjDataArray,n=this.cacheMap,i=n[t];return i||(i={},a(e,function(e,n){var o=r.values(e,t);o.length||o.push(0),a(o,function(t){i[t]||(i[t]=[]),i[t].push(n)})}),n[t]=i),i},adjustDim:function(t,e,n,r,i){var o=this,s=o.getDistribution(t),u=o.groupData(n,t);a(u,function(n,r){r=parseFloat(r);var u=void 0;u=1===e.length?{pre:e[0]-1,next:e[0]+1}:o.getAdjustRange(t,r,e),a(n,function(e){var n=e[t],r=s[n],a=r.indexOf(i);e[t]=o.getDodgeOffset(u,a,r.length)})})}}},function(t,e,n){var r=n(260);t.exports=function(t,e){if(!e)return[t];var n=r(t,e),i=[];for(var a in n)i.push(n[a]);return i}},function(t,e,n){var r=n(120),i=n(16),a=n(261);t.exports=function(t,e){if(!e)return{0:t};if(!r(e)){var n=i(e)?e:e.replace(/\s+/g,"").split("*");e=function(t){for(var e="_",r=0,i=n.length;ro&&(n=t,o=s)}),n}}},function(t,e,n){var r,i,a=n(0),o=n(122),s=a.deepMix({},o,{background:{fill:"#1F1F1F",radius:2},plotBackground:{fill:"#1F1F1F"},axis:{top:{label:{textStyle:{fill:"#A6A6A6"}},line:{stroke:"#737373"},tickLine:{stroke:"#737373"}},bottom:{label:{textStyle:{fill:"#A6A6A6"}},line:{stroke:"#737373"},tickLine:{stroke:"#737373"}},left:{label:{textStyle:{fill:"#A6A6A6"}},grid:{lineStyle:{stroke:"#404040"}}},right:{label:{textStyle:{fill:"#A6A6A6"}},grid:{lineStyle:{stroke:"#404040"}}},circle:{label:{textStyle:{fill:"#A6A6A6"}},line:{stroke:"#737373"},tickLine:{stroke:"#737373"},grid:{lineStyle:{stroke:"#404040"}}},radius:{label:{textStyle:{fill:"#A6A6A6"}},line:{stroke:"#737373"},tickLine:{stroke:"#737373"},grid:{lineStyle:{stroke:"#404040"}}},helix:{line:{stroke:"#737373"},tickLine:{stroke:"#737373"}}},label:{textStyle:{fill:"#A6A6A6"}},legend:{right:{textStyle:{fill:"#737373"},unCheckColor:"#bfbfbf"},left:{textStyle:{fill:"#737373"},unCheckColor:"#bfbfbf"},top:{textStyle:{fill:"#737373"},unCheckColor:"#bfbfbf"},bottom:{textStyle:{fill:"#737373"},unCheckColor:"#bfbfbf"},html:(r={},r["g2-legend"]={color:"#D9D9D9"},r),gradient:{textStyle:{fill:"#D9D9D9"},lineStyle:{stroke:"#404040"}}},tooltip:(i={},i["g2-tooltip"]={color:"#D9D9D9"},i),tooltipCrosshairsRect:{type:"rect",style:{fill:"#fff",opacity:.1}},tooltipCrosshairsLine:{style:{stroke:"rgba(255, 255, 255, 0.45)"}},guide:{line:{text:{style:{fill:"#A6A6A6"}}},text:{style:{fill:"#A6A6A6"}},region:{style:{lineWidth:0,fill:"#000",fillOpacity:.04}}}});t.exports=s},function(t,e,n){var r=n(123),i=n(126),a=n(270),o={getLabelsClass:function(t){var e=r;return"polar"===t?e=i:"theta"===t&&(e=a),e}};t.exports=o},function(t,e,n){var r=n(0),i=n(125);t.exports={renderLabels:function(){var t=this.get("label");if(!r.isNil(t)){r.isNil(t.items)&&(t.items=[]);var e=this.addGroup(i,t);this.set("labelsGroup",e)}},resetLabels:function(t){var e=this,n=e.get("label");if(n){var i=e.get("labelsGroup"),a=i.getLabels(),o=a.length;t=t||n.items,r.each(t,function(t,n){if(n=t.length;s--)a[s].remove()}},addLabel:function(t,e){var n=this.get("labelsGroup"),r={},i=void 0;return n&&(r.text=t,r.x=e.x,r.y=e.y,r.point=e,r.textAlign=e.textAlign,e.rotate&&(r.rotate=e.rotate),i=n.addLabel(r)),i},removeLabels:function(){var t=this.get("labelsGroup");t&&t.remove(),this.set("labelsGroup",null)}}},function(t,e,n){var r=n(0).MatrixUtil.vec2;t.exports={catmullRom2bezier:function(t,e,n){for(var i=!!e,a=[],o=0,s=t.length;o0&&(t=this._distribute(t,e)),t},e.prototype._distribute=function(t,e){var n=this.get("coord"),r=n.getRadius(),i=this.get("label").labelHeight,a=n.getCenter(),o=2*(r+e)+2*i,s={start:n.start,end:n.end},u=this.get("geom");if(u){var c=u.get("view");s=c.getViewRegion()}var l=[[],[]];return t.forEach(function(t){"right"===t.textAlign?l[0].push(t):l[1].push(t)}),l.forEach(function(t,e){var n=parseInt(o/i,10);t.length>n&&(t.sort(function(t,e){return e["..percent"]-t["..percent"]}),t.splice(n,t.length-n)),t.sort(function(t,e){return t.y-e.y}),function(t,e,n,r,i){var a=!0,o=n.start,s=n.end,u=Math.min(o.y,s.y),c=Math.abs(o.y-s.y),l=void 0,h=0,f=Number.MIN_VALUE,p=t.map(function(t){return t.y>h&&(h=t.y),t.yc&&(c=h-u);a;)for(p.forEach(function(t){var e=(Math.min.apply(f,t.targets)+Math.max.apply(f,t.targets))/2;t.pos=Math.min(Math.max(f,e-t.size/2),c-t.size)}),a=!1,l=p.length;l--;)if(l>0){var d=p[l-1],g=p[l];d.pos+d.size>g.pos&&(d.size+=g.size,d.targets=d.targets.concat(g.targets),d.pos+d.size>c&&(d.pos=c-d.size),p.splice(l,1),a=!0)}l=0,p.forEach(function(n){var r=u+e/2;n.targets.forEach(function(){t[l].y=n.pos+r,r+=e,l++})}),t.forEach(function(t){var e=t.r*t.r,n=Math.pow(Math.abs(t.y-r.y),2);if(e90&&(n-=180),n<-90&&(n+=180)),n/180*Math.PI},e.prototype.getLabelAlign=function(t){var e=this.get("coord").getCenter(),n=void 0;n=t.angle<=Math.PI/2&&t.x>=e.x?"left":"right";return this.getDefaultOffset()<=0&&(n="right"===n?"left":"right"),n},e.prototype.getArcPoint=function(t){return t},e.prototype.getPointAngle=function(t){var e=this.get("coord"),n={x:i.isArray(t.x)?t.x[0]:t.x,y:t.y[0]};this.transLabelPoint(n);var r={x:i.isArray(t.x)?t.x[1]:t.x,y:t.y[1]};this.transLabelPoint(r);var a=void 0,s=o.getPointAngle(e,n);if(t.points&&t.points[0].y===t.points[1].y)a=s;else{var u=o.getPointAngle(e,r);s>=u&&(u+=2*Math.PI),a=s+(u-s)/2}return a},e.prototype.getCirclePoint=function(t,e){var n=this.get("coord"),i=n.getCenter(),a=n.getRadius()+e,o=r(i,t,a);return o.angle=t,o.r=a,o},e}(a);t.exports=u},function(t,e,n){function r(t){return t.alias||t.field}var i=n(0),a=n(2).defaultColor,o={_getIntervalSize:function(t){var e=null,n=this.get("type"),r=this.get("coord");if(r.isRect&&("interval"===n||"schema"===n)){e=this.getSize(t._origin);var a=r.isTransposed?"y":"x";if(i.isArray(t[a])){e=e(1+r.rangeMax())/2&&(i=r.rangeMin()),e=r.invert(i),r.isCategory&&(e=r.translate(e)),e},_getOriginByPoint:function(t){var e=this.getXScale(),n=this.getYScale(),r=e.field,i=n.field,a=this.get("coord").invert(t),o=e.invert(a.x),s=n.invert(a.y),u={};return u[r]=o,u[i]=s,u},_getScale:function(t){var e=this.get("scales"),n=null;return i.each(e,function(e){if(e.field===t)return n=e,!1}),n},_getTipValueScale:function(){var t=this.getAttrsForLegend(),e=void 0;i.each(t,function(t){var n=t.getScale(t.type);if(n.isLinear)return e=n,!1});var n=this.getXScale(),r=this.getYScale();return!e&&r&&"..y"===r.field?n:e||r||n},_getTipTitleScale:function(t){if(t)return this._getScale(t);var e=this.getAttr("position").getFields(),n=void 0;return i.each(e,function(t){if(-1===t.indexOf(".."))return n=t,!1}),this._getScale(n)},_filterValue:function(t,e){var n=this.get("coord"),r=this.getYScale(),a=r.field,o=n.invert(e).y;o=r.invert(o);var s=t[t.length-1];return i.each(t,function(t){var e=t._origin;if(e[a][0]<=o&&e[a][1]>=o)return s=t,!1}),s},getXDistance:function(){var t=this.get("xDistance");if(!t){var e=this.getXScale();if(e.isCategory)t=1;else{var n=e.values,r=e.translate(n[0]),a=r;i.each(n,function(t){(t=e.translate(t))a&&(a=t)});var o=n.length;t=(a-r)/(o-1)}this.set("xDistance",t)}return t},findPoint:function(t,e){var n=this,r=n.get("type"),a=n.getXScale(),o=n.getYScale(),s=a.field,u=o.field,c=null;if(i.indexOf(["heatmap"],r)>-1){var l=n.get("coord").invert(t),h=a.invert(l.x),f=o.invert(l.y),p=1/0;return i.each(e,function(t){var e=Math.pow(t._origin[s]-h,2)+Math.pow(t._origin[u]-f,2);e=y){if(!b)return c=t,!1;i.isArray(c)||(c=[]),c.push(t)}}),i.isArray(c)&&(c=this._filterValue(c,t));else{var w=void 0;if(a.isLinear||"timeCat"===a.type){if((y>a.translate(x)||ya.max||yMath.abs(a.translate(w._origin[s])-y)&&(g=w)}var C=n.getXDistance();return!c&&Math.abs(a.translate(g._origin[s])-y)<=C/2&&(c=g),c},getTipTitle:function(t,e){var n="",r=this._getTipTitleScale(e);if(r){var i=t[r.field];n=r.getText(i)}else if("heatmap"===this.get("type")){var a=this.getXScale(),o=this.getYScale();n="( "+a.getText(t[a.field])+", "+o.getText(t[o.field])+" )"}return n},getTipValue:function(t,e){var n=void 0,r=e.field,a=t.key;if(n=t[r],i.isArray(n)){var o=[];i.each(n,function(t){o.push(e.getText(t))}),n=o.join("-")}else n=e.getText(n,a);return n},getTipName:function(t){var e=void 0,n=void 0,a=this._getGroupScales();if(a.length&&i.each(a,function(t){return n=t,!1}),n){var o=n.field;e=n.getText(t[o])}else{e=r(this._getTipValueScale())}return e},getTipItems:function(t,e){function n(e,n,r){if(!i.isNil(n)&&""!==n){var s={title:u,point:t,name:e||u,value:n,color:t.color||a,marker:!0};s.size=o._getIntervalSize(t),l.push(i.mix({},s,r))}}var o=this,s=t._origin,u=o.getTipTitle(s,e),c=o.get("tooltipCfg"),l=[],h=void 0,f=void 0;if(c){var p=c.fields,d=c.cfg,g=[];if(i.each(p,function(t){g.push(s[t])}),d){i.isFunction(d)&&(d=d.apply(null,g));var y=i.mix({},{point:t,title:u,color:t.color||a,marker:!0},d);y.size=o._getIntervalSize(t),l.push(y)}else i.each(p,function(t){if(!i.isNil(s[t])){var e=o._getScale(t);h=r(e),f=e.getText(s[t]),n(h,f)}})}else{var v=o._getTipValueScale();i.isNil(s[v.field])||(f=o.getTipValue(s,v),n(h=o.getTipName(s),f))}return l},isShareTooltip:function(){var t=this.get("shareTooltip"),e=this.get("type"),n=this.get("view"),r=void 0;if(r=n.get("parent")?n.get("parent").get("options"):n.get("options"),"interval"===e){var a=this.get("coord"),o=a.type;("theta"===o||"polar"===o&&a.isTransposed)&&(t=!1)}else this.getYScale()&&!i.inArray(["contour","point","polygon","edge"],e)||(t=!1);return r.tooltip&&i.isBoolean(r.tooltip.shared)&&(t=r.tooltip.shared),t}};t.exports=o},function(t,e,n){function r(t,e){if(!t)return!0;if(t.length!==e.length)return!0;var n=!1;return a.each(e,function(e,r){if(!function(t,e){if(a.isNil(t)||a.isNil(e))return!1;var n=t.get("origin"),r=e.get("origin");return a.isEqual(n,r)}(e,t[r]))return n=!0,!1}),n}function i(t,e){var n={};return a.each(t,function(t,r){var i=e.attr(r);a.isArray(i)&&(i=a.cloneDeep(i)),n[r]=i}),n}var a=n(0),o={_isAllowActive:function(){var t=this.get("allowActive");if(!a.isNil(t))return t;var e=this.get("view"),n=this.isShareTooltip();return!1===e.get("options").tooltip||!n},_onMouseenter:function(t){var e=t.shape,n=this.get("shapeContainer");e&&n.contain(e)&&this._isAllowActive()&&this.setShapesActived(e)},_onMouseleave:function(){var t=this.get("view").get("canvas");this.get("activeShapes")&&(this.clearActivedShapes(),t.draw())},_bindActiveAction:function(){var t=this.get("view"),e=this.get("type");t.on(e+":mouseenter",a.wrapBehavior(this,"_onMouseenter")),t.on(e+":mouseleave",a.wrapBehavior(this,"_onMouseleave"))},_offActiveAction:function(){var t=this.get("view"),e=this.get("type");t.off(e+":mouseenter",a.getWrapBehavior(this,"_onMouseenter")),t.off(e+":mouseleave",a.getWrapBehavior(this,"_onMouseleave"))},_setActiveShape:function(t){var e=this.get("activedOptions")||{},n=t.get("origin"),r=n.shape||this.getDefaultValue("shape");a.isArray(r)&&(r=r[0]);var o=this.get("shapeFactory"),s=a.mix({},t.attr(),{origin:n}),u=o.getActiveCfg(r,s);e.style&&a.mix(u,e.style);var c=i(u,t);t.setSilent("_originAttrs",c),e.animate?t.animate(u,300):t.attr(u),t.set("zIndex",1)},setShapesActived:function(t){var e=this;a.isArray(t)||(t=[t]);var n=e.get("activeShapes");if(r(n,t)){var i=e.get("view").get("canvas"),o=e.get("shapeContainer"),s=e.get("activedOptions");s&&s.highlight?(a.each(t,function(t){t.get("animating")&&t.stopAnimate()}),e.highlightShapes(t)):(n&&e.clearActivedShapes(),a.each(t,function(t){t.get("animating")&&t.stopAnimate(),t.get("visible")&&!t.get("selected")&&e._setActiveShape(t)})),e.set("activeShapes",t),o.sort(),i.draw()}},clearActivedShapes:function(){var t=this.get("shapeContainer"),e=this.get("activedOptions"),n=e&&e.animate;if(t&&!t.get("destroyed")){var r=this.get("activeShapes");a.each(r,function(t){if(!t.get("selected")){var e=t.get("_originAttrs");n?(t.stopAnimate(),t.animate(e,300)):t.attr(e),t.setZIndex(0),t.set("_originAttrs",null)}});if(this.get("preHighlightShapes")){var i=t.get("children");a.each(i,function(t){if(!t.get("selected")){var e=t.get("_originAttrs");e&&(n?(t.stopAnimate(),t.animate(e,300)):t.attr(e),t.setZIndex(0),t.set("_originAttrs",null))}})}t.get("children").sort(function(t,e){return t._INDEX-e._INDEX}),this.set("activeShapes",null),this.set("preHighlightShapes",null)}},getGroupShapesByPoint:function(t){var e=[];if(this.get("shapeContainer")){var n=this.getXScale().field,r=this.getShapes(),i=this._getOriginByPoint(t);a.each(r,function(t){var r=t.get("origin");if(t.get("visible")&&r){r._origin[n]===i[n]&&e.push(t)}})}return e},getSingleShapeByPoint:function(t){var e=this.get("shapeContainer"),n=e.get("canvas").get("pixelRatio"),r=void 0;if(e&&(r=e.getShape(t.x*n,t.y*n)),r&&r.get("origin"))return r},highlightShapes:function(t,e){a.isArray(t)||(t=[t]);var n=this.get("activeShapes");if(r(n,t)){n&&this.clearActivedShapes();var o=this.getShapes(),s=this.get("activedOptions"),u=s&&s.animate,c=s&&s.style;a.each(o,function(n){var r={};n.stopAnimate(),-1!==a.indexOf(t,n)?(a.mix(r,c,e),n.setZIndex(1)):(a.mix(r,{fillOpacity:.3,opacity:.3}),n.setZIndex(0));var o=i(r,n);n.setSilent("_originAttrs",o),u?n.animate(r,300):n.attr(r)}),this.set("preHighlightShapes",t),this.set("activeShapes",t)}}};t.exports=o},function(t,e,n){function r(t,e){if(i.isNil(t)||i.isNil(e))return!1;var n=t.get("origin"),r=e.get("origin");return i.isEqual(n,r)}var i=n(0),a={_isAllowSelect:function(){var t=this.get("allowSelect");if(!i.isNil(t))return t;var e=this.get("type"),n=this.get("coord"),r=n&&n.type;return"interval"===e&&"theta"===r},_onClick:function(t){if(this._isAllowSelect()){this.clearActivedShapes();var e=t.shape,n=this.get("shapeContainer");e&&!e.get("animating")&&n.contain(e)&&this.setShapeSelected(e)}},_bindSelectedAction:function(){var t=this.get("view"),e=this.get("type");t.on(e+":click",i.wrapBehavior(this,"_onClick"))},_offSelectedAction:function(){var t=this.get("view"),e=this.get("type");t.off(e+":click",i.getWrapBehavior(this,"_onClick"))},_setShapeStatus:function(t,e){var n=this.get("view"),r=this.get("selectedOptions")||{},a=!1!==r.animate,o=n.get("canvas");t.set("selected",e);var s=t.get("origin");if(e){var u=s.shape||this.getDefaultValue("shape");i.isArray(u)&&(u=u[0]);var c=this.get("shapeFactory"),l=i.mix({geom:this,point:s},r),h=c.getSelectedCfg(u,l);i.mix(h,l.style),t.get("_originAttrs")||(t.get("animating")&&t.stopAnimate(),t.set("_originAttrs",function(t,e){var n={};return i.each(t,function(t,r){"transform"===r&&(r="matrix");var a=e.attr(r);i.isArray(a)&&(a=i.cloneDeep(a)),n[r]=a}),n}(h,t))),a?t.animate(h,300):(t.attr(h),o.draw())}else{var f=t.get("_originAttrs");t.set("_originAttrs",null),a?t.animate(f,300):(t.attr(f),o.draw())}},setShapeSelected:function(t){var e=this._getSelectedShapes(),n=this.get("selectedOptions")||{},a=!1!==n.cancelable;if("multiple"===n.mode)-1===i.indexOf(e,t)?(e.push(t),this._setShapeStatus(t,!0)):a&&(i.Array.remove(e,t),this._setShapeStatus(t,!1));else{var o=e[0];a&&(t=r(o,t)?null:t),r(o,t)||(o&&this._setShapeStatus(o,!1),t&&this._setShapeStatus(t,!0))}},clearSelected:function(){var t=this,e=t.get("shapeContainer");if(e&&!e.get("destroyed")){var n=t._getSelectedShapes();i.each(n,function(e){t._setShapeStatus(e,!1),e.set("_originAttrs",null)})}},setSelected:function(t){var e=this,n=e.getShapes();return i.each(n,function(n){var r=n.get("origin");r&&r._origin===t&&e.setShapeSelected(n)}),this},_getSelectedShapes:function(){var t=this.getShapes(),e=[];return i.each(t,function(t){t.get("selected")&&e.push(t)}),this.set("selectedShapes",e),e}};t.exports=a},function(t,e,n){var r=n(69),i=n(0),a=/^(?:(?!0000)[0-9]{4}([-/.]+)(?:(?:0?[1-9]|1[0-2])\1(?:0?[1-9]|1[0-9]|2[0-8])|(?:0?[13-9]|1[0-2])\1(?:29|30)|(?:0?[13578]|1[02])\1(?:31))|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)([-/.]?)0?2\2(?:29))(\s+([01]|([01][0-9]|2[0-3])):([0-9]|[0-5][0-9]):([0-9]|[0-5][0-9]))?$/,o={LINEAR:"linear",CAT:"cat",TIME:"time"},s=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.defs={},this.viewTheme={scales:{}},i.assign(this,e)}return t.prototype._getDef=function(t){var e=this.defs,n=this.viewTheme,r=null;return(n.scales[t]||e[t])&&(r=i.mix({},n.scales[t]),i.each(e[t],function(t,e){i.isNil(t)?delete r[e]:r[e]=t})),r},t.prototype._getDefaultType=function(t,e){var n=o.LINEAR,r=i.Array.firstValue(e,t);return i.isArray(r)&&(r=r[0]),a.test(r)?n=o.TIME:i.isString(r)&&(n=o.CAT),n},t.prototype._getScaleCfg=function(t,e,n){var a={field:e},o=i.Array.values(n,e);if(a.values=o,!r.isCategory(t)&&"time"!==t){var s=i.Array.getRange(o);a.min=s.min,a.max=s.max,a.nice=!0}return"time"===t&&(a.nice=!1),a},t.prototype.createScale=function(t,e){var n=this._getDef(t),a=void 0;if(!e||!e.length)return a=n&&n.type?r[n.type](n):r.identity({value:t,field:t.toString(),values:[t]});var o=i.Array.firstValue(e,t);if(i.isNumber(t)||i.isNil(o)&&!n)a=r.identity({value:t,field:t.toString(),values:[t]});else{var s=void 0;n&&(s=n.type),s=s||this._getDefaultType(t,e);var u=this._getScaleCfg(s,t,e);n&&i.mix(u,n),a=r[s](u)}return a},t}();t.exports=s},function(t,e,n){var r=n(0),i=n(276),a=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.type="rect",this.actions=[],this.cfg={},r.mix(this,e),this.option=e||{}}return t.prototype.reset=function(t){return this.actions=t.actions||[],this.type=t.type,this.cfg=t.cfg,this.option.actions=this.actions,this.option.type=this.type,this.option.cfg=this.cfg,this},t.prototype._execActions=function(t){var e=this.actions;r.each(e,function(e){var n=e[0];t[n](e[1],e[2])})},t.prototype.hasAction=function(t){var e=this.actions,n=!1;return r.each(e,function(e){if(t===e[0])return n=!0,!1}),n},t.prototype.createCoord=function(t,e){var n=this.type,a=this.cfg,o=void 0,s=void 0,u=r.mix({start:t,end:e},a);return"theta"===n?(o=i.Polar,this.hasAction("transpose")||this.transpose(),(s=new o(u)).type=n):s=new(o=i[r.upperFirst(n||"")]||i.Rect)(u),this._execActions(s),s},t.prototype.rotate=function(t){return t=t*Math.PI/180,this.actions.push(["rotate",t]),this},t.prototype.reflect=function(t){return this.actions.push(["reflect",t]),this},t.prototype.scale=function(t,e){return this.actions.push(["scale",t,e]),this},t.prototype.transpose=function(){return this.actions.push(["transpose"]),this},t}();t.exports=a},function(t,e,n){var r=n(40);r.Cartesian=n(277),r.Rect=r.Cartesian,r.Polar=n(278),r.Helix=n(279),t.exports=r},function(t,e,n){var r=n(0),i=function(t){function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,n));return r._init(),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return r.mix({},e,{start:{x:0,y:0},end:{x:0,y:0},type:"cartesian",isRect:!0})},e.prototype._init=function(){var t=this.start,e=this.end,n={start:t.x,end:e.x},r={start:t.y,end:e.y};this.x=n,this.y=r},e.prototype.convertPoint=function(t){var e=void 0,n=void 0;return this.isTransposed?(e=t.y,n=t.x):(e=t.x,n=t.y),{x:this.convertDim(e,"x"),y:this.convertDim(n,"y")}},e.prototype.invertPoint=function(t){var e=this.invertDim(t.x,"x"),n=this.invertDim(t.y,"y");return this.isTransposed?{x:n,y:e}:{x:e,y:n}},e}(n(40));t.exports=i},function(t,e,n){var r=n(0),i=n(40),a=r.MatrixUtil,o=a.mat3,s=a.vec2,u=a.vec3,c=function(t){function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,n));return r._init(),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return r.mix({},e,{startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,type:"polar",isPolar:!0})},e.prototype._init=function(){for(var t=this.radius,e=this.innerRadius,n=this.center,r=this.startAngle,i=this.endAngle;il/o?(f=l/o,p={x:n.x-(.5-u)*l,y:n.y-(.5-c)*f*s}):(f=h/s,p={x:n.x-(.5-u)*f*o,y:n.y-(.5-c)*h}),t?t>0&&t<=1?t*=f:(t<=0||t>f)&&(t=f):t=f;var d={start:r,end:i},g={start:e*t,end:t};this.x=d,this.y=g,this.radius=t,this.circleCentre=p,this.center=p},e.prototype.getCenter=function(){return this.circleCentre},e.prototype.getOneBox=function(){var t=this.startAngle,e=this.endAngle;if(Math.abs(e-t)>=2*Math.PI)return{minX:-1,maxX:1,minY:-1,maxY:1};for(var n=[0,Math.cos(t),Math.cos(e)],r=[0,Math.sin(t),Math.sin(e)],i=Math.min(t,e);i0?f:-f;var p=this.invertDim(h,"y"),d={};return d.x=this.isTransposed?p:f,d.y=this.isTransposed?f:p,d},e}(i);t.exports=c},function(t,e,n){var r=n(0),i=n(40),a=r.MatrixUtil.vec2,o=function(t){function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,n));return r._init(),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return r.mix({},e,{startAngle:1.25*Math.PI,endAngle:7.25*Math.PI,innerRadius:0,type:"helix",isHelix:!0})},e.prototype._init=function(){var t=this.width,e=this.height,n=this.radius,r=this.innerRadius,i=this.startAngle,a=this.endAngle,o=(a-i)/(2*Math.PI)+1,s=Math.min(t,e)/2;n&&n>=0&&n<=1&&(s*=n);var u=Math.floor(s*(1-r)/o),c=u/(2*Math.PI),l={start:i,end:a},h={start:r*s,end:r*s+.99*u};this.a=c,this.d=u,this.x=l,this.y=h},e.prototype.getCenter=function(){return this.center},e.prototype.convertPoint=function(t){var e=this.a,n=this.center,r=void 0,i=void 0;this.isTransposed?(r=t.y,i=t.x):(r=t.x,i=t.y);var a=this.convertDim(r,"x"),o=e*a,s=this.convertDim(i,"y");return{x:n.x+Math.cos(a)*(o+s),y:n.y+Math.sin(a)*(o+s)}},e.prototype.invertPoint=function(t){var e=this.center,n=this.a,i=this.d+this.y.start,o=a.subtract([],[t.x,t.y],[e.x,e.y]),s=a.angleTo(o,[1,0],!0),u=s*n;a.length(o)c.x||!o&&s.y>c.y?1:-1,{isVertical:o,factor:i,start:s,end:u}},t.prototype._getCircleCfg=function(t){var e={},n=t.x,r=t.y,i=r.start>r.end,o=void 0;o=t.isTransposed?{x:i?0:1,y:0}:{x:0,y:i?0:1},o=t.convert(o);var s=t.circleCentre,u=[o.x-s.x,o.y-s.y],c=[1,0],l=void 0,h=(l=o.y>s.y?a.angle(u,c):-1*a.angle(u,c))+(n.end-n.start);return e.startAngle=l,e.endAngle=h,e.center=s,e.radius=Math.sqrt(Math.pow(o.x-s.x,2)+Math.pow(o.y-s.y,2)),e.inner=t.innerRadius||0,e},t.prototype._getRadiusCfg=function(t){var e=t.x.start<0?-1:1,n=void 0,r=void 0;return t.isTransposed?(n={x:0,y:0},r={x:1,y:0}):(n={x:0,y:0},r={x:0,y:1}),{factor:e,start:t.convert(n),end:t.convert(r)}},t.prototype._getAxisPosition=function(t,e,n,r){var i="",a=this.options;if(a[r]&&a[r].position)i=a[r].position;else{var o=t.type;t.isRect?"x"===e?i="bottom":"y"===e&&(i=n?"right":"left"):i="helix"===o?"helix":"x"===e?t.isTransposed?"radius":"circle":t.isTransposed?"circle":"radius"}return i},t.prototype._getAxisDefaultCfg=function(t,e,n,i){var a=this.viewTheme,o={},s=this.options,u=e.field;return(o=r.deepMix({},a.axis[i],o,s[u])).title&&r.deepMix(o,{title:{text:e.alias||u}}),o.ticks=e.getTicks(),t.isPolar&&!e.isCategory&&"x"===n&&Math.abs(t.endAngle-t.startAngle)===2*Math.PI&&o.ticks.pop(),o.coord=t,o.label&&r.isNil(o.label.autoRotate)&&(o.label.autoRotate=!0),s.hasOwnProperty("xField")&&s.xField.hasOwnProperty("grid")&&"left"===o.position&&r.deepMix(o,s.xField),o},t.prototype._getAxisCfg=function(t,e,n,i){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",o=arguments[5],s=this,u=s._getAxisPosition(t,i,a,e.field),c=s._getAxisDefaultCfg(t,e,i,u);if(!r.isEmpty(c.grid)&&n){var l=[],h=[],f=function(t){var e=[];if(t.length>0){var n=(e=t.slice(0))[0],r=e[e.length-1];0!==n.value&&e.unshift({value:0}),1!==r.value&&e.push({value:1})}return e}(n.getTicks());if(f.length){var p=function(t,e,n){var r=[];return t.length<1?r:(t.length>=2&&e&&n&&r.push({text:"",tickValue:"",value:0}),0!==t[0].value&&r.push({text:"",tickValue:"",value:0}),1!==(r=r.concat(t))[r.length-1].value&&r.push({text:"",tickValue:"",value:1}),r)}(c.ticks,e.isLinear,"center"===c.grid.align);r.each(p,function(n,u){h.push(n.tickValue);var d=[],g=n.value;if("center"===c.grid.align&&(g=s._getMiddleValue(g,p,u,e.isLinear)),!r.isNil(g)){var y=t.x,v=t.y;r.each(f,function(e){var n="x"===i?g:e.value,r="x"===i?e.value:g,a=t.convert({x:n,y:r});if(t.isPolar){var o=t.circleCentre;v.start>v.end&&(r=1-r),a.flag=y.start>y.end?0:1,a.radius=Math.sqrt(Math.pow(a.x-o.x,2)+Math.pow(a.y-o.y,2))}d.push(a)}),l.push({_id:o+"-"+i+a+"-grid-"+n.tickValue,points:d})}})}c.grid.items=l,c.grid.tickValues=h}return c.type=e.type,c},t.prototype._getHelixCfg=function(t){for(var e={},n=t.a,r=t.startAngle,i=t.endAngle,a=[],o=0;o<=100;o++){var s=t.convert({x:o/100,y:0});a.push(s.x),a.push(s.y)}var u=t.convert({x:0,y:0});return e.a=n,e.startAngle=r,e.endAngle=i,e.crp=a,e.axisStart=u,e.center=t.center,e.inner=t.y.start,e},t.prototype._drawAxis=function(t,e,n,a,o,s,u){var c=this.container,l=void 0,h=void 0;"cartesian"===t.type?(l=i.Line,h=this._getLineCfg(t,e,a,u)):"helix"===t.type&&"x"===a?(l=i.Helix,h=this._getHelixCfg(t)):"x"===a?(l=i.Circle,h=this._getCircleCfg(t)):(l=i.Line,h=this._getRadiusCfg(t));var f=this._getAxisCfg(t,e,n,a,u,o);f=r.mix({},f,h),"y"===a&&s&&"circle"===s.get("type")&&(f.circle=s),f._id=o+"-"+a,r.isNil(u)||(f._id=o+"-"+a+u);var p=c.addGroup(l,f);return this.axes.push(p),p},t.prototype.createAxis=function(t,e,n){var i=this,a=this.coord,o=a.type;if("theta"!==o&&("polar"!==o||!a.isTransposed)){var s=void 0;t&&!i._isHide(t.field)&&(s=i._drawAxis(a,t,e[0],"x",n)),r.isEmpty(e)||"helix"===o||r.each(e,function(e,r){i._isHide(e.field)||i._drawAxis(a,e,t,"y",n,s,r)})}},t.prototype.changeVisible=function(t){var e=this.axes;r.each(e,function(e){e.set("visible",t)})},t.prototype.clear=function(){var t=this.axes;r.each(t,function(t){t.remove()}),this.axes=[]},t}();t.exports=o},function(t,e,n){t.exports={Line:n(282),Circle:n(284),Helix:n(285),PolyLine:n(286)}},function(t,e,n){var r=n(41),i=n(0),a=i.MatrixUtil.vec2,o=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return i.mix({},e,{x:null,y:null,line:{lineWidth:1,stroke:"#C0D0E0"},tickLine:{lineWidth:1,stroke:"#C0D0E0",length:5},isVertical:!1,start:null,end:null})},e.prototype._getAvgLabelLength=function(t){var e=t.get("children");return e[1].attr("x")-e[0].attr("x")},e.prototype.getSideVector=function(t){var e=this.get("factor"),n=this.get("isVertical"),r=this.get("start"),i=this.get("end"),o=this.getAxisVector(),s=a.normalize([],o),u=!1;(n&&r.yi.x)&&(u=!0);var c=a.vertical([],s,u);return a.scale([],c,t*e)},e.prototype.getAxisVector=function(){var t=this.get("start"),e=this.get("end");return[e.x-t.x,e.y-t.y]},e.prototype.getLinePath=function(){var t=this.get("start"),e=this.get("end"),n=[];return n.push(["M",t.x,t.y]),n.push(["L",e.x,e.y]),n},e.prototype.getTickEnd=function(t,e){var n=this.getSideVector(e);return{x:t.x+n[0],y:t.y+n[1]}},e.prototype.getTickPoint=function(t){var e=this.get("start"),n=this.get("end"),r=n.x-e.x,i=n.y-e.y;return{x:e.x+r*t,y:e.y+i*t}},e.prototype.renderTitle=function(){var t=this.get("title"),e=this.getTickPoint(.5),n=t.offset;if(i.isNil(n)){n=20;var r=this.get("labelsGroup");if(r){n+=this.getMaxLabelWidth(r)+(this.get("label").offset||this.get("_labelOffset"))}}var o=t.textStyle,s=i.mix({},o);if(t.text){var u=this.getAxisVector();if(t.autoRotate&&i.isNil(o.rotate)){var c=0;if(!i.snapEqual(u[1],0)){var l=[u[0],u[1]];c=a.angleTo(l,[1,0],!0)}s.rotate=c*(180/Math.PI)}else i.isNil(o.rotate)||(s.rotate=o.rotate/180*Math.PI);var h=this.getSideVector(n),f=void 0,p=t.position;f="start"===p?{x:this.get("start").x+h[0],y:this.get("start").y+h[1]}:"end"===p?{x:this.get("end").x+h[0],y:this.get("end").y+h[1]}:{x:e.x+h[0],y:e.y+h[1]},s.x=f.x,s.y=f.y,s.text=t.text;var d=this.addShape("Text",{zIndex:2,attrs:s});d.name="axis-title",this.get("appendInfo")&&d.setSilent("appendInfo",this.get("appendInfo"))}},e.prototype.autoRotateLabels=function(){var t=this.get("labelsGroup"),e=this.get("title");if(t){var n=this.get("label").offset,r=e?e.offset:48;if(r<0)return;var a=this.getAxisVector(),o=void 0,s=void 0;if(i.snapEqual(a[0],0)&&e&&e.text)(s=this.getMaxLabelWidth(t))>r-n-12&&(o=-1*Math.acos((r-n-12)/s));else if(i.snapEqual(a[1],0)&&t.getCount()>1){var u=Math.abs(this._getAvgLabelLength(t));(s=this.getMaxLabelWidth(t))>u&&(o=Math.asin(1.25*(r-n-12)/s))}if(o){var c=this.get("factor");i.each(t.get("children"),function(t){t.rotateAtStart(o),i.snapEqual(a[1],0)&&(c>0?t.attr("textAlign","left"):t.attr("textAlign","right"))})}}},e}(r);t.exports=o},function(t,e,n){var r=n(5).Group,i=n(0),a=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){return{zIndex:1,type:"line",lineStyle:null,items:null,alternateColor:null,matrix:null,hideFirstLine:!1,hideLastLine:!1,hightLightZero:!0,zeroLineStyle:{stroke:"#000",lineDash:[0,0]}}},e.prototype._renderUI=function(){t.prototype._renderUI.call(this),this._drawLines()},e.prototype._drawLines=function(){var t=this.get("lineStyle"),e=this.get("items");e&&e.length&&(this._precessItems(e),this._drawGridLines(e,t))},e.prototype._precessItems=function(t){var e=this,n=void 0;i.each(t,function(t,r){n&&e.get("alternateColor")&&e._drawAlternativeBg(t,n,r),n=t})},e.prototype._drawGridLines=function(t,e){var n=this,r=this.get("type"),a=void 0,o=void 0,s=void 0,u=void 0,c=t.length;"line"===r||"polygon"===r?i.each(t,function(t,l){n.get("hideFirstLine")&&0===l||n.get("hideLastLine")&&l===c-1||(u=t.points,o=[],"line"===r?(o.push(["M",u[0].x,u[0].y]),o.push(["L",u[u.length-1].x,u[u.length-1].y])):i.each(u,function(t,e){0===e?o.push(["M",t.x,t.y]):o.push(["L",t.x,t.y])}),s=n._drawZeroLine(r,l)?i.mix({},n.get("zeroLineStyle"),{path:o}):i.mix({},e,{path:o}),(a=n.addShape("path",{attrs:s})).name="axis-grid",a._id=t._id,a.set("coord",n.get("coord")),n.get("appendInfo")&&a.setSilent("appendInfo",n.get("appendInfo")))}):i.each(t,function(t,r){n.get("hideFirstLine")&&0===r||n.get("hideLastLine")&&r===c-1||(u=t.points,o=[],i.each(u,function(t,e){var n=t.radius;0===e?o.push(["M",t.x,t.y]):o.push(["A",n,n,0,0,t.flag,t.x,t.y])}),s=i.mix({},e,{path:o}),(a=n.addShape("path",{attrs:s})).name="axis-grid",a._id=t._id,a.set("coord",n.get("coord")),n.get("appendInfo")&&a.setSilent("appendInfo",n.get("appendInfo")))})},e.prototype._drawZeroLine=function(t,e){var n=this.get("tickValues");return!("line"!==t||!n||0!==n[e]||!this.get("hightLightZero"))},e.prototype._drawAlternativeBg=function(t,e,n){var r=this.get("alternateColor"),a=void 0,o=void 0,s=void 0;i.isString(r)?o=r:i.isArray(r)&&(o=r[0],s=r[1]),n%2==0?s&&(a=this._getBackItem(e.points,t.points,s)):o&&(a=this._getBackItem(e.points,t.points,o));var u=this.addShape("Path",{attrs:a});u.name="axis-grid-rect",u._id=t._id&&t._id.replace("grid","grid-rect"),u.set("coord",this.get("coord")),this.get("appendInfo")&&u.setSilent("appendInfo",this.get("appendInfo"))},e.prototype._getBackItem=function(t,e,n){var r=[],a=this.get("type");if("line"===a)r.push(["M",t[0].x,t[0].y]),r.push(["L",t[t.length-1].x,t[t.length-1].y]),r.push(["L",e[e.length-1].x,e[e.length-1].y]),r.push(["L",e[0].x,e[0].y]),r.push(["Z"]);else if("polygon"===a){i.each(t,function(t,e){0===e?r.push(["M",t.x,t.y]):r.push(["L",t.x,t.y])});for(var o=e.length-1;o>=0;o--)r.push(["L",e[o].x,e[o].y]);r.push(["Z"])}else{var s=t[0].flag;i.each(t,function(t,e){var n=t.radius;0===e?r.push(["M",t.x,t.y]):r.push(["A",n,n,0,0,t.flag,t.x,t.y])});for(var u=e.length-1;u>=0;u--){var c=e[u],l=c.radius;u===e.length-1?r.push(["M",c.x,c.y]):r.push(["A",l,l,0,0,1===s?0:1,c.x,c.y])}}return{fill:n,path:r}},e}(r);t.exports=a},function(t,e,n){var r=n(0),i=n(41),a=r.MatrixUtil.vec2,o=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return r.mix({},e,{type:"circle",tickInterval:null,startAngle:-Math.PI/2,endAngle:3*Math.PI/2,line:{lineWidth:1,stroke:"#C0D0E0"},tickLine:{lineWidth:1,stroke:"#C0D0E0",length:5},_labelOffset:5})},e.prototype.parseTick=function(t,e,n){return{text:t,value:e/n}},e.prototype._getCirclePoint=function(t,e){var n=this.get("center");return e=e||this.get("radius"),{x:n.x+Math.cos(t)*e,y:n.y+Math.sin(t)*e}},e.prototype.getTickPoint=function(t){var e=this.get("startAngle"),n=e+(this.get("endAngle")-e)*t;return this._getCirclePoint(n)},e.prototype.getSideVector=function(t,e){var n=this.get("center"),i=[e.x-n.x,e.y-n.y];if(!r.isNil(t)){var o=a.length(i);a.scale(i,i,t/o)}return i},e.prototype.getSidePoint=function(t,e){var n=this.getSideVector(e,t);return{x:t.x+n[0],y:t.y+n[1]}},e.prototype.getTickEnd=function(t,e){var n=this.get("tickLine");return e=e||n.length,this.getSidePoint(t,e)},e.prototype.getTextAnchor=function(t){var e=void 0;return r.snapEqual(t[0],0)?e="center":t[0]>0?e="left":t[0]<0&&(e="right"),e},e.prototype.getLinePath=function(){var t=this.get("center"),e=t.x,n=t.y,r=this.get("radius"),i=r,a=this.get("startAngle"),o=this.get("endAngle"),s=this.get("inner"),u=[];if(Math.abs(o-a)===2*Math.PI)u=[["M",e,n],["m",0,-i],["a",r,i,0,1,1,0,2*i],["a",r,i,0,1,1,0,-2*i],["z"]];else{var c=this._getCirclePoint(a),l=this._getCirclePoint(o),h=Math.abs(o-a)>Math.PI?1:0,f=a>o?0:1;if(s){var p=this.getSideVector(s*r,c),d=this.getSideVector(s*r,l),g={x:p[0]+e,y:p[1]+n},y={x:d[0]+e,y:d[1]+n};u=[["M",g.x,g.y],["L",c.x,c.y],["A",r,i,0,h,f,l.x,l.y],["L",y.x,y.y],["A",r*s,i*s,0,h,Math.abs(f-1),g.x,g.y]]}else u=[["M",e,n],["L",c.x,c.y],["A",r,i,0,h,f,l.x,l.y],["L",e,n]]}return u},e.prototype.addLabel=function(e,n,r){var i=this.get("label").offset||this.get("_labelOffset")||.001;n=this.getSidePoint(n,i),t.prototype.addLabel.call(this,e,n,r)},e.prototype.autoRotateLabels=function(){var t=this.get("ticks"),e=this.get("labelsGroup");if(e&&t.length>12){var n=this.get("radius"),i=this.get("startAngle"),a=this.get("endAngle")-i,o=a/(t.length-1),s=Math.sin(o/2)*n*2,u=this.getMaxLabelWidth(e);r.each(e.get("children"),function(e,n){var r=t[n].value*a+i,o=r%(2*Math.PI);uMath.PI&&(r-=Math.PI),r-=Math.PI/2,e.attr("textAlign","center")):o>Math.PI/2?r-=Math.PI:o0&&void 0!==arguments[0]?arguments[0]:{};return this.options.push(r.mix({type:"line"},t)),this},t.prototype.arc=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.options.push(r.mix({type:"arc"},t)),this},t.prototype.text=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.options.push(r.mix({type:"text"},t)),this},t.prototype.image=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.options.push(r.mix({type:"image"},t)),this},t.prototype.region=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.options.push(r.mix({type:"region"},t)),this},t.prototype.regionFilter=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.options.push(r.mix({type:"regionFilter"},t)),this},t.prototype.dataMarker=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.options.push(r.mix({type:"dataMarker"},t)),this},t.prototype.dataRegion=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.options.push(r.mix({type:"dataRegion"},t)),this},t.prototype.html=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.options.push(r.mix({type:"html"},t)),this},t.prototype.render=function(t){var e=this,n=this,i=n._creatGuides(),a=n.backGroup||this.backContainer;r.each(i,function(r){r.top&&(a=n.frontGroup||e.frontContainer),r.render(t,a)})},t.prototype.clear=function(){this.options=[],this.reset()},t.prototype.changeVisible=function(t){var e=this.guides;r.each(e,function(e){e.setVisible(t)})},t.prototype.reset=function(){var t=this.guides;r.each(t,function(t){t.remove()}),this.guides=[],this.backGroup&&this.backGroup.remove(),this.frontGroup&&this.frontGroup.remove()},t}();t.exports=a},function(t,e,n){t.exports={Line:n(289),Text:n(128),Image:n(290),Region:n(291),RegionFilter:n(292),Html:n(293),Arc:n(294),DataMarker:n(129),DataRegion:n(295)}},function(t,e,n){var r=n(0),i=n(17),a=r.MatrixUtil.vec2,o=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return r.mix({},e,{type:"line",start:null,end:null,lineStyle:{stroke:"#000",lineWidth:1},text:{position:"end",autoRotate:!0,style:{fill:"#999",fontSize:12,fontWeight:500,fontFamily:"sans-serif"},content:null}})},e.prototype.render=function(t,e){var n=this.parsePoint(t,this.start),r=this.parsePoint(t,this.end),i=e.addGroup({viewId:e.get("viewId")});this._drawLines(n,r,i),this.text&&this.text.content&&this._drawText(n,r,i),this.el=i},e.prototype._drawLines=function(t,e,n){var i=[["M",t.x,t.y],["L",e.x,e.y]],a=n.addShape("Path",{attrs:r.mix({path:i},this.lineStyle)});a.name="guide-line",this.appendInfo&&a.setSilent("appendInfo",this.appendInfo)},e.prototype._drawText=function(t,e,n){var i=this.text,o=i.position,s=i.style,u=void 0;((u="start"===o?0:"center"===o?.5:r.isString(o)&&-1!==o.indexOf("%")?parseInt(o,10)/100:r.isNumber(o)?o:1)>1||u<0)&&(u=1);var c={x:t.x+(e.x-t.x)*u,y:t.y+(e.y-t.y)*u};if(i.offsetX&&(c.x+=i.offsetX),i.offsetY&&(c.y+=i.offsetY),c.text=i.content,c=r.mix({},c,s),i.autoRotate&&r.isNil(s.rotate)){var l=a.angleTo([e.x-t.x,e.y-t.y],[1,0],1);c.rotate=l}else r.isNil(s.rotate)||(c.rotate=s.rotate*Math.PI/180);var h=n.addShape("Text",{attrs:c});h.name="guide-line-text",this.appendInfo&&h.setSilent("appendInfo",this.appendInfo)},e}(i);t.exports=o},function(t,e,n){var r=n(0),i=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return r.mix({},e,{type:"image",zIndex:1,start:null,end:null,src:null,offsetX:null,offsetY:null})},e.prototype.render=function(t,e){var n=this.parsePoint(t,this.start),r={x:n.x,y:n.y};if(r.img=this.src,this.end){var i=this.parsePoint(t,this.end);r.width=i.x-n.x,r.height=i.y-n.y}else this.width&&(r.width=this.width),this.height&&(r.height=this.height);this.offsetX&&(r.x+=this.offsetX),this.offsetY&&(r.y+=this.offsetY);var a=e.addShape("Image",{zIndex:1,attrs:r});a.name="guide-image",this.appendInfo&&a.setSilent("appendInfo",this.appendInfo),this.el=a},e}(n(17));t.exports=i},function(t,e,n){var r=n(0),i=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return r.mix({},e,{type:"region",zIndex:1,start:null,end:null,style:{lineWidth:0,fill:"#CCD7EB",opacity:.4}})},e.prototype.render=function(t,e){var n=this.style,i=this._getPath(t),a=e.addShape("path",{zIndex:this.zIndex,attrs:r.mix({path:i},n)});a.name="guide-region",this.appendInfo&&a.setSilent("appendInfo",this.appendInfo),this.el=a},e.prototype._getPath=function(t){var e=this.parsePoint(t,this.start),n=this.parsePoint(t,this.end),r=[];return r.push(["M",e.x,e.y]),r.push(["L",n.x,e.y]),r.push(["L",n.x,n.y]),r.push(["L",e.x,n.y]),r.push(["z"]),r},e}(n(17));t.exports=i},function(t,e,n){var r=n(0),i=n(17),a=n(5),o=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return r.mix({},e,{type:"regionFilter",zIndex:1,top:!0,start:null,end:null,color:null,apply:null,style:{opacity:1}})},e.prototype.render=function(t,e){var n=this,r=n.view,i=e.addGroup();r.once("afterpaint",function(){if(!i.get("destroyed")){n._drawShapes(r,i);var a=n._drawClip(t,e);i.attr({clip:a})}}),n.appendInfo&&i.setSilent("appendInfo",n.appendInfo),n.el=i},e.prototype._drawShapes=function(t,e){var n=this,i=[];return t.getAllGeoms().map(function(t){var a=t.getShapes(),o=t.get("type");return n._geomFilter(o)&&a.map(function(t){var a=t.type,o=r.cloneDeep(t.attr());n._adjustDisplay(o);var s=e.addShape(a,{attrs:o});return i.push(s),t}),t}),i},e.prototype._drawClip=function(t){var e=this.parsePoint(t,this.start),n=this.parsePoint(t,this.end);return new a.Rect({attrs:{x:e.x,y:e.y,width:n.x-e.x,height:n.y-e.y,opacity:1}})},e.prototype._adjustDisplay=function(t){var e=this.color;t.fill&&(t.fill=t.fillStyle=e),t.stroke=t.strokeStyle=e},e.prototype._geomFilter=function(t){return!this.apply||r.inArray(this.apply,t)},e}(i);t.exports=o},function(t,e,n){var r=n(0),i=r.DomUtil,a=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return r.mix({},e,{type:"html",zIndex:7,position:null,alignX:"middle",alignY:"middle",offsetX:null,offsetY:null,html:null})},e.prototype.render=function(t,e){var n=this.parsePoint(t,this.position),a=e.get("canvas").get("el").parentNode,o=i.createDom('
    ');a.appendChild(o);var s=this.html;r.isFunction(s)&&(s=s(this.xScales,this.yScales));var u=i.createDom(s);o.appendChild(u),this._setDomPosition(o,u,n),this.el=o},e.prototype._setDomPosition=function(t,e,n){var r=this.alignX,a=this.alignY,o=i.getOuterWidth(e),s=i.getOuterHeight(e),u={x:n.x,y:n.y};"middle"===r&&"top"===a?u.x-=Math.round(o/2):"middle"===r&&"bottom"===a?(u.x-=Math.round(o/2),u.y-=Math.round(s)):"left"===r&&"bottom"===a?u.y-=Math.round(s):"left"===r&&"middle"===a?u.y-=Math.round(s/2):"left"===r&&"top"===a?(u.x=n.x,u.y=n.y):"right"===r&&"bottom"===a?(u.x-=Math.round(o),u.y-=Math.round(s)):"right"===r&&"middle"===a?(u.x-=Math.round(o),u.y-=Math.round(s/2)):"right"===r&&"top"===a?u.x-=Math.round(o):(u.x-=Math.round(o/2),u.y-=Math.round(s/2)),this.offsetX&&(u.x+=this.offsetX),this.offsetY&&(u.y+=this.offsetY),i.modifyCSS(t,{position:"absolute",top:Math.round(u.y)+"px",left:Math.round(u.x)+"px",visibility:"visible",zIndex:this.zIndex})},e.prototype.remove=function(){var t=this.el;t&&t.parentNode.removeChild(t)},e}(n(17));t.exports=a},function(t,e,n){function r(t,e){var n=t.x-e.x,r=t.y-e.y,i=void 0;return 0===r?i=n<0?o/2:270*o/180:n>=0&&r>0?i=2*o-s(n/r):n<=0&&r<0?i=o-s(n/r):n>0&&r<0?i=o+s(-n/r):n<0&&r>0&&(i=s(n/-r)),i}var i=n(0),a=n(17),o=Math.PI,s=Math.atan,u=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return i.mix({},e,{type:"arc",start:null,end:null,style:{stroke:"#999",lineWidth:1}})},e.prototype.render=function(t,e){var n=this.parsePoint(t,this.start),a=this.parsePoint(t,this.end),s=t.getCenter(),u=Math.sqrt((n.x-s.x)*(n.x-s.x)+(n.y-s.y)*(n.y-s.y)),c=void 0;if(i.isNumberEqual(n.x,a.x)&&i.isNumberEqual(n.y,a.y))c=[["M",n.x,n.y],["A",u,u,0,1,1,2*s.x-n.x,2*s.y-n.y],["A",u,u,0,1,1,n.x,n.y]];else{var l=r(n,s),h=r(a,s);ho?1:0;c=[["M",n.x,n.y],["A",u,u,0,f,1,a.x,a.y]]}var p=e.addShape("path",{zIndex:this.zIndex,attrs:i.mix({path:c},this.style)});p.name="guide-arc",this.appendInfo&&p.setSilent("appendInfo",this.appendInfo),this.el=p},e}(a);t.exports=u},function(t,e,n){function r(t){var e=void 0;return i.each(t,function(t){if(t)return e=t,!1}),e}var i=n(0),a=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return i.mix({},e,{type:"dataRegion",start:null,end:null,bbox:null,regionStyle:{lineWidth:0,fill:"#CCD7EB",opacity:.4}})},e.prototype.render=function(e,n){var r=this.lineLength,a=this._getRegionData(e);this.bbox=this._dataBbox(a),this._drawRegion(a,n);var o="upward"===this.direction?1:-1,s=this.style.text;s.textBaseline=o>0?"bottom":"top";var u={x:this.bbox.xMin+(this.bbox.xMax-this.bbox.xMin)/2,y:this.bbox.yMin-this.lineLength*o};n.addShape("text",{attrs:i.mix({text:this.content},s,u)});var c=Math.abs(a[0].y-this.bbox.yMin);c+=r,t.prototype.set.call(this,"lineLength",c),t.prototype.set.call(this,"content",null),t.prototype.set.call(this,"position",this.start),t.prototype.render.call(this,e,n);var l=0;o>0?(l=Math.abs(a[a.length-1].y-this.bbox.yMin),l+=r):l=r,t.prototype.set.call(this,"lineLength",l),t.prototype.set.call(this,"position",this.end),t.prototype.render.call(this,e,n)},e.prototype._getRegionData=function(t){for(var e=[],n=this.view.get("data"),i=r(this.xScales).field,a=r(this.yScales).field,o=this._getDataIndex(this.start,n),s=this._getDataIndex(this.end,n),u=o;u<=s;u++){var c=n[u],l=c[i],h=c[a],f=this.parsePoint(t,[l,h]);e.push(f)}return e},e.prototype._getDataIndex=function(t,e){for(var n=r(this.xScales).field,i=t[0],a=0;a0){var a=e.getXScale(),o=e.getYScale(),s=a.field,u=o.field,c=t.get("origin")._origin,l=e.get("labelContainer").get("labelsGroup").get("children");r.each(l,function(e){var r=e.get("origin")||[];r[s]===c[s]&&r[u]===c[u]&&(e.set("visible",n),t.set("gLabel",e))})}}},t.prototype._bindFilterEvent=function(t,e){var n=this,r=this.chart,i=e.field;t.on("itemfilter",function(t){var e=t.range;r.filterShape(function(t,r,a){if(t[i]){var o=t[i]>=e[0]&&t[i]<=e[1];return n._filterLabels(r,a,o),o}return!0});for(var a=r.getAllGeoms()||[],s=function(t){var n=a[t];"heatmap"===n.get("type")&&o(function(){n.drawWithRange(e)})},u=0;u1?u:n;if("left"===m[0]||"right"===m[0])s=c.br.y,x=this._getXAlign(m[0],o,n,l,d,g),b=e?e.get("y")+e.getHeight()+y:this._getYAlignVertical(m[1],s,w,l,0,g,a.get("height"));else if("top"===m[0]||"bottom"===m[0])if(b=this._getYAlignHorizontal(m[0],s,n,l,p,g),e){var _=e.getWidth();x=e.get("x")+_+y}else x=this._getXAlign(m[1],o,w,l,0,g),"right"===m[1]&&(x=c.br.x-w.totalWidth);t.move(x+h,b+f)},t.prototype._getXAlign=function(t,e,n,r,i,a){var o="left"===t?r.minX-i-a[3]:r.maxX+a[1];return"center"===t&&(o=(e-n.totalWidth)/2),o},t.prototype._getYAlignHorizontal=function(t,e,n,r,i,a){return"top"===t?r.minY-i-a[0]:r.maxY+a[2]},t.prototype._getYAlignVertical=function(t,e,n,r,i,a,o){var s="top"===t?r.minY-i-a[0]:e-n.totalHeight;return"center"===t&&(s=(o-n.totalHeight)/2),s},t.prototype._getSubRegion=function(t){var e=0,n=0,i=0,a=0;return r.each(t,function(t){var r=t.getWidth(),o=t.getHeight();e1){var g=Array(f.callback.length-1).fill("");l.color=f.mapping.apply(f,[c].concat(g)).join("")||b.defaultColor}else l.color=f.mapping(c).join("")||b.defaultColor;if(y&&p)if(p.callback&&p.callback.length>1){var x=Array(p.callback.length-1).fill("");m=p.mapping.apply(p,[c].concat(x)).join("")}else m=p.mapping(c).join("");var w=a.getShapeFactory(v).getMarkerCfg(m,l);r.isFunction(m)&&(w.symbol=m),d.push({value:i,dataValue:c,checked:h,marker:w})});var A=r.deepMix({},b.legend[S[0]],l[c]||l,{viewId:x.get("_id"),maxLength:M,viewTheme:b,items:d});A.title&&r.deepMix(A,{title:{text:t.alias||t.field}});var C=void 0;return u._isTailLegend(l,n)?(A.chart=u.chart,A.geom=n,C=p.addGroup(i.Tail,A)):C=p.addGroup(i.Category,A),u._bindClickEvent(C,t,o),f[s].push(C),C},t.prototype._addContinuousLegend=function(t,e,n){var a=this.legends;a[n]=a[n]||[];var o=this.container,s=t.field,u=t.getTicks(),c=[],l=void 0,h=void 0,f=void 0,p=this.viewTheme;r.each(u,function(n){var r=n.value,i=t.invert(r),a=e.mapping(i).join("");c.push({value:n.tickValue,attrValue:a,scaleValue:r}),0===r&&(h=!0),1===r&&(f=!0)}),h||c.push({value:t.min,attrValue:e.mapping(0).join(""),scaleValue:0}),f||c.push({value:t.max,attrValue:e.mapping(1).join(""),scaleValue:1});var d=this.options,g=n.split("-"),y=p.legend[g[0]];(d&&!1===d.slidable||d[s]&&!1===d[s].slidable)&&(y=r.mix({},y,p.legend.gradient));var v=r.deepMix({},y,d[s]||d,{items:c,attr:e,viewTheme:p,numberFormatter:t.formatter});return v.title&&r.deepMix(v,{title:{text:t.alias||t.field}}),"color"===e.type?l=o.addGroup(i.Color,v):"size"===e.type&&(l=o.addGroup(i.Size,v)),this._bindFilterEvent(l,t),a[n].push(l),l},t.prototype._isTailLegend=function(t,e){if(t.hasOwnProperty("attachLast")&&t.attachLast){var n=e.get("type");if("line"===n||"lineStack"===n||"area"===n||"areaStack"===n)return!0}return!1},t.prototype._adjustPosition=function(t,e){var n=void 0;if(e)n="right-top";else if(r.isArray(t))n=String(t[0])+"-"+String(t[1]);else{var i=t.split("-");1===i.length?("left"===i[0]&&(n="left-bottom"),"right"===i[0]&&(n="right-bottom"),"top"===i[0]&&(n="top-center"),"bottom"===i[0]&&(n="bottom-center")):n=t}return n},t.prototype.addLegend=function(t,e,n,r){var i=this.options,a=t.field,o=i[a],s=this.viewTheme;if(!1===o)return null;if(o&&o.custom)this.addCustomLegend(a);else{var u=i.position||s.defaultLegendPosition;u=this._adjustPosition(u,this._isTailLegend(i,n)),o&&o.position&&(u=this._adjustPosition(o.position,this._isTailLegend(o,n)));var c=void 0;c=t.isLinear?this._addContinuousLegend(t,e,u):this._addCategroyLegend(t,e,n,r,u),this._bindHoverEvent(c,a)}},t.prototype.addCustomLegend=function(t){var e=this.chart,n=this.viewTheme,a=this.container,o=this.options;t&&(o=o[t]);var s=o.position||n.defaultLegendPosition;s=this._adjustPosition(s);var u=this.legends;u[s]=u[s]||[];var c=o.items;if(c){var l=e.getAllGeoms();r.each(c,function(t){var e=function(t,e){var n=void 0;return r.each(t,function(t){t.get("visible")&&t.getYScale().field===e&&(n=t)}),n}(l,t.value);r.isObject(t.marker)?t.marker.radius=t.marker.radius||4.5:t.marker={symbol:t.marker?t.marker:"circle",fill:t.fill,radius:4.5},t.checked=!!r.isNil(t.checked)||t.checked,t.geom=e});var h=e.get("canvas"),f=this.plotRange,p=s.split("-"),d="right"===p[0]||"left"===p[0]?f.bl.y-f.tr.y:h.get("width"),g=r.deepMix({},n.legend[p[0]],o,{maxLength:d,viewTheme:n,items:c}),y=a.addGroup(i.Category,g);return u[s].push(y),y.on("itemclick",function(t){o.onClick&&o.onClick(t)}),this._bindHoverEvent(y),y}},t.prototype.addMixedLegend=function(t,e){var n=[];r.each(t,function(t){var i=t.field;r.each(e,function(e){if(e.getYScale()===t&&t.values&&t.values.length>0){var r=e.get("shapeType")||"point",o=e.getDefaultValue("shape")||"circle",s=a.getShapeFactory(r),u={color:e.getDefaultValue("color")},c=s.getMarkerCfg(o,u),l={value:i,marker:c};n.push(l)}})});var i={custom:!0,items:n};this.options=r.deepMix({},i,this.options);var o=this.addCustomLegend();this._bindClickEventForMix(o)},t.prototype.alignLegends=function(){var t=this,e=t.legends,n=t._getRegion(e);t.totalRegion=n;var i=0;return r.each(e,function(e,a){var o=n.subs[i];r.each(e,function(n,r){var i=e[r-1];n.get("useHtml")&&!n.get("autoPosition")||t._alignLegend(n,i,o,a)}),i++}),this},t}();t.exports=s},function(t,e,n){t.exports={Category:n(130),Tail:n(298),Color:n(299),Size:n(301)}},function(t,e,n){var r=n(0),i=n(130),a=n(2),o=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return r.mix({},e,{type:"tail-legend",layout:"vertical",autoLayout:!0})},e.prototype._addItem=function(t){var e=this.get("itemsGroup"),n=this._getNextX(),i=this.get("unCheckColor"),a=e.addGroup({x:0,y:0,value:t.value,scaleValue:t.scaleValue,checked:t.checked});a.translate(n,0),a.set("viewId",e.get("viewId"));var o=this.get("textStyle"),s=this.get("_wordSpaceing"),u=0;if(t.marker){var c=r.mix({},t.marker,{x:t.marker.radius,y:0});t.checked||(c.fill&&(c.fill=i),c.stroke&&(c.stroke=i));var l=a.addShape("marker",{type:"marker",attrs:c});l.attr("cursor","pointer"),l.name="legend-marker",u+=l.getBBox().width+s}var h=r.mix({},o,{x:u,y:0,text:this._formatItemValue(t.value)});t.checked||r.mix(h,{fill:i});var f=a.addShape("text",{attrs:h});f.attr("cursor","pointer"),f.name="legend-text",this.get("appendInfo")&&f.setSilent("appendInfo",this.get("appendInfo"));var p=a.getBBox(),d=this.get("itemWidth"),g=a.addShape("rect",{attrs:{x:n,y:0-p.height/2,fill:"#fff",fillOpacity:0,width:d||p.width,height:p.height}});return g.attr("cursor","pointer"),g.setSilent("origin",t),g.name="legend-item",this.get("appendInfo")&&g.setSilent("appendInfo",this.get("appendInfo")),a.name="legendGroup",a},e.prototype._adjust=function(){if(this.get("geom")){var t=this.get("geom").get("dataArray"),e=this.get("itemsGroup").get("children"),n=0;r.each(e,function(e){var i=t[n],a=i[i.length-1].y;r.isArray(a)&&(a=a[1]);var o=e.getBBox().height,s=e.get("x"),u=a-o/2;e.translate(s,u),n++}),this.get("autoLayout")&&this._antiCollision(e)}},e.prototype._renderUI=function(){var t=this;t.get("useHtml")?t._renderHTML():(t._renderItems(),t.get("autoWrap")&&t._adjustItems(),t._renderBack());t.get("chart").once("afterpaint",function(){t._adjust()})},e.prototype._getPreviousY=function(t){return t.attr("matrix")[7]+t.getBBox().height},e.prototype._adjustDenote=function(t,e,n){var r=2*-a.legend.legendMargin;t.addShape("path",{attrs:{path:"M-2,"+e+"L"+r+","+(n+3),lineWidth:1,lineDash:[2,2],stroke:"#999999"}})},e.prototype._antiCollision=function(t){var e=this;t.sort(function(t,e){return t.attr("matrix")[7]-e.attr("matrix")[7]});var n=!0,r=e.get("chart").get("plotRange"),i=r.tl.y,a=Math.abs(i-r.bl.y),o=t[0].getBBox().height,s=Number.MIN_VALUE,u=0,c=t.map(function(t){var e=t.attr("matrix")[7];return e>u&&(u=e),e0){var d=c[l-1],g=c[l];d.pos+d.size>g.pos&&(d.size+=g.size,d.targets=d.targets.concat(g.targets),c.splice(l,1),n=!0)}}l=0;var y=this.get("itemsGroup").addGroup();c.forEach(function(n){var r=i+o;n.targets.forEach(function(){var i=t[l].attr("matrix")[7],a=n.pos+r-o/2;Math.abs(i-a)>o/2&&e._adjustDenote(y,a,i-e.attr("matrix")[7]/2),t[l].translate(0,-i),t[l].translate(0,a),r+=o,l++})})},e}(i);t.exports=o},function(t,e,n){var r=n(66).ColorUtil,i=n(0),a=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return i.mix({},e,{type:"color-legend",layout:"vertical",labelOffset:15,lineStyle:{lineWidth:1,stroke:"#fff"}})},e.prototype._renderSliderShape=function(){var t=this.get("slider").get("backgroundElement"),e=this.get("width"),n=this.get("height"),a=this.get("layout"),o=this.get("items"),s="",u=void 0;return"vertical"===a?(s+="l (90) ",i.each(o,function(t){u=r.toRGB(t.attrValue),s+=1-t.scaleValue+":"+u+" "})):(s+="l (0) ",i.each(o,function(t){u=r.toRGB(t.attrValue),s+=t.scaleValue+":"+u+" "})),this._addBackground(t,"Rect",{x:0,y:0,width:e,height:n,fill:s,strokeOpacity:0})},e.prototype._renderBackground=function(){var t=this,e=this.get("titleShape"),n=this.get("titleGap");n=e?e.getBBox().height+n:n;var a=this.get("width"),o=this.get("height"),s=this.get("layout"),u=this.get("items"),c="",l=void 0,h=[],f=this.addGroup();"vertical"===s?(c+="l (90) ",i.each(u,function(e,n){0!==n&&n!==u.length-1&&(h.push(["M",0,o-e.scaleValue*o]),h.push(["L",a,o-e.scaleValue*o])),l=r.toRGB(e.attrValue),c+=1-e.scaleValue+":"+l+" ",f.addShape("text",{attrs:i.mix({},{x:a+t.get("labelOffset")/2,y:o-e.scaleValue*o,text:t._formatItemValue(e.value)+""},t.get("textStyle"),{textAlign:"start"})})})):(c+="l (0) ",i.each(u,function(e,n){0!==n&&n!==u.length-1&&(h.push(["M",e.scaleValue*a,0]),h.push(["L",e.scaleValue*a,o])),l=r.toRGB(e.attrValue),c+=e.scaleValue+":"+l+" ",f.addShape("text",{attrs:i.mix({},{x:e.scaleValue*a,y:o+t.get("labelOffset"),text:t._formatItemValue(e.value)+""},t.get("textStyle"))})})),f.addShape("rect",{attrs:{x:0,y:0,width:a,height:o,fill:c,strokeOpacity:0}}),f.addShape("path",{attrs:i.mix({path:h},this.get("lineStyle"))}),f.move(0,n)},e}(n(132));t.exports=a},function(t,e,n){var r=n(0),i=r.DomUtil,a=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){return{range:null,middleAttr:null,backgroundElement:null,minHandleElement:null,maxHandleElement:null,middleHandleElement:null,currentTarget:null,layout:"vertical",width:null,height:null,pageX:null,pageY:null}},e.prototype._beforeRenderUI=function(){var t=this.get("layout"),e=this.get("backgroundElement"),n=this.get("minHandleElement"),r=this.get("maxHandleElement"),i=this.addShape("rect",{attrs:this.get("middleAttr")}),a="vertical"===t?"ns-resize":"ew-resize";this.add([e,n,r]),this.set("middleHandleElement",i),e.set("zIndex",0),i.set("zIndex",1),n.set("zIndex",2),r.set("zIndex",2),i.attr("cursor",a),n.attr("cursor",a),r.attr("cursor",a),this.sort()},e.prototype._renderUI=function(){"horizontal"===this.get("layout")?this._renderHorizontal():this._renderVertical()},e.prototype._transform=function(t){var e=this.get("range"),n=e[0]/100,r=e[1]/100,i=this.get("width"),a=this.get("height"),o=this.get("minHandleElement"),s=this.get("maxHandleElement"),u=this.get("middleHandleElement");o.resetMatrix(),s.resetMatrix(),"horizontal"===t?(u.attr({x:i*n,y:0,width:(r-n)*i,height:a}),o.translate(n*i,a),s.translate(r*i,a)):(u.attr({x:0,y:a*(1-r),width:i,height:(r-n)*a}),o.translate(i/2,(1-n)*a),s.translate(i/2,(1-r)*a))},e.prototype._renderHorizontal=function(){this._transform("horizontal")},e.prototype._renderVertical=function(){this._transform("vertical")},e.prototype._bindUI=function(){this.on("mousedown",r.wrapBehavior(this,"_onMouseDown"))},e.prototype._isElement=function(t,e){var n=this.get(e);if(t===n)return!0;if(n.isGroup){return n.get("children").indexOf(t)>-1}return!1},e.prototype._getRange=function(t,e){var n=t+e;return n=n>100?100:n,n=n<0?0:n},e.prototype._updateStatus=function(t,e){var n="x"===t?this.get("width"):this.get("height");t=r.upperFirst(t);var i=this.get("range"),a=this.get("page"+t),o=this.get("currentTarget"),s=this.get("rangeStash"),u="vertical"===this.get("layout")?-1:1,c=e["page"+t],l=(c-a)/n*100*u,h=void 0;i[1]<=i[0]?(this._isElement(o,"minHandleElement")||this._isElement(o,"maxHandleElement"))&&(i[0]=this._getRange(l,i[0]),i[1]=this._getRange(l,i[0])):(this._isElement(o,"minHandleElement")&&(i[0]=this._getRange(l,i[0])),this._isElement(o,"maxHandleElement")&&(i[1]=this._getRange(l,i[1]))),this._isElement(o,"middleHandleElement")&&(h=s[1]-s[0],i[0]=this._getRange(l,i[0]),i[1]=i[0]+h,i[1]>100&&(i[1]=100,i[0]=i[1]-h)),this.emit("sliderchange",{range:i}),this.set("page"+t,c),this._renderUI(),this.get("canvas").draw()},e.prototype._onMouseDown=function(t){var e=t.currentTarget,n=t.event,r=this.get("range");n.stopPropagation(),n.preventDefault(),this.set("pageX",n.pageX),this.set("pageY",n.pageY),this.set("currentTarget",e),this.set("rangeStash",[r[0],r[1]]),this._bindCanvasEvents()},e.prototype._bindCanvasEvents=function(){var t=this.get("canvas").get("containerDOM");this.onMouseMoveListener=i.addEventListener(t,"mousemove",r.wrapBehavior(this,"_onCanvasMouseMove")),this.onMouseUpListener=i.addEventListener(t,"mouseup",r.wrapBehavior(this,"_onCanvasMouseUp")),this.onMouseLeaveListener=i.addEventListener(t,"mouseleave",r.wrapBehavior(this,"_onCanvasMouseUp"))},e.prototype._onCanvasMouseMove=function(t){if(!this._mouseOutArea(t)){"horizontal"===this.get("layout")?this._updateStatus("x",t):this._updateStatus("y",t)}},e.prototype._onCanvasMouseUp=function(){this._removeDocumentEvents()},e.prototype._removeDocumentEvents=function(){this.onMouseMoveListener.remove(),this.onMouseUpListener.remove()},e.prototype._mouseOutArea=function(t){var e=this.get("canvas").get("el").getBoundingClientRect(),n=this.get("parent"),r=n.getBBox(),i=n.attr("matrix")[6],a=n.attr("matrix")[7],o=i+r.width,s=a+r.height,u=t.clientX-e.x,c=t.clientY-e.y;return uo||cs},e}(n(5).Group);t.exports=a},function(t,e,n){var r=n(0),i=n(2),a=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return r.mix({},e,{type:"size-legend",width:100,height:200,_circleStyle:{stroke:"#4E7CCC",fill:"#fff",fillOpacity:0},textStyle:{fill:"#333",textAlign:"start",textBaseline:"middle",fontFamily:i.fontFamily},inRange:{fill:"white",stroke:"#5d7ca3",lineWidth:2},inRangeSlider:{fill:"#5d7ca3"},backgroundCircle:{stroke:"#ccc",fill:"white",lineWidth:2}})},e.prototype._renderSliderShape=function(){var t=this.get("slider").get("backgroundElement"),e=this.get("layout"),n="vertical"===e?2:this.get("width"),i="vertical"===e?this.get("height"):2,a=this.get("height")/2,o=this.get("inRangeSlider"),s="vertical"===e?[[0,15],[n,15],[n,i-5],[0,i-5]]:[[5,a+i],[5,a],[5+n-15-4,a],[5+n-15-4,a+i]],u=this.get("backgroundCircle");return t.addShape("circle",{attrs:r.mix({x:"vertical"===e?n/2:0,y:"vertical"===e?0:a,r:"vertical"===e?15:5},u)}),t.addShape("circle",{attrs:r.mix({x:n,y:"vertical"===e?i:a,r:"vertical"===e?5:15},u)}),this._addBackground(t,"Polygon",r.mix({points:s},o))},e.prototype._addHorizontalTrigger=function(t,e,n,i){var a=this.get("slider").get(t+"HandleElement"),o=-this.get("height")/2,s=a.addShape("circle",{attrs:r.mix({x:0,y:o,r:i},e)}),u=a.addShape("text",{attrs:r.mix(n,{x:0,y:o+i+10,textAlign:"center",textBaseline:"middle"})}),c="vertical"===this.get("layout")?"ns-resize":"ew-resize";s.attr("cursor",c),u.attr("cursor",c),this.set(t+"ButtonElement",s),this.set(t+"TextElement",u)},e.prototype._addVerticalTrigger=function(t,e,n,i){var a=this.get("slider").get(t+"HandleElement"),o=a.addShape("circle",{attrs:r.mix({x:-6,y:0,r:i},e)}),s=a.addShape("text",{attrs:r.mix(n,{x:i+10,y:0,textAlign:"start",textBaseline:"middle"})}),u="vertical"===this.get("layout")?"ns-resize":"ew-resize";o.attr("cursor",u),s.attr("cursor",u),this.set(t+"ButtonElement",o),this.set(t+"TextElement",s)},e.prototype._renderTrigger=function(){var t=this.get("firstItem"),e=this.get("lastItem"),n=this.get("layout"),i=this.get("textStyle"),a=this.get("inRange"),o=r.mix({},a),s=r.mix({},a),u=r.mix({text:this._formatItemValue(t.value)+""},i),c=r.mix({text:this._formatItemValue(e.value)+""},i);"vertical"===n?(this._addVerticalTrigger("min",o,u,5),this._addVerticalTrigger("max",s,c,15)):(this._addHorizontalTrigger("min",o,u,5),this._addHorizontalTrigger("max",s,c,15))},e.prototype._bindUI=function(){var t=this;if(t.get("slidable")){t.get("slider").on("sliderchange",function(e){var n=e.range,r=1*t.get("firstItem").value,i=1*t.get("lastItem").value,a=r+n[0]/100*(i-r),o=r+n[1]/100*(i-r),s=5+n[0]/100*10,u=5+n[1]/100*10;t._updateElement(a,o,s,u);var c=new Event("itemfilter",e,!0,!0);c.range=[a,o],t.emit("itemfilter",c)})}},e.prototype._updateElement=function(t,e,n,r){var i=this.get("minTextElement"),a=this.get("maxTextElement"),o=this.get("minButtonElement"),s=this.get("maxButtonElement");e>1&&(t=parseInt(t,10),e=parseInt(e,10)),i.attr("text",this._formatItemValue(t)+""),a.attr("text",this._formatItemValue(e)+""),o.attr("r",n),s.attr("r",r);if("vertical"===this.get("layout"))i.attr("x",n+10),a.attr("x",r+10);else{var u=-this.get("height")/2;i.attr("y",u+n+10),a.attr("y",u+r+10)}},e.prototype._addCircle=function(t,e,n,i,a){var o=this.addGroup(),s=this.get("_circleStyle"),u=this.get("textStyle"),c=this.get("titleShape"),l=this.get("titleGap");c&&(l+=c.getBBox().height),o.addShape("circle",{attrs:r.mix({x:t,y:e+l,r:0===n?1:n},s)}),o.addShape("text",{attrs:r.mix({x:a+5,y:e+l,text:0===i?"0":i},u)})},e.prototype._renderBackground=function(){var t=1*this.get("firstItem").attrValue,e=1*this.get("lastItem").attrValue,n=(t+e)/2;this._addCircle(e,e,e,n,2*e),this._addCircle(e,2*e+8+n,n,(t+n)/2,2*e),this._addCircle(e,2*(e+8+n)+t,t,t,2*e)},e}(n(132));t.exports=a},function(t,e,n){function r(t,e){if(!t)return!1;return!!t.className&&-1!==(a.isNil(t.className.baseVal)?t.className:t.className.baseVal).indexOf(e)}function i(t){var e=[];return a.each(t,function(t){var n=function(t,e){var n=-1;return a.each(t,function(t,r){var i=!0;for(var o in e)if(e.hasOwnProperty(o)&&-1===l.indexOf(o)&&!a.isObject(e[o])&&e[o]!==t[o]){i=!1;break}if(i)return n=r,!1}),n}(e,t);-1===n?e.push(t):e[n]=t}),e}var a=n(0),o=n(303),s=a.MatrixUtil.vec2,u=["line","area","path","areaStack"],c=["line","area"],l=["marker","showMarker"],h=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),a.assign(this,e),this.timeStamp=0}return t.prototype._normalizeEvent=function(t){var e=this.chart,n=this._getCanvas(),r=n.getPointByClient(t.clientX,t.clientY),i=n.get("pixelRatio");r.x=r.x/i,r.y=r.y/i;var a=e.getViewsByPoint(r);return r.views=a,r},t.prototype._getCanvas=function(){return this.chart.get("canvas")},t.prototype._getTriggerEvent=function(){var t=this.options.triggerOn,e=void 0;return t&&"mousemove"!==t?"click"===t?e="plotclick":"none"===t&&(e=null):e="plotmove",e},t.prototype._getDefaultTooltipCfg=function(){var t=this.chart,e=this.viewTheme,n=this.options,r=a.mix({},e.tooltip),i=t.getAllGeoms().filter(function(t){return t.get("visible")}),o=[];a.each(i,function(t){var e=t.get("type"),n=t.get("adjusts"),r=!1;n&&a.each(n,function(t){if("symmetric"===t.type||"Symmetric"===t.type)return r=!0,!1}),-1!==a.indexOf(o,e)||r||o.push(e)});var s=void 0;return i.length&&i[0].get("coord")&&"cartesian"===i[0].get("coord").type&&1===o.length&&("interval"===o[0]&&!1!==n.shared?s={zIndex:0,crosshairs:e.tooltipCrosshairsRect}:a.indexOf(c,o[0])>-1&&(s={crosshairs:e.tooltipCrosshairsLine})),a.mix(r,s,{isTransposed:!(!i.length||!i[0].get("coord"))&&i[0].get("coord").isTransposed})},t.prototype._bindEvent=function(){var t=this.chart,e=this._getTriggerEvent();e&&(t.on(e,a.wrapBehavior(this,"onMouseMove")),t.on("plotleave",a.wrapBehavior(this,"onMouseOut")))},t.prototype._offEvent=function(){var t=this.chart,e=this._getTriggerEvent();e&&(t.off(e,a.getWrapBehavior(this,"onMouseMove")),t.off("plotleave",a.getWrapBehavior(this,"onMouseOut")))},t.prototype._setTooltip=function(t,e,n,r){var o=this.tooltip,s=this.prePoint;if(!s||s.x!==t.x||s.y!==t.y){e=i(e),this.prePoint=t;var u=this.chart,c=this.viewTheme,l=a.isArray(t.x)?t.x[t.x.length-1]:t.x,h=a.isArray(t.y)?t.y[t.y.length-1]:t.y;o.get("visible")||u.emit("tooltip:show",{x:l,y:h,tooltip:o});var f=e[0],p=f.title||f.name;o.isContentChange(p,e)&&(u.emit("tooltip:change",{tooltip:o,x:l,y:h,items:e}),p=e[0].title||e[0].name,o.setContent(p,e),a.isEmpty(n)?o.clearMarkers():!0===this.options.hideMarkers?o.set("markerItems",n):o.setMarkers(n,c.tooltipMarker)),o.setPosition(l,h,r),o.show()}},t.prototype.hideTooltip=function(){var t=this.tooltip,e=this.chart,n=this._getCanvas();this.prePoint=null,t.hide(),e.emit("tooltip:hide",{tooltip:t}),n.draw()},t.prototype.onMouseMove=function(t){if(!a.isEmpty(t.views)){var e=this.timeStamp,n=+new Date,r={x:t.x,y:t.y};n-e>16&&!this.chart.get("stopTooltip")&&(this.showTooltip(r,t.views,t.shape),this.timeStamp=n)}},t.prototype.onMouseOut=function(t){this.tooltip.get("visible")&&(t&&t.toElement&&(r(t.toElement,"g2-tooltip")||function(t,e){for(var n=t.parentNode,i=!1;n&&n!==document.body;){if(r(n,e)){i=!0;break}n=n.parentNode}return i}(t.toElement,"g2-tooltip"))||this.hideTooltip())},t.prototype.renderTooltip=function(){var t=this;if(!t.tooltip){var e=t.chart,n=t.viewTheme,r=t._getCanvas(),i=t._getDefaultTooltipCfg(),s=t.options;(s=a.deepMix({plotRange:e.get("plotRange"),capture:!1,canvas:r,frontPlot:e.get("frontPlot"),viewTheme:n,backPlot:e.get("backPlot")},i,s)).crosshairs&&"rect"===s.crosshairs.type&&(s.zIndex=0),s.visible=!1,!1===s.shared&&a.isNil(s.position)&&(s.position="top");var u=new o(s);t.tooltip=u;var c=t._getTriggerEvent();if(!u.get("enterable")&&"plotmove"===c){var l=u.get("container");l&&(l.onmousemove=function(n){var r=t._normalizeEvent(n);e.emit(c,r)})}t._bindEvent()}},t.prototype.showTooltip=function(t,e,n){if(!a.isEmpty(e)&&t){this.tooltip||this.renderTooltip();var r=this.options,i=[],o=[];if(a.each(e,function(e){if(!e.get("tooltipEnable"))return!0;var s=e.get("geoms"),c=e.get("coord");a.each(s,function(e){var s=e.get("type");if(e.get("visible")&&!1!==e.get("tooltipCfg")){var l=e.get("dataArray");if(e.isShareTooltip()||!1===r.shared&&a.inArray(["area","line","path"],s))a.each(l,function(n){var l=e.findPoint(t,n);if(l){var h=e.getTipItems(l,r.title);-1!==a.indexOf(u,s)&&a.each(h,function(t){var e=t.point;if(e&&e.x&&e.y){var n=a.isArray(e.x)?e.x[e.x.length-1]:e.x,r=a.isArray(e.y)?e.y[e.y.length-1]:e.y;e=c.applyMatrix(n,r,1),t.x=e[0],t.y=e[1],t.showMarker=!0,i.push(t)}}),o=o.concat(h)}});else{var h=e.get("shapeContainer");n&&n.get("visible")&&n.get("origin")&&n.get("parent")===h&&(o=e.getTipItems(n.get("origin"),r.title))}}}),a.each(o,function(t){var e=t.point,n=a.isArray(e.x)?e.x[e.x.length-1]:e.x,r=a.isArray(e.y)?e.y[e.y.length-1]:e.y;e=c.applyMatrix(n,r,1),t.x=e[0],t.y=e[1]})}),o.length){var c=o[0];if(!o.every(function(t){return t.title===c.title})){var l=c,h=1/0;o.forEach(function(e){var n=s.distance([t.x,t.y],[e.x,e.y]);n1){var f=o[0],p=Math.abs(t.y-f.y);a.each(o,function(e){Math.abs(t.y-e.y)<=p&&(f=e,p=Math.abs(t.y-e.y))}),f&&f.x&&f.y&&(i=[f]),o=[f]}this._setTooltip(t,o,i,n)}else this.hideTooltip()}},t.prototype.clear=function(){var t=this.tooltip;t&&t.destroy(),this.tooltip=null,this.prePoint=null,this._offEvent()},t}();t.exports=h},function(t,e,n){function r(t,e){return t.getElementsByClassName(e)[0]}var i=n(0),a=n(55),o=n(2),s=i.DomUtil,u=function(t){function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,n));return r._init(),r.get("items")&&r._renderTooltip(),r._renderCrosshairs(),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){return{x:0,y:0,items:null,showTitle:!0,crosshairs:null,plotRange:null,offset:10,timeStamp:0,containerTpl:'
      ',itemTpl:'
    • {name}{value}
    • ',inPlot:!0,follow:!0,enterable:!1}},e.prototype._initTooltipWrapper=function(){var t=this.get("containerTpl"),e=this.get("canvas").get("el").parentNode,n=void 0;if(/^\#/.test(t)){var r=t.replace("#","");n=document.getElementById(r)}else n=s.createDom(t),s.modifyCSS(n,this.get("g2-tooltip")),e.appendChild(n),e.style.position="relative";this.set("container",n)},e.prototype._init=function(){var t=this.get("crosshairs"),e=this.get("frontPlot"),n=this.get("backPlot"),r=this.get("viewTheme")||o,a=void 0;t&&("rect"===t.type?(this.set("crosshairs",i.deepMix({},r.tooltipCrosshairsRect,t)),a=n.addGroup({zIndex:0})):(this.set("crosshairs",i.deepMix({},r.tooltipCrosshairsLine,t)),a=e.addGroup())),this.set("crosshairsGroup",a),this._initTooltipWrapper()},e.prototype._clearDom=function(){var t=this.get("container"),e=r(t,"g2-tooltip-title"),n=r(t,"g2-tooltip-list");e&&(e.innerHTML=""),n&&(n.innerHTML="")},e.prototype._addItem=function(t,e){var n=this.get("itemTpl"),a=i.substitute(n,i.mix({index:e},t)),o=s.createDom(a);s.modifyCSS(o,this.get("g2-tooltip-list-item"));var u=r(o,"g2-tooltip-marker");u&&s.modifyCSS(u,this.get("g2-tooltip-marker"));var c=r(o,"g2-tooltip-value");return c&&s.modifyCSS(c,this.get("g2-tooltip-value")),o},e.prototype._renderTooltip=function(){var t=this,e=t.get("showTitle"),n=t.get("titleContent"),a=t.get("container"),o=r(a,"g2-tooltip-title"),u=r(a,"g2-tooltip-list"),c=t.get("items");t._clearDom(),o&&e&&(s.modifyCSS(o,t.get("g2-tooltip-title")),o.innerHTML=n),u&&(s.modifyCSS(u,t.get("g2-tooltip-list")),i.each(c,function(e,n){u.appendChild(t._addItem(e,n))}))},e.prototype._clearCrosshairsGroup=function(){var t=this.get("crosshairsGroup");this.set("crossLineShapeX",null),this.set("crossLineShapeY",null),this.set("crosshairsRectShape",null),t.clear()},e.prototype._renderCrosshairs=function(){var t=this.get("crosshairs"),e=this.get("canvas"),n=this.get("plotRange"),r=this.get("isTransposed");if(t)switch(this._clearCrosshairsGroup(),t.type){case"x":this._renderHorizontalLine(e,n);break;case"y":this._renderVerticalLine(e,n);break;case"cross":this._renderHorizontalLine(e,n),this._renderVerticalLine(e,n);break;case"rect":this._renderBackground(e,n);break;default:r?this._renderHorizontalLine(e,n):this._renderVerticalLine(e,n)}},e.prototype._addCrossLineShape=function(t,e){var n=this.get("crosshairsGroup").addShape("line",{capture:!1,attrs:t});return n.hide(),this.set("crossLineShape"+e,n),n},e.prototype._renderVerticalLine=function(t,e){var n=this.get("crosshairs").style,r=i.mix({x1:0,y1:e?e.bl.y:t.get("height"),x2:0,y2:e?e.tl.y:0},n);this._addCrossLineShape(r,"Y")},e.prototype._renderHorizontalLine=function(t,e){var n=this.get("crosshairs").style,r=i.mix({x1:e?e.bl.x:t.get("width"),y1:0,x2:e?e.br.x:0,y2:0},n);this._addCrossLineShape(r,"X")},e.prototype._renderBackground=function(t,e){var n=this.get("crosshairs").style,r=this.get("crosshairsGroup"),a=i.mix({x:e?e.tl.x:0,y:e?e.tl.y:t.get("height"),width:e?e.br.x-e.bl.x:t.get("width"),height:e?Math.abs(e.tl.y-e.bl.y):t.get("height")},n),o=r.addShape("rect",{attrs:a});return o.hide(),this.set("crosshairsRectShape",o),o},e.prototype.isContentChange=function(t,e){var n=this.get("titleContent"),r=this.get("items"),a=!(t===n&&r.length===e.length);return a||i.each(e,function(t,e){var n=r[e];for(var o in t)if(t.hasOwnProperty(o)&&!i.isObject(t[o])&&t[o]!==n[o]){a=!0;break}if(a)return!1}),a},e.prototype.setContent=function(t,e){var n=+new Date;return this.set("items",e),this.set("titleContent",t),this.set("timeStamp",n),this._renderTooltip(),this},e.prototype.setMarkers=function(t,e){var n=this.get("markerGroup"),r=this.get("frontPlot");n?n.clear():(n=r.addGroup({zIndex:1,capture:!1}),this.set("markerGroup",n)),i.each(t,function(t){n.addShape("marker",{color:t.color,attrs:i.mix({fill:t.color,symbol:"circle",shadowColor:t.color},e,{x:t.x,y:t.y})})}),this.set("markerItems",t)},e.prototype.clearMarkers=function(){var t=this.get("markerGroup");t&&t.clear()},e.prototype.setPosition=function(t,e,n){var r=this.get("container"),a=this.get("crossLineShapeX"),o=this.get("crossLineShapeY"),u=this.get("crosshairsRectShape"),c=t,l=e,h=this.get("canvas").get("el"),f=s.getWidth(h),p=s.getHeight(h),d=this.get("offset"),g=void 0,y=this.get("prePosition")||{x:0,y:0};if(this.get("position")?(g=function(t,e,n,r,i){var a=r.clientWidth,o=r.clientHeight,s=0,u=0,c=20;if(i){var l=i.getBBox();s=l.width,u=l.height,t=l.x,e=l.y,c=5}switch(n){case"inside":t=t+s/2-a/2,e=e+u/2-o/2;break;case"top":t=t+s/2-a/2,e=e-o-c;break;case"left":t=t-a-c,e=e+u/2-o/2;break;case"right":t=t+s+c,e=e+u/2-o/2;break;case"bottom":default:t=t+s/2-a/2,e=e+u+c}return[t,e]}(t,e,this.get("position"),r,n),t=g[0],e=g[1]):this.get("enterable")?(g={x:t,y:e-=r.clientHeight/2},y&&t-y.x>0?t-=r.clientWidth+1:t+=1):(g=function(t,e,n,r,i){var a=n.clientWidth,o=n.clientHeight;return t+a+20>r?t=(t-=a+20)<0?0:t:t+=20,e+o+20>i?(e-=o+20,e=t<0?0:e):e+=20,[t,e]}(t,e,r,f,p),t=g[0],e=g[1]),this.set("prePosition",g),this.get("inPlot")){g=function(t,e,n,r,i){var a=n.clientWidth,o=n.clientHeight;return t+a>r.tr.x&&(t-=a+40),tr.bl.y&&(e-=o+40),e1&&b[_]>w[_]&&(M=w[_]),this.get("crosshairs").width)u.attr(_,M-this.get("crosshairs").width/2),u.attr(S,this.get("crosshairs").width);else if(i.isArray(b.point[_])&&!b.size){var A=b.point[_][1]-b.point[_][0];u.attr(_,b.point[_][0]),u.attr(S,A)}else d=3*b.size/4,u.attr(_,M-d),1===x.length?u.attr(S,3*b.size/2):u.attr(S,Math.abs(w[_]-b[_])+2*d)}var C=this.get("follow");r.style.left=C?t+"px":0,r.style.top=C?e+"px":0}},e.prototype.show=function(){var e=this.get("crossLineShapeX"),n=this.get("crossLineShapeY"),r=this.get("crosshairsRectShape"),i=this.get("markerGroup"),a=this.get("container"),o=this.get("canvas");e&&e.show(),n&&n.show(),r&&r.show(),i&&i.show(),t.prototype.show.call(this),a.style.visibility="visible",o.draw()},e.prototype.hide=function(){var e=this.get("container"),n=this.get("crossLineShapeX"),r=this.get("crossLineShapeY"),i=this.get("crosshairsRectShape"),a=this.get("markerGroup"),o=this.get("canvas");e.style.visibility="hidden",n&&n.hide(),r&&r.hide(),i&&i.hide(),a&&a.hide(),t.prototype.hide.call(this),o.draw()},e.prototype.destroy=function(){var e=this.get("crossLineShapeX"),n=this.get("crossLineShapeY"),r=this.get("markerGroup"),i=this.get("crosshairsRectShape"),a=this.get("container"),o=this.get("containerTpl");a&&!/^\#/.test(o)&&a.parentNode.removeChild(a),e&&e.remove(),n&&n.remove(),r&&r.remove(),i&&i.remove(),t.prototype.destroy.call(this)},e}(a);t.exports=u},function(t,e,n){function r(t,e){if(a.isNil(t)||a.isNil(e))return!1;var n=t.get("origin"),r=e.get("origin");return a.isNil(n)&&a.isNil(r)?a.isEqual(t,e):a.isEqual(n,r)}function i(t){t.shape&&t.shape.get("origin")&&(t.data=t.shape.get("origin"))}var a=n(0),o=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.view=null,this.canvas=null,a.assign(this,e),this._init()}return t.prototype._init=function(){this.pixelRatio=this.canvas.get("pixelRatio")},t.prototype._getShapeEventObj=function(t){return{x:t.x/this.pixelRatio,y:t.y/this.pixelRatio,target:t.target,toElement:t.event.toElement||t.event.relatedTarget}},t.prototype._getShape=function(t,e){return this.view.get("canvas").getShape(t,e)},t.prototype._getPointInfo=function(t){var e=this.view,n={x:t.x/this.pixelRatio,y:t.y/this.pixelRatio},r=e.getViewsByPoint(n);return n.views=r,n},t.prototype._getEventObj=function(t,e,n){return{x:e.x,y:e.y,target:t.target,toElement:t.event.toElement||t.event.relatedTarget,views:n}},t.prototype.bindEvents=function(){var t=this.canvas;t.on("mousedown",a.wrapBehavior(this,"onDown")),t.on("mousemove",a.wrapBehavior(this,"onMove")),t.on("mouseleave",a.wrapBehavior(this,"onOut")),t.on("mouseup",a.wrapBehavior(this,"onUp")),t.on("click",a.wrapBehavior(this,"onClick")),t.on("dblclick",a.wrapBehavior(this,"onClick")),t.on("touchstart",a.wrapBehavior(this,"onTouchstart")),t.on("touchmove",a.wrapBehavior(this,"onTouchmove")),t.on("touchend",a.wrapBehavior(this,"onTouchend"))},t.prototype._triggerShapeEvent=function(t,e,n){if(t&&t.name&&!t.get("destroyed")){var r=this.view;if(r.isShapeInView(t)){var i=t.name+":"+e;n.view=r,n.appendInfo=t.get("appendInfo"),r.emit(i,n);var a=r.get("parent");a&&a.emit(i,n)}}},t.prototype.onDown=function(t){var e=this.view,n=this._getShapeEventObj(t);n.shape=this.currentShape,i(n),e.emit("mousedown",n),this._triggerShapeEvent(this.currentShape,"mousedown",n)},t.prototype.onMove=function(t){var e=this.view,n=this.currentShape;n&&n.get("destroyed")&&(n=null,this.currentShape=null);var a=this._getShape(t.x,t.y)||t.currentTarget,o=this._getShapeEventObj(t);if(o.shape=a,i(o),e.emit("mousemove",o),this._triggerShapeEvent(a,"mousemove",o),n&&!r(n,a)){var s=this._getShapeEventObj(t);s.shape=n,s.toShape=a,i(s),this._triggerShapeEvent(n,"mouseleave",s)}if(a&&!r(n,a)){var u=this._getShapeEventObj(t);u.shape=a,u.fromShape=n,i(u),this._triggerShapeEvent(a,"mouseenter",u)}this.currentShape=a;var c=this._getPointInfo(t),l=this.curViews||[];0===l.length&&c.views.length&&e.emit("plotenter",this._getEventObj(t,c,c.views)),l.length&&0===c.views.length&&e.emit("plotleave",this._getEventObj(t,c,l)),c.views.length&&((o=this._getEventObj(t,c,c.views)).shape=a,i(o),e.emit("plotmove",o)),this.curViews=c.views},t.prototype.onOut=function(t){var e=this.view,n=this._getPointInfo(t),r=this.curViews||[],i=this._getEventObj(t,n,r);!this.curViews||0===this.curViews.length||i.toElement&&"CANVAS"===i.toElement.tagName||(e.emit("plotleave",i),this.curViews=[])},t.prototype.onUp=function(t){var e=this.view,n=this._getShapeEventObj(t);n.shape=this.currentShape,e.emit("mouseup",n),this._triggerShapeEvent(this.currentShape,"mouseup",n)},t.prototype.onClick=function(t){var e=this.view,n=this._getShape(t.x,t.y)||t.currentTarget,r=this._getShapeEventObj(t);r.shape=n,i(r),e.emit("click",r),this._triggerShapeEvent(n,t.type,r),this.currentShape=n;var o=this._getPointInfo(t),s=o.views;if(!a.isEmpty(s)){var u=this._getEventObj(t,o,s);if(this.currentShape){var c=this.currentShape;u.shape=c,i(u)}e.emit("plotclick",u),"dblclick"===t.type&&(e.emit("plotdblclick",u),e.emit("dblclick",r))}},t.prototype.onTouchstart=function(t){var e=this.view,n=this._getShape(t.x,t.y)||t.currentTarget,r=this._getShapeEventObj(t);r.shape=n,i(r),e.emit("touchstart",r),this._triggerShapeEvent(n,"touchstart",r),this.currentShape=n},t.prototype.onTouchmove=function(t){var e=this.view,n=this._getShape(t.x,t.y)||t.currentTarget,r=this._getShapeEventObj(t);r.shape=n,i(r),e.emit("touchmove",r),this._triggerShapeEvent(n,"touchmove",r),this.currentShape=n},t.prototype.onTouchend=function(t){var e=this.view,n=this._getShapeEventObj(t);n.shape=this.currentShape,i(n),e.emit("touchend",n),this._triggerShapeEvent(this.currentShape,"touchend",n)},t.prototype.clearEvents=function(){var t=this.canvas;t.off("mousemove",a.getWrapBehavior(this,"onMove")),t.off("mouseleave",a.getWrapBehavior(this,"onOut")),t.off("mousedown",a.getWrapBehavior(this,"onDown")),t.off("mouseup",a.getWrapBehavior(this,"onUp")),t.off("click",a.getWrapBehavior(this,"onClick")),t.off("dblclick",a.getWrapBehavior(this,"onClick")),t.off("touchstart",a.getWrapBehavior(this,"onTouchstart")),t.off("touchmove",a.getWrapBehavior(this,"onTouchmove")),t.off("touchend",a.getWrapBehavior(this,"onTouchend"))},t}();t.exports=o},function(t,e,n){function r(t,e){var n=[];if(!1===t.get("animate"))return[];var i=t.get("children");return s.each(i,function(t){if(t.isGroup)n=n.concat(r(t,e));else if(t.isShape&&t._id){var i=t._id;(i=i.split("-")[0])===e&&n.push(t)}}),n}function i(t,e,n,r){return r?u.Action[n][r]:u.getAnimation(t,e,n)}function a(t,e,n){var r=u.getAnimateCfg(t,e);return n&&n[e]?s.deepMix({},r,n[e]):r}function o(t,e,n,r){var o=void 0,u=void 0,l=!1;if(r){var h=[],f=[];s.each(e,function(e){var n=t[e._id];n?(e.setSilent("cacheShape",n),h.push(e),delete t[e._id]):f.push(e)}),s.each(t,function(t){var e=t.name,r=t.coord,h=t._id,f=t.attrs,p=t.index,d=t.type;if(u=a(e,"leave",t.animateCfg),o=i(e,r,"leave",u.animation),s.isFunction(o)){var g=n.addShape(d,{attrs:f,index:p});if(g._id=h,g.name=e,r&&"label"!==e){var y=g.getMatrix(),v=c.multiply([],y,r.matrix);g.setMatrix(v)}l=!0,o(g,u,r)}}),s.each(h,function(t){var e=t.name,n=t.get("coord"),r=t.get("cacheShape").attrs;if(!s.isEqual(r,t.attr())){if(u=a(e,"update",t.get("animateCfg")),o=i(e,n,"update",u.animation),s.isFunction(o))o(t,u,n);else{var c=s.cloneDeep(t.attr());t.attr(r),t.animate(c,u.duration,u.easing,function(){t.setSilent("cacheShape",null)})}l=!0}}),s.each(f,function(t){var e=t.name,n=t.get("coord");u=a(e,"enter",t.get("animateCfg")),o=i(e,n,"enter",u.animation),s.isFunction(o)&&(o(t,u,n),l=!0)})}else s.each(e,function(t){var e=t.name,n=t.get("coord");u=a(e,"appear",t.get("animateCfg")),o=i(e,n,"appear",u.animation),s.isFunction(o)&&(o(t,u,n),l=!0)});return l}var s=n(0),u=n(115),c=s.MatrixUtil.mat3;t.exports={execAnimation:function(t,e){var n=t.get("middlePlot"),i=t.get("backPlot"),a=t.get("_id"),u=t.get("canvas"),c=u.get(a+"caches")||[];0===c.length&&(e=!1);var l=r(n,a),h=r(i,a),f=l.concat(h);u.setSilent(a+"caches",function(t){var e={};return s.each(t,function(t){if(t._id&&!t.isClip){var n=t._id;e[n]={_id:n,type:t.get("type"),attrs:s.cloneDeep(t.attr()),name:t.name,index:t.get("index"),animateCfg:t.get("animateCfg"),coord:t.get("coord")}}}),e}(f));(e?o(c,f,u,e):o(c,l,u,e))||u.draw()}}},function(t,e,n){var r=n(0),i=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){return{type:"plotBack",padding:null,background:null,plotRange:null,plotBackground:null}},e.prototype._beforeRenderUI=function(){this._calculateRange()},e.prototype._renderUI=function(){this._renderBackground(),this._renderPlotBackground()},e.prototype._renderBackground=function(){var t=this.get("background");if(t){var e=this.get("canvas"),n={x:0,y:0,width:this.get("width")||e.get("width"),height:this.get("height")||e.get("height")},i=this.get("backgroundShape");i?i.attr(n):(i=this.addShape("rect",{attrs:r.mix(n,t)}),this.set("backgroundShape",i))}},e.prototype._renderPlotBackground=function(){var t=this.get("plotBackground");if(t){var e=this.get("plotRange"),n=e.br.x-e.bl.x,i=e.br.y-e.tr.y,a=e.tl,o={x:a.x,y:a.y,width:n,height:i},s=this.get("plotBackShape");s?s.attr(o):(t.image?(o.img=t.image,s=this.addShape("image",{attrs:o})):(r.mix(o,t),s=this.addShape("rect",{attrs:o})),this.set("plotBackShape",s))}},e.prototype._convert=function(t,e){if(r.isString(t))if("auto"===t)t=0;else if(-1!==t.indexOf("%")){var n=this.get("canvas"),i=this.get("width")||n.get("width"),a=this.get("height")||n.get("height");t=parseInt(t,10)/100,t=e?t*i:t*a}return t},e.prototype._calculateRange=function(){var t=this.get("plotRange");r.isNil(t)&&(t={});var e=this.get("padding"),n=this.get("canvas"),i=this.get("width")||n.get("width"),a=this.get("height")||n.get("height"),o=r.toAllPadding(e),s=this._convert(o[0],!1),u=this._convert(o[1],!0),c=this._convert(o[2],!1),l=this._convert(o[3],!0),h=Math.min(l,i-u),f=Math.max(l,i-u),p=Math.min(a-c,s),d=Math.max(a-c,s);t.tl={x:h,y:p},t.tr={x:f,y:p},t.bl={x:h,y:d},t.br={x:f,y:d},t.cc={x:(f+h)/2,y:(d+p)/2},this.set("plotRange",t)},e.prototype.repaint=function(){return this._calculateRange(),this._renderBackground(),this._renderPlotBackground(),this},e}(n(5).Group);t.exports=i},function(t,e,n){var r=n(0),i=n(2);setTimeout(function(){if(i.trackable){var t=new Image,e=r.mix({},i.trackingInfo,{pg:document.URL,r:(new Date).getTime(),g2:!0,version:i.version,page_type:"syslog"}),n=encodeURIComponent(JSON.stringify([e]));t.src="https://kcart.alipay.com/web/bi.do?BIProfile=merge&d="+n}},3e3)},function(t,e,n){var r=n(350),i=n(136),a=r.DomUtil,o=r.CommonUtil,s=o.assign,u=["start","process","end","reset"],c=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var r=this,i=r.getDefaultCfg();s(r,i,e),r.view=r.chart=n,r.canvas=n.get("canvas"),r._bindEvents()}return t.prototype.getDefaultCfg=function(){return{startEvent:"mousedown",processEvent:"mousemove",endEvent:"mouseup",resetEvent:"dblclick"}},t.prototype._start=function(t){var e=this;e.preStart&&e.preStart(t),e.start(t),e.onStart&&e.onStart(t)},t.prototype._process=function(t){var e=this;e.preProcess&&e.preProcess(t),e.process(t),e.onProcess&&e.onProcess(t)},t.prototype._end=function(t){var e=this;e.preEnd&&e.preEnd(t),e.end(t),e.onEnd&&e.onEnd(t)},t.prototype._reset=function(t){var e=this;e.preReset&&e.preReset(t),e.reset(t),e.onReset&&e.onReset(t)},t.prototype.start=function(){},t.prototype.process=function(){},t.prototype.end=function(){},t.prototype.reset=function(){},t.prototype._bindEvents=function(){var t=this,e=t.canvas.get("canvasDOM");t._clearEvents(),o.each(u,function(n){var r=o.upperFirst(n);t["_on"+r+"Listener"]=a.addEventListener(e,t[n+"Event"],i.wrapBehavior(t,"_"+n))})},t.prototype._clearEvents=function(){var t=this;o.each(u,function(e){var n="_on"+o.upperFirst(e)+"Listener";t[n]&&t[n].remove()})},t.prototype.destroy=function(){this._clearEvents()},t}();t.exports=c},function(t,e,n){var r=n(65);t.exports={isFunction:r.isFunction,isObject:r.isObject,isBoolean:r.isBoolean,isNil:r.isNil,isString:r.isString,isArray:r.isArray,isNumber:r.isNumber,isEmpty:r.isEmpty,uniqueId:r.uniqueId,clone:r.clone,deepMix:r.deepMix,assign:r.mix,merge:r.deepMix,upperFirst:r.upperFirst,each:r.each,isEqual:r.isEqual,toArray:r.toArray,extend:r.extend,augment:r.augment,remove:r.arrayUtil.pull,isNumberEqual:r.isNumberEqual,toRadian:r.toRadian,toDegree:r.toDegree,mod:r.mod,clamp:r.clamp}},function(t,e,n){var r=n(0),i=n(2);t.exports={splitData:function(t){var e=this.get("viewTheme")||i;if(!t.length)return[];var n=[],a=[],o=this.getYScale().field,s=void 0;return r.each(t,function(t){s=t._origin?t._origin[o]:t[o],e.connectNulls?r.isNil(s)||a.push(t):r.isArray(s)&&r.isNil(s[0])||r.isNil(s)?a.length&&(n.push(a),a=[]):a.push(t)}),a.length&&n.push(a),n}}},function(t,e,n){var r=n(2),i=n(0),a={getDefalutSize:function(){var t=this.get("defaultSize"),e=this.get("viewTheme")||r;if(!t){var n=this.get("coord"),a=this.getXScale(),o=a.values,s=this.get("dataArray"),u=void 0;if(a.isLinear&&o.length>1){o.sort();var c=function(t,e){var n=t.length;i.isString(t[0])&&(t=t.map(function(t){return e.translate(t)}));for(var r=t[1]-t[0],a=2;ao&&(r=o)}return r}(o,a);u=(a.max-a.min)/c,o.length>u&&(u=o.length)}else u=o.length;var l=a.range,h=1/u,f=1;if(this.isInCircle()?f=n.isTransposed&&u>1?e.widthRatio.multiplePie:e.widthRatio.rose:(a.isLinear&&(h*=l[1]-l[0]),f=e.widthRatio.column),h*=f,this.hasAdjust("dodge")){h/=this._getDodgeCount(s)}t=h,this.set("defaultSize",t)}return t},_getDodgeCount:function(t){var e=this.get("adjusts"),n=void 0,r=t.length;if(i.each(e,function(t){"dodge"===t.type&&(n=t.dodgeBy)}),n){var a=i.Array.merge(t);r=i.Array.values(a,n).length}return r},getDimWidth:function(t){var e=this.get("coord"),n=e.convertPoint({x:0,y:0}),r=e.convertPoint({x:"x"===t?1:0,y:"x"===t?0:1}),i=0;return n&&r&&(i=Math.sqrt(Math.pow(r.x-n.x,2)+Math.pow(r.y-n.y,2))),i},_getWidth:function(){var t=this.get("coord");return this.isInCircle()&&!t.isTransposed?(t.endAngle-t.startAngle)*t.radius:this.getDimWidth("x")},_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=i.isNil(e)?this.getDefalutSize():this._toNormalizedSize(e)},getSize:function(t){var e=this.getAttrValue("size",t);if(i.isNil(e)){var n=this.getDefalutSize();e=this._toCoordSize(n)}return e}};t.exports=a},function(t,e,n){var r=n(21),i=n(310),a=n(0),o=function(t){function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,n));return a.assign(r,i),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.type="path",e.shapeType="line",e},e.prototype.getDrawCfg=function(e){var n=t.prototype.getDrawCfg.call(this,e);return n.isStack=this.hasStack(),n},e.prototype.draw=function(t,e,n,r){var i=this,o=this.splitData(t),s=this.getDrawCfg(t[0]);s.origin=t,a.each(o,function(t,o){if(!a.isEmpty(t)){s.splitedIndex=o,s.points=t;var u=n.drawShape(s.shape,s,e);i.appendShapeInfo(u,r+o)}})},e}(r);r.Path=o,t.exports=o},function(t,e,n){"use strict";var r=n(328),i=n(329);e.a=function(t){var e=Object(r.a)(t);return(e.local?function(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}:function(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===i.b&&e.documentElement.namespaceURI===i.b?e.createElement(t):e.createElementNS(n,t)}})(e)}},function(t,e,n){"use strict";e.a=function(t,e){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}},function(t,e,n){"use strict";e.b=function(t,e,n){var i=t._id;return t.each(function(){var t=Object(r.h)(this,i);(t.value||(t.value={}))[e]=n.apply(this,arguments)}),function(t){return Object(r.f)(t,i).value[e]}};var r=n(64);e.a=function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var i,a=Object(r.f)(this.node(),n).tween,o=0,s=a.length;on&&(i=2*Math.PI-t+e,a=t-n):(i=t-e,a=n-t),i>a?n:e}function a(t,e,n,r){var a=0;return n-e>=2*Math.PI&&(a=2*Math.PI),e=s.mod(e,2*Math.PI),n=s.mod(n,2*Math.PI)+a,t=s.mod(t,2*Math.PI),r?e>=n?t>n&&tn?t:i(t,e,n):e<=n?ee||tt.x&&(d=t.x),gt.y&&(y=t.y),v0&&p>0?h=Math.PI/2-d:f<0&&p<0?h=-Math.PI/2-d:f>=0&&p<0?h=-d-Math.PI/2:f<=0&&p>0&&(h=Math.PI/2-d);var g=function(t){var e=[],n=s.parsePath(t.path),r=void 0;if(!Array.isArray(n)||0===n.length||"M"!==n[0][0]&&"m"!==n[0][0])return!1;for(var i=n.length,a=0;a=0,u=a?n.toUpperCase():n,c=t,l=void 0,h=void 0,f=void 0,p=void 0,g=e.endPoint,y=c[1],v=c[2];switch(u){default:break;case"M":p=a?r(y,v,g):{x:y,y:v},this.command="M",this.params=[g,p],this.subStart=p,this.endPoint=p;break;case"L":p=a?r(y,v,g):{x:y,y:v},this.command="L",this.params=[g,p],this.subStart=e.subStart,this.endPoint=p,this.endTangent=function(){return[p.x-g.x,p.y-g.y]},this.startTangent=function(){return[g.x-p.x,g.y-p.y]};break;case"H":p=a?r(y,0,g):{x:y,y:g.y},this.command="L",this.params=[g,p],this.subStart=e.subStart,this.endPoint=p,this.endTangent=function(){return[p.x-g.x,p.y-g.y]},this.startTangent=function(){return[g.x-p.x,g.y-p.y]};break;case"V":p=a?r(0,y,g):{x:g.x,y:y},this.command="L",this.params=[g,p],this.subStart=e.subStart,this.endPoint=p,this.endTangent=function(){return[p.x-g.x,p.y-g.y]},this.startTangent=function(){return[g.x-p.x,g.y-p.y]};break;case"Q":a?(l=r(y,v,g),h=r(c[3],c[4],g)):(l={x:y,y:v},h={x:c[3],y:c[4]}),this.command="Q",this.params=[g,l,h],this.subStart=e.subStart,this.endPoint=h,this.endTangent=function(){return[h.x-l.x,h.y-l.y]},this.startTangent=function(){return[g.x-l.x,g.y-l.y]};break;case"T":h=a?r(y,v,g):{x:y,y:v},"Q"===e.command?(l=i(e.params[1],g),this.command="Q",this.params=[g,l,h],this.subStart=e.subStart,this.endPoint=h,this.endTangent=function(){return[h.x-l.x,h.y-l.y]},this.startTangent=function(){return[g.x-l.x,g.y-l.y]}):(this.command="TL",this.params=[g,h],this.subStart=e.subStart,this.endPoint=h,this.endTangent=function(){return[h.x-g.x,h.y-g.y]},this.startTangent=function(){return[g.x-h.x,g.y-h.y]});break;case"C":a?(l=r(y,v,g),h=r(c[3],c[4],g),f=r(c[5],c[6],g)):(l={x:y,y:v},h={x:c[3],y:c[4]},f={x:c[5],y:c[6]}),this.command="C",this.params=[g,l,h,f],this.subStart=e.subStart,this.endPoint=f,this.endTangent=function(){return[f.x-h.x,f.y-h.y]},this.startTangent=function(){return[g.x-l.x,g.y-l.y]};break;case"S":a?(h=r(y,v,g),f=r(c[3],c[4],g)):(h={x:y,y:v},f={x:c[3],y:c[4]}),"C"===e.command?(l=i(e.params[2],g),this.command="C",this.params=[g,l,h,f],this.subStart=e.subStart,this.endPoint=f,this.endTangent=function(){return[f.x-h.x,f.y-h.y]},this.startTangent=function(){return[g.x-l.x,g.y-l.y]}):(this.command="SQ",this.params=[g,h,f],this.subStart=e.subStart,this.endPoint=f,this.endTangent=function(){return[f.x-h.x,f.y-h.y]},this.startTangent=function(){return[g.x-h.x,g.y-h.y]});break;case"A":var m=y,x=v,b=c[3],w=c[4],_=c[5];p=a?r(c[6],c[7],g):{x:c[6],y:c[7]},this.command="A";var S=function(t,e,n,r,i,a,u){var c=s.mod(s.toRadian(u),2*Math.PI),l=t.x,h=t.y,f=e.x,p=e.y,d=Math.cos(c)*(l-f)/2+Math.sin(c)*(h-p)/2,g=-1*Math.sin(c)*(l-f)/2+Math.cos(c)*(h-p)/2,y=d*d/(i*i)+g*g/(a*a);y>1&&(i*=Math.sqrt(y),a*=Math.sqrt(y));var v=i*i*(g*g)+a*a*(d*d),m=Math.sqrt((i*i*(a*a)-v)/v);n===r&&(m*=-1),isNaN(m)&&(m=0);var x=m*i*g/a,b=m*-a*d/i,w=(l+f)/2+Math.cos(c)*x-Math.sin(c)*b,_=(h+p)/2+Math.sin(c)*x+Math.cos(c)*b,S=o([1,0],[(d-x)/i,(g-b)/a]),M=o([(d-x)/i,(g-b)/a],[(-1*d-x)/i,(-1*g-b)/a]);return 0===r&&M>0&&(M-=2*Math.PI),1===r&&M<0&&(M+=2*Math.PI),[t,w,_,i,a,S,M,c,r]}(g,p,w,_,m,x,b);this.params=S;var M=e.subStart;this.subStart=M,this.endPoint=p;var A=S[5]%(2*Math.PI);s.isNumberEqual(A,2*Math.PI)&&(A=0);var C=S[6]%(2*Math.PI);s.isNumberEqual(C,2*Math.PI)&&(C=0);var P=.001;this.startTangent=function(){0===_&&(P*=-1);var t=S[3]*Math.cos(A-P)+S[1],e=S[4]*Math.sin(A-P)+S[2];return[t-M.x,e-M.y]},this.endTangent=function(){var t=S[6];t-2*Math.PI<1e-4&&(t=0);var e=S[3]*Math.cos(A+t+P)+S[1],n=S[4]*Math.sin(A+t-P)+S[2];return[g.x-e,g.y-n]};break;case"Z":this.command="Z",this.params=[g,e.subStart],this.subStart=e.subStart,this.endPoint=e.subStart}},isInside:function(t,e,n){var r=this.command,i=this.params,a=this.box;if(a&&!u.box(a.minX,a.maxX,a.minY,a.maxY,t,e))return!1;switch(r){default:break;case"M":return!1;case"TL":case"L":case"Z":return u.line(i[0].x,i[0].y,i[1].x,i[1].y,n,t,e);case"SQ":case"Q":return u.quadraticline(i[0].x,i[0].y,i[1].x,i[1].y,i[2].x,i[2].y,n,t,e);case"C":return u.cubicline(i[0].x,i[0].y,i[1].x,i[1].y,i[2].x,i[2].y,i[3].x,i[3].y,n,t,e);case"A":var o=i,s=o[1],c=o[2],l=o[3],h=o[4],d=o[5],g=o[6],y=o[7],v=o[8],m=l>h?l:h,x=l>h?1:l/h,b=l>h?h/l:1;o=[t,e,1];var w=[1,0,0,0,1,0,0,0,1];return p.translate(w,w,[-s,-c]),p.rotate(w,w,-y),p.scale(w,w,[1/x,1/b]),f.transformMat3(o,o,w),u.arcline(0,0,m,d,d+g,1-v,n,o[0],o[1])}return!1},draw:function(t){var e=this.command,n=this.params,r=void 0,i=void 0,a=void 0;switch(e){default:break;case"M":t.moveTo(n[1].x,n[1].y);break;case"TL":case"L":t.lineTo(n[1].x,n[1].y);break;case"SQ":case"Q":r=n[1],i=n[2],t.quadraticCurveTo(r.x,r.y,i.x,i.y);break;case"C":r=n[1],i=n[2],a=n[3],t.bezierCurveTo(r.x,r.y,i.x,i.y,a.x,a.y);break;case"A":var o=n,s=o[1],u=o[2],c=o[3],l=o[4],h=o[5],f=o[6],p=o[7],d=o[8],g=c>l?c:l,y=c>l?1:c/l,v=c>l?l/c:1;t.translate(s,u),t.rotate(p),t.scale(y,v),t.arc(0,0,g,h,h+f,1-d),t.scale(1/y,1/v),t.rotate(-p),t.translate(-s,-u);break;case"Z":t.closePath()}},getBBox:function(t){var e=t/2,n=this.params,r=void 0,i=void 0,a=void 0,o=void 0;switch(this.command){default:case"M":case"Z":break;case"TL":case"L":this.box={minX:Math.min(n[0].x,n[1].x)-e,maxX:Math.max(n[0].x,n[1].x)+e,minY:Math.min(n[0].y,n[1].y)-e,maxY:Math.max(n[0].y,n[1].y)+e};break;case"SQ":case"Q":for(a=0,o=(i=l.extrema(n[0].x,n[1].x,n[2].x)).length;aS&&(S=C)}var P=h.yExtrema(v,p,d),k=1/0,T=-1/0,O=[x,b];for(a=2*-Math.PI;a<=2*Math.PI;a+=Math.PI){var I=P+a;1===m?xT&&(T=E)}this.box={minX:_-e,maxX:S+e,minY:k-e,maxY:T+e}}}}),t.exports=g},function(t,e,n){var r=n(65),i={};r.mix(i,r),t.exports=i},function(t,e,n){function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=n(21),s=n(0),u=n(311);n(323);var c=function(t){function e(n){r(this,e);var a=i(this,t.call(this,n));return s.assign(a,u),a}return a(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.type="interval",e.shapeType="interval",e.generatePoints=!0,e},e.prototype.createShapePointsCfg=function(e){var n=t.prototype.createShapePointsCfg.call(this,e);return n.size=this.getNormalizedSize(e),n},e.prototype.clearInner=function(){t.prototype.clearInner.call(this),this.set("defaultSize",null)},e}(o),l=function(t){function e(){return r(this,e),i(this,t.apply(this,arguments))}return a(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.hasDefaultAdjust=!0,e.adjusts=[{type:"stack"}],e},e}(c),h=function(t){function e(){return r(this,e),i(this,t.apply(this,arguments))}return a(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.hasDefaultAdjust=!0,e.adjusts=[{type:"dodge"}],e},e}(c),f=function(t){function e(){return r(this,e),i(this,t.apply(this,arguments))}return a(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.hasDefaultAdjust=!0,e.adjusts=[{type:"symmetric"}],e},e}(c);c.Stack=l,c.Dodge=h,c.Symmetric=f,o.Interval=c,o.IntervalStack=l,o.IntervalDodge=h,o.IntervalSymmetric=f,t.exports=c},function(t,e,n){function r(t,e){var n=t.x,r=t.y,i=t.y0,a=t.size,o=i,s=r;f.isArray(r)&&(s=r[1],o=r[0]);var u=void 0,c=void 0;f.isArray(n)?(u=n[0],c=n[1]):(u=n-a/2,c=n+a/2);var l=[];return l.push({x:u,y:o},{x:u,y:s}),e?l.push({x:c,y:(s+o)/2}):l.push({x:c,y:s},{x:c,y:o}),l}function i(t){for(var e=[],n=0;n0;)r-=2*Math.PI;var l=a-t+(r=r/Math.PI/2*n)-2*t;u.push(["M",l,e]);for(var h=0,f=0;f=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),r.a.hasOwnProperty(e)?{space:r.a[e],local:t}:t}},function(t,e,n){"use strict";n.d(e,"b",function(){return r});var r="http://www.w3.org/1999/xhtml";e.a={svg:"http://www.w3.org/2000/svg",xhtml:r,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}},function(t,e,n){"use strict";e.a=function(t){return null==t?function(){}:function(){return this.querySelector(t)}}},function(t,e,n){"use strict";e.a=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}},function(t,e,n){"use strict";function r(t,e,n){return function(r){var i=o;o=r;try{t.call(this,this.__data__,e,n)}finally{o=i}}}function i(t,e,n){var i=a.hasOwnProperty(t.type)?function(t,e,n){return t=r(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}:r;return function(r,a,o){var s,u=this.__on,c=i(e,a,o);if(u)for(var l=0,h=u.length;l=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}})}(t+""),s=o.length;{if(!(arguments.length<2)){for(u=e?i:function(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r=0&&m=0&&c<=1&&u.push(c);else{var f=a*a-4*i*s;o.isNumberEqual(f,0)?u.push(-a/(2*i)):f>0&&(l=(-a-(h=Math.sqrt(f)))/(2*i),(c=(-a+h)/(2*i))>=0&&c<=1&&u.push(c),l>=0&&l<=1&&u.push(l))}return u},len:function(t,e,n,r,i,s,u,c,l){o.isNil(l)&&(l=1);for(var h=(l=l>1?1:l<0?0:l)/2,f=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],p=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],d=0,g=0;g<12;g++){var y=h*f[g]+h,v=a(y,t,n,i,u),m=a(y,e,r,s,c),x=v*v+m*m;d+=p[g]*Math.sqrt(x)}return h*d}}},function(t,e,n){var r=n(8),i=/[MLHVQTCSAZ]([^MLHVQTCSAZ]*)/gi,a=/[^\s\,]+/gi,o={};t.exports={parsePath:function(t){return t=t||[],r.isArray(t)?t:r.isString(t)?(t=t.match(i),r.each(t,function(e,n){if((e=e.match(a))[0].length>1){var i=e[0].charAt(0);e.splice(1,0,e[0].substr(1)),e[0]=i}r.each(e,function(t,n){isNaN(t)||(e[n]=+t)}),t[n]=e}),t):void 0},numberToColor:function(t){var e=o[t];if(!e){for(var n=t.toString(16),r=n.length;r<6;r++)n="0"+n;e="#"+n,o[t]=e}return e}}},function(t,e,n){var r=n(8),i=n(29),a=n(336),o=n(320),s=function t(e){t.superclass.constructor.call(this,e)};s.Symbols={circle:function(t,e,n){return[["M",t,e],["m",-n,0],["a",n,n,0,1,0,2*n,0],["a",n,n,0,1,0,2*-n,0]]},square:function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]]},diamond:function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]},triangle:function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["z"]]},"triangle-down":function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]}},s.ATTRS={path:null,lineWidth:1},r.extend(s,i),r.augment(s,{type:"marker",canFill:!0,canStroke:!0,getDefaultAttrs:function(){return{x:0,y:0,lineWidth:1}},calculateBox:function(){var t=this._attrs,e=t.x,n=t.y,r=t.radius,i=this.getHitLineWidth()/2+r;return{minX:e-i,minY:n-i,maxX:e+i,maxY:n+i}},_getPath:function(){var t=this._attrs,e=t.x,n=t.y,i=t.radius||t.r,a=t.symbol||"circle";return(r.isFunction(a)?a:s.Symbols[a])(e,n,i)},createPath:function(t){var e=this._cfg.segments;if(!e||this._cfg.hasUpdate){var n=a.parsePath(this._getPath());t.beginPath();var r=void 0;e=[];for(var i=0;i2&&(n.push([r].concat(a.splice(0,2))),o="l",r="m"===r?"l":"L"),"o"===o&&1===a.length&&n.push([r,a[0]]),"r"===o)n.push([r].concat(a));else for(;a.length>=e[o]&&(n.push([r].concat(a.splice(0,e[o]))),e[o]););}),n},l=function(t,e){for(var n=[],r=0,i=t.length;i-2*!e>r;r+=2){var a=[{x:+t[r-2],y:+t[r-1]},{x:+t[r],y:+t[r+1]},{x:+t[r+2],y:+t[r+3]},{x:+t[r+4],y:+t[r+5]}];e?r?i-4===r?a[3]={x:+t[0],y:+t[1]}:i-2===r&&(a[2]={x:+t[0],y:+t[1]},a[3]={x:+t[2],y:+t[3]}):a[0]={x:+t[i-2],y:+t[i-1]}:i-4===r?a[3]=a[2]:r||(a[0]={x:+t[r],y:+t[r+1]}),n.push(["C",(-a[0].x+6*a[1].x+a[2].x)/6,(-a[0].y+6*a[1].y+a[2].y)/6,(a[1].x+6*a[2].x-a[3].x)/6,(a[1].y+6*a[2].y-a[3].y)/6,a[2].x,a[2].y])}return n},h=function(t,e,n,r,i){var a=[];if(null===i&&null===r&&(r=n),t=+t,e=+e,n=+n,r=+r,null!==i){var o=Math.PI/180,s=t+n*Math.cos(-r*o),u=t+n*Math.cos(-i*o);a=[["M",s,e+n*Math.sin(-r*o)],["A",n,n,0,+(i-r>180),0,u,e+n*Math.sin(-i*o)]]}else a=[["M",t,e],["m",0,-r],["a",n,r,0,1,1,0,2*r],["a",n,r,0,1,1,0,-2*r],["z"]];return a},f=function(t){if(!(t=c(t))||!t.length)return[["M",0,0]];var e=[],n=0,r=0,i=0,a=0,o=0,s=void 0,u=void 0;"M"===t[0][0]&&(i=n=+t[0][1],a=r=+t[0][2],o++,e[0]=["M",n,r]);for(var f,p,d=3===t.length&&"M"===t[0][0]&&"R"===t[1][0].toUpperCase()&&"Z"===t[2][0].toUpperCase(),g=o,y=t.length;g1&&(r*=_=Math.sqrt(_),i*=_);var S=r*r,M=i*i,A=(o===s?-1:1)*Math.sqrt(Math.abs((S*M-S*w*w-M*b*b)/(S*w*w+M*b*b)));v=A*r*w/i+(e+u)/2,m=A*-i*b/r+(n+c)/2,g=Math.asin(((n-m)/i).toFixed(9)),y=Math.asin(((c-m)/i).toFixed(9)),g=ey&&(g-=2*Math.PI),!s&&y>g&&(y-=2*Math.PI)}var C=y-g;if(Math.abs(C)>h){var P=y,k=u,T=c;y=g+h*(s&&y>g?1:-1),p=t(u=v+r*Math.cos(y),c=m+i*Math.sin(y),r,i,a,0,s,k,T,[y,P,v,m])}C=y-g;var O=Math.cos(g),I=Math.sin(g),E=Math.cos(y),L=Math.sin(y),D=Math.tan(C/4),j=4/3*r*D,F=4/3*i*D,R=[e,n],B=[e+j*I,n-F*O],N=[u+j*L,c-F*E],Y=[u,c];if(B[0]=2*R[0]-B[0],B[1]=2*R[1]-B[1],l)return[B,N,Y].concat(p);for(var z=[],X=0,V=(p=[B,N,Y].concat(p).join().split(",")).length;X7){t[e].shift();for(var i=t[e];i.length;)o[e]="A",r&&(s[e]="A"),t.splice(e++,0,["C"].concat(i.splice(0,6)));t.splice(e,1),l=Math.max(n.length,r&&r.length||0)}},y=function(t,e,i,a,o){t&&e&&"M"===t[o][0]&&"M"!==e[o][0]&&(e.splice(o,0,["M",a.x,a.y]),i.bx=0,i.by=0,i.x=t[o][1],i.y=t[o][2],l=Math.max(n.length,r&&r.length||0))};l=Math.max(n.length,r&&r.length||0);for(var v=0;v1?1:u<0?0:u)/2,l=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],h=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],f=0,p=0;p<12;p++){var d=c*l[p]+c,g=m(d,t,n,i,o),y=m(d,e,r,a,s),v=g*g+y*y;f+=h[p]*Math.sqrt(v)}return c*f},b=function(t,e,n,r,i,a,o,s){if(!(Math.max(t,n)Math.max(i,o)||Math.max(e,r)Math.max(a,s))){var u=(t-n)*(a-s)-(e-r)*(i-o);if(u){var c=((t*r-e*n)*(i-o)-(t-n)*(i*s-a*o))/u,l=((t*r-e*n)*(a-s)-(e-r)*(i*s-a*o))/u,h=+c.toFixed(2),f=+l.toFixed(2);if(!(h<+Math.min(t,n).toFixed(2)||h>+Math.max(t,n).toFixed(2)||h<+Math.min(i,o).toFixed(2)||h>+Math.max(i,o).toFixed(2)||f<+Math.min(e,r).toFixed(2)||f>+Math.max(e,r).toFixed(2)||f<+Math.min(a,s).toFixed(2)||f>+Math.max(a,s).toFixed(2)))return{x:c,y:l}}}},w=function(t,e,n){return e>=t.x&&e<=t.x+t.width&&n>=t.y&&n<=t.y+t.height},_=function(t,e,n,r,i){if(i)return[["M",+t+ +i,e],["l",n-2*i,0],["a",i,i,0,0,1,i,i],["l",0,r-2*i],["a",i,i,0,0,1,-i,i],["l",2*i-n,0],["a",i,i,0,0,1,-i,-i],["l",0,2*i-r],["a",i,i,0,0,1,i,-i],["z"]];var a=[["M",t,e],["l",n,0],["l",0,r],["l",-n,0],["z"]];return a.parsePathArray=v,a},S=function(t,e,n,r){return null===t&&(t=e=n=r=0),null===e&&(e=t.y,n=t.width,r=t.height,t=t.x),{x:t,y:e,width:n,w:n,height:r,h:r,x2:t+n,y2:e+r,cx:t+n/2,cy:e+r/2,r1:Math.min(n,r)/2,r2:Math.max(n,r)/2,r0:Math.sqrt(n*n+r*r)/2,path:_(t,e,n,r),vb:[t,e,n,r].join(" ")}},M=function(t,e,n,r,i,o,s,u){a.isArray(t)||(t=[t,e,n,r,i,o,s,u]);var c=function(t,e,n,r,i,a,o,s){for(var u=[],c=[[],[]],l=void 0,h=void 0,f=void 0,p=void 0,d=0;d<2;++d)if(0===d?(h=6*t-12*n+6*i,l=-3*t+9*n-9*i+3*o,f=3*n-3*t):(h=6*e-12*r+6*a,l=-3*e+9*r-9*a+3*s,f=3*r-3*e),Math.abs(l)<1e-12){if(Math.abs(h)<1e-12)continue;(p=-f/h)>0&&p<1&&u.push(p)}else{var g=h*h-4*f*l,y=Math.sqrt(g);if(!(g<0)){var v=(-h+y)/(2*l);v>0&&v<1&&u.push(v);var m=(-h-y)/(2*l);m>0&&m<1&&u.push(m)}}for(var x=u.length,b=x,w=void 0;x--;)w=1-(p=u[x]),c[0][x]=w*w*w*t+3*w*w*p*n+3*w*p*p*i+p*p*p*o,c[1][x]=w*w*w*e+3*w*w*p*r+3*w*p*p*a+p*p*p*s;return c[0][b]=t,c[1][b]=e,c[0][b+1]=o,c[1][b+1]=s,c[0].length=c[1].length=b+2,{min:{x:Math.min.apply(0,c[0]),y:Math.min.apply(0,c[1])},max:{x:Math.max.apply(0,c[0]),y:Math.max.apply(0,c[1])}}}.apply(null,t);return S(c.min.x,c.min.y,c.max.x-c.min.x,c.max.y-c.min.y)},A=function(t,e,n,r,i,a,o,s,u){var c=1-u,l=Math.pow(c,3),h=Math.pow(c,2),f=u*u,p=f*u,d=t+2*u*(n-t)+f*(i-2*n+t),g=e+2*u*(r-e)+f*(a-2*r+e),y=n+2*u*(i-n)+f*(o-2*i+n),v=r+2*u*(a-r)+f*(s-2*a+r);return{x:l*t+3*h*u*n+3*c*u*u*i+p*o,y:l*e+3*h*u*r+3*c*u*u*a+p*s,m:{x:d,y:g},n:{x:y,y:v},start:{x:c*t+u*n,y:c*e+u*r},end:{x:c*i+u*o,y:c*a+u*s},alpha:90-180*Math.atan2(d-y,g-v)/Math.PI}},C=function(t,e,n){if(!function(t,e){return t=S(t),e=S(e),w(e,t.x,t.y)||w(e,t.x2,t.y)||w(e,t.x,t.y2)||w(e,t.x2,t.y2)||w(t,e.x,e.y)||w(t,e.x2,e.y)||w(t,e.x,e.y2)||w(t,e.x2,e.y2)||(t.xe.x||e.xt.x)&&(t.ye.y||e.yt.y)}(M(t),M(e)))return n?0:[];for(var r=~~(x.apply(0,t)/8),i=~~(x.apply(0,e)/8),a=[],o=[],s={},u=n?0:[],c=0;c=0&&k<=1&&T>=0&&T<=1&&(n?u++:u.push({x:P.x,y:P.y,t1:k,t2:T}))}}return u};t.exports={parsePathString:c,parsePathArray:v,pathTocurve:g,pathToAbsolute:f,catmullRomToBezier:l,rectPath:_,intersection:function(t,e){return function(t,e,n){t=g(t),e=g(e);for(var r=void 0,i=void 0,a=void 0,o=void 0,s=void 0,u=void 0,c=void 0,l=void 0,h=void 0,f=void 0,p=n?0:[],d=0,y=t.length;d1?this.each((null==e?function(t){return function(){this.style.removeProperty(t)}}:"function"==typeof e?function(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}:function(t,e,n){return function(){this.style.setProperty(t,e,n)}})(t,e,null==n?"":n)):r(this.node(),t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});n(415);var r=n(133);n.d(e,"transition",function(){return r.b});var i=n(436);n.d(e,"active",function(){return i.a});var a=n(346);n.d(e,"interrupt",function(){return a.a})},function(t,e,n){"use strict";var r=n(64);e.a=function(t,e){var n,i,a,o=t.__transition,s=!0;if(o){e=null==e?null:e+"";for(a in o)(n=o[a]).name===e?(i=n.state>r.d&&n.state]*>/,s={tr:document.createElement("tbody"),tbody:i,thead:i,tfoot:i,td:a,th:a,"*":document.createElement("div")};t.exports={getBoundingClientRect:function(t,e){if(t&&t.getBoundingClientRect){var n=t.getBoundingClientRect(),r=document.documentElement.clientTop,i=document.documentElement.clientLeft;return{top:n.top-r,bottom:n.bottom-r,left:n.left-i,right:n.right-i}}return e||null},getStyle:function(t,e,n){try{return window.getComputedStyle?window.getComputedStyle(t,null)[e]:t.currentStyle[e]}catch(t){return r.isNil(n)?null:n}},modifyCSS:function(t,e){if(t)for(var n in e)e.hasOwnProperty(n)&&(t.style[n]=e[n]);return t},createDom:function(t){var e=o.test(t)&&RegExp.$1;e in s||(e="*");var n=s[e];t=t.replace(/(^\s*)|(\s*$)/g,""),n.innerHTML=""+t;var r=n.childNodes[0];return n.removeChild(r),r},getRatio:function(){return window.devicePixelRatio?window.devicePixelRatio:2},getWidth:function(t,e){var n=this.getStyle(t,"width",e);return"auto"===n&&(n=t.offsetWidth),parseFloat(n)},getHeight:function(t,e){var n=this.getStyle(t,"height",e);return"auto"===n&&(n=t.offsetHeight),parseFloat(n)},getOuterHeight:function(t,e){var n=this.getHeight(t,e),r=parseFloat(this.getStyle(t,"borderTopWidth"))||0,i=parseFloat(this.getStyle(t,"paddingTop"))||0,a=parseFloat(this.getStyle(t,"paddingBottom"))||0;return n+r+(parseFloat(this.getStyle(t,"borderBottomWidth"))||0)+i+a},getOuterWidth:function(t,e){var n=this.getWidth(t,e),r=parseFloat(this.getStyle(t,"borderLeftWidth"))||0,i=parseFloat(this.getStyle(t,"paddingLeft"))||0,a=parseFloat(this.getStyle(t,"paddingRight"))||0;return n+r+(parseFloat(this.getStyle(t,"borderRightWidth"))||0)+i+a},addEventListener:function(t,e,n){if(t){if(t.addEventListener)return t.addEventListener(e,n,!1),{remove:function(){t.removeEventListener(e,n,!1)}};if(t.attachEvent)return t.attachEvent("on"+e,n),{remove:function(){t.detachEvent("on"+e,n)}}}},requestAnimationFrame:function(t){return(window.requestAnimationFrame||window.webkitRequestAnimationFrame||function(t){return setTimeout(t,16)})(t)}}},function(t,e,n){var r=n(8),i=function(t,e,n,r){this.type=t,this.target=null,this.currentTarget=null,this.bubbles=n,this.cancelable=r,this.timeStamp=(new Date).getTime(),this.defaultPrevented=!1,this.propagationStopped=!1,this.removed=!1,this.event=e};r.augment(i,{preventDefault:function(){this.defaultPrevented=this.cancelable&&!0},stopPropagation:function(){this.propagationStopped=!0},remove:function(){this.remove=!0},clone:function(){return r.clone(this)},toString:function(){return"[Event (type="+this.type+")]"}}),t.exports=i},function(t,e,n){function r(t,e,n){for(var r=void 0,i=t.length-1;i>=0;i--){var a=t[i];if(a._cfg.visible&&a._cfg.capture&&(a.isGroup?r=a.getShape(e,n):a.isHit(e,n)&&(r=a)),r)break}return r}function i(t){if(!t._cfg&&t!==l){var e=t.superclass.constructor;e&&!e._cfg&&i(e),t._cfg={},a.merge(t._cfg,e._cfg),a.merge(t._cfg,t.CFG)}}var a=n(8),o=n(354),s=n(449),u={},c="_INDEX",l=function t(e){t.superclass.constructor.call(this,e),this.set("children",[]),this._beforeRenderUI(),this._renderUI(),this._bindUI()};a.extend(l,o),a.augment(l,{isGroup:!0,type:"group",canFill:!0,canStroke:!0,getDefaultCfg:function(){return i(this.constructor),a.merge({},this.constructor._cfg)},_beforeRenderUI:function(){},_renderUI:function(){},_bindUI:function(){},addShape:function(t,e){var n=this.get("canvas");e=e||{};var r=u[t];if(r||(r=a.upperFirst(t),u[t]=r),e.attrs&&n){var i=e.attrs;if("text"===t){var o=n.get("fontFamily");o&&(i.fontFamily=i.fontFamily?i.fontFamily:o)}}e.canvas=n,e.type=t;var c=new s[r](e);return this.add(c),c},addGroup:function(t,e){var n=this.get("canvas"),r=void 0;if(e=a.merge({},e),a.isFunction(t))e?(e.canvas=n,e.parent=this,r=new t(e)):r=new t({canvas:n,parent:this}),this.add(r);else if(a.isObject(t))t.canvas=n,r=new l(t),this.add(r);else{if(void 0!==t)return!1;r=new l,this.add(r)}return r},renderBack:function(t,e){var n=this.get("backShape"),r=this.getBBox();return a.merge(e,{x:r.minX-t[3],y:r.minY-t[0],width:r.width+t[1]+t[3],height:r.height+t[0]+t[2]}),n?n.attr(e):n=this.addShape("rect",{zIndex:-1,attrs:e}),this.set("backShape",n),this.sort(),n},removeChild:function(t,e){if(arguments.length>=2)this.contain(t)&&t.remove(e);else{if(1===arguments.length){if(!a.isBoolean(t))return this.contain(t)&&t.remove(!0),this;e=t}0===arguments.length&&(e=!0),l.superclass.remove.call(this,e)}return this},add:function(t){var e=this,n=e.get("children");if(a.isArray(t))a.each(t,function(t){var n=t.get("parent");n&&n.removeChild(t,!1),e._setCfgProperty(t)}),e._cfg.children=n.concat(t);else{var r=t,i=r.get("parent");i&&i.removeChild(r,!1),e._setCfgProperty(r),n.push(r)}return e},_setCfgProperty:function(t){t.set("parent",this);var e=this._cfg;e.timeline&&(t.set("timeline",e.timeline),t.set("canvas",e.canvas),t.set("renderer",e.renderer))},contain:function(t){return this.get("children").indexOf(t)>-1},getChildByIndex:function(t){return this.get("children")[t]},getFirst:function(){return this.getChildByIndex(0)},getLast:function(){var t=this.get("children").length-1;return this.getChildByIndex(t)},getBBox:function(){var t=1/0,e=-1/0,n=1/0,r=-1/0,i=this.get("children");i.length>0?a.each(i,function(i){if(i.get("visible")){var a=i.getBBox();if(!a)return!0;var o=[a.minX,a.minY,1],s=[a.minX,a.maxY,1],u=[a.maxX,a.minY,1],c=[a.maxX,a.maxY,1];i.apply(o),i.apply(s),i.apply(u),i.apply(c);var l=Math.min(o[0],s[0],u[0],c[0]),h=Math.max(o[0],s[0],u[0],c[0]),f=Math.min(o[1],s[1],u[1],c[1]),p=Math.max(o[1],s[1],u[1],c[1]);le&&(e=h),fr&&(r=p)}}):(t=0,e=0,n=0,r=0);var o={minX:t,minY:n,maxX:e,maxY:r};return o.x=o.minX,o.y=o.minY,o.width=o.maxX-o.minX,o.height=o.maxY-o.minY,o},getCount:function(){return this.get("children").length},sort:function(){var t=this.get("children");return a.each(t,function(t,e){return t[c]=e,t}),t.sort(function(t){return function(e,n){var r=t(e,n);return 0===r?e[c]-n[c]:r}}(function(t,e){return t.get("zIndex")-e.get("zIndex")})),this},findById:function(t){return this.find(function(e){return e.get("id")===t})},find:function(t){if(a.isString(t))return this.findById(t);var e=this.get("children"),n=null;return a.each(e,function(e){if(t(e)?n=e:e.find&&(n=e.find(t)),n)return!1}),n},findAll:function(t){var e=this.get("children"),n=[],r=[];return a.each(e,function(e){t(e)&&n.push(e),e.findAllBy&&(r=e.findAllBy(t),n=n.concat(r))}),n},findBy:function(t){var e=this.get("children"),n=null;return a.each(e,function(e){if(t(e)?n=e:e.findBy&&(n=e.findBy(t)),n)return!1}),n},findAllBy:function(t){var e=this.get("children"),n=[],r=[];return a.each(e,function(e){t(e)&&n.push(e),e.findAllBy&&(r=e.findAllBy(t),n=n.concat(r))}),n},getShape:function(t,e){var n=this._attrs.clip,i=this._cfg.children,a=void 0;if(n){var o=[t,e,1];n.invert(o,this.get("canvas")),n.isPointInPath(o[0],o[1])&&(a=r(i,t,e))}else a=r(i,t,e);return a},clearTotalMatrix:function(){if(this.get("totalMatrix")){this.setSilent("totalMatrix",null);for(var t=this._cfg.children,e=0;e=0;e--)t[e].remove();return this._cfg.children=[],this},destroy:function(){this.get("destroyed")||(this.clear(),l.superclass.destroy.call(this))}}),t.exports=l},function(t,e,n){var r=n(8),i=n(446),a=n(447),o=n(448),s=n(67),u=function(t){this._cfg={zIndex:0,capture:!0,visible:!0,destroyed:!1},r.assign(this._cfg,this.getDefaultCfg(),t),this.initAttrs(this._cfg.attrs),this._cfg.attrs={},this.initTransform(),this.init()};u.CFG={id:null,zIndex:0,canvas:null,parent:null,capture:!0,context:null,visible:!0,destroyed:!1},r.augment(u,i,a,s,o,{init:function(){this.setSilent("animable",!0),this.setSilent("animating",!1)},getParent:function(){return this._cfg.parent},getDefaultCfg:function(){return{}},set:function(t,e){return"zIndex"===t&&this._beforeSetZIndex&&this._beforeSetZIndex(e),"loading"===t&&this._beforeSetLoading&&this._beforeSetLoading(e),this._cfg[t]=e,this},setSilent:function(t,e){this._cfg[t]=e},get:function(t){return this._cfg[t]},show:function(){return this._cfg.visible=!0,this},hide:function(){return this._cfg.visible=!1,this},remove:function(t){var e=this._cfg,n=e.parent,i=e.el;return n&&r.remove(n.get("children"),this),i&&i.parentNode.removeChild(i),(t||void 0===t)&&this.destroy(),this},destroy:function(){this.get("destroyed")||(this._attrs=null,this.removeEvent(),this._cfg={destroyed:!0})},_beforeSetZIndex:function(t){return this._cfg.zIndex=t,r.isNil(this.get("parent"))||this.get("parent").sort(),t},_setAttrs:function(t){return this.attr(t),t},setZIndex:function(t){return this._cfg.zIndex=t,this._beforeSetZIndex(t)},clone:function(){return r.clone(this)},getBBox:function(){}}),t.exports=u},function(t,e,n){function r(t,e,n,r){var i=1-r;return i*(i*t+2*r*e)+r*r*n}function i(t,e,n,i,a,s,u,c,l){var h=void 0,f=.005,p=1/0,d=void 0,g=void 0,y=void 0,v=void 0,m=void 0,x=void 0,b=[u,c];for(v=0;v<1;v+=.05)g=[r(t,n,a,v),r(e,i,s,v)],(d=o.squaredDistance(b,g))=0&&d=0?[i]:[]}}},function(t,e){t.exports={xAt:function(t,e,n,r,i){return e*Math.cos(t)*Math.cos(i)-n*Math.sin(t)*Math.sin(i)+r},yAt:function(t,e,n,r,i){return e*Math.sin(t)*Math.cos(i)+n*Math.cos(t)*Math.sin(i)+r},xExtrema:function(t,e,n){return Math.atan(-n/e*Math.tan(t))},yExtrema:function(t,e,n){return Math.atan(n/(e*Math.tan(t)))}}},function(t,e,n){function r(t,e,n){return t+e*Math.cos(n)}function i(t,e,n){return t+e*Math.sin(n)}var a=n(8),o=n(29),s=n(318),u=n(319),c=function t(e){t.superclass.constructor.call(this,e)};c.ATTRS={x:0,y:0,r:0,startAngle:0,endAngle:0,clockwise:!1,lineWidth:1,startArrow:!1,endArrow:!1},a.extend(c,o),a.augment(c,{canStroke:!0,type:"arc",getDefaultAttrs:function(){return{x:0,y:0,r:0,startAngle:0,endAngle:0,clockwise:!1,lineWidth:1,startArrow:!1,endArrow:!1}},calculateBox:function(){var t=this._attrs,e=t.x,n=t.y,r=t.r,i=t.startAngle,a=t.endAngle,o=t.clockwise,u=this.getHitLineWidth()/2,c=s.box(e,n,r,i,a,o);return c.minX-=u,c.minY-=u,c.maxX+=u,c.maxY+=u,c},getStartTangent:function(){var t=this._attrs,e=t.x,n=t.y,a=t.startAngle,o=t.r,s=t.clockwise,u=Math.PI/180;s&&(u*=-1);var c=[],l=r(e,o,a+u),h=i(n,o,a+u),f=r(e,o,a),p=i(n,o,a);return c.push([l,h]),c.push([f,p]),c},getEndTangent:function(){var t=this._attrs,e=t.x,n=t.y,a=t.endAngle,o=t.r,s=t.clockwise,u=Math.PI/180,c=[];s&&(u*=-1);var l=r(e,o,a+u),h=i(n,o,a+u),f=r(e,o,a),p=i(n,o,a);return c.push([f,p]),c.push([l,h]),c},createPath:function(t){var e=this._attrs,n=e.x,r=e.y,i=e.r,a=e.startAngle,o=e.endAngle,s=e.clockwise;(t=t||self.get("context")).beginPath(),t.arc(n,r,i,a,o,s)},afterPath:function(t){var e=this._attrs;if(t=t||this.get("context"),e.startArrow){var n=this.getStartTangent();u.addStartArrow(t,e,n[0][0],n[0][1],n[1][0],n[1][1])}if(e.endArrow){var r=this.getEndTangent();u.addEndArrow(t,e,r[0][0],r[0][1],r[1][0],r[1][1])}}}),t.exports=c},function(t,e,n){var r=n(8),i=n(29),a=function t(e){t.superclass.constructor.call(this,e)};a.ATTRS={x:0,y:0,r:0,lineWidth:1},r.extend(a,i),r.augment(a,{canFill:!0,canStroke:!0,type:"circle",getDefaultAttrs:function(){return{lineWidth:1}},calculateBox:function(){var t=this._attrs,e=t.x,n=t.y,r=t.r,i=this.getHitLineWidth()/2+r;return{minX:e-i,minY:n-i,maxX:e+i,maxY:n+i}},createPath:function(t){var e=this._attrs,n=e.x,r=e.y,i=e.r;t.beginPath(),t.arc(n,r,i,0,2*Math.PI,!1),t.closePath()}}),t.exports=a},function(t,e,n){var r=n(8),i=n(29),a=function t(e){t.superclass.constructor.call(this,e)};r.extend(a,i),r.augment(a,{canFill:!0,canStroke:!0,type:"dom",calculateBox:function(){var t=this._attrs,e=t.x,n=t.y,r=t.width,i=t.height,a=this.getHitLineWidth()/2;return{minX:e-a,minY:n-a,maxX:e+r+a,maxY:n+i+a}}}),t.exports=a},function(t,e,n){var r=n(8),i=n(29),a=n(42).mat3,o=function t(e){t.superclass.constructor.call(this,e)};o.ATTRS={x:0,y:0,rx:1,ry:1,lineWidth:1},r.extend(o,i),r.augment(o,{canFill:!0,canStroke:!0,type:"ellipse",getDefaultAttrs:function(){return{lineWidth:1}},calculateBox:function(){var t=this._attrs,e=t.x,n=t.y,r=t.rx,i=t.ry,a=this.getHitLineWidth(),o=r+a/2,s=i+a/2;return{minX:e-o,minY:n-s,maxX:e+o,maxY:n+s}},createPath:function(t){var e=this._attrs,n=e.x,r=e.y,i=e.rx,o=e.ry;t=t||self.get("context");var s=i>o?i:o,u=i>o?1:i/o,c=i>o?o/i:1,l=[1,0,0,0,1,0,0,0,1];a.scale(l,l,[u,c]),a.translate(l,l,[n,r]),t.beginPath(),t.save(),t.transform(l[0],l[1],l[3],l[4],l[6],l[7]),t.arc(0,0,s,0,2*Math.PI),t.restore(),t.closePath()}}),t.exports=o},function(t,e,n){var r=n(8),i=n(29),a=n(318),o=function t(e){t.superclass.constructor.call(this,e)};o.ATTRS={x:0,y:0,rs:0,re:0,startAngle:0,endAngle:0,clockwise:!1,lineWidth:1},r.extend(o,i),r.augment(o,{canFill:!0,canStroke:!0,type:"fan",getDefaultAttrs:function(){return{clockwise:!1,lineWidth:1,rs:0,re:0}},calculateBox:function(){var t=this._attrs,e=t.x,n=t.y,r=t.rs,i=t.re,o=t.startAngle,s=t.endAngle,u=t.clockwise,c=this.getHitLineWidth(),l=a.box(e,n,r,o,s,u),h=a.box(e,n,i,o,s,u),f=c/2;return{minX:Math.min(l.minX,h.minX)-f,minY:Math.min(l.minY,h.minY)-f,maxX:Math.max(l.maxX,h.maxX)+f,maxY:Math.max(l.maxY,h.maxY)+f}},createPath:function(t){var e=this._attrs,n=e.x,r=e.y,i=e.rs,a=e.re,o=e.startAngle,s=e.endAngle,u=e.clockwise,c={x:Math.cos(o)*i+n,y:Math.sin(o)*i+r},l={x:Math.cos(o)*a+n,y:Math.sin(o)*a+r},h={x:Math.cos(s)*i+n,y:Math.sin(s)*i+r};(t=t||self.get("context")).beginPath(),t.moveTo(c.x,c.y),t.lineTo(l.x,l.y),t.arc(n,r,a,o,s,u),t.lineTo(h.x,h.y),t.arc(n,r,i,s,o,!u),t.closePath()}}),t.exports=o},function(t,e,n){var r=n(8),i=n(29),a=function t(e){t.superclass.constructor.call(this,e)};a.ATTRS={x:0,y:0,img:void 0,width:0,height:0,sx:null,sy:null,swidth:null,sheight:null},r.extend(a,i),r.augment(a,{type:"image",isHitBox:function(){return!1},calculateBox:function(){var t=this._attrs;this._cfg.attrs&&this._cfg.attrs.img===t.img||this._setAttrImg();var e=t.x,n=t.y;return{minX:e,minY:n,maxX:e+t.width,maxY:n+t.height}},_beforeSetLoading:function(t){var e=this.get("canvas");return!1===t&&!0===this.get("toDraw")&&(this._cfg.loading=!1,e.draw()),t},_setAttrImg:function(){var t=this,e=t._attrs,n=e.img;if(!r.isString(n))return n instanceof Image?(e.width||t.attr("width",n.width),e.height||t.attr("height",n.height),n):n instanceof HTMLElement&&r.isString(n.nodeName)&&"CANVAS"===n.nodeName.toUpperCase()?(e.width||t.attr("width",Number(n.getAttribute("width"))),e.height||t.attr("height",Number(n.getAttribute("height"))),n):n instanceof ImageData?(e.width||t.attr("width",n.width),e.height||t.attr("height",n.height),n):null;var i=new Image;i.onload=function(){if(t.get("destroyed"))return!1;t.attr("imgSrc",n),t.attr("img",i);var e=t.get("callback");e&&e.call(t),t.set("loading",!1)},i.src=n,i.crossOrigin="Anonymous",t.set("loading",!0)},drawInner:function(t){this._cfg.hasUpdate&&this._setAttrImg(),this.get("loading")?this.set("toDraw",!0):(this._drawImage(t),this._cfg.hasUpdate=!1)},_drawImage:function(t){var e=this._attrs,n=e.x,i=e.y,a=e.img,o=e.width,s=e.height,u=e.sx,c=e.sy,l=e.swidth,h=e.sheight;this.set("toDraw",!1);var f=a;if(f instanceof ImageData&&((f=new Image).src=a),f instanceof Image||f instanceof HTMLElement&&r.isString(f.nodeName)&&"CANVAS"===f.nodeName.toUpperCase()){if(r.isNil(u)||r.isNil(c)||r.isNil(l)||r.isNil(h))return void t.drawImage(f,n,i,o,s);if(!(r.isNil(u)||r.isNil(c)||r.isNil(l)||r.isNil(h)))return void t.drawImage(f,u,c,l,h,n,i,o,s)}}}),t.exports=a},function(t,e,n){var r=n(8),i=n(29),a=n(319),o=n(317),s=function t(e){t.superclass.constructor.call(this,e)};s.ATTRS={x1:0,y1:0,x2:0,y2:0,lineWidth:1,startArrow:!1,endArrow:!1},r.extend(s,i),r.augment(s,{canStroke:!0,type:"line",getDefaultAttrs:function(){return{lineWidth:1,startArrow:!1,endArrow:!1}},calculateBox:function(){var t=this._attrs,e=t.x1,n=t.y1,r=t.x2,i=t.y2,a=this.getHitLineWidth();return o.box(e,n,r,i,a)},createPath:function(t){var e=this._attrs,n=e.x1,r=e.y1,i=e.x2,a=e.y2;(t=t||self.get("context")).beginPath(),t.moveTo(n,r),t.lineTo(i,a)},afterPath:function(t){var e=this._attrs,n=e.x1,r=e.y1,i=e.x2,o=e.y2;t=t||this.get("context"),e.startArrow&&a.addStartArrow(t,e,i,o,n,r),e.endArrow&&a.addEndArrow(t,e,n,r,i,o)},getPoint:function(t){var e=this._attrs;return{x:o.at(e.x1,e.x2,t),y:o.at(e.y1,e.y2,t)}}}),t.exports=s},function(t,e,n){var r=n(8),i=n(29),a=n(320),o=n(336),s=n(319),u=n(338),c=n(335),l=function t(e){t.superclass.constructor.call(this,e)};l.ATTRS={path:null,lineWidth:1,curve:null,tCache:null,startArrow:!1,endArrow:!1},r.extend(l,i),r.augment(l,{canFill:!0,canStroke:!0,type:"path",getDefaultAttrs:function(){return{lineWidth:1,startArrow:!1,endArrow:!1}},_afterSetAttrPath:function(t){if(r.isNil(t))return this.setSilent("segments",null),void this.setSilent("box",void 0);var e=o.parsePath(t),n=void 0,i=[];if(r.isArray(e)&&0!==e.length&&("M"===e[0][0]||"m"===e[0][0])){for(var s=e.length,u=0;ui&&(i=r.maxX),r.minYo&&(o=r.maxY))}),{minX:n,minY:a,maxX:i,maxY:o}},_setTcache:function(){var t=0,e=0,n=[],i=void 0,a=void 0,o=void 0,s=void 0,u=this.curve;u&&(r.each(u,function(e,n){o=u[n+1],s=e.length,o&&(t+=c.len(e[s-2],e[s-1],o[1],o[2],o[3],o[4],o[5],o[6]))}),r.each(u,function(r,l){o=u[l+1],s=r.length,o&&((i=[])[0]=e/t,a=c.len(r[s-2],r[s-1],o[1],o[2],o[3],o[4],o[5],o[6]),e+=a,i[1]=e/t,n.push(i))}),this.tCache=n)},_calculateCurve:function(){var t=this._attrs.path;this.curve=u.pathTocurve(t)},getStartTangent:function(){var t=this.get("segments"),e=void 0,n=void 0,i=void 0,a=void 0;if(t.length>1)if(e=t[0].endPoint,n=t[1].endPoint,i=t[1].startTangent,a=[],r.isFunction(i)){var o=i();a.push([e.x-o[0],e.y-o[1]]),a.push([e.x,e.y])}else a.push([n.x,n.y]),a.push([e.x,e.y]);return a},getEndTangent:function(){var t=this.get("segments"),e=t.length,n=void 0,i=void 0,a=void 0,o=void 0;if(e>1)if(n=t[e-2].endPoint,i=t[e-1].endPoint,a=t[e-1].endTangent,o=[],r.isFunction(a)){var s=a();o.push([i.x-s[0],i.y-s[1]]),o.push([i.x,i.y])}else o.push([n.x,n.y]),o.push([i.x,i.y]);return o},getPoint:function(t){var e=this.tCache,n=void 0,i=void 0;e||(this._calculateCurve(),this._setTcache(),e=this.tCache);var a=this.curve;if(!e)return a?{x:a[0][1],y:a[0][2]}:null;r.each(e,function(e,r){t>=e[0]&&t<=e[1]&&(n=(t-e[0])/(e[1]-e[0]),i=r)});var o=a[i];if(r.isNil(o)||r.isNil(i))return null;var s=o.length,u=a[i+1];return{x:c.at(o[s-2],u[1],u[3],u[5],1-n),y:c.at(o[s-1],u[2],u[4],u[6],1-n)}},createPath:function(t){var e=this.get("segments");if(r.isArray(e)){(t=t||this.get("context")).beginPath();for(var n=e.length,i=0;ia&&(a=e),ro&&(o=r)});var s=e/2;return{minX:n-s,minY:i-s,maxX:a+s,maxY:o+s}},createPath:function(t){var e=this._attrs.points;e.length<2||((t=t||this.get("context")).beginPath(),r.each(e,function(e,n){0===n?t.moveTo(e[0],e[1]):t.lineTo(e[0],e[1])}),t.closePath())}}),t.exports=a},function(t,e,n){var r=n(8),i=n(29),a=n(319),o=n(317),s=function t(e){t.superclass.constructor.call(this,e)};s.ATTRS={points:null,lineWidth:1,startArrow:!1,endArrow:!1,tCache:null},r.extend(s,i),r.augment(s,{canStroke:!0,type:"polyline",tCache:null,getDefaultAttrs:function(){return{lineWidth:1,startArrow:!1,endArrow:!1}},calculateBox:function(){var t=this._attrs,e=this.getHitLineWidth(),n=t.points;if(!n||0===n.length)return null;var i=1/0,a=1/0,o=-1/0,s=-1/0;r.each(n,function(t){var e=t[0],n=t[1];eo&&(o=e),ns&&(s=n)});var u=e/2;return{minX:i-u,minY:a-u,maxX:o+u,maxY:s+u}},_setTcache:function(){var t=this._attrs.points,e=0,n=0,i=[],a=void 0,s=void 0;t&&0!==t.length&&(r.each(t,function(n,r){t[r+1]&&(e+=o.len(n[0],n[1],t[r+1][0],t[r+1][1]))}),e<=0||(r.each(t,function(r,u){t[u+1]&&((a=[])[0]=n/e,s=o.len(r[0],r[1],t[u+1][0],t[u+1][1]),n+=s,a[1]=n/e,i.push(a))}),this.tCache=i))},createPath:function(t){var e=this._attrs.points,n=void 0,r=void 0;if(!(e.length<2)){for((t=t||this.get("context")).beginPath(),t.moveTo(e[0][0],e[0][1]),r=1,n=e.length-1;r=e[0]&&t<=e[1]&&(i=(t-e[0])/(e[1]-e[0]),a=n)}),{x:o.at(e[a][0],e[a+1][0],i),y:o.at(e[a][1],e[a+1][1],i)}}}),t.exports=s},function(t,e,n){var r=n(8),i=n(29),a=function t(e){t.superclass.constructor.call(this,e)};a.ATTRS={x:0,y:0,width:0,height:0,radius:0,lineWidth:1},r.extend(a,i),r.augment(a,{canFill:!0,canStroke:!0,type:"rect",getDefaultAttrs:function(){return{lineWidth:1,radius:0}},calculateBox:function(){var t=this._attrs,e=t.x,n=t.y,r=t.width,i=t.height,a=this.getHitLineWidth()/2;return{minX:e-a,minY:n-a,maxX:e+r+a,maxY:n+i+a}},createPath:function(t){var e=this._attrs,n=e.x,r=e.y,i=e.width,a=e.height,o=e.radius;(t=t||this.get("context")).beginPath(),0===o?t.rect(n,r,i,a):(t.moveTo(n+o,r),t.lineTo(n+i-o,r),t.arc(n+i-o,r+o,o,-Math.PI/2,0,!1),t.lineTo(n+i,r+a-o),t.arc(n+i-o,r+a-o,o,0,Math.PI/2,!1),t.lineTo(n+o,r+a),t.arc(n+o,r+a-o,o,Math.PI/2,Math.PI,!1),t.lineTo(n,r+o),t.arc(n+o,r+o,o,Math.PI,3*Math.PI/2,!1),t.closePath())}}),t.exports=a},function(t,e,n){var r=n(8),i=n(29),a=function t(e){t.superclass.constructor.call(this,e)};a.ATTRS={x:0,y:0,text:null,fontSize:12,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",textAlign:"start",textBaseline:"bottom",lineHeight:null,textArr:null},r.extend(a,i),r.augment(a,{canFill:!0,canStroke:!0,type:"text",getDefaultAttrs:function(){return{lineWidth:1,lineCount:1,fontSize:12,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",textAlign:"start",textBaseline:"bottom"}},initTransform:function(){var t=this._attrs.fontSize;t&&+t<12&&this.transform([["t",-1*this._attrs.x,-1*this._attrs.y],["s",+t/12,+t/12],["t",this._attrs.x,this._attrs.y]])},_assembleFont:function(){var t=this._attrs,e=t.fontSize,n=t.fontFamily,r=t.fontWeight,i=t.fontStyle,a=t.fontVariant;t.font=[i,a,r,e+"px",n].join(" ")},_setAttrText:function(){var t=this._attrs,e=t.text,n=void 0;if(r.isString(e)&&-1!==e.indexOf("\n")){var i=(n=e.split("\n")).length;t.lineCount=i,t.textArr=n}},_getTextHeight:function(){var t=this._attrs,e=t.lineCount,n=1*t.fontSize;if(e>1){return n*e+this._getSpaceingY()*(e-1)}return n},isHitBox:function(){return!1},calculateBox:function(){var t=this._attrs,e=this._cfg;e.attrs&&!e.hasUpdate||(this._assembleFont(),this._setAttrText());var n=t.x,r=t.y,i=this.measureText();if(!i)return{minX:n,minY:r,maxX:n,maxY:r};var a=this._getTextHeight(),o=t.textAlign,s=t.textBaseline,u=this.getHitLineWidth(),c={x:n,y:r-a};o&&("end"===o||"right"===o?c.x-=i:"center"===o&&(c.x-=i/2)),s&&("top"===s?c.y+=a:"middle"===s&&(c.y+=a/2)),this.set("startPoint",c);var l=u/2;return{minX:c.x-l,minY:c.y-l,maxX:c.x+i+l,maxY:c.y+a+l}},_getSpaceingY:function(){var t=this._attrs,e=t.lineHeight,n=1*t.fontSize;return e?e-n:.14*n},drawInner:function(t){var e=this._attrs,n=this._cfg;n.attrs&&!n.hasUpdate||(this._assembleFont(),this._setAttrText()),t.font=e.font;var i=e.text;if(i){var a=e.textArr,o=e.x,s=e.y;if(t.beginPath(),this.hasStroke()){var u=e.strokeOpacity;r.isNil(u)||1===u||(t.globalAlpha=u),a?this._drawTextArr(t,!1):t.strokeText(i,o,s),t.globalAlpha=1}if(this.hasFill()){var c=e.fillOpacity;r.isNil(c)||1===c||(t.globalAlpha=c),a?this._drawTextArr(t,!0):t.fillText(i,o,s)}n.hasUpdate=!1}},_drawTextArr:function(t,e){var n=this._attrs.textArr,i=this._attrs.textBaseline,a=1*this._attrs.fontSize,o=this._getSpaceingY(),s=this._attrs.x,u=this._attrs.y,c=this.getBBox(),l=c.maxY-c.minY,h=void 0;r.each(n,function(n,r){h=u+r*(o+a)-l+a,"middle"===i&&(h+=l-a-(l-a)/2),"top"===i&&(h+=l-a),e?t.fillText(n,s,h):t.strokeText(n,s,h)})},measureText:function(){var t=this._attrs,e=t.text,n=t.font,i=t.textArr,a=void 0,o=0;if(!r.isNil(e)){var s=document.createElement("canvas").getContext("2d");return s.save(),s.font=n,i?r.each(i,function(t){a=s.measureText(t).width,o0&&(o[0][0]="L"),r=r.concat(o)}),r.push(["Z"]),r}function o(t){return{symbol:function(t,e){return[["M",t-5.5,e-4],["L",t+5.5,e-4],["L",t+5.5,e+4],["L",t-5.5,e+4]]},radius:5,fill:t.color,fillOpacity:.3}}var s=n(0),u=n(18),c=n(28),l=n(2),h=u.registerFactory("area",{defaultShapeType:"area",getDefaultPoints:function(t){var e=[],n=t.x,r=t.y,i=t.y0;return r=s.isArray(r)?r:[i,r],s.each(r,function(t){e.push({x:n,y:t})}),e},getActiveCfg:function(t,e){return function(t,e){if("line"===t||"smoothLine"===t)return{lineWidth:(e.lineWidth||0)+1};var n=e.fillOpacity||e.opacity||1;return{fillOpacity:n-.15,strokeOpacity:n-.15}}(t,e)},drawShape:function(t,e,n){var r=this.getShape(t),i=void 0;return(i=1===e.points.length&&l.showSinglePoint?function(t,e,n){var r=t._coord.convertPoint(e.points[0][1]);return n.addShape("circle",{attrs:s.mix({x:r.x,y:r.y,r:2,fill:e.color},e.style)})}(this,e,n):r.draw(e,n))&&(i.set("origin",e.origin),i._id=e.splitedIndex?e._id+e.splitedIndex:e._id,i.name=this.name),i},getSelectedCfg:function(t,e){return e&&e.style?e.style:this.getActiveCfg(t,e)}});u.registerShape("area","area",{draw:function(t,e){var n=i(t),r=a(t,!1,this);return e.addShape("path",{attrs:s.mix(n,{path:r})})},getMarkerCfg:function(t){return o(t)}}),u.registerShape("area","smooth",{draw:function(t,e){var n=i(t),r=this._coord;t.constraint=[[r.start.x,r.end.y],[r.end.x,r.start.y]];var o=a(t,!0,this);return e.addShape("path",{attrs:s.mix(n,{path:o})})},getMarkerCfg:function(t){return o(t)}}),u.registerShape("area","line",{draw:function(t,e){var n=r(t),i=a(t,!1,this);return e.addShape("path",{attrs:s.mix(n,{path:i})})},getMarkerCfg:function(t){return o(t)}}),u.registerShape("area","smoothLine",{draw:function(t,e){var n=r(t),i=a(t,!0,this);return e.addShape("path",{attrs:s.mix(n,{path:i})})},getMarkerCfg:function(t){return o(t)}}),h.spline=h.smooth,t.exports=h},function(t,e,n){var r=n(21);n(373);var i=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.type="edge",e.shapeType="edge",e.generatePoints=!0,e},e}(r);r.Edge=i,t.exports=i},function(t,e,n){function r(t){var e=c.shape.edge;return o.mix({},e,{stroke:t.color,lineWidth:t.size,strokeOpacity:t.opacity,opacity:t.opacity},t.style)}function i(t,e){var n=[];n.push({x:t.x,y:.5*t.y+1*e.y/2}),n.push({y:.5*t.y+1*e.y/2,x:e.x}),n.push(e);var r=["C"];return o.each(n,function(t){r.push(t.x,t.y)}),r}function a(t,e){var n=[];n.push({x:e.x,y:e.y}),n.push(t);var r=["Q"];return o.each(n,function(t){r.push(t.x,t.y)}),r}var o=n(0),s=n(18),u=n(142),c=n(2),l=n(28),h=1/3,f=s.registerFactory("edge",{defaultShapeType:"line",getDefaultPoints:function(t){return u.splitPoints(t)},getActiveCfg:function(t,e){return{lineWidth:(e.lineWidth||0)+1}}});s.registerShape("edge","line",{draw:function(t,e){var n=this.parsePoints(t.points),i=r(t),a=l.getLinePath(n);return e.addShape("path",{attrs:o.mix(i,{path:a})})},getMarkerCfg:function(t){return o.mix({symbol:"circle",radius:4.5},r(t))}}),s.registerShape("edge","vhv",{draw:function(t,e){var n=t.points,i=r(t),a=function(t,e){var n=[];n.push({y:t.y*(1-h)+e.y*h,x:t.x}),n.push({y:t.y*(1-h)+e.y*h,x:e.x}),n.push(e);var r=[["M",t.x,t.y]];return o.each(n,function(t){r.push(["L",t.x,t.y])}),r}(n[0],n[1]);a=this.parsePath(a);return e.addShape("path",{attrs:o.mix(i,{path:a})})},getMarkerCfg:function(t){return o.mix({symbol:"circle",radius:4.5},r(t))}}),s.registerShape("edge","smooth",{draw:function(t,e){var n=t.points,a=r(t),s=function(t,e){var n=i(t,e),r=[["M",t.x,t.y]];return r.push(n),r}(n[0],n[1]);s=this.parsePath(s);return e.addShape("path",{attrs:o.mix(a,{path:s})})},getMarkerCfg:function(t){return o.mix({symbol:"circle",radius:4.5},r(t))}}),s.registerShape("edge","arc",{draw:function(t,e){var n=t.points,s=n.length>2?"weight":"normal",u=r(t),c=void 0,l=void 0;if(t.isInCircle){var h={x:0,y:1};"normal"===s?l=function(t,e,n){var r=a(e,n),i=[["M",t.x,t.y]];return i.push(r),i}(n[0],n[1],h):(u.fill=u.stroke,l=function(t,e){var n=a(t[1],e),r=a(t[3],e),i=[["M",t[0].x,t[0].y]];return i.push(r),i.push(["L",t[3].x,t[3].y]),i.push(["L",t[2].x,t[2].y]),i.push(n),i.push(["L",t[1].x,t[1].y]),i.push(["L",t[0].x,t[0].y]),i.push(["Z"]),i}(n,h)),l=this.parsePath(l),c=e.addShape("path",{attrs:o.mix(u,{path:l})})}else if("normal"===s)n=this.parsePoints(n),c=e.addShape("arc",{attrs:o.mix(u,{x:(n[1].x+n[0].x)/2,y:n[0].y,r:Math.abs(n[1].x-n[0].x)/2,startAngle:Math.PI,endAngle:2*Math.PI})});else{l=[["M",n[0].x,n[0].y],["L",n[1].x,n[1].y]];var f=i(n[1],n[3]),p=i(n[2],n[0]);l.push(f),l.push(["L",n[3].x,n[3].y]),l.push(["L",n[2].x,n[2].y]),l.push(p),l.push(["Z"]),l=this.parsePath(l),u.fill=u.stroke,c=e.addShape("path",{attrs:o.mix(u,{path:l})})}return c},getMarkerCfg:function(t){return o.mix({symbol:"circle",radius:4.5},r(t))}}),t.exports=f},function(t,e,n){var r=n(66).ColorUtil,i=n(21),a=n(0),o={},s=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.type="heatmap",e},e.prototype._prepareRange=function(){var t=this.get("mappedData"),e=this.getAttr("color").field,n=1/0,r=-1/0;t.forEach(function(t){var i=t._origin[e];i>r&&(r=i),i=t[0]}));for(var l=this._getScale(o),h=0;h1?t[1]:e;return{min:e,max:n,min1:r,max1:t.length>3?t[3]:n,median:t.length>2?t[2]:r}}function i(t,e,n){var i=[],a=void 0,s=void 0;return o.isArray(e)?a=[[t-n/2,(s=r(e)).max],[t+n/2,s.max],[t,s.max],[t,s.max1],[t-n/2,s.min1],[t-n/2,s.max1],[t+n/2,s.max1],[t+n/2,s.min1],[t,s.min1],[t,s.min],[t-n/2,s.min],[t+n/2,s.min],[t-n/2,s.median],[t+n/2,s.median]]:(e=e||.5,a=[[(s=r(t)).min,e-n/2],[s.min,e+n/2],[s.min,e],[s.min1,e],[s.min1,e-n/2],[s.min1,e+n/2],[s.max1,e+n/2],[s.max1,e-n/2],[s.max1,e],[s.max,e],[s.max,e-n/2],[s.max,e+n/2],[s.median,e-n/2],[s.median,e+n/2]]),function(t,e){o.each(t,function(t){e.push({x:t[0],y:t[1]})})}(a,i),i}function a(t,e,n){var r=function(t){o.isArray(t)||(t=[t]);var e=t.sort(function(t,e){return te[n].radius+F)return!1;return!0}(e,t)}),c=0,l=0,h=[];if(o.length>1){var f=u(o);for(n=0;n-1){var x=t[g.parentIndex[m]],b=Math.atan2(g.x-x.x,g.y-x.y),w=Math.atan2(d.x-x.x,d.y-x.y),_=w-b;_<0&&(_+=2*Math.PI);var S=w-_/2,M=a(y,{x:x.x+x.radius*Math.sin(S),y:x.y+x.radius*Math.cos(S)});M>2*x.radius&&(M=2*x.radius),(null===v||v.width>M)&&(v={circle:x,width:M,p1:g,p2:d})}null!==v&&(h.push(v),c+=i(v.circle.radius,v.width),d=g)}}else{var A=t[0];for(n=1;nMath.abs(A.radius-t[n].radius)){C=!0;break}C?c=l=0:(c=A.radius*A.radius*Math.PI,h.push({circle:A,p1:{x:A.x,y:A.y+A.radius},p2:{x:A.x-F,y:A.y+A.radius},width:2*A.radius}))}return l/=2,e&&(e.area=c+l,e.arcArea=c,e.polygonArea=l,e.arcs=h,e.innerPoints=o,e.intersectionPoints=r),c+l}function i(t,e){return t*t*Math.acos(1-e/t)-(t-e)*Math.sqrt(e*(2*t-e))}function a(t,e){return Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y))}function o(t,e,n){if(n>=t+e)return 0;if(n<=Math.abs(t-e))return Math.PI*Math.min(t,e)*Math.min(t,e);var r=e-(n*n-t*t+e*e)/(2*n);return i(t,t-(n*n-e*e+t*t)/(2*n))+i(e,r)}function s(t,e){var n=a(t,e),r=t.radius,i=e.radius;if(n>=r+i||n<=Math.abs(r-i))return[];var o=(r*r-i*i+n*n)/(2*n),s=Math.sqrt(r*r-o*o),u=t.x+o*(e.x-t.x)/n,c=t.y+o*(e.y-t.y)/n,l=-(e.y-t.y)*(s/n),h=-(e.x-t.x)*(s/n);return[{x:u+l,y:c-h},{x:u-l,y:c+h}]}function u(t){for(var e={x:0,y:0},n=0;n=y[g-1].fx){var k=!1;if(w.fx>P.fx?(d(_,1+f,b,-f,P),_.fx=t(_),_.fx=1)break;for(v=1;vu+a*i*c||l>=g)f=i;else{if(Math.abs(p)<=-o*c)return i;p*(f-s)>=0&&(f=s),s=i,g=l}return 0}var u=n.fx,c=h(n.fxprime,e),l=u,f=u,p=c,g=0;i=i||1,a=a||1e-6,o=o||.1;for(var y=0;y<10;++y){if(d(r.x,1,n.x,i,e),l=r.fx=t(r.x,r.fxprime),p=h(r.fxprime,e),l>u+a*i*c||y&&l>=f)return s(g,i,f);if(Math.abs(p)<=-o*c)return i;if(p>=0)return s(i,g,l);f=l,g=i,i*=2}return i}function v(t,e,n){var r,i,a,o={x:e.slice(),fx:0,fxprime:e.slice()},s={x:e.slice(),fx:0,fxprime:e.slice()},u=e.slice(),c=1;a=(n=n||{}).maxIterations||20*e.length,o.fx=t(o.x,o.fxprime),p(r=o.fxprime.slice(),o.fxprime,-1);for(var l=0;le}),e=0;e0)throw"Initial bisect points must have opposite signs";if(0===o)return e;if(0===s)return n;for(var c=0;c=0&&(e=l),Math.abs(u)=8){var i=function(t,e){var n,r=(e=e||{}).restarts||10,i=[],a={};for(n=0;n=Math.min(e[a].size,e[o].size)?u=1:t.size<=1e-10&&(u=-1),i[a][o]=i[o][a]=u}),{distances:r,constraints:i}}(t,i,a),u=s.distances,h=s.constraints,d=f(u.map(f))/u.length;u=u.map(function(t){return t.map(function(t){return t/d})});var g,y,m=function(t,e){return function(t,e,n,r){var i,a=0;for(i=0;i0&&d<=h||f<0&&d>=h||(a+=2*g*g,e[2*i]+=4*g*(o-c),e[2*i+1]+=4*g*(s-l),e[2*u]+=4*g*(c-o),e[2*u+1]+=4*g*(l-s))}return a}(t,e,u,h)};for(n=0;n=Math.min(u[d].size,u[g].size)&&(p=0),c[d].push({set:g,size:f.size,weight:p}),c[g].push({set:d,size:f.size,weight:p})}var y=[];for(a in c)if(c.hasOwnProperty(a)){var v=0;for(l=0;l0){var i=t[0].x,o=t[0].y;for(r=0;r1){var s,u,c=Math.atan2(t[1].x,t[1].y)-e,l=Math.cos(c),h=Math.sin(c);for(r=0;r2){for(var f=Math.atan2(t[2].x,t[2].y)-e;f<0;)f+=2*Math.PI;for(;f>2*Math.PI;)f-=2*Math.PI;if(f>Math.PI){var p=t[1].y/(1e-10+t[1].x);for(r=0;rc&&p.node().getComputedTextLength()>o&&(h.pop(),p.text(h.join(" ")),h=[l],p=i.append("tspan").text(l),f++)}var d=.35-1.1*f/2,g=i.attr("x"),y=i.attr("y");i.selectAll("tspan").attr("x",g).attr("y",y).attr("dy",function(t,e){return d+1.1*e+"em"})}}function T(t,e,n){var r,i,o=e[0].radius-a(e[0],t);for(r=1;r=c&&(s=i[n],c=l)}var h=g(function(n){return-1*T({x:n[0],y:n[1]},t,e)},[s.x,s.y],{maxIterations:500,minErrorDelta:1e-10}).x,f={x:h[0],y:h[1]},p=!0;for(n=0;nt[n].radius){p=!1;break}for(n=0;n0&&console.log("WARNING: area "+a+" not represented on screen")}return n}function L(t,e,n){var r=[];return r.push("\nM",t,e),r.push("\nm",-n,0),r.push("\na",n,n,0,1,0,2*n,0),r.push("\na",n,n,0,1,0,2*-n,0),r.join(" ")}function D(t){var e=t.split(" ");return{x:parseFloat(e[1]),y:parseFloat(e[2]),radius:-parseFloat(e[4])}}function j(t){var e={};r(t,e);var n=e.arcs;if(0===n.length)return"M 0 0";if(1==n.length){var i=n[0].circle;return L(i.x,i.y,i.radius)}for(var a=["\nM",n[0].p2.x,n[0].p2.y],o=0;ou;a.push("\nA",u,u,0,c?1:0,1,s.p1.x,s.p1.y)}return a.join(" ")}var F=1e-10,R=1e-10;t.intersectionArea=r,t.circleCircleIntersection=s,t.circleOverlap=o,t.circleArea=i,t.distance=a,t.venn=m,t.greedyLayout=w,t.scaleSolution=P,t.normalizeSolution=C,t.bestInitialLayout=b,t.lossFunction=_,t.disjointCluster=M,t.distanceFromIntersectArea=x,t.VennDiagram=function(){function t(t){function f(t){return t.sets in w?w[t.sets]:1==t.sets.length?""+t.sets[0]:void 0}var p=t.datum(),d={};p.forEach(function(t){0==t.size&&1==t.sets.length&&(d[t.sets[0]]=1)});var m={},x={};if((p=p.filter(function(t){return!t.sets.some(function(t){return t in d})})).length>0){var b=y(p,{lossFunction:v});s&&(b=C(b,o,h)),m=P(b,n,r,i),x=E(m,p)}var w={};p.forEach(function(t){t.label&&(w[t.sets]=t.label)}),t.selectAll("svg").data([m]).enter().append("svg");var _=t.select("svg").attr("width",n).attr("height",r),S={},M=!1;_.selectAll(".venn-area path").each(function(t){var n=e.select(this).attr("d");1==t.sets.length&&n&&(M=!0,S[t.sets[0]]=D(n))});var A=function(t){return function(e){return j(t.sets.map(function(t){var i=S[t],a=m[t];return i||(i={x:n/2,y:r/2,radius:1}),a||(a={x:n/2,y:r/2,radius:1}),{x:i.x*(1-e)+a.x*e,y:i.y*(1-e)+a.y*e,radius:i.radius*(1-e)+a.radius*e}}))}},T=_.selectAll(".venn-area").data(p,function(t){return t.sets}),O=T.enter().append("g").attr("class",function(t){return"venn-area venn-"+(1==t.sets.length?"circle":"intersection")}).attr("data-venn-sets",function(t){return t.sets.join("_")}),I=O.append("path"),L=O.append("text").attr("class","label").text(function(t){return f(t)}).attr("text-anchor","middle").attr("dy",".35em").attr("x",n/2).attr("y",r/2);c&&(I.style("fill-opacity","0").filter(function(t){return 1==t.sets.length}).style("fill",function(t){return g(t.sets)}).style("fill-opacity",".25"),L.style("fill",function(t){return 1==t.sets.length?g(t.sets):"#444"}));var F=t;M?(F=t.transition("venn").duration(a)).selectAll("path").attrTween("d",A):F.selectAll("path").attr("d",function(t){return j(t.sets.map(function(t){return m[t]}))});var R=F.selectAll("text").filter(function(t){return t.sets in x}).text(function(t){return f(t)}).attr("x",function(t){return Math.floor(x[t.sets].x)}).attr("y",function(t){return Math.floor(x[t.sets].y)});u&&(M?"on"in R?R.on("end",k(m,f)):R.each("end",k(m,f)):R.each(k(m,f)));var B=T.exit().transition("venn").duration(a).remove();B.selectAll("path").attrTween("d",A);var N=B.selectAll("text").attr("x",n/2).attr("y",r/2);return null!==l&&(L.style("font-size","0px"),R.style("font-size",l),N.style("font-size","0px")),{circles:m,textCentres:x,nodes:T,enter:O,update:F,exit:B}}var n=600,r=350,i=15,a=1e3,o=Math.PI/2,s=!0,u=!0,c=!0,l=null,h=null,f={},p=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],d=0,g=function(t){if(t in f)return f[t];var e=f[t]=p[d];return(d+=1)>=p.length&&(d=0),e},y=m,v=_;return t.wrap=function(e){return arguments.length?(u=e,t):u},t.width=function(e){return arguments.length?(n=e,t):n},t.height=function(e){return arguments.length?(r=e,t):r},t.padding=function(e){return arguments.length?(i=e,t):i},t.colours=function(e){return arguments.length?(g=e,t):g},t.fontSize=function(e){return arguments.length?(l=e,t):l},t.duration=function(e){return arguments.length?(a=e,t):a},t.layoutFunction=function(e){return arguments.length?(y=e,t):y},t.normalize=function(e){return arguments.length?(s=e,t):s},t.styled=function(e){return arguments.length?(c=e,t):c},t.orientation=function(e){return arguments.length?(o=e,t):o},t.orientationOrder=function(e){return arguments.length?(h=e,t):h},t.lossFunction=function(e){return arguments.length?(v=e,t):v},t},t.wrapText=k,t.computeTextCentres=E,t.computeTextCentre=O,t.sortAreas=function(t,e){function n(t){for(var e=0;e=M&&(M=S+1);!(_=b[M])&&++M=0;)(r=i[a])&&(o&&o!==r.nextSibling&&o.parentNode.insertBefore(r,o),o=r);return this}},function(t,e,n){"use strict";function r(t,e){return te?1:t>=e?0:NaN}var i=n(63);e.a=function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=r);for(var n=this._groups,a=n.length,o=new Array(a),s=0;s1?this.each((null==e?function(t){return function(){delete this[t]}}:"function"==typeof e?function(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}:function(t,e){return function(){this[t]=e}})(t,e)):this.node()[t]}},function(t,e,n){"use strict";function r(t){return t.trim().split(/^|\s+/)}function i(t){return t.classList||new a(t)}function a(t){this._node=t,this._names=r(t.getAttribute("class")||"")}function o(t,e){for(var n=i(t),r=-1,a=e.length;++r=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}},e.a=function(t,e){var n=r(t+"");if(arguments.length<2){for(var a=i(this.node()),u=-1,c=n.length;++u=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}})}(t+"",r),o=-1,s=i.length;{if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o0)for(var n,r,i=new Array(n),a=0;a=0&&(t=t.slice(0,e)),!t||"start"===t})}(e)?r.g:r.h;return function(){var r=o(this,t),s=r.on;s!==i&&(a=(i=s).copy()).on(e,n),r.on=a}}(n,t,e))}},function(t,e,n){"use strict";e.a=function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))}},function(t,e,n){"use strict";var r=n(62),i=n(133),a=n(64);e.a=function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Object(r.selector)(t));for(var o=this._groups,s=o.length,u=new Array(s),c=0;ci.c&&n.name===e)return new r.a([[t]],a,e,+o)}return null}},function(t,e,n){function r(t){var e=o.shape.venn;return i.mix({},e,{stroke:t.color,fill:t.color,fillOpacity:t.opacity},t.style)}var i=n(0),a=n(18),o=n(2),s=i.PathUtil,u=a.registerFactory("venn",{defaultShapeType:"venn",getDefaultPoints:function(t){var e=[];return i.each(t.x,function(n,r){var i=t.y[r];e.push({x:n,y:i})}),e},getActiveCfg:function(t,e){var n=e.lineWidth||1;if("hollow"===t)return{lineWidth:n+1};return{fillOpacity:(e.fillOpacity||e.opacity||1)-.08}},getSelectedCfg:function(t,e){return e&&e.style?e.style:this.getActiveCfg(t,e)}});a.registerShape("venn","venn",{draw:function(t,e){var n=t.origin._origin.path,a=r(t),o=s.parsePathString(n);return e.addShape("path",{attrs:i.mix(a,{path:o})})},getMarkerCfg:function(t){return i.mix({symbol:"circle",radius:4},r(t))}}),a.registerShape("venn","hollow",{draw:function(t,e){var n=t.origin._origin.path,r=function(t){var e=o.shape.hollowVenn;return i.mix({},e,{stroke:t.color,strokeOpacity:t.opacity},t.style)}(t),a=s.parsePathString(n);return e.addShape("path",{attrs:i.mix(r,{path:a})})},getMarkerCfg:function(t){return i.mix({symbol:"circle",radius:4},r(t))}}),t.exports=u},function(t,e,n){var r=n(0),i=n(140),a={};a.Rect=n(348),a.List=n(349),a.Circle=n(439),a.Tree=n(440),a.Mirror=n(441),a.Matrix=n(442),i.prototype.facet=function(t,e){var n=a[r.upperFirst(t)];if(!n)throw new Error("Not support such type of facets as: "+t);var i=this.get("facets");i&&i.destroy(),e.chart=this;var o=new n(e);this.set("facets",o)},t.exports=a},function(t,e,n){function r(t,e,n){return{x:t.x+e*Math.cos(n),y:t.y+e*Math.sin(n)}}var i=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.type="circle",e},e.prototype.getRegion=function(t,e){var n=2*Math.PI/t,i=-1*Math.PI/2+n*e,a=.5/(1+1/Math.sin(n/2)),o=r({x:.5,y:.5},.5-a,i),s=5*Math.PI/4,u=1*Math.PI/4;return{start:r(o,a,s),end:r(o,a,u)}},e.prototype.generateFacets=function(t){var e=this,n=e.fields[0];if(!n)throw"Please specify for the field for facet!";var r=e.getFieldValues(n,t),i=r.length,a=[];return r.forEach(function(o,s){var u=[{field:n,value:o,values:r}],c=e.getFilter(u),l=t.filter(c),h={type:e.type,colValue:o,colField:n,colIndex:s,cols:i,rows:1,rowIndex:0,data:l,region:e.getRegion(i,s)};a.push(h)}),a},e}(n(316));t.exports=i},function(t,e,n){var r=n(316),i=n(0).assign,a=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.type="tree",e.line={lineWidth:1,stroke:"#ddd"},e.lineSmooth=!1,e},e.prototype.generateFacets=function(t){if(!this.fields.length)throw"Please specify for the fields for facet!";var e=[],n=this.getRootFacet(t);return e.push(n),n.children=this.getChildFacets(t,1,e),this.setRegion(e),e},e.prototype.getRootFacet=function(t){return{type:this.type,rows:this.getRows(),rowIndex:0,colIndex:0,colValue:this.rootTitle,data:t}},e.prototype.getRows=function(){return this.fields.length+1},e.prototype.getChildFacets=function(t,e,n){var r=this,i=r.fields;if(!(i.length=0;i--)for(var a=e.getFacetsByLevel(t,i),o=0;o2*Math.PI&&(t=t/180*Math.PI),this.transform([["t",-e,-n],["r",t],["t",e,n]])},move:function(t,e){var n=this.get("x")||0,r=this.get("y")||0;return this.translate(t-n,e-r),this.set("x",t),this.set("y",e),this},transform:function(t){var e=this,n=this._attrs.matrix;return o.each(t,function(t){switch(t[0]){case"t":e.translate(t[1],t[2]);break;case"s":e.scale(t[1],t[2]);break;case"r":e.rotate(t[1]);break;case"m":e.attr("matrix",s.multiply([],n,t[1])),e.clearTotalMatrix()}}),e},setTransform:function(t){return this.attr("matrix",[1,0,0,0,1,0,0,0,1]),this.transform(t)},getMatrix:function(){return this.attr("matrix")},setMatrix:function(t){return this.attr("matrix",t),this.clearTotalMatrix(),this},apply:function(t,e){var n=void 0;return n=e?this._getMatrixByRoot(e):this.attr("matrix"),u.transformMat3(t,t,n),this},_getMatrixByRoot:function(t){t=t||this;for(var e=this,n=[];e!==t;)n.unshift(e),e=e.get("parent");n.unshift(e);var r=[1,0,0,0,1,0,0,0,1];return o.each(n,function(t){s.multiply(r,t.attr("matrix"),r)}),r},getTotalMatrix:function(){var t=this._cfg.totalMatrix;if(!t){t=[1,0,0,0,1,0,0,0,1];var e=this._cfg.parent;if(e){a(t,e.getTotalMatrix())}a(t,this.attr("matrix")),this._cfg.totalMatrix=t}return t},clearTotalMatrix:function(){},invert:function(t){var e=this.getTotalMatrix();if(i(e))t[0]/=e[0],t[1]/=e[4];else{var n=s.invert([],e);n&&u.transformMat3(t,t,n)}return this},resetTransform:function(t){var e=this.attr("matrix");r(e)||t.transform(e[0],e[1],e[3],e[4],e[6],e[7])}}},function(t,e,n){var r=n(8),i=n(42),a={delay:"delay",rotate:"rotate",id:"id"};t.exports={animate:function(t,e,n,o){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;this.set("animating",!0);var u=this.get("timeline");u||(u=this.get("canvas").get("timeline"),this.setSilent("timeline",u));var c=this.get("animators")||[];u._timer||u.initTimer(),r.isNumber(o)&&(s=o,o=null),r.isFunction(n)?(o=n,n="easeLinear"):n=n||"easeLinear";var l=function(t,e){var n={matrix:null,attrs:{}},r=e._attrs;for(var o in t)"transform"===o?n.matrix=i.transform(e.getMatrix(),t[o]):"rotate"===o?n.matrix=i.transform(e.getMatrix(),[["r",t[o]]]):"matrix"===o?n.matrix=t[o]:a[o]||r[o]===t[o]||(n.attrs[o]=t[o]);return n}(t,this),h={fromAttrs:function(t,e){var n={},r=e._attrs;for(var i in t.attrs)n[i]=r[i];return n}(l,this),toAttrs:l.attrs,fromMatrix:r.clone(this.getMatrix()),toMatrix:l.matrix,duration:e,easing:n,callback:o,delay:s,startTime:u.getTime(),id:r.uniqueId()};c.length>0?c=function(t,e){var n=Object.prototype.hasOwnProperty;return r.each(e.toAttrs,function(e,i){r.each(t,function(t){n.call(t.toAttrs,i)&&(delete t.toAttrs[i],delete t.fromAttrs[i])})}),t}(c,h):u.addAnimator(this),c.push(h),this.setSilent("animators",c),this.setSilent("pause",{isPaused:!1})},stopAnimate:function(){var t=this,e=this.get("animators");r.each(e,function(e){t.attr(e.toAttrs),e.toMatrix&&t.attr("matrix",e.toMatrix),e.callback&&e.callback()}),this.setSilent("animating",!1),this.setSilent("animators",[])},pauseAnimate:function(){var t=this.get("timeline");return this.setSilent("pause",{isPaused:!0,pauseTime:t.getTime()}),this},resumeAnimate:function(){var t=this.get("timeline").getTime(),e=this.get("animators"),n=this.get("pause").pauseTime;return r.each(e,function(e){e.startTime=e.startTime+(t-n),e._paused=!1,e._pauseTime=null}),this.setSilent("pause",{isPaused:!1}),this.setSilent("animators",e),this}}},function(t,e,n){var r=n(29);r.Arc=n(357),r.Circle=n(358),r.Dom=n(359),r.Ellipse=n(360),r.Fan=n(361),r.Image=n(362),r.Line=n(363),r.Marker=n(337),r.Path=n(364),r.Polygon=n(365),r.Polyline=n(366),r.Rect=n(367),r.Text=n(368),t.exports=r},function(t,e,n){function r(t,e,n){return n.createPath(l),l.isPointInPath(t,e)}var i=n(8),a=n(334),o=n(42).mat3,s=n(42).vec2,u=n(42).vec3,c={arc:n(318),ellipse:n(356),line:n(317)},l=i.createDom('').getContext("2d"),h=function(t,e){function n(){var n=i._attrs,r=n.x,o=n.y,s=n.width,u=n.height,c=n.radius,l=i.getHitLineWidth();if(0===c){var h=l/2;return a.line(r-h,o,r+s+h,o,l,t,e)||a.line(r+s,o-h,r+s,o+u+h,l,t,e)||a.line(r+s+h,o+u,r-h,o+u,l,t,e)||a.line(r,o+u+h,r,o-h,l,t,e)}return a.line(r+c,o,r+s-c,o,l,t,e)||a.line(r+s,o+c,r+s,o+u-c,l,t,e)||a.line(r+s-c,o+u,r+c,o+u,l,t,e)||a.line(r,o+u-c,r,o+c,l,t,e)||a.arcline(r+s-c,o+c,c,1.5*Math.PI,2*Math.PI,!1,l,t,e)||a.arcline(r+s-c,o+u-c,c,0,.5*Math.PI,!1,l,t,e)||a.arcline(r+c,o+u-c,c,.5*Math.PI,Math.PI,!1,l,t,e)||a.arcline(r+c,o+c,c,Math.PI,1.5*Math.PI,!1,l,t,e)}var i=this,o=i.hasFill(),s=i.hasStroke();return o&&s?r(t,e,i)||n():o?r(t,e,i):!!s&&n()},f={arc:function(t,e){var n=this._attrs,r=n.x,i=n.y,o=n.r,s=n.startAngle,u=n.endAngle,c=n.clockwise,l=this.getHitLineWidth();return!!this.hasStroke()&&a.arcline(r,i,o,s,u,c,l,t,e)},circle:function(t,e){var n=this._attrs,r=n.x,i=n.y,o=n.r,s=this.getHitLineWidth(),u=this.hasFill(),c=this.hasStroke();return u&&c?a.circle(r,i,o,t,e)||a.arcline(r,i,o,0,2*Math.PI,!1,s,t,e):u?a.circle(r,i,o,t,e):!!c&&a.arcline(r,i,o,0,2*Math.PI,!1,s,t,e)},dom:h,ellipse:function(t,e){var n=this._attrs,r=this.hasFill(),i=this.hasStroke(),s=n.x,c=n.y,l=n.rx,h=n.ry,f=this.getHitLineWidth(),p=l>h?l:h,d=l>h?1:l/h,g=l>h?h/l:1,y=[t,e,1],v=[1,0,0,0,1,0,0,0,1];o.scale(v,v,[d,g]),o.translate(v,v,[s,c]);var m=o.invert([],v);return u.transformMat3(y,y,m),r&&i?a.circle(0,0,p,y[0],y[1])||a.arcline(0,0,p,0,2*Math.PI,!1,f,y[0],y[1]):r?a.circle(0,0,p,y[0],y[1]):!!i&&a.arcline(0,0,p,0,2*Math.PI,!1,f,y[0],y[1])},fan:function(t,e){function n(){var t=c.arc.nearAngle(b,y,v,m);if(i.isNumberEqual(b,t)){var e=s.squaredLength(x);if(d*d<=e&&e<=g*g)return!0}return!1}function r(){var n=o.getHitLineWidth(),r={x:Math.cos(y)*d+f,y:Math.sin(y)*d+p},i={x:Math.cos(y)*g+f,y:Math.sin(y)*g+p},s={x:Math.cos(v)*d+f,y:Math.sin(v)*d+p},u={x:Math.cos(v)*g+f,y:Math.sin(v)*g+p};return!!(a.line(r.x,r.y,i.x,i.y,n,t,e)||a.line(s.x,s.y,u.x,u.y,n,t,e)||a.arcline(f,p,d,y,v,m,n,t,e)||a.arcline(f,p,g,y,v,m,n,t,e))}var o=this,u=o.hasFill(),l=o.hasStroke(),h=o._attrs,f=h.x,p=h.y,d=h.rs,g=h.re,y=h.startAngle,v=h.endAngle,m=h.clockwise,x=[t-f,e-p],b=s.angleTo([1,0],x);return u&&l?n()||r():u?n():!!l&&r()},image:function(t,e){var n=this._attrs;if(this.get("toDraw")||!n.img)return!1;this._cfg.attrs&&this._cfg.attrs.img===n.img||this._setAttrImg();var r=n.x,i=n.y,o=n.width,s=n.height;return a.rect(r,i,o,s,t,e)},line:function(t,e){var n=this._attrs,r=n.x1,i=n.y1,o=n.x2,s=n.y2,u=this.getHitLineWidth();return!!this.hasStroke()&&a.line(r,i,o,s,u,t,e)},path:function(t,e){function n(){if(!i.isEmpty(o)){for(var n=a.getHitLineWidth(),r=0,s=o.length;r=3&&o.push(n[0]),a.polyline(o,r,t,e)}var i=this,o=i.hasFill(),s=i.hasStroke();return o&&s?r(t,e,i)||n():o?r(t,e,i):!!s&&n()},polyline:function(t,e){var n=this._attrs;if(this.hasStroke()){var r=n.points;if(r.length<2)return!1;var i=n.lineWidth;return a.polyline(r,i,t,e)}return!1},rect:h,text:function(t,e){var n=this.getBBox();if(this.hasFill()||this.hasStroke())return a.box(n.minX,n.maxX,n.minY,n.maxY,t,e)}};t.exports={isPointInPath:function(t,e){var n=f[this.type];return!!n&&n.call(this,t,e)}}},function(t,e,n){function r(t,e,n){var r=e.startTime;if(n0){for(var u=t._animators.length-1;u>=0;u--)if((i=t._animators[u]).get("destroyed"))e.removeAnimator(u);else{if(!i.get("pause").isPaused)for(var c=(a=i.get("animators")).length-1;c>=0;c--)s=a[c],(n=r(i,s,o))&&(a.splice(c,1),n=!1);0===a.length&&e.removeAnimator(u)}t.canvas.draw()}})},addAnimator:function(t){this._animators.push(t)},removeAnimator:function(t){this._animators.splice(t,1)},isAnimating:function(){return!!this._animators.length},stop:function(){this._timer&&this._timer.stop()},stopAllAnimations:function(){this._animators.forEach(function(t){t.stopAnimate()}),this._animators=[],this.canvas.draw()},getTime:function(){return this._current}}),t.exports=h},function(t,e,n){t.exports={canvas:n(453),svg:n(456)}},function(t,e,n){t.exports={painter:n(454)}},function(t,e,n){var r=n(8),i=n(455),a=["fillStyle","font","globalAlpha","lineCap","lineWidth","lineJoin","miterLimit","shadowBlur","shadowColor","shadowOffsetX","shadowOffsetY","strokeStyle","textAlign","textBaseline","lineDash","lineDashOffset"],o=function(){function t(e){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),!e)return null;var n=r.uniqueId("canvas_"),i=r.createDom('');return e.appendChild(i),this.type="canvas",this.canvas=i,this.context=i.getContext("2d"),this.toDraw=!1,this}return t.prototype.beforeDraw=function(){var t=this.canvas;this.context&&this.context.clearRect(0,0,t.width,t.height)},t.prototype.draw=function(t){function e(){n.animateHandler=r.requestAnimationFrame(function(){n.animateHandler=void 0,n.toDraw&&e()}),n.beforeDraw();try{n._drawGroup(t)}catch(t){console.warn("error in draw canvas, detail as:"),console.warn(t),n.toDraw=!1}n.toDraw=!1}var n=this;n.animateHandler?n.toDraw=!0:e()},t.prototype._drawGroup=function(t){if(!t._cfg.removed&&!t._cfg.destroyed&&t._cfg.visible){var e=t._cfg.children,n=null;this.setContext(t);for(var r=0;r-1){var s=n[o];"fillStyle"===o&&(s=i.parseStyle(s,t,e)),"strokeStyle"===o&&(s=i.parseStyle(s,t,e)),"lineDash"===o&&e.setLineDash?r.isArray(s)?e.setLineDash(s):r.isString(s)&&e.setLineDash(s.split(" ")):e[o]=s}},t}();t.exports=o},function(t,e,n){function r(t,e){var n=t.match(l);i.each(n,function(t){t=t.split(":"),e.addColorStop(t[0],t[1])})}var i=n(8),a=/[MLHVQTCSAZ]([^MLHVQTCSAZ]*)/gi,o=/[^\s\,]+/gi,s=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,u=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,c=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,l=/[\d.]+:(#[^\s]+|[^\)]+\))/gi,h={};t.exports={parsePath:function(t){return t=t||[],i.isArray(t)?t:i.isString(t)?(t=t.match(a),i.each(t,function(e,n){if((e=e.match(o))[0].length>1){var r=e[0].charAt(0);e.splice(1,0,e[0].substr(1)),e[0]=r}i.each(e,function(t,n){isNaN(t)||(e[n]=+t)}),t[n]=e}),t):void 0},parseStyle:function(t,e,n){if(i.isString(t)){if("("===t[1]||"("===t[2]){if("l"===t[0])return function(t,e,n){var a=s.exec(t),o=i.mod(i.toRadian(parseFloat(a[1])),2*Math.PI),u=a[2],c=e.getBBox(),l=void 0,h=void 0;o>=0&&o<.5*Math.PI?(l={x:c.minX,y:c.minY},h={x:c.maxX,y:c.maxY}):.5*Math.PI<=o&&o');return e.appendChild(i),this.type="svg",this.canvas=i,this.context=new a(i),this.toDraw=!1,this}return t.prototype.draw=function(t){function e(){n.animateHandler=r.requestAnimationFrame(function(){n.animateHandler=void 0,n.toDraw&&e()});try{n._drawChildren(t._cfg.children)}catch(t){console.warn("error in draw canvas, detail as:"),console.warn(t),n.toDraw=!1}n.toDraw=!1}var n=this;n.animateHandler?n.toDraw=!0:e()},t.prototype._drawGroup=function(t){this._drawShape(t),this._drawChildren(t._cfg.children)},t.prototype._drawChildren=function(t){for(var e=void 0,n=0;ns?1:0,f=Math.abs(u-s)>Math.PI?1:0,p=n.rs,d=n.re,g=e(s,n.rs,a),y=e(u,n.rs,a);n.rs>0?(o.push("M "+l.x+","+l.y),o.push("L "+y.x+","+y.y),o.push("A "+p+","+p+",0,"+f+","+(1===h?0:1)+","+g.x+","+g.y),o.push("L "+c.x+" "+c.y)):(o.push("M "+a.x+","+a.y),o.push("L "+c.x+","+c.y)),o.push("A "+d+","+d+",0,"+f+","+h+","+l.x+","+l.y),n.rs>0?o.push("L "+y.x+","+y.y):o.push("Z"),i.el.setAttribute("d",o.join(" "))},t.prototype._updateText=function(t){var e=t._attrs,n=t._cfg.attrs,r=t._cfg.el;this._setFont(t);for(var i in e)if(e[i]!==n[i]){if("text"===i){this._setText(t,e[i]);continue}if("fillStyle"===i||"strokeStyle"===i){this._setColor(t,i,e[i]);continue}if("matrix"===i){this._setTransform(t);continue}s[i]&&r.setAttribute(s[i],e[i])}t._cfg.attrs=Object.assign({},t._attrs),t._cfg.hasUpdate=!1},t.prototype._setFont=function(t){var e=t.get("el"),n=t._attrs,r=n.fontSize;e.setAttribute("alignment-baseline",u[n.textBaseline]||"baseline"),e.setAttribute("text-anchor",c[n.textAlign]||"left"),r&&+r<12&&(n.matrix=[1,0,0,0,1,0,0,0,1],t.transform([["t",-n.x,-n.y],["s",+r/12,+r/12],["t",n.x,n.y]]))},t.prototype._setText=function(t,e){var n=t._cfg.el;if(e)if(~e.indexOf("\n")){var i=t._attrs.x,a=e.split("\n"),o="";r.each(a,function(t){o+=''+t+""}),n.innerHTML=o}else n.innerHTML=e;else n.innerHTML=""},t.prototype._setClip=function(t,e){var n=t._cfg.el;if(e)if(n.hasAttribute("clip-path"))e._cfg.hasUpdate&&this._updateShape(e);else{this._createDom(e),this._updateShape(e);var r=this.context.addClip(e);n.setAttribute("clip-path","url(#"+r+")")}else n.removeAttribute("clip-path")},t.prototype._setColor=function(t,e,n){var r=t._cfg.el,i=this.context;if(n)if(n=n.trim(),/^[r,R,L,l]{1}[\s]*\(/.test(n)){var a=i.find("gradient",n);a||(a=i.addGradient(n)),r.setAttribute(s[e],"url(#"+a+")")}else if(/^[p,P]{1}[\s]*\(/.test(n)){var o=i.find("pattern",n);o||(o=i.addPattern(n)),r.setAttribute(s[e],"url(#"+o+")")}else r.setAttribute(s[e],n);else r.setAttribute(s[e],"none")},t.prototype._setShadow=function(t){var e=t._cfg.el,n=t._attrs,r={dx:n.shadowOffsetX,dy:n.shadowOffsetY,blur:n.shadowBlur,color:n.shadowColor},i=this.context.find("filter",r);i||(i=this.context.addShadow(r,this)),e.setAttribute("filter","url(#"+i+")")},t}();t.exports=l},function(t,e,n){var r=n(8),i=n(459),a=n(460),o=n(461),s=n(462),u=n(463),c=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var n=document.createElementNS("http://www.w3.org/2000/svg","defs"),i=r.uniqueId("defs_");n.id=i,e.appendChild(n),this.children=[],this.defaultArrow={},this.el=n,this.canvas=e}return t.prototype.find=function(t,e){for(var n=this.children,r=null,i=0;i'}),n}var i=n(8),a=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,o=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,s=/[\d.]+:(#[^\s]+|[^\)]+\))/gi,u=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var n=null,s=i.uniqueId("gradient_");return"l"===e.toLowerCase()[0]?function(t,e){var n=a.exec(t),o=i.mod(i.toRadian(parseFloat(n[1])),2*Math.PI),s=n[2],u=void 0,c=void 0;o>=0&&o<.5*Math.PI?(u={x:0,y:0},c={x:1,y:1}):.5*Math.PI<=o&&o';e.innerHTML=n},t}();t.exports=a},function(t,e,n){var r=n(8),i=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var i=document.createElementNS("http://www.w3.org/2000/svg","marker"),a=r.uniqueId("marker_");i.setAttribute("id",a);var o=document.createElementNS("http://www.w3.org/2000/svg","path");return o.setAttribute("stroke","none"),o.setAttribute("fill",e.stroke||"#000"),i.appendChild(o),i.setAttribute("overflow","visible"),i.setAttribute("orient","auto-start-reverse"),this.el=i,this.child=o,this.id=a,this.cfg=e["marker-start"===n?"startArrow":"endArrow"],this.stroke=e.stroke||"#000",!0===this.cfg?this._setDefaultPath(n,o):this._setMarker(e.lineWidth,o),this}return t.prototype.match=function(){return!1},t.prototype._setDefaultPath=function(t,e){var n=this.el;e.setAttribute("d","M0,0 L6,3 L0,6 L3,3Z"),n.setAttribute("refX",3),n.setAttribute("refY",3)},t.prototype._setMarker=function(t,e){var n=this.el,i=this.cfg.path,a=this.cfg.d;r.isArray(i)&&(i=i.map(function(t){return t.join(" ")}).join("")),e.setAttribute("d",i),n.appendChild(e),a&&n.setAttribute("refX",a/t)},t.prototype.update=function(t){var e=this.child;e.attr?e.attr("fill",t):e.setAttribute("fill",t)},t}();t.exports=i},function(t,e,n){var r=n(8),i=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.type="clip";var n=document.createElementNS("http://www.w3.org/2000/svg","clipPath");return this.el=n,this.id=r.uniqueId("clip_"),n.id=this.id,n.appendChild(e._cfg.el),this.cfg=e,this}return t.prototype.match=function(){return!1},t.prototype.remove=function(){var t=this.el;t.parentNode.removeChild(t)},t}();t.exports=i},function(t,e,n){var r=n(8),i=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,a=function(){function t(e){function n(){console.log(c.width,c.height),a.setAttribute("width",c.width),a.setAttribute("height",c.height)}!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var a=document.createElementNS("http://www.w3.org/2000/svg","pattern");a.setAttribute("patternUnits","userSpaceOnUse");var o=document.createElementNS("http://www.w3.org/2000/svg","image");a.appendChild(o);var s=r.uniqueId("pattern_");a.id=s,this.el=a,this.id=s,this.cfg=e;var u=i.exec(e)[2];o.setAttribute("href",u);var c=new Image;return u.match(/^data:/i)||(c.crossOrigin="Anonymous"),c.src=u,c.complete?n():(c.onload=n,c.src=c.src),this}return t.prototype.match=function(t,e){return this.cfg===e},t}();t.exports=a},function(t,e){var n={svg:"svg",circle:"circle",rect:"rect",text:"text",path:"path",foreignObject:"foreignObject",polygon:"polygon",ellipse:"ellipse",image:"image"};t.exports=function(t,e,r){var i=r.target||r.srcElement,a=i.id;if(!a||!n[i.tagName]){for(var o=i.parentNode;o&&!n[o.tagName];)o=o.parentNode;a=o.id}return this._attrs.id===a?this:this.find(function(t){return t._attrs&&t._attrs.id===a})}},function(t,e,n){var r=n(321),i=["X","Y","XY","POLYGON"],a="XY",o=function(t){function e(n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,n,r)),s=o;s.filter=!s.draggable,s.type=s.type.toUpperCase(),s.chart=r,-1===i.indexOf(s.type)&&(s.type=a);var u=s.canvas;if(u){var c=void 0;u.get("children").map(function(t){return"plotBack"===t.get("type")?(c=t.get("plotRange"),!1):t}),s.plot={start:c.bl,end:c.tr}}if(r){var l=r.get("coord");s.plot={start:l.start,end:l.end};var h=r._getScales("x"),f=r._getScales("y");s.xScale=s.xField?h[s.xField]:r.getXScale(),s.yScale=s.yField?f[s.yField]:r.getYScales()[0]}return o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return r.mix({},e,{type:a,startPoint:null,brushing:!1,dragging:!1,brushShape:null,container:null,polygonPath:null,style:{fill:"#C5D4EB",opacity:.3,lineWidth:1,stroke:"#82A6DD"},draggable:!1,dragOffX:0,dragOffY:0,inPlot:!0,xField:null,yField:null})},e.prototype.start=function(t){var e=this,n=e.canvas,r=e.type,i=e.brushShape;if(r){var a={x:t.offsetX,y:t.offsetY};if(a.x){var o=e.plot&&e.inPlot,s=n.get("canvasDOM"),u=n.get("pixelRatio");if(e.selection&&(e.selection=null),e.draggable&&i&&!i.get("destroyed")){if(i.isHit(a.x*u,a.y*u)){if(s.style.cursor="move",e.selection=i,e.dragging=!0,"X"===r)e.dragoffX=a.x-i.attr("x"),e.dragoffY=0;else if("Y"===r)e.dragoffX=0,e.dragoffY=a.y-i.attr("y");else if("XY"===r)e.dragoffX=a.x-i.attr("x"),e.dragoffY=a.y-i.attr("y");else if("POLYGON"===r){var c=i.getBBox();e.dragoffX=a.x-c.minX,e.dragoffY=a.y-c.minY}o&&e.selection.attr("clip",n.addShape("rect",{attrs:{x:this.plot.start.x,y:this.plot.end.y,width:this.plot.end.x-this.plot.start.x,height:this.plot.start.y-this.plot.end.y,fill:"#fff",fillOpacity:0}})),e.onDragstart&&e.onDragstart(t)}e.prePoint=a}if(!e.dragging){e.onBrushstart&&e.onBrushstart(a);var l=e.container;if(o){var h=e.plot,f=h.start,p=h.end;if(a.xp.x||a.yf.y)return}s.style.cursor="crosshair",e.startPoint=a,e.brushShape=null,e.brushing=!0,l?l.clear():(l=n.addGroup({zIndex:5})).initTransform(),e.container=l,"POLYGON"===r&&(e.polygonPath="M "+a.x+" "+a.y)}}}},e.prototype.process=function(t){var e=this,n=e.brushing,i=e.dragging,a=e.type,o=e.plot,s=e.startPoint,u=e.xScale,c=e.yScale,l=e.canvas;if(n||i){var h={x:t.offsetX,y:t.offsetY},f=l.get("canvasDOM");if(n){f.style.cursor="crosshair";var p=o.start,d=o.end,g=e.polygonPath,y=e.brushShape,v=e.container;e.plot&&e.inPlot&&(h=e._limitCoordScope(h));var m=void 0,x=void 0,b=void 0,w=void 0;"Y"===a?(m=p.x,x=h.y>=s.y?s.y:h.y,b=Math.abs(p.x-d.x),w=Math.abs(s.y-h.y)):"X"===a?(m=h.x>=s.x?s.x:h.x,x=d.y,b=Math.abs(s.x-h.x),w=Math.abs(d.y-p.y)):"XY"===a?(h.x>=s.x?(m=s.x,x=h.y>=s.y?s.y:h.y):(m=h.x,x=h.y>=s.y?s.y:h.y),b=Math.abs(s.x-h.x),w=Math.abs(s.y-h.y)):"POLYGON"===a&&(g+="L "+h.x+" "+h.y,e.polygonPath=g,y?!y.get("destroyed")&&y.attr(r.mix({},y._attrs,{path:g})):y=v.addShape("path",{attrs:r.mix(e.style,{path:g})})),"POLYGON"!==a&&(y?!y.get("destroyed")&&y.attr(r.mix({},y._attrs,{x:m,y:x,width:b,height:w})):y=v.addShape("rect",{attrs:r.mix(e.style,{x:m,y:x,width:b,height:w})})),e.brushShape=y}else if(i){f.style.cursor="move";var _=e.selection;if(_&&!_.get("destroyed"))if("POLYGON"===a){var S=e.prePoint;e.selection.translate(h.x-S.x,h.y-S.y)}else e.dragoffX&&_.attr("x",h.x-e.dragoffX),e.dragoffY&&_.attr("y",h.y-e.dragoffY)}e.prePoint=h,l.draw();var M=e._getSelected(),A=M.data,C=M.shapes,P=M.xValues,k=M.yValues,T={data:A,shapes:C,x:h.x,y:h.y};u&&(T[u.field]=P),c&&(T[c.field]=k),e.onDragmove&&e.onDragmove(T),e.onBrushmove&&e.onBrushmove(T)}},e.prototype.end=function(t){var e=this,n=e.data,i=e.shapes,a=e.xValues,o=e.yValues,s=e.canvas,u=e.type,c=e.startPoint,l=e.chart,h=e.container,f=e.xScale,p=e.yScale,d=t.offsetX,g=t.offsetY;if(s.get("canvasDOM").style.cursor="default",Math.abs(c.x-d)<=1&&Math.abs(c.y-g)<=1)return e.brushing=!1,void(e.dragging=!1);var y={data:n,shapes:i,x:d,y:g};if(f&&(y[f.field]=a),p&&(y[p.field]=o),e.dragging)e.dragging=!1,e.onDragend&&e.onDragend(y);else if(e.brushing){e.brushing=!1;var v=e.brushShape,m=e.polygonPath;"POLYGON"===u&&(m+="z",v&&!v.get("destroyed")&&v.attr(r.mix({},v._attrs,{path:m})),e.polygonPath=m,s.draw()),e.onBrushend?e.onBrushend(y):l&&e.filter&&(h.clear(),"X"===u?f&&l.filter(f.field,function(t){return a.indexOf(t)>-1}):"Y"===u?p&&l.filter(p.field,function(t){return o.indexOf(t)>-1}):(f&&l.filter(f.field,function(t){return a.indexOf(t)>-1}),p&&l.filter(p.field,function(t){return o.indexOf(t)>-1})),l.repaint())}},e.prototype.reset=function(){var t=this.chart,e=this.filter;t&&e&&(t.get("options").filters={},t.repaint())},e.prototype._limitCoordScope=function(t){var e=this.plot,n=e.start,r=e.end;return t.xr.x&&(t.x=r.x),t.yn.y&&(t.y=n.y),t},e.prototype._getSelected=function(){var t=this,e=t.chart,n=t.xScale,r=t.yScale,i=t.brushShape,a=t.canvas.get("pixelRatio"),o=[],s=[],u=[],c=[];if(e){e.get("geoms").map(function(t){return t.getShapes().map(function(t){var e=t.get("origin");return Array.isArray(e)||(e=[e]),e.map(function(e){if(i.isHit(e.x*a,e.y*a)){o.push(t);var l=e._origin;c.push(l),n&&s.push(l[n.field]),r&&u.push(l[r.field])}return e}),t}),t})}return t.shapes=o,t.xValues=s,t.yValues=u,t.data=c,{data:c,xValues:s,yValues:u,shapes:o}},e}(n(308));t.exports=o},function(t,e,n){var r=n(321),i=["X","Y","XY"],a="X",o=function(t){function e(n,o){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var s=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,n,o)),u=s;u.type=u.type.toUpperCase(),u.chart=o;var c=o.getYScales(),l=o.getXScale();c.push(l);var h=o.get("scaleController");return c.forEach(function(t){var e=t.field,n=h.defs[e];u.originScaleDefsByField[e]=r.mix(n,{nice:!!n.nice}),t.isLinear&&(u.stepByField[e]=(t.max-t.min)*u.stepRatio)}),-1===i.indexOf(u.type)&&(u.type=a),s}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return r.mix({},e,{type:a,stepRatio:.05,stepByField:{},originScaleDefsByField:{},previousPoint:null,isDragging:!1})},e.prototype._applyTranslate=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.chart,r=t.min,i=t.max,a=t.field,o=i-r;n.scale(a,{nice:!1,min:r-e*o,max:i-e*o})},e.prototype.start=function(t){var e=this.chart;this.canvas.get("canvasDOM").style.cursor="pointer";var n=e.get("coord");this.isDragging=!0,this.previousPoint=n.invertPoint(t)},e.prototype.process=function(t){var e=this;if(e.isDragging){var n=e.chart,r=e.type;e.canvas.get("canvasDOM").style.cursor="move";var i=n.get("coord"),a=e.previousPoint,o=i.invertPoint(t);if(r.indexOf("X")>-1&&e._applyTranslate(n.getXScale(),o.x-a.x),r.indexOf("Y")>-1){n.getYScales().forEach(function(t){e._applyTranslate(t,o.y-a.y)})}e.previousPoint=o,n.repaint()}},e.prototype.end=function(){this.isDragging=!1;this.canvas.get("canvasDOM").style.cursor="default"},e.prototype.reset=function(){var t=this.view,e=this.originScaleDefsByField,n=t.getYScales(),r=t.getXScale();n.push(r),n.forEach(function(n){if(n.isLinear){var r=n.field;t.scale(r,e[r])}}),t.repaint()},e}(n(308));t.exports=o},function(t,e,n){function r(t,e){var n={};for(var r in e)n[r]=t[r];return n}var i=n(321),a=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return i.mix({},e,{startEvent:"mouseup",processEvent:null,selectStyle:{fillOpacity:1},unSelectStyle:{fillOpacity:.1},cancelable:!0})},e.prototype.start=function(t){var e=void 0,n=[];if(this.view.eachShape(function(r,i){i.isPointInPath(t.x,t.y)?e=i:n.push(i)}),e)if(e.get("_selected")){if(!this.cancelable)return;this.reset()}else{var a=this.selectStyle,o=this.unSelectStyle,s=r(e.attr(),e);e.set("_originAttrs",s),e.attr(a),i.each(n,function(t){var e=t.get("_originAttrs");e&&t.attr(e),t.set("_selected",!1),o&&(e=r(t.attr(),o),t.set("_originAttrs",e),t.attr(o))}),e.set("_selected",!0),this.selectedShape=e,this.canvas.draw()}else this.reset()},e.prototype.end=function(t){var e=this.selectedShape;e&&!e.get("destroyed")&&e.get("origin")&&(t.data=e.get("origin")._origin,t.shapeInfo=e.get("origin"),t.shape=e,t.selected=!!e.get("_selected"))},e.prototype.reset=function(){if(this.selectedShape){var t=this.view.get("geoms")[0].get("container").get("children")[0].get("children");i.each(t,function(t){var e=t.get("_originAttrs");e&&(t._attrs=e,t.set("_originAttrs",null)),t.set("_selected",!1)}),this.canvas.draw()}},e}(n(308));t.exports=a},function(t,e,n){var r=n(321),i=["X","Y","XY"],a="X",o=function(t){function e(n,o){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var s=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,n,o)),u=s;u.chart=o,u.type=u.type.toUpperCase();var c=o.getYScales(),l=o.getXScale();c.push(l);var h=o.get("scaleController");return c.forEach(function(t){var e=t.field,n=h.defs[e]||{};u.originScaleDefsByField[e]=r.mix(n,{nice:!!n.nice}),t.isLinear&&(u.stepByField[e]=(t.max-t.min)*u.stepRatio)}),-1===i.indexOf(u.type)&&(u.type=a),s}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return r.mix({},e,{processEvent:"mousewheel",type:a,stepRatio:.05,stepByField:{},originScaleDefsByField:{}})},e.prototype._applyScale=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=this.chart,i=this.stepByField;if(t.isLinear){var a=t.min,o=t.max,s=t.field,u=1-n,c=i[s]*e,l=a+c*n,h=o-c*u;h>l&&r.scale(s,{nice:!1,min:l,max:h})}},e.prototype.process=function(t){var e=this,n=e.chart,r=e.type,i=n.get("coord"),a=t.deltaY,o=i.invertPoint(t);if(a){e.onZoom&&e.onZoom(a,o,e),a>0?e.onZoomin&&e.onZoomin(a,o,e):e.onZoomout&&e.onZoomout(a,o,e);var s=a/Math.abs(a);if(r.indexOf("X")>-1&&e._applyScale(n.getXScale(),s,o.x),r.indexOf("Y")>-1){n.getYScales().forEach(function(t){e._applyScale(t,s,o.y)})}}n.repaint()},e.prototype.reset=function(){var t=this.view,e=this.originScaleDefsByField,n=t.getYScales(),r=t.getXScale();n.push(r),n.forEach(function(n){if(n.isLinear){var r=n.field;t.scale(r,e[r])}}),t.repaint()},e}(n(308));t.exports=o},function(t,e,n){var r=n(350).CommonUtil;t.exports=function(t,e){t._Interactions={},t.registerInteraction=function(e,n){t._Interactions[e]=n},t.getInteraction=function(t){return G2._Interactions[t]},e.prototype.getInteractions=function(){return this._interactions||(this._interactions={}),this._interactions},e.prototype._setInteraction=function(t,e){var n=this.getInteractions();n[t]&&n[t]!==e&&n[t].destroy(),n[t]=e},e.prototype.clearInteraction=function(t){var e=this.getInteractions();t?(e[t]&&e[t].destroy(),delete e[t]):r.each(e,function(t,n){t.destroy(),delete e[n]})},e.prototype.interact=e.prototype.interaction=function(t,e){var n=new(G2.getInteraction(t))(e,this);return this._setInteraction(t,n),this}}}])});