text: !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("echarts/lib/echarts"),require("echarts/lib/component/tooltip"),require("echarts/lib/component/legend"),require("echarts/lib/chart/map")):"function"==typeof define&&define.amd?define(["echarts/lib/echarts","echarts/lib/component/tooltip","echarts/lib/component/legend","echarts/lib/chart/map"],t):e.VeMap=t(e.echarts)}(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var t={categoryAxis:{axisLine:{show:!1},axisTick:{show:!1},splitLine:{show:!1}},valueAxis:{axisLine:{show:!1}},line:{smooth:!0},grid:{containLabel:!0,left:10,right:10}},i=["#19d4ae","#5ab1ef","#fa6e86","#ffb980","#0067a6","#c4b4e4","#d87a80","#9cbbff","#d9d0c7","#87a997","#d49ea2","#5b4947","#7ba3a8"],n=function(e){return['<span style="',"background-color:"+e+";","display: inline-block;","width: 10px;","height: 10px;","border-radius: 50%;","margin-right:2px;",'"></span>'].join("")},r=["initOptions","loading","dataEmpty","judgeWidth","widthChangeDelay"],o=["grid","dataZoom","visualMap","toolbox","title","legend","xAxis","yAxis","radar","tooltip","axisPointer","brush","geo","timeline","graphic","series","backgroundColor","textStyle"],a={th:3,mi:6,bi:9,tr:12},s={zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0,abbrLabel:{th:"k",mi:"m",bi:"b",tr:"t"}},c=1e12,l=1e9,h=1e6,d=1e3;function u(e,t,i,n){var r=e.toString().split("."),o=t-(n||0),a=2===r.length?Math.min(Math.max(r[1].length,o),t):o,s=Math.pow(10,a),c=(i(e+"e+"+a)/s).toFixed(a);if(n>t-a){var l=new RegExp("\\.?0{1,"+(n-(t-a))+"}$");c=c.replace(l,"")}return c}function f(e,t,i,n){var r=Math.abs(t),o=!1,s=!1,f="",p="",m=!1,b=void 0,g=void 0;i=i||"",t=t||0,~i.indexOf("(")?(o=!0,i=i.replace(/[(|)]/g,"")):(~i.indexOf("+")||~i.indexOf("-"))&&(g=~i.indexOf("+")?i.indexOf("+"):t<0?i.indexOf("-"):-1,i=i.replace(/[+|-]/g,"")),~i.indexOf("a")&&(b=!!(b=i.match(/a(k|m|b|t)?/))&&b[1],~i.indexOf(" a")&&(f=" "),i=i.replace(new RegExp(f+"a[kmbt]?"),""),r>=c&&!b||"t"===b?(f+=e.abbrLabel.tr,t/=c):r<c&&r>=l&&!b||"b"===b?(f+=e.abbrLabel.bi,t/=l):r<l&&r>=h&&!b||"m"===b?(f+=e.abbrLabel.mi,t/=h):(r<h&&r>=d&&!b||"k"===b)&&(f+=e.abbrLabel.th,t/=d)),~i.indexOf("[.]")&&(s=!0,i=i.replace("[.]","."));var y=t.toString().split(".")[0],v=i.split(".")[1],O=i.indexOf(","),x=(i.split(".")[0].split(",")[0].match(/0/g)||[]).length;if(v?(y=(p=~v.indexOf("[")?u(t,(v=(v=v.replace("]","")).split("["))[0].length+v[1].length,n,v[1].length):u(t,v.length,n)).split(".")[0],p=~p.indexOf(".")?"."+p.split(".")[1]:"",s&&0==+p.slice(1)&&(p="")):y=u(t,0,n),f&&!b&&+y>=1e3&&f!==a.trillion&&(y=""+ +y/1e3,f=a.million),~y.indexOf("-")&&(y=y.slice(1),m=!0),y.length<x)for(var j=x-y.length;j>0;j--)y="0"+y;O>-1&&(y=y.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,")),i.indexOf(".")||(y="");var S=y+p+(f||"");return o?S=(o&&m?"(":"")+S+(o&&m?")":""):g>=0?S=0===g?(m?"-":"+")+S:S+(m?"-":"+"):m&&(S="-"+S),S}function p(e,t){Object.keys(t).forEach(function(i){e[i]=t[i]})}var m={},b={};function g(e,t,i){return function(e,t,i){t=t||m.defaultFormat,i=i||Math.round;var n=void 0,r=void 0;if(0===e&&null!==m.zeroFormat)n=m.zeroFormat;else if(null===e&&null!==m.nullFormat)n=m.nullFormat;else{for(var o in b)if(b[o]&&t.match(b[o].regexp)){r=b[o].format;break}n=(r=r||f.bind(null,m))(e,t,i,g)}return n}(0===e||void 0===e?0:null===e||function(e){return"number"==typeof e&&isNaN(e)}(e)?null:"string"==typeof e?m.zeroFormat&&e===m.zeroFormat?0:m.nullFormat&&e===m.nullFormat||!e.replace(/[^0-9]+/g,"").length?null:+e:+e||null,t,i)}p(m,s),g.options=m,g._numberToFormat=f.bind(null,m),g.register=function(e,t){b[e]=t},g.unregister=function(e){b[e]=null},g.setOptions=function(e){p(m,e)},g.reset=function(){p(m,s)},g.register("percentage",{regexp:/%/,format:function(e,t,i,n){var r=~t.indexOf(" %")?" ":"",o=void 0;return n.options.scalePercentBy100&&(e*=100),t=t.replace(/\s?%/,""),~(o=n._numberToFormat(e,t,i)).indexOf(")")?((o=o.split("")).splice(-1,0,r+"%"),o=o.join("")):o=o+r+"%",o}});var y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e};function O(e,t){var i=null;return function(){var n=this,r=arguments;clearTimeout(i),i=setTimeout(function(){e.apply(n,r)},t)}}var x="function"==typeof Symbol&&"symbol"===y(Symbol.iterator)?function(e){return void 0===e?"undefined":y(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":y(e)};function j(e){return Object.prototype.toString.call(e)}function S(e){return void 0===e?"undefined":x(e)}function z(e){return"[object Object]"===j(e)}function k(e){return"[object Array]"===j(e)}function w(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var A=function(e,t,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"-";if(isNaN(e))return n;if(!t)return e;if("[object Function]"===j(t))return t(e,g);i=isNaN(i)?0:++i;var r=".["+new Array(i).join(0)+"]",o=t;switch(t){case"KMB":o=i?"0,0"+r+"a":"0,0a";break;case"normal":o=i?"0,0"+r:"0,0";break;case"percent":o=i?"0,0"+r+"%":"0,0.[00]%"}return g(e,o)},E={},L=function(e){var t,i=e.position,n=e.positionJsonLink,r=e.beforeRegisterMapOnce,o=e.mapURLProfix,a=n||""+o+i+".json";return E[a]||(E[a]=(t=a,new Promise(function(e,i){var n=new XMLHttpRequest;n.open("GET",t),n.send(null),n.onload=function(){e(JSON.parse(n.responseText))},n.onerror=function(){i(JSON.parse(n.responseText))}})).then(function(e){return r&&(e=r(e)),e})),E[a]};function R(e,t,i){"object"===(void 0===e?"undefined":y(e))?t[i]=e:e&&(t[i]={normal:{show:!0},emphasis:{show:!0}})}function C(t,i){var n=t._once,r=t.registerSign,o=t.beforeRegisterMap,a=t.beforeRegisterMapOnce,s=t.registerSignOnce,c=t.position,l=t.specialAreas;n[r]||(o&&(i=o(i)),a&&!n[s]&&(n[s]=!0,i=a(i)),n[r]=!0,e.registerMap(c,i,l))}var M=function(e,t,i,r){var o=i.position,a=void 0===o?"china":o,s=i.selectData,c=void 0!==s&&s,l=i.selectedMode,h=i.label,d=void 0===h||h,u=i.dataType,f=void 0===u?{}:u,p=i.digit,m=void 0===p?2:p,b=i.dimension,g=void 0===b?e[0]:b,y=i.roam,O=i.center,x=i.aspectScale,j=i.boundingCoords,S=i.zoom,z=i.scaleLimit,k=i.legendName,w=void 0===k?{}:k,E=i.labelMap,M=void 0===E?{}:E,_=i.mapGrid,F=i.itemStyle,H=i.positionJsonLink,P=i.beforeRegisterMap,$=i.beforeRegisterMapOnce,T=i.mapURLProfix,N=void 0===T?"https://unpkg.com/echarts@3.6.2/map/json/":T,B=i.specialAreas,D=void 0===B?{}:B,W=i.mapOrigin,V=e.slice();i.metrics?V=i.metrics:V.splice(e.indexOf(g),1);var J=r.tooltipVisible,U=r.legendVisible,G=r.color,q=r._once,Z={};t.forEach(function(e){Z[e[g]]=e});var I=J&&function(e,t,i,r,o,a){return{formatter:function(s){var c=[];return c.push(s.name+"<br>"),r.forEach(function(r,l){var h=null!=a[r]?a[r]:r;c.push(n(o[l])+" "+h+" : "),i[s.name]?c.push(A(i[s.name][r],e[r],t)):c.push("-"),c.push("<br>")}),c.join(" ")}}}(f,m,Z,V,G,M),K=U&&function(e){var t=e.metrics,i=e.legendName,n=e.labelMap;return i||n?{data:n?t.map(function(e){return null==n[e]?e:n[e]}):t,formatter:function(e){return null!=i[e]?i[e]:e}}:{data:t}}({metrics:V,legendName:w,labelMap:M}),X=function(e){var t=e.position,i=e.selectData,n=e.dimension,r=e.metrics,o=e.rows,a=e.label,s=e.itemStyle,c=e.selectedMode,l=e.roam,h=e.center,d=e.aspectScale,u=e.boundingCoords,f=e.zoom,p=e.labelMap,m=e.scaleLimit,b=e.mapGrid,g=[],y={type:"map",mapType:t};return r.forEach(function(e){var t=v({name:null!=p[e]?p[e]:e,data:[],selectedMode:c,roam:l,center:h,aspectScale:d,boundingCoords:u,zoom:f,scaleLimit:m},y);b&&Object.keys(b).forEach(function(e){t[e]=b[e]}),R(s,t,"itemStyle"),R(a,t,"label"),o.forEach(function(r){t.data.push({name:r[n],value:r[e],selected:i})}),g.push(t)}),g}({position:a,selectData:c,label:d,itemStyle:F,dimension:g,metrics:V,rows:t,selectedMode:l,roam:y,center:O,aspectScale:x,boundingCoords:j,zoom:S,labelMap:M,scaleLimit:z,mapGrid:_}),Q={_once:q,beforeRegisterMap:P,beforeRegisterMapOnce:$,registerSign:"MAP_REGISTER_"+a,registerSignOnce:"ONCE_MAP_REGISTER_"+a,position:a,specialAreas:D};return W?(C(Q,W),{series:X,tooltip:I,legend:K}):L({position:a,positionJsonLink:H,beforeRegisterMapOnce:$,mapURLProfix:N}).then(function(e){return C(Q,e),{series:X,tooltip:I,legend:K}})},_={render:function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"v-charts-component-loading"},[t("div",{staticClass:"loader"},[t("div",{staticClass:"loading-spinner"},[t("svg",{staticClass:"circular",attrs:{viewBox:"25 25 50 50"}},[t("circle",{staticClass:"path",attrs:{cx:"50",cy:"50",r:"20",fill:"none"}})])])])])},staticRenderFns:[]},F={render:function(){var e=this.$createElement;return(this._self._c||e)("div",{staticClass:"v-charts-data-empty"},[this._v(" 暂无数据 ")])},staticRenderFns:[]};function H(e,t){Object.keys(t).forEach(function(i){t[i]&&(e[i]=t[i])})}var P={render:function(e){return e("div",{class:[(t=this.$options.name||this.$options._componentTag,t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase())],style:this.canvasStyle},[e("div",{style:this.canvasStyle,class:{"v-charts-mask-status":this.dataEmpty||this.loading},ref:"canvas"}),e(F,{style:{display:this.dataEmpty?"":"none"}}),e(_,{style:{display:this.loading?"":"none"}}),this.$slots.default]);var t},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},cancelResizeCheck:Boolean,notSetUnchange:Array},watch:{data:{deep:!0,handler:function(e){e&&this.changeHandler()}},settings:{deep:!0,handler:function(e){e.type&&this.chartLib&&(this.chartHandler=this.chartLib[e.type]),this.changeHandler()}},width:"nextTickResize",height:"nextTickResize",events:{deep:!0,handler:"createEventProxy"},theme:{deep:!0,handler:"themeChange"},themeName:"themeChange",resizeable:"resizeableHandler"},computed:{canvasStyle:function(){return{width:this.width,height:this.height,position:"relative"}},chartColor:function(){return this.colors||this.theme&&this.theme.color||i}},methods:{dataHandler:function(){if(this.chartHandler){var e=this.data,t=e,i=t.columns,n=void 0===i?[]:i,r=t.rows,o=void 0===r?[]:r,a={tooltipVisible:this.tooltipVisible,legendVisible:this.legendVisible,echarts:this.echarts,color:this.chartColor,tooltipFormatter:this.tooltipFormatter,_once:this._once};this.beforeConfig&&(e=this.beforeConfig(e));var s=this.chartHandler(n,o,this.settings,a);s&&("function"==typeof s.then?s.then(this.optionsHandler):this.optionsHandler(s))}},nextTickResize:function(){this.$nextTick(this.resize)},resize:function(){this.cancelResizeCheck?this.echartsResize():this.$el&&this.$el.clientWidth&&this.$el.clientHeight&&this.echartsResize()},echartsResize:function(){this.echarts&&this.echarts.resize()},optionsHandler:function(e){var t=this;if(this.legendPosition&&e.legend&&(e.legend[this.legendPosition]=10,~["left","right"].indexOf(this.legendPosition)&&(e.legend.top="middle",e.legend.orient="vertical")),e.color=this.chartColor,o.forEach(function(i){t[i]&&(e[i]=t[i])}),this.animation&&function(e,t){Object.keys(t).forEach(function(i){e[i]=t[i]})}(e,this.animation),this.markArea||this.markLine||this.markPoint){var i={markArea:this.markArea,markLine:this.markLine,markPoint:this.markPoint},n=e.series;k(n)?n.forEach(function(e){H(e,i)}):z(n)&&H(n,i)}this.extend&&function(e,t){Object.keys(t).forEach(function(i){var n=t[i];~i.indexOf(".")?function(e,t,i){if(t){var n=e,r=t.split(".");r.forEach(function(e,t){t===r.length-1?n[e]=i:(n[e]||(n[e]={}),n=n[e])})}}(e,i,n):"function"==typeof n?e[i]=n(e[i]):k(e[i])&&z(e[i][0])?e[i].forEach(function(t,r){e[i][r]=v({},t,n)}):z(e[i])?e[i]=v({},e[i],n):e[i]=n})}(e,this.extend),this.afterConfig&&(e=this.afterConfig(e));var r=this.setOptionOpts;!this.settings.bmap&&!this.settings.amap||z(r)||(r=!1),this.notSetUnchange&&this.notSetUnchange.length&&(this.notSetUnchange.forEach(function(i){var n,r=e[i];r&&(!function e(t,i){if(t===i)return!0;if(null===t||null===i||"object"!==S(t)||"object"!==S(i))return t===i;for(var n in t)if(w(t,n)){var r=t[n],o=i[n],a=S(r);if("undefined"===S(o))return!1;if("object"===a){if(!e(r,o))return!1}else if(r!==o)return!1}for(var s in i)if(w(i,s)&&"undefined"===S(t)[s])return!1;return!0}(r,t._store[i])?t._store[i]=(n=r,JSON.parse(JSON.stringify(n))):e[i]=void 0)}),z(r)?r.notMerge=!1:r=!1),this.echarts.setOption(e,r),this.$emit("ready",this.echarts),this._once["ready-once"]||(this._once["ready-once"]=!0,this.$emit("ready-once",this.echarts)),this.judgeWidth&&this.judgeWidthHandler(e),this.afterSetOption&&this.afterSetOption(this.echarts),this.afterSetOptionOnce&&!this._once.afterSetOptionOnce&&(this._once.afterSetOptionOnce=!0,this.afterSetOptionOnce(this.echarts))},judgeWidthHandler:function(e){var t=this,i=this.widthChangeDelay,n=this.resize;this.$el.clientWidth||this.$el.clientHeight?n():this.$nextTick(function(e){t.$el.clientWidth||t.$el.clientHeight?n():setTimeout(function(e){n(),t.$el.clientWidth&&t.$el.clientHeight||console.warn(" Can't get dom width or height ")},i)})},resizeableHandler:function(e){e&&!this._once.onresize&&this.addResizeListener(),!e&&this._once.onresize&&this.removeResizeListener()},init:function(){if(!this.echarts){var i=this.themeName||this.theme||t;this.echarts=e.init(this.$refs.canvas,i,this.initOptions),this.data&&this.changeHandler(),this.createEventProxy(),this.resizeable&&this.addResizeListener()}},addResizeListener:function(){window.addEventListener("resize",this.resizeHandler),this._once.onresize=!0},removeResizeListener:function(){window.removeEventListener("resize",this.resizeHandler),this._once.onresize=!1},addWatchToProps:function(){var e=this,t=this._watchers.map(function(e){return e.expression});Object.keys(this.$props).forEach(function(i){if(!~t.indexOf(i)&&!~r.indexOf(i)){var n={};~["[object Object]","[object Array]"].indexOf(j(e.$props[i]))&&(n.deep=!0),e.$watch(i,function(){e.changeHandler()},n)}})},createEventProxy:function(){var e=this,t=this,i=Object.keys(this.events||{});i.length&&i.forEach(function(i){-1===e.registeredEvents.indexOf(i)&&(e.registeredEvents.push(i),e.echarts.on(i,function(e){return function(){if(e in t.events){for(var i=arguments.length,n=Array(i),r=0;r<i;r++)n[r]=arguments[r];t.events[e].apply(null,n)}}}(i)))})},themeChange:function(e){this.clean(),this.echarts=null,this.init()},clean:function(){this.resizeable&&this.removeResizeListener(),this.echarts.dispose()}},created:function(){this.echarts=null,this.registeredEvents=[],this._once={},this._store={},this.resizeHandler=O(this.resize,this.resizeDelay),this.changeHandler=O(this.dataHandler,this.changeDelay),this.addWatchToProps()},mounted:function(){this.init()},beforeDestroy:function(){this.clean()},_numerify:g};return v({},P,{name:"VeMap",data:function(){return this.chartHandler=M,{}}})});
  