text: !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("echarts/lib/echarts"),require("echarts/lib/component/tooltip"),require("echarts/lib/component/legend"),require("echarts/extension/bmap/bmap")):"function"==typeof define&&define.amd?define(["echarts/lib/echarts","echarts/lib/component/tooltip","echarts/lib/component/legend","echarts/extension/bmap/bmap"],e):t.VeBmap=e(t.echarts)}(this,function(t){"use strict";(t=t&&t.hasOwnProperty("default")?t.default:t).registerTheme("ve-chart",{categoryAxis:{axisLine:{show:!1},axisTick:{show:!1},splitLine:{show:!1}},valueAxis:{axisLine:{show:!1}},line:{smooth:!0},grid:{containLabel:!0,left:10,right:10}});var e=["#19d4ae","#5ab1ef","#fa6e86","#ffb980","#0067a6","#c4b4e4","#d87a80","#9cbbff","#d9d0c7","#87a997","#d49ea2","#5b4947","#7ba3a8"],i={th:3,mi:6,bi:9,tr:12},n={zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0,abbrLabel:{th:"k",mi:"m",bi:"b",tr:"t"}},r=1e12,a=1e9,o=1e6,s=1e3;function c(t,e,i,n){var r=t.toString().split("."),a=e-(n||0),o=2===r.length?Math.min(Math.max(r[1].length,a),e):a,s=Math.pow(10,o),c=(i(t+"e+"+o)/s).toFixed(o);if(n>e-o){var h=new RegExp("\\.?0{1,"+(n-(e-o))+"}$");c=c.replace(h,"")}return c}function h(t,e,n,h){var l=Math.abs(e),d=!1,u=!1,f="",p="",b=!1,m=void 0,g=void 0;n=n||"",e=e||0,~n.indexOf("(")?(d=!0,n=n.replace(/[(|)]/g,"")):(~n.indexOf("+")||~n.indexOf("-"))&&(g=~n.indexOf("+")?n.indexOf("+"):e<0?n.indexOf("-"):-1,n=n.replace(/[+|-]/g,"")),~n.indexOf("a")&&(m=!!(m=n.match(/a(k|m|b|t)?/))&&m[1],~n.indexOf(" a")&&(f=" "),n=n.replace(new RegExp(f+"a[kmbt]?"),""),l>=r&&!m||"t"===m?(f+=t.abbrLabel.tr,e/=r):l<r&&l>=a&&!m||"b"===m?(f+=t.abbrLabel.bi,e/=a):l<a&&l>=o&&!m||"m"===m?(f+=t.abbrLabel.mi,e/=o):(l<o&&l>=s&&!m||"k"===m)&&(f+=t.abbrLabel.th,e/=s)),~n.indexOf("[.]")&&(u=!0,n=n.replace("[.]","."));var y=e.toString().split(".")[0],O=n.split(".")[1],v=n.indexOf(","),x=(n.split(".")[0].split(",")[0].match(/0/g)||[]).length;if(O?(y=(p=~O.indexOf("[")?c(e,(O=(O=O.replace("]","")).split("["))[0].length+O[1].length,h,O[1].length):c(e,O.length,h)).split(".")[0],p=~p.indexOf(".")?"."+p.split(".")[1]:"",u&&0==+p.slice(1)&&(p="")):y=c(e,0,h),f&&!m&&+y>=1e3&&f!==i.trillion&&(y=""+ +y/1e3,f=i.million),~y.indexOf("-")&&(y=y.slice(1),b=!0),y.length<x)for(var j=x-y.length;j>0;j--)y="0"+y;v>-1&&(y=y.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,")),n.indexOf(".")||(y="");var k=y+p+(f||"");return d?k=(d&&b?"(":"")+k+(d&&b?")":""):g>=0?k=0===g?(b?"-":"+")+k:k+(b?"-":"+"):b&&(k="-"+k),k}function l(t,e){Object.keys(e).forEach(function(i){t[i]=e[i]})}var d={},u={};function f(t,e,i){var n=void 0;return 0===t||void 0===t?n=0:null===t||function(t){return"number"==typeof t&&isNaN(t)}(t)?n=null:"string"==typeof t?d.zeroFormat&&t===d.zeroFormat?n=0:(d.nullFormat&&t===d.nullFormat||!t.replace(/[^0-9]+/g,"").length)&&(n=null):n=+t||null,function(t,e,i){e=e||d.defaultFormat,i=i||Math.round;var n=void 0,r=void 0;if(0===t&&null!==d.zeroFormat)n=d.zeroFormat;else if(null===t&&null!==d.nullFormat)n=d.nullFormat;else{for(var a in u)if(u[a]&&e.match(u[a].regexp)){r=u[a].format;break}n=(r=r||h.bind(null,d))(t,e,i,f)}return n}(n,e,i)}function p(t,e){var i=null;return function(){var n=this,r=arguments;clearTimeout(i),i=setTimeout(function(){t.apply(n,r)},e)}}function b(t){return Object.prototype.toString.call(t)}function m(t){return"[object Object]"===b(t)}l(d,n),f.options=d,f._numberToFormat=h.bind(null,d),f.register=function(t,e){u[t]=e},f.unregister=function(t){u[t]=null},f.setOptions=function(t){l(d,t)},f.reset=function(){l(d,n)},f.register("percentage",{regexp:/%/,format:function(t,e,i,n){var r=~e.indexOf(" %")?" ":"",a=void 0;return n.options.scalePercentBy100&&(t*=100),e=e.replace(/\s?%/,""),~(a=n._numberToFormat(t,e,i)).indexOf(")")?((a=a.split("")).splice(-1,0,r+"%"),a=a.join("")):a=a+r+"%",a}});var g=null,y=function(t,e,i,n){var r=i.key,a=i.v,o=i.bmap,s=i.useOuterMap,c=n._once;return r||s||console.warn("settings.key must be a string."),c.bmap_register?{}:(c.bmap_register=!0,s?{bmap:o}:function(t,e){return g||(g=new Promise(function(i,n){var r="bmap"+Date.now();window[r]=i;var a=document.createElement("script");a.src=["https://api.map.baidu.com/api?v="+(e||"2.0"),"ak="+t,"callback="+r].join("&"),document.body.appendChild(a)})),g}(r,a).then(function(t){return{bmap:o}}))},O={render:function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"v-charts-component-loading"},[e("div",{staticClass:"loader"},[e("div",{staticClass:"loading-spinner"},[e("svg",{staticClass:"circular",attrs:{viewBox:"25 25 50 50"}},[e("circle",{staticClass:"path",attrs:{cx:"50",cy:"50",r:"20",fill:"none"}})])])])])},staticRenderFns:[]},v={render:function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"v-charts-data-empty"},[this._v(" 暂无数据 ")])},staticRenderFns:[]},x=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},j=["initOptions","loading","dataEmpty","judgeWidth","widthChangeDelay"];return{name:"VeBmap",mixins:[{render:function(t){return t("div",{class:[(e=this.$options.name||this.$options._componentTag,e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase())],style:this.canvasStyle},[t("div",{style:this.canvasStyle,ref:"canvas"}),t(v,{style:{display:this.dataEmpty?"":"none"}}),t(O,{style:{display:this.loading?"":"none"}}),this.$slots.default]);var e},props:{data:{type:[Object,Array],default:function(){return{}}},settings:{type:Object,default:function(){return{}}},width:{type:String,default:"auto"},height:{type:String,default:"400px"},beforeConfig:{type:Function},afterConfig:{type:Function},afterSetOption:{type:Function},afterSetOptionOnce:{type:Function},events:{type:Object},grid:{type:[Object,Array]},colors:{type:Array},tooltipVisible:{type:Boolean,default:!0},legendVisible:{type:Boolean,default:!0},legendPosition:{type:String},markLine:{type:Object},markArea:{type:Object},markPoint:{type:Object},visualMap:{type:[Object,Array]},dataZoom:{type:[Object,Array]},toolbox:{type:[Object,Array]},initOptions:{type:Object,default:function(){return{}}},title:[Object,Array],legend:[Object,Array],xAxis:[Object,Array],yAxis:[Object,Array],radar:Object,tooltip:Object,axisPointer:[Object,Array],brush:[Object,Array],geo:[Object,Array],timeline:[Object,Array],graphic:[Object,Array],series:[Object,Array],backgroundColor:[Object,String],textStyle:[Object,Array],animation:Object,theme:Object,themeName:String,loading:Boolean,dataEmpty:Boolean,extend:Object,judgeWidth:{type:Boolean,default:!1},widthChangeDelay:{type:Number,default:300},tooltipFormatter:{type:Function},resizeable:{type:Boolean,default:!0},resizeDelay:{type:Number,default:200},changeDelay:{type:Number,default:0},setOptionOpts:{type:[Boolean,Object],default:!0}},watch:{data:{deep:!0,handler:function(t){t&&this.changeHandler()}},settings:{deep:!0,handler:function(t){t.type&&this.chartLib&&(this.chartHandler=this.chartLib[t.type]),this.changeHandler()}},events:{deep:!0,handler:function(){this.createEventProxy()}},theme:{deep:!0,handler:function(t){this.themeChange(t)}},themeName:function(t){this.themeChange(t)}},computed:{canvasStyle:function(){return{width:this.width,height:this.height,position:"relative"}},chartColor:function(){return this.colors||this.theme&&this.theme.color||e}},methods:{dataHandler:function(){if(this.chartHandler){var t=this.data,e=t,i=e.columns,n=void 0===i?[]:i,r=e.rows,a=void 0===r?[]:r,o={tooltipVisible:this.tooltipVisible,legendVisible:this.legendVisible,echarts:this.echarts,color:this.chartColor,tooltipFormatter:this.tooltipFormatter,_once:this._once};this.beforeConfig&&(t=this.beforeConfig(t));var s=this.chartHandler(n,a,this.settings,o);s&&("function"==typeof s.then?s.then(this.optionsHandler):this.optionsHandler(s))}},resize:function(){this.echarts.resize()},optionsHandler:function(t){var e=this;this.legendPosition&&t.legend&&(t.legend[this.legendPosition]=10,~["left","right"].indexOf(this.legendPosition)&&(t.legend.top="middle",t.legend.orient="vertical")),this.themeName||(t.color=this.chartColor);if(["grid","dataZoom","visualMap","toolbox","title","legend","xAxis","yAxis","radar","tooltip","axisPointer","brush","geo","timeline","graphic","series","backgroundColor","textStyle"].forEach(function(i){e[i]&&(t[i]=e[i])}),this.animation&&Object.keys(this.animation).forEach(function(i){t[i]=e.animation[i]}),this.markArea||this.markLine||this.markPoint){var i={markArea:this.markArea,markLine:this.markLine,markPoint:this.markPoint},n=t.series;"[object Array]"===b(n)?n.forEach(function(t){e.addMark(t,i)}):"[object Object]"===b(n)&&this.addMark(n,i)}this.extend&&Object.keys(this.extend).forEach(function(i){"function"==typeof e.extend[i]?t[i]=e.extend[i](t[i]):"[object Array]"===b(t[i])&&m(t[i][0])?t[i].forEach(function(n,r){t[i][r]=x({},n,e.extend[i])}):m(t[i])?t[i]=x({},t[i],e.extend[i]):t[i]=e.extend[i]}),this.afterConfig&&(t=this.afterConfig(t)),this.echarts.setOption(t,this.setOptionOpts),this.$emit("ready",this.echarts),this._once["ready-once"]||(this._once["ready-once"]=!0,this.$emit("ready-once",this.echarts)),this.judgeWidth&&this.judgeWidthHandler(t),this.afterSetOption&&this.afterSetOption(this.echarts),this.afterSetOptionOnce&&!this._once.afterSetOptionOnce&&(this._once.afterSetOptionOnce=!0,this.afterSetOptionOnce(this.echarts))},judgeWidthHandler:function(t){var e=this,i=this.echarts,n=this.widthChangeDelay;this.$el.clientWidth?i&&i.resize():this.$nextTick(function(t){e.$el.clientWidth?i&&i.resize():setTimeout(function(t){i&&i.resize(),e.$el.clientWidth||console.warn(" Can't get dom width or height ")},n)})},addMark:function(t,e){Object.keys(e).forEach(function(i){e[i]&&(t[i]=e[i])})},init:function(){if(!this.echarts){var t=this.themeName||this.theme||"ve-chart";this.echarts=this.echartsLib.init(this.$refs.canvas,t,this.initOptions),this.data&&this.changeHandler(),this.createEventProxy(),this.resizeable&&window.addEventListener("resize",this.resizeHandler)}},addWatchToProps:function(){var t=this,e=this._watchers.map(function(t){return t.expression});Object.keys(this.$props).forEach(function(i){if(!~e.indexOf(i)&&!~j.indexOf(i)){var n={};~["[object Object]","[object Array]"].indexOf(b(t.$props[i]))&&(n.deep=!0),t.$watch(i,function(){t.changeHandler()},n)}})},createEventProxy:function(){var t=this,e=this,i=Object.keys(this.events||{});i.length&&i.forEach(function(i){-1===t.registeredEvents.indexOf(i)&&(t.registeredEvents.push(i),t.echarts.on(i,function(t){return function(){if(t in e.events){for(var i=arguments.length,n=Array(i),r=0;r<i;r++)n[r]=arguments[r];e.events[t].apply(null,n)}}}(i)))})},themeChange:function(t){this.clean(),this.echarts=null,this.init()},clean:function(){this.resizeable&&window.removeEventListener("resize",this.resizeHandler),this.echarts.dispose()}},created:function(){var t=this;this.echarts=null,this.registeredEvents=[],this._once={},this.resizeHandler=p(function(e){t.echarts&&t.echarts.resize()},this.resizeDelay),this.changeHandler=p(function(e){t.dataHandler()},this.changeDelay),this.addWatchToProps()},mounted:function(){this.init()},beforeDestroy:function(){this.clean()}}],created:function(){this.chartHandler=y,this.echartsLib=t}}});
  