goview_vue/dist/static/js/index.esm.min-6f206398.js
2023-06-06 12:12:26 +08:00

17 lines
9.5 KiB
JavaScript

import{cw as te,cz as re,a_ as ne,d as ie,G as F,bA as A,$ as ae,a1 as w,cA as se,J as T,b8 as J,m as oe,cB as ue,X as _e,cC as ce,ad as de,u as fe,cD as le}from"./index-414f6242.js";const ve=(e,t,r)=>e=te({},re(t,r),e),He=(e,t)=>(e.backgroundColor="rgba(0,0,0,0)",ve(e,ne,t)),Me=(e,t)=>{if(!e)return;const r=e.getOption();r.dataset=null,e.setOption(t)};var R=null;function he(e){return R||(R=(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){return setTimeout(t,16)}).bind(window)),R(e)}var N=null;function ge(e){N||(N=(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(t){clearTimeout(t)}).bind(window)),N(e)}function pe(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}function S(e,t){t===void 0&&(t={});var r=document.createElement(e);return Object.keys(t).forEach(function(i){r[i]=t[i]}),r}function X(e,t,r){var i=window.getComputedStyle(e,r||null)||{display:"none"};return i[t]}function U(e){if(!document.documentElement.contains(e))return{detached:!0,rendered:!1};for(var t=e;t!==document;){if(X(t,"display")==="none")return{detached:!1,rendered:!1};t=t.parentNode}return{detached:!1,rendered:!0}}var ze='.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%}',W=0,H=null;function be(e,t){e.__resize_mutation_handler__||(e.__resize_mutation_handler__=me.bind(e));var r=e.__resize_listeners__;if(!r){if(e.__resize_listeners__=[],window.ResizeObserver){var i=e.offsetWidth,n=e.offsetHeight,a=new ResizeObserver(function(){!e.__resize_observer_triggered__&&(e.__resize_observer_triggered__=!0,e.offsetWidth===i&&e.offsetHeight===n)||M(e)}),c=U(e),z=c.detached,l=c.rendered;e.__resize_observer_triggered__=z===!1&&l===!1,e.__resize_observer__=a,a.observe(e)}else if(e.attachEvent&&e.addEventListener)e.__resize_legacy_resize_handler__=function(){M(e)},e.attachEvent("onresize",e.__resize_legacy_resize_handler__),document.addEventListener("DOMSubtreeModified",e.__resize_mutation_handler__);else if(W||(H=pe(ze)),Oe(e),e.__resize_rendered__=U(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),W++}function we(e,t){var r=e.__resize_listeners__;if(r){if(t&&r.splice(r.indexOf(t),1),!r.length||!t){if(e.detachEvent&&e.removeEventListener){e.detachEvent("onresize",e.__resize_legacy_resize_handler__),document.removeEventListener("DOMSubtreeModified",e.__resize_mutation_handler__);return}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",B),e.removeChild(e.__resize_triggers__.triggers),e.__resize_triggers__=null),e.__resize_listeners__=null}!--W&&H&&H.parentNode.removeChild(H)}}function ye(e){var t=e.__resize_last__,r=t.width,i=t.height,n=e.offsetWidth,a=e.offsetHeight;return n!==r||a!==i?{width:n,height:a}:null}function me(){var e=U(this),t=e.rendered,r=e.detached;t!==this.__resize_rendered__&&(!r&&this.__resize_triggers__&&(q(this),this.addEventListener("scroll",B,!0)),this.__resize_rendered__=t,M(this))}function B(){var e=this;q(this),this.__resize_raf__&&ge(this.__resize_raf__),this.__resize_raf__=he(function(){var t=ye(e);t&&(e.__resize_last__=t,M(e))})}function M(e){!e||!e.__resize_listeners__||e.__resize_listeners__.forEach(function(t){t.call(e,e)})}function Oe(e){var t=X(e,"position");(!t||t==="static")&&(e.style.position="relative"),e.__resize_old_position__=t,e.__resize_last__={};var r=S("div",{className:"resize-triggers"}),i=S("div",{className:"resize-expand-trigger"}),n=S("div"),a=S("div",{className:"resize-contract-trigger"});i.appendChild(n),r.appendChild(i),r.appendChild(a),e.appendChild(r),e.__resize_triggers__={triggers:r,expand:i,expandChild:n,contract:a},q(e),e.addEventListener("scroll",B,!0),e.__resize_last__={width:e.offsetWidth,height:e.offsetHeight}}function q(e){var t=e.__resize_triggers__,r=t.expand,i=t.expandChild,n=t.contract,a=n.scrollWidth,c=n.scrollHeight,z=r.offsetWidth,l=r.offsetHeight,f=r.scrollWidth,v=r.scrollHeight;n.scrollLeft=a,n.scrollTop=c,i.style.width=z+1+"px",i.style.height=l+1+"px",r.scrollLeft=f,r.scrollTop=v}var p=function(){return p=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},p.apply(this,arguments)},Ee=["getWidth","getHeight","getDom","getOption","resize","dispatchAction","convertToPixel","convertFromPixel","containPixel","getDataURL","getConnectedDataURL","appendData","clear","isDisposed","dispose"];function xe(e){return t=Object.create(null),Ee.forEach(function(r){t[r]=function(i){return function(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];if(!e.value)throw new Error("ECharts is not initialized yet.");return e.value[i].apply(e.value,n)}}(r)}),t;var t}var Ce={autoresize:Boolean},Le=/^on[^a-z]/,Ae=function(e){return Le.test(e)};function j(e,t){var r=fe(e);return r&&typeof r=="object"&&"value"in r?r.value||t:r||t}var Te={loading:Boolean,loadingOptions:Object},y=null,G=[],m=[];(function(e,t){if(e&&typeof document!="undefined"){var r,i=t.prepend===!0?"prepend":"append",n=t.singleTag===!0,a=typeof t.container=="string"?document.querySelector(t.container):document.getElementsByTagName("head")[0];if(n){var c=G.indexOf(a);c===-1&&(c=G.push(a)-1,m[c]={}),r=m[c]&&m[c][i]?m[c][i]:m[c][i]=z()}else r=z();e.charCodeAt(0)===65279&&(e=e.substring(1)),r.styleSheet?r.styleSheet.cssText+=e:r.appendChild(document.createTextNode(e))}function z(){var l=document.createElement("style");if(l.setAttribute("type","text/css"),t.attributes)for(var f=Object.keys(t.attributes),v=0;v<f.length;v++)l.setAttribute(f[v],t.attributes[f[v]]);var k=i==="prepend"?"afterbegin":"beforeend";return a.insertAdjacentElement(k,l),l}})(`x-vue-echarts{display:block;width:100%;height:100%;min-width:0}
`,{});var Se=function(){if(y!=null)return y;if(typeof HTMLElement=="undefined"||typeof customElements=="undefined")return y=!1;try{new Function("tag",`class EChartsElement extends HTMLElement {
__dispose = null;
disconnectedCallback() {
if (this.__dispose) {
this.__dispose();
this.__dispose = null;
}
}
}
if (customElements.get(tag) == null) {
customElements.define(tag, EChartsElement);
}
`)("x-vue-echarts")}catch(e){return y=!1}return y=!0}(),ke=ie({name:"echarts",props:p(p({option:Object,theme:{type:[Object,String]},initOptions:Object,updateOptions:Object,group:String,manualUpdate:Boolean},Ce),Te),emits:{},inheritAttrs:!1,setup:function(e,t){var r=t.attrs,i=F(),n=F(),a=F(),c=A("ecTheme",null),z=A("ecInitOptions",null),l=A("ecUpdateOptions",null),f=ae(e),v=f.autoresize,k=f.manualUpdate,Z=f.loading,K=f.loadingOptions,Q=w(function(){return a.value||e.option||null}),P=w(function(){return e.theme||j(c,{})}),I=w(function(){return e.initOptions||j(z,{})}),$=w(function(){return e.updateOptions||j(l,{})}),V=w(function(){return function(d){var s={};for(var _ in d)Ae(_)||(s[_]=d[_]);return s}(r)}),Y=se().proxy.$listeners;function O(d){if(i.value){var s=n.value=ce(i.value,P.value,I.value);e.group&&(s.group=e.group);var _=Y;_||(_={},Object.keys(r).filter(function(u){return u.indexOf("on")===0&&u.length>2}).forEach(function(u){var o=u.charAt(2).toLowerCase()+u.slice(3);o.substring(o.length-4)==="Once"&&(o="~".concat(o.substring(0,o.length-4))),_[o]=r[u]})),Object.keys(_).forEach(function(u){var o=_[u];if(o){var h=u.toLowerCase();h.charAt(0)==="~"&&(h=h.substring(1),o.__once__=!0);var b=s;if(h.indexOf("zr:")===0&&(b=s.getZr(),h=h.substring(3)),o.__once__){delete o.__once__;var x=o;o=function(){for(var C=[],L=0;L<arguments.length;L++)C[L]=arguments[L];x.apply(void 0,C),b.off(h,o)}}b.on(h,o)}}),v.value?de(function(){s&&!s.isDisposed()&&s.resize(),g()}):g()}function g(){var u=d||Q.value;u&&s.setOption(u,$.value)}}function D(){n.value&&(n.value.dispose(),n.value=void 0)}var E=null;T(k,function(d){typeof E=="function"&&(E(),E=null),d||(E=T(function(){return e.option},function(s,_){s&&(n.value?n.value.setOption(s,p({notMerge:s!==_},$.value)):O())},{deep:!0}))},{immediate:!0}),T([P,I],function(){D(),O()},{deep:!0}),J(function(){e.group&&n.value&&(n.value.group=e.group)});var ee=xe(n);return function(d,s,_){var g=A("ecLoadingOptions",{}),u=w(function(){return p(p({},j(g,{})),_==null?void 0:_.value)});J(function(){var o=d.value;o&&(s.value?o.showLoading(u.value):o.hideLoading())})}(n,Z,K),function(d,s,_){var g=null;T([_,d,s],function(u,o,h){var b=u[0],x=u[1],C=u[2];b&&x&&C&&(g=le(function(){x.resize()},100),be(b,g)),h(function(){g&&b&&we(b,g)})})}(n,v,i),oe(function(){O()}),ue(function(){Se&&i.value?i.value.__dispose=D:D()}),p({chart:n,root:i,setOption:function(d,s){e.manualUpdate&&(a.value=d),n.value?n.value.setOption(d,s||{}):O(d)},nonEventAttrs:V},ee)},render:function(){var e=p({},this.nonEventAttrs);return e.ref="root",e.class=e.class?["echarts"].concat(e.class):"echarts",_e("x-vue-echarts",e)}});export{ke as S,He as e,ve as m,Me as s};