You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
630 KiB
JavaScript

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).echarts={})}(this,function(t){"use strict";var h=function(t,e){return(h=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}))(t,e)};function u(t,e){function n(){this.constructor=t}h(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var y=function(){return(y=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function m(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var i=Array(t),o=0,e=0;e<n;e++)for(var r=arguments[e],a=0,s=r.length;a<s;a++,o++)i[o]=r[a];return i}function v(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}var w=new function(){this.browser=new v,this.node=!1,this.wxa=!1,this.worker=!1,this.canvasSupported=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1};"object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?(w.wxa=!0,w.canvasSupported=!0,w.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?(w.worker=!0,w.canvasSupported=!0):"undefined"==typeof navigator?(w.node=!0,w.canvasSupported=!0,w.svgSupported=!0):(Z=navigator.userAgent,Fe=(Kt=w).browser,Pt=Z.match(/Firefox\/([\d.]+)/),H=Z.match(/MSIE\s([\d.]+)/)||Z.match(/Trident\/.+?rv:(([\d.]+))/),X=Z.match(/Edge?\/([\d.]+)/),Z=/micromessenger/i.test(Z),Pt&&(Fe.firefox=!0,Fe.version=Pt[1]),H&&(Fe.ie=!0,Fe.version=H[1]),X&&(Fe.edge=!0,Fe.version=X[1],Fe.newEdge=18<+X[1].split(".")[0]),Z&&(Fe.weChat=!0),Kt.canvasSupported=!!document.createElement("canvas").getContext,Kt.svgSupported="undefined"!=typeof SVGRect,Kt.touchEventsSupported="ontouchstart"in window&&!Fe.ie&&!Fe.edge,Kt.pointerEventsSupported="onpointerdown"in window&&(Fe.edge||Fe.ie&&11<=+Fe.version),Kt.domSupported="undefined"!=typeof document,Pt=document.documentElement.style,Kt.transform3dSupported=(Fe.ie&&"transition"in Pt||Fe.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in Pt)&&!("OTransition"in Pt),Kt.transformSupported=Kt.transform3dSupported||Fe.ie&&9<=+Fe.version);var x={"[object Function]":!0,"[object RegExp]":!0,"[object Date]":!0,"[object Error]":!0,"[object CanvasGradient]":!0,"[object CanvasPattern]":!0,"[object Image]":!0,"[object Canvas]":!0},b={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0},T=Object.prototype.toString,H=Array.prototype,G=H.forEach,W=H.filter,U=H.slice,Y=H.map,X=function(){}.constructor,Z=X?X.prototype:null,K={};function $(t,e){K[t]=e}var J=2311;function Q(){return J++}function tt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];"undefined"!=typeof console&&console.error.apply(console,t)}function C(t){if(null==t||"object"!=typeof t)return t;var e=t,n=T.call(t);if("[object Array]"===n){if(!It(t))for(var e=[],i=0,o=t.length;i<o;i++)e[i]=C(t[i])}else if(b[n]){if(!It(t)){var r=t.constructor;if(r.from)e=r.from(t);else for(e=new r(t.length),i=0,o=t.length;i<o;i++)e[i]=C(t[i])}}else if(!x[n]&&!It(t)&&!ft(t))for(var a in e={},t)t.hasOwnProperty(a)&&(e[a]=C(t[a]));return e}function p(t,e,n){if(!k(e)||!k(t))return n?C(e):t;for(var i in e){var o,r;e.hasOwnProperty(i)&&(o=t[i],!k(r=e[i])||!k(o)||F(r)||F(o)||ft(r)||ft(o)||pt(r)||pt(o)||It(r)||It(o)?!n&&i in t||(t[i]=C(e[i])):p(o,r,n))}return t}function et(t,e){for(var n=t[0],i=1,o=t.length;i<o;i++)n=p(n,t[i],e);return n}function I(t,e){if(Object.assign)Object.assign(t,e);else for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function V(t,e,n){for(var i=lt(e),o=0;o<i.length;o++){var r=i[o];(n?null!=e[r]:null==t[r])&&(t[r]=e[r])}return t}var nt=function(){return K.createCanvas()};function A(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var n=0,i=t.length;n<i;n++)if(t[n]===e)return n}return-1}function it(t,e){var n,i=t.prototype;function o(){}for(n in o.prototype=e.prototype,t.prototype=new o,i)i.hasOwnProperty(n)&&(t.prototype[n]=i[n]);(t.prototype.constructor=t).superClass=e}function ot(t,e,n){if(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,Object.getOwnPropertyNames)for(var i=Object.getOwnPropertyNames(e),o=0;o<i.length;o++){var r=i[o];"constructor"!==r&&(n?null!=e[r]:null==t[r])&&(t[r]=e[r])}else V(t,e,n)}function rt(t){return!!t&&"string"!=typeof t&&"number"==typeof t.length}function N(t,e,n){if(t&&e)if(t.forEach&&t.forEach===G)t.forEach(e,n);else if(t.length===+t.length)for(var i=0,o=t.length;i<o;i++)e.call(n,t[i],i,t);else for(var r in t)t.hasOwnProperty(r)&&e.call(n,t[r],r,t)}function j(t,e,n){if(!t)return[];if(!e)return bt(t);if(t.map&&t.map===Y)return t.map(e,n);for(var i=[],o=0,r=t.length;o<r;o++)i.push(e.call(n,t[o],o,t));return i}function at(t,e,n,i){if(t&&e){for(var o=0,r=t.length;o<r;o++)n=e.call(i,n,t[o],o,t);return n}}function st(t,e,n){if(!t)return[];if(!e)return bt(t);if(t.filter&&t.filter===W)return t.filter(e,n);for(var i=[],o=0,r=t.length;o<r;o++)e.call(n,t[o],o,t)&&i.push(t[o]);return i}function lt(t){if(!t)return[];if(Object.keys)return Object.keys(t);var e,n=[];for(e in t)t.hasOwnProperty(e)&&n.push(e);return n}K.createCanvas=function(){return document.createElement("canvas")};var S=Z&&ut(Z.bind)?Z.call.bind(Z.bind):function(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return function(){return t.apply(e,n.concat(U.call(arguments)))}};function M(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return function(){return t.apply(this,e.concat(U.call(arguments)))}}function F(t){return Array.isArray?Array.isArray(t):"[object Array]"===T.call(t)}function ut(t){return"function"==typeof t}function D(t){return"string"==typeof t}function ht(t){return"[object String]"===T.call(t)}function ct(t){return"number"==typeof t}function k(t){var e=typeof t;return"function"==e||!!t&&"object"==e}function pt(t){return!!x[T.call(t)]}function dt(t){return!!b[T.call(t)]}function ft(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}function gt(t){return null!=t.colorStops}function yt(t){return null!=t.image}function mt(t){return"[object RegExp]"===T.call(t)}function vt(t){return t!=t}function _t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=0,i=t.length;n<i;n++)if(null!=t[n])return t[n]}function P(t,e){return null!=t?t:e}function xt(t,e,n){return null!=t?t:null!=e?e:n}function bt(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return U.apply(t,e)}function wt(t){var e;return"number"==typeof t?[t,t,t,t]:2===(e=t.length)?[t[0],t[1],t[0],t[1]]:3===e?[t[0],t[1],t[2],t[1]]:t}function St(t,e){if(!t)throw new Error(e)}function Mt(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var Tt="__ec_primitive__";function Ct(t){t[Tt]=!0}function It(t){return t[Tt]}Dt.prototype.get=function(t){return this.data.hasOwnProperty(t)?this.data[t]:null},Dt.prototype.set=function(t,e){return this.data[t]=e},Dt.prototype.each=function(t,e){for(var n in this.data)this.data.hasOwnProperty(n)&&t.call(e,this.data[n],n)},Dt.prototype.keys=function(){return lt(this.data)},Dt.prototype.removeKey=function(t){delete this.data[t]};var At=Dt;function Dt(t){this.data={};var n=F(t),i=(this.data={},this);function e(t,e){n?i.set(t,e):i.set(e,t)}t instanceof Dt?t.each(e):t&&N(t,e)}function L(t){return new At(t)}function kt(t,e){var n,t=Object.create?Object.create(t):((n=function(){}).prototype=t,new n);return e&&I(t,e),t}function _(t,e){return t.hasOwnProperty(e)}function Lt(){}var Pt=Object.freeze({__proto__:null,$override:$,HashMap:At,assert:St,bind:S,clone:C,concatArray:function(t,e){for(var n=new t.constructor(t.length+e.length),i=0;i<t.length;i++)n[i]=t[i];for(var o=t.length,i=0;i<e.length;i++)n[i+o]=e[i];return n},createCanvas:nt,createHashMap:L,createObject:kt,curry:M,defaults:V,each:N,eqNaN:vt,extend:I,filter:st,find:function(t,e,n){if(t&&e)for(var i=0,o=t.length;i<o;i++)if(e.call(n,t[i],i,t))return t[i]},guid:Q,hasOwn:_,indexOf:A,inherits:it,isArray:F,isArrayLike:rt,isBuiltInObject:pt,isDom:ft,isFunction:ut,isGradientObject:gt,isNumber:ct,isObject:k,isPatternObject:yt,isPrimitive:It,isRegExp:mt,isString:D,isStringSafe:ht,isTypedArray:dt,keys:lt,logError:tt,map:j,merge:p,mergeAll:et,mixin:ot,noop:Lt,normalizeCssArray:wt,reduce:at,retrieve:_t,retrieve2:P,retrieve3:xt,setAsPrimitive:Ct,slice:bt,trim:Mt});function Ot(t,e){return[t=null==t?0:t,e=null==e?0:e]}function Rt(t){return[t[0],t[1]]}function Nt(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function Et(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function Bt(t){return Math.sqrt(zt(t))}function zt(t){return t[0]*t[0]+t[1]*t[1]}function Vt(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function Ft(t,e){var n=Bt(e);return 0===n?(t[0]=0,t[1]=0):(t[0]=e[0]/n,t[1]=e[1]/n),t}function Ht(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var Gt=Ht;function Wt(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var Ut=Wt;function Yt(t,e,n,i){return t[0]=e[0]+i*(n[0]-e[0]),t[1]=e[1]+i*(n[1]-e[1]),t}function Xt(t,e,n){var i=e[0],e=e[1];return t[0]=n[0]*i+n[2]*e+n[4],t[1]=n[1]*i+n[3]*e+n[5],t}function Zt(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function jt(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}function qt(t,e){this.target=t,this.topTarget=e&&e.topTarget}var Kt=Object.freeze({__proto__:null,add:Nt,applyTransform:Xt,clone:Rt,copy:function(t,e){return t[0]=e[0],t[1]=e[1],t},create:Ot,dist:Gt,distSquare:Ut,distance:Ht,distanceSquare:Wt,div:function(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t},dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},len:Bt,lenSquare:zt,length:Bt,lengthSquare:zt,lerp:Yt,max:jt,min:Zt,mul:function(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t},negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},normalize:Ft,scale:Vt,scaleAndAdd:function(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t},set:function(t,e,n){return t[0]=e,t[1]=n,t},sub:Et}),$t=(Jt.prototype._dragStart=function(t){for(var e=t.target;e&&!e.draggable;)e=e.parent;e&&((this._draggingTarget=e).dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.handler.dispatchToElement(new qt(e,t),"dragstart",t.event))},Jt.prototype._drag=function(t){var e,n,i,o,r=this._draggingTarget;r&&(e=t.offsetX,n=t.offsetY,i=e-this._x,o=n-this._y,this._x=e,this._y=n,r.drift(i,o,t),this.handler.dispatchToElement(new qt(r,t),"drag",t.event),i=this.handler.findHover(e,n,r).target,o=this._dropTarget,r!==(this._dropTarget=i))&&(o&&i!==o&&this.handler.dispatchToElement(new qt(o,t),"dragleave",t.event),i)&&i!==o&&this.handler.dispatchToElement(new qt(i,t),"dragenter",t.event)},Jt.prototype._dragEnd=function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.handler.dispatchToElement(new qt(e,t),"dragend",t.event),this._dropTarget&&this.handler.dispatchToElement(new qt(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null},Jt);function Jt(t){(this.handler=t).on("mousedown",this._dragStart,this),t.on("mousemove",this._drag,this),t.on("mouseup",this._dragEnd,this)}te.prototype.on=function(t,e,n,i){this._$handlers||(this._$handlers={});var o=this._$handlers;if("function"==typeof e&&(i=n,n=e,e=null),n&&t){var r=this._$eventProcessor;null!=e&&r&&r.normalizeQuery&&(e=r.normalizeQuery(e)),o[t]||(o[t]=[]);for(var a=0;a<o[t].length;a++)if(o[t][a].h===n)return this;r={h:n,query:e,ctx:i||this,callAtLast:n.zrEventfulCallAtLast},e=o[t].length-1,i=o[t][e];i&&i.callAtLast?o[t].splice(e,0,r):o[t].push(r)}return this},te.prototype.isSilent=function(t){var e=this._$handlers;return!e||!e[t]||!e[t].length},te.prototype.off=function(t,e){var n=this._$handlers;if(n)if(t)if(e){if(n[t]){for(var i=[],o=0,r=n[t].length;o<r;o++)n[t][o].h!==e&&i.push(n[t][o]);n[t]=i}n[t]&&0===n[t].length&&delete n[t]}else delete n[t];else this._$handlers={};return this},te.prototype.trigger=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(this._$handlers){var i=this._$handlers[t],o=this._$eventProcessor;if(i)for(var r=e.length,a=i.length,s=0;s<a;s++){var l=i[s];if(!o||!o.filter||null==l.query||o.filter(t,l.query))switch(r){case 0:l.h.call(l.ctx);break;case 1:l.h.call(l.ctx,e[0]);break;case 2:l.h.call(l.ctx,e[0],e[1]);break;default:l.h.apply(l.ctx,e)}}o&&o.afterTrigger&&o.afterTrigger(t)}return this},te.prototype.triggerWithContext=function(t){if(this._$handlers){var e=this._$handlers[t],n=this._$eventProcessor;if(e)for(var i=arguments,o=i.length,r=i[o-1],a=e.length,s=0;s<a;s++){var l=e[s];if(!n||!n.filter||null==l.query||n.filter(t,l.query))switch(o){case 0:l.h.call(r);break;case 1:l.h.call(r,i[0]);break;case 2:l.h.call(r,i[0],i[1]);break;default:l.h.apply(r,i.slice(1,o-1))}}n&&n.afterTrigger&&n.afterTrigger(t)}return this};var Qt=te;function te(t){t&&(this._$eventProcessor=t)}var ee=Math.log(2);function ne(t,e,n,i,o,r){var a,s=i+"-"+o,l=t.length;if(r.hasOwnProperty(s))return r[s];if(1===e)return a=Math.round(Math.log((1<<l)-1&~o)/ee),t[n][a];for(var u=i|1<<n,h=n+1;i&1<<h;)h++;for(var c=0,p=0,d=0;p<l;p++){var f=1<<p;f&o||(c+=(d%2?-1:1)*t[n][p]*ne(t,e-1,h,u,o|f,r),d++)}return r[s]=c}function ie(t,e){var n=[[t[0],t[1],1,0,0,0,-e[0]*t[0],-e[0]*t[1]],[0,0,0,t[0],t[1],1,-e[1]*t[0],-e[1]*t[1]],[t[2],t[3],1,0,0,0,-e[2]*t[2],-e[2]*t[3]],[0,0,0,t[2],t[3],1,-e[3]*t[2],-e[3]*t[3]],[t[4],t[5],1,0,0,0,-e[4]*t[4],-e[4]*t[5]],[0,0,0,t[4],t[5],1,-e[5]*t[4],-e[5]*t[5]],[t[6],t[7],1,0,0,0,-e[6]*t[6],-e[6]*t[7]],[0,0,0,t[6],t[7],1,-e[7]*t[6],-e[7]*t[7]]],i={},o=ne(n,8,0,0,0,i);if(0!==o){for(var r=[],a=0;a<8;a++)for(var s=0;s<8;s++)null==r[s]&&(r[s]=0),r[s]+=((a+s)%2?-1:1)*ne(n,7,0===a?1:0,1<<a,1<<s,i)/o*e[a];return function(t,e,n){var i=e*r[6]+n*r[7]+1;t[0]=(e*r[0]+n*r[1]+r[2])/i,t[1]=(e*r[3]+n*r[4]+r[5])/i}}}var oe="___zrEVENTSAVED",re=[];function ae(t,e,n,i,o){if(e.getBoundingClientRect&&w.domSupported&&!se(e)){var r=e[oe]||(e[oe]={}),e=function(t,e,n){for(var i=n?"invTrans":"trans",o=e[i],r=e.srcCoords,a=[],s=[],l=!0,u=0;u<4;u++){var h=t[u].getBoundingClientRect(),c=2*u,p=h.left,h=h.top;a.push(p,h),l=l&&r&&p===r[c]&&h===r[1+c],s.push(t[u].offsetLeft,t[u].offsetTop)}return l&&o?o:(e.srcCoords=a,e[i]=n?ie(s,a):ie(a,s))}(function(t,e){var n=e.markers;if(!n){n=e.markers=[];for(var i=["left","right"],o=["top","bottom"],r=0;r<4;r++){var a=document.createElement("div"),s=r%2,l=(r>>1)%2;a.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[s]+":0",o[l]+":0",i[1-s]+":auto",o[1-l]+":auto",""].join("!important;"),t.appendChild(a),n.push(a)}}return n}(e,r),r,o);if(e)return e(t,n,i),!0}return!1}function se(t){return"CANVAS"===t.nodeName.toUpperCase()}var le="undefined"!=typeof window&&!!window.addEventListener,ue=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,he=[];function ce(t,e,n,i){return n=n||{},i||!w.canvasSupported?pe(t,e,n):w.browser.firefox&&null!=e.layerX&&e.layerX!==e.offsetX?(n.zrX=e.layerX,n.zrY=e.layerY):null!=e.offsetX?(n.zrX=e.offsetX,n.zrY=e.offsetY):pe(t,e,n),n}function pe(t,e,n){if(w.domSupported&&t.getBoundingClientRect){var i,o=e.clientX,e=e.clientY;if(se(t))return i=t.getBoundingClientRect(),n.zrX=o-i.left,n.zrY=e-i.top;if(ae(he,t,o,e))return n.zrX=he[0],n.zrY=he[1]}n.zrX=n.zrY=0}function de(t){return t||window.event}function fe(t,e,n){var i;return null==(e=de(e)).zrX&&((i=e.type)&&0<=i.indexOf("touch")?(i=("touchend"!==i?e.targetTouches:e.changedTouches)[0])&&ce(t,i,e,n):(ce(t,e,e,n),t=(t=(i=e).wheelDelta)||(n=i.deltaX,i=i.deltaY,null==n||null==i?t:3*(0!==i?Math.abs(i):Math.abs(n))*(0<i||!(i<0)&&0<n?-1:1)),e.zrDelta=t?t/120:-(e.detail||0)/3),i=e.button,null==e.which&&void 0!==i&&ue.test(e.type))&&(e.which=1&i?1:2&i?3:4&i?2:0),e}function ge(t,e,n,i){le?t.addEventListener(e,n,i):t.attachEvent("on"+e,n)}var ye=le?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0};function me(t){return 2===t.which||3===t.which}_e.prototype.recognize=function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},_e.prototype.clear=function(){return this._track.length=0,this},_e.prototype._doTrack=function(t,e,n){var i=t.touches;if(i){for(var o={points:[],touches:[],target:e,event:t},r=0,a=i.length;r<a;r++){var s=i[r],l=ce(n,s,{});o.points.push([l.zrX,l.zrY]),o.touches.push(s)}this._track.push(o)}},_e.prototype._recognize=function(t){for(var e in be)if(be.hasOwnProperty(e)){e=be[e](this._track,t);if(e)return e}};var ve=_e;function _e(){this._track=[]}function xe(t){var e=t[1][0]-t[0][0],t=t[1][1]-t[0][1];return Math.sqrt(e*e+t*t)}var be={pinch:function(t,e){var n=t.length;if(n){var i=(t[n-1]||{}).points,n=(t[n-2]||{}).points||i;if(n&&1<n.length&&i&&1<i.length)return n=xe(i)/xe(n),isFinite(n)||(n=1),e.pinchScale=n,n=[(i[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2],e.pinchX=n[0],e.pinchY=n[1],{type:"pinch",target:t[0].target,event:e}}}};function we(){ye(this.event)}function Se(t,e){this.x=t,this.y=e}u(ke,Te=Qt),ke.prototype.dispose=function(){},ke.prototype.setCursor=function(){};var Me,Te,Ce=ke,Ie=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Ae=(u(De,Me=Qt),De.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(N(Ie,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},De.prototype.mousemove=function(t){var e=t.zrX,n=t.zrY,i=Le(this,e,n),o=this._hovered,r=o.target,i=(r&&!r.__zr&&(r=(o=this.findHover(o.x,o.y)).target),this._hovered=i?new Se(e,n):this.findHover(e,n)),e=i.target,n=this.proxy;n.setCursor&&n.setCursor(e?e.cursor:"default"),r&&e!==r&&this.dispatchToElement(o,"mouseout",t),this.dispatchToElement(i,"mousemove",t),e&&e!==r&&this.dispatchToElement(i,"mouseover",t)},De.prototype.mouseout=function(t){var e=t.zrEventControl;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&this.trigger("globalout",{type:"globalout",event:t})},De.prototype.resize=function(){this._hovered=new Se(0,0)},De.prototype.dispatch=function(t,e){t=this[t];t&&t.call(this,e)},De.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},De.prototype.setCursorStyle=function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},De.prototype.dispatchToElement=function(t,e,n){var i=(t=t||{}).target;if(!i||!i.silent){for(var o="on"+e,r={type:e,event:n,target:(t=t).target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:we};i&&(i[o]&&(r.cancelBubble=!!i[o].call(i,r)),i.trigger(e,r),i=i.__hostTarget||i.parent,!r.cancelBubble););r.cancelBubble||(this.trigger(e,r),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(t){"function"==typeof t[o]&&t[o].call(t,r),t.trigger&&t.trigger(e,r)}))}},De.prototype.findHover=function(t,e,n){for(var i=this.storage.getDisplayList(),o=new Se(t,e),r=i.length-1;0<=r;r--){var a=void 0;if(i[r]!==n&&!i[r].ignore&&(a=function(t,e,n){if(t[t.rectHover?"rectContain":"contain"](e,n)){for(var i=t,o=void 0,r=!1;i;){if(!(r=i.ignoreClip?!0:r)){var a=i.getClipPath();if(a&&!a.contain(e,n))return!1;i.silent&&(o=!0)}a=i.__hostTarget;i=a||i.parent}return!o||"silent"}return!1}(i[r],t,e))&&(o.topTarget||(o.topTarget=i[r]),"silent"!==a)){o.target=i[r];break}}return o},De.prototype.processGesture=function(t,e){this._gestureMgr||(this._gestureMgr=new ve);var n=this._gestureMgr,i=("start"===e&&n.clear(),n.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom));"end"===e&&n.clear(),i&&(e=i.type,t.gestureEvent=e,(n=new Se).target=i.target,this.dispatchToElement(n,e,i.event))},De);function De(t,e,n,i){var o=Me.call(this)||this;return o._hovered=new Se(0,0),o.storage=t,o.painter=e,o.painterRoot=i,n=n||new Ce,o.proxy=null,o.setHandlerProxy(n),o._draggingMgr=new $t(o),o}function ke(){var t=null!==Te&&Te.apply(this,arguments)||this;return t.handler=null,t}function Le(t,e,n){t=t.painter;return e<0||e>t.getWidth()||n<0||n>t.getHeight()}function Pe(){return[1,0,0,1,0,0]}function Oe(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function Re(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function Ne(t,e,n){var i=e[0]*n[0]+e[2]*n[1],o=e[1]*n[0]+e[3]*n[1],r=e[0]*n[2]+e[2]*n[3],a=e[1]*n[2]+e[3]*n[3],s=e[0]*n[4]+e[2]*n[5]+e[4],n=e[1]*n[4]+e[3]*n[5]+e[5];return t[0]=i,t[1]=o,t[2]=r,t[3]=a,t[4]=s,t[5]=n,t}function Ee(t,e,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+n[0],t[5]=e[5]+n[1],t}function Be(t,e,n){var i=e[0],o=e[2],r=e[4],a=e[1],s=e[3],e=e[5],l=Math.sin(n),n=Math.cos(n);return t[0]=i*n+a*l,t[1]=-i*l+a*n,t[2]=o*n+s*l,t[3]=-o*l+n*s,t[4]=n*r+l*e,t[5]=n*e-l*r,t}function ze(t,e,n){var i=n[0],n=n[1];return t[0]=e[0]*i,t[1]=e[1]*n,t[2]=e[2]*i,t[3]=e[3]*n,t[4]=e[4]*i,t[5]=e[5]*n,t}function Ve(t,e){var n=e[0],i=e[2],o=e[4],r=e[1],a=e[3],e=e[5],s=n*a-r*i;return s?(t[0]=a*(s=1/s),t[1]=-r*s,t[2]=-i*s,t[3]=n*s,t[4]=(i*e-a*o)*s,t[5]=(r*o-n*e)*s,t):null}N(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(a){Ae.prototype[a]=function(t){var e,n,i=t.zrX,o=t.zrY,r=Le(this,i,o);if("mouseup"===a&&r||(n=(e=this.findHover(i,o)).target),"mousedown"===a)this._downEl=n,this._downPoint=[t.zrX,t.zrY],this._upEl=n;else if("mouseup"===a)this._upEl=n;else if("click"===a){if(this._downEl!==this._upEl||!this._downPoint||4<Gt(this._downPoint,[t.zrX,t.zrY]))return;this._downPoint=null}this.dispatchToElement(e,a,t)}});var Fe=Object.freeze({__proto__:null,clone:function(t){var e=Pe();return Re(e,t),e},copy:Re,create:Pe,identity:Oe,invert:Ve,mul:Ne,rotate:Be,scale:ze,translate:Ee}),He=Oe;function Ge(t){return 5e-5<t||t<-5e-5}var We=[],Ue=[],Ye=Pe(),Xe=Math.abs,Ze=(je.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},je.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},je.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},je.prototype.needLocalTransform=function(){return Ge(this.rotation)||Ge(this.x)||Ge(this.y)||Ge(this.scaleX-1)||Ge(this.scaleY-1)},je.prototype.updateTransform=function(){var t=this.parent,e=t&&t.transform,n=this.needLocalTransform(),i=this.transform;n||e?(i=i||Pe(),n?this.getLocalTransform(i):He(i),e&&(n?Ne(i,t.transform,i):Re(i,t.transform)),this.transform=i,this._resolveGlobalScaleRatio(i)):i&&He(i)},je.prototype._resolveGlobalScaleRatio=function(t){var e,n,i=this.globalScaleRatio;null!=i&&1!==i&&(this.getGlobalScale(We),n=((We[1]-(n=We[1]<0?-1:1))*i+n)/We[1]||0,t[0]*=i=((We[0]-(e=We[0]<0?-1:1))*i+e)/We[0]||0,t[1]*=i,t[2]*=n,t[3]*=n),this.invTransform=this.invTransform||Pe(),Ve(this.invTransform,t)},je.prototype.getLocalTransform=function(t){return je.getLocalTransform(this,t)},je.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},je.prototype.setLocalTransform=function(t){var e,n;t&&(e=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3],Ge(e-1)&&(e=Math.sqrt(e)),Ge(n-1)&&(n=Math.sqrt(n)),t[0]<0&&(e=-e),t[3]<0&&(n=-n),this.rotation=Math.atan2(-t[1]/n,t[0]/e),e<0&&n<0&&(this.rotation+=Math.PI,e=-e,n=-n),this.x=t[4],this.y=t[5],this.scaleX=e,this.scaleY=n)},je.prototype.decomposeTransform=function(){var t,e,n;this.transform&&(e=this.parent,t=this.transform,e&&e.transform&&(Ne(Ue,e.invTransform,t),t=Ue),e=this.originX,n=this.originY,(e||n)&&(Ye[4]=e,Ye[5]=n,Ne(Ue,t,Ye),Ue[4]-=e,Ue[5]-=n,t=Ue),this.setLocalTransform(t))},je.prototype.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1])):(t[0]=1,t[1]=1),t},je.prototype.transformCoordToLocal=function(t,e){t=[t,e],e=this.invTransform;return e&&Xt(t,t,e),t},je.prototype.transformCoordToGlobal=function(t,e){t=[t,e],e=this.transform;return e&&Xt(t,t,e),t},je.prototype.getLineScale=function(){var t=this.transform;return t&&1e-10<Xe(t[0]-1)&&1e-10<Xe(t[3]-1)?Math.sqrt(Xe(t[0]*t[3]-t[2]*t[1])):1},je.getLocalTransform=function(t,e){He(e=e||[]);var n=t.originX||0,i=t.originY||0,o=t.scaleX,r=t.scaleY,a=t.rotation||0,s=t.x,t=t.y;return e[4]-=n,e[5]-=i,e[0]*=o,e[1]*=r,e[2]*=o,e[3]*=r,e[4]*=o,e[5]*=r,a&&Be(e,e,a),e[4]+=n,e[5]+=i,e[4]+=s,e[5]+=t,e},je.initDefaultProps=((Tn=je.prototype).x=0,Tn.y=0,Tn.scaleX=1,Tn.scaleY=1,Tn.originX=0,Tn.originY=0,Tn.rotation=0,void(Tn.globalScaleRatio=1)),je);function je(){}var qe={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,n=.1;return 0===t?0:1===t?1:(e=!n||n<1?(n=1,.1):.4*Math.asin(1/n)/(2*Math.PI),-n*Math.pow(2,10*--t)*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,n=.1;return 0===t?0:1===t?1:(e=!n||n<1?(n=1,.1):.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,n=.1;return 0===t?0:1===t?1:(e=!n||n<1?(n=1,.1):.4*Math.asin(1/n)/(2*Math.PI),(t*=2)<1?n*Math.pow(2,10*--t)*Math.sin((t-e)*(2*Math.PI)/.4)*-.5:n*Math.pow(2,-10*--t)*Math.sin((t-e)*(2*Math.PI)/.4)*.5+1)},backIn:function(t){return t*t*(2.70158*t-1.70158)},backOut:function(t){return--t*t*(2.70158*t+1.70158)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((1+e)*t-e)*.5:.5*((t-=2)*t*((1+e)*t+e)+2)},bounceIn:function(t){return 1-qe.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?.5*qe.bounceIn(2*t):.5*qe.bounceOut(2*t-1)+.5}},Ke=($e.prototype.step=function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),!this._paused){var n=(t-this._startTime-this._pausedTime)/this._life,i=(n<0&&(n=0),n=Math.min(n,1),this.easing),i="string"==typeof i?qe[i]:i,i="function"==typeof i?i(n):n;if(this.onframe&&this.onframe(i),1===n){if(!this.loop)return!0;this._restart(t),this.onrestart&&this.onrestart()}return!1}this._pausedTime+=e},$e.prototype._restart=function(t){var e=(t-this._startTime-this._pausedTime)%this._life;this._startTime=t-e+this.gap,this._pausedTime=0},$e.prototype.pause=function(){this._paused=!0},$e.prototype.resume=function(){this._paused=!1},$e);function $e(t){this._initialized=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=null!=t.loop&&t.loop,this.gap=t.gap||0,this.easing=t.easing||"linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart}function Je(t){this.value=t}tn.prototype.insert=function(t){t=new Je(t);return this.insertEntry(t),t},tn.prototype.insertEntry=function(t){this.head?((this.tail.next=t).prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},tn.prototype.remove=function(t){var e=t.prev,n=t.next;e?e.next=n:this.head=n,n?n.prev=e:this.tail=e,t.next=t.prev=null,this._len--},tn.prototype.len=function(){return this._len},tn.prototype.clear=function(){this.head=this.tail=null,this._len=0};var Qe=tn;function tn(){this._len=0}nn.prototype.put=function(t,e){var n,i,o=this._list,r=this._map,a=null;return null==r[t]&&(i=o.len(),n=this._lastRemovedEntry,i>=this._maxSize&&0<i&&(i=o.head,o.remove(i),delete r[i.key],a=i.value,this._lastRemovedEntry=i),n?n.value=e:n=new Je(e),n.key=t,o.insertEntry(n),r[t]=n),a},nn.prototype.get=function(t){var t=this._map[t],e=this._list;if(null!=t)return t!==e.tail&&(e.remove(t),e.insertEntry(t)),t.value},nn.prototype.clear=function(){this._list.clear(),this._map={}},nn.prototype.len=function(){return this._list.len()};var en=nn;function nn(t){this._list=new Qe,this._maxSize=10,this._map={},this._maxSize=t}var on={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function rn(t){return(t=Math.round(t))<0?0:255<t?255:t}function an(t){return t<0?0:1<t?1:t}function sn(t){return t.length&&"%"===t.charAt(t.length-1)?rn(parseFloat(t)/100*255):rn(parseInt(t,10))}function ln(t){return t.length&&"%"===t.charAt(t.length-1)?an(parseFloat(t)/100):an(parseFloat(t))}function un(t,e,n){return n<0?n+=1:1<n&&--n,6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function hn(t,e,n){return t+(e-t)*n}function cn(t,e,n,i,o){return t[0]=e,t[1]=n,t[2]=i,t[3]=o,t}function pn(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var dn=new en(20),fn=null;function gn(t,e){fn&&pn(fn,e),fn=dn.put(t,fn||e.slice())}function yn(t,e){if(t){e=e||[];var n=dn.get(t);if(n)return pn(e,n);n=(t+="").replace(/ /g,"").toLowerCase();if(n in on)return pn(e,on[n]),gn(t,e),e;var i=n.length;if("#"===n.charAt(0))return 4===i||5===i?0<=(o=parseInt(n.slice(1,4),16))&&o<=4095?(cn(e,(3840&o)>>4|(3840&o)>>8,240&o|(240&o)>>4,15&o|(15&o)<<4,5===i?parseInt(n.slice(4),16)/15:1),gn(t,e),e):void cn(e,0,0,0,1):7===i||9===i?0<=(o=parseInt(n.slice(1,7),16))&&o<=16777215?(cn(e,(16711680&o)>>16,(65280&o)>>8,255&o,9===i?parseInt(n.slice(7),16)/255:1),gn(t,e),e):void cn(e,0,0,0,1):void 0;var o=n.indexOf("("),r=n.indexOf(")");if(-1!==o&&r+1===i){var i=n.substr(0,o),a=n.substr(o+1,r-(o+1)).split(","),s=1;switch(i){case"rgba":if(4!==a.length)return 3===a.length?cn(e,+a[0],+a[1],+a[2],1):cn(e,0,0,0,1);s=ln(a.pop());case"rgb":return 3!==a.length?void cn(e,0,0,0,1):(cn(e,sn(a[0]),sn(a[1]),sn(a[2]),s),gn(t,e),e);case"hsla":return 4!==a.length?void cn(e,0,0,0,1):(a[3]=ln(a[3]),mn(a,e),gn(t,e),e);case"hsl":return 3!==a.length?void cn(e,0,0,0,1):(mn(a,e),gn(t,e),e);default:return}}cn(e,0,0,0,1)}}function mn(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=ln(t[1]),o=ln(t[2]),i=o<=.5?o*(i+1):o+i-o*i,o=2*o-i;return cn(e=e||[],rn(255*un(o,i,n+1/3)),rn(255*un(o,i,n)),rn(255*un(o,i,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function vn(t,e){var n=yn(t);if(n){for(var i=0;i<3;i++)n[i]=e<0?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0,255<n[i]?n[i]=255:n[i]<0&&(n[i]=0);return Sn(n,4===n.length?"rgba":"rgb")}}function _n(t){t=yn(t);if(t)return((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)}function xn(t,e,n){var i,o,r;if(e&&e.length&&0<=t&&t<=1)return n=n||[],t=t*(e.length-1),i=Math.floor(t),r=Math.ceil(t),o=e[i],e=e[r],n[0]=rn(hn(o[0],e[0],r=t-i)),n[1]=rn(hn(o[1],e[1],r)),n[2]=rn(hn(o[2],e[2],r)),n[3]=an(hn(o[3],e[3],r)),n}function bn(t,e,n){var i,o,r,a;if(e&&e.length&&0<=t&&t<=1)return t=t*(e.length-1),i=Math.floor(t),o=Math.ceil(t),a=yn(e[i]),e=yn(e[o]),a=Sn([rn(hn(a[0],e[0],r=t-i)),rn(hn(a[1],e[1],r)),rn(hn(a[2],e[2],r)),an(hn(a[3],e[3],r))],"rgba"),n?{color:a,leftIndex:i,rightIndex:o,value:t}:a}function wn(t,e){t=yn(t);if(t&&null!=e)return t[3]=an(e),Sn(t,"rgba")}function Sn(t,e){var n;if(t&&t.length)return n=t[0]+","+t[1]+","+t[2],"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(n+=","+t[3]),e+"("+n+")"}function Mn(t,e){t=yn(t);return t?(.299*t[0]+.587*t[1]+.114*t[2])*t[3]/255+(1-t[3])*e:0}var Tn=Object.freeze({__proto__:null,fastLerp:xn,fastMapToColor:xn,lerp:bn,lift:vn,lum:Mn,mapToColor:bn,modifyAlpha:wn,modifyHSL:function(t,e,n,i){var o=yn(t);if(t)return o=function(t){var e,n,i,o,r,a,s,l,u,h;if(t)return h=t[0]/255,n=t[1]/255,i=t[2]/255,s=Math.min(h,n,i),r=((o=Math.max(h,n,i))+s)/2,0==(u=o-s)?a=e=0:(a=r<.5?u/(o+s):u/(2-o-s),s=((o-h)/6+u/2)/u,l=((o-n)/6+u/2)/u,u=((o-i)/6+u/2)/u,h===o?e=u-l:n===o?e=1/3+s-u:i===o&&(e=2/3+l-s),e<0&&(e+=1),1<e&&--e),h=[360*e,a,r],null!=t[3]&&h.push(t[3]),h}(o),null!=e&&(o[0]=(t=e,(t=Math.round(t))<0?0:360<t?360:t)),null!=n&&(o[1]=ln(n)),null!=i&&(o[2]=ln(i)),Sn(mn(o),"rgba")},parse:yn,random:function(){return"rgb("+Math.round(255*Math.random())+","+Math.round(255*Math.random())+","+Math.round(255*Math.random())+")"},stringify:Sn,toHex:_n}),Cn=Array.prototype.slice;function In(t,e,n){return(e-t)*n+t}function An(t,e,n,i){for(var o=e.length,r=0;r<o;r++)t[r]=In(e[r],n[r],i)}function Dn(t,e,n,i){for(var o=e.length,r=0;r<o;r++)t[r]=e[r]+n[r]*i;return t}function kn(t,e,n,i){for(var o=e.length,r=o&&e[0].length,a=0;a<o;a++){t[a]||(t[a]=[]);for(var s=0;s<r;s++)t[a][s]=e[a][s]+n[a][s]*i}return t}function Ln(t,e){var n=t.length;if(n===e.length){for(var i=0;i<n;i++)if(t[i]!==e[i])return;return 1}}function Pn(t,e,n,i,o,r,a){t=.5*(n-t),i=.5*(i-e);return(2*(e-n)+t+i)*a+(-3*(e-n)-2*t-i)*r+t*o+e}function On(t,e,n,i,o,r,a,s){for(var l=e.length,u=0;u<l;u++)t[u]=Pn(e[u],n[u],i[u],o[u],r,a,s)}function Rn(t){if(rt(t)){var e=t.length;if(rt(t[0])){for(var n=[],i=0;i<e;i++)n.push(Cn.call(t[i]));return n}return Cn.call(t)}return t}function Nn(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}var En=[0,0,0,0],Bn=(Fn.prototype.isFinished=function(){return this._finished},Fn.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},Fn.prototype.needsAnimate=function(){return!this._isAllValueEqual&&2<=this.keyframes.length&&this.interpolable},Fn.prototype.getAdditiveTrack=function(){return this._additiveTrack},Fn.prototype.addKeyframe=function(t,e){t>=this.maxTime?this.maxTime=t:this._needsSort=!0;var n=this.keyframes,i=n.length;if(this.interpolable)if(rt(e)){var o,r=rt((r=e)&&r[0])?2:1;if(0<i&&this.arrDim!==r)return void(this.interpolable=!1);if(1==r&&"number"!=typeof e[0]||2==r&&"number"!=typeof e[0][0])return void(this.interpolable=!1);0<i&&(o=n[i-1],!this._isAllValueEqual||1==r&&Ln(e,o.value)||(this._isAllValueEqual=!1)),this.arrDim=r}else{if(0<this.arrDim)return void(this.interpolable=!1);if("string"==typeof e){r=yn(e);r?(e=r,this.isValueColor=!0):this.interpolable=!1}else if("number"!=typeof e||isNaN(e))return void(this.interpolable=!1);this._isAllValueEqual&&0<i&&(o=n[i-1],this.isValueColor&&!Ln(o.value,e)||o.value!==e)&&(this._isAllValueEqual=!1)}n={time:t,value:e,percent:0};return this.keyframes.push(n),n},Fn.prototype.prepare=function(t){var e=this.keyframes;this._needsSort&&e.sort(function(t,e){return t.time-e.time});for(var n=this.arrDim,i=e.length,o=e[i-1],r=0;r<i;r++){e[r].percent=e[r].time/this.maxTime;if(0<n&&r!==i-1){a=void 0;s=void 0;l=void 0;u=void 0;h=void 0;c=void 0;p=void 0;d=void 0;f=void 0;var a=e[r].value;var s=o.value;var l=n;var u=a,h=s;if(u.push&&h.push){var a=u.length,c=h.length;if(a!==c)if(c<a)u.length=c;else for(var p=a;p<c;p++)u.push(1===l?h[p]:Cn.call(h[p]));for(var d=u[0]&&u[0].length,p=0;p<u.length;p++)if(1===l)isNaN(u[p])&&(u[p]=h[p]);else for(var f=0;f<d;f++)isNaN(u[p][f])&&(u[p][f]=h[p][f])}}}if(t&&this.needsAnimate()&&t.needsAnimate()&&n===t.arrDim&&this.isValueColor===t.isValueColor&&!t._finished){this._additiveTrack=t;for(var g=e[0].value,r=0;r<i;r++)0===n?this.isValueColor?e[r].additiveValue=Dn([],e[r].value,g,-1):e[r].additiveValue=e[r].value-g:1===n?e[r].additiveValue=Dn([],e[r].value,g,-1):2===n&&(e[r].additiveValue=kn([],e[r].value,g,-1))}},Fn.prototype.step=function(t,e){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n,i=null!=this._additiveTrack,o=i?"additiveValue":"value",r=this.keyframes,a=this.keyframes.length,s=this.propName,l=this.arrDim,u=this.isValueColor;if(e<0)n=0;else if(e<this._lastFramePercent){for(n=Math.min(this._lastFrame+1,a-1);0<=n&&!(r[n].percent<=e);n--);n=Math.min(n,a-2)}else{for(n=this._lastFrame;n<a&&!(r[n].percent>e);n++);n=Math.min(n-1,a-2)}var h,c,p,d,f,g=r[n+1],y=r[n];y&&g&&(this._lastFrame=n,this._lastFramePercent=e,0!=(h=g.percent-y.percent))&&(h=(e-y.percent)/h,c=i?this._additiveValue:u?En:t[s],(0<l||u)&&!c&&(c=this._additiveValue=[]),this.useSpline?(v=r[n][o],m=r[0===n?n:n-1][o],p=r[a-2<n?a-1:n+1][o],d=r[a-3<n?a-1:n+2][o],0<l?(1===l?On:function(t,e,n,i,o,r,a,s){for(var l=e.length,u=e[0].length,h=0;h<l;h++){t[h]||(t[1]=[]);for(var c=0;c<u;c++)t[h][c]=Pn(e[h][c],n[h][c],i[h][c],o[h][c],r,a,s)}})(c,m,v,p,d,h,h*h,h*h*h):u?(On(c,m,v,p,d,h,h*h,h*h*h),i||(t[s]=Nn(c))):(f=void 0,f=this.interpolable?Pn(m,v,p,d,h,h*h,h*h*h):p,i?this._additiveValue=f:t[s]=f)):0<l?(1===l?An:function(t,e,n,i){for(var o=e.length,r=o&&e[0].length,a=0;a<o;a++){t[a]||(t[a]=[]);for(var s=0;s<r;s++)t[a][s]=In(e[a][s],n[a][s],i)}})(c,y[o],g[o],h):u?(An(c,y[o],g[o],h),i||(t[s]=Nn(c))):(f=void 0,f=this.interpolable?In(y[o],g[o],h):(m=y[o],v=g[o],.5<h?v:m),i?this._additiveValue=f:t[s]=f),i)&&this._addToTarget(t)}var m,v},Fn.prototype._addToTarget=function(t){var e=this.arrDim,n=this.propName,i=this._additiveValue;0===e?this.isValueColor?(yn(t[n],En),Dn(En,En,i,1),t[n]=Nn(En)):t[n]=t[n]+i:1===e?Dn(t[n],t[n],i,1):2===e&&kn(t[n],t[n],i,1)},Fn),zn=(Vn.prototype.getTarget=function(){return this._target},Vn.prototype.changeTarget=function(t){this._target=t},Vn.prototype.when=function(t,e){return this.whenWithKeys(t,e,lt(e))},Vn.prototype.whenWithKeys=function(t,e,n){for(var i=this._tracks,o=0;o<n.length;o++){var r=n[o];if(!(s=i[r])){var a,s=i[r]=new Bn(r),l=void 0,u=this._getAdditiveTrack(r);if(u?(l=(a=u.keyframes[u.keyframes.length-1])&&a.value,u.isValueColor&&(l=l&&Nn(l))):l=this._target[r],null==l)continue;0!==t&&s.addKeyframe(0,Rn(l)),this._trackKeys.push(r)}s.addKeyframe(t,Rn(e[r]))}return this._maxTime=Math.max(this._maxTime,t),this},Vn.prototype.pause=function(){this._clip.pause(),this._paused=!0},Vn.prototype.resume=function(){this._clip.resume(),this._paused=!1},Vn.prototype.isPaused=function(){return!!this._paused},Vn.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneList;if(t)for(var e=t.length,n=0;n<e;n++)t[n].call(this)},Vn.prototype._abortedCallback=function(){this._setTracksFinished();var t=this.animation,e=this._abortedList;if(t&&t.removeClip(this._clip),this._clip=null,e)for(var n=0;n<e.length;n++)e[n].call(this)},Vn.prototype._setTracksFinished=function(){for(var t=this._tracks,e=this._trackKeys,n=0;n<e.length;n++)t[e[n]].setFinished()},Vn.prototype._getAdditiveTrack=function(t){var e,n=this._additiveAnimators;if(n)for(var i=0;i<n.length;i++){var o=n[i].getTrack(t);o&&(e=o)}return e},Vn.prototype.start=function(t,e){if(!(0<this._started)){this._started=1;for(var r=this,a=[],n=0;n<this._trackKeys.length;n++){var i=this._trackKeys[n],o=this._tracks[i],i=this._getAdditiveTrack(i),s=o.keyframes;o.prepare(i),o.needsAnimate()?a.push(o):o.interpolable||(i=s[s.length-1])&&(r._target[o.propName]=i.value)}return a.length||e?(e=new Ke({life:this._maxTime,loop:this._loop,delay:this._delay,onframe:function(t){r._started=2;var e=r._additiveAnimators;if(e){for(var n=!1,i=0;i<e.length;i++)if(e[i]._clip){n=!0;break}n||(r._additiveAnimators=null)}for(i=0;i<a.length;i++)a[i].step(r._target,t);var o=r._onframeList;if(o)for(i=0;i<o.length;i++)o[i](r._target,t)},ondestroy:function(){r._doneCallback()}}),this._clip=e,this.animation&&this.animation.addClip(e),t&&"spline"!==t&&(e.easing=t)):this._doneCallback(),this}},Vn.prototype.stop=function(t){var e;this._clip&&(e=this._clip,t&&e.onframe(1),this._abortedCallback())},Vn.prototype.delay=function(t){return this._delay=t,this},Vn.prototype.during=function(t){return t&&(this._onframeList||(this._onframeList=[]),this._onframeList.push(t)),this},Vn.prototype.done=function(t){return t&&(this._doneList||(this._doneList=[]),this._doneList.push(t)),this},Vn.prototype.aborted=function(t){return t&&(this._abortedList||(this._abortedList=[]),this._abortedList.push(t)),this},Vn.prototype.getClip=function(){return this._clip},Vn.prototype.getTrack=function(t){return this._tracks[t]},Vn.prototype.stopTracks=function(t,e){if(!t.length||!this._clip)return!0;for(var n=this._tracks,i=this._trackKeys,o=0;o<t.length;o++){var r=n[t[o]];r&&(e?r.step(this._target,1):1===this._started&&r.step(this._target,0),r.setFinished())}for(var a=!0,o=0;o<i.length;o++)if(!n[i[o]].isFinished()){a=!1;break}return a&&this._abortedCallback(),a},Vn.prototype.saveFinalToTarget=function(t,e){if(t){e=e||this._trackKeys;for(var n=0;n<e.length;n++){var i,o=e[n],r=this._tracks[o];r&&!r.isFinished()&&(i=(i=r.keyframes)[i.length-1])&&(i=Rn(i.value),r.isValueColor&&(i=Nn(i)),t[o]=i)}}},Vn.prototype.__changeFinalValue=function(t,e){e=e||lt(t);for(var n=0;n<e.length;n++){var i,o=e[n],r=this._tracks[o];r&&1<(i=r.keyframes).length&&(i=i.pop(),r.addKeyframe(i.time,t[o]),r.prepare(r.getAdditiveTrack()))}},Vn);function Vn(t,e,n){this._tracks={},this._trackKeys=[],this._delay=0,this._maxTime=0,this._paused=!1,this._started=0,this._clip=null,this._target=t,(this._loop=e)&&n?tt("Can' use additive animation on looped animation."):this._additiveAnimators=n}function Fn(t){this.keyframes=[],this.maxTime=0,this.arrDim=0,this.interpolable=!0,this._needsSort=!1,this._isAllValueEqual=!0,this._lastFrame=0,this._lastFramePercent=0,this.propName=t}Hn.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},Hn.prototype.clone=function(){return new Hn(this.x,this.y)},Hn.prototype.set=function(t,e){return this.x=t,this.y=e,this},Hn.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},Hn.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},Hn.prototype.scale=function(t){this.x*=t,this.y*=t},Hn.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},Hn.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},Hn.prototype.dot=function(t){return this.x*t.x+this.y*t.y},Hn.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},Hn.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},Hn.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},Hn.prototype.distance=function(t){var e=this.x-t.x,t=this.y-t.y;return Math.sqrt(e*e+t*t)},Hn.prototype.distanceSquare=function(t){var e=this.x-t.x,t=this.y-t.y;return e*e+t*t},Hn.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},Hn.prototype.transform=function(t){var e,n;if(t)return e=this.x,n=this.y,this.x=t[0]*e+t[2]*n+t[4],this.y=t[1]*e+t[3]*n+t[5],this},Hn.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},Hn.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},Hn.set=function(t,e,n){t.x=e,t.y=n},Hn.copy=function(t,e){t.x=e.x,t.y=e.y},Hn.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},Hn.lenSquare=function(t){return t.x*t.x+t.y*t.y},Hn.dot=function(t,e){return t.x*e.x+t.y*e.y},Hn.add=function(t,e,n){t.x=e.x+n.x,t.y=e.y+n.y},Hn.sub=function(t,e,n){t.x=e.x-n.x,t.y=e.y-n.y},Hn.scale=function(t,e,n){t.x=e.x*n,t.y=e.y*n},Hn.scaleAndAdd=function(t,e,n,i){t.x=e.x+n.x*i,t.y=e.y+n.y*i},Hn.lerp=function(t,e,n,i){var o=1-i;t.x=o*e.x+i*n.x,t.y=o*e.y+i*n.y};var E=Hn;function Hn(t,e){this.x=t||0,this.y=e||0}var Gn=Math.min,Wn=Math.max,Un=new E,Yn=new E,Xn=new E,Zn=new E,jn=new E,qn=new E,R=(Kn.prototype.union=function(t){var e=Gn(t.x,this.x),n=Gn(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Wn(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=Wn(t.y+t.height,this.y+this.height)-n:this.height=t.height,this.x=e,this.y=n},Kn.prototype.applyTransform=function(t){Kn.applyTransform(this,this,t)},Kn.prototype.calculateTransform=function(t){var e=t.width/this.width,n=t.height/this.height,i=Pe();return Ee(i,i,[-this.x,-this.y]),ze(i,i,[e,n]),Ee(i,i,[t.x,t.y]),i},Kn.prototype.intersect=function(t,e){if(!t)return!1;t instanceof Kn||(t=Kn.create(t));var n,i,o,r,a,s,l,u,h=this,c=h.x,p=h.x+h.width,d=h.y,h=h.y+h.height,f=t.x,g=t.x+t.width,y=t.y,t=t.y+t.height,m=!(p<f||g<c||h<y||t<d);return e&&(n=1/0,i=0,o=Math.abs(p-f),r=Math.abs(g-c),a=Math.abs(h-y),s=Math.abs(t-d),l=Math.min(o,r),u=Math.min(a,s),p<f||g<c?i<l&&(i=l,o<r?E.set(qn,-o,0):E.set(qn,r,0)):l<n&&(n=l,o<r?E.set(jn,o,0):E.set(jn,-r,0)),h<y||t<d?i<u&&(i=u,a<s?E.set(qn,0,-a):E.set(qn,0,s)):l<n&&(n=l,a<s?E.set(jn,0,a):E.set(jn,0,-s))),e&&E.copy(e,m?jn:qn),m},Kn.prototype.contain=function(t,e){var n=this;return t>=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},Kn.prototype.clone=function(){return new Kn(this.x,this.y,this.width,this.height)},Kn.prototype.copy=function(t){Kn.copy(this,t)},Kn.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},Kn.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},Kn.prototype.isZero=function(){return 0===this.width||0===this.height},Kn.create=function(t){return new Kn(t.x,t.y,t.width,t.height)},Kn.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},Kn.applyTransform=function(t,e,n){var i,o,r,a;n?n[1]<1e-5&&-1e-5<n[1]&&n[2]<1e-5&&-1e-5<n[2]?(i=n[0],o=n[3],r=n[4],a=n[5],t.x=e.x*i+r,t.y=e.y*o+a,t.width=e.width*i,t.height=e.height*o,t.width<0&&(t.x+=t.width,t.width=-t.width),t.height<0&&(t.y+=t.height,t.height=-t.height)):(Un.x=Xn.x=e.x,Un.y=Zn.y=e.y,Yn.x=Zn.x=e.x+e.width,Yn.y=Xn.y=e.y+e.height,Un.transform(n),Zn.transform(n),Yn.transform(n),Xn.transform(n),t.x=Gn(Un.x,Yn.x,Xn.x,Zn.x),t.y=Gn(Un.y,Yn.y,Xn.y,Zn.y),r=Wn(Un.x,Yn.x,Xn.x,Zn.x),a=Wn(Un.y,Yn.y,Xn.y,Zn.y),t.width=r-t.x,t.height=a-t.y):t!==e&&Kn.copy(t,e)},Kn);function Kn(t,e,n,i){n<0&&isFinite(n)&&(t+=n,n=-n),i<0&&isFinite(i)&&(e+=i,i=-i),this.x=t,this.y=e,this.width=n,this.height=i}var $n,Jn,Qn={},ti="12px sans-serif";var ei={measureText:function(t,e){return $n=$n||nt().getContext("2d"),Jn!==e&&(Jn=$n.font=e||ti),$n.measureText(t)}};function ni(t,e){var n=Qn[e=e||ti],i=(n=n||(Qn[e]=new en(500))).get(t);return null==i&&(i=ei.measureText(t,e).width,n.put(t,i)),i}function ii(t,e,n,i){t=ni(t,e),e=si(e),n=ri(0,t,n),i=ai(0,e,i);return new R(n,i,t,e)}function oi(t,e,n,i){var o=((t||"")+"").split("\n");if(1===o.length)return ii(o[0],e,n,i);for(var r=new R(0,0,0,0),a=0;a<o.length;a++){var s=ii(o[a],e,n,i);0===a?r.copy(s):r.union(s)}return r}function ri(t,e,n){return"right"===n?t-=e:"center"===n&&(t-=e/2),t}function ai(t,e,n){return"middle"===n?t-=e/2:"bottom"===n&&(t-=e),t}function si(t){return ni("国",t)}function li(t,e){return"string"==typeof t?0<=t.lastIndexOf("%")?parseFloat(t)/100*e:parseFloat(t):t}function ui(t,e,n){var i=e.position||"inside",o=null!=e.distance?e.distance:5,r=n.height,a=n.width,s=r/2,l=n.x,u=n.y,h="left",c="top";if(i instanceof Array)l+=li(i[0],n.width),u+=li(i[1],n.height),c=h=null;else switch(i){case"left":l-=o,u+=s,h="right",c="middle";break;case"right":l+=o+a,u+=s,c="middle";break;case"top":l+=a/2,u-=o,h="center",c="bottom";break;case"bottom":l+=a/2,u+=r+o,h="center";break;case"inside":l+=a/2,u+=s,h="center",c="middle";break;case"insideLeft":l+=o,u+=s,c="middle";break;case"insideRight":l+=a-o,u+=s,h="right",c="middle";break;case"insideTop":l+=a/2,u+=o,h="center";break;case"insideBottom":l+=a/2,u+=r-o,h="center",c="bottom";break;case"insideTopLeft":l+=o,u+=o;break;case"insideTopRight":l+=a-o,u+=o,h="right";break;case"insideBottomLeft":l+=o,u+=r-o,c="bottom";break;case"insideBottomRight":l+=a-o,u+=r-o,h="right",c="bottom"}return(t=t||{}).x=l,t.y=u,t.align=h,t.verticalAlign=c,t}var hi,ci,pi=1,di=pi="undefined"!=typeof window?Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1):pi,fi="#333",gi="#ccc",yi="__zr_normal__",mi=["x","y","scaleX","scaleY","originX","originY","rotation","ignore"],vi={x:!0,y:!0,scaleX:!0,scaleY:!0,originX:!0,originY:!0,rotation:!0,ignore:!1},_i={},xi=new R(0,0,0,0),bi=(d.prototype._init=function(t){this.attr(t)},d.prototype.drift=function(t,e,n){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var i=this.transform;(i=i||(this.transform=[1,0,0,1,0,0]))[4]+=t,i[5]+=e,this.decomposeTransform(),this.markRedraw()},d.prototype.beforeUpdate=function(){},d.prototype.afterUpdate=function(){},d.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},d.prototype.updateInnerText=function(t){var e,n,i,o,r,a,s,l,u,h,c=this._textContent;!c||c.ignore&&!t||(this.textConfig||(this.textConfig={}),l=(t=this.textConfig).local,i=n=void 0,o=!1,(e=c.attachedTransform).parent=l?this:null,h=!1,e.x=c.x,e.y=c.y,e.originX=c.originX,e.originY=c.originY,e.rotation=c.rotation,e.scaleX=c.scaleX,e.scaleY=c.scaleY,null!=t.position&&(u=xi,t.layoutRect?u.copy(t.layoutRect):u.copy(this.getBoundingRect()),l||u.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(_i,t,u):ui(_i,t,u),e.x=_i.x,e.y=_i.y,n=_i.align,i=_i.verticalAlign,r=t.origin)&&null!=t.rotation&&(s=a=void 0,s="center"===r?(a=.5*u.width,.5*u.height):(a=li(r[0],u.width),li(r[1],u.height)),h=!0,e.originX=-e.x+a+(l?0:u.x),e.originY=-e.y+s+(l?0:u.y)),null!=t.rotation&&(e.rotation=t.rotation),(r=t.offset)&&(e.x+=r[0],e.y+=r[1],h||(e.originX=-r[0],e.originY=-r[1])),a=null==t.inside?"string"==typeof t.position&&0<=t.position.indexOf("inside"):t.inside,s=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),h=u=l=void 0,a&&this.canBeInsideText()?(l=t.insideFill,u=t.insideStroke,null!=l&&"auto"!==l||(l=this.getInsideTextFill()),null!=u&&"auto"!==u||(u=this.getInsideTextStroke(l),h=!0)):(l=t.outsideFill,u=t.outsideStroke,null!=l&&"auto"!==l||(l=this.getOutsideFill()),null!=u&&"auto"!==u||(u=this.getOutsideStroke(l),h=!0)),(l=l||"#000")===s.fill&&u===s.stroke&&h===s.autoStroke&&n===s.align&&i===s.verticalAlign||(o=!0,s.fill=l,s.stroke=u,s.autoStroke=h,s.align=n,s.verticalAlign=i,c.setDefaultTextStyle(s)),o&&c.dirtyStyle(),c.markRedraw())},d.prototype.canBeInsideText=function(){return!0},d.prototype.getInsideTextFill=function(){return"#fff"},d.prototype.getInsideTextStroke=function(t){return"#000"},d.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?gi:fi},d.prototype.getOutsideStroke=function(t){for(var e=this.__zr&&this.__zr.getBackgroundColor(),n="string"==typeof e&&yn(e),i=(n=n||[255,255,255,1])[3],o=this.__zr.isDarkMode(),r=0;r<3;r++)n[r]=n[r]*i+(o?0:255)*(1-i);return n[3]=1,Sn(n,"rgba")},d.prototype.traverse=function(t,e){},d.prototype.attrKV=function(t,e){"textConfig"===t?this.setTextConfig(e):"textContent"===t?this.setTextContent(e):"clipPath"===t?this.setClipPath(e):"extra"===t?(this.extra=this.extra||{},I(this.extra,e)):this[t]=e},d.prototype.hide=function(){this.ignore=!0,this.markRedraw()},d.prototype.show=function(){this.ignore=!1,this.markRedraw()},d.prototype.attr=function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(k(t))for(var n=lt(t),i=0;i<n.length;i++){var o=n[i];this.attrKV(o,t[o])}return this.markRedraw(),this},d.prototype.saveCurrentToNormalState=function(t){this._innerSaveToNormal(t);for(var e=this._normalState,n=0;n<this.animators.length;n++){var i=this.animators[n],o=i.__fromStateTransition;o&&o!==yi||(o=(o=i.targetName)?e[o]:e,i.saveFinalToTarget(o))}},d.prototype._innerSaveToNormal=function(t){var e=(e=this._normalState)||(this._normalState={});t.textConfig&&!e.textConfig&&(e.textConfig=this.textConfig),this._savePrimaryToNormal(t,e,mi)},d.prototype._savePrimaryToNormal=function(t,e,n){for(var i=0;i<n.length;i++){var o=n[i];null==t[o]||o in e||(e[o]=this[o])}},d.prototype.hasState=function(){return 0<this.currentStates.length},d.prototype.getState=function(t){return this.states[t]},d.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},d.prototype.clearStates=function(t){this.useState(yi,!1,t)},d.prototype.useState=function(t,e,n){var i=t===yi;if(this.hasState()||!i){var o,r=this.currentStates,a=this.stateTransition;if(!(0<=A(r,t))||!e&&1!==r.length){if((o=(o=this.stateProxy&&!i?this.stateProxy(t):o)||this.states&&this.states[t])||i)return i||this.saveCurrentToNormalState(o),(r=!(!o||!o.hoverLayer))&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,o,this._normalState,e,!n&&!this.__inHover&&a&&0<a.duration,a),this._textContent&&this._textContent.useState(t,e),this._textGuide&&this._textGuide.useState(t,e),i?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!r&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~d.REDARAW_BIT),o;tt("State "+t+" not exists.")}}},d.prototype.useStates=function(t,e){if(t.length){var n=[],i=this.currentStates,o=t.length,r=o===i.length;if(r)for(var a=0;a<o;a++)if(t[a]!==i[a]){r=!1;break}if(!r){for(a=0;a<o;a++){var s=t[a],l=void 0;(l=(l=this.stateProxy?this.stateProxy(s,t):l)||this.states[s])&&n.push(l)}var u=!(!n[o-1]||!n[o-1].hoverLayer),h=(u&&this._toggleHoverLayerFlag(!0),this._mergeStates(n)),c=this.stateTransition;this.saveCurrentToNormalState(h),this._applyStateObj(t.join(","),h,this._normalState,!1,!e&&!this.__inHover&&c&&0<c.duration,c),this._textContent&&this._textContent.useStates(t),this._textGuide&&this._textGuide.useStates(t),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!u&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~d.REDARAW_BIT)}}else this.clearStates()},d.prototype._updateAnimationTargets=function(){for(var t=0;t<this.animators.length;t++){var e=this.animators[t];e.targetName&&e.changeTarget(this[e.targetName])}},d.prototype.removeState=function(t){var e,t=A(this.currentStates,t);0<=t&&((e=this.currentStates.slice()).splice(t,1),this.useStates(e))},d.prototype.replaceState=function(t,e,n){var i=this.currentStates.slice(),t=A(i,t),o=0<=A(i,e);0<=t?o?i.splice(t,1):i[t]=e:n&&!o&&i.push(e),this.useStates(i)},d.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},d.prototype._mergeStates=function(t){for(var e,n={},i=0;i<t.length;i++){var o=t[i];I(n,o),o.textConfig&&I(e=e||{},o.textConfig)}return e&&(n.textConfig=e),n},d.prototype._applyStateObj=function(t,e,n,i,o,r){var a=!(e&&i);e&&e.textConfig?(this.textConfig=I({},(i?this:n).textConfig),I(this.textConfig,e.textConfig)):a&&n.textConfig&&(this.textConfig=n.textConfig);for(var s={},l=!1,u=0;u<mi.length;u++){var h=mi[u],c=o&&vi[h];e&&null!=e[h]?c?(l=!0,s[h]=e[h]):this[h]=e[h]:a&&null!=n[h]&&(c?(l=!0,s[h]=n[h]):this[h]=n[h])}if(!o)for(u=0;u<this.animators.length;u++){var p=this.animators[u],d=p.targetName;p.__changeFinalValue(d?(e||n)[d]:e||n)}l&&this._transitionState(t,s,r)},d.prototype._attachComponent=function(t){if(t.__zr&&!t.__hostTarget)throw new Error("Text element has been added to zrender.");if(t===this)throw new Error("Recursive component attachment.");var e=this.__zr;e&&t.addSelfToZr(e),t.__zr=e,t.__hostTarget=this},d.prototype._detachComponent=function(t){t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__hostTarget=null},d.prototype.getClipPath=function(){return this._clipPath},d.prototype.setClipPath=function(t){this._clipPath&&this._clipPath!==t&&this.removeClipPath(),this._attachComponent(t),this._clipPath=t,this.markRedraw()},d.prototype.removeClipPath=function(){var t=this._clipPath;t&&(this._detachComponent(t),this._clipPath=null,this.markRedraw())},d.prototype.getTextContent=function(){return this._textContent},d.prototype.setTextContent=function(t){var e=this._textContent;if(e!==t){if(e&&e!==t&&this.removeTextContent(),t.__zr&&!t.__hostTarget)throw new Error("Text element has been added to zrender.");t.attachedTransform=new Ze,this._attachComponent(t),this._textContent=t,this.markRedraw()}},d.prototype.setTextConfig=function(t){this.textConfig||(this.textConfig={}),I(this.textConfig,t),this.markRedraw()},d.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},d.prototype.removeTextContent=function(){var t=this._textContent;t&&(t.attachedTransform=null,this._detachComponent(t),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},d.prototype.getTextGuideLine=function(){return this._textGuide},d.prototype.setTextGuideLine=function(t){this._textGuide&&this._textGuide!==t&&this.removeTextGuideLine(),this._attachComponent(t),this._textGuide=t,this.markRedraw()},d.prototype.removeTextGuideLine=function(){var t=this._textGuide;t&&(this._detachComponent(t),this._textGuide=null,this.markRedraw())},d.prototype.markRedraw=function(){this.__dirty|=d.REDARAW_BIT;var t=this.__zr;t&&(this.__inHover?t.refreshHover():t.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},d.prototype.dirty=function(){this.markRedraw()},d.prototype._toggleHoverLayerFlag=function(t){this.__inHover=t;var e=this._textContent,n=this._textGuide;e&&(e.__inHover=t),n&&(n.__inHover=t)},d.prototype.addSelfToZr=function(t){this.__zr=t;var e=this.animators;if(e)for(var n=0;n<e.length;n++)t.animation.addAnimator(e[n]);this._clipPath&&this._clipPath.addSelfToZr(t),this._textContent&&this._textContent.addSelfToZr(t),this._textGuide&&this._textGuide.addSelfToZr(t)},d.prototype.removeSelfFromZr=function(t){this.__zr=null;var e=this.animators;if(e)for(var n=0;n<e.length;n++)t.animation.removeAnimator(e[n]);this._clipPath&&this._clipPath.removeSelfFromZr(t),this._textContent&&this._textContent.removeSelfFromZr(t),this._textGuide&&this._textGuide.removeSelfFromZr(t)},d.prototype.animate=function(t,e){var n=t?this[t]:this;if(n)return n=new zn(n,e),this.addAnimator(n,t),n;tt('Property "'+t+'" is not existed in element '+this.id)},d.prototype.addAnimator=function(n,t){var e=this.__zr,i=this;n.during(function(){i.updateDuringAnimation(t)}).done(function(){var t=i.animators,e=A(t,n);0<=e&&t.splice(e,1)}),this.animators.push(n),e&&e.animation.addAnimator(n),e&&e.wakeUp()},d.prototype.updateDuringAnimation=function(t){this.markRedraw()},d.prototype.stopAnimation=function(t,e){for(var n=this.animators,i=n.length,o=[],r=0;r<i;r++){var a=n[r];t&&t!==a.scope?o.push(a):a.stop(e)}return this.animators=o,this},d.prototype.animateTo=function(t,e,n){Mi(this,t,e,n)},d.prototype.animateFrom=function(t,e,n){Mi(this,t,e,n,!0)},d.prototype._transitionState=function(t,e,n,i){for(var o=Mi(this,e,n,i),r=0;r<o.length;r++)o[r].__fromStateTransition=t},d.prototype.getBoundingRect=function(){return null},d.prototype.getPaintRect=function(){return null},d.REDARAW_BIT=1,d.initDefaultProps=((hi=d.prototype).type="element",hi.name="",hi.ignore=!1,hi.silent=!1,hi.isGroup=!1,hi.draggable=!1,hi.dragging=!1,hi.ignoreClip=!1,hi.__inHover=!1,hi.__dirty=d.REDARAW_BIT,ci={},void(Object.defineProperty&&(!w.browser.ie||8<w.browser.version)&&(Si("position","_legacyPos","x","y"),Si("scale","_legacyScale","scaleX","scaleY"),Si("origin","_legacyOrigin","originX","originY")))),d);function d(t){this.id=J++,this.animators=[],this.currentStates=[],this.states={},this._init(t)}function wi(t,e,n){ci[t+e+n]||(console.warn("DEPRECATED: '"+t+"' has been deprecated. use '"+e+"', '"+n+"' instead"),ci[t+e+n]=!0)}function Si(e,n,i,o){function r(e,t){Object.defineProperty(t,0,{get:function(){return e[i]},set:function(t){e[i]=t}}),Object.defineProperty(t,1,{get:function(){return e[o]},set:function(t){e[o]=t}})}Object.defineProperty(hi,e,{get:function(){return wi(e,i,o),this[n]||r(this,this[n]=[]),this[n]},set:function(t){wi(e,i,o),this[i]=t[0],this[o]=t[1],this[n]=t,r(this,t)}})}function Mi(t,e,n,i,o){function r(){u=!0,--l<=0&&(u?h&&h():c&&c())}function a(){--l<=0&&(u?h&&h():c&&c())}var s=[],l=(!function t(e,n,i,o,r,a,s,l){for(var u=[],h=[],c=lt(o),p=r.duration,d=r.delay,f=r.additive,g=r.setToFinal,y=!k(a),m=0;m<c.length;m++)null!=i[S=c[m]]&&null!=o[S]&&(y||a[S])?k(o[S])&&!rt(o[S])?n?l||(i[S]=o[S],e.updateDuringAnimation(n)):t(e,S,i[S],o[S],r,a&&a[S],s,l):(u.push(S),h.push(S)):l||(i[S]=o[S],e.updateDuringAnimation(n),h.push(S));var v=u.length;if(0<v||r.force&&!s.length){for(var _,x=e.animators,b=[],w=0;w<x.length;w++)x[w].targetName===n&&b.push(x[w]);if(!f&&b.length)for(w=0;w<b.length;w++)b[w].stopTracks(h)&&(_=A(x,b[w]),x.splice(_,1));var S,M=void 0,T=void 0,C=void 0;if(l)for(T={},g&&(M={}),w=0;w<v;w++)T[S=u[w]]=i[S],g?M[S]=o[S]:i[S]=o[S];else if(g)for(C={},w=0;w<v;w++)C[S=u[w]]=Rn(i[S]),Ci(i,o,S);f=new zn(i,!1,f?b:null);f.targetName=n,r.scope&&(f.scope=r.scope),g&&M&&f.whenWithKeys(0,M,u),C&&f.whenWithKeys(0,C,u),f.whenWithKeys(null==p?500:p,l?T:o,u).delay(d||0),e.addAnimator(f,n),s.push(f)}}(t,"",t,e,n=n||{},i,s,o),s.length),u=!1,h=n.done,c=n.aborted;l||h&&h(),0<s.length&&n.during&&s[0].during(function(t,e){n.during(e)});for(var p=0;p<s.length;p++){var d=s[p];d.done(r),d.aborted(a),d.start(n.easing,n.force)}return s}function Ti(t,e,n){for(var i=0;i<n;i++)t[i]=e[i]}function Ci(t,e,n){if(rt(e[n]))if(rt(t[n])||(t[n]=[]),dt(e[n])){var i=e[n].length;t[n].length!==i&&(t[n]=new e[n].constructor(i),Ti(t[n],e[n],i))}else{var o=e[n],r=t[n],a=o.length;if(rt(o[0]))for(var s=o[0].length,l=0;l<a;l++)r[l]?Ti(r[l],o[l],s):r[l]=Array.prototype.slice.call(o[l]);else Ti(r,o,a);r.length=o.length}else t[n]=e[n]}ot(bi,Qt),ot(bi,Ze);var Ii=32,Ai=7;function Di(t,e,n,i){var o=e+1;if(o===n)return 1;if(i(t[o++],t[e])<0){for(;o<n&&i(t[o],t[o-1])<0;)o++;var r=t,a=e,s=o;for(s--;a<s;){var l=r[a];r[a++]=r[s],r[s--]=l}}else for(;o<n&&0<=i(t[o],t[o-1]);)o++;return o-e}function ki(t,e,n,i,o){for(i===e&&i++;i<n;i++){for(var r,a=t[i],s=e,l=i;s<l;)o(a,t[r=s+l>>>1])<0?l=r:s=1+r;var u=i-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;0<u;)t[s+u]=t[s+u-1],u--}t[s]=a}}function Li(t,e,n,i,o,r){var a=0,s=0,l=1;if(0<r(t,e[n+o])){for(s=i-o;l<s&&0<r(t,e[n+o+l]);)(l=1+((a=l)<<1))<=0&&(l=s);s<l&&(l=s),a+=o,l+=o}else{for(s=o+1;l<s&&r(t,e[n+o-l])<=0;)(l=1+((a=l)<<1))<=0&&(l=s);i=a,a=o-(l=s<l?s:l),l=o-i}for(a++;a<l;){var u=a+(l-a>>>1);0<r(t,e[n+u])?a=u+1:l=u}return l}function Pi(t,e,n,i,o,r){var a=0,s=0,l=1;if(r(t,e[n+o])<0){for(s=o+1;l<s&&r(t,e[n+o-l])<0;)(l=1+((a=l)<<1))<=0&&(l=s);var u=a,a=o-(l=s<l?s:l),l=o-u}else{for(s=i-o;l<s&&0<=r(t,e[n+o+l]);)(l=1+((a=l)<<1))<=0&&(l=s);s<l&&(l=s),a+=o,l+=o}for(a++;a<l;){var h=a+(l-a>>>1);r(t,e[n+h])<0?l=h:a=h+1}return l}function Oi(t,e,n,i){var f,g,r,a,y,s,m,o=(i=i||t.length)-(n=n||0);if(!(o<2)){var l=0;if(o<Ii)ki(t,n,i,n+(l=Di(t,n,i,e)),e);else{g=e,y=Ai,s=0,(f=t).length,m=[],r=[],a=[];var u,h={mergeRuns:function(){for(;1<s;){var t=s-2;if(1<=t&&a[t-1]<=a[t]+a[t+1]||2<=t&&a[t-2]<=a[t]+a[t-1])a[t-1]<a[t+1]&&t--;else if(a[t]>a[t+1])break;p(t)}},forceMergeRuns:function(){for(;1<s;){var t=s-2;0<t&&a[t-1]<a[t+1]&&t--,p(t)}},pushRun:function(t,e){r[s]=t,a[s]=e,s+=1}},c=function(t){for(var e=0;Ii<=t;)e|=1&t,t>>=1;return t+e}(o);do{}while((l=Di(t,n,i,e))<c&&(ki(t,n,n+(u=c<(u=o)?c:o),n+l,e),l=u),h.pushRun(n,l),h.mergeRuns(),n+=l,0!==(o-=l));h.forceMergeRuns()}}function p(t){var e=r[t],n=a[t],i=r[t+1],o=a[t+1],t=(a[t]=n+o,t===s-3&&(r[t+1]=r[t+2],a[t+1]=a[t+2]),s--,Pi(f[i],f,e,n,0,g));e+=t,0!=(n-=t)&&0!==(o=Li(f[e+n-1],f,i,o,o-1,g))&&(n<=o?function(t,e,n,i){for(var o=0,o=0;o<e;o++)m[o]=f[t+o];var r=0,a=n,s=t;if(f[s++]=f[a++],0==--i)for(o=0;o<e;o++)f[s+o]=m[r+o];else{if(1===e){for(o=0;o<i;o++)f[s+o]=f[a+o];return f[s+i]=m[r]}for(var l,u,h,c=y;;){u=l=0,h=!1;do{if(g(f[a],m[r])<0){if(f[s++]=f[a++],u++,(l=0)==--i){h=!0;break}}else if(f[s++]=m[r++],l++,u=0,1==--e){h=!0;break}}while((l|u)<c);if(h)break;do{if(0!==(l=Pi(f[a],m,r,e,0,g))){for(o=0;o<l;o++)f[s+o]=m[r+o];if(s+=l,r+=l,(e-=l)<=1){h=!0;break}}if(f[s++]=f[a++],0==--i){h=!0;break}if(0!==(u=Li(m[r],f,a,i,0,g))){for(o=0;o<u;o++)f[s+o]=f[a+o];if(s+=u,a+=u,0==(i-=u)){h=!0;break}}if(f[s++]=m[r++],1==--e){h=!0;break}}while(c--,Ai<=l||Ai<=u);if(h)break;c<0&&(c=0),c+=2}if((y=c)<1&&(y=1),1===e){for(o=0;o<i;o++)f[s+o]=f[a+o];f[s+i]=m[r]}else{if(0===e)throw new Error;for(o=0;o<e;o++)f[s+o]=m[r+o]}}}:function(t,e,n,i){for(var o=0,o=0;o<i;o++)m[o]=f[n+o];var r=t+e-1,a=i-1,s=n+i-1,l=0,u=0;if(f[s--]=f[r--],0==--e)for(l=s-(i-1),o=0;o<i;o++)f[l+o]=m[o];else{if(1===i){for(u=1+(s-=e),l=1+(r-=e),o=e-1;0<=o;o--)f[u+o]=f[l+o];return f[s]=m[a]}for(var h=y;;){var c=0,p=0,d=!1;do{if(g(m[a],f[r])<0){if(f[s--]=f[r--],c++,(p=0)==--e){d=!0;break}}else if(f[s--]=m[a--],p++,c=0,1==--i){d=!0;break}}while((c|p)<h);if(d)break;do{if(0!=(c=e-Pi(m[a],f,t,e,e-1,g))){for(e-=c,u=1+(s-=c),l=1+(r-=c),o=c-1;0<=o;o--)f[u+o]=f[l+o];if(0===e){d=!0;break}}if(f[s--]=m[a--],1==--i){d=!0;break}if(0!=(p=i-Li(f[r],m,0,i,i-1,g))){for(i-=p,u=1+(s-=p),l=1+(a-=p),o=0;o<p;o++)f[u+o]=m[l+o];if(i<=1){d=!0;break}}if(f[s--]=f[r--],0==--e){d=!0;break}}while(h--,Ai<=c||Ai<=p);if(d)break;h<0&&(h=0),h+=2}if((y=h)<1&&(y=1),1===i){for(u=1+(s-=e),l=1+(r-=e),o=e-1;0<=o;o--)f[u+o]=f[l+o];f[s]=m[a]}else{if(0===i)throw new Error;for(l=s-(i-1),o=0;o<i;o++)f[l+o]=m[o]}}})(e,n,i,o)}}var Ri=!1;function Ni(){Ri||(Ri=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function Ei(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}zi.prototype.traverse=function(t,e){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(t,e)},zi.prototype.getDisplayList=function(t,e){e=e||!1;var n=this._displayList;return!t&&n.length||this.updateDisplayList(e),n},zi.prototype.updateDisplayList=function(t){this._displayListLen=0;for(var e=this._roots,n=this._displayList,i=0,o=e.length;i<o;i++)this._updateAndAddDisplayable(e[i],null,t);n.length=this._displayListLen,w.canvasSupported&&Oi(n,Ei)},zi.prototype._updateAndAddDisplayable=function(t,e,n){if(!t.ignore||n){t.beforeUpdate(),t.update(),t.afterUpdate();var i=t.getClipPath();if(t.ignoreClip)e=null;else if(i){e=e?e.slice():[];for(var o=i,r=t;o;)o.parent=r,o.updateTransform(),e.push(o),o=(r=o).getClipPath()}if(t.childrenRef){for(var a=t.childrenRef(),s=0;s<a.length;s++){var l=a[s];t.__dirty&&(l.__dirty|=bi.REDARAW_BIT),this._updateAndAddDisplayable(l,e,n)}t.__dirty=0}else{i=t;e&&e.length?i.__clipPaths=e:i.__clipPaths&&0<i.__clipPaths.length&&(i.__clipPaths=[]),isNaN(i.z)&&(Ni(),i.z=0),isNaN(i.z2)&&(Ni(),i.z2=0),isNaN(i.zlevel)&&(Ni(),i.zlevel=0),this._displayList[this._displayListLen++]=i}i=t.getDecalElement&&t.getDecalElement(),i=(i&&this._updateAndAddDisplayable(i,e,n),t.getTextGuideLine()),i=(i&&this._updateAndAddDisplayable(i,e,n),t.getTextContent());i&&this._updateAndAddDisplayable(i,e,n)}},zi.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},zi.prototype.delRoot=function(t){if(t instanceof Array)for(var e=0,n=t.length;e<n;e++)this.delRoot(t[e]);else{var i=A(this._roots,t);0<=i&&this._roots.splice(i,1)}},zi.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},zi.prototype.getRoots=function(){return this._roots},zi.prototype.dispose=function(){this._displayList=null,this._roots=null};var Bi=zi;function zi(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Ei}var Vi,Fi="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)},Hi=(u(Gi,Vi=Qt),Gi.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._clipsHead?((this._clipsTail.next=t).prev=this._clipsTail,t.next=null,this._clipsTail=t):this._clipsHead=this._clipsTail=t,t.animation=this},Gi.prototype.addAnimator=function(t){t.animation=this;t=t.getClip();t&&this.addClip(t)},Gi.prototype.removeClip=function(t){var e,n;t.animation&&(e=t.prev,n=t.next,e?e.next=n:this._clipsHead=n,n?n.prev=e:this._clipsTail=e,t.next=t.prev=t.animation=null)},Gi.prototype.removeAnimator=function(t){var e=t.getClip();e&&this.removeClip(e),t.animation=null},Gi.prototype.update=function(t){for(var e=(new Date).getTime()-this._pausedTime,n=e-this._time,i=this._clipsHead;i;)var o=i.next,i=(i.step(e,n)&&(i.ondestroy&&i.ondestroy(),this.removeClip(i)),o);this._time=e,t||(this.onframe(n),this.trigger("frame",n),this.stage.update&&this.stage.update())},Gi.prototype._startLoop=function(){var e=this;this._running=!0,Fi(function t(){e._running&&(Fi(t),!e._paused)&&e.update()})},Gi.prototype.start=function(){this._running||(this._time=(new Date).getTime(),this._pausedTime=0,this._startLoop())},Gi.prototype.stop=function(){this._running=!1},Gi.prototype.pause=function(){this._paused||(this._pauseStart=(new Date).getTime(),this._paused=!0)},Gi.prototype.resume=function(){this._paused&&(this._pausedTime+=(new Date).getTime()-this._pauseStart,this._paused=!1)},Gi.prototype.clear=function(){for(var t=this._clipsHead;t;){var e=t.next;t.prev=t.next=t.animation=null,t=e}this._clipsHead=this._clipsTail=null},Gi.prototype.isFinished=function(){return null==this._clipsHead},Gi.prototype.animate=function(t,e){e=e||{},this.start();t=new zn(t,e.loop);return this.addAnimator(t),t},Gi);function Gi(t){var e=Vi.call(this)||this;return e._running=!1,e._time=0,e._pausedTime=0,e._pauseStart=0,e._paused=!1,e.stage=(t=t||{}).stage||{},e.onframe=t.onframe||function(){},e}var Wi,Ui=w.domSupported,Yi=(Wi={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:pi=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:j(pi,function(t){var e=t.replace("mouse","pointer");return Wi.hasOwnProperty(e)?e:t})}),Xi=["mousemove","mouseup"],Zi=["pointermove","pointerup"],ji=!1;function qi(t){t=t.pointerType;return"pen"===t||"touch"===t}function Ki(t){t&&(t.zrByTouch=!0)}function $i(t,e){for(var n=e,i=!1;n&&9!==n.nodeType&&!(i=n.domBelongToZr||n!==e&&n===t.painterRoot);)n=n.parentNode;return i}var Ji=function(t,e){this.stopPropagation=Lt,this.stopImmediatePropagation=Lt,this.preventDefault=Lt,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY},Qi={mousedown:function(t){t=fe(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=fe(this.dom,t);var e=this.__mayPointerCapture;!e||t.zrX===e[0]&&t.zrY===e[1]||this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=fe(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){$i(this,(t=fe(this.dom,t)).toElement||t.relatedTarget)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){ji=!0,t=fe(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){ji||(t=fe(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){Ki(t=fe(this.dom,t)),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),Qi.mousemove.call(this,t),Qi.mousedown.call(this,t)},touchmove:function(t){Ki(t=fe(this.dom,t)),this.handler.processGesture(t,"change"),Qi.mousemove.call(this,t)},touchend:function(t){Ki(t=fe(this.dom,t)),this.handler.processGesture(t,"end"),Qi.mouseup.call(this,t),+new Date-+this.__lastTouchMoment<300&&Qi.click.call(this,t)},pointerdown:function(t){Qi.mousedown.call(this,t)},pointermove:function(t){qi(t)||Qi.mousemove.call(this,t)},pointerup:function(t){Qi.mouseup.call(this,t)},pointerout:function(t){qi(t)||Qi.mouseout.call(this,t)}},to=(N(["click","dblclick","contextmenu"],function(e){Qi[e]=function(t){t=fe(this.dom,t),this.trigger(e,t)}}),{pointermove:function(t){qi(t)||to.mousemove.call(this,t)},pointerup:function(t){to.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}});function eo(i,o){var r=o.domHandlers;w.pointerEventsSupported?N(Yi.pointer,function(e){io(o,e,function(t){r[e].call(i,t)})}):(w.touchEventsSupported&&N(Yi.touch,function(n){io(o,n,function(t){var e;r[n].call(i,t),(e=o).touching=!0,null!=e.touchTimer&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)})}),N(Yi.mouse,function(e){io(o,e,function(t){t=de(t),o.touching||r[e].call(i,t)})}))}function no(i,o){function t(n){io(o,n,function(t){var e;t=de(t),$i(i,t.target)||(e=t,t=fe(i.dom,new Ji(i,e),!0),o.domHandlers[n].call(i,t))},{capture:!0})}w.pointerEventsSupported?N(Zi,t):w.touchEventsSupported||N(Xi,t)}function io(t,e,n,i){t.mounted[e]=n,t.listenerOpts[e]=i,ge(t.domTarget,e,n,i)}function oo(t){var e,n,i,o,r,a=t.mounted;for(e in a)a.hasOwnProperty(e)&&(n=t.domTarget,i=e,o=a[e],r=t.listenerOpts[e],le?n.removeEventListener(i,o,r):n.detachEvent("on"+i,o));t.mounted={}}function ro(t,e){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=e}u(lo,ao=Qt),lo.prototype.dispose=function(){oo(this._localHandlerScope),Ui&&oo(this._globalHandlerScope)},lo.prototype.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},lo.prototype.__togglePointerCapture=function(t){var e;this.__mayPointerCapture=null,Ui&&+this.__pointerCapturing^+t&&(this.__pointerCapturing=t,e=this._globalHandlerScope,t?no(this,e):oo(e))};var ao,so=lo;function lo(t,e){var n=ao.call(this)||this;return n.__pointerCapturing=!1,n.dom=t,n.painterRoot=e,n._localHandlerScope=new ro(t,Qi),Ui&&(n._globalHandlerScope=new ro(document,to)),eo(n,n._localHandlerScope),n}u(ho,uo=bi),ho.prototype.childrenRef=function(){return this._children},ho.prototype.children=function(){return this._children.slice()},ho.prototype.childAt=function(t){return this._children[t]},ho.prototype.childOfName=function(t){for(var e=this._children,n=0;n<e.length;n++)if(e[n].name===t)return e[n]},ho.prototype.childCount=function(){return this._children.length},ho.prototype.add=function(t){if(t&&(t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),t.__hostTarget))throw"This elemenet has been used as an attachment";return this},ho.prototype.addBefore=function(t,e){var n;return t&&t!==this&&t.parent!==this&&e&&e.parent===this&&0<=(e=(n=this._children).indexOf(e))&&(n.splice(e,0,t),this._doAdd(t)),this},ho.prototype.replaceAt=function(t,e){var n=this._children,i=n[e];return t&&t!==this&&t.parent!==this&&t!==i&&(n[e]=t,i.parent=null,(n=this.__zr)&&i.removeSelfFromZr(n),this._doAdd(t)),this},ho.prototype._doAdd=function(t){t.parent&&t.parent.remove(t);var e=(t.parent=this).__zr;e&&e!==t.__zr&&t.addSelfToZr(e),e&&e.refresh()},ho.prototype.remove=function(t){var e=this.__zr,n=this._children,i=A(n,t);return i<0||(n.splice(i,1),t.parent=null,e&&t.removeSelfFromZr(e),e&&e.refresh()),this},ho.prototype.removeAll=function(){for(var t=this._children,e=this.__zr,n=0;n<t.length;n++){var i=t[n];e&&i.removeSelfFromZr(e),i.parent=null}return t.length=0,this},ho.prototype.eachChild=function(t,e){for(var n=this._children,i=0;i<n.length;i++){var o=n[i];t.call(e,o,i)}return this},ho.prototype.traverse=function(t,e){for(var n=0;n<this._children.length;n++){var i=this._children[n],o=t.call(e,i);i.isGroup&&!o&&i.traverse(t,e)}return this},ho.prototype.addSelfToZr=function(t){uo.prototype.addSelfToZr.call(this,t);for(var e=0;e<this._children.length;e++)this._children[e].addSelfToZr(t)},ho.prototype.removeSelfFromZr=function(t){uo.prototype.removeSelfFromZr.call(this,t);for(var e=0;e<this._children.length;e++)this._children[e].removeSelfFromZr(t)},ho.prototype.getBoundingRect=function(t){for(var e=new R(0,0,0,0),n=t||this._children,i=[],o=null,r=0;r<n.length;r++){var a,s=n[r];s.ignore||s.invisible||(a=s.getBoundingRect(),(s=s.getLocalTransform(i))?(R.applyTransform(e,a,s),(o=o||e.clone()).union(e)):(o=o||a.clone()).union(a))}return o||e};var uo,O=ho;function ho(t){var e=uo.call(this)||this;return e.isGroup=!0,e._children=[],e.attr(t),e}O.prototype.type="group";var co=!w.canvasSupported,po={},fo={};e.prototype.add=function(t){t&&(this.storage.addRoot(t),t.addSelfToZr(this),this.refresh())},e.prototype.remove=function(t){t&&(this.storage.delRoot(t),t.removeSelfFromZr(this),this.refresh())},e.prototype.configLayer=function(t,e){this.painter.configLayer&&this.painter.configLayer(t,e),this.refresh()},e.prototype.setBackgroundColor=function(t){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this.refresh(),this._backgroundColor=t,this._darkMode=function(t){if(t){if("string"==typeof t)return Mn(t,1)<.4;if(t.colorStops){for(var e=t.colorStops,n=0,i=e.length,o=0;o<i;o++)n+=Mn(e[o].color,1);return(n/=i)<.4}}return!1}(t)},e.prototype.getBackgroundColor=function(){return this._backgroundColor},e.prototype.setDarkMode=function(t){this._darkMode=t},e.prototype.isDarkMode=function(){return this._darkMode},e.prototype.refreshImmediately=function(t){t||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1},e.prototype.refresh=function(){this._needsRefresh=!0,this.animation.start()},e.prototype.flush=function(){this._flush(!1)},e.prototype._flush=function(t){var e,n=(new Date).getTime(),t=(this._needsRefresh&&(e=!0,this.refreshImmediately(t)),this._needsRefreshHover&&(e=!0,this.refreshHoverImmediately()),(new Date).getTime());e?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:t-n})):0<this._sleepAfterStill&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill)&&this.animation.stop()},e.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},e.prototype.wakeUp=function(){this.animation.start(),this._stillFrameAccum=0},e.prototype.addHover=function(t){},e.prototype.removeHover=function(t){},e.prototype.clearHover=function(){},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover()},e.prototype.resize=function(t){this.painter.resize((t=t||{}).width,t.height),this.handler.resize()},e.prototype.clearAnimation=function(){this.animation.clear()},e.prototype.getWidth=function(){return this.painter.getWidth()},e.prototype.getHeight=function(){return this.painter.getHeight()},e.prototype.pathToImage=function(t,e){if(this.painter.pathToImage)return this.painter.pathToImage(t,e)},e.prototype.setCursorStyle=function(t){this.handler.setCursorStyle(t)},e.prototype.findHover=function(t,e){return this.handler.findHover(t,e)},e.prototype.on=function(t,e,n){return this.handler.on(t,e,n),this},e.prototype.off=function(t,e){this.handler.off(t,e)},e.prototype.trigger=function(t,e){this.handler.trigger(t,e)},e.prototype.clear=function(){for(var t=this.storage.getRoots(),e=0;e<t.length;e++)t[e]instanceof O&&t[e].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()},e.prototype.dispose=function(){var t;this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,t=this.id,delete fo[t]};var go=e;function e(t,e,n){var i=this,o=(this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n=n||{},this.dom=e,this.id=t,new Bi),r=n.renderer||"canvas";if(co)throw new Error("IE8 support has been dropped since 5.0");if(po[r]||(r=lt(po)[0]),!po[r])throw new Error("Renderer '"+r+"' is not imported. Please import it first.");n.useDirtyRect=null!=n.useDirtyRect&&n.useDirtyRect;r=new po[r](e,o,n,t),this.storage=o,this.painter=r,e=w.node||w.worker?null:new so(r.getViewportRoot(),r.root);this.handler=new Ae(o,r,e,r.root),this.animation=new Hi({stage:{update:function(){return i._flush(!0)}}}),this.animation.start()}function yo(t,e){t=new go(J++,t,e);return fo[t.id]=t}function mo(t,e){po[t]=e}pi=Object.freeze({__proto__:null,dispose:function(t){t.dispose()},disposeAll:function(){for(var t in fo)fo.hasOwnProperty(t)&&fo[t].dispose();fo={}},getInstance:function(t){return fo[t]},init:yo,registerPainter:mo,version:"5.1.0"});function vo(t,e,n,i){var o=e[1]-e[0],r=n[1]-n[0];if(0==o)return 0==r?n[0]:(n[0]+n[1])/2;if(i)if(0<o){if(t<=e[0])return n[0];if(t>=e[1])return n[1]}else{if(t>=e[0])return n[0];if(t<=e[1])return n[1]}else{if(t===e[0])return n[0];if(t===e[1])return n[1]}return(t-e[0])/o*r+n[0]}function B(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?t.replace(/^\s+|\s+$/g,"").match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t}function _o(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),n?t:+t}function xo(t){return t.sort(function(t,e){return t-e}),t}function bo(t){if(t=+t,isNaN(t))return 0;for(var e=1,n=0;Math.round(t*e)/e!==t;)e*=10,n++;return n}function wo(t){var t=t.toString(),e=t.indexOf("e");return 0<e?(e=+t.slice(e+1))<0?-e:0:(e=t.indexOf("."))<0?0:t.length-1-e}function So(t,e){var n=Math.log,i=Math.LN10,t=Math.floor(n(t[1]-t[0])/i),n=Math.round(n(Math.abs(e[1]-e[0]))/i),e=Math.min(Math.max(-t+n,0),20);return isFinite(e)?e:20}function Mo(t,e,n){if(!t[e])return 0;var i=at(t,function(t,e){return t+(isNaN(e)?0:e)},0);if(0===i)return 0;for(var o=Math.pow(10,n),n=j(t,function(t){return(isNaN(t)?0:t)/i*o*100}),r=100*o,a=j(n,function(t){return Math.floor(t)}),s=at(a,function(t,e){return t+e},0),l=j(n,function(t,e){return t-a[e]});s<r;){for(var u=Number.NEGATIVE_INFINITY,h=null,c=0,p=l.length;c<p;++c)l[c]>u&&(u=l[c],h=c);++a[h],l[h]=0,++s}return a[e]/o}function To(t){var e=2*Math.PI;return(t%e+e)%e}function Co(t){return-1e-4<t&&t<1e-4}var Io=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function Ao(t){var e,n;return t instanceof Date?t:"string"==typeof t?(e=Io.exec(t))?e[8]?(n=+e[4]||0,"Z"!==e[8].toUpperCase()&&(n-=+e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,n,+(e[5]||0),+e[6]||0,+e[7]||0))):new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,+e[7]||0):new Date(NaN):null==t?new Date(NaN):new Date(Math.round(t))}function Do(t){return Math.pow(10,ko(t))}function ko(t){var e;return 0===t?0:(e=Math.floor(Math.log(t)/Math.LN10),10<=t/Math.pow(10,e)&&e++,e)}function Lo(t,e){var n=ko(t),i=Math.pow(10,n),o=t/i;return t=(e?o<1.5?1:o<2.5?2:o<4?3:o<7?5:10:o<1?1:o<2?2:o<3?3:o<5?5:10)*i,-20<=n?+t.toFixed(n<0?-n:0):t}function Po(t){var e=parseFloat(t);return e==t&&(0!==e||"string"!=typeof t||t.indexOf("x")<=0)?e:NaN}function Oo(t){return!isNaN(Po(t))}function Ro(){return Math.round(9*Math.random())}function No(t,e){return null==t?e:null==e?t:t*e/function t(e,n){return 0===n?e:t(n,e%n)}(t,e)}function f(t){throw new Error(t)}var Eo="series\0",Bo="\0_ec_\0";function zo(t){return t instanceof Array?t:null==t?[]:[t]}function Vo(t,e,n){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var i=0,o=n.length;i<o;i++){var r=n[i];!t.emphasis[e].hasOwnProperty(r)&&t[e].hasOwnProperty(r)&&(t.emphasis[e][r]=t[e][r])}}}var Fo=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"];function Ho(t){return!k(t)||F(t)||t instanceof Date?t:t.value}function Go(t,n,e){var a,i,o,r,s,l,u,h,c,p,d="normalMerge"===e,f="replaceMerge"===e,g="replaceAll"===e,y=(t=t||[],n=(n||[]).slice(),L()),e=(N(n,function(t,e){k(t)||(n[e]=null)}),function(t,e,n){var i=[];if("replaceAll"!==n)for(var o=0;o<t.length;o++){var r=t[o];r&&null!=r.id&&e.set(r.id,o),i.push({existing:"replaceMerge"===n||Zo(r)?null:r,newOption:null,keyInfo:null,brandNew:null})}return i}(t,y,e));return(d||f)&&(u=e,h=t,c=y,N(p=n,function(t,e){var n,i,o;t&&null!=t.id&&(n=Uo(t.id),null!=(i=c.get(n)))&&(St(!(o=u[i]).newOption,'Duplicated option on id "'+n+'".'),o.newOption=t,o.existing=h[i],p[e]=null)})),d&&(s=e,N(l=n,function(t,e){if(t&&null!=t.name)for(var n=0;n<s.length;n++){var i=s[n].existing;if(!s[n].newOption&&i&&(null==i.id||null==t.id)&&!Zo(t)&&!Zo(i)&&Wo("name",i,t))return s[n].newOption=t,void(l[e]=null)}})),d||f?(o=e,r=f,N(n,function(t){if(t){for(var e,n=0;(e=o[n])&&(e.newOption||Zo(e.existing)||e.existing&&null!=t.id&&!Wo("id",t,e.existing));)n++;e?(e.newOption=t,e.brandNew=r):o.push({newOption:t,brandNew:r,existing:null,keyInfo:null}),n++}})):g&&(i=e,N(n,function(t){i.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})})),t=e,a=L(),N(t,function(t){var e=t.existing;e&&a.set(e.id,t)}),N(t,function(t){var e=t.newOption;St(!e||null==e.id||!a.get(e.id)||a.get(e.id)===t,"id duplicates: "+(e&&e.id)),e&&null!=e.id&&a.set(e.id,t),t.keyInfo||(t.keyInfo={})}),N(t,function(t,e){var n=t.existing,i=t.newOption,o=t.keyInfo;if(k(i)){if(o.name=null!=i.name?Uo(i.name):n?n.name:Eo+e,n)o.id=Uo(n.id);else if(null!=i.id)o.id=Uo(i.id);else for(var r=0;o.id="\0"+o.name+"\0"+r++,a.get(o.id););a.set(o.id,t)}}),e}function Wo(t,e,n){e=Yo(e[t],null),n=Yo(n[t],null);return null!=e&&null!=n&&e===n}function Uo(t){return Yo(t,"")}function Yo(t,e){var n;return null==t?e:"string"==(n=typeof t)?t:"number"==n||ht(t)?t+"":e}function Xo(t){t=t.name;return!(!t||!t.indexOf(Eo))}function Zo(t){return t&&null!=t.id&&0===Uo(t.id).indexOf(Bo)}function jo(t,o,r){N(t,function(t){var e,n,i=t.newOption;k(i)&&(t.keyInfo.mainType=o,t.keyInfo.subType=(e=o,i=i,t=t.existing,n=r,i.type||(t?t.subType:n.determineSubType(e,i))))})}function qo(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?F(t.dataIndex)?j(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex):null!=t.name?F(t.name)?j(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name):void 0}function Ko(){var e="__ec_inner_"+$o++;return function(t){return t[e]||(t[e]={})}}var $o=Ro();function Jo(n,t,i){var t=Qo(t,i),e=t.mainTypeSpecified,o=t.queryOptionMap,r=t.others,a=i?i.defaultMainType:null;return!e&&a&&o.set(a,{}),o.each(function(t,e){t=nr(n,e,t,{useDefault:a===e,enableAll:!i||null==i.enableAll||i.enableAll,enableNone:!i||null==i.enableNone||i.enableNone});r[e+"Models"]=t.models,r[e+"Model"]=t.models[0]}),r}function Qo(t,o){var e=D(t)?((e={})[t+"Index"]=0,e):t,r=L(),a={},s=!1;return N(e,function(t,e){var n,i;"dataIndex"!==e&&"dataIndexInside"!==e?(n=(i=e.match(/^(\w+)(Index|Id|Name)$/)||[])[1],i=(i[2]||"").toLowerCase(),!n||!i||o&&o.includeMainTypes&&A(o.includeMainTypes,n)<0||(s=s||!!n,(r.get(n)||r.set(n,{}))[i]=t)):a[e]=t}),{mainTypeSpecified:s,queryOptionMap:r,others:a}}var tr={useDefault:!0,enableAll:!1,enableNone:!1},er={useDefault:!1,enableAll:!0,enableNone:!0};function nr(t,e,n,i){i=i||tr;var o=n.index,r=n.id,n=n.name,a={models:null,specified:null!=o||null!=r||null!=n};return a.specified?"none"===o||!1===o?(St(i.enableNone,'`"none"` or `false` is not a valid value on index option.'),a.models=[]):("all"===o&&(St(i.enableAll,'`"all"` is not a valid value on index option.'),o=r=n=null),a.models=t.queryComponents({mainType:e,index:o,id:r,name:n})):(o=void 0,a.models=i.useDefault&&(o=t.getComponent(e))?[o]:[]),a}function ir(t,e,n){t.setAttribute?t.setAttribute(e,n):t[e]=n}function or(t,e,n,i,o){var r=null==e||"auto"===e;if(null==i)return i;if("number"==typeof i)return _o(l=In(n||0,i,o),r?Math.max(wo(n||0),wo(i)):e);if("string"==typeof i)return o<1?n:i;for(var a,s,l,u=[],h=n,c=i,p=Math.max(h?h.length:0,c.length),d=0;d<p;++d)"ordinal"===t.getDimensionInfo(d).type?u[d]=(o<1&&h?h:c)[d]:(l=In(a=h&&h[d]?h[d]:0,s=c[d],o),u[d]=_o(l,r?Math.max(wo(a),wo(s)):e));return u}var rr=".",ar="___EC__COMPONENT__CONTAINER___",sr="___EC__EXTENDED_CLASS___";function lr(t){var e={main:"",sub:""};return t&&(t=t.split(rr),e.main=t[0]||"",e.sub=t[1]||""),e}function ur(t){(t.$constructor=t).extend=function(i){var o=this;function r(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(i.$constructor)i.$constructor.apply(this,arguments);else{if("function"==typeof(t=o)&&/^class\s/.test(Function.prototype.toString.call(t)))return kt(r.prototype,new(o.bind.apply(o,m([void 0],e))));o.apply(this,arguments)}}return r[sr]=!0,I(r.prototype,i),r.extend=this.extend,r.superCall=pr,r.superApply=dr,it(r,this),r.superClass=o,r}}function hr(t,e){t.extend=e.extend}var cr=Math.round(10*Math.random());function pr(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return this.superClass.prototype[e].apply(t,n)}function dr(t,e,n){return this.superClass.prototype[e].apply(t,n)}function fr(t){var o={};t.registerClass=function(t){var e,n=t.type||t.prototype.type;return n&&(St(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e=n),'componentType "'+e+'" illegal'),(e=lr(t.prototype.type=n)).sub?e.sub!==ar&&((n=o[e.main])&&n[ar]||((n=o[e.main]={})[ar]=!0),n[e.sub]=t):o[e.main]=t),t},t.getClass=function(t,e,n){var i=o[t];if(i&&i[ar]&&(i=e?i[e]:null),n&&!i)throw new Error(e?"Component "+t+"."+(e||"")+" is used but not imported.":t+".type should be specified.");return i},t.getClassesByMainType=function(t){var t=lr(t),n=[],t=o[t.main];return t&&t[ar]?N(t,function(t,e){e!==ar&&n.push(t)}):n.push(t),n},t.hasClass=function(t){t=lr(t);return!!o[t.main]},t.getAllClassMainTypes=function(){var n=[];return N(o,function(t,e){n.push(e)}),n},t.hasSubTypes=function(t){t=lr(t),t=o[t.main];return t&&t[ar]}}function gr(a,s){for(var t=0;t<a.length;t++)a[t][1]||(a[t][1]=a[t][0]);return s=s||!1,function(t,e,n){for(var i={},o=0;o<a.length;o++){var r=a[o][1];e&&0<=A(e,r)||n&&A(n,r)<0||null!=(r=t.getShallow(r,s))&&(i[a[o][0]]=r)}return i}}var yr=gr([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),mr=(vr.prototype.getAreaStyle=function(t,e){return yr(this,t,e)},vr);function vr(){}var _r=new en(50);function xr(t,e,n,i,o){return t?"string"==typeof t?(e&&e.__zrImageSrc===t||!n||(n={hostEl:n,cb:i,cbPayload:o},(i=_r.get(t))?wr(e=i.image)||i.pending.push(n):((e=new Image).onload=e.onerror=br,_r.put(t,e.__cachedImgObj={image:e,pending:[n]}),e.src=e.__zrImageSrc=t)),e):t:e}function br(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<t.pending.length;e++){var n=t.pending[e],i=n.cb;i&&i(this,n.cbPayload),n.hostEl.dirty()}t.pending.length=0}function wr(t){return t&&t.width&&t.height}var Sr=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function Mr(t,e,n,i,o){if(!e)return"";var r=(t+"").split("\n");o=Tr(e,n,i,o);for(var a=0,s=r.length;a<s;a++)r[a]=Cr(r[a],o);return r.join("\n")}function Tr(t,e,n,i){var o=I({},i=i||{}),r=(o.font=e,n=P(n,"..."),o.maxIterations=P(i.maxIterations,2),o.minChar=P(i.minChar,0)),a=(o.cnCharWidth=ni("国",e),o.ascCharWidth=ni("a",e));o.placeholder=P(i.placeholder,"");for(var s=t=Math.max(0,t-1),l=0;l<r&&a<=s;l++)s-=a;i=ni(n,e);return s<i&&(n="",i=0),s=t-i,o.ellipsis=n,o.ellipsisWidth=i,o.contentWidth=s,o.containerWidth=t,o}function Cr(t,e){var n=e.containerWidth,i=e.font,o=e.contentWidth;if(!n)return"";var r=ni(t,i);if(!(r<=n)){for(var a=0;;a++){if(r<=o||a>=e.maxIterations){t+=e.ellipsis;break}var s=0===a?function(t,e,n,i){for(var o=0,r=0,a=t.length;r<a&&o<e;r++){var s=t.charCodeAt(r);o+=0<=s&&s<=127?n:i}return r}(t,o,e.ascCharWidth,e.cnCharWidth):0<r?Math.floor(t.length*o/r):0,r=ni(t=t.substr(0,s),i)}""===t&&(t=e.placeholder)}return t}function Ir(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[]}var Ar=function(){},Dr=function(t){this.tokens=[],t&&(this.tokens=t)};function kr(t,e){var n=new Ir;if(null!=t&&(t+=""),t){for(var i,o=e.width,r=e.height,a=e.overflow,s="break"!==a&&"breakAll"!==a||null==o?null:{width:o,accumWidth:0,breakAll:"breakAll"===a},l=Sr.lastIndex=0;null!=(i=Sr.exec(t));){var u=i.index;l<u&&Lr(n,t.substring(l,u),e,s),Lr(n,i[2],e,s,i[1]),l=Sr.lastIndex}l<t.length&&Lr(n,t.substring(l,t.length),e,s);var h,c=[],p=0,d=0,f=e.padding,g="truncate"===a,y="truncate"===e.lineOverflow;t:for(var m=0;m<n.lines.length;m++){for(var v=n.lines[m],_=0,x=0,b=0;b<v.tokens.length;b++){var w=(D=v.tokens[b]).styleName&&e.rich[D.styleName]||{},S=D.textPadding=w.padding,M=S?S[1]+S[3]:0,T=D.font=w.font||e.font,C=(D.contentHeight=si(T),P(w.height,D.contentHeight));if(D.innerHeight=C,S&&(C+=S[0]+S[2]),D.height=C,D.lineHeight=xt(w.lineHeight,e.lineHeight,C),D.align=w&&w.align||e.align,D.verticalAlign=w&&w.verticalAlign||"middle",y&&null!=r&&p+D.lineHeight>r){0<b?(v.tokens=v.tokens.slice(0,b),L(v,x,_),n.lines=n.lines.slice(0,m+1)):n.lines=n.lines.slice(0,m);break t}var I,S=w.width,A=null==S||"auto"===S;"string"==typeof S&&"%"===S.charAt(S.length-1)?(D.percentWidth=S,c.push(D),D.contentWidth=ni(D.text,T)):(A&&(S=(S=w.backgroundColor)&&S.image)&&(I=void 0,wr(S="string"==typeof(h=S)?(I=_r.get(h))&&I.image:h))&&(D.width=Math.max(D.width,S.width*C/S.height)),null!=(I=g&&null!=o?o-x:null)&&I<D.width?!A||I<M?(D.text="",D.width=D.contentWidth=0):(D.text=Mr(D.text,I-M,T,e.ellipsis,{minChar:e.truncateMinChar}),D.width=D.contentWidth=ni(D.text,T)):D.contentWidth=ni(D.text,T)),D.width+=M,x+=D.width,w&&(_=Math.max(_,D.lineHeight))}L(v,x,_)}for(n.outerWidth=n.width=P(o,d),n.outerHeight=n.height=P(r,p),n.contentHeight=p,n.contentWidth=d,f&&(n.outerWidth+=f[1]+f[3],n.outerHeight+=f[0]+f[2]),m=0;m<c.length;m++){var D,k=(D=c[m]).percentWidth;D.width=parseInt(k,10)/100*n.width}}return n;function L(t,e,n){t.width=e,t.lineHeight=n,p+=n,d=Math.max(d,e)}}function Lr(t,e,n,i,o){var r,a,s=""===e,l=o&&n.rich[o]||{},u=t.lines,h=l.font||n.font,c=!1;i?(n=(t=l.padding)?t[1]+t[3]:0,null!=l.width&&"auto"!==l.width?(t=li(l.width,i.width)+n,0<u.length&&t+i.accumWidth>i.width&&(r=e.split("\n"),c=!0),i.accumWidth=t):(t=Or(e,h,i.width,i.breakAll,i.accumWidth),i.accumWidth=t.accumWidth+n,a=t.linesWidths,r=t.lines)):r=e.split("\n");for(var p=0;p<r.length;p++){var d,f,g=r[p],y=new Ar;y.styleName=o,y.text=g,y.isLineHolder=!g&&!s,"number"==typeof l.width?y.width=l.width:y.width=a?a[p]:ni(g,h),p||c?u.push(new Dr([y])):1===(f=(d=(u[u.length-1]||(u[0]=new Dr)).tokens).length)&&d[0].isLineHolder?d[0]=y:!g&&f&&!s||d.push(y)}}var Pr=at(",&?/;] ".split(""),function(t,e){return t[e]=!0,t},{});function Or(t,e,n,i,o){for(var r,a=[],s=[],l="",u="",h=0,c=0,p=0;p<t.length;p++){var d,f,g=t.charAt(p);"\n"!==g?(d=ni(g,e),f=!(i||(f=void 0,!(33<=(f=(f=r=g).charCodeAt(0))&&f<=255))||Pr[r]),(a.length?n<c+d:n<o+c+d)?c?(l||u)&&(c=f?(l||(l=u,u="",c=h=0),a.push(l),s.push(c-h),u+=g,l="",h+=d):(u&&(l+=u,c+=h,u="",h=0),a.push(l),s.push(c),l=g,d)):f?(a.push(u),s.push(h),u=g,h=d):(a.push(g),s.push(d)):(c+=d,f?(u+=g,h+=d):(u&&(l+=u,u="",h=0),l+=g))):(u&&(l+=u,c+=h),a.push(l),s.push(c),u=l="",c=h=0)}return a.length||l||(l=t,u="",h=0),u&&(l+=u),l&&(a.push(l),s.push(c)),1===a.length&&(c+=o),{accumWidth:c,lines:a,linesWidths:s}}var Rr,Nr="__zr_style_"+Math.round(10*Math.random()),Er={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Br={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}},zr=(Er[Nr]=!0,["z","z2","invisible"]),n=(u(i,Rr=bi),i.prototype._init=function(t){for(var e=lt(t),n=0;n<e.length;n++){var i=e[n];"style"===i?this.useStyle(t[i]):Rr.prototype.attrKV.call(this,i,t[i])}this.style||this.useStyle({})},i.prototype.beforeBrush=function(){},i.prototype.afterBrush=function(){},i.prototype.innerBeforeBrush=function(){},i.prototype.innerAfterBrush=function(){},i.prototype.shouldBePainted=function(t,e,n,i){var o,r=this.transform;if(this.ignore||this.invisible||0===this.style.opacity||this.culling&&(o=this,t=t,e=e,Vr.copy(o.getBoundingRect()),o.transform&&Vr.applyTransform(o.transform),Fr.width=t,Fr.height=e,!Vr.intersect(Fr))||r&&!r[0]&&!r[3])return!1;if(n&&this.__clipPaths)for(var a=0;a<this.__clipPaths.length;++a)if(this.__clipPaths[a].isZeroArea())return!1;if(i&&this.parent)for(var s=this.parent;s;){if(s.ignore)return!1;s=s.parent}return!0},i.prototype.contain=function(t,e){return this.rectContain(t,e)},i.prototype.traverse=function(t,e){t.call(e,this)},i.prototype.rectContain=function(t,e){t=this.transformCoordToLocal(t,e);return this.getBoundingRect().contain(t[0],t[1])},i.prototype.getPaintRect=function(){var t,e,n,i,o,r=this._paintRect;return this._paintRect&&!this.__dirty||(o=this.transform,t=this.getBoundingRect(),e=(i=this.style).shadowBlur||0,n=i.shadowOffsetX||0,i=i.shadowOffsetY||0,r=this._paintRect||(this._paintRect=new R(0,0,0,0)),o?R.applyTransform(r,t,o):r.copy(t),(e||n||i)&&(r.width+=2*e+Math.abs(n),r.height+=2*e+Math.abs(i),r.x=Math.min(r.x,r.x+n-e),r.y=Math.min(r.y,r.y+i-e)),o=this.dirtyRectTolerance,r.isZero())||(r.x=Math.floor(r.x-o),r.y=Math.floor(r.y-o),r.width=Math.ceil(r.width+1+2*o),r.height=Math.ceil(r.height+1+2*o)),r},i.prototype.setPrevPaintRect=function(t){t?(this._prevPaintRect=this._prevPaintRect||new R(0,0,0,0),this._prevPaintRect.copy(t)):this._prevPaintRect=null},i.prototype.getPrevPaintRect=function(){return this._prevPaintRect},i.prototype.animateStyle=function(t){return this.animate("style",t)},i.prototype.updateDuringAnimation=function(t){"style"===t?this.dirtyStyle():this.markRedraw()},i.prototype.attrKV=function(t,e){"style"!==t?Rr.prototype.attrKV.call(this,t,e):this.style?this.setStyle(e):this.useStyle(e)},i.prototype.setStyle=function(t,e){return"string"==typeof t?this.style[t]=e:I(this.style,t),this.dirtyStyle(),this},i.prototype.dirtyStyle=function(){this.markRedraw(),this.__dirty|=i.STYLE_CHANGED_BIT,this._rect&&(this._rect=null)},i.prototype.dirty=function(){this.dirtyStyle()},i.prototype.styleChanged=function(){return!!(this.__dirty&i.STYLE_CHANGED_BIT)},i.prototype.styleUpdated=function(){this.__dirty&=~i.STYLE_CHANGED_BIT},i.prototype.createStyle=function(t){return kt(Er,t)},i.prototype.useStyle=function(t){t[Nr]||(t=this.createStyle(t)),this.__inHover?this.__hoverStyle=t:this.style=t,this.dirtyStyle()},i.prototype.isStyleObject=function(t){return t[Nr]},i.prototype._innerSaveToNormal=function(t){Rr.prototype._innerSaveToNormal.call(this,t);var e=this._normalState;t.style&&!e.style&&(e.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(t,e,zr)},i.prototype._applyStateObj=function(t,e,n,i,o,r){Rr.prototype._applyStateObj.call(this,t,e,n,i,o,r);var a,s=!(e&&i);if(e&&e.style?o?i?a=e.style:(a=this._mergeStyle(this.createStyle(),n.style),this._mergeStyle(a,e.style)):(a=this._mergeStyle(this.createStyle(),(i?this:n).style),this._mergeStyle(a,e.style)):s&&(a=n.style),a)if(o){var l=this.style;if(this.style=this.createStyle(s?{}:l),s)for(var u=lt(l),h=0;h<u.length;h++)(p=u[h])in a&&(a[p]=a[p],this.style[p]=l[p]);for(var c=lt(a),h=0;h<c.length;h++){var p=c[h];this.style[p]=this.style[p]}this._transitionState(t,{style:a},r,this.getAnimationStyleProps())}else this.useStyle(a);for(h=0;h<zr.length;h++)p=zr[h],e&&null!=e[p]?this[p]=e[p]:s&&null!=n[p]&&(this[p]=n[p])},i.prototype._mergeStates=function(t){for(var e,n=Rr.prototype._mergeStates.call(this,t),i=0;i<t.length;i++){var o=t[i];o.style&&this._mergeStyle(e=e||{},o.style)}return e&&(n.style=e),n},i.prototype._mergeStyle=function(t,e){return I(t,e),t},i.prototype.getAnimationStyleProps=function(){return Br},i.STYLE_CHANGED_BIT=2,i.initDefaultProps=((n=i.prototype).type="displayable",n.invisible=!1,n.z=0,n.z2=0,n.zlevel=0,n.culling=!1,n.cursor="pointer",n.rectHover=!1,n.incremental=!1,n._rect=null,n.dirtyRectTolerance=0,void(n.__dirty=bi.REDARAW_BIT|i.STYLE_CHANGED_BIT)),i),Vr=new R(0,0,0,0),Fr=new R(0,0,0,0);function i(t){return Rr.call(this,t)||this}var Hr=Math.pow,Gr=Math.sqrt,Wr=1e-8,Ur=Gr(3),Yr=Ot(),Xr=Ot(),Zr=Ot();function jr(t){return-Wr<t&&t<Wr}function qr(t){return Wr<t||t<-Wr}function Kr(t,e,n,i,o){var r=1-o;return r*r*(r*t+3*o*e)+o*o*(o*i+3*r*n)}function $r(t,e,n,i,o){var r=1-o;return 3*(((e-t)*r+2*(n-e)*o)*r+(i-n)*o*o)}function Jr(t,e,n,i,o,r){var a,s,i=i+3*(e-n)-t,n=3*(n-2*e+t),e=3*(e-t),t=t-o,o=n*n-3*i*e,l=n*e-9*i*t,t=e*e-3*n*t,u=0;return jr(o)&&jr(l)?jr(n)?r[0]=0:0<=(s=-e/n)&&s<=1&&(r[u++]=s):jr(e=l*l-4*o*t)?(a=-(t=l/o)/2,0<=(s=-n/i+t)&&s<=1&&(r[u++]=s),0<=a&&a<=1&&(r[u++]=a)):0<e?(e=o*n+1.5*i*(-l-(t=Gr(e))),0<=(s=(-n-((t=(t=o*n+1.5*i*(-l+t))<0?-Hr(-t,1/3):Hr(t,1/3))+(e=e<0?-Hr(-e,1/3):Hr(e,1/3))))/(3*i))&&s<=1&&(r[u++]=s)):(t=(2*o*n-3*i*l)/(2*Gr(o*o*o)),e=Math.acos(t)/3,s=(-n-2*(l=Gr(o))*(t=Math.cos(e)))/(3*i),a=(-n+l*(t+Ur*Math.sin(e)))/(3*i),o=(-n+l*(t-Ur*Math.sin(e)))/(3*i),0<=s&&s<=1&&(r[u++]=s),0<=a&&a<=1&&(r[u++]=a),0<=o&&o<=1&&(r[u++]=o)),u}function Qr(t,e,n,i,o){var r,a=6*n-12*e+6*t,i=9*e+3*i-3*t-9*n,n=3*e-3*t,e=0;return jr(i)?qr(a)&&0<=(r=-n/a)&&r<=1&&(o[e++]=r):jr(t=a*a-4*i*n)?o[0]=-a/(2*i):0<t&&(t=(-a-(n=Gr(t)))/(2*i),0<=(r=(-a+n)/(2*i))&&r<=1&&(o[e++]=r),0<=t)&&t<=1&&(o[e++]=t),e}function ta(t,e,n,i,o,r){var a=(e-t)*o+t,e=(n-e)*o+e,n=(i-n)*o+n,s=(e-a)*o+a,e=(n-e)*o+e,o=(e-s)*o+s;r[0]=t,r[1]=a,r[2]=s,r[3]=o,r[4]=o,r[5]=e,r[6]=n,r[7]=i}function ea(t,e,n,i,o,r,a,s,l,u,h){var c,p,d,f,g=.005,y=1/0;Yr[0]=l,Yr[1]=u;for(var m=0;m<1;m+=.05)Xr[0]=Kr(t,n,o,a,m),Xr[1]=Kr(e,i,r,s,m),(d=Ut(Yr,Xr))<y&&(c=m,y=d);for(var y=1/0,v=0;v<32&&!(g<1e-4);v++)p=c+g,Xr[0]=Kr(t,n,o,a,f=c-g),Xr[1]=Kr(e,i,r,s,f),d=Ut(Xr,Yr),0<=f&&d<y?(c=f,y=d):(Zr[0]=Kr(t,n,o,a,p),Zr[1]=Kr(e,i,r,s,p),f=Ut(Zr,Yr),p<=1&&f<y?(c=p,y=f):g*=.5);return h&&(h[0]=Kr(t,n,o,a,c),h[1]=Kr(e,i,r,s,c)),Gr(y)}function na(t,e,n,i){var o=1-i;return o*(o*t+2*i*e)+i*i*n}function ia(t,e,n,i){return 2*((1-i)*(e-t)+i*(n-e))}function oa(t,e,n){n=t+n-2*e;return 0==n?.5:(t-e)/n}function ra(t,e,n,i,o){var r=(e-t)*i+t,e=(n-e)*i+e,i=(e-r)*i+r;o[0]=t,o[1]=r,o[2]=i,o[3]=i,o[4]=e,o[5]=n}function aa(t,e,n,i,o,r,a,s,l){var u,h=.005,c=1/0;Yr[0]=a,Yr[1]=s;for(var p=0;p<1;p+=.05)Xr[0]=na(t,n,o,p),Xr[1]=na(e,i,r,p),(y=Ut(Yr,Xr))<c&&(u=p,c=y);for(var c=1/0,d=0;d<32&&!(h<1e-4);d++){var f=u-h,g=u+h,y=(Xr[0]=na(t,n,o,f),Xr[1]=na(e,i,r,f),Ut(Xr,Yr));0<=f&&y<c?(u=f,c=y):(Zr[0]=na(t,n,o,g),Zr[1]=na(e,i,r,g),f=Ut(Zr,Yr),g<=1&&f<c?(u=g,c=f):h*=.5)}return l&&(l[0]=na(t,n,o,u),l[1]=na(e,i,r,u)),Gr(c)}var sa=Math.min,la=Math.max,ua=Math.sin,ha=Math.cos,ca=2*Math.PI,pa=Ot(),da=Ot(),fa=Ot();function ga(t,e,n,i,o,r){o[0]=sa(t,n),o[1]=sa(e,i),r[0]=la(t,n),r[1]=la(e,i)}var ya=[],ma=[];var va={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},_a=[],xa=[],ba=[],wa=[],Sa=[],Ma=[],Ta=Math.min,Ca=Math.max,Ia=Math.cos,Aa=Math.sin,Da=Math.sqrt,ka=Math.abs,La=Math.PI,Pa=2*La,Oa="undefined"!=typeof Float32Array,Ra=[];function Na(t){return Math.round(t/La*1e8)/1e8%2*La}function Ea(t,e){var n=Na(t[0]),i=(n<0&&(n+=Pa),n-t[0]),o=t[1];o+=i,!e&&Pa<=o-n?o=n+Pa:e&&Pa<=n-o?o=n-Pa:!e&&o<n?o=n+(Pa-Na(n-o)):e&&n<o&&(o=n-(Pa-Na(o-n))),t[0]=n,t[1]=o}o.prototype.increaseVersion=function(){this._version++},o.prototype.getVersion=function(){return this._version},o.prototype.setScale=function(t,e,n){0<(n=n||0)&&(this._ux=ka(n/di/t)||0,this._uy=ka(n/di/e)||0)},o.prototype.setDPR=function(t){this.dpr=t},o.prototype.setContext=function(t){this._ctx=t},o.prototype.getContext=function(){return this._ctx},o.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},o.prototype.reset=function(){this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},o.prototype.moveTo=function(t,e){return this.addData(va.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},o.prototype.lineTo=function(t,e){var n=ka(t-this._xi)>this._ux||ka(e-this._yi)>this._uy||this._len<5;return this.addData(va.L,t,e),this._ctx&&n&&(this._needsDash?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),n&&(this._xi=t,this._yi=e),this},o.prototype.bezierCurveTo=function(t,e,n,i,o,r){return this.addData(va.C,t,e,n,i,o,r),this._ctx&&(this._needsDash?this._dashedBezierTo(t,e,n,i,o,r):this._ctx.bezierCurveTo(t,e,n,i,o,r)),this._xi=o,this._yi=r,this},o.prototype.quadraticCurveTo=function(t,e,n,i){return this.addData(va.Q,t,e,n,i),this._ctx&&(this._needsDash?this._dashedQuadraticTo(t,e,n,i):this._ctx.quadraticCurveTo(t,e,n,i)),this._xi=n,this._yi=i,this},o.prototype.arc=function(t,e,n,i,o,r){Ra[0]=i,Ra[1]=o,Ea(Ra,r);var a=(o=Ra[1])-(i=Ra[0]);return this.addData(va.A,t,e,n,n,i,a,0,r?0:1),this._ctx&&this._ctx.arc(t,e,n,i,o,r),this._xi=Ia(o)*n+t,this._yi=Aa(o)*n+e,this},o.prototype.arcTo=function(t,e,n,i,o){return this._ctx&&this._ctx.arcTo(t,e,n,i,o),this},o.prototype.rect=function(t,e,n,i){return this._ctx&&this._ctx.rect(t,e,n,i),this.addData(va.R,t,e,n,i),this},o.prototype.closePath=function(){this.addData(va.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&(this._needsDash&&this._dashedLineTo(e,n),t.closePath()),this._xi=e,this._yi=n,this},o.prototype.fill=function(t){t&&t.fill(),this.toStatic()},o.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},o.prototype.setLineDash=function(t){if(t instanceof Array){this._lineDash=t;for(var e=this._dashIdx=0,n=0;n<t.length;n++)e+=t[n];this._dashSum=e,this._needsDash=!0}else this._lineDash=null,this._needsDash=!1;return this},o.prototype.setLineDashOffset=function(t){return this._dashOffset=t,this},o.prototype.len=function(){return this._len},o.prototype.setData=function(t){var e=t.length;this.data&&this.data.length===e||!Oa||(this.data=new Float32Array(e));for(var n=0;n<e;n++)this.data[n]=t[n];this._len=e},o.prototype.appendPath=function(t){for(var e=(t=t instanceof Array?t:[t]).length,n=0,i=this._len,o=0;o<e;o++)n+=t[o].len();for(Oa&&this.data instanceof Float32Array&&(this.data=new Float32Array(i+n)),o=0;o<e;o++)for(var r=t[o].data,a=0;a<r.length;a++)this.data[i++]=r[a];this._len=i},o.prototype.addData=function(t,e,n,i,o,r,a,s,l){if(this._saveData){var u=this.data;this._len+arguments.length>u.length&&(this._expandData(),u=this.data);for(var h=0;h<arguments.length;h++)u[this._len++]=arguments[h]}},o.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e<this._len;e++)t[e]=this.data[e];this.data=t}},o.prototype._dashedLineTo=function(t,e){var n,i,o=this._dashSum,r=this._lineDash,a=this._ctx,s=this._dashOffset,l=this._xi,u=this._yi,h=t-l,c=e-u,p=Da(h*h+c*c),d=l,f=u,g=r.length;for(s<0&&(s=o+s),d-=(s%=o)*(h/=p),f-=s*(c/=p);0<h&&d<=t||h<0&&t<=d||0===h&&(0<c&&f<=e||c<0&&e<=f);)d+=h*(n=r[i=this._dashIdx]),f+=c*n,this._dashIdx=(i+1)%g,0<h&&d<l||h<0&&l<d||0<c&&f<u||c<0&&u<f||a[i%2?"moveTo":"lineTo"]((0<=h?Ta:Ca)(d,t),(0<=c?Ta:Ca)(f,e));this._dashOffset=-Da((h=d-t)*h+(c=f-e)*c)},o.prototype._dashedBezierTo=function(t,e,n,i,o,r){var a,s,l,u,h,c=this._ctx,p=this._dashSum,d=this._dashOffset,f=this._lineDash,g=this._xi,y=this._yi,m=0,v=this._dashIdx,_=f.length,x=0;for(d<0&&(d=p+d),d%=p,a=0;a<1;a+=.1)s=Kr(g,t,n,o,a+.1)-Kr(g,t,n,o,a),l=Kr(y,e,i,r,a+.1)-Kr(y,e,i,r,a),m+=Da(s*s+l*l);for(;v<_&&!((x+=f[v])>d);v++);for(a=(x-d)/m;a<=1;)u=Kr(g,t,n,o,a),h=Kr(y,e,i,r,a),v%2?c.moveTo(u,h):c.lineTo(u,h),a+=f[v]/m,v=(v+1)%_;v%2!=0&&c.lineTo(o,r),this._dashOffset=-Da((s=o-u)*s+(l=r-h)*l)},o.prototype._dashedQuadraticTo=function(t,e,n,i){var o=n,r=i;n=(n+2*t)/3,i=(i+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,n,i,o,r)},o.prototype.toStatic=function(){var t;this._saveData&&(t=this.data)instanceof Array&&(t.length=this._len,Oa)&&11<this._len&&(this.data=new Float32Array(t))},o.prototype.getBoundingRect=function(){ba[0]=ba[1]=Sa[0]=Sa[1]=Number.MAX_VALUE,wa[0]=wa[1]=Ma[0]=Ma[1]=-Number.MAX_VALUE;for(var t,e,n,i=this.data,o=0,r=0,a=0,s=0,l=0;l<this._len;){var u=i[l++],h=1===l;switch(h&&(a=o=i[l],s=r=i[l+1]),u){case va.M:o=a=i[l++],r=s=i[l++],Sa[0]=a,Sa[1]=s,Ma[0]=a,Ma[1]=s;break;case va.L:ga(o,r,i[l],i[l+1],Sa,Ma),o=i[l++],r=i[l++];break;case va.C:C=T=M=S=w=b=x=_=v=m=y=g=f=d=p=c=void 0;var c=o,p=r,d=i[l++],f=i[l++],g=i[l++],y=i[l++],m=i[l],v=i[l+1],_=Sa,x=Ma,b=Qr,w=Kr,S=b(c,d,g,m,ya);_[0]=1/0,_[1]=1/0,x[0]=-1/0,x[1]=-1/0;for(var M=0;M<S;M++){var T=w(c,d,g,m,ya[M]);_[0]=sa(T,_[0]),x[0]=la(T,x[0])}for(S=b(p,f,y,v,ma),M=0;M<S;M++){var C=w(p,f,y,v,ma[M]);_[1]=sa(C,_[1]),x[1]=la(C,x[1])}_[0]=sa(c,_[0]),x[0]=la(c,x[0]),_[0]=sa(m,_[0]),x[0]=la(m,x[0]),_[1]=sa(p,_[1]),x[1]=la(p,x[1]),_[1]=sa(v,_[1]),x[1]=la(v,x[1]),o=i[l++],r=i[l++];break;case va.Q:b=o,t=r,P=i[l++],A=i[l++],L=i[l],e=i[l+1],k=Sa,O=Ma,n=D=n=I=void 0,I=na,n=la(sa((D=oa)(b,P,L),1),0),D=la(sa(D(t,A,e),1),0),P=I(b,P,L,n),n=I(t,A,e,D),k[0]=sa(b,L,P),k[1]=sa(t,e,n),O[0]=la(b,L,P),O[1]=la(t,e,n),o=i[l++],r=i[l++];break;case va.A:var I=i[l++],A=i[l++],D=i[l++],k=i[l++],L=i[l++],P=i[l++]+L,O=(l+=1,!i[l++]);h&&(a=Ia(L)*D+I,s=Aa(L)*k+A),function(t,e,n,i,o,r,a,s,l){var u=Zt,h=jt,c=Math.abs(o-r);if(c%ca<1e-4&&1e-4<c)return s[0]=t-n,s[1]=e-i,l[0]=t+n,l[1]=e+i;pa[0]=ha(o)*n+t,pa[1]=ua(o)*i+e,da[0]=ha(r)*n+t,da[1]=ua(r)*i+e,u(s,pa,da),h(l,pa,da),(o%=ca)<0&&(o+=ca),(r%=ca)<0&&(r+=ca),r<o&&!a?r+=ca:o<r&&a&&(o+=ca),a&&(c=r,r=o,o=c);for(var p=0;p<r;p+=Math.PI/2)o<p&&(fa[0]=ha(p)*n+t,fa[1]=ua(p)*i+e,u(s,fa,s),h(l,fa,l))}(I,A,D,k,L,P,O,Sa,Ma),o=Ia(P)*D+I,r=Aa(P)*k+A;break;case va.R:ga(a=o=i[l++],s=r=i[l++],a+i[l++],s+i[l++],Sa,Ma);break;case va.Z:o=a,r=s}Zt(ba,ba,Sa),jt(wa,wa,Ma)}return 0===l&&(ba[0]=ba[1]=wa[0]=wa[1]=0),new R(ba[0],ba[1],wa[0]-ba[0],wa[1]-ba[1])},o.prototype._calculateLength=function(){var t=this.data,e=this._len,n=this._ux,i=this._uy,o=0,r=0,a=0,s=0;this._pathSegLen||(this._pathSegLen=[]);for(var l=this._pathSegLen,u=0,h=0,c=0;c<e;){var p=t[c++],d=1===c,f=(d&&(a=o=t[c],s=r=t[c+1]),-1);switch(p){case va.M:o=a=t[c++],r=s=t[c++];break;case va.L:var g=t[c++],y=(_=t[c++])-r;(ka(I=g-o)>n||ka(y)>i||c===e-1)&&(f=Math.sqrt(I*I+y*y),o=g,r=_);break;case va.C:var m=t[c++],v=t[c++],_=(g=t[c++],t[c++]),x=t[c++],b=t[c++],f=function(t,e,n,i,o,r,a,s,l){for(var u=t,h=e,c=0,p=1/l,d=1;d<=l;d++){var f=d*p,g=Kr(t,n,o,a,f),f=Kr(e,i,r,s,f),y=g-u,m=f-h;c+=Math.sqrt(y*y+m*m),u=g,h=f}return c}(o,r,m,v,g,_,x,b,10),o=x,r=b;break;case va.Q:f=function(t,e,n,i,o,r,a){for(var s=t,l=e,u=0,h=1/a,c=1;c<=a;c++){var p=c*h,d=na(t,n,o,p),p=na(e,i,r,p),f=d-s,g=p-l;u+=Math.sqrt(f*f+g*g),s=d,l=p}return u}(o,r,m=t[c++],v=t[c++],g=t[c++],_=t[c++],10),o=g,r=_;break;case va.A:var x=t[c++],b=t[c++],w=t[c++],S=t[c++],M=t[c++],T=t[c++],C=T+M;c+=1,t[c++],d&&(a=Ia(M)*w+x,s=Aa(M)*S+b),f=Ca(w,S)*Ta(Pa,Math.abs(T)),o=Ia(C)*w+x,r=Aa(C)*S+b;break;case va.R:a=o=t[c++],s=r=t[c++],f=2*t[c++]+2*t[c++];break;case va.Z:var I=a-o,y=s-r;f=Math.sqrt(I*I+y*y),o=a,r=s}0<=f&&(u+=l[h++]=f)}return this._pathLen=u},o.prototype.rebuildPath=function(t,e){var n,i,o,r,a=this.data,s=this._ux,l=this._uy,u=this._len,h=e<1,c=0,p=0;if(!h||(this._pathSegLen||this._calculateLength(),o=this._pathSegLen,r=e*this._pathLen))t:for(var d=0;d<u;){var f,E=a[d++],g=1===d;switch(g&&(P=n=a[d],O=i=a[d+1]),E){case va.M:P=n=a[d++],O=i=a[d++],t.moveTo(n,i);break;case va.L:if(R=a[d++],N=a[d++],ka(R-n)>s||ka(N-i)>l||d===u-1){if(h){if(c+(f=o[p++])>r){var y=(r-c)/f;t.lineTo(n*(1-y)+R*y,i*(1-y)+N*y);break t}c+=f}t.lineTo(R,N),n=R,i=N}break;case va.C:var m=a[d++],v=a[d++],_=a[d++],x=a[d++],b=a[d++],w=a[d++];if(h){if(c+(f=o[p++])>r){ta(n,m,_,b,y=(r-c)/f,_a),ta(i,v,x,w,y,xa),t.bezierCurveTo(_a[1],xa[1],_a[2],xa[2],_a[3],xa[3]);break t}c+=f}t.bezierCurveTo(m,v,_,x,b,w),n=b,i=w;break;case va.Q:if(m=a[d++],v=a[d++],_=a[d++],x=a[d++],h){if(c+(f=o[p++])>r){ra(n,m,_,y=(r-c)/f,_a),ra(i,v,x,y,xa),t.quadraticCurveTo(_a[1],xa[1],_a[2],xa[2]);break t}c+=f}t.quadraticCurveTo(m,v,_,x),n=_,i=x;break;case va.A:var b=a[d++],w=a[d++],S=a[d++],M=a[d++],T=a[d++],C=a[d++],I=a[d++],A=!a[d++],B=M<S?S:M,D=.001<ka(S-M),k=T+C,L=!1;if(h&&(c+(f=o[p++])>r&&(k=T+C*(r-c)/f,L=!0),c+=f),D&&t.ellipse?t.ellipse(b,w,S,M,I,T,k,A):t.arc(b,w,B,T,k,A),L)break t;g&&(P=Ia(T)*S+b,O=Aa(T)*M+w),n=Ia(k)*S+b,i=Aa(k)*M+w;break;case va.R:var P=n=a[d],O=i=a[d+1],R=a[d++],N=a[d++],C=a[d++],D=a[d++];if(h){if(c+(f=o[p++])>r){I=r-c;t.moveTo(R,N),t.lineTo(R+Ta(I,C),N),0<(I-=C)&&t.lineTo(R+C,N+Ta(I,D)),0<(I-=D)&&t.lineTo(R+Ca(C-I,0),N+D),0<(I-=C)&&t.lineTo(R,N+Ca(D-I,0));break t}c+=f}t.rect(R,N,C,D);break;case va.Z:if(h){if(c+(f=o[p++])>r){t.lineTo(n*(1-(y=(r-c)/f))+P*y,i*(1-y)+O*y);break t}c+=f}t.closePath(),n=P,i=O}}},o.CMD=va,o.initDefaultProps=((xu=o.prototype)._saveData=!0,xu._needsDash=!1,xu._dashOffset=0,xu._dashIdx=0,xu._dashSum=0,xu._ux=0,void(xu._uy=0));var Ba=o;function o(t){this.dpr=1,this._version=0,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,t&&(this._saveData=!1),this._saveData&&(this.data=[])}function za(t,e,n,i,o,r,a){var s;if(0!==o)return s=0,!(e+(o=o)<a&&i+o<a||a<e-o&&a<i-o||t+o<r&&n+o<r||r<t-o&&r<n-o)&&(t===n?Math.abs(r-t)<=o/2:(r=(s=(e-i)/(t-n))*r-a+(t*i-n*e)/(t-n))*r/(s*s+1)<=o/2*o/2)}var Va=2*Math.PI;function Fa(t){return(t%=Va)<0&&(t+=Va),t}var Ha=2*Math.PI;function Ga(t,e,n,i,o,r){return e<r&&i<r||r<e&&r<i||i===e?0:(n=(r=(r-e)/(i-e))*(n-t)+t)===o?1/0:o<n?1!=r&&0!=r?i<e?1:-1:i<e?.5:-.5:0}var Wa=Ba.CMD,Ua=2*Math.PI,Ya=1e-4;var Xa=[-1,-1,-1],Za=[-1,-1];function ja(t,e,n,i,o,r,a,s,l,u){if(e<u&&i<u&&r<u&&s<u||u<e&&u<i&&u<r&&u<s)return 0;var h=Jr(e,i,r,s,u,Xa);if(0===h)return 0;for(var c,p=0,d=-1,f=void 0,g=void 0,y=0;y<h;y++){var m=Xa[y],v=0===m||1===m?.5:1;Kr(t,n,o,a,m)<l||(d<0&&(d=Qr(e,i,r,s,Za),Za[1]<Za[0]&&1<d&&(c=void 0,c=Za[0],Za[0]=Za[1],Za[1]=c),f=Kr(e,i,r,s,Za[0]),1<d)&&(g=Kr(e,i,r,s,Za[1])),2===d?m<Za[0]?p+=f<e?v:-v:m<Za[1]?p+=g<f?v:-v:p+=s<g?v:-v:m<Za[0]?p+=f<e?v:-v:p+=s<f?v:-v)}return p}function qa(t,e,n,i,o,r,a,s){if(e<s&&i<s&&r<s||s<e&&s<i&&s<r)return 0;c=Xa,h=(l=e)-2*(u=i)+(h=r),u=2*(u-l),l-=s=s,s=0,jr(h)?qr(u)&&0<=(p=-l/u)&&p<=1&&(c[s++]=p):jr(l=u*u-4*h*l)?0<=(p=-u/(2*h))&&p<=1&&(c[s++]=p):0<l&&(d=(-u-(l=Gr(l)))/(2*h),0<=(p=(-u+l)/(2*h))&&p<=1&&(c[s++]=p),0<=d)&&d<=1&&(c[s++]=d);var l,u,h,c,p,d,f=s;if(0===f)return 0;var g=oa(e,i,r);if(0<=g&&g<=1){for(var y=0,m=na(e,i,r,g),v=0;v<f;v++){var _=0===Xa[v]||1===Xa[v]?.5:1;na(t,n,o,Xa[v])<a||(Xa[v]<g?y+=m<e?_:-_:y+=r<m?_:-_)}return y}return _=0===Xa[0]||1===Xa[0]?.5:1,na(t,n,o,Xa[0])<a?0:r<e?_:-_}function Ka(t,e,n,i,o){for(var r,a=t.data,s=t.len(),l=0,u=0,h=0,c=0,p=0,d=0;d<s;){var f=a[d++],g=1===d;switch(f===Wa.M&&1<d&&(n||(l+=Ga(u,h,c,p,i,o))),g&&(c=u=a[d],p=h=a[d+1]),f){case Wa.M:u=c=a[d++],h=p=a[d++];break;case Wa.L:if(n){if(za(u,h,a[d],a[d+1],e,i,o))return!0}else l+=Ga(u,h,a[d],a[d+1],i,o)||0;u=a[d++],h=a[d++];break;case Wa.C:if(n){if(function(t,e,n,i,o,r,a,s,l,u,h){if(0!==l)return!(e+(l=l)<h&&i+l<h&&r+l<h&&s+l<h||h<e-l&&h<i-l&&h<r-l&&h<s-l||t+l<u&&n+l<u&&o+l<u&&a+l<u||u<t-l&&u<n-l&&u<o-l&&u<a-l)&&ea(t,e,n,i,o,r,a,s,u,h,null)<=l/2}(u,h,a[d++],a[d++],a[d++],a[d++],a[d],a[d+1],e,i,o))return!0}else l+=ja(u,h,a[d++],a[d++],a[d++],a[d++],a[d],a[d+1],i,o)||0;u=a[d++],h=a[d++];break;case Wa.Q:if(n){if(function(t,e,n,i,o,r,a,s,l){if(0!==a)return!(e+(a=a)<l&&i+a<l&&r+a<l||l<e-a&&l<i-a&&l<r-a||t+a<s&&n+a<s&&o+a<s||s<t-a&&s<n-a&&s<o-a)&&aa(t,e,n,i,o,r,s,l,null)<=a/2}(u,h,a[d++],a[d++],a[d],a[d+1],e,i,o))return!0}else l+=qa(u,h,a[d++],a[d++],a[d],a[d+1],i,o)||0;u=a[d++],h=a[d++];break;case Wa.A:var y=a[d++],m=a[d++],v=a[d++],_=a[d++],x=a[d++],b=a[d++],w=(d+=1,!!(1-a[d++])),S=Math.cos(x)*v+y,M=Math.sin(x)*_+m,T=(g?(c=S,p=M):l+=Ga(u,h,S,M,i,o),(i-y)*_/v+y);if(n){if(function(t,e,n,i,o,r,a,s,l){if(0!==a)return a=a,s-=t,l-=e,!(n<(t=Math.sqrt(s*s+l*l))-a||t+a<n)&&(Math.abs(i-o)%Ha<1e-4||((o=r?(e=i,i=Fa(o),Fa(e)):(i=Fa(i),Fa(o)))<i&&(o+=Ha),(t=Math.atan2(l,s))<0&&(t+=Ha),i<=t&&t<=o)||i<=t+Ha&&t+Ha<=o)}(y,m,_,x,x+b,w,e,T,o))return!0}else l+=function(t,e,n,i,o,r,a,s){if((s-=e)>n||s<-n)return 0;var e=Math.sqrt(n*n-s*s);if(Xa[0]=-e,Xa[1]=e,(n=Math.abs(i-o))<1e-4)return 0;if(Ua-1e-4<=n)return o=Ua,h=r?1:-1,a>=Xa[i=0]+t&&a<=Xa[1]+t?h:0;o<i&&(e=i,i=o,o=e),i<0&&(i+=Ua,o+=Ua);for(var l=0,u=0;u<2;u++){var h,c=Xa[u];a<c+t&&(h=r?1:-1,i<=(c=(c=Math.atan2(s,c))<0?Ua+c:c)&&c<=o||i<=c+Ua&&c+Ua<=o)&&(l+=h=c>Math.PI/2&&c<1.5*Math.PI?-h:h)}return l}(y,m,_,x,x+b,w,T,o);u=Math.cos(x+b)*v+y,h=Math.sin(x+b)*_+m;break;case Wa.R:if(c=u=a[d++],p=h=a[d++],S=c+a[d++],M=p+a[d++],n){if(za(c,p,S,p,e,i,o)||za(S,p,S,M,e,i,o)||za(S,M,c,M,e,i,o)||za(c,M,c,p,e,i,o))return!0}else l=(l+=Ga(S,p,S,M,i,o))+Ga(c,M,c,p,i,o);break;case Wa.Z:if(n){if(za(u,h,c,p,e,i,o))return!0}else l+=Ga(u,h,c,p,i,o);u=c,h=p}}return n||(t=h,r=p,Math.abs(t-r)<Ya)||(l+=Ga(u,h,c,p,i,o)||0),0!==l}var $a,Ja=V({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Er),Qa={style:V({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Br.style)},ts=["x","y","rotation","scaleX","scaleY","originX","originY","invisible","culling","z","z2","zlevel","parent"],q=(u(a,$a=n),a.prototype.update=function(){var e=this,t=($a.prototype.update.call(this),this.style);if(t.decal){var n,i=this._decalEl=this._decalEl||new a,o=(i.buildPath===a.prototype.buildPath&&(i.buildPath=function(t){e.buildPath(t,e.shape)}),i.silent=!0,i.style);for(n in t)o[n]!==t[n]&&(o[n]=t[n]);o.fill=t.fill?t.decal:null,o.decal=null,o.shadowColor=null,t.strokeFirst&&(o.stroke=null);for(var r=0;r<ts.length;++r)i[ts[r]]=this[ts[r]];i.__dirty|=bi.REDARAW_BIT}else this._decalEl&&(this._decalEl=null)},a.prototype.getDecalElement=function(){return this._decalEl},a.prototype._init=function(t){var e=lt(t),n=(this.shape=this.getDefaultShape(),this.getDefaultStyle());n&&this.useStyle(n);for(var i=0;i<e.length;i++){var o=e[i],r=t[o];"style"===o?this.style?I(this.style,r):this.useStyle(r):"shape"===o?I(this.shape,r):$a.prototype.attrKV.call(this,o,r)}this.style||this.useStyle({})},a.prototype.getDefaultStyle=function(){return null},a.prototype.getDefaultShape=function(){return{}},a.prototype.canBeInsideText=function(){return this.hasFill()},a.prototype.getInsideTextFill=function(){var t,e=this.style.fill;if("none"!==e){if(D(e))return.5<(t=Mn(e,0))?fi:.2<t?"#eee":gi;if(e)return gi}return fi},a.prototype.getInsideTextStroke=function(t){var e=this.style.fill;if(D(e)){var n=this.__zr;if(!(!n||!n.isDarkMode())==Mn(t,0)<.4)return e}},a.prototype.buildPath=function(t,e,n){},a.prototype.pathUpdated=function(){this.__dirty&=~a.SHAPE_CHANGED_BIT},a.prototype.createPathProxy=function(){this.path=new Ba(!1)},a.prototype.hasStroke=function(){var t=this.style,e=t.stroke;return!(null==e||"none"===e||!(0<t.lineWidth))},a.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},a.prototype.getBoundingRect=function(){var t,e,n=this._rect,i=this.style,o=!n;return o&&(t=!1,this.path||(t=!0,this.createPathProxy()),e=this.path,(t||this.__dirty&a.SHAPE_CHANGED_BIT)&&(e.beginPath(),this.buildPath(e,this.shape,!1),this.pathUpdated()),n=e.getBoundingRect()),this._rect=n,this.hasStroke()&&this.path&&0<this.path.len()?(t=this._rectWithStroke||(this._rectWithStroke=n.clone()),(this.__dirty||o)&&(t.copy(n),e=i.strokeNoScale?this.getLineScale():1,o=i.lineWidth,this.hasFill()||(i=this.strokeContainThreshold,o=Math.max(o,null==i?4:i)),1e-10<e)&&(t.width+=o/e,t.height+=o/e,t.x-=o/e/2,t.y-=o/e/2),t):n},a.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect(),o=this.style;if(t=n[0],e=n[1],i.contain(t,e)){n=this.path;if(this.hasStroke()){i=o.lineWidth,o=o.strokeNoScale?this.getLineScale():1;if(1e-10<o&&(this.hasFill()||(i=Math.max(i,this.strokeContainThreshold)),Ka(n,i/o,!0,t,e)))return!0}if(this.hasFill())return Ka(n,0,!1,t,e)}return!1},a.prototype.dirtyShape=function(){this.__dirty|=a.SHAPE_CHANGED_BIT,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},a.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},a.prototype.animateShape=function(t){return this.animate("shape",t)},a.prototype.updateDuringAnimation=function(t){"style"===t?this.dirtyStyle():"shape"===t?this.dirtyShape():this.markRedraw()},a.prototype.attrKV=function(t,e){"shape"===t?this.setShape(e):$a.prototype.attrKV.call(this,t,e)},a.prototype.setShape=function(t,e){var n=(n=this.shape)||(this.shape={});return"string"==typeof t?n[t]=e:I(n,t),this.dirtyShape(),this},a.prototype.shapeChanged=function(){return!!(this.__dirty&a.SHAPE_CHANGED_BIT)},a.prototype.createStyle=function(t){return kt(Ja,t)},a.prototype._innerSaveToNormal=function(t){$a.prototype._innerSaveToNormal.call(this,t);var e=this._normalState;t.shape&&!e.shape&&(e.shape=I({},this.shape))},a.prototype._applyStateObj=function(t,e,n,i,o,r){$a.prototype._applyStateObj.call(this,t,e,n,i,o,r);var a,s=!(e&&i);if(e&&e.shape?o?i?a=e.shape:(a=I({},n.shape),I(a,e.shape)):(a=I({},(i?this:n).shape),I(a,e.shape)):s&&(a=n.shape),a)if(o){this.shape=I({},this.shape);for(var l={},u=lt(a),h=0;h<u.length;h++){var c=u[h];"object"==typeof a[c]?this.shape[c]=a[c]:l[c]=a[c]}this._transitionState(t,{shape:l},r)}else this.shape=a,this.dirtyShape()},a.prototype._mergeStates=function(t){for(var e,n=$a.prototype._mergeStates.call(this,t),i=0;i<t.length;i++){var o=t[i];o.shape&&this._mergeStyle(e=e||{},o.shape)}return e&&(n.shape=e),n},a.prototype.getAnimationStyleProps=function(){return Qa},a.prototype.isZeroArea=function(){return!1},a.extend=function(n){u(o,i=a),o.prototype.getDefaultStyle=function(){return C(n.style)},o.prototype.getDefaultShape=function(){return C(n.shape)};var i,t,e=o;function o(t){var e=i.call(this,t)||this;return n.init&&n.init.call(e,t),e}for(t in n)"function"==typeof n[t]&&(e.prototype[t]=n[t]);return e},a.SHAPE_CHANGED_BIT=4,a.initDefaultProps=((xu=a.prototype).type="path",xu.strokeContainThreshold=5,xu.segmentIgnoreThreshold=0,xu.subPixelOptimize=!1,xu.autoBatch=!1,void(xu.__dirty=bi.REDARAW_BIT|n.STYLE_CHANGED_BIT|a.SHAPE_CHANGED_BIT)),a);function a(t){return $a.call(this,t)||this}var es,ns=V({strokeFirst:!0,font:ti,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},Ja),is=(u(os,es=n),os.prototype.hasStroke=function(){var t=this.style,e=t.stroke;return null!=e&&"none"!==e&&0<t.lineWidth},os.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},os.prototype.createStyle=function(t){return kt(ns,t)},os.prototype.setBoundingRect=function(t){this._rect=t},os.prototype.getBoundingRect=function(){var t,e=this.style;return this._rect||(null!=(t=e.text)?t+="":t="",(t=oi(t,e.font,e.textAlign,e.textBaseline)).x+=e.x||0,t.y+=e.y||0,this.hasStroke()&&(e=e.lineWidth,t.x-=e/2,t.y-=e/2,t.width+=e,t.height+=e),this._rect=t),this._rect},os.initDefaultProps=void(os.prototype.dirtyRectTolerance=10),os);function os(){return null!==es&&es.apply(this,arguments)||this}is.prototype.type="tspan";var rs=V({x:0,y:0},Er),as={style:V({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},Br.style)};u(us,ss=n),us.prototype.createStyle=function(t){return kt(rs,t)},us.prototype._getSize=function(t){var e,n=this.style,i=n[t];return null!=i?i:(i=(i=n.image)&&"string"!=typeof i&&i.width&&i.height?n.image:this.__image)?null==(e=n[n="width"===t?"height":"width"])?i[t]:i[t]/i[n]*e:0},us.prototype.getWidth=function(){return this._getSize("width")},us.prototype.getHeight=function(){return this._getSize("height")},us.prototype.getAnimationStyleProps=function(){return as},us.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new R(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect};var ss,ls=us;function us(){return null!==ss&&ss.apply(this,arguments)||this}ls.prototype.type="image";var hs=Math.round;function cs(t,e,n){var i,o,r;if(e)return i=e.x1,o=e.x2,r=e.y1,e=e.y2,t.x1=i,t.x2=o,t.y1=r,t.y2=e,(n=n&&n.lineWidth)&&(hs(2*i)===hs(2*o)&&(t.x1=t.x2=ds(i,n,!0)),hs(2*r)===hs(2*e))&&(t.y1=t.y2=ds(r,n,!0)),t}function ps(t,e,n){var i,o,r;if(e)return i=e.x,o=e.y,r=e.width,e=e.height,t.x=i,t.y=o,t.width=r,t.height=e,(n=n&&n.lineWidth)&&(t.x=ds(i,n,!0),t.y=ds(o,n,!0),t.width=Math.max(ds(i+r,n,!1)-t.x,0===r?0:1),t.height=Math.max(ds(o+e,n,!1)-t.y,0===e?0:1)),t}function ds(t,e,n){var i;return e?((i=hs(2*t))+hs(e))%2==0?i/2:(i+(n?1:-1))/2:t}function fs(){this.x=0,this.y=0,this.width=0,this.height=0}var gs,ys={},ms=(u(vs,gs=q),vs.prototype.getDefaultShape=function(){return new fs},vs.prototype.buildPath=function(t,e){var n,i,o,r,a,s,l,u,h,c,p,d,f,g;this.subPixelOptimize?(n=(a=ps(ys,e,this.style)).x,i=a.y,o=a.width,r=a.height,a.r=e.r,e=a):(n=e.x,i=e.y,o=e.width,r=e.height),e.r?(a=t,p=(e=e).x,d=e.y,f=e.width,g=e.height,e=e.r,f<0&&(p+=f,f=-f),g<0&&(d+=g,g=-g),"number"==typeof e?s=l=u=h=e:e instanceof Array?1===e.length?s=l=u=h=e[0]:2===e.length?(s=u=e[0],l=h=e[1]):3===e.length?(s=e[0],l=h=e[1],u=e[2]):(s=e[0],l=e[1],u=e[2],h=e[3]):s=l=u=h=0,f<s+l&&(s*=f/(c=s+l),l*=f/c),f<u+h&&(u*=f/(c=u+h),h*=f/c),g<l+u&&(l*=g/(c=l+u),u*=g/c),g<s+h&&(s*=g/(c=s+h),h*=g/c),a.moveTo(p+s,d),a.lineTo(p+f-l,d),0!==l&&a.arc(p+f-l,d+l,l,-Math.PI/2,0),a.lineTo(p+f,d+g-u),0!==u&&a.arc(p+f-u,d+g-u,u,0,Math.PI/2),a.lineTo(p+h,d+g),0!==h&&a.arc(p+h,d+g-h,h,Math.PI/2,Math.PI),a.lineTo(p,d+s),0!==s&&a.arc(p+s,d+s,s,Math.PI,1.5*Math.PI)):t.rect(n,i,o,r)},vs.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},vs);function vs(t){return gs.call(this,t)||this}ms.prototype.type="rect";var _s,xs={fill:"#000"},bs={style:V({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},Br.style)},ws=(u(Ts,_s=n),Ts.prototype.childrenRef=function(){return this._children},Ts.prototype.update=function(){this.styleChanged()&&this._updateSubTexts();for(var t=0;t<this._children.length;t++){var e=this._children[t];e.zlevel=this.zlevel,e.z=this.z,e.z2=this.z2,e.culling=this.culling,e.cursor=this.cursor,e.invisible=this.invisible}var n=this.attachedTransform;n?(n.updateTransform(),(n=n.transform)?(this.transform=this.transform||[],Re(this.transform,n)):this.transform=null):_s.prototype.update.call(this)},Ts.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),this.attachedTransform?this.attachedTransform.getComputedTransform():_s.prototype.getComputedTransform.call(this)},Ts.prototype._updateSubTexts=function(){var t;this._childCursor=0,Cs(t=this.style),N(t.rich,Cs),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},Ts.prototype.addSelfToZr=function(t){_s.prototype.addSelfToZr.call(this,t);for(var e=0;e<this._children.length;e++)this._children[e].__zr=t},Ts.prototype.removeSelfFromZr=function(t){_s.prototype.removeSelfFromZr.call(this,t);for(var e=0;e<this._children.length;e++)this._children[e].__zr=null},Ts.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var t=new R(0,0,0,0),e=this._children,n=[],i=null,o=0;o<e.length;o++){var r=e[o],a=r.getBoundingRect(),r=r.getLocalTransform(n);r?(t.copy(a),t.applyTransform(r),(i=i||t.clone()).union(t)):(i=i||a.clone()).union(a)}this._rect=i||t}return this._rect},Ts.prototype.setDefaultTextStyle=function(t){this._defaultStyle=t||xs},Ts.prototype.setTextContent=function(t){throw new Error("Can't attach text on another text")},Ts.prototype._mergeStyle=function(t,e){var n,i;return e&&(n=e.rich,i=t.rich||n&&{},I(t,e),n&&i?(this._mergeRich(i,n),t.rich=i):i&&(t.rich=i)),t},Ts.prototype._mergeRich=function(t,e){for(var n=lt(e),i=0;i<n.length;i++){var o=n[i];t[o]=t[o]||{},I(t[o],e[o])}},Ts.prototype.getAnimationStyleProps=function(){return bs},Ts.prototype._getOrCreateChild=function(t){var e=this._children[this._childCursor];return e&&e instanceof t||(e=new t),(this._children[this._childCursor++]=e).__zr=this.__zr,e.parent=this,e},Ts.prototype._updatePlainTexts=function(){var t,e=this.style,n=e.font||ti,i=e.padding,o=function(t,e){null!=t&&(t+="");var n,i=e.overflow,o=e.padding,r=e.font,a="truncate"===i,s=si(r),l=P(e.lineHeight,s),u="truncate"===e.lineOverflow,h=e.width,i=(n=null!=h&&"break"===i||"breakAll"===i?t?Or(t,e.font,h,"breakAll"===i,0).lines:[]:t?t.split("\n"):[]).length*l,c=P(e.height,i),u=(c<i&&u&&(u=Math.floor(c/l),n=n.slice(0,u)),c),p=h;if(o&&(u+=o[0]+o[2],null!=p)&&(p+=o[1]+o[3]),t&&a&&null!=p)for(var d=Tr(h,r,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),f=0;f<n.length;f++)n[f]=Cr(n[f],d);if(null==h){for(var g=0,f=0;f<n.length;f++)g=Math.max(ni(n[f],r),g);h=g}return{lines:n,height:c,outerHeight:u,lineHeight:l,calculatedLineHeight:s,contentHeight:i,width:h}}(Ds(e),e),r=ks(e),a=!!e.backgroundColor,s=o.outerHeight,l=o.lines,u=o.lineHeight,h=this._defaultStyle,c=e.x||0,p=e.y||0,d=e.align||h.align||"left",f=e.verticalAlign||h.verticalAlign||"top",g=c,y=ai(p,o.contentHeight,f);(r||i)&&(t=o.width,i&&(t+=i[1]+i[3]),m=ri(c,t,d),p=ai(p,s,f),r)&&this._renderBackground(e,e,m,p,t,s),y+=u/2,i&&(g=As(c,d,i),"top"===f?y+=i[0]:"bottom"===f&&(y-=i[2]));for(var m,v=0,r=!1,_=(null==(m=("fill"in e?e:(r=!0,h)).fill)||"none"===m?null:m.image||m.colorStops?"#000":m),x=(Is("stroke"in e?e.stroke:a||h.autoStroke&&!r?null:(v=2,h.stroke))),b=0<e.textShadowBlur,w=null!=e.width&&("truncate"===e.overflow||"break"===e.overflow||"breakAll"===e.overflow),S=o.calculatedLineHeight,M=0;M<l.length;M++){var T=this._getOrCreateChild(is),C=T.createStyle();T.useStyle(C),C.text=l[M],C.x=g,C.y=y,d&&(C.textAlign=d),C.textBaseline="middle",C.opacity=e.opacity,C.strokeFirst=!0,b&&(C.shadowBlur=e.textShadowBlur||0,C.shadowColor=e.textShadowColor||"transparent",C.shadowOffsetX=e.textShadowOffsetX||0,C.shadowOffsetY=e.textShadowOffsetY||0),x&&(C.stroke=x,C.lineWidth=e.lineWidth||v,C.lineDash=e.lineDash,C.lineDashOffset=e.lineDashOffset||0),_&&(C.fill=_),C.font=n,y+=u,w&&T.setBoundingRect(new R(ri(C.x,e.width,C.textAlign),ai(C.y,S,C.textBaseline),e.width,S))}},Ts.prototype._updateRichTexts=function(){var t=this.style,e=kr(Ds(t),t),n=e.width,i=e.outerWidth,o=e.outerHeight,r=t.padding,a=t.x||0,s=t.y||0,l=this._defaultStyle,u=t.align||l.align,l=t.verticalAlign||l.verticalAlign,a=ri(a,i,u),u=ai(s,o,l),h=a,c=u,p=(r&&(h+=r[3],c+=r[0]),h+n);ks(t)&&this._renderBackground(t,t,a,u,i,o);for(var d=!!t.backgroundColor,f=0;f<e.lines.length;f++){for(var g=e.lines[f],y=g.tokens,m=y.length,v=g.lineHeight,_=g.width,x=0,b=h,w=p,S=m-1,M=void 0;x<m&&(!(M=y[x]).align||"left"===M.align);)this._placeToken(M,t,v,c,b,"left",d),_-=M.width,b+=M.width,x++;for(;0<=S&&"right"===(M=y[S]).align;)this._placeToken(M,t,v,c,w,"right",d),_-=M.width,w-=M.width,S--;for(b+=(n-(b-h)-(p-w)-_)/2;x<=S;)M=y[x],this._placeToken(M,t,v,c,b+M.width/2,"center",d),b+=M.width,x++;c+=v}},Ts.prototype._placeToken=function(t,e,n,i,o,r,a){var s=e.rich[t.styleName]||{},l=(s.text=t.text,t.verticalAlign),u=i+n/2,l=("top"===l?u=i+t.height/2:"bottom"===l&&(u=i+n-t.height/2),!t.isLineHolder&&ks(s)&&this._renderBackground(s,e,"right"===r?o-t.width:"center"===r?o-t.width/2:o,u-t.height/2,t.width,t.height),!!s.backgroundColor),i=t.textPadding,n=(i&&(o=As(o,r,i),u-=t.height/2-i[0]-t.innerHeight/2),this._getOrCreateChild(is)),i=n.createStyle(),h=(n.useStyle(i),this._defaultStyle),c=!1,p=0,d=Is(("fill"in s?s:"fill"in e?e:(c=!0,h)).fill),l=Is("stroke"in s?s.stroke:"stroke"in e?e.stroke:l||a||h.autoStroke&&!c?null:(p=2,h.stroke)),a=0<s.textShadowBlur||0<e.textShadowBlur,c=(i.text=t.text,i.x=o,i.y=u,a&&(i.shadowBlur=s.textShadowBlur||e.textShadowBlur||0,i.shadowColor=s.textShadowColor||e.textShadowColor||"transparent",i.shadowOffsetX=s.textShadowOffsetX||e.textShadowOffsetX||0,i.shadowOffsetY=s.textShadowOffsetY||e.textShadowOffsetY||0),i.textAlign=r,i.textBaseline="middle",i.font=t.font||ti,i.opacity=xt(s.opacity,e.opacity,1),l&&(i.lineWidth=xt(s.lineWidth,e.lineWidth,p),i.lineDash=P(s.lineDash,e.lineDash),i.lineDashOffset=e.lineDashOffset||0,i.stroke=l),d&&(i.fill=d),t.contentWidth),h=t.contentHeight;n.setBoundingRect(new R(ri(i.x,c,i.textAlign),ai(i.y,h,i.textBaseline),c,h))},Ts.prototype._renderBackground=function(t,e,n,i,o,r){var a,s,l,u,h=t.backgroundColor,c=t.borderWidth,p=t.borderColor,d=D(h),f=t.borderRadius,g=this,f=((d||c&&p)&&((a=this._getOrCreateChild(ms)).useStyle(a.createStyle()),a.style.fill=null,(u=a.shape).x=n,u.y=i,u.width=o,u.height=r,u.r=f,a.dirtyShape()),d?((l=a.style).fill=h||null,l.fillOpacity=P(t.fillOpacity,1)):h&&h.image&&((s=this._getOrCreateChild(ls)).onload=function(){g.dirtyStyle()},(u=s.style).image=h.image,u.x=n,u.y=i,u.width=o,u.height=r),c&&p&&((l=a.style).lineWidth=c,l.stroke=p,l.strokeOpacity=P(t.strokeOpacity,1),l.lineDash=t.borderDash,l.lineDashOffset=t.borderDashOffset||0,a.strokeContainThreshold=0,a.hasFill())&&a.hasStroke()&&(l.strokeFirst=!0,l.lineWidth*=2),(a||s).style);f.shadowBlur=t.shadowBlur||0,f.shadowColor=t.shadowColor||"transparent",f.shadowOffsetX=t.shadowOffsetX||0,f.shadowOffsetY=t.shadowOffsetY||0,f.opacity=xt(t.opacity,e.opacity,1)},Ts.makeFont=function(t){var e,n="";return(t.fontSize||t.fontFamily||t.fontWeight)&&(e="",e="string"!=typeof t.fontSize||-1===t.fontSize.indexOf("px")&&-1===t.fontSize.indexOf("rem")&&-1===t.fontSize.indexOf("em")?isNaN(+t.fontSize)?"12px":t.fontSize+"px":t.fontSize,n=[t.fontStyle,t.fontWeight,e,t.fontFamily||"sans-serif"].join(" ")),n&&Mt(n)||t.textFont||t.font},Ts),Ss={left:!0,right:1,center:1},Ms={top:1,bottom:1,middle:1};function Ts(t){var e=_s.call(this)||this;return e.type="text",e._children=[],e._defaultStyle=xs,e.attr(t),e}function Cs(t){var e;t&&(t.font=ws.makeFont(t),e=t.align,t.align=null==(e="middle"===e?"center":e)||Ss[e]?e:"left",e=t.verticalAlign,t.verticalAlign=null==(e="center"===e?"middle":e)||Ms[e]?e:"top",t.padding)&&(t.padding=wt(t.padding))}function Is(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function As(t,e,n){return"right"===e?t-n[1]:"center"===e?t+n[3]/2-n[1]/2:t+n[3]}function Ds(t){t=t.text;return null!=t&&(t+=""),t}function ks(t){return!!(t.backgroundColor||t.borderWidth&&t.borderColor)}var z=Ko(),Ls=1,Ps={},Os=Ko(),Rs=0,Ns=1,Es=2,Bs=["emphasis","blur","select"],zs=["normal","emphasis","blur","select"],Vs="highlight",Fs="downplay",Hs="select",Gs="unselect",Ws="toggleSelect";function Us(t){return null!=t&&"none"!==t}var Ys=new en(100);function Xs(t){var e;return"string"!=typeof t?t:((e=Ys.get(t))||(e=vn(t,-.1),Ys.put(t,e)),e)}function Zs(t,e,n){t.onHoverStateChange&&(t.hoverState||0)!==n&&t.onHoverStateChange(e),t.hoverState=n}function js(t){Zs(t,"emphasis",Es)}function qs(t){t.hoverState===Es&&Zs(t,"normal",Rs)}function Ks(t){Zs(t,"blur",Ns)}function $s(t){t.hoverState===Ns&&Zs(t,"normal",Rs)}function Js(t){t.selected=!0}function Qs(t){t.selected=!1}function tl(t,e,n){e(t,n)}function el(t,e,n){tl(t,e,n),t.isGroup&&t.traverse(function(t){tl(t,e,n)})}function nl(t,e){switch(e){case"emphasis":t.hoverState=Es;break;case"normal":t.hoverState=Rs;break;case"blur":t.hoverState=Ns;break;case"select":t.selected=!0}}function il(t,e,n){var i=0<=A(t.currentStates,e),o=t.style.opacity,t=i?null:function(t,e,n,i){for(var o=t.style,r={},a=0;a<e.length;a++){var s=e[a],l=o[s];r[s]=null==l?i&&i[s]:l}for(a=0;a<t.animators.length;a++){var u=t.animators[a];u.__fromStateTransition&&u.__fromStateTransition.indexOf(n)<0&&"style"===u.targetName&&u.saveFinalToTarget(r,e)}return r}(t,["opacity"],e,{opacity:1}),e=(n=n||{}).style||{};return null==e.opacity&&(n=I({},n),e=I({opacity:i?o:.1*t.opacity},e),n.style=e),n}function ol(t,e){var n,i,o,r,a,s=this.states[t];if(this.style){if("emphasis"===t)return n=this,i=s,e=(e=e)&&0<=A(e,"select"),a=!1,n instanceof q&&(o=Os(n),r=e&&o.selectFill||o.normalFill,e=e&&o.selectStroke||o.normalStroke,Us(r)||Us(e))&&(!Us((o=(i=i||{}).style||{}).fill)&&Us(r)?(a=!0,i=I({},i),(o=I({},o)).fill=Xs(r)):!Us(o.stroke)&&Us(e)&&(a||(i=I({},i),o=I({},o)),o.stroke=Xs(e)),i.style=o),i&&null==i.z2&&(a||(i=I({},i)),r=n.z2EmphasisLift,i.z2=n.z2+(null!=r?r:10)),i;if("blur"===t)return il(this,t,s);if("select"===t)return e=this,(o=s)&&null==o.z2&&(o=I({},o),a=e.z2SelectLift,o.z2=e.z2+(null!=a?a:9)),o}return s}function rl(t){t.stateProxy=ol;var e=t.getTextContent(),t=t.getTextGuideLine();e&&(e.stateProxy=ol),t&&(t.stateProxy=ol)}function al(t,e){fl(t,e)||t.__highByOuter||el(t,js)}function sl(t,e){fl(t,e)||t.__highByOuter||el(t,qs)}function ll(t,e){t.__highByOuter|=1<<(e||0),el(t,js)}function ul(t,e){(t.__highByOuter&=~(1<<(e||0)))||el(t,qs)}function hl(t){el(t,Ks)}function cl(t){el(t,$s)}function pl(t){el(t,Js)}function dl(t){el(t,Qs)}function fl(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function gl(n){n.getModel().eachComponent(function(t,e){("series"===t?n.getViewOfSeriesModel(e):n.getViewOfComponentModel(e)).group.traverse(function(t){$s(t)})})}function yl(t,r,a,s){var l,u,h,n=s.getModel();function c(t,e){for(var n=0;n<e.length;n++){var i=t.getItemGraphicEl(e[n]);i&&cl(i)}}a=a||"coordinateSystem",null!=t&&r&&"none"!==r&&(l=n.getSeriesByIndex(t),(u=l.coordinateSystem)&&u.master&&(u=u.master),h=[],n.eachSeries(function(t){var e=l===t,n=t.coordinateSystem;if(n&&n.master&&(n=n.master),!("series"===a&&!e||"coordinateSystem"===a&&!(n&&u?n===u:e)||"series"===r&&e)){if(s.getViewOfSeriesModel(t).group.traverse(function(t){Ks(t)}),rt(r))c(t.getData(),r);else if(k(r))for(var i=lt(r),o=0;o<i.length;o++)c(t.getData(i[o]),r[i[o]]);h.push(t)}}),n.eachComponent(function(t,e){"series"!==t&&(t=s.getViewOfComponentModel(e))&&t.blurSeries&&t.blurSeries(h,n)}))}function ml(t,e,n){null!=t&&null!=e&&(t=n.getModel().getComponent(t,e))&&(e=n.getViewOfComponentModel(t))&&e.focusBlurEnabled&&e.group.traverse(function(t){Ks(t)})}function vl(t,e,n,i){var o={focusSelf:!1,dispatchers:null};if(null==t||"series"===t||null==e||null==n)return o;t=i.getModel().getComponent(t,e);if(!t)return o;e=i.getViewOfComponentModel(t);if(!e||!e.findHighDownDispatchers)return o;for(var r,a=e.findHighDownDispatchers(n),s=0;s<a.length;s++)if("self"===z(a[s]).focus){r=!0;break}return{focusSelf:r,dispatchers:a}}function _l(i){N(i.getAllData(),function(t){var e=t.data,n=t.type;e.eachItemGraphicEl(function(t,e){(i.isSelected(e,n)?pl:dl)(t)})})}function xl(t,e,n){r=!(r=!0)===r,(o=i=t).highDownSilentOnTouch&&(o.__highDownSilentOnTouch=i.highDownSilentOnTouch),r&&!o.__highDownDispatcher||(o.__highByOuter=o.__highByOuter||0,o.__highDownDispatcher=!r),el(t,rl);var i=t,o=e,r=n;i=z(i),null!=o?(i.focus=o,i.blurScope=r):i.focus&&(i.focus=null)}var bl=["emphasis","blur","select"],wl={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Sl(t,e,n,i){n=n||"itemStyle";for(var o=0;o<bl.length;o++){var r=bl[o],a=e.getModel([r,n]);t.ensureState(r).style=i?i(a):a[wl[n]]()}}function Ml(t){return!(!t||!t.__highDownDispatcher)}function Tl(t){t=t.type;return t===Hs||t===Gs||t===Ws}function Cl(t){t=t.type;return t===Vs||t===Fs}var Il=Ba.CMD,Al=[[],[],[]],Dl=Math.sqrt,kl=Math.atan2;var Ll=Math.sqrt,Pl=Math.sin,Ol=Math.cos,Rl=Math.PI;function Nl(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function El(t,e){return(t[0]*e[0]+t[1]*e[1])/(Nl(t)*Nl(e))}function Bl(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(El(t,e))}function zl(t,e,n,i,o,r,a,s,l,u,h){var l=l*(Rl/180),c=Ol(l)*(t-n)/2+Pl(l)*(e-i)/2,p=-1*Pl(l)*(t-n)/2+Ol(l)*(e-i)/2,d=c*c/(a*a)+p*p/(s*s),d=(1<d&&(a*=Ll(d),s*=Ll(d)),(o===r?-1:1)*Ll((a*a*(s*s)-a*a*(p*p)-s*s*(c*c))/(a*a*(p*p)+s*s*(c*c)))||0),o=d*a*p/s,d=d*-s*c/a,t=(t+n)/2+Ol(l)*o-Pl(l)*d,n=(e+i)/2+Pl(l)*o+Ol(l)*d,e=Bl([1,0],[(c-o)/a,(p-d)/s]),i=[(c-o)/a,(p-d)/s],c=[(-1*c-o)/a,(-1*p-d)/s],o=Bl(i,c);El(i,c)<=-1&&(o=Rl),(o=1<=El(i,c)?0:o)<0&&(p=Math.round(o/Rl*1e6)/1e6,o=2*Rl+p%2*Rl),h.addData(u,t,n,a,s,e,o,l,r)}var Vl=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Fl=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;u(Wl,Hl=q),Wl.prototype.applyTransform=function(t){};var Hl,Gl=Wl;function Wl(){return null!==Hl&&Hl.apply(this,arguments)||this}function Ul(t){return null!=t.setData}function Yl(t,e){var S=function(t){var e=new Ba;if(t){var n,i=0,o=0,r=i,a=o,s=Ba.CMD,l=t.match(Vl);if(l){for(var u=0;u<l.length;u++){for(var h=l[u],c=h.charAt(0),p=void 0,d=h.match(Fl)||[],f=d.length,g=0;g<f;g++)d[g]=parseFloat(d[g]);for(var y=0;y<f;){var m=void 0,v=void 0,_=void 0,x=void 0,b=void 0,w=void 0,S=void 0,M=i,T=o,C=void 0,I=void 0;switch(c){case"l":i+=d[y++],o+=d[y++],p=s.L,e.addData(p,i,o);break;case"L":i=d[y++],o=d[y++],p=s.L,e.addData(p,i,o);break;case"m":i+=d[y++],o+=d[y++],p=s.M,e.addData(p,i,o),r=i,a=o,c="l";break;case"M":i=d[y++],o=d[y++],p=s.M,e.addData(p,i,o),r=i,a=o,c="L";break;case"h":i+=d[y++],p=s.L,e.addData(p,i,o);break;case"H":i=d[y++],p=s.L,e.addData(p,i,o);break;case"v":o+=d[y++],p=s.L,e.addData(p,i,o);break;case"V":o=d[y++],p=s.L,e.addData(p,i,o);break;case"C":p=s.C,e.addData(p,d[y++],d[y++],d[y++],d[y++],d[y++],d[y++]),i=d[y-2],o=d[y-1];break;case"c":p=s.C,e.addData(p,d[y++]+i,d[y++]+o,d[y++]+i,d[y++]+o,d[y++]+i,d[y++]+o),i+=d[y-2],o+=d[y-1];break;case"S":m=i,v=o,C=e.len(),I=e.data,n===s.C&&(m+=i-I[C-4],v+=o-I[C-3]),p=s.C,M=d[y++],T=d[y++],i=d[y++],o=d[y++],e.addData(p,m,v,M,T,i,o);break;case"s":m=i,v=o,C=e.len(),I=e.data,n===s.C&&(m+=i-I[C-4],v+=o-I[C-3]),p=s.C,M=i+d[y++],T=o+d[y++],i+=d[y++],o+=d[y++],e.addData(p,m,v,M,T,i,o);break;case"Q":M=d[y++],T=d[y++],i=d[y++],o=d[y++],p=s.Q,e.addData(p,M,T,i,o);break;case"q":M=d[y++]+i,T=d[y++]+o,i+=d[y++],o+=d[y++],p=s.Q,e.addData(p,M,T,i,o);break;case"T":m=i,v=o,C=e.len(),I=e.data,n===s.Q&&(m+=i-I[C-4],v+=o-I[C-3]),i=d[y++],o=d[y++],p=s.Q,e.addData(p,m,v,i,o);break;case"t":m=i,v=o,C=e.len(),I=e.data,n===s.Q&&(m+=i-I[C-4],v+=o-I[C-3]),i+=d[y++],o+=d[y++],p=s.Q,e.addData(p,m,v,i,o);break;case"A":_=d[y++],x=d[y++],b=d[y++],w=d[y++],S=d[y++],zl(M=i,T=o,i=d[y++],o=d[y++],w,S,_,x,b,p=s.A,e);break;case"a":_=d[y++],x=d[y++],b=d[y++],w=d[y++],S=d[y++],zl(M=i,T=o,i+=d[y++],o+=d[y++],w,S,_,x,b,p=s.A,e)}}"z"!==c&&"Z"!==c||(p=s.Z,e.addData(p),i=r,o=a),n=p}e.toStatic()}}return e}(t),t=I({},e);return t.buildPath=function(t){var e;Ul(t)?(t.setData(S.data),(e=t.getContext())&&t.rebuildPath(e,1)):S.rebuildPath(e=t,1)},t.applyTransform=function(t){for(var e,n,i,o,r=S,a=t,s=r.data,l=r.len(),u=Il.M,h=Il.C,c=Il.L,p=Il.R,d=Il.A,f=Il.Q,g=0,y=0;g<l;){switch(e=s[g++],y=g,n=0,e){case u:case c:n=1;break;case h:n=3;break;case f:n=2;break;case d:var m=a[4],v=a[5],_=Dl(a[0]*a[0]+a[1]*a[1]),x=Dl(a[2]*a[2]+a[3]*a[3]),b=kl(-a[1]/x,a[0]/_);s[g]*=_,s[g++]+=m,s[g]*=x,s[g++]+=v,s[g++]*=_,s[g++]*=x,s[g++]+=b,s[g++]+=b,y=g+=2;break;case p:o[0]=s[g++],o[1]=s[g++],Xt(o,o,a),s[y++]=o[0],s[y++]=o[1],o[0]+=s[g++],o[1]+=s[g++],Xt(o,o,a),s[y++]=o[0],s[y++]=o[1]}for(i=0;i<n;i++){var w=Al[i];w[0]=s[g++],w[1]=s[g++],Xt(w,w,a),s[y++]=w[0],s[y++]=w[1]}}r.increaseVersion(),this.dirtyShape()},t}function Xl(t,e){return new Gl(Yl(t,e))}function Zl(){this.cx=0,this.cy=0,this.r=0}u(Kl,jl=q),Kl.prototype.getDefaultShape=function(){return new Zl},Kl.prototype.buildPath=function(t,e,n){n&&t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI)};var jl,ql=Kl;function Kl(t){return jl.call(this,t)||this}ql.prototype.type="circle";function $l(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}u(tu,Jl=q),tu.prototype.getDefaultShape=function(){return new $l},tu.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,o=e.rx,e=e.ry,r=.5522848*o,a=.5522848*e;t.moveTo(n-o,i),t.bezierCurveTo(n-o,i-a,n-r,i-e,n,i-e),t.bezierCurveTo(n+r,i-e,n+o,i-a,n+o,i),t.bezierCurveTo(n+o,i+a,n+r,i+e,n,i+e),t.bezierCurveTo(n-r,i+e,n-o,i+a,n-o,i),t.closePath()};var Jl,Ql=tu;function tu(t){return Jl.call(this,t)||this}Ql.prototype.type="ellipse";var eu=Math.PI,nu=2*eu,iu=Math.sin,ou=Math.cos,ru=Math.acos,au=Math.atan2,su=Math.abs,lu=Math.sqrt,uu=Math.max,hu=Math.min,cu=1e-4;function pu(t,e,n,i,o,r,a){var s=t-n,l=e-i,a=(a?r:-r)/lu(s*s+l*l),l=a*l,a=-a*s,s=t+l,t=e+a,e=n+l,n=i+a,i=(s+e)/2,u=(t+n)/2,h=e-s,c=n-t,p=h*h+c*c,r=o-r,s=s*n-e*t,n=(c<0?-1:1)*lu(uu(0,r*r*p-s*s)),e=(s*c-h*n)/p,t=(-s*h-c*n)/p,d=(s*c+h*n)/p,s=(-s*h+c*n)/p,h=e-i,c=t-u,n=d-i,p=s-u;return n*n+p*p<h*h+c*c&&(e=d,t=s),{cx:e,cy:t,x01:-l,y01:-a,x11:e*(o/r-1),y11:t*(o/r-1)}}function du(t,e){var n,i,o,r,a,s,l,u,h,c,p,d,f,g,y,m,v,_,x,b,w,S,M,T=uu(e.r,0),C=uu(e.r0||0,0),I=0<T;(I||0<C)&&(I||(T=C,C=0),T<C&&(I=T,T=C,C=I),I=!!e.clockwise,o=(n=e.startAngle)===(i=e.endAngle)?0:(Ea(o=[n,i],!I),su(o[0]-o[1])),r=e.cx,a=e.cy,s=e.cornerRadius||0,e=e.innerCornerRadius||0,cu<T?nu-cu<o?(t.moveTo(r+T*ou(n),a+T*iu(n)),t.arc(r,a,T,n,i,!I),cu<C&&(t.moveTo(r+C*ou(i),a+C*iu(i)),t.arc(r,a,C,i,n,I))):(l=su(T-C)/2,s=hu(l,s),e=l=hu(l,e),w=s,u=T*ou(n),h=T*iu(n),c=C*ou(i),p=C*iu(i),y=g=f=d=void 0,(cu<s||cu<l)&&(d=T*ou(i),f=T*iu(i),g=C*ou(n),y=C*iu(n),o<eu)&&((m=function(t,e,n,i,o,r,a,s){var l=(s=s-r)*(n=n-t)-(a=a-o)*(i=i-e);if(!(l*l<cu))return[t+(l=(a*(e-r)-s*(t-o))/l)*n,e+l*i]}(u,h,g,y,d,f,c,p))&&(x=u-m[0],b=h-m[1],v=d-m[0],_=f-m[1],x=1/iu(ru((x*v+b*_)/(lu(x*x+b*b)*lu(v*v+_*_)))/2),b=lu(m[0]*m[0]+m[1]*m[1]),e=hu(l,(C-b)/(x-1)),w=hu(s,(T-b)/(1+x)))),cu<o?cu<w?(S=pu(g,y,u,h,T,w,I),M=pu(d,f,c,p,T,w,I),t.moveTo(r+S.cx+S.x01,a+S.cy+S.y01),w<s?t.arc(r+S.cx,a+S.cy,w,au(S.y01,S.x01),au(M.y01,M.x01),!I):(t.arc(r+S.cx,a+S.cy,w,au(S.y01,S.x01),au(S.y11,S.x11),!I),t.arc(r,a,T,au(S.cy+S.y11,S.cx+S.x11),au(M.cy+M.y11,M.cx+M.x11),!I),t.arc(r+M.cx,a+M.cy,w,au(M.y11,M.x11),au(M.y01,M.x01),!I))):(t.moveTo(r+u,a+h),t.arc(r,a,T,n,i,!I)):t.moveTo(r+u,a+h),cu<C&&cu<o?cu<e?(S=pu(c,p,d,f,C,-e,I),M=pu(u,h,g,y,C,-e,I),t.lineTo(r+S.cx+S.x01,a+S.cy+S.y01),e<l?t.arc(r+S.cx,a+S.cy,e,au(S.y01,S.x01),au(M.y01,M.x01),!I):(t.arc(r+S.cx,a+S.cy,e,au(S.y01,S.x01),au(S.y11,S.x11),!I),t.arc(r,a,C,au(S.cy+S.y11,S.cx+S.x11),au(M.cy+M.y11,M.cx+M.x11),I),t.arc(r+M.cx,a+M.cy,e,au(M.y11,M.x11),au(M.y01,M.x01),!I))):(t.lineTo(r+c,a+p),t.arc(r,a,C,i,n,I)):t.lineTo(r+c,a+p)):t.moveTo(r,a),t.closePath())}function fu(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0,this.cornerRadius=0,this.innerCornerRadius=0}u(mu,gu=q),mu.prototype.getDefaultShape=function(){return new fu},mu.prototype.buildPath=function(t,e){du(t,e)},mu.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0};var gu,yu=mu;function mu(t){return gu.call(this,t)||this}yu.prototype.type="sector";function vu(){this.cx=0,this.cy=0,this.r=0,this.r0=0}u(bu,_u=q),bu.prototype.getDefaultShape=function(){return new vu},bu.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,o=2*Math.PI;t.moveTo(n+e.r,i),t.arc(n,i,e.r,0,o,!1),t.moveTo(n+e.r0,i),t.arc(n,i,e.r0,0,o,!0)};var _u,xu=bu;function bu(t){return _u.call(this,t)||this}function wu(t,e,n,i,o,r,a){t=.5*(n-t),i=.5*(i-e);return(2*(e-n)+t+i)*a+(-3*(e-n)-2*t-i)*r+t*o+e}function Su(t,e,n){var i=e.smooth,o=e.points;if(o&&2<=o.length){if(i&&"spline"!==i){var r=function(t,e,n,i){var o,r,a=[],s=[],l=[],u=[];if(i){for(var h=[1/0,1/0],c=[-1/0,-1/0],p=0,d=t.length;p<d;p++)Zt(h,h,t[p]),jt(c,c,t[p]);Zt(h,h,i[0]),jt(c,c,i[1])}for(p=0,d=t.length;p<d;p++){var f=t[p];if(n)o=t[p?p-1:d-1],r=t[(p+1)%d];else{if(0===p||p===d-1){a.push(Rt(t[p]));continue}o=t[p-1],r=t[p+1]}Et(s,r,o),Vt(s,s,e);var g=Ht(f,o),y=Ht(f,r),m=g+y,m=(0!==m&&(g/=m,y/=m),Vt(l,s,-g),Vt(u,s,y),Nt([],f,l)),g=Nt([],f,u);i&&(jt(m,m,h),Zt(m,m,c),jt(g,g,h),Zt(g,g,c)),a.push(m),a.push(g)}return n&&a.push(a.shift()),a}(o,i,n,e.smoothConstraint);t.moveTo(o[0][0],o[0][1]);for(var a=o.length,s=0;s<(n?a:a-1);s++){var l=r[2*s],u=r[2*s+1],h=o[(s+1)%a];t.bezierCurveTo(l[0],l[1],u[0],u[1],h[0],h[1])}}else{"spline"===i&&(o=function(t,e){for(var n=t.length,i=[],o=0,r=1;r<n;r++)o+=Ht(t[r-1],t[r]);for(var a=(a=o/2)<n?n:a,r=0;r<a;r++){var s=r/(a-1)*(e?n:n-1),l=Math.floor(s),s=s-l,u=void 0,h=t[l%n],c=void 0,p=void 0,p=e?(u=t[(l-1+n)%n],c=t[(l+1)%n],t[(l+2)%n]):(u=t[0===l?l:l-1],c=t[n-2<l?n-1:l+1],t[n-3<l?n-1:l+2]),l=s*s,d=s*l;i.push([wu(u[0],h[0],c[0],p[0],s,l,d),wu(u[1],h[1],c[1],p[1],s,l,d)])}return i}(o,n)),t.moveTo(o[0][0],o[0][1]);for(var s=1,c=o.length;s<c;s++)t.lineTo(o[s][0],o[s][1])}n&&t.closePath()}}xu.prototype.type="ring";function Mu(){this.points=null,this.smooth=0,this.smoothConstraint=null}u(Iu,Tu=q),Iu.prototype.getDefaultShape=function(){return new Mu},Iu.prototype.buildPath=function(t,e){Su(t,e,!0)};var Tu,Cu=Iu;function Iu(t){return Tu.call(this,t)||this}Cu.prototype.type="polygon";function Au(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}u(Lu,Du=q),Lu.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},Lu.prototype.getDefaultShape=function(){return new Au},Lu.prototype.buildPath=function(t,e){Su(t,e,!1)};var Du,ku=Lu;function Lu(t){return Du.call(this,t)||this}ku.prototype.type="polyline";function Pu(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}var Ou,Ru={},Nu=(u(Eu,Ou=q),Eu.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},Eu.prototype.getDefaultShape=function(){return new Pu},Eu.prototype.buildPath=function(t,e){r=(this.subPixelOptimize?(n=(r=cs(Ru,e,this.style)).x1,i=r.y1,o=r.x2,r):(n=e.x1,i=e.y1,o=e.x2,e)).y2;var n,i,o,r,e=e.percent;0!==e&&(t.moveTo(n,i),e<1&&(o=n*(1-e)+o*e,r=i*(1-e)+r*e),t.lineTo(o,r))},Eu.prototype.pointAt=function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]},Eu);function Eu(t){return Ou.call(this,t)||this}Nu.prototype.type="line";function Bu(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1}var zu=[];function Vu(t,e,n){var i=t.cpx2,o=t.cpy2;return null===i||null===o?[(n?$r:Kr)(t.x1,t.cpx1,t.cpx2,t.x2,e),(n?$r:Kr)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(n?ia:na)(t.x1,t.cpx1,t.x2,e),(n?ia:na)(t.y1,t.cpy1,t.y2,e)]}u(Gu,Fu=q),Gu.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},Gu.prototype.getDefaultShape=function(){return new Bu},Gu.prototype.buildPath=function(t,e){var n=e.x1,i=e.y1,o=e.x2,r=e.y2,a=e.cpx1,s=e.cpy1,l=e.cpx2,u=e.cpy2,e=e.percent;0!==e&&(t.moveTo(n,i),null==l||null==u?(e<1&&(ra(n,a,o,e,zu),a=zu[1],o=zu[2],ra(i,s,r,e,zu),s=zu[1],r=zu[2]),t.quadraticCurveTo(a,s,o,r)):(e<1&&(ta(n,a,l,o,e,zu),a=zu[1],l=zu[2],o=zu[3],ta(i,s,u,r,e,zu),s=zu[1],u=zu[2],r=zu[3]),t.bezierCurveTo(a,s,l,u,o,r)))},Gu.prototype.pointAt=function(t){return Vu(this.shape,t,!1)},Gu.prototype.tangentAt=function(t){t=Vu(this.shape,t,!0);return Ft(t,t)};var Fu,Hu=Gu;function Gu(t){return Fu.call(this,t)||this}Hu.prototype.type="bezier-curve";function Wu(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0}u(Xu,Uu=q),Xu.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},Xu.prototype.getDefaultShape=function(){return new Wu},Xu.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,o=Math.max(e.r,0),r=e.startAngle,a=e.endAngle,e=e.clockwise,s=Math.cos(r),l=Math.sin(r);t.moveTo(s*o+n,l*o+i),t.arc(n,i,o,r,a,!e)};var Uu,Yu=Xu;function Xu(t){return Uu.call(this,t)||this}Yu.prototype.type="arc";u(qu,Zu=q),qu.prototype._updatePathDirty=function(){for(var t=this.shape.paths,e=this.shapeChanged(),n=0;n<t.length;n++)e=e||t[n].shapeChanged();e&&this.dirtyShape()},qu.prototype.beforeBrush=function(){this._updatePathDirty();for(var t=this.shape.paths||[],e=this.getGlobalScale(),n=0;n<t.length;n++)t[n].path||t[n].createPathProxy(),t[n].path.setScale(e[0],e[1],t[n].segmentIgnoreThreshold)},qu.prototype.buildPath=function(t,e){for(var n=e.paths||[],i=0;i<n.length;i++)n[i].buildPath(t,n[i].shape,!0)},qu.prototype.afterBrush=function(){for(var t=this.shape.paths||[],e=0;e<t.length;e++)t[e].pathUpdated()},qu.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),q.prototype.getBoundingRect.call(this)};var Zu,ju=qu;function qu(){var t=null!==Zu&&Zu.apply(this,arguments)||this;return t.type="compound",t}$u.prototype.addColorStop=function(t,e){this.colorStops.push({offset:t,color:e})};var Ku=$u;function $u(t){this.colorStops=t||[]}u(th,Ju=Ku);var Ju,Qu=th;function th(t,e,n,i,o,r){o=Ju.call(this,o)||this;return o.x=null==t?0:t,o.y=null==e?0:e,o.x2=null==n?1:n,o.y2=null==i?0:i,o.type="linear",o.global=r||!1,o}u(ih,eh=Ku);var eh,nh=ih;function ih(t,e,n,i,o){i=eh.call(this,i)||this;return i.x=null==t?.5:t,i.y=null==e?.5:e,i.r=null==n?.5:n,i.type="radial",i.global=o||!1,i}var oh=[0,0],rh=[0,0],ah=new E,sh=new E,lh=(uh.prototype.fromBoundingRect=function(t,e){var n=this._corners,i=this._axes,o=t.x,r=t.y,a=o+t.width,t=r+t.height;if(n[0].set(o,r),n[1].set(a,r),n[2].set(a,t),n[3].set(o,t),e)for(var s=0;s<4;s++)n[s].transform(e);for(E.sub(i[0],n[1],n[0]),E.sub(i[1],n[3],n[0]),i[0].normalize(),i[1].normalize(),s=0;s<2;s++)this._origin[s]=i[s].dot(n[0])},uh.prototype.intersect=function(t,e){var n=!0,i=!e;return ah.set(1/0,1/0),sh.set(0,0),!this._intersectCheckOneSide(this,t,ah,sh,i,1)&&(n=!1,i)||!this._intersectCheckOneSide(t,this,ah,sh,i,-1)&&(n=!1,i)||i||E.copy(e,n?ah:sh),n},uh.prototype._intersectCheckOneSide=function(t,e,n,i,o,r){for(var a=!0,s=0;s<2;s++){var l=this._axes[s];if(this._getProjMinMaxOnAxis(s,t._corners,oh),this._getProjMinMaxOnAxis(s,e._corners,rh),oh[1]<rh[0]||rh[1]<oh[0]){if(a=!1,o)return a;var u=Math.abs(rh[0]-oh[1]),h=Math.abs(oh[0]-rh[1]);Math.min(u,h)>i.len()&&(u<h?E.scale(i,l,-u*r):E.scale(i,l,h*r))}else n&&(u=Math.abs(rh[0]-oh[1]),h=Math.abs(oh[0]-rh[1]),Math.min(u,h)<n.len())&&(u<h?E.scale(n,l,u*r):E.scale(n,l,-h*r))}return a},uh.prototype._getProjMinMaxOnAxis=function(t,e,n){for(var i=this._axes[t],o=this._origin,r=e[0].dot(i)+o[t],a=r,s=r,l=1;l<e.length;l++)var u=e[l].dot(i)+o[t],a=Math.min(u,a),s=Math.max(u,s);n[0]=a,n[1]=s},uh);function uh(t,e){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new E;for(n=0;n<2;n++)this._axes[n]=new E;t&&this.fromBoundingRect(t,e)}var hh,ch=[],ph=(u(dh,hh=n),dh.prototype.traverse=function(t,e){t.call(e,this)},dh.prototype.useStyle=function(){this.style={}},dh.prototype.getCursor=function(){return this._cursor},dh.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},dh.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},dh.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},dh.prototype.addDisplayable=function(t,e){(e?this._temporaryDisplayables:this._displayables).push(t),this.markRedraw()},dh.prototype.addDisplayables=function(t,e){e=e||!1;for(var n=0;n<t.length;n++)this.addDisplayable(t[n],e)},dh.prototype.getDisplayables=function(){return this._displayables},dh.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},dh.prototype.eachPendingDisplayable=function(t){for(var e=this._cursor;e<this._displayables.length;e++)t&&t(this._displayables[e]);for(e=0;e<this._temporaryDisplayables.length;e++)t&&t(this._temporaryDisplayables[e])},dh.prototype.update=function(){this.updateTransform();for(var t,e=this._cursor;e<this._displayables.length;e++)(t=this._displayables[e]).parent=this,t.update(),t.parent=null;for(e=0;e<this._temporaryDisplayables.length;e++)(t=this._temporaryDisplayables[e]).parent=this,t.update(),t.parent=null},dh.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new R(1/0,1/0,-1/0,-1/0),e=0;e<this._displayables.length;e++){var n=this._displayables[e],i=n.getBoundingRect().clone();n.needLocalTransform()&&i.applyTransform(n.getLocalTransform(ch)),t.union(i)}this._rect=t}return this._rect},dh.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e);if(this.getBoundingRect().contain(n[0],n[1]))for(var i=0;i<this._displayables.length;i++)if(this._displayables[i].contain(t,e))return!0;return!1},dh);function dh(){var t=null!==hh&&hh.apply(this,arguments)||this;return t.notClear=!0,t.incremental=!0,t._displayables=[],t._temporaryDisplayables=[],t._cursor=0,t}var fh=Math.max,gh=Math.min,yh={};function mh(t){return q.extend(t)}var vh=function(t,e){var n,i=Yl(t,e);return u(o,n=Gl),o;function o(t){t=n.call(this,t)||this;return t.applyTransform=i.applyTransform,t.buildPath=i.buildPath,t}};function _h(t,e){return vh(t,e)}function xh(t,e){yh[t]=e}function bh(t){if(yh.hasOwnProperty(t))return yh[t]}function wh(t,e,n,i){t=Xl(t,e);return n&&("center"===i&&(n=Mh(n,t.getBoundingRect())),Ch(t,n)),t}function Sh(t,e,n){var i=new ls({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(t){"center"===n&&(t={width:t.width,height:t.height},i.setStyle(Mh(e,t)))}});return i}function Mh(t,e){var e=e.width/e.height,n=t.height*e,e=n<=t.width?t.height:(n=t.width)/e;return{x:t.x+t.width/2-n/2,y:t.y+t.height/2-e/2,width:n,height:e}}function Th(t,e){for(var n=[],i=t.length,o=0;o<i;o++){var r=t[o];r.path||r.createPathProxy(),r.shapeChanged()&&r.buildPath(r.path,r.shape,!0),n.push(r.path)}return(e=new q(e)).createPathProxy(),e.buildPath=function(t){var e;Ul(t)&&(t.appendPath(n),e=t.getContext())&&t.rebuildPath(e,1)},e}function Ch(t,e){t.applyTransform&&(e=t.getBoundingRect().calculateTransform(e),t.applyTransform(e))}Ku=ds;function Ih(t,e,n,i,o,r,a){var s,l=!1;"function"==typeof o?(a=r,r=o,o=null):k(o)&&(r=o.cb,a=o.during,l=o.isFrom,s=o.removeOpt,o=o.dataIndex);var u,h,c,p="update"===t,d="remove"===t,f=(i&&i.ecModel&&(u=(u=i.ecModel.getUpdatePayload())&&u.animation),i&&i.isAnimationEnabled());d||e.stopAnimation("remove"),f?(c=h=f=void 0,"function"==typeof(c=u?(f=u.duration||0,h=u.easing||"cubicOut",u.delay||0):d?(f=P((s=s||{}).duration,200),h=P(s.easing,"cubicOut"),0):(f=i.getShallow(p?"animationDurationUpdate":"animationDuration"),h=i.getShallow(p?"animationEasingUpdate":"animationEasing"),i.getShallow(p?"animationDelayUpdate":"animationDelay")))&&(c=c(o,i.getAnimationDelayParams?i.getAnimationDelayParams(e,o):null)),0<(f="function"==typeof f?f(o):f)?l?e.animateFrom(n,{duration:f,delay:c||0,easing:h,done:r,force:!!r||!!a,scope:t,during:a}):e.animateTo(n,{duration:f,delay:c||0,easing:h,done:r,force:!!r||!!a,setToFinal:!0,scope:t,during:a}):(e.stopAnimation(),l||e.attr(n),r&&r())):(e.stopAnimation(),l||e.attr(n),a&&a(1),r&&r())}function Ah(t,e,n,i,o,r){Ih("update",t,e,n,i,o,r)}function Dh(t,e,n,i,o,r){Ih("init",t,e,n,i,o,r)}function kh(t,e,n,i,o,r){Oh(t)||Ih("remove",t,e,n,i,o,r)}function Lh(t,e,n,i){t.removeTextContent(),t.removeTextGuideLine(),kh(t,{style:{opacity:0}},e,n,i)}function Ph(t,e,n){function i(){t.parent&&t.parent.remove(t)}t.isGroup?t.traverse(function(t){t.isGroup||Lh(t,e,n,i)}):Lh(t,e,n,i)}function Oh(t){if(!t.__zr)return!0;for(var e=0;e<t.animators.length;e++)if("remove"===t.animators[e].scope)return!0;return!1}function Rh(t,e){for(var n=Oe([]);t&&t!==e;)Ne(n,t.getLocalTransform(),n),t=t.parent;return n}function Nh(t,e,n){return e&&!rt(e)&&(e=Ze.getLocalTransform(e)),Xt([],t,e=n?Ve([],e):e)}function Eh(t,e,n){var i=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),o=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),i=Nh(["left"===t?-i:"right"===t?i:0,"top"===t?-o:"bottom"===t?o:0],e,n);return Math.abs(i[0])>Math.abs(i[1])?0<i[0]?"right":"left":0<i[1]?"bottom":"top"}function Bh(t){return!t.isGroup}function zh(t,e,i){var n,o;function r(t){var e={x:t.x,y:t.y,rotation:t.rotation};return null!=t.shape&&(e.shape=I({},t.shape)),e}t&&e&&(n={},t.traverse(function(t){Bh(t)&&t.anid&&(n[t.anid]=t)}),o=n,e.traverse(function(t){var e,n;Bh(t)&&t.anid&&(e=o[t.anid])&&(n=r(t),t.attr(r(e)),Ah(t,n,i,z(t).dataIndex))}))}function Vh(t,n){return j(t,function(t){var e=t[0],e=fh(e,n.x),t=(e=gh(e,n.x+n.width),t[1]),t=fh(t,n.y);return[e,gh(t,n.y+n.height)]})}function Fh(t,e){var n=fh(t.x,e.x),i=gh(t.x+t.width,e.x+e.width),o=fh(t.y,e.y),t=gh(t.y+t.height,e.y+e.height);if(n<=i&&o<=t)return{x:n,y:o,width:i-n,height:t-o}}function Hh(t,e,n){var e=I({rectHover:!0},e),i=e.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(i.image=t.slice(8),V(i,n),new ls(e)):wh(t.replace("path://",""),e,n,"center")}function Gh(t,e,n,i,o,r,a,s){var l,n=n-t,i=i-e,a=a-o,s=s-r,u=a*i-n*s;return!((l=u)<=1e-6&&-1e-6<=l||(o=((l=t-o)*i-n*(t=e-r))/u)<0||1<o||(i=(l*s-a*t)/u)<0||1<i)}function Wh(t){var e=t.itemTooltipOption,n=t.componentModel,i=t.itemName,e=D(e)?{formatter:e}:e,o=n.mainType,n=n.componentIndex,r={componentType:o,name:i,$vars:["name"]},a=(r[o+"Index"]=n,t.formatterParamsExtra),t=(a&&N(lt(a),function(t){_(r,t)||(r[t]=a[t],r.$vars.push(t))}),z(t.el));t.componentMainType=o,t.componentIndex=n,t.tooltipConfig={name:i,option:V({content:i,formatterParams:r},e)}}xh("circle",ql),xh("ellipse",Ql),xh("sector",yu),xh("ring",xu),xh("polygon",Cu),xh("polyline",ku),xh("rect",ms),xh("line",Nu),xh("bezierCurve",Hu),xh("arc",Yu);var Uh=Object.freeze({__proto__:null,Arc:Yu,BezierCurve:Hu,BoundingRect:R,Circle:ql,CompoundPath:ju,Ellipse:Ql,Group:O,Image:ls,IncrementalDisplayable:ph,Line:Nu,LinearGradient:Qu,OrientedBoundingRect:lh,Path:q,Point:E,Polygon:Cu,Polyline:ku,RadialGradient:nh,Rect:ms,Ring:xu,Sector:yu,Text:ws,applyTransform:Nh,clipPointsByRect:Vh,clipRectByRect:Fh,createIcon:Hh,extendPath:_h,extendShape:mh,getShapeClass:bh,getTransform:Rh,groupTransition:zh,initProps:Dh,isElementRemoved:Oh,lineLineIntersect:Gh,linePolygonIntersect:function(t,e,n,i,o){for(var r=0,a=o[o.length-1];r<o.length;r++){var s=o[r];if(Gh(t,e,n,i,s[0],s[1],a[0],a[1]))return!0;a=s}},makeImage:Sh,makePath:wh,mergePath:Th,registerShape:xh,removeElement:kh,removeElementWithFadeOut:Ph,resizePath:Ch,setTooltipConfig:Wh,subPixelOptimize:Ku,subPixelOptimizeLine:function(t){return cs(t.shape,t.shape,t.style),t},subPixelOptimizeRect:function(t){return ps(t.shape,t.shape,t.style),t},transformDirection:Eh,updateProps:Ah}),Yh={};function Xh(t,e){for(var n=0;n<Bs.length;n++){var i=Bs[n],o=e[i],i=t.ensureState(i);i.style=i.style||{},i.style.text=o}var r=t.currentStates.slice();t.clearStates(!0),t.setStyle({text:e.normal}),t.useStates(r,!0)}function Zh(t,e,n){for(var i,o=t.labelFetcher,r=t.labelDataIndex,a=t.labelDimIndex,s=e.normal,l={normal:i=null==(i=o?o.getFormattedLabel(r,"normal",null,a,s&&s.get("formatter"),null!=n?{interpolatedValue:n}:null):i)?ut(t.defaultText)?t.defaultText(r,t,n):t.defaultText:i},u=0;u<Bs.length;u++){var h=Bs[u],c=e[h];l[h]=P(o?o.getFormattedLabel(r,h,null,a,c&&c.get("formatter")):null,i)}return l}function jh(t,e,n,i){n=n||Yh;for(var o=t instanceof ws,r=!1,a=0;a<zs.length;a++)if((p=e[zs[a]])&&p.getShallow("show")){r=!0;break}var s=o?t:t.getTextContent();if(r){o||(s||(s=new ws,t.setTextContent(s)),t.stateProxy&&(s.stateProxy=t.stateProxy));var l=Zh(n,e),u=e.normal,h=!!u.getShallow("show"),c=Kh(u,i&&i.normal,n,!1,!o);for(c.text=l.normal,o||t.setTextConfig($h(u,n,!1)),a=0;a<Bs.length;a++){var p,d,f,g=Bs[a];(p=e[g])&&(d=s.ensureState(g),(f=!!P(p.getShallow("show"),h))!=h&&(d.ignore=!f),d.style=Kh(p,i&&i[g],n,!0,!o),d.style.text=l[g],o||(t.ensureState(g).textConfig=$h(p,n,!0)))}s.silent=!!u.getShallow("silent"),null!=s.style.x&&(c.x=s.style.x),null!=s.style.y&&(c.y=s.style.y),s.ignore=!h,s.useStyle(c),s.dirty(),n.enableTextSetter&&(nc(s).setLabelText=function(t){t=Zh(n,e,t);Xh(s,t)})}else s&&(s.ignore=!0);t.dirty()}function qh(t,e){for(var n={normal:t.getModel(e=e||"label")},i=0;i<Bs.length;i++){var o=Bs[i];n[o]=t.getModel([o,e])}return n}function Kh(t,e,n,i,o){var r,a={},s=a,l=t,u=n,h=i,c=o;u=u||Yh;var p,t=l.ecModel,d=t&&t.option.textStyle,f=function(t){for(var e;t&&t!==t.ecModel;){var n=(t.option||Yh).rich;if(n){e=e||{};for(var i=lt(n),o=0;o<i.length;o++)e[i[o]]=1}t=t.parentModel}return e}(l);if(f)for(var g in p={},f)f.hasOwnProperty(g)&&(r=l.getModel(["rich",g]),ec(p[g]={},r,d,u,h,c,!1,!0));return p&&(s.rich=p),(t=l.get("overflow"))&&(s.overflow=t),null!=(t=l.get("minMargin"))&&(s.margin=t),ec(s,l,d,u,h,c,!0,!1),e&&I(a,e),a}function $h(t,e,n){e=e||{};var i={},o=t.getShallow("rotate"),r=P(t.getShallow("distance"),n?null:5),a=t.getShallow("offset");return null!=(n="outside"===(n=t.getShallow("position")||(n?null:"inside"))?e.defaultOutsidePosition||"top":n)&&(i.position=n),null!=a&&(i.offset=a),null!=o&&(o*=Math.PI/180,i.rotation=o),null!=r&&(i.distance=r),i.outsideFill="inherit"===t.get("color")?e.inheritColor||null:"auto",i}var Jh=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],Qh=["align","lineHeight","width","height","tag","verticalAlign"],tc=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function ec(t,e,n,i,o,r,a,s){n=!o&&n||Yh;var l=i&&i.inheritColor,u=e.getShallow("color"),h=e.getShallow("textBorderColor"),c=P(e.getShallow("opacity"),n.opacity),u=("inherit"!==u&&"auto"!==u||(u=l||null),"inherit"!==h&&"auto"!==h||(h=l||null),r||(u=u||n.color,h=h||n.textBorderColor),null!=u&&(t.fill=u),null!=h&&(t.stroke=h),P(e.getShallow("textBorderWidth"),n.textBorderWidth)),h=(null!=u&&(t.lineWidth=u),P(e.getShallow("textBorderType"),n.textBorderType)),u=(null!=h&&(t.lineDash=h),P(e.getShallow("textBorderDashOffset"),n.textBorderDashOffset));null!=u&&(t.lineDashOffset=u),null!=(c=o||null!=c||s?c:i&&i.defaultOpacity)&&(t.opacity=c),o||r||null==t.fill&&i.inheritColor&&(t.fill=i.inheritColor);for(var p=0;p<Jh.length;p++){var d=Jh[p];null!=(f=P(e.getShallow(d),n[d]))&&(t[d]=f)}for(p=0;p<Qh.length;p++)d=Qh[p],null!=(f=e.getShallow(d))&&(t[d]=f);if(null==t.verticalAlign&&null!=(h=e.getShallow("baseline"))&&(t.verticalAlign=h),!a||!i.disableBox){for(p=0;p<tc.length;p++){var f,d=tc[p];null!=(f=e.getShallow(d))&&(t[d]=f)}u=e.getShallow("borderType");null!=u&&(t.borderDash=u),"auto"!==t.backgroundColor&&"inherit"!==t.backgroundColor||!l||(t.backgroundColor=l),"auto"!==t.borderColor&&"inherit"!==t.borderColor||!l||(t.borderColor=l)}}var nc=Ko();var ic=["textStyle","color"],oc=new ws,n=(rc.prototype.getTextColor=function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(ic):null)},rc.prototype.getFont=function(){return t={fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},e=(e=this.ecModel)&&e.getModel("textStyle"),Mt([t.fontStyle||e&&e.getShallow("fontStyle")||"",t.fontWeight||e&&e.getShallow("fontWeight")||"",(t.fontSize||e&&e.getShallow("fontSize")||12)+"px",t.fontFamily||e&&e.getShallow("fontFamily")||"sans-serif"].join(" "));var t,e},rc.prototype.getTextRect=function(t){return oc.useStyle({text:t,fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily"),verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline"),padding:this.getShallow("padding"),lineHeight:this.getShallow("lineHeight"),rich:this.getShallow("rich")}),oc.update(),oc.getBoundingRect()},rc);function rc(){}var ac=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],sc=gr(ac),Ku=(lc.prototype.getLineStyle=function(t){return sc(this,t)},lc);function lc(){}var uc=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],hc=gr(uc),cc=(pc.prototype.getItemStyle=function(t,e){return hc(this,t,e)},pc);function pc(){}gc.prototype.init=function(t,e,n){for(var i=3;i<arguments.length;i++)i-3,0},gc.prototype.mergeOption=function(t,e){p(this.option,t,!0)},gc.prototype.get=function(t,e){return null==t?this.option:this._doGet(this.parsePath(t),!e&&this.parentModel)},gc.prototype.getShallow=function(t,e){var n=this.option,n=null==n?n:n[t];return null!=n||e||(e=this.parentModel)&&(n=e.getShallow(t)),n},gc.prototype.getModel=function(t,e){var n=null!=t,t=n?this.parsePath(t):null;return new gc(n?this._doGet(t):this.option,e=e||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(t)),this.ecModel)},gc.prototype.isEmpty=function(){return null==this.option},gc.prototype.restoreData=function(){},gc.prototype.clone=function(){return new this.constructor(C(this.option))},gc.prototype.parsePath=function(t){return"string"==typeof t?t.split("."):t},gc.prototype.resolveParentPath=function(t){return t},gc.prototype.isAnimationEnabled=function(){if(!w.node&&this.option)return null!=this.option.animation?!!this.option.animation:this.parentModel?this.parentModel.isAnimationEnabled():void 0},gc.prototype._doGet=function(t,e){var n=this.option;if(t){for(var i=0;i<t.length&&(!t[i]||null!=(n=n&&"object"==typeof n?n[t[i]]:null));i++);null==n&&e&&(n=e._doGet(this.resolveParentPath(t),e.parentModel))}return n};var dc,fc=gc;function gc(t,e,n){this.parentModel=e,this.ecModel=n,this.option=t}ur(fc),Lc=fc,dc=["__\0is_clz",cr++].join("_"),Lc.prototype[dc]=!0,Lc.isInstance=function(t){return!(!t||!t[dc])},ot(fc,Ku),ot(fc,cc),ot(fc,mr),ot(fc,n);var yc=Math.round(10*Math.random());function mc(t){return[t||"",yc++].join("_")}function vc(t,e){return p(p({},t,!0),e,!0)}var _c="ZH",xc="EN",bc=xc,wc={},Sc={},Mc=w.domSupported&&-1<(document.documentElement.lang||navigator.language||navigator.browserLanguage).toUpperCase().indexOf(_c)?_c:bc;function Tc(t,e){t=t.toUpperCase(),Sc[t]=new fc(e),wc[t]=e}Tc(xc,{time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Guage",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}}),Tc(_c,{time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType}",withoutName:"第{seriesId}个系列是一个{seriesType}",separator:{middle:"",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:"",end:""}}}});var Cc=1e3,Ic=60*Cc,Ac=60*Ic,Dc=24*Ac,cr=365*Dc,kc={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{hh}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {hh}:{mm}:{ss} {SSS}"},Lc="{yyyy}-{MM}-{dd}",Pc={year:"{yyyy}",month:"{yyyy}-{MM}",day:Lc,hour:Lc+" "+kc.hour,minute:Lc+" "+kc.minute,second:Lc+" "+kc.second,millisecond:kc.none},Oc=["year","month","day","hour","minute","second","millisecond"],Rc=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function Nc(t,e){return"0000".substr(0,e-(t+="").length)+t}function Ec(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function Bc(t,e,n,i){var t=Ao(t),o=t[Fc(n)](),r=t[Hc(n)]()+1,a=Math.floor((r-1)/4)+1,s=t[Gc(n)](),l=t["get"+(n?"UTC":"")+"Day"](),u=t[Wc(n)](),h=(u-1)%12+1,c=t[Uc(n)](),p=t[Yc(n)](),t=t[Xc(n)](),n=(i instanceof fc?i:Sc[i||Mc]||Sc[bc]).getModel("time"),i=n.get("month"),d=n.get("monthAbbr"),f=n.get("dayOfWeek"),n=n.get("dayOfWeekAbbr");return(e||"").replace(/{yyyy}/g,o+"").replace(/{yy}/g,o%100+"").replace(/{Q}/g,a+"").replace(/{MMMM}/g,i[r-1]).replace(/{MMM}/g,d[r-1]).replace(/{MM}/g,Nc(r,2)).replace(/{M}/g,r+"").replace(/{dd}/g,Nc(s,2)).replace(/{d}/g,s+"").replace(/{eeee}/g,f[l]).replace(/{ee}/g,n[l]).replace(/{e}/g,l+"").replace(/{HH}/g,Nc(u,2)).replace(/{H}/g,u+"").replace(/{hh}/g,Nc(h+"",2)).replace(/{h}/g,h+"").replace(/{mm}/g,Nc(c,2)).replace(/{m}/g,c+"").replace(/{ss}/g,Nc(p,2)).replace(/{s}/g,p+"").replace(/{SSS}/g,Nc(t,3)).replace(/{S}/g,t+"")}function zc(t,e){var t=Ao(t),n=t[Hc(e)]()+1,i=t[Gc(e)](),o=t[Wc(e)](),r=t[Uc(e)](),a=t[Yc(e)](),t=0===t[Xc(e)](),e=t&&0===a,a=e&&0===r,r=a&&0===o,o=r&&1===i;return o&&1===n?"year":o?"month":r?"day":a?"hour":e?"minute":t?"second":"millisecond"}function Vc(t,e,n){var i="number"==typeof t?Ao(t):t;switch(e=e||zc(t,n)){case"year":return i[Fc(n)]();case"half-year":return 6<=i[Hc(n)]()?1:0;case"quarter":return Math.floor((i[Hc(n)]()+1)/4);case"month":return i[Hc(n)]();case"day":return i[Gc(n)]();case"half-day":return i[Wc(n)]()/24;case"hour":return i[Wc(n)]();case"minute":return i[Uc(n)]();case"second":return i[Yc(n)]();case"millisecond":return i[Xc(n)]()}}function Fc(t){return t?"getUTCFullYear":"getFullYear"}function Hc(t){return t?"getUTCMonth":"getMonth"}function Gc(t){return t?"getUTCDate":"getDate"}function Wc(t){return t?"getUTCHours":"getHours"}function Uc(t){return t?"getUTCMinutes":"getMinutes"}function Yc(t){return t?"getUTCSeconds":"getSeconds"}function Xc(t){return t?"getUTCSeconds":"getSeconds"}function Zc(t){return t?"setUTCMonth":"setMonth"}function jc(t){return t?"setUTCDate":"setDate"}function qc(t){return t?"setUTCHours":"setHours"}function Kc(t){return t?"setUTCMinutes":"setMinutes"}function $c(t){return t?"setUTCSeconds":"setSeconds"}function Jc(t){return t?"setUTCSeconds":"setSeconds"}function Qc(t){var e;return Oo(t)?(e=(t+"").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(1<e.length?"."+e[1]:""):D(t)?t:"-"}function tp(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()}),t=e?t&&t.charAt(0).toUpperCase()+t.slice(1):t}var ep=wt,np=/([&<>"'])/g,ip={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function op(t){return null==t?"":(t+"").replace(np,function(t,e){return ip[e]})}function rp(t,e,n){function i(t){return t&&Mt(t)?t:"-"}function o(t){return null!=t&&!isNaN(t)&&isFinite(t)}var r="time"===e,a=t instanceof Date;if(r||a){var r=r?Ao(t):t;if(!isNaN(+r))return Bc(r,"{yyyy}-{MM}-{dd} {hh}:{mm}:{ss}",n);if(a)return"-"}return"ordinal"===e?ht(t)?i(t):ct(t)&&o(t)?t+"":"-":o(r=Po(t))?Qc(r):ht(t)?i(t):"-"}function ap(t,e){return"{"+t+(null==e?"":e)+"}"}var sp=["a","b","c","d","e","f","g"];function lp(t,e,n){var i=(e=F(e)?e:[e]).length;if(!i)return"";for(var o=e[0].$vars||[],r=0;r<o.length;r++){var a=sp[r];t=t.replace(ap(a),ap(a,0))}for(var s=0;s<i;s++)for(var l=0;l<o.length;l++){var u=e[s][o[l]];t=t.replace(ap(sp[l],s),n?op(u):u)}return t}function up(t,e){var t=D(t)?{color:t,extraCssText:e}:t||{},n=t.color,i=t.type,o=(e=t.extraCssText,t.renderMode||"html");return n?"html"===o?"subItem"===i?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+op(n)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+op(n)+";"+(e||"")+'"></span>':{renderMode:o,content:"{"+(t.markerId||"markerX")+"|} ",style:"subItem"===i?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}:""}function hp(t,e){return e=e||"transparent",D(t)?t:k(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}function cp(t,e){var n;"_blank"===e||"blank"===e?((n=window.open()).opener=null,n.location.href=t):window.open(t,e)}var pp=N,dp=["left","right","top","bottom","width","height"],fp=[["width","left","right"],["height","top","bottom"]];function gp(a,s,l,u,h){var c=0,p=0,d=(null==u&&(u=1/0),null==h&&(h=1/0),0);s.eachChild(function(t,e){var n,i,o,r=t.getBoundingRect(),e=s.childAt(e+1),e=e&&e.getBoundingRect();d="horizontal"===a?(o=r.width+(e?-e.x+r.x:0),(n=c+o)>u||t.newline?(c=0,n=o,p+=d+l,r.height):Math.max(d,r.height)):(o=r.height+(e?-e.y+r.y:0),(i=p+o)>h||t.newline?(c+=d+l,p=0,i=o,r.width):Math.max(d,r.width)),t.newline||(t.x=c,t.y=p,t.markRedraw(),"horizontal"===a?c=n+l:p=i+l)})}var yp=gp;function mp(t,e,n){n=ep(n||0);var i=e.width,o=e.height,r=B(t.left,i),a=B(t.top,o),e=B(t.right,i),s=B(t.bottom,o),l=B(t.width,i),u=B(t.height,o),h=n[2]+n[0],c=n[1]+n[3],p=t.aspect;switch(isNaN(l)&&(l=i-e-c-r),isNaN(u)&&(u=o-s-h-a),null!=p&&(isNaN(l)&&isNaN(u)&&(i/o<p?l=.8*i:u=.8*o),isNaN(l)&&(l=p*u),isNaN(u))&&(u=l/p),isNaN(r)&&(r=i-e-l-c),isNaN(a)&&(a=o-s-u-h),t.left||t.right){case"center":r=i/2-l/2-n[3];break;case"right":r=i-l-c}switch(t.top||t.bottom){case"middle":case"center":a=o/2-u/2-n[0];break;case"bottom":a=o-u-h}r=r||0,a=a||0,isNaN(l)&&(l=i-c-r-(e||0)),isNaN(u)&&(u=o-h-a-(s||0));p=new R(r+n[3],a+n[0],l,u);return p.margin=n,p}function vp(t,e,n,i,o){var r,a,s=!o||!o.hv||o.hv[0],l=!o||!o.hv||o.hv[1],o=o&&o.boundingMode||"all";(s||l)&&("raw"===o?r="group"===t.type?new R(0,0,+e.width||0,+e.height||0):t.getBoundingRect():(r=t.getBoundingRect(),t.needLocalTransform()&&(a=t.getLocalTransform(),(r=r.clone()).applyTransform(a))),a=mp(V({width:r.width,height:r.height},e),n,i),e=s?a.x-r.x:0,n=l?a.y-r.y:0,"raw"===o?(t.x=e,t.y=n):(t.x+=e,t.y+=n),t.markRedraw())}function _p(t){t=t.layoutMode||t.constructor.layoutMode;return k(t)?t:t?{type:t}:null}function xp(l,u,t){var h=t&&t.ignoreSize,t=(F(h)||(h=[h,h]),n(fp[0],0)),e=n(fp[1],1);function n(t,e){var n={},i=0,o={},r=0;if(pp(t,function(t){o[t]=l[t]}),pp(t,function(t){c(u,t)&&(n[t]=o[t]=u[t]),p(n,t)&&i++,p(o,t)&&r++}),h[e])p(u,t[1])?o[t[2]]=null:p(u,t[2])&&(o[t[1]]=null);else if(2!==r&&i){if(!(2<=i))for(var a=0;a<t.length;a++){var s=t[a];if(!c(n,s)&&c(l,s)){n[s]=l[s];break}}return n}return o}function c(t,e){return t.hasOwnProperty(e)}function p(t,e){return null!=t[e]&&"auto"!==t[e]}function i(t,e,n){pp(t,function(t){e[t]=n[t]})}i(fp[0],l,t),i(fp[1],l,e)}function bp(t){return wp({},t)}function wp(e,n){return n&&e&&pp(dp,function(t){n.hasOwnProperty(t)&&(e[t]=n[t])}),e}M(gp,"vertical"),M(gp,"horizontal");var Sp,Mp,Tp,Cp,Ip=Ko(),g=(u(Ap,Sp=fc),Ap.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n)},Ap.prototype.mergeDefaultAndTheme=function(t,e){var n=_p(this),i=n?bp(t):{};p(t,e.getTheme().get(this.mainType)),p(t,this.getDefaultOption()),n&&xp(t,i,n)},Ap.prototype.mergeOption=function(t,e){p(this.option,t,!0);var n=_p(this);n&&xp(this.option,t,n)},Ap.prototype.optionUpdated=function(t,e){},Ap.prototype.getDefaultOption=function(){var t=this.constructor;if(!(e=t)||!e[sr])return t.defaultOption;var e=Ip(this);if(!e.defaultOption){for(var n=[],i=t;i;){var o=i.prototype.defaultOption;o&&n.push(o),i=i.superClass}for(var r={},a=n.length-1;0<=a;a--)r=p(r,n[a],!0);e.defaultOption=r}return e.defaultOption},Ap.prototype.getReferringComponents=function(t,e){var n=t+"Id";return nr(this.ecModel,t,{index:this.get(t+"Index",!0),id:this.get(n,!0)},e)},Ap.prototype.getBoxLayoutParams=function(){return{left:this.get("left"),top:this.get("top"),right:this.get("right"),bottom:this.get("bottom"),width:this.get("width"),height:this.get("height")}},Ap.protoInitialize=((Ku=Ap.prototype).type="component",Ku.id="",Ku.name="",Ku.mainType="",Ku.subType="",void(Ku.componentIndex=0)),Ap);function Ap(t,e,n){t=Sp.call(this,t,e,n)||this;return t.uid=mc("ec_cpt_model"),t}function Dp(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}hr(g,fc),fr(g),Cp={},(Tp=g).registerSubTypeDefaulter=function(t,e){t=lr(t);Cp[t.main]=e},Tp.determineSubType=function(t,e){var n,i=e.type;return i||(n=lr(t).main,Tp.hasSubTypes(t)&&Cp[n]&&(i=Cp[n](e))),i},Mp=function(t){var e=[];return N(g.getClassesByMainType(t),function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])}),e=j(e,function(t){return lr(t).main}),"dataset"!==t&&A(e,"dataset")<=0&&e.unshift("dataset"),e},g.topologicalTravel=function(t,e,n,i){if(t.length){c={},p=[],N(h=e,function(n){var e,i,o=Dp(c,n),t=(t=o.originalDeps=Mp(n),e=h,i=[],N(t,function(t){0<=A(e,t)&&i.push(t)}),i);o.entryCount=t.length,0===o.entryCount&&p.push(n),N(t,function(t){A(o.predecessor,t)<0&&o.predecessor.push(t);var e=Dp(c,t);A(e.successor,t)<0&&e.successor.push(n)})});var e={graph:c,noEntryList:p},o=e.graph,r=e.noEntryList,a={};for(N(t,function(t){a[t]=!0});r.length;){var s=r.pop(),l=o[s],u=!!a[s];u&&(n.call(i,s,l.originalDeps.slice()),delete a[s]),N(l.successor,u?f:d)}N(a,function(){throw new Error("")})}var h,c,p;function d(t){o[t].entryCount--,0===o[t].entryCount&&r.push(t)}function f(t){a[t]=!0,d(t)}};var cc="",mr=("undefined"!=typeof navigator&&(cc=navigator.platform||""),"rgba(0, 0, 0, 0.2)"),kp={darkMode:"auto",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:mr,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:mr,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:mr,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:mr,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:mr,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:mr,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:cc.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},Lp=L(["tooltip","label","itemName","itemId","seriesName"]),Pp="original",Op="arrayRows",Rp="objectRows",Np="keyedColumns",Ep="typedArray",Bp="unknown",zp="column",Vp="row",Fp={Must:1,Might:2,Not:3},Hp=Ko();function Gp(n,t,e){var o,i,r,a,s,l={},u=Up(t);return u&&n&&(r=[],a=[],t=t.ecModel,t=Hp(t).datasetMap,u=u.uid+"_"+e.seriesLayoutBy,N(n=n.slice(),function(t,e){t=k(t)?t:n[e]={name:t};"ordinal"===t.type&&null==o&&(o=e,i=c(t)),l[t.name]=[]}),s=t.get(u)||t.set(u,{categoryWayDim:i,valueWayDim:0}),N(n,function(t,e){var n,i=t.name,t=c(t);null==o?(n=s.valueWayDim,h(l[i],n,t),h(a,n,t),s.valueWayDim+=t):o===e?(h(l[i],0,t),h(r,0,t)):(n=s.categoryWayDim,h(l[i],n,t),h(a,n,t),s.categoryWayDim+=t)}),r.length&&(l.itemName=r),a.length)&&(l.seriesName=a),l;function h(t,e,n){for(var i=0;i<n;i++)t.push(e+i)}function c(t){t=t.dimsDef;return t?t.length:1}}function Wp(t,l,u){var h,c,p,e={};return Up(t)&&(c=l.sourceFormat,p=l.dimensionsDefine,c!==Rp&&c!==Np||N(p,function(t,e){"name"===(k(t)?t.name:t)&&(h=e)}),t=function(){for(var t={},e={},n=[],i=0,o=Math.min(5,u);i<o;i++){var r=Yp(l.data,c,l.seriesLayoutBy,p,l.startIndex,i),a=(n.push(r),r===Fp.Not);if(a&&null==t.v&&i!==h&&(t.v=i),null!=t.n&&t.n!==t.v&&(a||n[t.n]!==Fp.Not)||(t.n=i),s(t)&&n[t.n]!==Fp.Not)return t;a||(r===Fp.Might&&null==e.v&&i!==h&&(e.v=i),null!=e.n&&e.n!==e.v)||(e.n=i)}function s(t){return null!=t.v&&null!=t.n}return s(t)?t:s(e)?e:null}())&&(e.value=[t.v],t=null!=h?h:t.n,e.itemName=[t],e.seriesName=[t]),e}function Up(t){if(!t.get("data",!0))return nr(t.ecModel,"dataset",{index:t.get("datasetIndex",!0),id:t.get("datasetId",!0)},tr).models[0]}function Yp(t,e,n,i,o,r){var a,s,l;if(!dt(t)){if(i&&(k(i=i[r])?(s=i.name,l=i.type):D(i)&&(s=i)),null!=l)return"ordinal"===l?Fp.Must:Fp.Not;if(e===Op){var u=t;if(n===Vp){for(var h=u[r],c=0;c<(h||[]).length&&c<5;c++)if(null!=(a=m(h[o+c])))return a}else for(c=0;c<u.length&&c<5;c++){var p=u[o+c];if(p&&null!=(a=m(p[r])))return a}}else if(e===Rp){var d=t;if(!s)return Fp.Not;for(c=0;c<d.length&&c<5;c++)if((g=d[c])&&null!=(a=m(g[s])))return a}else if(e===Np){if(!s)return Fp.Not;if(!(h=t[s])||dt(h))return Fp.Not;for(c=0;c<h.length&&c<5;c++)if(null!=(a=m(h[c])))return a}else if(e===Pp)for(var f=t,c=0;c<f.length&&c<5;c++){var g=f[c],y=Ho(g);if(!F(y))return Fp.Not;if(null!=(a=m(y[r])))return a}}return Fp.Not;function m(t){var e=D(t);return null!=t&&isFinite(t)&&""!==t?e?Fp.Might:Fp.Not:e&&"-"!==t?Fp.Must:void 0}}var Xp=L();var Zp=Ko(),jp=(Ko(),qp.prototype.getColorFromPalette=function(t,e,n){var i=zo(this.get("color",!0)),o=this.get("colorLayer",!0),r=this,a=Zp;return a=a(e=e||r),r=a.paletteIdx||0,(e=a.paletteNameMap=a.paletteNameMap||{}).hasOwnProperty(t)?e[t]:(o=(o=null!=n&&o?function(t,e){for(var n=t.length,i=0;i<n;i++)if(t[i].length>e)return t[i];return t[n-1]}(o,n):i)||i)&&o.length?(n=o[r],t&&(e[t]=n),a.paletteIdx=(r+1)%o.length,n):void 0},qp.prototype.clearColorPalette=function(){var t,e;(e=Zp)(t=this).paletteIdx=0,e(t).paletteNameMap={}},qp);function qp(){}var Kp,$p,Jp,Qp,td="\0_ec_inner",ed=(u(r,Qp=fc),r.prototype.init=function(t,e,n,i,o,r){i=i||{},this.option=null,this._theme=new fc(i),this._locale=new fc(o),this._optionManager=r},r.prototype.setOption=function(t,e,n){e=od(e);this._optionManager.setOption(t,n,e),this._resetOption(null,e)},r.prototype.resetOption=function(t,e){return this._resetOption(t,od(e))},r.prototype._resetOption=function(t,e){var n,i=!1,o=this._optionManager;return t&&"recreate"!==t||(n=o.mountOption("recreate"===t),this.option&&"recreate"!==t?(this.restoreData(),this._mergeOption(n,e)):Jp(this,n),i=!0),"timeline"!==t&&"media"!==t||this.restoreData(),t&&"recreate"!==t&&"timeline"!==t||(n=o.getTimelineOption(this))&&(i=!0,this._mergeOption(n,e)),t&&"recreate"!==t&&"media"!==t||(n=o.getMediaOption(this)).length&&N(n,function(t){i=!0,this._mergeOption(t,e)},this),i},r.prototype.mergeOption=function(t){this._mergeOption(t,null)},r.prototype._mergeOption=function(i,t){var o=this.option,u=this._componentsMap,h=this._componentsCount,n=[],r=L(),c=t&&t.replaceMergeMainTypeMap;Hp(this).datasetMap=L(),N(i,function(t,e){null!=t&&(g.hasClass(e)?e&&(n.push(e),r.set(e,!0)):o[e]=null==o[e]?C(t):p(o[e],t,!0))}),c&&c.each(function(t,e){g.hasClass(e)&&!r.get(e)&&(n.push(e),r.set(e,!0))}),g.topologicalTravel(n,g.getAllClassMainTypes(),function(r){t=this,n=zo(i[e=r]);var t=(e=(e=Xp.get(e))&&e(t))?n.concat(e):n,e=u.get(r),n=Go(e,t,e?c&&c.get(r)?"replaceMerge":"normalMerge":"replaceAll"),a=(jo(n,r,g),o[r]=null,u.set(r,null),h.set(r,0),[]),s=[],l=0;N(n,function(t,e){var n=t.existing,i=t.newOption;if(i){var o=g.getClass(r,t.keyInfo.subType,!("series"===r));if(!o)return;n&&n.constructor===o?(n.name=t.keyInfo.name,n.mergeOption(i,this),n.optionUpdated(i,!1)):(e=I({componentIndex:e},t.keyInfo),I(n=new o(i,this,this,e),e),t.brandNew&&(n.__requireNewView=!0),n.init(i,this,this),n.optionUpdated(null,!0))}else n&&(n.mergeOption({},this),n.optionUpdated({},!1));n?(a.push(n.option),s.push(n),l++):(a.push(void 0),s.push(void 0))},this),o[r]=a,u.set(r,s),h.set(r,l),"series"===r&&Kp(this)},this),this._seriesIndices||Kp(this)},r.prototype.getOption=function(){var a=C(this.option);return N(a,function(t,e){if(g.hasClass(e)){for(var n=zo(t),i=n.length,o=!1,r=i-1;0<=r;r--)n[r]&&!Zo(n[r])?o=!0:(n[r]=null,o||i--);n.length=i,a[e]=n}}),delete a[td],a},r.prototype.getTheme=function(){return this._theme},r.prototype.getLocaleModel=function(){return this._locale},r.prototype.getLocale=function(t){return this.getLocaleModel().get(t)},r.prototype.setUpdatePayload=function(t){this._payload=t},r.prototype.getUpdatePayload=function(){return this._payload},r.prototype.getComponent=function(t,e){var n=this._componentsMap.get(t);if(n){t=n[e||0];if(t)return t;if(null==e)for(var i=0;i<n.length;i++)if(n[i])return n[i]}},r.prototype.queryComponents=function(t){var e,n,i,o,r,a=t.mainType;return a&&(n=t.index,i=t.id,o=t.name,r=this._componentsMap.get(a))&&r.length?(null!=n?(e=[],N(zo(n),function(t){r[t]&&e.push(r[t])})):e=null!=i?nd("id",i,r):null!=o?nd("name",o,r):st(r,function(t){return!!t}),id(e,t)):[]},r.prototype.findComponents=function(t){var e,n=t.query,i=t.mainType,o=(o=i+"Index",r=i+"Id",e=i+"Name",!n||null==n[o]&&null==n[r]&&null==n[e]?null:{mainType:i,index:n[o],id:n[r],name:n[e]}),r=id(o?this.queryComponents(o):st(this._componentsMap.get(i),function(t){return!!t}),t);return t.filter?st(r,t.filter):r},r.prototype.eachComponent=function(t,e,n){var i=this._componentsMap;if(ut(t)){var o=e,r=t;i.each(function(t,e){for(var n=0;t&&n<t.length;n++){var i=t[n];i&&r.call(o,e,i,i.componentIndex)}})}else for(var a=D(t)?i.get(t):k(t)?this.findComponents(t):null,s=0;a&&s<a.length;s++){var l=a[s];l&&e.call(n,l,l.componentIndex)}},r.prototype.getSeriesByName=function(t){var e=Yo(t,null);return st(this._componentsMap.get("series"),function(t){return!!t&&null!=e&&t.name===e})},r.prototype.getSeriesByIndex=function(t){return this._componentsMap.get("series")[t]},r.prototype.getSeriesByType=function(e){return st(this._componentsMap.get("series"),function(t){return!!t&&t.subType===e})},r.prototype.getSeries=function(){return st(this._componentsMap.get("series").slice(),function(t){return!!t})},r.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},r.prototype.eachSeries=function(n,i){$p(this),N(this._seriesIndices,function(t){var e=this._componentsMap.get("series")[t];n.call(i,e,t)},this)},r.prototype.eachRawSeries=function(e,n){N(this._componentsMap.get("series"),function(t){t&&e.call(n,t,t.componentIndex)})},r.prototype.eachSeriesByType=function(n,i,o){$p(this),N(this._seriesIndices,function(t){var e=this._componentsMap.get("series")[t];e.subType===n&&i.call(o,e,t)},this)},r.prototype.eachRawSeriesByType=function(t,e,n){return N(this.getSeriesByType(t),e,n)},r.prototype.isSeriesFiltered=function(t){return $p(this),null==this._seriesIndicesMap.get(t.componentIndex)},r.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},r.prototype.filterSeries=function(n,i){$p(this);var o=[];N(this._seriesIndices,function(t){var e=this._componentsMap.get("series")[t];n.call(i,e,t)&&o.push(t)},this),this._seriesIndices=o,this._seriesIndicesMap=L(o)},r.prototype.restoreData=function(n){Kp(this);var t=this._componentsMap,i=[];t.each(function(t,e){g.hasClass(e)&&i.push(e)}),g.topologicalTravel(i,g.getAllClassMainTypes(),function(e){N(t.get(e),function(t){!t||"series"===e&&function(t,e){{var n,i;if(e)return n=e.seriesIndex,i=e.seriesId,e=e.seriesName,null!=n&&t.componentIndex!==n||null!=i&&t.id!==i||null!=e&&t.name!==e}}(t,n)||t.restoreData()})})},r.internalField=(Kp=function(t){var e=t._seriesIndices=[];N(t._componentsMap.get("series"),function(t){t&&e.push(t.componentIndex)}),t._seriesIndicesMap=L(e)},$p=function(t){},void(Jp=function(t,e){t.option={},t.option[td]=1,t._componentsMap=L({series:[]}),t._componentsCount=L();var n,i,o=e.aria;k(o)&&null==o.enabled&&(o.enabled=!0),n=e,o=t._theme.option,i=n.color&&!n.colorLayer,N(o,function(t,e){"colorLayer"===e&&i||g.hasClass(e)||("object"==typeof t?n[e]=n[e]?p(n[e],t,!1):C(t):null==n[e]&&(n[e]=t))}),p(e,kp,!1),t._mergeOption(e,null)})),r);function r(){return null!==Qp&&Qp.apply(this,arguments)||this}function nd(e,t,n){var i,o;return F(t)?(i=L(),N(t,function(t){null!=t&&null!=Yo(t,null)&&i.set(t,!0)}),st(n,function(t){return t&&i.get(t[e])})):(o=Yo(t,null),st(n,function(t){return t&&null!=o&&t[e]===o}))}function id(t,e){return e.hasOwnProperty("subType")?st(t,function(t){return t&&t.subType===e.subType}):t}function od(t){var e=L();return t&&N(zo(t.replaceMerge),function(t){e.set(t,!0)}),{replaceMergeMainTypeMap:e}}ot(ed,jp);function rd(e){N(ad,function(t){this[t]=S(e[t],e)},this)}var ad=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],sd={},ld=(ud.prototype.create=function(n,i){var o=[];N(sd,function(t,e){t=t.create(n,i);o=o.concat(t||[])}),this._coordinateSystems=o},ud.prototype.update=function(e,n){N(this._coordinateSystems,function(t){t.update&&t.update(e,n)})},ud.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},ud.register=function(t,e){sd[t]=e},ud.get=function(t){return sd[t]},ud);function ud(){this._coordinateSystems=[]}var hd=/^(min|max)?(.+)$/,cd=(pd.prototype.setOption=function(t,e,n){t&&(N(zo(t.series),function(t){t&&t.data&&dt(t.data)&&Ct(t.data)}),N(zo(t.dataset),function(t){t&&t.source&&dt(t.source)&&Ct(t.source)})),t=C(t);var i,o,r,a,s,l,u,h,c,p,d=this._optionBackup,t=(i=e,o=!d,s=[],t=(e=t).baseOption,l=e.timeline,u=e.options,h=e.media,c=!!e.media,p=!!(u||l||t&&t.timeline),t?(a=t).timeline||(a.timeline=l):((p||c)&&(e.options=e.media=null),a=e),c&&F(h)&&N(h,function(t){t&&t.option&&(t.query?s.push(t):r=r||t)}),f(a),N(u,f),N(s,function(t){return f(t.option)}),{baseOption:a,timelineOptions:u||[],mediaDefault:r,mediaList:s});function f(e){N(i,function(t){t(e,o)})}this._newBaseOption=t.baseOption,d?(t.timelineOptions.length&&(d.timelineOptions=t.timelineOptions),t.mediaList.length&&(d.mediaList=t.mediaList),t.mediaDefault&&(d.mediaDefault=t.mediaDefault)):this._optionBackup=t},pd.prototype.mountOption=function(t){var e=this._optionBackup;return this._timelineOptions=e.timelineOptions,this._mediaList=e.mediaList,this._mediaDefault=e.mediaDefault,this._currentMediaIndices=[],C(t?e.baseOption:this._newBaseOption)},pd.prototype.getTimelineOption=function(t){var e,n=this._timelineOptions;return e=n.length&&(t=t.getComponent("timeline"))?C(n[t.getCurrentIndex()]):e},pd.prototype.getMediaOption=function(t){var e,n,i=this._api.getWidth(),o=this._api.getHeight(),r=this._mediaList,a=this._mediaDefault,s=[],l=[];if(r.length||a){for(var u=0,h=r.length;u<h;u++)!function(t,e,n){var i={width:e,height:n,aspectratio:e/n},o=!0;return N(t,function(t,e){var n,e=e.match(hd);e&&e[1]&&e[2]&&(n=e[1],e=e[2].toLowerCase(),e=i[e],t=t,("min"===(n=n)?t<=e:"max"===n?e<=t:e===t)||(o=!1))}),o}(r[u].query,i,o)||s.push(u);(s=!s.length&&a?[-1]:s).length&&(e=s,n=this._currentMediaIndices,e.join(",")!==n.join(","))&&(l=j(s,function(t){return C((-1===t?a:r[t]).option)})),this._currentMediaIndices=s}return l},pd);function pd(t){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=t}var dd=N,fd=k,gd=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function yd(t){var e=t&&t.itemStyle;if(e)for(var n=0,i=gd.length;n<i;n++){var o=gd[n],r=e.normal,a=e.emphasis;r&&r[o]&&(t[o]=t[o]||{},t[o].normal?p(t[o].normal,r[o]):t[o].normal=r[o],r[o]=null),a&&a[o]&&(t[o]=t[o]||{},t[o].emphasis?p(t[o].emphasis,a[o]):t[o].emphasis=a[o],a[o]=null)}}function md(t,e,n){var i,o;t&&t[e]&&(t[e].normal||t[e].emphasis)&&(i=t[e].normal,o=t[e].emphasis,i&&(n?(t[e].normal=t[e].emphasis=null,V(t[e],i)):t[e]=i),o)&&(t.emphasis=t.emphasis||{},(t.emphasis[e]=o).focus&&(t.emphasis.focus=o.focus),o.blurScope)&&(t.emphasis.blurScope=o.blurScope)}function vd(t){md(t,"itemStyle"),md(t,"lineStyle"),md(t,"areaStyle"),md(t,"label"),md(t,"labelLine"),md(t,"upperLabel"),md(t,"edgeLabel")}function _d(t,e){var n=fd(t)&&t[e],i=fd(n)&&n.textStyle;if(i)for(var o=0,r=Fo.length;o<r;o++){var a=Fo[o];i.hasOwnProperty(a)&&(n[a]=i[a])}}function xd(t){t&&(vd(t),_d(t,"label"),t.emphasis)&&_d(t.emphasis,"label")}function bd(t){return F(t)?t:t?[t]:[]}function wd(t){return(F(t)?t[0]:t)||{}}function Sd(e,t){dd(bd(e.series),function(t){if(fd(t))if(fd(t)){yd(t),vd(t),_d(t,"label"),_d(t,"upperLabel"),_d(t,"edgeLabel"),t.emphasis&&(_d(t.emphasis,"label"),_d(t.emphasis,"upperLabel"),_d(t.emphasis,"edgeLabel"));var e=t.markPoint,n=(e&&(yd(e),xd(e)),t.markLine),i=(n&&(yd(n),xd(n)),t.markArea),o=(i&&xd(i),t.data);if("graph"===t.type){var o=o||t.nodes,r=t.links||t.edges;if(r&&!dt(r))for(var a=0;a<r.length;a++)xd(r[a]);N(t.categories,function(t){vd(t)})}if(o&&!dt(o))for(a=0;a<o.length;a++)xd(o[a]);if((e=t.markPoint)&&e.data)for(var s=e.data,a=0;a<s.length;a++)xd(s[a]);if((n=t.markLine)&&n.data){var l=n.data;for(a=0;a<l.length;a++)F(l[a])?(xd(l[a][0]),xd(l[a][1])):xd(l[a])}"gauge"===t.type?(_d(t,"axisLabel"),_d(t,"title"),_d(t,"detail")):"treemap"===t.type?(md(t.breadcrumb,"itemStyle"),N(t.levels,function(t){vd(t)})):"tree"===t.type&&vd(t.leaves)}});var n=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&n.push("valueAxis","categoryAxis","logAxis","timeAxis"),dd(n,function(t){dd(bd(e[t]),function(t){t&&(_d(t,"axisLabel"),_d(t.axisPointer,"label"))})}),dd(bd(e.parallel),function(t){t=t&&t.parallelAxisDefault;_d(t,"axisLabel"),_d(t&&t.axisPointer,"label")}),dd(bd(e.calendar),function(t){md(t,"itemStyle"),_d(t,"dayLabel"),_d(t,"monthLabel"),_d(t,"yearLabel")}),dd(bd(e.radar),function(t){_d(t,"name"),t.name&&null==t.axisName&&(t.axisName=t.name,delete t.name),null!=t.nameGap&&null==t.axisNameGap&&(t.axisNameGap=t.nameGap,delete t.nameGap)}),dd(bd(e.geo),function(t){fd(t)&&(xd(t),dd(bd(t.regions),function(t){xd(t)}))}),dd(bd(e.timeline),function(t){xd(t),md(t,"label"),md(t,"itemStyle"),md(t,"controlStyle",!0);t=t.data;F(t)&&N(t,function(t){k(t)&&(md(t,"label"),md(t,"itemStyle"))})}),dd(bd(e.toolbox),function(t){md(t,"iconStyle"),dd(t.feature,function(t){md(t,"iconStyle")})}),_d(wd(e.axisPointer),"label"),_d(wd(e.tooltip).axisPointer,"label")}function Md(e){e&&N(Td,function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])})}var Td=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],Cd=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],Id=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function Ad(t){var e=t&&t.itemStyle;if(e)for(var n=0;n<Id.length;n++){var i=Id[n][1],o=Id[n][0];null!=e[i]&&(e[o]=e[i])}}function Dd(t){t&&"edge"===t.alignTo&&null!=t.margin&&null==t.edgeDistance&&(t.edgeDistance=t.margin)}function kd(t){t&&t.downplay&&!t.blur&&(t.blur=t.downplay)}function Ld(e,t){Sd(e,t),e.series=zo(e.series),N(e.series,function(t){if(k(t)){var e,n=t.type;if("line"===n)null!=t.clipOverflow&&(t.clip=t.clipOverflow);else if("pie"===n||"gauge"===n){if(null!=t.clockWise&&(t.clockwise=t.clockWise),Dd(t.label),(e=t.data)&&!dt(e))for(var i=0;i<e.length;i++)Dd(e[i]);null!=t.hoverOffset&&(t.emphasis=t.emphasis||{},t.emphasis.scaleSize=null)&&(t.emphasis.scaleSize=t.hoverOffset)}else if("gauge"===n){var o=function(t,e){for(var n=e.split(","),i=t,o=0;o<n.length&&null!=(i=i&&i[n[o]]);o++);return i}(t,"pointer.color");if(null!=o){var r=t;var a="itemStyle.color";var s=void 0;for(var l,u=a.split(","),h=r,c=0;c<u.length-1;c++)null==h[l=u[c]]&&(h[l]={}),h=h[l];!s&&null!=h[u[c]]||(h[u[c]]=o)}}else if("bar"===n){if(Ad(t),Ad(t.backgroundStyle),Ad(t.emphasis),(e=t.data)&&!dt(e))for(i=0;i<e.length;i++)"object"==typeof e[i]&&(Ad(e[i]),Ad(e[i]&&e[i].emphasis))}else"sunburst"===n?((a=t.highlightPolicy)&&(t.emphasis=t.emphasis||{},t.emphasis.focus||(t.emphasis.focus=a)),kd(t),function t(e,n){if(e)for(var i=0;i<e.length;i++)n(e[i]),e[i]&&t(e[i].children,n)}(t.data,kd)):"graph"===n||"sankey"===n?(r=t)&&null!=r.focusNodeAdjacency&&(r.emphasis=r.emphasis||{},null==r.emphasis.focus)&&(r.emphasis.focus="adjacency"):"map"===n&&(t.mapType&&!t.map&&(t.map=t.mapType),t.mapLocation)&&V(t,t.mapLocation);null!=t.hoverAnimation&&(t.emphasis=t.emphasis||{},t.emphasis)&&null==t.emphasis.scale&&(t.emphasis.scale=t.hoverAnimation),Md(t)}}),e.dataRange&&(e.visualMap=e.dataRange),N(Cd,function(t){t=e[t];t&&N(t=F(t)?t:[t],function(t){Md(t)})})}function Pd(g){N(g,function(u,h){var c=[],p=[NaN,NaN],t=[u.stackResultDimension,u.stackedOverDimension],d=u.data,f=u.isStackedByIndex,t=d.map(t,function(t,e,n){var i,o,r=d.get(u.stackedDimension,n);if(isNaN(r))return p;f?o=d.getRawIndex(n):i=d.get(u.stackedByDimension,n);for(var a=NaN,s=h-1;0<=s;s--){var l=g[s];if(0<=(o=f?o:l.data.rawIndexOf(l.stackedByDimension,i))){l=l.data.getByRawIndex(l.stackResultDimension,o);if(0<=r&&0<l||r<=0&&l<0){r+=l,a=l;break}}}return c[0]=r,c[1]=a,c});d.hostModel.setData(t),u.data=t})}var Od,Rd,Nd=function(t){this.data=t.data||(t.sourceFormat===Np?{}:[]),this.sourceFormat=t.sourceFormat||Bp,this.seriesLayoutBy=t.seriesLayoutBy||zp,this.startIndex=t.startIndex||0,this.dimensionsDefine=t.dimensionsDefine,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.encodeDefine=t.encodeDefine,this.metaRawOption=t.metaRawOption};function Ed(t){return t instanceof Nd}function Bd(t,e,n,i){n=n||Fd(t);var o=e.seriesLayoutBy,r=function(t,e,n,i,o){var r,a;if(!t)return{dimensionsDefine:Hd(o),startIndex:a,dimensionsDetectedCount:r};{var s;e===Op?(s=t,"auto"===i||null==i?Gd(function(t){null!=t&&"-"!==t&&(D(t)?null==a&&(a=1):a=0)},n,s,10):a=ct(i)?i:i?1:0,o||1!==a||(o=[],Gd(function(t,e){o[e]=null!=t?t+"":""},n,s,1/0)),r=o?o.length:n===Vp?s.length:s[0]?s[0].length:null):e===Rp?o=o||function(t){for(var e,n=0;n<t.length&&!(e=t[n++]););{var i;if(e)return i=[],N(e,function(t,e){i.push(e)}),i}}(t):e===Np?o||(o=[],N(t,function(t,e){o.push(e)})):e===Pp&&(i=Ho(t[0]),r=F(i)&&i.length||1)}return{startIndex:a,dimensionsDefine:Hd(o),dimensionsDetectedCount:r}}(t,n,o,e.sourceHeader,e.dimensions);return new Nd({data:t,sourceFormat:n,seriesLayoutBy:o,dimensionsDefine:r.dimensionsDefine,startIndex:r.startIndex,dimensionsDetectedCount:r.dimensionsDetectedCount,encodeDefine:Vd(i),metaRawOption:C(e)})}function zd(t){return new Nd({data:t,sourceFormat:dt(t)?Ep:Pp})}function Vd(t){return t?L(t):null}function Fd(t){var e=Bp;if(dt(t))e=Ep;else if(F(t)){0===t.length&&(e=Op);for(var n=0,i=t.length;n<i;n++){var o=t[n];if(null!=o){if(F(o)){e=Op;break}if(k(o)){e=Rp;break}}}}else if(k(t))for(var r in t)if(_(t,r)&&rt(t[r])){e=Np;break}return e}function Hd(t){var i;if(t)return i=L(),j(t,function(t,e){var n,t={name:(t=k(t)?t:{name:t}).name,displayName:t.displayName,type:t.type};return null!=t.name&&(t.name+="",null==t.displayName&&(t.displayName=t.name),(n=i.get(t.name))?t.name+="-"+n.count++:i.set(t.name,{count:1})),t})}function Gd(t,e,n,i){if(e===Vp)for(var o=0;o<n.length&&o<i;o++)t(n[o]?n[o][0]:null,o);else for(var r=n[0]||[],o=0;o<r.length&&o<i;o++)t(r[o],o)}Zd.prototype.getSource=function(){return this._source},Zd.prototype.count=function(){return 0},Zd.prototype.getItem=function(t,e){},Zd.prototype.appendData=function(t){},Zd.prototype.clean=function(){},Zd.protoInitialize=((n=Zd.prototype).pure=!1,void(n.persistent=!0)),Zd.internalField=(Rd=function(t,e,n){var i,o=n.sourceFormat,r=n.seriesLayoutBy,a=n.startIndex,n=n.dimensionsDefine;I(t,Od[rf(o,r)]),o===Ep?(t.getItem=Wd,t.count=Yd,t.fillStorage=Ud):(i=$d(o,r),t.getItem=S(i,null,e,a,n),i=tf(o,r),t.count=S(i,null,e,a,n))},Wd=function(t,e){t-=this._offset,e=e||[];for(var n=this._data,i=this._dimSize,o=i*t,r=0;r<i;r++)e[r]=n[o+r];return e},Ud=function(t,e,n,i){for(var o=this._data,r=this._dimSize,a=0;a<r;a++){for(var s=i[a],l=null==s[0]?1/0:s[0],u=null==s[1]?-1/0:s[1],h=e-t,c=n[a],p=0;p<h;p++){var d=o[p*r+a];(c[t+p]=d)<l&&(l=d),u<d&&(u=d)}s[0]=l,s[1]=u}},Yd=function(){return this._data?this._data.length/this._dimSize:0},(n={})[Op+"_"+zp]={pure:!0,appendData:jd},n[Op+"_"+Vp]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},n[Rp]={pure:!0,appendData:jd},n[Np]={pure:!0,appendData:function(t){var o=this._data;N(t,function(t,e){for(var n=o[e]||(o[e]=[]),i=0;i<(t||[]).length;i++)n.push(t[i])})}},n[Pp]={appendData:jd},n[Ep]={persistent:!1,pure:!0,appendData:function(t){this._data=t},clean:function(){this._offset+=this.count(),this._data=null}},void(Od=n));var Wd,Ud,Yd,Xd=Zd;function Zd(t,e){var t=Ed(t)?t:zd(t),n=(this._source=t,this._data=t.data);t.sourceFormat===Ep&&(this._offset=0,this._dimSize=e,this._data=n),Rd(this,n,t)}function jd(t){for(var e=0;e<t.length;e++)this._data.push(t[e])}function qd(t,e,n,i){return t[i]}(Lc={})[Op+"_"+zp]=function(t,e,n,i){return t[i+e]},Lc[Op+"_"+Vp]=function(t,e,n,i){i+=e;for(var o=[],r=t,a=0;a<r.length;a++){var s=r[a];o.push(s?s[i]:null)}return o},Lc[Rp]=qd,Lc[Np]=function(t,e,n,i){for(var o=[],r=0;r<n.length;r++){var a=t[n[r].name];o.push(a?a[i]:null)}return o},Lc[Pp]=qd;var Kd=Lc;function $d(t,e){return Kd[rf(t,e)]}function Jd(t,e,n){return t.length}(Ku={})[Op+"_"+zp]=function(t,e,n){return Math.max(0,t.length-e)},Ku[Op+"_"+Vp]=function(t,e,n){t=t[0];return t?Math.max(0,t.length-e):0},Ku[Rp]=Jd,Ku[Np]=function(t,e,n){t=t[n[0].name];return t?t.length:0},Ku[Pp]=Jd;var Qd=Ku;function tf(t,e){return Qd[rf(t,e)]}function ef(t,e,n){return null!=e?t[e]:t}(mr={})[Op]=ef,mr[Rp]=function(t,e,n){return null!=e?t[n]:t},mr[Np]=ef,mr[Pp]=function(t,e,n){t=Ho(t);return null!=e&&t instanceof Array?t[e]:t},mr[Ep]=ef;var nf=mr;function of(t){return nf[t]}function rf(t,e){return t===Op?t+"_"+e:t}function af(t,e,n){if(t){var i,o,r,e=t.getRawDataItem(e);if(null!=e)return r=t.getProvider().getSource().sourceFormat,(t=t.getDimensionInfo(n))&&(i=t.name,o=t.index),of(r)(e,o,i)}}var sf=/\{@(.+?)\}/g,cc=(lf.prototype.getDataParams=function(t,e){var n=this.getData(e),i=this.getRawValue(t,e),o=n.getRawIndex(t),r=n.getName(t),a=n.getRawDataItem(t),s=n.getItemVisual(t,"style"),t=s&&s[n.getItemVisual(t,"drawType")||"fill"],s=s&&s.stroke,l=this.mainType,u="series"===l,n=n.userOutput;return{componentType:l,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:u?this.subType:null,seriesIndex:this.seriesIndex,seriesId:u?this.id:null,seriesName:u?this.name:null,name:r,dataIndex:o,data:a,dataType:e,value:i,color:t,borderColor:s,dimensionNames:n?n.dimensionNames:null,encode:n?n.encode:null,$vars:["seriesName","name","value"]}},lf.prototype.getFormattedLabel=function(i,t,e,n,o,r){t=t||"normal";var a=this.getData(e),e=this.getDataParams(i,e);return r&&(e.value=r.interpolatedValue),null!=n&&F(e.value)&&(e.value=e.value[n]),"function"==typeof(o=o||a.getItemModel(i).get("normal"===t?["label","formatter"]:[t,"label","formatter"]))?(e.status=t,e.dimensionIndex=n,o(e)):"string"==typeof o?lp(o,e).replace(sf,function(t,e){var n=e.length,n="["===e.charAt(0)&&"]"===e.charAt(n-1)?+e.slice(1,n-1):e,e=af(a,i,n);return null!=(e=r&&F(r.interpolatedValue)&&(n=a.getDimensionInfo(n))?r.interpolatedValue[n.index]:e)?e+"":""}):void 0},lf.prototype.getRawValue=function(t,e){return af(this.getData(e),t)},lf.prototype.formatTooltip=function(t,e,n){},lf);function lf(){}function uf(t){var e,n;return k(t)?t.type&&(n=t):e=t,{markupText:e,markupFragment:n}}function hf(t){return new cf(t)}pf.prototype.perform=function(t){var e,n=this._upstream,i=t&&t.skip;this._dirty&&n&&((r=this.context).data=r.outputData=n.context.outputData),this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!i&&(e=this._plan(this.context));var o,r=u(this._modBy),a=this._modDataCount||0,s=u(t&&t.modBy),l=t&&t.modDataCount||0;function u(t){return t=1<=t?t:1}r===s&&a===l||(e="reset"),!this._dirty&&"reset"!==e||(this._dirty=!1,o=this._doReset(i)),this._modBy=s,this._modDataCount=l;r=t&&t.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var h=this._dueIndex,c=Math.min(null!=r?this._dueIndex+r:1/0,this._dueEnd);if(!i&&(o||h<c)){var p=this._progress;if(F(p))for(var d=0;d<p.length;d++)this._doProgress(p[d],h,c,s,l);else this._doProgress(p,h,c,s,l)}this._dueIndex=c;a=null!=this._settedOutputEnd?this._settedOutputEnd:c;this._outputDueEnd=a}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()},pf.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},pf.prototype._doProgress=function(t,e,n,i,o){_f.reset(e,n,i,o),this._callingProgress=t,this._callingProgress({start:e,end:n,count:n-e,next:_f.next},this.context)},pf.prototype._doReset=function(t){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null,!t&&this._reset&&((e=this._reset(this.context))&&e.progress&&(n=e.forceFirstProgress,e=e.progress),F(e))&&!e.length&&(e=null),this._progress=e,this._modBy=this._modDataCount=null;var e,n,t=this._downstream;return t&&t.dirty(),n},pf.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},pf.prototype.pipe=function(t){this._downstream===t&&!this._dirty||((this._downstream=t)._upstream=this,t.dirty())},pf.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},pf.prototype.getUpstream=function(){return this._upstream},pf.prototype.getDownstream=function(){return this._downstream},pf.prototype.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t};var cf=pf;function pf(t){this._reset=(t=t||{}).reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}var df,ff,gf,yf,mf,vf,_f=vf={reset:function(t,e,n,i){ff=t,df=e,gf=n,yf=i,mf=Math.ceil(yf/gf),vf.next=1<gf&&0<yf?bf:xf}};function xf(){return ff<df?ff++:null}function bf(){var t=ff%mf*gf+Math.ceil(ff/mf),t=df<=ff?null:t<yf?t:ff;return ff++,t}function wf(t,e){var n=e&&e.type;return"ordinal"===n?(e=e&&e.ordinalMeta)?e.parseAndCollect(t):t:null==(t="time"===n&&"number"!=typeof t&&null!=t&&"-"!==t?+Ao(t):t)||""===t?NaN:+t}var Sf=L({number:function(t){return parseFloat(t)},time:function(t){return+Ao(t)},trim:function(t){return"string"==typeof t?Mt(t):t}});function Mf(t){return Sf.get(t)}var Tf={lt:function(t,e){return t<e},lte:function(t,e){return t<=e},gt:function(t,e){return e<t},gte:function(t,e){return e<=t}},Cf=(Df.prototype.evaluate=function(t){return"number"==typeof t?this._opFn(t,this._rvalFloat):this._opFn(Po(t),this._rvalFloat)},Df),If=(Af.prototype.evaluate=function(t,e){var n=typeof t,i=typeof e,o="number"==n?t:Po(t),r="number"==i?e:Po(e),a=isNaN(o),s=isNaN(r);return a&&(o=this._incomparable),s&&(r=this._incomparable),a&&s&&(a="string"==i,(s="string"==n)&&(o=a?t:0),a)&&(r=s?e:0),o<r?this._resultLT:r<o?-this._resultLT:0},Af);function Af(t,e){t="desc"===t;this._resultLT=t?1:-1,this._incomparable="min"===(e=null==e?t?"min":"max":e)?-1/0:1/0}function Df(t,e){"number"!=typeof e&&f(""),this._opFn=Tf[t],this._rvalFloat=Po(e)}Lf.prototype.evaluate=function(t){var e,n=t===this._rval;return n||(e=typeof t)===this._rvalTypeof||"number"!=e&&"number"!==this._rvalTypeof||(n=Po(t)===this._rvalFloat),this._isEQ?n:!n};var kf=Lf;function Lf(t,e){this._rval=e,this._isEQ=t,this._rvalTypeof=typeof e,this._rvalFloat=Po(e)}Of.prototype.getRawData=function(){throw new Error("not supported")},Of.prototype.getRawDataItem=function(t){throw new Error("not supported")},Of.prototype.cloneRawData=function(){},Of.prototype.getDimensionInfo=function(t){},Of.prototype.cloneAllDimensionInfo=function(){},Of.prototype.count=function(){},Of.prototype.retrieveValue=function(t,e){},Of.prototype.retrieveValueFromItem=function(t,e){},Of.prototype.convertValue=wf;var Pf=Of;function Of(){}function Rf(t){return Ff(t.sourceFormat)||f(""),t.data}function Nf(t){var e=t.sourceFormat,n=t.data;if(Ff(e)||f(""),e===Op){for(var i=[],o=0,r=n.length;o<r;o++)i.push(n[o].slice());return i}if(e===Rp){for(i=[],o=0,r=n.length;o<r;o++)i.push(I({},n[o]));return i}}function Ef(t,e,n){if(null!=n)return"number"==typeof n||!isNaN(n)&&!_(e,n)?t[n]:_(e,n)?e[n]:void 0}function Bf(t){return C(t)}var zf=L();function Vf(t,e){var n=zo(t),t=n.length;t||f("");for(var i=0,o=t;i<o;i++)e=function(t,i){i.length||f(""),k(t)||f("");var e=t.type,d=zf.get(e),e=(d||f(""),j(i,function(t){var e=t,t=d,n=new Pf,i=e.data,o=n.sourceFormat=e.sourceFormat,r=e.startIndex,a=(e.seriesLayoutBy!==zp&&f(""),[]),s={};if(h=e.dimensionsDefine)N(h,function(t,e){var n=t.name,e={index:e,name:n,displayName:t.displayName};a.push(e),null!=n&&(_(s,n)&&f(""),s[n]=e)});else for(var l=0;l<e.dimensionsDetectedCount;l++)a.push({index:l});var u=$d(o,zp),h=(t.__isBuiltIn&&(n.getRawDataItem=function(t){return u(i,r,a,t)},n.getRawData=S(Rf,null,e)),n.cloneRawData=S(Nf,null,e),tf(o,zp)),c=(n.count=S(h,null,i,r,a),of(o)),p=(n.retrieveValue=function(t,e){t=u(i,r,a,t);return p(t,e)},n.retrieveValueFromItem=function(t,e){var n;return null!=t&&(n=a[e])?c(t,e,n.name):void 0});return n.getDimensionInfo=S(Ef,null,a,s),n.cloneAllDimensionInfo=S(Bf,null,a),n}));return j(zo(d.transform({upstream:e[0],upstreamList:e,config:C(t.config)})),function(t,e){k(t)||f(""),t.data||f(""),Ff(Fd(t.data))||f("");var n=i[0],e=n&&0===e&&!t.dimensions?((e=n.startIndex)&&(t.data=n.data.slice(0,e).concat(t.data)),{seriesLayoutBy:zp,sourceHeader:e,dimensions:n.metaRawOption.dimensions}):{seriesLayoutBy:zp,sourceHeader:0,dimensions:t.dimensions};return Bd(t.data,e,null,null)})}(n[i],e),i!==o-1&&(e.length=Math.max(e.length,1));return e}function Ff(t){return t===Op||t===Rp}Gf.prototype.dirty=function(){this._setLocalSource([],[])},Gf.prototype._setLocalSource=function(t,e){this._sourceList=t,this._upstreamSignList=e,this._versionSignBase++,9e10<this._versionSignBase&&(this._versionSignBase=0)},Gf.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},Gf.prototype.prepareSource=function(){this._isDirty()&&this._createSource()},Gf.prototype._createSource=function(){this._setLocalSource([],[]);var t,e,n,i,o,r,a=this._sourceHost,s=this._getUpstreamSourceManagers(),l=!!s.length;Uf(a)?(t=a,r=e=i=void 0,n=l?((n=s[0]).prepareSource(),i=(r=n.getSource()).data,e=r.sourceFormat,[n._getVersionSign()]):(e=dt(i=t.get("data",!0))?Ep:Pp,[]),o=this._getSourceMetaRawOption(),r=r?r.metaRawOption:null,i=[Bd(i,{seriesLayoutBy:P(o.seriesLayoutBy,r?r.seriesLayoutBy:null),sourceHeader:P(o.sourceHeader,r?r.sourceHeader:null),dimensions:P(o.dimensions,r?r.dimensions:null)},e,t.get("encode",!0))]):(o=a,n=l?(i=(r=this._applyTransform(s)).sourceList,r.upstreamSignList):(i=[Bd(o.get("source",!0),this._getSourceMetaRawOption(),null,null)],[])),this._setLocalSource(i,n)},Gf.prototype._applyTransform=function(t){var e,n=this._sourceHost,i=n.get("transform",!0),o=n.get("fromTransformResult",!0),r=(null!=o&&1!==t.length&&Yf(""),[]),a=[];return N(t,function(t){t.prepareSource();var e=t.getSource(o||0);null==o||e||Yf(""),r.push(e),a.push(t._getVersionSign())}),i?e=Vf(i,r,n.componentIndex):null!=o&&(e=[new Nd({data:(t=r[0]).data,sourceFormat:t.sourceFormat,seriesLayoutBy:t.seriesLayoutBy,dimensionsDefine:C(t.dimensionsDefine),startIndex:t.startIndex,dimensionsDetectedCount:t.dimensionsDetectedCount,encodeDefine:Vd(t.encodeDefine)})]),{sourceList:e,upstreamSignList:a}},Gf.prototype._isDirty=function(){if(!this._sourceList.length)return!0;for(var t=this._getUpstreamSourceManagers(),e=0;e<t.length;e++){var n=t[e];if(n._isDirty()||this._upstreamSignList[e]!==n._getVersionSign())return!0}},Gf.prototype.getSource=function(t){return this._sourceList[t||0]},Gf.prototype._getUpstreamSourceManagers=function(){var t,e=this._sourceHost;return Uf(e)?(t=Up(e))?[t.getSourceManager()]:[]:j((t=e).get("transform",!0)||t.get("fromTransformResult",!0)?nr(t.ecModel,"dataset",{index:t.get("fromDatasetIndex",!0),id:t.get("fromDatasetId",!0)},tr).models:[],function(t){return t.getSourceManager()})},Gf.prototype._getSourceMetaRawOption=function(){var t,e,n,i=this._sourceHost;return Uf(i)?(t=i.get("seriesLayoutBy",!0),e=i.get("sourceHeader",!0),n=i.get("dimensions",!0)):this._getUpstreamSourceManagers().length||(t=(i=i).get("seriesLayoutBy",!0),e=i.get("sourceHeader",!0),n=i.get("dimensions",!0)),{seriesLayoutBy:t,sourceHeader:e,dimensions:n}};var Hf=Gf;function Gf(t){this._sourceList=[],this._upstreamSignList=[],this._versionSignBase=0,this._sourceHost=t}function Wf(t){t.option.transform&&Ct(t.option.transform)}function Uf(t){return"series"===t.mainType}function Yf(t){throw new Error(t)}var Xf="line-height:1";function Zf(t,e){var n=t.color||"#6e7079",i=t.fontSize||12,o=t.fontWeight||"400",r=t.color||"#464646",a=t.fontSize||14,t=t.fontWeight||"900";return"html"===e?{nameStyle:"font-size:"+op(i+"")+"px;color:"+op(n)+";font-weight:"+op(o+""),valueStyle:"font-size:"+op(a+"")+"px;color:"+op(r)+";font-weight:"+op(t+"")}:{nameStyle:{fontSize:i,fill:n,fontWeight:o},valueStyle:{fontSize:a,fill:r,fontWeight:t}}}var jf=[0,10,20,30],qf=["","\n","\n\n","\n\n\n"];function Kf(t,e){return e.type=t,e}function $f(t){return _(Jf,t.type)&&Jf[t.type]}var Jf={section:{planLayout:function(t){var e=t.blocks.length,n=1<e||0<e&&!t.noHeader,i=0;N(t.blocks,function(t){$f(t).planLayout(t);var e=t.__gapLevelBetweenSubBlocks;i<=e&&(i=e+(!n||e&&("section"!==t.type||t.noHeader)?0:1))}),t.__gapLevelBetweenSubBlocks=i},build:function(t,e,n,i){var o=e.noHeader,r=tg(e),a=function(n,t,e,i){var o=[],r=t.blocks||[],a=(St(!r||F(r)),r=r||[],n.orderMode);{var s,l;t.sortBlocks&&a&&(r=r.slice(),_(s={valueAsc:"asc",valueDesc:"desc"},a)?(l=new If(s[a],null),r.sort(function(t,e){return l.evaluate(t.sortParam,e.sortParam)})):"seriesDesc"===a&&r.reverse())}var u=tg(t);if(N(r,function(t,e){t=$f(t).build(n,t,0<e?u.html:0,i);null!=t&&o.push(t)}),o.length)return"richText"===n.renderMode?o.join(u.richText):eg(o.join(""),e)}(t,e,o?n:r.html,i);return o?a:(o=rp(e.header,"ordinal",t.useUTC),e=Zf(i,t.renderMode).nameStyle,"richText"===t.renderMode?ng(t,o,e)+r.richText+a:eg('<div style="'+e+";"+Xf+';">'+op(o)+"</div>"+a,n))}},nameValue:{planLayout:function(t){t.__gapLevelBetweenSubBlocks=0},build:function(t,e,n,i){var o,r,a,s,l=t.renderMode,u=e.noName,h=e.noValue,c=!e.markerType,p=e.name,d=e.value,f=t.useUTC;if(!u||!h)return o=c?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",l),p=u?"":rp(p,"ordinal",f),r=e.valueType,e=h?[]:F(d)?j(d,function(t,e){return rp(t,F(r)?r[e]:r,f)}):[rp(d,F(r)?r[0]:r,f)],d=!c||!u,a=!c&&u,i=Zf(i,l),s=i.nameStyle,i=i.valueStyle,"richText"===l?(c?"":o)+(u?"":ng(t,p,s))+(h?"":function(t,e,n,i,o){o=[o],i=i?10:20;return n&&o.push({padding:[0,0,0,i],align:"right"}),t.markupStyleCreator.wrapRichTextStyle(e.join(" "),o)}(t,e,d,a,i)):eg((c?"":o)+(u?"":'<span style="'+s+";"+(!c?"margin-left:2px":"")+'">'+op(p)+"</span>")+(h?"":(l=a,'<span style="'+(d?"float:right;margin-left:"+(l?"10px":"20px"):"")+";"+i+'">'+j(e,op).join("&nbsp;&nbsp;")+"</span>")),n)}}};function Qf(t,e,n,i,o,r){var a;if(t)return(a=$f(t)).planLayout(t),a.build({useUTC:o,renderMode:n,orderMode:i,markupStyleCreator:e},t,0,r)}function tg(t){t=t.__gapLevelBetweenSubBlocks;return{html:jf[t],richText:qf[t]}}function eg(t,e){return'<div style="margin: '+e+"px 0 0;"+Xf+';">'+t+'<div style="clear:both"></div></div>'}function ng(t,e,n){return t.markupStyleCreator.wrapRichTextStyle(e,n)}function ig(t,e){t=t.get("padding");return null!=t?t:"richText"===e?[8,10]:10}rg.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},rg.prototype.makeTooltipMarker=function(t,e,n){var i="richText"===n?this._generateStyleName():null,e=up({color:e,type:t,renderMode:n,markerId:i});return D(e)?e:(this.richTextStyles[i]=e.style,e.content)},rg.prototype.wrapRichTextStyle=function(t,e){var n={},e=(F(e)?N(e,function(t){return I(n,t)}):I(n,e),this._generateStyleName());return this.richTextStyles[e]=n,"{"+e+"|"+t+"}"};var og=rg;function rg(){this.richTextStyles={},this._nextStyleNameId=Ro()}function ag(t){var e,n,i,o,r,a,s,l,u,h,c,p=t.series,d=t.dataIndex,t=t.multipleSeries,f=p.getData(),g=f.mapDimensionsAll("defaultedTooltip"),y=g.length,m=p.getRawValue(d),v=F(m),_=(_=d,hp((b=p).getData().getItemVisual(_,"style")[b.visualDrawType]));function x(t,e){e=s.getDimensionInfo(e);e&&!1!==e.otherDims.tooltip&&(l?c.push(Kf("nameValue",{markerType:"subItem",markerColor:a,name:e.displayName,value:t,valueType:e.type})):(u.push(t),h.push(e.type)))}1<y||v&&!y?(b=m,o=d,r=g,a=_,s=p.getData(),l=at(b,function(t,e,n){n=s.getDimensionInfo(n);return t||n&&!1!==n.tooltip&&null!=n.displayName},!1),u=[],h=[],c=[],r.length?N(r,function(t){x(af(s,o,t),t)}):N(b,x),e=(r={inlineValues:u,inlineValueTypes:h,blocks:c}).inlineValueTypes,n=r.blocks,i=(r=r.inlineValues)[0]):y?(b=f.getDimensionInfo(g[0]),i=r=af(f,d,g[0]),e=b.type):i=r=v?m[0]:m;var y=Xo(p),g=y&&p.name||"",b=f.getName(d),v=t?g:b;return Kf("section",{header:g,noHeader:t||!y,sortParam:i,blocks:[Kf("nameValue",{markerType:"item",markerColor:_,name:v,noName:!Mt(v),value:r,valueType:e})].concat(n||[])})}var sg=Ko();function lg(t,e){return t.getName(e)||t.getId(e)}u(cg,ug=g),cg.prototype.init=function(t,e,n){this.seriesIndex=this.componentIndex,this.dataTask=hf({count:dg,reset:fg}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n),(sg(this).sourceManager=new Hf(this)).prepareSource();t=this.getInitialData(t,n);yg(t,this),this.dataTask.context.data=t,sg(this).dataBeforeProcessed=t,pg(this),this._initSelectedMapFromData(t)},cg.prototype.mergeDefaultAndTheme=function(t,e){var n=_p(this),i=n?bp(t):{},o=this.subType;g.hasClass(o),p(t,e.getTheme().get(this.subType)),p(t,this.getDefaultOption()),Vo(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&xp(t,i,n)},cg.prototype.mergeOption=function(t,e){t=p(this.option,t,!0),this.fillDataTextStyle(t.data);var n=_p(this),n=(n&&xp(this.option,t,n),sg(this).sourceManager),n=(n.dirty(),n.prepareSource(),this.getInitialData(t,e));yg(n,this),this.dataTask.dirty(),this.dataTask.context.data=n,sg(this).dataBeforeProcessed=n,pg(this),this._initSelectedMapFromData(n)},cg.prototype.fillDataTextStyle=function(t){if(t&&!dt(t))for(var e=["show"],n=0;n<t.length;n++)t[n]&&t[n].label&&Vo(t[n],"label",e)},cg.prototype.getInitialData=function(t,e){},cg.prototype.appendData=function(t){this.getRawData().appendData(t.data)},cg.prototype.getData=function(t){var e=vg(this);return e?(e=e.context.data,null==t?e:e.getLinkedData(t)):sg(this).data},cg.prototype.getAllData=function(){var t=this.getData();return t&&t.getLinkedDataAll?t.getLinkedDataAll():[{data:t}]},cg.prototype.setData=function(t){var e,n=vg(this);n&&((e=n.context).outputData=t,n!==this.dataTask)&&(e.data=t),sg(this).data=t},cg.prototype.getSource=function(){return sg(this).sourceManager.getSource()},cg.prototype.getRawData=function(){return sg(this).dataBeforeProcessed},cg.prototype.getBaseAxis=function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},cg.prototype.formatTooltip=function(t,e,n){return ag({series:this,dataIndex:t,multipleSeries:e})},cg.prototype.isAnimationEnabled=function(){var t;return!w.node&&!!(t=(t=this.getShallow("animation"))&&this.getData().count()>this.getShallow("animationThreshold")?!1:t)},cg.prototype.restoreData=function(){this.dataTask.dirty()},cg.prototype.getColorFromPalette=function(t,e,n){var i=this.ecModel;return jp.prototype.getColorFromPalette.call(this,t,e,n)||i.getColorFromPalette(t,e,n)},cg.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},cg.prototype.getProgressive=function(){return this.get("progressive")},cg.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},cg.prototype.select=function(t,e){this._innerSelect(this.getData(e),t)},cg.prototype.unselect=function(t,e){var n=this.option.selectedMap;if(n)for(var i=this.getData(e),o=0;o<t.length;o++){var r=lg(i,t[o]);n[r]=!1,this._selectedDataIndicesMap[r]=-1}},cg.prototype.toggleSelect=function(t,e){for(var n=[],i=0;i<t.length;i++)n[0]=t[i],this.isSelected(t[i],e)?this.unselect(n,e):this.select(n,e)},cg.prototype.getSelectedDataIndices=function(){for(var t=this._selectedDataIndicesMap,e=lt(t),n=[],i=0;i<e.length;i++){var o=t[e[i]];0<=o&&n.push(o)}return n},cg.prototype.isSelected=function(t,e){var n=this.option.selectedMap;return n&&n[lg(this.getData(e),t)]||!1},cg.prototype._innerSelect=function(t,e){var n,i,o=this.option.selectedMode,r=e.length;if(o&&r)if("multiple"===o)for(var a=this.option.selectedMap||(this.option.selectedMap={}),s=0;s<r;s++){var l=e[s];a[i=lg(t,l)]=!0,this._selectedDataIndicesMap[i]=t.getRawIndex(l)}else"single"!==o&&!0!==o||(i=lg(t,o=e[r-1]),this.option.selectedMap=((n={})[i]=!0,n),this._selectedDataIndicesMap=((n={})[i]=t.getRawIndex(o),n))},cg.prototype._initSelectedMapFromData=function(n){var i;this.option.selectedMap||(i=[],n.hasItemOption&&n.each(function(t){var e=n.getRawDataItem(t);e&&e.selected&&i.push(t)}),0<i.length&&this._innerSelect(n,i))},cg.registerClass=function(t){return g.registerClass(t)},cg.protoInitialize=((n=cg.prototype).type="series.__base__",n.seriesIndex=0,n.useColorPaletteOnData=!1,n.ignoreStyleOnData=!1,n.hasSymbolVisual=!1,n.defaultSymbol="circle",n.visualStyleAccessPath="itemStyle",void(n.visualDrawType="fill"));var ug,hg=cg;function cg(){var t=null!==ug&&ug.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}function pg(t){var e,n,i=t.name;Xo(t)||(t.name=(t=(e=(t=t).getRawData()).mapDimensionsAll("seriesName"),n=[],N(t,function(t){t=e.getDimensionInfo(t);t.displayName&&n.push(t.displayName)}),n.join(" ")||i))}function dg(t){return t.model.getRawData().count()}function fg(t){t=t.model;return t.setData(t.getRawData().cloneShallow()),gg}function gg(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function yg(e,n){N(m(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(t){e.wrapMethod(t,M(mg,n))})}function mg(t,e){t=vg(t);return t&&t.setOutputEnd((e||this).count()),e}function vg(t){var e,n=(t.ecModel||{}).scheduler,n=n&&n.getPipeline(t.uid);if(n)return(n=n.currentTask)&&(e=n.agentStubMap)?e.get(t.uid):n}ot(hg,cc),ot(hg,jp),hr(hg,g);xg.prototype.init=function(t,e){},xg.prototype.render=function(t,e,n,i){},xg.prototype.dispose=function(t,e){},xg.prototype.updateView=function(t,e,n,i){},xg.prototype.updateLayout=function(t,e,n,i){},xg.prototype.updateVisual=function(t,e,n,i){},xg.prototype.blurSeries=function(t,e){};var _g=xg;function xg(){this.group=new O,this.uid=mc("viewComponent")}function bg(){var r=Ko();return function(t){var e=r(t),t=t.pipelineContext,n=!!e.large,i=!!e.progressiveRender,o=e.large=!(!t||!t.large),e=e.progressiveRender=!(!t||!t.progressiveRender);return!(n==o&&i==e)&&"reset"}}ur(_g),fr(_g);var wg=Ko(),Sg=bg(),Mg=(Tg.prototype.init=function(t,e){},Tg.prototype.render=function(t,e,n,i){},Tg.prototype.highlight=function(t,e,n,i){Ig(t.getData(),i,"emphasis")},Tg.prototype.downplay=function(t,e,n,i){Ig(t.getData(),i,"normal")},Tg.prototype.remove=function(t,e){this.group.removeAll()},Tg.prototype.dispose=function(t,e){},Tg.prototype.updateView=function(t,e,n,i){this.render(t,e,n,i)},Tg.prototype.updateLayout=function(t,e,n,i){this.render(t,e,n,i)},Tg.prototype.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},Tg.markUpdateMethod=function(t,e){wg(t).updateMethod=e},Tg.protoInitialize=void(Tg.prototype.type="chart"),Tg);function Tg(){this.group=new O,this.uid=mc("viewChart"),this.renderTask=hf({plan:Ag,reset:Dg}),this.renderTask.context={view:this}}function Cg(t,e,n){t&&("emphasis"===e?ll:ul)(t,n)}function Ig(e,t,n){var i,o=qo(e,t),r=t&&null!=t.highlightKey?(t=t.highlightKey,i=null==(i=Ps[t])&&Ls<=32?Ps[t]=Ls++:i):null;null!=o?N(zo(o),function(t){Cg(e.getItemGraphicEl(t),n,r)}):e.eachItemGraphicEl(function(t){Cg(t,n,r)})}function Ag(t){return Sg(t.model)}function Dg(t){var e=t.model,n=t.ecModel,i=t.api,o=t.payload,r=e.pipelineContext.progressiveRender,t=t.view,a=o&&wg(o).updateMethod,r=r?"incrementalPrepareRender":a&&t[a]?a:"render";return"render"!==r&&t[r](e,n,i,o),kg[r]}ur(Mg),fr(Mg);var kg={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},Lg="\0__throttleOriginMethod",Pg="\0__throttleRate",Og="\0__throttleType";function Rg(t,o,r){var a,s,l,u,h,c=0,p=0,d=null;function f(){p=(new Date).getTime(),d=null,t.apply(l,u||[])}o=o||0;function e(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];a=(new Date).getTime(),l=this,u=t;var n=h||o,i=h||r;h=null,s=a-(i?c:p)-n,clearTimeout(d),i?d=setTimeout(f,n):0<=s?f():d=setTimeout(f,-s),c=a}return e.clear=function(){d&&(clearTimeout(d),d=null)},e.debounceNextCall=function(t){h=t},e}function Ng(t,e,n,i){var o=t[e];if(o){var r=o[Lg]||o,a=o[Og];if(o[Pg]!==n||a!==i){if(null==n||!i)return t[e]=r;(o=t[e]=Rg(r,n,"debounce"===i))[Lg]=r,o[Og]=i,o[Pg]=n}}}var Eg=Ko(),Bg={itemStyle:gr(uc,!0),lineStyle:gr(ac,!0)},zg={lineStyle:"stroke",itemStyle:"fill"};function Vg(t,e){return t.visualStyleMapper||Bg[e]||(console.warn("Unkown style type '"+e+"'."),Bg.itemStyle)}function Fg(t,e){return t.visualDrawType||zg[e]||(console.warn("Unkown style type '"+e+"'."),"fill")}var Lc={createOnAllSeries:!0,performRawSeries:!0,reset:function(o,t){var e=o.getData(),n=o.visualStyleAccessPath||"itemStyle",i=o.getModel(n),r=Vg(o,n)(i),i=i.getShallow("decal"),a=(i&&(e.setVisual("decal",i),i.dirty=!0),Fg(o,n)),i=r[a],s=ut(i)?i:null,n="auto"===r.fill||"auto"===r.stroke;if(r[a]&&!s&&!n||(i=o.getColorFromPalette(o.name,null,t.getSeriesCount()),r[a]||(r[a]=i,e.setVisual("colorFromPalette",!0)),r.fill="auto"===r.fill||"function"==typeof r.fill?i:r.fill,r.stroke="auto"===r.stroke||"function"==typeof r.stroke?i:r.stroke),e.setVisual("style",r),e.setVisual("drawType",a),!t.isSeriesFiltered(o)&&s)return e.setVisual("colorFromPalette",!1),{dataEach:function(t,e){var n=o.getDataParams(e),i=I({},r);i[a]=s(n),t.setItemVisual(e,"style",i)}}}},Hg=new fc,Ku={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var i,o,r;if(!t.ignoreStyleOnData&&!e.isSeriesFiltered(t))return e=t.getData(),i=t.visualStyleAccessPath||"itemStyle",o=Vg(t,i),r=e.getVisual("drawType"),{dataEach:e.hasItemOption?function(t,e){var n=t.getRawDataItem(e);n&&n[i]&&(Hg.option=n[i],n=o(Hg),I(t.ensureUniqueItemVisual(e,"style"),n),Hg.option.decal&&(t.setItemVisual(e,"decal",Hg.option.decal),Hg.option.decal.dirty=!0),r in n)&&t.setItemVisual(e,"colorFromPalette",!1)}:null}}},mr={performRawSeries:!0,overallReset:function(e){var n=L();e.eachSeries(function(t){var e;t.useColorPaletteOnData&&((e=n.get(t.type))||n.set(t.type,e={}),Eg(t).scope=e)}),e.eachSeries(function(i){var o,r,a,s,t,l;i.useColorPaletteOnData&&!e.isSeriesFiltered(i)&&(o=i.getRawData(),r={},a=i.getData(),s=Eg(i).scope,t=i.visualStyleAccessPath||"itemStyle",l=Fg(i,t),a.each(function(t){var e=a.getRawIndex(t);r[e]=t}),o.each(function(t){var e,n=r[t];a.getItemVisual(n,"colorFromPalette")&&(n=a.ensureUniqueItemVisual(n,"style"),t=o.getName(t)||t+"",e=o.count(),n[l]=i.getColorFromPalette(t,s,e))}))})}},Gg=Math.PI;Ug.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(t){t=t.overallTask;t&&t.dirty()})},Ug.prototype.getPerformArgs=function(t,e){var n,i;if(t.__pipeline)return i=(n=this._pipelineMap.get(t.__pipeline.id)).context,{step:e=!e&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex?n.step:null,modBy:null!=(t=i&&i.modDataCount)?Math.ceil(t/e):null,modDataCount:t}},Ug.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},Ug.prototype.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData().count(),e=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,o=t.get("large")&&i>=t.get("largeThreshold"),i="mod"===t.get("progressiveChunkMode")?i:null;t.pipelineContext=n.context={progressiveRender:e,modDataCount:i,large:o}},Ug.prototype.restorePipelines=function(t){var i=this,o=i._pipelineMap=L();t.eachSeries(function(t){var e=t.getProgressive(),n=t.uid;o.set(n,{id:n,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:e&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(e||700),count:0}),i._pipe(t,t.dataTask)})},Ug.prototype.prepareStageTasks=function(){var n=this._stageTaskMap,i=this.api.getModel(),o=this.api;N(this._allHandlers,function(t){var e=n.get(t.uid)||n.set(t.uid,{});St(!(t.reset&&t.overallReset),""),t.reset&&this._createSeriesStageTask(t,e,i,o),t.overallReset&&this._createOverallStageTask(t,e,i,o)},this)},Ug.prototype.prepareView=function(t,e,n,i){var o=t.renderTask,r=o.context;r.model=e,r.ecModel=n,r.api=i,o.__block=!t.incrementalPrepareRender,this._pipe(e,o)},Ug.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},Ug.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},Ug.prototype._performStageTasks=function(t,s,l,u){u=u||{};var h=!1,c=this;function p(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}N(t,function(i,t){var e,n,o,r,a;u.visualType&&u.visualType!==i.visualType||(e=(n=c._stageTaskMap.get(i.uid)).seriesTaskMap,(n=n.overallTask)?((r=n.agentStubMap).each(function(t){p(u,t)&&(t.dirty(),o=!0)}),o&&n.dirty(),c.updatePayload(n,l),a=c.getPerformArgs(n,u.block),r.each(function(t){t.perform(a)}),n.perform(a)&&(h=!0)):e&&e.each(function(t,e){p(u,t)&&t.dirty();var n=c.getPerformArgs(t,u.block);n.skip=!i.performRawSeries&&s.isSeriesFiltered(t.context.model),c.updatePayload(t,l),t.perform(n)&&(h=!0)}))}),this.unfinished=h||this.unfinished},Ug.prototype.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e=t.dataTask.perform()||e}),this.unfinished=e||this.unfinished},Ug.prototype.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}}while(e=e.getUpstream())})},Ug.prototype.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},Ug.prototype._createSeriesStageTask=function(n,t,i,o){var r=this,a=t.seriesTaskMap,s=t.seriesTaskMap=L(),t=n.seriesType,e=n.getTargetSeries;function l(t){var e=t.uid,e=s.set(e,a&&a.get(e)||hf({plan:qg,reset:Kg,count:Qg}));e.context={model:t,ecModel:i,api:o,useClearVisual:n.isVisual&&!n.isLayout,plan:n.plan,reset:n.reset,scheduler:r},r._pipe(t,e)}n.createOnAllSeries?i.eachRawSeries(l):t?i.eachRawSeriesByType(t,l):e&&e(i,o).each(l)},Ug.prototype._createOverallStageTask=function(t,e,n,i){var o=this,r=e.overallTask=e.overallTask||hf({reset:Yg}),a=(r.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:o},r.agentStubMap),s=r.agentStubMap=L(),e=t.seriesType,l=t.getTargetSeries,u=!0,h=!1;function c(t){var e=t.uid,e=s.set(e,a&&a.get(e)||(h=!0,hf({reset:Xg,onDirty:jg})));e.context={model:t,overallProgress:u},e.agent=r,e.__block=u,o._pipe(t,e)}St(!t.createOnAllSeries,""),e?n.eachRawSeriesByType(e,c):l?l(n,i).each(c):(u=!1,N(n.getSeries(),c)),h&&r.dirty()},Ug.prototype._pipe=function(t,e){t=t.uid,t=this._pipelineMap.get(t);t.head||(t.head=e),t.tail&&t.tail.pipe(e),(t.tail=e).__idxInPipeline=t.count++,e.__pipeline=t},Ug.wrapStageHandler=function(t,e){return(t=ut(t)?{overallReset:t,seriesType:function(t){ty=null;try{t(ey,ny)}catch(t){}return ty}(t)}:t).uid=mc("stageHandler"),e&&(t.visualType=e),t};var Wg=Ug;function Ug(t,e,n,i){this._stageTaskMap=L(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}function Yg(t){t.overallReset(t.ecModel,t.api,t.payload)}function Xg(t){return t.overallProgress&&Zg}function Zg(){this.agent.dirty(),this.getDownstream().dirty()}function jg(){this.agent&&this.agent.dirty()}function qg(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function Kg(t){t.useClearVisual&&t.data.clearAllVisual();t=t.resetDefines=zo(t.reset(t.model,t.ecModel,t.api,t.payload));return 1<t.length?j(t,function(t,e){return Jg(e)}):$g}var $g=Jg(0);function Jg(r){return function(t,e){var n=e.data,i=e.resetDefines[r];if(i&&i.dataEach)for(var o=t.start;o<t.end;o++)i.dataEach(n,o);else i&&i.progress&&i.progress(t,n)}}function Qg(t){return t.data.count()}var ty,ey={},ny={};function iy(t,e){for(var n in e.prototype)t[n]=Lt}iy(ey,ed),iy(ny,rd),ey.eachSeriesByType=ey.eachRawSeriesByType=function(t){ty=t},ey.eachComponent=function(t){"series"===t.mainType&&t.subType&&(ty=t.subType)};function oy(){return{axisLine:{lineStyle:{color:ry}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}}var n=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],n={color:n,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],n]},ry="#B9B8CE",ay="#100C2A",sy=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],ay={darkMode:!0,color:sy,backgroundColor:ay,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:ry}},textStyle:{color:ry},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:ry}},dataZoom:{borderColor:"#71708A",textStyle:{color:ry},brushStyle:{color:"rgba(135,163,206,0.3)"},handleStyle:{color:"#353450",borderColor:"#C5CBE3"},moveHandleStyle:{color:"#B0B6C3",opacity:.3},fillerColor:"rgba(135,163,206,0.2)",emphasis:{handleStyle:{borderColor:"#91B7F2",color:"#4D587D"},moveHandleStyle:{color:"#636D9A",opacity:.7}},dataBackground:{lineStyle:{color:"#71708A",width:1},areaStyle:{color:"#71708A"}},selectedDataBackground:{lineStyle:{color:"#87A3CE"},areaStyle:{color:"#87A3CE"}}},visualMap:{textStyle:{color:ry}},timeline:{lineStyle:{color:ry},label:{color:ry},controlStyle:{color:ry,borderColor:ry}},calendar:{itemStyle:{color:ay},dayLabel:{color:ry},monthLabel:{color:ry},yearLabel:{color:ry}},timeAxis:oy(),logAxis:oy(),valueAxis:oy(),categoryAxis:oy(),line:{symbol:"circle"},graph:{color:sy},gauge:{title:{color:ry},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:ry},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}},ly=(ay.categoryAxis.splitLine.show=!1,uy.prototype.normalizeQuery=function(t){var e,a,s,l={},u={},h={};return D(t)?(e=lr(t),l.mainType=e.main||null,l.subType=e.sub||null):(a=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1},N(t,function(t,e){for(var n=!1,i=0;i<a.length;i++){var o=a[i],r=e.lastIndexOf(o);0<r&&r===e.length-o.length&&"data"!==(r=e.slice(0,r))&&(l.mainType=r,l[o.toLowerCase()]=t,n=!0)}s.hasOwnProperty(e)&&(u[e]=t,n=!0),n||(h[e]=t)})),{cptQuery:l,dataQuery:u,otherQuery:h}},uy.prototype.filter=function(t,e){var n,i,o,r,a,s=this.eventInfo;return!s||(n=s.targetEl,i=s.packedEvent,o=s.model,s=s.view,!o)||!s||(r=e.cptQuery,a=e.dataQuery,l(r,o,"mainType")&&l(r,o,"subType")&&l(r,o,"index","componentIndex")&&l(r,o,"name")&&l(r,o,"id")&&l(a,i,"name")&&l(a,i,"dataIndex")&&l(a,i,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,n,i)));function l(t,e,n,i){return null==t[n]||e[i||n]===t[n]}},uy.prototype.afterTrigger=function(){this.eventInfo=null},uy);function uy(){}sy={createOnAllSeries:!0,performRawSeries:!0,reset:function(o,t){var e=o.getData();if(o.legendSymbol&&e.setVisual("legendSymbol",o.legendSymbol),o.hasSymbolVisual){var r=o.get("symbol"),a=o.get("symbolSize"),n=o.get("symbolKeepAspect"),s=o.get("symbolRotate"),l=o.get("symbolOffset"),u=ut(r),h=ut(a),c=ut(s),p=ut(l),i=u||h||c||p,d=!u&&r?r:o.defaultSymbol;if(e.setVisual({legendSymbol:o.legendSymbol||d,symbol:d,symbolSize:h?null:a,symbolKeepAspect:n,symbolRotate:c?null:s,symbolOffset:p?null:l}),!t.isSeriesFiltered(o))return{dataEach:i?function(t,e){var n=o.getRawValue(e),i=o.getDataParams(e);u&&t.setItemVisual(e,"symbol",r(n,i)),h&&t.setItemVisual(e,"symbolSize",a(n,i)),c&&t.setItemVisual(e,"symbolRotate",s(n,i)),p&&t.setItemVisual(e,"symbolOffset",l(n,i))}:null}}}};function hy(t,e){switch(e){case"color":return t.getVisual("style")[t.getVisual("drawType")];case"opacity":return t.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getVisual(e)}}var cy=2*Math.PI,py=Ba.CMD,dy=["top","right","bottom","left"];function fy(t,e,n,i,o,r,a,s){var l=o-t,u=r-e,n=n-t,i=i-e,h=Math.sqrt(n*n+i*i),l=(l*(n/=h)+u*(i/=h))/h,u=(s&&(l=Math.min(Math.max(l,0),1)),a[0]=t+(l*=h)*n),s=a[1]=e+l*i;return Math.sqrt((u-o)*(u-o)+(s-r)*(s-r))}function gy(t,e,n,i,o,r,a){n<0&&(t+=n,n=-n),i<0&&(e+=i,i=-i);n=t+n,i=e+i,t=a[0]=Math.min(Math.max(o,t),n),n=a[1]=Math.min(Math.max(r,e),i);return Math.sqrt((t-o)*(t-o)+(n-r)*(n-r))}var yy=[];function my(t,e,n){for(var i,o,r,a,s,l,u,h,c,p=0,d=0,f=0,g=0,y=1/0,m=e.data,v=t.x,_=t.y,x=0;x<m.length;){var b=m[x++],w=(1===x&&(f=p=m[x],g=d=m[x+1]),y);switch(b){case py.M:p=f=m[x++],d=g=m[x++];break;case py.L:w=fy(p,d,m[x],m[x+1],v,_,yy,!0),p=m[x++],d=m[x++];break;case py.C:w=ea(p,d,m[x++],m[x++],m[x++],m[x++],m[x],m[x+1],v,_,yy),p=m[x++],d=m[x++];break;case py.Q:w=aa(p,d,m[x++],m[x++],m[x],m[x+1],v,_,yy),p=m[x++],d=m[x++];break;case py.A:var S=m[x++],M=m[x++],T=m[x++],C=m[x++],I=m[x++],A=m[x++],D=(x+=1,!!(1-m[x++])),k=Math.cos(I)*T+S,L=Math.sin(I)*C+M;x<=1&&(f=k,g=L),L=(k=I)+A,D=D,a=(v-(i=S))*(r=C)/T+S,s=_,l=yy,c=h=u=void 0,a-=i,s-=o=M,u=Math.sqrt(a*a+s*s),h=(a/=u)*r+i,c=(s/=u)*r+o,w=Math.abs(k-L)%cy<1e-4||((L=D?(D=k,k=Fa(L),Fa(D)):(k=Fa(k),Fa(L)))<k&&(L+=cy),(D=Math.atan2(s,a))<0&&(D+=cy),k<=D&&D<=L)||k<=D+cy&&D+cy<=L?(l[0]=h,l[1]=c,u-r):(c=((D=r*Math.cos(k)+i)-a)*(D-a)+((h=r*Math.sin(k)+o)-s)*(h-s))<(i=((u=r*Math.cos(L)+i)-a)*(u-a)+((k=r*Math.sin(L)+o)-s)*(k-s))?(l[0]=D,l[1]=h,Math.sqrt(c)):(l[0]=u,l[1]=k,Math.sqrt(i)),p=Math.cos(I+A)*T+S,d=Math.sin(I+A)*C+M;break;case py.R:w=gy(f=p=m[x++],g=d=m[x++],m[x++],m[x++],v,_,yy);break;case py.Z:w=fy(p,d,f,g,v,_,yy,!0),p=f,d=g}w<y&&(y=w,n.set(yy[0],yy[1]))}return y}var vy=new E,_y=new E,xy=new E,by=new E,wy=new E;function Sy(t,e){if(t){var n=t.getTextGuideLine(),i=t.getTextContent();if(i&&n){var o=t.textGuideLineConfig||{},r=[[0,0],[0,0],[0,0]],a=o.candidates||dy,s=i.getBoundingRect().clone(),l=(s.applyTransform(i.getComputedTransform()),1/0),u=o.anchor,h=t.getComputedTransform(),c=h&&Ve([],h),p=e.get("length2")||0;u&&xy.copy(u);for(var d=0;d<a.length;d++){x=_=v=m=y=g=f=void 0;var f=a[d],g=0,y=s,m=vy,v=by,_=y.width,x=y.height;switch(f){case"top":m.set(y.x+_/2,y.y-g),v.set(0,-1);break;case"bottom":m.set(y.x+_/2,y.y+x+g),v.set(0,1);break;case"left":m.set(y.x-g,y.y+x/2),v.set(-1,0);break;case"right":m.set(y.x+_+g,y.y+x/2),v.set(1,0)}E.scaleAndAdd(_y,vy,by,p),_y.transform(c);f=t.getBoundingRect(),f=u?u.distance(_y):t instanceof q?my(_y,t.path,xy):(w=xy,b=gy((b=f).x,f.y,f.width,f.height,_y.x,_y.y,yy),w.set(yy[0],yy[1]),b);f<l&&(l=f,_y.transform(h),xy.transform(h),xy.toArray(r[0]),_y.toArray(r[1]),vy.toArray(r[2]))}Cy(r,e.get("minTurnAngle")),n.setShape({points:r})}}var b,w}var My=[],Ty=new E;function Cy(t,e){var n,i;e<=180&&0<e&&(e=e/180*Math.PI,vy.fromArray(t[0]),_y.fromArray(t[1]),xy.fromArray(t[2]),E.sub(by,vy,_y),E.sub(wy,xy,_y),i=by.len(),n=wy.len(),i<.001||n<.001||(by.scale(1/i),wy.scale(1/n),i=by.dot(wy),Math.cos(e)<i&&(n=fy(_y.x,_y.y,xy.x,xy.y,vy.x,vy.y,My,!1),Ty.fromArray(My),Ty.scaleAndAdd(wy,n/Math.tan(Math.PI-e)),i=xy.x!==_y.x?(Ty.x-_y.x)/(xy.x-_y.x):(Ty.y-_y.y)/(xy.y-_y.y),isNaN(i)||(i<0?E.copy(Ty,_y):1<i&&E.copy(Ty,xy),Ty.toArray(t[1])))))}function Iy(t,e,n,i){var o="normal"===n,n=o?t:t.ensureState(n),e=(n.ignore=e,i.get("smooth")),e=(e&&!0===e&&(e=.3),n.shape=n.shape||{},0<e&&(n.shape.smooth=e),i.getModel("lineStyle").getLineStyle());o?t.useStyle(e):n.style=e}function Ay(t,e){var n=e.smooth,i=e.points;if(i)if(t.moveTo(i[0][0],i[0][1]),0<n&&3<=i.length){var e=Gt(i[0],i[1]),o=Gt(i[1],i[2]);e&&o?(n=Math.min(e,o)*n,e=Yt([],i[1],i[0],n/e),n=Yt([],i[1],i[2],n/o),o=Yt([],e,n,.5),t.bezierCurveTo(e[0],e[1],e[0],e[1],o[0],o[1]),t.bezierCurveTo(n[0],n[1],n[0],n[1],i[2][0],i[2][1])):(t.lineTo(i[1][0],i[1][1]),t.lineTo(i[2][0],i[2][1]))}else for(var r=1;r<i.length;r++)t.lineTo(i[r][0],i[r][1])}function Dy(t,e,n){var i=t.getTextGuideLine(),o=t.getTextContent();if(o){for(var r=e.normal,a=r.get("show"),s=o.ignore,l=0;l<zs.length;l++){var u,h=zs[l],c=e[h],p="normal"===h;c&&(u=c.get("show"),(p?s:P(o.states[h]&&o.states[h].ignore,s))||!P(u,a)?(u=p?i:i&&i.states.normal)&&(u.ignore=!0):(i||(i=new ku,t.setTextGuideLine(i),p||!s&&a||Iy(i,!0,"normal",e.normal),t.stateProxy&&(i.stateProxy=t.stateProxy)),Iy(i,!1,h,c)))}i&&(V(i.style,n),i.style.fill=null,n=r.get("showAbove"),(t.textGuideLineConfig=t.textGuideLineConfig||{}).showAbove=n||!1,i.buildPath=Ay)}else i&&t.removeTextGuideLine()}function ky(t,e){for(var n={normal:t.getModel(e=e||"labelLine")},i=0;i<Bs.length;i++){var o=Bs[i];n[o]=t.getModel([o,e])}return n}function Ly(s,l,u,t,e,n){var h=s.length;if(!(h<2)){s.sort(function(t,e){return t.rect[l]-e.rect[l]});for(var i,o=0,r=!1,a=[],c=0,p=0;p<h;p++){var d=s[p],f=d.rect,d=((i=f[l]-o)<0&&(f[l]-=i,d.label[l]-=i,r=!0),Math.max(-i,0));a.push(d),c+=d,o=f[l]+f[u]}0<c&&n&&b(-c/h,0,h);var g,y,m=s[0],v=s[h-1];return _(),g<0&&w(-g,.8),y<0&&w(y,.8),_(),x(g,y,1),x(y,g,-1),_(),g<0&&S(-g),y<0&&S(y),r}function _(){g=m.rect[l]-t,y=e-v.rect[l]-v.rect[u]}function x(t,e,n){t<0&&(0<(e=Math.min(e,-t))?(b(e*n,0,h),(e=e+t)<0&&w(-e*n,1)):w(-t*n,1))}function b(t,e,n){0!==t&&(r=!0);for(var i=e;i<n;i++){var o=s[i];o.rect[l]+=t,o.label[l]+=t}}function w(t,e){for(var n=[],i=0,o=1;o<h;o++){var r=s[o-1].rect,r=Math.max(s[o].rect[l]-r[l]-r[u],0);n.push(r),i+=r}if(i){var a=Math.min(Math.abs(t)/i,e);if(0<t)for(o=0;o<h-1;o++)b(n[o]*a,0,o+1);else for(o=h-1;0<o;o--)b(-n[o-1]*a,o,h)}}function S(t){var e=t<0?-1:1;t=Math.abs(t);for(var n=Math.ceil(t/(h-1)),i=0;i<h-1;i++)if(0<e?b(n,0,i+1):b(-n,h-i-1,h),(t-=n)<=0)return}}function Py(t,e,n,i){return Ly(t,"y","height",e,n,i)}function Oy(t,e){var n=t.label,e=e&&e.getTextGuideLine();return{dataIndex:t.dataIndex,dataType:t.dataType,seriesIndex:t.seriesModel.seriesIndex,text:t.label.style.text,rect:t.hostRect,labelRect:t.rect,align:n.style.align,verticalAlign:n.style.verticalAlign,labelLinePoints:function(t){if(t){for(var e=[],n=0;n<t.length;n++)e.push(t[n].slice());return e}}(e&&e.shape.points)}}var Ry=["align","verticalAlign","width","height","fontSize"],Ny=new Ze,Ey=Ko(),By=Ko();function zy(t,e,n){for(var i=0;i<n.length;i++){var o=n[i];null!=e[o]&&(t[o]=e[o])}}var Vy=["x","y","rotation"],Fy=(Hy.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},Hy.prototype._addLabel=function(t,e,n,i,o){var r=i.style,a=i.__hostTarget.textConfig||{},s=i.getComputedTransform(),l=i.getBoundingRect().plain();R.applyTransform(l,l,s),s?Ny.setLocalTransform(s):(Ny.x=Ny.y=Ny.rotation=Ny.originX=Ny.originY=0,Ny.scaleX=Ny.scaleY=1);var u,s=i.__hostTarget,h=(s&&(u=s.getBoundingRect().plain(),h=s.getComputedTransform(),R.applyTransform(u,u,h)),u&&s.getTextGuideLine());this._labelList.push({label:i,labelLine:h,seriesModel:n,dataIndex:t,dataType:e,layoutOption:o,computedLayoutOption:null,rect:l,hostRect:u,priority:u?u.width*u.height:0,defaultAttr:{ignore:i.ignore,labelGuideIgnore:h&&h.ignore,x:Ny.x,y:Ny.y,scaleX:Ny.scaleX,scaleY:Ny.scaleY,rotation:Ny.rotation,style:{x:r.x,y:r.y,align:r.align,verticalAlign:r.verticalAlign,width:r.width,height:r.height,fontSize:r.fontSize},cursor:i.cursor,attachedPos:a.position,attachedRot:a.rotation}})},Hy.prototype.addLabelsOfSeries=function(t){var n=this,i=(this._chartViewList.push(t),t.__model),o=i.get("labelLayout");(ut(o)||lt(o).length)&&t.group.traverse(function(t){if(t.ignore)return!0;var e=t.getTextContent(),t=z(t);e&&!e.disableLabelLayout&&n._addLabel(t.dataIndex,t.dataType,i,e,o)})},Hy.prototype.updateLayoutConfig=function(t){var e=t.getWidth(),n=t.getHeight();for(var i=0;i<this._labelList.length;i++){var o=this._labelList[i],r=o.label,a=r.__hostTarget,s=o.defaultAttr,l=void 0,l=("function"==typeof o.layoutOption?o.layoutOption(Oy(o,a)):o.layoutOption)||{},u=(o.computedLayoutOption=l,Math.PI/180),h=(a&&a.setTextConfig({local:!1,position:null!=l.x||null!=l.y?null:s.attachedPos,rotation:null!=l.rotate?l.rotate*u:s.attachedRot,offset:[l.dx||0,l.dy||0]}),!1);null!=l.x?(r.x=B(l.x,e),r.setStyle("x",0),h=!0):(r.x=s.x,r.setStyle("x",s.style.x)),null!=l.y?(r.y=B(l.y,n),r.setStyle("y",0),h=!0):(r.y=s.y,r.setStyle("y",s.style.y)),l.labelLinePoints&&(c=a.getTextGuideLine())&&(c.setShape({points:l.labelLinePoints}),h=!1),Ey(r).needsUpdateLabelLine=h,r.rotation=null!=l.rotate?l.rotate*u:s.rotation,r.scaleX=s.scaleX,r.scaleY=s.scaleY;for(var c,p=0;p<Ry.length;p++){var d=Ry[p];r.setStyle(d,(null!=l[d]?l:s.style)[d])}l.draggable?(r.draggable=!0,r.cursor="move",a&&(c=o.seriesModel,null!=o.dataIndex&&(c=o.seriesModel.getData(o.dataType).getItemModel(o.dataIndex)),r.on("drag",function(t,e){return function(){Sy(t,e)}}(a,c.getModel("labelLine"))))):(r.off("drag"),r.cursor=s.cursor)}},Hy.prototype.layout=function(t){var e,n=t.getWidth(),t=t.getHeight(),i=function(t){for(var e=[],n=0;n<t.length;n++){var i,o,r,a,s,l,u=t[n];u.defaultAttr.ignore||(o=(i=u.label).getComputedTransform(),r=i.getBoundingRect(),a=!o||o[1]<1e-5&&o[2]<1e-5,l=i.style.margin||0,(s=r.clone()).applyTransform(o),s.x-=l/2,s.y-=l/2,s.width+=l,s.height+=l,l=a?new lh(r,o):null,e.push({label:i,labelLine:u.labelLine,rect:s,localRect:r,obb:l,priority:u.priority,defaultAttr:u.defaultAttr,layoutOption:u.computedLayoutOption,axisAligned:a,transform:o}))}return e}(this._labelList),o=st(i,function(t){return"shiftX"===t.layoutOption.moveOverlap}),r=st(i,function(t){return"shiftY"===t.layoutOption.moveOverlap});Ly(o,"x","width",0,n,e),Py(r,0,t);var a=st(i,function(t){return t.layoutOption.hideOverlap}),s=[],l=(a.sort(function(t,e){return e.priority-t.priority}),new R(0,0,0,0));function u(t){var e;t.ignore||null==(e=t.ensureState("emphasis")).ignore&&(e.ignore=!1),t.ignore=!0}for(var h=0;h<a.length;h++){var c=a[h],p=c.axisAligned,d=c.localRect,f=c.transform,g=c.label,y=c.labelLine;l.copy(c.rect),l.width-=.1,l.height-=.1,l.x+=.05,l.y+=.05;for(var m=c.obb,v=!1,_=0;_<s.length;_++){var x=s[_];if(l.intersect(x.rect)){if(p&&x.axisAligned){v=!0;break}if(x.obb||(x.obb=new lh(x.localRect,x.transform)),(m=m||new lh(d,f)).intersect(x.obb)){v=!0;break}}}v?(u(g),y&&u(y)):(g.attr("ignore",c.defaultAttr.ignore),y&&y.attr("ignore",c.defaultAttr.labelGuideIgnore),s.push(c))}},Hy.prototype.processLabelsOverall=function(){var a=this;N(this._chartViewList,function(t){var i=t.__model,o=t.ignoreLabelLineUpdate,r=i.isAnimationEnabled();t.group.traverse(function(t){if(t.ignore)return!0;var e=!o,n=t.getTextContent();(e=!e&&n?Ey(n).needsUpdateLabelLine:e)&&a._updateLabelLine(t,i),r&&a._animateLabels(t,i)})})},Hy.prototype._updateLabelLine=function(t,e){var n=t.getTextContent(),i=z(t),o=i.dataIndex;n&&null!=o&&(e=(n=e.getData(i.dataType)).getItemModel(o),i={},o=n.getItemVisual(o,"style"),n=n.getVisual("drawType"),i.stroke=o[n],o=e.getModel("labelLine"),Dy(t,ky(e),i),Sy(t,o))},Hy.prototype._animateLabels=function(t,e){var n,i,o,r,a,s,l,u,h,c,p,d,f,g=t.getTextContent(),y=t.getTextGuideLine();!g||g.ignore||g.invisible||t.disableLabelAnimation||Oh(t)||(d=(f=Ey(g)).oldLayout,n=(i=z(t)).dataIndex,s={x:g.x,y:g.y,rotation:g.rotation},i=e.getData(i.dataType),d?(g.attr(d),(t=t.prevStates)&&(0<=A(t,"select")&&g.attr(f.oldLayoutSelect),0<=A(t,"emphasis"))&&g.attr(f.oldLayoutEmphasis),Ah(g,s,e,n)):(g.attr(s),nc(g).valueAnimation||(t=P(g.style.opacity,1),g.style.opacity=0,Dh(g,{style:{opacity:t}},e,n))),f.oldLayout=s,g.states.select&&(zy(t=f.oldLayoutSelect={},s,Vy),zy(t,g.states.select,Vy)),g.states.emphasis&&(zy(t=f.oldLayoutEmphasis={},s,Vy),zy(t,g.states.emphasis,Vy)),r=n,a=i,l=s=e,(p=nc(o=g)).valueAnimation&&(u=p.defaultInterpolatedText,h=P(p.interpolatedValue,p.prevValue),c=p.value,(null==h?Dh:Ah)(o,{},s,r,null,function(t){var e=or(a,p.precision,h,c,t),t=(p.interpolatedValue=1===t?null:e,Zh({labelDataIndex:r,labelFetcher:l,defaultText:u?u(e):e+""},p.statesModels,e));Xh(o,t)}))),!y||y.ignore||y.invisible||(d=(f=By(y)).oldLayout,t={points:y.shape.points},d?(y.attr({shape:d}),Ah(y,{shape:t},e)):(y.setShape(t),y.style.strokePercent=0,Dh(y,{style:{strokePercent:1}},e)),f.oldLayout=t)},Hy);function Hy(){this._labelList=[],this._chartViewList=[]}function Gy(r,t){N([[r+"ToggleSelect","toggleSelect"],[r+"Select","select"],[r+"UnSelect","unselect"]],function(o){t(o[0],function(t,e,n){var i;t=I({},t),n.dispatchAction(I(t,{type:o[1],seriesIndex:(n=t,i=[],e.eachComponent({mainType:"series",subType:r,query:n},function(t){i.push(t.seriesIndex)}),i)}))})})}function Wy(t,e,a,n,s){var l=t+e;a.isSilent(l)||n.eachComponent({mainType:"series",subType:"pie"},function(t){for(var e,n,i=t.seriesIndex,o=s.selected,r=0;r<o.length;r++)o[r].seriesIndex===i&&(n=qo(e=t.getData(),s.fromActionPayload),a.trigger(l,{type:l,seriesId:t.id,name:F(n)?e.getName(n[0]):e.getName(n),selected:I({},t.option.selectedMap)}))})}function Uy(t,e,n){for(var i;t&&(!e(t)||(i=t,!n));)t=t.__hostTarget||t.parent;return i}var Yy=Math.round(9*Math.random()),Xy=(Zy.prototype.get=function(t){return this._guard(t)[this._id]},Zy.prototype.set=function(t,e){t=this._guard(t);return"function"==typeof Object.defineProperty?Object.defineProperty(t,this._id,{value:e,enumerable:!1,configurable:!0}):t[this._id]=e,this},Zy.prototype.delete=function(t){return!!this.has(t)&&(delete this._guard(t)[this._id],!0)},Zy.prototype.has=function(t){return!!this._guard(t)[this._id]},Zy.prototype._guard=function(t){if(t!==Object(t))throw TypeError("Value of WeakMap is not a non-null object.");return t},Zy);function Zy(){this._id="__ec_inner_"+Yy++}var jy=q.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,i=e.cy,o=e.width/2,e=e.height/2;t.moveTo(n,i-e),t.lineTo(n+o,i+e),t.lineTo(n-o,i+e),t.closePath()}}),qy=q.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,i=e.cy,o=e.width/2,e=e.height/2;t.moveTo(n,i-e),t.lineTo(n+o,i),t.lineTo(n,i+e),t.lineTo(n-o,i),t.closePath()}}),Ky=q.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.x,i=e.y,o=e.width/5*3,e=Math.max(o,e.height),o=o/2,r=o*o/(e-o),e=i-e+o+r,a=Math.asin(r/o),s=Math.cos(a)*o,l=Math.sin(a),u=Math.cos(a),h=.6*o,c=.7*o;t.moveTo(n-s,e+r),t.arc(n,e,o,Math.PI-a,2*Math.PI+a),t.bezierCurveTo(n+s-l*h,e+r+u*h,n,i-c,n,i),t.bezierCurveTo(n,i-c,n-s+l*h,e+r+u*h,n-s,e+r),t.closePath()}}),$y=q.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.height,i=e.width,o=e.x,e=e.y,i=i/3*2;t.moveTo(o,e),t.lineTo(o+i,e+n),t.lineTo(o,e+n/4*3),t.lineTo(o-i,e+n),t.lineTo(o,e),t.closePath()}}),Jy={line:function(t,e,n,i,o){o.x1=t,o.y1=e+i/2,o.x2=t+n,o.y2=e+i/2},rect:function(t,e,n,i,o){o.x=t,o.y=e,o.width=n,o.height=i},roundRect:function(t,e,n,i,o){o.x=t,o.y=e,o.width=n,o.height=i,o.r=Math.min(n,i)/4},square:function(t,e,n,i,o){n=Math.min(n,i);o.x=t,o.y=e,o.width=n,o.height=n},circle:function(t,e,n,i,o){o.cx=t+n/2,o.cy=e+i/2,o.r=Math.min(n,i)/2},diamond:function(t,e,n,i,o){o.cx=t+n/2,o.cy=e+i/2,o.width=n,o.height=i},pin:function(t,e,n,i,o){o.x=t+n/2,o.y=e+i/2,o.width=n,o.height=i},arrow:function(t,e,n,i,o){o.x=t+n/2,o.y=e+i/2,o.width=n,o.height=i},triangle:function(t,e,n,i,o){o.cx=t+n/2,o.cy=e+i/2,o.width=n,o.height=i}},Qy={},tm=(N({line:Nu,rect:ms,roundRect:ms,square:ms,circle:ql,diamond:qy,pin:Ky,arrow:$y,triangle:jy},function(t,e){Qy[e]=new t}),q.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,e,n){var t=ui(t,e,n),i=this.shape;return i&&"pin"===i.symbolType&&"inside"===e.position&&(t.y=n.y+.4*n.height),t},buildPath:function(t,e,n){var i,o=e.symbolType;"none"!==o&&(i=(i=Qy[o])||Qy[o="rect"],Jy[o](e.x,e.y,e.width,e.height,i.shape),i.buildPath(t,i.shape,n))}}));function em(t,e){var n;"image"!==this.type&&(n=this.style,this.__isEmptyBrush?(n.stroke=t,n.fill=e||"#fff",n.lineWidth=2):"line"===this.shape.symbolType?n.stroke=t:n.fill=t,this.markRedraw())}function nm(t,e,n,i,o,r,a){var s=0===t.indexOf("empty");return(a=0===(t=s?t.substr(5,1).toLowerCase()+t.substr(6):t).indexOf("image://")?Sh(t.slice(8),new R(e,n,i,o),a?"center":"cover"):0===t.indexOf("path://")?wh(t.slice(7),{},new R(e,n,i,o),a?"center":"cover"):new tm({shape:{symbolType:t,x:e,y:n,width:i,height:o}})).__isEmptyBrush=s,a.setColor=em,r&&a.setColor(r),a}function im(t,e,n){for(var i,o,r,a,s,l,u,h,c,p="radial"===e.type?(i=t,o=e,a=(r=n).width,s=r.height,l=Math.min(a,s),u=null==o.x?.5:o.x,h=null==o.y?.5:o.y,c=null==o.r?.5:o.r,o.global||(u=u*a+r.x,h=h*s+r.y,c*=l),i.createRadialGradient(u,h,0,u,h,c)):(o=t,a=n,r=null==(s=e).x?0:s.x,l=null==s.x2?1:s.x2,i=null==s.y?0:s.y,u=null==s.y2?0:s.y2,s.global||(r=r*a.width+a.x,l=l*a.width+a.x,i=i*a.height+a.y,u=u*a.height+a.y),r=isNaN(r)?0:r,l=isNaN(l)?1:l,i=isNaN(i)?0:i,u=isNaN(u)?0:u,o.createLinearGradient(r,i,l,u)),d=e.colorStops,f=0;f<d.length;f++)p.addColorStop(d[f].offset,d[f].color);return p}function om(t,e){if(t!==e&&(t||e)){if(!t||!e||t.length!==e.length)return 1;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return 1}}function rm(t,e){return t&&"solid"!==t&&0<e?(e=e||1,"dashed"===t?[4*e,2*e]:"dotted"===t?[e]:ct(t)?[t]:F(t)?t:null):null}var am=new Ba(!0);function sm(t){var e=t.stroke;return!(null==e||"none"===e||!(0<t.lineWidth))}function lm(t){t=t.fill;return null!=t&&"none"!==t}function um(t,e){var n;null!=e.fillOpacity&&1!==e.fillOpacity?(n=t.globalAlpha,t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=n):t.fill()}function hm(t,e){var n;null!=e.strokeOpacity&&1!==e.strokeOpacity?(n=t.globalAlpha,t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=n):t.stroke()}function cm(t,e,n){var n=xr(e.image,e.__image,n);if(wr(n))return t=t.createPattern(n,e.repeat||"repeat"),"function"==typeof DOMMatrix&&t.setTransform&&((n=new DOMMatrix).rotateSelf(0,0,(e.rotation||0)/Math.PI*180),n.scaleSelf(e.scaleX||1,e.scaleY||1),n.translateSelf(e.x||0,e.y||0),t.setTransform(n)),t}var pm=["shadowBlur","shadowOffsetX","shadowOffsetY"],dm=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function fm(t,e,n,i,o){var r,a=!1;if(!i&&e===(n=n||{}))return!1;!i&&e.opacity===n.opacity||(a||(bm(t,o),a=!0),r=Math.max(Math.min(e.opacity,1),0),t.globalAlpha=isNaN(r)?Er.opacity:r),!i&&e.blend===n.blend||(a||(bm(t,o),a=!0),t.globalCompositeOperation=e.blend||Er.blend);for(var s=0;s<pm.length;s++){var l=pm[s];!i&&e[l]===n[l]||(a||(bm(t,o),a=!0),t[l]=t.dpr*(e[l]||0))}return!i&&e.shadowColor===n.shadowColor||(a||(bm(t,o),a=!0),t.shadowColor=e.shadowColor||Er.shadowColor),a}function gm(t,e,n,i,o){var r=wm(e,o.inHover),a=i?null:n&&wm(n,o.inHover)||{};if(r!==a){var s=fm(t,r,a,i,o);!i&&r.fill===a.fill||(s||(bm(t,o),s=!0),t.fillStyle=r.fill),!i&&r.stroke===a.stroke||(s||(bm(t,o),s=!0),t.strokeStyle=r.stroke),!i&&r.opacity===a.opacity||(s||(bm(t,o),s=!0),t.globalAlpha=null==r.opacity?1:r.opacity),e.hasStroke()&&(n=r.lineWidth/(r.strokeNoScale&&e&&e.getLineScale?e.getLineScale():1),t.lineWidth!==n)&&(s||(bm(t,o),s=!0),t.lineWidth=n);for(var l=0;l<dm.length;l++){var u=dm[l],h=u[0];!i&&r[h]===a[h]||(s||(bm(t,o),s=!0),t[h]=r[h]||u[1])}}}function ym(t,e){var e=e.transform,n=t.dpr||1;e?t.setTransform(n*e[0],n*e[1],n*e[2],n*e[3],n*e[4],n*e[5]):t.setTransform(n,0,0,n,0,0)}var mm=1,vm=2,_m=3,xm=4;function bm(t,e){e.batchFill&&t.fill(),e.batchStroke&&t.stroke(),e.batchFill="",e.batchStroke=""}function wm(t,e){return e&&t.__hoverStyle||t.style}function Sm(t,e){Mm(t,e,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function Mm(t,e,n,E){var i=e.transform;if(!e.shouldBePainted(n.viewWidth,n.viewHeight,!1,!1))return e.__dirty&=~bi.REDARAW_BIT,e.__isRendered=!1;var o,r,a,s,l,u,h,c,p,d,f,g,y,m,v,_,x,b,w,S,M,T,C=e.__clipPaths,I=n.prevElClipPaths,A=!1,D=!1;if(!I||om(C,I)){if(I&&I.length&&(bm(t,n),t.restore(),D=A=!0,n.prevElClipPaths=null,n.allClipped=!1,n.prevEl=null),C&&C.length){bm(t,n),t.save();var B=C,k=t;I=n;for(var z=!1,V=0;V<B.length;V++){var F=B[V],z=z||F.isZeroArea();ym(k,F),k.beginPath(),F.buildPath(k,F.shape),k.clip()}I.allClipped=z,A=!0}n.prevElClipPaths=C}if(n.allClipped)e.__isRendered=!1;else{e.beforeBrush&&e.beforeBrush(),e.innerBeforeBrush();var I=n.prevEl,L=(I||(D=A=!0),e instanceof q&&e.autoBatch&&(C=e.style,L=lm(C),T=sm(C),!(C.lineDash||!(+L^+T)||L&&"string"!=typeof C.fill||T&&"string"!=typeof C.stroke||C.strokePercent<1||C.strokeOpacity<1||C.fillOpacity<1))),A=(A||(T=i,C=I.transform,T&&C?T[0]!==C[0]||T[1]!==C[1]||T[2]!==C[2]||T[3]!==C[3]||T[4]!==C[4]||T[5]!==C[5]:T||C)?(bm(t,n),ym(t,e)):L||bm(t,n),wm(e,n.inHover));if(e instanceof q)n.lastDrawType!==mm&&(D=!0,n.lastDrawType=mm),gm(t,e,I,D,n),L&&(n.batchFill||n.batchStroke)||t.beginPath(),i=t,C=e,l=L,y=sm(s=A),m=lm(s),v=s.strokePercent,_=v<1,x=!C.path,C.silent&&!_||!x||C.createPathProxy(),b=C.path||am,l||(w=s.fill,O=s.stroke,S=m&&!!w.colorStops,u=y&&!!O.colorStops,h=m&&!!w.image,c=y&&!!O.image,P=f=d=p=M=void 0,(S||u)&&(P=C.getBoundingRect()),S&&(M=C.__dirty?im(i,w,P):C.__canvasFillGradient,C.__canvasFillGradient=M),u&&(p=C.__dirty?im(i,O,P):C.__canvasStrokeGradient,C.__canvasStrokeGradient=p),h&&(d=C.__dirty||!C.__canvasFillPattern?cm(i,w,C):C.__canvasFillPattern,C.__canvasFillPattern=d),c&&(f=C.__dirty||!C.__canvasStrokePattern?cm(i,O,C):C.__canvasStrokePattern,C.__canvasStrokePattern=d),S?i.fillStyle=M:h&&(d?i.fillStyle=d:m=!1),u?i.strokeStyle=p:c&&(f?i.strokeStyle=f:y=!1)),P=s.lineDash&&0<s.lineWidth&&rm(s.lineDash,s.lineWidth),w=s.lineDashOffset,O=!!i.setLineDash,S=C.getGlobalScale(),b.setScale(S[0],S[1],C.segmentIgnoreThreshold),P&&(g=s.strokeNoScale&&C.getLineScale?C.getLineScale():1)&&1!==g&&(P=j(P,function(t){return t/g}),w/=g),M=!0,(x||C.__dirty&q.SHAPE_CHANGED_BIT||P&&!O&&y)&&(b.setDPR(i.dpr),_?b.setContext(null):(b.setContext(i),M=!1),b.reset(),P&&!O&&(b.setLineDash(P),b.setLineDashOffset(w)),C.buildPath(b,C.shape,l),b.toStatic(),C.pathUpdated()),M&&b.rebuildPath(i,_?v:1),P&&O&&(i.setLineDash(P),i.lineDashOffset=w),l||(s.strokeFirst?(y&&hm(i,s),m&&um(i,s)):(m&&um(i,s),y&&hm(i,s))),P&&O&&i.setLineDash([]),L&&(n.batchFill=A.fill||"",n.batchStroke=A.stroke||"");else if(e instanceof is)n.lastDrawType!==_m&&(D=!0,n.lastDrawType=_m),gm(t,e,I,D,n),h=t,d=e,null!=(p=(u=A).text)&&(p+=""),p&&(h.font=u.font||ti,h.textAlign=u.textAlign,h.textBaseline=u.textBaseline,c=void 0,h.setLineDash&&(f=u.lineDash&&0<u.lineWidth&&rm(u.lineDash,u.lineWidth),S=u.lineDashOffset,f)&&((a=u.strokeNoScale&&d.getLineScale?d.getLineScale():1)&&1!==a&&(f=j(f,function(t){return t/a}),S/=a),h.setLineDash(f),h.lineDashOffset=S,c=!0),u.strokeFirst?(sm(u)&&h.strokeText(p,u.x,u.y),lm(u)&&h.fillText(p,u.x,u.y)):(lm(u)&&h.fillText(p,u.x,u.y),sm(u)&&h.strokeText(p,u.x,u.y)),c)&&h.setLineDash([]);else if(e instanceof ls)n.lastDrawType!==vm&&(D=!0,n.lastDrawType=vm),x=I,C=D,fm(t,wm(e,(M=n).inHover),x&&wm(x,M.inHover),C,M),b=t,_=A,(w=(v=e).__image=xr(_.image,v.__image,v,v.onload))&&wr(w)&&(l=_.x||0,m=_.y||0,y=v.getWidth(),v=v.getHeight(),s=w.width/w.height,null==y&&null!=v?y=v*s:null==v&&null!=y?v=y/s:null==y&&null==v&&(y=w.width,v=w.height),_.sWidth&&_.sHeight?(o=_.sx||0,r=_.sy||0,b.drawImage(w,o,r,_.sWidth,_.sHeight,l,m,y,v)):_.sx&&_.sy?(s=y-(o=_.sx),_=v-(r=_.sy),b.drawImage(w,o,r,s,_,l,m,y,v)):b.drawImage(w,l,m,y,v));else if(e instanceof ph){n.lastDrawType!==xm&&(D=!0,n.lastDrawType=xm);{var H=t;var P=e;var O=n;var G=P.getDisplayables(),W=P.getTemporalDisplayables();H.save();var R,U,Y={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:O.viewWidth,viewHeight:O.viewHeight,inHover:O.inHover};for(R=P.getCursor(),U=G.length;R<U;R++)(N=G[R]).beforeBrush&&N.beforeBrush(),N.innerBeforeBrush(),Mm(H,N,Y,R===U-1),N.innerAfterBrush(),N.afterBrush&&N.afterBrush(),Y.prevEl=N;for(var N,X=0,Z=W.length;X<Z;X++)(N=W[X]).beforeBrush&&N.beforeBrush(),N.innerBeforeBrush(),Mm(H,N,Y,X===Z-1),N.innerAfterBrush(),N.afterBrush&&N.afterBrush(),Y.prevEl=N;P.clearTemporalDisplayables(),P.notClear=!0,H.restore()}}L&&E&&bm(t,n),e.innerAfterBrush(),e.afterBrush&&e.afterBrush(),(n.prevEl=e).__dirty=0,e.__isRendered=!0}}var Tm=new Xy,Cm=new en(100),Im=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function Am(t,e){if("none"===t)return null;var n=e.getDevicePixelRatio(),i=e.getZr(),o="svg"===i.painter.type,e=(t.dirty&&Tm.delete(t),Tm.get(t));if(e)return e;for(var r,a=V(t,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512}),e=("none"===a.backgroundColor&&(a.backgroundColor=null),{repeat:"repeat"}),s=e,l=[n],u=!0,h=0;h<Im.length;++h){var c=a[Im[h]],p=typeof c;if(null!=c&&!F(c)&&"string"!=p&&"number"!=p&&"boolean"!=p){u=!1;break}l.push(c)}u&&(r=l.join(",")+(o?"-svg":""),_=Cm.get(r))&&(o?s.svgElement=_:s.image=_);var d,f=function t(e){if(!e||0===e.length)return[[0,0]];if("number"==typeof e)return[[r=Math.ceil(e),r]];for(var n=!0,i=0;i<e.length;++i)if("number"!=typeof e[i]){n=!1;break}if(n)return t([e]);var o=[];for(i=0;i<e.length;++i){var r;"number"==typeof e[i]?(r=Math.ceil(e[i]),o.push([r,r])):(r=j(e[i],function(t){return Math.ceil(t)})).length%2==1?o.push(r.concat(r)):o.push(r)}return o}(a.dashArrayX),g=function(t){if(!t||"object"==typeof t&&0===t.length)return[0,0];if("number"==typeof t)return[e=Math.ceil(t),e];var e=j(t,function(t){return Math.ceil(t)});return t.length%2?e.concat(e):e}(a.dashArrayY),y=function t(e){if(!e||0===e.length)return[["rect"]];if("string"==typeof e)return[[e]];for(var n=!0,i=0;i<e.length;++i)if("string"!=typeof e[i]){n=!1;break}if(n)return t([e]);var o=[];for(i=0;i<e.length;++i)"string"==typeof e[i]?o.push([e[i]]):o.push(e[i]);return o}(a.symbol),m=j(f,Dm),v=Dm(g),_=!o&&nt(),x=o&&i.painter.createSVGElement("g"),b=function(){for(var t=1,e=0,n=m.length;e<n;++e)t=No(t,m[e]);for(var i=1,e=0,n=y.length;e<n;++e)i=No(i,y[e].length);t*=i;var o=v*m.length*y.length;return{width:Math.max(1,Math.min(t,a.maxTileWidth)),height:Math.max(1,Math.min(o,a.maxTileHeight))}}();_&&(_.width=b.width*n,_.height=b.height*n,d=_.getContext("2d")),d&&(d.clearRect(0,0,_.width,_.height),a.backgroundColor)&&(d.fillStyle=a.backgroundColor,d.fillRect(0,0,_.width,_.height));for(var w=0,S=0;S<g.length;++S)w+=g[S];if(!(w<=0))for(var M,T=-v,C=0,I=0,A=0;T<b.height;){if(C%2==0){for(var D=I/2%y.length,k=0,L=0,P=0;k<2*b.width;){for(var O,R,E,B,N,z=0,S=0;S<f[A].length;++S)z+=f[A][S];if(z<=0)break;L%2==0&&(R=.5*(1-a.symbolSize),O=k+f[A][L]*R,R=T+g[C]*R,E=f[A][L]*a.symbolSize,B=g[C]*a.symbolSize,N=P/2%y[D].length,N=y[D][N],M=void 0,N=nm(N,O*(M=o?1:n),R*M,E*M,B*M,a.color,a.symbolKeepAspect),o?x.appendChild(i.painter.paintOne(N)):Sm(d,N)),k+=f[A][L],++P,++L===f[A].length&&(L=0)}++A===f.length&&(A=0)}T+=g[C],++I,++C===g.length&&(C=0)}return u&&Cm.put(r,_||x),s.image=_,s.svgElement=x,s.svgWidth=b.width,s.svgHeight=b.height,e.rotation=a.rotation,e.scaleX=e.scaleY=o?1:1/n,Tm.set(t,e),t.dirty=!1,e}function Dm(t){for(var e=0,n=0;n<t.length;++n)e+=t[n];return t.length%2==1?2*e:e}function km(t){var e=t=D(t)?(new DOMParser).parseFromString(t,"text/xml"):t;for(9===e.nodeType&&(e=e.firstChild);"svg"!==e.nodeName.toLowerCase()||1!==e.nodeType;)e=e.nextSibling;return e}var Lm,Pm={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},Om=lt(Pm),Rm={"alignment-baseline":"textBaseline","stop-color":"stopColor"},Nm=lt(Rm),Em=(zm.prototype.parse=function(t,e){e=e||{};t=km(t);if(!t)throw new Error("Illegal svg");this._defsUsePending=[];var n=new O,i=(this._root=n,[]),o=t.getAttribute("viewBox")||"",r=parseFloat(t.getAttribute("width")||e.width),a=parseFloat(t.getAttribute("height")||e.height);isNaN(r)&&(r=null),isNaN(a)&&(a=null),Wm(t,n,null,!0,!1);for(var s,l,u=t.firstChild;u;)this._parseNode(u,n,i,null,!1,!1),u=u.nextSibling;for(var h=this._defs,c=this._defsUsePending,p=0;p<c.length;p++){var d=c[p];d[0].style[d[1]]=h[d[2]]}return this._defsUsePending=[],(s=o&&4<=(t=Zm(o)).length?{x:parseFloat(t[0]||0),y:parseFloat(t[1]||0),width:parseFloat(t[2]),height:parseFloat(t[3])}:s)&&null!=r&&null!=a&&(l=$m(s,{x:0,y:0,width:r,height:a}),!e.ignoreViewBox)&&(o=n,(n=new O).add(o),o.scaleX=o.scaleY=l.scale,o.x=l.x,o.y=l.y),e.ignoreRootClip||null==r||null==a||n.setClipPath(new ms({shape:{x:0,y:0,width:r,height:a}})),{root:n,width:r,height:a,viewBoxRect:s,viewBoxTransform:l,named:i}},zm.prototype._parseNode=function(t,e,n,i,o,r){var a,s,l=t.nodeName.toLowerCase(),u=i;if("defs"===l&&(o=!0),"text"===l&&(r=!0),"defs"===l||"switch"===l?a=e:(o||(s=Lm[l])&&_(Lm,l)&&(a=s.call(this,t,e),(s=t.getAttribute("name"))?(n.push(s={name:s,namedFrom:null,svgNodeTagLower:l,el:a}),"g"===l&&(u=s)):i&&n.push({name:i.name,namedFrom:i,svgNodeTagLower:l,el:a}),e.add(a)),(s=Bm[l])&&_(Bm,l)&&(i=s.call(this,t),e=t.getAttribute("id"))&&(this._defs[e]=i)),a&&a.isGroup)for(var h=t.firstChild;h;)1===h.nodeType?this._parseNode(h,a,n,u,o,r):3===h.nodeType&&r&&this._parseText(h,a),h=h.nextSibling},zm.prototype._parseText=function(t,e){var n=new is({style:{text:t.textContent},silent:!0,x:this._textX||0,y:this._textY||0}),t=(Hm(e,n),Wm(t,n,this._defsUsePending,!1,!1),n),i=e,o=i.__selfStyle,o=(o&&(o=o.textBaseline,!(r=o)||"auto"===o||"baseline"===o?r="alphabetic":"before-edge"===o||"text-before-edge"===o?r="top":"after-edge"===o||"text-after-edge"===o?r="bottom":"central"!==o&&"mathematical"!==o||(r="middle"),t.style.textBaseline=r),(o=i.__inheritedStyle)&&(r=o.textAlign,i=r)&&("middle"===r&&(i="center"),t.style.textAlign=i),n.style),r=o.fontSize,t=(r&&r<9&&(o.fontSize=9,n.scaleX*=r/9,n.scaleY*=r/9),(o.fontSize||o.fontFamily)&&[o.fontStyle,o.fontWeight,(o.fontSize||12)+"px",o.fontFamily||"sans-serif"].join(" ")),i=(o.font=t,n.getBoundingRect());return this._textX+=i.width,e.add(n),n},zm.internalField=void(Lm={g:function(t,e){var n=new O;return Hm(e,n),Wm(t,n,this._defsUsePending,!1,!1),n},rect:function(t,e){var n=new ms;return Hm(e,n),Wm(t,n,this._defsUsePending,!1,!1),n.setShape({x:parseFloat(t.getAttribute("x")||"0"),y:parseFloat(t.getAttribute("y")||"0"),width:parseFloat(t.getAttribute("width")||"0"),height:parseFloat(t.getAttribute("height")||"0")}),n.silent=!0,n},circle:function(t,e){var n=new ql;return Hm(e,n),Wm(t,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),r:parseFloat(t.getAttribute("r")||"0")}),n.silent=!0,n},line:function(t,e){var n=new Nu;return Hm(e,n),Wm(t,n,this._defsUsePending,!1,!1),n.setShape({x1:parseFloat(t.getAttribute("x1")||"0"),y1:parseFloat(t.getAttribute("y1")||"0"),x2:parseFloat(t.getAttribute("x2")||"0"),y2:parseFloat(t.getAttribute("y2")||"0")}),n.silent=!0,n},ellipse:function(t,e){var n=new Ql;return Hm(e,n),Wm(t,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),rx:parseFloat(t.getAttribute("rx")||"0"),ry:parseFloat(t.getAttribute("ry")||"0")}),n.silent=!0,n},polygon:function(t,e){var n,i=t.getAttribute("points"),i=(i&&(n=Gm(i)),new Cu({shape:{points:n||[]},silent:!0}));return Hm(e,i),Wm(t,i,this._defsUsePending,!1,!1),i},polyline:function(t,e){var n,i=t.getAttribute("points"),i=(i&&(n=Gm(i)),new ku({shape:{points:n||[]},silent:!0}));return Hm(e,i),Wm(t,i,this._defsUsePending,!1,!1),i},image:function(t,e){var n=new ls;return Hm(e,n),Wm(t,n,this._defsUsePending,!1,!1),n.setStyle({image:t.getAttribute("xlink:href"),x:+t.getAttribute("x"),y:+t.getAttribute("y"),width:+t.getAttribute("width"),height:+t.getAttribute("height")}),n.silent=!0,n},text:function(t,e){var n=t.getAttribute("x")||"0",i=t.getAttribute("y")||"0",o=t.getAttribute("dx")||"0",r=t.getAttribute("dy")||"0",n=(this._textX=parseFloat(n)+parseFloat(o),this._textY=parseFloat(i)+parseFloat(r),new O);return Hm(e,n),Wm(t,n,this._defsUsePending,!1,!0),n},tspan:function(t,e){var n=t.getAttribute("x"),i=t.getAttribute("y"),n=(null!=n&&(this._textX=parseFloat(n)),null!=i&&(this._textY=parseFloat(i)),t.getAttribute("dx")||"0"),i=t.getAttribute("dy")||"0",o=new O;return Hm(e,o),Wm(t,o,this._defsUsePending,!1,!0),this._textX+=parseFloat(n),this._textY+=parseFloat(i),o},path:function(t,e){var n=Xl(t.getAttribute("d")||"");return Hm(e,n),Wm(t,n,this._defsUsePending,!1,!1),n.silent=!0,n}}),zm),Bm={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||"0",10),n=parseInt(t.getAttribute("y1")||"0",10),i=parseInt(t.getAttribute("x2")||"10",10),o=parseInt(t.getAttribute("y2")||"0",10),e=new Qu(e,n,i,o);return Vm(t,e),Fm(t,e),e},radialgradient:function(t){var e=parseInt(t.getAttribute("cx")||"0",10),n=parseInt(t.getAttribute("cy")||"0",10),i=parseInt(t.getAttribute("r")||"0",10),e=new nh(e,n,i);return Vm(t,e),Fm(t,e),e}};function zm(){this._defs={},this._root=null}function Vm(t,e){"userSpaceOnUse"===t.getAttribute("gradientUnits")&&(e.global=!0)}function Fm(t,e){for(var n,i,o=t.firstChild;o;)1===o.nodeType&&"stop"===o.nodeName.toLocaleLowerCase()&&(n=void 0,n=(i=o.getAttribute("offset"))&&0<i.indexOf("%")?parseInt(i,10)/100:i?parseFloat(i):0,Km(o,i={},i),i=i.stopColor||o.getAttribute("stop-color")||"#000000",e.colorStops.push({offset:n,color:i})),o=o.nextSibling}function Hm(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),V(e.__inheritedStyle,t.__inheritedStyle))}function Gm(t){for(var e=Zm(t),n=[],i=0;i<e.length;i+=2){var o=parseFloat(e[i]),r=parseFloat(e[i+1]);n.push([o,r])}return n}function Wm(t,e,n,i,o){var r=e,a=r.__inheritedStyle=r.__inheritedStyle||{},s={};if(1===t.nodeType){var l=t;if(l=l.getAttribute("transform")){l=l.replace(/,/g," ");var u=[],h=null;l.replace(jm,function(t,e,n){return u.push(e,n),""});for(var c=u.length-1;0<c;c-=2){var p=u[c],d=void 0;switch(h=h||Pe(),u[c-1]){case"translate":d=Zm(p),Ee(h,h,[parseFloat(d[0]),parseFloat(d[1]||"0")]);break;case"scale":d=Zm(p),ze(h,h,[parseFloat(d[0]),parseFloat(d[1]||d[0])]);break;case"rotate":d=Zm(p),Be(h,h,-parseFloat(d[0])/180*Math.PI);break;case"skew":d=Zm(p),console.warn("Skew transform is not supported yet");break;case"matrix":d=Zm(p),h[0]=parseFloat(d[0]),h[1]=parseFloat(d[1]),h[2]=parseFloat(d[2]),h[3]=parseFloat(d[3]),h[4]=parseFloat(d[4]),h[5]=parseFloat(d[5])}}e.setLocalTransform(h)}if(Km(t,a,s),!i){for(var f=t,g=a,y=s,m,v=0;v<Om.length;v++){var _=Om[v];null!=(m=f.getAttribute(_))&&(g[Pm[_]]=m)}for(v=0;v<Nm.length;v++)_=Nm[v],null!=(m=f.getAttribute(_))&&(y[Rm[_]]=m)}}r.style=r.style||{},null!=a.fill&&(r.style.fill=Ym(r,"fill",a.fill,n)),null!=a.stroke&&(r.style.stroke=Ym(r,"stroke",a.stroke,n)),N(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(t){null!=a[t]&&(r.style[t]=parseFloat(a[t]))}),N(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign"],function(t){null!=a[t]&&(r.style[t]=a[t])}),o&&(r.__selfStyle=s),a.lineDash&&(r.style.lineDash=j(Zm(a.lineDash),function(t){return parseFloat(t)})),"hidden"!==a.visibility&&"collapse"!==a.visibility||(r.invisible=!0),"none"===a.display&&(r.ignore=!0),r.z=-1e4,r.z2=-1e3}var Um=/^url\(\s*#(.*?)\)/;function Ym(t,e,n,i){var o=n&&n.match(Um);if(!o)return n="none"===n?null:n;n=Mt(o[1]);i.push([t,e,n])}var Xm=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Zm(t){return t.match(Xm)||[]}var jm=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g;var qm=/([^\s:;]+)\s*:\s*([^:;]+)/g;function Km(t,e,n){var i,o=t.getAttribute("style");if(o)for(qm.lastIndex=0;null!=(i=qm.exec(o));){var r=i[1],a=_(Pm,r)?Pm[r]:null,a=(a&&(e[a]=i[2]),_(Rm,r)?Rm[r]:null);a&&(n[a]=i[2])}}function $m(t,e){var n=e.width/t.width,i=e.height/t.height,n=Math.min(n,i);return{scale:n,x:-(t.x+t.width/2)*n+(e.x+e.width/2),y:-(t.y+t.height/2)*n+(e.y+e.height/2)}}var Jm=1e-8;function Qm(t,e){return Math.abs(t-e)<Jm}function t0(t,e,n){var i=0,o=t[0];if(o){for(var r=1;r<t.length;r++){var a=t[r];i+=Ga(o[0],o[1],a[0],a[1],e,n),o=a}var s=t[0];return Qm(o[0],s[0])&&Qm(o[1],s[1])||(i+=Ga(o[0],o[1],s[0],s[1],e,n)),0!==i}}var e0=[],qy=(n0.prototype.getCenter=function(){},n0);function n0(t){this.name=t}u(r0,i0=qy),r0.prototype.getBoundingRect=function(){var t=this._rect;if(t)return t;for(var t=Number.MAX_VALUE,e=[t,t],n=[-t,-t],i=[],o=[],r=this.geometries,a=0;a<r.length;a++)if("polygon"===r[a].type){var s=r[a].exterior,l=(y=g=f=d=p=c=h=u=l=void 0,s),u=i,h=o;if(0!==l.length){for(var c=l[0],p=c[0],d=c[0],f=c[1],g=c[1],y=1;y<l.length;y++)c=l[y],p=sa(p,c[0]),d=la(d,c[0]),f=sa(f,c[1]),g=la(g,c[1]);u[0]=p,u[1]=f,h[0]=d,h[1]=g}Zt(e,e,i),jt(n,n,o)}return 0===a&&(e[0]=e[1]=n[0]=n[1]=0),this._rect=new R(e[0],e[1],n[0]-e[0],n[1]-e[1])},r0.prototype.contain=function(t){var e=this.getBoundingRect(),n=this.geometries;if(e.contain(t[0],t[1]))t:for(var i=0,o=n.length;i<o;i++)if("polygon"===n[i].type){var r=n[i].exterior,a=n[i].interiors;if(t0(r,t[0],t[1])){for(var s=0;s<(a?a.length:0);s++)if(t0(a[s],t[0],t[1]))continue t;return!0}}return!1},r0.prototype.transformTo=function(t,e,n,i){var o=this.getBoundingRect(),r=o.width/o.height;n?i=i||n/r:n=r*i;for(var r=new R(t,e,n,i),a=o.calculateTransform(r),s=this.geometries,l=0;l<s.length;l++)if("polygon"===s[l].type){for(var u=s[l].exterior,h=s[l].interiors,c=0;c<u.length;c++)Xt(u[c],u[c],a);for(var p=0;p<(h?h.length:0);p++)for(c=0;c<h[p].length;c++)Xt(h[p][c],h[p][c],a)}(o=this._rect).copy(r),this._center=[o.x+o.width/2,o.y+o.height/2]},r0.prototype.cloneShallow=function(t){t=new r0(t=null==t?this.name:t,this.geometries,this._center);return t._rect=this._rect,t.transformTo=null,t},r0.prototype.getCenter=function(){return this._center},r0.prototype.setCenter=function(t){this._center=t};var i0,o0=r0;function r0(t,e,n){t=i0.call(this,t)||this;return t.type="geoJSON",t.geometries=e,n=n?[n[0],n[1]]:[(e=t.getBoundingRect()).x+e.width/2,e.y+e.height/2],t._center=n,t}u(l0,a0=qy),l0.prototype.getCenter=function(){return this._center||(this._center=this._calculateCenter())},l0.prototype._calculateCenter=function(){for(var t=this._elOnlyForCalculate,e=t.getBoundingRect(),e=[e.x+e.width/2,e.y+e.height/2],n=Oe(e0),i=t;i&&!i.isGeoSVGGraphicRoot;)Ne(n,i.getLocalTransform(),n),i=i.parent;return Ve(n,n),Xt(e,e,n),e};var a0,s0=l0;function l0(t,e){t=a0.call(this,t)||this;return t.type="geoSVG",t._elOnlyForCalculate=e,t}var u0=L(["rect","circle","line","ellipse","polygon","polyline","path","text","tspan","g"]),h0=(c0.prototype.load=function(){var t,e,n,i;return this._firstGraphic||(e=this._firstGraphic=this._buildGraphic(this._parsedXML),this._freedGraphics.push(e),this._boundingRect=this._firstGraphic.boundingRect.clone(),e=e.named,n=[],i=L(),N(e,function(t){var e;null==t.namedFrom&&(e=new s0(t.name,t.el),n.push(e),i.set(t.name,e))}),t=(e={regions:n,regionsMap:i}).regionsMap,this._regions=e.regions,this._regionsMap=t),{boundingRect:this._boundingRect,regions:this._regions,regionsMap:this._regionsMap}},c0.prototype._buildGraphic=function(t){var e,n,i,o;try{St(null!=(n=(e=t&&(i=t,o={ignoreViewBox:!0,ignoreRootClip:!0},(new Em).parse(i,o))||{}).root))}catch(t){throw new Error("Invalid svg format\n"+t.message)}var r,a,s,l,u=new O,h=(u.add(n),u.isGeoSVGGraphicRoot=!0,e.width),c=e.height,p=e.viewBoxRect,d=this._boundingRect,f=(d||(l=s=a=r=void 0,null!=h?(r=0,s=h):p&&(r=p.x,s=p.width),null!=c?(a=0,l=c):p&&(a=p.y,l=p.height),null!=r&&null!=a||(h=n.getBoundingRect(),null==r&&(r=h.x,s=h.width),null==a&&(a=h.y,l=h.height)),d=this._boundingRect=new R(r,a,s,l)),p&&(c=$m(p,d),n.scaleX=n.scaleY=c.scale,n.x=c.x,n.y=c.y),u.setClipPath(new ms({shape:d.plain()})),[]);return N(e.named,function(t){null!=u0.get(t.svgNodeTagLower)&&(f.push(t),(t=t.el).silent=!1,t.isGroup)&&t.traverse(function(t){t.silent=!1})}),{root:u,boundingRect:d,named:f}},c0.prototype.useGraphic=function(t){var e,n=this._usedGraphicMap;return n.get(t)||(e=this._freedGraphics.pop()||this._buildGraphic(this._parsedXML),n.set(t,e),e)},c0.prototype.freeGraphic=function(t){var e=this._usedGraphicMap,n=e.get(t);n&&(e.removeKey(t),this._freedGraphics.push(n))},c0);function c0(t,e){this.type="geoSVG",this._usedGraphicMap=L(),this._freedGraphics=[],this._mapName=t,this._parsedXML=km(e)}function p0(t,e,n){for(var i=[],o=e[0],r=e[1],a=0;a<t.length;a+=2){var s=(s=t.charCodeAt(a)-64)>>1^-(1&s),l=(l=t.charCodeAt(a+1)-64)>>1^-(1&l),o=s+=o,r=l+=r;i.push([s/n,l/n])}return i}function d0(t,o){return j(st((t=function(t){if(t.UTF8Encoding){var e=t.UTF8Scale;null==e&&(e=1024);for(var n=t.features,i=0;i<n.length;i++){var o=n[i].geometry;if("Polygon"===o.type)for(var r=o.coordinates,a=0;a<r.length;a++)r[a]=p0(r[a],o.encodeOffsets[a],e);else if("MultiPolygon"===o.type)for(r=o.coordinates,a=0;a<r.length;a++)for(var s=r[a],l=0;l<s.length;l++)s[l]=p0(s[l],o.encodeOffsets[a][l],e)}t.UTF8Encoding=!1}return t}(t)).features,function(t){return t.geometry&&t.properties&&0<t.geometry.coordinates.length}),function(t){var e,n=t.properties,t=t.geometry,i=[],t=("Polygon"===t.type&&(e=t.coordinates,i.push({type:"polygon",exterior:e[0],interiors:e.slice(1)})),"MultiPolygon"===t.type&&N(e=t.coordinates,function(t){t[0]&&i.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})}),new o0(n[o||"name"],i,n.cp));return t.properties=n,t})}for(var f0=[126,25],g0=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],y0=0;y0<g0.length;y0++)for(var m0=0;m0<g0[y0].length;m0++)g0[y0][m0][0]/=10.5,g0[y0][m0][1]/=-14,g0[y0][m0][0]+=f0[0],g0[y0][m0][1]+=f0[1];var v0={"南海诸岛":[32,80],"广东":[0,-10],"香港":[10,5],"澳门":[-10,10],"天津":[5,5]};var _0={Russia:[100,60],"United States":[-99,38],"United States of America":[-99,38]};var x0=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];w0.prototype.load=function(n,t){var e,i=this._parsedMap.get(t=t||"name"),o=(i||(e=this._parseToRegions(t),i=this._parsedMap.set(t,{regions:e,boundingRect:function(t){for(var e,n=0;n<t.length;n++){var i=t[n].getBoundingRect();(e=e||i.clone()).union(i)}return e}(e)})),L()),r=[];return N(i.regions,function(t){var e=t.name;n&&n.hasOwnProperty(e)&&(t=t.cloneShallow(e=n[e])),r.push(t),o.set(e,t)}),{regions:r,boundingRect:i.boundingRect||new R(0,0,0,0),regionsMap:o}},w0.prototype._parseToRegions=function(t){var e,r=this._mapName,n=this._geoJSON;try{e=n?d0(n,t):[]}catch(t){throw new Error("Invalid geoJson format\n"+t.message)}return n=e,"china"===r&&n.push(new o0("南海诸岛",j(g0,function(t){return{type:"polygon",exterior:t}}),f0)),N(e,function(t){var e,n,i=t.name,o=(e=t,"china"===(o=r)&&(o=v0[e.name])&&((n=e.getCenter())[0]+=o[0]/10.5,n[1]+=-o[1]/14,e.setCenter(n)),o=t,"world"===(e=r)&&(e=_0[o.name])&&(e=[e[0],e[1]],o.setCenter(e)),n=t,"china"===r&&"台湾"===n.name&&n.geometries.push({type:"polygon",exterior:x0[0]}),this._specialAreas&&this._specialAreas[i]);o&&t.transformTo(o.left,o.top,o.width,o.height)},this),e},w0.prototype.getMapForUser=function(){return{geoJson:this._geoJSON,geoJSON:this._geoJSON,specialAreas:this._specialAreas}};var b0=w0;function w0(t,e,n){this.type="geoJSON",this._parsedMap=L(),this._mapName=t,this._specialAreas=n,this._geoJSON=D(t=e)?"undefined"!=typeof JSON&&JSON.parse?JSON.parse(t):new Function("return ("+t+");")():t}var S0=L(),M0=function(t,e,n){var i,e=e.svg?new h0(t,e.svg):((i=e.geoJson||e.geoJSON)&&!e.features?n=e.specialAreas:i=e,new b0(t,i,n));S0.set(t,e)},T0=function(t){t=S0.get(t);return t&&"geoJSON"===t.type&&t.getMapForUser()},C0=St,I0=N,A0=ut,D0=k,k0=A,L0="undefined"!=typeof window,Ky={PROCESSOR:{FILTER:1e3,SERIES_FILTER:800,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,PROGRESSIVE_LAYOUT:1100,GLOBAL:2e3,CHART:3e3,POST_CHART_LAYOUT:4600,COMPONENT:4e3,BRUSH:5e3,CHART_ITEM:4500,ARIA:6e3,DECAL:7e3}},P0="__flagInMainProcess",O0="__optionUpdated",R0="__needsUpdateStatus",N0=/^[a-zA-Z0-9_]+$/,E0="__connectUpdateStatus";function B0(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(!this.isDisposed())return V0(this,n,t);this.id}}function z0(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return V0(this,n,t)}}function V0(t,e,n){return n[0]=n[0]&&n[0].toLowerCase(),Qt.prototype[e].apply(t,n)}u(uv,sv=Qt);var F0,H0,G0,W0,U0,Y0,X0,Z0,j0,q0,K0,$0,J0,Q0,tv,ev,nv,iv,ov,rv,av,sv,lv=uv,$y=lv.prototype;function uv(){return null!==sv&&sv.apply(this,arguments)||this}$y.on=z0("on"),$y.off=z0("off");u(s,hv=Qt),s.prototype._onframe=function(){if(!this._disposed){av(this);var t=this._scheduler;if(this[O0]){var e=this[O0].silent;this[P0]=!0,F0(this),W0.update.call(this),this._zr.flush(),this[P0]=!1,this[O0]=!1,Z0.call(this,e),j0.call(this,e)}else if(t.unfinished){var n=1,i=this._model,o=this._api;t.unfinished=!1;do{var r=+new Date}while(t.performSeriesTasks(i),t.performDataProcessorTasks(i),Y0(this,i),t.performVisualTasks(i),tv(this,this._model,o,"remain"),0<(n-=+new Date-r)&&t.unfinished);t.unfinished||this._zr.flush()}}},s.prototype.getDom=function(){return this._dom},s.prototype.getId=function(){return this.id},s.prototype.getZr=function(){return this._zr},s.prototype.setOption=function(t,e,n){var i,o,r,a,s;this._disposed?this.id:(D0(e)&&(n=e.lazyUpdate,i=e.silent,o=e.replaceMerge,r=e.transition,e=e.notMerge),this[P0]=!0,this._model&&!e||(e=new cd(this._api),a=this._theme,(s=this._model=new ed).scheduler=this._scheduler,s.init(null,null,null,a,this._locale,e)),this._model.setOption(t,{replaceMerge:o},xv),ov(this,r),n?(this[O0]={silent:i},this[P0]=!1,this.getZr().wakeUp()):(F0(this),W0.update.call(this),this._zr.flush(),this[O0]=!1,this[P0]=!1,Z0.call(this,i),j0.call(this,i)))},s.prototype.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},s.prototype.getModel=function(){return this._model},s.prototype.getOption=function(){return this._model&&this._model.getOption()},s.prototype.getWidth=function(){return this._zr.getWidth()},s.prototype.getHeight=function(){return this._zr.getHeight()},s.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||L0&&window.devicePixelRatio||1},s.prototype.getRenderedCanvas=function(t){if(w.canvasSupported)return(t=I({},t||{})).pixelRatio=t.pixelRatio||this.getDevicePixelRatio(),t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor"),this._zr.painter.getRenderedCanvas(t)},s.prototype.getSvgDataURL=function(){var t;if(w.svgSupported)return N((t=this._zr).storage.getDisplayList(),function(t){t.stopAnimation(null,!0)}),t.painter.toDataURL()},s.prototype.getDataURL=function(t){var e,n,i,o;if(!this._disposed)return o=(t=t||{}).excludeComponents,e=this._model,n=[],i=this,I0(o,function(t){e.eachComponent({mainType:t},function(t){t=i._componentsMap[t.__viewId];t.group.ignore||(n.push(t),t.group.ignore=!0)})}),o="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png")),I0(n,function(t){t.group.ignore=!1}),o;this.id},s.prototype.getConnectedDataURL=function(i){var o,r,a,s,l,u,h,c,p,e,t,n,d,f,g;if(this._disposed)this.id;else if(w.canvasSupported)return o="svg"===i.type,r=this.group,a=Math.min,s=Math.max,Iv[r]?(u=l=1/0,c=h=-1/0,p=[],e=i&&i.pixelRatio||this.getDevicePixelRatio(),N(Cv,function(t,e){var n;t.group===r&&(n=o?t.getZr().painter.getSvgDom().innerHTML:t.getRenderedCanvas(C(i)),t=t.getDom().getBoundingClientRect(),l=a(t.left,l),u=a(t.top,u),h=s(t.right,h),c=s(t.bottom,c),p.push({dom:n,left:t.left,top:t.top}))}),t=(h*=e)-(l*=e),n=(c*=e)-(u*=e),d=nt(),(f=yo(d,{renderer:o?"svg":"canvas"})).resize({width:t,height:n}),o?(g="",I0(p,function(t){var e=t.left-l,n=t.top-u;g+='<g transform="translate('+e+","+n+')">'+t.dom+"</g>"}),f.painter.getSvgRoot().innerHTML=g,i.connectedBackgroundColor&&f.painter.setBackgroundColor(i.connectedBackgroundColor),f.refreshImmediately(),f.painter.toDataURL()):(i.connectedBackgroundColor&&f.add(new ms({shape:{x:0,y:0,width:t,height:n},style:{fill:i.connectedBackgroundColor}})),I0(p,function(t){t=new ls({style:{x:t.left*e-l,y:t.top*e-u,image:t.dom}});f.add(t)}),f.refreshImmediately(),d.toDataURL("image/"+(i&&i.type||"png")))):this.getDataURL(i)},s.prototype.convertToPixel=function(t,e){return U0(this,"convertToPixel",t,e)},s.prototype.convertFromPixel=function(t,e){return U0(this,"convertFromPixel",t,e)},s.prototype.containPixel=function(t,i){var o;if(!this._disposed)return N(Jo(this._model,t),function(t,n){0<=n.indexOf("Models")&&N(t,function(t){var e=t.coordinateSystem;e&&e.containPoint?o=o||!!e.containPoint(i):"seriesModels"===n&&(e=this._chartsMap[t.__viewId])&&e.containPoint&&(o=o||e.containPoint(i,t))},this)},this),!!o;this.id},s.prototype.getVisual=function(t,e){var t=Jo(this._model,t,{defaultMainType:"series"}),n=t.seriesModel.getData(),t=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?n.indexOfRawIndex(t.dataIndex):null;if(null==t)return hy(n,e);var i=n,o=t,r=e;switch(r){case"color":return i.getItemVisual(o,"style")[i.getVisual("drawType")];case"opacity":return i.getItemVisual(o,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return i.getItemVisual(o,r)}},s.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},s.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},s.prototype._initEvents=function(){var t,n,i,s=this;I0(yv,function(a){function t(t){var n,e,i,o=s.getModel(),r=t.target;"globalout"===a?n={}:r&&Uy(r,function(t){var e,t=z(t);return t&&null!=t.dataIndex?(e=t.dataModel||o.getSeriesByIndex(t.seriesIndex),n=e&&e.getDataParams(t.dataIndex,t.dataType)||{},1):t.eventData&&(n=I({},t.eventData),1)},!0),n&&(e=n.componentType,i=n.componentIndex,"markLine"!==e&&"markPoint"!==e&&"markArea"!==e||(e="series",i=n.seriesIndex),i=(e=e&&null!=i&&o.getComponent(e,i))&&s["series"===e.mainType?"_chartsMap":"_componentsMap"][e.__viewId],n.event=t,n.type=a,s._$eventProcessor.eventInfo={targetEl:r,packedEvent:n,model:e,view:i},s.trigger(a,n))}t.zrEventfulCallAtLast=!0,s._zr.on(a,t,s)}),I0(vv,function(t,e){s._messageCenter.on(e,function(t){this.trigger(e,t)},s)}),I0(["selectchanged"],function(e){s._messageCenter.on(e,function(t){this.trigger(e,t)},s)}),t=this._messageCenter,i=(n=this)._api,t.on("selectchanged",function(t){var e=i.getModel();t.isFromClick?(Wy("map","selectchanged",n,e,t),Wy("pie","selectchanged",n,e,t)):"select"===t.fromAction?(Wy("map","selected",n,e,t),Wy("pie","selected",n,e,t)):"unselect"===t.fromAction&&(Wy("map","unselected",n,e,t),Wy("pie","unselected",n,e,t))})},s.prototype.isDisposed=function(){return this._disposed},s.prototype.clear=function(){this._disposed?this.id:this.setOption({series:[]},!0)},s.prototype.dispose=function(){var e,n;this._disposed?this.id:(this._disposed=!0,ir(this.getDom(),kv,""),e=this._api,n=this._model,I0(this._componentsViews,function(t){t.dispose(n,e)}),I0(this._chartsViews,function(t){t.dispose(n,e)}),this._zr.dispose(),delete Cv[this.id])},s.prototype.resize=function(t){var e,n;this._disposed?this.id:(this._zr.resize(t),e=this._model,this._loadingFX&&this._loadingFX.resize(),e&&(e=e.resetOption("media"),n=t&&t.silent,this[P0]=!0,e&&F0(this),W0.update.call(this,{type:"resize",animation:I({duration:0},t&&t.animation)}),this[P0]=!1,Z0.call(this,n),j0.call(this,n)))},s.prototype.showLoading=function(t,e){this._disposed?this.id:(D0(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),Tv[t]&&(t=Tv[t](this._api,e),e=this._zr,this._loadingFX=t,e.add(t)))},s.prototype.hideLoading=function(){this._disposed?this.id:(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},s.prototype.makeActionFromEvent=function(t){var e=I({},t);return e.type=vv[t.type],e},s.prototype.dispatchAction=function(t,e){var n;this._disposed?this.id:(D0(e)||(e={silent:!!e}),mv[t.type]&&this._model&&(this[P0]?this._pendingActions.push(t):(n=e.silent,X0.call(this,t,n),(t=e.flush)?this._zr.flush():!1!==t&&w.browser.weChat&&this._throttledZrFlush(),Z0.call(this,n),j0.call(this,n))))},s.prototype.updateLabelLayout=function(){var t=this._labelManager;t.updateLayoutConfig(this._api),t.layout(this._api),t.processLabelsOverall()},s.prototype.appendData=function(t){var e;this._disposed?this.id:(e=t.seriesIndex,this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp())},s.internalField=(F0=function(t){var e=t._scheduler;e.restorePipelines(t._model),e.prepareStageTasks(),H0(t,!0),H0(t,!1),e.plan()},H0=function(t,o){for(var r=t._model,a=t._scheduler,s=o?t._componentsViews:t._chartsViews,l=o?t._componentsMap:t._chartsMap,u=t._zr,h=t._api,e=0;e<s.length;e++)s[e].__alive=!1;function n(t){var e,n=t.__requireNewView,i=(t.__requireNewView=!1,"_ec_"+t.id+"_"+t.type),n=!n&&l[i];n||(e=lr(t.type),(n=new(o?_g.getClass(e.main,e.sub):Mg.getClass(e.sub))).init(r,h),l[i]=n,s.push(n),u.add(n.group)),t.__viewId=n.__id=i,n.__alive=!0,n.__model=t,n.group.__ecComponentInfo={mainType:t.mainType,index:t.componentIndex},o||a.prepareView(n,t,r,h)}for(o?r.eachComponent(function(t,e){"series"!==t&&n(e)}):r.eachSeries(n),e=0;e<s.length;){var i=s[e];i.__alive?e++:(o||i.renderTask.dispose(),u.remove(i.group),i.dispose(r,h),s.splice(e,1),l[i.__id]===i&&delete l[i.__id],i.__id=i.group.__ecComponentInfo=null)}},G0=function(p,e,d,f,t){var n,g,i=p._model;function y(t){t&&t.__alive&&t[e]&&t[e](t.__model,i,p._api,d)}i.setUpdatePayload(d),f?((n={})[f+"Id"]=d[f+"Id"],n[f+"Index"]=d[f+"Index"],n[f+"Name"]=d[f+"Name"],n={mainType:f,query:n},t&&(n.subType=t),null!=(t=d.excludeSeriesId)&&(g=L(),I0(zo(t),function(t){t=Yo(t,null);null!=t&&g.set(t,!0)})),Cl(d)&&gl(p._api),i&&i.eachComponent(n,function(t){if(!g||null==g.get(t.id)){if(Cl(d))if(t instanceof hg){if(d.type===Vs&&!d.notBlur){var e=t,n=d,i=p._api,o=e.seriesIndex,r=e.getData(n.dataType),n=(F(n=qo(r,n))?n[0]:n)||0,a=r.getItemGraphicEl(n);if(!a)for(var s=r.count(),l=0;!a&&l<s;)a=r.getItemGraphicEl(l++);a?yl(o,(n=z(a)).focus,n.blurScope,i):(n=e.get(["emphasis","focus"]),e=e.get(["emphasis","blurScope"]),null!=n&&yl(o,n,e,i))}}else n=(o=vl(t.mainType,t.componentIndex,d.name,p._api)).focusSelf,e=o.dispatchers,d.type===Vs&&n&&!d.notBlur&&ml(t.mainType,t.componentIndex,p._api),e&&I0(e,function(t){(d.type===Vs?ll:ul)(t)});else Tl(d)&&t instanceof hg&&(i=t,u=d,p._api,Tl(u)&&(h=u.dataType,F(c=qo(i.getData(h),u))||(c=[c]),i[u.type===Ws?"toggleSelect":u.type===Hs?"select":"unselect"](c,h)),_l(t),rv(p));y(p["series"===f?"_chartsMap":"_componentsMap"][t.__viewId])}var u,h,c},p)):I0([].concat(p._componentsViews).concat(p._chartsViews),y)},W0={prepareAndUpdate:function(t){F0(this),W0.update.call(this,t)},update:function(t){var e=this._model,n=this._api,i=this._zr,o=this._coordSysMgr,r=this._scheduler;e&&(e.setUpdatePayload(t),r.restoreData(e,t),r.performSeriesTasks(e),o.create(e,n),r.performDataProcessorTasks(e,t),Y0(this,e),o.update(e,n),$0(e),r.performVisualTasks(e,t),J0(this,e,n,t),o=e.get("backgroundColor")||"transparent",r=e.get("darkMode"),w.canvasSupported?(i.setBackgroundColor(o),null!=r&&"auto"!==r&&i.setDarkMode(r)):(o=Sn(t=yn(o),"rgb"),t[3]),ev(e,n))},updateTransform:function(n){var i,o,r=this,a=this._model,s=this._api;a&&(a.setUpdatePayload(n),i=[],a.eachComponent(function(t,e){"series"!==t&&(t=r.getViewOfComponentModel(e))&&t.__alive&&(!t.updateTransform||(e=t.updateTransform(e,a,s,n))&&e.update)&&i.push(t)}),o=L(),a.eachSeries(function(t){var e=r._chartsMap[t.__viewId];(!e.updateTransform||(e=e.updateTransform(t,a,s,n))&&e.update)&&o.set(t.uid,1)}),$0(a),this._scheduler.performVisualTasks(a,n,{setDirty:!0,dirtyMap:o}),tv(this,a,s,n,o),ev(a,this._api))},updateView:function(t){var e=this._model;e&&(e.setUpdatePayload(t),Mg.markUpdateMethod(t,"updateView"),$0(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),J0(this,this._model,this._api,t),ev(e,this._api))},updateVisual:function(n){var i=this,o=this._model;o&&(o.setUpdatePayload(n),o.eachSeries(function(t){t.getData().clearAllVisual()}),Mg.markUpdateMethod(n,"updateVisual"),$0(o),this._scheduler.performVisualTasks(o,n,{visualType:"visual",setDirty:!0}),o.eachComponent(function(t,e){"series"!==t&&(t=i.getViewOfComponentModel(e))&&t.__alive&&t.updateVisual(e,o,i._api,n)}),o.eachSeries(function(t){i._chartsMap[t.__viewId].updateVisual(t,o,i._api,n)}),ev(o,this._api))},updateLayout:function(t){W0.update.call(this,t)}},U0=function(t,e,n,i){if(t._disposed)t.id;else for(var o=t._model,r=t._coordSysMgr.getCoordinateSystems(),a=Jo(o,n),s=0;s<r.length;s++){var l=r[s];if(l[e]&&null!=(l=l[e](o,a,i)))return l}},Y0=function(t,e){var n=t._chartsMap,i=t._scheduler;e.eachSeries(function(t){i.updateStreamModes(t,n[t.__viewId])})},X0=function(i,t){var o=this,e=this.getModel(),n=i.type,r=i.escapeConnect,a=mv[n],s=a.actionInfo,l=(s.update||"update").split(":"),u=l.pop(),h=null!=l[0]&&lr(l[0]),l=(this[P0]=!0,[i]),c=!1;i.batch&&(c=!0,l=j(i.batch,function(t){return(t=V(I({},t),i)).batch=null,t}));var p,d,f=[],g=Tl(i),y=Cl(i);I0(l,function(t){var e,n;(p=(p=a.action(t,o._model,o._api))||I({},t)).type=s.event||p.type,f.push(p),y?(e=(n=Qo(i)).queryOptionMap,n=n.mainTypeSpecified?e.keys()[0]:"series",G0(o,u,t,n),rv(o)):g?(G0(o,u,t,"series"),rv(o)):h&&G0(o,u,t,h.main,h.sub)}),"none"===u||y||g||h||(this[O0]?(F0(this),W0.update.call(this,i),this[O0]=!1):W0[u].call(this,i)),p=c?{type:s.event||n,escapeConnect:r,batch:f}:f[0],this[P0]=!1,t||((l=this._messageCenter).trigger(p.type,p),g&&(c={type:"selectchanged",escapeConnect:r,selected:(d=[],e.eachSeries(function(n){N(n.getAllData(),function(t){t.data;var t=t.type,e=n.getSelectedDataIndices();0<e.length&&(e={dataIndex:e,seriesIndex:n.seriesIndex},null!=t&&(e.dataType=t),d.push(e))})}),d),isFromClick:i.isFromClick||!1,fromAction:i.type,fromActionPayload:i},l.trigger(c.type,c)))},Z0=function(t){for(var e=this._pendingActions;e.length;){var n=e.shift();X0.call(this,n,t)}},j0=function(t){t||this.trigger("updated")},q0=function(e,n){e.on("rendered",function(t){n.trigger("rendered",t),!e.animation.isFinished()||n[O0]||n._scheduler.unfinished||n._pendingActions.length||n.trigger("finished")})},K0=function(t,a){t.on("mouseover",function(t){var e,n,i,o,r=Uy(t.target,Ml);r&&(r=r,e=t,t=a._api,n=z(r),i=(o=vl(n.componentMainType,n.componentIndex,n.componentHighDownName,t)).dispatchers,o=o.focusSelf,i?(o&&ml(n.componentMainType,n.componentIndex,t),N(i,function(t){return al(t,e)})):(yl(n.seriesIndex,n.focus,n.blurScope,t),"self"===n.focus&&ml(n.componentMainType,n.componentIndex,t),al(r,e)),rv(a))}).on("mouseout",function(t){var e,n,i=Uy(t.target,Ml);i&&(i=i,e=t,gl(t=a._api),(n=vl((n=z(i)).componentMainType,n.componentIndex,n.componentHighDownName,t).dispatchers)?N(n,function(t){return sl(t,e)}):sl(i,e),rv(a))}).on("click",function(t){var e,t=Uy(t.target,function(t){return null!=z(t).dataIndex},!0);t&&(e=t.selected?"unselect":"select",t=z(t),a._api.dispatchAction({type:e,dataType:t.dataType,dataIndexInside:t.dataIndex,seriesIndex:t.seriesIndex,isFromClick:!0}))})},$0=function(t){t.clearColorPalette(),t.eachSeries(function(t){t.clearColorPalette()})},J0=function(t,e,n,i){Q0(t,e,n,i),I0(t._chartsViews,function(t){t.__alive=!1}),tv(t,e,n,i),I0(t._chartsViews,function(t){t.__alive||t.remove(e,n)})},Q0=function(t,n,i,o,e){I0(e||t._componentsViews,function(t){var e=t.__model;fv(0,t),t.render(e,n,i,o),dv(e,t),gv(e,t)})},tv=function(o,t,e,r,a){var n,i,s=o._scheduler,l=o._labelManager,u=(l.clearLabels(),!1);t.eachSeries(function(t){var e,n=o._chartsMap[t.__viewId],i=(n.__alive=!0,n.renderTask);s.updatePayload(i,r),fv(0,n),a&&a.get(t.uid)&&i.dirty(),i.perform(s.getPerformArgs(i))&&(u=!0),t.__transientTransitionOpt=null,n.group.silent=!!t.get("silent"),i=n,e=t.get("blendMode")||null,i.group.traverse(function(t){t.isGroup||(t.style.blend=e),t.eachPendingDisplayable&&t.eachPendingDisplayable(function(t){t.style.blend=e})}),_l(t),l.addLabelsOfSeries(n)}),s.unfinished=u||s.unfinished,l.updateLayoutConfig(e),l.layout(e),l.processLabelsOverall(),t.eachSeries(function(t){var e=o._chartsMap[t.__viewId];dv(t,e),gv(t,e)}),e=t,t=(n=o)._zr.storage,i=0,t.traverse(function(t){t.isGroup||i++}),i>e.get("hoverLayerThreshold")&&!w.node&&!w.worker&&e.eachSeries(function(t){t.preventUsingHoverLayer||(t=n._chartsMap[t.__viewId]).__alive&&t.group.traverse(function(t){t.states.emphasis&&(t.states.emphasis.hoverLayer=!0)})})},ev=function(e,n){I0(wv,function(t){t(e,n)})},rv=function(t){t[R0]=!0,t.getZr().wakeUp()},av=function(t){t[R0]&&(t.getZr().storage.traverse(function(t){Oh(t)||pv(t)}),t[R0]=!1)},nv=function(n){return u(t,e=rd),t.prototype.getCoordinateSystems=function(){return n._coordSysMgr.getCoordinateSystems()},t.prototype.getComponentByElement=function(t){for(;t;){var e=t.__ecComponentInfo;if(null!=e)return n._model.getComponent(e.mainType,e.index);t=t.parent}},t.prototype.enterEmphasis=function(t,e){ll(t,e),rv(n)},t.prototype.leaveEmphasis=function(t,e){ul(t,e),rv(n)},t.prototype.enterBlur=function(t){hl(t),rv(n)},t.prototype.leaveBlur=function(t){cl(t),rv(n)},t.prototype.enterSelect=function(t){pl(t),rv(n)},t.prototype.leaveSelect=function(t){dl(t),rv(n)},t.prototype.getModel=function(){return n.getModel()},t.prototype.getViewOfComponentModel=function(t){return n.getViewOfComponentModel(t)},t.prototype.getViewOfSeriesModel=function(t){return n.getViewOfSeriesModel(t)},new t(n);function t(){return null!==e&&e.apply(this,arguments)||this}var e},iv=function(i){function o(t,e){for(var n=0;n<t.length;n++)t[n][E0]=e}I0(vv,function(t,e){i._messageCenter.on(e,function(t){var e,n;!Iv[i.group]||0===i[E0]||t&&t.escapeConnect||(e=i.makeActionFromEvent(t),n=[],I0(Cv,function(t){t!==i&&t.group===i.group&&n.push(t)}),o(n,0),I0(n,function(t){1!==t[E0]&&t.dispatchAction(e)}),o(n,2))})})},void(ov=function(t,e){var a=t._model;N(zo(e),function(t){var e,n=t.from,i=t.to,o=(null==i&&f(e),{includeMainTypes:["series"],enableAll:!1,enableNone:!1}),r=n?Jo(a,n,o):null,o=Jo(a,i,o).seriesModel;null==o&&(e=""),null!=(e=r&&r.seriesModel!==o?"":e)&&f(e),o.__transientTransitionOpt={from:n?n.dimension:null,to:i.dimension,dividingMethod:t.dividingMethod}})}));var hv,cv=s,jy=cv.prototype;function s(t,e,n){var i=hv.call(this,new ly)||this,t=(i._chartsViews=[],i._chartsMap={},i._componentsViews=[],i._componentsMap={},i._pendingActions=[],n=n||{},"string"==typeof e&&(e=Mv[e]),i._dom=t,i._zr=yo(t,{renderer:n.renderer||"canvas",devicePixelRatio:n.devicePixelRatio,width:n.width,height:n.height,useDirtyRect:null!=n.useDirtyRect&&n.useDirtyRect})),n=(i._throttledZrFlush=Rg(S(t.flush,t),17),(e=C(e))&&Ld(e,!0),i._theme=e,i._locale=D(e=n.locale||Mc)?(n=wc[e.toUpperCase()]||{},e===_c||e===xc?C(n):p(C(n),C(wc[bc]),!1)):p(C(e),C(wc[bc]),!1),i._coordSysMgr=new ld,i._api=nv(i));function o(t,e){return t.__prio-e.__prio}return Oi(Sv,o),Oi(_v,o),i._scheduler=new Wg(i,n,_v,Sv),i._messageCenter=new lv,i._labelManager=new Fy,i._initEvents(),i.resize=S(i.resize,i),t.animation.on("frame",i._onframe,i),q0(t,i),K0(t,i),Ct(i),i}function pv(t){for(var e=[],n=t.currentStates,i=0;i<n.length;i++){var o=n[i];"emphasis"!==o&&"blur"!==o&&"select"!==o&&e.push(o)}t.selected&&t.states.select&&e.push("select"),t.hoverState===Es&&t.states.emphasis?e.push("emphasis"):t.hoverState===Ns&&t.states.blur&&e.push("blur"),t.useStates(e)}function dv(t,e){t.preventAutoZ||function t(e,n,i,o){var r=e.getTextContent(),a=e.getTextGuideLine();if(e.isGroup)for(var s=e.childrenRef(),l=0;l<s.length;l++)o=Math.max(t(s[l],n,i,o),o);else e.z=n,e.zlevel=i,o=Math.max(e.z2,o);r&&(r.z=n,r.zlevel=i,isFinite(o))&&(r.z2=o+2),a&&(r=e.textGuideLineConfig,a.z=n,a.zlevel=i,isFinite(o))&&(a.z2=o+(r&&r.showAbove?1:-1));return o}(e.group,t.get("z")||0,t.get("zlevel")||0,-1/0)}function fv(t,e){e.group.traverse(function(t){var e,n;Oh(t)||(e=t.getTextContent(),n=t.getTextGuideLine(),t.stateTransition&&(t.stateTransition=null),e&&e.stateTransition&&(e.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),t.hasState()?(t.prevStates=t.currentStates,t.clearStates()):t.prevStates&&(t.prevStates=null))})}function gv(t,e){var n=t.getModel("stateAnimation"),o=t.isAnimationEnabled(),t=n.get("duration"),r=0<t?{duration:t,delay:n.get("delay"),easing:n.get("easing")}:null;e.group.traverse(function(t){var e,n,i;t.states&&t.states.emphasis&&(Oh(t)||(t instanceof q&&((i=Os(n=t)).normalFill=n.style.fill,i.normalStroke=n.style.stroke,n=n.states.select||{},i.selectFill=n.style&&n.style.fill||null,i.selectStroke=n.style&&n.style.stroke||null),t.__dirty&&(i=t.prevStates)&&t.useStates(i),o&&(t.stateTransition=r,n=t.getTextContent(),e=t.getTextGuideLine(),n&&(n.stateTransition=r),e)&&(e.stateTransition=r),t.__dirty&&pv(t)))})}jy.on=B0("on"),jy.off=B0("off"),jy.one=function(i,o,t){var r=this;this.on.call(this,i,function t(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];o&&o.apply&&o.apply(this,e),r.off(i,t)},t)};var yv=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];var mv={},vv={},_v=[],xv=[],bv=[],wv=[],Sv=[],Mv={},Tv={},Cv={},Iv={},Av=+new Date,Dv=+new Date,kv="_echarts_instance_";function Lv(t){Iv[t]=!1}qy=Lv;function Pv(t){return Cv[e=kv,(t=t).getAttribute?t.getAttribute(e):t[e]];var e}function Ov(t,e){Mv[t]=e}function Rv(t){k0(xv,t)<0&&xv.push(t)}function Nv(t,e){Wv(_v,t,e,2e3)}function Ev(t){k0(bv,t)<0&&t&&bv.push(t)}function Bv(t){k0(wv,t)<0&&t&&wv.push(t)}function zv(t,e,n){"function"==typeof e&&(n=e,e="");var i=D0(t)?t.type:[t,t={event:e}][0];t.event=(t.event||i).toLowerCase(),e=t.event,vv[e]||(C0(N0.test(i)&&N0.test(e)),mv[i]||(mv[i]={action:n,actionInfo:t}),vv[e]=i)}function Vv(t,e){ld.register(t,e)}function Fv(t,e){Wv(Sv,t,e,1e3,"layout")}function Hv(t,e){Wv(Sv,t,e,3e3,"visual")}var Gv=[];function Wv(t,e,n,i,o){(A0(e)||D0(e))&&(n=e,e=i),0<=k0(Gv,n)||(Gv.push(n),(i=Wg.wrapStageHandler(n,o)).__prio=e,i.__raw=n,t.push(i))}function Uv(t,e){Tv[t]=e}function Yv(t,e,n){M0(t,e,n)}function Xv(t){var e=(t=C(t)).type,n=(e||f(""),e.split(":")),i=(2!==n.length&&f(""),!1);"echarts"===n[0]&&(e=n[1],i=!0),t.__isBuiltIn=i,zf.set(e,t)}Hv(2e3,Lc),Hv(4500,Ku),Hv(4500,mr),Hv(2e3,sy),Hv(4500,{createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(t.hasSymbolVisual&&!e.isSeriesFiltered(t))return{dataEach:t.getData().hasItemOption?function(t,e){var n=t.getItemModel(e),i=n.getShallow("symbol",!0),o=n.getShallow("symbolSize",!0),r=n.getShallow("symbolRotate",!0),a=n.getShallow("symbolOffset",!0),n=n.getShallow("symbolKeepAspect",!0);null!=i&&t.setItemVisual(e,"symbol",i),null!=o&&t.setItemVisual(e,"symbolSize",o),null!=r&&t.setItemVisual(e,"symbolRotate",r),null!=a&&t.setItemVisual(e,"symbolOffset",a),null!=n&&t.setItemVisual(e,"symbolKeepAspect",n)}:null}}}),Hv(7e3,function(e,i){e.eachRawSeries(function(t){var n;!e.isSeriesFiltered(t)&&((n=t.getData()).hasItemVisual()&&n.each(function(t){var e=n.getItemVisual(t,"decal");e&&(n.ensureUniqueItemVisual(t,"style").decal=Am(e,i))}),t=n.getVisual("decal"))&&(n.getVisual("style").decal=Am(t,i))})}),Rv(Ld),Nv(900,function(t){var i=L();t.eachSeries(function(t){var e,n=t.get("stack");n&&(n=i.get(n)||i.set(n,[]),(t={stackResultDimension:(e=t.getData()).getCalculationInfo("stackResultDimension"),stackedOverDimension:e.getCalculationInfo("stackedOverDimension"),stackedDimension:e.getCalculationInfo("stackedDimension"),stackedByDimension:e.getCalculationInfo("stackedByDimension"),isStackedByIndex:e.getCalculationInfo("isStackedByIndex"),data:e,seriesModel:t}).stackedDimension)&&(t.isStackedByIndex||t.stackedByDimension)&&(n.length&&e.setCalculationInfo("stackedOnSeries",n[n.length-1].seriesModel),n.push(t))}),i.each(Pd)}),Uv("default",function(i,o){V(o=o||{},{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var t=new O,r=new ms({style:{fill:o.maskColor},zlevel:o.zlevel,z:1e4});t.add(r);var a,s=new ws({style:{text:o.text,fill:o.textColor,fontSize:o.fontSize,fontWeight:o.fontWeight,fontStyle:o.fontStyle,fontFamily:o.fontFamily},zlevel:o.zlevel,z:10001}),l=new ms({style:{fill:"none"},textContent:s,textConfig:{position:"right",distance:10},zlevel:o.zlevel,z:10001});return t.add(l),o.showSpinner&&((a=new Yu({shape:{startAngle:-Gg/2,endAngle:-Gg/2+.1,r:o.spinnerRadius},style:{stroke:o.color,lineCap:"round",lineWidth:o.lineWidth},zlevel:o.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*Gg/2}).start("circularInOut"),a.animateShape(!0).when(1e3,{startAngle:3*Gg/2}).delay(300).start("circularInOut"),t.add(a)),t.resize=function(){var t=s.getBoundingRect().width,e=o.showSpinner?o.spinnerRadius:0,t=(i.getWidth()-2*e-(o.showSpinner&&t?10:0)-t)/2-(o.showSpinner&&t?0:5+t/2)+(o.showSpinner?0:t/2)+(t?0:e),n=i.getHeight()/2;o.showSpinner&&a.setShape({cx:t,cy:n}),l.setShape({x:t-e,y:n-e,width:2*e,height:2*e}),r.setShape({x:0,y:0,width:i.getWidth(),height:i.getHeight()})},t.resize(),t}),zv({type:Vs,event:Vs,update:Vs},Lt),zv({type:Fs,event:Fs,update:Fs},Lt),zv({type:Hs,event:Hs,update:Hs},Lt),zv({type:Gs,event:Gs,update:Gs},Lt),zv({type:Ws,event:Ws,update:Ws},Lt),Ov("light",n),Ov("dark",ay);function Zv(t){return null==t?0:t.length||1}function jv(t){return t}Kv.prototype.add=function(t){return this._add=t,this},Kv.prototype.update=function(t){return this._update=t,this},Kv.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},Kv.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},Kv.prototype.remove=function(t){return this._remove=t,this},Kv.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},Kv.prototype._executeOneToOne=function(){var t=this._old,e=this._new,n={},i=new Array(t.length),o=new Array(e.length);this._initIndexMap(t,null,i,"_oldKeyGetter"),this._initIndexMap(e,n,o,"_newKeyGetter");for(var r=0;r<t.length;r++){var a,s=i[r],l=n[s],u=Zv(l);1<u?(a=l.shift(),1===l.length&&(n[s]=l[0]),this._update&&this._update(a,r)):1===u?(n[s]=null,this._update&&this._update(l,r)):this._remove&&this._remove(r)}this._performRestAdd(o,n)},Kv.prototype._executeMultiple=function(){var t=this._old,e=this._new,n={},i={},o=[],r=[];this._initIndexMap(t,n,o,"_oldKeyGetter"),this._initIndexMap(e,i,r,"_newKeyGetter");for(var a=0;a<o.length;a++){var s=o[a],l=n[s],u=i[s],h=Zv(l),c=Zv(u);if(1<h&&1===c)this._updateManyToOne&&this._updateManyToOne(u,l),i[s]=null;else if(1===h&&1<c)this._updateOneToMany&&this._updateOneToMany(u,l),i[s]=null;else if(1===h&&1===c)this._update&&this._update(u,l),i[s]=null;else if(1<h)for(var p=0;p<h;p++)this._remove&&this._remove(l[p]);else this._remove&&this._remove(l)}this._performRestAdd(r,i)},Kv.prototype._performRestAdd=function(t,e){for(var n=0;n<t.length;n++){var i=t[n],o=e[i],r=Zv(o);if(1<r)for(var a=0;a<r;a++)this._add&&this._add(o[a]);else 1===r&&this._add&&this._add(o);e[i]=null}},Kv.prototype._initIndexMap=function(t,e,n,i){for(var o=this._diffModeMultiple,r=0;r<t.length;r++){var a,s,l="_ec_"+this[i](t[r],r);o||(n[r]=l),e&&(0===(s=Zv(a=e[l]))?(e[l]=r,o&&n.push(l)):1===s?e[l]=[a,r]:a.push(r))}};var qv=Kv;function Kv(t,e,n,i,o,r){this._old=t,this._new=e,this._oldKeyGetter=n||jv,this._newKeyGetter=i||jv,this.context=o,this._diffModeMultiple="multiple"===r}function $v(r){var t={},a=t.encode={},s=L(),l=[],u=[],h=t.userOutput={dimensionNames:r.dimensions.slice(),encode:{}},i=(N(r.dimensions,function(t){var e,n,i=r.getDimensionInfo(t),o=i.coordDim;o&&(e=i.coordDimIndex,Jv(a,o)[e]=t,i.isExtraCoord||(s.set(o,1),"ordinal"!==(n=i.type)&&"time"!==n&&(l[0]=t),Jv(h.encode,o)[e]=i.index),i.defaultTooltip)&&u.push(t),Lp.each(function(t,e){var n=Jv(a,e),e=i.otherDims[e];null!=e&&!1!==e&&(n[e]=i.name)})}),[]),o={},e=(s.each(function(t,e){var n=a[e];o[e]=n[0],i=i.concat(n)}),t.dataDimsOnCoord=i,t.encodeFirstDimNotExtra=o,a.label),e=(e&&e.length&&(l=e.slice()),a.tooltip);return e&&e.length?u=e.slice():u.length||(u=l.slice()),a.defaultedLabel=l,a.defaultedTooltip=u,t}function Jv(t,e){return t.hasOwnProperty(e)||(t[e]=[]),t[e]}var Qv,t_,e_,n_,i_,o_,r_,a_,s_,l_,u_,h_,c_,p_,d_=function(t){this.otherDims={},null!=t&&I(this,t)},f_=Math.floor,g_=k,y_=j,$y="undefined",m_={float:typeof Float64Array==$y?Array:Float64Array,int:typeof Int32Array==$y?Array:Int32Array,ordinal:Array,number:Array,time:Array},v_=typeof Uint32Array==$y?Array:Uint32Array,__=typeof Int32Array==$y?Array:Int32Array,x_=typeof Uint16Array==$y?Array:Uint16Array,b_=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx","_nameRepeatCount"],w_=["_extent","_approximateExtent","_rawExtent"],S_=(c.prototype.getDimension=function(t){return t="number"!=typeof t&&(isNaN(t)||this._dimensionInfos.hasOwnProperty(t))?t:this.dimensions[t]},c.prototype.getDimensionInfo=function(t){return this._dimensionInfos[this.getDimension(t)]},c.prototype.getDimensionsOnCoord=function(){return this._dimensionsSummary.dataDimsOnCoord.slice()},c.prototype.mapDimension=function(t,e){var n=this._dimensionsSummary;return null==e?n.encodeFirstDimNotExtra[t]:(n=n.encode[t])?n[e]:null},c.prototype.mapDimensionsAll=function(t){return(this._dimensionsSummary.encode[t]||[]).slice()},c.prototype.initData=function(t,e,n){var t=Ed(t)||rt(t)?new Xd(t,this.dimensions.length):t,i=(this._rawData=t).getSource().sourceFormat;this._storage={},this._indices=null,this._dontMakeIdFromName=null!=this._idDimIdx||i===Ep||!!t.fillStorage,this._nameList=(e||[]).slice(),this._idList=[],this._nameRepeatCount={},n||(this.hasItemOption=!1),this.defaultDimValueGetter=Qv[i],this._dimValueGetter=n=n||this.defaultDimValueGetter,this._dimValueGetterArrayRows=Qv.arrayRows,this._rawExtent={},this._initDataFromProvider(0,t.count()),t.pure&&(this.hasItemOption=!1)},c.prototype.getProvider=function(){return this._rawData},c.prototype.appendData=function(t){var e=this._rawData,n=this.count(),t=(e.appendData(t),e.count());e.persistent||(t+=n),this._initDataFromProvider(n,t,!0)},c.prototype.appendValues=function(t,e){for(var n=this._storage,i=this.dimensions,o=i.length,r=this._rawExtent,a=this.count(),s=a+Math.max(t.length,e?e.length:0),l=0;l<o;l++){var u=i[l];r[u]||(r[u]=h_()),n_(n,this._dimensionInfos[u],s,!0)}for(var h=y_(i,function(t){return r[t]}),c=this._storageArr=y_(i,function(t){return n[t]}),p=[],d=a;d<s;d++){for(var f=d-a,g=0;g<o;g++){var u=i[g],y=this._dimValueGetterArrayRows(t[f]||p,u,f,g),m=(c[g][d]=y,h[g]);y<m[0]&&(m[0]=y),y>m[1]&&(m[1]=y)}e&&(this._nameList[d]=e[f],this._dontMakeIdFromName||s_(this,d))}this._rawCount=this._count=s,this._extent={},t_(this)},c.prototype._initDataFromProvider=function(t,e,n){if(!(e<=t)){for(var i=this._rawData,o=this._storage,r=this.dimensions,a=r.length,s=this._dimensionInfos,l=this._nameList,u=this._idList,h=this._rawExtent,c=i.getSource().sourceFormat===Pp,p=0;p<a;p++){var d=r[p];h[d]||(h[d]=h_()),n_(o,s[d],e,n)}var f=this._storageArr=y_(r,function(t){return o[t]}),g=y_(r,function(t){return h[t]});if(i.fillStorage)i.fillStorage(t,e,f,g);else for(var y=[],m=t;m<e;m++){for(var v,y=i.getItem(m,y),_=0;_<a;_++){var d=r[_],x=f[_],b=this._dimValueGetter(y,d,m,_),x=(x[m]=b,g[_]);b<x[0]&&(x[0]=b),b>x[1]&&(x[1]=b)}c&&!i.pure&&y&&(v=y.name,null==l[m]&&null!=v&&(l[m]=Yo(v,null)),v=y.id,null==u[m])&&null!=v&&(u[m]=Yo(v,null)),this._dontMakeIdFromName||s_(this,m)}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=e,this._extent={},t_(this)}},c.prototype.count=function(){return this._count},c.prototype.getIndices=function(){var t=this._indices;if(t){var e=t.constructor,n=this._count;if(e===Array)for(var i=new e(n),o=0;o<n;o++)i[o]=t[o];else i=new e(t.buffer,0,n)}else for(i=new(e=e_(this))(this.count()),o=0;o<i.length;o++)i[o]=o;return i},c.prototype.getByDimIdx=function(t,e){return 0<=e&&e<this._count&&(t=this._storageArr[t])?t[this.getRawIndex(e)]:NaN},c.prototype.get=function(t,e){return 0<=e&&e<this._count&&(t=this._storage[t])?t[this.getRawIndex(e)]:NaN},c.prototype.getByRawIndex=function(t,e){return 0<=e&&e<this._rawCount&&(t=this._storage[t])?t[e]:NaN},c.prototype.getValues=function(t,e){var n=[];F(t)||(e=t,t=this.dimensions);for(var i=0,o=t.length;i<o;i++)n.push(this.get(t[i],e));return n},c.prototype.hasValue=function(t){for(var e=this._dimensionsSummary.dataDimsOnCoord,n=0,i=e.length;n<i;n++)if(isNaN(this.get(e[n],t)))return!1;return!0},c.prototype.getDataExtent=function(t){t=this.getDimension(t);var e=this._storage[t],n=h_();if(!e)return n;var i,o=this.count();if(!this._indices)return this._rawExtent[t].slice();if(i=this._extent[t])return i.slice();for(var r=(i=n)[0],a=i[1],s=0;s<o;s++){var l=e[this.getRawIndex(s)];l<r&&(r=l),a<l&&(a=l)}return this._extent[t]=i=[r,a]},c.prototype.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},c.prototype.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},c.prototype.getCalculationInfo=function(t){return this._calculationInfo[t]},c.prototype.setCalculationInfo=function(t,e){g_(t)?I(this._calculationInfo,t):this._calculationInfo[t]=e},c.prototype.getSum=function(t){var e=0;if(this._storage[t])for(var n=0,i=this.count();n<i;n++){var o=this.get(t,n);isNaN(o)||(e+=o)}return e},c.prototype.getMedian=function(t){var e=[],t=(this.each(t,function(t){isNaN(t)||e.push(t)}),e.sort(function(t,e){return t-e})),n=this.count();return 0===n?0:n%2==1?t[(n-1)/2]:(t[n/2]+t[n/2-1])/2},c.prototype.rawIndexOf=function(t,e){t=(t&&this._invertedIndicesMap[t])[e];return null==t||isNaN(t)?-1:t},c.prototype.indexOfName=function(t){for(var e=0,n=this.count();e<n;e++)if(this.getName(e)===t)return e;return-1},c.prototype.indexOfRawIndex=function(t){if(!(t>=this._rawCount||t<0)){if(!this._indices)return t;var e=this._indices,n=e[t];if(null!=n&&n<this._count&&n===t)return t;for(var i=0,o=this._count-1;i<=o;){var r=(i+o)/2|0;if(e[r]<t)i=1+r;else{if(!(e[r]>t))return r;o=r-1}}}return-1},c.prototype.indicesOfNearest=function(t,e,n){var i=this._storage[t],o=[];if(i){null==n&&(n=1/0);for(var r=1/0,a=-1,s=0,l=0,u=this.count();l<u;l++){var h=e-i[this.getRawIndex(l)],c=Math.abs(h);c<=n&&((c<r||c===r&&0<=h&&a<0)&&(r=c,a=h,s=0),h===a)&&(o[s++]=l)}o.length=s}return o},c.prototype.getRawDataItem=function(t){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(t));for(var e=[],n=0;n<this.dimensions.length;n++){var i=this.dimensions[n];e.push(this.get(i,t))}return e},c.prototype.getName=function(t){var t=this.getRawIndex(t),e=this._nameList[t];return e=null==(e=null==e&&null!=this._nameDimIdx?a_(this,this._nameDimIdx,this._nameOrdinalMeta,t):e)?"":e},c.prototype.getId=function(t){return r_(this,this.getRawIndex(t))},c.prototype.each=function(t,e,n,i){var o=this;if(this._count){"function"==typeof t&&(i=n,n=e,e=t,t=[]);for(var r=n||i||this,n=y_(l_(t),this.getDimension,this),a=n.length,s=y_(n,function(t){return o._dimensionInfos[t].index}),l=this._storageArr,u=0,h=this.count();u<h;u++){var c=this.getRawIndex(u);switch(a){case 0:e.call(r,u);break;case 1:e.call(r,l[s[0]][c],u);break;case 2:e.call(r,l[s[0]][c],l[s[1]][c],u);break;default:for(var p=0,d=[];p<a;p++)d[p]=l[s[p]][c];d[p]=u,e.apply(r,d)}}}},c.prototype.filterSelf=function(t,e,n,i){var o=this;if(this._count){"function"==typeof t&&(i=n,n=e,e=t,t=[]);for(var r=n||i||this,n=y_(l_(t),this.getDimension,this),a=this.count(),s=new(e_(this))(a),l=[],u=n.length,h=0,c=y_(n,function(t){return o._dimensionInfos[t].index}),p=c[0],d=this._storageArr,f=0;f<a;f++){var g=void 0,y=this.getRawIndex(f);if(0===u)g=e.call(r,f);else if(1===u)var m=d[p][y],g=e.call(r,m,f);else{for(var v=0;v<u;v++)l[v]=d[c[v]][y];l[v]=f,g=e.apply(r,l)}g&&(s[h++]=y)}return h<a&&(this._indices=s),this._count=h,this._extent={},this.getRawIndex=this._indices?o_:i_,this}},c.prototype.selectRange=function(t){var e=this,n=this._count;if(n){var i,o=[];for(i in t)t.hasOwnProperty(i)&&o.push(i);var r=o.length;if(r){var a=this.count(),s=new(e_(this))(a),l=0,u=o[0],h=y_(o,function(t){return e._dimensionInfos[t].index}),c=t[u][0],p=t[u][1],d=this._storageArr,u=!1;if(!this._indices){var f=0;if(1===r){for(var g=d[h[0]],y=0;y<n;y++)((x=g[y])>=c&&x<=p||isNaN(x))&&(s[l++]=f),f++;u=!0}else if(2===r){for(var g=d[h[0]],m=d[h[1]],v=t[o[1]][0],_=t[o[1]][1],y=0;y<n;y++){var x=g[y],b=m[y];(c<=x&&x<=p||isNaN(x))&&(v<=b&&b<=_||isNaN(b))&&(s[l++]=f),f++}u=!0}}if(!u)if(1===r)for(y=0;y<a;y++){var w=this.getRawIndex(y);((x=d[h[0]][w])>=c&&x<=p||isNaN(x))&&(s[l++]=w)}else for(y=0;y<a;y++){for(var S=!0,M=(w=this.getRawIndex(y),0);M<r;M++){var T=o[M];((x=d[h[M]][w])<t[T][0]||x>t[T][1])&&(S=!1)}S&&(s[l++]=this.getRawIndex(y))}return l<a&&(this._indices=s),this._count=l,this._extent={},this.getRawIndex=this._indices?o_:i_,this}}},c.prototype.mapArray=function(t,e,n,i){"function"==typeof t&&(i=n,n=e,e=t,t=[]);var o=[];return this.each(t,function(){o.push(e&&e.apply(this,arguments))},n=n||i||this),o},c.prototype.map=function(t,e,n,i){var o=n||i||this,r=y_(l_(t),this.getDimension,this),n=u_(this,r),a=n._storage;n._indices=this._indices,n.getRawIndex=n._indices?o_:i_;for(var s=[],l=r.length,u=this.count(),h=[],c=n._rawExtent,p=0;p<u;p++){for(var d=0;d<l;d++)h[d]=this.get(r[d],p);h[l]=p;var f=e&&e.apply(o,h);if(null!=f){"object"!=typeof f&&(s[0]=f,f=s);for(var g=this.getRawIndex(p),y=0;y<f.length;y++){var m=r[y],v=f[y],_=c[m],m=a[m];m&&(m[g]=v),v<_[0]&&(_[0]=v),v>_[1]&&(_[1]=v)}}}return n},c.prototype.downSample=function(t,e,n,i){for(var o=u_(this,[t]),r=o._storage,a=[],s=f_(1/e),l=r[t],u=this.count(),h=o._rawExtent[t],c=new(e_(this))(u),p=0,d=0;d<u;d+=s){u-d<s&&(a.length=s=u-d);for(var f=0;f<s;f++){var g=this.getRawIndex(d+f);a[f]=l[g]}var y=n(a),m=this.getRawIndex(Math.min(d+i(a,y)||0,u-1));(l[m]=y)<h[0]&&(h[0]=y),y>h[1]&&(h[1]=y),c[p++]=m}return o._count=p,o._indices=c,o.getRawIndex=o_,o},c.prototype.lttbDownSample=function(t,e){var n,i=u_(this,[]),o=i._storage[t],r=this.count(),a=new(e_(this))(r),s=0,l=f_(1/e),u=this.getRawIndex(0);a[s++]=u;for(var h=1;h<r-1;h+=l){for(var c=Math.min(h+l,r-1),p=Math.min(h+2*l,r),d=(p+c)/2,f=0,g=c;g<p;g++){var y=o[w=this.getRawIndex(g)];isNaN(y)||(f+=y)}f/=p-c;for(var c=h,m=Math.min(h+l,r),v=h-1,_=o[u],x=-1,b=c,g=c;g<m;g++){var w,y=o[w=this.getRawIndex(g)];isNaN(y)||(n=Math.abs((v-d)*(y-_)-(v-g)*(f-_)))>x&&(x=n,b=w)}u=a[s++]=b}return a[s++]=this.getRawIndex(r-1),i._count=s,i._indices=a,i.getRawIndex=o_,i},c.prototype.getItemModel=function(t){var e=this.hostModel,t=this.getRawDataItem(t);return new fc(t,e,e&&e.ecModel)},c.prototype.diff=function(e){var n=this;return new qv(e?e.getIndices():[],this.getIndices(),function(t){return r_(e,t)},function(t){return r_(n,t)})},c.prototype.getVisual=function(t){var e=this._visual;return e&&e[t]},c.prototype.setVisual=function(t,e){this._visual=this._visual||{},g_(t)?I(this._visual,t):this._visual[t]=e},c.prototype.getItemVisual=function(t,e){t=this._itemVisuals[t],t=t&&t[e];return null==t?this.getVisual(e):t},c.prototype.hasItemVisual=function(){return 0<this._itemVisuals.length},c.prototype.ensureUniqueItemVisual=function(t,e){var n=this._itemVisuals,i=n[t],n=(i=i||(n[t]={}))[e];return null==n&&(F(n=this.getVisual(e))?n=n.slice():g_(n)&&(n=I({},n)),i[e]=n),n},c.prototype.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{};this._itemVisuals[t]=i,g_(e)?I(i,e):i[e]=n},c.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},c.prototype.setLayout=function(t,e){if(g_(t))for(var n in t)t.hasOwnProperty(n)&&this.setLayout(n,t[n]);else this._layout[t]=e},c.prototype.getLayout=function(t){return this._layout[t]},c.prototype.getItemLayout=function(t){return this._itemLayouts[t]},c.prototype.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?I(this._itemLayouts[t]||{},e):e},c.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},c.prototype.setItemGraphicEl=function(t,e){var n,i=this.hostModel;e&&((n=z(e)).dataIndex=t,n.dataType=this.dataType,n.seriesIndex=i&&i.seriesIndex,"group"===e.type)&&e.traverse(c_,e),this._graphicEls[t]=e},c.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},c.prototype.eachItemGraphicEl=function(n,i){N(this._graphicEls,function(t,e){t&&n&&n.call(i,t,e)})},c.prototype.cloneShallow=function(t){if((t=t||new c(y_(this.dimensions,this.getDimensionInfo,this),this.hostModel))._storage=this._storage,t._storageArr=this._storageArr,p_(t,this),this._indices){var e=this._indices.constructor;if(e===Array){var n=this._indices.length;t._indices=new e(n);for(var i=0;i<n;i++)t._indices[i]=this._indices[i]}else t._indices=new e(this._indices)}else t._indices=null;return t.getRawIndex=t._indices?o_:i_,t},c.prototype.wrapMethod=function(t,e){var n=this[t];"function"==typeof n&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=n.apply(this,arguments);return e.apply(this,[t].concat(bt(arguments)))})},c.internalField=(Qv={arrayRows:M_,objectRows:function(t,e,n,i){return wf(t[e],this._dimensionInfos[e])},keyedColumns:M_,original:function(t,e,n,i){var o=t&&(null==t.value?t:t.value);return this._rawData.pure||!k(t=t)||t instanceof Array||(this.hasItemOption=!0),wf(o instanceof Array?o[i]:o,this._dimensionInfos[e])},typedArray:function(t,e,n,i){return t[i]}},t_=function(o){var r=o._invertedIndicesMap;N(r,function(t,e){var n=o._dimensionInfos[e].ordinalMeta;if(n){t=r[e]=new __(n.categories.length);for(var i=0;i<t.length;i++)t[i]=-1;for(i=0;i<o._count;i++)t[o.get(e,i)]=i}})},a_=function(t,e,n,i){var o,t=t._storageArr[e];return Yo(o=t&&(o=t[i],n)&&n.categories.length?n.categories[o]:o,null)},e_=function(t){return 65535<t._rawCount?v_:x_},n_=function(t,e,n,i){var o=m_[e.type],e=e.name;if(i){var r=t[e],a=r&&r.length;if(a!==n){for(var s=new o(n),l=0;l<a;l++)s[l]=r[l];t[e]=s}}else t[e]=new o(n)},i_=function(t){return t},o_=function(t){return t<this._count&&0<=t?this._indices[t]:-1},r_=function(t,e){var n=t._idList[e];return n=null==(n=null==n&&null!=t._idDimIdx?a_(t,t._idDimIdx,t._idOrdinalMeta,e):n)?"e\0\0"+e:n},l_=function(t){return t=F(t)?t:null!=t?[t]:[]},u_=function(t,e){var n=t.dimensions,i=new c(y_(n,t.getDimensionInfo,t),t.hostModel);p_(i,t);for(var o,r,a=i._storage={},s=t._storage,l=i._storageArr=[],u=0;u<n.length;u++){var h=n[u];s[h]&&(0<=A(e,h)?(a[h]=(r=void 0,(r=(o=s[h]).constructor)===Array?o.slice():new r(o)),i._rawExtent[h]=h_(),i._extent[h]=null):a[h]=s[h],l.push(a[h]))}return i},h_=function(){return[1/0,-1/0]},c_=function(t){var t=z(t),e=z(this);t.seriesIndex=e.seriesIndex,t.dataIndex=e.dataIndex,t.dataType=e.dataType},p_=function(e,n){N(b_.concat(n.__wrappedMethods||[]),function(t){n.hasOwnProperty(t)&&(e[t]=n[t])}),e.__wrappedMethods=n.__wrappedMethods,N(w_,function(t){e[t]=C(n[t])}),e._calculationInfo=I({},n._calculationInfo)},void(s_=function(t,e){var n=t._nameList,i=t._idList,o=t._nameDimIdx,r=t._idDimIdx,a=n[e],s=i[e];null==a&&null!=o&&(n[e]=a=a_(t,o,t._nameOrdinalMeta,e)),null==s&&null!=r&&(i[e]=s=a_(t,r,t._idOrdinalMeta,e)),null==s&&null!=a&&(s=a,1<(o=(n=t._nameRepeatCount)[a]=(n[a]||0)+1)&&(s+="__ec__"+o),i[e]=s)})),c);function c(t,e){this.type="list",this._count=0,this._rawCount=0,this._storage={},this._storageArr=[],this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._rawExtent={},this._extent={},this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!0,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"],this.getRawIndex=i_,t=t||["x","y"];for(var n={},i=[],o={},r=0;r<t.length;r++){var a=t[r],a=D(a)?new d_({name:a}):a instanceof d_?a:new d_(a),s=a.name,l=(a.type=a.type||"float",a.coordDim||(a.coordDim=s,a.coordDimIndex=0),a.otherDims=a.otherDims||{});i.push(s),(n[s]=a).index=r,a.createInvertedIndices&&(o[s]=[]),0===l.itemName&&(this._nameDimIdx=r,this._nameOrdinalMeta=a.ordinalMeta),0===l.itemId&&(this._idDimIdx=r,this._idOrdinalMeta=a.ordinalMeta)}this.dimensions=i,this._dimensionInfos=n,this.hostModel=e,this._dimensionsSummary=$v(this),this._invertedIndicesMap=o,this.userOutput=this._dimensionsSummary.userOutput}function M_(t,e,n,i){return wf(t[i],this._dimensionInfos[e])}function T_(t,e,n){Ed(e)||(e=zd(e)),n=n||{},t=(t||[]).slice();for(var i,o,r,a=(n.dimsDef||[]).slice(),s=L(),l=L(),u=[],h=(g=e,i=t,o=n.dimCount,r=Math.max(g.dimensionsDetectedCount||1,i.length,a.length,o||0),N(i,function(t){k(t)&&(t=t.dimsDef)&&(r=Math.max(r,t.length))}),r),c=0;c<h;c++){var p=a[c],p=a[c]=I({},k(p)?p:{name:p}),d=p.name,f=u[c]=new d_;null!=d&&null==s.get(d)&&(f.name=f.displayName=d,s.set(d,c)),null!=p.type&&(f.type=p.type),null!=p.displayName&&(f.displayName=p.displayName)}var g=n.encodeDef,y=L(g=!g&&n.encodeDefaulter?n.encodeDefaulter(e,h):g),m=(y.each(function(t,n){var i,t=zo(t).slice();1===t.length&&!D(t[0])&&t[0]<0?y.set(n,!1):(i=y.set(n,[]),N(t,function(t,e){t=D(t)?s.get(t):t;null!=t&&t<h&&(i[e]=t,v(u[t],n,e))}))}),0);function v(t,e,n){null!=Lp.get(e)?t.otherDims[e]=n:(t.coordDim=e,t.coordDimIndex=n,l.set(e,!0))}N(t,function(t){D(t)?(r=t,o={}):(r=(o=t).name,t=o.ordinalMeta,o.ordinalMeta=null,(o=C(o)).ordinalMeta=t,n=o.dimsDef,i=o.otherDims,o.name=o.coordDim=o.coordDimIndex=o.dimsDef=o.otherDims=null);var n,i,o,r,e=y.get(r);if(!1!==e){if(!(e=zo(e)).length)for(var a=0;a<(n&&n.length||1);a++){for(;m<u.length&&null!=u[m].coordDim;)m++;m<u.length&&e.push(m++)}N(e,function(t,e){t=u[t];v(V(t,o),r,e),null==t.name&&n&&(k(e=n[e])||(e={name:e}),t.name=t.displayName=e.name,t.defaultTooltip=e.defaultTooltip),i&&V(t.otherDims,i)})}});for(var _,x,b=n.generateCoord,w=null!=(S=n.generateCoordCount),S=b?S||1:0,M=b||"value",T=0;T<h;T++)null==(f=u[T]=u[T]||new d_).coordDim&&(f.coordDim=C_(M,l,w),f.coordDimIndex=0,(!b||S<=0)&&(f.isExtraCoord=!0),S--),null==f.name&&(f.name=C_(f.coordDim,s,!1)),null==f.type&&(x=T,Yp((_=e).data,_.sourceFormat,_.seriesLayoutBy,_.dimensionsDefine,_.startIndex,x)===Fp.Must||f.isExtraCoord&&(null!=f.otherDims.itemName||null!=f.otherDims.seriesName))&&(f.type="ordinal");return u}function C_(t,e,n){if(n||null!=e.get(t)){for(var i=0;null!=e.get(t+i);)i++;t+=i}return e.set(t,!0),t}function I_(t,e){return T_((e=e||{}).coordDimensions||[],t,{dimsDef:e.dimensionsDefine||t.dimensionsDefine,encodeDef:e.encodeDefine||t.encodeDefine,dimCount:e.dimensionsCount,encodeDefaulter:e.encodeDefaulter,generateCoord:e.generateCoord,generateCoordCount:e.generateCoordCount})}function A_(t){this.coordSysDims=[],this.axisMap=L(),this.categoryAxisMap=L(),this.coordSysName=t}var D_={cartesian2d:function(t,e,n,i){var o=t.getReferringComponents("xAxis",tr).models[0],t=t.getReferringComponents("yAxis",tr).models[0];e.coordSysDims=["x","y"],n.set("x",o),n.set("y",t),k_(o)&&(i.set("x",o),e.firstCategoryDimIndex=0),k_(t)&&(i.set("y",t),null==e.firstCategoryDimIndex)&&(e.firstCategoryDimIndex=1)},singleAxis:function(t,e,n,i){t=t.getReferringComponents("singleAxis",tr).models[0];e.coordSysDims=["single"],n.set("single",t),k_(t)&&(i.set("single",t),e.firstCategoryDimIndex=0)},polar:function(t,e,n,i){var t=t.getReferringComponents("polar",tr).models[0],o=t.findAxisModel("radiusAxis"),t=t.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],n.set("radius",o),n.set("angle",t),k_(o)&&(i.set("radius",o),e.firstCategoryDimIndex=0),k_(t)&&(i.set("angle",t),null==e.firstCategoryDimIndex)&&(e.firstCategoryDimIndex=1)},geo:function(t,e,n,i){e.coordSysDims=["lng","lat"]},parallel:function(t,i,o,r){var a=t.ecModel,t=a.getComponent("parallel",t.get("parallelIndex")),s=i.coordSysDims=t.dimensions.slice();N(t.parallelAxisIndex,function(t,e){var t=a.getComponent("parallelAxis",t),n=s[e];o.set(n,t),k_(t)&&(r.set(n,t),null==i.firstCategoryDimIndex)&&(i.firstCategoryDimIndex=e)})}};function k_(t){return"category"===t.get("type")}function L_(t,n,e){var i,o,r,a,s,l,u=(e=e||{}).byIndex,h=e.stackedCoordDimension,c=!(!t||!t.get("stack"));return N(n,function(t,e){D(t)&&(n[e]=t={name:t}),c&&!t.isExtraCoord&&(u||i||!t.ordinalMeta||(i=t),o||"ordinal"===t.type||"time"===t.type||h&&h!==t.coordDim||(o=t))}),!o||u||i||(u=!0),o&&(r="__\0ecstackresult",a="__\0ecstackedover",i&&(i.createInvertedIndices=!0),s=o.coordDim,e=o.type,l=0,N(n,function(t){t.coordDim===s&&l++}),n.push({name:r,coordDim:s,coordDimIndex:l,type:e,isExtraCoord:!0,isCalculationCoord:!0}),l++,n.push({name:a,coordDim:a,coordDimIndex:l,type:e,isExtraCoord:!0,isCalculationCoord:!0})),{stackedDimension:o&&o.name,stackedByDimension:i&&i.name,isStackedByIndex:u,stackedOverDimension:a,stackResultDimension:r}}function P_(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function O_(t,e){return P_(t,e)?t.getCalculationInfo("stackResultDimension"):e}function R_(t,e,i){i=i||{},Ed(t)||(t=zd(t));var o,r,n=e.get("coordinateSystem"),n=ld.get(n),a=function(t){var e=t.get("coordinateSystem"),n=new A_(e);if(e=D_[e])return e(t,n,n.axisMap,n.categoryAxisMap),n}(e),s=(s=a&&a.coordSysDims?j(a.coordSysDims,function(t){var e={name:t},t=a.axisMap.get(t);return t&&(t=t.get("type"),e.type="category"===(t=t)?"ordinal":"time"===t?"time":"float"),e}):s)||n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"],n=i.useEncodeDefaulter,n=I_(t,{coordDimensions:s,generateCoord:i.generateCoord,encodeDefaulter:ut(n)?n:n?M(Gp,s,e):null}),s=(a&&N(n,function(t,e){var n=t.coordDim,n=a.categoryAxisMap.get(n);n&&(null==o&&(o=e),t.ordinalMeta=n.getOrdinalMeta(),i.createInvertedIndices)&&(t.createInvertedIndices=!0),null!=t.otherDims.itemName&&(r=!0)}),r||null==o||(n[o].otherDims.itemName=0),L_(e,n)),n=new S_(n,e),e=(n.setCalculationInfo(s),null!=o&&function(t){if(t.sourceFormat===Pp)return null!=(t=function(t){for(var e=0;e<t.length&&null==t[e];)e++;return t[e]}(t.data||[]))&&!F(Ho(t))}(t)?function(t,e,n,i){return i===o?n:this.defaultDimValueGetter(t,e,n,i)}:null);return n.hasItemOption=!1,n.initData(t,null,e),n}E_.prototype.getSetting=function(t){return this._setting[t]},E_.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])},E_.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},E_.prototype.getExtent=function(){return this._extent.slice()},E_.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},E_.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},E_.prototype.isBlank=function(){return this._isBlank},E_.prototype.setBlank=function(t){this._isBlank=t};var N_=E_;function E_(t){this._setting=t||{},this._extent=[1/0,-1/0]}fr(N_);z_.createByAxisModel=function(t){var t=t.option,e=t.data,e=e&&j(e,V_);return new z_({categories:e,needCollect:!e,deduplication:!1!==t.dedplication})},z_.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},z_.prototype.parseAndCollect=function(t){var e,n,i=this._needCollect;return"string"==typeof t||i?(i&&!this._deduplication?(e=this.categories.length,this.categories[e]=t):null==(e=(n=this._getOrCreateMap()).get(t))&&(i?(e=this.categories.length,this.categories[e]=t,n.set(t,e)):e=NaN),e):t},z_.prototype._getOrCreateMap=function(){return this._map||(this._map=L(this.categories))};var B_=z_;function z_(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication}function V_(t){return k(t)&&null!=t.value?t.value:t+""}var F_=_o;function H_(t,e,n,i){var o={},r=t[1]-t[0],r=o.interval=Lo(r/e,!0),e=(null!=n&&r<n&&(r=o.interval=n),null!=i&&i<r&&(r=o.interval=i),o.intervalPrecision=G_(r));return n=o.niceTickExtent=[F_(Math.ceil(t[0]/r)*r,e),F_(Math.floor(t[1]/r)*r,e)],i=t,isFinite(n[0])||(n[0]=i[0]),isFinite(n[1])||(n[1]=i[1]),W_(n,0,i),W_(n,1,i),n[0]>n[1]&&(n[0]=n[1]),o}function G_(t){return wo(t)+2}function W_(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function U_(t,e){return t>=e[0]&&t<=e[1]}function Y_(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function X_(t,e){return t*(e[1]-e[0])+e[0]}u(q_,Z_=N_),q_.prototype.parse=function(t){return"string"==typeof t?this._ordinalMeta.getOrdinal(t):Math.round(t)},q_.prototype.contain=function(t){return U_(t=this.parse(t),this._extent)&&null!=this._ordinalMeta.categories[t]},q_.prototype.normalize=function(t){return Y_(t=this._getTickNumber(this.parse(t)),this._extent)},q_.prototype.scale=function(t){return t=Math.round(X_(t,this._extent)),this.getRawOrdinalNumber(t)},q_.prototype.getTicks=function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push({value:n}),n++;return t},q_.prototype.getMinorTicks=function(t){},q_.prototype.setSortInfo=function(t){if(null!=t){for(var e=t.ordinalNumbers,n=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],o=0,r=this._ordinalMeta.categories.length,a=Math.min(r,e.length);o<a;++o){var s=e[o];i[n[o]=s]=o}for(var l=0;o<r;++o){for(;null!=i[l];)l++;n.push(l),i[l]=o}}else this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null},q_.prototype._getTickNumber=function(t){var e=this._ticksByOrdinalNumber;return e&&0<=t&&t<e.length?e[t]:t},q_.prototype.getRawOrdinalNumber=function(t){var e=this._ordinalNumbersByTick;return e&&0<=t&&t<e.length?e[t]:t},q_.prototype.getLabel=function(t){if(!this.isBlank())return t=this.getRawOrdinalNumber(t.value),null==(t=this._ordinalMeta.categories[t])?"":t+""},q_.prototype.count=function(){return this._extent[1]-this._extent[0]+1},q_.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},q_.prototype.isInExtentRange=function(t){return t=this._getTickNumber(t),this._extent[0]<=t&&this._extent[1]>=t},q_.prototype.getOrdinalMeta=function(){return this._ordinalMeta},q_.prototype.niceTicks=function(){},q_.prototype.niceExtent=function(){},q_.type="ordinal";var Z_,j_=q_;function q_(t){var t=Z_.call(this,t)||this,e=(t.type="ordinal",t.getSetting("ordinalMeta"));return F(e=e||new B_({}))&&(e=new B_({categories:j(e,function(t){return k(t)?t.value:t})})),t._ordinalMeta=e,t._extent=t.getSetting("extent")||[0,e.categories.length-1],t}N_.registerClass(j_);var K_,$_=_o,J_=(u(Q_,K_=N_),Q_.prototype.parse=function(t){return t},Q_.prototype.contain=function(t){return U_(t,this._extent)},Q_.prototype.normalize=function(t){return Y_(t,this._extent)},Q_.prototype.scale=function(t){return X_(t,this._extent)},Q_.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},Q_.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]),this.setExtent(e[0],e[1])},Q_.prototype.getInterval=function(){return this._interval},Q_.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=G_(t)},Q_.prototype.getTicks=function(t){var e=this._interval,n=this._extent,i=this._niceExtent,o=this._intervalPrecision,r=[];if(e){n[0]<i[0]&&r.push(t?{value:$_(i[0]-e,o)}:{value:n[0]});for(var a=i[0];a<=i[1]&&(r.push({value:a}),(a=$_(a+e,o))!==r[r.length-1].value);)if(1e4<r.length)return[];var s=r.length?r[r.length-1].value:i[1];n[1]>s&&r.push(t?{value:$_(s+e,o)}:{value:n[1]})}return r},Q_.prototype.getMinorTicks=function(t){for(var e=this.getTicks(!0),n=[],i=this.getExtent(),o=1;o<e.length;o++){for(var r=e[o],a=e[o-1],s=0,l=[],u=(r.value-a.value)/t;s<t-1;){var h=$_(a.value+(s+1)*u);h>i[0]&&h<i[1]&&l.push(h),s++}n.push(l)}return n},Q_.prototype.getLabel=function(t,e){return null==t?"":(null==(e=e&&e.precision)?e=wo(t.value)||0:"auto"===e&&(e=this._intervalPrecision),Qc($_(t.value,e,!0)))},Q_.prototype.niceTicks=function(t,e,n){t=t||5;var i=this._extent,o=i[1]-i[0];isFinite(o)&&(o<0&&i.reverse(),o=H_(i,t,e,n),this._intervalPrecision=o.intervalPrecision,this._interval=o.interval,this._niceExtent=o.niceTickExtent)},Q_.prototype.niceExtent=function(t){var e=this._extent,n=(e[0]===e[1]&&(0!==e[0]?(n=e[0],t.fixMax||(e[1]+=n/2),e[0]-=n/2):e[1]=1),e[1]-e[0]),n=(isFinite(n)||(e[0]=0,e[1]=1),this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval),this._interval);t.fixMin||(e[0]=$_(Math.floor(e[0]/n)*n)),t.fixMax||(e[1]=$_(Math.ceil(e[1]/n)*n))},Q_.type="interval",Q_);function Q_(){var t=null!==K_&&K_.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}N_.registerClass(J_);var t1="__ec_stack_",e1="undefined"!=typeof Float32Array?Float32Array:Array;function n1(t){return t.get("stack")||t1+t.seriesIndex}function i1(t){return t.dim+t.index}function o1(t,e){var n=[];return e.eachSeriesByType(t,function(t){u1(t)&&!h1(t)&&n.push(t)}),n}function r1(t){var a,d,l=function(t){var e,l={},n=(N(t,function(t){var e=t.coordinateSystem.getBaseAxis();if("time"===e.type||"value"===e.type)for(var n=t.getData(),i=e.dim+"_"+e.index,o=n.mapDimension(e.dim),r=0,a=n.count();r<a;++r){var s=n.get(o,r);l[i]?l[i].push(s):l[i]=[s]}}),{});for(e in l)if(l.hasOwnProperty(e)){var i=l[e];if(i){i.sort(function(t,e){return t-e});for(var o=null,r=1;r<i.length;++r){var a=i[r]-i[r-1];0<a&&(o=null===o?a:Math.min(o,a))}n[e]=o}}return n}(t),u=[];return N(t,function(t){var e,n=t.coordinateSystem.getBaseAxis(),i=n.getExtent(),o=(e="category"===n.type?n.getBandWidth():"value"===n.type||"time"===n.type?(e=n.dim+"_"+n.index,e=l[e],o=Math.abs(i[1]-i[0]),r=n.scale.getExtent(),r=Math.abs(r[1]-r[0]),e?o/r*e:o):(r=t.getData(),Math.abs(i[1]-i[0])/r.count()),B(t.get("barWidth"),e)),i=B(t.get("barMaxWidth"),e),r=B(t.get("barMinWidth")||1,e),a=t.get("barGap"),s=t.get("barCategoryGap");u.push({bandWidth:e,barWidth:o,barMaxWidth:i,barMinWidth:r,barGap:a,barCategoryGap:s,axisKey:i1(n),stackId:n1(t)})}),a={},N(u,function(t,e){var n=t.axisKey,i=t.bandWidth,i=a[n]||{bandWidth:i,remainedWidth:i,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},o=i.stacks,n=(a[n]=i,t.stackId),r=(o[n]||i.autoWidthCount++,o[n]=o[n]||{width:0,maxWidth:0},t.barWidth),r=(r&&!o[n].width&&(o[n].width=r,r=Math.min(i.remainedWidth,r),i.remainedWidth-=r),t.barMaxWidth),r=(r&&(o[n].maxWidth=r),t.barMinWidth),o=(r&&(o[n].minWidth=r),t.barGap),n=(null!=o&&(i.gap=o),t.barCategoryGap);null!=n&&(i.categoryGap=n)}),d={},N(a,function(t,n){d[n]={};var e=t.stacks,i=t.bandWidth,o=t.categoryGap,r=(null==o&&(r=lt(e).length,o=Math.max(35-4*r,15)+"%"),B(o,i)),a=B(t.gap,1),s=t.remainedWidth,l=t.autoWidthCount,u=(s-r)/(l+(l-1)*a),u=Math.max(u,0);N(e,function(t){var e,n=t.maxWidth,i=t.minWidth;t.width?(e=t.width,n&&(e=Math.min(e,n)),i&&(e=Math.max(e,i)),t.width=e,s-=e+a*e,l--):(e=u,n&&n<e&&(e=Math.min(n,s)),(e=i&&e<i?i:e)!==u&&(t.width=e,s-=e+a*e,l--))}),u=(s-r)/(l+(l-1)*a),u=Math.max(u,0);var h,c=0,p=(N(e,function(t,e){t.width||(t.width=u),c+=(h=t).width*(1+a)}),h&&(c-=h.width*a),-c/2);N(e,function(t,e){d[n][e]=d[n][e]||{bandWidth:i,offset:p,width:t.width},p+=t.width*(1+a)})}),d}function a1(t,e,n){if(t&&e)return null!=(t=t[i1(e)])&&null!=n?t[n1(n)]:t}function s1(t,e){var t=o1(t,e),C=r1(t),I={};N(t,function(t){var e=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),o=n1(t),r=C[i1(i)][o],a=r.offset,s=r.width,l=n.getOtherAxis(i),u=t.get("barMinHeight")||0;I[o]=I[o]||[],e.setLayout({bandWidth:r.bandWidth,offset:a,size:s});for(var h=e.mapDimension(l.dim),c=e.mapDimension(i.dim),p=P_(e,h),d=l.isHorizontal(),f=c1(0,l),g=0,y=e.count();g<y;g++){var m=e.get(h,g),v=e.get(c,g),_=0<=m?"p":"n",x=f;p&&(I[o][v]||(I[o][v]={p:f,n:f}),x=I[o][v][_]);var b,w=void 0,S=void 0,M=void 0,T=void 0;d?(w=x,S=(b=n.dataToPoint([m,v]))[1]+a,M=b[0]-f,T=s,Math.abs(M)<u&&(M=(M<0?-1:1)*u),isNaN(M)||p&&(I[o][v][_]+=M)):(w=(b=n.dataToPoint([v,m]))[0]+a,S=x,M=s,T=b[1]-f,Math.abs(T)<u&&(T=(T<=0?-1:1)*u),isNaN(T)||p&&(I[o][v][_]+=T)),e.setItemLayout(g,{x:w,y:S,width:M,height:T})}})}var l1={seriesType:"bar",plan:bg(),reset:function(t){var e,c,p,n,d,f,g,y,m,v;if(u1(t)&&h1(t))return e=t.getData(),c=t.coordinateSystem,p=c.master.getRect(),n=c.getBaseAxis(),d=c.getOtherAxis(n),f=e.mapDimension(d.dim),g=e.mapDimension(n.dim),y=d.isHorizontal(),m=y?0:1,.5<(v=a1(r1([t]),n,t).width)||(v=.5),{progress:function(t,e){for(var n,i=t.count,o=new e1(2*i),r=new e1(2*i),a=new e1(i),s=[],l=[],u=0,h=0;null!=(n=t.next());)l[m]=e.get(f,n),l[1-m]=e.get(g,n),s=c.dataToPoint(l,null,s),r[u]=y?p.x+p.width:s[0],o[u++]=s[0],r[u]=y?s[1]:p.y+p.height,o[u++]=s[1],a[h++]=n;e.setLayout({largePoints:o,largeDataIndices:a,largeBackgroundPoints:r,barWidth:v,valueAxisStart:c1(0,d),backgroundStart:y?p.x:p.y,valueAxisHorizontal:y})}}}};function u1(t){return t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type}function h1(t){return t.pipelineContext&&t.pipelineContext.large}function c1(t,e){return e.toGlobalCoord(e.dataToCoord("log"===e.type?1:0))}u(g1,p1=J_),g1.prototype.getLabel=function(t){var e=this.getSetting("useUTC");return Bc(t.value,Pc[function(t){switch(t){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}(Ec(this._minLevelUnit))]||Pc.second,e,this.getSetting("locale"))},g1.prototype.getFormattedLabel=function(t,e,n){var i=this.getSetting("useUTC"),o=this.getSetting("locale"),r=null;if("string"==typeof n)r=n;else if("function"==typeof n)r=n(t.value,e,{level:t.level});else{var a=I({},kc);if(0<t.level)for(var s=0;s<Oc.length;++s)a[Oc[s]]="{primary|"+a[Oc[s]]+"}";var l=n?!1===n.inherit?n:V(n,a):a,u=zc(t.value,i);if(l[u])r=l[u];else if(l.inherit){for(s=Rc.indexOf(u)-1;0<=s;--s)if(l[u]){r=l[u];break}r=r||a.none}F(r)&&(e=null==t.level?0:0<=t.level?t.level:r.length+t.level,r=r[e=Math.min(e,r.length-1)])}return Bc(new Date(t.value),r,i,o)},g1.prototype.getTicks=function(t){var e=this._interval,n=this._extent,i=[];return e&&(i.push({value:n[0],level:0}),e=this.getSetting("useUTC"),e=function(t,w,S,M){var e=Rc,n=0;function i(t,e,n){var i,o,r=[],a=!e.length;if(!function(t,e,n,i){function o(t){return Vc(c,t,i)===Vc(p,t,i)}function r(){return o("year")}function a(){return r()&&o("month")}function s(){return a()&&o("day")}function l(){return s()&&o("hour")}function u(){return l()&&o("minute")}function h(){return u()&&o("second")}var c=Ao(e),p=Ao(n);switch(t){case"year":return r();case"month":return a();case"day":return s();case"hour":return l();case"minute":return u();case"second":return h();case"millisecond":return h()&&o("millisecond")}}(Ec(t),M[0],M[1],S)){a&&(e=[{value:function(t,e,n){var i=new Date(t);switch(Ec(e)){case"year":case"month":i[Zc(n)](0);case"day":i[jc(n)](1);case"hour":i[qc(n)](0);case"minute":i[Kc(n)](0);case"second":i[$c(n)](0),i[Jc(n)](0)}return i.getTime()}(new Date(M[0]),t,S)},{value:M[1]}]);for(var s=0;s<e.length-1;s++){var l=e[s].value,u=e[s+1].value;if(l!==u){var h=void 0,c=void 0,p=void 0;switch(t){case"year":h=Math.max(1,Math.round(w/Dc/365)),c=Fc(S),p=S?"setUTCFullYear":"setFullYear";break;case"half-year":case"quarter":case"month":o=w,h=6<(o/=30*Dc)?6:3<o?3:2<o?2:1,c=Hc(S),p=Zc(S);break;case"week":case"half-week":case"day":o=w,h=16<(o/=Dc)?16:7.5<o?7:3.5<o?4:1.5<o?2:1,c=Gc(S),p=jc(S);break;case"half-day":case"quarter-day":case"hour":i=w,h=12<(i/=Ac)?12:6<i?6:3.5<i?4:2<i?2:1,c=Wc(S),p=qc(S);break;case"minute":h=y1(w,!0),c=Uc(S),p=Kc(S);break;case"second":h=y1(w,!1),c=Yc(S),p=$c(S);break;case"millisecond":h=Lo(w,!0),c=Xc(S),p=Jc(S)}b=x=_=v=m=y=g=f=d=void 0;for(var d=h,f=l,g=u,y=c,m=p,v=r,_=new Date(f),x=f,b=_[y]();x<g&&x<=M[1];)v.push({value:x}),_[m](b+=d),x=_.getTime();v.push({value:x,notAdd:!0}),"year"===t&&1<n.length&&0===s&&n.unshift({value:n[0].value-h})}}for(s=0;s<r.length;s++)n.push(r[s])}}for(var o=[],r=[],a=0,s=0,l=0;l<e.length&&n++<1e4;++l){var u=Ec(e[l]);if(function(t){return t===Ec(t)}(e[l])&&(i(e[l],o[o.length-1]||[],r),u!==(e[l+1]?Ec(e[l+1]):null))){if(r.length){s=a,r.sort(function(t,e){return t.value-e.value});for(var h=[],c=0;c<r.length;++c){var p=r[c].value;0!==c&&r[c-1].value===p||(h.push(r[c]),p>=M[0]&&p<=M[1]&&a++)}u=(M[1]-M[0])/w;if(1.5*u<a&&u/1.5<s)break;if(o.push(h),u<a||t===e[l])break}r=[]}}var d=st(j(o,function(t){return st(t,function(t){return t.value>=M[0]&&t.value<=M[1]&&!t.notAdd})}),function(t){return 0<t.length}),f=[],g=d.length-1;for(l=0;l<d.length;++l)for(var y=d[l],m=0;m<y.length;++m)f.push({value:y[m].value,level:g-l});f.sort(function(t,e){return t.value-e.value});var v=[];for(l=0;l<f.length;++l)0!==l&&f[l].value===f[l-1].value||v.push(f[l]);return v}(this._minLevelUnit,this._approxInterval,e,n),(i=i.concat(e)).push({value:n[1],level:0})),i},g1.prototype.niceExtent=function(t){var e,n=this._extent;n[0]===n[1]&&(n[0]-=Dc,n[1]+=Dc),n[1]===-1/0&&n[0]===1/0&&(e=new Date,n[1]=+new Date(e.getFullYear(),e.getMonth(),e.getDate()),n[0]=n[1]-Dc),this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval)},g1.prototype.niceTicks=function(t,e,n){var i=this._extent,i=i[1]-i[0],i=(this._approxInterval=i/(t=t||10),null!=e&&this._approxInterval<e&&(this._approxInterval=e),null!=n&&this._approxInterval>n&&(this._approxInterval=n),f1.length),t=Math.min(function(t,e,n,i){for(;n<i;){var o=n+i>>>1;t[o][1]<e?n=1+o:i=o}return n}(f1,this._approxInterval,0,i),i-1);this._interval=f1[t][1],this._minLevelUnit=f1[Math.max(t-1,0)][0]},g1.prototype.parse=function(t){return"number"==typeof t?t:+Ao(t)},g1.prototype.contain=function(t){return U_(this.parse(t),this._extent)},g1.prototype.normalize=function(t){return Y_(this.parse(t),this._extent)},g1.prototype.scale=function(t){return X_(t,this._extent)},g1.type="time";var p1,d1=g1,f1=[["second",Cc],["minute",Ic],["hour",Ac],["quarter-day",6*Ac],["half-day",12*Ac],["day",1.2*Dc],["half-week",3.5*Dc],["week",7*Dc],["month",31*Dc],["quarter",95*Dc],["half-year",cr/2],["year",cr]];function g1(t){t=p1.call(this,t)||this;return t.type="time",t}function y1(t,e){return 30<(t/=e?Ic:Cc)?30:20<t?20:15<t?15:10<t?10:5<t?5:2<t?2:1}N_.registerClass(d1);var m1,v1=N_.prototype,_1=J_.prototype,x1=wo,b1=_o,w1=Math.floor,S1=Math.ceil,M1=Math.pow,T1=Math.log,C1=(u(I1,m1=N_),I1.prototype.getTicks=function(t){var e=this._originalScale,n=this._extent,i=e.getExtent();return j(_1.getTicks.call(this,t),function(t){var t=t.value,e=_o(M1(this.base,t)),e=t===n[0]&&this._fixMin?A1(e,i[0]):e;return{value:t===n[1]&&this._fixMax?A1(e,i[1]):e}},this)},I1.prototype.setExtent=function(t,e){var n=this.base;t=T1(t)/T1(n),e=T1(e)/T1(n),_1.setExtent.call(this,t,e)},I1.prototype.getExtent=function(){var t=this.base,e=v1.getExtent.call(this),t=(e[0]=M1(t,e[0]),e[1]=M1(t,e[1]),this._originalScale.getExtent());return this._fixMin&&(e[0]=A1(e[0],t[0])),this._fixMax&&(e[1]=A1(e[1],t[1])),e},I1.prototype.unionExtent=function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=T1(t[0])/T1(e),t[1]=T1(t[1])/T1(e),v1.unionExtent.call(this,t)},I1.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},I1.prototype.niceTicks=function(t){t=t||10;var e=this._extent,n=e[1]-e[0];if(!(n==1/0||n<=0)){var i=Do(n);for(t/n*i<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&0<Math.abs(i);)i*=10;t=[_o(S1(e[0]/i)*i),_o(w1(e[1]/i)*i)];this._interval=i,this._niceExtent=t}},I1.prototype.niceExtent=function(t){_1.niceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},I1.prototype.parse=function(t){return t},I1.prototype.contain=function(t){return U_(t=T1(t)/T1(this.base),this._extent)},I1.prototype.normalize=function(t){return Y_(t=T1(t)/T1(this.base),this._extent)},I1.prototype.scale=function(t){return t=X_(t,this._extent),M1(this.base,t)},I1.type="log",I1),jy=C1.prototype;function I1(){var t=null!==m1&&m1.apply(this,arguments)||this;return t.type="log",t.base=10,t._originalScale=new J_,t._interval=0,t}function A1(t,e){return b1(t,x1(e))}jy.getMinorTicks=_1.getMinorTicks,jy.getLabel=_1.getLabel,N_.registerClass(C1);k1.prototype._prepareParams=function(t,e,n){n[1]<n[0]&&(n=[NaN,NaN]),this._dataMin=n[0],this._dataMax=n[1];var i=this._isOrdinal="ordinal"===t.type,o=(this._needCrossZero=e.getNeedCrossZero&&e.getNeedCrossZero(),this._modelMinRaw=e.get("min",!0)),o=(ut(o)?this._modelMinNum=R1(t,o({min:n[0],max:n[1]})):"dataMin"!==o&&(this._modelMinNum=R1(t,o)),this._modelMaxRaw=e.get("max",!0));ut(o)?this._modelMaxNum=R1(t,o({min:n[0],max:n[1]})):"dataMax"!==o&&(this._modelMaxNum=R1(t,o)),i?this._axisDataLen=e.getCategories().length:"boolean"==typeof(t=F(n=e.get("boundaryGap"))?n:[n||0,n||0])[0]||"boolean"==typeof t[1]?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[li(t[0],1),li(t[1],1)]},k1.prototype.calculate=function(){var t=this._isOrdinal,e=this._dataMin,n=this._dataMax,i=this._axisDataLen,o=this._boundaryGapInner,r=t?null:n-e||Math.abs(e),a="dataMin"===this._modelMinRaw?e:this._modelMinNum,s="dataMax"===this._modelMaxRaw?n:this._modelMaxNum,l=null!=a,u=null!=s,e=(null==a&&(a=t?i?0:NaN:e-o[0]*r),null==s&&(s=t?i?i-1:NaN:n+o[1]*r),null!=a&&isFinite(a)||(a=NaN),(s=null!=s&&isFinite(s)?s:NaN)<a&&(s=a=NaN),vt(a)||vt(s)||t&&!i),n=(this._needCrossZero&&(a=0<a&&0<s&&!l?0:a)<0&&s<0&&!u&&(s=0),this._determinedMin),o=this._determinedMax;return null!=n&&(a=n,l=!0),null!=o&&(s=o,u=!0),{min:a,max:s,minFixed:l,maxFixed:u,isBlank:e}},k1.prototype.modifyDataMinMax=function(t,e){this[P1[t]]=e},k1.prototype.setDeterminedMinMax=function(t,e){this[L1[t]]=e},k1.prototype.freeze=function(){this.frozen=!0};var D1=k1;function k1(t,e,n){this._prepareParams(t,e,n)}var L1={min:"_determinedMin",max:"_determinedMax"},P1={min:"_dataMin",max:"_dataMax"};function O1(t,e,n){return t.rawExtentInfo||(e=new D1(t,e,n),t.rawExtentInfo=e)}function R1(t,e){return null==e?null:vt(e)?NaN:t.parse(e)}function N1(t,e){var n,i,o,r,a,s,l=t.type,u=O1(t,e,t.getExtent()).calculate(),t=(t.setBlank(u.isBlank),u.min),h=u.max,c=e.ecModel;return c&&"time"===l&&(l=o1("bar",c),n=!1,N(l,function(t){n=n||t.getBaseAxis()===e.axis}),n)&&(c=r1(l),l=t,i=h,c=c,s=(s=(o=e).axis.getExtent())[1]-s[0],t=(c=void 0===(c=a1(c,o.axis))?{min:l,max:i}:(r=1/0,N(c,function(t){r=Math.min(t.offset,r)}),a=-1/0,N(c,function(t){a=Math.max(t.offset+t.width,a)}),r=Math.abs(r),a=Math.abs(a),{min:l-=r/(o=r+a)*(s=(c=i-l)/(1-(r+a)/s)-c),max:i+=a/o*s})).min,h=c.max),{extent:[t,h],fixMin:u.minFixed,fixMax:u.maxFixed}}function E1(t,e){var n=N1(t,e),i=n.extent,o=e.get("splitNumber"),r=(t instanceof C1&&(t.base=e.get("logBase")),t.type),i=(t.setExtent(i[0],i[1]),t.niceExtent({splitNumber:o,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:"interval"===r||"time"===r?e.get("minInterval"):null,maxInterval:"interval"===r||"time"===r?e.get("maxInterval"):null}),e.get("interval"));null!=i&&t.setInterval&&t.setInterval(i)}function B1(t,e){if(e=e||t.get("type"))switch(e){case"category":return new j_({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new d1({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(N_.getClass(e)||J_)}}function z1(n){var i,o,e,t=n.getLabelModel().get("formatter"),r="category"===n.type?n.scale.getExtent()[0]:null;return"time"===n.scale.type?(o=t,function(t,e){return n.scale.getFormattedLabel(t,e,o)}):"string"==typeof t?(e=t,function(t){t=n.scale.getLabel(t);return e.replace("{value}",null!=t?t:"")}):"function"==typeof t?(i=t,function(t,e){return null!=r&&(e=t.value-r),i(V1(n,t),e,null!=t.level?{level:t.level}:null)}):function(t){return n.scale.getLabel(t)}}function V1(t,e){return"category"===t.type?t.scale.getLabel(e):e.value}function F1(t){var e,n,i,o=t.model,r=t.scale;if(o.get(["axisLabel","show"])&&!r.isBlank()){var a,s,l=r.getExtent(),u=r instanceof j_?r.count():(a=r.getTicks()).length,h=t.getLabelModel(),c=z1(t),p=1;40<u&&(p=Math.ceil(u/40));for(var d=0;d<u;d+=p){var f=c(a?a[d]:{value:l[0]+d},d),g=(f=h.getTextRect(f),e=h.get("rotate")||0,n=i=g=n=void 0,e=e*Math.PI/180,n=f.width,g=f.height,i=n*Math.abs(Math.cos(e))+Math.abs(g*Math.sin(e)),n=n*Math.abs(Math.sin(e))+Math.abs(g*Math.cos(e)),new R(f.x,f.y,i,n));s?s.union(g):s=g}return s}}function H1(t){t=t.get("interval");return null==t?"auto":t}function G1(t){return"category"===t.type&&0===H1(t.getLabelModel())}function W1(e,t){var n={};return N(e.mapDimensionsAll(t),function(t){n[O_(e,t)]=!0}),lt(n)}Y1.prototype.getNeedCrossZero=function(){return!this.option.scale},Y1.prototype.getCoordSysModel=function(){};var U1=Y1;function Y1(){}var Lc=Object.freeze({__proto__:null,createDimensions:I_,createList:function(t){return R_(t.getSource(),t)},createScale:function(t,e){var n=e;return(e=B1(n=e instanceof fc?n:new fc(e))).setExtent(t[0],t[1]),E1(e,n),e},createSymbol:nm,createTextStyle:function(t,e){return Kh(t,null,null,"normal"!==(e=e||{}).state)},dataStack:{isDimensionStacked:P_,enableDataStack:L_,getStackedDimension:O_},enableHoverEmphasis:xl,getECData:z,getLayoutRect:mp,mixinAxisModelCommonMethods:function(t){ot(t,U1)}}),X1=[],Z1={registerPreprocessor:Rv,registerProcessor:Nv,registerPostInit:Ev,registerPostUpdate:Bv,registerAction:zv,registerCoordinateSystem:Vv,registerLayout:Fv,registerVisual:Hv,registerTransform:Xv,registerLoading:Uv,registerMap:Yv,PRIORITY:Ky,ComponentModel:g,ComponentView:_g,SeriesModel:hg,ChartView:Mg,registerComponentModel:function(t){g.registerClass(t)},registerComponentView:function(t){_g.registerClass(t)},registerSeriesModel:function(t){hg.registerClass(t)},registerChartView:function(t){Mg.registerClass(t)},registerSubTypeDefaulter:function(t,e){g.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){mo(t,e)}};function j1(t){F(t)?N(t,function(t){j1(t)}):0<=A(X1,t)||(X1.push(t),(t=ut(t)?{install:t}:t).install(Z1))}var Ku=Object.freeze({__proto__:null,MAX_SAFE_INTEGER:9007199254740991,asc:xo,getPercentWithPrecision:Mo,getPixelPrecision:So,getPrecision:bo,getPrecisionSafe:wo,isNumeric:Oo,isRadianAroundZero:Co,linearMap:vo,nice:Lo,numericToNumber:Po,parseDate:Ao,quantile:function(t,e){var e=(t.length-1)*e+1,n=Math.floor(e),i=+t[n-1];return(e=e-n)?i+e*(t[n]-i):i},quantity:Do,quantityExponent:ko,reformIntervals:function(t){t.sort(function(t,e){return function t(e,n,i){return e.interval[i]<n.interval[i]||e.interval[i]===n.interval[i]&&(e.close[i]-n.close[i]==(i?-1:1)||!i&&t(e,n,1))}(t,e,0)?-1:1});for(var e=-1/0,n=1,i=0;i<t.length;){for(var o=t[i].interval,r=t[i].close,a=0;a<2;a++)o[a]<=e&&(o[a]=e,r[a]=a?1:1-n),e=o[a],n=r[a];o[0]===o[1]&&r[0]*r[1]!=1?t.splice(i,1):i++}return t},remRadian:To,round:_o}),mr=Object.freeze({__proto__:null,format:Bc,parse:Ao}),sy=Object.freeze({__proto__:null,Arc:Yu,BezierCurve:Hu,BoundingRect:R,Circle:ql,CompoundPath:ju,Ellipse:Ql,Group:O,Image:ls,IncrementalDisplayable:ph,Line:Nu,LinearGradient:Qu,Polygon:Cu,Polyline:ku,RadialGradient:nh,Rect:ms,Ring:xu,Sector:yu,Text:ws,clipPointsByRect:Vh,clipRectByRect:Fh,createIcon:Hh,extendPath:_h,extendShape:mh,getShapeClass:bh,getTransform:Rh,initProps:Dh,makeImage:Sh,makePath:wh,mergePath:Th,registerShape:xh,resizePath:Ch,updateProps:Ah}),n=Object.freeze({__proto__:null,addCommas:Qc,capitalFirst:function(t){return t&&t.charAt(0).toUpperCase()+t.substr(1)},encodeHTML:op,formatTime:function(t,e,n){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var i=(e=Ao(e))["get"+(n=n?"UTC":"")+"FullYear"](),o=e["get"+n+"Month"]()+1,r=e["get"+n+"Date"](),a=e["get"+n+"Hours"](),s=e["get"+n+"Minutes"](),l=e["get"+n+"Seconds"](),e=e["get"+n+"Milliseconds"]();return t.replace("MM",Nc(o,2)).replace("M",o).replace("yyyy",i).replace("yy",i%100+"").replace("dd",Nc(r,2)).replace("d",r).replace("hh",Nc(a,2)).replace("h",a).replace("mm",Nc(s,2)).replace("m",s).replace("ss",Nc(l,2)).replace("s",l).replace("SSS",Nc(e,3))},formatTpl:lp,getTextRect:function(t,e,n,i,o,r,a,s){return new ws({style:{text:t,font:e,align:n,verticalAlign:i,padding:o,rich:r,overflow:a?"truncate":null,lineHeight:s}}).getBoundingRect()},getTooltipMarker:up,normalizeCssArray:ep,toCamelCase:tp,truncateText:Mr}),ay=Object.freeze({__proto__:null,bind:S,clone:C,curry:M,defaults:V,each:N,extend:I,filter:st,indexOf:A,inherits:it,isArray:F,isFunction:ut,isObject:k,isString:D,map:j,merge:p,reduce:at}),q1=Ko();function K1(t){return"category"===t.type?(o=(e=t).getLabelModel(),r=J1(e,o),!o.get("show")||e.scale.isBlank()?{labels:[],labelCategoryInterval:r.labelCategoryInterval}:r):(o=(n=t).scale.getTicks(),i=z1(n),{labels:j(o,function(t,e){return{formattedLabel:i(t,e),rawLabel:n.scale.getLabel(t),tickValue:t.value}})});var n,i,e,o,r}function $1(t,e){var n,i,o,r,a,s;return"category"===t.type?(e=e,r=Q1(n=t,"ticks"),a=H1(e),(s=tx(r,a))||(e.get("show")&&!n.scale.isBlank()||(i=[]),i=ut(a)?ix(n,a,!0):"auto"===a?(s=J1(n,n.getLabelModel()),o=s.labelCategoryInterval,j(s.labels,function(t){return t.tickValue})):nx(n,o=a,!0),ex(r,a,{ticks:i,tickCategoryInterval:o}))):{ticks:j(t.scale.getTicks(),function(t){return t.value})}}function J1(t,e){var n,i=Q1(t,"labels"),e=H1(e);return tx(i,e)||ex(i,e,{labels:ut(e)?ix(t,e):nx(t,n="auto"===e?null!=(t=q1(i=t).autoInterval)?t:q1(i).autoInterval=i.calculateCategoryInterval():e),labelCategoryInterval:n})}function Q1(t,e){return q1(t)[e]||(q1(t)[e]=[])}function tx(t,e){for(var n=0;n<t.length;n++)if(t[n].key===e)return t[n].value}function ex(t,e,n){return t.push({key:e,value:n}),n}function nx(t,e,n){var i=z1(t),o=t.scale,r=o.getExtent(),a=t.getLabelModel(),s=[],l=Math.max((e||0)+1,1),e=r[0],u=o.count(),u=(0!==e&&1<l&&2<u/l&&(e=Math.round(Math.ceil(e/l)*l)),G1(t)),t=a.get("showMinLabel")||u,a=a.get("showMaxLabel")||u;t&&e!==r[0]&&c(r[0]);for(var h=e;h<=r[1];h+=l)c(h);function c(t){var e={value:t};s.push(n?t:{formattedLabel:i(e),rawLabel:o.getLabel(e),tickValue:t})}return a&&h-l!==r[1]&&c(r[1]),s}function ix(t,i,o){var r=t.scale,a=z1(t),s=[];return N(r.getTicks(),function(t){var e=r.getLabel(t),n=t.value;i(t.value,e)&&s.push(o?n:{formattedLabel:a(t),rawLabel:e,tickValue:n})}),s}var ox=[0,1],$y=(rx.prototype.contain=function(t){var e=this._extent,n=Math.min(e[0],e[1]),e=Math.max(e[0],e[1]);return n<=t&&t<=e},rx.prototype.containData=function(t){return this.scale.contain(t)},rx.prototype.getExtent=function(){return this._extent.slice()},rx.prototype.getPixelPrecision=function(t){return So(t||this.scale.getExtent(),this._extent)},rx.prototype.setExtent=function(t,e){var n=this._extent;n[0]=t,n[1]=e},rx.prototype.dataToCoord=function(t,e){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&"ordinal"===i.type&&ax(n=n.slice(),i.count()),vo(t,ox,n,e)},rx.prototype.coordToData=function(t,e){var n=this._extent,i=this.scale,i=(this.onBand&&"ordinal"===i.type&&ax(n=n.slice(),i.count()),vo(t,n,ox,e));return this.scale.scale(i)},rx.prototype.pointToData=function(t,e){},rx.prototype.getTicksCoords=function(t){var e,n,i,o,r=(t=t||{}).tickModel||this.getTickModel(),a=j($1(this,r).ticks,function(t){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawOrdinalNumber(t):t),tickValue:t}},this),s=this,l=a,r=r.get("alignWithLabel"),t=t.clamp,u=l.length;function h(t,e){return t=_o(t),e=_o(e),o?e<t:t<e}return s.onBand&&!r&&u&&(r=s.getExtent(),1===u?(l[0].coord=r[0],e=l[1]={coord:r[0]}):(n=l[u-1].tickValue-l[0].tickValue,i=(l[u-1].coord-l[0].coord)/n,N(l,function(t){t.coord-=i/2}),n=1+s.scale.getExtent()[1]-l[u-1].tickValue,e={coord:l[u-1].coord+i*n},l.push(e)),o=r[0]>r[1],h(l[0].coord,r[0])&&(t?l[0].coord=r[0]:l.shift()),t&&h(r[0],l[0].coord)&&l.unshift({coord:r[0]}),h(r[1],e.coord)&&(t?e.coord=r[1]:l.pop()),t)&&h(e.coord,r[1])&&l.push({coord:r[1]}),a},rx.prototype.getMinorTicksCoords=function(){var t;return"ordinal"===this.scale.type?[]:(t=this.model.getModel("minorTick").get("splitNumber"),j(this.scale.getMinorTicks(t=0<t&&t<100?t:5),function(t){return j(t,function(t){return{coord:this.dataToCoord(t),tickValue:t}},this)},this))},rx.prototype.getViewLabels=function(){return K1(this).labels},rx.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},rx.prototype.getTickModel=function(){return this.model.getModel("axisTick")},rx.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),e=e[1]-e[0]+(this.onBand?1:0),t=(0===e&&(e=1),Math.abs(t[1]-t[0]));return Math.abs(t)/e},rx.prototype.calculateCategoryInterval=function(){o=(n=d=this).getLabelModel();var t={axisRotate:n.getRotate?n.getRotate():n.isHorizontal&&!n.isHorizontal()?90:0,labelRotate:o.get("rotate")||0,font:o.getFont()},e=z1(d),n=(t.axisRotate-t.labelRotate)/180*Math.PI,i=(o=d.scale).getExtent(),o=o.count();if(i[1]-i[0]<1)return 0;var r=1;40<o&&(r=Math.max(1,Math.floor(o/40)));for(var a=i[0],s=d.dataToCoord(a+1)-d.dataToCoord(a),l=Math.abs(s*Math.cos(n)),s=Math.abs(s*Math.sin(n)),u=0,h=0;a<=i[1];a+=r)var c=1.3*(p=oi(e({value:a}),t.font,"center","top")).width,p=1.3*p.height,u=Math.max(u,c,7),h=Math.max(h,p,7);var n=u/l,l=h/s,s=(isNaN(n)&&(n=1/0),isNaN(l)&&(l=1/0),Math.max(0,Math.floor(Math.min(n,l)))),n=q1(d.model),l=d.getExtent(),d=n.lastAutoInterval,f=n.lastTickCount;return null!=d&&null!=f&&Math.abs(d-s)<=1&&Math.abs(f-o)<=1&&s<d&&n.axisExtent0===l[0]&&n.axisExtent1===l[1]?s=d:(n.lastTickCount=o,n.lastAutoInterval=s,n.axisExtent0=l[0],n.axisExtent1=l[1]),s},rx);function rx(t,e,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=n||[0,0]}function ax(t,e){e=(t[1]-t[0])/e/2;t[0]+=e,t[1]-=e}function sx(){return!1}function lx(t,e,n){var i=nt(),o=e.getWidth(),e=e.getHeight(),r=i.style;return r&&(r.position="absolute",r.left="0",r.top="0",r.width=o+"px",r.height=e+"px",i.setAttribute("data-zr-dom-id",t)),i.width=o*n,i.height=e*n,i}u(cx,ux=Qt),cx.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},cx.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},cx.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},cx.prototype.setUnpainted=function(){this.__firstTimePaint=!0},cx.prototype.createBackBuffer=function(){var t=this.dpr;this.domBack=lx("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!==t&&this.ctxBack.scale(t,t)},cx.prototype.createRepaintRects=function(t,e,n,i){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o,l=[],u=this.maxRepaintRectCount,h=!1,c=new R(0,0,0,0);function r(t){if(t.isFinite()&&!t.isZero())if(0===l.length)(e=new R(0,0,0,0)).copy(t),l.push(e);else{for(var e,n=!1,i=1/0,o=0,r=0;r<l.length;++r){var a=l[r];if(a.intersect(t)){var s=new R(0,0,0,0);s.copy(a),s.union(t),l[r]=s,n=!0;break}h&&(c.copy(t),c.union(a),s=t.width*t.height,a=a.width*a.height,(a=c.width*c.height-s-a)<i)&&(i=a,o=r)}h&&(l[o].union(t),n=!0),n||((e=new R(0,0,0,0)).copy(t),l.push(e)),h=h||l.length>=u}}for(var a,s=this.__startIndex;s<this.__endIndex;++s)(p=t[s])&&(f=p.shouldBePainted(n,i,!0,!0),(d=p.__isRendered&&(p.__dirty&bi.REDARAW_BIT||!f)?p.getPrevPaintRect():null)&&r(d),a=f&&(p.__dirty&bi.REDARAW_BIT||!p.__isRendered)?p.getPaintRect():null)&&r(a);for(s=this.__prevStartIndex;s<this.__prevEndIndex;++s){var p,d,f=(p=e[s]).shouldBePainted(n,i,!0,!0);!p||f&&p.__zr||!p.__isRendered||(d=p.getPrevPaintRect())&&r(d)}do{for(o=!1,s=0;s<l.length;)if(l[s].isZero())l.splice(s,1);else{for(var g=s+1;g<l.length;)l[s].intersect(l[g])?(o=!0,l[s].union(l[g]),l.splice(g,1)):g++;s++}}while(o);return this._paintRects=l},cx.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},cx.prototype.resize=function(t,e){var n=this.dpr,i=this.dom,o=i.style,r=this.domBack;o&&(o.width=t+"px",o.height=e+"px"),i.width=t*n,i.height=e*n,r&&(r.width=t*n,r.height=e*n,1!==n)&&this.ctxBack.scale(n,n)},cx.prototype.clear=function(t,r,e){var n=this.dom,a=this.ctx,i=n.width,o=n.height,s=(r=r||this.clearColor,this.motionBlur&&!t),l=this.lastFrameAlpha,u=this.dpr,h=this,c=(s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(n,0,0,i/u,o/u)),this.domBack);function p(t,e,n,i){var o;a.clearRect(t,e,n,i),r&&"transparent"!==r&&(o=void 0,gt(r)?(o=r.__canvasGradient||im(a,r,{x:0,y:0,width:n,height:i}),r.__canvasGradient=o):yt(r)&&(o=cm(a,r,{dirty:function(){h.setUnpainted(),h.__painter.refresh()}})),a.save(),a.fillStyle=o||r,a.fillRect(t,e,n,i),a.restore()),s&&(a.save(),a.globalAlpha=l,a.drawImage(c,t,e,n,i),a.restore())}!e||s?p(0,0,i,o):e.length&&N(e,function(t){p(t.x*u,t.y*u,t.width*u,t.height*u)})};var ux,hx=cx;function cx(t,e,n){var i,o=ux.call(this)||this,t=(o.motionBlur=!1,o.lastFrameAlpha=.7,o.dpr=1,o.virtual=!1,o.config={},o.incremental=!1,o.zlevel=0,o.maxRepaintRectCount=5,o.__dirty=!0,o.__firstTimePaint=!0,o.__used=!1,o.__drawIndex=0,o.__startIndex=0,o.__endIndex=0,o.__prevStartIndex=null,o.__prevEndIndex=null,n=n||di,"string"==typeof t?i=lx(t,e,n):k(t)&&(t=(i=t).id),o.id=t,(o.dom=i).style);return t&&(i.onselectstart=sx,t.webkitUserSelect="none",t.userSelect="none",t.webkitTapHighlightColor="rgba(0,0,0,0)",t["-webkit-touch-callout"]="none",t.padding="0",t.margin="0",t.borderWidth="0"),o.domBack=null,o.ctxBack=null,o.painter=e,o.config=null,o.dpr=n,o}var px=314159;function dx(t){return parseInt(t,10)}l.prototype.getType=function(){return"canvas"},l.prototype.isSingleCanvas=function(){return this._singleCanvas},l.prototype.getViewportRoot=function(){return this._domRoot},l.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},l.prototype.refresh=function(t){var e=this.storage.getDisplayList(!0),n=this._prevDisplayList,i=this._zlevelList;this._redrawId=Math.random(),this._paintList(e,n,t,this._redrawId);for(var o=0;o<i.length;o++){var r,a=i[o],a=this._layers[a];!a.__builtin__&&a.refresh&&(r=0===o?this._backgroundColor:null,a.refresh(r))}return this._opts.useDirtyRect&&(this._prevDisplayList=e.slice()),this},l.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},l.prototype._paintHoverList=function(t){var e=t.length,n=this._hoverlayer;if(n&&n.clear(),e){for(var i,o={inHover:!0,viewWidth:this._width,viewHeight:this._height},r=0;r<e;r++){var a=t[r];a.__inHover&&(n=n||(this._hoverlayer=this.getLayer(1e5)),i||(i=n.ctx).save(),Mm(i,a,o,r===e-1))}i&&i.restore()}},l.prototype.getHoverLayer=function(){return this.getLayer(1e5)},l.prototype.paintOne=function(t,e){Sm(t,e)},l.prototype._paintList=function(t,e,n,i){var o,r,a;this._redrawId===i&&(n=n||!1,this._updateLayerStatus(t),o=(r=this._doPaintList(t,e,n)).finished,r=r.needsRefreshHover,this._needsManuallyCompositing&&this._compositeManually(),r&&this._paintHoverList(t),o?this.eachLayer(function(t){t.afterBrush&&t.afterBrush()}):(a=this,Fi(function(){a._paintList(t,e,n,i)})))},l.prototype._compositeManually=function(){var e=this.getLayer(px).ctx,n=this._domRoot.width,i=this._domRoot.height;e.clearRect(0,0,n,i),this.eachBuiltinLayer(function(t){t.virtual&&e.drawImage(t.dom,0,0,n,i)})},l.prototype._doPaintList=function(d,f,g){for(var y=this,m=[],v=this._opts.useDirtyRect,t=0;t<this._zlevelList.length;t++){var e=this._zlevelList[t],e=this._layers[e];e.__builtin__&&e!==this._hoverlayer&&(e.__dirty||g)&&m.push(e)}for(var _=!0,x=!1,b=this,n=0;n<m.length;n++)!function(t){var i=m[t],o=i.ctx,e=v&&i.createRepaintRects(d,f,b._width,b._height);o.save();function n(t){var e={inHover:!1,allClipped:!1,prevEl:null,viewWidth:y._width,viewHeight:y._height};for(r=s;r<i.__endIndex;r++){var n=d[r];if(n.__inHover&&(x=!0),y._doPaintEl(n,i,v,t,e,r===i.__endIndex-1),l&&15<Date.now()-u)break}e.prevElClipPaths&&o.restore()}var r,a,s=g?i.__startIndex:i.__drawIndex,l=!g&&i.incremental&&Date.now,u=l&&Date.now(),t=i.zlevel===b._zlevelList[0]?b._backgroundColor:null;i.__startIndex!==i.__endIndex&&(s!==i.__startIndex||(a=d[s]).incremental&&a.notClear&&!g)||i.clear(!1,t,e),-1===s&&(console.error("For some unknown reason. drawIndex is -1"),s=i.__startIndex);if(e)if(0===e.length)r=i.__endIndex;else for(var h=b.dpr,c=0;c<e.length;++c){var p=e[c];o.save(),o.beginPath(),o.rect(p.x*h,p.y*h,p.width*h,p.height*h),o.clip(),n(p),o.restore()}else o.save(),n(),o.restore();i.__drawIndex=r,i.__drawIndex<i.__endIndex&&(_=!1)}(n);return w.wxa&&N(this._layers,function(t){t&&t.ctx&&t.ctx.draw&&t.ctx.draw()}),{finished:_,needsRefreshHover:x}},l.prototype._doPaintEl=function(t,e,n,i,o,r){e=e.ctx;n?(n=t.getPaintRect(),(!i||n&&n.intersect(i))&&(Mm(e,t,o,r),t.setPrevPaintRect(n))):Mm(e,t,o,r)},l.prototype.getLayer=function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=px);var n=this._layers[t];return n||((n=new hx("zr_"+t,this,this.dpr)).zlevel=t,n.__builtin__=!0,this._layerConfig[t]?p(n,this._layerConfig[t],!0):this._layerConfig[t-.01]&&p(n,this._layerConfig[t-.01],!0),e&&(n.virtual=e),this.insertLayer(t,n),n.initContext()),n},l.prototype.insertLayer=function(t,e){var n,i=this._layers,o=this._zlevelList,r=o.length,a=this._domRoot,s=null,l=-1;if(i[t])tt("ZLevel "+t+" has been used already");else if((n=e)&&(n.__builtin__||"function"==typeof n.resize&&"function"==typeof n.refresh)){if(0<r&&t>o[0]){for(l=0;l<r-1&&!(o[l]<t&&o[l+1]>t);l++);s=i[o[l]]}o.splice(l+1,0,t),(i[t]=e).virtual||(s?(n=s.dom).nextSibling?a.insertBefore(e.dom,n.nextSibling):a.appendChild(e.dom):a.firstChild?a.insertBefore(e.dom,a.firstChild):a.appendChild(e.dom)),e.__painter=this}else tt("Layer of zlevel "+t+" is not valid")},l.prototype.eachLayer=function(t,e){for(var n=this._zlevelList,i=0;i<n.length;i++){var o=n[i];t.call(e,this._layers[o],o)}},l.prototype.eachBuiltinLayer=function(t,e){for(var n=this._zlevelList,i=0;i<n.length;i++){var o=n[i],r=this._layers[o];r.__builtin__&&t.call(e,r,o)}},l.prototype.eachOtherLayer=function(t,e){for(var n=this._zlevelList,i=0;i<n.length;i++){var o=n[i],r=this._layers[o];r.__builtin__||t.call(e,r,o)}},l.prototype.getLayers=function(){return this._layers},l.prototype._updateLayerStatus=function(t){function e(t){o&&(o.__endIndex!==t&&(o.__dirty=!0),o.__endIndex=t)}if(this.eachBuiltinLayer(function(t,e){t.__dirty=t.__used=!1}),this._singleCanvas)for(var n=1;n<t.length;n++)if((s=t[n]).zlevel!==t[n-1].zlevel||s.incremental){this._needsManuallyCompositing=!0;break}for(var i,o=null,r=0,a=0;a<t.length;a++){var s,l=(s=t[a]).zlevel,u=void 0;i!==l&&(i=l,r=0),s.incremental?((u=this.getLayer(l+.001,this._needsManuallyCompositing)).incremental=!0,r=1):u=this.getLayer(l+(0<r?.01:0),this._needsManuallyCompositing),u.__builtin__||tt("ZLevel "+l+" has been used by unkown layer "+u.id),u!==o&&(u.__used=!0,u.__startIndex!==a&&(u.__dirty=!0),u.__startIndex=a,u.incremental?u.__drawIndex=-1:u.__drawIndex=a,e(a),o=u),s.__dirty&bi.REDARAW_BIT&&!s.__inHover&&(u.__dirty=!0,u.incremental)&&u.__drawIndex<0&&(u.__drawIndex=a)}e(a),this.eachBuiltinLayer(function(t,e){!t.__used&&0<t.getElementCount()&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)})},l.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},l.prototype._clearLayer=function(t){t.clear()},l.prototype.setBackgroundColor=function(t){this._backgroundColor=t,N(this._layers,function(t){t.setUnpainted()})},l.prototype.configLayer=function(t,e){if(e){var n=this._layerConfig;n[t]?p(n[t],e,!0):n[t]=e;for(var i=0;i<this._zlevelList.length;i++){var o=this._zlevelList[i];o!==t&&o!==t+.01||p(this._layers[o],n[t],!0)}}},l.prototype.delLayer=function(t){var e=this._layers,n=this._zlevelList,i=e[t];i&&(i.dom.parentNode.removeChild(i.dom),delete e[t],n.splice(A(n,t),1))},l.prototype.resize=function(t,e){if(this._domRoot.style){var n=this._domRoot,i=(n.style.display="none",this._opts);if(null!=t&&(i.width=t),null!=e&&(i.height=e),t=this._getSize(0),e=this._getSize(1),n.style.display="",this._width!==t||e!==this._height){for(var o in n.style.width=t+"px",n.style.height=e+"px",this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(t,e);this.refresh(!0)}this._width=t,this._height=e}else{if(null==t||null==e)return;this._width=t,this._height=e,this.getLayer(px).resize(t,e)}return this},l.prototype.clearLayer=function(t){t=this._layers[t];t&&t.clear()},l.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},l.prototype.getRenderedCanvas=function(t){if(this._singleCanvas&&!this._compositeManually)return this._layers[px].dom;var e=new hx("image",this,(t=t||{}).pixelRatio||this.dpr),n=(e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor),e.ctx);if(t.pixelRatio<=this.dpr){this.refresh();var i=e.dom.width,o=e.dom.height;this.eachLayer(function(t){t.__builtin__?n.drawImage(t.dom,0,0,i,o):t.renderToCanvas&&(n.save(),t.renderToCanvas(n),n.restore())})}else for(var r={inHover:!1,viewWidth:this._width,viewHeight:this._height},a=this.storage.getDisplayList(!0),s=0,l=a.length;s<l;s++){var u=a[s];Mm(n,u,r,s===l-1)}return e.dom},l.prototype.getWidth=function(){return this._width},l.prototype.getHeight=function(){return this._height},l.prototype._getSize=function(t){var e,n=this._opts,i=["width","height"][t],o=["clientWidth","clientHeight"][t],r=["paddingLeft","paddingTop"][t],t=["paddingRight","paddingBottom"][t];return null!=n[i]&&"auto"!==n[i]?parseFloat(n[i]):(n=this.root,e=document.defaultView.getComputedStyle(n),(n[o]||dx(e[i])||dx(n.style[i]))-(dx(e[r])||0)-(dx(e[t])||0)|0)},l.prototype.pathToImage=function(t,e){e=e||this.dpr;var n=document.createElement("canvas"),i=n.getContext("2d"),o=t.getBoundingRect(),r=t.style,a=r.shadowBlur*e,s=r.shadowOffsetX*e,l=r.shadowOffsetY*e,r=t.hasStroke()?r.lineWidth:0,u=Math.max(r/2,a-s),s=Math.max(r/2,s+a),h=Math.max(r/2,a-l),r=Math.max(r/2,l+a),l=o.width+u+s,a=o.height+h+r,s=(n.width=l*e,n.height=a*e,i.scale(e,e),i.clearRect(0,0,l,a),i.dpr=e,{x:t.x,y:t.y,scaleX:t.scaleX,scaleY:t.scaleY,rotation:t.rotation,originX:t.originX,originY:t.originY}),r=(t.x=u-o.x,t.y=h-o.y,t.rotation=0,t.scaleX=1,t.scaleY=1,t.updateTransform(),t&&Mm(i,t,{inHover:!1,viewWidth:this._width,viewHeight:this._height},!0),new ls({style:{x:0,y:0,image:n}}));return I(t,s),r};var fx=l;function l(t,e,n,i){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var o,r,a=!t.nodeName||"CANVAS"===t.nodeName.toUpperCase(),s=(this._opts=n=I({},n||{}),this.dpr=n.devicePixelRatio||di,this._singleCanvas=a,(this.root=t).style),s=(s&&(s.webkitTapHighlightColor="transparent",s.webkitUserSelect="none",s.userSelect="none",s["-webkit-touch-callout"]="none",t.innerHTML=""),this.storage=e,this._zlevelList),e=(this._prevDisplayList=[],this._layers);a?(o=(a=t).width,r=a.height,null!=n.width&&(o=n.width),null!=n.height&&(r=n.height),this.dpr=n.devicePixelRatio||1,a.width=o*this.dpr,a.height=r*this.dpr,this._width=o,this._height=r,(n=new hx(a,this,this.dpr)).__builtin__=!0,n.initContext(),(e[px]=n).zlevel=px,s.push(px),this._domRoot=t):(this._width=this._getSize(0),this._height=this._getSize(1),e=this._domRoot=(o=this._width,r=this._height,(a=document.createElement("div")).style.cssText=["position:relative","width:"+o+"px","height:"+r+"px","padding:0","margin:0","border-width:0"].join(";")+";",a),t.appendChild(e))}u(mx,gx=g),mx.prototype.init=function(t,e,n){gx.prototype.init.call(this,t,e,n),this._sourceManager=new Hf(this),Wf(this)},mx.prototype.mergeOption=function(t,e){gx.prototype.mergeOption.call(this,t,e),Wf(this)},mx.prototype.optionUpdated=function(){this._sourceManager.dirty()},mx.prototype.getSourceManager=function(){return this._sourceManager},mx.type="dataset",mx.defaultOption={seriesLayoutBy:zp};var gx,yx=mx;function mx(){var t=null!==gx&&gx.apply(this,arguments)||this;return t.type="dataset",t}u(xx,vx=_g),xx.type="dataset";var vx,_x=xx;function xx(){var t=null!==vx&&vx.apply(this,arguments)||this;return t.type="dataset",t}function bx(t){t.registerComponentModel(yx),t.registerComponentView(_x)}j1([function(t){t.registerPainter("canvas",fx)},bx]);var Sx={average:function(t){for(var e=0,n=0,i=0;i<t.length;i++)isNaN(t[i])||(e+=t[i],n++);return 0===n?NaN:e/n},sum:function(t){for(var e=0,n=0;n<t.length;n++)e+=t[n]||0;return e},max:function(t){for(var e=-1/0,n=0;n<t.length;n++)t[n]>e&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,n=0;n<t.length;n++)t[n]<e&&(e=t[n]);return isFinite(e)?e:NaN},nearest:function(t){return t[0]}},Mx=function(t){return Math.round(t.length/2)};function Tx(t){return{seriesType:t,reset:function(t,e,n){var i,o=t.getData(),r=t.get("sampling"),a=t.coordinateSystem,s=o.count();10<s&&"cartesian2d"===a.type&&r&&(i=a.getBaseAxis(),a=a.getOtherAxis(i),i=i.getExtent(),n=n.getDevicePixelRatio(),i=Math.abs(i[1]-i[0])*(n||1),1<(n=Math.round(s/i)))&&("lttb"===r&&t.setData(o.lttbDownSample(o.mapDimension(a.dim),1/n)),s=void 0,"string"==typeof r?s=Sx[r]:"function"==typeof r&&(s=r),s)&&t.setData(o.downSample(o.mapDimension(a.dim),1/n,s,Mx))}}}u(Ix,Cx=hg),Ix.prototype.getInitialData=function(t,e){return R_(this.getSource(),this,{useEncodeDefaulter:!0})},Ix.prototype.getMarkerPosition=function(t){var e,n,i=this.coordinateSystem;return i?(t=i.dataToPoint(i.clampData(t)),e=(n=this.getData()).getLayout("offset"),n=n.getLayout("size"),t[i.getBaseAxis().isHorizontal()?0:1]+=e+n/2,t):[NaN,NaN]},Ix.type="series.__base_bar__",Ix.defaultOption={zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"};var Cx,cr=Ix;function Ix(){var t=null!==Cx&&Cx.apply(this,arguments)||this;return t.type=Ix.type,t}hg.registerClass(cr);u(kx,Ax=cr),kx.prototype.getInitialData=function(){return R_(this.getSource(),this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},kx.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},kx.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return t=t<e?e:t},kx.prototype.brushSelector=function(t,e,n){return n.rect(e.getItemLayout(t))},kx.type="series.bar",kx.dependencies=["grid","polar"],kx.defaultOption=vc(cr.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1});var Ax,Dx=kx;function kx(){var t=null!==Ax&&Ax.apply(this,arguments)||this;return t.type=kx.type,t}function Lx(t,e,n,i,o){var r=t.getArea(),a=r.x,s=r.y,l=r.width,r=r.height,u=n.get(["lineStyle","width"])||2,h=(a-=u/2,s-=u/2,l+=u,r+=u,a=Math.floor(a),l=Math.round(l),new ms({shape:{x:a,y:s,width:l,height:r}}));return e&&(e=(u=t.getBaseAxis()).isHorizontal(),t=u.inverse,e?(t&&(h.shape.x+=l),h.shape.width=0):(t||(h.shape.y+=r),h.shape.height=0),Dh(h,{shape:{width:l,height:r,x:a,y:s}},n,null,i,"function"==typeof o?function(t){o(t,h)}:null)),h}function Px(t,e,n){var i=t.getArea(),o=_o(i.r0,1),r=_o(i.r,1),a=new yu({shape:{cx:_o(t.cx,1),cy:_o(t.cy,1),r0:o,r:r,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}});return e&&("angle"===t.getBaseAxis().dim?a.shape.endAngle=i.startAngle:a.shape.r=o,Dh(a,{shape:{endAngle:i.endAngle,r:r}},n)),a}function Ox(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0}u(Ex,Rx=q),Ex.prototype.getDefaultShape=function(){return new Ox},Ex.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,o=Math.max(e.r0||0,0),r=Math.max(e.r,0),a=.5*(r-o),s=o+a,l=e.startAngle,u=e.endAngle,e=e.clockwise,h=Math.cos(l),c=Math.sin(l),p=Math.cos(u),d=Math.sin(u);(e?u-l<2*Math.PI:l-u<2*Math.PI)&&(t.moveTo(h*o+n,c*o+i),t.arc(h*s+n,c*s+i,a,-Math.PI+l,l,!e)),t.arc(n,i,r,l,u,!e),t.moveTo(p*r+n,d*r+i),t.arc(p*s+n,d*s+i,a,u-2*Math.PI,u-Math.PI,!e),0!==o&&(t.arc(n,i,o,u,l,e),t.moveTo(h*o+n,d*o+i)),t.closePath()};var Rx,Nx=Ex;function Ex(t){t=Rx.call(this,t)||this;return t.type="sausage",t}function Bx(t,e){return t.type===e}function zx(t,e){var n,i=t.mapDimensionsAll("defaultedLabel"),o=i.length;if(1===o)return null!=(n=af(t,e,i[0]))?n+"":null;if(o){for(var r=[],a=0;a<i.length;a++)r.push(af(t,e,i[a]));return r.join(" ")}}function Vx(t,e){var n=t.mapDimensionsAll("defaultedLabel");if(!F(e))return e+"";for(var i=[],o=0;o<n.length;o++){var r=t.getDimensionInfo(n[o]);r&&i.push(e[r.index])}return i.join(" ")}var Fx=[0,0],Hx=Math.max,Gx=Math.min;u(Zx,Wx=Mg),Zx.prototype.render=function(t,e,n,i){this._model=t,this._removeOnRenderedListener(n),this._updateDrawMode(t);var o=t.get("coordinateSystem");"cartesian2d"!==o&&"polar"!==o||(this._isLargeDraw?this._renderLarge(t,e,n):this._renderNormal(t,e,n,i))},Zx.prototype.incrementalPrepareRender=function(t){this._clear(),this._updateDrawMode(t),this._updateLargeClip(t)},Zx.prototype.incrementalRender=function(t,e){this._incrementalRenderLarge(t,e)},Zx.prototype._updateDrawMode=function(t){t=t.pipelineContext.large;null!=this._isLargeDraw&&t===this._isLargeDraw||(this._isLargeDraw=t,this._clear())},Zx.prototype._renderNormal=function(a,t,e,n){var s,i,o,l=this.group,u=a.getData(),h=this._data,c=a.coordinateSystem,p=c.getBaseAxis(),d=("cartesian2d"===c.type?s=p.isHorizontal():"polar"===c.type&&(s="angle"===p.dim),a.isAnimationEnabled()?a:null),f=function(t,e){var t=t.get("realtimeSort",!0),n=e.getBaseAxis();if(t&&"category"===n.type&&"cartesian2d"===e.type)return{baseAxis:n,otherAxis:e.getOtherAxis(n)}}(a,c),g=(f&&this._enableRealtimeSort(f,u,e),a.get("clip",!0)||f),y=(e=u,o=(i=c).getArea&&i.getArea(),!Bx(i,"cartesian2d")||"category"===(i=i.getBaseAxis()).type&&i.onBand||(e=e.getLayout("bandWidth"),i.isHorizontal()?(o.x-=e,o.width+=2*e):(o.y-=e,o.height+=2*e)),o),m=(l.removeClipPath(),a.get("roundCap",!0)),v=a.get("showBackground",!0),_=a.getModel("backgroundStyle"),x=_.get("borderRadius")||0,b=[],w=this._backgroundEls,S=n&&n.isInitSort,M=n&&"changeAxisOrder"===n.type;function T(t){var e=qx[c.type](u,t),n=(n=s,new("polar"===c.type?yu:ms)({shape:ib(n,e,c),silent:!0,z2:0}));return n.useStyle(_.getItemStyle()),"cartesian2d"===c.type&&n.setShape("r",x),b[t]=n}u.diff(h).add(function(t){var e,n,i=u.getItemModel(t),o=qx[c.type](u,t,i);v&&T(t),u.hasValue(t)&&(e=!1,g&&(e=Yx[c.type](y,o)),Kx(n=Xx[c.type](a,u,t,o,s,d,p.model,!1,m),u,t,i,o,a,s,"polar"===c.type),S?n.attr({shape:o}):f?jx(f,d,n,o,t,s,!1,!1):Dh(n,{shape:o},a,t),u.setItemGraphicEl(t,n),l.add(n),n.ignore=e)}).update(function(t,e){var n,i=u.getItemModel(t),o=qx[c.type](u,t,i),r=(v&&(r=void 0,0===w.length?r=T(e):((r=w[e]).useStyle(_.getItemStyle()),"cartesian2d"===c.type&&r.setShape("r",x),b[t]=r),n=qx[c.type](u,t),Ah(r,{shape:ib(s,n,c)},d,t)),h.getItemGraphicEl(e));u.hasValue(t)?(n=!1,g&&(n=Yx[c.type](y,o))&&l.remove(r),r=r||Xx[c.type](a,u,t,o,s,d,p.model,!!r,m),M||Kx(r,u,t,i,o,a,s,"polar"===c.type),S?r.attr({shape:o}):f?jx(f,d,r,o,t,s,!0,M):Ah(r,{shape:o},a,t,null),u.setItemGraphicEl(t,r),r.ignore=n,l.add(r)):l.remove(r)}).remove(function(t){var e=h.getItemGraphicEl(t);e&&Ph(e,a,t)}).execute();var r=this._backgroundGroup||(this._backgroundGroup=new O);r.removeAll();for(var C=0;C<b.length;++C)r.add(b[C]);l.add(r),this._backgroundEls=b,this._data=u},Zx.prototype._renderLarge=function(t,e,n){this._clear(),eb(t,this.group),this._updateLargeClip(t)},Zx.prototype._incrementalRenderLarge=function(t,e){this._removeBackground(),eb(e,this.group,!0)},Zx.prototype._updateLargeClip=function(t){var e,n,i,o=t.get("clip",!0)&&(o=t.coordinateSystem,e=!1,t=t,o)?"polar"===o.type?Px(o,e,t):"cartesian2d"===o.type?Lx(o,e,t,n,i):null:null;o?this.group.setClipPath(o):this.group.removeClipPath()},Zx.prototype._enableRealtimeSort=function(t,e,n){var i,o,r=this;e.count()&&(i=t.baseAxis,this._isFirstFrame?(this._dispatchInitSort(e,t,n),this._isFirstFrame=!1):(o=function(t){var t=e.getItemGraphicEl(t);return t&&(t=t.shape,i.isHorizontal()?Math.abs(t.height):Math.abs(t.width))||0},this._onRendered=function(){r._updateSortWithinSameData(e,o,i,n)},n.getZr().on("rendered",this._onRendered)))},Zx.prototype._dataSort=function(t,e,i){var o=[];return t.each(t.mapDimension(e.dim),function(t,e){var n=i(e);o.push({dataIndex:e,mappedValue:null==n?NaN:n,ordinalNumber:t})}),o.sort(function(t,e){return e.mappedValue-t.mappedValue}),{ordinalNumbers:j(o,function(t){return t.ordinalNumber})}},Zx.prototype._isOrderChangedWithinSameData=function(t,e,n){for(var i=n.scale,o=t.mapDimension(n.dim),r=Number.MAX_VALUE,a=0,s=i.getOrdinalMeta().categories.length;a<s;++a){var l=t.rawIndexOf(o,i.getRawOrdinalNumber(a)),l=l<0?Number.MIN_VALUE:e(t.indexOfRawIndex(l));if(r<l)return!0;r=l}return!1},Zx.prototype._isOrderDifferentInView=function(t,e){for(var n=e.scale,e=n.getExtent(),i=Math.max(0,e[0]),o=Math.min(e[1],n.getOrdinalMeta().categories.length-1);i<=o;++i)if(t.ordinalNumbers[i]!==n.getRawOrdinalNumber(i))return!0},Zx.prototype._updateSortWithinSameData=function(t,e,n,i){this._isOrderChangedWithinSameData(t,e,n)&&(t=this._dataSort(t,n,e),this._isOrderDifferentInView(t,n))&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:t}))},Zx.prototype._dispatchInitSort=function(e,n,t){var i=n.baseAxis,o=this._dataSort(e,i,function(t){return e.get(e.mapDimension(n.otherAxis.dim),t)});t.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:o,animation:{duration:0}})},Zx.prototype.remove=function(t,e){this._clear(this._model),this._removeOnRenderedListener(e)},Zx.prototype.dispose=function(t,e){this._removeOnRenderedListener(e)},Zx.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},Zx.prototype._clear=function(e){var t=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(t){Ph(t,e,z(t).dataIndex)})):t.removeAll(),this._data=null,this._isFirstFrame=!0},Zx.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},Zx.type="bar";var Wx,Ux=Zx,Yx={cartesian2d:function(t,e){var n=e.width<0?-1:1,i=e.height<0?-1:1,o=(n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height),t.x+t.width),r=t.y+t.height,a=Hx(e.x,t.x),s=Gx(e.x+e.width,o),t=Hx(e.y,t.y),l=Gx(e.y+e.height,r),u=s<a,h=l<t;return e.x=u&&o<a?s:a,e.y=h&&r<t?l:t,e.width=u?0:s-a,e.height=h?0:l-t,n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height),u||h},polar:function(t,e){var n,i=e.r0<=e.r?1:-1,o=(i<0&&(n=e.r,e.r=e.r0,e.r0=n),Gx(e.r,t.r)),t=Hx(e.r0,t.r0),o=(e.r=o)-(e.r0=t)<0;return i<0&&(n=e.r,e.r=e.r0,e.r0=n),o}},Xx={cartesian2d:function(t,e,n,i,o,r,a,s,l){i=new ms({shape:I({},i),z2:1});return i.__dataIndex=n,i.name="item",r&&(i.shape[o?"height":"width"]=0),i},polar:function(t,e,n,i,o,r,a,s,l){var u,h=i.startAngle<i.endAngle,l=new(!o&&l?Nx:yu)({shape:V({clockwise:h},i),z2:1});return l.name="item",r&&(h={},l.shape[u=o?"r":"endAngle"]=o?0:i.startAngle,h[u]=i[u],(s?Ah:Dh)(l,{shape:h},r)),l}};function Zx(){var t=Wx.call(this)||this;return t.type=Zx.type,t._isFirstFrame=!0,t}function jx(t,e,n,i,o,r,a,s){var l,r=r?(l={x:i.x,width:i.width},{y:i.y,height:i.height}):(l={y:i.y,height:i.height},{x:i.x,width:i.width});s||(a?Ah:Dh)(n,{shape:r},e,o,null),(a?Ah:Dh)(n,{shape:l},e?t.baseAxis.model:null,o)}var qx={cartesian2d:function(t,e,n){var t=t.getItemLayout(e),i=n&&(e=t,i=(n=n).get(["itemStyle","borderColor"]))&&"none"!==i?(i=n.get(["itemStyle","borderWidth"])||0,n=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),e=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height),Math.min(i,n,e)):0,n=0<t.width?1:-1,e=0<t.height?1:-1;return{x:t.x+n*i/2,y:t.y+e*i/2,width:t.width-n*i,height:t.height-e*i}},polar:function(t,e,n){t=t.getItemLayout(e);return{cx:t.cx,cy:t.cy,r0:t.r0,r:t.r,startAngle:t.startAngle,endAngle:t.endAngle}}};function Kx(t,e,n,i,o,r,a,s){var l=e.getItemVisual(n,"style"),u=(s||t.setShape("r",i.get(["itemStyle","borderRadius"])||0),t.useStyle(l),i.getShallow("cursor")),r=(u&&t.attr("cursor",u),s||(u=a?0<o.height?"bottom":"top":0<o.width?"left":"right",jh(t,s=qh(i),{labelFetcher:r,labelDataIndex:n,defaultText:zx(r.getData(),n),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:u}),a=t.getTextContent(),l=a,u=s,a=r.getRawValue(n),s=function(t){return Vx(e,t)},l&&((l=nc(l)).prevValue=l.value,l.value=a,a=u.normal,l.valueAnimation=a.get("valueAnimation"),l.valueAnimation)&&(l.precision=a.get("precision"),l.defaultInterpolatedText=s,l.statesModels=u)),i.getModel(["emphasis"]));xl(t,r.get("focus"),r.get("blurScope")),Sl(t,i),null!=(n=o).startAngle&&null!=n.endAngle&&n.startAngle===n.endAngle&&(t.style.fill="none",t.style.stroke="none",N(t.states,function(t){t.style&&(t.style.fill=t.style.stroke="none")}))}function $x(){}u(tb,Jx=q),tb.prototype.getDefaultShape=function(){return new $x},tb.prototype.buildPath=function(t,e){for(var n=e.points,i=this.__startPoint,o=this.__baseDimIdx,r=0;r<n.length;r+=2)i[o]=n[r+o],t.moveTo(i[0],i[1]),t.lineTo(n[r],n[r+1])};var Jx,Qx=tb;function tb(t){t=Jx.call(this,t)||this;return t.type="largeBar",t}function eb(t,e,n){var i,o,r,a,s=t.getData(),l=[],u=s.getLayout("valueAxisHorizontal")?1:0,h=(l[1-u]=s.getLayout("valueAxisStart"),s.getLayout("largeDataIndices")),c=s.getLayout("barWidth"),p=t.getModel("backgroundStyle"),p=(t.get("showBackground",!0)&&(i=s.getLayout("largeBackgroundPoints"),(r=[])[1-u]=s.getLayout("backgroundStart"),(i=new Qx({shape:{points:i},incremental:!!n,silent:!0,z2:0})).__startPoint=r,i.__baseDimIdx=u,i.__largeDataIndices=h,i.__barWidth=c,r=i,a=s,o=(p=p).get("borderColor")||p.get("color"),p=p.getItemStyle(),r.useStyle(p),r.style.fill=null,r.style.stroke=o,r.style.lineWidth=a.getLayout("barWidth"),e.add(i)),new Qx({shape:{points:s.getLayout("largePoints")},incremental:!!n}));p.__startPoint=l,p.__baseDimIdx=u,p.__largeDataIndices=h,p.__barWidth=c,e.add(p),o=p,a=(r=s).getVisual("style"),o.useStyle(I({},a)),o.style.fill=null,o.style.stroke=a.fill,o.style.lineWidth=r.getLayout("barWidth"),z(p).seriesIndex=t.seriesIndex,t.get("silent")||(p.on("mousedown",nb),p.on("mousemove",nb))}var nb=Rg(function(t){t=function(t,e,n){var i=t.__baseDimIdx,o=1-i,r=t.shape.points,a=t.__largeDataIndices,s=Math.abs(t.__barWidth/2),l=t.__startPoint[o];Fx[0]=e,Fx[1]=n;for(var t=Fx[i],u=Fx[1-i],h=t-s,c=t+s,p=0,d=r.length/2;p<d;p++){var f=2*p,g=r[f+i],f=r[f+o];if(h<=g&&g<=c&&(l<=f?l<=u&&u<=f:f<=u&&u<=l))return a[p]}return-1}(this,t.offsetX,t.offsetY);z(this).dataIndex=0<=t?t:null},30,!1);function ib(t,e,n){var i,o;return Bx(n,"cartesian2d")?(o=e,i=n.getArea(),{x:(t?o:i).x,y:(t?i:o).y,width:(t?o:i).width,height:(t?i:o).height}):(o=e,{cx:(i=n.getArea()).cx,cy:i.cy,r0:(t?i:o).r0,r:(t?i:o).r,startAngle:t?o.startAngle:0,endAngle:t?o.endAngle:2*Math.PI})}j1(function(t){t.registerChartView(Ux),t.registerSeriesModel(Dx),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,M(s1,"bar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,l1),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,Tx("bar")),t.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,t){var n=e.componentType||"series";t.eachComponent({mainType:n,query:e},function(t){e.sortInfo&&t.axis.setCategorySortInfo(e.sortInfo)})})});u(ab,ob=hg),ab.prototype.getInitialData=function(t){return R_(this.getSource(),this,{useEncodeDefaulter:!0})},ab.prototype.getLegendIcon=function(t){var e=new O,n=nm("line",0,t.itemHeight/2,t.itemWidth,0,t.lineStyle.stroke,!1),n=(e.add(n),n.setStyle(t.lineStyle),this.getData().getVisual("symbol")),n="none"===n?"circle":n,i=.8*t.itemHeight,i=nm(n,(t.itemWidth-i)/2,(t.itemHeight-i)/2,i,i,t.itemStyle.fill,t.symbolKeepAspect);return e.add(i),i.setStyle(t.itemStyle),-1<n.indexOf("empty")&&(i.style.stroke=i.style.fill,i.style.fill="#fff",i.style.lineWidth=2),e},ab.type="series.line",ab.dependencies=["grid","polar"],ab.defaultOption={zlevel:0,z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0,lineStyle:{width:"bolder"}},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0};var ob,rb=ab;function ab(){var t=null!==ob&&ob.apply(this,arguments)||this;return t.type=ab.type,t.hasSymbolVisual=!0,t}u(ub,sb=O),ub.prototype._createSymbol=function(t,e,n,i,o){this.removeAll();o=nm(t,-1,-1,2,2,null,o);o.attr({z2:100,culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),o.drift=hb,this._symbolType=t,this.add(o)},ub.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},ub.prototype.getSymbolPath=function(){return this.childAt(0)},ub.prototype.highlight=function(){ll(this.childAt(0))},ub.prototype.downplay=function(){ul(this.childAt(0))},ub.prototype.setZ=function(t,e){var n=this.childAt(0);n.zlevel=t,n.z=e},ub.prototype.setDraggable=function(t){var e=this.childAt(0);e.draggable=t,e.cursor=t?"move":e.cursor},ub.prototype.updateData=function(t,e,n,i){this.silent=!1;var o,r,a,s=t.getItemVisual(e,"symbol")||"circle",l=t.hostModel,u=ub.getSymbolSize(t,e),h=s!==this._symbolType,c=i&&i.disableAnimation;h?(o=t.getItemVisual(e,"symbolKeepAspect"),this._createSymbol(s,t,e,u,o)):((a=this.childAt(0)).silent=!1,r={scaleX:u[0]/2,scaleY:u[1]/2},c?a.attr(r):Ah(a,r,l,e)),this._updateCommon(t,e,u,n,i),h&&(a=this.childAt(0),c||(r={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:a.style.opacity}},a.scaleX=a.scaleY=0,a.style.opacity=0,Dh(a,r,l,e))),c&&this.childAt(0).stopAnimation("remove"),this._seriesModel=l},ub.prototype._updateCommon=function(e,t,n,i,o){var r,a,s,l,u,h,c,p=this.childAt(0),d=e.hostModel,f=(i&&(r=i.emphasisItemStyle,s=i.blurItemStyle,a=i.selectItemStyle,l=i.focus,u=i.blurScope,h=i.labelStatesModels,c=i.hoverScale,g=i.cursorStyle),i&&!e.hasItemOption||(r=(f=(i=i&&i.itemModel?i.itemModel:e.getItemModel(t)).getModel("emphasis")).getModel("itemStyle").getItemStyle(),a=i.getModel(["select","itemStyle"]).getItemStyle(),s=i.getModel(["blur","itemStyle"]).getItemStyle(),l=f.get("focus"),u=f.get("blurScope"),h=qh(i),c=f.getShallow("scale"),g=i.getShallow("cursor")),e.getItemVisual(t,"symbolRotate")),i=(p.attr("rotation",(f||0)*Math.PI/180||0),e.getItemVisual(t,"symbolOffset")||0),f=(i&&(F(i)||(i=[i,i]),p.x=B(i[0],n[0]),p.y=B(P(i[1],i[0])||0,n[1])),g&&p.attr("cursor",g),e.getItemVisual(t,"style")),i=f.fill,g=(p instanceof ls?(g=p.style,p.useStyle(I({image:g.image,x:g.x,y:g.y,width:g.width,height:g.height},f))):(p.__isEmptyBrush?p.useStyle(I({},f)):p.useStyle(f),p.style.decal=null,p.setColor(i,o&&o.symbolInnerColor),p.style.strokeNoScale=!0),e.getItemVisual(t,"liftZ")),y=this._z2,m=(null!=g?null==y&&(this._z2=p.z2,p.z2+=g):null!=y&&(p.z2=y,this._z2=null),o&&o.useNameLabel),g=(jh(p,h,{labelFetcher:d,labelDataIndex:t,defaultText:function(t){return m?e.getName(t):zx(e,t)},inheritColor:i,defaultOpacity:f.opacity}),this._sizeX=n[0]/2,this._sizeY=n[1]/2,p.ensureState("emphasis"));g.style=r,p.ensureState("select").style=a,p.ensureState("blur").style=s,c&&(y=Math.max(1.1,3/this._sizeY),g.scaleX=this._sizeX*y,g.scaleY=this._sizeY*y),this.setSymbolScale(1),xl(this,l,u)},ub.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},ub.prototype.fadeOut=function(t,e){var n=this.childAt(0),i=this._seriesModel,o=z(this).dataIndex,r=e&&e.animation;this.silent=n.silent=!0,e&&e.fadeLabel?(e=n.getTextContent())&&kh(e,{style:{opacity:0}},i,{dataIndex:o,removeOpt:r,cb:function(){n.removeTextContent()}}):n.removeTextContent(),kh(n,{style:{opacity:0},scaleX:0,scaleY:0},i,{dataIndex:o,cb:t,removeOpt:r})},ub.getSymbolSize=function(t,e){t=t.getItemVisual(e,"symbolSize");return F(t)?t.slice():[+t,+t]};var sb,lb=ub;function ub(t,e,n,i){var o=sb.call(this)||this;return o.updateData(t,e,n,i),o}function hb(t,e){this.parent.drift(t,e)}function cb(t,e,n,i){return e&&!isNaN(e[0])&&!isNaN(e[1])&&(!i.isIgnore||!i.isIgnore(n))&&(!i.clipShape||i.clipShape.contain(e[0],e[1]))&&"none"!==t.getItemVisual(n,"symbol")}function pb(t){return(t=null==t||k(t)?t:{isIgnore:t})||{}}function db(t){var t=t.hostModel,e=t.getModel("emphasis");return{emphasisItemStyle:e.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:e.get("focus"),blurScope:e.get("blurScope"),hoverScale:e.get("scale"),labelStatesModels:qh(t),cursorStyle:t.get("cursor")}}gb.prototype.updateData=function(o,r){r=pb(r);var a=this.group,s=o.hostModel,l=this._data,u=this._SymbolCtor,h=r.disableAnimation,c=db(o),p={disableAnimation:h},d=r.getSymbolPoint||function(t){return o.getItemLayout(t)};l||a.removeAll(),o.diff(l).add(function(t){var e,n=d(t);cb(o,n,t,r)&&((e=new u(o,t,c,p)).setPosition(n),o.setItemGraphicEl(t,e),a.add(e))}).update(function(t,e){var n,e=l.getItemGraphicEl(e),i=d(t);cb(o,i,t,r)?(e?(e.updateData(o,t,c,p),n={x:i[0],y:i[1]},h?e.attr(n):Ah(e,n,s)):(e=new u(o,t)).setPosition(i),a.add(e),o.setItemGraphicEl(t,e)):a.remove(e)}).remove(function(t){var e=l.getItemGraphicEl(t);e&&e.fadeOut(function(){a.remove(e)})}).execute(),this._getSymbolPoint=d,this._data=o},gb.prototype.isPersistent=function(){return!0},gb.prototype.updateLayout=function(){var n=this,t=this._data;t&&t.eachItemGraphicEl(function(t,e){e=n._getSymbolPoint(e);t.setPosition(e),t.markRedraw()})},gb.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=db(t),this._data=null,this.group.removeAll()},gb.prototype.incrementalUpdate=function(t,e,n){function i(t){t.isGroup||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}n=pb(n);for(var o=t.start;o<t.end;o++){var r,a=e.getItemLayout(o);cb(e,a,o,n)&&((r=new this._SymbolCtor(e,o,this._seriesScope)).traverse(i),r.setPosition(a),this.group.add(r),e.setItemGraphicEl(o,r))}},gb.prototype.remove=function(t){var e=this.group,n=this._data;n&&t?n.eachItemGraphicEl(function(t){t.fadeOut(function(){e.remove(t)})}):e.removeAll()};var fb=gb;function gb(t){this.group=new O,this._SymbolCtor=t||lb}function yb(t,e,n){var i=t.getBaseAxis(),o=t.getOtherAxis(i),n=(n=n,a=0,r=(r=o).scale.getExtent(),"start"===n?a=r[0]:"end"===n?a=r[1]:0<r[0]?a=r[0]:r[1]<0&&(a=r[1]),a),r=i.dim,a=o.dim,i=e.mapDimension(a),o=e.mapDimension(r),s="x"===a||"radius"===a?1:0,t=j(t.dimensions,function(t){return e.mapDimension(t)}),l=!1,u=e.getCalculationInfo("stackResultDimension");return P_(e,t[0])&&(l=!0,t[0]=u),P_(e,t[1])&&(l=!0,t[1]=u),{dataDimsForPoint:t,valueStart:n,valueAxisDim:a,baseAxisDim:r,stacked:!!l,valueDim:i,baseDim:o,baseDataOffset:s,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function mb(t,e,n,i){var o=NaN,r=(t.stacked&&(o=n.get(n.getCalculationInfo("stackedOverDimension"),i)),isNaN(o)&&(o=t.valueStart),t.baseDataOffset),a=[];return a[r]=n.get(t.baseDim,i),a[1-r]=o,e.dataToPoint(a)}var vb="undefined"!=typeof Float32Array,_b=vb?Float32Array:Array;function xb(t){return F(t)?vb?new Float32Array(t):t:new _b(t)}var bb=Math.min,wb=Math.max;function Sb(t,e){return isNaN(t)||isNaN(e)}function Mb(t,e,n,i,o,r,a,s,l){for(var u,h,c,p,d,f,g=n,y=0;y<i;y++){var m=e[2*g],v=e[2*g+1];if(o<=g||g<0)break;if(Sb(m,v)){if(l){g+=r;continue}break}if(g===n)t[0<r?"moveTo":"lineTo"](m,v),c=m,p=v;else{var _=m-u,x=v-h;if(_*_+x*x<.5){g+=r;continue}if(0<a){var b=g+r,w=e[2*b],S=e[2*b+1],M=y+1;if(l)for(;Sb(w,S)&&M<i;)M++,w=e[2*(b+=r)],S=e[2*b+1];var T,C,I,A,D,k,_=0,x=0,L=void 0,P=void 0;i<=M||Sb(w,S)?(d=m,f=v):(_=w-u,x=S-h,T=m-u,C=w-m,I=v-h,A=S-v,k=D=void 0,P="x"===s?(D=Math.abs(T),k=Math.abs(C),d=m-D*a,L=m+D*a,f=v):"y"===s?(D=Math.abs(I),k=Math.abs(A),f=v-D*a,L=d=m,v+D*a):(D=Math.sqrt(T*T+I*I),d=m-_*a*(1-(T=(k=Math.sqrt(C*C+A*A))/(k+D))),f=v-x*a*(1-T),P=v+x*a*T,L=bb(L=m+_*a*T,wb(w,m)),P=bb(P,wb(S,v)),L=wb(L,bb(w,m)),f=v-(x=(P=wb(P,bb(S,v)))-v)*D/k,d=bb(d=m-(_=L-m)*D/k,wb(u,m)),f=bb(f,wb(h,v)),L=m+(_=m-(d=wb(d,bb(u,m))))*k/D,v+(x=v-(f=wb(f,bb(h,v))))*k/D)),t.bezierCurveTo(c,p,d,f,m,v),c=L,p=P}else t.lineTo(m,v)}u=m,h=v,g+=r}return y}function Tb(){this.smooth=0,this.smoothConstraint=!0}u(Ab,Cb=q),Ab.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},Ab.prototype.getDefaultShape=function(){return new Tb},Ab.prototype.buildPath=function(t,e){var n=e.points,i=0,o=n.length/2;if(e.connectNulls){for(;0<o&&Sb(n[2*o-2],n[2*o-1]);o--);for(;i<o&&Sb(n[2*i],n[2*i+1]);i++);}for(;i<o;)i+=Mb(t,n,i,o,o,1,e.smooth,e.smoothMonotone,e.connectNulls)+1},Ab.prototype.getPointOn=function(t,e){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var n,i,o=this.path.data,r=Ba.CMD,a="x"===e,s=[],l=0;l<o.length;){var u,h=void 0,c=void 0;switch(o[l++]){case r.M:n=o[l++],i=o[l++];break;case r.L:var p,h=o[l++],c=o[l++];if((u=a?(t-n)/(h-n):(t-i)/(c-i))<=1&&0<=u)return p=a?(c-i)*u+i:(h-n)*u+n,a?[t,p]:[p,t];n=h,i=c;break;case r.C:h=o[l++],c=o[l++];var d=o[l++],f=o[l++],g=o[l++],y=o[l++],m=a?Jr(n,h,d,g,t,s):Jr(i,c,f,y,t,s);if(0<m)for(var v=0;v<m;v++){var _=s[v];if(_<=1&&0<=_)return p=a?Kr(i,c,f,y,_):Kr(n,h,d,g,_),a?[t,p]:[p,t]}n=g,i=y}}};var Cb,Ib=Ab;function Ab(t){t=Cb.call(this,t)||this;return t.type="ec-polyline",t}u(Rb,kb=Tb);var Db,kb,Lb=Rb,Pb=(u(Ob,Db=q),Ob.prototype.getDefaultShape=function(){return new Lb},Ob.prototype.buildPath=function(t,e){var n=e.points,i=e.stackedOnPoints,o=0,r=n.length/2,a=e.smoothMonotone;if(e.connectNulls){for(;0<r&&Sb(n[2*r-2],n[2*r-1]);r--);for(;o<r&&Sb(n[2*o],n[2*o+1]);o++);}for(;o<r;){var s=Mb(t,n,o,r,r,1,e.smooth,a,e.connectNulls);Mb(t,i,o+s-1,s,r,-1,e.stackedOnSmooth,a,e.connectNulls),o+=s+1,t.closePath()}},Ob);function Ob(t){t=Db.call(this,t)||this;return t.type="ec-polygon",t}function Rb(){return null!==kb&&kb.apply(this,arguments)||this}function Nb(t,e){if(t.length===e.length){for(var n=0;n<t.length;n++)if(t[n]!==e[n])return;return 1}}function Eb(t){for(var e=1/0,n=1/0,i=-1/0,o=-1/0,r=0;r<t.length;){var a=t[r++],s=t[r++];isNaN(a)||(e=Math.min(a,e),i=Math.max(a,i)),isNaN(s)||(n=Math.min(s,n),o=Math.max(s,o))}return[[e,n],[i,o]]}function Bb(t,e){var t=Eb(t),n=t[0],t=t[1],e=Eb(e),i=e[0],e=e[1];return Math.max(Math.abs(n[0]-i[0]),Math.abs(n[1]-i[1]),Math.abs(t[0]-e[0]),Math.abs(t[1]-e[1]))}function zb(t){return"number"==typeof t?t:t?.5:0}function Vb(t,e,n){for(var e=e.getBaseAxis(),i="x"===e.dim||"radius"===e.dim?0:1,o=[],r=0,a=[],s=[],l=[];r<t.length-2;r+=2)switch(l[0]=t[r+2],l[1]=t[r+3],s[0]=t[r],s[1]=t[r+1],o.push(s[0],s[1]),n){case"end":a[i]=l[i],a[1-i]=s[1-i],o.push(a[0],a[1]);break;case"middle":var u=[];a[i]=u[i]=(s[i]+l[i])/2,a[1-i]=s[1-i],u[1-i]=l[1-i],o.push(a[0],a[1]),o.push(u[0],u[1]);break;default:a[i]=s[i],a[1-i]=l[1-i],o.push(a[0],a[1])}return o.push(t[r++],t[r++]),o}function Fb(t,e,n){var t=t.get("showAllSymbol"),i="auto"===t;if(!t||i){var o,r,a=n.getAxesByScale("ordinal")[0];if(a&&(!i||!function(t,e){var n=t.getExtent(),i=Math.abs(n[1]-n[0])/t.scale.count();isNaN(i)&&(i=0);for(var o=e.count(),r=Math.max(1,Math.round(o/5)),a=0;a<o;a+=r)if(1.5*lb.getSymbolSize(e,a)[t.isHorizontal()?1:0]>i)return;return 1}(a,e)))return o=e.mapDimension(a.dim),r={},N(a.getViewLabels(),function(t){t=a.scale.getRawOrdinalNumber(t.tickValue);r[t]=1}),function(t){return!r.hasOwnProperty(e.get(o,t))}}}function Hb(t){for(var e,n,i=t.length/2;0<i&&(e=t[2*i-2],n=t[2*i-1],isNaN(e)||isNaN(n));i--);return i-1}function Gb(t,e){return[t[2*e],t[2*e+1]]}function Wb(n,i,e,t){var o,r,a,s,l,u,h,c,p;return Bx(i,"cartesian2d")?(l=(o=t.getModel("endLabel")).get("show"),r=o.get("valueAnimation"),a=t.getData(),s={lastFrameIndex:0},l=l?function(t,e){n._endLabelOnDuring(t,e,a,s,r,o,i)}:null,u=i.getBaseAxis().isHorizontal(),h=Lx(i,e,t,function(){var t=n._endLabel;t&&e&&null!=s.originalX&&t.attr({x:s.originalX,y:s.originalY})},l),t.get("clip",!0)||(c=h.shape,p=Math.max(c.width,c.height),u?(c.y-=p,c.height+=2*p):(c.x-=p,c.width+=2*p)),l&&l(1,h),h):Px(i,e,t)}u(Xb,Ub=Mg),Xb.prototype.init=function(){var t=new O,e=new fb;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},Xb.prototype.render=function(t,e,n){var i=this,o=t.coordinateSystem,r=this.group,a=t.getData(),s=t.getModel("lineStyle"),l=t.getModel("areaStyle"),u=a.getLayout("points")||[],h="polar"===o.type,c=this._coordSys,p=this._symbolDraw,d=this._polyline,f=this._polygon,g=this._lineGroup,y=t.get("animation"),m=!l.isEmpty(),v=l.get("origin"),_=yb(o,a,v),_=m&&function(t,e,n){if(!n.valueDim)return[];for(var i=e.count(),o=xb(2*i),r=0;r<i;r++){var a=mb(n,t,e,r);o[2*r]=a[0],o[2*r+1]=a[1]}return o}(o,a,_),x=t.get("showSymbol"),b=x&&!h&&Fb(t,a,o),w=this._data;w&&w.eachItemGraphicEl(function(t,e){t.__temp&&(r.remove(t),w.setItemGraphicEl(e,null))}),x||p.remove(),r.add(g);function S(t){i._changePolyState(t)}var M,T=!h&&t.get("step"),C=(o&&o.getArea&&t.get("clip",!0)&&(null!=(M=o.getArea()).width?(M.x-=.1,M.y-=.1,M.width+=.2,M.height+=.2):M.r0&&(M.r0-=.5,M.r+=.5)),this._clipShapeForSymbol=M,function(t,e){var n=t.getVisual("visualMeta");if(n&&n.length&&t.count()&&"cartesian2d"===e.type){for(var i,o,r=n.length-1;0<=r;r--){var a=n[r].dimension,a=t.dimensions[a],a=t.getDimensionInfo(a);if("x"===(i=a&&a.coordDim)||"y"===i){o=n[r];break}}if(o){var s=e.getAxis(i),e=j(o.stops,function(t){return{offset:0,coord:s.toGlobalCoord(s.dataToCoord(t.value)),color:t.color}}),l=e.length,u=o.outerColors.slice(),h=(l&&e[0].coord>e[l-1].coord&&(e.reverse(),u.reverse()),e[0].coord-10),c=e[l-1].coord+10,p=c-h;if(p<.001)return"transparent";N(e,function(t){t.offset=(t.coord-h)/p}),e.push({offset:l?e[l-1].offset:.5,color:u[1]||"transparent"}),e.unshift({offset:l?e[0].offset:.5,color:u[0]||"transparent"});l=new Qu(0,0,0,0,e,!0);return l[i]=h,l[i+"2"]=c,l}}}(a,o)||a.getVisual("style")[a.getVisual("drawType")]),c=(d&&c.type===o.type&&T===this._step?(m&&!f?f=this._newPolygon(u,_):f&&!m&&(g.remove(f),f=this._polygon=null),h||this._initOrUpdateEndLabel(t,o,hp(C)),g.setClipPath(Wb(this,o,!1,t)),x&&p.updateData(a,{isIgnore:b,clipShape:M,disableAnimation:!0,getSymbolPoint:function(t){return[u[2*t],u[2*t+1]]}}),Nb(this._stackedOnPoints,_)&&Nb(this._points,u)||(y?this._doUpdateAnimation(a,_,o,n,T,v):(T&&(u=Vb(u,o,T),_=_&&Vb(_,o,T)),d.setShape({points:u}),f&&f.setShape({points:u,stackedOnPoints:_})))):(x&&p.updateData(a,{isIgnore:b,clipShape:M,disableAnimation:!0,getSymbolPoint:function(t){return[u[2*t],u[2*t+1]]}}),y&&this._initSymbolLabelAnimation(a,o,M),T&&(u=Vb(u,o,T),_=_&&Vb(_,o,T)),d=this._newPolyline(u),m&&(f=this._newPolygon(u,_)),h||this._initOrUpdateEndLabel(t,o,hp(C)),g.setClipPath(Wb(this,o,!0,t))),t.get(["emphasis","focus"])),n=t.get(["emphasis","blurScope"]),x=(d.useStyle(V(s.getLineStyle(),{fill:"none",stroke:C,lineJoin:"bevel"})),Sl(d,t,"lineStyle"),0<d.style.lineWidth&&"bolder"===t.get(["emphasis","lineStyle","width"])&&(d.getState("emphasis").style.lineWidth=+d.style.lineWidth+1),z(d).seriesIndex=t.seriesIndex,xl(d,c,n),zb(t.get("smooth"))),p=t.get("smoothMonotone"),b=t.get("connectNulls");d.setShape({smooth:x,smoothMonotone:p,connectNulls:b}),f&&(y=a.getCalculationInfo("stackedOnSeries"),M=0,f.useStyle(V(l.getAreaStyle(),{fill:C,opacity:.7,lineJoin:"bevel",decal:a.getVisual("style").decal})),y&&(M=zb(y.get("smooth"))),f.setShape({smooth:x,stackedOnSmooth:M,smoothMonotone:p,connectNulls:b}),Sl(f,t,"areaStyle"),z(f).seriesIndex=t.seriesIndex,xl(f,c,n));a.eachItemGraphicEl(function(t){t&&(t.onHoverStateChange=S)}),this._polyline.onHoverStateChange=S,this._data=a,this._coordSys=o,this._stackedOnPoints=_,this._points=u,this._step=T,this._valueOrigin=v},Xb.prototype.dispose=function(){},Xb.prototype.highlight=function(t,e,n,i){var o=t.getData(),r=qo(o,i);if(this._changePolyState("emphasis"),!(r instanceof Array)&&null!=r&&0<=r){var a=o.getLayout("points"),s=o.getItemGraphicEl(r);if(!s){var l=a[2*r],a=a[2*r+1];if(isNaN(l)||isNaN(a))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l,a))return;(s=new lb(o,r)).x=l,s.y=a,s.setZ(t.get("zlevel"),t.get("z"));l=s.getSymbolPath().getTextContent();l&&(l.z2=this._polyline.z2+1),s.__temp=!0,o.setItemGraphicEl(r,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else Mg.prototype.highlight.call(this,t,e,n,i)},Xb.prototype.downplay=function(t,e,n,i){var o,r=t.getData(),a=qo(r,i);this._changePolyState("normal"),null!=a&&0<=a?(o=r.getItemGraphicEl(a))&&(o.__temp?(r.setItemGraphicEl(a,null),this.group.remove(o)):o.downplay()):Mg.prototype.downplay.call(this,t,e,n,i)},Xb.prototype._changePolyState=function(t){var e=this._polygon;nl(this._polyline,t),e&&nl(e,t)},Xb.prototype._newPolyline=function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new Ib({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(e),this._polyline=e},Xb.prototype._newPolygon=function(t,e){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new Pb({shape:{points:t,stackedOnPoints:e},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n},Xb.prototype._initSymbolLabelAnimation=function(t,l,u){var h,c,e=l.getBaseAxis(),p=e.inverse,e=("cartesian2d"===l.type?(h=e.isHorizontal(),c=!1):"polar"===l.type&&(h="angle"===e.dim,c=!0),t.hostModel),d=e.get("animationDuration"),f=("function"==typeof d&&(d=d(null)),e.get("animationDelay")||0),g="function"==typeof f?f(null):f;t.eachItemGraphicEl(function(t,e){var n,i,o,r,a,s=t;s&&(r=[t.x,t.y],a=i=n=void 0,a=c?(o=u,r=l.pointToCoord(r),h?(n=o.startAngle,i=o.endAngle,-r[1]/180*Math.PI):(n=o.r0,i=o.r,r[0])):h?(n=u.x,i=u.x+u.width,t.x):(n=u.y+u.height,i=u.y,t.y),o=i===n?0:(a-n)/(i-n),p&&(o=1-o),r="function"==typeof f?f(e):d*o+g,a=(t=s.getSymbolPath()).getTextContent(),s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,delay:r}),a&&a.animateFrom({style:{opacity:0}},{duration:300,delay:r}),t.disableLabelAnimation=!0)})},Xb.prototype._initOrUpdateEndLabel=function(t,e,n){var i,o,r,a=t.getModel("endLabel");a.get("show")?(i=t.getData(),o=this._polyline,this._endLabel||((this._endLabel=new ws({z2:200})).ignoreClip=!0,o.setTextContent(this._endLabel),o.disableLabelAnimation=!0),0<=(r=Hb(i.getLayout("points")))&&(jh(o,qh(t,"endLabel"),{inheritColor:n,labelFetcher:t,labelDataIndex:r,defaultText:function(t,e,n){return null!=n?Vx(i,n):zx(i,t)},enableTextSetter:!0},(n=a,r=(t=(t=e).getBaseAxis()).isHorizontal(),t=t.inverse,a=r?t?"right":"left":"center",r=r?"middle":t?"top":"bottom",{normal:{align:n.get("align")||a,verticalAlign:n.get("verticalAlign")||r}})),o.textConfig.position=null)):this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},Xb.prototype._endLabelOnDuring=function(t,e,n,i,o,r,a){var s,l,u,h,c,p,d,f,g,y,m=this._endLabel,v=this._polyline;m&&(t<1&&null==i.originalX&&(i.originalX=m.x,i.originalY=m.y),s=n.getLayout("points"),g=(l=n.hostModel).get("connectNulls"),u=r.get("precision"),r=r.get("distance")||0,c=(a=a.getBaseAxis()).isHorizontal(),a=a.inverse,e=e.shape,h=(c?r:0)*(a?-1:1),r=(c?0:-r)*(a?-1:1),d=void 0,1<=(f=(p=(c=function(t,e,n){for(var i,o,r=t.length/2,a="x"===n?0:1,s=0,l=-1,u=0;u<r;u++)if(o=t[2*u+a],!isNaN(o)&&!isNaN(t[2*u+1-a])){if(0!==u){if(i<=e&&e<=o||e<=i&&o<=e){l=u;break}s=u}i=o}return{range:[s,l],t:(e-i)/(o-i)}}(s,a=a?c?e.x:e.y+e.height:c?e.x+e.width:e.y,e=c?"x":"y")).range)[1]-p[0])?(1<f&&!g?(y=Gb(s,p[0]),m.attr({x:y[0]+h,y:y[1]+r}),o&&(d=l.getRawValue(p[0]))):((y=v.getPointOn(a,e))&&m.attr({x:y[0]+h,y:y[1]+r}),f=l.getRawValue(p[0]),g=l.getRawValue(p[1]),o&&(d=or(n,u,f,g,c.t))),i.lastFrameIndex=p[0]):(y=Gb(s,v=1===t||0<i.lastFrameIndex?p[0]:0),o&&(d=l.getRawValue(v)),m.attr({x:y[0]+h,y:y[1]+r})),o)&&nc(m).setLabelText(d)},Xb.prototype._doUpdateAnimation=function(t,e,n,i,o,r){var a=this._polyline,s=this._polygon,l=t.hostModel,e=function(t,e,n,i,o,r,a,E){s=[],e.diff(t).add(function(t){s.push({cmd:"+",idx:t})}).update(function(t,e){s.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){s.push({cmd:"-",idx:t})}).execute();for(var s,l=s,u=[],h=[],c=[],p=[],d=[],f=[],g=[],y=yb(o,e,a),m=(yb(r,t,E),t.getLayout("points")||[]),v=e.getLayout("points")||[],_=0;_<l.length;_++){var x=l[_],b=!0,w=void 0;switch(x.cmd){case"=":var S=2*x.idx,w=2*x.idx1,M=m[S],T=m[1+S],C=v[w],I=v[w+1];(isNaN(M)||isNaN(T))&&(M=C,T=I),u.push(M,T),h.push(C,I),c.push(n[S],n[1+S]),p.push(i[w],i[w+1]),g.push(e.getRawIndex(x.idx1));break;case"+":M=x.idx,T=y.dataDimsForPoint,C=o.dataToPoint([e.get(T[0],M),e.get(T[1],M)]),I=(w=2*M,u.push(C[0],C[1]),h.push(v[w],v[w+1]),mb(y,o,e,M));c.push(I[0],I[1]),p.push(i[w],i[w+1]),g.push(e.getRawIndex(M));break;case"-":b=!1}b&&(d.push(x),f.push(f.length))}f.sort(function(t,e){return g[t]-g[e]});for(var A=xb(a=u.length),D=xb(a),k=xb(a),L=xb(a),P=[],_=0;_<f.length;_++){var O=f[_],R=2*_,N=2*O;A[R]=u[N],A[1+R]=u[1+N],D[R]=h[N],D[1+R]=h[1+N],k[R]=c[N],k[1+R]=c[1+N],L[R]=p[N],L[1+R]=p[1+N],P[_]=d[O]}return{current:A,next:D,stackedOnCurrent:k,stackedOnNext:L,status:P}}(this._data,t,this._stackedOnPoints,e,this._coordSys,n,this._valueOrigin,r),r=e.current,u=e.stackedOnCurrent,h=e.next,c=e.stackedOnNext;if(o&&(r=Vb(e.current,n,o),u=Vb(e.stackedOnCurrent,n,o),h=Vb(e.next,n,o),c=Vb(e.stackedOnNext,n,o)),3e3<Bb(r,h)||s&&3e3<Bb(u,c))a.setShape({points:h}),s&&s.setShape({points:h,stackedOnPoints:c});else{a.shape.__points=e.current,a.shape.points=r;n={shape:{points:h}};e.current!==r&&(n.shape.__points=e.next),a.stopAnimation(),Ah(a,n,l),s&&(s.setShape({points:r,stackedOnPoints:u}),s.stopAnimation(),Ah(s,{shape:{stackedOnPoints:c}},l),a.shape.points!==s.shape.points)&&(s.shape.points=a.shape.points);for(var p,d=[],f=e.status,g=0;g<f.length;g++)"="===f[g].cmd&&(p=t.getItemGraphicEl(f[g].idx1))&&d.push({el:p,ptIdx:g});a.animators&&a.animators.length&&a.animators[0].during(function(){s&&s.dirtyShape();for(var t=a.shape.__points,e=0;e<d.length;e++){var n=d[e].el,i=2*d[e].ptIdx;n.x=t[i],n.y=t[1+i],n.markRedraw()}})}},Xb.prototype.remove=function(t){var n=this.group,i=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),i&&i.eachItemGraphicEl(function(t,e){t.__temp&&(n.remove(t),i.setItemGraphicEl(e,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},Xb.type="line";var Ub,Yb=Xb;function Xb(){return null!==Ub&&Ub.apply(this,arguments)||this}j1(function(t){var i;t.registerChartView(Yb),t.registerSeriesModel(rb),t.registerLayout((i=!0,{seriesType:"line",plan:bg(),reset:function(t){var h,e,c,p,n=t.getData(),d=t.coordinateSystem,t=t.pipelineContext,f=i||t.large;if(d)return t=j(d.dimensions,function(t){return n.mapDimension(t)}).slice(0,2),h=t.length,e=n.getCalculationInfo("stackResultDimension"),P_(n,t[0])&&(t[0]=e),P_(n,t[1])&&(t[1]=e),e=n.getDimensionInfo(t[0]),t=n.getDimensionInfo(t[1]),c=e&&e.index,p=t&&t.index,h&&{progress:function(t,e){for(var n=t.end-t.start,i=f&&xb(n*h),o=[],r=[],a=t.start,s=0;a<t.end;a++){var l,u=void 0;u=1===h?(l=e.getByDimIdx(c,a),d.dataToPoint(l,null,r)):(o[0]=e.getByDimIdx(c,a),o[1]=e.getByDimIdx(p,a),d.dataToPoint(o,null,r)),f?(i[s++]=u[0],i[s++]=u[1]):e.setItemLayout(a,u.slice())}f&&e.setLayout("points",i)}}}})),t.registerVisual({seriesType:"line",reset:function(t){var e=t.getData(),t=t.getModel("lineStyle").getLineStyle();t&&!t.stroke&&(t.stroke=e.getVisual("style").fill),e.setVisual("legendLineStyle",t)}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,Tx("line"))});var Zb=2*Math.PI,jb=Math.PI/180;function qb(t,e,I){e.eachSeriesByType(t,function(t){var n,o=t.getData(),e=o.mapDimension("value"),i=(i=I,mp(t.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()})),r=t.get("center"),a=t.get("radius"),s=(F(a)||(a=[0,a]),F(r)||(r=[r,r]),B(i.width,I.getWidth())),l=B(i.height,I.getHeight()),u=Math.min(s,l),h=B(r[0],s)+i.x,c=B(r[1],l)+i.y,p=B(a[0],u/2),d=B(a[1],u/2),f=-t.get("startAngle")*jb,g=t.get("minAngle")*jb,y=0,m=(o.each(e,function(t){isNaN(t)||y++}),o.getSum(e)),v=Math.PI/(m||y)*2,_=t.get("clockwise"),x=t.get("roseType"),b=t.get("stillShowZeroSum"),w=o.getDataExtent(e),S=(w[0]=0,Zb),M=0,T=f,C=_?1:-1;o.setLayout({viewRect:i,r:d}),o.each(e,function(t,e){var n,i;isNaN(t)?o.setItemLayout(e,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:_,cx:h,cy:c,r0:p,r:x?NaN:d}):((n="area"!==x?0===m&&b?v:t*v:Zb/y)<g?S-=n=g:M+=t,i=T+C*n,o.setItemLayout(e,{angle:n,startAngle:T,endAngle:i,clockwise:_,cx:h,cy:c,r0:p,r:x?vo(t,w,[p,d]):d}),T=i)}),S<Zb&&y&&(S<=.001?(n=Zb/y,o.each(e,function(t,e){isNaN(t)||((t=o.getItemLayout(e)).angle=n,t.startAngle=f+C*e*n,t.endAngle=f+C*(e+1)*n)})):(v=S/M,T=f,o.each(e,function(t,e){isNaN(t)||(t=(e=o.getItemLayout(e)).angle===g?g:t*v,e.startAngle=T,e.endAngle=T+C*t,T+=C*t)})))})}var Kb=Math.PI/180;function $b(t,s,l,u,h,e,n,i,o,r){if(!(t.length<2)){for(var a,c=t.length,p=0;p<c;p++)"outer"===t[p].position&&"labelLine"===t[p].labelAlignTo&&(a=t[p].label.x-r,t[p].linePoints[1][0]+=a,t[p].label.x=r);if(Py(t,o,o+n)){for(var d,f,g,y,m,v=t,_={list:[],maxY:0},x={list:[],maxY:0},b=0;b<v.length;b++)"none"===v[b].labelAlignTo&&(f=(d=v[b]).label.y>l?x:_,(g=Math.abs(d.label.y-l))>f.maxY&&(m=d.label.x-s-d.len2*h,y=u+d.len,m=Math.abs(m)<y?Math.sqrt(g*g/(1-m*m/y/y)):y,f.rB=m,f.maxY=g),f.list.push(d));w(_),w(x)}}function w(t){for(var e=t.rB,n=e*e,i=0;i<t.list.length;i++){var o=t.list[i],r=Math.abs(o.label.y-l),a=u+o.len,a=a*a,r=Math.sqrt((1-Math.abs(r*r/n))*a);o.label.x=s+(r+o.len2)*h}}}function Jb(t){return"center"===t.position}function Qb(t){var S,M,T=t.getData(),C=[],I=!1,A=(t.get("minShowLabelAngle")||0)*Kb,e=T.getLayout("viewRect"),D=T.getLayout("r"),k=e.width,L=e.x,n=e.y,e=e.height;function P(t){t.ignore=!0}if(T.each(function(t){var e,n,i,o,r,a,s,l,u,h,c,p=T.getItemGraphicEl(t),d=p.shape,f=p.getTextContent(),g=p.getTextGuideLine(),t=T.getItemModel(t),y=t.getModel("label"),m=y.get("position")||t.get(["emphasis","label","position"]),v=y.get("distanceToLabelLine"),_=y.get("alignTo"),x=B(y.get("edgeDistance"),k),b=y.get("bleedMargin"),t=t.getModel("labelLine"),w=B(t.get("length"),k);e=B(t.get("length2"),k),Math.abs(d.endAngle-d.startAngle)<A?(N(f.states,P),f.ignore=!0):function(t){if(!t.ignore)return 1;for(var e in t.states)if(!1===t.states[e].ignore)return 1}(f)&&(n=(d.startAngle+d.endAngle)/2,i=Math.cos(n),o=Math.sin(n),S=d.cx,M=d.cy,r="inside"===m||"inner"===m,u="center"===m?(a=d.cx,s=d.cy,"center"):(a=(u=(r?(d.r+d.r0)/2*i:d.r*i)+S)+3*i,s=(h=(r?(d.r+d.r0)/2*o:d.r*o)+M)+3*o,r||(l=u+i*(w+D-d.r),d=h+o*(w+D-d.r),c=l+(i<0?-1:1)*e,a="edge"===_?i<0?L+x:L+k-x:c+(i<0?-v:v),l=[[u,h],[l,s=d],[c,d]]),r?"center":"edge"===_?0<i?"right":"left":0<i?"left":"right"),c="number"==typeof(h=y.get("rotate"))?h*(Math.PI/180):h?i<0?-n+Math.PI:-n:0,I=!!c,f.x=a,f.y=s,f.rotation=c,f.setStyle({verticalAlign:"middle"}),r?(f.setStyle({align:u}),(d=f.states.select)&&(d.x+=f.x,d.y+=f.y)):((y=f.getBoundingRect().clone()).applyTransform(f.getComputedTransform()),h=(f.style.margin||0)+2.1,y.y-=h/2,y.height+=h,C.push({label:f,labelLine:g,position:m,len:w,len2:e,minTurnAngle:t.get("minTurnAngle"),maxSurfaceAngle:t.get("maxSurfaceAngle"),surfaceNormal:new E(i,o),linePoints:l,textAlign:u,labelDistance:v,labelAlignTo:_,edgeDistance:x,bleedMargin:b,rect:y})),p.setTextConfig({inside:r}))}),!I&&t.get("avoidLabelOverlap")){for(var i=C,o=S,r=(t=M,D),a=k,s=L,l=[],u=[],h=Number.MAX_VALUE,c=-Number.MAX_VALUE,p=0;p<i.length;p++){var d=i[p].label;Jb(i[p])||(d.x<o?(h=Math.min(h,d.x),l):(c=Math.max(c,d.x),u)).push(i[p])}for($b(u,o,t,r,1,0,e,0,n,c),$b(l,o,t,r,-1,0,e,0,n,h),p=0;p<i.length;p++){var f,g,y,m,v=i[p],d=v.label;Jb(v)||(f=v.linePoints)&&(g="edge"===v.labelAlignTo,y=v.rect.width,m=void 0,(m=g?d.x<o?f[2][0]-v.labelDistance-s-v.edgeDistance:s+a-v.edgeDistance-f[2][0]-v.labelDistance:d.x<o?d.x-s-v.bleedMargin:s+a-d.x-v.bleedMargin)<v.rect.width&&(v.label.style.width=m,"edge"===v.labelAlignTo)&&(y=m),m=f[1][0]-f[2][0],g?d.x<o?f[2][0]=s+v.edgeDistance+y+v.labelDistance:f[2][0]=s+a-v.edgeDistance-y-v.labelDistance:(d.x<o?f[2][0]=d.x+v.labelDistance:f[2][0]=d.x-v.labelDistance,f[1][0]=f[2][0]+m),f[1][1]=f[2][1]=d.y)}}for(var _=0;_<C.length;_++){var x,b=C[_],w=b.label,O=b.labelLine,R=isNaN(w.x)||isNaN(w.y);w&&(w.setStyle({align:b.textAlign}),R&&(N(w.states,P),w.ignore=!0),x=w.states.select)&&(x.x+=w.x,x.y+=w.y),O&&(x=b.linePoints,R||!x?(N(O.states,P),O.ignore=!0):(Cy(x,b.minTurnAngle),function(t,e,n){if(n<=180&&0<n){n=n/180*Math.PI,vy.fromArray(t[0]),_y.fromArray(t[1]),xy.fromArray(t[2]),E.sub(by,_y,vy),E.sub(wy,xy,_y);var i=by.len(),o=wy.len();if(!(i<.001||o<.001)&&(by.scale(1/i),wy.scale(1/o),by.dot(e)<Math.cos(n))){i=fy(_y.x,_y.y,xy.x,xy.y,vy.x,vy.y,My,!1),o=(Ty.fromArray(My),Math.PI/2),e=o+Math.acos(wy.dot(e))-n;if(o<=e)E.copy(Ty,xy);else{Ty.scaleAndAdd(wy,i/Math.tan(Math.PI/2-e));n=xy.x!==_y.x?(Ty.x-_y.x)/(xy.x-_y.x):(Ty.y-_y.y)/(xy.y-_y.y);if(isNaN(n))return;n<0?E.copy(Ty,_y):1<n&&E.copy(Ty,xy)}Ty.toArray(t[1])}}}(x,b.surfaceNormal,b.maxSurfaceAngle),O.setShape({points:x}),w.__hostTarget.textGuideLineConfig={anchor:new E(x[0][0],x[0][1])}))}}function tw(t,e){t=t.get("borderRadius");return null==t?null:{innerCornerRadius:li((t=F(t)?t:[t,t])[0],e.r0),cornerRadius:li(t[1],e.r)}}u(aw,nw=yu),aw.prototype.updateData=function(t,e,n,i){var o=this,r=t.hostModel,a=t.getItemModel(e),s=a.getModel("emphasis"),l=t.getItemLayout(e),u=I(tw(a.getModel("itemStyle"),l)||{},l);isNaN(u.startAngle)?o.setShape(u):(i?(o.setShape(u),"scale"===r.getShallow("animationType")?(o.shape.r=l.r0,Dh(o,{shape:{r:l.r}},r,e)):null!=n?(o.setShape({startAngle:n,endAngle:n}),Dh(o,{shape:{startAngle:l.startAngle,endAngle:l.endAngle}},r,e)):(o.shape.endAngle=l.startAngle,Ah(o,{shape:{endAngle:l.endAngle}},r,e))):Ah(o,{shape:u},r,e),o.useStyle(t.getItemVisual(e,"style")),Sl(o,a),i=(l.startAngle+l.endAngle)/2,n=r.get("selectedOffset"),u=Math.cos(i)*n,i=Math.sin(i)*n,(n=a.getShallow("cursor"))&&o.attr("cursor",n),this._updateLabel(r,t,e),o.ensureState("emphasis").shape=y({r:l.r+(s.get("scale")&&s.get("scaleSize")||0)},tw(s.getModel("itemStyle"),l)),I(o.ensureState("select"),{x:u,y:i,shape:tw(a.getModel(["select","itemStyle"]),l)}),I(o.ensureState("blur"),{shape:tw(a.getModel(["blur","itemStyle"]),l)}),n=o.getTextGuideLine(),r=o.getTextContent(),n&&I(n.ensureState("select"),{x:u,y:i}),I(r.ensureState("select"),{x:u,y:i}),xl(this,s.get("focus"),s.get("blurScope")))},aw.prototype._updateLabel=function(t,e,n){var i=e.getItemModel(n),o=i.getModel("labelLine"),r=e.getItemVisual(n,"style"),a=r&&r.fill,r=r&&r.opacity,e=(jh(this,qh(i),{labelFetcher:e.hostModel,labelDataIndex:n,inheritColor:a,defaultOpacity:r,defaultText:t.getFormattedLabel(n,"normal")||e.getName(n)}),this.getTextContent()),n=(this.setTextConfig({position:null,rotation:null}),e.attr({z2:10}),t.get(["label","position"]));"outside"!==n&&"outer"!==n?this.removeTextGuideLine():(this.getTextGuideLine()||(e=new ku,this.setTextGuideLine(e)),Dy(this,ky(i),{stroke:a,opacity:xt(o.get(["lineStyle","opacity"]),r,1)}))};var ew,nw,iw=aw,ow=(u(rw,ew=Mg),rw.prototype.init=function(){var t=new O;this._sectorGroup=t},rw.prototype.render=function(e,t,n,i){var o,r=e.getData(),a=this._data,s=this.group;if(!a&&0<r.count()){for(var l=r.getItemLayout(0),u=1;isNaN(l&&l.startAngle)&&u<r.count();++u)l=r.getItemLayout(u);l&&(o=l.startAngle)}r.diff(a).add(function(t){var e=new iw(r,t,o);r.setItemGraphicEl(t,e),s.add(e)}).update(function(t,e){e=a.getItemGraphicEl(e);e.updateData(r,t,o),e.off("click"),s.add(e),r.setItemGraphicEl(t,e)}).remove(function(t){Ph(a.getItemGraphicEl(t),e,t)}).execute(),Qb(e),"expansion"!==e.get("animationTypeUpdate")&&(this._data=r)},rw.prototype.dispose=function(){},rw.prototype.containPoint=function(t,e){var n,e=e.getData().getItemLayout(0);if(e)return n=t[0]-e.cx,t=t[1]-e.cy,(n=Math.sqrt(n*n+t*t))<=e.r&&n>=e.r0},rw.type="pie",rw);function rw(){var t=null!==ew&&ew.apply(this,arguments)||this;return t.ignoreLabelLineUpdate=!0,t}function aw(t,e,n){var i=nw.call(this)||this,o=(i.z2=2,new ws);return i.setTextContent(o),i.updateData(t,e,n,!0),i}lw.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},lw.prototype.containName=function(t){return 0<=this._getRawData().indexOfName(t)},lw.prototype.indexOfName=function(t){return this._getDataWithEncodedVisual().indexOfName(t)},lw.prototype.getItemVisual=function(t,e){return this._getDataWithEncodedVisual().getItemVisual(t,e)};var sw=lw;function lw(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}u(cw,uw=hg),cw.prototype.init=function(t){uw.prototype.init.apply(this,arguments),this.legendVisualProvider=new sw(S(this.getData,this),S(this.getRawData,this)),this._defaultLabelLine(t)},cw.prototype.mergeOption=function(){uw.prototype.mergeOption.apply(this,arguments)},cw.prototype.getInitialData=function(){return e=F(e={coordDimensions:["value"],encodeDefaulter:M(Wp,t=this)})?{coordDimensions:e}:I({},e),i=t.getSource(),e=I_(i,e),(e=new S_(e,t)).initData(i,n),e;var t,e,n,i},cw.prototype.getDataParams=function(t){var e=this.getData(),n=uw.prototype.getDataParams.call(this,t),i=[];return e.each(e.mapDimension("value"),function(t){i.push(t)}),n.percent=Mo(i,t,e.hostModel.get("percentPrecision")),n.$vars.push("percent"),n},cw.prototype._defaultLabelLine=function(t){Vo(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},cw.type="series.pie",cw.defaultOption={zlevel:0,z:2,legendHoverLink:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"};var uw,hw=cw;function cw(){var t=null!==uw&&uw.apply(this,arguments)||this;return t.useColorPaletteOnData=!0,t}j1(function(t){t.registerChartView(ow),t.registerSeriesModel(hw),Gy("pie",t.registerAction),t.registerLayout(M(qb,"pie")),t.registerProcessor({seriesType:"pie",reset:function(t,e){var i,o=e.findComponents({mainType:"legend"});o&&o.length&&(i=t.getData()).filterSelf(function(t){for(var e=i.getName(t),n=0;n<o.length;n++)if(!o[n].isSelected(e))return!1;return!0})}})});u(fw,pw=g),fw.type="grid",fw.dependencies=["xAxis","yAxis"],fw.layoutMode="box",fw.defaultOption={show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"};var pw,dw=fw;function fw(){return null!==pw&&pw.apply(this,arguments)||this}u(mw,gw=g),mw.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",tr).models[0]},mw.type="cartesian2dAxis";var gw,yw=mw;function mw(){return null!==gw&&gw.apply(this,arguments)||this}ot(yw,U1);var jy={show:!0,zlevel:0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},ju=p({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},jy),xu=p({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},jy),vw={category:ju,value:xu,time:p({scale:!0,splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},xu),log:V({scale:!0,logBase:10},xu)},_w={value:1,category:1,time:1,log:1};function xw(r,a,s,l){N(_w,function(t,o){var i,e=p(p({},vw[o],!0),l,!0),e=(u(n,i=s),n.prototype.mergeDefaultAndTheme=function(t,e){var n=_p(this),i=n?bp(t):{};p(t,e.getTheme().get(o+"Axis")),p(t,this.getDefaultOption()),t.type=bw(t),n&&xp(t,i,n)},n.prototype.optionUpdated=function(){"category"===this.option.type&&(this.__ordinalMeta=B_.createByAxisModel(this))},n.prototype.getCategories=function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.type=a+"Axis."+o,n.defaultOption=e,n);function n(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=i.apply(this,t)||this;return n.type=a+"Axis."+o,n}r.registerComponentModel(e)}),r.registerSubTypeDefaulter(a+"Axis",bw)}function bw(t){return t.type||(t.data?"category":"value")}function ww(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}ww.prototype.getAxis=function(t){return this._axes[t]},ww.prototype.getAxes=function(){return j(this._dimList,function(t){return this._axes[t]},this)},ww.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),st(this.getAxes(),function(t){return t.scale.type===e})},ww.prototype.addAxis=function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)};var Sw=["x","y"];function Mw(t){return"interval"===t.type||"time"===t.type}u(Iw,Tw=ww),Iw.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t,e,n,i,o=this.getAxis("x").scale,r=this.getAxis("y").scale;Mw(o)&&Mw(r)&&(o=o.getExtent(),r=r.getExtent(),i=this.dataToPoint([o[0],r[0]]),e=this.dataToPoint([o[1],r[1]]),t=o[1]-o[0],n=r[1]-r[0],t)&&n&&(t=(e[0]-i[0])/t,e=(e[1]-i[1])/n,n=i[0]-o[0]*t,o=i[1]-r[0]*e,i=this._transform=[t,0,0,e,n,o],this._invTransform=Ve([],i))},Iw.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},Iw.prototype.containPoint=function(t){var e=this.getAxis("x"),n=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&n.contain(n.toLocalCoord(t[1]))},Iw.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},Iw.prototype.dataToPoint=function(t,e,n){n=n||[];var i,o=t[0],r=t[1];return this._transform&&null!=o&&isFinite(o)&&null!=r&&isFinite(r)?Xt(n,t,this._transform):(t=this.getAxis("x"),i=this.getAxis("y"),n[0]=t.toGlobalCoord(t.dataToCoord(o)),n[1]=i.toGlobalCoord(i.dataToCoord(r)),n)},Iw.prototype.clampData=function(t,e){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,o=n.getExtent(),r=i.getExtent(),n=n.parse(t[0]),i=i.parse(t[1]);return(e=e||[])[0]=Math.min(Math.max(Math.min(o[0],o[1]),n),Math.max(o[0],o[1])),e[1]=Math.min(Math.max(Math.min(r[0],r[1]),i),Math.max(r[0],r[1])),e},Iw.prototype.pointToData=function(t,e){var n,i;return e=e||[],this._invTransform?Xt(e,t,this._invTransform):(n=this.getAxis("x"),i=this.getAxis("y"),e[0]=n.coordToData(n.toLocalCoord(t[0])),e[1]=i.coordToData(i.toLocalCoord(t[1])),e)},Iw.prototype.getOtherAxis=function(t){return this.getAxis("x"===t.dim?"y":"x")},Iw.prototype.getArea=function(){var t=this.getAxis("x").getGlobalExtent(),e=this.getAxis("y").getGlobalExtent(),n=Math.min(t[0],t[1]),i=Math.min(e[0],e[1]),t=Math.max(t[0],t[1])-n,e=Math.max(e[0],e[1])-i;return new R(n,i,t,e)};var Tw,Cw=Iw;function Iw(){var t=null!==Tw&&Tw.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=Sw,t}u(kw,Aw=$y),kw.prototype.isHorizontal=function(){var t=this.position;return"top"===t||"bottom"===t},kw.prototype.getGlobalExtent=function(t){var e=this.getExtent();return e[0]=this.toGlobalCoord(e[0]),e[1]=this.toGlobalCoord(e[1]),t&&e[0]>e[1]&&e.reverse(),e},kw.prototype.pointToData=function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},kw.prototype.setCategorySortInfo=function(t){if("category"!==this.type)return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)};var Aw,Dw=kw;function kw(t,e,n,i,o){t=Aw.call(this,t,e,n)||this;return t.index=0,t.type=i||"value",t.position=o||"bottom",t}function Lw(t,e,n){n=n||{};var t=t.coordinateSystem,i=e.axis,o={},r=i.getAxesOnZeroOf()[0],a=i.position,s=r?"onZero":a,i=i.dim,t=t.getRect(),t=[t.x,t.x+t.width,t.y,t.y+t.height],l={left:0,right:1,top:0,bottom:1,onZero:2},u=e.get("offset")||0,u="x"===i?[t[2]-u,t[3]+u]:[t[0]-u,t[1]+u],h=(r&&(h=r.toGlobalCoord(r.dataToCoord(0)),u[l.onZero]=Math.max(Math.min(h,u[1]),u[0])),o.position=["y"===i?u[l[s]]:t[0],"x"===i?u[l[s]]:t[3]],o.rotation=Math.PI/2*("x"===i?0:1),o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,left:-1,right:1}[a],o.labelOffset=r?u[l[a]]-u[l.onZero]:0,e.get(["axisTick","inside"])&&(o.tickDirection=-o.tickDirection),_t(n.labelInside,e.get(["axisLabel","inside"]))&&(o.labelDirection=-o.labelDirection),e.get(["axisLabel","rotate"]));return o.labelRotate="top"===s?-h:h,o.z2=1,o}function Pw(t){return"cartesian2d"===t.get("coordinateSystem")}function Ow(i){var o={xAxisModel:null,yAxisModel:null};return N(o,function(t,e){var n=e.replace(/Model$/,""),n=i.getReferringComponents(n,tr).models[0];o[e]=n}),o}Nw.prototype.getRect=function(){return this._rect},Nw.prototype.update=function(t,e){var n=this._axesMap,i=(this._updateScale(t,this.model),N(n.x,function(t){E1(t.scale,t.model)}),N(n.y,function(t){E1(t.scale,t.model)}),{});N(n.x,function(t){Bw(n,"y",t,i)}),N(n.y,function(t){Bw(n,"x",t,i)}),this.resize(this.model,e)},Nw.prototype.resize=function(t,e,n){var i=t.getBoxLayoutParams(),n=!n&&t.get("containLabel"),a=mp(i,{width:e.getWidth(),height:e.getHeight()}),o=(this._rect=a,this._axesList);function r(){N(o,function(t){var e,n,i=t.isHorizontal(),o=i?[0,a.width]:[0,a.height],r=t.inverse?1:0;t.setExtent(o[r],o[1-r]),o=t,e=i?a.x:a.y,r=o.getExtent(),n=r[0]+r[1],o.toGlobalCoord="x"===o.dim?function(t){return t+e}:function(t){return n-t+e},o.toLocalCoord="x"===o.dim?function(t){return t-e}:function(t){return n-t+e}})}r(),n&&(N(o,function(t){var e,n,i;t.model.get(["axisLabel","inside"])||(e=F1(t))&&(n=t.isHorizontal()?"height":"width",i=t.model.get(["axisLabel","margin"]),a[n]-=e[n]+i,"top"===t.position?a.y+=e.height+i:"left"===t.position&&(a.x+=e.width+i))}),r()),N(this._coordsList,function(t){t.calcAffineTransform()})},Nw.prototype.getAxis=function(t,e){t=this._axesMap[t];if(null!=t)return t[e||0]},Nw.prototype.getAxes=function(){return this._axesList.slice()},Nw.prototype.getCartesian=function(t,e){if(null!=t&&null!=e)return this._coordsMap["x"+t+"y"+e];k(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var n=0,i=this._coordsList;n<i.length;n++)if(i[n].getAxis("x").index===t||i[n].getAxis("y").index===e)return i[n]},Nw.prototype.getCartesians=function(){return this._coordsList.slice()},Nw.prototype.convertToPixel=function(t,e,n){e=this._findConvertTarget(e);return e.cartesian?e.cartesian.dataToPoint(n):e.axis?e.axis.toGlobalCoord(e.axis.dataToCoord(n)):null},Nw.prototype.convertFromPixel=function(t,e,n){e=this._findConvertTarget(e);return e.cartesian?e.cartesian.pointToData(n):e.axis?e.axis.coordToData(e.axis.toLocalCoord(n)):null},Nw.prototype._findConvertTarget=function(t){var e,n,i=t.seriesModel,o=t.xAxisModel||i&&i.getReferringComponents("xAxis",tr).models[0],r=t.yAxisModel||i&&i.getReferringComponents("yAxis",tr).models[0],t=t.gridModel,a=this._coordsList;return i?A(a,e=i.coordinateSystem)<0&&(e=null):o&&r?e=this.getCartesian(o.componentIndex,r.componentIndex):o?n=this.getAxis("x",o.componentIndex):r?n=this.getAxis("y",r.componentIndex):t&&t.coordinateSystem===this&&(e=this._coordsList[0]),{cartesian:e,axis:n}},Nw.prototype.containPoint=function(t){var e=this._coordsList[0];if(e)return e.containPoint(t)},Nw.prototype._initCartesian=function(r,t,e){var a=this,s=this,l={left:!1,right:!1,top:!1,bottom:!1},u={x:{},y:{}},h={x:0,y:0};function n(o){return function(t,e){var n,i;Ew(t,r)&&(n=t.get("position"),"x"===o?"top"!==n&&"bottom"!==n&&(n=l.bottom?"top":"bottom"):"left"!==n&&"right"!==n&&(n=l.left?"right":"left"),l[n]=!0,i="category"===(n=new Dw(o,B1(t),[0,0],t.get("type"),n)).type,n.onBand=i&&t.get("boundaryGap"),n.inverse=t.get("inverse"),(t.axis=n).model=t,n.grid=s,n.index=e,s._axesList.push(n),u[o][e]=n,h[o]++)}}t.eachComponent("xAxis",n("x"),this),t.eachComponent("yAxis",n("y"),this),h.x&&h.y?N((this._axesMap=u).x,function(i,o){N(u.y,function(t,e){var e="x"+o+"y"+e,n=new Cw(e);n.master=a,n.model=r,a._coordsMap[e]=n,a._coordsList.push(n),n.addAxis(i),n.addAxis(t)})}):(this._axesMap={},this._axesList=[])},Nw.prototype._updateScale=function(t,i){function o(e,n){N(W1(e,n.dim),function(t){n.scale.unionExtentFromData(e,t)})}N(this._axesList,function(t){var e;t.scale.setExtent(1/0,-1/0),"category"===t.type&&(e=t.model.get("categorySortInfo"),t.scale.setSortInfo(e))}),t.eachSeries(function(t){var e,n;Pw(t)&&(n=(e=Ow(t)).xAxisModel,e=e.yAxisModel,Ew(n,i))&&Ew(e,i)&&(n=this.getCartesian(n.componentIndex,e.componentIndex),e=t.getData(),t=n.getAxis("x"),n=n.getAxis("y"),"list"===e.type)&&(o(e,t),o(e,n))},this)},Nw.prototype.getTooltipAxes=function(n){var i=[],o=[];return N(this.getCartesians(),function(t){var e=null!=n&&"auto"!==n?t.getAxis(n):t.getBaseAxis(),t=t.getOtherAxis(e);A(i,e)<0&&i.push(e),A(o,t)<0&&o.push(t)}),{baseAxes:i,otherAxes:o}},Nw.create=function(i,o){var r=[];return i.eachComponent("grid",function(t,e){var n=new Nw(t,i,o);n.name="grid_"+e,n.resize(t,o,!0),t.coordinateSystem=n,r.push(n)}),i.eachSeries(function(t){var e,n,i;Pw(t)&&(e=(n=Ow(t)).xAxisModel,n=n.yAxisModel,i=e.getCoordSysModel().coordinateSystem,t.coordinateSystem=i.getCartesian(e.componentIndex,n.componentIndex))}),r},Nw.dimensions=Sw;var Rw=Nw;function Nw(t,e,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=Sw,this._initCartesian(t,e,n),this.model=t}function Ew(t,e){return t.getCoordSysModel()===e}function Bw(t,e,n,i){n.getAxesOnZeroOf=function(){return o?[o]:[]};var o,r=t[e],t=n.model,e=t.get(["axisLine","onZero"]),n=t.get(["axisLine","onZeroAxisIndex"]);if(e){if(null!=n)zw(r[n])&&(o=r[n]);else for(var a in r)if(r.hasOwnProperty(a)&&zw(r[a])&&!i[s(r[a])]){o=r[a];break}o&&(i[s(o)]=!0)}function s(t){return t.dim+"_"+t.index}}function zw(t){return t&&"category"!==t.type&&"time"!==t.type&&(e=(t=(t=t).scale.getExtent())[0],t=t[1],!(0<e&&0<t||e<0&&t<0));var e}var Vw=Math.PI,Fw=(Gw.prototype.hasBuilder=function(t){return!!Hw[t]},Gw.prototype.add=function(t){Hw[t](this.opt,this.axisModel,this.group,this._transformGroup)},Gw.prototype.getGroup=function(){return this.group},Gw.innerTextLayout=function(t,e,n){var i,e=To(e-t),t=Co(e)?(i=0<n?"top":"bottom","center"):Co(e-Vw)?(i=0<n?"bottom":"top","center"):(i="middle",0<e&&e<Vw?0<n?"right":"left":0<n?"left":"right");return{rotation:e,textAlign:t,textVerticalAlign:i}},Gw.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},Gw.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},Gw),Hw={axisLine:function(i,t,o,e){var r,a,s,l,u,n=t.get(["axisLine","show"]);(n="auto"===n&&i.handleAutoShown?i.handleAutoShown("axisLine"):n)&&(n=t.axis.getExtent(),e=e.transform,r=[n[0],0],n=[n[1],0],e&&(Xt(r,r,e),Xt(n,n,e)),a=I({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),(e=new Nu({subPixelOptimize:!0,shape:{x1:r[0],y1:r[1],x2:n[0],y2:n[1]},style:a,strokeContainThreshold:i.strokeContainThreshold||5,silent:!0,z2:1})).anid="line",o.add(e),s=t.get(["axisLine","symbol"]),e=t.get(["axisLine","symbolSize"]),"number"==typeof(t=t.get(["axisLine","symbolOffset"])||0)&&(t=[t,t]),null!=s)&&("string"==typeof s&&(s=[s,s]),l=(e="string"!=typeof e&&"number"!=typeof e?e:[e,e])[0],u=e[1],N([{rotate:i.rotation+Math.PI/2,offset:t[0],r:0},{rotate:i.rotation-Math.PI/2,offset:t[1],r:Math.sqrt((r[0]-n[0])*(r[0]-n[0])+(r[1]-n[1])*(r[1]-n[1]))}],function(t,e){var n;"none"!==s[e]&&null!=s[e]&&(e=nm(s[e],-l/2,-u/2,l,u,a.stroke,!0),n=t.r+t.offset,e.attr({rotation:t.rotate,x:r[0]+n*Math.cos(i.rotation),y:r[1]-n*Math.sin(i.rotation),silent:!0,z2:11}),o.add(e))}))},axisTickLabel:function(t,e,n,i){var o,r,a,s=function(t,e,n,i){var o=n.axis,r=n.getModel("axisTick"),a=r.get("show");if((a="auto"===a&&i.handleAutoShown?i.handleAutoShown("axisTick"):a)&&!o.scale.isBlank()){for(var a=r.getModel("lineStyle"),i=i.tickDirection*r.get("length"),s=Xw(o.getTicksCoords(),e.transform,i,V(a.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),l=0;l<s.length;l++)t.add(s[l]);return s}}(n,i,e,t),l=e,u=function(s,l,u,h){var c=u.axis;{var p,d,t,e,f,g,y,m,v;if(_t(h.axisLabelShow,u.get(["axisLabel","show"]))&&!c.scale.isBlank())return p=u.getModel("axisLabel"),d=p.get("margin"),t=c.getViewLabels(),e=(_t(h.labelRotate,p.get("rotate"))||0)*Vw/180,f=Fw.innerTextLayout(h.rotation,e,h.labelDirection),g=u.getCategories&&u.getCategories(!0),y=[],m=Fw.isLabelSilent(u),v=u.get("triggerEvent"),N(t,function(t,e){var n="ordinal"===c.scale.type?c.scale.getRawOrdinalNumber(t.tickValue):t.tickValue,i=t.formattedLabel,t=t.rawLabel,o=p,r=(o=g&&g[n]&&k(r=g[n])&&r.textStyle?new fc(r.textStyle,p,u.ecModel):o).getTextColor()||u.get(["axisLine","lineStyle","color"]),a=c.dataToCoord(n),a=new ws({x:a,y:h.labelOffset+h.labelDirection*d,rotation:f.rotation,silent:m,z2:10,style:Kh(o,{text:i,align:o.getShallow("align",!0)||f.textAlign,verticalAlign:o.getShallow("verticalAlign",!0)||o.getShallow("baseline",!0)||f.textVerticalAlign,fill:"function"==typeof r?r("category"===c.type?t:"value"===c.type?n+"":n,e):r})});a.anid="label_"+n,v&&((i=Fw.makeAxisEventDataBase(u)).targetType="axisLabel",i.value=t,z(a).eventData=i),l.add(a),a.updateTransform(),y.push(a),s.add(a),a.decomposeTransform()}),y}}(n,i,e,t),h=(G1(l.axis)||(p=l.get(["axisLabel","showMinLabel"]),l=l.get(["axisLabel","showMaxLabel"]),s=s||[],g=(u=u||[])[0],d=u[1],o=u[u.length-1],u=u[u.length-2],r=s[0],f=s[1],a=s[s.length-1],s=s[s.length-2],!1===p?(Ww(g),Ww(r)):Uw(g,d)&&(p?(Ww(d),Ww(f)):(Ww(g),Ww(r))),!1===l?(Ww(o),Ww(a)):Uw(u,o)&&(l?(Ww(u),Ww(s)):(Ww(o),Ww(a)))),n),c=i,p=e,d=t.tickDirection,f=p.axis,g=p.getModel("minorTick");if(g.get("show")&&!f.scale.isBlank()){var y=f.getMinorTicksCoords();if(y.length)for(var f=g.getModel("lineStyle"),m=d*g.get("length"),v=V(f.getLineStyle(),V(p.getModel("axisTick").getLineStyle(),{stroke:p.get(["axisLine","lineStyle","color"])})),_=0;_<y.length;_++)for(var x=Xw(y[_],c.transform,m,v,"minorticks_"+_),b=0;b<x.length;b++)h.add(x[b])}},axisName:function(t,e,n,i){var o,r,a,s,l,u,h,c,p=_t(t.axisName,e.get("name"));p&&(l=e.get("nameLocation"),s=t.nameDirection,r=e.getModel("nameTextStyle"),u=e.get("nameGap")||0,a=(h=e.axis.getExtent())[0]>h[1]?-1:1,a=["start"===l?h[0]-a*u:"end"===l?h[1]+a*u:(h[0]+h[1])/2,Yw(l)?t.labelOffset+s*u:0],null!=(u=e.get("nameRotate"))&&(u=u*Vw/180),Yw(l)?o=Fw.innerTextLayout(t.rotation,null!=u?u:t.rotation,s):(s=t.rotation,l=l,h=h,u=To((u=u||0)-s),s=h[0]>h[1],h="start"===l&&!s||"start"!==l&&s,l=Co(u-Vw/2)?(c=h?"bottom":"top","center"):Co(u-1.5*Vw)?(c=h?"top":"bottom","center"):(c="middle",u<1.5*Vw&&Vw/2<u?h?"left":"right":h?"right":"left"),o={rotation:u,textAlign:l,textVerticalAlign:c},null==(c=t.axisNameAvailableWidth)||(c=Math.abs(c/Math.sin(o.rotation)),isFinite(c))||(c=null)),s=r.getFont(),u=(h=e.get("nameTruncate",!0)||{}).ellipsis,l=_t(t.nameTruncateMaxWidth,h.maxWidth,c),Wh({el:t=new ws({x:a[0],y:a[1],rotation:o.rotation,silent:Fw.isLabelSilent(e),style:Kh(r,{text:p,font:s,overflow:"truncate",width:l,ellipsis:u,fill:r.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:r.get("align")||o.textAlign,verticalAlign:r.get("verticalAlign")||o.textVerticalAlign}),z2:1}),componentModel:e,itemName:p}),t.__fullText=p,t.anid="name",e.get("triggerEvent")&&((h=Fw.makeAxisEventDataBase(e)).targetType="axisName",h.name=p,z(t).eventData=h),i.add(t),t.updateTransform(),n.add(t),t.decomposeTransform())}};function Gw(t,e){this.group=new O,this.opt=e,this.axisModel=t,V(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});t=new O({x:e.position[0],y:e.position[1],rotation:e.rotation});t.updateTransform(),this._transformGroup=t}function Ww(t){t&&(t.ignore=!0)}function Uw(t,e){var n,i=t&&t.getBoundingRect().clone(),o=e&&e.getBoundingRect().clone();if(i&&o)return Be(n=Oe([]),n,-t.rotation),i.applyTransform(Ne([],n,t.getLocalTransform())),o.applyTransform(Ne([],n,e.getLocalTransform())),i.intersect(o)}function Yw(t){return"middle"===t||"center"===t}function Xw(t,e,n,i,o){for(var r=[],a=[],s=[],l=0;l<t.length;l++){var u=t[l].coord,u=(a[0]=u,s[a[1]=0]=u,s[1]=n,e&&(Xt(a,a,e),Xt(s,s,e)),new Nu({subPixelOptimize:!0,shape:{x1:a[0],y1:a[1],x2:s[0],y2:s[1]},style:i,z2:2,autoBatch:!0,silent:!0}));u.anid=o+"_"+t[l].tickValue,r.push(u)}return r}function Zw(t,e){var o,u,h,r,c,p,d,n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return u=n,e=e,r=(h=t).getComponent("tooltip"),c=h.getComponent("axisPointer"),p=c.get("link",!0)||[],d=[],N(e.getCoordinateSystems(),function(a){var s,l,t,e,n;function i(t,e,n){var i,o=n.model.getModel("axisPointer",c),r=o.get("show");r&&("auto"!==r||t||Kw(o))&&(null==e&&(e=o.get("triggerTooltip")),r=(o=t?function(t,e,n,i,o,r){var a=e.getModel("axisPointer"),s={},e=(N(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],function(t){s[t]=C(a.get(t))}),s.snap="category"!==t.type&&!!r,"cross"===a.get("type")&&(s.type="line"),s.label||(s.label={}));null==e.show&&(e.show=!1),"cross"===o&&(o=a.get(["label","show"]),e.show=null==o||o,r||(o=s.lineStyle=a.get("crossStyle"))&&V(e,o.textStyle));return t.model.getModel("axisPointer",new fc(s,n,i))}(n,l,c,h,t,e):o).get("snap"),t=$w(n.model),i=e||r||"category"===n.type,e=u.axesInfo[t]={key:t,axis:n,coordSys:a,axisPointerModel:o,triggerTooltip:e,involveSeries:i,snap:r,useHandle:Kw(o),seriesModels:[],linkGroup:null},s[t]=e,u.seriesInvolved=u.seriesInvolved||i,null!=(r=function(t,e){for(var n=e.model,i=e.dim,o=0;o<t.length;o++){var r=t[o]||{};if(jw(r[i+"AxisId"],n.id)||jw(r[i+"AxisIndex"],n.componentIndex)||jw(r[i+"AxisName"],n.name))return o}}(p,n)))&&((o=d[r]||(d[r]={axesInfo:{}})).axesInfo[t]=e,o.mapper=p[r].mapper,e.linkGroup=o)}a.axisPointerEnabled&&(t=$w(a.model),s=u.coordSysAxesInfo[t]={},l=(u.coordSysMap[t]=a).model.getModel("tooltip",r),N(a.getAxes(),M(i,!1,null)),a.getTooltipAxes)&&r&&l.get("show")&&(t="axis"===l.get("trigger"),e="cross"===l.get(["axisPointer","type"]),n=a.getTooltipAxes(l.get(["axisPointer","axis"])),(t||e)&&N(n.baseAxes,M(i,!e||"cross",t)),e)&&N(n.otherAxes,M(i,"cross",!1))}),n.seriesInvolved&&(o=n,t.eachSeries(function(n){var i=n.coordinateSystem,t=n.get(["tooltip","trigger"],!0),e=n.get(["tooltip","show"],!0);i&&"none"!==t&&!1!==t&&"item"!==t&&!1!==e&&!1!==n.get(["axisPointer","show"],!0)&&N(o.coordSysAxesInfo[$w(i.model)],function(t){var e=t.axis;i.getAxis(e.dim)===e&&(t.seriesModels.push(n),null==t.seriesDataCount&&(t.seriesDataCount=0),t.seriesDataCount+=n.getData().count())})})),n}function jw(t,e){return"all"===t||F(t)&&0<=A(t,e)||t===e}function qw(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[$w(t)]}function Kw(t){return!!t.get(["handle","show"])}function $w(t){return t.type+"||"+t.id}var Jw,Qw={},tS=(u(eS,Jw=_g),eS.prototype.render=function(t,e,n,i){var o,r,a,s,l,u;this.axisPointerClass&&(o=qw(o=t))&&(l=o.axisPointerModel,r=o.axis.scale,a=l.option,u=l.get("status"),null!=(s=l.get("value"))&&(s=r.parse(s)),l=Kw(l),null==u&&(a.status=l?"show":"hide"),(u=r.getExtent().slice())[0]>u[1]&&u.reverse(),(s=null==s||s>u[1]?u[1]:s)<u[0]&&(s=u[0]),a.value=s,l)&&(a.status=o.axis.scale.isBlank()?"hide":"show"),Jw.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(t,n,!0)},eS.prototype.updateAxisPointer=function(t,e,n,i){this._doUpdateAxisPointerClass(t,n,!1)},eS.prototype.remove=function(t,e){var n=this._axisPointer;n&&n.remove(e)},eS.prototype.dispose=function(t,e){this._disposeAxisPointer(e),Jw.prototype.dispose.apply(this,arguments)},eS.prototype._doUpdateAxisPointerClass=function(t,e,n){var i,o=eS.getAxisPointerClass(this.axisPointerClass);o&&((i=(i=qw(i=t))&&i.axisPointerModel)?(this._axisPointer||(this._axisPointer=new o)).render(t,i,e,n):this._disposeAxisPointer(e))},eS.prototype._disposeAxisPointer=function(t){this._axisPointer&&this._axisPointer.dispose(t),this._axisPointer=null},eS.registerAxisPointerClass=function(t,e){Qw[t]=e},eS.getAxisPointerClass=function(t){return t&&Qw[t]},eS.type="axis",eS);function eS(){var t=null!==Jw&&Jw.apply(this,arguments)||this;return t.type=eS.type,t}var nS=Ko();var iS,oS,rS=["axisLine","axisTickLabel","axisName"],aS=["splitArea","splitLine","minorSplitLine"],cr=(u(hS,oS=tS),hS.prototype.render=function(o,t,e,n){this.group.removeAll();var r,i,a=this._axisGroup;this._axisGroup=new O,this.group.add(this._axisGroup),o.get("show")&&(i=Lw(r=o.getCoordSysModel(),o),i=new Fw(o,I({handleAutoShown:function(t){for(var e=r.coordinateSystem.getCartesians(),n=0;n<e.length;n++){var i=e[n].getOtherAxis(o.axis).type;if("value"===i||"log"===i)return!0}return!1}},i)),N(rS,i.add,i),this._axisGroup.add(i.getGroup()),N(aS,function(t){o.get([t,"show"])&&sS[t](this,this._axisGroup,o,r)},this),zh(a,this._axisGroup,o),oS.prototype.render.call(this,o,t,e,n))},hS.prototype.remove=function(){nS(this).splitAreaColors=null},hS.type="cartesianAxis",hS),sS={splitLine:function(t,e,n,i){var o=n.axis;if(!o.scale.isBlank())for(var n=n.getModel("splitLine"),r=n.getModel("lineStyle"),a=F(a=r.get("color"))?a:[a],s=i.coordinateSystem.getRect(),l=o.isHorizontal(),u=0,h=o.getTicksCoords({tickModel:n}),c=[],p=[],d=r.getLineStyle(),f=0;f<h.length;f++){var g=o.toGlobalCoord(h[f].coord),g=(l?(c[0]=g,c[1]=s.y,p[0]=g,p[1]=s.y+s.height):(c[0]=s.x,c[1]=g,p[0]=s.x+s.width,p[1]=g),u++%a.length),y=h[f].tickValue;e.add(new Nu({anid:null!=y?"line_"+h[f].tickValue:null,subPixelOptimize:!0,autoBatch:!0,shape:{x1:c[0],y1:c[1],x2:p[0],y2:p[1]},style:V({stroke:a[g]},d),silent:!0}))}},minorSplitLine:function(t,e,n,i){var o=n.axis,n=n.getModel("minorSplitLine").getModel("lineStyle"),r=i.coordinateSystem.getRect(),a=o.isHorizontal(),s=o.getMinorTicksCoords();if(s.length)for(var l=[],u=[],h=n.getLineStyle(),c=0;c<s.length;c++)for(var p=0;p<s[c].length;p++){var d=o.toGlobalCoord(s[c][p].coord);a?(l[0]=d,l[1]=r.y,u[0]=d,u[1]=r.y+r.height):(l[0]=r.x,l[1]=d,u[0]=r.x+r.width,u[1]=d),e.add(new Nu({anid:"minor_line_"+s[c][p].tickValue,subPixelOptimize:!0,autoBatch:!0,shape:{x1:l[0],y1:l[1],x2:u[0],y2:u[1]},style:h,silent:!0}))}},splitArea:function(t,e,n,i){var o=e,e=i,r=(i=n).axis;if(!r.scale.isBlank()){var i=i.getModel("splitArea"),n=i.getModel("areaStyle"),a=n.get("color"),s=e.coordinateSystem.getRect(),l=r.getTicksCoords({tickModel:i,clamp:!0});if(l.length){var u=a.length,h=nS(t).splitAreaColors,c=L(),p=0;if(h)for(var d=0;d<l.length;d++){var f=h.get(l[d].tickValue);if(null!=f){p=(f+(u-1)*d)%u;break}}for(var g=r.toGlobalCoord(l[0].coord),y=n.getAreaStyle(),a=F(a)?a:[a],d=1;d<l.length;d++){var m=r.toGlobalCoord(l[d].coord),v=void 0,_=void 0,x=void 0,b=void 0,g=r.isHorizontal()?(v=g,_=s.y,b=s.height,v+(x=m-v)):(v=s.x,_=g,x=s.width,_+(b=m-_)),m=l[d-1].tickValue;null!=m&&c.set(m,p),o.add(new ms({anid:null!=m?"area_"+m:null,shape:{x:v,y:_,width:x,height:b},style:V({fill:a[p]},y),autoBatch:!0,silent:!0})),p=(p+1)%u}nS(t).splitAreaColors=c}}}},lS=(u(uS,iS=cr),uS.type="xAxis",uS);function uS(){var t=null!==iS&&iS.apply(this,arguments)||this;return t.type=uS.type,t}function hS(){var t=null!==oS&&oS.apply(this,arguments)||this;return t.type=hS.type,t.axisPointerClass="CartesianAxisPointer",t}u(dS,cS=cr),dS.type="yAxis";var cS,pS=dS;function dS(){var t=null!==cS&&cS.apply(this,arguments)||this;return t.type=lS.type,t}u(mS,fS=_g),mS.prototype.render=function(t,e){this.group.removeAll(),t.get("show")&&this.group.add(new ms({shape:t.coordinateSystem.getRect(),style:V({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))},mS.type="grid";var fS,gS=mS,yS={offset:0};function mS(){var t=null!==fS&&fS.apply(this,arguments)||this;return t.type="grid",t}j1(function(t){t.registerComponentView(gS),t.registerComponentModel(dw),t.registerCoordinateSystem("cartesian2d",Rw),xw(t,"x",yw,yS),xw(t,"y",yw,yS),t.registerComponentView(lS),t.registerComponentView(pS),t.registerPreprocessor(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})})});u(SS,_S=g),SS.type="title",SS.defaultOption={zlevel:0,z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}};var vS,_S,xS=SS,bS=(u(wS,vS=_g),wS.prototype.render=function(t,e,n){var i,o,r,a,s,l,u,h,c;this.group.removeAll(),t.get("show")&&(i=this.group,u=t.getModel("textStyle"),o=t.getModel("subtextStyle"),h=t.get("textAlign"),c=P(t.get("textBaseline"),t.get("textVerticalAlign")),s=(u=new ws({style:Kh(u,{text:t.get("text"),fill:u.getTextColor()},{disableBox:!0}),z2:10})).getBoundingRect(),l=t.get("subtext"),o=new ws({style:Kh(o,{text:l,fill:o.getTextColor(),y:s.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),r=t.get("link"),a=t.get("sublink"),s=t.get("triggerEvent",!0),u.silent=!r&&!s,o.silent=!a&&!s,r&&u.on("click",function(){cp(r,"_"+t.get("target"))}),a&&o.on("click",function(){cp(a,"_"+t.get("subtarget"))}),z(u).eventData=z(o).eventData=s?{componentType:"title",componentIndex:t.componentIndex}:null,i.add(u),l&&i.add(o),s=i.getBoundingRect(),(l=t.getBoxLayoutParams()).width=s.width,l.height=s.height,l=mp(l,{width:n.getWidth(),height:n.getHeight()},t.get("padding")),h||("right"===(h="middle"===(h=t.get("left")||t.get("right"))?"center":h)?l.x+=l.width:"center"===h&&(l.x+=l.width/2)),c||("bottom"===(c="center"===(c=t.get("top")||t.get("bottom"))?"middle":c)?l.y+=l.height:"middle"===c&&(l.y+=l.height/2),c=c||"top"),i.x=l.x,i.y=l.y,i.markRedraw(),u.setStyle(n={align:h,verticalAlign:c}),o.setStyle(n),s=i.getBoundingRect(),u=l.margin,(h=t.getItemStyle(["color","opacity"])).fill=t.get("backgroundColor"),c=new ms({shape:{x:s.x-u[3],y:s.y-u[0],width:s.width+u[1]+u[3],height:s.height+u[0]+u[2],r:t.get("borderRadius")},style:h,subPixelOptimize:!0,silent:!0}),i.add(c))},wS.type="title",wS);function wS(){var t=null!==vS&&vS.apply(this,arguments)||this;return t.type=wS.type,t}function SS(){var t=null!==_S&&_S.apply(this,arguments)||this;return t.type=SS.type,t.layoutMode={type:"box",ignoreSize:!0},t}j1(function(t){t.registerComponentModel(xS),t.registerComponentView(bS)});u(CS,MS=g),CS.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n),t.selected=t.selected||{},this._updateSelector(t)},CS.prototype.mergeOption=function(t,e){MS.prototype.mergeOption.call(this,t,e),this._updateSelector(t)},CS.prototype._updateSelector=function(t){var n=t.selector,i=this.ecModel;F(n=!0===n?t.selector=["all","inverse"]:n)&&N(n,function(t,e){D(t)&&(t={type:t}),n[e]=p(t,(e=i,"all"===(t=t.type)?{type:"all",title:e.getLocale(["legend","selector","all"])}:"inverse"===t?{type:"inverse",title:e.getLocale(["legend","selector","inverse"])}:void 0))})},CS.prototype.optionUpdated=function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,n=0;n<t.length;n++){var i=t[n].get("name");if(this.isSelected(i)){this.select(i),e=!0;break}}e||this.select(t[0].get("name"))}},CS.prototype._updateData=function(i){var o=[],r=[];i.eachRawSeries(function(t){var e,n=t.name;r.push(n),t.legendVisualProvider&&(n=t.legendVisualProvider.getAllNames(),i.isSeriesFiltered(t)||(r=r.concat(n)),n.length)?o=o.concat(n):e=!0,e&&Xo(t)&&o.push(t.name)}),this._availableNames=r;var t=j(this.get("data")||o,function(t){return new fc(t="string"!=typeof t&&"number"!=typeof t?t:{name:t},this,this.ecModel)},this);this._data=t},CS.prototype.getData=function(){return this._data},CS.prototype.select=function(t){var e=this.option.selected;"single"===this.get("selectedMode")&&N(this._data,function(t){e[t.get("name")]=!1}),e[t]=!0},CS.prototype.unSelect=function(t){"single"!==this.get("selectedMode")&&(this.option.selected[t]=!1)},CS.prototype.toggleSelected=function(t){var e=this.option.selected;e.hasOwnProperty(t)||(e[t]=!0),this[e[t]?"unSelect":"select"](t)},CS.prototype.allSelect=function(){var t=this._data,e=this.option.selected;N(t,function(t){e[t.get("name",!0)]=!0})},CS.prototype.inverseSelect=function(){var t=this._data,e=this.option.selected;N(t,function(t){t=t.get("name",!0);e.hasOwnProperty(t)||(e[t]=!0),e[t]=!e[t]})},CS.prototype.isSelected=function(t){var e=this.option.selected;return!(e.hasOwnProperty(t)&&!e[t])&&0<=A(this._availableNames,t)},CS.prototype.getOrient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},CS.type="legend.plain",CS.dependencies=["series"],CS.defaultOption={zlevel:0,z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolSize:"auto",inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",decal:"inherit",shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit",shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:" sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}};var MS,TS=CS;function CS(){var t=null!==MS&&MS.apply(this,arguments)||this;return t.type=CS.type,t.layoutMode={type:"box",ignoreSize:!0},t}function IS(t,e){var n=ep(e.get("padding")),i=e.getItemStyle(["color","opacity"]);return i.fill=e.get("backgroundColor"),new ms({shape:{x:t.x-n[3],y:t.y-n[0],width:t.width+n[1]+n[3],height:t.height+n[0]+n[2],r:e.get("borderRadius")},style:i,silent:!0,z2:-1})}var AS,DS=M,kS=N,LS=O,PS=(u(OS,AS=_g),OS.prototype.init=function(){this.group.add(this._contentGroup=new LS),this.group.add(this._selectorGroup=new LS),this._isFirstRender=!0},OS.prototype.getContentGroup=function(){return this._contentGroup},OS.prototype.getSelectorGroup=function(){return this._selectorGroup},OS.prototype.render=function(t,e,n){var i,o,r,a,s,l=this._isFirstRender;this._isFirstRender=!1,this.resetInner(),t.get("show",!0)&&(a=t.get("align"),r=t.get("orient"),a&&"auto"!==a||(a="right"===t.get("left")&&"vertical"===r?"right":"left"),i=t.get("selector",!0),o=t.get("selectorPosition",!0),this.renderInner(a,t,e,n,i,r,o=!i||o&&"auto"!==o?o:"horizontal"===r?"end":"start"),s=mp(e=t.getBoxLayoutParams(),r={width:n.getWidth(),height:n.getHeight()},n=t.get("padding")),s=mp(V({width:(a=this.layoutInner(t,a,s,l,i,o)).width,height:a.height},e),r,n),this.group.x=s.x-a.x,this.group.y=s.y-a.y,this.group.markRedraw(),this.group.add(this._backgroundEl=IS(a,t)))},OS.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},OS.prototype.renderInner=function(l,u,h,c,t,e,n){var p=this.getContentGroup(),d=L(),f=u.get("selectedMode"),g=[];h.eachRawSeries(function(t){t.get("legendHoverLink")||g.push(t.id)}),kS(u.getData(),function(o,r){var t,e,n,i,a,s=o.get("name");this.newlineDisabled||""!==s&&"\n"!==s?(t=h.getSeriesByName(s)[0],d.get(s)||(t?(n=(e=t.getData()).getVisual("legendLineStyle")||{},i=e.getVisual("legendSymbol"),a=e.getVisual("style"),e.getVisual("symbolSize"),this._createItem(t,s,r,o,u,l,n,a,i,f).on("click",DS(RS,s,null,c,g)).on("mouseover",DS(ES,t.name,null,c,g)).on("mouseout",DS(BS,t.name,null,c,g)),d.set(s,!0)):h.eachRawSeries(function(t){var e,n,i;!d.get(s)&&t.legendVisualProvider&&(n=t.legendVisualProvider).containName(s)&&(i=n.indexOfName(s),e=n.getItemVisual(i,"style"),n=n.getItemVisual(i,"legendSymbol"),(i=yn(e.fill))&&0===i[3]&&(i[3]=.2,e.fill=Sn(i,"rgba")),this._createItem(t,s,r,o,u,l,{},e,n,f).on("click",DS(RS,null,s,c,g)).on("mouseover",DS(ES,null,s,c,g)).on("mouseout",DS(BS,null,s,c,g)),d.set(s,!0))},this))):((e=new LS).newline=!0,p.add(e))},this),t&&this._createSelector(t,u,c,e,n)},OS.prototype._createSelector=function(t,i,o,e,n){var r=this.getSelectorGroup();kS(t,function(t){var e=t.type,n=new ws({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){o.dispatchAction({type:"all"===e?"legendAllSelect":"legendInverseSelect"})}});r.add(n),jh(n,{normal:i.getModel("selectorLabel"),emphasis:i.getModel(["emphasis","selectorLabel"])},{defaultText:t.title}),xl(n)})},OS.prototype._createItem=function(t,e,n,i,o,r,a,s,l,u){var h=t.visualDrawType,c=o.get("itemWidth"),p=o.get("itemHeight"),d=o.isSelected(e),f=i.get("symbolKeepAspect"),g=i.get("icon"),a=function(t,e,n,i,o,r,a){for(var s=e.getModel("itemStyle"),l=uc.concat([["decal"]]),u={},h=0;h<l.length;++h){var c=l[h][l[h].length-1],p=l[h][0];if("inherit"===(d=s.getShallow(c)))switch(p){case"fill":u.fill=o[r];break;case"stroke":u.stroke=o[t.startsWith("empty")?"fill":"stroke"];break;case"opacity":u.opacity=("fill"===r?o:i).opacity;break;default:u[p]=o[p]}else"auto"===d&&"lineWidth"===p?u.lineWidth=0<o.lineWidth?2:0:u[p]=d}var d,f=e.getModel("lineStyle"),g=ac.concat([["inactiveColor"],["inactiveWidth"]]),y={};for(h=0;h<g.length;++h)c=g[h][1],p=g[h][0],"inherit"===(d=f.getShallow(c))?y[p]=i[p]:"auto"===d&&"lineWidth"===p?y.lineWidth=0<i.lineWidth?2:0:y[p]=d;{var m;"auto"===u.fill&&(u.fill=o.fill),"auto"===u.stroke&&(u.stroke=o.fill),"auto"===y.stroke&&(y.stroke=o.fill),a||(a=e.get("inactiveBorderWidth"),m=u[-1<t.indexOf("empty")?"fill":"stroke"],u.lineWidth="auto"===a?0<o.lineWidth&&m?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),y.stroke=n.get("inactiveColor"),y.lineWidth=n.get("inactiveWidth"))}return{itemStyle:u,lineStyle:y}}(l=g||l||"roundRect",i,o.getModel("lineStyle"),a,s,h,d),s=new LS,h=i.getModel("textStyle"),g=("function"!=typeof t.getLegendIcon||g?s.add((g={itemWidth:c,itemHeight:p,symbolType:l,symbolKeepAspect:f,itemStyle:a.itemStyle,lineStyle:a.lineStyle},y=g.symbolType||"roundRect",(m=nm(y,0,0,g.itemWidth,g.itemHeight,g.itemStyle.fill,g.symbolKeepAspect)).setStyle(g.itemStyle),-1<y.indexOf("empty")&&(m.style.stroke=m.style.fill,m.style.fill="#fff",m.style.lineWidth=2),m)):s.add(t.getLegendIcon({itemWidth:c,itemHeight:p,symbolType:l,symbolKeepAspect:f,itemStyle:a.itemStyle,lineStyle:a.lineStyle})),"left"===r?c+5:-5),y=r,m=o.get("formatter"),t=e,l=("string"==typeof m&&m?t=m.replace("{name}",null!=e?e:""):"function"==typeof m&&(t=m(e)),i.get("inactiveColor")),f=(s.add(new ws({style:Kh(h,{text:t,x:g,y:p/2,fill:d?h.getTextColor():l,align:y,verticalAlign:"middle"})})),new ms({shape:s.getBoundingRect(),invisible:!0})),a=i.getModel("tooltip");return a.get("show")&&Wh({el:f,componentModel:o,itemName:e,itemTooltipOption:a.option}),s.add(f),s.eachChild(function(t){t.silent=!0}),f.silent=!u,this.getContentGroup().add(s),xl(s),s.__legendDataIndex=n,s},OS.prototype.layoutInner=function(t,e,n,i,o,r){var a,s,l,u,h,c=this.getContentGroup(),p=this.getSelectorGroup(),n=(yp(t.get("orient"),c,t.get("itemGap"),n.width,n.height),c.getBoundingRect()),d=[-n.x,-n.y];return p.markRedraw(),c.markRedraw(),o?(yp("horizontal",p,t.get("selectorItemGap",!0)),a=[-(o=p.getBoundingRect()).x,-o.y],s=t.get("selectorButtonGap",!0),l=0===(t=t.getOrient().index)?"width":"height",u=0===t?"height":"width",h=0===t?"y":"x","end"===r?a[t]+=n[l]+s:d[t]+=o[l]+s,a[1-t]+=n[u]/2-o[u]/2,p.x=a[0],p.y=a[1],c.x=d[0],c.y=d[1],(r={x:0,y:0})[l]=n[l]+s+o[l],r[u]=Math.max(n[u],o[u]),r[h]=Math.min(0,o[h]+a[1-t]),r):(c.x=d[0],c.y=d[1],this.group.getBoundingRect())},OS.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},OS.type="legend.plain",OS);function OS(){var t=null!==AS&&AS.apply(this,arguments)||this;return t.type=OS.type,t.newlineDisabled=!1,t}function RS(t,e,n,i){BS(t,e,n,i),n.dispatchAction({type:"legendToggleSelect",name:null!=t?t:e}),ES(t,e,n,i)}function NS(t){for(var e,n=t.getZr().storage.getDisplayList(),i=0,o=n.length;i<o&&!(e=n[i].states.emphasis);)i++;return e&&e.hoverLayer}function ES(t,e,n,i){NS(n)||n.dispatchAction({type:"highlight",seriesName:t,name:e,excludeSeriesId:i})}function BS(t,e,n,i){NS(n)||n.dispatchAction({type:"downplay",seriesName:t,name:e,excludeSeriesId:i})}function zS(t){var n=t.findComponents({mainType:"legend"});n&&n.length&&t.filterSeries(function(t){for(var e=0;e<n.length;e++)if(!n[e].isSelected(t.name))return!1;return!0})}function VS(t,e,n){var i,o={},r="toggleSelected"===t;return n.eachComponent("legend",function(n){r&&null!=i?n[i?"select":"unSelect"](e.name):"allSelect"===t||"inverseSelect"===t?n[t]():(n[t](e.name),i=n.isSelected(e.name)),N(n.getData(),function(t){var e,t=t.get("name");"\n"!==t&&""!==t&&(e=n.isSelected(t),o.hasOwnProperty(t)?o[t]=o[t]&&e:o[t]=e)})}),"allSelect"===t||"inverseSelect"===t?{selected:o}:{name:e.name,selected:o}}function FS(t){t.registerComponentModel(TS),t.registerComponentView(PS),t.registerProcessor(t.PRIORITY.PROCESSOR.SERIES_FILTER,zS),t.registerSubTypeDefaulter("legend",function(){return"plain"}),(t=t).registerAction("legendToggleSelect","legendselectchanged",M(VS,"toggleSelected")),t.registerAction("legendAllSelect","legendselectall",M(VS,"allSelect")),t.registerAction("legendInverseSelect","legendinverseselect",M(VS,"inverseSelect")),t.registerAction("legendSelect","legendselected",M(VS,"select")),t.registerAction("legendUnSelect","legendunselected",M(VS,"unSelect"))}u(WS,HS=TS),WS.prototype.setScrollDataIndex=function(t){this.option.scrollDataIndex=t},WS.prototype.init=function(t,e,n){var i=bp(t);HS.prototype.init.call(this,t,e,n),US(this,t,i)},WS.prototype.mergeOption=function(t,e){HS.prototype.mergeOption.call(this,t,e),US(this,this.option,t)},WS.type="legend.scroll",WS.defaultOption=vc(TS.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800});var HS,GS=WS;function WS(){var t=null!==HS&&HS.apply(this,arguments)||this;return t.type=WS.type,t}function US(t,e,n){var i=[1,1];i[t.getOrient().index]=0,xp(e,n,{type:"box",ignoreSize:!!i})}var YS,XS=O,ZS=["width","height"],jS=["x","y"],qS=(u(KS,YS=PS),KS.prototype.init=function(){YS.prototype.init.call(this),this.group.add(this._containerGroup=new XS),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new XS)},KS.prototype.resetInner=function(){YS.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},KS.prototype.renderInner=function(t,i,e,o,n,r,a){var s=this,l=(YS.prototype.renderInner.call(this,t,i,e,o,n,r,a),this._controllerGroup),t=i.get("pageIconSize",!0),u=F(t)?t:[t,t],e=(h("pagePrev",0),i.getModel("pageTextStyle"));function h(t,e){var n=t+"DataIndex",e=Hh(i.get("pageIcons",!0)[i.getOrient().name][e],{onclick:S(s._pageGo,s,n,i,o)},{x:-u[0]/2,y:-u[1]/2,width:u[0],height:u[1]});e.name=t,l.add(e)}l.add(new ws({name:"pageText",style:{text:"xx/xx",fill:e.getTextColor(),font:e.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),h("pageNext",1)},KS.prototype.layoutInner=function(t,e,n,i,o,r){var a=this.getSelectorGroup(),s=t.getOrient().index,l=ZS[s],u=jS[s],h=ZS[1-s],c=jS[1-s],p=(o&&yp("horizontal",a,t.get("selectorItemGap",!0)),t.get("selectorButtonGap",!0)),d=a.getBoundingRect(),f=[-d.x,-d.y],g=C(n),n=(o&&(g[l]=n[l]-d[l]-p),this._layoutContentAndController(t,i,g,s,l,h,c,u));return o&&("end"===r?f[s]+=n[l]+p:(t=d[l]+p,f[s]-=t,n[u]-=t),n[l]+=d[l]+p,f[1-s]+=n[c]+n[h]/2-d[h]/2,n[h]=Math.max(n[h],d[h]),n[c]=Math.min(n[c],d[c]+f[1-s]),a.x=f[0],a.y=f[1],a.markRedraw()),n},KS.prototype._layoutContentAndController=function(t,e,n,i,o,r,a,s){var l=this.getContentGroup(),u=this._containerGroup,h=this._controllerGroup,c=(yp(t.get("orient"),l,t.get("itemGap"),i?n.width:null,i?null:n.height),yp("horizontal",h,t.get("pageButtonItemGap",!0)),l.getBoundingRect()),p=h.getBoundingRect(),d=this._showController=c[o]>n[o],f=[-c.x,-c.y],e=(e||(f[i]=l[s]),[0,0]),s=[-p.x,-p.y],g=P(t.get("pageButtonGap",!0),t.get("itemGap",!0)),f=(d&&("end"===t.get("pageButtonPosition",!0)?s[i]+=n[o]-p[o]:e[i]+=p[o]+g),s[1-i]+=c[r]/2-p[r]/2,l.setPosition(f),u.setPosition(e),h.setPosition(s),{x:0,y:0}),c=(f[o]=(d?n:c)[o],f[r]=Math.max(c[r],p[r]),f[a]=Math.min(0,p[a]+s[1-i]),u.__rectSize=n[o],d?((e={x:0,y:0})[o]=Math.max(n[o]-p[o]-g,0),e[r]=f[r],u.setClipPath(new ms({shape:e})),u.__rectSize=e[o]):h.eachChild(function(t){t.attr({invisible:!0,silent:!0})}),this._getPageInfo(t));return null!=c.pageIndex&&Ah(l,{x:c.contentPosition[0],y:c.contentPosition[1]},d?t:null),this._updatePageInfoView(t,c),f},KS.prototype._pageGo=function(t,e,n){t=this._getPageInfo(e)[t];null!=t&&n.dispatchAction({type:"legendScroll",scrollDataIndex:t,legendId:e.id})},KS.prototype._updatePageInfoView=function(n,i){var o=this._controllerGroup,t=(N(["pagePrev","pageNext"],function(t){var e=null!=i[t+"DataIndex"],t=o.childOfName(t);t&&(t.setStyle("fill",e?n.get("pageIconColor",!0):n.get("pageIconInactiveColor",!0)),t.cursor=e?"pointer":"default")}),o.childOfName("pageText")),e=n.get("pageFormatter"),r=i.pageIndex,r=null!=r?r+1:0,a=i.pageCount;t&&e&&t.setStyle("text",D(e)?e.replace("{current}",null==r?"":r+"").replace("{total}",null==a?"":a+""):e({current:r,total:a}))},KS.prototype._getPageInfo=function(t){var e=t.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,t=t.getOrient().index,o=ZS[t],r=jS[t],e=this._findTargetItemIndex(e),a=n.children(),s=a[e],l=a.length,u=l?1:0,h={contentPosition:[n.x,n.y],pageCount:u,pageIndex:u-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(s){n=g(s);h.contentPosition[t]=-n.s;for(var c=e+1,p=n,d=n,f=null;c<=l;++c)(!(f=g(a[c]))&&d.e>p.s+i||f&&!y(f,p.s))&&(p=d.i>p.i?d:f)&&(null==h.pageNextDataIndex&&(h.pageNextDataIndex=p.i),++h.pageCount),d=f;for(c=e-1,d=p=n,f=null;-1<=c;--c)(f=g(a[c]))&&y(d,f.s)||!(p.i<d.i)||(d=p,null==h.pagePrevDataIndex&&(h.pagePrevDataIndex=p.i),++h.pageCount,++h.pageIndex),p=f}return h;function g(t){var e,n;if(t)return{s:n=(e=t.getBoundingRect())[r]+t[r],e:n+e[o],i:t.__legendDataIndex}}function y(t,e){return t.e>=e&&t.s<=e+i}},KS.prototype._findTargetItemIndex=function(n){return this._showController?(this.getContentGroup().eachChild(function(t,e){t=t.__legendDataIndex;null==o&&null!=t&&(o=e),t===n&&(i=e)}),null!=i?i:o):0;var i,o},KS.type="legend.scroll",KS);function KS(){var t=null!==YS&&YS.apply(this,arguments)||this;return t.type=KS.type,t.newlineDisabled=!0,t._currentIndex=0,t}j1(function(t){j1(FS),t.registerComponentModel(GS),t.registerComponentView(qS),t.registerAction("legendScroll","legendscroll",function(t,e){var n=t.scrollDataIndex;null!=n&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(t){t.setScrollDataIndex(n)})})});var $S=Ko(),JS=C,QS=S;function tM(){this._dragging=!1,this.animationThreshold=15}function eM(t,e,n,i){!function n(i,t){{var o;if(k(i)&&k(t))return o=!0,N(t,function(t,e){o=o&&n(i[e],t)}),!!o}return i===t}($S(n).lastProp,i)&&($S(n).lastProp=i,e?Ah(n,i,t):(n.stopAnimation(),n.attr(i)))}function nM(t,e){t[e.get(["label","show"])?"show":"hide"]()}function iM(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function oM(t,e,n){var i=e.get("z"),o=e.get("zlevel");t&&t.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=o&&(t.zlevel=o),t.silent=n)})}function rM(t,e,n,i,o){var r=aM(n.get("value"),e.axis,e.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),n=n.getModel("label"),a=ep(n.get("padding")||0),s=n.getFont(),l=oi(r,s),u=o.position,h=l.width+a[1]+a[3],l=l.height+a[0]+a[2],c=o.align,c=("right"===c&&(u[0]-=h),"center"===c&&(u[0]-=h/2),o.verticalAlign),i=("bottom"===c&&(u[1]-=l),"middle"===c&&(u[1]-=l/2),o=u,c=h,h=l,i=(l=i).getWidth(),l=l.getHeight(),o[0]=Math.min(o[0]+c,i)-c,o[1]=Math.min(o[1]+h,l)-h,o[0]=Math.max(o[0],0),o[1]=Math.max(o[1],0),n.get("backgroundColor"));i&&"auto"!==i||(i=e.get(["axisLine","lineStyle","color"])),t.label={x:u[0],y:u[1],style:Kh(n,{text:r,font:s,fill:n.getTextColor(),padding:a,backgroundColor:i}),z2:10}}function aM(t,e,n,i,o){t=e.scale.parse(t);var r,a=e.scale.getLabel({value:t},{precision:o.precision}),o=o.formatter;return o&&(r={value:V1(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]},N(i,function(t){var e=n.getSeriesByIndex(t.seriesIndex),t=t.dataIndexInside,e=e&&e.getDataParams(t);e&&r.seriesData.push(e)}),D(o)?a=o.replace("{value}",a):ut(o)&&(a=o(r))),a}function sM(t,e,n){var i=Pe();return Be(i,i,n.rotation),Ee(i,i,n.position),Nh([t.dataToCoord(e),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}tM.prototype.render=function(t,e,n,i){var o,r,a=e.get("value"),s=e.get("status");this._axisModel=t,this._axisPointerModel=e,this._api=n,!i&&this._lastValue===a&&this._lastStatus===s||(this._lastValue=a,this._lastStatus=s,i=this._group,o=this._handle,s&&"hide"!==s?(i&&i.show(),o&&o.show(),this.makeElOption(s={},a,t,e,n),(r=s.graphicKey)!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=r,r=this._moveAnimation=this.determineAnimation(t,e),i?(r=M(eM,e,r),this.updatePointerEl(i,s,r),this.updateLabelEl(i,s,r,e)):(i=this._group=new O,this.createPointerEl(i,s,t,e),this.createLabelEl(i,s,t,e),n.getZr().add(i)),oM(i,e,!0),this._renderHandle(a)):(i&&i.hide(),o&&o.hide()))},tM.prototype.remove=function(t){this.clear(t)},tM.prototype.dispose=function(t){this.clear(t)},tM.prototype.determineAnimation=function(t,e){var n,i=e.get("animation"),o=t.axis,r="category"===o.type,e=e.get("snap");return!(!e&&!r)&&("auto"===i||null==i?(n=this.animationThreshold,r&&o.getBandWidth()>n||!!e&&(r=qw(t).seriesDataCount,e=o.getExtent(),Math.abs(e[0]-e[1])/r>n)):!0===i)},tM.prototype.makeElOption=function(t,e,n,i,o){},tM.prototype.createPointerEl=function(t,e,n,i){var o=e.pointer;o&&(o=$S(t).pointerEl=new Uh[o.type](JS(e.pointer)),t.add(o))},tM.prototype.createLabelEl=function(t,e,n,i){e.label&&(e=$S(t).labelEl=new ws(JS(e.label)),t.add(e),nM(e,i))},tM.prototype.updatePointerEl=function(t,e,n){t=$S(t).pointerEl;t&&e.pointer&&(t.setStyle(e.pointer.style),n(t,{shape:e.pointer.shape}))},tM.prototype.updateLabelEl=function(t,e,n,i){t=$S(t).labelEl;t&&(t.setStyle(e.label.style),n(t,{x:e.label.x,y:e.label.y}),nM(t,i))},tM.prototype._renderHandle=function(t){var e,n,i,o,r,a;!this._dragging&&this.updateHandleTransform&&(n=this._axisPointerModel,i=this._api.getZr(),o=this._handle,r=n.getModel("handle"),a=n.get("status"),r.get("show")&&a&&"hide"!==a?(this._handle||(e=!0,o=this._handle=Hh(r.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){ye(t.event)},onmousedown:QS(this._onHandleDragMove,this,0,0),drift:QS(this._onHandleDragMove,this),ondragend:QS(this._onHandleDragEnd,this)}),i.add(o)),oM(o,n,!1),o.setStyle(r.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"])),F(a=r.get("size"))||(a=[a,a]),o.scaleX=a[0]/2,o.scaleY=a[1]/2,Ng(this,"_doDispatchAxisPointer",r.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)):(o&&i.remove(o),this._handle=null))},tM.prototype._moveHandleToValue=function(t,e){eM(this._axisPointerModel,!e&&this._moveAnimation,this._handle,iM(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},tM.prototype._onHandleDragMove=function(t,e){var n=this._handle;n&&(this._dragging=!0,t=this.updateHandleTransform(iM(n),[t,e],this._axisModel,this._axisPointerModel),this._payloadInfo=t,n.stopAnimation(),n.attr(iM(t)),$S(n).lastProp=null,this._doDispatchAxisPointer())},tM.prototype._doDispatchAxisPointer=function(){var t,e;this._handle&&(t=this._payloadInfo,e=this._axisModel,this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]}))},tM.prototype._onHandleDragEnd=function(){var t;this._dragging=!1,this._handle&&(t=this._axisPointerModel.get("value"),this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"}))},tM.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var t=t.getZr(),e=this._group,n=this._handle;t&&e&&(this._lastGraphicKey=null,e&&t.remove(e),n&&t.remove(n),this._group=null,this._handle=null,this._payloadInfo=null)},tM.prototype.doClear=function(){},tM.prototype.buildLabel=function(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}};u(hM,lM=tM),hM.prototype.makeElOption=function(t,e,n,i,o){var r,a,s=n.axis,l=s.grid,u=i.get("type"),h=cM(l,s).getOtherAxis(s).getGlobalExtent(),c=s.toGlobalCoord(s.dataToCoord(e,!0)),p=(u&&"none"!==u&&(r=(a=i).get("type"),a=a.getModel(r+"Style"),"line"===r?(p=a.getLineStyle()).fill=null:"shadow"===r&&((p=a.getAreaStyle()).stroke=null),r=p,(a=pM[u](s,c,h)).style=r,t.graphicKey=a.type,t.pointer=a),Lw(l.model,n));u=e,s=t,c=p,h=n,r=i,a=o,l=Fw.innerTextLayout(c.rotation,0,c.labelDirection),c.labelMargin=r.get(["label","margin"]),rM(s,h,r,a,{position:sM(h.axis,u,c),align:l.textAlign,verticalAlign:l.textVerticalAlign})},hM.prototype.getHandleTransform=function(t,e,n){var i=Lw(e.axis.grid.model,e,{labelInside:!1}),n=(i.labelMargin=n.get(["handle","margin"]),sM(e.axis,t,i));return{x:n[0],y:n[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},hM.prototype.updateHandleTransform=function(t,e,n,i){var n=n.axis,o=n.grid,r=n.getGlobalExtent(!0),o=cM(o,n).getOtherAxis(n).getGlobalExtent(),n="x"===n.dim?0:1,a=[t.x,t.y],e=(a[n]+=e[n],a[n]=Math.min(r[1],a[n]),a[n]=Math.max(r[0],a[n]),(o[1]+o[0])/2),r=[e,e];return r[n]=a[n],{x:a[0],y:a[1],rotation:t.rotation,cursorPoint:r,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][n]}};var lM,uM=hM;function hM(){return null!==lM&&lM.apply(this,arguments)||this}function cM(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}var pM={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:(i=[e,n[0]],e=[e,n[1]],n=dM(t),{x1:i[n=n||0],y1:i[1-n],x2:e[n],y2:e[1-n]})};var i},shadow:function(t,e,n){var i=Math.max(1,t.getBandWidth()),o=n[1]-n[0];return{type:"Rect",shape:(e=[e-i/2,n[0]],n=[i,o],i=dM(t),{x:e[i=i||0],y:e[1-i],width:n[i],height:n[1-i]})}}};function dM(t){return"x"===t.dim?0:1}u(yM,fM=g),yM.type="axisPointer",yM.defaultOption={show:"auto",zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}};var fM,gM=yM;function yM(){var t=null!==fM&&fM.apply(this,arguments)||this;return t.type=yM.type,t}var mM=Ko(),vM=N;function _M(t,e,n){var i,c,p;function o(t,h){c.on(t,function(e){n=p;var n,i,t,o,r,a,s,l={dispatchAction:u,pendings:i={showTip:[],hideTip:[]}};function u(t){var e=i[t.type];e?e.push(t):(t.dispatchAction=u,n.dispatchAction(t))}vM(mM(c).records,function(t){t&&h(t,e,l.dispatchAction)}),o=p,a=(t=l.pendings).showTip.length,s=t.hideTip.length,a?r=t.showTip[a-1]:s&&(r=t.hideTip[s-1]),r&&(r.dispatchAction=null,o.dispatchAction(r))})}w.node||(i=e.getZr(),mM(i).records||(mM(i).records={}),p=e,mM(c=i).initialized||(mM(c).initialized=!0,o("click",M(bM,"click")),o("mousemove",M(bM,"mousemove")),o("globalout",xM)),(mM(i).records[t]||(mM(i).records[t]={})).handler=n)}function xM(t,e,n){t.handler("leave",null,n)}function bM(t,e,n,i){e.handler(t,n,i)}function wM(t,e){w.node||(e=e.getZr(),(mM(e).records||{})[t]&&(mM(e).records[t]=null))}u(TM,SM=_g),TM.prototype.render=function(t,e,n){var e=e.getComponent("tooltip"),i=t.get("triggerOn")||e&&e.get("triggerOn")||"mousemove|click";_M("axisPointer",n,function(t,e,n){"none"!==i&&("leave"===t||0<=i.indexOf(t))&&n({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})})},TM.prototype.remove=function(t,e){wM("axisPointer",e)},TM.prototype.dispose=function(t,e){wM("axisPointer",e)},TM.type="axisPointer";var SM,MM=TM;function TM(){var t=null!==SM&&SM.apply(this,arguments)||this;return t.type=TM.type,t}function CM(t,e){var n,i,o,r,a=[],s=t.seriesIndex;return null==s||!(e=e.getSeriesByIndex(s))||null==(s=qo(n=e.getData(),t))||s<0||F(s)?{point:[]}:(i=n.getItemGraphicEl(s),o=e.coordinateSystem,e.getTooltipPosition?a=e.getTooltipPosition(s)||[]:o&&o.dataToPoint?a=t.isStacked?(e=o.getBaseAxis(),t=o.getOtherAxis(e).dim,e=e.dim,t="x"===t||"radius"===t?1:0,e=n.mapDimension(e),(r=[])[t]=n.get(e,s),r[1-t]=n.get(n.getCalculationInfo("stackResultDimension"),s),o.dataToPoint(r)||[]):o.dataToPoint(n.getValues(j(o.dimensions,function(t){return n.mapDimension(t)}),s))||[]:i&&((e=i.getBoundingRect().clone()).applyTransform(i.transform),a=[e.x+e.width/2,e.y+e.height/2]),{point:a,el:i})}var IM=Ko();function AM(t,e,n){var r,a,i,s,l,o,u,h,c,p,d,f,g,y,m=t.currTrigger,v=[t.x,t.y],_=t,x=t.dispatchAction||S(n.dispatchAction,n),b=e.getComponent("axisPointer").coordSysAxesInfo;if(b)return OM(v)&&(v=CM({seriesIndex:_.seriesIndex,dataIndex:_.dataIndex},e).point),r=OM(v),a=_.axesInfo,i=b.axesInfo,s="leave"===m||OM(v),l={},e={list:[],map:{}},u={showPointer:M(kM,o={}),showTooltip:M(LM,e)},N(b.coordSysMap,function(t,e){var o=r||t.containPoint(v);N(b.coordSysAxesInfo[e],function(t,e){var n=t.axis,i=function(t,e){for(var n=0;n<(t||[]).length;n++){var i=t[n];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}(a,t);s||!o||a&&!i||null!=(i=null!=(i=i&&i.value)||r?i:n.pointToData(v))&&DM(t,i,u,!1,l)})}),h={},N(i,function(n,t){var i=n.linkGroup;i&&!o[t]&&N(i.axesInfo,function(t,e){var e=o[e];t!==n&&e&&(e=e.value,i.mapper&&(e=n.axis.scale.parse(i.mapper(e,PM(t),PM(n)))),h[n.key]=e)})}),N(h,function(t,e){DM(i[e],t,u,!0,l)}),g=o,_=i,y=l.axesInfo=[],N(_,function(t,e){var n=t.axisPointerModel.option,e=g[e];e?(t.useHandle||(n.status="show"),n.value=e.value,n.seriesDataIndices=(e.payloadBatch||[]).slice()):t.useHandle||(n.status="hide"),"show"===n.status&&y.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:n.value})}),m=e,_=t,e=x,!OM(t=v)&&m.list.length?(x=((m.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{},e({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:_.tooltipOption,position:_.position,dataIndexInside:x.dataIndexInside,dataIndex:x.dataIndex,seriesIndex:x.seriesIndex,dataByCoordSys:m.list})):e({type:"hideTip"}),t=i,x=(_=n).getZr(),m="axisPointerLastHighlights",c=IM(x)[m]||{},p=IM(x)[m]={},N(t,function(t,e){t=t.axisPointerModel.option;"show"===t.status&&N(t.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;p[e]=t})}),d=[],f=[],N(c,function(t,e){p[e]||f.push(t)}),N(p,function(t,e){c[e]||d.push(t)}),f.length&&_.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:f}),d.length&&_.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:d}),l}function DM(t,e,n,i,o){var r,a,s,l,u,h,c,p,d,f,g=t.axis;!g.scale.isBlank()&&g.containData(e)&&(t.involveSeries?(l=e,u=t.axis,h=u.dim,c=l,p=[],d=Number.MAX_VALUE,f=-1,N(t.seriesModels,function(e,t){var n,i=e.getData().mapDimensionsAll(h);if(e.getAxisTooltipData)var o=e.getAxisTooltipData(i,l,u),r=o.dataIndices,o=o.nestestValue;else{if(!(r=e.getData().indicesOfNearest(i[0],l,"category"===u.type?.5:null)).length)return;o=e.getData().get(i[0],r[0])}null!=o&&isFinite(o)&&(i=l-o,(n=Math.abs(i))<=d)&&((n<d||0<=i&&f<0)&&(d=n,f=i,c=o,p.length=0),N(r,function(t){p.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})}))}),s=(r={payloadBatch:p,snapToValue:c}).snapToValue,(a=r.payloadBatch)[0]&&null==o.seriesIndex&&I(o,a[0]),!i&&t.snap&&g.containData(s)&&null!=s&&(e=s),n.showPointer(t,e,a),n.showTooltip(t,r,s)):n.showPointer(t,e))}function kM(t,e,n,i){t[e.key]={value:n,payloadBatch:i}}function LM(t,e,n,i){var o,r,n=n.payloadBatch,a=e.axis,s=a.model,l=e.axisPointerModel;e.triggerTooltip&&n.length&&(o=$w(e=e.coordSys.model),(r=t.map[o])||(r=t.map[o]={coordSysId:e.id,coordSysIndex:e.componentIndex,coordSysType:e.type,coordSysMainType:e.mainType,dataByAxis:[]},t.list.push(r)),r.dataByAxis.push({axisDim:a.dim,axisIndex:s.componentIndex,axisType:s.type,axisId:s.id,value:i,valueLabelOpt:{precision:l.get(["label","precision"]),formatter:l.get(["label","formatter"])},seriesDataIndices:n.slice()}))}function PM(t){var e=t.axis.model,n={},t=n.axisDim=t.axis.dim;return n.axisIndex=n[t+"AxisIndex"]=e.componentIndex,n.axisName=n[t+"AxisName"]=e.name,n.axisId=n[t+"AxisId"]=e.id,n}function OM(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function RM(t){tS.registerAxisPointerClass("CartesianAxisPointer",uM),t.registerComponentModel(gM),t.registerComponentView(MM),t.registerPreprocessor(function(t){var e;t&&(t.axisPointer&&0!==t.axisPointer.length||(t.axisPointer={}),e=t.axisPointer.link)&&!F(e)&&(t.axisPointer.link=[e])}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=Zw(t,e)}),t.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},AM)}u(BM,NM=g),BM.type="tooltip",BM.dependencies=["axisPointer"],BM.defaultOption={zlevel:0,z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}};var NM,EM=BM;function BM(){var t=null!==NM&&NM.apply(this,arguments)||this;return t.type=BM.type,t}function zM(t){var e=t.get("confine");return null!=e?e:"richText"===t.get("renderMode")}function VM(t){if(w.domSupported)for(var e=document.documentElement.style,n=0,i=t.length;n<i;n++)if(t[n]in e)return t[n]}var FM=VM(["transform","webkitTransform","OTransform","MozTransform","msTransform"]);function HM(t,e){if(!t)return e;e=tp(e,!0);var n=t.indexOf(e);return(t=-1===n?e:"-"+t.slice(0,n)+"-"+e).toLowerCase()}function GM(t,e){t=t.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(t);return t?e?t[e]:t:null}var WM=HM(VM(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),"transition"),UM=HM(FM,"transform"),YM="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(w.transform3dSupported?"will-change:transform;":"");function XM(t,e,n){var i,t=t.toFixed(0)+"px",e=e.toFixed(0)+"px";return w.transformSupported?(i="translate"+((i=w.transform3dSupported)?"3d":"")+"("+t+","+e+(i?",0":"")+")",n?"top:0;left:0;"+UM+":"+i+";":[["top",0],["left",0],[FM,i]]):n?"top:"+e+";left:"+t+";":[["top",e],["left",t]]}function ZM(i,t,e){var n,o,r=[],a=i.get("transitionDuration"),s=i.get("backgroundColor"),l=i.get("shadowBlur"),u=i.get("shadowColor"),h=i.get("shadowOffsetX"),c=i.get("shadowOffsetY"),p=i.getModel("textStyle"),d=ig(i,"html");return r.push("box-shadow:"+(h+"px "+c+"px "+l+"px "+u)),t&&a&&r.push((u="opacity"+(l=" "+(h=a)/2+"s "+(c="cubic-bezier(0.23,1,0.32,1)"))+",visibility"+l,e||(l=" "+h+"s "+c,u+=w.transformSupported?","+FM+l:",left"+l+",top"+l),WM+":"+u)),s&&(w.canvasSupported?r.push("background-color:"+s):(r.push("background-color:#"+_n(s)),r.push("filter:alpha(opacity=70)"))),N(["width","color","radius"],function(t){var e="border-"+t,n=tp(e),n=i.get(n);null!=n&&r.push(e+":"+n+("color"===t?"":"px"))}),r.push((o=[],t=(n=p).get("fontSize"),(a=n.getTextColor())&&o.push("color:"+a),o.push("font:"+n.getFont()),t&&o.push("line-height:"+Math.round(3*t/2)+"px"),a=n.get("textShadowColor"),t=n.get("textShadowBlur")||0,e=n.get("textShadowOffsetX")||0,h=n.get("textShadowOffsetY")||0,a&&t&&o.push("text-shadow:"+e+"px "+h+"px "+t+"px "+a),N(["decoration","align"],function(t){var e=n.get(t);e&&o.push("text-"+t+":"+e)}),o.join(";"))),null!=d&&r.push("padding:"+ep(d).join("px ")+"px"),r.join(";")+";"}function jM(t,e,n,i,o){var r,a,s=e&&e.painter;n?(n=s&&s.getViewportRoot())&&(r=t,a=document.body,ae(re,n,i,o,!0))&&ae(r,a,re[0],re[1]):(t[0]=i,t[1]=o,(n=s&&s.getViewportRootOffset())&&(t[0]+=n.offsetLeft,t[1]+=n.offsetTop)),t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}KM.prototype.update=function(t){var e=this._container,n=GM(e,"position"),e=e.style;"absolute"!==e.position&&"absolute"!==n&&(e.position="relative"),t.get("alwaysShowContent")&&this._moveIfResized(),this.el.className=t.get("className")||""},KM.prototype.show=function(t,e){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,i=n.style,o=this._styleCoord;n.innerHTML?i.cssText=YM+ZM(t,!this._firstShow,this._longHide)+XM(o[0],o[1],!0)+"border-color:"+hp(e)+";"+(t.get("extraCssText")||"")+";pointer-event:"+(this._enterable?"auto":"none"):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},KM.prototype.setContent=function(t,e,n,i,o){if(null!=t){var r=this.el;if(D(o)&&"item"===n.get("trigger")&&!zM(n)&&(t+=function(t,e,n){if(!D(n)||"inside"===n)return"";e=hp(e);var i=(n="left"===(n=n)?"right":"right"===n?"left":"top"===n?"bottom":"top")+":-6px;",o=UM+":",n=(-1<A(["left","right"],n)?(i+="top:50%",o+="translateY(-50%) rotate("+("left"==n?-225:-45)+"deg)"):(i+="left:50%",o+="translateX(-50%) rotate("+("top"==n?225:45)+"deg)"),e+" solid 1px;");return'<div style="'+["position:absolute;width:10px;height:10px;",i+";"+o+";","border-bottom:"+n,"border-right:"+n,"background-color:"+t+";","box-shadow:8px 8px 16px -3px #000;"].join("")+'"></div>'}(n.get("backgroundColor"),i,o)),D(t))r.innerHTML=t;else if(t){r.innerHTML="",F(t)||(t=[t]);for(var a=0;a<t.length;a++)ft(t[a])&&t[a].parentNode!==r&&r.appendChild(t[a])}}},KM.prototype.setEnterable=function(t){this._enterable=t},KM.prototype.getSize=function(){var t=this.el;return[t.clientWidth,t.clientHeight]},KM.prototype.moveTo=function(t,e){var n,i=this._styleCoord;jM(i,this._zr,this._appendToBody,t,e),null!=i[0]&&null!=i[1]&&(n=this.el.style,N(XM(i[0],i[1]),function(t){n[t[0]]=t[1]}))},KM.prototype._moveIfResized=function(){var t=this._styleCoord[2],e=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),e*this._zr.getHeight())},KM.prototype.hide=function(){var t=this,e=this.el.style;e.visibility="hidden",e.opacity="0",w.transform3dSupported&&(e.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return t._longHide=!0},500)},KM.prototype.hideLater=function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(S(this.hide,this),t)):this.hide())},KM.prototype.isShow=function(){return this._show},KM.prototype.dispose=function(){this.el.parentNode.removeChild(this.el)},KM.prototype.getOuterSize=function(){var t=this.el.clientWidth,e=this.el.clientHeight,n=GM(this.el);return n&&(t+=parseInt(n.borderLeftWidth,10)+parseInt(n.borderRightWidth,10),e+=parseInt(n.borderTopWidth,10)+parseInt(n.borderBottomWidth,10)),{width:t,height:e}};var qM=KM;function KM(t,e,n){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._firstShow=!0,this._longHide=!0,w.wxa)return null;var i=document.createElement("div"),o=(i.domBelongToZr=!0,this.el=i,this._zr=e.getZr()),n=this._appendToBody=n&&n.appendToBody,r=(jM(this._styleCoord,o,n,e.getWidth()/2,e.getHeight()/2),(n?document.body:t).appendChild(i),this._container=t,this);i.onmouseenter=function(){r._enterable&&(clearTimeout(r._hideTimeout),r._show=!0),r._inContent=!0},i.onmousemove=function(t){var e;t=t||window.event,r._enterable||(e=o.handler,fe(o.painter.getViewportRoot(),t,!0),e.dispatch("mousemove",t))},i.onmouseleave=function(){r._inContent=!1,r._enterable&&r._show&&r.hideLater(r._hideDelay)}}JM.prototype.update=function(t){t.get("alwaysShowContent")&&this._moveIfResized()},JM.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},JM.prototype.setContent=function(t,e,n,i,o){k(t)&&f(""),this.el&&this._zr.remove(this.el);var r=n.getModel("textStyle"),a=(this.el=new ws({style:{rich:e.richTextStyles,text:t,lineHeight:22,backgroundColor:n.get("backgroundColor"),borderRadius:n.get("borderRadius"),borderWidth:1,borderColor:i,shadowColor:n.get("shadowColor"),shadowBlur:n.get("shadowBlur"),shadowOffsetX:n.get("shadowOffsetX"),shadowOffsetY:n.get("shadowOffsetY"),textShadowColor:r.get("textShadowColor"),textShadowBlur:r.get("textShadowBlur")||0,textShadowOffsetX:r.get("textShadowOffsetX")||0,textShadowOffsetY:r.get("textShadowOffsetY")||0,fill:n.get(["textStyle","color"]),padding:ig(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),this._zr.add(this.el),this);this.el.on("mouseover",function(){a._enterable&&(clearTimeout(a._hideTimeout),a._show=!0),a._inContent=!0}),this.el.on("mouseout",function(){a._enterable&&a._show&&a.hideLater(a._hideDelay),a._inContent=!1})},JM.prototype.setEnterable=function(t){this._enterable=t},JM.prototype.getSize=function(){var t=this.el,e=this.el.getBoundingRect(),t=t2(t.style);return[e.width+t.left+t.right,e.height+t.top+t.bottom]},JM.prototype.moveTo=function(t,e){var n,i,o=this.el;o&&(e2(i=this._styleCoord,this._zr,t,e),t=i[0],e=i[1],n=QM((i=o.style).borderWidth||0),i=t2(i),o.x=t+n+i.left,o.y=e+n+i.top,o.markRedraw())},JM.prototype._moveIfResized=function(){var t=this._styleCoord[2],e=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),e*this._zr.getHeight())},JM.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},JM.prototype.hideLater=function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(S(this.hide,this),t)):this.hide())},JM.prototype.isShow=function(){return this._show},JM.prototype.getOuterSize=function(){var t=this.getSize();return{width:t[0],height:t[1]}},JM.prototype.dispose=function(){this._zr.remove(this.el)};var $M=JM;function JM(t){this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._zr=t.getZr(),e2(this._styleCoord,this._zr,t.getWidth()/2,t.getHeight()/2)}function QM(t){return Math.max(0,t)}function t2(t){var e=QM(t.shadowBlur||0),n=QM(t.shadowOffsetX||0),t=QM(t.shadowOffsetY||0);return{left:QM(e-n),right:QM(e+n),top:QM(e-t),bottom:QM(e+t)}}function e2(t,e,n,i){t[0]=n,t[1]=i,t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}var n2,i2=S,o2=N,r2=B,a2=new ms({shape:{x:-1,y:-1,width:2,height:2}}),s2=(u(l2,n2=_g),l2.prototype.init=function(t,e){var n;w.node||(t=t.getComponent("tooltip"),n=t.get("renderMode"),this._renderMode="auto"===(n=n)?w.domSupported?"html":"richText":n||"html",this._tooltipContent="richText"===this._renderMode?new $M(e):new qM(e.getDom(),e,{appendToBody:t.get("appendToBody",!0)}))},l2.prototype.render=function(t,e,n){w.node||(this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=n,this._alwaysShowContent=t.get("alwaysShowContent"),(e=this._tooltipContent).update(t),e.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow())},l2.prototype._initGlobalListener=function(){var i=this._tooltipModel.get("triggerOn");_M("itemTooltip",this._api,i2(function(t,e,n){"none"!==i&&(0<=i.indexOf(t)?this._tryShow(e,n):"leave"===t&&this._hide(n))},this))},l2.prototype._keepShow=function(){var t,e=this._tooltipModel,n=this._ecModel,i=this._api;null!=this._lastX&&null!=this._lastY&&"none"!==e.get("triggerOn")&&(t=this,clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){i.isDisposed()||t.manuallyShowTip(e,n,i,{x:t._lastX,y:t._lastY,dataByCoordSys:t._lastDataByCoordSys})}))},l2.prototype.manuallyShowTip=function(t,e,n,i){var o,r,a,s;i.from===this.uid||w.node||(o=h2(i,n),this._ticket="",s=i.dataByCoordSys,(r=function(n,t,e){var i=Qo(n).queryOptionMap,o=i.keys()[0];if(o&&"series"!==o){var r,t=nr(t,o,i.get(o),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(t)return e.getViewOfComponentModel(t).group.traverse(function(t){var e=z(t).tooltipConfig;if(e&&e.name===n.name)return r=t,!0}),r?{componentMainType:o,componentIndex:t.componentIndex,el:r}:void 0}}(i,e,n))?((a=r.el.getBoundingRect().clone()).applyTransform(r.el.transform),this._tryShow({offsetX:a.x+a.width/2,offsetY:a.y+a.height/2,target:r.el,position:i.position,positionDefault:"bottom"},o)):i.tooltip&&null!=i.x&&null!=i.y?((a=a2).x=i.x,a.y=i.y,a.update(),z(a).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:a},o)):s?this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:s,tooltipOption:i.tooltipOption},o):null!=i.seriesIndex?this._manuallyAxisShowTip(t,e,n,i)||(a=(r=CM(i,e)).point[0],s=r.point[1],null!=a&&null!=s&&this._tryShow({offsetX:a,offsetY:s,target:r.el,position:i.position,positionDefault:"bottom"},o)):null!=i.x&&null!=i.y&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target},o)))},l2.prototype.manuallyHideTip=function(t,e,n,i){var o=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(h2(i,n))},l2.prototype._manuallyAxisShowTip=function(t,e,n,i){var o=i.seriesIndex,r=i.dataIndex,a=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=o&&null!=r&&null!=a){a=e.getSeriesByIndex(o);if(a&&"axis"===u2([a.getData().getItemModel(r),a,(a.coordinateSystem||{}).model],this._tooltipModel).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:r,position:i.position}),!0}},l2.prototype._tryShow=function(t,e){var n,i,o,r=t.target;this._tooltipModel&&(this._lastX=t.offsetX,this._lastY=t.offsetY,(n=t.dataByCoordSys)&&n.length?this._showAxisTooltip(n,t):r?(Uy(r,function(t){return null!=z(t).dataIndex?(i=t,1):null!=z(t).tooltipConfig&&(o=t,1)},!(this._lastDataByCoordSys=null)),i?this._showSeriesItemTooltip(t,i,e):o?this._showComponentItemTooltip(t,o,e):this._hide(e)):(this._lastDataByCoordSys=null,this._hide(e)))},l2.prototype._showOrMove=function(t,e){t=t.get("showDelay");e=S(e,this),clearTimeout(this._showTimout),0<t?this._showTimout=setTimeout(e,t):e()},l2.prototype._showAxisTooltip=function(t,e){var l=this._ecModel,n=this._tooltipModel,i=[e.offsetX,e.offsetY],o=u2([e.tooltipOption],n),u=this._renderMode,h=[],c=Kf("section",{blocks:[],noHeader:!0}),p=[],d=new og,r=(o2(t,function(t){o2(t.dataByAxis,function(i){var o,r,a=l.getComponent(i.axisDim+"Axis",i.axisIndex),s=i.value;a&&null!=s&&(o=aM(s,a.axis,l,i.seriesDataIndices,i.valueLabelOpt),r=Kf("section",{header:o,noHeader:!Mt(o),sortBlocks:!0,blocks:[]}),c.blocks.push(r),N(i.seriesDataIndices,function(t){var e=l.getSeriesByIndex(t.seriesIndex),t=t.dataIndexInside,n=e.getDataParams(t),e=(n.axisDim=i.axisDim,n.axisIndex=i.axisIndex,n.axisType=i.axisType,n.axisId=i.axisId,n.axisValue=V1(a.axis,{value:s}),n.axisValueLabel=o,n.marker=d.makeTooltipMarker("item",hp(n.color),u),uf(e.formatTooltip(t,!0,null)));e.markupFragment&&r.blocks.push(e.markupFragment),e.markupText&&p.push(e.markupText),h.push(n)}))})}),c.blocks.reverse(),p.reverse(),e.position),n=o.get("order"),e=Qf(c,d,u,n,l.get("useUTC"),o.get("textStyle")),n=(e&&p.unshift(e),"richText"===u?"\n\n":"<br/>"),a=p.join(n);this._showOrMove(o,function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(o,r,i[0],i[1],this._tooltipContent,h):this._showTooltipContent(o,a,h,Math.random()+"",i[0],i[1],r,null,d)})},l2.prototype._showSeriesItemTooltip=function(t,e,n){var i,o,r,a,s=this._ecModel,e=z(e),l=e.seriesIndex,u=s.getSeriesByIndex(l),h=e.dataModel||u,c=e.dataIndex,e=e.dataType,p=h.getData(e),d=this._renderMode,f=t.positionDefault,g=u2([p.getItemModel(c),h,u&&(u.coordinateSystem||{}).model],this._tooltipModel,f?{position:f}:null),u=g.get("trigger");null!=u&&"item"!==u||(i=h.getDataParams(c,e),o=new og,i.marker=o.makeTooltipMarker("item",hp(i.color),d),f=uf(h.formatTooltip(c,!1,e)),u=g.get("order"),r=f.markupFragment?Qf(f.markupFragment,o,d,u,s.get("useUTC"),g.get("textStyle")):f.markupText,a="item_"+h.name+"_"+c,this._showOrMove(g,function(){this._showTooltipContent(g,r,i,a,t.offsetX,t.offsetY,t.position,t.target,o)}),n({type:"showTip",dataIndexInside:c,dataIndex:p.getRawIndex(c),seriesIndex:l,from:this.uid}))},l2.prototype._showComponentItemTooltip=function(e,n,t){var i=z(n),o=i.tooltipConfig.option,o=[o=D(o)?{content:o,formatter:o}:o],i=this._ecModel.getComponent(i.componentMainType,i.componentIndex),i=(i&&o.push(i),e.positionDefault),r=u2(o,this._tooltipModel,i?{position:i}:null),a=r.get("content"),s=Math.random()+"",l=new og;this._showOrMove(r,function(){var t=C(r.get("formatterParams")||{});this._showTooltipContent(r,a,t,s,e.offsetX,e.offsetY,e.position,n,l)}),t({type:"showTip",from:this.uid})},l2.prototype._showTooltipContent=function(n,t,i,e,o,r,a,s,l){var u,h,c,p,d;this._ticket="",n.get("showContent")&&n.get("show")&&(u=this._tooltipContent,h=n.get("formatter"),a=a||n.get("position"),t=t,c=this._getNearestPoint([o,r],i,n.get("trigger"),n.get("borderColor")).color,h&&D(h)?(p=n.ecModel.get("useUTC"),t=h,t=lp(t=(d=F(i)?i[0]:i)&&d.axisType&&0<=d.axisType.indexOf("time")?Bc(d.axisValue,t,p):t,i,!0)):ut(h)&&(d=i2(function(t,e){t===this._ticket&&(u.setContent(e,l,n,c,a),this._updatePosition(n,a,o,r,u,i,s))},this),this._ticket=e,t=h(i,e,d)),u.setContent(t,l,n,c,a),u.show(n,c),this._updatePosition(n,a,o,r,u,i,s))},l2.prototype._getNearestPoint=function(t,e,n,i){return"axis"===n||F(e)?{color:i||("html"===this._renderMode?"#fff":"none")}:F(e)?void 0:{color:i||e.color||e.borderColor}},l2.prototype._updatePosition=function(t,e,n,i,o,r,a){var s,l,u,h,c=this._api.getWidth(),p=this._api.getHeight(),d=(e=e||t.get("position"),o.getSize()),f=t.get("align"),g=t.get("verticalAlign"),y=a&&a.getBoundingRect().clone();a&&y.applyTransform(a.transform),F(e=ut(e)?e([n,i],r,o.el,y,{viewSize:[c,p],contentSize:d.slice()}):e)?(n=r2(e[0],c),i=r2(e[1],p)):k(e)?((r=e).width=d[0],r.height=d[1],n=(r=mp(r,{width:c,height:p})).x,i=r.y,g=f=null):i=(n=(s=D(e)&&a?function(t,e,n){var i=n[0],o=n[1],r=0,a=0,s=e.width,l=e.height;switch(t){case"inside":r=e.x+s/2-i/2,a=e.y+l/2-o/2;break;case"top":r=e.x+s/2-i/2,a=e.y-o-10;break;case"bottom":r=e.x+s/2-i/2,a=e.y+l+10;break;case"left":r=e.x-i-10-5,a=e.y+l/2-o/2;break;case"right":r=e.x+s+10+5,a=e.y+l/2-o/2}return[r,a]}(e,y,d):(r=n,a=i,e=c,y=p,l=f?null:20,u=g?null:20,h=(h=o).getOuterSize(),s=h.width,h=h.height,null!=l&&(e<r+s+l+2?r-=s+l:r+=l),null!=u&&(y<a+h+u?a-=h+u:a+=u),[r,a]))[0],s[1]),f&&(n-=c2(f)?d[0]/2:"right"===f?d[0]:0),g&&(i-=c2(g)?d[1]/2:"bottom"===g?d[1]:0),zM(t)&&(e=n,l=i,y=c,h=p,u=(u=o).getOuterSize(),r=u.width,u=u.height,e=Math.min(e+r,y)-r,l=Math.min(l+u,h)-u,n=(s=[e=Math.max(e,0),l=Math.max(l,0)])[0],i=s[1]),o.moveTo(n,i)},l2.prototype._updateContentNotChangedOnAxis=function(n){var t=this._lastDataByCoordSys,r=!!t&&t.length===n.length;return r&&o2(t,function(t,e){var t=t.dataByAxis||[],o=(n[e]||{}).dataByAxis||[];(r=r&&t.length===o.length)&&o2(t,function(t,e){var e=o[e]||{},n=t.seriesDataIndices||[],i=e.seriesDataIndices||[];(r=r&&t.value===e.value&&t.axisType===e.axisType&&t.axisId===e.axisId&&n.length===i.length)&&o2(n,function(t,e){e=i[e];r=r&&t.seriesIndex===e.seriesIndex&&t.dataIndex===e.dataIndex})})}),this._lastDataByCoordSys=n,!!r},l2.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},l2.prototype.dispose=function(t,e){w.node||(this._tooltipContent.dispose(),wM("itemTooltip",e))},l2.type="tooltip",l2);function l2(){var t=null!==n2&&n2.apply(this,arguments)||this;return t.type=l2.type,t}function u2(t,e,n){for(var i=e.ecModel,o=n?(o=new fc(n,i,i),new fc(e.option,o,i)):e,r=t.length-1;0<=r;r--){var a=t[r];a&&(a=D(a=a instanceof fc?a.get("tooltip",!0):a)?{formatter:a}:a)&&(o=new fc(a,o,i))}return o}function h2(t,e){return t.dispatchAction||S(e.dispatchAction,e)}function c2(t){return"center"===t||"middle"===t}function p2(t,e){if(t)for(var n=F(t)?t:[t],i=0;i<n.length;i++)if(n[i]&&n[i][e])return 1}function d2(t){Vo(t,"label",["show"])}j1(function(t){j1(RM),t.registerComponentModel(EM),t.registerComponentView(s2),t.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},function(){}),t.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},function(){})});var f2,g2=Ko(),y2=(u(m2,f2=g),m2.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n),this._mergeOption(t,n,!1,!0)},m2.prototype.isAnimationEnabled=function(){var t;return!w.node&&(t=this.__hostSeries,this.getShallow("animation"))&&t&&t.isAnimationEnabled()},m2.prototype.mergeOption=function(t,e){this._mergeOption(t,e,!1,!1)},m2.prototype._mergeOption=function(t,i,e,o){var r=this.mainType;e||i.eachSeries(function(t){var e=t.get(this.mainType,!0),n=g2(t)[r];e&&e.data?(n?n._mergeOption(e,i,!0):(o&&d2(e),N(e.data,function(t){t instanceof Array?(d2(t[0]),d2(t[1])):d2(t)}),I(n=this.createMarkerModelFromSeries(e,this,i),{mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0}),n.__hostSeries=t),g2(t)[r]=n):g2(t)[r]=null},this)},m2.prototype.formatTooltip=function(t,e,n){var i=this.getData(),o=this.getRawValue(t),i=i.getName(t);return Kf("section",{header:this.name,blocks:[Kf("nameValue",{name:i,value:o,noName:!i,noValue:null==o})]})},m2.prototype.getData=function(){return this._data},m2.prototype.setData=function(t){this._data=t},m2.getMarkerModelFromSeries=function(t,e){return g2(t)[e]},m2.type="marker",m2.dependencies=["series","grid","polar","geo"],m2);function m2(){var t=null!==f2&&f2.apply(this,arguments)||this;return t.type=m2.type,t.createdBySelf=!1,t}ot(y2,cc.prototype);u(x2,v2=y2),x2.prototype.createMarkerModelFromSeries=function(t,e,n){return new x2(t,e,n)},x2.type="markPoint",x2.defaultOption={zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}};var v2,_2=x2;function x2(){var t=null!==v2&&v2.apply(this,arguments)||this;return t.type=x2.type,t}function b2(t,e,n,i,o,r){var a=[],s=P_(e,i)?e.getCalculationInfo("stackResultDimension"):i,t=I2(e,s,t),t=e.indicesOfNearest(s,t)[0],o=(a[o]=e.get(n,t),a[r]=e.get(s,t),e.get(i,t)),n=bo(e.get(i,t));return 0<=(n=Math.min(n,20))&&(a[r]=+a[r].toFixed(n)),[a,o]}var w2={min:M(b2,"min"),max:M(b2,"max"),average:M(b2,"average"),median:M(b2,"median")};function S2(t,e){var n=t.getData(),i=t.coordinateSystem;if(e&&(r=e,isNaN(parseFloat(r.x))||isNaN(parseFloat(r.y)))&&!F(e.coord)&&i){var o=i.dimensions,r=M2(e,n,i,t);if((e=C(e)).type&&w2[e.type]&&r.baseAxis&&r.valueAxis){i=A(o,r.baseAxis.dim),t=A(o,r.valueAxis.dim),r=w2[e.type](n,r.baseDataDim,r.valueDataDim,i,t);e.coord=r[0],e.value=r[1]}else{for(var a=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],s=0;s<2;s++)w2[a[s]]&&(a[s]=I2(n,n.mapDimension(o[s]),a[s]));e.coord=a}}return e}function M2(t,e,n,i){var o={};return null!=t.valueIndex||null!=t.valueDim?(o.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,o.valueAxis=n.getAxis(function(t,e){var n=t.getData(),i=n.dimensions;e=n.getDimension(e);for(var o=0;o<i.length;o++){var r=n.getDimensionInfo(i[o]);if(r.name===e)return r.coordDim}}(i,o.valueDataDim)),o.baseAxis=n.getOtherAxis(o.valueAxis),o.baseDataDim=e.mapDimension(o.baseAxis.dim)):(o.baseAxis=i.getBaseAxis(),o.valueAxis=n.getOtherAxis(o.baseAxis),o.baseDataDim=e.mapDimension(o.baseAxis.dim),o.valueDataDim=e.mapDimension(o.valueAxis.dim)),o}function T2(t,e){return!(t&&t.containData&&e.coord&&(n=e,isNaN(parseFloat(n.x)))&&isNaN(parseFloat(n.y)))||t.containData(e.coord);var n}function C2(t,e,n,i){return i<2?t.coord&&t.coord[i]:t.value}function I2(t,e,n){var i,o;return"average"===n?(o=i=0,t.each(e,function(t,e){isNaN(t)||(i+=t,o++)}),i/o):"median"===n?t.getMedian(e):t.getDataExtent(e)["max"===n?1:0]}var A2,D2=Ko(),jy=(u(k2,A2=_g),k2.prototype.init=function(){this.markerGroupMap=L()},k2.prototype.render=function(t,n,i){var o=this,e=this.markerGroupMap;e.each(function(t){D2(t).keep=!1}),n.eachSeries(function(t){var e=y2.getMarkerModelFromSeries(t,o.type);e&&o.renderSeries(t,e,n,i)}),e.each(function(t){D2(t).keep||o.group.remove(t.group)})},k2.prototype.markKeep=function(t){D2(t).keep=!0},k2.prototype.blurSeries=function(t){var e=this;N(t,function(t){t=y2.getMarkerModelFromSeries(t,e.type);t&&t.getData().eachItemGraphicEl(function(t){t&&hl(t)})})},k2.type="marker",k2);function k2(){var t=null!==A2&&A2.apply(this,arguments)||this;return t.type=k2.type,t}function L2(a,s,l){var u=s.coordinateSystem;a.each(function(t){var e,n,i,o=a.getItemModel(t),r=B(o.get("x"),l.getWidth()),o=B(o.get("y"),l.getHeight());isNaN(r)||isNaN(o)?s.getMarkerPosition?i=s.getMarkerPosition(a.getValues(a.dimensions,t)):u&&(e=a.get(u.dimensions[0],t),n=a.get(u.dimensions[1],t),i=u.dataToPoint([e,n])):i=[r,o],isNaN(r)||(i[0]=r),isNaN(o)||(i[1]=o),a.setItemLayout(t,i)})}u(R2,P2=jy),R2.prototype.updateTransform=function(t,e,n){e.eachSeries(function(t){var e=y2.getMarkerModelFromSeries(t,"markPoint");e&&(L2(e.getData(),t,n),this.markerGroupMap.get(t.id).updateLayout())},this)},R2.prototype.renderSeries=function(t,s,e,n){var i,o,r=t.coordinateSystem,a=t.id,l=t.getData(),u=this.markerGroupMap,u=u.get(a)||u.set(a,new fb),h=(i=t,a=s,o=(r=r)?j(r&&r.dimensions,function(t){return V({name:t},i.getData().getDimensionInfo(i.getData().mapDimension(t))||{})}):[{name:"value",type:"float"}],o=new S_(o,a),a=j(a.get("data"),M(S2,i)),r&&(a=st(a,M(T2,r))),o.initData(a,null,r?C2:function(t){return t.value}),o);s.setData(h),L2(s.getData(),t,n),h.each(function(t){var e=h.getItemModel(t),n=e.getShallow("symbol"),i=e.getShallow("symbolSize"),o=e.getShallow("symbolRotate"),r=((ut(n)||ut(i)||ut(o))&&(r=s.getRawValue(t),a=s.getDataParams(t),ut(n)&&(n=n(r,a)),ut(i)&&(i=i(r,a)),ut(o))&&(o=o(r,a)),e.getModel("itemStyle").getItemStyle()),a=hy(l,"color");r.fill||(r.fill=a),h.setItemVisual(t,{symbol:n,symbolSize:i,symbolRotate:o,style:r})}),u.updateData(h),this.group.add(u.group),h.eachItemGraphicEl(function(t){t.traverse(function(t){z(t).dataModel=s})}),this.markKeep(u),u.group.silent=s.get("silent")||t.get("silent")},R2.type="markPoint";var P2,O2=R2;function R2(){var t=null!==P2&&P2.apply(this,arguments)||this;return t.type=R2.type,t}j1(function(t){t.registerComponentModel(_2),t.registerComponentView(O2),t.registerPreprocessor(function(t){p2(t.series,"markPoint")&&(t.markPoint=t.markPoint||{})})});u(B2,N2=y2),B2.prototype.createMarkerModelFromSeries=function(t,e,n){return new B2(t,e,n)},B2.type="markLine",B2.defaultOption={zlevel:0,z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"};var N2,E2=B2;function B2(){var t=null!==N2&&N2.apply(this,arguments)||this;return t.type=B2.type,t}function z2(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}var V2,F2=Nu.prototype,H2=Hu.prototype;function G2(){return null!==V2&&V2.apply(this,arguments)||this}function W2(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}u(G2,V2=z2);u(X2,U2=q),X2.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},X2.prototype.getDefaultShape=function(){return new z2},X2.prototype.buildPath=function(t,e){(W2(e)?F2:H2).buildPath.call(this,t,e)},X2.prototype.pointAt=function(t){return(W2(this.shape)?F2:H2).pointAt.call(this,t)},X2.prototype.tangentAt=function(t){var e=this.shape,e=W2(e)?[e.x2-e.x1,e.y2-e.y1]:H2.tangentAt.call(this,t);return Ft(e,e)};var U2,Y2=X2;function X2(t){t=U2.call(this,t)||this;return t.type="ec-line",t}var Z2=["fromSymbol","toSymbol"];function j2(t){return"_"+t+"Type"}function q2(t,e,n){var i,o,r,a=e.getItemVisual(n,t);if(a&&"none"!==a)return o=e.getItemVisual(n,t+"Size"),i=e.getItemVisual(n,t+"Rotate"),r=e.getItemVisual(n,t+"Offset")||0,e=e.getItemVisual(n,t+"KeepAspect"),n=F(o)?o:[o,o],(o=F(r)?r:[r,r])[0]=B(o[0],n[0]),o[1]=B(P(o[1],o[0]),n[1]),(r=nm(a,-n[0]/2+o[0],-n[1]/2+o[1],n[0],n[1],null,e)).__specifiedRotation=null==i||isNaN(i)?void 0:+i*Math.PI/180||0,r.name=t,r}function K2(t,e){t.x1=e[0][0],t.y1=e[0][1],t.x2=e[1][0],t.y2=e[1][1],t.percent=1;e=e[2];e?(t.cpx1=e[0],t.cpy1=e[1]):(t.cpx1=NaN,t.cpy1=NaN)}u(Q2,$2=O),Q2.prototype._createLine=function(n,i,t){var e,o=n.hostModel,r=(r=n.getItemLayout(i),K2((e=new Y2({name:"line",subPixelOptimize:!0})).shape,r),e);r.shape.percent=0,Dh(r,{shape:{percent:1}},o,i),this.add(r),N(Z2,function(t){var e=q2(t,n,i);this.add(e),this[j2(t)]=n.getItemVisual(i,t)},this),this._updateCommonStl(n,i,t)},Q2.prototype.updateData=function(i,o,t){var e=i.hostModel,n=this.childOfName("line"),r=i.getItemLayout(o),a={shape:{}};K2(a.shape,r),Ah(n,a,e,o),N(Z2,function(t){var e=i.getItemVisual(o,t),n=j2(t);this[n]!==e&&(this.remove(this.childOfName(t)),t=q2(t,i,o),this.add(t)),this[n]=e},this),this._updateCommonStl(i,o,t)},Q2.prototype.getLinePath=function(){return this.childAt(0)},Q2.prototype._updateCommonStl=function(n,t,e){var i=n.hostModel,r=this.childOfName("line"),o=e&&e.emphasisLineStyle,a=e&&e.blurLineStyle,s=e&&e.selectLineStyle,l=e&&e.labelStatesModels,u=(e&&!n.hasItemOption||(o=(e=n.getItemModel(t)).getModel(["emphasis","lineStyle"]).getLineStyle(),a=e.getModel(["blur","lineStyle"]).getLineStyle(),s=e.getModel(["select","lineStyle"]).getLineStyle(),l=qh(e)),n.getItemVisual(t,"style")),h=u.stroke,e=(r.useStyle(u),r.style.fill=null,r.style.strokeNoScale=!0,r.ensureState("emphasis").style=o,r.ensureState("blur").style=a,r.ensureState("select").style=s,N(Z2,function(t){var e=this.childOfName(t);if(e){e.setColor(h),e.style.opacity=u.opacity;for(var n=0;n<Bs.length;n++){var i=Bs[n],o=r.getState(i);o&&(o=o.style||{},i=(i=e.ensureState(i)).style||(i.style={}),null!=o.stroke&&(i[e.__isEmptyBrush?"stroke":"fill"]=o.stroke),null!=o.opacity)&&(i.opacity=o.opacity)}e.markRedraw()}},this),i.getRawValue(t)),o=(jh(this,l,{labelDataIndex:t,labelFetcher:{getFormattedLabel:function(t,e){return i.getFormattedLabel(t,e,n.dataType)}},inheritColor:h||"#000",defaultOpacity:u.opacity,defaultText:(null==e?n.getName(t):isFinite(e)?_o(e):e)+""}),this.getTextContent());o&&(a=l.normal,o.__align=o.style.align,o.__verticalAlign=o.style.verticalAlign,o.__position=a.get("position")||"middle",F(s=a.get("distance"))||(s=[s,s]),o.__labelDistance=s),this.setTextConfig({position:null,local:!0,inside:!1}),xl(this)},Q2.prototype.highlight=function(){ll(this)},Q2.prototype.downplay=function(){ul(this)},Q2.prototype.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},Q2.prototype.setLinePoints=function(t){var e=this.childOfName("line");K2(e.shape,t),e.dirty()},Q2.prototype.beforeUpdate=function(){var t=this.childOfName("fromSymbol"),e=this.childOfName("toSymbol"),n=this.getTextContent();if(t||e||n&&!n.ignore){for(var i=1,o=this.parent;o;)o.scaleX&&(i/=o.scaleX),o=o.parent;var r=this.childOfName("line");if(this.__dirty||r.__dirty){var a=r.shape.percent,s=r.pointAt(0),l=r.pointAt(a),u=Et([],l,s);if(Ft(u,u),t&&(t.setPosition(s),v(t,0),t.scaleX=t.scaleY=i*a,t.markRedraw()),e&&(e.setPosition(l),v(e,1),e.scaleX=e.scaleY=i*a,e.markRedraw()),n&&!n.ignore){n.x=n.y=0;var h=void(n.originX=n.originY=0),c=void 0,t=n.__labelDistance,p=t[0]*i,d=t[1]*i,e=a/2,f=r.tangentAt(e),t=[f[1],-f[0]],g=r.pointAt(e),y=(0<t[1]&&(t[0]=-t[0],t[1]=-t[1]),f[0]<0?-1:1),m=("start"!==n.__position&&"end"!==n.__position&&(a=-Math.atan2(f[1],f[0]),l[0]<s[0]&&(a=Math.PI+a),n.rotation=a),void 0);switch(n.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":m=-d,c="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":m=d,c="top";break;default:m=0,c="middle"}switch(n.__position){case"end":n.x=u[0]*p+l[0],n.y=u[1]*d+l[1],h=.8<u[0]?"left":u[0]<-.8?"right":"center",c=.8<u[1]?"top":u[1]<-.8?"bottom":"middle";break;case"start":n.x=-u[0]*p+s[0],n.y=-u[1]*d+s[1],h=.8<u[0]?"right":u[0]<-.8?"left":"center",c=.8<u[1]?"bottom":u[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":n.x=p*y+s[0],n.y=s[1]+m,h=f[0]<0?"right":"left",n.originX=-p*y,n.originY=-m;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":n.x=g[0],n.y=g[1]+m,h="center",n.originY=-m;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":n.x=-p*y+l[0],n.y=l[1]+m,h=0<=f[0]?"right":"left",n.originX=p*y,n.originY=-m}n.scaleX=n.scaleY=i,n.setStyle({verticalAlign:n.__verticalAlign||c,align:n.__align||h})}}}function v(t,e){var n,i=t.__specifiedRotation;null==i?(n=r.tangentAt(e),t.attr("rotation",(1===e?-1:1)*Math.PI/2-Math.atan2(n[1],n[0]))):t.attr("rotation",i)}};var $2,J2=Q2;function Q2(t,e,n){var i=$2.call(this)||this;return i._createLine(t,e,n),i}eT.prototype.isPersistent=function(){return!0},eT.prototype.updateData=function(n){var i=this,e=this.group,o=this._lineData,r=(this._lineData=n,o||e.removeAll(),nT(n));n.diff(o).add(function(t){i._doAdd(n,t,r)}).update(function(t,e){i._doUpdate(o,n,e,t,r)}).remove(function(t){e.remove(o.getItemGraphicEl(t))}).execute()},eT.prototype.updateLayout=function(){var n=this._lineData;n&&n.eachItemGraphicEl(function(t,e){t.updateLayout(n,e)},this)},eT.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=nT(t),this._lineData=null,this.group.removeAll()},eT.prototype.incrementalUpdate=function(t,e){function n(t){var e;t.isGroup||(e=t).animators&&0<e.animators.length||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}for(var i,o=t.start;o<t.end;o++)oT(e.getItemLayout(o))&&((i=new this._LineCtor(e,o,this._seriesScope)).traverse(n),this.group.add(i),e.setItemGraphicEl(o,i))},eT.prototype.remove=function(){this.group.removeAll()},eT.prototype._doAdd=function(t,e,n){oT(t.getItemLayout(e))&&(n=new this._LineCtor(t,e,n),t.setItemGraphicEl(e,n),this.group.add(n))},eT.prototype._doUpdate=function(t,e,n,i,o){t=t.getItemGraphicEl(n);oT(e.getItemLayout(i))?(t?t.updateData(e,i,o):t=new this._LineCtor(e,i,o),e.setItemGraphicEl(i,t),this.group.add(t)):this.group.remove(t)};var tT=eT;function eT(t){this.group=new O,this._LineCtor=t||J2}function nT(t){t=t.hostModel;return{lineStyle:t.getModel("lineStyle").getLineStyle(),emphasisLineStyle:t.getModel(["emphasis","lineStyle"]).getLineStyle(),blurLineStyle:t.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:t.getModel(["select","lineStyle"]).getLineStyle(),labelStatesModels:qh(t)}}function iT(t){return isNaN(t[0])||isNaN(t[1])}function oT(t){return!iT(t[0])&&!iT(t[1])}function rT(t,e,n,i){var o,r,a,s,l=t.getData();return(e=[S2(t,(n=F(i)?i:"min"===(o=i.type)||"max"===o||"average"===o||"median"===o||null!=i.xAxis||null!=i.yAxis?(r=s=void 0,r=null!=i.yAxis||null!=i.xAxis?(s=e.getAxis(null!=i.yAxis?"y":"x"),_t(i.yAxis,i.xAxis)):(s=(e=M2(i,l,e,t)).valueAxis,I2(l,O_(l,e.valueDataDim),o)),e=1-(l="x"===s.dim?0:1),s={coord:[]},(a=C(i)).type=null,a.coord=[],a.coord[e]=-1/0,s.coord[e]=1/0,0<=(e=n.get("precision"))&&"number"==typeof r&&(r=+r.toFixed(Math.min(e,20))),a.coord[l]=s.coord[l]=r,[a,s,{type:o,valueIndex:i.valueIndex,value:r}]):[])[0]),S2(t,n[1]),I({},n[2])])[2].type=e[2].type||null,p(e[2],e[0]),p(e[2],e[1]),e}var aT=Ko();function sT(t){return!isNaN(t)&&!isFinite(t)}function lT(t,e,n,i){var o=1-t,r=i.dimensions[t];return sT(e[o])&&sT(n[o])&&e[t]===n[t]&&i.getAxis(r).containData(e[t])}function uT(t,e){if("cartesian2d"===t.type){var n=e[0].coord,i=e[1].coord;if(n&&i&&(lT(1,n,i,t)||lT(0,n,i,t)))return!0}return T2(t,e[0])&&T2(t,e[1])}function hT(t,e,n,i,o){var r,a,s=i.coordinateSystem,l=t.getItemModel(e),u=B(l.get("x"),o.getWidth()),l=B(l.get("y"),o.getHeight());isNaN(u)||isNaN(l)?(r=i.getMarkerPosition?i.getMarkerPosition(t.getValues(t.dimensions,e)):(a=s.dimensions,o=t.get(a[0],e),i=t.get(a[1],e),s.dataToPoint([o,i])),Bx(s,"cartesian2d")&&(o=s.getAxis("x"),i=s.getAxis("y"),a=s.dimensions,sT(t.get(a[0],e))?r[0]=o.toGlobalCoord(o.getExtent()[n?0:1]):sT(t.get(a[1],e))&&(r[1]=i.toGlobalCoord(i.getExtent()[n?0:1]))),isNaN(u)||(r[0]=u),isNaN(l)||(r[1]=l)):r=[u,l],t.setItemLayout(e,r)}u(dT,cT=jy),dT.prototype.updateTransform=function(t,e,r){e.eachSeries(function(e){var n,i,o,t=y2.getMarkerModelFromSeries(e,"markLine");t&&(n=t.getData(),i=aT(t).from,o=aT(t).to,i.each(function(t){hT(i,t,!0,e,r),hT(o,t,!1,e,r)}),n.each(function(t){n.setItemLayout(t,[i.getItemLayout(t),o.getItemLayout(t)])}),this.markerGroupMap.get(e.id).updateLayout())},this)},dT.prototype.renderSeries=function(r,n,t,a){var e,i,o,s,l=r.coordinateSystem,u=r.id,h=r.getData(),c=this.markerGroupMap,c=c.get(u)||c.set(u,new tT),l=(this.group.add(c.group),e=r,u=n,o=(l=l)?j(l&&l.dimensions,function(t){return V({name:t},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{})}):[{name:"value",type:"float"}],i=new S_(o,u),o=new S_(o,u),s=new S_([],u),u=j(u.get("data"),M(rT,e,l,u)),l&&(u=st(u,M(uT,l))),l=l?C2:function(t){return t.value},i.initData(j(u,function(t){return t[0]}),null,l),o.initData(j(u,function(t){return t[1]}),null,l),s.initData(j(u,function(t){return t[2]})),s.hasItemOption=!0,{from:i,to:o,line:s}),p=l.from,d=l.to,f=l.line,g=(aT(n).from=p,aT(n).to=d,n.setData(f),n.get("symbol")),y=n.get("symbolSize"),m=n.get("symbolRotate"),v=n.get("symbolOffset");function _(t,e,n){var i=t.getItemModel(e),o=(hT(t,e,n,r,a),i.getModel("itemStyle").getItemStyle());null==o.fill&&(o.fill=hy(h,"color")),t.setItemVisual(e,{symbolKeepAspect:i.get("symbolKeepAspect"),symbolOffset:P(i.get("symbolOffset"),v[n?0:1]),symbolRotate:P(i.get("symbolRotate",!0),m[n?0:1]),symbolSize:P(i.get("symbolSize"),y[n?0:1]),symbol:P(i.get("symbol",!0),g[n?0:1]),style:o})}F(g)||(g=[g,g]),F(y)||(y=[y,y]),F(m)||(m=[m,m]),F(v)||(v=[v,v]),l.from.each(function(t){_(p,t,!0),_(d,t,!1)}),f.each(function(t){var e=f.getItemModel(t).getModel("lineStyle").getLineStyle();f.setItemLayout(t,[p.getItemLayout(t),d.getItemLayout(t)]),null==e.stroke&&(e.stroke=p.getItemVisual(t,"style").fill),f.setItemVisual(t,{fromSymbolKeepAspect:p.getItemVisual(t,"symbolKeepAspect"),fromSymbolOffset:p.getItemVisual(t,"symbolOffset"),fromSymbolRotate:p.getItemVisual(t,"symbolRotate"),fromSymbolSize:p.getItemVisual(t,"symbolSize"),fromSymbol:p.getItemVisual(t,"symbol"),toSymbolKeepAspect:d.getItemVisual(t,"symbolKeepAspect"),toSymbolOffset:d.getItemVisual(t,"symbolOffset"),toSymbolRotate:d.getItemVisual(t,"symbolRotate"),toSymbolSize:d.getItemVisual(t,"symbolSize"),toSymbol:d.getItemVisual(t,"symbol"),style:e})}),c.updateData(f),l.line.eachItemGraphicEl(function(t,e){t.traverse(function(t){z(t).dataModel=n})}),this.markKeep(c),c.group.silent=n.get("silent")||r.get("silent")},dT.type="markLine";var cT,pT=dT;function dT(){var t=null!==cT&&cT.apply(this,arguments)||this;return t.type=dT.type,t}j1(function(t){t.registerComponentModel(E2),t.registerComponentView(pT),t.registerPreprocessor(function(t){p2(t.series,"markLine")&&(t.markLine=t.markLine||{})})});u(yT,fT=y2),yT.prototype.createMarkerModelFromSeries=function(t,e,n){return new yT(t,e,n)},yT.type="markArea",yT.defaultOption={zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}};var fT,gT=yT;function yT(){var t=null!==fT&&fT.apply(this,arguments)||this;return t.type=yT.type,t}function mT(t,e,n,i){var o=S2(t,i[0]),t=S2(t,i[1]),i=o.coord,r=t.coord;return i[0]=_t(i[0],-1/0),i[1]=_t(i[1],-1/0),r[0]=_t(r[0],1/0),r[1]=_t(r[1],1/0),(i=et([{},o,t])).coord=[o.coord,t.coord],i.x0=o.x,i.y0=o.y,i.x1=t.x,i.y1=t.y,i}var vT=Ko();function _T(t){return!isNaN(t)&&!isFinite(t)}function xT(t,e,n){t=1-t;return _T(e[t])&&_T(n[t])}function bT(t,e){var n=e.coord[0],i=e.coord[1];return!!(Bx(t,"cartesian2d")&&n&&i&&(xT(1,n,i)||xT(0,n,i)))||T2(t,{coord:n,x:e.x0,y:e.y0})||T2(t,{coord:i,x:e.x1,y:e.y1})}function wT(t,e,n,i,o){var r,a,s,l=i.coordinateSystem,u=t.getItemModel(e),h=B(u.get(n[0]),o.getWidth()),u=B(u.get(n[1]),o.getHeight());return isNaN(h)||isNaN(u)?(s=i.getMarkerPosition?i.getMarkerPosition(t.getValues(n,e)):(o=[r=t.get(n[0],e),a=t.get(n[1],e)],l.clampData&&l.clampData(o,o),l.dataToPoint(o,!0)),Bx(l,"cartesian2d")&&(i=l.getAxis("x"),o=l.getAxis("y"),r=t.get(n[0],e),a=t.get(n[1],e),_T(r)?s[0]=i.toGlobalCoord(i.getExtent()["x0"===n[0]?0:1]):_T(a)&&(s[1]=o.toGlobalCoord(o.getExtent()["y0"===n[1]?0:1]))),isNaN(h)||(s[0]=h),isNaN(u)||(s[1]=u)):s=[h,u],s}var ST,MT=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],TT=(u(CT,ST=jy),CT.prototype.updateTransform=function(t,e,o){e.eachSeries(function(n){var i,t=y2.getMarkerModelFromSeries(n,"markArea");t&&(i=t.getData()).each(function(e){var t=j(MT,function(t){return wT(i,e,t,n,o)});i.setItemLayout(e,t),i.getItemGraphicEl(e).setShape("points",t)})},this)},CT.prototype.renderSeries=function(a,o,t,s){var n,i,e,l=a.coordinateSystem,r=a.id,u=a.getData(),h=this.markerGroupMap,c=h.get(r)||h.set(r,{group:new O}),p=(this.group.add(c.group),this.markKeep(c),n=a,h=o,e=(r=l)?(i=j(r&&r.dimensions,function(t){var e=n.getData();return V({name:t},e.getDimensionInfo(e.mapDimension(t))||{})}),new S_(j(["x0","y0","x1","y1"],function(t,e){return{name:t,type:i[e%2].type}}),h)):new S_(i=[{name:"value",type:"float"}],h),h=j(h.get("data"),M(mT,n,r,h)),r&&(h=st(h,M(bT,r))),r=r?function(t,e,n,i){return t.coord[Math.floor(i/2)][i%2]}:function(t){return t.value},e.initData(h,null,r),e.hasItemOption=!0,e);o.setData(p),p.each(function(e){var t=j(MT,function(t){return wT(p,e,t,a,s)}),n=l.getAxis("x").scale,i=l.getAxis("y").scale,o=n.getExtent(),r=i.getExtent(),n=[n.parse(p.get("x0",e)),n.parse(p.get("x1",e))],i=[i.parse(p.get("y0",e)),i.parse(p.get("y1",e))],o=(xo(n),xo(i),!!(o[0]>n[1]||o[1]<n[0]||r[0]>i[1]||r[1]<i[0])),n=(p.setItemLayout(e,{points:t,allClipped:o}),p.getItemModel(e).getModel("itemStyle").getItemStyle()),r=hy(u,"color");n.fill||(n.fill=r,"string"==typeof n.fill&&(n.fill=wn(n.fill,.4))),n.stroke||(n.stroke=r),p.setItemVisual(e,"style",n)}),p.diff(vT(c).data).add(function(t){var e=p.getItemLayout(t);e.allClipped||(e=new Cu({shape:{points:e.points}}),p.setItemGraphicEl(t,e),c.group.add(e))}).update(function(t,e){var e=vT(c).data.getItemGraphicEl(e),n=p.getItemLayout(t);n.allClipped?e&&c.group.remove(e):(e?Ah(e,{shape:{points:n.points}},o,t):e=new Cu({shape:{points:n.points}}),p.setItemGraphicEl(t,e),c.group.add(e))}).remove(function(t){t=vT(c).data.getItemGraphicEl(t);c.group.remove(t)}).execute(),p.eachItemGraphicEl(function(t,e){var n=p.getItemModel(e),i=p.getItemVisual(e,"style");t.useStyle(p.getItemVisual(e,"style")),jh(t,qh(n),{labelFetcher:o,labelDataIndex:e,defaultText:p.getName(e)||"",inheritColor:"string"==typeof i.fill?wn(i.fill,1):"#000"}),Sl(t,n),xl(t),z(t).dataModel=o}),vT(c).data=p,c.group.silent=o.get("silent")||a.get("silent")},CT.type="markArea",CT);function CT(){var t=null!==ST&&ST.apply(this,arguments)||this;return t.type=CT.type,t}j1(function(t){t.registerComponentModel(gT),t.registerComponentView(TT),t.registerPreprocessor(function(t){p2(t.series,"markArea")&&(t.markArea=t.markArea||{})})});u(AT,IT=g),AT.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n),this._initData()},AT.prototype.mergeOption=function(t){IT.prototype.mergeOption.apply(this,arguments),this._initData()},AT.prototype.setCurrentIndex=function(t){null==t&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(t=e<=t?e-1:t)<0&&(t=0),this.option.currentIndex=t},AT.prototype.getCurrentIndex=function(){return this.option.currentIndex},AT.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},AT.prototype.setPlayState=function(t){this.option.autoPlay=!!t},AT.prototype.getPlayState=function(){return!!this.option.autoPlay},AT.prototype._initData=function(){var o,t=this.option,e=t.data||[],t=t.axisType,r=this._names=[],e=("category"===t?(o=[],N(e,function(t,e){var n,i=Yo(Ho(t),"");k(t)?(n=C(t)).value=e:n=e,o.push(n),r.push(i)})):o=e,{category:"ordinal",time:"time",value:"number"}[t]||"number");(this._data=new S_([{name:"value",type:e}],this)).initData(o,r)},AT.prototype.getData=function(){return this._data},AT.prototype.getCategories=function(){if("category"===this.get("axisType"))return this._names.slice()},AT.type="timeline",AT.defaultOption={zlevel:0,z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]};var IT,ju=AT;function AT(){var t=null!==IT&&IT.apply(this,arguments)||this;return t.type=AT.type,t.layoutMode="box",t}u(LT,DT=ju),LT.type="timeline.slider",LT.defaultOption=vc(ju.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]});var DT,kT=LT;function LT(){var t=null!==DT&&DT.apply(this,arguments)||this;return t.type=LT.type,t}ot(kT,cc.prototype);u(OT,PT=_g),OT.type="timeline";var PT,xu=OT;function OT(){var t=null!==PT&&PT.apply(this,arguments)||this;return t.type=OT.type,t}u(ET,RT=$y),ET.prototype.getLabelModel=function(){return this.model.getModel("label")},ET.prototype.isHorizontal=function(){return"horizontal"===this.model.get("orient")};var RT,NT=ET;function ET(t,e,n,i){t=RT.call(this,t,e,n)||this;return t.type=i||"value",t}var BT,zT=Math.PI,VT=Ko(),FT=(u(HT,BT=xu),HT.prototype.init=function(t,e){this.api=e},HT.prototype.render=function(e,t,n){var i,o,r;this.model=e,this.api=n,this.ecModel=t,this.group.removeAll(),e.get("show",!0)&&(i=this._layout(e,n),o=this._createGroup("_mainGroup"),t=this._createGroup("_labelGroup"),r=this._axis=this._createAxis(i,e),e.formatTooltip=function(t){return Kf("nameValue",{noName:!0,value:r.scale.getLabel({value:t})})},N(["AxisLine","AxisTick","Control","CurrentPointer"],function(t){this["_render"+t](i,o,r,e)},this),this._renderAxisLabel(i,t,r,e),this._position(i,e)),this._doPlayStop(),this._updateTicksStatus()},HT.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},HT.prototype.dispose=function(){this._clearTimer()},HT.prototype._layout=function(t,e){var n,i,o,r,a=t.get(["label","position"]),s=t.get("orient"),l=(l=e,mp((r=t).getBoxLayoutParams(),{width:l.getWidth(),height:l.getHeight()},r.get("padding"))),e={horizontal:"center",vertical:0<=(r=null==a||"auto"===a?"horizontal"===s?l.y+l.height/2<e.getHeight()/2?"-":"+":l.x+l.width/2<e.getWidth()/2?"+":"-":D(a)?{horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[s][a]:a)||"+"===r?"left":"right"},a={horizontal:0<=r||"+"===r?"top":"bottom",vertical:"middle"},u={horizontal:0,vertical:zT/2},h="vertical"===s?l.height:l.width,c=t.getModel("controlStyle"),p=c.get("show",!0),d=p?c.get("itemSize"):0,f=p?c.get("itemGap"):0,g=d+f,y=(t.get(["label","rotate"])||0)*zT/180,m=c.get("position",!0),v=p&&c.get("showPlayBtn",!0),_=p&&c.get("showPrevBtn",!0),p=p&&c.get("showNextBtn",!0),c=0,x=h,m=("left"===m||"bottom"===m?(v&&(n=[0,0],c+=g),_&&(i=[c,0],c+=g)):(v&&(n=[x-d,0],x-=g),_&&(i=[0,0],c+=g)),p&&(o=[x-d,0],x-=g),[c,x]);return t.get("inverse")&&m.reverse(),{viewRect:l,mainLength:h,orient:s,rotation:u[s],labelRotation:y,labelPosOpt:r,labelAlign:t.get(["label","align"])||e[s],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||a[s],playPosition:n,prevBtnPosition:i,nextBtnPosition:o,axisExtent:m,controlSize:d,controlGap:f}},HT.prototype._position=function(t,e){var n=this._mainGroup,i=this._labelGroup,o=t.viewRect,r=("vertical"===t.orient&&(Ee(l=Pe(),l,[-(a=o.x),-(s=o.y+o.height)]),Be(l,l,-zT/2),Ee(l,l,[a,s]),(o=o.clone()).applyTransform(l)),p(o)),a=p(n.getBoundingRect()),s=p(i.getBoundingRect()),l=[n.x,n.y],o=[i.x,i.y];o[0]=l[0]=r[0][0];var u,h=t.labelPosOpt;function c(t){t.originX=r[0][0]-t.x,t.originY=r[1][0]-t.y}function p(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function d(t,e,n,i,o){t[i]+=n[i][o]-e[i][o]}null==h||D(h)?(d(l,a,r,1,u="+"===h?0:1),d(o,s,r,1,1-u)):(d(l,a,r,1,u=0<=h?0:1),o[1]=l[1]+h),n.setPosition(l),i.setPosition(o),n.rotation=i.rotation=t.rotation,c(n),c(i)},HT.prototype._createAxis=function(t,e){var n=e.getData(),i=e.get("axisType"),o=function(t,e){if(e=e||t.get("type"))switch(e){case"category":return new j_({ordinalMeta:t.getCategories(),extent:[1/0,-1/0]});case"time":return new d1({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new J_}}(e,i),r=(o.getTicks=function(){return n.mapArray(["value"],function(t){return{value:t}})},n.getDataExtent("value")),r=(o.setExtent(r[0],r[1]),o.niceTicks(),new NT("value",o,t.axisExtent,i));return r.model=e,r},HT.prototype._createGroup=function(t){t=this[t]=new O;return this.group.add(t),t},HT.prototype._renderAxisLine=function(t,e,n,i){var o,n=n.getExtent();i.get(["lineStyle","show"])&&(o=new Nu({shape:{x1:n[0],y1:0,x2:n[1],y2:0},style:I({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1}),e.add(o),n=this._progressLine=new Nu({shape:{x1:n[0],x2:this._currentPointer?this._currentPointer.x:n[0],y1:0,y2:0},style:V({lineCap:"round",lineWidth:o.style.lineWidth},i.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1}),e.add(n))},HT.prototype._renderAxisTick=function(t,a,s,l){var u=this,h=l.getData(),e=s.scale.getTicks();this._tickSymbols=[],N(e,function(t){var e=s.dataToCoord(t.value),n=h.getItemModel(t.value),i=n.getModel("itemStyle"),o=n.getModel(["emphasis","itemStyle"]),r=n.getModel(["progress","itemStyle"]),e={x:e,y:0,onclick:S(u._changeTimeline,u,t.value)},i=GT(n,i,a,e),e=(i.ensureState("emphasis").style=o.getItemStyle(),i.ensureState("progress").style=r.getItemStyle(),xl(i),z(i));n.get("tooltip")?(e.dataIndex=t.value,e.dataModel=l):e.dataIndex=e.dataModel=null,u._tickSymbols.push(i)})},HT.prototype._renderAxisLabel=function(a,s,l,t){var u,h=this;l.getLabelModel().get("show")&&(u=t.getData(),t=l.getViewLabels(),this._tickLabels=[],N(t,function(t){var e=t.tickValue,n=u.getItemModel(e),i=n.getModel("label"),o=n.getModel(["emphasis","label"]),n=n.getModel(["progress","label"]),r=l.dataToCoord(t.tickValue),r=new ws({x:r,y:0,rotation:a.labelRotation-a.rotation,onclick:S(h._changeTimeline,h,e),silent:!1,style:Kh(i,{text:t.formattedLabel,align:a.labelAlign,verticalAlign:a.labelBaseline})});r.ensureState("emphasis").style=Kh(o),r.ensureState("progress").style=Kh(n),s.add(r),xl(r),VT(r).dataIndex=e,h._tickLabels.push(r)}))},HT.prototype._renderControl=function(t,a,e,s){var l=t.controlSize,u=t.rotation,h=s.getModel("controlStyle").getItemStyle(),c=s.getModel(["emphasis","controlStyle"]).getItemStyle(),n=s.getPlayState(),i=s.get("inverse",!0);function o(t,e,n,i){var o,r;t&&(r=li(P(s.get(["controlStyle",e+"BtnSize"]),l),l),o=s,e=e+"Icon",r=[0,-r/2,r,r],t={x:t[0],y:t[1],originX:l/2,originY:0,rotation:i?-u:0,rectHover:!0,style:h,onclick:n},i=t.style,o=Hh(o.get(["controlStyle",e]),t||{},new R(r[0],r[1],r[2],r[3])),i&&o.setStyle(i),(n=o).ensureState("emphasis").style=c,a.add(n),xl(n))}o(t.nextBtnPosition,"next",S(this._changeTimeline,this,i?"-":"+")),o(t.prevBtnPosition,"prev",S(this._changeTimeline,this,i?"+":"-")),o(t.playPosition,n?"stop":"play",S(this._handlePlayClick,this,!n),!0)},HT.prototype._renderCurrentPointer=function(t,e,n,i){var o=i.getData(),r=i.getCurrentIndex(),o=o.getItemModel(r).getModel("checkpointStyle"),a=this;this._currentPointer=GT(o,o,this._mainGroup,{},this._currentPointer,{onCreate:function(t){t.draggable=!0,t.drift=S(a._handlePointerDrag,a),t.ondragend=S(a._handlePointerDragend,a),WT(t,a._progressLine,r,n,i,!0)},onUpdate:function(t){WT(t,a._progressLine,r,n,i)}})},HT.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},HT.prototype._handlePointerDrag=function(t,e,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},HT.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},HT.prototype._pointerChangeTimeline=function(t,e){var t=this._toAxisCoord(t)[0],n=xo(this._axis.getExtent().slice()),n=((t=t>n[1]?n[1]:t)<n[0]&&(t=n[0]),this._currentPointer.x=t,this._currentPointer.markRedraw(),this._progressLine.shape.x2=t,this._progressLine.dirty(),this._findNearestTick(t)),t=this.model;(e||n!==t.getCurrentIndex()&&t.get("realtime"))&&this._changeTimeline(n)},HT.prototype._doPlayStop=function(){var e=this;this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(function(){var t=e.model;e._changeTimeline(t.getCurrentIndex()+(t.get("rewind",!0)?-1:1))},this.model.get("playInterval")))},HT.prototype._toAxisCoord=function(t){return Nh(t,this._mainGroup.getLocalTransform(),!0)},HT.prototype._findNearestTick=function(n){var i,t=this.model.getData(),o=1/0,r=this._axis;return t.each(["value"],function(t,e){t=r.dataToCoord(t),t=Math.abs(t-n);t<o&&(o=t,i=e)}),i},HT.prototype._clearTimer=function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},HT.prototype._changeTimeline=function(t){var e=this.model.getCurrentIndex();"+"===t?t=e+1:"-"===t&&(t=e-1),this.api.dispatchAction({type:"timelineChange",currentIndex:t,from:this.uid})},HT.prototype._updateTicksStatus=function(){var t=this.model.getCurrentIndex(),e=this._tickSymbols,n=this._tickLabels;if(e)for(var i=0;i<e.length;i++)e&&e[i]&&e[i].toggleState("progress",i<t);if(n)for(i=0;i<n.length;i++)n&&n[i]&&n[i].toggleState("progress",VT(n[i]).dataIndex<=t)},HT.type="timeline.slider",HT);function HT(){var t=null!==BT&&BT.apply(this,arguments)||this;return t.type=HT.type,t}function GT(t,e,n,i,o,r){var a=e.get("color"),a=(o?(o.setColor(a),n.add(o),r&&r.onUpdate(o)):((o=nm(t.get("symbol"),-1,-1,2,2,a)).setStyle("strokeNoScale",!0),n.add(o),r&&r.onCreate(o)),e.getItemStyle(["color"]));o.setStyle(a),i=p({rectHover:!0,z2:100},i,!0);n=(n=t.get("symbolSize"))instanceof Array?n.slice():[+n,+n],i.scaleX=n[0]/2,i.scaleY=n[1]/2,r=t.get("symbolOffset"),r&&(i.x=i.x||0,i.y=i.y||0,i.x+=B(r[0],n[0]),i.y+=B(r[1],n[1])),e=t.get("symbolRotate");return i.rotation=(e||0)*Math.PI/180||0,o.attr(i),o.updateTransform(),o}function WT(t,e,n,i,o,r){var a;t.dragging||(a=o.getModel("checkpointStyle"),i=i.dataToCoord(o.getData().get("value",n)),r||!a.get("animation",!0)?(t.attr({x:i,y:0}),e&&e.attr({shape:{x2:i}})):(o={duration:a.get("animationDuration",!0),easing:a.get("animationEasing",!0)},t.stopAnimation(null,!0),t.animateTo({x:i,y:0},o),e&&e.animateTo({shape:{x2:i}},o)))}function UT(t){t=t&&t.timeline;N(t=F(t)?t:t?[t]:[],function(t){var e,n;t&&(e=(t=t).type,(n={number:"value",time:"time"})[e]&&(t.axisType=n[e],delete t.type),YT(t),XT(t,"controlPosition")&&(XT(n=t.controlStyle||(t.controlStyle={}),"position")||(n.position=t.controlPosition),"none"!==n.position||XT(n,"show")||(n.show=!1,delete n.position),delete t.controlPosition),N(t.data||[],function(t){k(t)&&!F(t)&&(!XT(t,"value")&&XT(t,"name")&&(t.value=t.name),YT(t))}))})}function YT(t){var e=t.itemStyle||(t.itemStyle={}),e=e.emphasis||(e.emphasis={}),t=t.label||t.label||{},n=t.normal||(t.normal={}),i={normal:1,emphasis:1};N(t,function(t,e){i[e]||XT(n,e)||(n[e]=t)}),e.label&&!XT(t,"emphasis")&&(t.emphasis=e.label,delete e.label)}function XT(t,e){return t.hasOwnProperty(e)}j1(function(t){var e;t.registerComponentModel(kT),t.registerComponentView(FT),t.registerSubTypeDefaulter("timeline",function(){return"slider"}),(e=t).registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(t,e){var n=e.getComponent("timeline");return n&&null!=t.currentIndex&&(n.setCurrentIndex(t.currentIndex),!n.get("loop",!0))&&n.isIndexMax()&&n.setPlayState(!1),e.resetOption("timeline",{replaceMerge:n.get("replaceMerge",!0)}),V({currentIndex:n.option.currentIndex},t)}),e.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,e){e=e.getComponent("timeline");e&&null!=t.playState&&e.setPlayState(t.playState)}),t.registerPreprocessor(UT)});var ZT=["x","y","radius","angle","single"],jT=["cartesian2d","polar","singleAxis"];function qT(t){return t+"Axis"}function KT(t,e){var i,o=L(),n=[],r=L();for(t.eachComponent({mainType:"dataZoom",query:e},function(t){r.get(t.uid)||s(t)});i=!1,t.eachComponent("dataZoom",a),i;);function a(t){var n;!r.get(t.uid)&&(n=!1,t.eachTargetAxis(function(t,e){t=o.get(t);t&&t[e]&&(n=!0)}),n)&&(s(t),i=!0)}function s(t){r.set(t.uid,!0),n.push(t),t.eachTargetAxis(function(t,e){(o.get(t)||o.set(t,[]))[e]=!0})}return n}function $T(t){var o=t.ecModel,r={infoList:[],infoMap:L()};return t.eachTargetAxis(function(t,e){var n,i,t=o.getComponent(qT(t),e);t&&(e=t.getCoordSysModel())&&(n=e.uid,(i=r.infoMap.get(n))||(r.infoList.push(i={model:e,axisModels:[]}),r.infoMap.set(n,i)),i.axisModels.push(t))}),r}eC.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)};var JT,QT=eC,cr=(u(tC,JT=g),tC.prototype.init=function(t,e,n){var i=nC(t);this.settledOption=i,this.mergeDefaultAndTheme(t,n),this._doInit(i)},tC.prototype.mergeOption=function(t){var e=nC(t);p(this.option,t,!0),p(this.settledOption,e,!0),this._doInit(e)},tC.prototype._doInit=function(t){var n=this.option,i=(this._setDefaultThrottle(t),this._updateRangeUse(t),this.settledOption);N([["start","startValue"],["end","endValue"]],function(t,e){"value"===this._rangePropMode[e]&&(n[t[0]]=i[t[0]]=null)},this),this._resetTarget()},tC.prototype._resetTarget=function(){var t=this.get("orient",!0),e=this._targetAxisInfoMap=L();this._fillSpecifiedTargetAxis(e)?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(e,this._orient)),this._noTarget=!0,e.each(function(t){t.indexList.length&&(this._noTarget=!1)},this)},tC.prototype._fillSpecifiedTargetAxis=function(i){var o=!1;return N(ZT,function(t){var e,n=this.getReferringComponents(qT(t),er);n.specified&&(o=!0,e=new QT,N(n.models,function(t){e.add(t.componentIndex)}),i.set(t,e))},this),o},tC.prototype._fillAutoTargetAxisByOrient=function(r,e){var t,i=this.ecModel,a=!0;function n(t,e){var n,i,o=t[0];o&&((n=new QT).add(o.componentIndex),r.set(e,n),a=!1,"x"!==e&&"y"!==e||(i=o.getReferringComponents("grid",tr).models[0])&&N(t,function(t){o.componentIndex!==t.componentIndex&&i===t.getReferringComponents("grid",tr).models[0]&&n.add(t.componentIndex)}))}a&&n(i.findComponents({mainType:(t="vertical"===e?"y":"x")+"Axis"}),t),a&&n(i.findComponents({mainType:"singleAxis",filter:function(t){return t.get("orient",!0)===e}}),"single"),a&&N(ZT,function(t){var e,n;a&&(e=i.findComponents({mainType:qT(t),filter:function(t){return"category"===t.get("type",!0)}}))[0]&&((n=new QT).add(e[0].componentIndex),r.set(t,n),a=!1)},this)},tC.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis(function(t){e=e||t},this),"y"===e?"vertical":"horizontal"},tC.prototype._setDefaultThrottle=function(t){t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle&&(t=this.ecModel.option,this.option.throttle=t.animation&&0<t.animationDurationUpdate?100:20)},tC.prototype._updateRangeUse=function(i){var o=this._rangePropMode,r=this.get("rangeMode");N([["start","startValue"],["end","endValue"]],function(t,e){var n=null!=i[t[0]],t=null!=i[t[1]];n&&!t?o[e]="percent":!n&&t?o[e]="value":r?o[e]=r[e]:n&&(o[e]="percent")})},tC.prototype.noTarget=function(){return this._noTarget},tC.prototype.getFirstTargetAxisModel=function(){var n;return this.eachTargetAxis(function(t,e){null==n&&(n=this.ecModel.getComponent(qT(t),e))},this),n},tC.prototype.eachTargetAxis=function(n,i){this._targetAxisInfoMap.each(function(t,e){N(t.indexList,function(t){n.call(i,e,t)})})},tC.prototype.getAxisProxy=function(t,e){t=this.getAxisModel(t,e);if(t)return t.__dzAxisProxy},tC.prototype.getAxisModel=function(t,e){var n=this._targetAxisInfoMap.get(t);if(n&&n.indexMap[e])return this.ecModel.getComponent(qT(t),e)},tC.prototype.setRawRange=function(e){var n=this.option,i=this.settledOption;N([["start","startValue"],["end","endValue"]],function(t){null==e[t[0]]&&null==e[t[1]]||(n[t[0]]=i[t[0]]=e[t[0]],n[t[1]]=i[t[1]]=e[t[1]])},this),this._updateRangeUse(e)},tC.prototype.setCalculatedRange=function(e){var n=this.option;N(["start","startValue","end","endValue"],function(t){n[t]=e[t]})},tC.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},tC.prototype.getValueRange=function(t,e){return null!=t||null!=e?this.getAxisProxy(t,e).getDataValueWindow():(t=this.findRepresentativeAxisProxy())?t.getDataValueWindow():void 0},tC.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var e,n=this._targetAxisInfoMap.keys(),i=0;i<n.length;i++)for(var o=n[i],r=this._targetAxisInfoMap.get(o),a=0;a<r.indexList.length;a++){var s=this.getAxisProxy(o,r.indexList[a]);if(s.hostedBy(this))return s;e=e||s}return e},tC.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},tC.prototype.getOrient=function(){return this._orient},tC.type="dataZoom",tC.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],tC.defaultOption={zlevel:0,z:4,filterMode:"filter",start:0,end:100},tC);function tC(){var t=null!==JT&&JT.apply(this,arguments)||this;return t.type=tC.type,t._autoThrottle=!0,t._noTarget=!0,t._rangePropMode=["percent","percent"],t}function eC(){this.indexList=[],this.indexMap=[]}function nC(e){var n={};return N(["start","end","startValue","endValue","throttle"],function(t){e.hasOwnProperty(t)&&(n[t]=e[t])}),n}u(rC,iC=cr),rC.type="dataZoom.inside",rC.defaultOption=vc(cr.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0});var iC,oC=rC;function rC(){var t=null!==iC&&iC.apply(this,arguments)||this;return t.type=rC.type,t}u(sC,aC=_g),sC.prototype.render=function(t,e,n,i){this.dataZoomModel=t,this.ecModel=e,this.api=n},sC.type="dataZoom";var aC,Hu=sC;function sC(){var t=null!==aC&&aC.apply(this,arguments)||this;return t.type=sC.type,t}function lC(t,e,n,i,o,r){t=t||0;var a=n[1]-n[0],a=(null!=o&&(o=hC(o,[0,a])),null!=r&&(r=Math.max(r,null!=o?o:0)),"all"===i&&(s=hC(s=Math.abs(e[1]-e[0]),[0,a]),o=r=hC(s,[o,r]),i=0),e[0]=hC(e[0],n),e[1]=hC(e[1],n),uC(e,i));e[i]+=t;var s=o||0,t=n.slice();return a.sign<0?t[0]+=s:t[1]-=s,e[i]=hC(e[i],t),n=uC(e,i),null!=o&&(n.sign!==a.sign||n.span<o)&&(e[1-i]=e[i]+a.sign*o),n=uC(e,i),null!=r&&n.span>r&&(e[1-i]=e[i]+n.sign*r),e}function uC(t,e){t=t[e]-t[1-e];return{span:Math.abs(t),sign:0<t||!(t<0)&&e?-1:1}}function hC(t,e){return Math.min(null!=e[1]?e[1]:1/0,Math.max(null!=e[0]?e[0]:-1/0,t))}var cC="\0_ec_interaction_mutex";function pC(t,e){return dC(t)[e]}function dC(t){return t[cC]||(t[cC]={})}zv({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},function(){});u(yC,fC=Qt),yC.prototype.isDragging=function(){return this._dragging},yC.prototype.isPinching=function(){return this._pinching},yC.prototype.setPointerChecker=function(t){this.pointerChecker=t},yC.prototype.dispose=function(){this.disable()},yC.prototype._mousedownHandler=function(t){var e,n;me(t)||t.target&&t.target.draggable||(e=t.offsetX,n=t.offsetY,this.pointerChecker&&this.pointerChecker(t,e,n)&&(this._x=e,this._y=n,this._dragging=!0))},yC.prototype._mousemoveHandler=function(t){var e,n,i,o,r,a;this._dragging&&_C("moveOnMouseMove",t,this._opt)&&"pinch"!==t.gestureEvent&&!pC(this._zr,"globalPan")&&(e=t.offsetX,n=t.offsetY,r=e-(i=this._x),a=n-(o=this._y),this._x=e,this._y=n,this._opt.preventDefaultMouseMove&&ye(t.event),vC(this,"pan","moveOnMouseMove",t,{dx:r,dy:a,oldX:i,oldY:o,newX:e,newY:n,isAvailableBehavior:null}))},yC.prototype._mouseupHandler=function(t){me(t)||(this._dragging=!1)},yC.prototype._mousewheelHandler=function(t){var e=_C("zoomOnMouseWheel",t,this._opt),n=_C("moveOnMouseWheel",t,this._opt),i=t.wheelDelta,o=Math.abs(i),r=t.offsetX,a=t.offsetY;0!==i&&(e||n)&&(e&&(e=3<o?1.4:1<o?1.2:1.1,mC(this,"zoom","zoomOnMouseWheel",t,{scale:0<i?e:1/e,originX:r,originY:a,isAvailableBehavior:null})),n)&&mC(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:(0<i?1:-1)*(3<(o=Math.abs(i))?.4:1<o?.15:.05),originX:r,originY:a,isAvailableBehavior:null})},yC.prototype._pinchHandler=function(t){pC(this._zr,"globalPan")||mC(this,"zoom",null,t,{scale:1<t.pinchScale?1.1:1/1.1,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})};var fC,gC=yC;function yC(n){var t=fC.call(this)||this,i=(t._zr=n,S(t._mousedownHandler,t)),o=S(t._mousemoveHandler,t),r=S(t._mouseupHandler,t),a=S(t._mousewheelHandler,t),s=S(t._pinchHandler,t);return t.enable=function(t,e){this.disable(),this._opt=V(C(e)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),!0!==(t=null==t?!0:t)&&"move"!==t&&"pan"!==t||(n.on("mousedown",i),n.on("mousemove",o),n.on("mouseup",r)),!0!==t&&"scale"!==t&&"zoom"!==t||(n.on("mousewheel",a),n.on("pinch",s))},t.disable=function(){n.off("mousedown",i),n.off("mousemove",o),n.off("mouseup",r),n.off("mousewheel",a),n.off("pinch",s)},t}function mC(t,e,n,i,o){t.pointerChecker&&t.pointerChecker(i,o.originX,o.originY)&&(ye(i.event),vC(t,e,n,i,o))}function vC(t,e,n,i,o){o.isAvailableBehavior=S(_C,null,n,i),t.trigger(e,o)}function _C(t,e,n){n=n[t];return!t||n&&(!D(n)||e.event[n+"Key"])}var xC=Ko();function bC(t,e){e&&(t.removeKey(e.model.uid),t=e.controller)&&t.dispose()}function wC(t,e){t.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:e})}function SC(t,e,n,i){return t.coordinateSystem.containPoint([n,i])}function MC(t){t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,function(t,a){var e=xC(a),l=e.coordSysRecordMap||(e.coordSysRecordMap=L());l.each(function(t){t.dataZoomInfoMap=null}),t.eachComponent({mainType:"dataZoom",subType:"inside"},function(o){N($T(o).infoList,function(t){var r,e,n=t.model.uid,i=l.get(n)||l.set(n,(n=a,i=t.model,r={model:i,containsPoint:M(SC,i),dispatchAction:M(wC,n),dataZoomInfoMap:null,controller:null},e=r.controller=new gC(n.getZr()),N(["pan","zoom","scrollMove"],function(o){e.on(o,function(n){var i=[];r.dataZoomInfoMap.each(function(t){var e;n.isAvailableBehavior(t.model.option)&&(e=(e=(t.getRange||{})[o])&&e(t.dzReferCoordSysInfo,r.model.mainType,r.controller,n),!t.model.get("disabled",!0))&&e&&i.push({dataZoomId:t.model.id,start:e[0],end:e[1]})}),i.length&&r.dispatchAction(i)})}),r));(i.dataZoomInfoMap||(i.dataZoomInfoMap=L())).set(o.uid,{dzReferCoordSysInfo:t,model:o,getRange:null})})}),l.each(function(t){var e,n,i,o,r,a=t.controller,s=t.dataZoomInfoMap;(e=s&&null!=(n=s.keys()[0])?s.get(n):e)?(o={type_true:2,type_move:1,type_false:0,type_undefined:-1},r=!0,s.each(function(t){var t=t.model,e=!t.get("disabled",!0)&&(!t.get("zoomLock",!0)||"move");o["type_"+i]<o["type_"+e]&&(i=e),r=r&&t.get("preventDefaultMouseMove",!0)}),n={controlType:i,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!r}},a.enable(n.controlType,n.opt),a.setPointerChecker(t.containsPoint),Ng(t,"dispatchAction",e.model.get("throttle",!0),"fixRate")):bC(l,t)})})}u(AC,TC=Hu),AC.prototype.render=function(t,e,n){var i,o;TC.prototype.render.apply(this,arguments),t.noTarget()?this._clear():(this.range=t.getPercentRange(),n=n,i=t,o={pan:S(IC.pan,this),zoom:S(IC.zoom,this),scrollMove:S(IC.scrollMove,this)},xC(n).coordSysRecordMap.each(function(t){t=t.dataZoomInfoMap.get(i.uid);t&&(t.getRange=o)}))},AC.prototype.dispose=function(){this._clear(),TC.prototype.dispose.apply(this,arguments)},AC.prototype._clear=function(){for(var t=this.api,e=this.dataZoomModel,n=xC(t).coordSysRecordMap,i=n.keys(),o=0;o<i.length;o++){var r,a=i[o],a=n.get(a),s=a.dataZoomInfoMap;s&&(r=e.uid,s.get(r))&&(s.removeKey(r),s.keys().length||bC(n,a))}this.range=null},AC.type="dataZoom.inside";var TC,CC=AC,IC={zoom:function(t,e,n,i){var o=this.range,r=o.slice(),a=t.axisModels[0];if(a)return a=(0<(e=kC[e](null,[i.originX,i.originY],a,n,t)).signal?e.pixelStart+e.pixelLength-e.pixel:e.pixel-e.pixelStart)/e.pixelLength*(r[1]-r[0])+r[0],n=Math.max(1/i.scale,0),r[0]=(r[0]-a)*n+a,r[1]=(r[1]-a)*n+a,lC(0,r,[0,100],0,(t=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan()).minSpan,t.maxSpan),this.range=r,o[0]!==r[0]||o[1]!==r[1]?r:void 0},pan:DC(function(t,e,n,i,o,r){i=kC[i]([r.oldX,r.oldY],[r.newX,r.newY],e,o,n);return i.signal*(t[1]-t[0])*i.pixel/i.pixelLength}),scrollMove:DC(function(t,e,n,i,o,r){return kC[i]([0,0],[r.scrollDelta,r.scrollDelta],e,o,n).signal*(t[1]-t[0])*r.scrollDelta})};function AC(){var t=null!==TC&&TC.apply(this,arguments)||this;return t.type="dataZoom.inside",t}function DC(s){return function(t,e,n,i){var o=this.range,r=o.slice(),a=t.axisModels[0];if(a)return lC(s(r,a,t,e,n,i),r,[0,100],"all"),this.range=r,o[0]!==r[0]||o[1]!==r[1]?r:void 0}}var kC={grid:function(t,e,n,i,o){var n=n.axis,r={},o=o.model.coordinateSystem.getRect();return t=t||[0,0],"x"===n.dim?(r.pixel=e[0]-t[0],r.pixelLength=o.width,r.pixelStart=o.x,r.signal=n.inverse?1:-1):(r.pixel=e[1]-t[1],r.pixelLength=o.height,r.pixelStart=o.y,r.signal=n.inverse?-1:1),r},polar:function(t,e,n,i,o){var r=n.axis,a={},o=o.model.coordinateSystem,s=o.getRadiusAxis().getExtent(),l=o.getAngleAxis().getExtent();return t=t?o.pointToCoord(t):[0,0],e=o.pointToCoord(e),"radiusAxis"===n.mainType?(a.pixel=e[0]-t[0],a.pixelLength=s[1]-s[0],a.pixelStart=s[0],a.signal=r.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=l[1]-l[0],a.pixelStart=l[0],a.signal=r.inverse?-1:1),a},singleAxis:function(t,e,n,i,o){var n=n.axis,o=o.model.coordinateSystem.getRect(),r={};return t=t||[0,0],"horizontal"===n.orient?(r.pixel=e[0]-t[0],r.pixelLength=o.width,r.pixelStart=o.x,r.signal=n.inverse?1:-1):(r.pixel=e[1]-t[1],r.pixelLength=o.height,r.pixelStart=o.y,r.signal=n.inverse?-1:1),r}},LC=N,PC=xo,OC=(RC.prototype.hostedBy=function(t){return this._dataZoomModel===t},RC.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},RC.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},RC.prototype.getTargetSeriesModels=function(){var n=[];return this.ecModel.eachSeries(function(t){var e;e=(e=t).get("coordinateSystem"),0<=A(jT,e)&&(e=qT(this._dimName),e=t.getReferringComponents(e,tr).models[0])&&this._axisIndex===e.componentIndex&&n.push(t)},this),n},RC.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},RC.prototype.getMinMaxSpan=function(){return C(this._minMaxSpan)},RC.prototype.calculateDataWindow=function(i){var o,r=this._dataExtent,s=this.getAxisModel().axis.scale,a=this._dataZoomModel.getRangePropMode(),l=[0,100],u=[],h=[],c=(LC(["start","end"],function(t,e){var n=i[t],t=i[t+"Value"];"percent"===a[e]?t=s.parse(vo(n=null==n?l[e]:n,l,r)):(o=!0,n=vo(t=null==t?r[e]:s.parse(t),r,l)),h[e]=t,u[e]=n}),PC(h),PC(u),this._minMaxSpan);function t(t,e,n,i,o){var r=o?"Span":"ValueSpan";lC(0,t,n,"all",c["min"+r],c["max"+r]);for(var a=0;a<2;a++)e[a]=vo(t[a],n,i,!0),o&&(e[a]=s.parse(e[a]))}return o?t(h,u,r,l,!1):t(u,h,l,r,!0),{valueWindow:h,percentWindow:u}},RC.prototype.reset=function(t){var e,i,n,o;t===this._dataZoomModel&&(n=this.getTargetSeriesModels(),this._dataExtent=(i=(e=this)._dimName,o=[1/0,-1/0],LC(n=n,function(t){var e,n;e=o,n=t.getData(),t=i,n&&N(W1(n,t),function(t){t=n.getApproximateExtent(t);t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])})}),[(e=O1((n=e.getAxisModel()).axis.scale,n,o).calculate()).min,e.max]),this._updateMinMaxSpan(),n=this.calculateDataWindow(t.settledOption),this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel())},RC.prototype.filterData=function(t,e){var i,n,o,h;t===this._dataZoomModel&&(i=this._dimName,n=this.getTargetSeriesModels(),o=t.get("filterMode"),h=this._valueWindow,"none"!==o)&&LC(n,function(n){var l=n.getData(),u=l.mapDimensionsAll(i);u.length&&("weakFilter"===o?l.filterSelf(function(t){for(var e,n,i,o=0;o<u.length;o++){var r=l.get(u[o],t),a=!isNaN(r),s=r<h[0],r=r>h[1];if(a&&!s&&!r)return!0;a&&(i=!0),s&&(e=!0),r&&(n=!0)}return i&&e&&n}):LC(u,function(t){var e;"empty"===o?n.setData(l=l.map(t,function(t){return t>=h[0]&&t<=h[1]?t:NaN})):((e={})[t]=h,l.selectRange(e))}),LC(u,function(t){l.setApproximateExtent(h,t)}))})},RC.prototype._updateMinMaxSpan=function(){var i=this._minMaxSpan={},o=this._dataZoomModel,r=this._dataExtent;LC(["min","max"],function(t){var e=o.get(t+"Span"),n=o.get(t+"ValueSpan");null!=(n=null!=n?this.getAxisModel().axis.scale.parse(n):n)?e=vo(r[0]+n,r,[0,100],!0):null!=e&&(n=vo(e,[0,100],r,!0)-r[0]),i[t+"Span"]=e,i[t+"ValueSpan"]=n},this)},RC.prototype._setAxisModel=function(){var t,e=this.getAxisModel(),n=this._percentWindow,i=this._valueWindow;n&&(t=So(i,[0,500]),t=Math.min(t,20),e=e.axis.scale.rawExtentInfo,0!==n[0]&&e.setDeterminedMinMax("min",+i[0].toFixed(t)),100!==n[1]&&e.setDeterminedMinMax("max",+i[1].toFixed(t)),e.freeze())},RC);function RC(t,e,n,i){this._dimName=t,this._axisIndex=e,this.ecModel=i,this._dataZoomModel=n}var NC={getTargetSeries:function(r){function t(o){r.eachComponent("dataZoom",function(i){i.eachTargetAxis(function(t,e){var n=r.getComponent(qT(t),e);o(t,e,n,i)})})}t(function(t,e,n,i){n.__dzAxisProxy=null});var o=[],e=(t(function(t,e,n,i){n.__dzAxisProxy||(n.__dzAxisProxy=new OC(t,e,i,r),o.push(n.__dzAxisProxy))}),L());return N(o,function(t){N(t.getTargetSeriesModels(),function(t){e.set(t.uid,t)})}),e},overallReset:function(t,i){t.eachComponent("dataZoom",function(n){n.eachTargetAxis(function(t,e){n.getAxisProxy(t,e).reset(n)}),n.eachTargetAxis(function(t,e){n.getAxisProxy(t,e).filterData(n,i)})}),t.eachComponent("dataZoom",function(t){var e,n=t.findRepresentativeAxisProxy();n&&(e=n.getDataPercentWindow(),n=n.getDataValueWindow(),t.setCalculatedRange({start:e[0],end:e[1],startValue:n[0],endValue:n[1]}))})}};var EC=!1;function BC(t){EC||(EC=!0,t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,NC),t.registerAction("dataZoom",function(e,t){N(KT(t,e),function(t){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})}),t.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function zC(t){BC(t),t.registerComponentModel(oC),t.registerComponentView(CC),MC(t)}u(HC,VC=cr),HC.type="dataZoom.slider",HC.layoutMode="box",HC.defaultOption=vc(cr.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}});var VC,FC=HC;function HC(){var t=null!==VC&&VC.apply(this,arguments)||this;return t.type=HC.type,t}var GC,WC=ms,UC="horizontal",YC="vertical",XC=["line","bar","candlestick","scatter"],ZC={easing:"cubicOut",duration:100},jC=(u(qC,GC=Hu),qC.prototype.init=function(t,e){this.api=e,this._onBrush=S(this._onBrush,this),this._onBrushEnd=S(this._onBrushEnd,this)},qC.prototype.render=function(t,e,n,i){GC.prototype.render.apply(this,arguments),Ng(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),!1!==t.get("show")?t.noTarget()?(this._clear(),this.group.removeAll()):(i&&"dataZoom"===i.type&&i.from===this.uid||this._buildView(),this._updateView()):this.group.removeAll()},qC.prototype.dispose=function(){this._clear(),GC.prototype.dispose.apply(this,arguments)},qC.prototype._clear=function(){(e=(n=this)[t="_dispatchZoomAction"])&&e[Lg]&&(n[t]=e[Lg]);var t,e,n=this.api.getZr();n.off("mousemove",this._onBrush),n.off("mouseup",this._onBrushEnd)},qC.prototype._buildView=function(){var t=this.group,e=(t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval(),this._displayables.sliderGroup=new O);this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},qC.prototype._resetLocation=function(){var t=this.dataZoomModel,e=this.api,n=t.get("brushSelect")?7:0,i=this._findCoordRect(),e={width:e.getWidth(),height:e.getHeight()},o=this._orient===UC?{right:e.width-i.x-i.width,top:e.height-30-7-n,width:i.width,height:30}:{right:7,top:i.y,width:30,height:i.height},r=bp(t.option),n=(N(["right","top","width","height"],function(t){"ph"===r[t]&&(r[t]=o[t])}),mp(r,e));this._location={x:n.x,y:n.y},this._size=[n.width,n.height],this._orient===YC&&this._size.reverse()},qC.prototype._positionGroup=function(){var t=this.group,e=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),i=i&&i.get("inverse"),o=this._displayables.sliderGroup,r=(this._dataShadowInfo||{}).otherAxisInverse,n=(o.attr(n!==UC||i?n===UC&&i?{scaleY:r?1:-1,scaleX:-1}:n!==YC||i?{scaleY:r?-1:1,scaleX:-1,rotation:Math.PI/2}:{scaleY:r?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:r?1:-1,scaleX:1}),t.getBoundingRect([o]));t.x=e.x-n.x,t.y=e.y-n.y,t.markRedraw()},qC.prototype._getViewExtent=function(){return[0,this._size[0]]},qC.prototype._renderBackground=function(){var t=this.dataZoomModel,e=this._size,n=this._displayables.sliderGroup,i=t.get("brushSelect"),t=(n.add(new WC({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40})),new WC({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:S(this._onClickPanel,this)})),e=this.api.getZr();i?(t.on("mousedown",this._onBrushStart,this),t.cursor="crosshair",e.on("mousemove",this._onBrush),e.on("mouseup",this._onBrushEnd)):(e.off("mousemove",this._onBrush),e.off("mouseup",this._onBrushEnd)),n.add(t)},qC.prototype._renderDataShadow=function(){var t,e,n=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],n){var i=this._size,o=n.series,r=o.getRawData(),o=o.getShadowDim?o.getShadowDim():n.otherDim;if(null!=o){var a,n=.3*((s=r.getDataExtent(o))[1]-s[0]),s=[s[0]-n,s[1]+n],l=[0,i[1]],n=[0,i[0]],u=[[i[0],0],[0,0]],h=[],c=n[1]/(r.count()-1),p=0,d=Math.round(r.count()/i[0]);r.each([o],function(t,e){var n;0<d&&e%d?p+=c:(t=(n=null==t||isNaN(t)||""===t)?0:vo(t,s,l,!0),n&&!a&&e?(u.push([u[u.length-1][0],0]),h.push([h[h.length-1][0],0])):!n&&a&&(u.push([p,0]),h.push([p,0])),u.push([p,t]),h.push([p,t]),p+=c,a=n)});for(var f=this.dataZoomModel,g=0;g<3;g++){t=1===g,y=e=void 0,t=f.getModel(t?"selectedDataBackground":"dataBackground"),e=new O,y=new Cu({shape:{points:u},segmentIgnoreThreshold:1,style:t.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),t=new ku({shape:{points:h},segmentIgnoreThreshold:1,style:t.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19}),e.add(y),e.add(t);var y=e;this._displayables.sliderGroup.add(y),this._displayables.dataShadowSegs.push(y)}}}},qC.prototype._prepareDataShadowInfo=function(){var s,l,t=this.dataZoomModel,u=t.get("showDataShadow");if(!1!==u)return l=this.ecModel,t.eachTargetAxis(function(r,a){N(t.getAxisProxy(r,a).getTargetSeriesModels(),function(t){var e,n,i,o;s||!0!==u&&A(XC,t.get("type"))<0||(n=l.getComponent(qT(r),a).axis,o=t.coordinateSystem,null!=(i={x:"y",y:"x",radius:"angle",angle:"radius"}[r])&&o.getOtherAxis&&(e=o.getOtherAxis(n).inverse),i=t.getData().mapDimension(i),s={thisAxis:n,series:t,thisDim:r,otherDim:i,otherAxisInverse:e})},this)},this),s},qC.prototype._renderHandle=function(){var t,e,o=this.group,n=this._displayables,r=n.handles=[null,null],a=n.handleLabels=[null,null],s=this._displayables.sliderGroup,i=this._size,l=this.dataZoomModel,u=this.api,h=l.get("borderRadius")||0,c=l.get("brushSelect"),p=n.filler=new WC({silent:c,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}}),h=(s.add(p),s.add(new WC({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:i[0],height:i[1],r:h},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),N([0,1],function(t){var e=l.get("handleIcon"),e=nm(e=!Qy[e]&&e.indexOf("path://")<0&&e.indexOf("image://")<0?"path://"+e:e,-1,0,2,2,null,!0),n=(e.attr({cursor:KC(this._orient),draggable:!0,drift:S(this._onDragMove,this,t),ondragend:S(this._onDragEnd,this),onmouseover:S(this._showDataInfo,this,!0),onmouseout:S(this._showDataInfo,this,!1),z2:5}),e.getBoundingRect()),i=l.get("handleSize"),i=(this._handleHeight=B(i,this._size[1]),this._handleWidth=n.width/n.height*this._handleHeight,e.setStyle(l.getModel("handleStyle").getItemStyle()),e.style.strokeNoScale=!0,e.rectHover=!0,e.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),xl(e),l.get("handleColor")),n=(null!=i&&(e.style.fill=i),s.add(r[t]=e),l.getModel("textStyle"));o.add(a[t]=new ws({silent:!0,invisible:!0,style:Kh(n,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:n.getTextColor(),font:n.getFont()}),z2:10}))},this),p);c&&(p=B(l.get("moveHandleSize"),i[1]),t=n.moveHandle=new ms({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:i[1]-.5,height:p}}),c=.8*p,(c=n.moveHandleIcon=nm(l.get("moveHandleIcon"),-c/2,-c/2,c,c,"#fff",!0)).silent=!0,c.y=i[1]+p/2-.5,t.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle(),e=Math.min(i[1]/2,Math.max(p,10)),(h=n.moveZone=new ms({invisible:!0,shape:{y:i[1]-e,height:p+e}})).on("mouseover",function(){u.enterEmphasis(t)}).on("mouseout",function(){u.leaveEmphasis(t)}),s.add(t),s.add(c),s.add(h)),h.attr({draggable:!0,cursor:KC(this._orient),drift:S(this._onDragMove,this,"all"),ondragstart:S(this._showDataInfo,this,!0),ondragend:S(this._onDragEnd,this),onmouseover:S(this._showDataInfo,this,!0),onmouseout:S(this._showDataInfo,this,!1)})},qC.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[vo(t[0],[0,100],e,!0),vo(t[1],[0,100],e,!0)]},qC.prototype._updateInterval=function(t,e){var n=this.dataZoomModel,i=this._handleEnds,o=this._getViewExtent(),r=n.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100],e=(lC(e,i,o,n.get("zoomLock")?"all":t,null!=r.minSpan?vo(r.minSpan,a,o,!0):null,null!=r.maxSpan?vo(r.maxSpan,a,o,!0):null),this._range),n=this._range=xo([vo(i[0],o,a,!0),vo(i[1],o,a,!0)]);return!e||e[0]!==n[0]||e[1]!==n[1]},qC.prototype._updateView=function(t){var i=this._displayables,o=this._handleEnds,e=xo(o.slice()),r=this._size,n=(N([0,1],function(t){var e=i.handles[t],n=this._handleHeight;e.attr({scaleX:n/2,scaleY:n/2,x:o[t]+(t?-1:1),y:r[1]/2-n/2})},this),i.filler.setShape({x:e[0],y:0,width:e[1]-e[0],height:r[1]}),{x:e[0],width:e[1]-e[0]});i.moveHandle&&(i.moveHandle.setShape(n),i.moveZone.setShape(n),i.moveZone.getBoundingRect(),i.moveHandleIcon)&&i.moveHandleIcon.attr("x",n.x+n.width/2);for(var a=i.dataShadowSegs,s=[0,e[0],e[1],r[0]],l=0;l<a.length;l++){var u=a[l],h=u.getClipPath();h||(h=new ms,u.setClipPath(h)),h.setShape({x:s[l],y:0,width:s[l+1]-s[l],height:r[1]})}this._updateDataInfo(t)},qC.prototype._updateDataInfo=function(t){var e,n,i=this.dataZoomModel,o=this._displayables,r=o.handleLabels,a=this._orient,s=["",""],l=(i.get("showDetail")&&(i=i.findRepresentativeAxisProxy())&&(e=i.getAxisModel().axis,n=this._range,t=t?i.calculateDataWindow({start:n[0],end:n[1]}).valueWindow:i.getDataValueWindow(),s=[this._formatLabel(t[0],e),this._formatLabel(t[1],e)]),xo(this._handleEnds.slice()));function u(t){var e=Rh(o.handles[t].parent,this.group),n=Eh(0===t?"right":"left",e),i=this._handleWidth/2+5,i=Nh([l[t]+(0===t?-i:i),this._size[1]/2],e);r[t].setStyle({x:i[0],y:i[1],verticalAlign:a===UC?"middle":n,align:a===UC?n:"center",text:s[t]})}u.call(this,0),u.call(this,1)},qC.prototype._formatLabel=function(t,e){var n=this.dataZoomModel,i=n.get("labelFormatter"),n=n.get("labelPrecision"),e=(null!=n&&"auto"!==n||(n=e.getPixelPrecision()),null==t||isNaN(t)?"":"category"===e.type||"time"===e.type?e.scale.getLabel({value:Math.round(t)}):t.toFixed(Math.min(n,20)));return ut(i)?i(t,e):D(i)?i.replace("{value}",e):e},qC.prototype._showDataInfo=function(t){t=this._dragging||t;var e=this._displayables,n=e.handleLabels;n[0].attr("invisible",!t),n[1].attr("invisible",!t),e.moveHandle&&this.api[t?"enterEmphasis":"leaveEmphasis"](e.moveHandle,1)},qC.prototype._onDragMove=function(t,e,n,i){this._dragging=!0,ye(i.event);i=Nh([e,n],this._displayables.sliderGroup.getLocalTransform(),!0),e=this._updateInterval(t,i[0]),n=this.dataZoomModel.get("realtime");this._updateView(!n),e&&n&&this._dispatchZoomAction(!0)},qC.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1),this.dataZoomModel.get("realtime")||this._dispatchZoomAction(!1)},qC.prototype._onClickPanel=function(t){var e=this._size,t=this._displayables.sliderGroup.transformCoordToLocal(t.offsetX,t.offsetY);t[0]<0||t[0]>e[0]||t[1]<0||t[1]>e[1]||(e=((e=this._handleEnds)[0]+e[1])/2,t=this._updateInterval("all",t[0]-e),this._updateView(),t&&this._dispatchZoomAction(!1))},qC.prototype._onBrushStart=function(t){var e=t.offsetX,t=t.offsetY;this._brushStart=new E(e,t),this._brushing=!0,this._brushStartTime=+new Date},qC.prototype._onBrushEnd=function(t){var e,n,i;this._brushing&&(e=this._displayables.brushRect,this._brushing=!1,e)&&(e.attr("ignore",!0),e=e.shape,+new Date-this._brushStartTime<200&&Math.abs(e.width)<5||(n=this._getViewExtent(),this._range=xo([vo(e.x,n,i=[0,100],!0),vo(e.x+e.width,n,i,!0)]),this._handleEnds=[e.x,e.x+e.width],this._updateView(),this._dispatchZoomAction(!1)))},qC.prototype._onBrush=function(t){this._brushing&&(ye(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},qC.prototype._updateBrushRect=function(t,e){var n=this._displayables,i=this.dataZoomModel,o=n.brushRect,i=(o||(o=n.brushRect=new WC({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(o)),o.attr("ignore",!1),this._brushStart),n=this._displayables.sliderGroup,t=n.transformCoordToLocal(t,e),e=n.transformCoordToLocal(i.x,i.y),n=this._size;t[0]=Math.max(Math.min(n[0],t[0]),0),o.setShape({x:e[0],y:0,width:t[0]-e[0],height:n[1]})},qC.prototype._dispatchZoomAction=function(t){var e=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?ZC:null,start:e[0],end:e[1]})},qC.prototype._findCoordRect=function(){var t,e,n=$T(this.dataZoomModel).infoList;return t=(t=!t&&n.length?(n=n[0].model.coordinateSystem).getRect&&n.getRect():t)?t:{x:.2*(n=this.api.getWidth()),y:.2*(e=this.api.getHeight()),width:.6*n,height:.6*e}},qC.type="dataZoom.slider",qC);function qC(){var t=null!==GC&&GC.apply(this,arguments)||this;return t.type=qC.type,t._displayables={},t}function KC(t){return"vertical"===t?"ns-resize":"ew-resize"}function $C(t){t.registerComponentModel(FC),t.registerComponentView(jC),BC(t)}j1(function(t){j1(zC),j1($C)});u(tI,JC=cr),tI.type="dataZoom.select";var JC,QC=tI;function tI(){var t=null!==JC&&JC.apply(this,arguments)||this;return t.type=tI.type,t}u(iI,eI=Hu),iI.type="dataZoom.select";var eI,nI=iI;function iI(){var t=null!==eI&&eI.apply(this,arguments)||this;return t.type=iI.type,t}function oI(t){t.registerComponentModel(QC),t.registerComponentView(nI),BC(t)}function rI(){}var aI={};function sI(t,e){aI[t]=e}function lI(t){return aI[t]}u(cI,uI=g),cI.prototype.optionUpdated=function(){uI.prototype.optionUpdated.apply(this,arguments);var n=this.ecModel;N(this.option.feature,function(t,e){e=lI(e);e&&(e.getDefaultOption&&(e.defaultOption=e.getDefaultOption(n)),p(t,e.defaultOption))})},cI.type="toolbox",cI.layoutMode={type:"box",ignoreSize:!0},cI.defaultOption={show:!0,z:6,zlevel:0,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}};var uI,hI=cI;function cI(){var t=null!==uI&&uI.apply(this,arguments)||this;return t.type=cI.type,t}u(fI,pI=_g),fI.prototype.render=function(p,d,f,g){var y,m,v,_,t,e,n,i,o,r,x=this.group;function a(t,e){var n,o,r,i,a,s,l,u,t=_[t],e=_[e],h=m[t],c=new fc(h,p,p.ecModel);if(g&&null!=g.newTitle&&g.featureName===t&&(h.title=g.newTitle),t&&!e){if(0===t.indexOf("my"))n={onclick:c.option.onclick,featureName:t};else{var h=lI(t);if(!h)return;n=new h}v[t]=n}else if(!(n=v[e]))return;if(n.uid=mc("toolbox-feature"),n.model=c,n.ecModel=d,n.api=f,n instanceof rI){if(!t&&e)return void(n.dispose&&n.dispose(d,f));if(!c.get("show")||n.unusable)return void(n.remove&&n.remove(d,f))}r=n,h=t,s=(o=c).getModel("iconStyle"),l=o.getModel(["emphasis","iconStyle"]),e=r instanceof rI&&r.getIcons?r.getIcons():o.get("icon"),t=o.get("title")||{},"string"==typeof e?(i={})[h]=e:i=e,"string"==typeof t?(a={})[h]=t:a=t,u=o.iconPaths={},N(i,function(t,e){var n=Hh(t,{},{x:-y/2,y:-y/2,width:y,height:y}),i=(n.setStyle(s.getItemStyle()),n.ensureState("emphasis").style=l.getItemStyle(),new ws({style:{text:a[e],align:l.get("textAlign"),borderRadius:l.get("textBorderRadius"),padding:l.get("textPadding"),fill:null},ignore:!0}));n.setTextContent(i),Wh({el:n,componentModel:p,itemName:e,formatterParamsExtra:{title:a[e]}}),n.__title=a[e],n.on("mouseover",function(){var t=l.getItemStyle(),e="vertical"===p.get("orient")?null==p.get("right")?"right":"left":null==p.get("bottom")?"bottom":"top";i.setStyle({fill:l.get("textFill")||t.fill||t.stroke||"#000",backgroundColor:l.get("textBackgroundColor")}),n.setTextConfig({position:l.get("textPosition")||e}),i.ignore=!p.get("showTitle"),ll(this)}).on("mouseout",function(){"emphasis"!==o.get(["iconStatus",e])&&ul(this),i.hide()}),("emphasis"===o.get(["iconStatus",e])?ll:ul)(n),x.add(n),n.on("click",S(r.onclick,r,d,f,e)),u[e]=n}),c.setIconStatus=function(t,e){var n=this.option,i=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[t]=e,i[t]&&("emphasis"===e?ll:ul)(i[t])},n instanceof rI&&n.render&&n.render(c,d,f,g)}x.removeAll(),p.get("show")&&(y=+p.get("itemSize"),m=p.get("feature")||{},v=this._features||(this._features={}),_=[],N(m,function(t,e){_.push(e)}),new qv(this._featureNames||[],_).add(a).update(a).remove(M(a,null)).execute(),this._featureNames=_,t=x,n=f,i=(e=p).getBoxLayoutParams(),o=e.get("padding"),n={width:n.getWidth(),height:n.getHeight()},r=mp(i,n,o),yp(e.get("orient"),t,e.get("itemGap"),r.width,r.height),vp(t,i,n,o),x.add(IS(x.getBoundingRect(),p)),x.eachChild(function(t){var e,n,i=t.__title,o=t.ensureState("emphasis"),o=o.textConfig||(o.textConfig={}),r=t.getTextContent(),r=r&&r.states.emphasis;r&&!ut(r)&&i&&(r=r.style||(r.style={}),i=oi(i,ws.makeFont(r)),e=t.x+x.x,n=!1,t.y+x.y+y+i.height>f.getHeight()&&(o.position="top",n=!0),t=n?-5-i.height:y+8,e+i.width/2>f.getWidth()?(o.position=["100%",t],r.align="right"):e-i.width/2<0&&(o.position=[0,t],r.align="left"))}))},fI.prototype.updateView=function(t,e,n,i){N(this._features,function(t){t instanceof rI&&t.updateView&&t.updateView(t.model,e,n,i)})},fI.prototype.remove=function(e,n){N(this._features,function(t){t instanceof rI&&t.remove&&t.remove(e,n)}),this.group.removeAll()},fI.prototype.dispose=function(e,n){N(this._features,function(t){t instanceof rI&&t.dispose&&t.dispose(e,n)})},fI.type="toolbox";var pI,dI=fI;function fI(){return null!==pI&&pI.apply(this,arguments)||this}u(mI,gI=rI),mI.prototype.onclick=function(t,e){var n=this.model,i=n.get("name")||t.get("title.0.text")||"echarts",o="svg"===e.getZr().painter.getType(),r=o?"svg":n.get("type",!0)||"png",e=e.getConnectedDataURL({type:r,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")});if("function"!=typeof MouseEvent||!w.browser.newEdge&&(w.browser.ie||w.browser.edge))if(window.navigator.msSaveOrOpenBlob||o){var t=e.split(","),a=-1<t[0].indexOf("base64"),s=o?decodeURIComponent(t[1]):t[1],o=(a&&(s=atob(s)),i+"."+r);if(window.navigator.msSaveOrOpenBlob){for(var l=s.length,u=new Uint8Array(l);l--;)u[l]=s.charCodeAt(l);t=new Blob([u]);window.navigator.msSaveOrOpenBlob(t,o)}else{var a=document.createElement("iframe"),t=(document.body.appendChild(a),a.contentWindow),h=t.document;h.open("image/svg+xml","replace"),h.write(s),h.close(),t.focus(),h.execCommand("SaveAs",!0,o),document.body.removeChild(a)}}else{t=n.get("lang"),h='<body style="margin:0;"><img src="'+e+'" style="max-width:100%;" title="'+(t&&t[0]||"")+'" /></body>',o=window.open();o.document.write(h),o.document.title=i}else{a=document.createElement("a"),n=(a.download=i+"."+r,a.target="_blank",a.href=e,new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1}));a.dispatchEvent(n)}},mI.getDefaultOption=function(t){return{show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:t.getLocale(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:t.getLocale(["toolbox","saveAsImage","lang"])}};var gI,yI=mI;function mI(){return null!==gI&&gI.apply(this,arguments)||this}yI.prototype.unusable=!w.canvasSupported;var vI,_I="__ec_magicType_stack__",xI=[["line","bar"],["stack"]],bI=(u(SI,vI=rI),SI.prototype.getIcons=function(){var t=this.model,e=t.get("icon"),n={};return N(t.get("type"),function(t){e[t]&&(n[t]=e[t])}),n},SI.getDefaultOption=function(t){return{show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:t.getLocale(["toolbox","magicType","title"]),option:{},seriesIndex:{}}},SI.prototype.onclick=function(t,e,a){var n,s,l=this.model,i=l.get(["seriesIndex",a]);wI[a]&&(s={series:[]},N(xI,function(t){0<=A(t,a)&&N(t,function(t){l.setIconStatus(t,"normal")})}),l.setIconStatus(a,"emphasis"),t.eachComponent({mainType:"series",query:null==i?null:{seriesIndex:i}},function(t){var e=t.subType,n=t.id,e=wI[a](e,n,t,l),n=(e&&(V(e,t.option),s.series.push(e)),t.coordinateSystem);if(n&&"cartesian2d"===n.type&&("line"===a||"bar"===a)){e=n.getAxesByScale("ordinal")[0];if(e){var i=e.dim+"Axis",o=t.getReferringComponents(i,tr).models[0].componentIndex;s[i]=s[i]||[];for(var r=0;r<=o;r++)s[i][o]=s[i][o]||{};s[i][o].boundaryGap="bar"===a}}}),"stack"===a&&(n=p({stack:l.option.title.tiled,tiled:l.option.title.stack},l.option.title)),e.dispatchAction({type:"changeMagicType",currentType:a,newOption:s,newTitle:n,featureName:"magicType"}))},SI),wI={line:function(t,e,n,i){if("bar"===t)return p({id:e,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","line"])||{},!0)},bar:function(t,e,n,i){if("line"===t)return p({id:e,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","bar"])||{},!0)},stack:function(t,e,n,i){n=n.get("stack")===_I;if("line"===t||"bar"===t)return i.setIconStatus("stack",n?"normal":"emphasis"),p({id:e,stack:n?"":_I},i.get(["option","stack"])||{},!0)}};function SI(){return null!==vI&&vI.apply(this,arguments)||this}zv({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)});var MI=new Array(60).join("-"),TI="\t";function CI(t){o={},r=[],a=[],t.eachRawSeries(function(t){var e,n,i=t.coordinateSystem;(i&&("cartesian2d"===i.type||"polar"===i.type)&&"category"===(e=i.getBaseAxis()).type?(n=e.dim+"_"+e.index,o[n]||(o[n]={categoryAxis:e,valueAxis:i.getOtherAxis(e),series:[]},a.push({axisDim:e.dim,axisIndex:e.index})),o[n].series):r).push(t)});var o,r,a,h,t={seriesGroupByCategoryAxis:o,other:r,meta:a};return{value:st([(h=[],N(t.seriesGroupByCategoryAxis,function(t,e){var n=t.categoryAxis,i=t.valueAxis.dim,o=[" "].concat(j(t.series,function(t){return t.name})),r=[n.model.getCategories()];N(t.series,function(t){var e=t.getRawData();r.push(t.getRawData().mapArray(e.mapDimension(i),function(t){return t}))});for(var a=[o.join(TI)],s=0;s<r[0].length;s++){for(var l=[],u=0;u<r.length;u++)l.push(r[u][s]);a.push(l.join(TI))}h.push(a.join("\n"))}),h.join("\n\n"+MI+"\n\n")),j(t.other,function(t){var i=t.getRawData(),o=[t.name],r=[];return i.each(i.dimensions,function(){for(var t=arguments.length,e=i.getName(arguments[t-1]),n=0;n<t-1;n++)r[n]=arguments[n];o.push((e?e+TI:"")+r.join(TI))}),o.join("\n")}).join("\n\n"+MI+"\n\n")],function(t){return!!t.replace(/[\n\t\s]/g,"")}).join("\n\n"+MI+"\n\n"),meta:t.meta}}function II(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var AI=new RegExp("["+TI+"]+","g");function DI(t,o){var t=t.split(new RegExp("\n*"+MI+"\n*","g")),r={series:[]};return N(t,function(t,e){var n,i;0<=t.slice(0,t.indexOf("\n")).indexOf(TI)?(n=function(t){for(var e=t.split(/\n+/g),n=[],i=j(II(e.shift()).split(AI),function(t){return{name:t,data:[]}}),o=0;o<e.length;o++){var r=II(e[o]).split(AI);n.push(r.shift());for(var a=0;a<r.length;a++)i[a]&&(i[a].data[o]=r[a])}return{series:i,categories:n}}(t),i=(e=o[e]).axisDim+"Axis",e&&(r[i]=r[i]||[],r[i][e.axisIndex]={data:n.categories},r.series=r.series.concat(n.series))):(n=function(t){for(var e=t.split(/\n+/g),t=II(e.shift()),n=[],i=0;i<e.length;i++){var o=II(e[i]);if(o){for(var r,a=o.split(AI),s=void 0,o=!1,s=isNaN(a[0])?(o=!0,r=a[0],a=a.slice(1),n[i]={name:r,value:[]},n[i].value):n[i]=[],l=0;l<a.length;l++)s.push(+a[l]);1===s.length&&(o?n[i].value=s[0]:n[i]=s[0])}}return{name:t,data:n}}(t),r.series.push(n))}),r}u(PI,kI=rI),PI.prototype.onclick=function(t,e){var n=e.getDom(),i=this.model,o=(this._dom&&n.removeChild(this._dom),document.createElement("div")),r=(o.style.cssText="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",o.style.backgroundColor=i.get("backgroundColor")||"#fff",document.createElement("h4")),a=i.get("lang")||[],s=(r.innerHTML=a[0]||i.get("title"),r.style.cssText="margin: 10px 20px;",r.style.color=i.get("textColor"),document.createElement("div")),l=document.createElement("textarea"),u=(s.style.cssText="display:block;width:100%;overflow:auto;",i.get("optionToContent")),h=i.get("contentToOption"),t=CI(t),c=("function"==typeof u?"string"==typeof(p=u(e.getOption()))?s.innerHTML=p:ft(p)&&s.appendChild(p):(s.appendChild(l),l.readOnly=i.get("readOnly"),l.style.cssText="width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;",l.style.color=i.get("textColor"),l.style.borderColor=i.get("textareaBorderColor"),l.style.backgroundColor=i.get("textareaColor"),l.value=t.value),t.meta),p=document.createElement("div"),t=(p.style.cssText="position:absolute;bottom:0;left:0;right:0;","float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px"),d=document.createElement("div"),f=document.createElement("div"),g=(t=(t+=";background-color:"+i.get("buttonColor"))+(";color:"+i.get("buttonTextColor")),this);function y(){n.removeChild(o),g._dom=null}ge(d,"click",y),ge(f,"click",function(){if(!(null==h&&null!=u||null!=h&&null==u)){var t;try{t="function"==typeof h?h(s,e.getOption()):DI(l.value,c)}catch(t){throw y(),new Error("Data view format error "+t)}t&&e.dispatchAction({type:"changeDataView",newOption:t})}y()}),d.innerHTML=a[1],f.innerHTML=a[2],f.style.cssText=t,d.style.cssText=t,i.get("readOnly")||p.appendChild(f),p.appendChild(d),o.appendChild(r),o.appendChild(s),o.appendChild(p),s.style.height=n.clientHeight-80+"px",n.appendChild(o),this._dom=o},PI.prototype.remove=function(t,e){this._dom&&e.getDom().removeChild(this._dom)},PI.prototype.dispose=function(t,e){this.remove(t,e)},PI.getDefaultOption=function(t){return{show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:t.getLocale(["toolbox","dataView","title"]),lang:t.getLocale(["toolbox","dataView","lang"]),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"}};var kI,LI=PI;function PI(){return null!==kI&&kI.apply(this,arguments)||this}zv({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(t,o){var r=[];N(t.newOption.series,function(t){var e,i,n=o.getSeriesByName(t.name)[0];n?(n=n.get("data"),r.push({name:t.name,data:(e=t.data,i=n,j(e,function(t,e){var n,e=i&&i[e];return k(e)&&!F(e)&&(k(t)&&!F(t)||(t={value:t}),n=null!=e.name&&null==t.name,t=V(t,e),n)&&delete t.name,t}))})):r.push(I({type:"scatter"},t))}),o.mergeOption(V({series:r},t.newOption))});var OI=N,RI=Ko();function NI(t){t=RI(t);return t.snapshots||(t.snapshots=[{}]),t.snapshots}u(zI,EI=rI),zI.prototype.onclick=function(t,e){RI(t).snapshots=null,e.dispatchAction({type:"restore",from:this.uid})},zI.getDefaultOption=function(t){return{show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:t.getLocale(["toolbox","restore","title"])}};var EI,BI=zI;function zI(){return null!==EI&&EI.apply(this,arguments)||this}zv({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")});var VI,FI=!0,HI=Math.min,GI=Math.max,WI=Math.pow,UI=1e4,YI=6,XI=6,ZI="globalPan",jI={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},qI={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},KI={brushStyle:{lineWidth:2,stroke:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},$I=0,JI=(u(QI,VI=Qt),QI.prototype.enableBrush=function(t){return this._brushType&&this._doDisableBrush(),t.brushType&&this._doEnableBrush(t),this},QI.prototype._doEnableBrush=function(t){var e,n,i=this._zr;this._enableGlobalPan||(e=ZI,n=this._uid,dC(i)[e]=n),N(this._handlers,function(t,e){i.on(e,t)}),this._brushType=t.brushType,this._brushOption=p(C(KI),t,!0)},QI.prototype._doDisableBrush=function(){var t,e,n,i=this._zr;t=i,e=ZI,n=this._uid,(t=dC(t))[e]===n&&(t[e]=null),N(this._handlers,function(t,e){i.off(e,t)}),this._brushType=this._brushOption=null},QI.prototype.setPanels=function(t){var e;return t&&t.length?(e=this._panels={},N(t,function(t){e[t.panelId]=C(t)})):this._panels=null,this},QI.prototype.mount=function(t){this._enableGlobalPan=(t=t||{}).enableGlobalPan;var e=this.group;return this._zr.add(e),e.attr({x:t.x||0,y:t.y||0,rotation:t.rotation||0,scaleX:t.scaleX||1,scaleY:t.scaleY||1}),this._transform=e.getLocalTransform(),this},QI.prototype.updateCovers=function(i){i=j(i,function(t){return p(C(KI),t,!0)});var o=this._covers,r=this._covers=[],a=this,s=this._creatingCover;return new qv(o,i,function(t,e){return n(t.__brushOption,e)},n).add(t).update(t).remove(function(t){o[t]!==s&&a.group.remove(o[t])}).execute(),this;function n(t,e){return(null!=t.id?t.id:"\0-brush-index-"+e)+"-"+t.brushType}function t(t,e){var n=i[t];null!=e&&o[e]===s?r[t]=o[e]:(t=r[t]=null!=e?(o[e].__brushOption=n,o[e]):eA(a,tA(a,n)),oA(a,t))}},QI.prototype.unmount=function(){return this.enableBrush(!1),lA(this),this._zr.remove(this.group),this},QI.prototype.dispose=function(){this.unmount(),this.off()},QI);function QI(t){var e=VI.call(this)||this;return e._track=[],e._covers=[],e._handlers={},e._zr=t,e.group=new O,e._uid="brushController_"+$I++,N(IA,function(t,e){this._handlers[e]=S(t,this)},e),e}function tA(t,e){var n=DA[e.brushType].createCover(t,e);return n.__brushOption=e,iA(n,e),t.group.add(n),n}function eA(t,e){var n=rA(e);return n.endCreating&&(n.endCreating(t,e),iA(e,e.__brushOption)),e}function nA(t,e){var n=e.__brushOption;rA(e).updateCoverShape(t,e,n.range,n)}function iA(t,e){var n=e.z;null==n&&(n=UI),t.traverse(function(t){t.z=n,t.z2=n})}function oA(t,e){rA(e).updateCommon(t,e),nA(t,e)}function rA(t){return DA[t.__brushOption.brushType]}function aA(t,e,n){var i,o,r=t._panels;return r?(o=t._transform,N(r,function(t){t.isTargetByCursor(e,n,o)&&(i=t)}),i):FI}function sA(t,e){t=t._panels;return t&&null!=(e=e.__brushOption.panelId)?t[e]:FI}function lA(e){var t=e._covers,n=t.length;return N(t,function(t){e.group.remove(t)},e),t.length=0,n}function uA(t,e){var n=j(t._covers,function(t){var t=t.__brushOption,e=C(t.range);return{brushType:t.brushType,panelId:t.panelId,range:e}});t.trigger("brush",{areas:n,isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function hA(t){var e=t.length-1;return[t[0],t[e=e<0?0:e]]}function cA(e,n,t,i){var o=new O;return o.add(new ms({name:"main",style:gA(t),silent:!0,draggable:!0,cursor:"move",drift:M(vA,e,n,o,["n","s","w","e"]),ondragend:M(uA,n,{isEnd:!0})})),N(i,function(t){o.add(new ms({name:t.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:M(vA,e,n,o,t),ondragend:M(uA,n,{isEnd:!0})}))}),o}function pA(t,e,n,i){var o=i.brushStyle.lineWidth||0,r=GI(o,XI),a=n[0][0],s=n[1][0],l=a-o/2,u=s-o/2,h=n[0][1],n=n[1][1],c=h-r+o/2,p=n-r+o/2,h=h-a,n=n-s,d=h+o,o=n+o;fA(t,e,"main",a,s,h,n),i.transformable&&(fA(t,e,"w",l,u,r,o),fA(t,e,"e",c,u,r,o),fA(t,e,"n",l,u,d,r),fA(t,e,"s",l,p,d,r),fA(t,e,"nw",l,u,r,r),fA(t,e,"ne",c,u,r,r),fA(t,e,"sw",l,p,r,r),fA(t,e,"se",c,p,r,r))}function dA(n,i){var t=i.__brushOption,o=t.transformable,e=i.childAt(0);e.useStyle(gA(t)),e.attr({silent:!o,cursor:o?"move":"default"}),N([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(t){var e=i.childOfName(t.join("")),t=1===t.length?mA(n,t[0]):function(t,e){t=[mA(t,e[0]),mA(t,e[1])];return"e"!==t[0]&&"w"!==t[0]||t.reverse(),t.join("")}(n,t);e&&e.attr({silent:!o,invisible:!o,cursor:o?qI[t]+"-resize":null})})}function fA(t,e,n,i,o,r,a){var n=e.childOfName(n);n&&n.setShape((n=bA(t,e,[[i,o],[i+r,o+a]]),t=HI(n[0][0],n[1][0]),e=HI(n[0][1],n[1][1]),{x:t,y:e,width:GI(n[0][0],n[1][0])-t,height:GI(n[0][1],n[1][1])-e}))}function gA(t){return V({strokeNoScale:!0},t.brushStyle)}function yA(t,e,n,i){var o=[HI(t,n),HI(e,i)],t=[GI(t,n),GI(e,i)];return[[o[0],t[0]],[o[1],t[1]]]}function mA(t,e){return{left:"w",right:"e",top:"n",bottom:"s"}[Eh({w:"left",e:"right",n:"top",s:"bottom"}[e],Rh(t.group))]}function vA(t,e,n,i,o,r){var a=n.__brushOption,s=t.toRectRange(a.range),l=xA(e,o,r);N(i,function(t){t=jI[t];s[t[0]][t[1]]+=l[t[0]]}),a.range=t.fromRectRange(yA(s[0][0],s[1][0],s[0][1],s[1][1])),oA(e,n),uA(e,{isEnd:!1})}function _A(t,e,n,i){var o=e.__brushOption.range,r=xA(t,n,i);N(o,function(t){t[0]+=r[0],t[1]+=r[1]}),oA(t,e),uA(t,{isEnd:!1})}function xA(t,e,n){t=t.group,e=t.transformCoordToLocal(e,n),n=t.transformCoordToLocal(0,0);return[e[0]-n[0],e[1]-n[1]]}function bA(t,e,n){e=sA(t,e);return e&&e!==FI?e.clipPath(n,t._transform):C(n)}function wA(t,e,n){if(t._brushType&&!function(t,e,n){t=t._zr;return e<0||e>t.getWidth()||n<0||n>t.getHeight()}(t,e.offsetX,e.offsetY)){var i=t._zr,o=t._covers,r=aA(t,e,n);if(!t._dragging)for(var a=0;a<o.length;a++){var s=o[a].__brushOption;if(r&&(r===FI||s.panelId===r.panelId)&&DA[s.brushType].contain(o[a],n[0],n[1]))return}r&&i.setCursorStyle("crosshair")}}function SA(t){t=t.event;t.preventDefault&&t.preventDefault()}function MA(t,e,n){return t.childOfName("main").contain(e,n)}function TA(t,e,n,i){var o,r,a=t._creatingCover,s=t._creatingPanel,l=t._brushOption;return t._track.push(n.slice()),function(t){var e,n;if((t=t._track).length)return n=t[t.length-1],t=t[0],e=n[0]-t[0],n=n[1]-t[1],WI(e*e+n*n,.5)>YI}(t)||a?(s&&!a&&("single"===l.brushMode&&lA(t),(r=C(l)).brushType=CA(r.brushType,s),r.panelId=s===FI?null:s.panelId,a=t._creatingCover=tA(t,r),t._covers.push(a)),a&&(r=DA[CA(t._brushType,s)],a.__brushOption.range=r.getCreatingRange(bA(t,a,t._track)),i&&(eA(t,a),r.updateCommon(t,a)),nA(t,a),o={isEnd:i})):i&&"single"===l.brushMode&&l.removeOnClick&&aA(t,e,n)&&lA(t)&&(o={isEnd:i,removeOnClick:!0}),o}function CA(t,e){return"auto"===t?e.defaultBrushType:t}var IA={mousedown:function(t){var e;this._dragging?AA(this,t):t.target&&t.target.draggable||(SA(t),e=this.group.transformCoordToLocal(t.offsetX,t.offsetY),this._creatingCover=null,(this._creatingPanel=aA(this,t,e))&&(this._dragging=!0,this._track=[e.slice()]))},mousemove:function(t){var e=t.offsetX,n=t.offsetY,e=this.group.transformCoordToLocal(e,n);wA(this,t,e),this._dragging&&(SA(t),n=TA(this,t,e,!1))&&uA(this,n)},mouseup:function(t){AA(this,t)}};function AA(t,e){var n,i;t._dragging&&(SA(e),n=e.offsetX,i=e.offsetY,n=t.group.transformCoordToLocal(n,i),i=TA(t,e,n,!0),t._dragging=!1,t._track=[],t._creatingCover=null,i)&&uA(t,i)}var DA={lineX:kA(0),lineY:kA(1),rect:{createCover:function(t,e){function n(t){return t}return cA({toRectRange:n,fromRectRange:n},t,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(t){t=hA(t);return yA(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(t,e,n,i){pA(t,e,n,i)},updateCommon:dA,contain:MA},polygon:{createCover:function(t,e){var n=new O;return n.add(new ku({name:"main",style:gA(e),silent:!0})),n},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new Cu({name:"main",draggable:!0,drift:M(_A,t,e),ondragend:M(uA,t,{isEnd:!0})}))},updateCoverShape:function(t,e,n,i){e.childAt(0).setShape({points:bA(t,e,n)})},updateCommon:dA,contain:MA}};function kA(r){return{createCover:function(t,e){return cA({toRectRange:function(t){t=[t,[0,100]];return r&&t.reverse(),t},fromRectRange:function(t){return t[r]}},t,e,[[["w"],["e"]],[["n"],["s"]]][r])},getCreatingRange:function(t){t=hA(t);return[HI(t[0][r],t[1][r]),GI(t[0][r],t[1][r])]},updateCoverShape:function(t,e,n,i){var o=sA(t,e),o=[n,o!==FI&&o.getLinearBrushOtherExtent?o.getLinearBrushOtherExtent(r):[0,[(n=t._zr).getWidth(),n.getHeight()][1-r]]];r&&o.reverse(),pA(t,e,o,i)},updateCommon:dA,contain:MA}}var LA={axisPointer:1,tooltip:1,brush:1};function PA(t,i,o){var r=OA(t);return function(t,e){return r.contain(e[0],e[1])&&(e=t,t=o,n=(n=i).getComponentByElement(e.topTarget),e=n&&n.coordinateSystem,!(n&&n!==t&&!LA.hasOwnProperty(n.mainType)&&e&&e.model!==t));var n}}function OA(t){return R.create(t)}var RA=["dataToPoint","pointToData"],NA=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],EA=(BA.prototype.setOutputRanges=function(t,e){return this.matchOutputRanges(t,e,function(t,e,n){(t.coordRanges||(t.coordRanges=[])).push(e),t.coordRange||(t.coordRange=e,n=WA[t.brushType](0,n,e),t.__rangeOffset={offset:YA[t.brushType](n.values,t.range,[1,1]),xyMinMax:n.xyMinMax})}),t},BA.prototype.matchOutputRanges=function(t,i,o){N(t,function(n){var t=this.findTargetInfo(n,i);t&&!0!==t&&N(t.coordSyses,function(t){var e=WA[n.brushType](1,t,n.range);o(n,e.values,t,i)})},this)},BA.prototype.setInputRanges=function(t,i){N(t,function(t){var e,n=this.findTargetInfo(t,i);t.range=t.range||[],n&&!0!==n&&(t.panelId=n.panelId,n=WA[t.brushType](0,n.coordSys,t.coordRange),e=t.__rangeOffset,t.range=e?YA[t.brushType](n.values,e.offset,function(t,e){t=ZA(t),e=ZA(e),t=[t[0]/e[0],t[1]/e[1]];return isNaN(t[0])&&(t[0]=1),isNaN(t[1])&&(t[1]=1),t}(n.xyMinMax,e.xyMinMax)):n.values)},this)},BA.prototype.makePanelOpts=function(r,a){return j(this._targetInfoList,function(t){var n,i,e,o=t.getPanelRect();return{panelId:t.panelId,defaultBrushType:a?a(t):null,clipPath:(e=OA(e=o),function(t){return Vh(t,e)}),isTargetByCursor:PA(o,r,t.coordSysModel),getLinearBrushOtherExtent:(n=OA(n=o),function(t){var t=null!=i?i:t,e=t?n.width:n.height,t=t?n.x:n.y;return[t,t+(e||0)]})}})},BA.prototype.controlSeries=function(t,e,n){t=this.findTargetInfo(t,n);return!0===t||t&&0<=A(t.coordSyses,e.coordinateSystem)},BA.prototype.findTargetInfo=function(t,e){for(var n=this._targetInfoList,i=VA(e,t),o=0;o<n.length;o++){var r=n[o],a=t.panelId;if(a){if(r.panelId===a)return r}else for(var s=0;s<HA.length;s++)if(HA[s](i,r))return r}return!0},BA);function BA(t,e,n){var i=this,o=(this._targetInfoList=[],VA(e,t));N(FA,function(t,e){n&&n.include&&!(0<=A(n.include,e))||t(o,i._targetInfoList)})}function zA(t){return t[0]>t[1]&&t.reverse(),t}function VA(t,e){return Jo(t,e,{includeMainTypes:NA})}var FA={grid:function(t,i){var o=t.xAxisModels,r=t.yAxisModels,t=t.gridModels,e=L(),a={},s={};(o||r||t)&&(N(o,function(t){t=t.axis.grid.model;e.set(t.id,t),a[t.id]=!0}),N(r,function(t){t=t.axis.grid.model;e.set(t.id,t),s[t.id]=!0}),N(t,function(t){e.set(t.id,t),a[t.id]=!0,s[t.id]=!0}),e.each(function(t){var e=t.coordinateSystem,n=[];N(e.getCartesians(),function(t,e){(0<=A(o,t.getAxis("x").model)||0<=A(r,t.getAxis("y").model))&&n.push(t)}),i.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:n[0],coordSyses:n,getPanelRect:GA.grid,xAxisDeclared:a[t.id],yAxisDeclared:s[t.id]})}))},geo:function(t,n){N(t.geoModels,function(t){var e=t.coordinateSystem;n.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:e,coordSyses:[e],getPanelRect:GA.geo})})}},HA=[function(t,e){var n=t.xAxisModel,i=t.yAxisModel,t=t.gridModel;return(t=!(t=!t&&n?n.axis.grid.model:t)&&i?i.axis.grid.model:t)&&t===e.gridModel},function(t,e){t=t.geoModel;return t&&t===e.geoModel}],GA={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(Rh(t)),e}},WA={lineX:M(UA,0),lineY:M(UA,1),rect:function(t,e,n){var i=e[RA[t]]([n[0][0],n[1][0]]),e=e[RA[t]]([n[0][1],n[1][1]]),t=[zA([i[0],e[0]]),zA([i[1],e[1]])];return{values:t,xyMinMax:t}},polygon:function(e,n,t){var i=[[1/0,-1/0],[1/0,-1/0]];return{values:j(t,function(t){t=n[RA[e]](t);return i[0][0]=Math.min(i[0][0],t[0]),i[1][0]=Math.min(i[1][0],t[1]),i[0][1]=Math.max(i[0][1],t[0]),i[1][1]=Math.max(i[1][1],t[1]),t}),xyMinMax:i}}};function UA(t,e,n,i){var o=n.getAxis(["x","y"][t]),n=zA(j([0,1],function(t){return e?o.coordToData(o.toLocalCoord(i[t])):o.toGlobalCoord(o.dataToCoord(i[t]))})),r=[];return r[t]=n,r[1-t]=[NaN,NaN],{values:n,xyMinMax:r}}var YA={lineX:M(XA,0),lineY:M(XA,1),rect:function(t,e,n){return[[t[0][0]-n[0]*e[0][0],t[0][1]-n[0]*e[0][1]],[t[1][0]-n[1]*e[1][0],t[1][1]-n[1]*e[1][1]]]},polygon:function(t,n,i){return j(t,function(t,e){return[t[0]-i[0]*n[e][0],t[1]-i[1]*n[e][1]]})}};function XA(t,e,n,i){return[e[0]-i[t]*n[0],e[1]-i[t]*n[1]]}function ZA(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var jA,qA=N,KA=Bo+"toolbox-dataZoom_",$A=(u(QA,jA=rI),QA.prototype.render=function(t,e,n,i){var o,r,a,s;this._brushController||(this._brushController=new JI(n.getZr()),this._brushController.on("brush",S(this._onBrush,this)).mount()),o=t,r=e,i=i,n=n,s=(a=this)._isZoomActive,i&&"takeGlobalCursor"===i.type&&(s="dataZoomSelect"===i.key&&i.dataZoomSelectActive),a._isZoomActive=s,o.setIconStatus("zoom",s?"emphasis":"normal"),i=new EA(tD(o),r,{include:["grid"]}).makePanelOpts(n,function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"}),a._brushController.setPanels(i).enableBrush(!(!s||!i.length)&&{brushType:"auto",brushStyle:o.getModel("brushStyle").getItemStyle()}),t.setIconStatus("back",1<function(t){return NI(t).length}(e)?"emphasis":"normal")},QA.prototype.onclick=function(t,e,n){JA[n].call(this)},QA.prototype.remove=function(t,e){this._brushController&&this._brushController.unmount()},QA.prototype.dispose=function(t,e){this._brushController&&this._brushController.dispose()},QA.prototype._onBrush=function(t){var s,l,o,r,e=t.areas;function i(t,e,n){var i,o,r,e=e.getAxis(t),a=e.model,t=(i=t,o=a,l.eachComponent({mainType:"dataZoom",subType:"select"},function(t){t.getAxisModel(i,o.componentIndex)&&(r=t)}),r),a=t.findRepresentativeAxisProxy(a).getMinMaxSpan();null==a.minValueSpan&&null==a.maxValueSpan||(n=lC(0,n.slice(),e.scale.getExtent(),0,a.minValueSpan,a.maxValueSpan)),t&&(s[t.id]={dataZoomId:t.id,startValue:n[0],endValue:n[1]})}t.isEnd&&e.length&&(s={},l=this.ecModel,this._brushController.updateCovers([]),new EA(tD(this.model),l,{include:["grid"]}).matchOutputRanges(e,l,function(t,e,n){"cartesian2d"===n.type&&("rect"===(t=t.brushType)?(i("x",n,e[0]),i("y",n,e[1])):i({lineX:"x",lineY:"y"}[t],n,e))}),t=s,r=NI(o=l),OI(t,function(t,e){for(var n,i=r.length-1;0<=i&&!r[i][e];i--);i<0&&(n=o.queryComponents({mainType:"dataZoom",subType:"select",id:e})[0])&&(n=n.getPercentRange(),r[0][e]={dataZoomId:e,start:n[0],end:n[1]})}),r.push(t),this._dispatchZoomAction(s))},QA.prototype._dispatchZoomAction=function(t){var n=[];qA(t,function(t,e){n.push(C(t))}),n.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:n})},QA.getDefaultOption=function(t){return{show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:t.getLocale(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}}},QA),JA={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){var t,i,o;this._dispatchZoomAction((t=this.ecModel,i=NI(t),t=i[i.length-1],1<i.length&&i.pop(),o={},OI(t,function(t,e){for(var n=i.length-1;0<=n;n--)if(t=i[n][e]){o[e]=t;break}}),o))}};function QA(){return null!==jA&&jA.apply(this,arguments)||this}function tD(t){t={xAxisIndex:t.get("xAxisIndex",!0),yAxisIndex:t.get("yAxisIndex",!0),xAxisId:t.get("xAxisId",!0),yAxisId:t.get("yAxisId",!0)};return null==t.xAxisIndex&&null==t.xAxisId&&(t.xAxisIndex="all"),null==t.yAxisIndex&&null==t.yAxisId&&(t.yAxisIndex="all"),t}function eD(t,e){e&&(e.font=e.textFont||e.font,_(e,"textStrokeWidth")&&(t.lineWidth=e.textStrokeWidth),_(e,"textAlign")&&(t.align=e.textAlign),_(e,"textVerticalAlign")&&(t.verticalAlign=e.textVerticalAlign),_(e,"textLineHeight")&&(t.lineHeight=e.textLineHeight),_(e,"textWidth")&&(t.width=e.textWidth),_(e,"textHeight")&&(t.height=e.textHeight),_(e,"textBackgroundColor")&&(t.backgroundColor=e.textBackgroundColor),_(e,"textPadding")&&(t.padding=e.textPadding),_(e,"textBorderColor")&&(t.borderColor=e.textBorderColor),_(e,"textBorderWidth")&&(t.borderWidth=e.textBorderWidth),_(e,"textBorderRadius")&&(t.borderRadius=e.textBorderRadius),_(e,"textBoxShadowColor")&&(t.shadowColor=e.textBoxShadowColor),_(e,"textBoxShadowBlur")&&(t.shadowBlur=e.textBoxShadowBlur),_(e,"textBoxShadowOffsetX")&&(t.shadowOffsetX=e.textBoxShadowOffsetX),_(e,"textBoxShadowOffsetY"))&&(t.shadowOffsetY=e.textBoxShadowOffsetY)}jy="dataZoom",ju=function(t){var i,o,e=t.getComponent("toolbox",0);if(e)return i=e.getModel(["feature","dataZoom"]),o=[],e=Jo(t,tD(i)),qA(e.xAxisModels,function(t){return n(t,"xAxis","xAxisIndex")}),qA(e.yAxisModels,function(t){return n(t,"yAxis","yAxisIndex")}),o;function n(t,e,n){t=t.componentIndex,e={type:"select",$fromToolbox:!0,filterMode:i.get("filterMode",!0)||"filter",id:KA+e+t};e[n]=t,o.push(e)}},St(null==Xp.get(jy)&&ju),Xp.set(jy,ju),j1(function(t){t.registerComponentModel(hI),t.registerComponentView(dI),sI("saveAsImage",yI),sI("magicType",bI),sI("dataView",LI),sI("dataZoom",$A),sI("restore",BI),j1(oI)});function nD(t){var e=t.graphic;F(e)?e[0]&&e[0].elements?t.graphic=[t.graphic[0]]:t.graphic=[{elements:e}]:e&&!e.elements&&(t.graphic=[{elements:[e]}])}var iD,oD,rD=Ko(),aD={path:null,compoundPath:null,group:O,image:ls,text:ws},sD=(u(hD,oD=g),hD.prototype.mergeOption=function(t,e){var n=this.option.elements;this.option.elements=null,oD.prototype.mergeOption.call(this,t,e),this.option.elements=n},hD.prototype.optionUpdated=function(t,e){var n=this.option,t=(e?n:t).elements,l=n.elements=e?[]:n.elements,e=[],n=(this._flatten(t,e,null),Go(l,e,"normalMerge")),u=this._elOptionsToUpdate=[];N(n,function(t,e){var n,i,o,r,a,s=t.newOption;s&&(u.push(s),function(t,e){var n=t.existing;e.id=t.keyInfo.id,!e.type&&n&&(e.type=n.type),null==e.parentId&&((t=e.parentOption)?e.parentId=t.id:n&&(e.parentId=n.parentId));e.parentOption=null}(t,s),t=l,n=e,o=I({},i=s),r=t[n],"merge"===(a=i.$action||"merge")?r?(p(r,o,!0),xp(r,o,{ignoreSize:!0}),wp(i,r)):t[n]=o:"replace"===a?t[n]=o:"remove"===a&&r&&(t[n]=null),i=l[e],o=s,i)&&(i.hv=o.hv=[dD(o,["left","right"]),dD(o,["top","bottom"])],"group"===i.type)&&(o=o,null==(i=i).width&&(i.width=o.width=0),null==i.height&&(i.height=o.height=0))},this);for(var i=l.length-1;0<=i;i--)null==l[i]?l.splice(i,1):delete l[i].$action},hD.prototype._flatten=function(t,n,i){N(t,function(t){var e;t&&(i&&(t.parentOption=i),n.push(t),e=t.children,"group"===t.type&&e&&this._flatten(e,n,t),delete t.children)},this)},hD.prototype.useElOptionsToUpdate=function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t},hD.type="graphic",hD.defaultOption={elements:[]},hD),lD=(u(uD,iD=_g),uD.prototype.init=function(){this._elMap=L()},uD.prototype.render=function(t,e,n){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,n)},uD.prototype._updateElements=function(y){var m,v,t=y.useElOptionsToUpdate();t&&(m=this._elMap,v=this.group,N(t,function(t){var e,n,i,o,r,a,s=Yo(t.id,null),l=null!=s?m.get(s):null,u=Yo(t.parentId,null),u=null!=u?m.get(u):v,h=t.type,c=t.style,p=("text"===h&&c&&t.hv&&t.hv[1]&&(c.textVerticalAlign=c.textBaseline=c.verticalAlign=c.align=null),t.textContent),d=t.textConfig,h=(c&&(n=h,f=!!d,i=!!p,g=c)&&(g.legacy||!1!==g.legacy&&!f&&!i&&"tspan"!==n&&("text"===n||_(g,"text")))&&(f=!0,n=i=c,"text"===(g=h)?r=n:(r={},_(n,"text")&&(r.text=n.text),_(n,"rich")&&(r.rich=n.rich),_(n,"textFill")&&(r.fill=n.textFill),_(n,"textStroke")&&(r.stroke=n.textStroke),o={type:"text",style:r,silent:!0},a={},g=_(n,"textPosition"),f?a.position=g?n.textPosition:"inside":g&&(a.position=n.textPosition),_(n,"textPosition")&&(a.position=n.textPosition),_(n,"textOffset")&&(a.offset=n.textOffset),_(n,"textRotation")&&(a.rotation=n.textRotation),_(n,"textDistance")&&(a.distance=n.textDistance)),eD(r,i),N(r.rich,function(t){eD(t,t)}),c={textConfig:a,textContent:o},!d&&c.textConfig&&(t.textConfig=c.textConfig),!p)&&c.textContent&&(p=c.textContent),e=I({},e=t),N(["id","parentId","$action","hv","bounding","textContent"].concat(dp),function(t){delete e[t]}),e),f=t.$action||"merge",g=("merge"===f?l?l.attr(h):cD(s,u,h,m):"replace"===f?(pD(l,m),cD(s,u,h,m)):"remove"===f&&pD(l,m),m.get(s));g&&p&&("merge"===f?(n=g.getTextContent())?n.attr(p):g.setTextContent(new ws(p)):"replace"===f&&g.setTextContent(new ws(p))),g&&((i=rD(g)).__ecGraphicWidthOption=t.width,i.__ecGraphicHeightOption=t.height,r=y,a=t,d=z(o=g).eventData,(d=o.silent||o.ignore||d?d:z(o).eventData={componentType:"graphic",componentIndex:r.componentIndex,name:o.name})&&(d.info=a.info),Wh({el:g,componentModel:y,itemName:g.name,itemTooltipOption:t.tooltip}))}))},uD.prototype._relocate=function(t,e){for(var n,i,o,r=t.option.elements,a=this.group,s=this._elMap,l=e.getWidth(),u=e.getHeight(),h=0;h<r.length;h++){var c,p,d,f=r[h];(i=null!=(n=Yo(f.id,null))?s.get(n):null)&&i.isGroup&&(c=(o=i.parent)===a,p=rD(i),d=rD(o),p.__ecGraphicWidth=B(p.__ecGraphicWidthOption,c?l:d.__ecGraphicWidth)||0,p.__ecGraphicHeight=B(p.__ecGraphicHeightOption,c?u:d.__ecGraphicHeight)||0)}for(h=r.length-1;0<=h;h--)(i=null!=(n=Yo((f=r[h]).id,null))?s.get(n):null)&&(o=i.parent,d=rD(o),vp(i,f,o===a?{width:l,height:u}:{width:d.__ecGraphicWidth,height:d.__ecGraphicHeight},null,{hv:f.hv,boundingMode:f.bounding}))},uD.prototype._clear=function(){var e=this._elMap;e.each(function(t){pD(t,e)}),this._elMap=L()},uD.prototype.dispose=function(){this._clear()},uD.type="graphic",uD);function uD(){var t=null!==iD&&iD.apply(this,arguments)||this;return t.type=uD.type,t}function hD(){var t=null!==oD&&oD.apply(this,arguments)||this;return t.type=hD.type,t.preventAutoZ=!0,t}function cD(t,e,n,i){var o=n.type,o=new(_(aD,o)?aD[o]:bh(o))(n);e.add(o),i.set(t,o),rD(o).__ecGraphicId=t}function pD(t,e){var n=t&&t.parent;n&&("group"===t.type&&t.traverse(function(t){pD(t,e)}),e.removeKey(rD(t).__ecGraphicId),n.remove(t))}function dD(e,t){var n;return N(t,function(t){null!=e[t]&&"auto"!==e[t]&&(n=!0)}),n}j1(function(t){t.registerComponentModel(sD),t.registerComponentView(lD),t.registerPreprocessor(nD)}),j1(bx);var fD={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},gD=(CD.prototype.evaluate=function(t){var e=typeof t;return"string"==e?this._condVal.test(t):"number"==e&&this._condVal.test(t+"")},CD),yD=(TD.prototype.evaluate=function(){return this.value},TD),mD=(MD.prototype.evaluate=function(){for(var t=this.children,e=0;e<t.length;e++)if(!t[e].evaluate())return!1;return!0},MD),vD=(SD.prototype.evaluate=function(){for(var t=this.children,e=0;e<t.length;e++)if(t[e].evaluate())return!0;return!1},SD),_D=(wD.prototype.evaluate=function(){return!this.child.evaluate()},wD),xD=(bD.prototype.evaluate=function(){for(var t=!!this.valueParser,e=(0,this.getValue)(this.valueGetterParam),n=t?this.valueParser(e):null,i=0;i<this.subCondList.length;i++)if(!this.subCondList[i].evaluate(t?n:e))return!1;return!0},bD);function bD(){}function wD(){}function SD(){}function MD(){}function TD(){}function CD(t){null==(this._condVal=D(t)?new RegExp(t):mt(t)?t:null)&&f("")}function ID(t,e){var n;if(!0===t||!1===t)return(n=new yD).value=t,n;{if(DD(t)||f(""),t.and)return AD("and",t,e);if(t.or)return AD("or",t,e);if(t.not)n=e,DD(r=(r=t).not)||f(""),(l=new _D).child=ID(r,n),l.child||f("");else{for(var i=t,o=e,r=o.prepareGetValue(i),a=[],s=lt(i),l=i.parser,u=l?Mf(l):null,h=0;h<s.length;h++){var c,p=s[h];"parser"===p||o.valueGetterAttrMap.get(p)||(c=_(fD,p)?fD[p]:p,p=i[p],p=u?u(p):p,(c=function(t,e){return"eq"===t||"ne"===t?new kf("eq"===t,e):_(Tf,t)?new Cf(t,e):null}(c,p)||"reg"===c&&new gD(p))||f(""),a.push(c))}a.length||f(""),(l=new xD).valueGetterParam=r,l.valueParser=u,l.getValue=o.getValue,l.subCondList=a}return l}}function AD(t,e,n){e=e[t],F(e)||f(""),e.length||f(""),t=new("and"===t?mD:vD);return t.children=j(e,function(t){return ID(t,n)}),t.children.length||f(""),t}function DD(t){return k(t)&&!rt(t)}LD.prototype.evaluate=function(){return this._cond.evaluate()};var kD=LD;function LD(t,e){this._cond=ID(t,e)}var PD={type:"echarts:filter",transform:function(t){for(var e,n,i=t.upstream,o=(t=t.config,n={valueGetterAttrMap:L({dimension:!0}),prepareGetValue:function(t){var e=t.dimension,t=(_(t,"dimension")||f(""),i.getDimensionInfo(e));return t||f(""),{dimIdx:t.index}},getValue:function(t){return i.retrieveValueFromItem(e,t.dimIdx)}},new kD(t,n)),r=[],a=0,s=i.count();a<s;a++)e=i.getRawDataItem(a),o.evaluate()&&r.push(e);return{data:r}}},OD={type:"echarts:sort",transform:function(t){var a=t.upstream,t=t.config,t=zo(t),s=(t.length||f(""),[]),t=(N(t,function(t){var e=t.dimension,n=t.order,i=t.parser,t=t.incomparable,e=(null==e&&f(""),"asc"!==n&&"desc"!==n&&f(""),t&&"min"!==t&&"max"!==t&&f(""),"asc"!==n&&"desc"!==n&&f(""),a.getDimensionInfo(e)),o=(e||f(""),i?Mf(i):null);i&&!o&&f(""),s.push({dimIdx:e.index,parser:o,comparator:new If(n,t)})}),a.sourceFormat);t!==Op&&t!==Rp&&f("");for(var e=[],n=0,i=a.count();n<i;n++)e.push(a.getRawDataItem(n));return e.sort(function(t,e){for(var n=0;n<s.length;n++){var i=s[n],o=a.retrieveValueFromItem(t,i.dimIdx),r=a.retrieveValueFromItem(e,i.dimIdx),i=(i.parser&&(o=i.parser(o),r=i.parser(r)),i.comparator.evaluate(o,r));if(0!==i)return i}return 0}),{data:e}}};function RD(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function ND(g,y,m){m=m||function(t,e){return t===e},g=g.slice();var v=(y=y.slice()).length,_=g.length,x=1,t=v+_,b=[{newPos:-1,components:[]}],e=ED(b[0],y,g,0,m);if(b[0].newPos+1>=v&&_<=e+1){for(var n=[],i=0;i<y.length;i++)n.push(i);return[{indices:n,count:y.length,added:!1,removed:!1}]}for(;x<=t;){var o=function(){for(var t=-1*x;t<=x;t+=2){var e,n=b[t-1],i=b[t+1],o=(i?i.newPos:0)-t,r=(n&&(b[t-1]=void 0),n&&n.newPos+1<v),a=i&&0<=o&&o<_;if(r||a){if(!r||a&&n.newPos<i.newPos?BD((e={newPos:i.newPos,components:i.components.slice(0)}).components,!1,!0):((e=n).newPos++,BD(e.components,!0,!1)),o=ED(e,y,g,t,m),e.newPos+1>=v&&_<=o+1){var s=e.components;for(var l=0,u=s.length,h=0,c=0;l<u;l++){var p=s[l];if(p.removed){for(f=c;f<c+p.count;f++)p.indices.push(f);c+=p.count}else{for(var d=[],f=h;f<h+p.count;f++)d.push(f);p.indices=d,h+=p.count,p.added||(c+=p.count)}}return s;return}b[t]=e}else b[t]=void 0}x++}();if(o)return o}}function ED(t,e,n,i,o){for(var r=e.length,a=n.length,s=t.newPos,l=s-i,u=0;s+1<r&&l+1<a&&o(e[s+1],n[l+1]);)s++,l++,u++;return u&&t.components.push({count:u,added:!1,removed:!1,indices:[]}),t.newPos=s,l}function BD(t,e,n){var i=t[t.length-1];i&&i.added===e&&i.removed===n?t[t.length-1]={count:i.count+1,added:e,removed:n,indices:[]}:t.push({count:1,added:e,removed:n,indices:[]})}j1(function(t){t.registerTransform(PD),t.registerTransform(OD)});var zD="none",VD=Math.round,FD=Math.sin,HD=Math.cos,GD=Math.PI,WD=2*Math.PI,UD=180/GD;function YD(t){return VD(1e3*t)/1e3}function XD(t){return VD(1e4*t)/1e4}function ZD(t){return t<1e-4&&-1e-4<t}function jD(t,e){e&&qD(t,"transform","matrix("+YD(e[0])+","+YD(e[1])+","+YD(e[2])+","+YD(e[3])+","+XD(e[4])+","+XD(e[5])+")")}function qD(t,e,n){n&&("linear"===n.type||"radial"===n.type)||t.setAttribute(e,n)}function KD(t,e,n){var i,o,r=null==e.opacity?1:e.opacity;n instanceof ls?t.style.opacity=r+"":(null!=(o=(o=e).fill)&&o!==zD?(qD(t,"fill",o="transparent"===(o=e.fill)?zD:o),qD(t,"fill-opacity",(null!=e.fillOpacity?e.fillOpacity*r:r)+"")):qD(t,"fill",zD),null!=(o=(o=e).stroke)&&o!==zD?(qD(t,"stroke",o="transparent"===(o=e.stroke)?zD:o),o=e.lineWidth,qD(t,"stroke-width",((i=e.strokeNoScale?n.getLineScale():1)?o/i:0)+""),qD(t,"paint-order",e.strokeFirst?"stroke":"fill"),qD(t,"stroke-opacity",(null!=e.strokeOpacity?e.strokeOpacity*r:r)+""),(n=e.lineDash&&0<o&&rm(e.lineDash,o))?(r=e.lineDashOffset,i&&1!==i&&(n=j(n,function(t){return t/i}),r=r&&VD(r/=i)),qD(t,"stroke-dasharray",n.join(",")),qD(t,"stroke-dashoffset",(r||0)+"")):qD(t,"stroke-dasharray",""),e.lineCap&&qD(t,"stroke-linecap",e.lineCap),e.lineJoin&&qD(t,"stroke-linejoin",e.lineJoin),e.miterLimit&&qD(t,"stroke-miterlimit",e.miterLimit+"")):qD(t,"stroke",zD))}QD.prototype.reset=function(){this._d=[],this._str=""},QD.prototype.moveTo=function(t,e){this._add("M",t,e)},QD.prototype.lineTo=function(t,e){this._add("L",t,e)},QD.prototype.bezierCurveTo=function(t,e,n,i,o,r){this._add("C",t,e,n,i,o,r)},QD.prototype.quadraticCurveTo=function(t,e,n,i){this._add("Q",t,e,n,i)},QD.prototype.arc=function(t,e,n,i,o,r){this.ellipse(t,e,n,n,0,i,o,r)},QD.prototype.ellipse=function(t,e,n,i,o,r,a,s){var l=0===this._d.length,a=a-r,s=!s,u=Math.abs(a),h=ZD(u-WD)||(s?WD<=a:WD<=-a),c=!1,c=!!h||!ZD(u)&&GD<=(0<a?a%WD:a%WD+WD)==!!s,u=XD(t+n*HD(r)),p=XD(e+i*FD(r)),h=(h&&(a=s?WD-1e-4:1e-4-WD,c=!0,l)&&this._d.push("M",u,p),XD(t+n*HD(r+a))),l=XD(e+i*FD(r+a));if(isNaN(u)||isNaN(p)||isNaN(n)||isNaN(i)||isNaN(o)||isNaN(UD)||isNaN(h)||isNaN(l))return"";this._d.push("A",XD(n),XD(i),VD(o*UD),+c,+s,h,l)},QD.prototype.rect=function(t,e,n,i){this._add("M",t,e),this._add("L",t+n,e),this._add("L",t+n,e+i),this._add("L",t,e+i),this._add("L",t,e)},QD.prototype.closePath=function(){0<this._d.length&&this._add("Z")},QD.prototype._add=function(t,e,n,i,o,r,a,s,l){this._d.push(t);for(var u=1;u<arguments.length;u++){var h=arguments[u];if(isNaN(h))return void(this._invalid=!0);this._d.push(XD(h))}},QD.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(" "),this._d=[]},QD.prototype.getStr=function(){return this._str};var $D=QD,JD={brush:function(t){var e=t.style,n=t.__svgEl,i=(n||(n=RD("path"),t.__svgEl=n),t.path||t.createPathProxy(),t.path),o=(t.shapeChanged()&&(i.beginPath(),t.buildPath(i,t.shape),t.pathUpdated()),i.getVersion()),r=t,a=r.__svgPathBuilder;(r.__svgPathVersion!==o||!a||t.style.strokePercent<1)&&((a=a||(r.__svgPathBuilder=new $D)).reset(),i.rebuildPath(a,t.style.strokePercent),a.generateStr(),r.__svgPathVersion=o),qD(n,"d",a.getStr()),KD(n,e,t),jD(n,t.transform)}};function QD(){}var tk={brush:function(t){var e,n,i,o,r,a,s,l=t.style,u=l.image;u instanceof HTMLImageElement?u=u.src:u instanceof HTMLCanvasElement&&(u=u.toDataURL()),u&&(e=l.x||0,n=l.y||0,i=l.width,o=l.height,(r=t.__svgEl)||(r=RD("image"),t.__svgEl=r),u!==t.__imageSrc&&(a="href",s=u,r.setAttributeNS("http://www.w3.org/1999/xlink",a,s),t.__imageSrc=u),qD(r,"width",i+""),qD(r,"height",o+""),qD(r,"x",e+""),qD(r,"y",n+""),KD(r,l,t),jD(r,t.transform))}},ek={left:"start",right:"end",center:"middle",middle:"middle"};var nk={brush:function(t){var e,n,i,o,r=t.style,a=r.text;null!=a&&(a+=""),!a||isNaN(r.x)||isNaN(r.y)||((e=t.__svgEl)||(e=RD("text"),i="xml:space",o="preserve",e.setAttributeNS("http://www.w3.org/XML/1998/namespace",i,o),t.__svgEl=e),i=r.font||ti,e.style.font=i,e.textContent=a,KD(e,r,t),jD(e,t.transform),o=r.x||0,a=r.y||0,t=si(i),"top"===(n=r.textBaseline)?a+=t/2:"bottom"===n&&(a-=t/2),n=a,t=ek[r.textAlign]||r.textAlign,qD(e,"dominant-baseline","central"),qD(e,"text-anchor",t),qD(e,"x",o+""),qD(e,"y",n+""))}},cc=(ik.prototype.getDefs=function(t){var i,e=this._svgRoot,n=this._svgRoot.getElementsByTagName("defs");return 0===n.length?t?((i=e.insertBefore(this.createElement("defs"),e.firstChild)).contains||(i.contains=function(t){var e=i.children;if(e)for(var n=e.length-1;0<=n;--n)if(e[n]===t)return!0;return!1}),i):null:n[0]},ik.prototype.doUpdate=function(t,e){var n;t&&(n=this.getDefs(!1),t[this._domName]&&n.contains(t[this._domName])?"function"==typeof e&&e(t):(n=this.add(t))&&(t[this._domName]=n))},ik.prototype.add=function(t){return null},ik.prototype.addDom=function(t){var e=this.getDefs(!0);t.parentNode!==e&&e.appendChild(t)},ik.prototype.removeDom=function(t){var e=this.getDefs(!1);e&&t[this._domName]&&(e.removeChild(t[this._domName]),t[this._domName]=null)},ik.prototype.getDoms=function(){var i,o=this.getDefs(!1);return o?(i=[],N(this._tagNames,function(t){for(var e=o.getElementsByTagName(t),n=0;n<e.length;n++)i.push(e[n])}),i):[]},ik.prototype.markAllUnused=function(){var t=this.getDoms(),e=this;N(t,function(t){t[e._markLabel]="0"})},ik.prototype.markDomUsed=function(t){t&&(t[this._markLabel]="1")},ik.prototype.markDomUnused=function(t){t&&(t[this._markLabel]="0")},ik.prototype.isDomUnused=function(t){return t&&"1"!==t[this._markLabel]},ik.prototype.removeUnused=function(){var e=this,n=this.getDefs(!1);n&&N(this.getDoms(),function(t){e.isDomUnused(t)&&n.removeChild(t)})},ik.prototype.getSvgProxy=function(t){return t instanceof q?JD:t instanceof ls?tk:t instanceof is?nk:JD},ik.prototype.getSvgElement=function(t){return t.__svgEl},ik);function ik(t,e,n,i,o){this.nextId=0,this._domName="_dom",this.createElement=RD,this._zrId=t,this._svgRoot=e,this._tagNames="string"==typeof n?[n]:n,this._markLabel=i,o&&(this._domName=o)}function ok(t){return"linear"===t.type}function rk(t){return"radial"===t.type}function ak(t){return t&&("linear"===t.type||"radial"===t.type)}u(uk,sk=cc),uk.prototype.addWithoutUpdate=function(o,r){var a;r&&r.style&&(a=this,N(["fill","stroke"],function(t){var e,n,i=r.style[t];ak(i)&&(i=i,n=a.getDefs(!0),e=void 0,i.__dom?(e=i.__dom,n.contains(i.__dom)||a.addDom(e)):e=a.add(i),a.markUsed(r),n=e.getAttribute("id"),o.setAttribute(t,"url(#"+n+")"))}))},uk.prototype.add=function(t){var e;if(ok(t))e=this.createElement("linearGradient");else{if(!rk(t))return tt("Illegal gradient type."),null;e=this.createElement("radialGradient")}return t.id=t.id||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-gradient-"+t.id),this.updateDom(t,e),this.addDom(e),e},uk.prototype.update=function(n){var i;ak(n)&&(i=this).doUpdate(n,function(){var t,e=n.__dom;e&&(e=e.tagName,"linear"===(t=n.type)&&"linearGradient"===e||"radial"===t&&"radialGradient"===e?i.updateDom(n,n.__dom):(i.removeDom(n),i.add(n)))})},uk.prototype.updateDom=function(t,e){if(ok(t))e.setAttribute("x1",t.x+""),e.setAttribute("y1",t.y+""),e.setAttribute("x2",t.x2+""),e.setAttribute("y2",t.y2+"");else{if(!rk(t))return void tt("Illegal gradient type.");e.setAttribute("cx",t.x+""),e.setAttribute("cy",t.y+""),e.setAttribute("r",t.r+"")}t.global?e.setAttribute("gradientUnits","userSpaceOnUse"):e.setAttribute("gradientUnits","objectBoundingBox"),e.innerHTML="";for(var n=t.colorStops,i=0,o=n.length;i<o;++i){var r,a=this.createElement("stop"),s=(a.setAttribute("offset",100*n[i].offset+"%"),n[i].color);-1<s.indexOf("rgba")?(r=yn(s)[3],s=_n(s),a.setAttribute("stop-color","#"+s),a.setAttribute("stop-opacity",r+"")):a.setAttribute("stop-color",n[i].color),e.appendChild(a)}t.__dom=e},uk.prototype.markUsed=function(t){var e;t.style&&((e=t.style.fill)&&e.__dom&&sk.prototype.markDomUsed.call(this,e.__dom),e=t.style.stroke)&&e.__dom&&sk.prototype.markDomUsed.call(this,e.__dom)};var sk,lk=uk;function uk(t,e){return sk.call(this,t,e,["linearGradient","radialGradient"],"__gradient_in_use__")||this}function hk(t){return t&&(t.image||t.svgElement)}var ck,pk=new Xy,dk=(u(fk,ck=cc),fk.prototype.addWithoutUpdate=function(o,r){var a;r&&r.style&&(a=this,N(["fill","stroke"],function(t){var e,n,i=r.style[t];hk(i)&&(n=a.getDefs(!0),(e=pk.get(i))?n.contains(e)||a.addDom(e):e=a.add(i),a.markUsed(r),n=e.getAttribute("id"),o.setAttribute(t,"url(#"+n+")"))}))},fk.prototype.add=function(t){var e;if(hk(t))return e=this.createElement("pattern"),t.id=null==t.id?this.nextId++:t.id,e.setAttribute("id","zr"+this._zrId+"-pattern-"+t.id),e.setAttribute("x","0"),e.setAttribute("y","0"),e.setAttribute("patternUnits","userSpaceOnUse"),this.updateDom(t,e),this.addDom(e),e},fk.prototype.update=function(e){var n;hk(e)&&(n=this).doUpdate(e,function(){var t=pk.get(e);n.updateDom(e,t)})},fk.prototype.updateDom=function(t,e){var n=t.svgElement;if(n instanceof SVGElement)n.parentNode!==e&&(e.innerHTML="",e.appendChild(n),e.setAttribute("width",t.svgWidth+""),e.setAttribute("height",t.svgHeight+""));else{var n=void 0,i=e.getElementsByTagName("image");if(i.length){if(!t.image)return void e.removeChild(i[0]);n=i[0]}else t.image&&(n=this.createElement("image"));n&&(i=void 0,"string"==typeof t.image?i=t.image:t.image instanceof HTMLImageElement?i=t.image.src:t.image instanceof HTMLCanvasElement&&(i=t.image.toDataURL()),i)&&(n.setAttribute("href",i),n.setAttribute("x","0"),n.setAttribute("y","0"),(i=xr(i,n,{dirty:function(){}},function(t){e.setAttribute("width",t.width+""),e.setAttribute("height",t.height+"")}))&&i.width&&i.height&&(e.setAttribute("width",i.width+""),e.setAttribute("height",i.height+"")),e.appendChild(n))}i="translate("+(t.x||0)+", "+(t.y||0)+") rotate("+(t.rotation||0)/Math.PI*180+") scale("+(t.scaleX||1)+", "+(t.scaleY||1)+")";e.setAttribute("patternTransform",i),pk.set(t,e)},fk.prototype.markUsed=function(t){t.style&&(hk(t.style.fill)&&ck.prototype.markDomUsed.call(this,pk.get(t.style.fill)),hk(t.style.stroke))&&ck.prototype.markDomUsed.call(this,pk.get(t.style.stroke))},fk);function fk(t,e){return ck.call(this,t,e,["pattern"],"__pattern_in_use__")||this}function gk(t){t=t.__clipPaths;return t&&0<t.length}u(vk,yk=cc),vk.prototype.markAllUnused=function(){for(var t in yk.prototype.markAllUnused.call(this),this._refGroups)this.markDomUnused(this._refGroups[t]);this._keyDuplicateCount={}},vk.prototype._getClipPathGroup=function(t,e){var n,i;if(gk(t))return t=t.__clipPaths,n=this._keyDuplicateCount,i=function(t){var e=[];if(t)for(var n=0;n<t.length;n++){var i=t[n];e.push(i.id)}return e.join(",")}(t),om(t,e&&e.__clipPaths)&&(n[i]=n[i]||0,n[i]&&(i+="-"+n[i]),n[i]++),this._refGroups[i]||(this._refGroups[i]=this.createElement("g"))},vk.prototype.update=function(t,e){e=this._getClipPathGroup(t,e);return e&&(this.markDomUsed(e),this.updateDom(e,t.__clipPaths)),e},vk.prototype.updateDom=function(t,e){var n,i,o,r;e&&0<e.length?(r=this.getDefs(!0),o=i=void 0,(n=e[0])._dom?(o=n._dom.getAttribute("id"),i=n._dom,r.contains(i)||r.appendChild(i)):(o="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,(i=this.createElement("clipPath")).setAttribute("id",o),r.appendChild(i),n._dom=i),this.getSvgProxy(n).brush(n),r=this.getSvgElement(n),i.innerHTML="",i.appendChild(r),t.setAttribute("clip-path","url(#"+o+")"),1<e.length&&this.updateDom(i,e.slice(1))):t&&t.setAttribute("clip-path","none")},vk.prototype.markUsed=function(t){var e=this;t.__clipPaths&&N(t.__clipPaths,function(t){t._dom&&yk.prototype.markDomUsed.call(e,t._dom)})},vk.prototype.removeUnused=function(){yk.prototype.removeUnused.call(this);var t,e={};for(t in this._refGroups){var n=this._refGroups[t];this.isDomUnused(n)?n.parentNode&&n.parentNode.removeChild(n):e[t]=n}this._refGroups=e};var yk,mk=vk;function vk(t,e){t=yk.call(this,t,e,"clipPath","__clippath_in_use__")||this;return t._refGroups={},t._keyDuplicateCount={},t}u(bk,_k=cc),bk.prototype._getFromPool=function(){var t,e=this._shadowDomPool.pop();return e||((e=this.createElement("filter")).setAttribute("id","zr"+this._zrId+"-shadow-"+this.nextId++),t=this.createElement("feDropShadow"),e.appendChild(t),this.addDom(e)),e},bk.prototype.update=function(t,e){var n,i;(i=e.style)&&(i.shadowBlur||i.shadowOffsetX||i.shadowOffsetY)?(n=(i=e).style,i=i.getGlobalScale(),n=[n.shadowColor,(n.shadowBlur||0).toFixed(2),(n.shadowOffsetX||0).toFixed(2),(n.shadowOffsetY||0).toFixed(2),i[0],i[1]].join(","),(i=e._shadowDom=this._shadowDomMap[n])||(i=this._getFromPool(),this._shadowDomMap[n]=i),this.updateDom(t,e,i)):this.remove(t,e)},bk.prototype.remove=function(t,e){null!=e._shadowDom&&(e._shadowDom=null,t.style.filter="")},bk.prototype.updateDom=function(t,e,n){var i,o,r,a=n.children[0],s=e.style,l=e.getGlobalScale(),u=l[0],l=l[1];u&&l&&(r=s.shadowOffsetX||0,i=s.shadowOffsetY||0,o=s.shadowBlur,s=s.shadowColor,a.setAttribute("dx",r/u+""),a.setAttribute("dy",i/l+""),a.setAttribute("flood-color",s),a.setAttribute("stdDeviation",o/2/u+" "+o/2/l),n.setAttribute("x","-100%"),n.setAttribute("y","-100%"),n.setAttribute("width","300%"),n.setAttribute("height","300%"),r=(e._shadowDom=n).getAttribute("id"),t.style.filter="url(#"+r+")")},bk.prototype.removeUnused=function(){if(this.getDefs(!1)){var t,e=this._shadowDomPool;for(t in this._shadowDomMap){var n=this._shadowDomMap[t];e.push(n)}this._shadowDomMap={}}};var _k,xk=bk;function bk(t,e){t=_k.call(this,t,e,["filter"],"__filter_in_use__","_shadowDom")||this;return t._shadowDomMap={},t._shadowDomPool=[],t}function wk(t){return parseInt(t,10)}function Sk(t){return t instanceof q?JD:t instanceof ls?tk:t instanceof is?nk:JD}function Mk(t,e){return e&&t&&e.parentNode!==t}function Tk(t,e,n){Mk(t,e)&&n&&((n=n.nextSibling)?t.insertBefore(e,n):t.appendChild(e))}function Ck(t,e){var n;Mk(t,e)&&((n=t.firstChild)?t.insertBefore(e,n):t.appendChild(e))}function Ik(t){return t.__svgEl}function Ak(t,e,n,i){this.type="svg",this.refreshHover=Dk("refreshHover"),this.pathToImage=Dk("pathToImage"),this.configLayer=Dk("configLayer"),this.root=t,this.storage=e,this._opts=n=I({},n||{});var e=RD("svg"),o=(e.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/svg"),e.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),e.setAttribute("version","1.1"),e.setAttribute("baseProfile","full"),e.style.cssText="user-select:none;position:absolute;left:0;top:0;",RD("g")),r=(e.appendChild(o),RD("g")),i=(e.appendChild(r),this._gradientManager=new lk(i,r),this._patternManager=new dk(i,r),this._clipPathManager=new mk(i,r),this._shadowManager=new xk(i,r),document.createElement("div"));i.style.cssText="overflow:hidden;position:relative",this._svgDom=e,this._svgRoot=r,this._backgroundRoot=o,this._viewport=i,t.appendChild(i),i.appendChild(e),this.resize(n.width,n.height),this._visibleList=[]}function Dk(t){return function(){tt('In SVG mode painter not support method "'+t+'"')}}Ak.prototype.getType=function(){return"svg"},Ak.prototype.getViewportRoot=function(){return this._viewport},Ak.prototype.getSvgDom=function(){return this._svgDom},Ak.prototype.getSvgRoot=function(){return this._svgRoot},Ak.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},Ak.prototype.refresh=function(){var t=this.storage.getDisplayList(!0);this._paintList(t)},Ak.prototype.setBackgroundColor=function(t){this._backgroundRoot&&this._backgroundNode&&this._backgroundRoot.removeChild(this._backgroundNode);var e=RD("rect");e.setAttribute("width",this.getWidth()),e.setAttribute("height",this.getHeight()),e.setAttribute("x",0),e.setAttribute("y",0),e.setAttribute("id",0),e.style.fill=t,this._backgroundRoot.appendChild(e),this._backgroundNode=e},Ak.prototype.createSVGElement=RD,Ak.prototype.paintOne=function(t){var e=Sk(t);return e&&e.brush(t),Ik(t)},Ak.prototype._paintList=function(t){var e=this._gradientManager,n=this._patternManager,i=this._clipPathManager,o=this._shadowManager;e.markAllUnused(),n.markAllUnused(),i.markAllUnused(),o.markAllUnused();for(var r=this._svgRoot,a=this._visibleList,s=t.length,l=[],u=0;u<s;u++){var h=Sk(b=t[u]),c=Ik(b);b.invisible||(!b.__dirty&&c||(h&&h.brush(b),(c=Ik(b))&&b.style&&(e.update(b.style.fill),e.update(b.style.stroke),n.update(b.style.fill),n.update(b.style.stroke),o.update(c,b)),b.__dirty=0),c&&l.push(b))}for(var p,d,f,g,y,m,v,_=ND(a,l),u=0;u<_.length;u++)if((v=_[u]).removed)for(var x=0;x<v.count;x++)c=Ik(b=a[v.indices[x]]),gk(b)?(m=c)&&m.parentNode&&m.parentNode.removeChild(m):(m=r,(y=c)&&m&&y.parentNode===m&&m.removeChild(y));for(u=0;u<_.length;u++)if(!(v=_[u]).removed)for(x=0;x<v.count;x++){var b=l[v.indices[x]],w=i.update(b,f);w!==g&&(p=d,w&&(p?Tk(r,w,p):Ck(r,w),d=w,p=null),g=w),c=Ik(b),p?Tk(g||r,c,p):Ck(g||r,c),p=c||p,g||(d=p),e.markUsed(b),e.addWithoutUpdate(c,b),n.markUsed(b),n.addWithoutUpdate(c,b),i.markUsed(b),f=b}e.removeUnused(),n.removeUnused(),i.removeUnused(),o.removeUnused(),this._visibleList=l},Ak.prototype.resize=function(t,e){var n=this._viewport,i=(n.style.display="none",this._opts);null!=t&&(i.width=t),null!=e&&(i.height=e),t=this._getSize(0),e=this._getSize(1),n.style.display="",this._width===t&&this._height===e||(this._width=t,this._height=e,(i=n.style).width=t+"px",i.height=e+"px",(n=this._svgDom).setAttribute("width",t+""),n.setAttribute("height",e+"")),this._backgroundNode&&(this._backgroundNode.setAttribute("width",t),this._backgroundNode.setAttribute("height",e))},Ak.prototype.getWidth=function(){return this._width},Ak.prototype.getHeight=function(){return this._height},Ak.prototype._getSize=function(t){var e,n=this._opts,i=["width","height"][t],o=["clientWidth","clientHeight"][t],r=["paddingLeft","paddingTop"][t],t=["paddingRight","paddingBottom"][t];return null!=n[i]&&"auto"!==n[i]?parseFloat(n[i]):(n=this.root,e=document.defaultView.getComputedStyle(n),(n[o]||wk(e[i])||wk(n.style[i]))-(wk(e[r])||0)-(wk(e[t])||0)|0)},Ak.prototype.dispose=function(){this.root.innerHTML="",this._svgRoot=this._backgroundRoot=this._svgDom=this._backgroundNode=this._viewport=this.storage=null},Ak.prototype.clear=function(){var t=this._viewport;t&&t.parentNode&&t.parentNode.removeChild(t)},Ak.prototype.toDataURL=function(){this.refresh();var t=this._svgDom,t=t.outerHTML||(t.parentNode&&t.parentNode).innerHTML;return"data:image/svg+xml;charset=UTF-8,"+encodeURIComponent(t.replace(/></g,">\n\r<"))},mo("svg",Ak),t.Axis=$y,t.ChartView=Mg,t.ComponentModel=g,t.ComponentView=_g,t.List=S_,t.Model=fc,t.PRIORITY=Ky,t.SeriesModel=hg,t.color=Tn,t.connect=function(e){var t;return F(e)&&(t=e,e=null,I0(t,function(t){null!=t.group&&(e=t.group)}),e=e||"g_"+Dv++,I0(t,function(t){t.group=e})),Iv[e]=!0,e},t.dataTool={},t.dependencies={zrender:"5.1.0"},t.disConnect=Lv,t.disconnect=qy,t.dispose=function(t){"string"==typeof t?t=Cv[t]:t instanceof cv||(t=Pv(t)),t instanceof cv&&!t.isDisposed()&&t.dispose()},t.env=w,t.extendChartView=function(t){return t=Mg.extend(t),Mg.registerClass(t),t},t.extendComponentModel=function(t){return t=g.extend(t),g.registerClass(t),t},t.extendComponentView=function(t){return t=_g.extend(t),_g.registerClass(t),t},t.extendSeriesModel=function(t){return t=hg.extend(t),hg.registerClass(t),t},t.format=n,t.getCoordinateSystemDimensions=function(t){if(t=ld.get(t))return t.getDimensionsInfo?t.getDimensionsInfo():t.dimensions.slice()},t.getInstanceByDom=Pv,t.getInstanceById=function(t){return Cv[t]},t.getMap=function(t){return T0(t)},t.graphic=sy,t.helper=Lc,t.init=function(t,e,n){var i,o=Pv(t);return o||((i=new cv(t,e,n)).id="ec_"+Av++,Cv[i.id]=i,ir(t,kv,i.id),iv(i),I0(bv,function(t){t(i)}),i)},t.innerDrawElementOnCanvas=Sm,t.matrix=Fe,t.number=Ku,t.parseGeoJSON=d0,t.parseGeoJson=d0,t.registerAction=zv,t.registerCoordinateSystem=Vv,t.registerLayout=Fv,t.registerLoading=Uv,t.registerLocale=Tc,t.registerMap=Yv,t.registerPostInit=Ev,t.registerPostUpdate=Bv,t.registerPreprocessor=Rv,t.registerProcessor=Nv,t.registerTheme=Ov,t.registerTransform=Xv,t.registerVisual=Hv,t.setCanvasCreator=function(t){$("createCanvas",t)},t.throttle=Rg,t.time=mr,t.use=j1,t.util=ay,t.vector=Kt,t.version="5.1.1",t.zrUtil=Pt,t.zrender=pi});