text: !function(e){if(!e.VueDemi){var t={},n=e.Vue;if(n)if("2."===n.version.slice(0,2)){var r=e.VueCompositionAPI;if(r){for(var i in r)t[i]=r[i];t.isVue2=!0,t.isVue3=!1,t.install=function(){},t.Vue=n,t.Vue2=n,t.version=n.version}else console.error("[vue-demi] no VueCompositionAPI instance found, please be sure to import `@vue/composition-api` before `vue-demi`.")}else if("3."===n.version.slice(0,2)){for(var i in n)t[i]=n[i];t.isVue2=!1,t.isVue3=!0,t.install=function(){},t.Vue=n,t.Vue2=void 0,t.version=n.version,t.set=function(e,t,n){return Array.isArray(e)?(e.length=Math.max(e.length,t),e.splice(t,1,n),n):(e[t]=n,n)},t.del=function(e,t){Array.isArray(e)?e.splice(t,1):delete e[t]}}else console.error("[vue-demi] Vue version "+n.version+" is unsupported.");else console.error("[vue-demi] no Vue instance found, please be sure to import `vue` before `vue-demi`.");e.VueDemi=t}}(window),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("echarts"),require("vue-demi"),require("echarts/core")):"function"==typeof define&&define.amd?define(["echarts","vue-demi","echarts/core"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VueECharts=t(e.echarts,e.VueDemi,e.echarts)}(this,(function(e,t,n){"use strict";var r=function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=["getWidth","getHeight","getDom","getOption","resize","dispatchAction","convertToPixel","convertFromPixel","containPixel","getDataURL","getConnectedDataURL","appendData","clear","isDisposed","dispose"];function o(e,t){return n=Object.create(null),i.forEach((function(r){n[r]=function(n){return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(e.value||t(),!e.value)throw new Error("ECharts is not initialized yet.");return e.value[n].apply(e.value,r)}}(r)})),n;var n}var s=null;var a=null;function u(e,t){void 0===t&&(t={});var n=document.createElement(e);return Object.keys(t).forEach((function(e){n[e]=t[e]})),n}function c(e,t,n){return(window.getComputedStyle(e,n||null)||{display:"none"})[t]}function _(e){if(!document.documentElement.contains(e))return{detached:!0,rendered:!1};for(var t=e;t!==document;){if("none"===c(t,"display"))return{detached:!1,rendered:!1};t=t.parentNode}return{detached:!1,rendered:!0}}var l=0,d=null;function f(e,t){if(e.__resize_mutation_handler__||(e.__resize_mutation_handler__=v.bind(e)),!e.__resize_listeners__)if(e.__resize_listeners__=[],window.ResizeObserver){var n=e.offsetWidth,r=e.offsetHeight,i=new ResizeObserver((function(){(e.__resize_observer_triggered__||(e.__resize_observer_triggered__=!0,e.offsetWidth!==n||e.offsetHeight!==r))&&p(e)})),o=_(e),s=o.detached,a=o.rendered;e.__resize_observer_triggered__=!1===s&&!1===a,e.__resize_observer__=i,i.observe(e)}else if(e.attachEvent&&e.addEventListener)e.__resize_legacy_resize_handler__=function(){p(e)},e.attachEvent("onresize",e.__resize_legacy_resize_handler__),document.addEventListener("DOMSubtreeModified",e.__resize_mutation_handler__);else if(l||(d=function(e){var t=document.createElement("style");return t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e)),(document.querySelector("head")||document.body).appendChild(t),t}('.resize-triggers{visibility:hidden;opacity:0;pointer-events:none}.resize-contract-trigger,.resize-contract-trigger:before,.resize-expand-trigger,.resize-triggers{content:"";position:absolute;top:0;left:0;height:100%;width:100%;overflow:hidden}.resize-contract-trigger,.resize-expand-trigger{background:#eee;overflow:auto}.resize-contract-trigger:before{width:200%;height:200%}')),function(e){var t=c(e,"position");t&&"static"!==t||(e.style.position="relative");e.__resize_old_position__=t,e.__resize_last__={};var n=u("div",{className:"resize-triggers"}),r=u("div",{className:"resize-expand-trigger"}),i=u("div"),o=u("div",{className:"resize-contract-trigger"});r.appendChild(i),n.appendChild(r),n.appendChild(o),e.appendChild(n),e.__resize_triggers__={triggers:n,expand:r,expandChild:i,contract:o},g(e),e.addEventListener("scroll",h,!0),e.__resize_last__={width:e.offsetWidth,height:e.offsetHeight}}(e),e.__resize_rendered__=_(e).rendered,window.MutationObserver){var f=new MutationObserver(e.__resize_mutation_handler__);f.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),e.__resize_mutation_observer__=f}e.__resize_listeners__.push(t),l++}function v(){var e=_(this),t=e.rendered,n=e.detached;t!==this.__resize_rendered__&&(!n&&this.__resize_triggers__&&(g(this),this.addEventListener("scroll",h,!0)),this.__resize_rendered__=t,p(this))}function h(){var e,t,n=this;g(this),this.__resize_raf__&&(e=this.__resize_raf__,a||(a=(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(e){clearTimeout(e)}).bind(window)),a(e)),this.__resize_raf__=(t=function(){var e,t,r,i,o,s,a=(t=(e=n).__resize_last__,r=t.width,i=t.height,o=e.offsetWidth,s=e.offsetHeight,o!==r||s!==i?{width:o,height:s}:null);a&&(n.__resize_last__=a,p(n))},s||(s=(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){return setTimeout(e,16)}).bind(window)),s(t))}function p(e){e&&e.__resize_listeners__&&e.__resize_listeners__.forEach((function(t){t.call(e,e)}))}function g(e){var t=e.__resize_triggers__,n=t.expand,r=t.expandChild,i=t.contract,o=i.scrollWidth,s=i.scrollHeight,a=n.offsetWidth,u=n.offsetHeight,c=n.scrollWidth,_=n.scrollHeight;i.scrollLeft=o,i.scrollTop=s,r.style.width=a+1+"px",r.style.height=u+1+"px",n.scrollLeft=c,n.scrollTop=_}function m(e,r,i){var o=null;t.watch([i,e,r],(function(e,t,r){var i=e[0],s=e[1],a=e[2];i&&s&&a&&(o=n.throttle((function(){s.resize()}),100),f(i,o)),r((function(){o&&i&&function(e,t){var n=e.__resize_listeners__;if(n){if(t&&n.splice(n.indexOf(t),1),!n.length||!t){if(e.detachEvent&&e.removeEventListener)return e.detachEvent("onresize",e.__resize_legacy_resize_handler__),void document.removeEventListener("DOMSubtreeModified",e.__resize_mutation_handler__);e.__resize_observer__?(e.__resize_observer__.unobserve(e),e.__resize_observer__.disconnect(),e.__resize_observer__=null):(e.__resize_mutation_observer__&&(e.__resize_mutation_observer__.disconnect(),e.__resize_mutation_observer__=null),e.removeEventListener("scroll",h),e.removeChild(e.__resize_triggers__.triggers),e.__resize_triggers__=null),e.__resize_listeners__=null}!--l&&d&&d.parentNode.removeChild(d)}}(i,o)}))}))}var z={autoresize:Boolean},b="ecLoadingOptions";var w={loading:Boolean,loadingOptions:Object},y=[],O=[];!function(e,t){if(e&&"undefined"!=typeof document){var n,r=!0===t.prepend?"prepend":"append",i=!0===t.singleTag,o="string"==typeof t.container?document.querySelector(t.container):document.getElementsByTagName("head")[0];if(i){var s=y.indexOf(o);-1===s&&(s=y.push(o)-1,O[s]={}),n=O[s]&&O[s][r]?O[s][r]:O[s][r]=a()}else n=a();65279===e.charCodeAt(0)&&(e=e.substring(1)),n.styleSheet?n.styleSheet.cssText+=e:n.appendChild(document.createTextNode(e))}function a(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),t.attributes)for(var n=Object.keys(t.attributes),i=0;i<n.length;i++)e.setAttribute(n[i],t.attributes[n[i]]);var s="prepend"===r?"afterbegin":"beforeend";return o.insertAdjacentElement(s,e),e}}("x-vue-echarts{display:block;width:100%;height:100%}",{});var E=/^on[^a-z]/,x=function(e){return E.test(e)};var C="x-vue-echarts";t.Vue2&&t.Vue2.config.ignoredElements.push(C);var A="ecTheme",T="ecInitOptions",j="ecUpdateOptions",L=t.defineComponent({name:"echarts",props:r(r({option:Object,theme:{type:[Object,String]},initOptions:Object,updateOptions:Object,group:String,manualUpdate:Boolean},z),w),inheritAttrs:!1,setup:function(e,i){var s=i.attrs,a=i.listeners,u=t.shallowRef(),c=t.shallowRef(),_=t.shallowRef(),l=t.inject(A,null),d=t.inject(T,null),f=t.inject(j,null),v=t.toRefs(e),h=v.autoresize,p=v.manualUpdate,g=v.loading,z=v.loadingOptions,w=t.computed((function(){return _.value||e.option||Object.create(null)})),y=t.computed((function(){return e.theme||t.unref(l)||{}})),O=t.computed((function(){return e.initOptions||t.unref(d)||{}})),E=t.computed((function(){return e.updateOptions||t.unref(f)||{}})),C=t.computed((function(){return function(e){var t={};for(var n in e)x(n)||(t[n]=e[n]);return t}(s)}));function L(r){if(!c.value&&u.value){var i=c.value=n.init(u.value,y.value,O.value);e.group&&(i.group=e.group);var o=a;o||(o={},Object.keys(s).filter((function(e){return 0===e.indexOf("on")&&e.length>2})).forEach((function(e){var t=e.charAt(2).toLowerCase()+e.slice(3);o[t]=s[e]}))),Object.keys(o).forEach((function(e){var t=o[e];t&&(0===e.indexOf("zr:")?i.getZr().on(e.slice(3).toLowerCase(),t):i.on(e.toLowerCase(),t))})),h.value?t.nextTick((function(){!function(){if(i&&!i.isDisposed())try{i.resize()}catch(e){if("Cannot read property 'get' of undefined"===e.message)return;throw e}}(),_()})):_()}function _(){i.setOption(r||w.value,E.value)}}function V(){c.value&&(c.value.dispose(),c.value=void 0)}var D=null;t.watch(p,(function(n){"function"==typeof D&&(D(),D=null),n||(D=t.watch((function(){return e.option}),(function(e){e&&(c.value?c.value.setOption(e,E.value):L())}),{deep:!0}))}),{immediate:!0}),t.watch([y,O],(function(){V(),L()}),{deep:!0}),t.watchEffect((function(){e.group&&c.value&&(c.value.group=e.group)}));var S=o(c,L);return function(e,n,i){var o=t.inject(b,{}),s=t.computed((function(){return r(r({},t.unref(o)),null==i?void 0:i.value)}));t.watchEffect((function(){var t=e.value;t&&(n.value?t.showLoading(s.value):t.hideLoading())}))}(c,g,z),m(c,h,u),t.onMounted((function(){e.option&&L()})),t.onUnmounted(V),r({chart:c,root:u,setOption:function(t,n){e.manualUpdate&&(_.value=t),c.value?c.value.setOption(t,n||{}):L(t)},nonEventAttrs:C},S)},render:function(){var e=r({},this.nonEventAttrs);return e.ref="root",e.class=e.class?["echarts"].concat(e.class):"echarts",t.h(C,e)}}),V=Object.freeze({__proto__:null,default:L,LOADING_OPTIONS_KEY:b,THEME_KEY:A,INIT_OPTIONS_KEY:T,UPDATE_OPTIONS_KEY:j});return r(r({},L),V)}));
  //# sourceMappingURL=index.umd.min.js.map
  