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-amap")):"function"==typeof define&&define.amd?define(["echarts/lib/echarts","echarts/lib/component/tooltip","echarts/lib/component/legend","echarts-amap"],e):t.VeAmap=e(t.echarts)}(this,function(t){"use strict";(t="default"in t?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=null,n=function(t){return Object.prototype.toString.call(t)},r=function(t){return"[object Object]"===n(t)},a=function(t,e,n){var r,a,o=n.key,s=n.v,c=n.amap;return o||console.warn("settings.key must be a string."),(r=o,a=s,i||(i=new Promise(function(t,e){var i="amap"+Date.now();window[i]=t;var n=document.createElement("script");n.src=["https://webapi.amap.com/maps?v="+(a||"1.4.3"),"key="+r,"callback="+i].join("&"),document.body.appendChild(n)})),i).then(function(t){return{amap:c}})},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:[]},s={render:function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"v-charts-data-empty"},[this._v(" 暂无数据 ")])},staticRenderFns:[]};function c(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var h="object"==typeof global&&global&&global.Object===Object&&global,l="object"==typeof self&&self&&self.Object===Object&&self,d=h||l||Function("return this")(),f=function(){return d.Date.now()},u=d.Symbol,p=Object.prototype,y=p.hasOwnProperty,b=p.toString,m=u?u.toStringTag:void 0;var v=Object.prototype.toString;var g="[object Null]",O="[object Undefined]",j=u?u.toStringTag:void 0;function x(t){return null==t?void 0===t?O:g:j&&j in Object(t)?function(t){var e=y.call(t,m),i=t[m];try{t[m]=void 0;var n=!0}catch(t){}var r=b.call(t);return n&&(e?t[m]=i:delete t[m]),r}(t):(e=t,v.call(e));var e}var w="[object Symbol]";var A=NaN,k=/^\s+|\s+$/g,C=/^[-+]0x[0-9a-f]+$/i,S=/^0b[01]+$/i,E=/^0o[0-7]+$/i,$=parseInt;function H(t){if("number"==typeof t)return t;if("symbol"==typeof(e=t)||null!=(i=e)&&"object"==typeof i&&x(e)==w)return A;var e,i;if(c(t)){var n="function"==typeof t.valueOf?t.valueOf():t;t=c(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(k,"");var r=S.test(t);return r||E.test(t)?$(t.slice(2),r?2:8):C.test(t)?A:+t}var P="Expected a function",z=Math.max,L=Math.min;function T(t,e,i){var n,r,a,o,s,h,l=0,d=!1,u=!1,p=!0;if("function"!=typeof t)throw new TypeError(P);function y(e){var i=n,a=r;return n=r=void 0,l=e,o=t.apply(a,i)}function b(t){var i=t-h;return void 0===h||i>=e||i<0||u&&t-l>=a}function m(){var t,i,n=f();if(b(n))return v(n);s=setTimeout(m,(i=e-((t=n)-h),u?L(i,a-(t-l)):i))}function v(t){return s=void 0,p&&n?y(t):(n=r=void 0,o)}function g(){var t,i=f(),a=b(i);if(n=arguments,r=this,h=i,a){if(void 0===s)return l=t=h,s=setTimeout(m,e),d?y(t):o;if(u)return s=setTimeout(m,e),y(h)}return void 0===s&&(s=setTimeout(m,e)),o}return e=H(e)||0,c(i)&&(d=!!i.leading,a=(u="maxWait"in i)?z(H(i.maxWait)||0,e):a,p="trailing"in i?!!i.trailing:p),g.cancel=function(){void 0!==s&&clearTimeout(s),l=0,n=h=r=s=void 0},g.flush=function(){return void 0===s?o:v(f())},g}var W=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},_=["initOptions","loading","dataEmpty","judgeWidth","widthChangeDelay"];return{name:"VeAmap",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(o,{style:{display:this.loading?"":"none"}}),t(s,{style:{display:this.dataEmpty?"":"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,legend:[Object,Array],xAxis:[Object,Array],yAxis:[Object,Array],radar:Object,tooltip:Object,axisPointer:Object,brush:[Object,Array],geo:Object,timeline:[Object,Array],graphic:[Object,Array],series:[Object,Array],backgroundColor:[Object,String],textStyle:Object,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}},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};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},a=t.series;"[object Array]"===n(a)?a.forEach(function(t){e.addMark(t,i)}):"[object Object]"===n(a)&&this.addMark(a,i)}this.extend&&Object.keys(this.extend).forEach(function(i){var a;"function"==typeof e.extend[i]?t[i]=e.extend[i](t[i]):(a=t[i],"[object Array]"===n(a)&&r(t[i][0])?t[i].forEach(function(n,r){t[i][r]=W({},n,e.extend[i])}):r(t[i])?t[i]=W({},t[i],e.extend[i]):t[i]=e.extend[i])}),this.afterConfig&&(t=this.afterConfig(t)),this.echarts.setOption(t,!0),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=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)&&!~_.indexOf(i)){var r={};~["[object Object]","[object Array]"].indexOf(n(t.$props[i]))&&(r.deep=!0),t.$watch(i,function(){t.changeHandler()},r)}})},createEventProxy:function(){var t=this,e=this,i=Object.keys(this.events||{});i.length&&i.forEach(function(i){var n;-1===t.registeredEvents.indexOf(i)&&(t.registeredEvents.push(i),t.echarts.on(i,(n=i,function(){if(n in e.events){for(var t=arguments.length,i=Array(t),r=0;r<t;r++)i[r]=arguments[r];e.events[n].apply(null,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=T(function(e){t.echarts&&t.echarts.resize()},this.resizeDelay),this.changeHandler=T(function(e){t.dataHandler()},this.changeDelay),this.addWatchToProps()},mounted:function(){this.init()},beforeDestroy:function(){this.clean()}}],created:function(){this.chartHandler=a,this.echartsLib=t}}});
  