echarts.min.js 691 KB
!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";"undefined"!=typeof window?De=window.__DEV__:"undefined"!=typeof global&&(De=global.__DEV__);var H=De=void 0===De?!0:De,d=2311;var y="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:"undefined"==typeof navigator?{browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:(De={},x=(_e=navigator.userAgent).match(/Firefox\/([\d.]+)/),Vt=_e.match(/MSIE\s([\d.]+)/)||_e.match(/Trident\/.+?rv:(([\d.]+))/),me=_e.match(/Edge\/([\d.]+)/),_e=/micromessenger/i.test(_e),x&&(De.firefox=!0,De.version=x[1]),Vt&&(De.ie=!0,De.version=Vt[1]),me&&(De.edge=!0,De.version=me[1]),_e&&(De.weChat=!0),{browser:De,os:{},node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!De.ie&&!De.edge,pointerEventsSupported:"onpointerdown"in window&&(De.edge||De.ie&&11<=De.version),domSupported:"undefined"!=typeof document});var p,g={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},m={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},v=Object.prototype.toString,x=Array.prototype,_=x.forEach,b=x.filter,W=x.slice,X=x.map,Y=x.reduce,U={};function j(t,e){"createCanvas"===t&&(p=null),U[t]=e}function N(t){if(null==t||"object"!=typeof t)return t;var e=t,n=v.call(t);if("[object Array]"===n){if(!gt(t))for(var e=[],i=0,o=t.length;i<o;i++)e[i]=N(t[i])}else if(m[n]){if(!gt(t)){var a=t.constructor;if(t.constructor.from)e=a.from(t);else for(e=new a(t.length),i=0,o=t.length;i<o;i++)e[i]=N(t[i])}}else if(!g[n]&&!gt(t)&&!ot(t))for(var r in e={},t)t.hasOwnProperty(r)&&(e[r]=N(t[r]));return e}function f(t,e,n){if(!k(e)||!k(t))return n?N(e):t;for(var i in e){var o,a;e.hasOwnProperty(i)&&(o=t[i],!k(a=e[i])||!k(o)||D(a)||D(o)||ot(a)||ot(o)||nt(a)||nt(o)||gt(a)||gt(o)?!n&&i in t||(t[i]=N(e[i])):f(o,a,n))}return t}function q(t,e){for(var n=t[0],i=1,o=t.length;i<o;i++)n=f(n,t[i],e);return n}function O(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function C(t,e,n){for(var i in e)e.hasOwnProperty(i)&&(n?null!=e[i]:null==t[i])&&(t[i]=e[i]);return t}var K=function(){return U.createCanvas()};function $(){return p=p||K().getContext("2d")}function S(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 a(t,e){var n,i=t.prototype;function o(){}for(n in o.prototype=e.prototype,t.prototype=new o,i)t.prototype[n]=i[n];(t.prototype.constructor=t).superClass=e}function i(t,e,n){C(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,n)}function J(t){if(t)return"string"!=typeof t&&"number"==typeof t.length}function Z(t,e,n){if(t&&e)if(t.forEach&&t.forEach===_)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 a in t)t.hasOwnProperty(a)&&e.call(n,t[a],a,t)}function I(t,e,n){if(t&&e){if(t.map&&t.map===X)return t.map(e,n);for(var i=[],o=0,a=t.length;o<a;o++)i.push(e.call(n,t[o],o,t));return i}}function Q(t,e,n,i){if(t&&e){if(t.reduce&&t.reduce===Y)return t.reduce(e,n,i);for(var o=0,a=t.length;o<a;o++)n=e.call(i,n,t[o],o,t);return n}}function tt(t,e,n){if(t&&e){if(t.filter&&t.filter===b)return t.filter(e,n);for(var i=[],o=0,a=t.length;o<a;o++)e.call(n,t[o],o,t)&&i.push(t[o]);return i}}function A(t,e){var n=W.call(arguments,2);return function(){return t.apply(e,n.concat(W.call(arguments)))}}function L(t){var e=W.call(arguments,1);return function(){return t.apply(this,e.concat(W.call(arguments)))}}function D(t){return"[object Array]"===v.call(t)}function et(t){return"function"==typeof t}function T(t){return"[object String]"===v.call(t)}function k(t){var e=typeof t;return"function"==e||!!t&&"object"==e}function nt(t){return!!g[v.call(t)]}function it(t){return!!m[v.call(t)]}function ot(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}function at(t){return t!=t}function rt(t){for(var e=0,n=arguments.length;e<n;e++)if(null!=arguments[e])return arguments[e]}function st(t,e){return null!=t?t:e}function lt(t,e,n){return null!=t?t:null!=e?e:n}function ut(){return Function.call.apply(W,arguments)}function ht(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 P(t,e){if(!t)throw new Error(e)}function ct(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}U.createCanvas=function(){return document.createElement("canvas")};var dt="__ec_primitive__";function pt(t){t[dt]=!0}function gt(t){return t[dt]}function ft(t){var n=D(t),i=(this.data={},this);function e(t,e){n?i.set(t,e):i.set(e,t)}t instanceof ft?t.each(e):t&&Z(t,e)}function E(t){return new ft(t)}function mt(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}function yt(){}ft.prototype={constructor:ft,get:function(t){return this.data.hasOwnProperty(t)?this.data[t]:null},set:function(t,e){return this.data[t]=e},each:function(t,e){for(var n in void 0!==e&&(t=A(t,e)),this.data)this.data.hasOwnProperty(n)&&t(this.data[n],n)},removeKey:function(t){delete this.data[t]}};var vt=Object.freeze({__proto__:null,$override:j,assert:P,bind:A,clone:N,concatArray:mt,createCanvas:K,createHashMap:E,curry:L,defaults:C,each:Z,eqNaN:at,extend:O,filter:tt,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]},getContext:$,indexOf:S,inherits:a,isArray:D,isArrayLike:J,isBuiltInObject:nt,isDom:ot,isFunction:et,isObject:k,isPrimitive:gt,isString:T,isTypedArray:it,map:I,merge:f,mergeAll:q,mixin:i,noop:yt,normalizeCssArray:ht,reduce:Q,retrieve:rt,retrieve2:st,retrieve3:lt,setAsPrimitive:pt,slice:ut,trim:ct}),xt="undefined"==typeof Float32Array?Array:Float32Array;function _t(t,e){var n=new xt(2);return null==e&&(e=0),n[0]=t=null==t?0:t,n[1]=e,n}function wt(t,e){return t[0]=e[0],t[1]=e[1],t}function bt(t){var e=new xt(2);return e[0]=t[0],e[1]=t[1],e}function St(t,e,n){return t[0]=e,t[1]=n,t}function Mt(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function It(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t}function Tt(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function At(t){return Math.sqrt(Dt(t))}function Dt(t){return t[0]*t[0]+t[1]*t[1]}function Ct(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function Lt(t,e){var n=At(e);return 0===n?(t[0]=0,t[1]=0):(t[0]=e[0]/n,t[1]=e[1]/n),t}function kt(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var Pt=kt;function Nt(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var Ot=Nt;function Et(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 zt(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 Rt(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function Bt(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}var Vt=Object.freeze({__proto__:null,add:Mt,applyTransform:zt,clone:bt,copy:wt,create:_t,dist:Pt,distSquare:Ot,distance:kt,distanceSquare:Nt,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:At,lenSquare:Dt,length:At,lengthSquare:Dt,lerp:Et,max:Bt,min:Rt,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:Lt,scale:Ct,scaleAndAdd:It,set:St,sub:Tt});function Gt(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this),this.on("globalout",this._dragEnd,this)}function Ft(t,e){return{target:t,topTarget:e&&e.topTarget}}Gt.prototype={constructor:Gt,_dragStart:function(t){var e=t.target;e&&e.draggable&&((this._draggingTarget=e).dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.dispatchToElement(Ft(e,t),"dragstart",t.event))},_drag:function(t){var e,n,i,o,a=this._draggingTarget;a&&(e=t.offsetX,n=t.offsetY,i=e-this._x,o=n-this._y,this._x=e,this._y=n,a.drift(i,o,t),this.dispatchToElement(Ft(a,t),"drag",t.event),i=this.findHover(e,n,a).target,o=this._dropTarget,a!==(this._dropTarget=i))&&(o&&i!==o&&this.dispatchToElement(Ft(o,t),"dragleave",t.event),i)&&i!==o&&this.dispatchToElement(Ft(i,t),"dragenter",t.event)},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.dispatchToElement(Ft(e,t),"dragend",t.event),this._dropTarget&&this.dispatchToElement(Ft(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null}};function Wt(t){this._$handlers={},this._$eventProcessor=t}var Ht=Array.prototype.slice;function Zt(t,e,n,i,o,a){var r=t._$handlers;if("function"==typeof n&&(o=i,i=n,n=null),i&&e){u=n,l=(l=t)._$eventProcessor,n=u=null!=u&&l&&l.normalizeQuery?l.normalizeQuery(u):u,r[e]||(r[e]=[]);for(var s=0;s<r[e].length;s++)if(r[e][s].h===i)return t;var l={h:i,one:a,query:n,ctx:o||t,callAtLast:i.zrEventfulCallAtLast},u=r[e].length-1,a=r[e][u];a&&a.callAtLast?r[e].splice(u,0,l):r[e].push(l)}return t}Wt.prototype={constructor:Wt,one:function(t,e,n,i){return Zt(this,t,e,n,i,!0)},on:function(t,e,n,i){return Zt(this,t,e,n,i,!1)},isSilent:function(t){var e=this._$handlers;return!e[t]||!e[t].length},off:function(t,e){var n=this._$handlers;if(t)if(e){if(n[t]){for(var i=[],o=0,a=n[t].length;o<a;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},trigger:function(t){var e=this._$handlers[t],n=this._$eventProcessor;if(e){var i=arguments,o=i.length;3<o&&(i=Ht.call(i,1));for(var a=e.length,r=0;r<a;){var s=e[r];if(n&&n.filter&&null!=s.query&&!n.filter(t,s.query))r++;else{switch(o){case 1:s.h.call(s.ctx);break;case 2:s.h.call(s.ctx,i[1]);break;case 3:s.h.call(s.ctx,i[1],i[2]);break;default:s.h.apply(s.ctx,i)}s.one?(e.splice(r,1),a--):r++}}}return n&&n.afterTrigger&&n.afterTrigger(t),this},triggerWithContext:function(t){var e=this._$handlers[t],n=this._$eventProcessor;if(e)for(var i=arguments,o=i.length,a=(i=4<o?Ht.call(i,1,i.length-1):i)[i.length-1],r=e.length,s=0;s<r;){var l=e[s];if(n&&n.filter&&null!=l.query&&!n.filter(t,l.query))s++;else{switch(o){case 1:l.h.call(a);break;case 2:l.h.call(a,i[1]);break;case 3:l.h.call(a,i[1],i[2]);break;default:l.h.apply(a,i)}l.one?(e.splice(s,1),r--):s++}}return n&&n.afterTrigger&&n.afterTrigger(t),this}};var Xt="undefined"!=typeof window&&!!window.addEventListener,Yt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/;function Ut(t,e,n,i){return n=n||{},i||!y.canvasSupported?jt(t,e,n):y.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):jt(t,e,n),n}function jt(t,e,n){t=(t=t).getBoundingClientRect?t.getBoundingClientRect():{left:0,top:0};n.zrX=e.clientX-t.left,n.zrY=e.clientY-t.top}function qt(t,e,n){var i;return null==(e=e||window.event).zrX&&((i=e.type)&&0<=i.indexOf("touch")?(i=("touchend"!==i?e.targetTouches:e.changedTouches)[0])&&Ut(t,i,e,n):(Ut(t,e,e,n),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3),i=e.button,null==e.which&&void 0!==i&&Yt.test(e.type))&&(e.which=1&i?1:2&i?3:4&i?2:0),e}function Kt(t,e,n){Xt?t.addEventListener(e,n):t.attachEvent("on"+e,n)}var $t=Xt?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0};function Jt(t){return 2===t.which||3===t.which}function Qt(){this._track=[]}function te(t){var e=t[1][0]-t[0][0],t=t[1][1]-t[0][1];return Math.sqrt(e*e+t*t)}Qt.prototype={constructor:Qt,recognize:function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(t,e,n){var i=t.touches;if(i){for(var o={points:[],touches:[],target:e,event:t},a=0,r=i.length;a<r;a++){var s=i[a],l=Ut(n,s,{});o.points.push([l.zrX,l.zrY]),o.touches.push(s)}this._track.push(o)}},_recognize:function(t){for(var e in ee)if(ee.hasOwnProperty(e)){e=ee[e](this._track,t);if(e)return e}}};var ee={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=te(i)/te(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 ne(t){$t(this.event)}function ie(){}ie.prototype.dispose=function(){};function oe(t,e,n,i){Wt.call(this),this.storage=t,this.painter=e,this.painterRoot=i,n=n||new ie,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,Gt.call(this),this.setHandlerProxy(n)}var ae=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"];oe.prototype={constructor:oe,setHandlerProxy:function(e){this.proxy&&this.proxy.dispose(),e&&(Z(ae,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},mousemove:function(t){var e=t.zrX,n=t.zrY,i=this._hovered,o=i.target,e=(o&&!o.__zr&&(o=(i=this.findHover(i.x,i.y)).target),this._hovered=this.findHover(e,n)),n=e.target,a=this.proxy;a.setCursor&&a.setCursor(n?n.cursor:"default"),o&&n!==o&&this.dispatchToElement(i,"mouseout",t),this.dispatchToElement(e,"mousemove",t),n&&n!==o&&this.dispatchToElement(e,"mouseover",t)},mouseout:function(t){this.dispatchToElement(this._hovered,"mouseout",t);for(var e,n=t.toElement||t.relatedTarget;(n=n&&n.parentNode)&&9!==n.nodeType&&!(e=n===this.painterRoot););e||this.trigger("globalout",{event:t})},resize:function(t){this._hovered={}},dispatch:function(t,e){t=this[t];t&&t.call(this,e)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},dispatchToElement:function(t,e,n){var i=(t=t||{}).target;if(!i||!i.silent){for(var o="on"+e,a={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:ne};i&&(i[o]&&(a.cancelBubble=i[o].call(i,a)),i.trigger(e,a),i=i.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(e,a),this.painter&&this.painter.eachOtherLayer(function(t){"function"==typeof t[o]&&t[o].call(t,a),t.trigger&&t.trigger(e,a)}))}},findHover:function(t,e,n){for(var i,o=this.storage.getDisplayList(),a={x:t,y:e},r=o.length-1;0<=r;r--)if(o[r]!==n&&!o[r].ignore&&(i=function(t,e,n){if(t[t.rectHover?"rectContain":"contain"](e,n)){for(var i,o=t;o;){if(o.clipPath&&!o.clipPath.contain(e,n))return!1;o.silent&&(i=!0),o=o.parent}return!i||"silent"}return!1}(o[r],t,e))&&(a.topTarget||(a.topTarget=o[r]),"silent"!==i)){a.target=o[r];break}return a},processGesture:function(t,e){this._gestureMgr||(this._gestureMgr=new Qt);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,this.dispatchToElement({target:i.target},e,i.event))}},Z(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(i){oe.prototype[i]=function(t){var e=this.findHover(t.zrX,t.zrY),n=e.target;if("mousedown"===i)this._downEl=n,this._downPoint=[t.zrX,t.zrY],this._upEl=n;else if("mouseup"===i)this._upEl=n;else if("click"===i){if(this._downEl!==this._upEl||!this._downPoint||4<Pt(this._downPoint,[t.zrX,t.zrY]))return;this._downPoint=null}this.dispatchToElement(e,i,t)}}),i(oe,Wt),i(oe,Gt);var re="undefined"==typeof Float32Array?Array:Float32Array;function se(){var t=new re(6);return le(t),t}function le(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function ue(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 he(t,e,n){var i=e[0]*n[0]+e[2]*n[1],o=e[1]*n[0]+e[3]*n[1],a=e[0]*n[2]+e[2]*n[3],r=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]=a,t[3]=r,t[4]=s,t[5]=n,t}function ce(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 de(t,e,n){var i=e[0],o=e[2],a=e[4],r=e[1],s=e[3],e=e[5],l=Math.sin(n),n=Math.cos(n);return t[0]=i*n+r*l,t[1]=-i*l+r*n,t[2]=o*n+s*l,t[3]=-o*l+n*s,t[4]=n*a+l*e,t[5]=n*e-l*a,t}function pe(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 ge(t,e){var n=e[0],i=e[2],o=e[4],a=e[1],r=e[3],e=e[5],s=n*r-a*i;return s?(t[0]=r*(s=1/s),t[1]=-a*s,t[2]=-i*s,t[3]=n*s,t[4]=(i*e-r*o)*s,t[5]=(a*o-n*e)*s,t):null}function fe(t){var e=se();return ue(e,t),e}var me=Object.freeze({__proto__:null,clone:fe,copy:ue,create:se,identity:le,invert:ge,mul:he,rotate:de,scale:pe,translate:ce}),ye=le;function ve(t){return 5e-5<t||t<-5e-5}function xe(t){(t=t||{}).position||(this.position=[0,0]),null==t.rotation&&(this.rotation=0),t.scale||(this.scale=[1,1]),this.origin=this.origin||null}var _e=xe.prototype,we=(_e.transform=null,_e.needLocalTransform=function(){return ve(this.rotation)||ve(this.position[0])||ve(this.position[1])||ve(this.scale[0]-1)||ve(this.scale[1]-1)},[]),be=(_e.updateTransform=function(){var t=this.parent,e=t&&t.transform,n=this.needLocalTransform(),i=this.transform;n||e?(i=i||se(),n?this.getLocalTransform(i):ye(i),e&&(n?he(i,t.transform,i):ue(i,t.transform)),this.transform=i,null!=(e=this.globalScaleRatio)&&1!==e&&(this.getGlobalScale(we),t=((we[1]-(n=we[1]<0?-1:1))*e+n)/we[1]||0,i[0]*=e=((we[0]-(n=we[0]<0?-1:1))*e+n)/we[0]||0,i[1]*=e,i[2]*=t,i[3]*=t),this.invTransform=this.invTransform||se(),ge(this.invTransform,i)):i&&ye(i)},_e.getLocalTransform=function(t){return xe.getLocalTransform(this,t)},_e.setTransform=function(t){var e=this.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)},_e.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)},[]),Se=se(),Me=(_e.setLocalTransform=function(t){var e,n,i,o;t&&(e=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3],i=this.position,o=this.scale,ve(e-1)&&(e=Math.sqrt(e)),ve(n-1)&&(n=Math.sqrt(n)),t[0]<0&&(e=-e),t[3]<0&&(n=-n),i[0]=t[4],i[1]=t[5],o[0]=e,o[1]=n,this.rotation=Math.atan2(-t[1]/n,t[0]/e))},_e.decomposeTransform=function(){var t,e;this.transform&&(e=this.parent,t=this.transform,e&&e.transform&&(he(be,e.invTransform,t),t=be),(e=this.origin)&&(e[0]||e[1])&&(Se[4]=e[0],Se[5]=e[1],he(be,t,Se),be[4]-=e[0],be[5]-=e[1],t=be),this.setLocalTransform(t))},_e.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},_e.transformCoordToLocal=function(t,e){t=[t,e],e=this.invTransform;return e&&zt(t,t,e),t},_e.transformCoordToGlobal=function(t,e){t=[t,e],e=this.transform;return e&&zt(t,t,e),t},xe.getLocalTransform=function(t,e){ye(e=e||[]);var n=t.origin,i=t.scale||[1,1],o=t.rotation||0,t=t.position||[0,0];return n&&(e[4]-=n[0],e[5]-=n[1]),pe(e,e,i),o&&de(e,e,o),n&&(e[4]+=n[0],e[5]+=n[1]),e[4]+=t[0],e[5]+=t[1],e},{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-Me.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*Me.bounceIn(2*t):.5*Me.bounceOut(2*t-1)+.5}});function Ie(t){this._target=t.target,this._life=t.life||1e3,this._delay=t.delay||0,this._initialized=!1,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,this._pausedTime=0,this._paused=!1}Ie.prototype={constructor:Ie,step:function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),this._paused)this._pausedTime+=e;else{var n,e=(t-this._startTime-this._pausedTime)/this._life;if(!(e<0))return e=Math.min(e,1),n="function"==typeof(n="string"==typeof(n=this.easing)?Me[n]:n)?n(e):e,this.fire("frame",n),1===e?this.loop?(this.restart(t),"restart"):(this._needsRemove=!0,"destroy"):null}},restart:function(t){var e=(t-this._startTime-this._pausedTime)%this._life;this._startTime=t-e+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(t,e){this[t="on"+t]&&this[t](this._target,e)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};function Te(){this.head=null,this.tail=null,this._len=0}function Ae(t){this._list=new Te,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null}var De=Te.prototype,Ce=(De.insert=function(t){t=new Ce(t);return this.insertEntry(t),t},De.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++},De.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--},De.len=function(){return this._len},De.clear=function(){this.head=this.tail=null,this._len=0},function(t){this.value=t,this.next,this.prev}),De=Ae.prototype,Le=(De.put=function(t,e){var n,i,o=this._list,a=this._map,r=null;return null==a[t]&&(i=o.len(),n=this._lastRemovedEntry,i>=this._maxSize&&0<i&&(i=o.head,o.remove(i),delete a[i.key],r=i.value,this._lastRemovedEntry=i),n?n.value=e:n=new Ce(e),n.key=t,o.insertEntry(n),a[t]=n),r},De.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},De.clear=function(){this._list.clear(),this._map={}},{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 ke(t){return(t=Math.round(t))<0?0:255<t?255:t}function Pe(t){return t<0?0:1<t?1:t}function Ne(t){return t.length&&"%"===t.charAt(t.length-1)?ke(parseFloat(t)/100*255):ke(parseInt(t,10))}function Oe(t){return t.length&&"%"===t.charAt(t.length-1)?Pe(parseFloat(t)/100):Pe(parseFloat(t))}function Ee(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 ze(t,e,n){return t+(e-t)*n}function Re(t,e,n,i,o){return t[0]=e,t[1]=n,t[2]=i,t[3]=o,t}function Be(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var Ve=new Ae(20),Ge=null;function Fe(t,e){Ge&&Be(Ge,e),Ge=Ve.put(t,Ge||e.slice())}function We(t,e){if(t){e=e||[];var n=Ve.get(t);if(n)return Be(e,n);n=(t+="").replace(/ /g,"").toLowerCase();if(n in Le)return Be(e,Le[n]),Fe(t,e),e;if("#"===n.charAt(0))return 4===n.length?0<=(i=parseInt(n.substr(1),16))&&i<=4095?(Re(e,(3840&i)>>4|(3840&i)>>8,240&i|(240&i)>>4,15&i|(15&i)<<4,1),Fe(t,e),e):void Re(e,0,0,0,1):7===n.length?0<=(i=parseInt(n.substr(1),16))&&i<=16777215?(Re(e,(16711680&i)>>16,(65280&i)>>8,255&i,1),Fe(t,e),e):void Re(e,0,0,0,1):void 0;var i=n.indexOf("("),o=n.indexOf(")");if(-1!==i&&o+1===n.length){var a=n.substr(0,i),r=n.substr(i+1,o-(i+1)).split(","),s=1;switch(a){case"rgba":if(4!==r.length)return void Re(e,0,0,0,1);s=Oe(r.pop());case"rgb":return 3!==r.length?void Re(e,0,0,0,1):(Re(e,Ne(r[0]),Ne(r[1]),Ne(r[2]),s),Fe(t,e),e);case"hsla":return 4!==r.length?void Re(e,0,0,0,1):(r[3]=Oe(r[3]),He(r,e),Fe(t,e),e);case"hsl":return 3!==r.length?void Re(e,0,0,0,1):(He(r,e),Fe(t,e),e);default:return}}Re(e,0,0,0,1)}}function He(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=Oe(t[1]),o=Oe(t[2]),i=o<=.5?o*(i+1):o+i-o*i,o=2*o-i;return Re(e=e||[],ke(255*Ee(o,i,n+1/3)),ke(255*Ee(o,i,n)),ke(255*Ee(o,i,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function Ze(t,e){var n=We(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:t[i]<0&&(n[i]=0);return Ke(n,4===n.length?"rgba":"rgb")}}function Xe(t){t=We(t);if(t)return((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)}function Ye(t,e,n){var i,o,a;if(e&&e.length&&0<=t&&t<=1)return n=n||[],t=t*(e.length-1),i=Math.floor(t),a=Math.ceil(t),o=e[i],e=e[a],n[0]=ke(ze(o[0],e[0],a=t-i)),n[1]=ke(ze(o[1],e[1],a)),n[2]=ke(ze(o[2],e[2],a)),n[3]=Pe(ze(o[3],e[3],a)),n}function Ue(t,e,n){var i,o,a,r;if(e&&e.length&&0<=t&&t<=1)return t=t*(e.length-1),i=Math.floor(t),o=Math.ceil(t),r=We(e[i]),e=We(e[o]),r=Ke([ke(ze(r[0],e[0],a=t-i)),ke(ze(r[1],e[1],a)),ke(ze(r[2],e[2],a)),Pe(ze(r[3],e[3],a))],"rgba"),n?{color:r,leftIndex:i,rightIndex:o,value:t}:r}function je(t,e,n,i){if(t=We(t))return t=function(t){var e,n,i,o,a,r,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),a=((o=Math.max(h,n,i))+s)/2,0==(u=o-s)?r=e=0:(r=a<.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,r,a],null!=t[3]&&h.push(t[3]),h}(t),null!=e&&(t[0]=(e=e,(e=Math.round(e))<0?0:360<e?360:e)),null!=n&&(t[1]=Oe(n)),null!=i&&(t[2]=Oe(i)),Ke(He(t),"rgba")}function qe(t,e){if((t=We(t))&&null!=e)return t[3]=Pe(e),Ke(t,"rgba")}function Ke(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+")"}var De=Object.freeze({__proto__:null,fastLerp:Ye,fastMapToColor:Ye,lerp:Ue,lift:Ze,mapToColor:Ue,modifyAlpha:qe,modifyHSL:je,parse:We,stringify:Ke,toHex:Xe}),$e=Array.prototype.slice;function Je(t,e){return t[e]}function Qe(t,e,n){t[e]=n}function tn(t,e,n){return(e-t)*n+t}function en(t,e,n,i,o){var a=t.length;if(1===o)for(var r=0;r<a;r++)i[r]=tn(t[r],e[r],n);else for(var s=a&&t[0].length,r=0;r<a;r++)for(var l=0;l<s;l++)i[r][l]=tn(t[r][l],e[r][l],n)}function nn(t,e,n){var i=t.length,o=e.length;if(i!==o)if(o<i)t.length=o;else for(var a=i;a<o;a++)t.push(1===n?e[a]:$e.call(e[a]));for(var r=t[0]&&t[0].length,a=0;a<t.length;a++)if(1===n)isNaN(t[a])&&(t[a]=e[a]);else for(var s=0;s<r;s++)isNaN(t[a][s])&&(t[a][s]=e[a][s])}function on(t,e,n,i,o,a,r,s,l){var u=t.length;if(1===l)for(var h=0;h<u;h++)s[h]=an(t[h],e[h],n[h],i[h],o,a,r);else for(var c=t[0].length,h=0;h<u;h++)for(var d=0;d<c;d++)s[h][d]=an(t[h][d],e[h][d],n[h][d],i[h][d],o,a,r)}function an(t,e,n,i,o,a,r){t=.5*(n-t),i=.5*(i-e);return(2*(e-n)+t+i)*r+(-3*(e-n)-2*t-i)*a+t*o+e}function rn(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}function sn(t,e,n,i,a,o){var r=t._getter,s=t._setter,l="spline"===e,u=i.length;if(u){var h=J(i[0].value),c=!1,d=!1,p=h?J((k=(k=i)[k.length-1].value)&&k[0])?2:1:0;i.sort(function(t,e){return t.time-e.time});for(var g=i[u-1].time,f=[],m=[],y=i[0].value,v=!0,x=0;x<u;x++){f.push(i[x].time/g);var _,w=i[x].value;h&&function(t,e,n){if(t===e)return 1;var i=t.length;if(i===e.length){if(1===n){for(var o=0;o<i;o++)if(t[o]!==e[o])return}else for(var a=t[0].length,o=0;o<i;o++)for(var r=0;r<a;r++)if(t[o][r]!==e[o][r])return;return 1}}(w,y,p)||!h&&w===y||(v=!1),"string"==typeof(y=w)&&((_=We(w))?(w=_,c=!0):d=!0),m.push(w)}if(o||!v){for(var b=m[u-1],x=0;x<u-1;x++)h?nn(m[x],b,p):!isNaN(m[x])||isNaN(b)||d||c||(m[x]=b);h&&nn(r(t._target,a),b,p);var S,M,I,T,A,D,C=0,L=0,k=(c&&(D=[0,0,0,0]),new Ie({target:t._target,life:g,loop:t._loop,delay:t._delay,onframe:function(t,e){var n;if(e<0)n=0;else if(e<L){for(n=Math.min(C+1,u-1);0<=n&&!(f[n]<=e);n--);n=Math.min(n,u-2)}else{for(n=C;n<u&&!(e<f[n]);n++);n=Math.min(n-1,u-2)}L=e;var i,o=f[(C=n)+1]-f[n];if(0!=o)if(S=(e-f[n])/o,l)if(I=m[n],M=m[0===n?n:n-1],T=m[u-2<n?u-1:n+1],A=m[u-3<n?u-1:n+2],h)on(M,I,T,A,S,S*S,S*S*S,r(t,a),p);else{if(c)i=on(M,I,T,A,S,S*S,S*S*S,D,1),i=rn(D);else{if(d)return.5<S?T:I;i=an(M,I,T,A,S,S*S,S*S*S)}s(t,a,i)}else if(h)en(m[n],m[n+1],S,r(t,a),p);else{if(c)en(m[n],m[n+1],S,D,1),i=rn(D);else{if(d)return.5<S?m[n+1]:m[n];i=tn(m[n],m[n+1],S)}s(t,a,i)}},ondestroy:n}));return e&&"spline"!==e&&(k.easing=e),k}}}function ln(t,e,n,i){this._tracks={},this._target=t,this._loop=e||!1,this._getter=n||Je,this._setter=i||Qe,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]}function un(){this.animators=[]}ln.prototype={when:function(t,e){var n,i=this._tracks;for(n in e)if(e.hasOwnProperty(n)){if(!i[n]){i[n]=[];var o=this._getter(this._target,n);if(null==o)continue;0!==t&&i[n].push({time:0,value:function(t){if(J(t)){var e=t.length;if(J(t[0])){for(var n=[],i=0;i<e;i++)n.push($e.call(t[i]));return n}return $e.call(t)}return t}(o)})}i[n].push({time:t,value:e[n]})}return this},during:function(t){return this._onframeList.push(t),this},pause:function(){for(var t=0;t<this._clipList.length;t++)this._clipList[t].pause();this._paused=!0},resume:function(){for(var t=0;t<this._clipList.length;t++)this._clipList[t].resume();this._paused=!1},isPaused:function(){return!!this._paused},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var t=this._doneList,e=t.length,n=0;n<e;n++)t[n].call(this)},start:function(t,e){function n(){--l||s._doneCallback()}var i,o,a,r,s=this,l=0;for(o in this._tracks)this._tracks.hasOwnProperty(o)&&(a=sn(this,t,n,this._tracks[o],o,e))&&(this._clipList.push(a),l++,this.animation&&this.animation.addClip(a),i=a);return i&&(r=i.onframe,i.onframe=function(t,e){r(t,e);for(var n=0;n<s._onframeList.length;n++)s._onframeList[n](t,e)}),l||this._doneCallback(),this},stop:function(t){for(var e=this._clipList,n=this.animation,i=0;i<e.length;i++){var o=e[i];t&&o.onframe(this._target,1),n&&n.removeClip(o)}e.length=0},delay:function(t){return this._delay=t,this},done:function(t){return t&&this._doneList.push(t),this},getClips:function(){return this._clipList}};var hn=1,cn=hn="undefined"!=typeof window?Math.max(window.devicePixelRatio||1,1):hn;function dn(t,e,n,i,o,a,r,s){T(i)?(a=o,o=i,i=0):et(o)?(a=o,o="linear",i=0):et(i)?(a=i,i=0):n=et(n)?(a=n,500):n||500,t.stopAnimation(),function t(e,n,i,o,a,r,s){var l={},u=0;for(var h in o)o.hasOwnProperty(h)&&(null!=i[h]?k(o[h])&&!J(o[h])?t(e,n?n+"."+h:h,i[h],o[h],a,r,s):(s?(l[h]=i[h],pn(e,n,h,o[h])):l[h]=o[h],u++):null==o[h]||s||pn(e,n,h,o[h]));0<u&&e.animate(n,!1).when(null==a?500:a,l).delay(r||0)}(t,"",t,e,n,i,s);var l=t.animators.slice(),u=l.length;function h(){--u||a&&a()}u||a&&a();for(var c=0;c<l.length;c++)l[c].done(h).start(o,r)}function pn(t,e,n,i){var o;e?((o={})[e]={},o[e][n]=i,t.attr(o)):t.attr(n,i)}function gn(t){xe.call(this,t),Wt.call(this,t),un.call(this,t),this.id=t.id||d++}gn.prototype={type:"element",name:"",__zr:null,ignore:!(un.prototype={constructor:un,animate:function(t,e){var n,i,o,a=!1,r=this,s=this.__zr;if(t){for(var l=t.split("."),u=r,a="shape"===l[0],h=0,c=l.length;h<c;h++)u=u&&u[l[h]];u&&(n=u)}else n=r;if(n)return i=r.animators,(o=new ln(n,e)).during(function(t){r.dirty(a)}).done(function(){i.splice(S(i,o),1)}),i.push(o),s&&s.animation.addAnimator(o),o;r.id},stopAnimation:function(t){for(var e=this.animators,n=e.length,i=0;i<n;i++)e[i].stop(t);return e.length=0,this},animateTo:function(t,e,n,i,o,a){dn(this,t,e,n,i,o,a)},animateFrom:function(t,e,n,i,o,a){dn(this,t,e,n,i,o,a,!0)}}),clipPath:null,isGroup:!1,drift:function(t,e){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var n=this.transform;(n=n||(this.transform=[1,0,0,1,0,0]))[4]+=t,n[5]+=e,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(t,e){},attrKV:function(t,e){var n;"position"===t||"scale"===t||"origin"===t?e&&((n=(n=this[t])||(this[t]=[]))[0]=e[0],n[1]=e[1]):this[t]=e},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(k(t))for(var n in t)t.hasOwnProperty(n)&&this.attrKV(n,t[n]);return this.dirty(!1),this},setClipPath:function(t){var e=this.__zr;e&&t.addSelfToZr(e),this.clipPath&&this.clipPath!==t&&this.removeClipPath(),(this.clipPath=t).__zr=e,(t.__clipTarget=this).dirty(!1)},removeClipPath:function(){var t=this.clipPath;t&&(t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__clipTarget=null,this.clipPath=null,this.dirty(!1))},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)},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)}},i(gn,un),i(gn,xe),i(gn,Wt);var fn,mn,yn,vn,xn=zt,_n=Math.min,wn=Math.max;function z(t,e,n,i){n<0&&(t+=n,n=-n),i<0&&(e+=i,i=-i),this.x=t,this.y=e,this.width=n,this.height=i}z.prototype={constructor:z,union:function(t){var e=_n(t.x,this.x),n=_n(t.y,this.y);this.width=wn(t.x+t.width,this.x+this.width)-e,this.height=wn(t.y+t.height,this.y+this.height)-n,this.x=e,this.y=n},applyTransform:(fn=[],mn=[],yn=[],vn=[],function(t){var e;t&&(fn[0]=yn[0]=this.x,fn[1]=vn[1]=this.y,mn[0]=vn[0]=this.x+this.width,mn[1]=yn[1]=this.y+this.height,xn(fn,fn,t),xn(mn,mn,t),xn(yn,yn,t),xn(vn,vn,t),this.x=_n(fn[0],mn[0],yn[0],vn[0]),this.y=_n(fn[1],mn[1],yn[1],vn[1]),t=wn(fn[0],mn[0],yn[0],vn[0]),e=wn(fn[1],mn[1],yn[1],vn[1]),this.width=t-this.x,this.height=e-this.y)}),calculateTransform:function(t){var e=t.width/this.width,n=t.height/this.height,i=se();return ce(i,i,[-this.x,-this.y]),pe(i,i,[e,n]),ce(i,i,[t.x,t.y]),i},intersect:function(t){if(!t)return!1;t instanceof z||(t=z.create(t));var e=this,n=e.x,i=e.x+e.width,o=e.y,e=e.y+e.height,a=t.x,r=t.x+t.width,s=t.y,t=t.y+t.height;return!(i<a||r<n||e<s||t<o)},contain:function(t,e){var n=this;return t>=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},clone:function(){return new z(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}};var R=function(t){for(var e in gn.call(this,t=t||{}),t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0},bn=(R.prototype={constructor:R,isGroup:!0,type:"group",silent:!(z.create=function(t){return new z(t.x,t.y,t.width,t.height)}),children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,n=0;n<e.length;n++)if(e[n].name===t)return e[n]},childCount:function(){return this._children.length},add:function(t){return t&&t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),this},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},_doAdd:function(t){t.parent&&t.parent.remove(t);var e=(t.parent=this).__storage,n=this.__zr;e&&e!==t.__storage&&(e.addToStorage(t),t instanceof R)&&t.addChildrenToStorage(e),n&&n.refresh()},remove:function(t){var e=this.__zr,n=this.__storage,i=this._children,o=S(i,t);return o<0||(i.splice(o,1),t.parent=null,n&&(n.delFromStorage(t),t instanceof R)&&t.delChildrenFromStorage(n),e&&e.refresh()),this},removeAll:function(){for(var t,e=this._children,n=this.__storage,i=0;i<e.length;i++)t=e[i],n&&(n.delFromStorage(t),t instanceof R)&&t.delChildrenFromStorage(n),t.parent=null;return e.length=0,this},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},traverse:function(t,e){for(var n=0;n<this._children.length;n++){var i=this._children[n];t.call(e,i),"group"===i.type&&i.traverse(t,e)}return this},addChildrenToStorage:function(t){for(var e=0;e<this._children.length;e++){var n=this._children[e];t.addToStorage(n),n instanceof R&&n.addChildrenToStorage(t)}},delChildrenFromStorage:function(t){for(var e=0;e<this._children.length;e++){var n=this._children[e];t.delFromStorage(n),n instanceof R&&n.delChildrenFromStorage(t)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(t){for(var e=null,n=new z(0,0,0,0),i=t||this._children,o=[],a=0;a<i.length;a++){var r,s=i[a];s.ignore||s.invisible||(r=s.getBoundingRect(),(s=s.getLocalTransform(o))?(n.copy(r),n.applyTransform(s),(e=e||n.clone()).union(n)):(e=e||r.clone()).union(r))}return e||n}},a(R,gn),32),Sn=7;function Mn(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 a=t,r=e,s=o;for(s--;r<s;){var l=a[r];a[r++]=a[s],a[s--]=l}}else for(;o<n&&0<=i(t[o],t[o-1]);)o++;return o-e}function In(t,e,n,i,o){for(i===e&&i++;i<n;i++){for(var a,r=t[i],s=e,l=i;s<l;)o(r,t[a=s+l>>>1])<0?l=a:s=1+a;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]=r}}function Tn(t,e,n,i,o,a){var r=0,s=0,l=1;if(0<a(t,e[n+o])){for(s=i-o;l<s&&0<a(t,e[n+o+l]);)(l=1+((r=l)<<1))<=0&&(l=s);s<l&&(l=s),r+=o,l+=o}else{for(s=o+1;l<s&&a(t,e[n+o-l])<=0;)(l=1+((r=l)<<1))<=0&&(l=s);i=r,r=o-(l=s<l?s:l),l=o-i}for(r++;r<l;){var u=r+(l-r>>>1);0<a(t,e[n+u])?r=u+1:l=u}return l}function An(t,e,n,i,o,a){var r=0,s=0,l=1;if(a(t,e[n+o])<0){for(s=o+1;l<s&&a(t,e[n+o-l])<0;)(l=1+((r=l)<<1))<=0&&(l=s);var u=r,r=o-(l=s<l?s:l),l=o-u}else{for(s=i-o;l<s&&0<=a(t,e[n+o+l]);)(l=1+((r=l)<<1))<=0&&(l=s);s<l&&(l=s),r+=o,l+=o}for(r++;r<l;){var h=r+(l-r>>>1);a(t,e[n+h])<0?l=h:r=h+1}return l}function Dn(g,f){var a,r,m=Sn,s=0,y=(g.length,[]);function e(t){var e=a[t],n=r[t],i=a[t+1],o=r[t+1],t=(r[t]=n+o,t===s-3&&(a[t+1]=a[t+2],r[t+1]=r[t+2]),s--,An(g[i],g,e,n,0,f));e+=t,0!=(n-=t)&&0!==(o=Tn(g[e+n-1],g,i,o,o-1,f))&&(n<=o?function(t,e,n,i){for(var o=0,o=0;o<e;o++)y[o]=g[t+o];var a=0,r=n,s=t;if(g[s++]=g[r++],0==--i)for(o=0;o<e;o++)g[s+o]=y[a+o];else{if(1===e){for(o=0;o<i;o++)g[s+o]=g[r+o];return g[s+i]=y[a]}for(var l,u,h,c=m;;){u=l=0,h=!1;do{if(f(g[r],y[a])<0){if(g[s++]=g[r++],u++,(l=0)==--i){h=!0;break}}else if(g[s++]=y[a++],l++,u=0,1==--e){h=!0;break}}while((l|u)<c);if(h)break;do{if(0!==(l=An(g[r],y,a,e,0,f))){for(o=0;o<l;o++)g[s+o]=y[a+o];if(s+=l,a+=l,(e-=l)<=1){h=!0;break}}if(g[s++]=g[r++],0==--i){h=!0;break}if(0!==(u=Tn(y[a],g,r,i,0,f))){for(o=0;o<u;o++)g[s+o]=g[r+o];if(s+=u,r+=u,0==(i-=u)){h=!0;break}}if(g[s++]=y[a++],1==--e){h=!0;break}}while(c--,Sn<=l||Sn<=u);if(h)break;c<0&&(c=0),c+=2}if((m=c)<1&&(m=1),1===e){for(o=0;o<i;o++)g[s+o]=g[r+o];g[s+i]=y[a]}else{if(0===e)throw new Error;for(o=0;o<e;o++)g[s+o]=y[a+o]}}}:function(t,e,n,i){for(var o=0,o=0;o<i;o++)y[o]=g[n+o];var a=t+e-1,r=i-1,s=n+i-1,l=0,u=0;if(g[s--]=g[a--],0==--e)for(l=s-(i-1),o=0;o<i;o++)g[l+o]=y[o];else{if(1===i){for(u=1+(s-=e),l=1+(a-=e),o=e-1;0<=o;o--)g[u+o]=g[l+o];return g[s]=y[r]}for(var h=m;;){var c=0,d=0,p=!1;do{if(f(y[r],g[a])<0){if(g[s--]=g[a--],c++,(d=0)==--e){p=!0;break}}else if(g[s--]=y[r--],d++,c=0,1==--i){p=!0;break}}while((c|d)<h);if(p)break;do{if(0!=(c=e-An(y[r],g,t,e,e-1,f))){for(e-=c,u=1+(s-=c),l=1+(a-=c),o=c-1;0<=o;o--)g[u+o]=g[l+o];if(0===e){p=!0;break}}if(g[s--]=y[r--],1==--i){p=!0;break}if(0!=(d=i-Tn(g[a],y,0,i,i-1,f))){for(i-=d,u=1+(s-=d),l=1+(r-=d),o=0;o<d;o++)g[u+o]=y[l+o];if(i<=1){p=!0;break}}if(g[s--]=g[a--],0==--e){p=!0;break}}while(h--,Sn<=c||Sn<=d);if(p)break;h<0&&(h=0),h+=2}if((m=h)<1&&(m=1),1===i){for(u=1+(s-=e),l=1+(a-=e),o=e-1;0<=o;o--)g[u+o]=g[l+o];g[s]=y[r]}else{if(0===i)throw new Error;for(l=s-(i-1),o=0;o<i;o++)g[l+o]=y[o]}}})(e,n,i,o)}a=[],r=[],this.mergeRuns=function(){for(;1<s;){var t=s-2;if(1<=t&&r[t-1]<=r[t]+r[t+1]||2<=t&&r[t-2]<=r[t]+r[t-1])r[t-1]<r[t+1]&&t--;else if(r[t]>r[t+1])break;e(t)}},this.forceMergeRuns=function(){for(;1<s;){var t=s-2;0<t&&r[t-1]<r[t+1]&&t--,e(t)}},this.pushRun=function(t,e){a[s]=t,r[s]=e,s+=1}}function Cn(t,e,n,i){var o=(i=i||t.length)-(n=n||0);if(!(o<2)){var a=0;if(o<bn)In(t,n,i,n+(a=Mn(t,n,i,e)),e);else{var r,s=new Dn(t,e),l=function(t){for(var e=0;bn<=t;)e|=1&t,t>>=1;return t+e}(o);do{}while((a=Mn(t,n,i,e))<l&&(In(t,n,n+(r=l<(r=o)?l:o),n+a,e),a=r),s.pushRun(n,a),s.mergeRuns(),n+=a,0!==(o-=a));s.forceMergeRuns()}}}function Ln(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}function kn(){this._roots=[],this._displayList=[],this._displayListLen=0}var Pn={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1};function Nn(t,e,n){return Pn.hasOwnProperty(e)?n*t.dpr:n}function On(t){this.extendFrom(t,!1)}var En={NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},zn=9,Rn=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];for(var Bn=On.prototype={constructor:On,fill:"#000",stroke:null,opacity:1,fillOpacity:null,strokeOpacity:null,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!(kn.prototype={constructor:kn,traverse:function(t,e){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(t,e)},getDisplayList:function(t,e){return e=e||!1,t&&this.updateDisplayList(e),this._displayList},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,y.canvasSupported&&Cn(n,Ln)},_updateAndAddDisplayable:function(t,e,n){if(!t.ignore||n){t.beforeUpdate(),t.__dirty&&t.update(),t.afterUpdate();var i=t.clipPath;if(i){e=e?e.slice():[];for(var o=i,a=t;o;)o.parent=a,o.updateTransform(),e.push(o),o=(a=o).clipPath}if(t.isGroup){for(var r=t._children,s=0;s<r.length;s++){var l=r[s];t.__dirty&&(l.__dirty=!0),this._updateAndAddDisplayable(l,e,n)}t.__dirty=!1}else t.__clipPaths=e,this._displayList[this._displayListLen++]=t}},addRoot:function(t){t.__storage!==this&&(t instanceof R&&t.addChildrenToStorage(this),this.addToStorage(t),this._roots.push(t))},delRoot:function(t){if(null==t){for(var e=0;e<this._roots.length;e++){var n=this._roots[e];n instanceof R&&n.delChildrenFromStorage(this)}this._roots=[],this._displayList=[],this._displayListLen=0}else if(t instanceof Array)for(var e=0,i=t.length;e<i;e++)this.delRoot(t[e]);else{var o=S(this._roots,t);0<=o&&(this.delFromStorage(t),this._roots.splice(o,1),t instanceof R)&&t.delChildrenFromStorage(this)}},addToStorage:function(t){return t&&(t.__storage=this,t.dirty(!1)),this},delFromStorage:function(t){return t&&(t.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:Ln}),text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(t,e,n){var i=this,o=n&&n.style,a=!o||t.__attrCachedBy!==En.STYLE_BIND;t.__attrCachedBy=En.STYLE_BIND;for(var r=0;r<Rn.length;r++){var s=Rn[r],l=s[0];!a&&i[l]===o[l]||(t[l]=Nn(t,l,i[l]||s[1]))}!a&&i.fill===o.fill||(t.fillStyle=i.fill),!a&&i.stroke===o.stroke||(t.strokeStyle=i.stroke),!a&&i.opacity===o.opacity||(t.globalAlpha=null==i.opacity?1:i.opacity),!a&&i.blend===o.blend||(t.globalCompositeOperation=i.blend||"source-over"),this.hasStroke()&&(n=i.lineWidth,t.lineWidth=n/(this.strokeNoScale&&e&&e.getLineScale?e.getLineScale():1))},hasFill:function(){var t=this.fill;return null!=t&&"none"!==t},hasStroke:function(){var t=this.stroke;return null!=t&&"none"!==t&&0<this.lineWidth},extendFrom:function(t,e){if(t)for(var n in t)!t.hasOwnProperty(n)||!0!==e&&(!1===e?this.hasOwnProperty(n):null==t[n])||(this[n]=t[n])},set:function(t,e){"string"==typeof t?this[t]=e:this.extendFrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendFrom(this,!0),t},getGradient:function(t,e,n){for(var i=("radial"===e.type?function(t,e,n){var i=n.width,o=n.height,a=Math.min(i,o),r=null==e.x?.5:e.x,s=null==e.y?.5:e.y,l=null==e.r?.5:e.r;return e.global||(r=r*i+n.x,s=s*o+n.y,l*=a),t.createRadialGradient(r,s,0,r,s,l)}:function(t,e,n){var i=null==e.x?0:e.x,o=null==e.x2?1:e.x2,a=null==e.y?0:e.y,r=null==e.y2?0:e.y2;return e.global||(i=i*n.width+n.x,o=o*n.width+n.x,a=a*n.height+n.y,r=r*n.height+n.y),i=isNaN(i)?0:i,o=isNaN(o)?1:o,a=isNaN(a)?0:a,r=isNaN(r)?0:r,t.createLinearGradient(i,a,o,r)})(t,e,n),o=e.colorStops,a=0;a<o.length;a++)i.addColorStop(o[a].offset,o[a].color);return i}},Vn=0;Vn<Rn.length;Vn++){var Gn=Rn[Vn];Gn[0]in Bn||(Bn[Gn[0]]=Gn[1])}On.getGradient=Bn.getGradient;function Fn(t,e){this.image=t,this.repeat=e,this.type="pattern"}function Wn(){return!1}function Hn(t,e,n){var i=K(),o=e.getWidth(),e=e.getHeight(),a=i.style;return a&&(a.position="absolute",a.left=0,a.top=0,a.width=o+"px",a.height=e+"px",i.setAttribute("data-zr-dom-id",t)),i.width=o*n,i.height=e*n,i}function Zn(t,e,n){var i;n=n||cn,"string"==typeof t?i=Hn(t,e,n):k(t)&&(t=(i=t).id),this.id=t,(t=(this.dom=i).style)&&(i.onselectstart=Wn,t["-webkit-user-select"]="none",t["user-select"]="none",t["-webkit-touch-callout"]="none",t["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",t.padding=0,t.margin=0,t["border-width"]=0),this.domBack=null,this.ctxBack=null,this.painter=e,this.config=null,this.clearColor=0,this.motionBlur=!1,this.lastFrameAlpha=.7,this.dpr=n}Zn.prototype={constructor:Zn,__dirty:!0,__used:!(Fn.prototype.getCanvasPattern=function(t){return t.createPattern(this.image,this.repeat||"repeat")}),__drawIndex:0,__startIndex:0,__endIndex:0,incremental:!1,getElementCount:function(){return this.__endIndex-this.__startIndex},initContext:function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},createBackBuffer:function(){var t=this.dpr;this.domBack=Hn("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!==t&&this.ctxBack.scale(t,t)},resize:function(t,e){var n=this.dpr,i=this.dom,o=i.style,a=this.domBack;o&&(o.width=t+"px",o.height=e+"px"),i.width=t*n,i.height=e*n,a&&(a.width=t*n,a.height=e*n,1!==n)&&this.ctxBack.scale(n,n)},clear:function(t,e){var n,i=this.dom,o=this.ctx,a=i.width,r=i.height,t=(e=e||this.clearColor,this.motionBlur&&!t),s=this.lastFrameAlpha,l=this.dpr;t&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(i,0,0,a/l,r/l)),o.clearRect(0,0,a,r),e&&"transparent"!==e&&(e.colorStops?(n=e.__canvasGradient||On.getGradient(o,e,{x:0,y:0,width:a,height:r}),e.__canvasGradient=n):e.image&&(n=Fn.prototype.getCanvasPattern.call(e,o)),o.save(),o.fillStyle=n||e,o.fillRect(0,0,a,r),o.restore()),t&&(i=this.domBack,o.save(),o.globalAlpha=s,o.drawImage(i,0,0,a,r),o.restore())}};var Xn="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){setTimeout(t,16)},Yn=new Ae(50);function Un(t,e,n,i,o){return t?"string"==typeof t?(e&&e.__zrImageSrc===t||!n||(n={hostEl:n,cb:i,cbPayload:o},(i=Yn.get(t))?qn(e=i.image)||i.pending.push(n):((e=new Image).onload=e.onerror=jn,Yn.put(t,e.__cachedImgObj={image:e,pending:[n]}),e.src=e.__zrImageSrc=t)),e):t:e}function jn(){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 qn(t){return t&&t.width&&t.height}var Kn={},$n=0,Jn=5e3,Qn=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,ti="12px sans-serif",ei={};function ni(t,e){var n=t+":"+(e=e||ti);if(Kn[n])return Kn[n];for(var i,o,a=(t+"").split("\n"),r=0,s=0,l=a.length;s<l;s++)r=Math.max((i=a[s],o=e,ei.measureText(i,o)).width,r);return Jn<$n&&($n=0,Kn={}),$n++,Kn[n]=r}function ii(t,e,n,i,o,a,r,s){var l,u,h,c,d,p;return r?(l=i,r=(h=ci(h=t,{rich:r=r,truncate:p=s,font:u=e,textAlign:c=n,textPadding:d=o,textLineHeight:a})).outerWidth,p=h.outerHeight,u=oi(0,r,c),d=ai(0,p,l),new z(u,d,r,p)):(h=n,c=i,r=hi(l=t,u=e,d=o,r=a,p=s),p=ni(l,u),d&&(p+=d[1]+d[3]),l=r.outerHeight,u=oi(0,p,h),d=ai(0,l,c),(h=new z(u,d,p,l)).lineHeight=r.lineHeight,h)}function oi(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 ri(t,e,n,i,o){if(!e)return"";var a=(t+"").split("\n");o=si(e,n,i,o);for(var r=0,s=a.length;r<s;r++)a[r]=li(a[r],o);return a.join("\n")}function si(t,e,n,i){(i=O({},i)).font=e,n=st(n,"..."),i.maxIterations=st(i.maxIterations,2);var o=i.minChar=st(i.minChar,0),a=(i.cnCharWidth=ni("ๅ›ฝ",e),i.ascCharWidth=ni("a",e));i.placeholder=st(i.placeholder,"");for(var r=t=Math.max(0,t-1),s=0;s<o&&a<=r;s++)r-=a;e=ni(n,e);return r<e&&(n="",e=0),r=t-e,i.ellipsis=n,i.ellipsisWidth=e,i.contentWidth=r,i.containerWidth=t,i}function li(t,e){var n=e.containerWidth,i=e.font,o=e.contentWidth;if(!n)return"";var a=ni(t,i);if(!(a<=n)){for(var r=0;;r++){if(a<=o||r>=e.maxIterations){t+=e.ellipsis;break}var s=0===r?function(t,e,n,i){for(var o=0,a=0,r=t.length;a<r&&o<e;a++){var s=t.charCodeAt(a);o+=0<=s&&s<=127?n:i}return a}(t,o,e.ascCharWidth,e.cnCharWidth):0<a?Math.floor(t.length*o/a):0,a=ni(t=t.substr(0,s),i)}""===t&&(t=e.placeholder)}return t}function ui(t){return ni("ๅ›ฝ",t)}function hi(t,e,n,i,o){null!=t&&(t+="");var i=st(i,ui(e)),a=t?t.split("\n"):[],r=a.length*i,s=r;if(n&&(s+=n[0]+n[2]),t&&o){var l=o.outerHeight,u=o.outerWidth;if(null!=l&&l<s)t="",a=[];else if(null!=u)for(var h=si(u-(n?n[1]+n[3]:0),e,o.ellipsis,{minChar:o.minChar,placeholder:o.placeholder}),c=0,d=a.length;c<d;c++)a[c]=li(a[c],h)}return{lines:a,height:r,outerHeight:s,lineHeight:i}}function ci(t,e){var n={lines:[],width:0,height:0};if(null!=t&&(t+=""),t){for(var i,o=Qn.lastIndex=0;null!=(i=Qn.exec(t));){var a=i.index;o<a&&di(n,t.substring(o,a)),di(n,i[2],i[1]),o=Qn.lastIndex}o<t.length&&di(n,t.substring(o,t.length));var r=n.lines,s=0,l=0,u=[],h=e.textPadding,c=e.truncate,d=c&&c.outerWidth,p=c&&c.outerHeight;h&&(null!=d&&(d-=h[1]+h[3]),null!=p)&&(p-=h[0]+h[2]);for(var g=0;g<r.length;g++){for(var f=r[g],m=0,y=0,v=0;v<f.tokens.length;v++){var x=(D=f.tokens[v]).styleName&&e.rich[D.styleName]||{},_=D.textPadding=x.textPadding,w=D.font=x.font||e.font,b=D.textHeight=st(x.textHeight,ui(w));if(_&&(b+=_[0]+_[2]),D.height=b,D.lineHeight=lt(x.textLineHeight,e.textLineHeight,b),D.textAlign=x&&x.textAlign||e.textAlign,D.textVerticalAlign=x&&x.textVerticalAlign||"middle",null!=p&&s+D.lineHeight>p)return{lines:[],width:0,height:0};D.textWidth=ni(D.text,w);var S,M,I,T=x.textWidth,A=null==T||"auto"===T;"string"==typeof T&&"%"===T.charAt(T.length-1)?(D.percentWidth=T,u.push(D),T=0):(A&&(T=D.textWidth,S=(S=x.textBackgroundColor)&&S.image)&&(M=void 0,qn(S="string"==typeof(I=S)?(M=Yn.get(I))&&M.image:I))&&(T=Math.max(T,S.width*b/S.height)),T+=M=_?_[1]+_[3]:0,null!=(I=null!=d?d-y:null)&&I<T&&(!A||I<M?(D.text="",D.textWidth=T=0):(D.text=ri(D.text,I-M,w,c.ellipsis,{minChar:c.minChar}),D.textWidth=ni(D.text,w),T=D.textWidth+M))),y+=D.width=T,x&&(m=Math.max(m,D.lineHeight))}f.width=y,s+=f.lineHeight=m,l=Math.max(l,y)}for(n.outerWidth=n.width=st(e.textWidth,l),n.outerHeight=n.height=st(e.textHeight,s),h&&(n.outerWidth+=h[1]+h[3],n.outerHeight+=h[0]+h[2]),g=0;g<u.length;g++){var D,C=(D=u[g]).percentWidth;D.width=parseInt(C,10)/100*l}}return n}function di(t,e,n){for(var i=""===e,o=e.split("\n"),a=t.lines,r=0;r<o.length;r++){var s,l,u=o[r],h={styleName:n,text:u,isLineHolder:!u&&!i};r?a.push({tokens:[h]}):1===(l=(s=(a[a.length-1]||(a[0]={tokens:[]})).tokens).length)&&s[0].isLineHolder?s[0]=h:!u&&l&&!i||s.push(h)}}function pi(t){var e=(t.fontSize||t.fontFamily)&&[t.fontStyle,t.fontWeight,(t.fontSize||12)+"px",t.fontFamily||"sans-serif"].join(" ");return e&&ct(e)||t.textFont||t.font}function gi(t,e){var n,i,o,a,r,s=e.x,l=e.y,u=e.width,h=e.height,e=e.r;u<0&&(s+=u,u=-u),h<0&&(l+=h,h=-h),"number"==typeof e?n=i=o=a=e:e instanceof Array?1===e.length?n=i=o=a=e[0]:2===e.length?(n=o=e[0],i=a=e[1]):3===e.length?(n=e[0],i=a=e[1],o=e[2]):(n=e[0],i=e[1],o=e[2],a=e[3]):n=i=o=a=0,u<n+i&&(n*=u/(r=n+i),i*=u/r),u<o+a&&(o*=u/(r=o+a),a*=u/r),h<i+o&&(i*=h/(r=i+o),o*=h/r),h<n+a&&(n*=h/(r=n+a),a*=h/r),t.moveTo(s+n,l),t.lineTo(s+u-i,l),0!==i&&t.arc(s+u-i,l+i,i,-Math.PI/2,0),t.lineTo(s+u,l+h-o),0!==o&&t.arc(s+u-o,l+h-o,o,0,Math.PI/2),t.lineTo(s+a,l+h),0!==a&&t.arc(s+a,l+h-a,a,Math.PI/2,Math.PI),t.lineTo(s,l+n),0!==n&&t.arc(s+n,l+n,n,Math.PI,1.5*Math.PI)}ei.measureText=function(t,e){var n=$();return n.font=e||ti,n.measureText(t)};var fi=ti,mi={left:1,right:1,center:1},yi={top:1,bottom:1,middle:1},vi=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]];function xi(t){_i(t),Z(t.rich,_i)}function _i(t){var e;t&&(t.font=pi(t),e=t.textAlign,t.textAlign=null==(e="middle"===e?"center":e)||mi[e]?e:"left",e=t.textVerticalAlign||t.textBaseline,t.textVerticalAlign=null==(e="center"===e?"middle":e)||yi[e]?e:"top",t.textPadding)&&(t.textPadding=ht(t.textPadding))}function wi(t,e,n,i,o,a){(i.rich?function(t,e,n,i,o,a){a!==zn&&(e.__attrCachedBy=En.NONE);a=t.__textCotentBlock;a&&!t.__dirtyText||(a=t.__textCotentBlock=ci(n,i)),function(t,e,n,i,o){var a=n.width,r=n.outerWidth,s=n.outerHeight,l=i.textPadding,u=Ai(0,i,o),h=u.baseX,c=u.baseY,d=u.textAlign,u=u.textVerticalAlign,o=(bi(e,i,o,h,c),oi(h,r,d)),h=ai(c,s,u),p=o,g=h,f=(l&&(p+=l[3],g+=l[0]),p+a);Mi(i)&&Ii(t,e,i,o,h,r,s);for(var m=0;m<n.lines.length;m++){for(var y,v=n.lines[m],x=v.tokens,_=x.length,w=v.lineHeight,b=v.width,S=0,M=p,I=f,T=_-1;S<_&&(!(y=x[S]).textAlign||"left"===y.textAlign);)Si(t,e,y,i,w,g,M,"left"),b-=y.width,M+=y.width,S++;for(;0<=T&&"right"===(y=x[T]).textAlign;)Si(t,e,y,i,w,g,I,"right"),b-=y.width,I-=y.width,T--;for(M+=(a-(M-p)-(f-I)-b)/2;S<=T;)Si(t,e,y=x[S],i,w,g,M+y.width/2,"center"),M+=y.width,S++;g+=w}}(t,e,a,i,o)}:function(t,e,n,i,o,a){var r,s=Mi(i),l=!1,u=e.__attrCachedBy===En.PLAIN_TEXT,a=(a!==zn?(a&&(r=a.style,l=!s&&u&&r),e.__attrCachedBy=s?En.NONE:En.PLAIN_TEXT):u&&(e.__attrCachedBy=En.NONE),i.font||fi),u=(l&&a===(r.font||fi)||(e.font=a),t.__computedFont),a=(t.__styleFont!==a&&(t.__styleFont=a,u=t.__computedFont=e.font),i.textPadding),h=i.textLineHeight,c=t.__textCotentBlock,h=(c=c&&!t.__dirtyText?c:t.__textCotentBlock=hi(n,u,a,h,i.truncate)).outerHeight,d=c.lines,p=c.lineHeight,c=Ai(0,i,o),g=c.baseX,f=c.baseY,m=c.textAlign||"left",c=c.textVerticalAlign,o=(bi(e,i,o,g,f),ai(f,h,c)),y=g,v=o;(s||a)&&(f=ni(n,u),a&&(f+=a[1]+a[3]),c=oi(g,f,m),s&&Ii(t,e,i,c,o,f,h),a)&&(y=Pi(g,m,a),v+=a[0]);e.textAlign=m,e.textBaseline="middle",e.globalAlpha=i.opacity||1;for(var x=0;x<vi.length;x++){var _=vi[x],w=_[0],b=_[1],S=i[w];l&&S===r[w]||(e[b]=Nn(e,b,S||_[2]))}v+=p/2;var n=i.textStrokeWidth,u=l?r.textStrokeWidth:null,s=!l||n!==u,t=!l||s||i.textStroke!==r.textStroke,M=Ci(i.textStroke,n),I=Li(i.textFill);if(M&&(s&&(e.lineWidth=n),t)&&(e.strokeStyle=M),!I||l&&i.textFill===r.textFill||(e.fillStyle=I),1===d.length)M&&e.strokeText(d[0],y,v),I&&e.fillText(d[0],y,v);else for(x=0;x<d.length;x++)M&&e.strokeText(d[x],y,v),I&&e.fillText(d[x],y,v),v+=p})(t,e,n,i,o,a)}function bi(t,e,n,i,o){var a;n&&e.textRotation&&("center"===(a=e.textOrigin)?(i=n.width/2+n.x,o=n.height/2+n.y):a&&(i=a[0]+n.x,o=a[1]+n.y),t.translate(i,o),t.rotate(-e.textRotation),t.translate(-i,-o))}function Si(t,e,n,i,o,a,r,s){var l=i.rich[n.styleName]||{},u=(l.text=n.text,n.textVerticalAlign),h=a+o/2,u=("top"===u?h=a+n.height/2:"bottom"===u&&(h=a+o-n.height/2),!n.isLineHolder&&Mi(l)&&Ii(t,e,l,"right"===s?r-n.width:"center"===s?r-n.width/2:r,h-n.height/2,n.width,n.height),n.textPadding),a=(u&&(r=Pi(r,s,u),h-=n.height/2-u[2]-n.textHeight/2),Di(e,"shadowBlur",lt(l.textShadowBlur,i.textShadowBlur,0)),Di(e,"shadowColor",l.textShadowColor||i.textShadowColor||"transparent"),Di(e,"shadowOffsetX",lt(l.textShadowOffsetX,i.textShadowOffsetX,0)),Di(e,"shadowOffsetY",lt(l.textShadowOffsetY,i.textShadowOffsetY,0)),Di(e,"textAlign",s),Di(e,"textBaseline","middle"),Di(e,"font",n.font||fi),Ci(l.textStroke||i.textStroke,void 0)),o=Li(l.textFill||i.textFill),t=st(l.textStrokeWidth,i.textStrokeWidth);a&&(Di(e,"lineWidth",t),Di(e,"strokeStyle",a),e.strokeText(n.text,r,h)),o&&(Di(e,"fillStyle",o),e.fillText(n.text,r,h))}function Mi(t){return!!(t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor)}function Ii(t,e,n,i,o,a,r){var s,l,u=n.textBackgroundColor,h=n.textBorderWidth,c=n.textBorderColor,d=T(u);Di(e,"shadowBlur",n.textBoxShadowBlur||0),Di(e,"shadowColor",n.textBoxShadowColor||"transparent"),Di(e,"shadowOffsetX",n.textBoxShadowOffsetX||0),Di(e,"shadowOffsetY",n.textBoxShadowOffsetY||0),(d||h&&c)&&(e.beginPath(),(l=n.textBorderRadius)?gi(e,{x:i,y:o,width:a,height:r,r:l}):e.rect(i,o,a,r),e.closePath()),d?(Di(e,"fillStyle",u),null!=n.fillOpacity?(s=e.globalAlpha,e.globalAlpha=n.fillOpacity*n.opacity,e.fill(),e.globalAlpha=s):e.fill()):k(u)&&(l=Un(u.image,null,t,Ti,u))&&qn(l)&&e.drawImage(l,i,o,a,r),h&&c&&(Di(e,"lineWidth",h),Di(e,"strokeStyle",c),null!=n.strokeOpacity?(s=e.globalAlpha,e.globalAlpha=n.strokeOpacity*n.opacity,e.stroke(),e.globalAlpha=s):e.stroke())}function Ti(t,e){e.image=t}function Ai(t,e,n){var i,o=e.x||0,a=e.y||0,r=e.textAlign,s=e.textVerticalAlign;return n&&((i=e.textPosition)instanceof Array?(o=n.x+ki(i[0],n.width),a=n.y+ki(i[1],n.height)):(o=(i=function(t,e,n){var i=e.x,o=e.y,a=e.height,r=e.width,s=a/2,l="left",u="top";switch(t){case"left":i-=n,o+=s,l="right",u="middle";break;case"right":i+=n+r,o+=s,u="middle";break;case"top":i+=r/2,o-=n,l="center",u="bottom";break;case"bottom":i+=r/2,o+=a+n,l="center";break;case"inside":i+=r/2,o+=s,l="center",u="middle";break;case"insideLeft":i+=n,o+=s,u="middle";break;case"insideRight":i+=r-n,o+=s,l="right",u="middle";break;case"insideTop":i+=r/2,o+=n,l="center";break;case"insideBottom":i+=r/2,o+=a-n,l="center",u="bottom";break;case"insideTopLeft":i+=n,o+=n;break;case"insideTopRight":i+=r-n,o+=n,l="right";break;case"insideBottomLeft":i+=n,o+=a-n,u="bottom";break;case"insideBottomRight":i+=r-n,o+=a-n,l="right",u="bottom"}return{x:i,y:o,textAlign:l,textVerticalAlign:u}}(i,n,e.textDistance)).x,a=i.y,r=r||i.textAlign,s=s||i.textVerticalAlign),n=e.textOffset)&&(o+=n[0],a+=n[1]),{baseX:o,baseY:a,textAlign:r,textVerticalAlign:s}}function Di(t,e,n){t[e]=Nn(t,e,n),t[e]}function Ci(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function Li(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function ki(t,e){return"string"==typeof t?0<=t.lastIndexOf("%")?parseFloat(t)/100*e:parseFloat(t):t}function Pi(t,e,n){return"right"===e?t-n[1]:"center"===e?t+n[3]/2-n[1]/2:t+n[3]}function Ni(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)}function Oi(){}var Ei=new z;function zi(t){for(var e in gn.call(this,t=t||{}),t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new On(t.style),this._rect=null,this.__clipPaths=[]}function Ri(t){zi.call(this,t)}zi.prototype={constructor:zi,type:"displayable",__dirty:!0,invisible:!(Oi.prototype={constructor:Oi,drawRectText:function(t,e){var n,i=this.style,o=(e=i.textRect||e,this.__dirty&&xi(i),i.text);null!=o&&(o+=""),Ni(o,i)&&(t.save(),n=this.transform,i.transformText?this.setTransform(t):n&&(Ei.copy(e),Ei.applyTransform(n),e=Ei),wi(this,t,o,i,e,zn),t.restore())}}),z:0,z2:0,zlevel:0,draggable:!1,dragging:!1,silent:!1,culling:!1,cursor:"pointer",rectHover:!1,progressive:!1,incremental:!1,globalScaleRatio:1,beforeBrush:function(t){},afterBrush:function(t){},brush:function(t,e){},getBoundingRect:function(){},contain:function(t,e){return this.rectContain(t,e)},traverse:function(t,e){t.call(e,this)},rectContain:function(t,e){t=this.transformCoordToLocal(t,e);return this.getBoundingRect().contain(t[0],t[1])},dirty:function(){this.__dirty=this.__dirtyText=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(t){return this.animate("style",t)},attrKV:function(t,e){"style"!==t?gn.prototype.attrKV.call(this,t,e):this.style.set(e)},setStyle:function(t,e){return this.style.set(t,e),this.dirty(!1),this},useStyle:function(t){return this.style=new On(t),this.dirty(!1),this}},a(zi,gn),i(zi,Oi),Ri.prototype={constructor:Ri,type:"image",brush:function(t,e){var n,i,o,a,r,s,l,u=this.style,h=u.image,e=(u.bind(t,this,e),this._image=Un(h,this._image,this,this.onload));e&&qn(e)&&(h=u.x||0,n=u.y||0,i=u.width,o=u.height,s=e.width/e.height,null==i&&null!=o?i=o*s:null==o&&null!=i?o=i/s:null==i&&null==o&&(i=e.width,o=e.height),this.setTransform(t),u.sWidth&&u.sHeight?(a=u.sx||0,r=u.sy||0,t.drawImage(e,a,r,u.sWidth,u.sHeight,h,n,i,o)):u.sx&&u.sy?(s=i-(a=u.sx),l=o-(r=u.sy),t.drawImage(e,a,r,s,l,h,n,i,o)):t.drawImage(e,h,n,i,o),null!=u.text)&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))},getBoundingRect:function(){var t=this.style;return this._rect||(this._rect=new z(t.x||0,t.y||0,t.width||0,t.height||0)),this._rect}},a(Ri,zi);var Bi=314159;function Vi(t){return parseInt(t,10)}var Gi=new z(0,0,0,0),Fi=new z(0,0,0,0);function Wi(t,e,n){this.type="canvas";var i,o=!t.nodeName||"CANVAS"===t.nodeName.toUpperCase();this._opts=n=O({},n||{}),this.dpr=n.devicePixelRatio||cn,this._singleCanvas=o;(a=(this.root=t).style)&&(a["-webkit-tap-highlight-color"]="transparent",a["-webkit-user-select"]=a["user-select"]=a["-webkit-touch-callout"]="none",t.innerHTML=""),this.storage=e;var a=this._zlevelList=[],e=this._layers={};this._layerConfig={},this._needsManuallyCompositing=!1,o?(o=t.width,i=t.height,null!=n.width&&(o=n.width),null!=n.height&&(i=n.height),this.dpr=n.devicePixelRatio||1,t.width=o*this.dpr,t.height=i*this.dpr,this._width=o,this._height=i,(n=new Zn(t,this,this.dpr)).__builtin__=!0,n.initContext(),(e[Bi]=n).zlevel=Bi,a.push(Bi),this._domRoot=t):(this._width=this._getSize(0),this._height=this._getSize(1),n=this._domRoot=(o=this._width,i=this._height,(e=document.createElement("div")).style.cssText=["position:relative","overflow:hidden","width:"+o+"px","height:"+i+"px","padding:0","margin:0","border-width:0"].join(";")+";",e),t.appendChild(n)),this._hoverlayer=null,this._hoverElements=[]}function Hi(t){this.stage=(t=t||{}).stage||{},this.onframe=t.onframe||function(){},this._clips=[],this._running=!1,this._time,this._pausedTime,this._pauseStart,this._paused=!1,Wt.call(this)}Wi.prototype={constructor:Wi,getType:function(){return"canvas"},isSingleCanvas:function(){return this._singleCanvas},getViewportRoot:function(){return this._domRoot},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(t){var e=this.storage.getDisplayList(!0),n=this._zlevelList;this._redrawId=Math.random(),this._paintList(e,t,this._redrawId);for(var i=0;i<n.length;i++){var o,a=n[i],a=this._layers[a];!a.__builtin__&&a.refresh&&(o=0===i?this._backgroundColor:null,a.refresh(o))}return this.refreshHover(),this},addHover:function(t,e){var n;if(!t.__hoverMir)return((n=new t.constructor({style:t.style,shape:t.shape,z:t.z,z2:t.z2,silent:t.silent})).__from=t).__hoverMir=n,e&&n.setStyle(e),this._hoverElements.push(n),n},removeHover:function(t){var e=t.__hoverMir,n=this._hoverElements,e=S(n,e);0<=e&&n.splice(e,1),t.__hoverMir=null},clearHover:function(t){for(var e=this._hoverElements,n=0;n<e.length;n++){var i=e[n].__from;i&&(i.__hoverMir=null)}e.length=0},refreshHover:function(){var t=this._hoverElements,e=t.length;if((n=this._hoverlayer)&&n.clear(),e){Cn(t,this.storage.displayableSortFunc);var n,i={};(n=n||(this._hoverlayer=this.getLayer(1e5))).ctx.save();for(var o=0;o<e;){var a=t[o],r=a.__from;r&&r.__zr?(o++,r.invisible||(a.transform=r.transform,a.invTransform=r.invTransform,a.__clipPaths=r.__clipPaths,this._doPaintEl(a,n,!0,i))):(t.splice(o,1),r.__hoverMir=null,e--)}n.ctx.restore()}},getHoverLayer:function(){return this.getLayer(1e5)},_paintList:function(t,e,n){var i,o;this._redrawId===n&&(e=e||!1,this._updateLayerStatus(t),i=this._doPaintList(t,e),this._needsManuallyCompositing&&this._compositeManually(),i||(o=this,Xn(function(){o._paintList(t,e,n)})))},_compositeManually:function(){var e=this.getLayer(Bi).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)})},_doPaintList:function(t,e){for(var n=[],i=0;i<this._zlevelList.length;i++){var o=this._zlevelList[i];(s=this._layers[o]).__builtin__&&s!==this._hoverlayer&&(s.__dirty||e)&&n.push(s)}for(var a=!0,r=0;r<n.length;r++){var s,l,u=(s=n[r]).ctx,h={},c=(u.save(),e?s.__startIndex:s.__drawIndex),d=!e&&s.incremental&&Date.now,p=d&&Date.now(),g=s.zlevel===this._zlevelList[0]?this._backgroundColor:null;s.__startIndex!==s.__endIndex&&(c!==s.__startIndex||(l=t[c]).incremental&&l.notClear&&!e)||s.clear(!1,g),-1===c&&(console.error("For some unknown reason. drawIndex is -1"),c=s.__startIndex);for(var f=c;f<s.__endIndex;f++){var m=t[f];if(this._doPaintEl(m,s,e,h),m.__dirty=m.__dirtyText=!1,d&&15<Date.now()-p)break}s.__drawIndex=f,s.__drawIndex<s.__endIndex&&(a=!1),h.prevElClipPaths&&u.restore(),u.restore()}return y.wxa&&Z(this._layers,function(t){t&&t.ctx&&t.ctx.draw&&t.ctx.draw()}),a},_doPaintEl:function(t,e,n,i){var o,a=e.ctx,r=t.transform;if((e.__dirty||n)&&!t.invisible&&0!==t.style.opacity&&(!r||r[0]||r[3])&&(!t.culling||(n=t,r=this._width,o=this._height,Gi.copy(n.getBoundingRect()),n.transform&&Gi.applyTransform(n.transform),Fi.width=r,Fi.height=o,Gi.intersect(Fi)))){n=t.__clipPaths;if(!i.prevElClipPaths||function(t,e){if(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}}(n,i.prevElClipPaths)){i.prevElClipPaths&&(e.ctx.restore(),i.prevElClipPaths=null,i.prevEl=null);if(n){a.save();{var s=n;var l=a;for(var u=0;u<s.length;u++){var h=s[u];h.setTransform(l),l.beginPath(),h.buildPath(l,h.shape),l.clip(),h.restoreTransform(l)}}i.prevElClipPaths=n}}t.beforeBrush&&t.beforeBrush(a),t.brush(a,i.prevEl||null),(i.prevEl=t).afterBrush&&t.afterBrush(a)}},getLayer:function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=Bi);var n=this._layers[t];return n||((n=new Zn("zr_"+t,this,this.dpr)).zlevel=t,n.__builtin__=!0,this._layerConfig[t]&&f(n,this._layerConfig[t],!0),e&&(n.virtual=e),this.insertLayer(t,n),n.initContext()),n},insertLayer:function(t,e){var n,i=this._layers,o=this._zlevelList,a=o.length,r=null,s=-1,l=this._domRoot;if(!i[t]&&(n=e)&&(n.__builtin__||"function"==typeof n.resize&&"function"==typeof n.refresh)){if(0<a&&t>o[0]){for(s=0;s<a-1&&!(o[s]<t&&o[s+1]>t);s++);r=i[o[s]]}o.splice(s+1,0,t),(i[t]=e).virtual||(r?(n=r.dom).nextSibling?l.insertBefore(e.dom,n.nextSibling):l.appendChild(e.dom):l.firstChild?l.insertBefore(e.dom,l.firstChild):l.appendChild(e.dom))}},eachLayer:function(t,e){for(var n,i=this._zlevelList,o=0;o<i.length;o++)n=i[o],t.call(e,this._layers[n],n)},eachBuiltinLayer:function(t,e){for(var n,i,o=this._zlevelList,a=0;a<o.length;a++)i=o[a],(n=this._layers[i]).__builtin__&&t.call(e,n,i)},eachOtherLayer:function(t,e){for(var n,i,o=this._zlevelList,a=0;a<o.length;a++)i=o[a],(n=this._layers[i]).__builtin__||t.call(e,n,i)},getLayers:function(){return this._layers},_updateLayerStatus:function(t){function e(t){i&&(i.__endIndex!==t&&(i.__dirty=!0),i.__endIndex=t)}if(this.eachBuiltinLayer(function(t,e){t.__dirty=t.__used=!1}),this._singleCanvas)for(var n=1;n<t.length;n++)if((a=t[n]).zlevel!==t[n-1].zlevel||a.incremental){this._needsManuallyCompositing=!0;break}for(var i=null,o=0,n=0;n<t.length;n++){var a,r,s=(a=t[n]).zlevel;a.incremental?((r=this.getLayer(s+.001,this._needsManuallyCompositing)).incremental=!0,o=1):r=this.getLayer(s+(0<o?.01:0),this._needsManuallyCompositing),r.__builtin__||r.id,r!==i&&(r.__used=!0,r.__startIndex!==n&&(r.__dirty=!0),r.__startIndex=n,r.incremental?r.__drawIndex=-1:r.__drawIndex=n,e(n),i=r),a.__dirty&&(r.__dirty=!0,r.incremental)&&r.__drawIndex<0&&(r.__drawIndex=n)}e(n),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)})},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},setBackgroundColor:function(t){this._backgroundColor=t},configLayer:function(t,e){if(e){var n=this._layerConfig;n[t]?f(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||f(this._layers[o],n[t],!0)}}},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(S(n,t),1))},resize:function(e,n){if(this._domRoot.style){var t=this._domRoot,i=(t.style.display="none",this._opts);if(null!=e&&(i.width=e),null!=n&&(i.height=n),e=this._getSize(0),n=this._getSize(1),t.style.display="",this._width!==e||n!==this._height){for(var o in t.style.width=e+"px",t.style.height=n+"px",this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(e,n);Z(this._progressiveLayers,function(t){t.resize(e,n)}),this.refresh(!0)}this._width=e,this._height=n}else{if(null==e||null==n)return;this._width=e,this._height=n,this.getLayer(Bi).resize(e,n)}return this},clearLayer:function(t){t=this._layers[t];t&&t.clear()},dispose:function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},getRenderedCanvas:function(t){if(this._singleCanvas&&!this._compositeManually)return this._layers[Bi].dom;var e=new Zn("image",this,(t=t||{}).pixelRatio||this.dpr);if(e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor),t.pixelRatio<=this.dpr){this.refresh();var n=e.dom.width,i=e.dom.height,o=e.ctx;this.eachLayer(function(t){t.__builtin__?o.drawImage(t.dom,0,0,n,i):t.renderToCanvas&&(e.ctx.save(),t.renderToCanvas(e.ctx),e.ctx.restore())})}else for(var a={},r=this.storage.getDisplayList(!0),s=0;s<r.length;s++){var l=r[s];this._doPaintEl(l,e,!0,a)}return e.dom},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e,n=this._opts,i=["width","height"][t],o=["clientWidth","clientHeight"][t],a=["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]||Vi(e[i])||Vi(n.style[i]))-(Vi(e[a])||0)-(Vi(e[t])||0)|0)},pathToImage:function(t,e){e=e||this.dpr;var n=document.createElement("canvas"),i=n.getContext("2d"),o=t.getBoundingRect(),a=t.style,r=a.shadowBlur*e,s=a.shadowOffsetX*e,l=a.shadowOffsetY*e,a=a.hasStroke()?a.lineWidth:0,u=Math.max(a/2,r-s),s=Math.max(a/2,s+r),h=Math.max(a/2,r-l),a=Math.max(a/2,l+r),l=o.width+u+s,r=o.height+h+a,s=(n.width=l*e,n.height=r*e,i.scale(e,e),i.clearRect(0,0,l,r),i.dpr=e,{position:t.position,rotation:t.rotation,scale:t.scale}),a=(t.position=[u-o.x,h-o.y],t.rotation=0,t.scale=[1,1],t.updateTransform(),t&&t.brush(i),new Ri({style:{x:0,y:0,image:n}}));return null!=s.position&&(a.position=t.position=s.position),null!=s.rotation&&(a.rotation=t.rotation=s.rotation),null!=s.scale&&(a.scale=t.scale=s.scale),a}},Hi.prototype={constructor:Hi,addClip:function(t){this._clips.push(t)},addAnimator:function(t){t.animation=this;for(var e=t.getClips(),n=0;n<e.length;n++)this.addClip(e[n])},removeClip:function(t){t=S(this._clips,t);0<=t&&this._clips.splice(t,1)},removeAnimator:function(t){for(var e=t.getClips(),n=0;n<e.length;n++)this.removeClip(e[n]);t.animation=null},_update:function(){for(var t=(new Date).getTime()-this._pausedTime,e=t-this._time,n=this._clips,i=n.length,o=[],a=[],r=0;r<i;r++){var s=n[r],l=s.step(t,e);l&&(o.push(l),a.push(s))}for(r=0;r<i;)n[r]._needsRemove?(n[r]=n[i-1],n.pop(),i--):r++;for(i=o.length,r=0;r<i;r++)a[r].fire(o[r]);this._time=t,this.onframe(e),this.trigger("frame",e),this.stage.update&&this.stage.update()},_startLoop:function(){var e=this;this._running=!0,Xn(function t(){e._running&&(Xn(t),!e._paused)&&e._update()})},start:function(){this._time=(new Date).getTime(),this._pausedTime=0,this._startLoop()},stop:function(){this._running=!1},pause:function(){this._paused||(this._pauseStart=(new Date).getTime(),this._paused=!0)},resume:function(){this._paused&&(this._pausedTime+=(new Date).getTime()-this._pauseStart,this._paused=!1)},clear:function(){this._clips=[]},isFinished:function(){return!this._clips.length},animate:function(t,e){t=new ln(t,(e=e||{}).loop,e.getter,e.setter);return this.addAnimator(t),t}},i(Hi,Wt);var Zi=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Xi=["touchstart","touchend","touchmove"],Yi={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},Ui=I(Zi,function(t){var e=t.replace("mouse","pointer");return Yi[e]?e:t});function ji(t){return"mousewheel"===t&&y.browser.firefox?"DOMMouseScroll":t}function qi(t){t._touching=!0,clearTimeout(t._touchTimer),t._touchTimer=setTimeout(function(){t._touching=!1},700)}var Ki={mousemove:function(t){t=qt(this.dom,t),this.trigger("mousemove",t)},mouseout:function(t){var e=(t=qt(this.dom,t)).toElement||t.relatedTarget;if(e!==this.dom)for(;e&&9!==e.nodeType;){if(e===this.dom)return;e=e.parentNode}this.trigger("mouseout",t)},touchstart:function(t){(t=qt(this.dom,t)).zrByTouch=!0,this._lastTouchMoment=new Date,this.handler.processGesture(this,t,"start"),Ki.mousemove.call(this,t),Ki.mousedown.call(this,t),qi(this)},touchmove:function(t){(t=qt(this.dom,t)).zrByTouch=!0,this.handler.processGesture(this,t,"change"),Ki.mousemove.call(this,t),qi(this)},touchend:function(t){(t=qt(this.dom,t)).zrByTouch=!0,this.handler.processGesture(this,t,"end"),Ki.mouseup.call(this,t),+new Date-this._lastTouchMoment<300&&Ki.click.call(this,t),qi(this)},pointerdown:function(t){Ki.mousedown.call(this,t)},pointermove:function(t){$i(t)||Ki.mousemove.call(this,t)},pointerup:function(t){Ki.mouseup.call(this,t)},pointerout:function(t){$i(t)||Ki.mouseout.call(this,t)}};function $i(t){t=t.pointerType;return"pen"===t||"touch"===t}function Ji(i){Z(Xi,function(t){i._handlers[t]=A(Ki[t],i)}),Z(Ui,function(t){i._handlers[t]=A(Ki[t],i)}),Z(Zi,function(t){var e,n;i._handlers[t]=(e=Ki[t],n=i,function(){if(!n._touching)return e.apply(n,arguments)})})}function Qi(n){function t(t,e){Z(t,function(t){Kt(n,ji(t),e._handlers[t])},e)}Wt.call(this),this.dom=n,this._touching=!1,this._touchTimer,this._handlers={},Ji(this),y.pointerEventsSupported?t(Ui,this):(y.touchEventsSupported&&t(Xi,this),t(Zi,this))}Z(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(e){Ki[e]=function(t){t=qt(this.dom,t),this.trigger(e,t)}});var hn=Qi.prototype,to=(hn.dispose=function(){for(var t,e,n=Zi.concat(Xi),i=0;i<n.length;i++){var o=n[i];t=this.dom,e=ji(o),o=this._handlers[o],Xt?t.removeEventListener(e,o):t.detachEvent("on"+e,o)}},hn.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},i(Qi,Wt),!y.canvasSupported),eo={canvas:Wi},no={},io="4.0.7";function oo(t,e){t=new ao(d++,t,e);return no[t.id]=t}function ao(t,e,n){n=n||{},this.dom=e,this.id=t;var i=this,o=new kn,a=n.renderer;if(to){if(!eo.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");a="vml"}else a&&eo[a]||(a="canvas");var a=new eo[a](e,o,n,t),e=(this.storage=o,this.painter=a,y.node||y.worker?null:new Qi(a.getViewportRoot())),r=(this.handler=new oe(o,a,e,a.root),this.animation=new Hi({stage:{update:A(this.flush,this)}}),this.animation.start(),this._needsRefresh,o.delFromStorage),s=o.addToStorage;o.delFromStorage=function(t){r.call(o,t),t&&t.removeSelfFromZr(i)},o.addToStorage=function(t){s.call(o,t),t.addSelfToZr(i)}}ao.prototype={constructor:ao,getId:function(){return this.id},add:function(t){this.storage.addRoot(t),this._needsRefresh=!0},remove:function(t){this.storage.delRoot(t),this._needsRefresh=!0},configLayer:function(t,e){this.painter.configLayer&&this.painter.configLayer(t,e),this._needsRefresh=!0},setBackgroundColor:function(t){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this._needsRefresh=!0},refreshImmediately:function(){this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1},refresh:function(){this._needsRefresh=!0},flush:function(){var t;this._needsRefresh&&(t=!0,this.refreshImmediately()),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately()),t&&this.trigger("rendered")},addHover:function(t,e){if(this.painter.addHover)return t=this.painter.addHover(t,e),this.refreshHover(),t},removeHover:function(t){this.painter.removeHover&&(this.painter.removeHover(t),this.refreshHover())},clearHover:function(){this.painter.clearHover&&(this.painter.clearHover(),this.refreshHover())},refreshHover:function(){this._needsRefreshHover=!0},refreshHoverImmediately:function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.refreshHover()},resize:function(t){this.painter.resize((t=t||{}).width,t.height),this.handler.resize()},clearAnimation:function(){this.animation.clear()},getWidth:function(){return this.painter.getWidth()},getHeight:function(){return this.painter.getHeight()},pathToImage:function(t,e){return this.painter.pathToImage(t,e)},setCursorStyle:function(t){this.handler.setCursorStyle(t)},findHover:function(t,e){return this.handler.findHover(t,e)},on:function(t,e,n){this.handler.on(t,e,n)},off:function(t,e){this.handler.off(t,e)},trigger:function(t,e){this.handler.trigger(t,e)},clear:function(){this.storage.delRoot(),this.painter.clear()},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 no[t]}};var hn=Object.freeze({__proto__:null,dispose:function(t){if(t)t.dispose();else{for(var e in no)no.hasOwnProperty(e)&&no[e].dispose();no={}}return this},getInstance:function(t){return no[t]},init:oo,registerPainter:function(t,e){eo[t]=e},version:io}),ro=Z,so=k,lo=D,uo="series\0";function ho(t){return t instanceof Array?t:null==t?[]:[t]}function co(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 a=n[i];!t.emphasis[e].hasOwnProperty(a)&&t[e].hasOwnProperty(a)&&(t.emphasis[e][a]=t[e][a])}}}var po=["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 go(t){return!so(t)||lo(t)||t instanceof Date?t:t.value}function fo(t,o){o=(o||[]).slice();var a=I(t||[],function(t,e){return{exist:t}});return ro(o,function(t,e){if(so(t)){for(var n=0;n<a.length;n++)if(!a[n].option&&null!=t.id&&a[n].exist.id===t.id+"")return a[n].option=t,void(o[e]=null);for(n=0;n<a.length;n++){var i=a[n].exist;if(!(a[n].option||null!=i.id&&null!=t.id||null==t.name||vo(t)||vo(i)||i.name!==t.name+""))return a[n].option=t,void(o[e]=null)}}}),ro(o,function(t,e){if(so(t)){for(var n=0;n<a.length;n++){var i=a[n].exist;if(!a[n].option&&!vo(i)&&null==t.id){a[n].option=t;break}}n>=a.length&&a.push({option:t})}}),a}function mo(t){var r=E();ro(t,function(t,e){var n=t.exist;n&&r.set(n.id,t)}),ro(t,function(t,e){var n=t.option;P(!n||null==n.id||!r.get(n.id)||r.get(n.id)===t,"id duplicates: "+(n&&n.id)),n&&null!=n.id&&r.set(n.id,t),t.keyInfo||(t.keyInfo={})}),ro(t,function(t,e){var n=t.exist,i=t.option,o=t.keyInfo;if(so(i)){if(o.name=null!=i.name?i.name+"":n?n.name:uo+e,n)o.id=n.id;else if(null!=i.id)o.id=i.id+"";else for(var a=0;o.id="\0"+o.name+"\0"+a++,r.get(o.id););r.set(o.id,t)}})}function yo(t){t=t.name;return t&&t.indexOf(uo)}function vo(t){return so(t)&&t.id&&0===(t.id+"").indexOf("\0_ec_\0")}function xo(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?D(t.dataIndex)?I(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex):null!=t.name?D(t.name)?I(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name):void 0}function _o(){var e="__\0ec_inner_"+wo+++"_"+Math.random().toFixed(5);return function(t){return t[e]||(t[e]={})}}var wo=0;function bo(a,r,s){T(r)&&((t={})[r+"Index"]=0,r=t);var t=s&&s.defaultMainType,l=(!t||So(r,t+"Index")||So(r,t+"Id")||So(r,t+"Name")||(r[t+"Index"]=0),{});return ro(r,function(t,e){var n,i,o;t=r[e],"dataIndex"!==e&&"dataIndexInside"!==e?(n=(o=e.match(/^(\w+)(Index|Id|Name)$/)||[])[1],o=(o[2]||"").toLowerCase(),!n||!o||null==t||"index"===o&&"none"===t||s&&s.includeMainTypes&&S(s.includeMainTypes,n)<0||(i={mainType:n},"index"===o&&"all"===t||(i[o]=t),o=a.queryComponents(i),l[n+"Models"]=o,l[n+"Model"]=o[0])):l[e]=t}),l}function So(t,e){return t&&t.hasOwnProperty(e)}function Mo(t,e,n){t.setAttribute?t.setAttribute(e,n):t[e]=n}function Io(t){return"auto"===t?y.domSupported?"html":"richText":t||"html"}function To(t,n){var i=E(),o=[];return Z(t,function(t){var e=n(t);(i.get(e)||(o.push(e),i.set(e,[]))).push(t)}),{keys:o,buckets:i}}var Ao=".",Do="___EC__COMPONENT__CONTAINER___";function Co(t){var e={main:"",sub:""};return t&&(t=t.split(Ao),e.main=t[0]||"",e.sub=t[1]||""),e}function Lo(t,i){(t.$constructor=t).extend=function(e){H&&Z(i,function(t){e[t]||console.warn("Method `"+t+"` should be implemented"+(e.type?" in "+e.type:"")+".")});function t(){(e.$constructor||n).apply(this,arguments)}var n=this;return O(t.prototype,e),t.extend=this.extend,t.superCall=No,t.superApply=Oo,a(t,this),t.superClass=n,t}}var ko=0;function Po(t){var e=["__\0is_clz",ko++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,H&&P(!t.isInstance,'The method "is" can not be defined.'),t.isInstance=function(t){return!(!t||!t[e])}}function No(t,e){var n=ut(arguments,2);return this.superClass.prototype[e].apply(t,n)}function Oo(t,e,n){return this.superClass.prototype[e].apply(t,n)}function Eo(n,t){t=t||{};var i,o={};n.registerClass=function(t,e){var n,i;return e&&(i=e,P(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(i),'componentType "'+i+'" illegal'),(e=Co(e)).sub?e.sub!==Do&&((n=o[(i=e).main])&&n[Do]||((n=o[i.main]={})[Do]=!0),n[e.sub]=t):(H&&o[e.main]&&console.warn(e.main+" exists."),o[e.main]=t)),t},n.getClass=function(t,e,n){var i=o[t];if(i&&i[Do]&&(i=e?i[e]:null),n&&!i)throw new Error(e?"Component "+t+"."+(e||"")+" not exists. Load it first.":t+".type should be specified.");return i},n.getClassesByMainType=function(t){t=Co(t);var n=[],t=o[t.main];return t&&t[Do]?Z(t,function(t,e){e!==Do&&n.push(t)}):n.push(t),n},n.hasClass=function(t){return t=Co(t),!!o[t.main]},n.getAllClassMainTypes=function(){var n=[];return Z(o,function(t,e){n.push(e)}),n},n.hasSubTypes=function(t){t=Co(t);t=o[t.main];return t&&t[Do]},n.parseClassType=Co,t.registerWhenExtend&&(i=n.extend)&&(n.extend=function(t){var e=i.call(this,t);return n.registerClass(e,t.type)})}function zo(r){for(var t=0;t<r.length;t++)r[t][1]||(r[t][1]=r[t][0]);return function(t,e,n){for(var i={},o=0;o<r.length;o++){var a=r[o][1];e&&0<=S(e,a)||n&&S(n,a)<0||null!=(a=t.getShallow(a))&&(i[r[o][0]]=a)}return i}}var Ro=zo([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Bo={getLineStyle:function(t){var t=Ro(this,t),e=this.getLineDash(t.lineWidth);return e&&(t.lineDash=e),t},getLineDash:function(t){null==t&&(t=1);var e=this.get("type"),n=Math.max(t,2),t=4*t;return"solid"===e||null==e?null:"dashed"===e?[t,t]:[n,n]}},Vo=zo([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),Go={getAreaStyle:function(t,e){return Vo(this,t,e)}},Fo=Math.pow,Wo=Math.sqrt,Ho=1e-8,Zo=1e-4,Xo=Wo(3),Yo=_t(),Uo=_t(),jo=_t();function qo(t){return-Ho<t&&t<Ho}function Ko(t){return Ho<t||t<-Ho}function $o(t,e,n,i,o){var a=1-o;return a*a*(a*t+3*o*e)+o*o*(o*i+3*a*n)}function Jo(t,e,n,i,o){var a=1-o;return 3*(((e-t)*a+2*(n-e)*o)*a+(i-n)*o*o)}function Qo(t,e,n,i,o){var a,r=6*n-12*e+6*t,i=9*e+3*i-3*t-9*n,n=3*e-3*t,e=0;return qo(i)?Ko(r)&&0<=(a=-n/r)&&a<=1&&(o[e++]=a):qo(t=r*r-4*i*n)?o[0]=-r/(2*i):0<t&&(t=(-r-(n=Wo(t)))/(2*i),0<=(a=(-r+n)/(2*i))&&a<=1&&(o[e++]=a),0<=t)&&t<=1&&(o[e++]=t),e}function ta(t,e,n,i,o,a){var r=(e-t)*o+t,e=(n-e)*o+e,n=(i-n)*o+n,s=(e-r)*o+r,e=(n-e)*o+e,o=(e-s)*o+s;a[0]=t,a[1]=r,a[2]=s,a[3]=o,a[4]=o,a[5]=e,a[6]=n,a[7]=i}function ea(t,e,n,i){var o=1-i;return o*(o*t+2*i*e)+i*i*n}function na(t,e,n,i){return 2*((1-i)*(e-t)+i*(n-e))}function ia(t,e,n){n=t+n-2*e;return 0==n?.5:(t-e)/n}function oa(t,e,n,i,o){var a=(e-t)*i+t,e=(n-e)*i+e,i=(e-a)*i+a;o[0]=t,o[1]=a,o[2]=i,o[3]=i,o[4]=e,o[5]=n}var aa=Math.min,ra=Math.max,sa=Math.sin,la=Math.cos,ua=2*Math.PI,ha=_t(),ca=_t(),da=_t();function pa(t,e,n){if(0!==t.length){for(var i=t[0],o=i[0],a=i[0],r=i[1],s=i[1],l=1;l<t.length;l++)i=t[l],o=aa(o,i[0]),a=ra(a,i[0]),r=aa(r,i[1]),s=ra(s,i[1]);e[0]=o,e[1]=r,n[0]=a,n[1]=s}}function ga(t,e,n,i,o,a){o[0]=aa(t,n),o[1]=aa(e,i),a[0]=ra(t,n),a[1]=ra(e,i)}var fa=[],ma=[];function ya(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null}var va={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},xa=[],_a=[],wa=[],ba=[],Sa=Math.min,Ma=Math.max,Ia=Math.cos,Ta=Math.sin,Aa=Math.sqrt,Da=Math.abs,Ca="undefined"!=typeof Float32Array;function La(t,e,n,i,o,a,r){var s;if(0!==o)return s=0,!(e+(o=o)<r&&i+o<r||r<e-o&&r<i-o||t+o<a&&n+o<a||a<t-o&&a<n-o)&&(t===n?Math.abs(a-t)<=o/2:(a=(s=(e-i)/(t-n))*a-r+(t*i-n*e)/(t-n))*a/(s*s+1)<=o/2*o/2)}function ka(t,e,n,i,o,a,r,s,l,u,h){if(0!==l)return!(e+(l=l)<h&&i+l<h&&a+l<h&&s+l<h||h<e-l&&h<i-l&&h<a-l&&h<s-l||t+l<u&&n+l<u&&o+l<u&&r+l<u||u<t-l&&u<n-l&&u<o-l&&u<r-l)&&function(t,e,n,i,o,a,r,s,l,u,h){var c,d,p,g,f=.005,m=1/0;Yo[0]=l,Yo[1]=u;for(var y=0;y<1;y+=.05)Uo[0]=$o(t,n,o,r,y),Uo[1]=$o(e,i,a,s,y),(p=Ot(Yo,Uo))<m&&(c=y,m=p);for(var m=1/0,v=0;v<32&&!(f<Zo);v++)d=c+f,Uo[0]=$o(t,n,o,r,g=c-f),Uo[1]=$o(e,i,a,s,g),p=Ot(Uo,Yo),0<=g&&p<m?(c=g,m=p):(jo[0]=$o(t,n,o,r,d),jo[1]=$o(e,i,a,s,d),g=Ot(jo,Yo),d<=1&&g<m?(c=d,m=g):f*=.5);return h&&(h[0]=$o(t,n,o,r,c),h[1]=$o(e,i,a,s,c)),Wo(m)}(t,e,n,i,o,a,r,s,u,h,null)<=l/2}function Pa(t,e,n,i,o,a,r,s,l){if(0!==r)return!(e+(r=r)<l&&i+r<l&&a+r<l||l<e-r&&l<i-r&&l<a-r||t+r<s&&n+r<s&&o+r<s||s<t-r&&s<n-r&&s<o-r)&&function(t,e,n,i,o,a,r,s,l){var u,h=.005,c=1/0;Yo[0]=r,Yo[1]=s;for(var d=0;d<1;d+=.05)Uo[0]=ea(t,n,o,d),Uo[1]=ea(e,i,a,d),(m=Ot(Yo,Uo))<c&&(u=d,c=m);for(var c=1/0,p=0;p<32&&!(h<Zo);p++){var g=u-h,f=u+h,m=(Uo[0]=ea(t,n,o,g),Uo[1]=ea(e,i,a,g),Ot(Uo,Yo));0<=g&&m<c?(u=g,c=m):(jo[0]=ea(t,n,o,f),jo[1]=ea(e,i,a,f),g=Ot(jo,Yo),f<=1&&g<c?(u=f,c=g):h*=.5)}return l&&(l[0]=ea(t,n,o,u),l[1]=ea(e,i,a,u)),Wo(c)}(t,e,n,i,o,a,s,l,null)<=r/2}ya.prototype={constructor:ya,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(t,e){this._ux=Da(1/cn/t)||0,this._uy=Da(1/cn/e)||0},getContext:function(){return this._ctx},beginPath:function(t){return(this._ctx=t)&&t.beginPath(),t&&(this.dpr=t.dpr),this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},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},lineTo:function(t,e){var n=Da(t-this._xi)>this._ux||Da(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},bezierCurveTo:function(t,e,n,i,o,a){return this.addData(va.C,t,e,n,i,o,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,n,i,o,a):this._ctx.bezierCurveTo(t,e,n,i,o,a)),this._xi=o,this._yi=a,this},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},arc:function(t,e,n,i,o,a){return this.addData(va.A,t,e,n,n,i,o-i,0,a?0:1),this._ctx&&this._ctx.arc(t,e,n,i,o,a),this._xi=Ia(o)*n+t,this._yi=Ta(o)*n+e,this},arcTo:function(t,e,n,i,o){return this._ctx&&this._ctx.arcTo(t,e,n,i,o),this},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},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},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},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}return this},setLineDashOffset:function(t){return this._dashOffset=t,this},len:function(){return this._len},setData:function(t){var e=t.length;this.data&&this.data.length===e||!Ca||(this.data=new Float32Array(e));for(var n=0;n<e;n++)this.data[n]=t[n];this._len=e},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(Ca&&this.data instanceof Float32Array&&(this.data=new Float32Array(i+n)),o=0;o<e;o++)for(var a=t[o].data,r=0;r<a.length;r++)this.data[i++]=a[r];this._len=i},addData:function(t){if(this._saveData){var e=this.data;this._len+arguments.length>e.length&&(this._expandData(),e=this.data);for(var n=0;n<arguments.length;n++)e[this._len++]=arguments[n];this._prevCmd=t}},_expandData:function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e<this._len;e++)t[e]=this.data[e];this.data=t}},_needsDash:function(){return this._lineDash},_dashedLineTo:function(t,e){var n,i,o=this._dashSum,a=this._dashOffset,r=this._lineDash,s=this._ctx,l=this._xi,u=this._yi,h=t-l,c=e-u,d=Aa(h*h+c*c),p=l,g=u,f=r.length;for(a<0&&(a=o+a),p-=(a%=o)*(h/=d),g-=a*(c/=d);0<h&&p<=t||h<0&&t<=p||0===h&&(0<c&&g<=e||c<0&&e<=g);)p+=h*(n=r[i=this._dashIdx]),g+=c*n,this._dashIdx=(i+1)%f,0<h&&p<l||h<0&&l<p||0<c&&g<u||c<0&&u<g||s[i%2?"moveTo":"lineTo"]((0<=h?Sa:Ma)(p,t),(0<=c?Sa:Ma)(g,e));this._dashOffset=-Aa((h=p-t)*h+(c=g-e)*c)},_dashedBezierTo:function(t,e,n,i,o,a){var r,s,l,u,h,c=this._dashSum,d=this._dashOffset,p=this._lineDash,g=this._ctx,f=this._xi,m=this._yi,y=$o,v=0,x=this._dashIdx,_=p.length,w=0;for(d<0&&(d=c+d),d%=c,r=0;r<1;r+=.1)s=y(f,t,n,o,r+.1)-y(f,t,n,o,r),l=y(m,e,i,a,r+.1)-y(m,e,i,a,r),v+=Aa(s*s+l*l);for(;x<_&&!((w+=p[x])>d);x++);for(r=(w-d)/v;r<=1;)u=y(f,t,n,o,r),h=y(m,e,i,a,r),x%2?g.moveTo(u,h):g.lineTo(u,h),r+=p[x]/v,x=(x+1)%_;x%2!=0&&g.lineTo(o,a),this._dashOffset=-Aa((s=o-u)*s+(l=a-h)*l)},_dashedQuadraticTo:function(t,e,n,i){var o=n,a=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,a)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,Ca)&&(this.data=new Float32Array(t))},getBoundingRect:function(){xa[0]=xa[1]=wa[0]=wa[1]=Number.MAX_VALUE,_a[0]=_a[1]=ba[0]=ba[1]=-Number.MAX_VALUE;for(var t,e,n,i=this.data,o=0,a=0,r=0,s=0,l=0;l<i.length;){var u=i[l++];switch(1===l&&(r=o=i[l],s=a=i[l+1]),u){case va.M:o=r=i[l++],a=s=i[l++],wa[0]=r,wa[1]=s,ba[0]=r,ba[1]=s;break;case va.L:ga(o,a,i[l],i[l+1],wa,ba),o=i[l++],a=i[l++];break;case va.C:I=M=S=b=w=h=_=x=v=y=m=f=g=p=d=c=void 0;var h,c=o,d=a,p=i[l++],g=i[l++],f=i[l++],m=i[l++],y=i[l],v=i[l+1],x=wa,_=ba,w=Qo,b=$o,S=w(c,p,f,y,fa);for(x[0]=1/0,x[1]=1/0,_[0]=-1/0,_[1]=-1/0,h=0;h<S;h++){var M=b(c,p,f,y,fa[h]);x[0]=aa(M,x[0]),_[0]=ra(M,_[0])}for(S=w(d,g,m,v,ma),h=0;h<S;h++){var I=b(d,g,m,v,ma[h]);x[1]=aa(I,x[1]),_[1]=ra(I,_[1])}x[0]=aa(c,x[0]),_[0]=ra(c,_[0]),x[0]=aa(y,x[0]),_[0]=ra(y,_[0]),x[1]=aa(d,x[1]),_[1]=ra(d,_[1]),x[1]=aa(v,x[1]),_[1]=ra(v,_[1]),o=i[l++],a=i[l++];break;case va.Q:w=o,t=a,k=i[l++],A=i[l++],L=i[l],e=i[l+1],C=wa,P=ba,n=D=n=T=void 0,T=ea,n=ra(aa((D=ia)(w,k,L),1),0),D=ra(aa(D(t,A,e),1),0),k=T(w,k,L,n),n=T(t,A,e,D),C[0]=aa(w,L,k),C[1]=aa(t,e,n),P[0]=ra(w,L,k),P[1]=ra(t,e,n),o=i[l++],a=i[l++];break;case va.A:var T=i[l++],A=i[l++],D=i[l++],C=i[l++],L=i[l++],k=i[l++]+L,P=(l+=1,1-i[l++]);1===l&&(r=Ia(L)*D+T,s=Ta(L)*C+A),function(t,e,n,i,o,a,r,s,l){var u=Rt,h=Bt,c=Math.abs(o-a);if(c%ua<1e-4&&1e-4<c)return s[0]=t-n,s[1]=e-i,l[0]=t+n,l[1]=e+i;ha[0]=la(o)*n+t,ha[1]=sa(o)*i+e,ca[0]=la(a)*n+t,ca[1]=sa(a)*i+e,u(s,ha,ca),h(l,ha,ca),(o%=ua)<0&&(o+=ua),(a%=ua)<0&&(a+=ua),a<o&&!r?a+=ua:o<a&&r&&(o+=ua),r&&(c=a,a=o,o=c);for(var d=0;d<a;d+=Math.PI/2)o<d&&(da[0]=la(d)*n+t,da[1]=sa(d)*i+e,u(s,da,s),h(l,da,l))}(T,A,D,C,L,k,P,wa,ba),o=Ia(k)*D+T,a=Ta(k)*C+A;break;case va.R:ga(r=o=i[l++],s=a=i[l++],r+i[l++],s+i[l++],wa,ba);break;case va.Z:o=r,a=s}Rt(xa,xa,wa),Bt(_a,_a,ba)}return 0===l&&(xa[0]=xa[1]=_a[0]=_a[1]=0),new z(xa[0],xa[1],_a[0]-xa[0],_a[1]-xa[1])},rebuildPath:function(t){for(var e,n,i,o,a=this.data,r=this._ux,s=this._uy,l=this._len,u=0;u<l;){var h=a[u++];switch(1===u&&(e=i=a[u],n=o=a[u+1]),h){case va.M:e=i=a[u++],n=o=a[u++],t.moveTo(i,o);break;case va.L:c=a[u++],d=a[u++],(Da(c-i)>r||Da(d-o)>s||u===l-1)&&(t.lineTo(c,d),i=c,o=d);break;case va.C:t.bezierCurveTo(a[u++],a[u++],a[u++],a[u++],a[u++],a[u++]),i=a[u-2],o=a[u-1];break;case va.Q:t.quadraticCurveTo(a[u++],a[u++],a[u++],a[u++]),i=a[u-2],o=a[u-1];break;case va.A:var c=a[u++],d=a[u++],p=a[u++],g=a[u++],f=a[u++],m=a[u++],y=a[u++],v=a[u++],x=g<p?p:g,_=g<p?1:p/g,w=g<p?g/p:1,m=f+m;.001<Math.abs(p-g)?(t.translate(c,d),t.rotate(y),t.scale(_,w),t.arc(0,0,x,f,m,1-v),t.scale(1/_,1/w),t.rotate(-y),t.translate(-c,-d)):t.arc(c,d,x,f,m,1-v),1===u&&(e=Ia(f)*p+c,n=Ta(f)*g+d),i=Ia(m)*p+c,o=Ta(m)*g+d;break;case va.R:e=i=a[u],n=o=a[u+1],t.rect(a[u++],a[u++],a[u++],a[u++]);break;case va.Z:t.closePath(),i=e,o=n}}}},ya.CMD=va;var Na=2*Math.PI;function Oa(t){return(t%=Na)<0&&(t+=Na),t}var Ea=2*Math.PI;function za(t,e,n,i,o,a){var r;return e<a&&i<a||a<e&&a<i||i===e?0:(r=i<e?1:-1,1!=(a=(a-e)/(i-e))&&0!=a||(r=i<e?.5:-.5),(i=a*(n-t)+t)===o?1/0:o<i?r:0)}var Ra=ya.CMD,Ba=2*Math.PI,Va=1e-4;var Ga=[-1,-1,-1],Fa=[-1,-1];function Wa(t,e,n,i,o,a,r,s,l,u){if(e<u&&i<u&&a<u&&s<u||u<e&&u<i&&u<a&&u<s)return 0;g=Ga,p=(p=s)+3*((c=i)-(d=a))-(h=e),y=(d=3*(d-2*c+h))*(c=3*(c-h))-9*p*(h=h-(u=u)),h=c*c-3*d*h,v=0,qo(u=d*d-3*p*c)&&qo(y)?qo(d)?g[0]=0:0<=(m=-c/d)&&m<=1&&(g[v++]=m):qo(c=y*y-4*u*h)?(f=-(h=y/u)/2,0<=(m=-d/p+h)&&m<=1&&(g[v++]=m),0<=f&&f<=1&&(g[v++]=f)):0<c?(c=u*d+1.5*p*(-y-(h=Wo(c))),0<=(m=(-d-((h=(h=u*d+1.5*p*(-y+h))<0?-Fo(-h,1/3):Fo(h,1/3))+(c=c<0?-Fo(-c,1/3):Fo(c,1/3))))/(3*p))&&m<=1&&(g[v++]=m)):(h=(2*u*d-3*p*y)/(2*Wo(u*u*u)),c=Math.acos(h)/3,m=(-d-2*(y=Wo(u))*(h=Math.cos(c)))/(3*p),f=(-d+y*(h+Xo*Math.sin(c)))/(3*p),u=(-d+y*(h-Xo*Math.sin(c)))/(3*p),0<=m&&m<=1&&(g[v++]=m),0<=f&&f<=1&&(g[v++]=f),0<=u&&u<=1&&(g[v++]=u));var h,c,d,p,g,f,m,y,v,x=v;if(0===x)return 0;for(var _,w,b=0,S=-1,M=0;M<x;M++){var I=Ga[M],T=0===I||1===I?.5:1;$o(t,n,o,r,I)<l||(S<0&&(S=Qo(e,i,a,s,Fa),Fa[1]<Fa[0]&&1<S&&(w=void 0,w=Fa[0],Fa[0]=Fa[1],Fa[1]=w),w=$o(e,i,a,s,Fa[0]),1<S)&&(_=$o(e,i,a,s,Fa[1])),2===S?I<Fa[0]?b+=w<e?T:-T:I<Fa[1]?b+=_<w?T:-T:b+=s<_?T:-T:I<Fa[0]?b+=w<e?T:-T:b+=s<w?T:-T)}return b}function Ha(t,e,n,i,o,a,r,s){if(e<s&&i<s&&a<s||s<e&&s<i&&s<a)return 0;c=Ga,h=(l=e)-2*(u=i)+(h=a),u=2*(u-l),l-=s=s,s=0,qo(h)?Ko(u)&&0<=(d=-l/u)&&d<=1&&(c[s++]=d):qo(l=u*u-4*h*l)?0<=(d=-u/(2*h))&&d<=1&&(c[s++]=d):0<l&&(p=(-u-(l=Wo(l)))/(2*h),0<=(d=(-u+l)/(2*h))&&d<=1&&(c[s++]=d),0<=p)&&p<=1&&(c[s++]=p);var l,u,h,c,d,p,g=s;if(0===g)return 0;var f=ia(e,i,a);if(0<=f&&f<=1){for(var m=0,y=ea(e,i,a,f),v=0;v<g;v++){var x=0===Ga[v]||1===Ga[v]?.5:1;ea(t,n,o,Ga[v])<r||(Ga[v]<f?m+=y<e?x:-x:m+=a<y?x:-x)}return m}return x=0===Ga[0]||1===Ga[0]?.5:1,ea(t,n,o,Ga[0])<r?0:a<e?x:-x}function Za(t,e,n,i,o){for(var a,r,s=0,l=0,u=0,h=0,c=0,d=0;d<t.length;){var p=t[d++];switch(p===Ra.M&&1<d&&(n||(s+=za(l,u,h,c,i,o))),1===d&&(h=l=t[d],c=u=t[d+1]),p){case Ra.M:l=h=t[d++],u=c=t[d++];break;case Ra.L:if(n){if(La(l,u,t[d],t[d+1],e,i,o))return!0}else s+=za(l,u,t[d],t[d+1],i,o)||0;l=t[d++],u=t[d++];break;case Ra.C:if(n){if(ka(l,u,t[d++],t[d++],t[d++],t[d++],t[d],t[d+1],e,i,o))return!0}else s+=Wa(l,u,t[d++],t[d++],t[d++],t[d++],t[d],t[d+1],i,o)||0;l=t[d++],u=t[d++];break;case Ra.Q:if(n){if(Pa(l,u,t[d++],t[d++],t[d],t[d+1],e,i,o))return!0}else s+=Ha(l,u,t[d++],t[d++],t[d],t[d+1],i,o)||0;l=t[d++],u=t[d++];break;case Ra.A:var g=t[d++],f=t[d++],m=t[d++],y=t[d++],v=t[d++],x=t[d++],_=(d+=1,1-t[d++]),w=Math.cos(v)*m+g,b=Math.sin(v)*y+f,S=(1<d?s+=za(l,u,w,b,i,o):(h=w,c=b),(i-g)*y/m+g);if(n){if(function(t,e,n,i,o,a,r,s,l){if(0!==r)return r=r,s-=t,l-=e,!(n<(t=Math.sqrt(s*s+l*l))-r||t+r<n)&&(Math.abs(i-o)%Ea<1e-4||((o=a?(e=i,i=Oa(o),Oa(e)):(i=Oa(i),Oa(o)))<i&&(o+=Ea),(t=Math.atan2(l,s))<0&&(t+=Ea),i<=t&&t<=o)||i<=t+Ea&&t+Ea<=o)}(g,f,y,v,v+x,_,e,S,o))return!0}else s+=function(t,e,n,i,o,a,r,s){if((s-=e)>n||s<-n)return 0;if(e=Math.sqrt(n*n-s*s),Ga[0]=-e,Ga[1]=e,(n=Math.abs(i-o))<1e-4)return 0;if(n%Ba<1e-4)return o=Ba,h=a?1:-1,r>=Ga[i=0]+t&&r<=Ga[1]+t?h:0;(o=a?(e=i,i=Oa(o),Oa(e)):(i=Oa(i),Oa(o)))<i&&(o+=Ba);for(var l=0,u=0;u<2;u++){var h,c=Ga[u];r<c+t&&(h=a?1:-1,i<=(c=(c=Math.atan2(s,c))<0?Ba+c:c)&&c<=o||i<=c+Ba&&c+Ba<=o)&&(l+=h=c>Math.PI/2&&c<1.5*Math.PI?-h:h)}return l}(g,f,y,v,v+x,_,S,o);l=Math.cos(v+x)*m+g,u=Math.sin(v+x)*y+f;break;case Ra.R:if(h=l=t[d++],c=u=t[d++],w=h+t[d++],b=c+t[d++],n){if(La(h,c,w,c,e,i,o)||La(w,c,w,b,e,i,o)||La(w,b,h,b,e,i,o)||La(h,b,h,c,e,i,o))return!0}else s=(s+=za(w,c,w,b,i,o))+za(h,b,h,c,i,o);break;case Ra.Z:if(n){if(La(l,u,h,c,e,i,o))return!0}else s+=za(l,u,h,c,i,o);l=h,u=c}}return n||(a=u,r=c,Math.abs(a-r)<Va)||(s+=za(l,u,h,c,i,o)||0),0!==s}var Xa=Fn.prototype.getCanvasPattern,Ya=Math.abs,Ua=new ya(!0);function r(t){zi.call(this,t),this.path=null}r.prototype={constructor:r,type:"path",__dirtyPath:!0,strokeContainThreshold:5,subPixelOptimize:!1,brush:function(t,e){var n,i=this.style,o=this.path||Ua,a=i.hasStroke(),r=i.hasFill(),s=i.fill,l=i.stroke,u=r&&!!s.colorStops,h=a&&!!l.colorStops,c=r&&!!s.image,d=a&&!!l.image,e=(i.bind(t,this,e),this.setTransform(t),this.__dirty&&(u&&(p=p||this.getBoundingRect(),this._fillGradient=i.getGradient(t,s,p)),h)&&(p=p||this.getBoundingRect(),this._strokeGradient=i.getGradient(t,l,p)),u?t.fillStyle=this._fillGradient:c&&(t.fillStyle=Xa.call(s,t)),h?t.strokeStyle=this._strokeGradient:d&&(t.strokeStyle=Xa.call(l,t)),i.lineDash),p=i.lineDashOffset,u=!!t.setLineDash,c=this.getGlobalScale();o.setScale(c[0],c[1]),this.__dirtyPath||e&&!u&&a?(o.beginPath(t),e&&!u&&(o.setLineDash(e),o.setLineDashOffset(p)),this.buildPath(o,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),r&&(null!=i.fillOpacity?(n=t.globalAlpha,t.globalAlpha=i.fillOpacity*i.opacity,o.fill(t),t.globalAlpha=n):o.fill(t)),e&&u&&(t.setLineDash(e),t.lineDashOffset=p),a&&(null!=i.strokeOpacity?(n=t.globalAlpha,t.globalAlpha=i.strokeOpacity*i.opacity,o.stroke(t),t.globalAlpha=n):o.stroke(t)),e&&u&&t.setLineDash([]),null!=i.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))},buildPath:function(t,e,n){},createPathProxy:function(){this.path=new ya},getBoundingRect:function(){var t,e,n=this._rect,i=this.style,o=!n;return o&&(t=(t=this.path)||(this.path=new ya),this.__dirtyPath&&(t.beginPath(),this.buildPath(t,this.shape,!1)),n=t.getBoundingRect()),this._rect=n,i.hasStroke()?(t=this._rectWithStroke||(this._rectWithStroke=n.clone()),(this.__dirty||o)&&(t.copy(n),o=i.lineWidth,e=i.strokeNoScale?this.getLineScale():1,i.hasFill()||(o=Math.max(o,this.strokeContainThreshold||4)),1e-10<e)&&(t.width+=o/e,t.height+=o/e,t.x-=o/e/2,t.y-=o/e/2),t):n},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.data;if(o.hasStroke()){var i=o.lineWidth,a=o.strokeNoScale?this.getLineScale():1;if(1e-10<a&&(o.hasFill()||(i=Math.max(i,this.strokeContainThreshold)),Za(n,i/a,!0,t,e)))return!0}if(o.hasFill())return Za(n,0,!1,t,e)}return!1},dirty:function(t){(t=null==t?!0:t)&&(this.__dirtyPath=t,this._rect=null),this.__dirty=this.__dirtyText=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(t){return this.animate("shape",t)},attrKV:function(t,e){"shape"===t?(this.setShape(e),this.__dirtyPath=!0,this._rect=null):zi.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var n=this.shape;if(n){if(k(t))for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);else n[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&1e-10<Ya(t[0]-1)&&1e-10<Ya(t[3]-1)?Math.sqrt(Ya(t[0]*t[3]-t[2]*t[1])):1}},r.extend=function(o){function t(t){r.call(this,t),o.style&&this.style.extendFrom(o.style,!1);var e=o.shape;if(e){this.shape=this.shape||{};var n,i=this.shape;for(n in e)!i.hasOwnProperty(n)&&e.hasOwnProperty(n)&&(i[n]=e[n])}o.init&&o.init.call(this,t)}for(var e in a(t,r),o)"style"!==e&&"shape"!==e&&(t.prototype[e]=o[e]);return t},a(r,zi);var ja=ya.CMD,qa=[[],[],[]],Ka=Math.sqrt,$a=Math.atan2;function Ja(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(or(t,e))}var Qa=Math.sqrt,tr=Math.sin,er=Math.cos,nr=Math.PI,ir=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},or=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(ir(t)*ir(e))};function ar(t,e,n,i,o,a,r,s,l,u,h){var l=l*(nr/180),c=er(l)*(t-n)/2+tr(l)*(e-i)/2,d=-1*tr(l)*(t-n)/2+er(l)*(e-i)/2,p=c*c/(r*r)+d*d/(s*s),p=(1<p&&(r*=Qa(p),s*=Qa(p)),(o===a?-1:1)*Qa((r*r*(s*s)-r*r*(d*d)-s*s*(c*c))/(r*r*(d*d)+s*s*(c*c)))||0),o=p*r*d/s,p=p*-s*c/r,t=(t+n)/2+er(l)*o-tr(l)*p,n=(e+i)/2+tr(l)*o+er(l)*p,e=Ja([1,0],[(c-o)/r,(d-p)/s]),i=[(c-o)/r,(d-p)/s],c=[(-1*c-o)/r,(-1*d-p)/s],o=Ja(i,c);or(i,c)<=-1&&(o=nr),1<=or(i,c)&&(o=0),0===a&&0<o&&(o-=2*nr),1===a&&o<0&&(o+=2*nr),h.addData(u,t,n,r,s,e,o,l,a)}var rr=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,sr=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function lr(t,e){var _=function(t){if(!t)return new ya;for(var e,n=0,i=0,o=n,a=i,r=new ya,s=ya.CMD,l=t.match(rr),u=0;u<l.length;u++){for(var h,c=l[u],d=c.charAt(0),p=c.match(sr)||[],g=p.length,f=0;f<g;f++)p[f]=parseFloat(p[f]);for(var m=0;m<g;){var y,v,x,_,w,b=n,S=i;switch(d){case"l":n+=p[m++],i+=p[m++],h=s.L,r.addData(h,n,i);break;case"L":n=p[m++],i=p[m++],h=s.L,r.addData(h,n,i);break;case"m":n+=p[m++],i+=p[m++],h=s.M,r.addData(h,n,i),o=n,a=i,d="l";break;case"M":n=p[m++],i=p[m++],h=s.M,r.addData(h,n,i),o=n,a=i,d="L";break;case"h":n+=p[m++],h=s.L,r.addData(h,n,i);break;case"H":n=p[m++],h=s.L,r.addData(h,n,i);break;case"v":i+=p[m++],h=s.L,r.addData(h,n,i);break;case"V":i=p[m++],h=s.L,r.addData(h,n,i);break;case"C":h=s.C,r.addData(h,p[m++],p[m++],p[m++],p[m++],p[m++],p[m++]),n=p[m-2],i=p[m-1];break;case"c":h=s.C,r.addData(h,p[m++]+n,p[m++]+i,p[m++]+n,p[m++]+i,p[m++]+n,p[m++]+i),n+=p[m-2],i+=p[m-1];break;case"S":var M=n,I=i,T=r.len(),A=r.data;e===s.C&&(M+=n-A[T-4],I+=i-A[T-3]),h=s.C,b=p[m++],S=p[m++],n=p[m++],i=p[m++],r.addData(h,M,I,b,S,n,i);break;case"s":M=n,I=i,T=r.len(),A=r.data,e===s.C&&(M+=n-A[T-4],I+=i-A[T-3]),h=s.C,b=n+p[m++],S=i+p[m++],n+=p[m++],i+=p[m++],r.addData(h,M,I,b,S,n,i);break;case"Q":b=p[m++],S=p[m++],n=p[m++],i=p[m++],h=s.Q,r.addData(h,b,S,n,i);break;case"q":b=p[m++]+n,S=p[m++]+i,n+=p[m++],i+=p[m++],h=s.Q,r.addData(h,b,S,n,i);break;case"T":M=n,I=i,T=r.len(),A=r.data,e===s.Q&&(M+=n-A[T-4],I+=i-A[T-3]),n=p[m++],i=p[m++],h=s.Q,r.addData(h,M,I,n,i);break;case"t":M=n,I=i,T=r.len(),A=r.data,e===s.Q&&(M+=n-A[T-4],I+=i-A[T-3]),n+=p[m++],i+=p[m++],h=s.Q,r.addData(h,M,I,n,i);break;case"A":y=p[m++],v=p[m++],x=p[m++],_=p[m++],w=p[m++],ar(b=n,S=i,n=p[m++],i=p[m++],_,w,y,v,x,h=s.A,r);break;case"a":y=p[m++],v=p[m++],x=p[m++],_=p[m++],w=p[m++],ar(b=n,S=i,n+=p[m++],i+=p[m++],_,w,y,v,x,h=s.A,r)}}"z"!==d&&"Z"!==d||(h=s.Z,r.addData(h),n=o,i=a),e=h}return r.toStatic(),r}(t);return(e=e||{}).buildPath=function(t){var e;t.setData?(t.setData(_.data),(e=t.getContext())&&t.rebuildPath(e)):_.rebuildPath(e=t)},e.applyTransform=function(t){for(var e,n,i,o,a=t,r=_.data,s=ja.M,l=ja.C,u=ja.L,h=ja.R,c=ja.A,d=ja.Q,p=0,g=0;p<r.length;){switch(e=r[p++],g=p,n=0,e){case s:case u:n=1;break;case l:n=3;break;case d:n=2;break;case c:var f=a[4],m=a[5],y=Ka(a[0]*a[0]+a[1]*a[1]),v=Ka(a[2]*a[2]+a[3]*a[3]),x=$a(-a[1]/v,a[0]/y);r[p]*=y,r[p++]+=f,r[p]*=v,r[p++]+=m,r[p++]*=y,r[p++]*=v,r[p++]+=x,r[p++]+=x,g=p+=2;break;case h:o[0]=r[p++],o[1]=r[p++],zt(o,o,a),r[g++]=o[0],r[g++]=o[1],o[0]+=r[p++],o[1]+=r[p++],zt(o,o,a),r[g++]=o[0],r[g++]=o[1]}for(i=0;i<n;i++)(o=qa[i])[0]=r[p++],o[1]=r[p++],zt(o,o,a),r[g++]=o[0],r[g++]=o[1]}this.dirty(!0)},e}function ur(t,e){return new r(lr(t,e))}function B(t){zi.call(this,t)}B.prototype={constructor:B,type:"text",brush:function(t,e){var n=this.style,i=(this.__dirty&&xi(n),n.fill=n.stroke=n.shadowBlur=n.shadowColor=n.shadowOffsetX=n.shadowOffsetY=null,n.text);null!=i&&(i+=""),Ni(i,n)?(this.setTransform(t),wi(this,t,i,n,null,e),this.restoreTransform(t)):t.__attrCachedBy=En.NONE},getBoundingRect:function(){var t,e=this.style;return this.__dirty&&xi(e),this._rect||(e.text,(t=ii(e.text+"",e.font,e.textAlign,e.textVerticalAlign,e.textPadding,e.textLineHeight,e.rich)).x+=e.x||0,t.y+=e.y||0,Ci(e.textStroke,e.textStrokeWidth)&&(e=e.textStrokeWidth,t.x-=e/2,t.y-=e/2,t.width+=e,t.height+=e),this._rect=t),this._rect}},a(B,zi);var hr=r.extend({type:"circle",shape:{cx:0,cy:0,r:0},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,!0)}}),cr=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]];function dr(s){return y.browser.ie&&11<=y.browser.version?function(){var t,e=this.__clipPaths,n=this.style;if(e)for(var i=0;i<e.length;i++){var o=e[i],a=o&&o.shape,o=o&&o.type;if(a&&("sector"===o&&a.startAngle===a.endAngle||"rect"===o&&(!a.width||!a.height))){for(var r=0;r<cr.length;r++)cr[r][2]=n[cr[r][0]],n[cr[r][0]]=cr[r][1];t=!0;break}}if(s.apply(this,arguments),t)for(r=0;r<cr.length;r++)n[cr[r][0]]=cr[r][2]}:s}var pr=r.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},brush:dr(r.prototype.brush),buildPath:function(t,e){var n=e.cx,i=e.cy,o=Math.max(e.r0||0,0),a=Math.max(e.r,0),r=e.startAngle,s=e.endAngle,e=e.clockwise,l=Math.cos(r),u=Math.sin(r);t.moveTo(l*o+n,u*o+i),t.lineTo(l*a+n,u*a+i),t.arc(n,i,a,r,s,!e),t.lineTo(Math.cos(s)*o+n,Math.sin(s)*o+i),0!==o&&t.arc(n,i,o,s,r,e),t.closePath()}}),gr=r.extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},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)}});function fr(t,e,n,i,o,a,r){t=.5*(n-t),i=.5*(i-e);return(2*(e-n)+t+i)*r+(-3*(e-n)-2*t-i)*a+t*o+e}function mr(t,e,n){var i=e.points,o=e.smooth;if(i&&2<=i.length){if(o&&"spline"!==o){var a=function(t,e,n,i){var o,a,r=[],s=[],l=[],u=[];if(i){for(var h=[1/0,1/0],c=[-1/0,-1/0],d=0,p=t.length;d<p;d++)Rt(h,h,t[d]),Bt(c,c,t[d]);Rt(h,h,i[0]),Bt(c,c,i[1])}for(d=0,p=t.length;d<p;d++){var g=t[d];if(n)o=t[d?d-1:p-1],a=t[(d+1)%p];else{if(0===d||d===p-1){r.push(bt(t[d]));continue}o=t[d-1],a=t[d+1]}Tt(s,a,o),Ct(s,s,e);var f=kt(g,o),m=kt(g,a),y=f+m,y=(0!==y&&(f/=y,m/=y),Ct(l,s,-f),Ct(u,s,m),Mt([],g,l)),f=Mt([],g,u);i&&(Bt(y,y,h),Rt(y,y,c),Bt(f,f,h),Rt(f,f,c)),r.push(y),r.push(f)}return n&&r.push(r.shift()),r}(i,o,n,e.smoothConstraint);t.moveTo(i[0][0],i[0][1]);for(var r=i.length,s=0;s<(n?r:r-1);s++){var l=a[2*s],u=a[2*s+1],h=i[(s+1)%r];t.bezierCurveTo(l[0],l[1],u[0],u[1],h[0],h[1])}}else{"spline"===o&&(i=function(t,e){for(var n=t.length,i=[],o=0,a=1;a<n;a++)o+=kt(t[a-1],t[a]);for(var r=(r=o/2)<n?n:r,a=0;a<r;a++){var s,l,u=a/(r-1)*(e?n:n-1),h=Math.floor(u),u=u-h,c=t[h%n],h=e?(s=t[(h-1+n)%n],l=t[(h+1)%n],t[(h+2)%n]):(s=t[0===h?h:h-1],l=t[n-2<h?n-1:h+1],t[n-3<h?n-1:h+2]),d=u*u,p=u*d;i.push([fr(s[0],c[0],l[0],h[0],u,d,p),fr(s[1],c[1],l[1],h[1],u,d,p)])}return i}(i,n)),t.moveTo(i[0][0],i[0][1]);for(var s=1,c=i.length;s<c;s++)t.lineTo(i[s][0],i[s][1])}n&&t.closePath()}}var yr=r.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){mr(t,e,!0)}}),vr=r.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){mr(t,e,!1)}}),xr=Math.round;function _r(t,e,n){t=xr(2*t);return(t+xr(e))%2==0?t/2:(t+(n?1:-1))/2}var wr={},V=r.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,e){var n,i,o,a,r,s;this.subPixelOptimize?(n=wr,i=e,o=(o=this.style)&&o.lineWidth,i&&o&&(a=i.x,r=i.y,s=i.width,i=i.height,n.x=_r(a,o,!0),n.y=_r(r,o,!0),n.width=Math.max(_r(a+s,o,!1)-n.x,0===s?0:1),n.height=Math.max(_r(r+i,o,!1)-n.y,0===i?0:1)),a=wr.x,s=wr.y,r=wr.width,o=wr.height,wr.r=e.r,e=wr):(a=e.x,s=e.y,r=e.width,o=e.height),e.r?gi(t,e):t.rect(a,s,r,o),t.closePath()}}),br={},Sr=r.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var n,i,o,a,r=(this.subPixelOptimize?(s=br,n=e,i=(i=this.style)&&i.lineWidth,n&&i&&(o=n.x1,a=n.x2,r=n.y1,n=n.y2,xr(2*o)===xr(2*a)?s.x1=s.x2=_r(o,i,!0):(s.x1=o,s.x2=a),xr(2*r)===xr(2*n)?s.y1=s.y2=_r(r,i,!0):(s.y1=r,s.y2=n)),o=br.x1,a=br.y1,i=br.x2,br):(o=e.x1,a=e.y1,i=e.x2,e)).y2,s=e.percent;0!==s&&(t.moveTo(o,a),s<1&&(i=o*(1-s)+i*s,r=a*(1-s)+r*s),t.lineTo(i,r))},pointAt:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}}),Mr=[];function Ir(t,e,n){var i=t.cpx2,o=t.cpy2;return null===i||null===o?[(n?Jo:$o)(t.x1,t.cpx1,t.cpx2,t.x2,e),(n?Jo:$o)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(n?na:ea)(t.x1,t.cpx1,t.x2,e),(n?na:ea)(t.y1,t.cpy1,t.y2,e)]}function Tr(t){this.colorStops=t||[]}function Ar(t,e,n,i,o,a){this.x=null==t?0:t,this.y=null==e?0:e,this.x2=null==n?1:n,this.y2=null==i?0:i,this.type="linear",this.global=a||!1,Tr.call(this,o)}function Dr(t,e,n,i,o){this.x=null==t?.5:t,this.y=null==e?.5:e,this.r=null==n?.5:n,this.type="radial",this.global=o||!1,Tr.call(this,i)}var Cr=r.extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var n=e.x1,i=e.y1,o=e.x2,a=e.y2,r=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&&(oa(n,r,o,e,Mr),r=Mr[1],o=Mr[2],oa(i,s,a,e,Mr),s=Mr[1],a=Mr[2]),t.quadraticCurveTo(r,s,o,a)):(e<1&&(ta(n,r,l,o,e,Mr),r=Mr[1],l=Mr[2],o=Mr[3],ta(i,s,u,a,e,Mr),s=Mr[1],u=Mr[2],a=Mr[3]),t.bezierCurveTo(r,s,l,u,o,a)))},pointAt:function(t){return Ir(this.shape,t,!1)},tangentAt:function(t){t=Ir(this.shape,t,!0);return Lt(t,t)}}),Lr=r.extend({type:"arc",shape:{cx:0,cy:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},style:{stroke:"#000",fill:null},buildPath:function(t,e){var n=e.cx,i=e.cy,o=Math.max(e.r,0),a=e.startAngle,r=e.endAngle,e=e.clockwise,s=Math.cos(a),l=Math.sin(a);t.moveTo(s*o+n,l*o+i),t.arc(n,i,o,a,r,!e)}}),kr=r.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var t=this.__dirtyPath,e=this.shape.paths,n=0;n<e.length;n++)t=t||e[n].__dirtyPath;this.__dirtyPath=t,this.__dirty=this.__dirty||t},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])},buildPath:function(t,e){for(var n=e.paths||[],i=0;i<n.length;i++)n[i].buildPath(t,n[i].shape,!0)},afterBrush:function(){for(var t=this.shape.paths||[],e=0;e<t.length;e++)t[e].__dirtyPath=!1},getBoundingRect:function(){return this._updatePathDirty(),r.prototype.getBoundingRect.call(this)}});Tr.prototype={constructor:Tr,addColorStop:function(t,e){this.colorStops.push({offset:t,color:e})}},Ar.prototype={constructor:Ar},a(Ar,Tr);function Pr(t){zi.call(this,t),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}Dr.prototype={constructor:Dr},a(Dr,Tr),Pr.prototype.incremental=!0,Pr.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},Pr.prototype.addDisplayable=function(t,e){(e?this._temporaryDisplayables:this._displayables).push(t),this.dirty()},Pr.prototype.addDisplayables=function(t,e){e=e||!1;for(var n=0;n<t.length;n++)this.addDisplayable(t[n],e)},Pr.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])},Pr.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},Pr.prototype.brush=function(t,e){for(var n,i=this._cursor;i<this._displayables.length;i++)(n=this._displayables[i]).beforeBrush&&n.beforeBrush(t),n.brush(t,i===this._cursor?null:this._displayables[i-1]),n.afterBrush&&n.afterBrush(t);for(this._cursor=i,i=0;i<this._temporaryDisplayables.length;i++)(n=this._temporaryDisplayables[i]).beforeBrush&&n.beforeBrush(t),n.brush(t,0===i?null:this._temporaryDisplayables[i-1]),n.afterBrush&&n.afterBrush(t);this._temporaryDisplayables=[],this.notClear=!0};var Nr=[],Or=(Pr.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new z(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(Nr)),t.union(i)}this._rect=t}return this._rect},Pr.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},a(Pr,zi),Math.round),Er=Math.max,zr=Math.min,Rr={},Br=1;function Vr(t){return r.extend(t)}function Gr(t,e,n,i){t=ur(t,e);return n&&("center"===i&&(n=Wr(n,t.getBoundingRect())),Zr(t,n)),t}function Fr(t,e,n){var i=new Ri({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(Wr(e,t)))}});return i}function Wr(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}}var Hr=function(t,e){for(var n=[],i=t.length,o=0;o<i;o++){var a=t[o];a.path||a.createPathProxy(),a.__dirtyPath&&a.buildPath(a.path,a.shape,!0),n.push(a.path)}return(e=new r(e)).createPathProxy(),e.buildPath=function(t){t.appendPath(n);var e=t.getContext();e&&t.rebuildPath(e)},e};function Zr(t,e){t.applyTransform&&(e=t.getBoundingRect().calculateTransform(e),t.applyTransform(e))}function Xr(t){var e=t.shape,n=t.style.lineWidth;return Or(2*e.x1)===Or(2*e.x2)&&(e.x1=e.x2=Ur(e.x1,n,!0)),Or(2*e.y1)===Or(2*e.y2)&&(e.y1=e.y2=Ur(e.y1,n,!0)),t}function Yr(t){var e=t.shape,n=t.style.lineWidth,i=e.x,o=e.y,a=e.width,r=e.height;return e.x=Ur(e.x,n,!0),e.y=Ur(e.y,n,!0),e.width=Math.max(Ur(i+a,n,!1)-e.x,0===a?0:1),e.height=Math.max(Ur(o+r,n,!1)-e.y,0===r?0:1),t}function Ur(t,e,n){t=Or(2*t);return(t+Or(e))%2==0?t/2:(t+(n?1:-1))/2}function jr(t){return null!=t&&"none"!==t}var qr=E(),Kr=0;function $r(t){var e=t.__hoverStl;if(e&&!t.__highlighted){var n=t.useHoverLayer,i=(t.__highlighted=n?"layer":"plain",t.__zr);if(i||!n){var o=t,a=t.style;if(fs(a=n?(o=i.addHover(t)).style:a),!n){i=o;if(i.__hoverStlDirty){i.__hoverStlDirty=!1;var r=i.__hoverStl;if(r){var s,l=i.__cachedNormalStl={},u=(i.__cachedNormalZ2=i.z2,i.style);for(s in r)null!=r[s]&&(l[s]=u[s]);l.fill=u.fill,l.stroke=u.stroke}else i.__cachedNormalStl=i.__cachedNormalZ2=null}}a.extendFrom(e),Jr(a,e,"fill"),Jr(a,e,"stroke"),gs(a),n||(t.dirty(!1),t.z2+=Br)}}}function Jr(t,e,n){!jr(e[n])&&jr(t[n])&&(t[n]="string"!=typeof(e=t[n])?e:((t=qr.get(e))||(t=Ze(e,-.1),Kr<1e4&&(qr.set(e,t),Kr++)),t))}function Qr(t){var e,n=t.__highlighted;n&&(t.__highlighted=!1,"layer"===n?t.__zr&&t.__zr.removeHover(t):n&&(n=t.style,(e=t.__cachedNormalStl)&&(fs(n),t.setStyle(e),gs(n)),null!=(e=t.__cachedNormalZ2))&&t.z2-e===Br&&(t.z2=e))}function ts(t,e){t.isGroup?t.traverse(function(t){t.isGroup||e(t)}):e(t)}function es(t,e){e=t.__hoverStl=!1!==e&&(e||{}),t.__hoverStlDirty=!0,t.__highlighted&&(t.__cachedNormalStl=null,Qr(t),$r(t))}function ns(t){return t&&t.__isEmphasisEntered}function is(t){this.__hoverSilentOnTouch&&t.zrByTouch||this.__isEmphasisEntered||ts(this,$r)}function os(t){this.__hoverSilentOnTouch&&t.zrByTouch||this.__isEmphasisEntered||ts(this,Qr)}function as(){this.__isEmphasisEntered=!0,ts(this,$r)}function rs(){this.__isEmphasisEntered=!1,ts(this,Qr)}function ss(t,e,n){t.isGroup?t.traverse(function(t){t.isGroup||es(t,t.hoverStyle||e)}):es(t,t.hoverStyle||e),ls(t,n)}function ls(t,e){var n=!1===e;t.__hoverSilentOnTouch=null!=e&&e.hoverSilentOnTouch,n&&!t.__hoverStyleTrigger||(t[e=n?"off":"on"]("mouseover",is)[e]("mouseout",os),t[e]("emphasis",as)[e]("normal",rs),t.__hoverStyleTrigger=!n)}function us(t,e,n,i,o,a,r){var s,l=(o=o||Rr).labelFetcher,u=o.labelDataIndex,h=o.labelDimIndex,c=n.getShallow("show"),d=i.getShallow("show"),c=((c||d)&&null==(s=l?l.getFormattedLabel(u,"normal",null,h):s)&&(s=et(o.defaultText)?o.defaultText(u,o):o.defaultText),c?s:null),d=d?st(l?l.getFormattedLabel(u,"emphasis",null,h):null,s):null;null==c&&null==d||(hs(t,n,a,o),hs(e,i,r,o,!0)),t.text=c,e.text=d}function hs(t,e,n,i,o){return cs(t,e,i,o),n&&O(t,n),t}function cs(t,e,n,i){(n=n||Rr).isRectText&&(r=e.getShallow("position")||(i?null:"inside"),t.textPosition=r="outside"===r?"top":r,t.textOffset=e.getShallow("offset"),null!=(r=e.getShallow("rotate"))&&(r*=Math.PI/180),t.textRotation=r,t.textDistance=st(e.getShallow("distance"),i?null:5));var o,a,r=e.ecModel,s=r&&r.option.textStyle,l=function(t){for(var e;t&&t!==t.ecModel;){var n=(t.option||Rr).rich;if(n)for(var i in e=e||{},n)n.hasOwnProperty(i)&&(e[i]=1);t=t.parentModel}return e}(e);if(l)for(var u in o={},l)l.hasOwnProperty(u)&&(a=e.getModel(["rich",u]),ds(o[u]={},a,s,n,i));t.rich=o,ds(t,e,s,n,i,!0),n.forceRich&&!n.textStyle&&(n.textStyle={})}function ds(t,e,n,i,o,a){n=!o&&n||Rr,t.textFill=ps(e.getShallow("color"),i)||n.color,t.textStroke=ps(e.getShallow("textBorderColor"),i)||n.textBorderColor,t.textStrokeWidth=st(e.getShallow("textBorderWidth"),n.textBorderWidth),t.insideRawTextPosition=t.textPosition,o||(a&&(t.insideRollbackOpt=i,gs(t)),null==t.textFill&&(t.textFill=i.autoColor)),t.fontStyle=e.getShallow("fontStyle")||n.fontStyle,t.fontWeight=e.getShallow("fontWeight")||n.fontWeight,t.fontSize=e.getShallow("fontSize")||n.fontSize,t.fontFamily=e.getShallow("fontFamily")||n.fontFamily,t.textAlign=e.getShallow("align"),t.textVerticalAlign=e.getShallow("verticalAlign")||e.getShallow("baseline"),t.textLineHeight=e.getShallow("lineHeight"),t.textWidth=e.getShallow("width"),t.textHeight=e.getShallow("height"),t.textTag=e.getShallow("tag"),a&&i.disableBox||(t.textBackgroundColor=ps(e.getShallow("backgroundColor"),i),t.textPadding=e.getShallow("padding"),t.textBorderColor=ps(e.getShallow("borderColor"),i),t.textBorderWidth=e.getShallow("borderWidth"),t.textBorderRadius=e.getShallow("borderRadius"),t.textBoxShadowColor=e.getShallow("shadowColor"),t.textBoxShadowBlur=e.getShallow("shadowBlur"),t.textBoxShadowOffsetX=e.getShallow("shadowOffsetX"),t.textBoxShadowOffsetY=e.getShallow("shadowOffsetY")),t.textShadowColor=e.getShallow("textShadowColor")||n.textShadowColor,t.textShadowBlur=e.getShallow("textShadowBlur")||n.textShadowBlur,t.textShadowOffsetX=e.getShallow("textShadowOffsetX")||n.textShadowOffsetX,t.textShadowOffsetY=e.getShallow("textShadowOffsetY")||n.textShadowOffsetY}function ps(t,e){return"auto"!==t?t:e&&e.autoColor?e.autoColor:null}function gs(t){var e,n,i,o,a=t.insideRollbackOpt;a&&null==t.textFill&&(n=a.useInsideStyle,i=t.insideRawTextPosition,o=a.autoColor,!1!==n&&(!0===n||a.isRectText&&i&&"string"==typeof i&&0<=i.indexOf("inside"))?(e={textFill:null,textStroke:t.textStroke,textStrokeWidth:t.textStrokeWidth},t.textFill="#fff",null==t.textStroke&&(t.textStroke=o,null==t.textStrokeWidth)&&(t.textStrokeWidth=2)):null!=o&&(e={textFill:null},t.textFill=o),e)&&(t.insideRollback=e)}function fs(t){var e=t.insideRollback;e&&(t.textFill=e.textFill,t.textStroke=e.textStroke,t.textStrokeWidth=e.textStrokeWidth,t.insideRollback=null)}function ms(t,e){e=e||e.getModel("textStyle");return ct([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(" "))}function ys(t,e,n,i,o,a){var r,s;"function"==typeof o&&(a=o,o=null),i&&i.isAnimationEnabled()&&(r=i.getShallow("animationDuration"+(t=t?"Update":"")),s=i.getShallow("animationEasing"+t),"function"==typeof(t=i.getShallow("animationDelay"+t))&&(t=t(o,i.getAnimationDelayParams?i.getAnimationDelayParams(e,o):null)),0<(r="function"==typeof r?r(o):r))?e.animateTo(n,r,t||0,s,a,!!a):(e.stopAnimation(),e.attr(n),a&&a())}function G(t,e,n,i,o){ys(!0,t,e,n,i,o)}function vs(t,e,n,i,o){ys(!1,t,e,n,i,o)}function xs(t,e){for(var n=le([]);t&&t!==e;)he(n,t.getLocalTransform(),n),t=t.parent;return n}function _s(t,e,n){return e&&!J(e)&&(e=xe.getLocalTransform(e)),zt([],t,e=n?ge([],e):e)}function ws(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=_s(["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 bs(t,e,i,n){var o,a;function r(t){var e={position:bt(t.position),rotation:t.rotation};return t.shape&&(e.shape=O({},t.shape)),e}t&&e&&(o={},t.traverse(function(t){!t.isGroup&&t.anid&&(o[t.anid]=t)}),a=o,e.traverse(function(t){var e,n;!t.isGroup&&t.anid&&(e=a[t.anid])&&(n=r(t),t.attr(r(e)),G(t,n,i,t.dataIndex))}))}function Ss(t,n){return I(t,function(t){var e=t[0],e=Er(e,n.x),t=(e=zr(e,n.x+n.width),t[1]),t=Er(t,n.y);return[e,zr(t,n.y+n.height)]})}function Ms(t,e,n){var i=(e=O({rectHover:!0},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),C(i,n),new Ri(e)):Gr(t.replace("path://",""),e,n,"center")}var Is=Object.freeze({__proto__:null,Arc:Lr,BezierCurve:Cr,BoundingRect:z,Circle:hr,CompoundPath:kr,Group:R,Image:Ri,IncrementalDisplayable:Pr,Line:Sr,LinearGradient:Ar,Polygon:yr,Polyline:vr,RadialGradient:Dr,Rect:V,Ring:gr,Sector:pr,Text:B,Z2_EMPHASIS_LIFT:Br,applyTransform:_s,clipPointsByRect:Ss,clipRectByRect:function(t,e){var n=Er(t.x,e.x),i=zr(t.x+t.width,e.x+e.width),o=Er(t.y,e.y),t=zr(t.y+t.height,e.y+e.height);if(n<=i&&o<=t)return{x:n,y:o,width:i-n,height:t-o}},createIcon:Ms,extendPath:function(t,e){return r.extend(lr(t,e))},extendShape:Vr,getFont:ms,getTransform:xs,groupTransition:bs,initProps:vs,isInEmphasis:ns,makeImage:Fr,makePath:Gr,mergePath:Hr,resizePath:Zr,setAsHoverStyleTrigger:ls,setElementHoverStyle:es,setHoverStyle:ss,setLabelStyle:us,setText:function(t,e,n){var i,o={isRectText:!0};!1===n?i=!0:o.autoColor=n,cs(t,e,o,i)},setTextStyle:hs,subPixelOptimize:Ur,subPixelOptimizeLine:Xr,subPixelOptimizeRect:Yr,transformDirection:ws,updateProps:G}),Ts=["textStyle","color"],e={getTextColor:function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(Ts):null)},getFont:function(){return ms({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(t){return ii(t,this.getFont(),this.getShallow("align"),this.getShallow("verticalAlign")||this.getShallow("baseline"),this.getShallow("padding"),this.getShallow("lineHeight"),this.getShallow("rich"),this.getShallow("truncateText"))}},As=zo([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),Ds={getItemStyle:function(t,e){t=As(this,t,e),e=this.getBorderLineDash();return e&&(t.lineDash=e),t},getBorderLineDash:function(){var t=this.get("borderType");return"solid"===t||null==t?null:"dashed"===t?[5,5]:[1,1]}},n=i,Cs=_o();function w(t,e,n){this.parentModel=e,this.ecModel=n,this.option=t}function Ls(t,e,n){for(var i=0;i<e.length&&(!e[i]||null!=(t=t&&"object"==typeof t?t[e[i]]:null));i++);return t=null==t&&n?n.get(e):t}function ks(t,e){var n=Cs(t).getParent;return n?n.call(t,e):t.parentModel}w.prototype={constructor:w,init:null,mergeOption:function(t){f(this.option,t,!0)},get:function(t,e){return null==t?this.option:Ls(this.option,this.parsePath(t),!e&&ks(this,t))},getShallow:function(t,e){var n=this.option,n=null==n?n:n[t],e=!e&&ks(this,t);return n=null==n&&e?e.getShallow(t):n},getModel:function(t,e){var n;return new w(null==t?this.option:Ls(this.option,t=this.parsePath(t)),e=e||(n=ks(this,t))&&n.getModel(t),this.ecModel)},isEmpty:function(){return null==this.option},restoreData:function(){},clone:function(){return new this.constructor(N(this.option))},setReadOnly:function(t){},parsePath:function(t){return t="string"==typeof t?t.split("."):t},customizeGetParent:function(t){Cs(this).getParent=t},isAnimationEnabled:function(){if(!y.node)return null!=this.option.animation?!!this.option.animation:this.parentModel?this.parentModel.isAnimationEnabled():void 0}},Lo(w),Po(w),n(w,Bo),n(w,Go),n(w,e),n(w,Ds);var Ps=0;function Ns(t){return[t||"",Ps++,Math.random().toFixed(5)].join("_")}function Os(t,e,n,i){var o=e[1]-e[0],a=n[1]-n[0];if(0==o)return 0==a?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*a+n[0]}function F(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+/,"").replace(/\s+$/,"").match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t}function Es(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),n?t:+t}function zs(t){return t.sort(function(t,e){return t-e}),t}function Rs(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 Bs(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 Vs(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 Gs(t,e,n){if(!t[e])return 0;var i=Q(t,function(t,e){return t+(isNaN(e)?0:e)},0);if(0===i)return 0;for(var o=Math.pow(10,n),n=I(t,function(t){return(isNaN(t)?0:t)/i*o*100}),a=100*o,r=I(n,function(t){return Math.floor(t)}),s=Q(r,function(t,e){return t+e},0),l=I(n,function(t,e){return t-r[e]});s<a;){for(var u=Number.NEGATIVE_INFINITY,h=null,c=0,d=l.length;c<d;++c)l[c]>u&&(u=l[c],h=c);++r[h],l[h]=0,++s}return r[e]/o}var Fs=9007199254740991;function Ws(t){var e=2*Math.PI;return(t%e+e)%e}function Hs(t){return-1e-4<t&&t<1e-4}var Zs=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function Xs(t){var e,n;return t instanceof Date?t:"string"==typeof t?(e=Zs.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 Ys(t){return Math.pow(10,Us(t))}function Us(t){return Math.floor(Math.log(t)/Math.LN10)}function js(t,e){var n=Us(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 qs(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,a=t[i].close,r=0;r<2;r++)o[r]<=e&&(o[r]=e,a[r]=r?1:1-n),e=o[r],n=a[r];o[0]===o[1]&&a[0]*a[1]!=1?t.splice(i,1):i++}return t}function Ks(t){return 0<=t-parseFloat(t)}Bo=Object.freeze({__proto__:null,MAX_SAFE_INTEGER:Fs,asc:zs,getPercentWithPrecision:Gs,getPixelPrecision:Vs,getPrecision:Rs,getPrecisionSafe:Bs,isNumeric:Ks,isRadianAroundZero:Hs,linearMap:Os,nice:js,parseDate:Xs,parsePercent:F,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:Ys,reformIntervals:qs,remRadian:Ws,round:Es});function $s(t){return isNaN(t)?"-":(t=(t+"").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(1<t.length?"."+t[1]:"")}function Js(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 Qs=ht,tl=/([&<>"'])/g,el={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function nl(t){return null==t?"":(t+"").replace(tl,function(t,e){return el[e]})}function il(t,e){return"{"+t+(null==e?"":e)+"}"}var ol=["a","b","c","d","e","f","g"];function al(t,e,n){var i=(e=D(e)?e:[e]).length;if(!i)return"";for(var o=e[0].$vars||[],a=0;a<o.length;a++){var r=ol[a];t=t.replace(il(r),il(r,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(il(ol[l],s),n?nl(u):u)}return t}function rl(n,t,i){return Z(t,function(t,e){n=n.replace("{"+e+"}",i?nl(t):t)}),n}function sl(t,e){var n=(t=T(t)?{color:t,extraCssText:e}:t||{}).color,i=t.type,o=(e=t.extraCssText,t.renderMode||"html"),t=t.markerId||"X";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:'+nl(n)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:'+nl(n)+";"+(e||"")+'"></span>':{renderMode:o,content:"{marker"+t+"|}  ",style:{color:n}}:""}function ll(t,e){return"0000".substr(0,e-(t+="").length)+t}function ul(t,e,n){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var e=Xs(e),n=n?"UTC":"",i=e["get"+n+"FullYear"](),o=e["get"+n+"Month"]()+1,a=e["get"+n+"Date"](),r=e["get"+n+"Hours"](),s=e["get"+n+"Minutes"](),l=e["get"+n+"Seconds"](),e=e["get"+n+"Milliseconds"]();return t.replace("MM",ll(o,2)).replace("M",o).replace("yyyy",i).replace("yy",i%100).replace("dd",ll(a,2)).replace("d",a).replace("hh",ll(r,2)).replace("h",r).replace("mm",ll(s,2)).replace("m",s).replace("ss",ll(l,2)).replace("s",l).replace("SSS",ll(e,3))}function hl(t){return t&&t.charAt(0).toUpperCase()+t.substr(1)}var cl=ri;var Go=Object.freeze({__proto__:null,addCommas:$s,capitalFirst:hl,encodeHTML:nl,formatTime:ul,formatTpl:al,formatTplSimple:rl,getTextBoundingRect:function(t){return ii(t.text,t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich,t.truncate)},getTextRect:function(t,e,n,i,o,a,r,s){return ii(t,e,n,i,o,s,a,r)},getTooltipMarker:sl,normalizeCssArray:Qs,toCamelCase:Js,truncateText:cl}),dl=Z,pl=["left","right","top","bottom","width","height"],gl=[["width","left","right"],["height","top","bottom"]];function fl(s,l,u,h,c){var d=0,p=0,g=(null==h&&(h=1/0),null==c&&(c=1/0),0);l.eachChild(function(t,e){var n,i,o,a=t.position,r=t.getBoundingRect(),e=l.childAt(e+1),e=e&&e.getBoundingRect();g="horizontal"===s?(o=r.width+(e?-e.x+r.x:0),(n=d+o)>h||t.newline?(d=0,n=o,p+=g+u,r.height):Math.max(g,r.height)):(o=r.height+(e?-e.y+r.y:0),(i=p+o)>c||t.newline?(d+=g+u,p=0,i=o,r.width):Math.max(g,r.width)),t.newline||(a[0]=d,a[1]=p,"horizontal"===s?d=n+u:p=i+u)})}var ml=fl;function yl(t,e,n){n=Qs(n||0);var i=e.width,o=e.height,a=F(t.left,i),r=F(t.top,o),e=F(t.right,i),s=F(t.bottom,o),l=F(t.width,i),u=F(t.height,o),h=n[2]+n[0],c=n[1]+n[3],d=t.aspect;switch(isNaN(l)&&(l=i-e-c-a),isNaN(u)&&(u=o-s-h-r),null!=d&&(isNaN(l)&&isNaN(u)&&(i/o<d?l=.8*i:u=.8*o),isNaN(l)&&(l=d*u),isNaN(u))&&(u=l/d),isNaN(a)&&(a=i-e-l-c),isNaN(r)&&(r=o-s-u-h),t.left||t.right){case"center":a=i/2-l/2-n[3];break;case"right":a=i-l-c}switch(t.top||t.bottom){case"middle":case"center":r=o/2-u/2-n[0];break;case"bottom":r=o-u-h}a=a||0,r=r||0,isNaN(l)&&(l=i-c-a-(e||0)),isNaN(u)&&(u=o-h-r-(s||0));d=new z(a+n[3],r+n[0],l,u);return d.margin=n,d}function vl(t,e,n,i,o){var a,r,s=!o||!o.hv||o.hv[0],l=!o||!o.hv||o.hv[1],o=o&&o.boundingMode||"all";(s||l)&&("raw"===o?a="group"===t.type?new z(0,0,+e.width||0,+e.height||0):t.getBoundingRect():(a=t.getBoundingRect(),t.needLocalTransform()&&(r=t.getLocalTransform(),(a=a.clone()).applyTransform(r))),e=yl(C({width:a.width,height:a.height},e),n,i),r=t.position,n=s?e.x-a.x:0,i=l?e.y-a.y:0,t.attr("position","raw"===o?[n,i]:[r[0]+n,r[1]+i]))}function xl(l,u,t){var h=(t=k(t)?t:{}).ignoreSize,t=(D(h)||(h=[h,h]),n(gl[0],0)),e=n(gl[1],1);function n(t,e){var n={},i=0,o={},a=0;if(dl(t,function(t){o[t]=l[t]}),dl(t,function(t){c(u,t)&&(n[t]=o[t]=u[t]),d(n,t)&&i++,d(o,t)&&a++}),h[e])d(u,t[1])?o[t[2]]=null:d(u,t[2])&&(o[t[1]]=null);else if(2!==a&&i){if(!(2<=i))for(var r=0;r<t.length;r++){var s=t[r];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 d(t,e){return null!=t[e]&&"auto"!==t[e]}function i(t,e,n){dl(t,function(t){e[t]=n[t]})}i(gl[0],l,t),i(gl[1],l,e)}function _l(t){return wl({},t)}function wl(e,n){return n&&e&&dl(pl,function(t){n.hasOwnProperty(t)&&(e[t]=n[t])}),e}L(fl,"vertical"),L(fl,"horizontal");var bl,Sl,Ml,Il=_o(),u=w.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(t,e,n,i){w.call(this,t,e,n,i),this.uid=Ns("ec_cpt_model")},init:function(t,e,n,i){this.mergeDefaultAndTheme(t,n)},mergeDefaultAndTheme:function(t,e){var n=this.layoutMode,i=n?_l(t):{};f(t,e.getTheme().get(this.mainType)),f(t,this.getDefaultOption()),n&&xl(t,i,n)},mergeOption:function(t,e){f(this.option,t,!0);var n=this.layoutMode;n&&xl(this.option,t,n)},optionUpdated:function(t,e){},getDefaultOption:function(){var t=Il(this);if(!t.defaultOption){for(var e=[],n=this.constructor;n;){var i=n.prototype.defaultOption;i&&e.push(i),n=n.superClass}for(var o={},a=e.length-1;0<=a;a--)o=f(o,e[a],!0);t.defaultOption=o}return t.defaultOption},getReferringComponents:function(t){return this.ecModel.queryComponents({mainType:t,index:this.get(t+"Index",!0),id:this.get(t+"Id",!0)})}});function Tl(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}Eo(u,{registerWhenExtend:!0}),Ml={},(Sl=u).registerSubTypeDefaulter=function(t,e){t=Co(t),Ml[t.main]=e},Sl.determineSubType=function(t,e){var n,i=e.type;return i||(n=Co(t).main,Sl.hasSubTypes(t)&&Ml[n]&&(i=Ml[n](e))),i},bl=function(t){var e=[];return Z(u.getClassesByMainType(t),function(t){e=e.concat(t.prototype.dependencies||[])}),e=I(e,function(t){return Co(t).main}),"dataset"!==t&&S(e,"dataset")<=0&&e.unshift("dataset"),e},u.topologicalTravel=function(t,e,n,i){if(t.length){c={},d=[],Z(h=e,function(n){var e,i,o=Tl(c,n),t=(t=o.originalDeps=bl(n),e=h,i=[],Z(t,function(t){0<=S(e,t)&&i.push(t)}),i);o.entryCount=t.length,0===o.entryCount&&d.push(n),Z(t,function(t){S(o.predecessor,t)<0&&o.predecessor.push(t);var e=Tl(c,t);S(e.successor,t)<0&&e.successor.push(n)})});var e={graph:c,noEntryList:d},o=e.graph,a=e.noEntryList,r={};for(Z(t,function(t){r[t]=!0});a.length;){var s=a.pop(),l=o[s],u=!!r[s];u&&(n.call(i,s,l.originalDeps.slice()),delete r[s]),Z(l.successor,u?g:p)}Z(r,function(){throw new Error("Circle dependency may exists")})}var h,c,d;function p(t){o[t].entryCount--,0===o[t].entryCount&&a.push(t)}function g(t){r[t]=!0,p(t)}},i(u,{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")}}});var e="",Al={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:(e="undefined"!=typeof navigator?navigator.platform||"":e).match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,animation:"auto",animationDuration:1e3,animationDurationUpdate:300,animationEasing:"exponentialOut",animationEasingUpdate:"cubicOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},Dl=_o();var Cl={clearColorPalette:function(){Dl(this).colorIdx=0,Dl(this).colorNameMap={}},getColorFromPalette:function(t,e,n){var i,o,e=Dl(e=e||this),a=e.colorIdx||0,r=e.colorNameMap=e.colorNameMap||{};return r.hasOwnProperty(t)?r[t]:(i=ho(this.get("color",!0)),o=this.get("colorLayer",!0),(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[a],t&&(r[t]=n),e.colorIdx=(a+1)%o.length,n):void 0)}};function Ll(t){var e=t.get("coordinateSystem"),n={coordSysName:e,coordSysDims:[],axisMap:E(),categoryAxisMap:E()},e=kl[e];if(e)return e(t,n,n.axisMap,n.categoryAxisMap),n}var kl={cartesian2d:function(t,e,n,i){var o=t.getReferringComponents("xAxis")[0],a=t.getReferringComponents("yAxis")[0];if(H){if(!o)throw new Error('xAxis "'+rt(t.get("xAxisIndex"),t.get("xAxisId"),0)+'" not found');if(!a)throw new Error('yAxis "'+rt(t.get("xAxisIndex"),t.get("yAxisId"),0)+'" not found')}e.coordSysDims=["x","y"],n.set("x",o),n.set("y",a),Pl(o)&&(i.set("x",o),e.firstCategoryDimIndex=0),Pl(a)&&(i.set("y",a),e.firstCategoryDimIndex=1)},singleAxis:function(t,e,n,i){t=t.getReferringComponents("singleAxis")[0];if(H&&!t)throw new Error("singleAxis should be specified.");e.coordSysDims=["single"],n.set("single",t),Pl(t)&&(i.set("single",t),e.firstCategoryDimIndex=0)},polar:function(t,e,n,i){var t=t.getReferringComponents("polar")[0],o=t.findAxisModel("radiusAxis"),t=t.findAxisModel("angleAxis");if(H){if(!t)throw new Error("angleAxis option not found");if(!o)throw new Error("radiusAxis option not found")}e.coordSysDims=["radius","angle"],n.set("radius",o),n.set("angle",t),Pl(o)&&(i.set("radius",o),e.firstCategoryDimIndex=0),Pl(t)&&(i.set("angle",t),e.firstCategoryDimIndex=1)},geo:function(t,e,n,i){e.coordSysDims=["lng","lat"]},parallel:function(t,i,o,a){var r=t.ecModel,t=r.getComponent("parallel",t.get("parallelIndex")),s=i.coordSysDims=t.dimensions.slice();Z(t.parallelAxisIndex,function(t,e){var t=r.getComponent("parallelAxis",t),n=s[e];o.set(n,t),Pl(t)&&null==i.firstCategoryDimIndex&&(a.set(n,t),i.firstCategoryDimIndex=e)})}};function Pl(t){return"category"===t.get("type")}var Nl="original",Ol="arrayRows",El="objectRows",zl="keyedColumns",Rl="unknown",Bl="typedArray",Vl="column",Gl="row";function Fl(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===zl?{}:[]),this.sourceFormat=t.sourceFormat||Rl,this.seriesLayoutBy=t.seriesLayoutBy||Vl,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&E(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}Fl.seriesDataToSource=function(t){return new Fl({data:t,sourceFormat:it(t)?Bl:Nl,fromDataset:!1})},Po(Fl);var Wl=_o();function Hl(t){var e=t.option,n=e.data,i=it(n)?Bl:Nl,o=!1,a=e.seriesLayoutBy,r=e.sourceHeader,s=e.dimensions,l=function(t){var e=t.option;if(!e.data)return t.ecModel.getComponent("dataset",e.datasetIndex||0)}(t),u=(l&&(n=(u=l.option).source,i=Wl(l).sourceFormat,o=!0,a=a||u.seriesLayoutBy,null==r&&(r=u.sourceHeader),s=s||u.dimensions),function(t,e,n,i,o){if(!t)return{dimensionsDefine:Zl(o)};var a,r,s,l;e===Ol?("auto"===i||null==i?Xl(function(t){null!=t&&"-"!==t&&(T(t)?null==r&&(r=1):r=0)},n,t,10):r=i?1:0,o||1!==r||(o=[],Xl(function(t,e){o[e]=null!=t?t:""},n,t)),a=o?o.length:n===Gl?t.length:t[0]?t[0].length:null):e===El?o||(o=function(t){for(var e,n=0;n<t.length&&!(e=t[n++]););{var i;if(e)return i=[],Z(e,function(t,e){i.push(e)}),i}}(t),s=!0):e===zl?o||(o=[],s=!0,Z(t,function(t,e){o.push(e)})):e===Nl?(i=go(t[0]),a=D(i)&&i.length||1):e===Bl&&H&&P(!!o,"dimensions must be given if data is TypedArray.");return s&&Z(o,function(t,e){"name"===(k(t)?t.name:t)&&(l=e)}),{startIndex:r,dimensionsDefine:Zl(o),dimensionsDetectCount:a,potentialNameDimIndex:l}}(n,i,a,r,s)),r=e.encode;!r&&l&&(r=function(t,e,n,i,o,a){var r=Ll(t),s={},l=[],u=[],h=t.subType,c=E(["pie","map","funnel"]),d=E(["line","bar","pictorialBar","scatter","effectScatter","candlestick","boxplot"]);if(r&&null!=d.get(h)){var d=t.ecModel,t=Wl(d).datasetMap,d=e.uid+"_"+o,p=t.get(d)||t.set(d,{categoryWayDim:1,valueWayDim:0});Z(r.coordSysDims,function(t){var e;null==r.firstCategoryDimIndex?(e=p.valueWayDim++,s[t]=e,u.push(e)):r.categoryAxisMap.get(t)?l.push(s[t]=0):(e=p.categoryWayDim++,s[t]=e,u.push(e))})}else if(null!=c.get(h)){for(var g,f=0;f<5&&null==g;f++)Yl(n,i,o,a.dimensionsDefine,a.startIndex,f)||(g=f);null!=g&&(s.value=g,e=a.potentialNameDimIndex||Math.max(g-1,0),u.push(e),l.push(e))}return l.length&&(s.itemName=l),u.length&&(s.seriesName=u),s}(t,l,n,i,a,u)),Wl(t).source=new Fl({data:n,fromDataset:o,seriesLayoutBy:a,sourceFormat:i,dimensionsDefine:u.dimensionsDefine,startIndex:u.startIndex,dimensionsDetectCount:u.dimensionsDetectCount,encodeDefine:r})}function Zl(t){var i;if(t)return i=E(),I(t,function(t,e){var n;return null!=(t=O({},k(t)?t:{name: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 Xl(t,e,n,i){if(null==i&&(i=1/0),e===Gl)for(var o=0;o<n.length&&o<i;o++)t(n[o]?n[o][0]:null,o);else for(var a=n[0]||[],o=0;o<a.length&&o<i;o++)t(a[o],o)}function Yl(t,e,n,i,o,a){var r,s;if(!it(t))if(i&&(s=k(s=i[a])?s.name:s),e===Ol)if(n===Gl){for(var l=t[a],u=0;u<(l||[]).length&&u<5;u++)if(null!=(r=p(l[o+u])))return r}else for(u=0;u<t.length&&u<5;u++){var h=t[o+u];if(h&&null!=(r=p(h[a])))return r}else if(e===El){if(!s)return;for(u=0;u<t.length&&u<5;u++)if((c=t[u])&&null!=(r=p(c[s])))return r}else if(e===zl){if(!s)return;if(!(l=t[s])||it(l))return!1;for(u=0;u<l.length&&u<5;u++)if(null!=(r=p(l[u])))return r}else if(e===Nl)for(u=0;u<t.length&&u<5;u++){var c=t[u],d=go(c);if(!D(d))return!1;if(null!=(r=p(d[a])))return r}return!1;function p(t){return(null==t||!isFinite(t)||""===t)&&(!(!T(t)||"-"===t)||void 0)}}var Ul="\0_ec_inner",jl=w.extend({init:function(t,e,n,i){n=n||{},this.option=null,this._theme=new w(n),this._optionManager=i},setOption:function(t,e){P(!(Ul in t),"please use chart.getOption()"),this._optionManager.setOption(t,e),this.resetOption(null)},resetOption:function(t){var e,n=!1,i=this._optionManager;return t&&"recreate"!==t||(e=i.mountOption("recreate"===t),this.option&&"recreate"!==t?(this.restoreData(),this.mergeOption(e)):function(t){this.option={},this.option[Ul]=1,this._componentsMap=E({series:[]}),this._seriesIndices,this._seriesIndicesMap,function(n,t){var i=n.color&&!n.colorLayer;Z(t,function(t,e){"colorLayer"===e&&i||u.hasClass(e)||("object"==typeof t?n[e]=n[e]?f(n[e],t,!1):N(t):null==n[e]&&(n[e]=t))})}(t,this._theme.option),f(t,Al,!1),this.mergeOption(t)}.call(this,e),n=!0),"timeline"!==t&&"media"!==t||this.restoreData(),t&&"recreate"!==t&&"timeline"!==t||(e=i.getTimelineOption(this))&&(this.mergeOption(e),n=!0),t&&"recreate"!==t&&"media"!==t||(e=i.getMediaOption(this,this._api)).length&&Z(e,function(t){this.mergeOption(t,n=!0)},this),n},mergeOption:function(o){var s=this.option,l=this._componentsMap,n=[];Wl(this).datasetMap=E(),Z(o,function(t,e){null!=t&&(u.hasClass(e)?e&&n.push(e):s[e]=null==s[e]?N(t):f(s[e],t,!0))}),u.topologicalTravel(n,u.getAllClassMainTypes(),function(a,t){var e,n,i=ho(o[a]),i=fo(l.get(a),i),r=(mo(i),Z(i,function(t,e){var n,i=t.option;k(i)&&(t.keyInfo.mainType=a,t.keyInfo.subType=(n=a,i=i,t=t.exist,i.type||(t?t.subType:u.determineSubType(n,i))))}),e=l,D(t=t)||(t=t?[t]:[]),n={},Z(t,function(t){n[t]=(e.get(t)||[]).slice()}),n);s[a]=[],l.set(a,[]),Z(i,function(t,e){var n,i=t.exist,o=t.option;P(k(o)||i,"Empty component definition"),o?(n=u.getClass(a,t.keyInfo.subType,!0),i&&i instanceof n?(i.name=t.keyInfo.name,i.mergeOption(o,this),i.optionUpdated(o,!1)):(t=O({dependentModels:r,componentIndex:e},t.keyInfo),O(i=new n(o,this,this,t),t),i.init(o,this,this,t),i.optionUpdated(null,!0))):(i.mergeOption({},this),i.optionUpdated({},!1)),l.get(a)[e]=i,s[a][e]=i.option},this),"series"===a&&ql(this,l.get("series"))},this),this._seriesIndicesMap=E(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var i=N(this.option);return Z(i,function(t,e){if(u.hasClass(e)){for(var n=(t=ho(t)).length-1;0<=n;n--)vo(t[n])&&t.splice(n,1);i[e]=t}}),delete i[Ul],i},getTheme:function(){return this._theme},getComponent:function(t,e){t=this._componentsMap.get(t);if(t)return t[e||0]},queryComponents:function(t){var e,n,i,o,a,r,s=t.mainType;return s&&(e=t.index,n=t.id,i=t.name,o=this._componentsMap.get(s))&&o.length?Kl(null!=e?tt(I(e=D(e)?e:[e],function(t){return o[t]}),function(t){return!!t}):null!=n?(a=D(n),tt(o,function(t){return a&&0<=S(n,t.id)||!a&&t.id===n})):null!=i?(r=D(i),tt(o,function(t){return r&&0<=S(i,t.name)||!r&&t.name===i})):o.slice(),t):[]},findComponents:function(t){var e,n=t.query,i=t.mainType,o=(o=i+"Index",a=i+"Id",e=i+"Name",!n||null==n[o]&&null==n[a]&&null==n[e]?null:{mainType:i,index:n[o],id:n[a],name:n[e]}),a=Kl(o?this.queryComponents(o):this._componentsMap.get(i),t);return t.filter?tt(a,t.filter):a},eachComponent:function(t,i,o){var e=this._componentsMap;"function"==typeof t?(o=i,i=t,e.each(function(t,n){Z(t,function(t,e){i.call(o,n,t,e)})})):T(t)?Z(e.get(t),i,o):k(t)&&Z(this.findComponents(t),i,o)},getSeriesByName:function(e){return tt(this._componentsMap.get("series"),function(t){return t.name===e})},getSeriesByIndex:function(t){return this._componentsMap.get("series")[t]},getSeriesByType:function(e){return tt(this._componentsMap.get("series"),function(t){return t.subType===e})},getSeries:function(){return this._componentsMap.get("series").slice()},getSeriesCount:function(){return this._componentsMap.get("series").length},eachSeries:function(n,i){$l(this),Z(this._seriesIndices,function(t){var e=this._componentsMap.get("series")[t];n.call(i,e,t)},this)},eachRawSeries:function(t,e){Z(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(n,i,o){$l(this),Z(this._seriesIndices,function(t){var e=this._componentsMap.get("series")[t];e.subType===n&&i.call(o,e,t)},this)},eachRawSeriesByType:function(t,e,n){return Z(this.getSeriesByType(t),e,n)},isSeriesFiltered:function(t){return $l(this),null==this._seriesIndicesMap.get(t.componentIndex)},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(t,e){$l(this),ql(this,tt(this._componentsMap.get("series"),t,e))},restoreData:function(n){var i=this._componentsMap,o=(ql(this,i.get("series")),[]);i.each(function(t,e){o.push(e)}),u.topologicalTravel(o,u.getAllClassMainTypes(),function(e,t){Z(i.get(e),function(t){"series"===e&&function(t,e){{var n,i;if(e)return n=e.seiresIndex,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()})})}});function ql(t,e){t._seriesIndicesMap=E(t._seriesIndices=I(e,function(t){return t.componentIndex})||[])}function Kl(t,e){return e.hasOwnProperty("subType")?tt(t,function(t){return t.subType===e.subType}):t}function $l(t){if(H&&!t._seriesIndices)throw new Error("Option should contains series.")}i(jl,Cl);var Jl=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"];function Ql(e){Z(Jl,function(t){this[t]=A(e[t],e)},this)}var tu={};function eu(){this._coordinateSystems=[]}eu.prototype={constructor:eu,create:function(n,i){var o=[];Z(tu,function(t,e){t=t.create(n,i);o=o.concat(t||[])}),this._coordinateSystems=o},update:function(e,n){Z(this._coordinateSystems,function(t){t.update&&t.update(e,n)})},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},eu.register=function(t,e){tu[t]=e},eu.get=function(t){return tu[t]};var nu=Z,iu=N,ou=I,au=f,ru=/^(min|max)?(.+)$/;function su(t){this._api=t,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}var lu=Z,uu=k,hu=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function cu(t){var e=t&&t.itemStyle;if(e)for(var n=0,i=hu.length;n<i;n++){var o=hu[n],a=e.normal,r=e.emphasis;a&&a[o]&&(t[o]=t[o]||{},t[o].normal?f(t[o].normal,a[o]):t[o].normal=a[o],a[o]=null),r&&r[o]&&(t[o]=t[o]||{},t[o].emphasis?f(t[o].emphasis,r[o]):t[o].emphasis=r[o],r[o]=null)}}function du(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,C(t[e],i)):t[e]=i),o)&&(t.emphasis=t.emphasis||{},t.emphasis[e]=o)}function pu(t){du(t,"itemStyle"),du(t,"lineStyle"),du(t,"areaStyle"),du(t,"label"),du(t,"labelLine"),du(t,"upperLabel"),du(t,"edgeLabel")}function gu(t,e){var n=uu(t)&&t[e],i=uu(n)&&n.textStyle;if(i)for(var o=0,a=po.length;o<a;o++)i.hasOwnProperty(e=po[o])&&(n[e]=i[e])}function fu(t){t&&(pu(t),gu(t,"label"),t.emphasis)&&gu(t.emphasis,"label")}function mu(t){return D(t)?t:t?[t]:[]}function yu(t){return(D(t)?t[0]:t)||{}}function vu(e,t){lu(mu(e.series),function(t){if(uu(t))if(uu(t)){cu(t),pu(t),gu(t,"label"),gu(t,"upperLabel"),gu(t,"edgeLabel"),t.emphasis&&(gu(t.emphasis,"label"),gu(t.emphasis,"upperLabel"),gu(t.emphasis,"edgeLabel")),(n=t.markPoint)&&(cu(n),fu(n)),(i=t.markLine)&&(cu(i),fu(i));var e=t.markArea;e&&fu(e);var n,i,o=t.data;if("graph"===t.type){var o=o||t.nodes,a=t.links||t.edges;if(a&&!it(a))for(var r=0;r<a.length;r++)fu(a[r]);Z(t.categories,function(t){pu(t)})}if(o&&!it(o))for(r=0;r<o.length;r++)fu(o[r]);if((n=t.markPoint)&&n.data)for(var s=n.data,r=0;r<s.length;r++)fu(s[r]);if((i=t.markLine)&&i.data){var l=i.data;for(r=0;r<l.length;r++)D(l[r])?(fu(l[r][0]),fu(l[r][1])):fu(l[r])}"gauge"===t.type?(gu(t,"axisLabel"),gu(t,"title"),gu(t,"detail")):"treemap"===t.type?(du(t.breadcrumb,"itemStyle"),Z(t.levels,function(t){pu(t)})):"tree"===t.type&&pu(t.leaves)}});var n=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&n.push("valueAxis","categoryAxis","logAxis","timeAxis"),lu(n,function(t){lu(mu(e[t]),function(t){t&&(gu(t,"axisLabel"),gu(t.axisPointer,"label"))})}),lu(mu(e.parallel),function(t){t=t&&t.parallelAxisDefault;gu(t,"axisLabel"),gu(t&&t.axisPointer,"label")}),lu(mu(e.calendar),function(t){du(t,"itemStyle"),gu(t,"dayLabel"),gu(t,"monthLabel"),gu(t,"yearLabel")}),lu(mu(e.radar),function(t){gu(t,"name")}),lu(mu(e.geo),function(t){uu(t)&&(fu(t),lu(mu(t.regions),function(t){fu(t)}))}),lu(mu(e.timeline),function(t){fu(t),du(t,"label"),du(t,"itemStyle"),du(t,"controlStyle",!0);t=t.data;D(t)&&Z(t,function(t){k(t)&&(du(t,"label"),du(t,"itemStyle"))})}),lu(mu(e.toolbox),function(t){du(t,"iconStyle"),lu(t.feature,function(t){du(t,"iconStyle")})}),gu(yu(e.axisPointer),"label"),gu(yu(e.tooltip).axisPointer,"label")}function xu(e){Z(_u,function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])})}var _u=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],wu=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"];function bu(e,t){vu(e,t),e.series=ho(e.series),Z(e.series,function(t){if(k(t)){var e=t.type;if("pie"!==e&&"gauge"!==e||null!=t.clockWise&&(t.clockwise=t.clockWise),"gauge"===e){e=function(t,e){e=e.split(",");for(var n=t,i=0;i<e.length&&null!=(n=n&&n[e[i]]);i++);return n}(t,"pointer.color");if(null!=e){var n=t;var i="itemStyle.normal.color";var o=void 0;i=i.split(",");for(var a,r=n,s=0;s<i.length-1;s++)null==r[a=i[s]]&&(r[a]={}),r=r[a];!o&&null!=r[i[s]]||(r[i[s]]=e)}}xu(t)}}),e.dataRange&&(e.visualMap=e.dataRange),Z(wu,function(t){t=e[t];t&&Z(t=D(t)?t:[t],function(t){xu(t)})})}function Su(f){Z(f,function(u,h){var c=[],d=[NaN,NaN],t=[u.stackResultDimension,u.stackedOverDimension],p=u.data,g=u.isStackedByIndex,t=p.map(t,function(t,e,n){var i,o,a=p.get(u.stackedDimension,n);if(isNaN(a))return d;g?o=p.getRawIndex(n):i=p.get(u.stackedByDimension,n);for(var r=NaN,s=h-1;0<=s;s--){var l=f[s];if(0<=(o=g?o:l.data.rawIndexOf(l.stackedByDimension,i))){l=l.data.getByRawIndex(l.stackResultDimension,o);if(0<=a&&0<l||a<=0&&l<0){a+=l,r=l;break}}}return c[0]=a,c[1]=r,c});p.hostModel.setData(t),u.data=t})}function Mu(t,e){Fl.isInstance(t)||(t=Fl.seriesDataToSource(t)),this._source=t;var n=this._data=t.data,i=t.sourceFormat;if(i===Bl){if(H&&null==e)throw new Error("Typed array data must specify dimension size");this._offset=0,this._dimSize=e,this._data=n}e=Iu[i===Ol?i+"_"+t.seriesLayoutBy:i];H&&P(e,"Invalide sourceFormat: "+i),O(this,e)}var n=Mu.prototype,Iu=(n.pure=!(su.prototype={constructor:su,setOption:function(t,e){t&&Z(ho(t.series),function(t){t&&t.data&&it(t.data)&&pt(t.data)}),t=iu(t);var o,n=this._optionBackup,t=function(t,n,i){var e,o,a,r=[],s=[],l=t.timeline;return t.baseOption&&(o=t.baseOption),(l||t.options)&&(o=o||{},r=(t.options||[]).slice()),t.media&&(o=o||{},a=t.media,nu(a,function(t){t&&t.option&&(t.query?s.push(t):e=e||t)})),(o=o||t).timeline||(o.timeline=l),nu([o].concat(r).concat(I(s,function(t){return t.option})),function(e){nu(n,function(t){t(e,i)})}),{baseOption:o,timelineOptions:r,mediaDefault:e,mediaList:s}}.call(this,t,e,!n);this._newBaseOption=t.baseOption,n?(o=n.baseOption,e=t.baseOption,nu(e=e||{},function(t,e){var n,i;null!=t&&(n=o[e],u.hasClass(e)?(t=ho(t),i=fo(n=ho(n),t),o[e]=ou(i,function(t){return t.option&&t.exist?au(t.exist,t.option,!0):t.exist||t.option})):o[e]=au(n,t,!0))}),t.timelineOptions.length&&(n.timelineOptions=t.timelineOptions),t.mediaList.length&&(n.mediaList=t.mediaList),t.mediaDefault&&(n.mediaDefault=t.mediaDefault)):this._optionBackup=t},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=ou(e.timelineOptions,iu),this._mediaList=ou(e.mediaList,iu),this._mediaDefault=iu(e.mediaDefault),this._currentMediaIndices=[],iu(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,n=this._timelineOptions;return e=n.length&&(t=t.getComponent("timeline"))?iu(n[t.getCurrentIndex()]):e},getMediaOption:function(t){var e,n,i=this._api.getWidth(),o=this._api.getHeight(),a=this._mediaList,r=this._mediaDefault,s=[],l=[];if(a.length||r){for(var u=0,h=a.length;u<h;u++)!function(t,e,n){var i={width:e,height:n,aspectratio:e/n},o=!0;return Z(t,function(t,e){var n,e=e.match(ru);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}(a[u].query,i,o)||s.push(u);(s=!s.length&&r?[-1]:s).length&&(e=s,n=this._currentMediaIndices,e.join(",")!==n.join(","))&&(l=ou(s,function(t){return iu((-1===t?r:a[t]).option)})),this._currentMediaIndices=s}return l}}),{arrayRows_column:{pure:n.persistent=!0,count:function(){return Math.max(0,this._data.length-this._source.startIndex)},getItem:function(t){return this._data[t+this._source.startIndex]},appendData:Du},arrayRows_row:{pure:!0,count:function(){var t=this._data[0];return t?Math.max(0,t.length-this._source.startIndex):0},getItem:function(t){t+=this._source.startIndex;for(var e=[],n=this._data,i=0;i<n.length;i++){var o=n[i];e.push(o?o[t]:null)}return e},appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},objectRows:{pure:!0,count:Tu,getItem:Au,appendData:Du},keyedColumns:{pure:!0,count:function(){var t=this._source.dimensionsDefine[0].name,t=this._data[t];return t?t.length:0},getItem:function(t){for(var e=[],n=this._source.dimensionsDefine,i=0;i<n.length;i++){var o=this._data[n[i].name];e.push(o?o[t]:null)}return e},appendData:function(t){var o=this._data;Z(t,function(t,e){for(var n=o[e]||(o[e]=[]),i=0;i<(t||[]).length;i++)n.push(t[i])})}},original:{count:Tu,getItem:Au,appendData:Du},typedArray:{persistent:!(n.getSource=function(){return this._source}),pure:!0,count:function(){return this._data?this._data.length/this._dimSize:0},getItem:function(t,e){t-=this._offset,e=e||[];for(var n=this._dimSize*t,i=0;i<this._dimSize;i++)e[i]=this._data[n+i];return e},appendData:function(t){H&&P(it(t),"Added data must be TypedArray if data in initialization is TypedArray"),this._data=t},clean:function(){this._offset+=this.count(),this._data=null}}});function Tu(){return this._data.length}function Au(t){return this._data[t]}function Du(t){for(var e=0;e<t.length;e++)this._data.push(t[e])}var Cu={arrayRows:Lu,objectRows:function(t,e,n,i){return null!=n?t[i]:t},keyedColumns:Lu,original:function(t,e,n,i){t=go(t);return null!=n&&t instanceof Array?t[n]:t},typedArray:Lu};function Lu(t,e,n,i){return null!=n?t[n]:t}var ku={arrayRows:Pu,objectRows:function(t,e,n,i){return Nu(t[e],this._dimensionInfos[e])},keyedColumns:Pu,original:function(t,e,n,i){var o=t&&(null==t.value?t:t.value);return this._rawData.pure||!so(t=t)||t instanceof Array||(this.hasItemOption=!0),Nu(o instanceof Array?o[i]:o,this._dimensionInfos[e])},typedArray:function(t,e,n,i){return t[i]}};function Pu(t,e,n,i){return Nu(t[i],this._dimensionInfos[e])}function Nu(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?+Xs(t):t)||""===t?NaN:+t}function Ou(t,e,n){if(t){var i,o,a,r=t.getRawDataItem(e);if(null!=r)return a=t.getProvider().getSource().sourceFormat,(t=t.getDimensionInfo(n))&&(i=t.name,o=t.index),Cu[a](r,e,o,i)}}function Eu(t,e,n){if(t){var i=t.getProvider().getSource().sourceFormat;if(i===Nl||i===El)return t=t.getRawDataItem(e),(t=i!==Nl||k(t)?t:null)?t[n]:void 0}}var zu=/\{@(.+?)\}/g,Ds={getDataParams:function(t,e){var n=this.getData(e),i=this.getRawValue(t,e),o=n.getRawIndex(t),a=n.getName(t),r=n.getRawDataItem(t),n=n.getItemVisual(t,"color"),t=this.ecModel.getComponent("tooltip"),t=Io(t&&t.get("renderMode")),s=this.mainType,l="series"===s;return{componentType:s,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:l?this.subType:null,seriesIndex:this.seriesIndex,seriesId:l?this.id:null,seriesName:l?this.name:null,name:a,dataIndex:o,data:r,dataType:e,value:i,color:n,marker:sl({color:n,renderMode:t}),$vars:["seriesName","name","value"]}},getFormattedLabel:function(i,t,e,n,o){t=t||"normal";var a=this.getData(e),r=a.getItemModel(i),e=this.getDataParams(i,e),n=(null!=n&&e.value instanceof Array&&(e.value=e.value[n]),r.get("normal"===t?[o||"label","formatter"]:[t,o||"label","formatter"]));return"function"==typeof n?(e.status=t,n(e)):"string"==typeof n?al(n,e).replace(zu,function(t,e){var n=e.length;return"["===e.charAt(0)&&"]"===e.charAt(n-1)&&(e=+e.slice(1,n-1)),Ou(a,i,e)}):void 0},getRawValue:function(t,e){return Ou(this.getData(e),t)},formatTooltip:function(){}};function Ru(t){return new Bu(t)}function Bu(t){this._reset=(t=t||{}).reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0,this.context}var Vu,Gu,Fu,Wu,Hu,Zu,e=Bu.prototype,Xu=(e.perform=function(t){var e=this._upstream,n=t&&t.skip;this._dirty&&e&&((a=this.context).data=a.outputData=e.context.outputData),this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!n&&(h=this._plan(this.context));var i,o,a=u(this._modBy),r=this._modDataCount||0,s=u(t&&t.modBy),l=t&&t.modDataCount||0;function u(t){return t=1<=t?t:1}a===s&&r===l||(h="reset"),!this._dirty&&"reset"!==h||(this._dirty=!1,a=n,(r=this)._dueIndex=r._outputDueEnd=r._dueEnd=0,r._settedOutputEnd=null,!a&&r._reset&&((i=r._reset(r.context))&&i.progress&&(o=i.forceFirstProgress,i=i.progress),D(i))&&!i.length&&(i=null),r._progress=i,r._modBy=r._modDataCount=null,(a=r._downstream)&&a.dirty(),i=o),this._modBy=s,this._modDataCount=l;var h=t&&t.step;if(e?(H&&P(null!=e._outputDueEnd),this._dueEnd=e._outputDueEnd):(H&&P(!this._progress||this._count),this._dueEnd=this._count?this._count(this.context):1/0),this._progress){var c=this._dueIndex,d=Math.min(null!=h?this._dueIndex+h:1/0,this._dueEnd);if(!n&&(i||c<d)){var p=this._progress;if(D(p))for(var g=0;g<p.length;g++)ju(this,p[g],c,d,s,l);else ju(this,p,c,d,s,l)}this._dueIndex=d;r=null!=this._settedOutputEnd?this._settedOutputEnd:d;H&&P(r>=this._outputDueEnd),this._outputDueEnd=r}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()},Zu={reset:function(t,e,n,i){Gu=t,Vu=e,Fu=n,Wu=i,Hu=Math.ceil(Wu/Fu),Zu.next=1<Fu&&0<Wu?Uu:Yu}});function Yu(){return Gu<Vu?Gu++:null}function Uu(){var t=Gu%Hu*Fu+Math.ceil(Gu/Hu),t=Vu<=Gu?null:t<Wu?t:Gu;return Gu++,t}function ju(t,e,n,i,o,a){Xu.reset(n,i,o,a),t._callingProgress=e,t._callingProgress({start:n,end:i,count:i-n,next:Xu.next},t.context)}e.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},e.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},e.pipe=function(t){H&&P(t&&!t._disposed&&t!==this),this._downstream===t&&!this._dirty||((this._downstream=t)._upstream=this,t.dirty())},e.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},e.getUpstream=function(){return this._upstream},e.getDownstream=function(){return this._downstream},e.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t};var qu=_o(),Ku=u.extend({type:"series.__base__",seriesIndex:0,coordinateSystem:null,defaultOption:null,legendDataProvider:null,visualColorAccessPath:"itemStyle.color",layoutMode:null,init:function(t,e,n,i){this.seriesIndex=this.componentIndex,this.dataTask=Ru({count:Ju,reset:Qu}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n),Hl(this);t=this.getInitialData(t,n);eh(t,this),this.dataTask.context.data=t,H&&P(t,"getInitialData returned invalid data."),qu(this).dataBeforeProcessed=t,$u(this)},mergeDefaultAndTheme:function(t,e){var n=this.layoutMode,i=n?_l(t):{},o=this.subType;u.hasClass(o),f(t,e.getTheme().get(this.subType)),f(t,this.getDefaultOption()),co(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&xl(t,i,n)},mergeOption:function(t,e){t=f(this.option,t,!0),this.fillDataTextStyle(t.data);var n=this.layoutMode,n=(n&&xl(this.option,t,n),Hl(this),this.getInitialData(t,e));eh(n,this),this.dataTask.dirty(),this.dataTask.context.data=n,qu(this).dataBeforeProcessed=n,$u(this)},fillDataTextStyle:function(t){if(t&&!it(t))for(var e=["show"],n=0;n<t.length;n++)t[n]&&t[n].label&&co(t[n],"label",e)},getInitialData:function(){},appendData:function(t){this.getRawData().appendData(t.data)},getData:function(t){var e=ih(this);return e?(e=e.context.data,null==t?e:e.getLinkedData(t)):qu(this).data},setData:function(t){var e,n=ih(this);n&&((e=n.context).data!==t&&n.modifyOutputEnd&&n.setOutputEnd(t.count()),e.outputData=t,n!==this.dataTask)&&(e.data=t),qu(this).data=t},getSource:function(){return Wl(this).source},getRawData:function(){return qu(this).dataBeforeProcessed},getBaseAxis:function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},formatTooltip:function(n,s,t,l){var u=this,e="html"===(l=l||"html")?"<br/>":"\n",h="richText"===l,c={},d=0;var p=this.getData(),i=p.mapDimension("defaultedTooltip",!0),o=i.length,a=this.getRawValue(n),r=D(a),g=(g=k(g=p.getItemVisual(n,"color"))&&g.colorStops?(g.colorStops[0]||{}).color:g)||"transparent",r=(1<o||r&&!o?function(t){var a=Q(t,function(t,e,n){n=p.getDimensionInfo(n);return t|(n&&!1!==n.tooltip&&null!=n.displayName)},0),r=[];function e(t,e){var n,i,o,e=p.getDimensionInfo(e);e&&!1!==e.otherDims.tooltip&&(n=e.type,i="sub"+u.seriesIndex+"at"+d,o="string"==typeof(o=sl({color:g,type:"subItem",renderMode:l,markerId:i}))?o:o.content,(o=(a?o+nl(e.displayName||"-")+": ":"")+nl("ordinal"===n?t+"":"time"===n?s?"":ul("yyyy/MM/dd hh:mm:ss",t):$s(t)))&&r.push(o),h)&&(c[i]=g,++d)}i.length?Z(i,function(t){e(Ou(p,n,t),t)}):Z(t,e);t=a?h?"\n":"<br/>":"",t+=r.join(t||", ");return{renderMode:l,content:t,style:c}}(a):(o=o?Ou(p,n,i[0]):r?a[0]:a,{renderMode:l,content:nl($s(o)),style:c})).content,a=u.seriesIndex+"at"+d,o=sl({color:g,type:"item",renderMode:l,markerId:a}),a=(c[a]=g,++d,p.getName(n)),f=this.name,e=(f=(f=yo(this)?f:"")?nl(f)+(s?": ":e):"","string"==typeof o?o:o.content);return{html:s?e+f+r:f+e+(a?nl(a)+": "+r:r),markers:c}},isAnimationEnabled:function(){var t;return!(y.node||(t=this.getShallow("animation"))&&this.getData().count()>this.getShallow("animationThreshold"))&&t},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(t,e,n){var i=this.ecModel;return Cl.getColorFromPalette.call(this,t,e,n)||i.getColorFromPalette(t,e,n)},coordDimToDataDim:function(t){return this.getRawData().mapDimension(t,!0)},getProgressive:function(){return this.get("progressive")},getProgressiveThreshold:function(){return this.get("progressiveThreshold")},getAxisTooltipData:null,getTooltipPosition:null,pipeTask:null,preventIncremental:null,pipelineContext:null});function $u(t){var e,n,i=t.name;yo(t)||(t.name=(t=(e=(t=t).getRawData()).mapDimension("seriesName",!0),n=[],Z(t,function(t){t=e.getDimensionInfo(t);t.displayName&&n.push(t.displayName)}),n.join(" ")||i))}function Ju(t){return t.model.getRawData().count()}function Qu(t){t=t.model;return t.setData(t.getRawData().cloneShallow()),th}function th(t,e){t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function eh(e,n){Z(e.CHANGABLE_METHODS,function(t){e.wrapMethod(t,L(nh,n))})}function nh(t){t=ih(t);t&&t.setOutputEnd(this.count())}function ih(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}i(Ku,Ds),i(Ku,Cl);var oh=function(){this.group=new R,this.uid=Ns("viewComponent")},n=(oh.prototype={constructor:oh,init:function(t,e){},render:function(t,e,n,i){},dispose:function(){},filterForExposedEvent:null},oh.prototype);function ah(){var a=_o();return function(t){var e=a(t),t=t.pipelineContext,n=e.large,i=e.progressiveRender,o=e.large=t.large,e=e.progressiveRender=t.progressiveRender;return!!(n^o||i^e)&&"reset"}}n.updateView=n.updateLayout=n.updateVisual=function(t,e,n,i){},Lo(oh),Eo(oh,{registerWhenExtend:!0});var rh=_o(),sh=ah();function lh(){this.group=new R,this.uid=Ns("viewChart"),this.renderTask=Ru({plan:ch,reset:dh}),this.renderTask.context={view:this}}e=lh.prototype={type:"chart",init:function(t,e){},render:function(t,e,n,i){},highlight:function(t,e,n,i){hh(t.getData(),i,"emphasis")},downplay:function(t,e,n,i){hh(t.getData(),i,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};function uh(t,e){if(t&&(t.trigger(e),"group"===t.type))for(var n=0;n<t.childCount();n++)uh(t.childAt(n),e)}function hh(e,t,n){t=xo(e,t);null!=t?Z(ho(t),function(t){uh(e.getItemGraphicEl(t),n)}):e.eachItemGraphicEl(function(t){uh(t,n)})}function ch(t){return sh(t.model)}function dh(t){var e=t.model,n=t.ecModel,i=t.api,o=t.payload,a=e.pipelineContext.progressiveRender,t=t.view,r=o&&rh(o).updateMethod,a=a?"incrementalPrepareRender":r&&t[r]?r:"render";return"render"!==a&&t[a](e,n,i,o),ph[a]}e.updateView=e.updateLayout=e.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},Lo(lh,["dispose"]),Eo(lh,{registerWhenExtend:!0}),lh.markUpdateMethod=function(t,e){rh(t).updateMethod=e};var ph={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)}}},gh="\0__throttleOriginMethod",fh="\0__throttleRate",mh="\0__throttleType";function yh(t,n,i){var o,a,r,s,l,u=0,h=0,c=null;function d(){h=(new Date).getTime(),c=null,t.apply(r,s||[])}n=n||0;function e(){o=(new Date).getTime(),r=this,s=arguments;var t=l||n,e=l||i;l=null,a=o-(e?u:h)-t,clearTimeout(c),e?c=setTimeout(d,t):0<=a?d():c=setTimeout(d,-a),u=o}return e.clear=function(){c&&(clearTimeout(c),c=null)},e.debounceNextCall=function(t){l=t},e}function vh(t,e,n,i){var o=t[e];if(o){var a=o[gh]||o,r=o[mh];if(o[fh]!==n||r!==i){if(null==n||!i)return t[e]=a;(o=t[e]=yh(a,n,"debounce"===i))[gh]=a,o[mh]=i,o[fh]=n}return o}}function xh(t,e){var n=t[e];n&&n[gh]&&(t[e]=n[gh])}var n={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),i=(e.visualColorAccessPath||"itemStyle.color").split("."),o=e.get(i)||e.getColorFromPalette(e.name,null,t.getSeriesCount());if(n.setVisual("color",o),!t.isSeriesFiltered(e))return"function"!=typeof o||o instanceof Tr||n.each(function(t){n.setItemVisual(t,"color",o(e.getDataParams(t)))}),{dataEach:n.hasItemOption?function(t,e){var n=t.getItemModel(e).get(i,!0);null!=n&&t.setItemVisual(e,"color",n)}:null}}},_h={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 wh=Math.PI;function bh(t,e,n,i){this.ecInstance=t,this.api=e,this.unfinished,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i),this._stageTaskMap=E()}e=bh.prototype;function Sh(s,t,l,u,h){var c;function d(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}h=h||{},Z(t,function(i,t){var e,n,o,a,r;h.visualType&&h.visualType!==i.visualType||(e=(n=s._stageTaskMap.get(i.uid)).seriesTaskMap,(n=n.overallTask)?((a=n.agentStubMap).each(function(t){d(h,t)&&(t.dirty(),o=!0)}),o&&n.dirty(),Mh(n,u),r=s.getPerformArgs(n,h.block),a.each(function(t){t.perform(r)}),c|=n.perform(r)):e&&e.each(function(t,e){d(h,t)&&t.dirty();var n=s.getPerformArgs(t,h.block);n.skip=!i.performRawSeries&&l.isSeriesFiltered(t.context.model),Mh(t,u),c|=t.perform(n)}))}),s.unfinished|=c}e.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(t){t=t.overallTask;t&&t.dirty()})},e.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}},e.getPipeline=function(t){return this._pipelineMap.get(t)},e.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}},e.restorePipelines=function(t){var i=this,o=i._pipelineMap=E();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}),Oh(i,t,t.dataTask)})},e.prepareStageTasks=function(){var x=this._stageTaskMap,_=this.ecInstance.getModel(),w=this.api;Z(this._allHandlers,function(t){var i,o,a,e,r,s,n,l,u,h,c,d,p,g,f,m=x.get(t.uid)||x.set(t.uid,[]);function y(t){var e=t.uid,n=a.get(e);n||(n=a.set(e,Ru({reset:Th,onDirty:Dh})),o.dirty()),n.context={model:t,overallProgress:r,modifyOutputEnd:s},n.agent=o,n.__block=r,Oh(i,t,n)}function v(t){var e=t.uid,e=p.get(e)||p.set(e,Ru({plan:Ch,reset:Lh,count:Nh}));e.context={model:t,ecModel:c,api:d,useClearVisual:u.isVisual&&!u.isLayout,plan:u.plan,reset:u.reset,scheduler:l},Oh(l,t,e)}t.reset&&(l=this,u=t,c=_,d=w,p=(h=m).seriesTaskMap||(h.seriesTaskMap=E()),h=u.seriesType,g=u.getTargetSeries,u.createOnAllSeries?c.eachRawSeries(v):h?c.eachRawSeriesByType(h,v):g&&g(c,d).each(v),f=l._pipelineMap,p.each(function(t,e){f.get(e)||(t.dispose(),p.removeKey(e))})),t.overallReset&&(i=this,h=t,g=_,t=w,(o=(m=m).overallTask=m.overallTask||Ru({reset:Ih})).context={ecModel:g,api:t,overallReset:h.overallReset,scheduler:i},a=o.agentStubMap=o.agentStubMap||E(),m=h.seriesType,e=h.getTargetSeries,r=!0,s=h.modifyOutputEnd,m?g.eachRawSeriesByType(m,y):e?e(g,t).each(y):(r=!1,Z(g.getSeries(),y)),n=i._pipelineMap,a.each(function(t,e){n.get(e)||(t.dispose(),o.dirty(),a.removeKey(e))}))},this)},e.prepareView=function(t,e,n,i){var o=t.renderTask,a=o.context;a.model=e,a.ecModel=n,a.api=i,o.__block=!t.incrementalPrepareRender,Oh(this,e,o)},e.performDataProcessorTasks=function(t,e){Sh(this,this._dataProcessorHandlers,t,e,{block:!0})},e.performVisualTasks=function(t,e,n){Sh(this,this._visualHandlers,t,e,n)},e.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e|=t.dataTask.perform()}),this.unfinished|=e},e.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}}while(e=e.getUpstream())})};var Mh=e.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)};function Ih(t){t.overallReset(t.ecModel,t.api,t.payload)}function Th(t,e){return t.overallProgress&&Ah}function Ah(){this.agent.dirty(),this.getDownstream().dirty()}function Dh(){this.agent&&this.agent.dirty()}function Ch(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function Lh(t){t.useClearVisual&&t.data.clearAllVisual();t=t.resetDefines=ho(t.reset(t.model,t.ecModel,t.api,t.payload));return 1<t.length?I(t,function(t,e){return Ph(e)}):kh}var kh=Ph(0);function Ph(a){return function(t,e){var n=e.data,i=e.resetDefines[a];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 Nh(t){return t.data.count()}function Oh(t,e,n){e=e.uid,t=t._pipelineMap.get(e);t.head||(t.head=n),t.tail&&t.tail.pipe(n),(t.tail=n).__idxInPipeline=t.count++,n.__pipeline=t}bh.wrapStageHandler=function(t,e){return(t=et(t)?{overallReset:t,seriesType:function(t){Eh=null;try{t(zh,Rh)}catch(t){}return Eh}(t)}:t).uid=Ns("stageHandler"),e&&(t.visualType=e),t};var Eh,zh={},Rh={};function Bh(t,e){for(var n in e.prototype)t[n]=yt}Bh(zh,jl),Bh(Rh,Ql),zh.eachSeriesByType=zh.eachRawSeriesByType=function(t){Eh=t},zh.eachComponent=function(t){"series"===t.mainType&&t.subType&&(Eh=t.subType)};function Vh(){return{axisLine:{lineStyle:{color:Gh}},axisTick:{lineStyle:{color:Gh}},axisLabel:{textStyle:{color:Gh}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:Gh}}}}var e=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],e={color:e,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],e]},Gh="#eee",Fh=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],Fh={color:Fh,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:Gh},crossStyle:{color:Gh}}},legend:{textStyle:{color:Gh}},textStyle:{color:Gh},title:{textStyle:{color:Gh}},toolbox:{iconStyle:{normal:{borderColor:Gh}}},dataZoom:{textStyle:{color:Gh}},visualMap:{textStyle:{color:Gh}},timeline:{lineStyle:{color:Gh},itemStyle:{normal:{color:Fh[1]}},label:{normal:{textStyle:{color:Gh}}},controlStyle:{normal:{color:Gh,borderColor:Gh}}},timeAxis:Vh(),logAxis:Vh(),valueAxis:Vh(),categoryAxis:Vh(),line:{symbol:"circle"},graph:{color:Fh},gauge:{title:{textStyle:{color:Gh}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}},Wh=(Fh.categoryAxis.splitLine.show=!1,u.extend({type:"dataset",defaultOption:{seriesLayoutBy:Vl,sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){var t=this,e=t.option.source,n=Rl;if(it(e))n=Bl;else if(D(e)){0===e.length&&(n=Ol);for(var i=0,o=e.length;i<o;i++){var a=e[i];if(null!=a){if(D(a)){n=Ol;break}if(k(a)){n=El;break}}}}else if(k(e)){for(var r in e)if(e.hasOwnProperty(r)&&J(e[r])){n=zl;break}}else if(null!=e)throw new Error("Invalid data");Wl(t).sourceFormat=n}}),oh.extend({type:"dataset"}),r.extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(t,e){var n=e.cx,i=e.cy,o=e.rx,e=e.ry,a=.5522848*o,r=.5522848*e;t.moveTo(n-o,i),t.bezierCurveTo(n-o,i-r,n-a,i-e,n,i-e),t.bezierCurveTo(n+a,i-e,n+o,i-r,n+o,i),t.bezierCurveTo(n+o,i+r,n+a,i+e,n,i+e),t.bezierCurveTo(n-a,i+e,n-o,i+r,n-o,i),t.closePath()}})),Hh=/[\s,]+/;function Zh(t){for(9===(t=T(t)?(new DOMParser).parseFromString(t,"text/xml"):t).nodeType&&(t=t.firstChild);"svg"!==t.nodeName.toLowerCase()||1!==t.nodeType;)t=t.nextSibling;return t}function Xh(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}Xh.prototype.parse=function(t,e){e=e||{};t=Zh(t);if(!t)throw new Error("Illegal svg");var n=new R,i=(this._root=n,t.getAttribute("viewBox")||""),o=parseFloat(t.getAttribute("width")||e.width),a=parseFloat(t.getAttribute("height")||e.height);isNaN(o)&&(o=null),isNaN(a)&&(a=null),$h(t,n,null,!0);for(var r,s,l=t.firstChild;l;)this._parseNode(l,n),l=l.nextSibling;return(r=i&&4<=(t=ct(i).split(Hh)).length?{x:parseFloat(t[0]||0),y:parseFloat(t[1]||0),width:parseFloat(t[2]),height:parseFloat(t[3])}:r)&&null!=o&&null!=a&&(s=nc(r,o,a),!e.ignoreViewBox)&&(i=n,(n=new R).add(i),i.scale=s.scale.slice(),i.position=s.position.slice()),e.ignoreRootClip||null==o||null==a||n.setClipPath(new V({shape:{x:0,y:0,width:o,height:a}})),{root:n,width:o,height:a,viewBoxRect:r,viewBoxTransform:s}},Xh.prototype._parseNode=function(t,e){var n,i,o,a,r=t.nodeName.toLowerCase();"defs"===r?this._isDefine=!0:"text"===r&&(this._isText=!0),this._isDefine?(i=Uh[r])&&(o=i.call(this,t),a=t.getAttribute("id"))&&(this._defs[a]=o):(i=Yh[r])&&(n=i.call(this,t,e),e.add(n));for(var s=t.firstChild;s;)1===s.nodeType&&this._parseNode(s,n),3===s.nodeType&&this._isText&&this._parseText(s,n),s=s.nextSibling;"defs"===r?this._isDefine=!1:"text"===r&&(this._isText=!1)},Xh.prototype._parseText=function(t,e){1===t.nodeType&&(n=t.getAttribute("dx")||0,i=t.getAttribute("dy")||0,this._textX+=parseFloat(n),this._textY+=parseFloat(i));var n=new B({style:{text:t.textContent,transformText:!0},position:[this._textX||0,this._textY||0]}),i=(jh(e,n),$h(t,n,this._defs),n.style.fontSize),t=(i&&i<9&&(n.style.fontSize=9,n.scale=n.scale||[1,1],n.scale[0]*=i/9,n.scale[1]*=i/9),n.getBoundingRect());return this._textX+=t.width,e.add(n),n};var Yh={g:function(t,e){var n=new R;return jh(e,n),$h(t,n,this._defs),n},rect:function(t,e){var n=new V;return jh(e,n),$h(t,n,this._defs),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},circle:function(t,e){var n=new hr;return jh(e,n),$h(t,n,this._defs),n.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),r:parseFloat(t.getAttribute("r")||0)}),n},line:function(t,e){var n=new Sr;return jh(e,n),$h(t,n,this._defs),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},ellipse:function(t,e){var n=new Wh;return jh(e,n),$h(t,n,this._defs),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},polygon:function(t,e){var n=(n=t.getAttribute("points"))&&qh(n),n=new yr({shape:{points:n||[]}});return jh(e,n),$h(t,n,this._defs),n},polyline:function(t,e){var n=new r;jh(e,n),$h(t,n,this._defs);e=(e=t.getAttribute("points"))&&qh(e);return new vr({shape:{points:e||[]}})},image:function(t,e){var n=new Ri;return jh(e,n),$h(t,n,this._defs),n.setStyle({image:t.getAttribute("xlink:href"),x:t.getAttribute("x"),y:t.getAttribute("y"),width:t.getAttribute("width"),height:t.getAttribute("height")}),n},text:function(t,e){var n=t.getAttribute("x")||0,i=t.getAttribute("y")||0,o=t.getAttribute("dx")||0,a=t.getAttribute("dy")||0,n=(this._textX=parseFloat(n)+parseFloat(o),this._textY=parseFloat(i)+parseFloat(a),new R);return jh(e,n),$h(t,n,this._defs),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 R;return jh(e,o),$h(t,o,this._defs),this._textX+=n,this._textY+=i,o},path:function(t,e){var n=ur(t.getAttribute("d")||"");return jh(e,n),$h(t,n,this._defs),n}},Uh={lineargradient:function(t){for(var e,n,i=parseInt(t.getAttribute("x1")||0,10),o=parseInt(t.getAttribute("y1")||0,10),a=parseInt(t.getAttribute("x2")||10,10),r=parseInt(t.getAttribute("y2")||0,10),i=new Ar(i,o,a,r),s=i,l=t.firstChild;l;)1===l.nodeType&&(e=0<(e=l.getAttribute("offset")).indexOf("%")?parseInt(e,10)/100:e?parseFloat(e):0,n=l.getAttribute("stop-color")||"#000000",s.addColorStop(e,n)),l=l.nextSibling;return i},radialgradient:function(t){}};function jh(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),C(e.__inheritedStyle,t.__inheritedStyle))}function qh(t){for(var e=ct(t).split(Hh),n=[],i=0;i<e.length;i+=2){var o=parseFloat(e[i]),a=parseFloat(e[i+1]);n.push([o,a])}return n}var Kh={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-align":"textAlign","alignment-baseline":"textBaseline"};function $h(t,e,n,i){var o,a=e.__inheritedStyle||{},r="text"===e.type;if(1===t.nodeType&&(function(t,e){t=t.getAttribute("transform");if(t){t=t.replace(/,/g," ");var n=null,i=[];t.replace(tc,function(t,e,n){i.push(e,n)});for(var o=i.length-1;0<o;o-=2){var a=i[o],r=i[o-1];switch(n=n||se(),r){case"translate":a=ct(a).split(Hh),ce(n,n,[parseFloat(a[0]),parseFloat(a[1]||0)]);break;case"scale":a=ct(a).split(Hh),pe(n,n,[parseFloat(a[0]),parseFloat(a[1]||a[0])]);break;case"rotate":a=ct(a).split(Hh),de(n,n,parseFloat(a[0]));break;case"skew":a=ct(a).split(Hh),console.warn("Skew transform is not supported yet");break;case"matrix":a=ct(a).split(Hh),n[0]=parseFloat(a[0]),n[1]=parseFloat(a[1]),n[2]=parseFloat(a[2]),n[3]=parseFloat(a[3]),n[4]=parseFloat(a[4]),n[5]=parseFloat(a[5])}}e.setLocalTransform(n)}}(t,e),O(a,function(t){var e=t.getAttribute("style"),n={};if(e){var i,o,a={};for(ec.lastIndex=0;null!=(i=ec.exec(e));)a[i[1]]=i[2];for(o in Kh)Kh.hasOwnProperty(o)&&null!=a[o]&&(n[Kh[o]]=a[o])}return n}(t)),!i))for(var s in Kh)Kh.hasOwnProperty(s)&&null!=(o=t.getAttribute(s))&&(a[Kh[s]]=o);var i=r?"textFill":"fill",l=r?"textStroke":"stroke",u=(e.style=e.style||new On,e.style);null!=a.fill&&u.set(i,Qh(a.fill,n)),null!=a.stroke&&u.set(l,Qh(a.stroke,n)),Z(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(t){null!=a[t]&&u.set("lineWidth"===t&&r?"textStrokeWidth":t,parseFloat(a[t]))}),a.textBaseline&&"auto"!==a.textBaseline||(a.textBaseline="alphabetic"),"alphabetic"===a.textBaseline&&(a.textBaseline="bottom"),"start"===a.textAlign&&(a.textAlign="left"),"end"===a.textAlign&&(a.textAlign="right"),Z(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],function(t){null!=a[t]&&u.set(t,a[t])}),a.lineDash&&(e.style.lineDash=ct(a.lineDash).split(Hh)),u[l]&&"none"!==u[l]&&(e[l]=!0),e.__inheritedStyle=a}var Jh=/url\(\s*#(.*?)\)/;function Qh(t,e){var n=e&&t&&t.match(Jh);return n?e[ct(n[1])]:t}var tc=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g;var ec=/([^\s:;]+)\s*:\s*([^:;]+)/g;function nc(t,e,n){var i=e/t.width,o=n/t.height,i=Math.min(i,o);return{scale:[i,i],position:[-(t.x+t.width/2)*i+e/2,-(t.y+t.height/2)*i+n/2]}}var ic=E(),oc=function(t,e,n){e=D(e)?e:e.svg?[{type:"svg",source:e.svg,specialAreas:e.specialAreas}]:(e.geoJson&&!e.features&&(n=e.specialAreas,e=e.geoJson),[{type:"geoJSON",source:e,specialAreas:n}]);return Z(e,function(t){var e=t.type,n=("geoJson"===e&&(e=t.type="geoJSON"),rc[e]);H&&P(n,"Illegal map type: "+e),n(t)}),ic.set(t,e)},ac=function(t){return ic.get(t)},rc={geoJSON:function(t){var e=t.source;t.geoJSON=T(e)?"undefined"!=typeof JSON&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")():e},svg:function(t){t.svgXML=Zh(t.source)}},sc=P,lc=Z,uc=et,hc=k,cc=u.parseClassType,dc={zrender:"4.0.6"},pc={PROCESSOR:{FILTER:1e3,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,GLOBAL:2e3,CHART:3e3,COMPONENT:4e3,BRUSH:5e3}},gc="__flagInMainProcess",fc="__optionUpdated",mc=/^[a-zA-Z0-9_]+$/;function yc(i){return function(t,e,n){t=t&&t.toLowerCase(),Wt.prototype[i].call(this,t,e,n)}}function vc(){Wt.call(this)}function xc(t,e,n){n=n||{},"string"==typeof e&&(e=Wc[e]),this.id,this.group,this._dom=t;var i,o,a,r="canvas",t=(H&&(r=("undefined"==typeof window?global:window).__ECHARTS__DEFAULT__RENDERER__||r),this._zr=oo(t,{renderer:n.renderer||r,devicePixelRatio:n.devicePixelRatio,width:n.width,height:n.height})),n=(this._throttledZrFlush=yh(A(t.flush,t),17),(e=N(e))&&bu(e,!0),this._theme=e,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new eu,this._api=(r=(i=this)._coordSysMgr,O(new Ql(i),{getCoordinateSystems:A(r.getCoordinateSystems,r),getComponentByElement:function(t){for(;t;){var e=t.__ecComponentInfo;if(null!=e)return i._model.getComponent(e.mainType,e.index);t=t.parent}}})));function s(t,e){return t.__prio-e.__prio}Cn(Fc,s),Cn(Bc,s),this._scheduler=new bh(this,n,Bc,Fc),Wt.call(this,this._ecEventProcessor=new Ec),this._messageCenter=new vc,this._initEvents(),this.resize=A(this.resize,this),this._pendingActions=[],t.animation.on("frame",this._onframe,this),a=this,(o=t).on("rendered",function(){a.trigger("rendered"),!o.animation.isFinished()||a[fc]||a._scheduler.unfinished||a._pendingActions.length||a.trigger("finished")}),pt(this)}vc.prototype.on=yc("on"),vc.prototype.off=yc("off"),vc.prototype.one=yc("one"),i(vc,Wt);var o=xc.prototype;function _c(t,e,n){var i=this._model,o=this._coordSysMgr.getCoordinateSystems();e=bo(i,e);for(var a=0;a<o.length;a++){var r=o[a];if(r[t]&&null!=(r=r[t](i,e,n)))return r}H&&console.warn("No coordinate system that supports "+t+" found by the given finder.")}o._onframe=function(){if(!this._disposed){var t=this._scheduler;if(this[fc]){var e=this[fc].silent;this[gc]=!0,bc(this),wc.update.call(this),this[gc]=!1,this[fc]=!1,Tc.call(this,e),Ac.call(this,e)}else if(t.unfinished){var n=1,i=this._model,o=this._api;t.unfinished=!1;do{var a=+new Date}while(t.performSeriesTasks(i),t.performDataProcessorTasks(i),Mc(this,i),t.performVisualTasks(i),kc(this,this._model,0,"remain"),0<(n-=+new Date-a)&&t.unfinished);t.unfinished||this._zr.flush()}}},o.getDom=function(){return this._dom},o.getZr=function(){return this._zr},o.setOption=function(t,e,n){var i,o,a;H&&sc(!this[gc],"`setOption` should not be called during main process."),hc(e)&&(n=e.lazyUpdate,i=e.silent,e=e.notMerge),this[gc]=!0,this._model&&!e||(e=new su(this._api),o=this._theme,(a=this._model=new jl(null,null,o,e)).scheduler=this._scheduler,a.init(null,null,o,e)),this._model.setOption(t,Vc),n?(this[fc]={silent:i},this[gc]=!1):(bc(this),wc.update.call(this),this._zr.flush(),this[fc]=!1,this[gc]=!1,Tc.call(this,i),Ac.call(this,i))},o.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},o.getModel=function(){return this._model},o.getOption=function(){return this._model&&this._model.getOption()},o.getWidth=function(){return this._zr.getWidth()},o.getHeight=function(){return this._zr.getHeight()},o.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},o.getRenderedCanvas=function(t){if(y.canvasSupported)return(t=t||{}).pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor"),this._zr.painter.getRenderedCanvas(t)},o.getSvgDataUrl=function(){var t;if(y.svgSupported)return Z((t=this._zr).storage.getDisplayList(),function(t){t.stopAnimation(!0)}),t.painter.pathToDataUrl()},o.getDataURL=function(t){var e=(t=t||{}).excludeComponents,n=this._model,i=[],o=this,e=(lc(e,function(t){n.eachComponent({mainType:t},function(t){t=o._componentsMap[t.__viewId];t.group.ignore||(i.push(t),t.group.ignore=!0)})}),"svg"===this._zr.painter.getType()?this.getSvgDataUrl():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png")));return lc(i,function(t){t.group.ignore=!1}),e},o.getConnectedDataURL=function(i){var o,a,r,s,l,u,h,c,e,t,n,d,p;if(y.canvasSupported)return o=this.group,a=Math.min,r=Math.max,Xc[o]?(l=s=1/0,h=u=-1/0,c=[],e=i&&i.pixelRatio||1,Z(Zc,function(t,e){var n;t.group===o&&(n=t.getRenderedCanvas(N(i)),t=t.getDom().getBoundingClientRect(),s=a(t.left,s),l=a(t.top,l),u=r(t.right,u),h=r(t.bottom,h),c.push({dom:n,left:t.left,top:t.top}))}),t=(u*=e)-(s*=e),n=(h*=e)-(l*=e),(d=K()).width=t,d.height=n,p=oo(d),lc(c,function(t){t=new Ri({style:{x:t.left*e-s,y:t.top*e-l,image:t.dom}});p.add(t)}),p.refreshImmediately(),d.toDataURL("image/"+(i&&i.type||"png"))):this.getDataURL(i)},o.convertToPixel=L(_c,"convertToPixel"),o.convertFromPixel=L(_c,"convertFromPixel"),o.containPixel=function(t,i){var o;return Z(t=bo(this._model,t),function(t,n){0<=n.indexOf("Models")&&Z(t,function(t){var e=t.coordinateSystem;e&&e.containPoint?o|=!!e.containPoint(i):"seriesModels"===n?(e=this._chartsMap[t.__viewId])&&e.containPoint?o|=e.containPoint(i,t):H&&console.warn(n+": "+(e?"The found component do not support containPoint.":"No view mapping to the found component.")):H&&console.warn(n+": containPoint is not supported")},this)},this),!!o},o.getVisual=function(t,e){var n=(t=bo(this._model,t,{defaultMainType:"series"})).seriesModel,n=(!H||n||console.warn("There is no specified seires model"),n.getData()),t=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?n.indexOfRawIndex(t.dataIndex):null;return null!=t?n.getItemVisual(t,e):n.getVisual(e)},o.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},o.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var wc={prepareAndUpdate:function(t){bc(this),wc.update.call(this,t)},update:function(t){var e=this._model,n=this._api,i=this._zr,o=this._coordSysMgr,a=this._scheduler;e&&(a.restoreData(e,t),a.performSeriesTasks(e),o.create(e,n),a.performDataProcessorTasks(e,t),Mc(this,e),o.update(e,n),Cc(e),a.performVisualTasks(e,t),Lc(this,e,n,t),o=e.get("backgroundColor")||"transparent",y.canvasSupported?i.setBackgroundColor(o):(o=Ke(a=We(o),"rgb"),a[3]),Pc(e,n))},updateTransform:function(i){var o,n,a=this._model,r=this,s=this._api;a&&(o=[],a.eachComponent(function(t,e){var n=r.getViewOfComponentModel(e);n&&n.__alive&&(!n.updateTransform||(e=n.updateTransform(e,a,s,i))&&e.update)&&o.push(n)}),n=E(),a.eachSeries(function(t){var e=r._chartsMap[t.__viewId];(!e.updateTransform||(e=e.updateTransform(t,a,s,i))&&e.update)&&n.set(t.uid,1)}),Cc(a),this._scheduler.performVisualTasks(a,i,{setDirty:!0,dirtyMap:n}),kc(r,a,0,i,n),Pc(a,this._api))},updateView:function(t){var e=this._model;e&&(lh.markUpdateMethod(t,"updateView"),Cc(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),Lc(this,this._model,this._api,t),Pc(e,this._api))},updateVisual:function(t){wc.update.call(this,t)},updateLayout:function(t){wc.update.call(this,t)}};function bc(t){var e=t._model,n=t._scheduler;n.restorePipelines(e),n.prepareStageTasks(),Dc(t,"component",e,n),Dc(t,"chart",e,n),n.plan()}function Sc(e,n,i,o,t){var a,r,s=e._model;function l(t){t&&t.__alive&&t[n]&&t[n](t.__model,s,e._api,i)}o?((a={})[o+"Id"]=i[o+"Id"],a[o+"Index"]=i[o+"Index"],a[o+"Name"]=i[o+"Name"],a={mainType:o,query:a},t&&(a.subType=t),null!=(r=i.excludeSeriesId)&&(r=E(ho(r))),s&&s.eachComponent(a,function(t){r&&null!=r.get(t.id)||l(e["series"===o?"_chartsMap":"_componentsMap"][t.__viewId])},e)):lc(e._componentsViews.concat(e._chartsViews),l)}function Mc(t,e){var n=t._chartsMap,i=t._scheduler;e.eachSeries(function(t){i.updateStreamModes(t,n[t.__viewId])})}function Ic(e,t){var n=e.type,i=e.escapeConnect,o=zc[n],a=o.actionInfo,r=(s=(a.update||"update").split(":")).pop(),s=null!=s[0]&&cc(s[0]),l=(this[gc]=!0,[e]),u=!1;e.batch&&(u=!0,l=I(e.batch,function(t){return(t=C(O({},t),e)).batch=null,t}));var h,c=[],d="highlight"===n||"downplay"===n;lc(l,function(t){(h=(h=o.action(t,this._model,this._api))||O({},t)).type=a.event||h.type,c.push(h),d?Sc(this,r,t,"series"):s&&Sc(this,r,t,s.main,s.sub)},this),"none"===r||d||s||(this[fc]?(bc(this),wc.update.call(this,e),this[fc]=!1):wc[r].call(this,e)),h=u?{type:a.event||n,escapeConnect:i,batch:c}:c[0],this[gc]=!1,t||this._messageCenter.trigger(h.type,h)}function Tc(t){for(var e=this._pendingActions;e.length;){var n=e.shift();Ic.call(this,n,t)}}function Ac(t){t||this.trigger("updated")}function Dc(t,e,a,r){for(var s="component"===e,l=s?t._componentsViews:t._chartsViews,u=s?t._componentsMap:t._chartsMap,h=t._zr,c=t._api,n=0;n<l.length;n++)l[n].__alive=!1;function i(t){var e,n,i="_ec_"+t.id+"_"+t.type,o=u[i];o||(e=cc(t.type),n=s?oh.getClass(e.main,e.sub):lh.getClass(e.sub),H&&sc(n,e.sub+" does not exist."),(o=new n).init(a,c),u[i]=o,l.push(o),h.add(o.group)),t.__viewId=o.__id=i,o.__alive=!0,o.__model=t,o.group.__ecComponentInfo={mainType:t.mainType,index:t.componentIndex},s||r.prepareView(o,t,a,c)}for(s?a.eachComponent(function(t,e){"series"!==t&&i(e)}):a.eachSeries(i),n=0;n<l.length;){var o=l[n];o.__alive?n++:(s||o.renderTask.dispose(),h.remove(o.group),o.dispose(a,c),l.splice(n,1),delete u[o.__id],o.__id=o.group.__ecComponentInfo=null)}}function Cc(t){t.clearColorPalette(),t.eachSeries(function(t){t.clearColorPalette()})}function Lc(t,e,n,i){var o,a,r,s,l;o=t,a=e,r=n,s=i,lc(l||o._componentsViews,function(t){var e=t.__model;t.render(e,a,r,s),Oc(e,t)}),lc(t._chartsViews,function(t){t.__alive=!1}),kc(t,e,0,i),lc(t._chartsViews,function(t){t.__alive||t.remove(e,n)})}function kc(o,t,e,a,r){var s,n,i,l,u=o._scheduler;t.eachSeries(function(t){var e,n=o._chartsMap[t.__viewId],i=(n.__alive=!0,n.renderTask);u.updatePayload(i,a),r&&r.get(t.uid)&&i.dirty(),s|=i.perform(u.getPerformArgs(i)),n.group.silent=!!t.get("silent"),Oc(t,n),i=n,e=t.get("blendMode")||null,H&&!y.canvasSupported&&e&&"source-over"!==e&&console.warn("Only canvas support blendMode"),i.group.traverse(function(t){t.isGroup||t.style.blend!==e&&t.setStyle("blend",e),t.eachPendingDisplayable&&t.eachPendingDisplayable(function(t){t.setStyle("blend",e)})})}),u.unfinished|=s,n=o._zr,i=t,n=n.storage,l=0,n.traverse(function(t){t.isGroup||l++}),l>i.get("hoverLayerThreshold")&&!y.node&&n.traverse(function(t){t.isGroup||(t.useHoverLayer=!0)}),function(t,e){var l,u,h,c,n,a=e.getModel("aria");function d(t,e){var n;return"string"!=typeof t?t:(n=t,Z(e,function(t,e){n=n.replace(new RegExp("\\{\\s*"+e+"\\s*\\}","g"),t)}),n)}function p(t){var e=a.get(t);if(null!=e)return e;for(var n=t.split("."),i=_h.aria,o=0;o<n.length;++o)i=i[n[o]];return i}a.get("show")&&(a.get("description")?t.setAttribute("aria-label",a.get("description")):(l=0,e.eachSeries(function(t,e){++l},this),u=a.get("data.maxCount")||10,n=a.get("series.maxCount")||10,h=Math.min(l,n),l<1||(n=(n=(n=(n=e.getModel("title").option)&&n.length?n[0]:n)&&n.text)?d(p("general.withTitle"),{title:n}):p("general.withoutTitle"),c=[],n+=d(p(1<l?"series.multiple.prefix":"series.single.prefix"),{seriesCount:l}),e.eachSeries(function(t,e){if(e<h){var e=t.get("name"),n="series."+(1<l?"multiple":"single")+".",e=d(e=p(e?n+"withName":n+"withoutName"),{seriesId:t.seriesIndex,seriesName:t.get("name"),seriesType:(n=t.subType,_h.series.typeNames[n]||"่‡ชๅฎšไน‰ๅ›พ")}),i=t.getData();(window.data=i).count()>u?e+=d(p("data.partialData"),{displayCnt:u}):e+=p("data.allData");for(var o,a,r=[],s=0;s<i.count();s++)s<u&&(o=i.getName(s),a=Ou(i,s),r.push(d(p(o?"data.withName":"data.withoutName"),{name:o,value:a})));e+=r.join(p("data.separator.middle"))+p("data.separator.end"),c.push(e)}}),n+=c.join(p("series.multiple.separator.middle"))+p("series.multiple.separator.end"),t.setAttribute("aria-label",n))))}(o._zr.dom,t)}function Pc(e,n){lc(Gc,function(t){t(e,n)})}o.resize=function(t){H&&sc(!this[gc],"`resize` should not be called during main process."),this._zr.resize(t);var e=this._model;this._loadingFX&&this._loadingFX.resize(),e&&(e=e.resetOption("media"),t=t&&t.silent,this[gc]=!0,e&&bc(this),wc.update.call(this),this[gc]=!1,Tc.call(this,t),Ac.call(this,t))},o.showLoading=function(t,e){var n;hc(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),Hc[t]?(e=Hc[t](this._api,e),n=this._zr,this._loadingFX=e,n.add(e)):H&&console.warn("Loading effects "+t+" not exists.")},o.hideLoading=function(){this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},o.makeActionFromEvent=function(t){var e=O({},t);return e.type=Rc[t.type],e},o.dispatchAction=function(t,e){hc(e)||(e={silent:!!e}),zc[t.type]&&this._model&&(this[gc]?this._pendingActions.push(t):(Ic.call(this,t,e.silent),e.flush?this._zr.flush(!0):!1!==e.flush&&y.browser.weChat&&this._throttledZrFlush(),Tc.call(this,e.silent),Ac.call(this,e.silent)))},o.appendData=function(t){var e=t.seriesIndex,e=this.getModel().getSeriesByIndex(e);H&&sc(t.data&&e),e.appendData(t),this._scheduler.unfinished=!0},o.on=yc("on"),o.off=yc("off"),o.one=yc("one");var Nc=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function Oc(t,e){var n=t.get("z"),i=t.get("zlevel");e.group.traverse(function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=i)&&(t.zlevel=i)})}function Ec(){this.eventInfo}o._initEvents=function(){lc(Nc,function(s){function t(t){var e,n,i,o=this.getModel(),a=t.target,r="globalout"===s;r?e={}:a&&null!=a.dataIndex?e=(i=a.dataModel||o.getSeriesByIndex(a.seriesIndex))&&i.getDataParams(a.dataIndex,a.dataType,a)||{}:a&&a.eventData&&(e=O({},a.eventData)),e&&(i=e.componentType,n=e.componentIndex,"markLine"!==i&&"markPoint"!==i&&"markArea"!==i||(i="series",n=e.seriesIndex),i=(o=i&&null!=n&&o.getComponent(i,n))&&this["series"===o.mainType?"_chartsMap":"_componentsMap"][o.__viewId],!H||r||o&&i||console.warn("model or view can not be found by params"),e.event=t,e.type=s,this._ecEventProcessor.eventInfo={targetEl:a,packedEvent:e,model:o,view:i},this.trigger(s,e))}t.zrEventfulCallAtLast=!0,this._zr.on(s,t,this)},this),lc(Rc,function(t,e){this._messageCenter.on(e,function(t){this.trigger(e,t)},this)},this)},o.isDisposed=function(){return this._disposed},o.clear=function(){this.setOption({series:[]},!0)},o.dispose=function(){var e,n;this._disposed?H&&console.warn("Instance "+this.id+" has been disposed"):(this._disposed=!0,Mo(this.getDom(),jc,""),e=this._api,n=this._model,lc(this._componentsViews,function(t){t.dispose(n,e)}),lc(this._chartsViews,function(t){t.dispose(n,e)}),this._zr.dispose(),delete Zc[this.id])},i(xc,Wt),Ec.prototype={constructor:Ec,normalizeQuery:function(t){var e,r,s,l={},u={},h={};return T(t)?(e=cc(t),l.mainType=e.main||null,l.subType=e.sub||null):(r=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1},Z(t,function(t,e){for(var n=!1,i=0;i<r.length;i++){var o=r[i],a=e.lastIndexOf(o);0<a&&a===e.length-o.length&&"data"!==(a=e.slice(0,a))&&(l.mainType=a,l[o.toLowerCase()]=t,n=!0)}s.hasOwnProperty(e)&&(u[e]=t,n=!0),n||(h[e]=t)})),{cptQuery:l,dataQuery:u,otherQuery:h}},filter:function(t,e,n){var i,o,a,r,s,l=this.eventInfo;return!l||(i=l.targetEl,o=l.packedEvent,a=l.model,l=l.view,!a)||!l||(r=e.cptQuery,s=e.dataQuery,u(r,a,"mainType")&&u(r,a,"subType")&&u(r,a,"index","componentIndex")&&u(r,a,"name")&&u(r,a,"id")&&u(s,o,"name")&&u(s,o,"dataIndex")&&u(s,o,"dataType")&&(!l.filterForExposedEvent||l.filterForExposedEvent(t,e.otherQuery,i,o)));function u(t,e,n,i){return null==t[n]||e[i||n]===t[n]}},afterTrigger:function(){this.eventInfo=null}};var zc={},Rc={},Bc=[],Vc=[],Gc=[],Fc=[],Wc={},Hc={},Zc={},Xc={},Yc=+new Date,Uc=+new Date,jc="_echarts_instance_";function qc(t){Xc[t]=!1}o=qc;function Kc(t){return Zc[e=jc,(t=t).getAttribute?t.getAttribute(e):t[e]];var e}function $c(t,e){Wc[t]=e}function Jc(t){Vc.push(t)}function Qc(t,e){id(Bc,t,e,1e3)}function s(t,e,n){"function"==typeof e&&(n=e,e="");var i=hc(t)?t.type:[t,t={event:e}][0];t.event=(t.event||i).toLowerCase(),e=t.event,sc(mc.test(i)&&mc.test(e)),zc[i]||(zc[i]={action:n,actionInfo:t}),Rc[e]=i}function td(t,e){eu.register(t,e)}function ed(t,e){id(Fc,t,e,1e3,"layout")}function nd(t,e){id(Fc,t,e,3e3,"visual")}function id(t,e,n,i,o){if((uc(e)||hc(e))&&(n=e,e=i),H){if(isNaN(e)||null==e)throw new Error("Illegal priority");lc(t,function(t){sc(t.__raw!==n)})}i=bh.wrapStageHandler(n,o);i.__prio=e,i.__raw=n,t.push(i)}function od(t,e){Hc[t]=e}function ad(t){return u.extend(t)}function rd(t){return oh.extend(t)}function sd(t){return Ku.extend(t)}function ld(t){return lh.extend(t)}nd(2e3,n),Jc(bu),Qc(5e3,function(t){var i=E();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(Su)}),od("default",function(i,t){C(t=t||{},{text:"loading",color:"#c23531",textColor:"#000",maskColor:"rgba(255, 255, 255, 0.8)",zlevel:0});var o=new V({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4}),a=new Lr({shape:{startAngle:-wh/2,endAngle:-wh/2+.1,r:10},style:{stroke:t.color,lineCap:"round",lineWidth:5},zlevel:t.zlevel,z:10001}),r=new V({style:{fill:"none",text:t.text,textPosition:"right",textDistance:10,textFill:t.textColor},zlevel:t.zlevel,z:10001});return a.animateShape(!0).when(1e3,{endAngle:3*wh/2}).start("circularInOut"),a.animateShape(!0).when(1e3,{startAngle:3*wh/2}).delay(300).start("circularInOut"),(t=new R).add(a),t.add(r),t.add(o),t.resize=function(){var t=i.getWidth()/2,e=i.getHeight()/2,n=(a.setShape({cx:t,cy:e}),a.shape.r);r.setShape({x:t-n,y:e-n,width:2*n,height:2*n}),o.setShape({x:0,y:0,width:i.getWidth(),height:i.getHeight()})},t.resize(),t}),s({type:"highlight",event:"highlight",update:"highlight"},yt),s({type:"downplay",event:"downplay",update:"downplay"},yt),$c("light",e),$c("dark",Fh);function ud(t){return t}function hd(t,e,n,i,o){this._old=t,this._new=e,this._oldKeyGetter=n||ud,this._newKeyGetter=i||ud,this.context=o}function cd(t,e,n,i,o){for(var a=0;a<t.length;a++){var r="_ec_"+o[i](t[a],a),s=e[r];null==s?(n.push(r),e[r]=a):(s.length||(e[r]=s=[s]),s.push(a))}}hd.prototype={constructor:hd,add:function(t){return this._add=t,this},update:function(t){return this._update=t,this},remove:function(t){return this._remove=t,this},execute:function(){var t=this._old,e=this._new,n={},i=[],o=[];for(cd(t,{},i,"_oldKeyGetter",this),cd(e,n,o,"_newKeyGetter",this),a=0;a<t.length;a++)null!=(r=n[s=i[a]])?((u=r.length)?(1===u&&(n[s]=null),r=r.unshift()):n[s]=null,this._update&&this._update(r,a)):this._remove&&this._remove(a);for(var a=0;a<o.length;a++){var r,s=o[a];if(n.hasOwnProperty(s))if(null!=(r=n[s]))if(r.length)for(var l=0,u=r.length;l<u;l++)this._add&&this._add(r[l]);else this._add&&this._add(r)}}};var dd=E(["tooltip","label","itemName","itemId","seriesName"]);function pd(t){return"category"===t?"ordinal":"time"===t?"time":"float"}var gd=k,n="undefined",fd={float:typeof Float64Array==n?Array:Float64Array,int:typeof Int32Array==n?Array:Int32Array,ordinal:Array,number:Array,time:Array},md=typeof Uint32Array==n?Array:Uint32Array,yd=typeof Int32Array==n?Array:Int32Array,vd=typeof Uint16Array==n?Array:Uint16Array;function xd(t){return 65535<t._rawCount?md:vd}var _d=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"],wd=["_extent","_approximateExtent","_rawExtent"];function bd(e,n){Z(_d.concat(n.__wrappedMethods||[]),function(t){n.hasOwnProperty(t)&&(e[t]=n[t])}),e.__wrappedMethods=n.__wrappedMethods,Z(wd,function(t){e[t]=N(n[t])}),e._calculationInfo=O(n._calculationInfo)}var Sd=function(t,e){t=t||["x","y"];for(var o,a,r,s,l,i,u,n,h={},c=[],d={},p=0;p<t.length;p++){var g=t[p],f=(g=T(g)?{name:g}:g).name;g.type=g.type||"float",g.coordDim||(g.coordDim=f,g.coordDimIndex=0),g.otherDims=g.otherDims||{},c.push(f),(h[f]=g).index=p,g.createInvertedIndices&&(d[f]=[])}this.dimensions=c,this._dimensionInfos=h,this.hostModel=e,this.dataType,this._indices=null,this._count=0,this._rawCount=0,this._storage={},this._nameList=[],this._idList=[],this._optionModels=[],this._visual={},this._layout={},this._itemVisuals=[],this.hasItemVisual={},this._itemLayouts=[],this._graphicEls=[],this._chunkSize=1e5,this._chunkCount=0,this._rawData,this._rawExtent={},this._extent={},this._approximateExtent={},this._dimensionsSummary=(o=this,a=(e={}).encode={},r=E(),s=[],l=[],Z(o.dimensions,function(t){var e,i=o.getDimensionInfo(t),n=i.coordDim;n&&(H&&P(null==dd.get(n)),e=a[n],(e=a.hasOwnProperty(n)?e:a[n]=[])[i.coordDimIndex]=t,i.isExtraCoord||(r.set(n,1),"ordinal"!==(e=i.type)&&"time"!==e&&(s[0]=t)),i.defaultTooltip)&&l.push(t),dd.each(function(t,e){var n=a[e],e=(a.hasOwnProperty(e)||(n=a[e]=[]),i.otherDims[e]);null!=e&&!1!==e&&(n[e]=i.name)})}),i=[],u={},r.each(function(t,e){var n=a[e];u[e]=n[0],i=i.concat(n)}),e.dataDimsOnCoord=i,e.encodeFirstDimNotExtra=u,(n=a.label)&&n.length&&(s=n.slice()),(n=a.tooltip)&&n.length?l=n.slice():l.length||(l=s.slice()),a.defaultedLabel=s,a.defaultedTooltip=l,e),this._invertedIndicesMap=d,this._calculationInfo={}},e=Sd.prototype;function Md(t,e,n,i,o){var a=fd[e.type],r=i-1,s=e.name,l=t[s][r];if(l&&l.length<n){for(var u=new a(Math.min(o-r*n,n)),h=0;h<l.length;h++)u[h]=l[h];t[s][r]=u}for(var c=i*n;c<o;c+=n)t[s].push(new a(Math.min(o-c,n)))}function Id(o){var a=o._invertedIndicesMap;Z(a,function(t,e){var n=o._dimensionInfos[e].ordinalMeta;if(n){t=a[e]=new yd(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}})}function Td(t,e,n){var i,o,a;return o=null!=e&&(i=t._chunkSize,a=Math.floor(n/i),e=t.dimensions[e],a=t._storage[e][a])&&(o=a[n%i],a=t._dimensionInfos[e].ordinalMeta)&&a.categories.length?a.categories[o]:o}function Ad(t){return t}function Dd(t){return t<this._count&&0<=t?this._indices[t]:-1}function Cd(t,e){var n=t._idList[e];return n=null==(n=null==n?Td(t,t._idDimIdx,e):n)?"e\0\0"+e:n}function Ld(t){return t=D(t)?t:[t]}function kd(t,e){for(var n=0;n<e.length;n++)t._dimensionInfos[e[n]]||console.error("Unkown dimension "+e[n])}function Pd(t,e){var n=t.dimensions,i=new Sd(I(n,t.getDimensionInfo,t),t.hostModel);bd(i,t);for(var o=i._storage={},a=t._storage,r=0;r<n.length;r++){var s=n[r];a[s]&&(0<=S(e,s)?(o[s]=function(t){for(var e=new Array(t.length),n=0;n<t.length;n++)e[n]=function(t){var e=t.constructor;return e===Array?t.slice():new e(t)}(t[n]);return e}(a[s]),i._rawExtent[s]=Nd(),i._extent[s]=null):o[s]=a[s])}return i}function Nd(){return[1/0,-1/0]}e.type="list",e.hasItemOption=!0,e.getDimension=function(t){return t=isNaN(t)?t:this.dimensions[t]||t},e.getDimensionInfo=function(t){return this._dimensionInfos[this.getDimension(t)]},e.getDimensionsOnCoord=function(){return this._dimensionsSummary.dataDimsOnCoord.slice()},e.mapDimension=function(t,e){var n=this._dimensionsSummary;return null==e?n.encodeFirstDimNotExtra[t]:(n=n.encode[t],!0===e?(n||[]).slice():n&&n[e])},e.initData=function(t,e,n){var i=Fl.isInstance(t)||J(t);if(i&&(t=new Mu(t,this.dimensions.length)),H&&!i&&("function"!=typeof t.getItem||"function"!=typeof t.count))throw new Error("Inavlid data provider.");this._rawData=t,this._storage={},this._indices=null,this._nameList=e||[],this._idList=[],this._nameRepeatCount={},n||(this.hasItemOption=!1),this.defaultDimValueGetter=ku[this._rawData.getSource().sourceFormat],this._dimValueGetter=n=n||this.defaultDimValueGetter,this._dimValueGetterArrayRows=ku.arrayRows,this._rawExtent={},this._initDataFromProvider(0,t.count()),t.pure&&(this.hasItemOption=!1)},e.getProvider=function(){return this._rawData},e.appendData=function(t){H&&P(!this._indices,"appendData can only be called on raw data.");var e=this._rawData,n=this.count(),t=(e.appendData(t),e.count());e.persistent||(t+=n),this._initDataFromProvider(n,t)},e.appendValues=function(t,e){for(var n=this._chunkSize,i=this._storage,o=this.dimensions,a=o.length,r=this._rawExtent,s=this.count(),l=s+Math.max(t.length,e?e.length:0),u=this._chunkCount,h=0;h<a;h++)r[y=o[h]]||(r[y]=Nd()),i[y]||(i[y]=[]),Md(i,this._dimensionInfos[y],n,u,l),this._chunkCount=i[y].length;for(var c=new Array(a),d=s;d<l;d++){for(var p=d-s,g=Math.floor(d/n),f=d%n,m=0;m<a;m++){var y=o[m],v=this._dimValueGetterArrayRows(t[p]||c,y,p,m),x=(i[y][g][f]=v,r[y]);v<x[0]&&(x[0]=v),v>x[1]&&(x[1]=v)}e&&(this._nameList[d]=e[p])}this._rawCount=this._count=l,this._extent={},Id(this)},e._initDataFromProvider=function(t,e){if(!(e<=t)){for(var n,i=this._chunkSize,o=this._rawData,a=this._storage,r=this.dimensions,s=r.length,l=this._dimensionInfos,u=this._nameList,h=this._idList,c=this._rawExtent,d=this._nameRepeatCount={},p=this._chunkCount,g=0;g<s;g++){c[M=r[g]]||(c[M]=Nd());var f=l[M];0===f.otherDims.itemName&&(n=this._nameDimIdx=g),0===f.otherDims.itemId&&(this._idDimIdx=g),a[M]||(a[M]=[]),Md(a,f,i,p,e),this._chunkCount=a[M].length}for(var m=new Array(s),y=t;y<e;y++){for(var v,x,_,m=o.getItem(y,m),w=Math.floor(y/i),b=y%i,S=0;S<s;S++){var M,I=a[M=r[S]][w],T=this._dimValueGetter(m,M,y,S),I=(I[b]=T,c[M]);T<I[0]&&(I[0]=T),T>I[1]&&(I[1]=T)}o.pure||(v=u[y],m&&null==v&&(null!=m.name?u[y]=v=m.name:null!=n&&(x=a[_=r[n]][w])&&(v=x[b],x=l[_].ordinalMeta)&&x.categories.length&&(v=x.categories[v])),null==(_=null==m?null:m.id)&&null!=v&&(d[v]=d[v]||0,0<d[_=v]&&(_+="__ec__"+d[v]),d[v]++),null!=_&&(h[y]=_))}!o.persistent&&o.clean&&o.clean(),this._rawCount=this._count=e,this._extent={},Id(this)}},e.count=function(){return this._count},e.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(var i=new(e=xd(this))(this.count()),o=0;o<i.length;o++)i[o]=o;return i},e.get=function(t,e){if(!(0<=e&&e<this._count))return NaN;var n=this._storage;if(!n[t])return NaN;e=this.getRawIndex(e);var i=Math.floor(e/this._chunkSize),e=e%this._chunkSize;return n[t][i][e]},e.getByRawIndex=function(t,e){var n;return 0<=e&&e<this._rawCount&&(t=this._storage[t])?(n=Math.floor(e/this._chunkSize),e=e%this._chunkSize,t[n][e]):NaN},e._getFast=function(t,e){var n=Math.floor(e/this._chunkSize),e=e%this._chunkSize;return this._storage[t][n][e]},e.getValues=function(t,e){var n=[];D(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},e.hasValue=function(t){for(var e=this._dimensionsSummary.dataDimsOnCoord,n=this._dimensionInfos,i=0,o=e.length;i<o;i++)if("ordinal"!==n[e[i]].type&&isNaN(this.get(e[i],t)))return!1;return!0},e.getDataExtent=function(t){t=this.getDimension(t);var e=Nd();if(!this._storage[t])return e;var n,i=this.count();if(!this._indices)return this._rawExtent[t].slice();if(n=this._extent[t])return n.slice();for(var o=(n=e)[0],a=n[1],r=0;r<i;r++){var s=this._getFast(t,this.getRawIndex(r));s<o&&(o=s),a<s&&(a=s)}return this._extent[t]=n=[o,a]},e.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},e.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},e.getCalculationInfo=function(t){return this._calculationInfo[t]},e.setCalculationInfo=function(t,e){gd(t)?O(this._calculationInfo,t):this._calculationInfo[t]=e},e.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},e.getMedian=function(t){var n=[],t=(this.each(t,function(t,e){isNaN(t)||n.push(t)}),[].concat(n).sort(function(t,e){return t-e})),e=this.count();return 0===e?0:e%2==1?t[(e-1)/2]:(t[e/2]+t[e/2-1])/2},e.rawIndexOf=function(t,e){t=t&&this._invertedIndicesMap[t];if(H&&!t)throw new Error("Do not supported yet");t=t[e];return null==t||isNaN(t)?-1:t},e.indexOfName=function(t){for(var e=0,n=this.count();e<n;e++)if(this.getName(e)===t)return e;return-1},e.indexOfRawIndex=function(t){if(!this._indices)return t;if(!(t>=this._rawCount||t<0)){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 a=(i+o)/2|0;if(e[a]<t)i=1+a;else{if(!(e[a]>t))return a;o=a-1}}}return-1},e.indicesOfNearest=function(t,e,n){var i=[];if(this._storage[t]){null==n&&(n=1/0);for(var o=Number.MAX_VALUE,a=-1,r=0,s=this.count();r<s;r++){var l=e-this.get(t,r),u=Math.abs(l);l<=n&&u<=o&&((u<o||0<=l&&a<0)&&(o=u,a=l,i.length=0),i.push(r))}}return i},e.getRawIndex=Ad,e.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},e.getName=function(t){t=this.getRawIndex(t);return this._nameList[t]||Td(this,this._nameDimIdx,t)||""},e.getId=function(t){return Cd(this,this.getRawIndex(t))},e.each=function(t,e,n,i){if(this._count){"function"==typeof t&&(i=n,n=e,e=t,t=[]),n=n||i||this,t=I(Ld(t),this.getDimension,this),H&&kd(this,t);for(var o=t.length,a=0;a<this.count();a++)switch(o){case 0:e.call(n,a);break;case 1:e.call(n,this.get(t[0],a),a);break;case 2:e.call(n,this.get(t[0],a),this.get(t[1],a),a);break;default:for(var r=0,s=[];r<o;r++)s[r]=this.get(t[r],a);s[r]=a,e.apply(n,s)}}},e.filterSelf=function(t,e,n,i){if(this._count){"function"==typeof t&&(i=n,n=e,e=t,t=[]),n=n||i||this,t=I(Ld(t),this.getDimension,this),H&&kd(this,t);for(var o=this.count(),a=new(xd(this))(o),r=[],s=t.length,l=0,u=t[0],h=0;h<o;h++){var c=this.getRawIndex(h);if(0===s)p=e.call(n,h);else if(1===s)var d=this._getFast(u,c),p=e.call(n,d,h);else{for(var g=0;g<s;g++)r[g]=this._getFast(u,c);r[g]=h,p=e.apply(n,r)}p&&(a[l++]=c)}return l<o&&(this._indices=a),this._count=l,this._extent={},this.getRawIndex=this._indices?Dd:Ad,this}},e.selectRange=function(t){if(this._count){var e,n=[];for(e in t)t.hasOwnProperty(e)&&n.push(e);H&&kd(this,n);var i=n.length;if(i){var o=this.count(),a=new(xd(this))(o),r=0,s=n[0],l=t[s][0],u=t[s][1],h=!1;if(!this._indices){var c=0;if(1===i){for(var d=this._storage[n[0]],p=0;p<this._chunkCount;p++)for(var g=d[p],f=Math.min(this._count-p*this._chunkSize,this._chunkSize),m=0;m<f;m++)((w=g[m])>=l&&w<=u||isNaN(w))&&(a[r++]=c),c++;h=!0}else if(2===i){for(var d=this._storage[s],y=this._storage[n[1]],v=t[n[1]][0],x=t[n[1]][1],p=0;p<this._chunkCount;p++)for(var g=d[p],_=y[p],f=Math.min(this._count-p*this._chunkSize,this._chunkSize),m=0;m<f;m++){var w=g[m],b=_[m];(l<=w&&w<=u||isNaN(w))&&(v<=b&&b<=x||isNaN(b))&&(a[r++]=c),c++}h=!0}}if(!h)if(1===i)for(m=0;m<o;m++){var S=this.getRawIndex(m);((w=this._getFast(s,S))>=l&&w<=u||isNaN(w))&&(a[r++]=S)}else for(m=0;m<o;m++){var M=!0,S=this.getRawIndex(m);for(p=0;p<i;p++){var I=n[p];((w=this._getFast(e,S))<t[I][0]||w>t[I][1])&&(M=!1)}M&&(a[r++]=this.getRawIndex(m))}return r<o&&(this._indices=a),this._count=r,this._extent={},this.getRawIndex=this._indices?Dd:Ad,this}}},e.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},e.map=function(t,e,n,i){n=n||i||this,t=I(Ld(t),this.getDimension,this),H&&kd(this,t);i=Pd(this,t);i._indices=this._indices,i.getRawIndex=i._indices?Dd:Ad;for(var o=i._storage,a=[],r=this._chunkSize,s=t.length,l=this.count(),u=[],h=i._rawExtent,c=0;c<l;c++){for(var d=0;d<s;d++)u[d]=this.get(t[d],c);u[s]=c;var p=e&&e.apply(n,u);if(null!=p){"object"!=typeof p&&(a[0]=p,p=a);for(var g=this.getRawIndex(c),f=Math.floor(g/r),m=g%r,y=0;y<p.length;y++){var v=t[y],x=p[y],_=h[v],v=o[v];v&&(v[f][m]=x),x<_[0]&&(_[0]=x),x>_[1]&&(_[1]=x)}}}return i},e.downSample=function(t,e,n,i){for(var o=Pd(this,[t]),a=o._storage,r=[],s=Math.floor(1/e),l=a[t],u=this.count(),h=this._chunkSize,c=o._rawExtent[t],d=new(xd(this))(u),p=0,g=0;g<u;g+=s){u-g<s&&(r.length=s=u-g);for(var f=0;f<s;f++){var m=this.getRawIndex(g+f),y=Math.floor(m/h);r[f]=l[y][m%h]}var v=n(r),x=this.getRawIndex(Math.min(g+i(r,v)||0,u-1)),_=x%h;(l[Math.floor(x/h)][_]=v)<c[0]&&(c[0]=v),v>c[1]&&(c[1]=v),d[p++]=x}return o._count=p,o._indices=d,o.getRawIndex=Dd,o},e.getItemModel=function(t){var e=this.hostModel;return new w(this.getRawDataItem(t),e,e&&e.ecModel)},e.diff=function(e){var n=this;return new hd(e?e.getIndices():[],this.getIndices(),function(t){return Cd(e,t)},function(t){return Cd(n,t)})},e.getVisual=function(t){var e=this._visual;return e&&e[t]},e.setVisual=function(t,e){if(gd(t))for(var n in t)t.hasOwnProperty(n)&&this.setVisual(n,t[n]);else this._visual=this._visual||{},this._visual[t]=e},e.setLayout=function(t,e){if(gd(t))for(var n in t)t.hasOwnProperty(n)&&this.setLayout(n,t[n]);else this._layout[t]=e},e.getLayout=function(t){return this._layout[t]},e.getItemLayout=function(t){return this._itemLayouts[t]},e.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?O(this._itemLayouts[t]||{},e):e},e.clearItemLayouts=function(){this._itemLayouts.length=0},e.getItemVisual=function(t,e,n){t=this._itemVisuals[t],t=t&&t[e];return null!=t||n?t:this.getVisual(e)},e.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{},o=this.hasItemVisual;if(this._itemVisuals[t]=i,gd(e))for(var a in e)e.hasOwnProperty(a)&&(i[a]=e[a],o[a]=!0);else i[e]=n,o[e]=!0},e.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};function Od(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType}function Ed(t,e,n){Fl.isInstance(e)||(e=Fl.seriesDataToSource(e)),n=n||{},t=(t||[]).slice();for(var i,o,a,r,s=(n.dimsDef||[]).slice(),l=E(n.encodeDef),u=E(),h=E(),c=[],d=(i=e,o=t,a=n.dimCount,r=Math.max(i.dimensionsDetectCount||1,o.length,s.length,a||0),Z(o,function(t){t=t.dimsDef;t&&(r=Math.max(r,t.length))}),r),p=0;p<d;p++){var g=s[p]=O({},k(s[p])?s[p]:{name:s[p]}),f=g.name,m=c[p]={otherDims:{}};null!=f&&null==u.get(f)&&(m.name=m.displayName=f,u.set(f,p)),null!=g.type&&(m.type=g.type),null!=g.displayName&&(m.displayName=g.displayName)}l.each(function(t,n){var i;1===(t=ho(t).slice()).length&&t[0]<0?l.set(n,!1):(i=l.set(n,[]),Z(t,function(t,e){null!=(t=T(t)?u.get(t):t)&&t<d&&(i[e]=t,v(c[t],n,e))}))});var y=0;function v(t,e,n){null!=dd.get(e)?t.otherDims[e]=n:(t.coordDim=e,t.coordDimIndex=n,h.set(e,!0))}Z(t,function(n,t){var i,o,a,e,r;if(T(n)?(a=n,n={}):(a=n.name,e=n.ordinalMeta,n.ordinalMeta=null,(n=N(n)).ordinalMeta=e,i=n.dimsDef,o=n.otherDims,n.name=n.coordDim=n.coordDimIndex=n.dimsDef=n.otherDims=null),!1!==(r=l.get(a))){if(!(r=ho(r)).length)for(var s=0;s<(i&&i.length||1);s++){for(;y<c.length&&null!=c[y].coordDim;)y++;y<c.length&&r.push(y++)}Z(r,function(t,e){t=c[t];v(C(t,n),a,e),null==t.name&&i&&(k(e=i[e])||(e={name:e}),t.name=t.displayName=e.name,t.defaultTooltip=e.defaultTooltip),o&&C(t.otherDims,o)})}});for(var x,_,w=n.generateCoord,b=null!=(S=n.generateCoordCount),S=w?S||1:0,M=w||"value",I=0;I<d;I++)null==(m=c[I]=c[I]||{}).coordDim&&(m.coordDim=zd(M,h,b),m.coordDimIndex=0,(!w||S<=0)&&(m.isExtraCoord=!0),S--),null==m.name&&(m.name=zd(m.coordDim,u)),null==m.type&&(x=e,_=I,m.name,Yl(x.data,x.sourceFormat,x.seriesLayoutBy,x.dimensionsDefine,x.startIndex,_))&&(m.type="ordinal");return c}function zd(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 Rd(t,e){return Ed((e=e||{}).coordDimensions||[],t,{dimsDef:e.dimensionsDefine||t.dimensionsDefine,encodeDef:e.encodeDefine||t.encodeDefine,dimCount:e.dimensionsCount,generateCoord:e.generateCoord,generateCoordCount:e.generateCoordCount})}function Bd(t,n,e){var i,o,a,r,s,l,u=(e=e||{}).byIndex,h=e.stackedCoordDimension,c=!(!t||!t.get("stack"));return Z(n,function(t,e){T(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&&(a="__\0ecstackresult",r="__\0ecstackedover",i&&(i.createInvertedIndices=!0),s=o.coordDim,e=o.type,l=0,Z(n,function(t){t.coordDim===s&&l++}),n.push({name:a,coordDim:s,coordDimIndex:l,type:e,isExtraCoord:!0,isCalculationCoord:!0}),l++,n.push({name:r,coordDim:r,coordDimIndex:l,type:e,isExtraCoord:!0,isCalculationCoord:!0})),{stackedDimension:o&&o.name,stackedByDimension:i&&i.name,isStackedByIndex:u,stackedOverDimension:r,stackResultDimension:a}}function Vd(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function Gd(t,e){return Vd(t,e)?t.getCalculationInfo("stackResultDimension"):e}function Fd(t,e,n){n=n||{},Fl.isInstance(t)||(t=Fl.seriesDataToSource(t));var o,i,a=e.get("coordinateSystem"),a=eu.get(a),r=Ll(e),a=Rd(t,{coordDimensions:s=(s=r?I(r.coordSysDims,function(t){var e={name:t},t=r.axisMap.get(t);return t&&(t=t.get("type"),e.type=pd(t)),e}):s)||a&&(a.getDimensionsInfo?a.getDimensionsInfo():a.dimensions.slice())||["x","y"],generateCoord:n.generateCoord}),s=(r&&Z(a,function(t,e){var n=t.coordDim,n=r.categoryAxisMap.get(n);n&&(null==o&&(o=e),t.ordinalMeta=n.getOrdinalMeta()),null!=t.otherDims.itemName&&(i=!0)}),i||null==o||(a[o].otherDims.itemName=0),Bd(e,a)),n=new Sd(a,e),a=(n.setCalculationInfo(s),null!=o&&function(t){if(t.sourceFormat===Nl)return null!=(t=function(t){for(var e=0;e<t.length&&null==t[e];)e++;return t[e]}(t.data||[]))&&!D(go(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,a),n}function Wd(t){this._setting=t||{},this._extent=[1/0,-1/0],this._interval=0,this.init&&this.init.apply(this,arguments)}function Hd(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this._map}e.setItemGraphicEl=function(t,e){var n=this.hostModel;e&&(e.dataIndex=t,e.dataType=this.dataType,e.seriesIndex=n&&n.seriesIndex,"group"===e.type)&&e.traverse(Od,e),this._graphicEls[t]=e},e.getItemGraphicEl=function(t){return this._graphicEls[t]},e.eachItemGraphicEl=function(n,i){Z(this._graphicEls,function(t,e){t&&n&&n.call(i,t,e)})},e.cloneShallow=function(t){var e;return t||(e=I(this.dimensions,this.getDimensionInfo,this),t=new Sd(e,this.hostModel)),t._storage=this._storage,bd(t,this),this._indices?(e=this._indices.constructor,t._indices=new e(this._indices)):t._indices=null,t.getRawIndex=t._indices?Dd:Ad,t},e.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(ut(arguments)))})},e.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],e.CHANGABLE_METHODS=["filterSelf","selectRange"],Wd.prototype.parse=function(t){return t},Wd.prototype.getSetting=function(t){return this._setting[t]},Wd.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},Wd.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},Wd.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},Wd.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])},Wd.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},Wd.prototype.getExtent=function(){return this._extent.slice()},Wd.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},Wd.prototype.isBlank=function(){return this._isBlank},Wd.prototype.setBlank=function(t){this._isBlank=t},Wd.prototype.getLabel=null,Lo(Wd),Eo(Wd,{registerWhenExtend:!0}),Hd.createByAxisModel=function(t){var t=t.option,e=t.data,e=e&&I(e,Xd);return new Hd({categories:e,needCollect:!e,deduplication:!1!==t.dedplication})};Fh=Hd.prototype;function Zd(t){return t._map||(t._map=E(t.categories))}function Xd(t){return k(t)&&null!=t.value?t.value:t+""}Fh.getOrdinal=function(t){return Zd(this).get(t)},Fh.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=Zd(this)).get(t))&&(i?(e=this.categories.length,this.categories[e]=t,n.set(t,e)):e=NaN),e):t};var Yd=Wd.prototype,Ud=Wd.extend({type:"ordinal",init:function(t,e){t&&!D(t)||(t=new Hd({categories:t})),this._ordinalMeta=t,this._extent=e||[0,t.categories.length-1]},parse:function(t){return"string"==typeof t?this._ordinalMeta.getOrdinal(t):Math.round(t)},contain:function(t){return t=this.parse(t),Yd.contain.call(this,t)&&null!=this._ordinalMeta.categories[t]},normalize:function(t){return Yd.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(Yd.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push(n),n++;return t},getLabel:function(t){if(!this.isBlank())return this._ordinalMeta.categories[t]},count:function(){return this._extent[1]-this._extent[0]+1},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},getOrdinalMeta:function(){return this._ordinalMeta},niceTicks:yt,niceExtent:yt}),jd=(Ud.create=function(){return new Ud},Es);function qd(t){return Bs(t)+2}function Kd(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function $d(t,e){isFinite(t[0])||(t[0]=e[0]),isFinite(t[1])||(t[1]=e[1]),Kd(t,0,e),Kd(t,1,e),t[0]>t[1]&&(t[0]=t[1])}var Jd=Es,Qd=Wd.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]),Qd.prototype.setExtent.call(this,e[0],e[1])},getInterval:function(){return this._interval},setInterval:function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=qd(t)},getTicks:function(){var t=this._interval,e=this._extent,n=this._niceExtent,i=this._intervalPrecision,o=[];if(t){e[0]<n[0]&&o.push(e[0]);for(var a=n[0];a<=n[1]&&(o.push(a),(a=jd(a+t,i))!==o[o.length-1]);)if(1e4<o.length)return[];e[1]>(o.length?o[o.length-1]:n[1])&&o.push(e[1])}return o},getLabel:function(t,e){return null==t?"":(null==(e=e&&e.precision)?e=Bs(t)||0:"auto"===e&&(e=this._intervalPrecision),$s(t=Jd(t,e,!0)))},niceTicks:function(t,e,n){t=t||5;var i,o=this._extent,a=o[1]-o[0];isFinite(a)&&(a<0&&o.reverse(),a=t,t=e,e=n,n={},i=(o=o)[1]-o[0],i=n.interval=js(i/a,!0),null!=t&&i<t&&(i=n.interval=t),null!=e&&e<i&&(i=n.interval=e),a=n.intervalPrecision=qd(i),$d(n.niceTickExtent=[jd(Math.ceil(o[0]/i)*i,a),jd(Math.floor(o[1]/i)*i,a)],o),t=n,this._intervalPrecision=t.intervalPrecision,this._interval=t.interval,this._niceExtent=t.niceTickExtent)},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]=Jd(Math.floor(e[0]/n)*n)),t.fixMax||(e[1]=Jd(Math.ceil(e[1]/n)*n))}}),tp=(Qd.create=function(){return new Qd},"__ec_stack_"),ep="undefined"!=typeof Float32Array?Float32Array:Array;function np(t){return t.get("stack")||tp+t.seriesIndex}function ip(t){return t.dim+t.index}function op(t,e){var n=[];return e.eachSeriesByType(t,function(t){up(t)&&!hp(t)&&n.push(t)}),n}function ap(t){var s=[];return Z(t,function(t){var e=t.getData(),n=t.coordinateSystem.getBaseAxis(),i=n.getExtent(),i="category"===n.type?n.getBandWidth():Math.abs(i[1]-i[0])/e.count(),e=F(t.get("barWidth"),i),o=F(t.get("barMaxWidth"),i),a=t.get("barGap"),r=t.get("barCategoryGap");s.push({bandWidth:i,barWidth:e,barMaxWidth:o,barGap:a,barCategoryGap:r,axisKey:ip(n),stackId:np(t)})}),rp(s)}function rp(t){var r={},c=(Z(t,function(t,e){var n=t.axisKey,i=t.bandWidth,i=r[n]||{bandWidth:i,remainedWidth:i,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},o=i.stacks,n=(r[n]=i,t.stackId),a=(o[n]||i.autoWidthCount++,o[n]=o[n]||{width:0,maxWidth:0},t.barWidth),a=(a&&!o[n].width&&(o[n].width=a,a=Math.min(i.remainedWidth,a),i.remainedWidth-=a),t.barMaxWidth),o=(a&&(o[n].maxWidth=a),t.barGap),n=(null!=o&&(i.gap=o),t.barCategoryGap);null!=n&&(i.categoryGap=n)}),{});return Z(r,function(t,n){c[n]={};var e=t.stacks,i=t.bandWidth,i=F(t.categoryGap,i),o=F(t.gap,1),a=t.remainedWidth,r=t.autoWidthCount,s=(a-i)/(r+(r-1)*o),s=Math.max(s,0);Z(e,function(t,e){var n=t.maxWidth;n&&n<s&&(n=Math.min(n,a),t.width&&(n=Math.min(n,t.width)),a-=n,t.width=n,r--)}),s=(a-i)/(r+(r-1)*o),s=Math.max(s,0);var l,u=0,h=(Z(e,function(t,e){t.width||(t.width=s),u+=(l=t).width*(1+o)}),l&&(u-=l.width*o),-u/2);Z(e,function(t,e){c[n][e]=c[n][e]||{offset:h,width:t.width},h+=t.width*(1+o)})}),c}function sp(t,e,n){if(t&&e)return null!=(t=t[ip(e)])&&null!=n?t[np(n)]:t}function lp(t,e){var t=op(t,e),I=ap(t),T={};Z(t,function(t){var e=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),o=np(t),a=I[ip(i)][o],r=a.offset,s=a.width,a=n.getOtherAxis(i),l=t.get("barMinHeight")||0;T[o]=T[o]||[],e.setLayout({offset:r,size:s});for(var u=e.mapDimension(a.dim),h=e.mapDimension(i.dim),c=Vd(e,u),d=a.isHorizontal(),p=cp(0,a),g=0,f=e.count();g<f;g++){var m,y,v,x,_,w,b,S=e.get(u,g),M=e.get(h,g);isNaN(S)||(w=0<=S?"p":"n",b=p,c&&(T[o][M]||(T[o][M]={p:p,n:p}),b=T[o][M][w]),d?(m=b,y=(_=n.dataToPoint([S,M]))[1]+r,v=_[0]-p,x=s,Math.abs(v)<l&&(v=(v<0?-1:1)*l),c&&(T[o][M][w]+=v)):(m=(_=n.dataToPoint([M,S]))[0]+r,y=b,v=s,x=_[1]-p,Math.abs(x)<l&&(x=(x<=0?-1:1)*l),c&&(T[o][M][w]+=x)),e.setItemLayout(g,{x:m,y:y,width:v,height:x}))}},this)}n={seriesType:"bar",plan:ah(),reset:function(t){var e,s,n,l,u,h,c,d,p;if(up(t)&&hp(t))return e=t.getData(),s=t.coordinateSystem,n=s.getBaseAxis(),l=s.getOtherAxis(n),u=e.mapDimension(l.dim),h=e.mapDimension(n.dim),c=l.isHorizontal(),d=c?0:1,.5<(p=sp(ap([t]),n,t).width)||(p=.5),{progress:function(t,e){for(var n,i=new ep(2*t.count),o=[],a=[],r=0;null!=(n=t.next());)a[d]=e.get(u,n),a[1-d]=e.get(h,n),o=s.dataToPoint(a,null,o),i[r++]=o[0],i[r++]=o[1];e.setLayout({largePoints:i,barWidth:p,valueAxisStart:cp(0,l),valueAxisHorizontal:c})}}}};function up(t){return t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type}function hp(t){return t.pipelineContext&&t.pipelineContext.large}function cp(t,e){var n,i=e.getGlobalExtent(),i=i[0]>i[1]?(n=i[1],i[0]):(n=i[0],i[1]),e=e.toGlobalCoord(e.dataToCoord(0));return e=i<(e=e<n?n:e)?i:e}var dp=Qd.prototype,pp=Math.ceil,gp=Math.floor,e=36e5,fp=864e5,mp=Qd.extend({type:"time",getLabel:function(t){var e=this._stepLvl,t=new Date(t);return ul(e[0],t,this.getSetting("useUTC"))},niceExtent:function(t){var e=this._extent,n=(e[0]===e[1]&&(e[0]-=fp,e[1]+=fp),e[1]===-1/0&&e[0]===1/0&&(n=new Date,e[1]=+new Date(n.getFullYear(),n.getMonth(),n.getDate()),e[0]=e[1]-fp),this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval),this._interval);t.fixMin||(e[0]=Es(gp(e[0]/n)*n)),t.fixMax||(e[1]=Es(pp(e[1]/n)*n))},niceTicks:function(t,e,n){var i=this._extent,o=i[1]-i[0],a=o/(t=t||10),e=(null!=e&&a<e&&(a=e),yp.length),n=function(t,e,n,i){for(;n<i;){var o=n+i>>>1;t[o][1]<e?n=1+o:i=o}return n}(yp,a=null!=n&&n<a?n:a,0,e),a=yp[Math.min(n,e-1)],n=a[1],e=("year"===a[0]&&(n*=js(o/n/t,!0)),this.getSetting("useUTC")?0:60*new Date(+i[0]||+i[1]).getTimezoneOffset()*1e3),o=[Math.round(pp((i[0]-e)/n)*n+e),Math.round(gp((i[1]-e)/n)*n+e)];$d(o,i),this._stepLvl=a,this._interval=n,this._niceExtent=o},parse:function(t){return+Xs(t)}}),yp=(Z(["contain","normalize"],function(e){mp.prototype[e]=function(t){return dp[e].call(this,this.parse(t))}}),[["hh:mm:ss",1e3],["hh:mm:ss",5e3],["hh:mm:ss",1e4],["hh:mm:ss",15e3],["hh:mm:ss",3e4],["hh:mm\nMM-dd",6e4],["hh:mm\nMM-dd",3e5],["hh:mm\nMM-dd",6e5],["hh:mm\nMM-dd",9e5],["hh:mm\nMM-dd",18e5],["hh:mm\nMM-dd",e],["hh:mm\nMM-dd",72e5],["hh:mm\nMM-dd",6*e],["hh:mm\nMM-dd",432e5],["MM-dd\nyyyy",fp],["MM-dd\nyyyy",2*fp],["MM-dd\nyyyy",3*fp],["MM-dd\nyyyy",4*fp],["MM-dd\nyyyy",5*fp],["MM-dd\nyyyy",6*fp],["week",7*fp],["MM-dd\nyyyy",864e6],["week",14*fp],["week",21*fp],["month",31*fp],["week",42*fp],["month",62*fp],["week",70*fp],["quarter",95*fp],["month",31*fp*4],["month",13392e6],["half-year",16416e6],["month",31*fp*8],["month",26784e6],["year",380*fp]]),vp=(mp.create=function(t){return new mp({useUTC:t.ecModel.get("useUTC")})},Wd.prototype),xp=Qd.prototype,_p=Bs,wp=Es,bp=Math.floor,Sp=Math.ceil,Mp=Math.pow,Ip=Math.log,Tp=Wd.extend({type:"log",base:10,$constructor:function(){Wd.apply(this,arguments),this._originalScale=new Qd},getTicks:function(){var n=this._originalScale,i=this._extent,o=n.getExtent();return I(xp.getTicks.call(this),function(t){var e=Es(Mp(this.base,t)),e=t===i[0]&&n.__fixMin?Ap(e,o[0]):e;return t===i[1]&&n.__fixMax?Ap(e,o[1]):e},this)},getLabel:xp.getLabel,scale:function(t){return t=vp.scale.call(this,t),Mp(this.base,t)},setExtent:function(t,e){var n=this.base;t=Ip(t)/Ip(n),e=Ip(e)/Ip(n),xp.setExtent.call(this,t,e)},getExtent:function(){var t=this.base,e=vp.getExtent.call(this),t=(e[0]=Mp(t,e[0]),e[1]=Mp(t,e[1]),this._originalScale),n=t.getExtent();return t.__fixMin&&(e[0]=Ap(e[0],n[0])),t.__fixMax&&(e[1]=Ap(e[1],n[1])),e},unionExtent:function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=Ip(t[0])/Ip(e),t[1]=Ip(t[1])/Ip(e),vp.unionExtent.call(this,t)},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},niceTicks:function(t){t=t||10;var e=this._extent,n=e[1]-e[0];if(!(n==1/0||n<=0)){var i=Ys(n);for(t/n*i<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&0<Math.abs(i);)i*=10;t=[Es(Sp(e[0]/i)*i),Es(bp(e[1]/i)*i)];this._interval=i,this._niceExtent=t}},niceExtent:function(t){xp.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});function Ap(t,e){return wp(t,_p(e))}function Dp(t,e){var n,i,o,a,r,s=t.type,l=e.getMin(),u=e.getMax(),h=null!=l,c=null!=u,d=t.getExtent(),p=("ordinal"===s?p=e.getCategories().length:("boolean"==typeof(i=D(i=e.get("boundaryGap"))?i:[i||0,i||0])[0]&&(H&&console.warn('Boolean type for boundaryGap is only allowed for ordinal axis. Please use string in percentage instead, e.g., "20%". Currently, boundaryGap is set to be 0.'),i=[0,0]),i[0]=F(i[0],1),i[1]=F(i[1],1),o=d[1]-d[0]||Math.abs(d[0])),null==l&&(l="ordinal"===s?p?0:NaN:d[0]-i[0]*o),null==u&&(u="ordinal"===s?p?p-1:NaN:d[1]+i[1]*o),"dataMin"===l?l=d[0]:"function"==typeof l&&(l=l({min:d[0],max:d[1]})),"dataMax"===u?u=d[1]:"function"==typeof u&&(u=u({min:d[0],max:d[1]})),null!=l&&isFinite(l)||(l=NaN),null!=u&&isFinite(u)||(u=NaN),t.setBlank(at(l)||at(u)||"ordinal"===s&&!t.getOrdinalMeta().categories.length),e.getNeedCrossZero()&&(l=0<l&&0<u&&!h?0:l)<0&&u<0&&!c&&(u=0),e.ecModel);return p&&"time"===s&&(Z(i=op("bar",p),function(t){n|=t.getBaseAxis()===e.axis}),n)&&(o=ap(i),d=l,t=u,h=o,s=(s=(c=e).axis.getExtent())[1]-s[0],l=(p=void 0===(h=sp(h,c.axis))?{min:d,max:t}:(a=1/0,Z(h,function(t){a=Math.min(t.offset,a)}),r=-1/0,Z(h,function(t){r=Math.max(t.offset+t.width,r)}),a=Math.abs(a),r=Math.abs(r),{min:d-=a/(c=a+r)*(s=(h=t-d)/(1-(a+r)/s)-h),max:t+=r/c*s})).min,u=p.max),[l,u]}function Cp(t,e){var n=Dp(t,e),i=null!=e.getMin(),o=null!=e.getMax(),a=e.get("splitNumber"),r=("log"===t.type&&(t.base=e.get("logBase")),t.type),n=(t.setExtent(n[0],n[1]),t.niceExtent({splitNumber:a,fixMin:i,fixMax:o,minInterval:"interval"===r||"time"===r?e.get("minInterval"):null,maxInterval:"interval"===r||"time"===r?e.get("maxInterval"):null}),e.get("interval"));null!=n&&t.setInterval&&t.setInterval(n)}function Lp(t,e){if(e=e||t.get("type"))switch(e){case"category":return new Ud(t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),[1/0,-1/0]);case"value":return new Qd;default:return(Wd.getClass(e)||Qd).create(t)}}function kp(n){var e,i=n.getLabelModel().get("formatter"),o="category"===n.type?n.scale.getExtent()[0]:null;return"string"==typeof i?(e=i,i=function(t){return t=n.scale.getLabel(t),e.replace("{value}",null!=t?t:"")}):"function"==typeof i?function(t,e){return null!=o&&(e=t-o),i(Pp(n,t),e)}:function(t){return n.scale.getLabel(t)}}function Pp(t,e){return"category"===t.type?t.scale.getLabel(e):e}function Np(t){var e,n,i,o=t.model,a=t.scale;if(o.get("axisLabel.show")&&!a.isBlank()){var r,s,o="category"===t.type,l=a.getExtent(),u=o?a.count():(r=a.getTicks()).length,h=t.getLabelModel(),c=kp(t),d=1;40<u&&(d=Math.ceil(u/40));for(var p=0;p<u;p+=d){var g=c(r?r[p]:l[0]+p),f=(g=h.getTextRect(g),e=h.get("rotate")||0,n=i=f=n=void 0,e=e*Math.PI/180,g=g.plain(),n=g.width,f=g.height,i=n*Math.cos(e)+f*Math.sin(e),n=n*Math.sin(e)+f*Math.cos(e),new z(g.x,g.y,i,n));s?s.union(f):s=f}return s}}function Op(t){t=t.get("interval");return null==t?"auto":t}function Ep(t){return"category"===t.type&&0===Op(t.getLabelModel())}Z(["contain","normalize"],function(e){Tp.prototype[e]=function(t){return t=Ip(t)/Ip(this.base),vp[e].call(this,t)}}),Tp.create=function(){return new Tp};var zp={getMin:function(t){var e=this.option,t=t||null==e.rangeStart?e.min:e.rangeStart;return t=this.axis&&null!=t&&"dataMin"!==t&&"function"!=typeof t&&!at(t)?this.axis.scale.parse(t):t},getMax:function(t){var e=this.option,t=t||null==e.rangeEnd?e.max:e.rangeEnd;return t=this.axis&&null!=t&&"dataMax"!==t&&"function"!=typeof t&&!at(t)?this.axis.scale.parse(t):t},getNeedCrossZero:function(){var t=this.option;return null==t.rangeStart&&null==t.rangeEnd&&!t.scale},getCoordSysModel:yt,setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},Fh=Vr({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()}}),e=Vr({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()}}),Rp=Vr({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,a=o*o/(e-o),e=i-e+o+a,r=Math.asin(a/o),s=Math.cos(r)*o,l=Math.sin(r),u=Math.cos(r),h=.6*o,c=.7*o;t.moveTo(n-s,e+a),t.arc(n,e,o,Math.PI-r,2*Math.PI+r),t.bezierCurveTo(n+s-l*h,e+a+u*h,n,i-c,n,i),t.bezierCurveTo(n,i-c,n-s+l*h,e+a+u*h,n-s,e+a),t.closePath()}}),l=Vr({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()}}),Bp={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}},Vp={},Gp=(Z({line:Sr,rect:V,roundRect:V,square:V,circle:hr,diamond:e,pin:Rp,arrow:l,triangle:Fh},function(t,e){Vp[e]=new t}),Vr({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},beforeBrush:function(){var t=this.style;"pin"===this.shape.symbolType&&"inside"===t.textPosition&&(t.textPosition=["50%","40%"],t.textAlign="center",t.textVerticalAlign="middle")},buildPath:function(t,e,n){var i=e.symbolType,o=Vp[i];"none"!==e.symbolType&&(o=o||Vp[i="rect"],Bp[i](e.x,e.y,e.width,e.height,o.shape),o.buildPath(t,o.shape,n))}}));function Fp(t,e){var n,i;"image"!==this.type&&(n=this.style,(i=this.shape)&&"line"===i.symbolType?n.stroke=t:this.__isEmptyBrush?(n.stroke=t,n.fill=e||"#fff"):(n.fill&&(n.fill=t),n.stroke&&(n.stroke=t)),this.dirty(!1))}function Wp(t,e,n,i,o,a,r){var s=0===t.indexOf("empty");return(r=0===(t=s?t.substr(5,1).toLowerCase()+t.substr(6):t).indexOf("image://")?Fr(t.slice(8),new z(e,n,i,o),r?"center":"cover"):0===t.indexOf("path://")?Gr(t.slice(7),{},new z(e,n,i,o),r?"center":"cover"):new Gp({shape:{symbolType:t,x:e,y:n,width:i,height:o}})).__isEmptyBrush=s,r.setColor=Fp,r.setColor(a),r}var e=Object.freeze({__proto__:null,completeDimensions:Ed,createDimensions:Rd,createList:function(t){return Fd(t.getSource(),t)},createScale:function(t,e){var n=e;return w.isInstance(e)||i(n=new w(e),zp),(e=Lp(n)).setExtent(t[0],t[1]),Cp(e,n),e},createSymbol:Wp,dataStack:{isDimensionStacked:Vd,enableDataStack:Bd,getStackedDimension:Gd},getLayoutRect:yl,mixinAxisModelCommonMethods:function(t){i(t,zp)}}),Hp=1e-8;function Zp(t,e){return Math.abs(t-e)<Hp}function Xp(t,e,n){var i=0,o=t[0];if(!o)return!1;for(var a=1;a<t.length;a++){var r=t[a];i+=za(o[0],o[1],r[0],r[1],e,n),o=r}var s=t[0];return Zp(o[0],s[0])&&Zp(o[1],s[1])||(i+=za(o[0],o[1],s[0],s[1],e,n)),0!==i}function Yp(t,e,n){this.name=t,this.geometries=e,n=n?[n[0],n[1]]:[(t=this.getBoundingRect()).x+t.width/2,t.y+t.height/2],this.center=n}function Up(t,e,n){for(var i=[],o=e[0],a=e[1],r=0;r<t.length;r+=2){var s=(s=t.charCodeAt(r)-64)>>1^-(1&s),l=(l=t.charCodeAt(r+1)-64)>>1^-(1&l),o=s+=o,a=l+=a;i.push([s/n,l/n])}return i}function jp(t){var e=t;if(e.UTF8Encoding){var n=e.UTF8Scale;null==n&&(n=1024);for(var i=e.features,o=0;o<i.length;o++)for(var a=i[o].geometry,r=a.coordinates,s=a.encodeOffsets,l=0;l<r.length;l++){var u=r[l];if("Polygon"===a.type)r[l]=Up(u,s[l],n);else if("MultiPolygon"===a.type)for(var h=0;h<u.length;h++){var c=u[h];u[h]=Up(c,s[l][h],n)}}e.UTF8Encoding=!1}return I(tt(t.features,function(t){return t.geometry&&t.properties&&0<t.geometry.coordinates.length}),function(t){var e=t.properties,t=t.geometry,n=t.coordinates,i=[],t=("Polygon"===t.type&&i.push({type:"polygon",exterior:n[0],interiors:n.slice(1)}),"MultiPolygon"===t.type&&Z(n,function(t){t[0]&&i.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})}),new Yp(e.name,i,e.cp));return t.properties=e,t})}Yp.prototype={constructor:Yp,properties:null,getBoundingRect:function(){var t=this._rect;if(t)return t;for(var t=Number.MAX_VALUE,e=[t,t],n=[-t,-t],i=[],o=[],a=this.geometries,r=0;r<a.length;r++)"polygon"===a[r].type&&(pa(a[r].exterior,i,o),Rt(e,e,i),Bt(n,n,o));return 0===r&&(e[0]=e[1]=n[0]=n[1]=0),this._rect=new z(e[0],e[1],n[0]-e[0],n[1]-e[1])},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 a=n[i].exterior,r=n[i].interiors;if(Xp(a,t[0],t[1])){for(var s=0;s<(r?r.length:0);s++)if(Xp(r[s]))continue t;return!0}}return!1},transformTo:function(t,e,n,i){var o=this.getBoundingRect(),a=o.width/o.height;n?i=i||n/a:n=a*i;for(var a=new z(t,e,n,i),r=o.calculateTransform(a),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++)zt(u[c],u[c],r);for(var d=0;d<(h?h.length:0);d++)for(c=0;c<h[d].length;c++)zt(h[d][c],h[d][c],r)}(o=this._rect).copy(a),this.center=[o.x+o.width/2,o.y+o.height/2]},cloneShallow:function(t){t=new Yp(t=null==t?this.name:t,this.geometries,this.center);return t._rect=this._rect,t.transformTo=null,t}};var qp=_o();function Kp(t){return"category"===t.type?(o=(e=t).getLabelModel(),a=Jp(e,o),!o.get("show")||e.scale.isBlank()?{labels:[],labelCategoryInterval:a.labelCategoryInterval}:a):(o=(n=t).scale.getTicks(),i=kp(n),{labels:I(o,function(t,e){return{formattedLabel:i(t,e),rawLabel:n.scale.getLabel(t),tickValue:t}})});var n,i,e,o,a}function $p(t,e){var n,i,o,a,r,s;return"category"===t.type?(e=e,a=Qp(n=t,"ticks"),r=Op(e),(s=tg(a,r))||(e.get("show")&&!n.scale.isBlank()||(i=[]),i=et(r)?ig(n,r,!0):"auto"===r?(s=Jp(n,n.getLabelModel()),o=s.labelCategoryInterval,I(s.labels,function(t){return t.tickValue})):ng(n,o=r,!0),eg(a,r,{ticks:i,tickCategoryInterval:o}))):{ticks:t.scale.getTicks()}}function Jp(t,e){var n,i=Qp(t,"labels"),e=Op(e);return tg(i,e)||eg(i,e,{labels:et(e)?ig(t,e):ng(t,n="auto"===e?null!=(t=qp(i=t).autoInterval)?t:qp(i).autoInterval=i.calculateCategoryInterval():e),labelCategoryInterval:n})}function Qp(t,e){return qp(t)[e]||(qp(t)[e]=[])}function tg(t,e){for(var n=0;n<t.length;n++)if(t[n].key===e)return t[n].value}function eg(t,e,n){return t.push({key:e,value:n}),n}function ng(t,e,n){var i=kp(t),o=t.scale,a=o.getExtent(),r=t.getLabelModel(),s=[],l=Math.max((e||0)+1,1),e=a[0],u=o.count(),u=(0!==e&&1<l&&2<u/l&&(e=Math.round(Math.ceil(e/l)*l)),Ep(t)),t=r.get("showMinLabel")||u,r=r.get("showMaxLabel")||u;t&&e!==a[0]&&c(a[0]);for(var h=e;h<=a[1];h+=l)c(h);function c(t){s.push(n?t:{formattedLabel:i(t),rawLabel:o.getLabel(t),tickValue:t})}return r&&h!==a[1]&&c(a[1]),s}function ig(t,n,i){var o=t.scale,a=kp(t),r=[];return Z(o.getTicks(),function(t){var e=o.getLabel(t);n(t,e)&&r.push(i?t:{formattedLabel:a(t),rawLabel:e,tickValue:t})}),r}function og(t,e,n){this.dim=t,this.scale=e,this._extent=n||[0,0],this.inverse=!1,this.onBand=!1}var ag=[0,1];function rg(t,e){e=(t[1]-t[0])/e/2;t[0]+=e,t[1]-=e}og.prototype={constructor:og,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},containData:function(t){return this.contain(this.dataToCoord(t))},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(t){return Vs(t||this.scale.getExtent(),this._extent)},setExtent:function(t,e){var n=this._extent;n[0]=t,n[1]=e},dataToCoord:function(t,e){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&"ordinal"===i.type&&rg(n=n.slice(),i.count()),Os(t,ag,n,e)},coordToData:function(t,e){var n=this._extent,i=this.scale,i=(this.onBand&&"ordinal"===i.type&&rg(n=n.slice(),i.count()),Os(t,n,ag,e));return this.scale.scale(i)},pointToData:function(t,e){},getTicksCoords:function(t){var e,n,i,o,a,r=(t=t||{}).tickModel||this.getTickModel(),s=$p(this,r),l=I(s.ticks,function(t){return{coord:this.dataToCoord(t),tickValue:t}},this),r=r.get("alignWithLabel");return e=this,n=l,s.tickCategoryInterval,s=r,r=t.clamp,t=n.length,e.onBand&&!s&&t&&(s=e.getExtent(),1===t?(n[0].coord=s[0],i=n[1]={coord:s[0]}):(o=n[1].coord-n[0].coord,Z(n,function(t){t.coord-=o/2}),i={coord:n[t-1].coord+o},n.push(i)),a=s[0]>s[1],u(n[0].coord,s[0])&&(r?n[0].coord=s[0]:n.shift()),r&&u(s[0],n[0].coord)&&n.unshift({coord:s[0]}),u(s[1],i.coord)&&(r?i.coord=s[1]:n.pop()),r)&&u(i.coord,s[1])&&n.push({coord:s[1]}),l;function u(t,e){return a?e<t:t<e}},getViewLabels:function(){return Kp(this).labels},getLabelModel:function(){return this.model.getModel("axisLabel")},getTickModel:function(){return this.model.getModel("axisTick")},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},isHorizontal:null,getRotate:null,calculateCategoryInterval:function(){var t=this,e=(a=(i=t).getLabelModel(),{axisRotate:i.getRotate?i.getRotate():i.isHorizontal&&!i.isHorizontal()?90:0,labelRotate:a.get("rotate")||0,font:a.getFont()}),n=kp(t),i=(e.axisRotate-e.labelRotate)/180*Math.PI,o=(a=t.scale).getExtent(),a=a.count();if(o[1]-o[0]<1)return 0;var r=1;40<a&&(r=Math.max(1,Math.floor(a/40)));for(var s=o[0],l=t.dataToCoord(s+1)-t.dataToCoord(s),u=Math.abs(l*Math.cos(i)),l=Math.abs(l*Math.sin(i)),h=0,c=0;s<=o[1];s+=r)var d=1.3*(p=ii(n(s),e.font,"center","top")).width,p=1.3*p.height,h=Math.max(h,d,7),c=Math.max(c,p,7);return i=h/u,u=c/l,isNaN(i)&&(i=1/0),isNaN(u)&&(u=1/0),l=Math.max(0,Math.floor(Math.min(i,u))),i=qp(t.model),u=i.lastAutoInterval,t=i.lastTickCount,null!=u&&null!=t&&Math.abs(u-l)<=1&&Math.abs(t-a)<=1&&l<u?l=u:(i.lastTickCount=a,i.lastAutoInterval=l),l}};var Rp=jp,sg={},lg=(Z(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],function(t){sg[t]=vt[t]}),{});function ug(t){return this._axes[t]}Z(["extendShape","extendPath","makePath","makeImage","mergePath","resizePath","createIcon","setHoverStyle","setLabelStyle","setTextStyle","setText","getFont","updateProps","initProps","getTransform","clipPointsByRect","clipRectByRect","Group","Image","Text","Circle","Sector","Ring","Polygon","Polyline","Rect","Line","BezierCurve","Arc","IncrementalDisplayable","CompoundPath","LinearGradient","RadialGradient","BoundingRect"],function(t){lg[t]=Is[t]});function hg(t){this._axes={},this._dimList=[],this.name=t||""}function cg(t){hg.call(this,t)}hg.prototype={constructor:hg,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return I(this._dimList,ug,this)},getAxesByScale:function(e){return e=e.toLowerCase(),tt(this.getAxes(),function(t){return t.scale.type===e})},addAxis:function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},dataToCoord:function(t){return this._dataCoordConvert(t,"dataToCoord")},coordToData:function(t){return this._dataCoordConvert(t,"coordToData")},_dataCoordConvert:function(t,e){for(var n=this._dimList,i=t instanceof Array?[]:{},o=0;o<n.length;o++){var a=n[o],r=this._axes[a];i[a]=r[e](t[a])}return i}},cg.prototype={constructor:cg,type:"cartesian2d",dimensions:["x","y"],getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},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]))},containData:function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},dataToPoint:function(t,e,n){var i=this.getAxis("x"),o=this.getAxis("y");return(n=n||[])[0]=i.toGlobalCoord(i.dataToCoord(t[0])),n[1]=o.toGlobalCoord(o.dataToCoord(t[1])),n},clampData:function(t,e){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,o=n.getExtent(),a=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(a[0],a[1]),i),Math.max(a[0],a[1])),e},pointToData:function(t,e){var n=this.getAxis("x"),i=this.getAxis("y");return(e=e||[])[0]=n.coordToData(n.toLocalCoord(t[0])),e[1]=i.coordToData(i.toLocalCoord(t[1])),e},getOtherAxis:function(t){return this.getAxis("x"===t.dim?"y":"x")}},a(cg,hg);function dg(t,e,n,i,o){og.call(this,t,e,n),this.type=i||"value",this.position=o||"bottom"}dg.prototype={constructor:dg,index:0,getAxesOnZeroOf:null,model:null,isHorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},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},getOtherAxis:function(){this.grid.getOtherAxis()},pointToData:function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},toLocalCoord:null,toGlobalCoord:null},a(dg,og);var l={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:"#333",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:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},pg={},gg=(pg.categoryAxis=f({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},l),pg.valueAxis=f({boundaryGap:[0,0],splitNumber:5},l),pg.timeAxis=C({scale:!0,min:"dataMin",max:"dataMax"},pg.valueAxis),pg.logAxis=C({scale:!0,logBase:10},pg.valueAxis),["value","category","time","log"]);function fg(a,t,r,e){Z(gg,function(o){t.extend({type:a+"Axis."+o,mergeDefaultAndTheme:function(t,e){var n=this.layoutMode,i=n?_l(t):{};f(t,e.getTheme().get(o+"Axis")),f(t,this.getDefaultOption()),t.type=r(a,t),n&&xl(t,i,n)},optionUpdated:function(){"category"===this.option.type&&(this.__ordinalMeta=Hd.createByAxisModel(this))},getCategories:function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:q([{},pg[o+"Axis"],e],!0)})}),u.registerSubTypeDefaulter(a+"Axis",L(r,a))}var mg=u.extend({type:"cartesian2dAxis",axis:null,init:function(){mg.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){mg.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){mg.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});function yg(t,e){return e.type||(e.data?"category":"value")}f(mg.prototype,zp);Fh={offset:0};function vg(t,e){return t.getCoordSysModel()===e}function xg(t,e,n){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,n),this.model=t}fg("x",mg,yg,Fh),fg("y",mg,yg,Fh),u.extend({type:"grid",dependencies:["xAxis","yAxis"],layoutMode:"box",coordinateSystem:null,defaultOption:{show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:60,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"}});l=xg.prototype;function _g(t,e,n,i){n.getAxesOnZeroOf=function(){return o?[o]:[]};var o,a=t[e],t=n.model,e=t.get("axisLine.onZero"),n=t.get("axisLine.onZeroAxisIndex");if(e){if(null!=n)wg(a[n])&&(o=a[n]);else for(var r in a)if(a.hasOwnProperty(r)&&wg(a[r])&&!i[s(a[r])]){o=a[r];break}o&&(i[s(o)]=!0)}function s(t){return t.dim+"_"+t.index}}function wg(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}l.type="grid",l.axisPointerEnabled=!0,l.getRect=function(){return this._rect},l.update=function(t,e){var n=this._axesMap,i=(this._updateScale(t,this.model),Z(n.x,function(t){Cp(t.scale,t.model)}),Z(n.y,function(t){Cp(t.scale,t.model)}),{});Z(n.x,function(t){_g(n,"y",t,i)}),Z(n.y,function(t){_g(n,"x",t,i)}),this.resize(this.model,e)},l.resize=function(t,e,n){var r=yl(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),i=(this._rect=r,this._axesList);function o(){Z(i,function(t){var e,n,i=t.isHorizontal(),o=i?[0,r.width]:[0,r.height],a=t.inverse?1:0;t.setExtent(o[a],o[1-a]),o=t,e=i?r.x:r.y,a=o.getExtent(),n=a[0]+a[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}})}o(),!n&&t.get("containLabel")&&(Z(i,function(t){var e,n,i;t.model.get("axisLabel.inside")||(e=Np(t))&&(n=t.isHorizontal()?"height":"width",i=t.model.get("axisLabel.margin"),r[n]-=e[n]+i,"top"===t.position?r.y+=e.height+i:"left"===t.position&&(r.x+=e.width+i))}),o())},l.getAxis=function(t,e){var n=this._axesMap[t];if(null!=n){if(null==e)for(var i in n)if(n.hasOwnProperty(i))return n[i];return n[e]}},l.getAxes=function(){return this._axesList.slice()},l.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]},l.getCartesians=function(){return this._coordsList.slice()},l.convertToPixel=function(t,e,n){t=this._findConvertTarget(t,e);return t.cartesian?t.cartesian.dataToPoint(n):t.axis?t.axis.toGlobalCoord(t.axis.dataToCoord(n)):null},l.convertFromPixel=function(t,e,n){t=this._findConvertTarget(t,e);return t.cartesian?t.cartesian.pointToData(n):t.axis?t.axis.coordToData(t.axis.toLocalCoord(n)):null},l._findConvertTarget=function(t,e){var n,i,o=e.seriesModel,a=e.xAxisModel||o&&o.getReferringComponents("xAxis")[0],r=e.yAxisModel||o&&o.getReferringComponents("yAxis")[0],e=e.gridModel,s=this._coordsList;return o?S(s,n=o.coordinateSystem)<0&&(n=null):a&&r?n=this.getCartesian(a.componentIndex,r.componentIndex):a?i=this.getAxis("x",a.componentIndex):r?i=this.getAxis("y",r.componentIndex):e&&e.coordinateSystem===this&&(n=this._coordsList[0]),{cartesian:n,axis:i}},l.containPoint=function(t){var e=this._coordsList[0];if(e)return e.containPoint(t)},l._initCartesian=function(a,t,e){var r={left:!1,right:!1,top:!1,bottom:!1},s={x:{},y:{}},l={x:0,y:0};function n(o){return function(t,e){var n,i;vg(t,a)&&(n=t.get("position"),"x"===o?"top"!==n&&"bottom"!==n&&r[n="bottom"]&&(n="top"===n?"bottom":"top"):"left"!==n&&"right"!==n&&r[n="left"]&&(n="left"===n?"right":"left"),r[n]=!0,i="category"===(n=new dg(o,Lp(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=this,n.index=e,this._axesList.push(n),s[o][e]=n,l[o]++)}}t.eachComponent("xAxis",n("x"),this),t.eachComponent("yAxis",n("y"),this),l.x&&l.y?Z((this._axesMap=s).x,function(i,o){Z(s.y,function(t,e){var e="x"+o+"y"+e,n=new cg(e);n.grid=this,n.model=a,this._coordsMap[e]=n,this._coordsList.push(n),n.addAxis(i),n.addAxis(t)},this)},this):(this._axesMap={},this._axesList=[])},l._updateScale=function(t,i){function o(e,n){Z(e.mapDimension(n.dim,!0),function(t){n.scale.unionExtentFromData(e,Gd(e,t))})}Z(this._axesList,function(t){t.scale.setExtent(1/0,-1/0)}),t.eachSeries(function(t){var e,n;Mg(t)&&(n=(e=Sg(t))[0],e=e[1],vg(n,i))&&vg(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)},l.getTooltipAxes=function(n){var i=[],o=[];return Z(this.getCartesians(),function(t){var e=null!=n&&"auto"!==n?t.getAxis(n):t.getBaseAxis(),t=t.getOtherAxis(e);S(i,e)<0&&i.push(e),S(o,t)<0&&o.push(t)}),{baseAxes:i,otherAxes:o}};var bg=["xAxis","yAxis"];function Sg(n){return I(bg,function(t){var e=n.getReferringComponents(t)[0];if(H&&!e)throw new Error(t+' "'+rt(n.get(t+"Index"),n.get(t+"Id"),0)+'" not found');return e})}function Mg(t){return"cartesian2d"===t.get("coordinateSystem")}xg.create=function(i,o){var a=[];return i.eachComponent("grid",function(t,e){var n=new xg(t,i,o);n.name="grid_"+e,n.resize(t,o,!0),t.coordinateSystem=n,a.push(n)}),i.eachSeries(function(t){if(Mg(t)){var e=Sg(t),n=e[0],e=e[1],i=n.getCoordSysModel();if(H){if(!i)throw new Error('Grid "'+rt(n.get("gridIndex"),n.get("gridId"),0)+'" not found');if(n.getCoordSysModel()!==e.getCoordSysModel())throw new Error("xAxis and yAxis must use the same grid")}i=i.coordinateSystem;t.coordinateSystem=i.getCartesian(n.componentIndex,e.componentIndex)}}),a},xg.dimensions=xg.prototype.dimensions=cg.prototype.dimensions,eu.register("cartesian2d",xg);Fh=Ku.extend({type:"series.__base_bar__",getInitialData:function(t,e){return Fd(this.getSource(),this)},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]},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",itemStyle:{},emphasis:{}}});function Ig(t,e){var n=t.mapDimension("defaultedLabel",!0),i=n.length;if(1===i)return Ou(t,e,n[0]);if(i){for(var o=[],a=0;a<n.length;a++){var r=Ou(t,e,n[a]);o.push(r)}return o.join(" ")}}function Tg(t,e,n,i,o,a){us(t,e,n.getModel("label"),n.getModel("emphasis.label"),{labelFetcher:o,labelDataIndex:a,defaultText:Ig(o.getData(),a),isRectText:!0,autoColor:i}),Ag(t),Ag(e)}function Ag(t,e){"outside"===t.textPosition&&(t.textPosition=e)}Fh.extend({type:"series.bar",dependencies:["grid","polar"],brushSelector:"rect",getProgressive:function(){return!!this.get("large")&&this.get("progressive")},getProgressiveThreshold:function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return t=t<e?e:t}});var Dg=zo([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Cg=["itemStyle","barBorderWidth"],Lg=(O(w.prototype,{getBarItemStyle:function(t){var e,t=Dg(this,t);return this.getBorderLineDash&&(e=this.getBorderLineDash())&&(t.lineDash=e),t}}),ld({type:"bar",render:function(t,e,n){this._updateDrawMode(t);var i=t.get("coordinateSystem");return"cartesian2d"===i||"polar"===i?this._isLargeDraw?this._renderLarge(t,e,n):this._renderNormal(t,e,n):H&&console.warn("Only cartesian2d and polar supported for bar."),this.group},incrementalPrepareRender:function(t,e,n){this._clear(),this._updateDrawMode(t)},incrementalRender:function(t,e,n,i){this._incrementalRenderLarge(t,e)},_updateDrawMode:function(t){t=t.pipelineContext.large;(null==this._isLargeDraw||t^this._isLargeDraw)&&(this._isLargeDraw=t,this._clear())},_renderNormal:function(o,t,e){var a,r=this.group,s=o.getData(),l=this._data,u=o.coordinateSystem,n=u.getBaseAxis(),h=("cartesian2d"===u.type?a=n.isHorizontal():"polar"===u.type&&(a="angle"===n.dim),o.isAnimationEnabled()?o:null);s.diff(l).add(function(t){var e,n,i;s.hasValue(t)&&(e=s.getItemModel(t),n=Ng[u.type](s,t,e),i=Lg[u.type](s,t,e,n,a,h),s.setItemGraphicEl(t,i),r.add(i),Og(i,s,t,e,n,o,a,"polar"===u.type))}).update(function(t,e){var n,i,e=l.getItemGraphicEl(e);s.hasValue(t)?(n=s.getItemModel(t),i=Ng[u.type](s,t,n),e?G(e,{shape:i},h,t):e=Lg[u.type](s,t,n,i,a,h,!0),s.setItemGraphicEl(t,e),r.add(e),Og(e,s,t,n,i,o,a,"polar"===u.type)):r.remove(e)}).remove(function(t){var e=l.getItemGraphicEl(t);"cartesian2d"===u.type?e&&kg(t,h,e):e&&Pg(t,h,e)}).execute(),this._data=s},_renderLarge:function(t,e,n){this._clear(),zg(t,this.group)},_incrementalRenderLarge:function(t,e){zg(e,this.group,!0)},dispose:yt,remove:function(t){this._clear(t)},_clear:function(e){var t=this.group,n=this._data;e&&e.get("animation")&&n&&!this._isLargeDraw?n.eachItemGraphicEl(function(t){("sector"===t.type?Pg:kg)(t.dataIndex,e,t)}):t.removeAll(),this._data=null}}),{cartesian2d:function(t,e,n,i,o,a,r){var s,l=new V({shape:O({},i)});return a&&(s={},l.shape[o=o?"height":"width"]=0,s[o]=i[o],Is[r?"updateProps":"initProps"](l,{shape:s},a,e)),l},polar:function(t,e,n,i,o,a,r){var s,l,u=i.startAngle<i.endAngle,u=new pr({shape:C({clockwise:u},i)});return a&&(l={},u.shape[s=o?"r":"endAngle"]=o?0:i.startAngle,l[s]=i[s],Is[r?"updateProps":"initProps"](u,{shape:l},a,e)),u}});function kg(t,e,n){n.style.text=null,G(n,{shape:{width:0}},e,t,function(){n.parent&&n.parent.remove(n)})}function Pg(t,e,n){n.style.text=null,G(n,{shape:{r:n.shape.r0}},e,t,function(){n.parent&&n.parent.remove(n)})}var Ng={cartesian2d:function(t,e,n){var t=t.getItemLayout(e),e=function(t,e){t=t.get(Cg)||0;return Math.min(t,Math.abs(e.width),Math.abs(e.height))}(n,t),n=0<t.width?1:-1,i=0<t.height?1:-1;return{x:t.x+n*e/2,y:t.y+i*e/2,width:t.width-n*e,height:t.height-i*e}},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 Og(t,e,n,i,o,a,r,s){var l=e.getItemVisual(n,"color"),e=e.getItemVisual(n,"opacity"),u=i.getModel("itemStyle"),h=i.getModel("emphasis.itemStyle").getBarItemStyle(),e=(s||t.setShape("r",u.get("barBorderRadius")||0),t.useStyle(C({fill:l,opacity:e},u.getBarItemStyle())),i.getShallow("cursor"));e&&t.attr("cursor",e),r?o.height:o.width,s||Tg(t.style,h,i,l,a,n),ss(t,h)}var Eg=r.extend({type:"largeBar",shape:{points:[]},buildPath:function(t,e){for(var n=e.points,i=this.__startPoint,o=this.__valueIdx,a=0;a<n.length;a+=2)i[this.__valueIdx]=n[a+o],t.moveTo(i[0],i[1]),t.lineTo(n[a],n[a+1])}});function zg(t,e,n){var i=t.getData(),o=[],a=i.getLayout("valueAxisHorizontal")?1:0,n=(o[1-a]=i.getLayout("valueAxisStart"),new Eg({shape:{points:i.getLayout("largePoints")},incremental:!!n,__startPoint:o,__valueIdx:a}));e.add(n),o=n,a=t,n=(e=i).getVisual("borderColor")||e.getVisual("color"),a=a.getModel("itemStyle").getItemStyle(["color","borderColor"]),o.useStyle(a),o.style.fill=null,o.style.stroke=n,o.style.lineWidth=e.getLayout("barWidth")}var Rg=Math.PI;function Bg(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e}function Vg(t,e){this.opt=e,this.axisModel=t,C(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new R,(t=new R({position:e.position.slice(),rotation:e.rotation})).updateTransform(),this._transform=t.transform,this._dumbGroup=t}Vg.prototype={constructor:Vg,hasBuilder:function(t){return!!Gg[t]},add:function(t){Gg[t].call(this)},getGroup:function(){return this.group}};var Gg={axisLine:function(){var i,t,o,a,e,r,s,l=this.opt,n=this.axisModel;n.get("axisLine.show")&&(t=this.axisModel.axis.getExtent(),e=this._transform,i=[t[0],0],t=[t[1],0],e&&(zt(i,i,e),zt(t,t,e)),o=O({lineCap:"round"},n.getModel("axisLine.lineStyle").getLineStyle()),this.group.add(new Sr(Xr({anid:"line",shape:{x1:i[0],y1:i[1],x2:t[0],y2:t[1]},style:o,strokeContainThreshold:l.strokeContainThreshold||5,silent:!0,z2:1}))),a=n.get("axisLine.symbol"),e=n.get("axisLine.symbolSize"),"number"==typeof(n=n.get("axisLine.symbolOffset")||0)&&(n=[n,n]),null!=a)&&("string"==typeof a&&(a=[a,a]),r=(e="string"!=typeof e&&"number"!=typeof e?e:[e,e])[0],s=e[1],Z([{rotate:l.rotation+Math.PI/2,offset:n[0],r:0},{rotate:l.rotation-Math.PI/2,offset:n[1],r:Math.sqrt((i[0]-t[0])*(i[0]-t[0])+(i[1]-t[1])*(i[1]-t[1]))}],function(t,e){var n;"none"!==a[e]&&null!=a[e]&&(e=Wp(a[e],-r/2,-s/2,r,s,o.stroke,!0),n=t.r+t.offset,n=[i[0]+n*Math.cos(l.rotation),i[1]-n*Math.sin(l.rotation)],e.attr({rotation:t.rotate,position:n,silent:!0,z2:11}),this.group.add(e))},this))},axisTickLabel:function(){var t,e,n,i,o,a,r=this.axisModel,s=this.opt,l=function(t,e,n){var i=e.axis;if(e.get("axisTick.show")&&!i.scale.isBlank()){for(var o=e.getModel("axisTick"),a=o.getModel("lineStyle"),r=o.get("length"),s=i.getTicksCoords(),l=[],u=[],h=t._transform,c=[],d=0;d<s.length;d++){var p=s[d].coord,p=(l[0]=p,u[l[1]=0]=p,u[1]=n.tickDirection*r,h&&(zt(l,l,h),zt(u,u,h)),new Sr(Xr({anid:"tick_"+s[d].tickValue,shape:{x1:l[0],y1:l[1],x2:u[0],y2:u[1]},style:C(a.getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")}),z2:2,silent:!0})));t.group.add(p),c.push(p)}return c}}(this,r,s),u=r,r=function(s,l,u){var h=l.axis;{var c,d,t,e,p,g,f,m,y;if(rt(u.axisLabelShow,l.get("axisLabel.show"))&&!h.scale.isBlank())return c=l.getModel("axisLabel"),d=c.get("margin"),t=h.getViewLabels(),e=(rt(u.labelRotate,c.get("rotate"))||0)*Rg/180,p=Fg(u.rotation,e,u.labelDirection),g=l.getCategories(!0),f=[],m=Wg(l),y=l.get("triggerEvent"),Z(t,function(t,e){var n=t.tickValue,i=t.formattedLabel,t=t.rawLabel,o=c,a=(o=g&&g[n]&&g[n].textStyle?new w(g[n].textStyle,c,l.ecModel):o).getTextColor()||l.get("axisLine.lineStyle.color"),r=[h.dataToCoord(n),u.labelOffset+u.labelDirection*d],r=new B({anid:"label_"+n,position:r,rotation:p.rotation,silent:m,z2:10});hs(r.style,o,{text:i,textAlign:o.getShallow("align",!0)||p.textAlign,textVerticalAlign:o.getShallow("verticalAlign",!0)||o.getShallow("baseline",!0)||p.textVerticalAlign,textFill:"function"==typeof a?a("category"===h.type?t:"value"===h.type?n+"":n,e):a}),y&&(r.eventData=Bg(l),r.eventData.targetType="axisLabel",r.eventData.value=t),s._dumbGroup.add(r),r.updateTransform(),f.push(r),s.group.add(r),r.decomposeTransform()}),f}}(this,r,s),s=l;Ep(u.axis)||(l=u.get("axisLabel.showMinLabel"),u=u.get("axisLabel.showMaxLabel"),s=s||[],t=(r=r||[])[0],e=r[1],n=r[r.length-1],r=r[r.length-2],i=s[0],o=s[1],a=s[s.length-1],s=s[s.length-2],!1===l?(Hg(t),Hg(i)):Zg(t,e)&&(l?(Hg(e),Hg(o)):(Hg(t),Hg(i))),!1===u?(Hg(n),Hg(a)):Zg(r,n)&&(u?(Hg(r),Hg(s)):(Hg(n),Hg(a))))},axisName:function(){var t,e,n,i,o,a,r,s,l=this.opt,u=this.axisModel,h=rt(l.axisName,u.get("name"));h&&(r=u.get("nameLocation"),o=l.nameDirection,e=u.getModel("nameTextStyle"),i=u.get("nameGap")||0,n=(a=this.axisModel.axis.getExtent())[0]>a[1]?-1:1,n=["start"===r?a[0]-n*i:"end"===r?a[1]+n*i:(a[0]+a[1])/2,Xg(r)?l.labelOffset+o*i:0],null!=(i=u.get("nameRotate"))&&(i=i*Rg/180),Xg(r)?t=Fg(l.rotation,null!=i?i:l.rotation,o):(o=r,r=a,a=Ws((a=i||0)-(i=l).rotation),i=r[0]>r[1],r="start"===o&&!i||"start"!==o&&i,o=Hs(a-Rg/2)?(s=r?"bottom":"top","center"):Hs(a-1.5*Rg)?(s=r?"top":"bottom","center"):(s="middle",a<1.5*Rg&&Rg/2<a?r?"left":"right":r?"right":"left"),t={rotation:a,textAlign:o,textVerticalAlign:s},null==(s=l.axisNameAvailableWidth)||(s=Math.abs(s/Math.sin(t.rotation)),isFinite(s))||(s=null)),i=e.getFont(),a=(r=u.get("nameTruncate",!0)||{}).ellipsis,o=rt(l.nameTruncateMaxWidth,r.maxWidth,s),l=null!=a&&null!=o?cl(h,o,i,a,{minChar:2,placeholder:r.placeholder}):h,o=u.get("tooltip",!0),(r={componentType:a=u.mainType,name:h,$vars:["name"]})[a+"Index"]=u.componentIndex,hs((a=new B({anid:"name",__fullText:h,__truncatedText:l,position:n,rotation:t.rotation,silent:Wg(u),z2:1,tooltip:o&&o.show?O({content:h,formatter:function(){return h},formatterParams:r},o):null})).style,e,{text:l,textFont:i,textFill:e.getTextColor()||u.get("axisLine.lineStyle.color"),textAlign:t.textAlign,textVerticalAlign:t.textVerticalAlign}),u.get("triggerEvent")&&(a.eventData=Bg(u),a.eventData.targetType="axisName",a.eventData.name=h),this._dumbGroup.add(a),a.updateTransform(),this.group.add(a),a.decomposeTransform())}},Fg=Vg.innerTextLayout=function(t,e,n){var i,e=Ws(e-t),t=Hs(e)?(i=0<n?"top":"bottom","center"):Hs(e-Rg)?(i=0<n?"bottom":"top","center"):(i="middle",0<e&&e<Rg?0<n?"right":"left":0<n?"left":"right");return{rotation:e,textAlign:t,textVerticalAlign:i}};function Wg(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)}function Hg(t){t&&(t.ignore=!0)}function Zg(t,e){var n,i=t&&t.getBoundingRect().clone(),o=e&&e.getBoundingRect().clone();if(i&&o)return de(n=le([]),n,-t.rotation),i.applyTransform(he([],n,t.getLocalTransform())),o.applyTransform(he([],n,e.getLocalTransform())),i.intersect(o)}function Xg(t){return"middle"===t||"center"===t}var Yg=Z,Ug=L;function jg(t,e){var u,h,o,c,d,p,n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return u=n,e=e,o=(h=t).getComponent("tooltip"),c=h.getComponent("axisPointer"),d=c.get("link",!0)||[],p=[],Yg(e.getCoordinateSystems(),function(r){var s,l,t,e,n;function i(t,e,n){var i,o=n.model.getModel("axisPointer",c),a=o.get("show");a&&("auto"!==a||t||$g(o))&&(null==e&&(e=o.get("triggerTooltip")),a=(o=t?function(t,e,n,i,o,a){var r=e.getModel("axisPointer"),s={},e=(Yg(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],function(t){s[t]=N(r.get(t))}),s.snap="category"!==t.type&&!!a,"cross"===r.get("type")&&(s.type="line"),s.label||(s.label={}));null==e.show&&(e.show=!1),"cross"===o&&(o=r.get("label.show"),e.show=null==o||o,a||(o=s.lineStyle=r.get("crossStyle"))&&C(e,o.textStyle));return t.model.getModel("axisPointer",new w(s,n,i))}(n,l,c,h,t,e):o).get("snap"),t=Jg(n.model),i=e||a||"category"===n.type,e=u.axesInfo[t]={key:t,axis:n,coordSys:r,axisPointerModel:o,triggerTooltip:e,involveSeries:i,snap:a,useHandle:$g(o),seriesModels:[]},s[t]=e,u.seriesInvolved|=i,null!=(a=function(t,e){for(var n=e.model,i=e.dim,o=0;o<t.length;o++){var a=t[o]||{};if(qg(a[i+"AxisId"],n.id)||qg(a[i+"AxisIndex"],n.componentIndex)||qg(a[i+"AxisName"],n.name))return o}}(d,n)))&&((o=p[a]||(p[a]={axesInfo:{}})).axesInfo[t]=e,o.mapper=d[a].mapper,e.linkGroup=o)}r.axisPointerEnabled&&(t=Jg(r.model),s=u.coordSysAxesInfo[t]={},l=(u.coordSysMap[t]=r).model.getModel("tooltip",o),Yg(r.getAxes(),Ug(i,!1,null)),r.getTooltipAxes)&&o&&l.get("show")&&(t="axis"===l.get("trigger"),e="cross"===l.get("axisPointer.type"),n=r.getTooltipAxes(l.get("axisPointer.axis")),(t||e)&&Yg(n.baseAxes,Ug(i,!e||"cross",t)),e)&&Yg(n.otherAxes,Ug(i,"cross",!1))}),n.seriesInvolved&&function(o,t){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)&&Yg(o.coordSysAxesInfo[Jg(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())})},this)}(n,t),n}function qg(t,e){return"all"===t||D(t)&&0<=S(t,e)||t===e}function Kg(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[Jg(t)]}function $g(t){return!!t.get("handle.show")}function Jg(t){return t.type+"||"+t.id}var Qg=rd({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(t,e,n,i){var o,a,r,s,l,u;this.axisPointerClass&&(o=Kg(o=t))&&(l=o.axisPointerModel,a=o.axis.scale,r=l.option,u=l.get("status"),null!=(s=l.get("value"))&&(s=a.parse(s)),l=$g(l),null==u&&(r.status=l?"show":"hide"),(u=a.getExtent().slice())[0]>u[1]&&u.reverse(),(s=null==s||s>u[1]?u[1]:s)<u[0]&&(s=u[0]),r.value=s,l)&&(r.status=o.axis.scale.isBlank()?"hide":"show"),Qg.superApply(this,"render",arguments),tf(this,t,0,n,0,!0)},updateAxisPointer:function(t,e,n,i,o){tf(this,t,0,n,0,!1)},remove:function(t,e){var n=this._axisPointer;n&&n.remove(e),Qg.superApply(this,"remove",arguments)},dispose:function(t,e){ef(this,e),Qg.superApply(this,"dispose",arguments)}});function tf(t,e,n,i,o,a){var r,s=Qg.getAxisPointerClass(t.axisPointerClass);s&&((r=(r=Kg(r=e))&&r.axisPointerModel)?(t._axisPointer||(t._axisPointer=new s)).render(e,r,i,a):ef(t,i))}function ef(t,e,n){var i=t._axisPointer;i&&i.dispose(e,n),t._axisPointer=null}var nf=[];function of(t,e,n){n=n||{};var t=t.coordinateSystem,i=e.axis,o={},a=i.getAxesOnZeroOf()[0],r=i.position,s=a?"onZero":r,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=(a&&(h=a.toGlobalCoord(a.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}[r],o.labelOffset=a?u[l[r]]-u[l.onZero]:0,e.get("axisTick.inside")&&(o.tickDirection=-o.tickDirection),rt(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}Qg.registerAxisPointerClass=function(t,e){if(H&&nf[t])throw new Error("axisPointer "+t+" exists");nf[t]=e},Qg.getAxisPointerClass=function(t){return t&&nf[t]};var af=["axisLine","axisTickLabel","axisName"],rf=["splitArea","splitLine"],sf=Qg.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(e,t,n,i){this.group.removeAll();var o,a,r=this._axisGroup;this._axisGroup=new R,this.group.add(this._axisGroup),e.get("show")&&(a=of(o=e.getCoordSysModel(),e),a=new Vg(e,a),Z(af,a.add,a),this._axisGroup.add(a.getGroup()),Z(rf,function(t){e.get(t+".show")&&this["_"+t](e,o)},this),bs(r,this._axisGroup,e),sf.superCall(this,"render",e,t,n,i))},remove:function(){this._splitAreaColors=null},_splitLine:function(t,e){var n=t.axis;if(!n.scale.isBlank())for(var t=t.getModel("splitLine"),i=t.getModel("lineStyle"),o=D(o=i.get("color"))?o:[o],a=e.coordinateSystem.getRect(),r=n.isHorizontal(),s=0,l=n.getTicksCoords({tickModel:t}),u=[],h=[],c=i.getLineStyle(),d=0;d<l.length;d++){var p=n.toGlobalCoord(l[d].coord),p=(r?(u[0]=p,u[1]=a.y,h[0]=p,h[1]=a.y+a.height):(u[0]=a.x,u[1]=p,h[0]=a.x+a.width,h[1]=p),s++%o.length),g=l[d].tickValue;this._axisGroup.add(new Sr(Xr({anid:null!=g?"line_"+l[d].tickValue:null,shape:{x1:u[0],y1:u[1],x2:h[0],y2:h[1]},style:C({stroke:o[p]},c),silent:!0})))}},_splitArea:function(t,e){var n=t.axis;if(!n.scale.isBlank()){var t=t.getModel("splitArea"),i=t.getModel("areaStyle"),o=i.get("color"),a=e.coordinateSystem.getRect(),r=n.getTicksCoords({tickModel:t,clamp:!0});if(r.length){var s=o.length,l=this._splitAreaColors,u=E(),h=0;if(l)for(var c=0;c<r.length;c++){var d=l.get(r[c].tickValue);if(null!=d){h=(d+(s-1)*c)%s;break}}for(var p=n.toGlobalCoord(r[0].coord),g=i.getAreaStyle(),o=D(o)?o:[o],c=1;c<r.length;c++){var f,m,y,v,x=n.toGlobalCoord(r[c].coord),p=n.isHorizontal()?(f=p,m=a.y,v=a.height,f+(y=x-f)):(f=a.x,m=p,y=a.width,m+(v=x-m)),x=r[c-1].tickValue;null!=x&&u.set(x,h),this._axisGroup.add(new V({anid:null!=x?"area_"+x:null,shape:{x:f,y:m,width:y,height:v},style:C({fill:o[h]},g),silent:!0})),h=(h+1)%s}this._splitAreaColors=u}}}});function lf(t,e,n){R.call(this),this.updateData(t,e,n)}sf.extend({type:"xAxis"}),sf.extend({type:"yAxis"}),rd({type:"grid",render:function(t,e){this.group.removeAll(),t.get("show")&&this.group.add(new V({shape:t.coordinateSystem.getRect(),style:C({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))}}),Jc(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})}),ed(L(lp,"bar")),ed(n),nd({seriesType:"bar",reset:function(t){t.getData().setVisual("legendSymbol","roundRect")}}),Ku.extend({type:"series.line",dependencies:["grid","polar"],getInitialData:function(t,e){if(H){t=t.coordinateSystem;if("polar"!==t&&"cartesian2d"!==t)throw new Error("Line not support coordinateSystem besides cartesian and polar")}return Fd(this.getSource(),this)},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,clipOverflow:!0,label:{position:"top"},lineStyle:{width:2,type:"solid"},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 l=lf.prototype,uf=lf.getSymbolSize=function(t,e){t=t.getItemVisual(e,"symbolSize");return t instanceof Array?t.slice():[+t,+t]};function hf(t){return[t[0]/2,t[1]/2]}function cf(t,e){this.parent.drift(t,e)}l._createSymbol=function(t,e,n,i,o){this.removeAll();e=Wp(t,-1,-1,2,2,e.getItemVisual(n,"color"),o);e.attr({z2:100,culling:!0,scale:hf(i)}),e.drift=cf,this._symbolType=t,this.add(e)},l.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(t)},l.getSymbolPath=function(){return this.childAt(0)},l.getScale=function(){return this.childAt(0).scale},l.highlight=function(){this.childAt(0).trigger("emphasis")},l.downplay=function(){this.childAt(0).trigger("normal")},l.setZ=function(t,e){var n=this.childAt(0);n.zlevel=t,n.z=e},l.setDraggable=function(t){var e=this.childAt(0);e.draggable=t,e.cursor=t?"move":"pointer"},l.updateData=function(t,e,n){this.silent=!1;var i,o,a=t.getItemVisual(e,"symbol")||"circle",r=t.hostModel,s=uf(t,e),l=a!==this._symbolType;l?(o=t.getItemVisual(e,"symbolKeepAspect"),this._createSymbol(a,t,e,s,o)):((i=this.childAt(0)).silent=!1,G(i,{scale:hf(s)},r,e)),this._updateCommon(t,e,s,n),l&&(i=this.childAt(0),a=n&&n.fadeIn,o={scale:i.scale.slice()},a&&(o.style={opacity:i.style.opacity}),i.scale=[0,0],a&&(i.style.opacity=0),vs(i,o,r,e)),this._seriesModel=r};var df=["itemStyle"],pf=["emphasis","itemStyle"],gf=["label"],ff=["emphasis","label"];function mf(){ns(this)||vf.call(this)}function yf(){ns(this)||xf.call(this)}function vf(){var t,e;this.incremental||this.useHoverLayer||(e=(t=this.__symbolOriginalScale)[1]/t[0],this.animateTo({scale:[Math.max(1.1*t[0],t[0]+3),Math.max(1.1*t[1],t[1]+3*e)]},400,"elasticOut"))}function xf(){this.incremental||this.useHoverLayer||this.animateTo({scale:this.__symbolOriginalScale},400,"elasticOut")}function _f(t){this.group=new R,this._symbolCtor=t||lf}l._updateCommon=function(n,t,e,i){var o=this.childAt(0),a=n.hostModel,r=n.getItemVisual(t,"color"),s=("image"!==o.type&&o.useStyle({strokeNoScale:!0}),i&&i.itemStyle),l=i&&i.hoverItemStyle,u=i&&i.symbolRotate,h=i&&i.symbolOffset,c=i&&i.labelModel,d=i&&i.hoverLabelModel,p=i&&i.hoverAnimation,g=i&&i.cursorStyle,f=(!i||n.hasItemOption?(s=(f=i&&i.itemModel?i.itemModel:n.getItemModel(t)).getModel(df).getItemStyle(["color"]),l=f.getModel(pf).getItemStyle(),u=f.getShallow("symbolRotate"),h=f.getShallow("symbolOffset"),c=f.getModel(gf),d=f.getModel(ff),p=f.getShallow("hoverAnimation"),g=f.getShallow("cursor")):l=O({},l),o.style),u=(o.attr("rotation",(u||0)*Math.PI/180||0),h&&o.attr("position",[F(h[0],e[0]),F(h[1],e[1])]),g&&o.attr("cursor",g),o.setColor(r,i&&i.symbolInnerColor),o.setStyle(s),n.getItemVisual(t,"opacity")),h=(null!=u&&(f.opacity=u),n.getItemVisual(t,"liftZ")),g=o.__z2Origin,m=(null!=h?null==g&&(o.__z2Origin=o.z2,o.z2+=h):null!=g&&(o.z2=g,o.__z2Origin=null),i&&i.useNameLabel);us(f,l,c,d,{labelFetcher:a,labelDataIndex:t,defaultText:function(t,e){return m?n.getName(t):Ig(n,t)},isRectText:!0,autoColor:r}),o.off("mouseover").off("mouseout").off("emphasis").off("normal"),o.hoverStyle=l,ss(o),o.__symbolOriginalScale=hf(e),p&&a.isAnimationEnabled()&&o.on("mouseover",mf).on("mouseout",yf).on("emphasis",vf).on("normal",xf)},l.fadeOut=function(t,e){var n=this.childAt(0);this.silent=n.silent=!0,e&&e.keepLabel||(n.style.text=null),G(n,{style:{opacity:0},scale:[0,0]},this._seriesModel,this.dataIndex,t)},a(lf,R);n=_f.prototype;function wf(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 bf(t){return(t=null==t||k(t)?t:{isIgnore:t})||{}}function Sf(t){t=t.hostModel;return{itemStyle:t.getModel("itemStyle").getItemStyle(["color"]),hoverItemStyle:t.getModel("emphasis.itemStyle").getItemStyle(),symbolRotate:t.get("symbolRotate"),symbolOffset:t.get("symbolOffset"),hoverAnimation:t.get("hoverAnimation"),labelModel:t.getModel("label"),hoverLabelModel:t.getModel("emphasis.label"),cursorStyle:t.get("cursor")}}function Mf(t,e,n){var i,o=t.getBaseAxis(),a=t.getOtherAxis(o),n=(n=n,s=0,r=(r=a).scale.getExtent(),"start"===n?s=r[0]:"end"===n?s=r[1]:0<r[0]?s=r[0]:r[1]<0&&(s=r[1]),s),r=o.dim,s=a.dim,o=e.mapDimension(s),a=e.mapDimension(r),l="x"===s||"radius"===s?1:0,t=I(t.dimensions,function(t){return e.mapDimension(t)}),u=e.getCalculationInfo("stackResultDimension");return(i|=Vd(e,t[0]))&&(t[0]=u),(i|=Vd(e,t[1]))&&(t[1]=u),{dataDimsForPoint:t,valueStart:n,valueAxisDim:s,baseAxisDim:r,stacked:!!i,valueDim:o,baseDim:a,baseDataOffset:l,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function If(t,e,n,i){var o=NaN,a=(t.stacked&&(o=n.get(n.getCalculationInfo("stackedOverDimension"),i)),isNaN(o)&&(o=t.valueStart),t.baseDataOffset),r=[];return r[a]=n.get(t.baseDim,i),r[1-a]=o,e.dataToPoint(r)}n.updateData=function(i,o){o=bf(o);var a=this.group,r=i.hostModel,s=this._data,l=this._symbolCtor,u=Sf(i);s||a.removeAll(),i.diff(s).add(function(t){var e,n=i.getItemLayout(t);wf(i,n,t,o)&&((e=new l(i,t,u)).attr("position",n),i.setItemGraphicEl(t,e),a.add(e))}).update(function(t,e){var e=s.getItemGraphicEl(e),n=i.getItemLayout(t);wf(i,n,t,o)?(e?(e.updateData(i,t,u),G(e,{position:n},r)):(e=new l(i,t)).attr("position",n),a.add(e),i.setItemGraphicEl(t,e)):a.remove(e)}).remove(function(t){var e=s.getItemGraphicEl(t);e&&e.fadeOut(function(){a.remove(e)})}).execute(),this._data=i},n.isPersistent=function(){return!0},n.updateLayout=function(){var n=this._data;n&&n.eachItemGraphicEl(function(t,e){e=n.getItemLayout(e);t.attr("position",e)})},n.incrementalPrepareUpdate=function(t){this._seriesScope=Sf(t),this._data=null,this.group.removeAll()},n.incrementalUpdate=function(t,e,n){function i(t){t.isGroup||(t.incremental=t.useHoverLayer=!0)}n=bf(n);for(var o=t.start;o<t.end;o++){var a,r=e.getItemLayout(o);wf(e,r,o,n)&&((a=new this._symbolCtor(e,o,this._seriesScope)).traverse(i),a.attr("position",r),this.group.add(a),e.setItemGraphicEl(o,a))}},n.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 Tf=Rt,Af=Bt,Df=It,Cf=wt,Lf=[],kf=[],Pf=[];function Nf(t){return isNaN(t[0])||isNaN(t[1])}function Of(t,e,n,i,o,a,r,s,l,u){return("none"!==u&&u?Ef:zf).apply(this,arguments)}function Ef(t,e,n,i,o,a,r,s,l,u,h){for(var c=0,d=n,p=0;p<i;p++){var g,f,m,y=e[d];if(o<=d||d<0)break;if(Nf(y)){if(h){d+=a;continue}break}d===n?t[0<a?"moveTo":"lineTo"](y[0],y[1]):0<l?(g=e[c],m=(y[f="y"===u?1:0]-g[f])*l,Cf(kf,g),kf[f]=g[f]+m,Cf(Pf,y),Pf[f]=y[f]-m,t.bezierCurveTo(kf[0],kf[1],Pf[0],Pf[1],y[0],y[1])):t.lineTo(y[0],y[1]),c=d,d+=a}return p}function zf(t,e,n,i,o,a,r,s,l,u,h){for(var c=0,d=n,p=0;p<i;p++){var g=e[d];if(o<=d||d<0)break;if(Nf(g)){if(h){d+=a;continue}break}if(d===n)t[0<a?"moveTo":"lineTo"](g[0],g[1]),Cf(kf,g);else if(0<l){var f=d+a,m=e[f];if(h)for(;m&&Nf(e[f]);)m=e[f+=a];var y,v,x=.5,_=e[c];!(m=e[f])||Nf(m)?Cf(Pf,g):(Nf(m)&&!h&&(m=g),Tt(Lf,m,_),v="x"===u||"y"===u?(v="x"===u?0:1,y=Math.abs(g[v]-_[v]),Math.abs(g[v]-m[v])):(y=Pt(g,_),Pt(g,m)),Df(Pf,g,Lf,-l*(1-(x=v/(v+y))))),Tf(kf,kf,s),Af(kf,kf,r),Tf(Pf,Pf,s),Af(Pf,Pf,r),t.bezierCurveTo(kf[0],kf[1],Pf[0],Pf[1],g[0],g[1]),Df(kf,g,Lf,l*x)}else t.lineTo(g[0],g[1]);c=d,d+=a}return p}function Rf(t,e){var n=[1/0,1/0],i=[-1/0,-1/0];if(e)for(var o=0;o<t.length;o++){var a=t[o];a[0]<n[0]&&(n[0]=a[0]),a[1]<n[1]&&(n[1]=a[1]),a[0]>i[0]&&(i[0]=a[0]),a[1]>i[1]&&(i[1]=a[1])}return{min:e?n:i,max:e?i:n}}var Bf=r.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:dr(r.prototype.brush),buildPath:function(t,e){var n=e.points,i=0,o=n.length,a=Rf(n,e.smoothConstraint);if(e.connectNulls){for(;0<o&&Nf(n[o-1]);o--);for(;i<o&&Nf(n[i]);i++);}for(;i<o;)i+=Of(t,n,i,o,o,1,a.min,a.max,e.smooth,e.smoothMonotone,e.connectNulls)+1}}),Vf=r.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},brush:dr(r.prototype.brush),buildPath:function(t,e){var n=e.points,i=e.stackedOnPoints,o=0,a=n.length,r=e.smoothMonotone,s=Rf(n,e.smoothConstraint),l=Rf(i,e.smoothConstraint);if(e.connectNulls){for(;0<a&&Nf(n[a-1]);a--);for(;o<a&&Nf(n[o]);o++);}for(;o<a;){var u=Of(t,n,o,a,a,1,s.min,s.max,e.smooth,r,e.connectNulls);Of(t,i,o+u-1,u,a,-1,l.min,l.max,e.stackedOnSmooth,r,e.connectNulls),o+=u+1,t.closePath()}}});function Gf(t,e){if(t.length===e.length){for(var n=0;n<t.length;n++){var i=t[n],o=e[n];if(i[0]!==o[0]||i[1]!==o[1])return}return 1}}function Ff(t){return"number"==typeof t?t:t?.5:0}function Wf(t){var e,n=t.getGlobalExtent();return t.onBand&&(t=t.getBandWidth()/2-1,e=n[1]>n[0]?1:-1,n[0]+=e*t,n[1]-=e*t),n}function Hf(t,e,n,i){return"polar"===t.type?(a=e,r=n,s=i,l=(o=t).getAngleAxis(),(u=o.getRadiusAxis().getExtent().slice())[0]>u[1]&&u.reverse(),h=l.getExtent(),c=Math.PI/180,r&&(u[0]-=.5,u[1]+=.5),r=new pr({shape:{cx:Es(o.cx,1),cy:Es(o.cy,1),r0:Es(u[0],1),r:Es(u[1],1),startAngle:-h[0]*c,endAngle:-h[1]*c,clockwise:l.inverse}}),a&&(r.shape.endAngle=-h[0]*c,vs(r,{shape:{endAngle:-h[1]*c}},s)),r):(o=e,u=n,l=i,h=Wf((a=t).getAxis("x")),c=Wf(a.getAxis("y")),a=a.getBaseAxis().isHorizontal(),s=Math.min(h[0],h[1]),r=Math.min(c[0],c[1]),h=Math.max(h[0],h[1])-s,c=Math.max(c[0],c[1])-r,u?(s-=.5,h+=.5,r-=.5,c+=.5):(u=l.get("lineStyle.width")||2,u=l.get("clipOverflow")?u/2:Math.max(h,c),a?(r-=u,c+=2*u):(s-=u,h+=2*u)),u=new V({shape:{x:s,y:r,width:h,height:c}}),o&&(u.shape[a?"width":"height"]=0,vs(u,{shape:{width:h,height:c}},l)),u);var o,a,r,s,l,u,h,c}function Zf(t,e,n){for(var e=e.getBaseAxis(),i="x"===e.dim||"radius"===e.dim?0:1,o=[],a=0;a<t.length-1;a++){var r=t[a+1],s=t[a],l=(o.push(s),[]);switch(n){case"end":l[i]=r[i],l[1-i]=s[1-i],o.push(l);break;case"middle":var u=(s[i]+r[i])/2,h=[];l[i]=h[i]=u,l[1-i]=s[1-i],h[1-i]=r[1-i],o.push(l),o.push(h);break;default:l[i]=s[i],l[1-i]=r[1-i],o.push(l)}}return t[a]&&o.push(t[a]),o}function Xf(t,e,n){var t=t.get("showAllSymbol"),i="auto"===t;if(!t||i){var o,a,t=n.getAxesByScale("ordinal")[0];if(t&&(!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(),a=Math.max(1,Math.round(o/5)),r=0;r<o;r+=a)if(1.5*lf.getSymbolSize(e,r)[t.isHorizontal()?1:0]>i)return;return 1}(t,e)))return o=e.mapDimension(t.dim),a={},Z(t.getViewLabels(),function(t){a[t.tickValue]=1}),function(t){return!a.hasOwnProperty(e.get(o,t))}}}function Yf(t,s,l){return{seriesType:t,performRawSeries:!0,reset:function(a,t,e){var n=a.getData(),i=a.get("symbol")||s,r=a.get("symbolSize"),o=a.get("symbolKeepAspect");if(n.setVisual({legendSymbol:l||i,symbol:i,symbolSize:r,symbolKeepAspect:o}),!t.isSeriesFiltered(a))return{dataEach:n.hasItemOption||"function"==typeof r?function(t,e){var n,i,o;"function"==typeof r&&(o=a.getRawValue(e),n=a.getDataParams(e),t.setItemVisual(e,"symbolSize",r(o,n))),t.hasItemOption&&(n=(o=t.getItemModel(e)).getShallow("symbol",!0),i=o.getShallow("symbolSize",!0),o=o.getShallow("symbolKeepAspect",!0),null!=n&&t.setItemVisual(e,"symbol",n),null!=i&&t.setItemVisual(e,"symbolSize",i),null!=o)&&t.setItemVisual(e,"symbolKeepAspect",o)}:null}}}}function Uf(t){return{seriesType:t,plan:ah(),reset:function(t){var h,c,e=t.getData(),d=t.coordinateSystem,p=t.pipelineContext.large;if(d)return h=I(d.dimensions,function(t){return e.mapDimension(t)}).slice(0,2),c=h.length,t=e.getCalculationInfo("stackResultDimension"),Vd(e,h[0])&&(h[0]=t),Vd(e,h[1])&&(h[1]=t),c&&{progress:function(t,e){for(var n,i,o=t.end-t.start,a=p&&new Float32Array(o*c),r=t.start,s=0,l=[],u=[];r<t.end;r++)i=1===c?(n=e.get(h[0],r),!isNaN(n)&&d.dataToPoint(n,null,u)):(n=l[0]=e.get(h[0],r),i=l[1]=e.get(h[1],r),!isNaN(n)&&!isNaN(i)&&d.dataToPoint(l,null,u)),p?(a[s++]=i?i[0]:NaN,a[s++]=i?i[1]:NaN):e.setItemLayout(r,i&&i.slice()||[NaN,NaN]);p&&e.setLayout("symbolPoints",a)}}}}}lh.extend({type:"line",init:function(){var t=new R,e=new _f;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},render:function(t,e,n){var i=t.coordinateSystem,o=this.group,a=t.getData(),r=t.getModel("lineStyle"),s=t.getModel("areaStyle"),l=a.mapArray(a.getItemLayout),u="polar"===i.type,h=this._coordSys,c=this._symbolDraw,d=this._polyline,p=this._polygon,g=this._lineGroup,f=t.get("animation"),m=!s.isEmpty(),y=s.get("origin"),v=function(t,e,n){if(!n.valueDim)return[];for(var i=[],o=0,a=e.count();o<a;o++)i.push(If(n,t,e,o));return i}(i,a,Mf(i,a,y)),x=t.get("showSymbol"),_=x&&!u&&Xf(t,a,i),w=this._data,u=(w&&w.eachItemGraphicEl(function(t,e){t.__temp&&(o.remove(t),w.setItemGraphicEl(e,null))}),x||c.remove(),o.add(g),!u&&t.get("step")),h=(d&&h.type===i.type&&u===this._step?(m&&!p?p=this._newPolygon(l,v,i,f):p&&!m&&(g.remove(p),p=this._polygon=null),g.setClipPath(Hf(i,!1,!1,t)),x&&c.updateData(a,{isIgnore:_,clipShape:Hf(i,!1,!0,t)}),a.eachItemGraphicEl(function(t){t.stopAnimation(!0)}),Gf(this._stackedOnPoints,v)&&Gf(this._points,l)||(f?this._updateAnimation(a,v,i,n,u,y):(u&&(l=Zf(l,i,u),v=Zf(v,i,u)),d.setShape({points:l}),p&&p.setShape({points:l,stackedOnPoints:v})))):(x&&c.updateData(a,{isIgnore:_,clipShape:Hf(i,!1,!0,t)}),u&&(l=Zf(l,i,u),v=Zf(v,i,u)),d=this._newPolyline(l,i,f),m&&(p=this._newPolygon(l,v,i,f)),g.setClipPath(Hf(i,!0,!1,t))),function(t,e){var n=t.getVisual("visualMeta");if(n&&n.length&&t.count())if("cartesian2d"===e.type){for(var i,o,a=n.length-1;0<=a;a--){var r=n[a].dimension,r=t.dimensions[r],r=t.getDimensionInfo(r);if("x"===(i=r&&r.coordDim)||"y"===i){o=n[a];break}}if(o){var s=e.getAxis(i),e=I(o.stops,function(t){return{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,d=c-h;if(d<.001)return"transparent";Z(e,function(t){t.offset=(t.coord-h)/d}),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 Ar(0,0,0,0,e,!0);return l[i]=h,l[i+"2"]=c,l}H&&console.warn("Visual map on line style only support x or y dimension.")}else H&&console.warn("Visual map on line style is only supported on cartesian2d.")}(a,i)||a.getVisual("color")),n=(d.useStyle(C(r.getLineStyle(),{fill:"none",stroke:h,lineJoin:"bevel"})),t.get("smooth"),Ff(t.get("smooth")));d.setShape({smooth:n,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),p&&(x=a.getCalculationInfo("stackedOnSeries"),c=0,p.useStyle(C(s.getAreaStyle(),{fill:h,opacity:.7,lineJoin:"bevel"})),x&&(c=Ff(x.get("smooth"))),p.setShape({smooth:n,stackedOnSmooth:c,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})),this._data=a,this._coordSys=i,this._stackedOnPoints=v,this._points=l,this._step=u,this._valueOrigin=y},dispose:function(){},highlight:function(t,e,n,i){var o=t.getData(),a=xo(o,i);if(!(a instanceof Array)&&null!=a&&0<=a){var r=o.getItemGraphicEl(a);if(!r){var s=o.getItemLayout(a);if(!s)return;(r=new lf(o,a)).position=s,r.setZ(t.get("zlevel"),t.get("z")),r.ignore=isNaN(s[0])||isNaN(s[1]),r.__temp=!0,o.setItemGraphicEl(a,r),r.stopSymbolAnimation(!0),this.group.add(r)}r.highlight()}else lh.prototype.highlight.call(this,t,e,n,i)},downplay:function(t,e,n,i){var o,a=t.getData(),r=xo(a,i);null!=r&&0<=r?(o=a.getItemGraphicEl(r))&&(o.__temp?(a.setItemGraphicEl(r,null),this.group.remove(o)):o.downplay()):lh.prototype.downplay.call(this,t,e,n,i)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new Bf({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e},_newPolygon:function(t,e){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new Vf({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(n),this._polygon=n},_updateAnimation:function(t,e,n,i,o,a){var r=this._polyline,s=this._polygon,l=t.hostModel,e=function(t,e,n,i,o,a,r,s){l=[],e.diff(t).add(function(t){l.push({cmd:"+",idx:t})}).update(function(t,e){l.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){l.push({cmd:"-",idx:t})}).execute();for(var l,u=l,h=[],c=[],d=[],p=[],g=[],f=[],m=[],y=Mf(o,e,r),v=Mf(a,t,s),x=0;x<u.length;x++){var _=u[x],w=!0;switch(_.cmd){case"=":var b=t.getItemLayout(_.idx),S=e.getItemLayout(_.idx1);(isNaN(b[0])||isNaN(b[1]))&&(b=S.slice()),h.push(b),c.push(S),d.push(n[_.idx]),p.push(i[_.idx1]),m.push(e.getRawIndex(_.idx1));break;case"+":var M=_.idx;h.push(o.dataToPoint([e.get(y.dataDimsForPoint[0],M),e.get(y.dataDimsForPoint[1],M)])),c.push(e.getItemLayout(M).slice()),d.push(If(y,o,e,M)),p.push(i[M]),m.push(e.getRawIndex(M));break;case"-":M=_.idx,b=t.getRawIndex(M);b!==M?(h.push(t.getItemLayout(M)),c.push(a.dataToPoint([t.get(v.dataDimsForPoint[0],M),t.get(v.dataDimsForPoint[1],M)])),d.push(n[M]),p.push(If(v,a,t,M)),m.push(b)):w=!1}w&&(g.push(_),f.push(f.length))}f.sort(function(t,e){return m[t]-m[e]});for(var I=[],T=[],A=[],D=[],C=[],x=0;x<f.length;x++)I[x]=h[M=f[x]],T[x]=c[M],A[x]=d[M],D[x]=p[M],C[x]=g[M];return{current:I,next:T,stackedOnCurrent:A,stackedOnNext:D,status:C}}(this._data,t,this._stackedOnPoints,e,this._coordSys,n,this._valueOrigin,a),a=e.current,u=e.stackedOnCurrent,h=e.next,c=e.stackedOnNext;o&&(a=Zf(e.current,n,o),u=Zf(e.stackedOnCurrent,n,o),h=Zf(e.next,n,o),c=Zf(e.stackedOnNext,n,o)),r.shape.__points=e.current,r.shape.points=a,G(r,{shape:{points:h}},l),s&&(s.setShape({points:a,stackedOnPoints:u}),G(s,{shape:{points:h,stackedOnPoints:c}},l));for(var d,p=[],g=e.status,f=0;f<g.length;f++)"="===g[f].cmd&&(d=t.getItemGraphicEl(g[f].idx1))&&p.push({el:d,ptIdx:f});r.animators&&r.animators.length&&r.animators[0].during(function(){for(var t=0;t<p.length;t++)p[t].el.attr("position",r.shape.__points[p[t].ptIdx])})},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._data=null}});function jf(t,e){return Math.round(t.length/2)}var qf={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]}};function Kf(t,e,n){e=D(e)?{coordDimensions:e}:O({},e);var i=t.getSource(),e=Rd(i,e),e=new Sd(e,t);return e.initData(i,n),e}nd(Yf("line","circle","line")),ed(Uf("line")),Qc(pc.PROCESSOR.STATISTIC,{seriesType:"line",modifyOutputEnd:!0,reset:function(t,e,n){var i,o,a=t.getData(),r=t.get("sampling"),s=t.coordinateSystem;"cartesian2d"===s.type&&r&&(o=s.getBaseAxis(),s=s.getOtherAxis(o),o=(o=o.getExtent())[1]-o[0],1<(o=Math.round(a.count()/o)))&&("string"==typeof r?i=qf[r]:"function"==typeof r&&(i=r),i)&&t.setData(a.downSample(a.mapDimension(s.dim),1/o,i,jf))}});var l={updateSelectedMap:function(t){this._targetList=D(t)?t.slice():[],this._selectTargetMap=Q(t||[],function(t,e){return t.set(e.name,e),t},E())},select:function(t,e){e=null!=e?this._targetList[e]:this._selectTargetMap.get(t);"single"===this.get("selectedMode")&&this._selectTargetMap.each(function(t){t.selected=!1}),e&&(e.selected=!0)},unSelect:function(t,e){e=null!=e?this._targetList[e]:this._selectTargetMap.get(t);e&&(e.selected=!1)},toggleSelected:function(t,e){var n=null!=e?this._targetList[e]:this._selectTargetMap.get(t);if(null!=n)return this[n.selected?"unSelect":"select"](t,e),n.selected},isSelected:function(t,e){e=null!=e?this._targetList[e]:this._selectTargetMap.get(t);return e&&e.selected}},$f=sd({type:"series.pie",init:function(t){$f.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()},this.updateSelectedMap(this._createSelectableList()),this._defaultLabelLine(t)},mergeOption:function(t){$f.superCall(this,"mergeOption",t),this.updateSelectedMap(this._createSelectableList())},getInitialData:function(t,e){return Kf(this,["value"])},_createSelectableList:function(){for(var t=this.getRawData(),e=t.mapDimension("value"),n=[],i=0,o=t.count();i<o;i++)n.push({name:t.getName(i),value:t.get(e,i),selected:Eu(t,i,"selected")});return n},getDataParams:function(t){var e=this.getData(),n=$f.superCall(this,"getDataParams",t),i=[];return e.each(e.mapDimension("value"),function(t){i.push(t)}),n.percent=Gs(i,t,e.hostModel.get("percentPrecision")),n.$vars.push("percent"),n},_defaultLabelLine:function(t){co(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},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,selectedOffset:10,hoverOffset:10,avoidLabelOverlap:!0,percentPrecision:2,stillShowZeroSum:!0,label:{rotate:!1,show:!0,position:"outer"},labelLine:{show:!0,length:15,length2:15,smooth:!1,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1},animationType:"expansion",animationEasing:"cubicOut"}});function Jf(t,e,n,i){var o=e.getData(),a=this.dataIndex,a=o.getName(a),r=e.get("selectedOffset");i.dispatchAction({type:"pieToggleSelect",from:t,name:a,seriesId:e.id}),o.each(function(t){Qf(o.getItemGraphicEl(t),o.getItemLayout(t),e.isSelected(o.getName(t)),r,n)})}function Qf(t,e,n,i,o){e=(e.startAngle+e.endAngle)/2,n=n?i:0,i=[Math.cos(e)*n,Math.sin(e)*n];o?t.animate().when(200,{position:i}).start("bounceOut"):t.attr("position",i)}function tm(t,e){R.call(this);var n=new pr({z2:2}),i=new vr,o=new B;function a(){i.ignore=i.hoverIgnore,o.ignore=o.hoverIgnore}function r(){i.ignore=i.normalIgnore,o.ignore=o.normalIgnore}this.add(n),this.add(i),this.add(o),this.updateData(t,e,!0),this.on("emphasis",a).on("normal",r).on("mouseover",a).on("mouseout",r)}i($f,l);n=tm.prototype;function em(n,t){Z(t,function(o){o.update="updateView",s(o,function(t,e){var i={};return e.eachComponent({mainType:"series",subType:n,query:t},function(e){e[o.method]&&e[o.method](t.name,t.dataIndex);var n=e.getData();n.each(function(t){t=n.getName(t);i[t]=e.isSelected(t)||!1})}),{name:t.name,selected:i}})})}function nm(i){return{getTargetSeries:function(t){var e={},n=E();return t.eachSeriesByType(i,function(t){t.__paletteScope=e,n.set(t.uid,t)}),n},reset:function(i,t){var o=i.getRawData(),a={},r=i.getData();r.each(function(t){var e=r.getRawIndex(t);a[e]=t}),o.each(function(t){var e=a[t],n=null!=e&&r.getItemVisual(e,"color",!0);n?o.setItemVisual(t,"color",n):(n=o.getItemModel(t).get("itemStyle.color")||i.getColorFromPalette(o.getName(t)||t+"",i.__paletteScope,o.count()),o.setItemVisual(t,"color",n),null!=e&&r.setItemVisual(e,"color",n))})}}}function im(o,t,e,n,i,a,r){function s(t,e){for(var n=t;0<=n&&(o[n].y-=e,!(0<n&&o[n].y>o[n-1].y+o[n-1].height));n--);}function l(t,e,n,i,o,a){for(var r=e?Number.MAX_VALUE:0,s=0,l=t.length;s<l;s++){var u=Math.abs(t[s].y-i),h=t[s].len,c=t[s].len2,h=u<o+h?Math.sqrt((o+h+c)*(o+h+c)-u*u):Math.abs(t[s].x-n);e&&r<=h&&(h=r-10),!e&&h<=r&&(h=r+10),t[s].x=n+h*a,r=h}}o.sort(function(t,e){return t.y-e.y});for(var u,h=0,c=o.length,d=[],p=[],g=0;g<c;g++)(u=o[g].y-h)<0&&function(t,e,n){for(var i=t;i<e;i++)if(o[i].y+=n,t<i&&i+1<e&&o[i+1].y>o[i].y+o[i].height)return s(i,n/2);s(e-1,n/2)}(g,c,-u),h=o[g].y+o[g].height;for(r-h<0&&s(c-1,h-r),g=0;g<c;g++)(o[g].y>=e?p:d).push(o[g]);l(d,!1,t,e,n,i),l(p,!0,t,e,n,i)}function om(t){return"center"===t.position}function am(m,y,t,e){var v,x,_=m.getData(),w=[],b=!1;if(_.each(function(t){var e,n,i,o=_.getItemLayout(t),a=_.getItemModel(t),r=a.getModel("label"),s=r.get("position")||a.get("emphasis.label.position"),a=a.getModel("labelLine"),l=a.get("length"),a=a.get("length2"),u=(o.startAngle+o.endAngle)/2,h=Math.cos(u),c=Math.sin(u),d=(v=o.cx,x=o.cy,"inside"===s||"inner"===s),p="center"===s?(e=o.cx,n=o.cy,"center"):(e=(f=(d?(o.r+o.r0)/2*h:o.r*h)+v)+3*h,n=(p=(d?(o.r+o.r0)/2*c:o.r*c)+x)+3*c,d||(e=(g=(i=f+h*(l+y-o.r))+(h<0?-1:1)*a)+(h<0?-5:5),i=[[f,p],[i,n=f=p+c*(l+y-o.r)],[g,f]]),d?"center":0<h?"left":"right"),c=r.getFont(),g=r.get("rotate")?h<0?-u+Math.PI:-u:0,f=ii(m.getFormattedLabel(t,"normal")||_.getName(t),c,p,"top");b=!!g,o.label={x:e,y:n,position:s,height:f.height,len:l,len2:a,linePoints:i,textAlign:p,verticalAlign:"middle",rotation:g,inside:d},d||w.push(o.label)}),!b&&m.get("avoidLabelOverlap")){for(var n,i,o=w,a=v,r=x,s=y,l=[],u=[],h=0;h<o.length;h++)om(o[h])||(o[h].x<a?l:u).push(o[h]);for(im(u,a,r,s,1,0,e),im(l,a,r,s,-1,0,e),h=0;h<o.length;h++)om(o[h])||(n=o[h].linePoints)&&(i=n[1][0]-n[2][0],o[h].x<a?n[2][0]=o[h].x+3:n[2][0]=o[h].x-3,n[1][1]=n[2][1]=o[h].y,n[1][0]=n[2][0]+i)}}n.updateData=function(t,e,n){var i=this.childAt(0),o=t.hostModel,a=t.getItemModel(e),r=t.getItemLayout(e),s=O({},r),n=(s.label=null,n?(i.setShape(s),"scale"===o.getShallow("animationType")?(i.shape.r=r.r0,vs(i,{shape:{r:r.r}},o,e)):(i.shape.endAngle=r.startAngle,G(i,{shape:{endAngle:r.endAngle}},o,e))):G(i,{shape:s},o,e),t.getItemVisual(e,"color")),s=(i.useStyle(C({lineJoin:"bevel",fill:n},a.getModel("itemStyle").getItemStyle())),i.hoverStyle=a.getModel("emphasis.itemStyle").getItemStyle(),a.getShallow("cursor"));function l(){i.stopAnimation(!0),i.animateTo({shape:{r:r.r+o.get("hoverOffset")}},300,"elasticOut")}function u(){i.stopAnimation(!0),i.animateTo({shape:{r:r.r}},300,"elasticOut")}s&&i.attr("cursor",s),Qf(this,t.getItemLayout(e),o.isSelected(null,e),o.get("selectedOffset"),o.get("animation")),i.off("mouseover").off("mouseout").off("emphasis").off("normal"),a.get("hoverAnimation")&&o.isAnimationEnabled()&&i.on("mouseover",l).on("mouseout",u).on("emphasis",l).on("normal",u),this._updateLabel(t,e),ss(this)},n._updateLabel=function(t,e){var n=this.childAt(1),i=this.childAt(2),o=t.hostModel,a=t.getItemModel(e),r=t.getItemLayout(e).label,o=(t.getItemVisual(e,"color"),G(n,{shape:{points:r.linePoints||[[r.x,r.y],[r.x,r.y],[r.x,r.y]]}},o,e),G(i,{style:{x:r.x,y:r.y}},o,e),i.attr({rotation:r.rotation,origin:[r.x,r.y],z2:10}),a.getModel("label")),s=a.getModel("emphasis.label"),l=a.getModel("labelLine"),a=a.getModel("emphasis.labelLine"),u=t.getItemVisual(e,"color"),r=(us(i.style,i.hoverStyle={},o,s,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:t.getName(e),autoColor:u,useInsideStyle:!!r.inside},{textAlign:r.textAlign,textVerticalAlign:r.verticalAlign,opacity:t.getItemVisual(e,"opacity")}),i.ignore=i.normalIgnore=!o.get("show"),i.hoverIgnore=!s.get("show"),n.ignore=n.normalIgnore=!l.get("show"),n.hoverIgnore=!a.get("show"),n.setStyle({stroke:u,opacity:t.getItemVisual(e,"opacity")}),n.setStyle(l.getModel("lineStyle").getLineStyle()),n.hoverStyle=a.getModel("lineStyle").getLineStyle(),l.get("smooth"));n.setShape({smooth:r=r&&!0===r?.4:r})},a(tm,R),lh.extend({type:"pie",init:function(){var t=new R;this._sectorGroup=t},render:function(t,e,n,i){var o,a,r,s,l,u,h;i&&i.from===this.uid||(o=t.getData(),a=this._data,r=this.group,i=e.get("animation"),s=!a,l=t.get("animationType"),u=L(Jf,this.uid,t,i,n),h=t.get("selectedMode"),o.diff(a).add(function(t){var e=new tm(o,t);s&&"scale"!==l&&e.eachChild(function(t){t.stopAnimation(!0)}),h&&e.on("click",u),o.setItemGraphicEl(t,e),r.add(e)}).update(function(t,e){e=a.getItemGraphicEl(e);e.updateData(o,t),e.off("click"),h&&e.on("click",u),r.add(e),o.setItemGraphicEl(t,e)}).remove(function(t){t=a.getItemGraphicEl(t);r.remove(t)}).execute(),i&&s&&0<o.count()&&"scale"!==l?(e=o.getItemLayout(0),i=Math.max(n.getWidth(),n.getHeight())/2,n=A(r.removeClipPath,r),r.setClipPath(this._createClipPath(e.cx,e.cy,i,e.startAngle,e.clockwise,n,t))):r.removeClipPath(),this._data=o)},dispose:function(){},_createClipPath:function(t,e,n,i,o,a,r){t=new pr({shape:{cx:t,cy:e,r0:0,r:n,startAngle:i,endAngle:i,clockwise:o}});return vs(t,{shape:{endAngle:i+(o?1:-1)*Math.PI*2}},r,a),t},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}});var rm=2*Math.PI,sm=Math.PI/180;function lm(t){return{seriesType:t,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})}}}em("pie",[{type:"pieToggleSelect",event:"pieselectchanged",method:"toggleSelected"},{type:"pieSelect",event:"pieselected",method:"select"},{type:"pieUnSelect",event:"pieunselected",method:"unSelect"}]),nd(nm("pie")),ed(L(function(t,e,T,n){e.eachSeriesByType(t,function(t){var n,o=t.getData(),e=o.mapDimension("value"),i=t.get("center"),a=t.get("radius"),r=(D(a)||(a=[0,a]),D(i)||(i=[i,i]),T.getWidth()),s=T.getHeight(),l=Math.min(r,s),u=F(i[0],r),h=F(i[1],s),c=F(a[0],l/2),d=F(a[1],l/2),p=-t.get("startAngle")*sm,g=t.get("minAngle")*sm,f=0,m=(o.each(e,function(t){isNaN(t)||f++}),o.getSum(e)),y=Math.PI/(m||f)*2,v=t.get("clockwise"),x=t.get("roseType"),_=t.get("stillShowZeroSum"),w=o.getDataExtent(e),b=(w[0]=0,rm),S=0,M=p,I=v?1:-1;o.each(e,function(t,e){var n,i;isNaN(t)?o.setItemLayout(e,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:v,cx:u,cy:h,r0:c,r:x?NaN:d}):((n="area"!==x?0===m&&_?y:t*y:rm/f)<g?b-=n=g:S+=t,i=M+I*n,o.setItemLayout(e,{angle:n,startAngle:M,endAngle:i,clockwise:v,cx:u,cy:h,r0:c,r:x?Os(t,w,[c,d]):d}),M=i)}),b<rm&&f&&(b<=.001?(n=rm/f,o.each(e,function(t,e){isNaN(t)||((t=o.getItemLayout(e)).angle=n,t.startAngle=p+I*e*n,t.endAngle=p+I*(e+1)*n)})):(y=b/S,M=p,o.each(e,function(t,e){isNaN(t)||(t=(e=o.getItemLayout(e)).angle===g?g:t*y,e.startAngle=M,e.endAngle=M+I*t,M+=I*t)}))),am(t,d,0,s)})},"pie")),Qc(lm("pie")),Ku.extend({type:"series.scatter",dependencies:["grid","polar","geo","singleAxis","calendar"],getInitialData:function(t,e){return Fd(this.getSource(),this)},brushSelector:"point",getProgressive:function(){var t=this.option.progressive;return null==t?this.option.large?5e3:this.get("progressive"):t},getProgressiveThreshold:function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?1e4:this.get("progressiveThreshold"):t},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8}}});var um=Vr({shape:{points:null},symbolProxy:null,buildPath:function(t,e){var n=e.points,i=e.size,o=this.symbolProxy,a=o.shape;if(!((t.getContext?t.getContext():t)&&i[0]<4))for(var r=0;r<n.length;){var s=n[r++],l=n[r++];isNaN(s)||isNaN(l)||(a.x=s-i[0]/2,a.y=l-i[1]/2,a.width=i[0],a.height=i[1],o.buildPath(t,a,!0))}},afterBrush:function(t){var e=this.shape,n=e.points,i=e.size;if(i[0]<4){this.setTransform(t);for(var o=0;o<n.length;){var a=n[o++],r=n[o++];isNaN(a)||isNaN(r)||t.fillRect(a-i[0]/2,r-i[1]/2,i[0],i[1])}this.restoreTransform(t)}},findDataIndex:function(t,e){for(var n=this.shape,i=n.points,n=n.size,o=Math.max(n[0],4),a=Math.max(n[1],4),r=i.length/2-1;0<=r;r--){var s=2*r,l=i[s]-o/2,s=i[1+s]-a/2;if(l<=t&&s<=e&&t<=l+o&&e<=s+a)return r}return-1}});function hm(){this.group=new R}n=hm.prototype;n.isPersistent=function(){return!this._incremental},n.updateData=function(t){this.group.removeAll();var e=new um({rectHover:!0,cursor:"default"});e.setShape({points:t.getLayout("symbolPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},n.updateLayout=function(t){var i;this._incremental||(i=t.getLayout("symbolPoints"),this.group.eachChild(function(t){var e,n;null!=t.startIndex&&(e=2*(t.endIndex-t.startIndex),n=4*t.startIndex*2,i=new Float32Array(i.buffer,n,e)),t.setShape("points",i)}))},n.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),2e6<t.count()?(this._incremental||(this._incremental=new Pr({silent:!0})),this.group.add(this._incremental)):this._incremental=null},n.incrementalUpdate=function(t,e){var n;this._incremental?(n=new um,this._incremental.addDisplayable(n,!0)):((n=new um({rectHover:!0,cursor:"default",startIndex:t.start,endIndex:t.end})).incremental=!0,this.group.add(n)),n.setShape({points:e.getLayout("symbolPoints")}),this._setCommon(n,e,!!this._incremental)},n._setCommon=function(e,t,n){var i=t.hostModel,o=t.getVisual("symbolSize"),o=(e.setShape("size",o instanceof Array?o:[o,o]),e.symbolProxy=Wp(t.getVisual("symbol"),0,0,0,0),e.setColor=e.symbolProxy.setColor,e.shape.size[0]<4),o=(e.useStyle(i.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"])),t.getVisual("color"));o&&e.setColor(o),n||(e.seriesIndex=i.seriesIndex,e.on("mousemove",function(t){e.dataIndex=null;t=e.findDataIndex(t.offsetX,t.offsetY);0<=t&&(e.dataIndex=t+(e.startIndex||0))}))},n.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},n._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()},ld({type:"scatter",render:function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).updateData(i),this._finished=!0},incrementalPrepareRender:function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).incrementalPrepareUpdate(i),this._finished=!1},incrementalRender:function(t,e,n){this._symbolDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},updateTransform:function(t,e,n){var i=t.getData();if(this.group.dirty(),!this._finished||1e4<i.count()||!this._symbolDraw.isPersistent())return{update:!0};t=Uf().reset(t);t.progress&&t.progress({start:0,end:i.count()},i),this._symbolDraw.updateLayout(i)},_updateSymbolDraw:function(t,e){var n=this._symbolDraw,e=e.pipelineContext.large;return n&&e===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=new(e?hm:_f),this._isLargeDraw=e,this.group.removeAll()),this.group.add(n.group),n},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},dispose:function(){}}),nd(Yf("scatter","circle")),ed(Uf("scatter")),Ku.extend({type:"series.effectScatter",dependencies:["grid","polar"],getInitialData:function(t,e){return Fd(this.getSource(),this)},brushSelector:"point",defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",rippleEffect:{period:4,scale:2.5,brushType:"fill"},symbolSize:10}});function cm(t,e){t.eachChild(function(t){t.attr({z:e.z,zlevel:e.zlevel,style:{stroke:"stroke"===e.brushType?e.color:null,fill:"fill"===e.brushType?e.color:null}})})}function dm(t,e){R.call(this);var n=new lf(t,e),i=new R;this.add(n),this.add(i),i.beforeUpdate=function(){this.attr(n.getScale())},this.updateData(t,e)}var n=dm.prototype,n=(n.stopEffectAnimation=function(){this.childAt(1).removeAll()},n.startEffectAnimation=function(t){for(var e=t.symbolType,n=t.color,i=this.childAt(1),o=0;o<3;o++){var a=Wp(e,-1,-1,2,2,n),r=(a.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scale:[.5,.5]}),-o/3*t.period+t.effectOffset);a.animate("",!0).when(t.period,{scale:[t.rippleScale/2,t.rippleScale/2]}).delay(r).start(),a.animateStyle(!0).when(t.period,{opacity:0}).delay(r).start(),i.add(a)}cm(i,t)},n.updateEffectAnimation=function(t){for(var e=this._effectCfg,n=this.childAt(1),i=["symbolType","period","rippleScale"],o=0;o<i.length;o++){var a=i[o];if(e[a]!==t[a])return this.stopEffectAnimation(),void this.startEffectAnimation(t)}cm(n,t)},n.highlight=function(){this.trigger("emphasis")},n.downplay=function(){this.trigger("normal")},n.updateData=function(t,e){var n,i,o=t.hostModel,a=(this.childAt(0).updateData(t,e),this.childAt(1)),r=t.getItemModel(e),s=t.getItemVisual(e,"symbol"),l=l=D(l=t.getItemVisual(e,"symbolSize"))?l:[+l,+l],u=t.getItemVisual(e,"color"),h=(a.attr("scale",l),a.traverse(function(t){t.attr({fill:u})}),r.getShallow("symbolOffset")),c=(h&&((i=a.position)[0]=F(h[0],l[0]),i[1]=F(h[1],l[1])),a.rotation=(r.getShallow("symbolRotate")||0)*Math.PI/180||0,{});c.showEffectOn=o.get("showEffectOn"),c.rippleScale=r.get("rippleEffect.scale"),c.brushType=r.get("rippleEffect.brushType"),c.period=1e3*r.get("rippleEffect.period"),c.effectOffset=e/t.count(),c.z=r.getShallow("z")||0,c.zlevel=r.getShallow("zlevel")||0,c.symbolType=s,c.color=u,this.off("mouseover").off("mouseout").off("emphasis").off("normal"),"render"===c.showEffectOn?(this._effectCfg?this.updateEffectAnimation(c):this.startEffectAnimation(c),this._effectCfg=c):(this._effectCfg=null,this.stopEffectAnimation(),n=this.childAt(0),i=function(){n.downplay(),"render"!==c.showEffectOn&&this.stopEffectAnimation()},this.on("mouseover",h=function(){n.highlight(),"render"!==c.showEffectOn&&this.startEffectAnimation(c)},this).on("mouseout",i,this).on("emphasis",h,this).on("normal",i,this)),this._effectCfg=c},n.fadeOut=function(t){this.off("mouseover").off("mouseout").off("emphasis").off("normal"),t&&t()},a(dm,R),ld({type:"effectScatter",init:function(){this._symbolDraw=new _f(dm)},render:function(t,e,n){var t=t.getData(),i=this._symbolDraw;i.updateData(t),this.group.add(i.group)},updateTransform:function(t,e,n){var i=t.getData(),t=(this.group.dirty(),Uf().reset(t));t.progress&&t.progress({start:0,end:i.count()},i),this._symbolDraw.updateLayout(i)},_updateGroupTransform:function(t){t=t.coordinateSystem;t&&t.getRoamTransform&&(this.group.transform=fe(t.getRoamTransform()),this.group.decomposeTransform())},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(e)},dispose:function(){}}),nd(Yf("effectScatter","circle")),ed(Uf("effectScatter")),{_baseAxisDim:null,getInitialData:function(t,e){var n,i,o=e.getComponent("xAxis",this.get("xAxisIndex")),e=e.getComponent("yAxis",this.get("yAxisIndex")),a=o.get("type"),r=e.get("type"),a=("category"===a?(t.layout="horizontal",n=o.getOrdinalMeta(),l=!0):"category"===r?(t.layout="vertical",n=e.getOrdinalMeta(),l=!0):t.layout=t.layout||"horizontal",["x","y"]),r="horizontal"===t.layout?0:1,s=this._baseAxisDim=a[r],a=a[1-r],o=[o,e],e=o[r].get("type"),o=o[1-r].get("type"),r=t.data,l=(r&&l&&(i=[],Z(r,function(t,e){var n;t.value&&D(t.value)?(n=t.value.slice(),t.value.unshift(e)):D(t)?(n=t.slice(),t.unshift(e)):n=t,i.push(n)}),t.data=i),this.defaultValueDimensions);return Kf(this,{coordDimensions:[{name:s,type:pd(e),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:a,type:pd(o),dimsDef:l.slice()}],dimensionsCount:l.length+1})},getBaseAxis:function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis}}),pm=(i(Ku.extend({type:"series.candlestick",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,itemStyle:{color:"#c23531",color0:"#314656",borderWidth:1,borderColor:"#c23531",borderColor0:"#314656"},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationUpdate:!1,animationEasing:"linear",animationDuration:300},getShadowDim:function(){return"open"},brushSelector:function(t,e,n){e=e.getItemLayout(t);return e&&n.rect(e.brushRect)}}),n,!0),["itemStyle"]),gm=["emphasis","itemStyle"],fm=["color","color0","borderColor","borderColor0"],mm=(lh.extend({type:"candlestick",render:function(t,e,n){this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},incrementalPrepareRender:function(t,e,n){this._clear(),this._updateDrawMode(t)},incrementalRender:function(t,e,n,i){this._isLargeDraw?this._incrementalRenderLarge(t,e):this._incrementalRenderNormal(t,e)},_updateDrawMode:function(t){t=t.pipelineContext.large;(null==this._isLargeDraw||t^this._isLargeDraw)&&(this._isLargeDraw=t,this._clear())},_renderNormal:function(i){var o=i.getData(),a=this._data,r=this.group,s=o.getLayout("isSimpleBox");this._data||r.removeAll(),o.diff(a).add(function(t){var e,n;o.hasValue(t)&&(vs(n=ym(e=o.getItemLayout(t),0,!0),{shape:{points:e.ends}},i,t),vm(n,o,t,s),r.add(n),o.setItemGraphicEl(t,n))}).update(function(t,e){var n,e=a.getItemGraphicEl(e);o.hasValue(t)?(n=o.getItemLayout(t),e?G(e,{shape:{points:n.ends}},i,t):e=ym(n),vm(e,o,t,s),r.add(e),o.setItemGraphicEl(t,e)):r.remove(e)}).remove(function(t){t=a.getItemGraphicEl(t);t&&r.remove(t)}).execute(),this._data=o},_renderLarge:function(t){this._clear(),_m(t,this.group)},_incrementalRenderNormal:function(t,e){for(var n,i,o=e.getData(),a=o.getLayout("isSimpleBox");null!=(n=t.next());)vm(i=ym(o.getItemLayout(n)),o,n,a),i.incremental=!0,this.group.add(i)},_incrementalRenderLarge:function(t,e){_m(e,this.group,!0)},remove:function(t){this._clear()},_clear:function(){this.group.removeAll(),this._data=null},dispose:yt}),r.extend({type:"normalCandlestickBox",shape:{},buildPath:function(t,e){e=e.points;this.__simpleBox?(t.moveTo(e[4][0],e[4][1]),t.lineTo(e[6][0],e[6][1])):(t.moveTo(e[0][0],e[0][1]),t.lineTo(e[1][0],e[1][1]),t.lineTo(e[2][0],e[2][1]),t.lineTo(e[3][0],e[3][1]),t.closePath(),t.moveTo(e[4][0],e[4][1]),t.lineTo(e[5][0],e[5][1]),t.moveTo(e[6][0],e[6][1]),t.lineTo(e[7][0],e[7][1]))}}));function ym(t,e,n){var i,o=t.ends;return new mm({shape:{points:n?(i=t,I(o,function(t){return(t=t.slice())[1]=i.initBaseline,t})):o},z2:100})}function vm(t,e,n,i){var o=e.getItemModel(n),a=o.getModel(pm),r=e.getItemVisual(n,"color"),e=e.getItemVisual(n,"borderColor")||r,n=a.getItemStyle(fm),a=(t.useStyle(n),t.style.strokeNoScale=!0,t.style.fill=r,t.style.stroke=e,t.__simpleBox=i,o.getModel(gm).getItemStyle());ss(t,a)}var xm=r.extend({type:"largeCandlestickBox",shape:{},buildPath:function(t,e){for(var n,i=e.points,o=0;o<i.length;)this.__sign===i[o++]?(n=i[o++],t.moveTo(n,i[o++]),t.lineTo(n,i[o++])):o+=3}});function _m(t,e,n){var i=t.getData(),o=i.getLayout("largePoints"),a=new xm({shape:{points:o},__sign:1}),o=(e.add(a),new xm({shape:{points:o},__sign:-1}));e.add(o),wm(1,a,t,i),wm(-1,o,t,i),n&&(a.incremental=!0,o.incremental=!0)}function wm(t,e,n,i){t=0<t?"P":"N",i=i.getVisual("borderColor"+t)||i.getVisual("color"+t),t=n.getModel(pm).getItemStyle(fm);e.useStyle(t),e.style.fill=null,e.style.stroke=i}var bm=["itemStyle","borderColor"],Sm=["itemStyle","borderColor0"],Mm=["itemStyle","color"],Im=["itemStyle","color0"],h={seriesType:"candlestick",plan:ah(),performRawSeries:!0,reset:function(t,e){var n=t.getData(),i=t.pipelineContext.large;if(n.setVisual({legendSymbol:"roundRect",colorP:a(1,t),colorN:a(-1,t),borderColorP:r(1,t),borderColorN:r(-1,t)}),!e.isSeriesFiltered(t))return!i&&{progress:function(t,e){for(var n;null!=(n=t.next());){var i=e.getItemModel(n),o=e.getItemLayout(n).sign;e.setItemVisual(n,{color:a(o,i),borderColor:r(o,i)})}}};function a(t,e){return e.get(0<t?Mm:Im)}function r(t,e){return e.get(0<t?bm:Sm)}}},Tm="undefined"!=typeof Float32Array?Float32Array:Array,c={seriesType:"candlestick",plan:ah(),reset:function(t){var e,n,m=t.coordinateSystem,i=t.getData(),y=(e=i,a="category"===(a=(o=t).getBaseAxis()).type?a.getBandWidth():(a=a.getExtent(),Math.abs(a[1]-a[0])/e.count()),e=F(st(o.get("barMaxWidth"),a),a),n=F(st(o.get("barMinWidth"),1),a),null!=(o=o.get("barWidth"))?F(o,a):Math.max(Math.min(a/2,e),n)),o=["x","y"],v=i.mapDimension(o[0]),a=i.mapDimension(o[1],!0),x=a[0],_=a[1],w=a[2],b=a[3];if(i.setLayout({candleWidth:y,isSimpleBox:y<=1.3}),!(null==v||a.length<4))return{progress:t.pipelineContext.large?function(t,e){for(var n,i=new Tm(5*t.count),o=0,a=[],r=[];null!=(n=t.next());){var s=e.get(v,n),l=e.get(x,n),u=e.get(_,n),h=e.get(w,n),c=e.get(b,n);isNaN(s)||isNaN(h)||isNaN(c)?(i[o++]=NaN,o+=4):(i[o++]=Am(e,n,l,u,_),a[0]=s,a[1]=h,n=m.dataToPoint(a,null,r),i[o++]=n?n[0]:NaN,i[o++]=n?n[1]:NaN,a[1]=c,n=m.dataToPoint(a,null,r),i[o++]=n?n[1]:NaN)}e.setLayout("largePoints",i)}:function(t,e){for(var n;null!=(n=t.next());){var i=e.get(v,n),o=e.get(x,n),a=e.get(_,n),r=e.get(w,n),s=e.get(b,n),l=Math.min(o,a),u=Math.max(o,a),l=p(l,i),u=p(u,i),h=p(r,i),c=p(s,i),d=[];g(d,u,0),g(d,l,1),d.push(f(c),f(u),f(h),f(l)),e.setItemLayout(n,{sign:Am(e,n,o,a,_),initBaseline:(a<o?u:l)[1],ends:d,brushRect:function(t,e,n){t=p(t,n),e=p(e,n);return t[0]-=y/2,e[0]-=y/2,{x:t[0],y:t[1],width:y,height:e[1]-t[1]}}(r,s,i)})}function p(t,e){var n=[];return n[0]=e,n[1]=t,isNaN(e)||isNaN(t)?[NaN,NaN]:m.dataToPoint(n)}function g(t,e,n){var i=e.slice(),e=e.slice();i[0]=Ur(i[0]+y/2,1,!1),e[0]=Ur(e[0]-y/2,1,!0),n?t.push(i,e):t.push(e,i)}function f(t){return t[0]=Ur(t[0],1),t}}}}};function Am(t,e,n,i,o){return!(i<n)&&(n<i||!(0<e)||t.get(o,e-1)<=i)?1:-1}function Dm(t,e,n){og.call(this,t,e,n),this.type="value",this.angle=0,this.name="",this.model}function Cm(t,e,n){this._model=t,this.dimensions=[],this._indicatorAxes=I(t.getIndicatorModels(),function(t,e){var e="indicator_"+e,n=new Dm(e,new Qd);return n.name=t.get("name"),(n.model=t).axis=n,this.dimensions.push(e),n},this),this.resize(t,n),this.cx,this.cy,this.r,this.r0,this.startAngle}Jc(function(t){t&&D(t.series)&&Z(t.series,function(t){k(t)&&"k"===t.type&&(t.type="candlestick")})}),nd(h),ed(c),a(Dm,og),Cm.prototype.getIndicatorAxes=function(){return this._indicatorAxes},Cm.prototype.dataToPoint=function(t,e){var n=this._indicatorAxes[e];return this.coordToPoint(n.dataToCoord(t),e)},Cm.prototype.coordToPoint=function(t,e){e=this._indicatorAxes[e].angle;return[this.cx+t*Math.cos(e),this.cy-t*Math.sin(e)]},Cm.prototype.pointToData=function(t){var e=t[0]-this.cx,t=t[1]-this.cy,n=Math.sqrt(e*e+t*t);e/=n,t/=n;for(var i,o=Math.atan2(-t,e),a=1/0,r=-1,s=0;s<this._indicatorAxes.length;s++){var l=this._indicatorAxes[s],u=Math.abs(o-l.angle);u<a&&(i=l,r=s,a=u)}return[r,+(i&&i.coodToData(n))]},Cm.prototype.resize=function(t,e){var n=t.get("center"),i=e.getWidth(),e=e.getHeight(),o=Math.min(i,e)/2,i=(this.cx=F(n[0],i),this.cy=F(n[1],e),this.startAngle=t.get("startAngle")*Math.PI/180,t.get("radius"));this.r0=F((i="string"!=typeof i&&"number"!=typeof i?i:[0,i])[0],o),this.r=F(i[1],o),Z(this._indicatorAxes,function(t,e){t.setExtent(this.r0,this.r);e=this.startAngle+e*Math.PI*2/this._indicatorAxes.length,e=Math.atan2(Math.sin(e),Math.cos(e));t.angle=e},this)},Cm.prototype.update=function(i,t){var o=this._indicatorAxes,a=this._model,h=(Z(o,function(t){t.scale.setExtent(1/0,-1/0)}),i.eachSeriesByType("radar",function(t,e){var n;"radar"===t.get("coordinateSystem")&&i.getComponent("radar",t.get("radarIndex"))===a&&(n=t.getData(),Z(o,function(t){t.scale.unionExtentFromData(n,n.mapDimension(t.dim))}))},this),a.get("splitNumber"));function c(t){var e=Math.pow(10,Math.floor(Math.log(t)/Math.LN10)),t=t/e;return 2===t?t=5:t*=2,t*e}Z(o,function(t,e){var n,i,o=Dp(t.scale,t.model),a=(Cp(t.scale,t.model),t.model),r=t.scale,s=a.getMin(),l=a.getMax(),u=r.getInterval();if(null!=s&&null!=l)r.setExtent(+s,+l),r.setInterval((l-s)/h);else if(null!=s)for(;r.setExtent(+s,n=s+u*h),r.setInterval(u),u=c(u),n<o[1]&&isFinite(n)&&isFinite(o[1]););else if(null!=l)for(;r.setExtent(i=l-u*h,+l),r.setInterval(u),u=c(u),i>o[0]&&isFinite(i)&&isFinite(o[0]););else{r.getTicks().length-1>h&&(u=c(u));t=Math.round((o[0]+o[1])/2/u)*u,a=Math.round(h/2);r.setExtent(Es(t-a*u),Es(t+(h-a)*u)),r.setInterval(u)}})},Cm.dimensions=[],Cm.create=function(t,n){var i=[];return t.eachComponent("radar",function(t){var e=new Cm(t,0,n);i.push(e),t.coordinateSystem=e}),t.eachSeriesByType("radar",function(t){"radar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("radarIndex")||0])}),i},eu.register("radar",Cm);h=pg.valueAxis;function Lm(t,e){return C({show:e},t)}ad({type:"radar",optionUpdated:function(){var n=this.get("boundaryGap"),i=this.get("splitNumber"),o=this.get("scale"),a=this.get("axisLine"),r=this.get("axisTick"),s=this.get("axisLabel"),l=this.get("name"),u=this.get("name.show"),h=this.get("name.formatter"),c=this.get("nameGap"),d=this.get("triggerEvent"),t=I(this.get("indicator")||[],function(t){null!=t.max&&0<t.max&&!t.min?t.min=0:null!=t.min&&t.min<0&&!t.max&&(t.max=0);var e=l,e=(null!=t.color&&(e=C({color:t.color},l)),t=f(N(t),{boundaryGap:n,splitNumber:i,scale:o,axisLine:a,axisTick:r,axisLabel:s,name:t.text,nameLocation:"end",nameGap:c,nameTextStyle:e,triggerEvent:d},!1),u||(t.name=""),"string"==typeof h?(e=t.name,t.name=h.replace("{value}",null!=e?e:"")):"function"==typeof h&&(t.name=h(t.name,t)),O(new w(t,null,this.ecModel),zp));return e.mainType="radar",e.componentIndex=this.componentIndex,e},this);this.getIndicatorModels=function(){return t}},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"75%",startAngle:90,name:{show:!0},boundaryGap:[0,0],splitNumber:5,nameGap:15,scale:!1,shape:"polygon",axisLine:f({lineStyle:{color:"#bbb"}},h.axisLine),axisLabel:Lm(h.axisLabel,!1),axisTick:Lm(h.axisTick,!1),splitLine:Lm(h.splitLine,!0),splitArea:Lm(h.splitArea,!0),indicator:[]}});var km=["axisLine","axisTickLabel","axisName"],Pm=(rd({type:"radar",render:function(t,e,n){this.group.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},_buildAxes:function(t){var e=t.coordinateSystem;Z(I(e.getIndicatorAxes(),function(t){return new Vg(t.model,{position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}),function(t){Z(km,t.add,t),this.group.add(t.getGroup())},this)},_buildSplitLineAndArea:function(t){var n=t.coordinateSystem,e=n.getIndicatorAxes();if(e.length){var i=t.get("shape"),o=t.getModel("splitLine"),t=t.getModel("splitArea"),a=o.getModel("lineStyle"),r=t.getModel("areaStyle"),s=o.get("show"),l=t.get("show"),u=a.get("color"),h=r.get("color"),u=D(u)?u:[u],h=D(h)?h:[h],c=[],d=[];if("circle"===i)for(var p=e[0].getTicksCoords(),g=n.cx,f=n.cy,m=0;m<p.length;m++)s&&c[M(c,u,m)].push(new hr({shape:{cx:g,cy:f,r:p[m].coord}})),l&&m<p.length-1&&d[M(d,h,m)].push(new gr({shape:{cx:g,cy:f,r0:p[m].coord,r:p[m+1].coord}}));else for(var y,v=I(e,function(t,e){t=t.getTicksCoords();return y=null==y?t.length-1:Math.min(t.length-1,y),I(t,function(t){return n.coordToPoint(t.coord,e)})}),x=[],m=0;m<=y;m++){for(var _=[],w=0;w<e.length;w++)_.push(v[w][m]);_[0]?_.push(_[0].slice()):H&&console.error("Can't draw value axis "+m),s&&c[M(c,u,m)].push(new vr({shape:{points:_}})),l&&x&&d[M(d,h,m-1)].push(new yr({shape:{points:_.concat(x)}})),x=_.slice().reverse()}var b=a.getLineStyle(),S=r.getAreaStyle();Z(d,function(t,e){this.group.add(Hr(t,{style:C({stroke:"none",fill:h[e%h.length]},S),silent:!0}))},this),Z(c,function(t,e){this.group.add(Hr(t,{style:C({fill:"none",stroke:u[e%u.length]},b),silent:!0}))},this)}function M(t,e,n){n%=e.length;return t[n]=t[n]||[],n}}}),Ku.extend({type:"series.radar",dependencies:["radar"],init:function(t){Pm.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()}},getInitialData:function(t,e){return Kf(this,{generateCoord:"indicator_",generateCoordCount:1/0})},formatTooltip:function(i){var o=this.getData(),t=this.coordinateSystem.getIndicatorAxes(),e=this.getData().getName(i);return nl(""===e?this.name:e)+"<br/>"+I(t,function(t,e){var n=o.get(o.mapDimension(t.dim),i);return nl(t.name+" : "+n)}).join("<br />")},defaultOption:{zlevel:0,z:2,coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid"},label:{position:"top"},symbol:"emptyCircle",symbolSize:4}}));ld({type:"radar",render:function(l,t,e){var n=l.coordinateSystem,m=this.group,y=l.getData(),r=this._data;function u(t,e){var n=t.getItemVisual(e,"symbol")||"circle",i=t.getItemVisual(e,"color");if("none"!==n)return e=t=D(t=t.getItemVisual(e,"symbolSize"))?t:[+t,+t],(t=Wp(n,-1,-1,2,2,i)).attr({style:{strokeNoScale:!0},z2:100,scale:[e[0]/2,e[1]/2]}),t}function s(t,e,n,i,o,a){n.removeAll();for(var r=0;r<e.length-1;r++){var s=u(i,o);s&&(t[s.__dimIdx=r]?(s.attr("position",t[r]),Is[a?"initProps":"updateProps"](s,{position:e[r]},l,o)):s.attr("position",e[r]),n.add(s))}}function h(t){return I(t,function(t){return[n.cx,n.cy]})}y.diff(r).add(function(t){var e,n,i,o,a=y.getItemLayout(t);a&&(e=new yr,n=new vr,i={shape:{points:a}},e.shape.points=h(a),n.shape.points=h(a),vs(e,i,l,t),vs(n,i,l,t),i=new R,o=new R,i.add(n),i.add(e),i.add(o),s(n.shape.points,a,o,y,t,!0),y.setItemGraphicEl(t,i))}).update(function(t,e){var e=r.getItemGraphicEl(e),n=e.childAt(0),i=e.childAt(1),o=e.childAt(2),a={shape:{points:y.getItemLayout(t)}};a.shape.points&&(s(n.shape.points,a.shape.points,o,y,t,!1),G(n,a,l),G(i,a,l),y.setItemGraphicEl(t,e))}).remove(function(t){m.remove(r.getItemGraphicEl(t))}).execute(),y.eachItemGraphicEl(function(t,e){var n=y.getItemModel(e),i=t.childAt(0),o=t.childAt(1),a=t.childAt(2),r=y.getItemVisual(e,"color"),i=(m.add(t),i.useStyle(C(n.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:r})),i.hoverStyle=n.getModel("emphasis.lineStyle").getLineStyle(),n.getModel("areaStyle")),s=n.getModel("emphasis.areaStyle"),l=i.isEmpty()&&i.parentModel.isEmpty(),u=s.isEmpty()&&s.parentModel.isEmpty()&&l,h=(o.ignore=l,o.useStyle(C(i.getAreaStyle(),{fill:r,opacity:.7})),o.hoverStyle=s.getAreaStyle(),n.getModel("itemStyle").getItemStyle(["color"])),c=n.getModel("emphasis.itemStyle").getItemStyle(),d=n.getModel("label"),p=n.getModel("emphasis.label");function g(){o.attr("ignore",u)}function f(){o.attr("ignore",l)}a.eachChild(function(t){t.setStyle(h),t.hoverStyle=N(c),us(t.style,t.hoverStyle,d,p,{labelFetcher:y.hostModel,labelDataIndex:e,labelDimIndex:t.__dimIdx,defaultText:y.get(y.dimensions[t.__dimIdx],e),autoColor:r,isRectText:!0})}),t.off("mouseover").off("mouseout").off("normal").off("emphasis"),t.on("emphasis",g).on("mouseover",g).on("normal",f).on("mouseout",f),ss(t)}),this._data=y},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}}),nd(nm("radar")),nd(Yf("radar","circle")),ed(function(t){t.eachSeriesByType("radar",function(t){var e=t.getData(),n=[],i=t.coordinateSystem;if(i){for(var o=i.getIndicatorAxes(),a=0;a<o.length;a++)e.each(e.mapDimension(o[a].dim),r);e.each(function(t){n[t][0]&&n[t].push(n[t][0].slice()),e.setItemLayout(t,n[t])})}function r(t,e){n[e]=n[e]||[],n[e][a]=i.dataToPoint(t,a)}})}),Qc(lm("radar")),Jc(function(n){var i,t=n.polar;t&&(D(t)||(t=[t]),i=[],Z(t,function(t,e){(t.indicator?(t.type&&!t.shape&&(t.shape=t.type),n.radar=n.radar||[],D(n.radar)||(n.radar=[n.radar]),n.radar):i).push(t)}),n.polar=i),Z(n.series,function(t){t&&"radar"===t.type&&t.polarIndex&&(t.radarIndex=t.polarIndex)})}),Ku.extend({type:"series.heatmap",getInitialData:function(t,e){return Fd(this.getSource(),this,{generateCoord:"value"})},preventIncremental:function(){var t=eu.get(this.get("coordinateSystem"));if(t&&t.dimensions)return"lng"===t.dimensions[0]&&"lat"===t.dimensions[1]},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0}});function Nm(){var t=K();this.canvas=t,this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={}}Nm.prototype={update:function(t,e,n,i,o,a){var r=this._getBrush(),s=this._getGradient(t,o,"inRange"),l=this._getGradient(t,o,"outOfRange"),u=this.pointSize+this.blurSize,o=this.canvas,h=o.getContext("2d"),c=t.length;o.width=e,o.height=n;for(var d=0;d<c;++d){var p=t[d],g=p[0],f=p[1],m=i(p[2]);h.globalAlpha=m,h.drawImage(r,g-u,f-u)}if(o.width&&o.height){for(var e=h.getImageData(0,0,o.width,o.height),y=e.data,v=0,x=y.length,_=this.minOpacity,w=this.maxOpacity-_;v<x;){var b,m=y[v+3]/256,S=4*Math.floor(255*m);0<m?(b=a(m)?s:l,0<m&&(m=m*w+_),y[v++]=b[S],y[v++]=b[1+S],y[v++]=b[2+S],y[v++]=b[3+S]*m*256):v+=4}h.putImageData(e,0,0)}return o},_getBrush:function(){var t=this._brushCanvas||(this._brushCanvas=K()),e=this.pointSize+this.blurSize,n=2*e,i=(t.width=n,t.height=n,t.getContext("2d"));return i.clearRect(0,0,n,n),i.shadowOffsetX=n,i.shadowBlur=this.blurSize,i.shadowColor="#000",i.beginPath(),i.arc(-e,e,this.pointSize,0,2*Math.PI,!0),i.closePath(),i.fill(),t},_getGradient:function(t,e,n){for(var i=this._gradientPixels,o=i[n]||(i[n]=new Uint8ClampedArray(1024)),a=[0,0,0,0],r=0,s=0;s<256;s++)e[n](s/255,!0,a),o[r++]=a[0],o[r++]=a[1],o[r++]=a[2],o[r++]=a[3];return o}},ld({type:"heatmap",render:function(n,t,e){var i;if(t.eachComponent("visualMap",function(e){e.eachTargetSeries(function(t){t===n&&(i=e)})}),H&&!i)throw new Error("Heatmap must use with visualMap");this.group.removeAll(),this._incrementalDisplayable=null;var o,t=n.coordinateSystem;"cartesian2d"===t.type||"calendar"===t.type?this._renderOnCartesianAndCalendar(n,e,0,n.getData().count()):"lng"===(o=(o=t).dimensions)[0]&&"lat"===o[1]&&this._renderOnGeo(t,n,i,e)},incrementalPrepareRender:function(t,e,n){this.group.removeAll()},incrementalRender:function(t,e,n,i){e.coordinateSystem&&this._renderOnCartesianAndCalendar(e,i,t.start,t.end,!0)},_renderOnCartesianAndCalendar:function(t,e,n,i,o){var a,r,s=t.coordinateSystem;if("cartesian2d"===s.type){var l=s.getAxis("x"),u=s.getAxis("y");if(H){if("category"!==l.type||"category"!==u.type)throw new Error("Heatmap on cartesian must have two category axes");if(!l.onBand||!u.onBand)throw new Error("Heatmap on cartesian must have two axes with boundaryGap true")}a=l.getBandWidth(),r=u.getBandWidth()}for(var h=this.group,c=t.getData(),d="emphasis.itemStyle",p="emphasis.label",g=t.getModel("itemStyle").getItemStyle(["color"]),f=t.getModel(d).getItemStyle(),m=t.getModel("label"),y=t.getModel(p),v=s.type,x="cartesian2d"===v?[c.mapDimension("x"),c.mapDimension("y"),c.mapDimension("value")]:[c.mapDimension("time"),c.mapDimension("value")],_=n;_<i;_++){if("cartesian2d"===v){if(isNaN(c.get(x[2],_)))continue;var w=s.dataToPoint([c.get(x[0],_),c.get(x[1],_)]),w=new V({shape:{x:w[0]-a/2,y:w[1]-r/2,width:a,height:r},style:{fill:c.getItemVisual(_,"color"),opacity:c.getItemVisual(_,"opacity")}})}else{if(isNaN(c.get(x[1],_)))continue;w=new V({z2:1,shape:s.dataToRect([c.get(x[0],_)]).contentShape,style:{fill:c.getItemVisual(_,"color"),opacity:c.getItemVisual(_,"opacity")}})}var b=c.getItemModel(_),b=(c.hasItemOption&&(g=b.getModel("itemStyle").getItemStyle(["color"]),f=b.getModel(d).getItemStyle(),m=b.getModel("label"),y=b.getModel(p)),t.getRawValue(_)),S="-";us(g,f,m,y,{labelFetcher:t,labelDataIndex:_,defaultText:S=b&&null!=b[2]?b[2]:S,isRectText:!0}),w.setStyle(g),ss(w,c.hasItemOption?f:O({},f)),(w.incremental=o)&&(w.useHoverLayer=!0),h.add(w),c.setItemGraphicEl(_,w)}},_renderOnGeo:function(i,t,e,n){var o,a,r,s,l,u,h,c=e.targetVisuals.inRange,d=e.targetVisuals.outOfRange,p=t.getData(),g=this._hmLayer||this._hmLayer||new Nm,t=(g.blurSize=t.get("blurSize"),g.pointSize=t.get("pointSize"),g.minOpacity=t.get("minOpacity"),g.maxOpacity=t.get("maxOpacity"),i.getViewRect().clone()),f=i.getRoamTransform(),m=(t.applyTransform(f),Math.max(t.x,0)),y=Math.max(t.y,0),f=Math.min(t.width+t.x,n.getWidth()),t=Math.min(t.height+t.y,n.getHeight()),n=f-m,f=t-y,t=[p.mapDimension("lng"),p.mapDimension("lat"),p.mapDimension("value")],p=p.mapArray(t,function(t,e,n){t=i.dataToPoint([t,e]);return t[0]-=m,t[1]-=y,t.push(n),t}),t=e.getExtent(),v="visualMap.continuous"===e.type?(h=e.option.range,v=t[1]-t[0],h=[(h[0]-t[0])/v,(h[1]-t[0])/v],function(t){return t>=h[0]&&t<=h[1]}):(o=t,a=e.getPieceList(),r=e.option.selected,s=o[1]-o[0],l=(a=I(a,function(t){return{interval:[(t.interval[0]-o[0])/s,(t.interval[1]-o[0])/s]}})).length,u=0,function(t){for(var e,n=u;n<l;n++)if((e=a[n].interval)[0]<=t&&t<=e[1]){u=n;break}if(n===l)for(n=u-1;0<=n;n--)if((e=a[n].interval)[0]<=t&&t<=e[1]){u=n;break}return 0<=n&&n<l&&r[n]}),t=(g.update(p,n,f,c.color.getNormalizer(),{inRange:c.color.getColorMapper(),outOfRange:d.color.getColorMapper()},v),new Ri({style:{width:n,height:f,x:m,y:y,image:g.canvas},silent:!0}));this.group.add(t)},dispose:function(){}});var Om=Z,Em="\0__link_datas",zm="\0__link_mainData";function Rm(n){var i=n.mainData,t=n.datas;t||(t={main:i},n.datasAttr={main:"data"}),n.datas=n.mainData=null,Wm(i,t,n),Om(t,function(e){Om(i.TRANSFERABLE_METHODS,function(t){e.wrapMethod(t,L(Bm,n))})}),i.wrapMethod("cloneShallow",L(Gm,n)),Om(i.CHANGABLE_METHODS,function(t){i.wrapMethod(t,L(Vm,n))}),P(t[i.dataType]===i)}function Bm(t,e){var n;return(n=this)[zm]===n?Wm((n=O({},this[Em]))[this.dataType]=e,n,t):Hm(e,this.dataType,this[zm],t),e}function Vm(t,e){return t.struct&&t.struct.update(this),e}function Gm(n,i){return Om(i[Em],function(t,e){t!==i&&Hm(t.cloneShallow(),e,i,n)}),i}function Fm(t){var e=this[zm];return null==t||null==e?e:e[Em][t]}function Wm(n,t,i){n[Em]={},Om(t,function(t,e){Hm(t,e,n,i)})}function Hm(t,e,n,i){(n[Em][e]=t)[zm]=n,t.dataType=e,i.struct&&(t[i.structAttr]=i.struct,i.struct[i.datasAttr[e]]=t),t.getLinkedData=Fm}function Zm(t,e){this.name=t||"",this.depth=0,this.height=0,this.parentNode=null,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.hostTree=e}function Xm(e,t,n){this.root,this.data,this._nodes=[],this.hostModel=e,this.levelModels=I(t||[],function(t){return new w(t,e,e.ecModel)}),this.leavesModel=new w(n||{},e,e.ecModel)}function Ym(t,e){var n=t.isExpand?t.children:[],i=t.parentNode.children,o=t.hierNode.i?i[t.hierNode.i-1]:null;if(n.length){for(var a=t.children,r=a.length,s=0,l=0;0<=--r;){var u=a[r];u.hierNode.prelim+=s,u.hierNode.modifier+=s,l+=u.hierNode.change,s+=u.hierNode.shift+l}n=(n[0].hierNode.prelim+n[n.length-1].hierNode.prelim)/2;o?(t.hierNode.prelim=o.hierNode.prelim+e(t,o),t.hierNode.modifier=t.hierNode.prelim-n):t.hierNode.prelim=n}else o&&(t.hierNode.prelim=o.hierNode.prelim+e(t,o));t.parentNode.hierNode.defaultAncestor=function(t,e,n,i){if(e){for(var o=t,a=t,r=a.parentNode.children[0],s=e,l=o.hierNode.modifier,u=a.hierNode.modifier,h=r.hierNode.modifier,c=s.hierNode.modifier;s=Km(s),a=$m(a),s&&a;){o=Km(o),r=$m(r),o.hierNode.ancestor=t;var d=s.hierNode.prelim+c-a.hierNode.prelim-u+i(s,a);0<d&&(function(t,e,n){var i=n/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=i,e.hierNode.shift+=n,e.hierNode.modifier+=n,e.hierNode.prelim+=n,t.hierNode.change+=i}(function(t,e,n){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:n}(s,t,n),t,d),u+=d,l+=d),c+=s.hierNode.modifier,u+=a.hierNode.modifier,l+=o.hierNode.modifier,h+=r.hierNode.modifier}s&&!Km(o)&&(o.hierNode.thread=s,o.hierNode.modifier+=c-l),a&&!$m(r)&&(r.hierNode.thread=a,r.hierNode.modifier+=u-h,n=t)}return n}(t,o,t.parentNode.hierNode.defaultAncestor||i[0],e)}function Um(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function jm(t){return arguments.length?t:Jm}function qm(t,e){var n={};return t-=Math.PI/2,n.x=e*Math.cos(t),n.y=e*Math.sin(t),n}function Km(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function $m(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function Jm(t,e){return t.parentNode===e.parentNode?1:2}Zm.prototype={constructor:Zm,isRemoved:function(){return this.dataIndex<0},eachNode:function(t,e,n){"function"==typeof t&&(n=e,e=t,t=null);var i,o=(t=T(t=t||{})?{order:t}:t).order||"preorder",a=this[t.attr||"children"];"preorder"===o&&(i=e.call(n,this));for(var r=0;!i&&r<a.length;r++)a[r].eachNode(t,e,n);"postorder"===o&&e.call(n,this)},updateDepthAndHeight:function(t){var e=0;this.depth=t;for(var n=0;n<this.children.length;n++){var i=this.children[n];i.updateDepthAndHeight(t+1),i.height>e&&(e=i.height)}this.height=e+1},getNodeById:function(t){if(this.getId()===t)return this;for(var e=0,n=this.children,i=n.length;e<i;e++){var o=n[e].getNodeById(t);if(o)return o}},contains:function(t){if(t===this)return!0;for(var e=0,n=this.children,i=n.length;e<i;e++){var o=n[e].contains(t);if(o)return o}},getAncestors:function(t){for(var e=[],n=t?this:this.parentNode;n;)e.push(n),n=n.parentNode;return e.reverse(),e},getValue:function(t){var e=this.hostTree.data;return e.get(e.getDimension(t||"value"),this.dataIndex)},setLayout:function(t,e){0<=this.dataIndex&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},getLayout:function(){return this.hostTree.data.getItemLayout(this.dataIndex)},getModel:function(t){var e,n,i,o;if(!(this.dataIndex<0))return i=(n=this.hostTree).data.getItemModel(this.dataIndex),(o=this.getLevelModel())||0!==this.children.length&&(0===this.children.length||!1!==this.isExpand)||(e=this.getLeavesModel()),i.getModel(t,(o||e||n.hostModel).getModel(t))},getLevelModel:function(){return(this.hostTree.levelModels||[])[this.depth]},getLeavesModel:function(){return this.hostTree.leavesModel},setVisual:function(t,e){0<=this.dataIndex&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},getVisual:function(t,e){return this.hostTree.data.getItemVisual(this.dataIndex,t,e)},getRawIndex:function(){return this.hostTree.data.getRawIndex(this.dataIndex)},getId:function(){return this.hostTree.data.getId(this.dataIndex)},isAncestorOf:function(t){for(var e=t.parentNode;e;){if(e===this)return!0;e=e.parentNode}return!1},isDescendantOf:function(t){return t!==this&&t.isAncestorOf(this)}},Xm.prototype={constructor:Xm,type:"tree",eachNode:function(t,e,n){this.root.eachNode(t,e,n)},getNodeByDataIndex:function(t){t=this.data.getRawIndex(t);return this._nodes[t]},getNodeByName:function(t){return this.root.getNodeByName(t)},update:function(){for(var t=this.data,e=this._nodes,n=0,i=e.length;n<i;n++)e[n].dataIndex=-1;for(n=0,i=t.count();n<i;n++)e[t.getRawIndex(n)].dataIndex=n},clearLayouts:function(){this.data.clearItemLayouts()}},Ku.extend({type:"series.tree",layoutInfo:null,layoutMode:"box",getInitialData:function(t){var e={name:t.name,children:t.data},n=t.leaves||{},i={},n=(i.leaves=n,Xm.createTree(e,this,i)),o=0,a=(n.eachNode("preorder",function(t){t.depth>o&&(o=t.depth)}),t.expandAndCollapse&&0<=t.initialTreeDepth?t.initialTreeDepth:o);return n.root.eachNode("preorder",function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=a}),n.data},getOrient:function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},formatTooltip:function(t){for(var e=this.getData().tree,n=e.root.children[0],i=e.getNodeByDataIndex(t),e=i.getValue(),o=i.name;i&&i!==n;)o=i.parentNode.name+"."+o,i=i.parentNode;return nl(o+(isNaN(e)||null==e?"":" : "+e))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",roam:!(Xm.createTree=function(t,e,n){var l=new Xm(e,n.levels,n.leaves),u=[],h=1,n=(!function t(e,n){var i,o=e.value,a=(h=Math.max(h,D(o)?o.length:1),u.push(e),new Zm(e.name,l)),r=(n?(o=a,i=(n=n).children,o.parentNode!==n&&(i.push(o),o.parentNode=n)):l.root=a,l._nodes.push(a),e.children);if(r)for(var s=0;s<r.length;s++)t(r[s],a)}(t),l.root.updateDepthAndHeight(0),Rd(u,{coordDimensions:["value"],dimensionsCount:h})),t=new Sd(n,e);return t.initData(u),Rm({mainData:t,struct:l,structAttr:"tree"}),l.update(),l}),nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderColor:"#c23531",borderWidth:1.5},label:{show:!0,color:"#555"},leaves:{label:{show:!0}},animationEasing:"linear",animationDuration:700,animationDurationUpdate:1e3}});var Qm=zt;function t0(){xe.call(this)}function e0(t){this.name=t,this.zoomLimit,xe.call(this),this._roamTransformable=new t0,this._rawTransformable=new t0,this._center,this._zoom}function n0(t,e,n,i){n=n.seriesModel,n=n?n.coordinateSystem:null;return n===this?n[t](i):null}function i0(t,e,n){var t=t.target,i=t.position;i[0]+=e,i[1]+=n,t.dirty()}function o0(t,e,n,i){var o=t.target,a=t.zoomLimit,r=o.position,s=o.scale,l=t.zoom=t.zoom||1,a=(l*=e,a&&(e=a.min||0,a=a.max||1/0,l=Math.max(Math.min(a,l),e)),l/t.zoom);t.zoom=l,r[0]-=(n-r[0])*(a-1),r[1]-=(i-r[1])*(a-1),s[0]*=a,s[1]*=a,o.dirty()}i(t0,xe),e0.prototype={constructor:e0,type:"view",dimensions:["x","y"],setBoundingRect:function(t,e,n,i){return this._rect=new z(t,e,n,i),this._rect},getBoundingRect:function(){return this._rect},setViewRect:function(t,e,n,i){this.transformTo(t,e,n,i),this._viewRect=new z(t,e,n,i)},transformTo:function(t,e,n,i){var o=this.getBoundingRect(),a=this._rawTransformable;a.transform=o.calculateTransform(new z(t,e,n,i)),a.decomposeTransform(),this._updateTransform()},setCenter:function(t){t&&(this._center=t,this._updateCenterAndZoom())},setZoom:function(t){t=t||1;var e=this.zoomLimit;e&&(null!=e.max&&(t=Math.min(e.max,t)),null!=e.min)&&(t=Math.max(e.min,t)),this._zoom=t,this._updateCenterAndZoom()},getDefaultCenter:function(){var t=this.getBoundingRect();return[t.x+t.width/2,t.y+t.height/2]},getCenter:function(){return this._center||this.getDefaultCenter()},getZoom:function(){return this._zoom||1},getRoamTransform:function(){return this._roamTransformable.getLocalTransform()},_updateCenterAndZoom:function(){var t=this._rawTransformable.getLocalTransform(),e=this._roamTransformable,n=this.getDefaultCenter(),i=this.getCenter(),o=this.getZoom(),i=zt([],i,t),n=zt([],n,t);e.origin=i,e.position=[n[0]-i[0],n[1]-i[1]],e.scale=[o,o],this._updateTransform()},_updateTransform:function(){var t=this._roamTransformable,e=this._rawTransformable;(e.parent=t).updateTransform(),e.updateTransform(),ue(this.transform||(this.transform=[]),e.transform||se()),this._rawTransform=e.getLocalTransform(),this.invTransform=this.invTransform||[],ge(this.invTransform,this.transform),this.decomposeTransform()},getViewRect:function(){return this._viewRect},getViewRectAfterRoam:function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},dataToPoint:function(t,e,n){e=e?this._rawTransform:this.transform;return n=n||[],e?Qm(n,t,e):wt(n,t)},pointToData:function(t){var e=this.invTransform;return e?Qm([],t,e):[t[0],t[1]]},convertToPixel:L(n0,"dataToPoint"),convertFromPixel:L(n0,"pointToData"),containPoint:function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])}},i(e0,xe);var a0="\0_ec_interaction_mutex";function r0(t,e){return s0(t)[e]}function s0(t){return t[a0]||(t[a0]={})}function l0(n){this.pointerChecker,this._zr=n,this._opt={};var t=A,i=t(u0,this),o=t(h0,this),a=t(c0,this),r=t(d0,this),s=t(p0,this);Wt.call(this),this.setPointerChecker=function(t){this.pointerChecker=t},this.enable=function(t,e){this.disable(),this._opt=C(N(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",a)),!0!==t&&"scale"!==t&&"zoom"!==t||(n.on("mousewheel",r),n.on("pinch",s))},this.disable=function(){n.off("mousedown",i),n.off("mousemove",o),n.off("mouseup",a),n.off("mousewheel",r),n.off("pinch",s)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}function u0(t){var e,n;Jt(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))}function h0(t){var e,n,i,o,a,r;this._dragging&&m0("moveOnMouseMove",t,this._opt)&&"pinch"!==t.gestureEvent&&!r0(this._zr,"globalPan")&&(e=t.offsetX,n=t.offsetY,a=e-(i=this._x),r=n-(o=this._y),this._x=e,this._y=n,this._opt.preventDefaultMouseMove&&$t(t.event),f0(this,"pan","moveOnMouseMove",t,{dx:a,dy:r,oldX:i,oldY:o,newX:e,newY:n}))}function c0(t){Jt(t)||(this._dragging=!1)}function d0(t){var e=m0("zoomOnMouseWheel",t,this._opt),n=m0("moveOnMouseWheel",t,this._opt),i=t.wheelDelta,o=Math.abs(i),a=t.offsetX,r=t.offsetY;0!==i&&(e||n)&&(e&&(e=3<o?1.4:1<o?1.2:1.1,g0(this,"zoom","zoomOnMouseWheel",t,{scale:0<i?e:1/e,originX:a,originY:r})),n)&&g0(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:(0<i?1:-1)*(3<(o=Math.abs(i))?.4:1<o?.15:.05),originX:a,originY:r})}function p0(t){r0(this._zr,"globalPan")||g0(this,"zoom",null,t,{scale:1<t.pinchScale?1.1:1/1.1,originX:t.pinchX,originY:t.pinchY})}function g0(t,e,n,i,o){t.pointerChecker&&t.pointerChecker(i,o.originX,o.originY)&&($t(i.event),f0(t,e,n,i,o))}function f0(t,e,n,i,o){o.isAvailableBehavior=A(m0,null,n,i),t.trigger(e,o)}function m0(t,e,n){n=n[t];return!t||n&&(!T(n)||e.event[n+"Key"])}s({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},function(){}),i(l0,Wt);var y0={axisPointer:1,tooltip:1,brush:1};function v0(t,e,n){e=e.getComponentByElement(t.topTarget),t=e&&e.coordinateSystem;return e&&e!==n&&!y0[e.mainType]&&t&&t.model!==n}function x0(t,e){var n=t.getItemLayout(e);return n&&!isNaN(n.x)&&!isNaN(n.y)&&"none"!==t.getItemVisual(e,"symbol")}function _0(t,e,n){return n.itemModel=e,n.itemStyle=e.getModel("itemStyle").getItemStyle(),n.hoverItemStyle=e.getModel("emphasis.itemStyle").getItemStyle(),n.lineStyle=e.getModel("lineStyle").getLineStyle(),n.labelModel=e.getModel("label"),n.hoverLabelModel=e.getModel("emphasis.label"),!1===t.isExpand&&0!==t.children.length?n.symbolInnerColor=n.itemStyle.fill:n.symbolInnerColor="#fff",n}function w0(t,e,n,i,o,a){var r,s,l,u=!n,h=t.tree.getNodeByDataIndex(e),c=h.getModel(),c=(a=_0(h,c,a),t.tree.root),d=h.parentNode!==c&&h.parentNode||h,p=t.getItemGraphicEl(d.dataIndex),d=d.getLayout(),p=p?{x:p.position[0],y:p.position[1],rawX:p.__radialOldRawX,rawY:p.__radialOldRawY}:d,g=h.getLayout(),u=(u?(n=new lf(t,e,a)).attr("position",[p.x,p.y]):n.updateData(t,e,a),n.__radialOldRawX=n.__radialRawX,n.__radialOldRawY=n.__radialRawY,n.__radialRawX=g.rawX,n.__radialRawY=g.rawY,i.add(n),t.setItemGraphicEl(e,n),G(n,{position:[g.x,g.y]},o),n.getSymbolPath());"radial"===a.layout&&(e=(t=c.children[0]).getLayout(),s=t.children.length,g.x===e.x&&!0===h.isExpand?((l={}).x=(t.children[0].getLayout().x+t.children[s-1].getLayout().x)/2,l.y=(t.children[0].getLayout().y+t.children[s-1].getLayout().y)/2,(r=Math.atan2(l.y-e.y,l.x-e.x))<0&&(r=2*Math.PI+r),(l=l.x<e.x)&&(r-=Math.PI)):((r=Math.atan2(g.y-e.y,g.x-e.x))<0&&(r=2*Math.PI+r),0===h.children.length||0!==h.children.length&&!1===h.isExpand?(l=g.x<e.x)&&(r-=Math.PI):(l=g.x>e.x)||(r-=Math.PI)),u.setStyle({textPosition:l?"left":"right",textRotation:-r,textOrigin:"center",verticalAlign:"middle"})),h.parentNode&&h.parentNode!==c&&(G(t=(t=n.__edge)||(n.__edge=new Cr({shape:S0(a,p,p),style:C({opacity:0,strokeNoScale:!0},a.lineStyle)})),{shape:S0(a,d,g),style:{opacity:1}},o),i.add(t))}function b0(t,e,n,i,o,a){for(var r,s=t.tree.getNodeByDataIndex(e),l=t.tree.root,u=s.getModel(),h=(a=_0(s,u,a),s.parentNode!==l&&s.parentNode||s);null==(r=h.getLayout());)h=h.parentNode!==l&&h.parentNode||h;G(n,{position:[r.x+1,r.y+1]},o,function(){i.remove(n),t.setItemGraphicEl(e,null)}),n.fadeOut(null,{keepLabel:!0});var c=n.__edge;c&&G(c,{shape:S0(a,r,r),style:{opacity:0}},o,function(){i.remove(c)})}function S0(t,e,n){var i,o,a,r,s,l,u,h,c,d,p,g,f=t.orient;return"radial"===t.layout?(s=e.rawX,l=e.rawY,u=n.rawX,h=n.rawY,c=qm(s,l),d=qm(s,l+(h-l)*t.curvature),p=qm(u,h+(l-h)*t.curvature),g=qm(u,h),{x1:c.x,y1:c.y,x2:g.x,y2:g.y,cpx1:d.x,cpy1:d.y,cpx2:p.x,cpy2:p.y}):(s=e.x,l=e.y,u=n.x,h=n.y,"LR"!==f&&"RL"!==f||(i=s+(u-s)*t.curvature,o=l,a=u+(s-u)*t.curvature,r=h),"TB"!==f&&"BT"!==f||(i=s,o=l+(h-l)*t.curvature,a=u,r=h+(l-h)*t.curvature),{x1:s,y1:l,x2:u,y2:h,cpx1:i,cpy1:o,cpx2:a,cpy2:r})}function M0(t,e,n){var i,o=t.getZoom(),a=t.getCenter(),r=e.zoom,s=t.dataToPoint(a);return null!=e.dx&&null!=e.dy&&(s[0]-=e.dx,s[1]-=e.dy,a=t.pointToData(s),t.setCenter(a)),null!=r&&(n&&(i=n.min||0,n=n.max||1/0,r=Math.max(Math.min(o*r,n),i)/o),t.scale[0]*=r,t.scale[1]*=r,n=t.position,i=(e.originX-n[0])*(r-1),e=(e.originY-n[1])*(r-1),n[0]-=i,n[1]-=e,t.updateTransform(),a=t.pointToData(s),t.setCenter(a),t.setZoom(r*o)),{center:t.getCenter(),zoom:t.getZoom()}}function I0(t,e){for(var n,i=[t];n=i.pop();)if(e(n),n.isExpand){var o=n.children;if(o.length)for(var a=o.length-1;0<=a;a--)i.push(o[a])}}function T0(t,e,n){if(t&&0<=S(e,t.type))return e=n.getData().tree.root,(n="string"==typeof(n=t.targetNode)?e.getNodeById(n):n)&&e.contains(n)||null!=(t=t.targetNodeId)&&(n=e.getNodeById(t))?{node:n}:void 0}function A0(t){for(var e=[];t;)(t=t.parentNode)&&e.push(t);return e.reverse()}function D0(t,e){return 0<=S(A0(t),e)}function C0(t,e){for(var n=[];t;){var i=t.dataIndex;n.push({name:t.name,dataIndex:i,value:e.getRawValue(i)}),t=t.parentNode}return n.reverse(),n}ld({type:"tree",init:function(t,e){this._oldTree,this._mainGroup=new R,this._controller=new l0(e.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},render:function(i,t,n,e){var o=i.getData(),a=i.layoutInfo,r=this._mainGroup,s=i.get("layout"),l=("radial"===s?r.attr("position",[a.x+a.width/2,a.y+a.height/2]):r.attr("position",[a.x,a.y]),this._updateViewCoordSys(i),this._updateController(i,t,n),this._data),u={expandAndCollapse:i.get("expandAndCollapse"),layout:s,orient:i.getOrient(),curvature:i.get("lineStyle.curveness"),symbolRotate:i.get("symbolRotate"),symbolOffset:i.get("symbolOffset"),hoverAnimation:i.get("hoverAnimation"),useNameLabel:!0,fadeIn:!0};o.diff(l).add(function(t){x0(o,t)&&w0(o,t,null,r,i,u)}).update(function(t,e){var n=l.getItemGraphicEl(e);x0(o,t)?w0(o,t,n,r,i,u):n&&b0(l,e,n,r,i,u)}).remove(function(t){var e=l.getItemGraphicEl(t);e&&b0(l,t,e,r,i,u)}).execute(),this._nodeScaleRatio=i.get("nodeScaleRatio"),this._updateNodeAndLinkScale(i),!0===u.expandAndCollapse&&o.eachItemGraphicEl(function(t,e){t.off("click").on("click",function(){n.dispatchAction({type:"treeExpandAndCollapse",seriesId:i.id,dataIndex:e})})}),this._data=o},_updateViewCoordSys:function(t){var e=t.getData(),n=[],i=(e.each(function(t){t=e.getItemLayout(t);!t||isNaN(t.x)||isNaN(t.y)||n.push([+t.x,+t.y])}),[]),o=[],a=(pa(n,i,o),o[0]-i[0]==0&&(o[0]+=1,--i[0]),o[1]-i[1]==0&&(o[1]+=1,--i[1]),t.coordinateSystem=new e0);a.zoomLimit=t.get("scaleLimit"),a.setBoundingRect(i[0],i[1],o[0]-i[0],o[1]-i[1]),a.setCenter(t.get("center")),a.setZoom(t.get("zoom")),this.group.attr({position:a.position,scale:a.scale}),this._viewCoordSys=a},_updateController:function(o,t,a){var e=this._controller,n=this._controllerHost,r=this.group;e.setPointerChecker(function(t,e,n){var i=r.getBoundingRect();return i.applyTransform(r.transform),i.contain(e,n)&&!v0(t,a,o)}),e.enable(o.get("roam")),n.zoomLimit=o.get("scaleLimit"),n.zoom=o.coordinateSystem.getZoom(),e.off("pan").off("zoom").on("pan",function(t){i0(n,t.dx,t.dy),a.dispatchAction({seriesId:o.id,type:"treeRoam",dx:t.dx,dy:t.dy})},this).on("zoom",function(t){o0(n,t.scale,t.originX,t.originY),a.dispatchAction({seriesId:o.id,type:"treeRoam",zoom:t.scale,originX:t.originX,originY:t.originY}),this._updateNodeAndLinkScale(o)},this)},_updateNodeAndLinkScale:function(t){var e=t.getData(),t=this._getNodeGlobalScale(t),n=[t,t];e.eachItemGraphicEl(function(t,e){t.attr("scale",n)})},_getNodeGlobalScale:function(t){var e,n,t=t.coordinateSystem;return"view"!==t.type?1:(e=this._nodeScaleRatio,n=(n=t.scale)&&n[0]||1,((t.getZoom()-1)*e+1)/n)},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={}},remove:function(){this._mainGroup.removeAll(),this._data=null}}),s({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(n,t){t.eachComponent({mainType:"series",subType:"tree",query:n},function(t){var e=n.dataIndex,t=t.getData().tree.getNodeByDataIndex(e);t.isExpand=!t.isExpand})}),s({type:"treeRoam",event:"treeRoam",update:"none"},function(n,t){t.eachComponent({mainType:"series",subType:"tree",query:n},function(t){var e=M0(t.coordinateSystem,n);t.setCenter&&t.setCenter(e.center),t.setZoom&&t.setZoom(e.zoom)})}),nd(Yf("tree","circle")),ed(function(t,C){t.eachSeriesByType("tree",function(t){var e=function(t,e){return yl(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e=C),n=(t.layoutInfo=e,t.get("layout")),i=0,o=0,a=null;a="radial"===n?(i=2*Math.PI,o=Math.min(e.height,e.width)/2,jm(function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth})):(i=e.width,o=e.height,jm());var r,s,l,u,h,c,d,p,g,f=(e=t.getData().tree.root).children[0];if(f){var m=e;m.hierNode={defaultAncestor:null,ancestor:m,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var y,v,x=[m];y=x.pop();)if(v=y.children,y.isExpand&&v.length)for(var _=v.length-1;0<=_;_--){var w=v[_];w.hierNode={defaultAncestor:null,ancestor:w,prelim:0,modifier:0,change:0,shift:0,i:_,thread:null},x.push(w)}for(var b,S=Ym,M=a,I=[f],T=[];b=I.pop();)if(T.push(b),b.isExpand){var A=b.children;if(A.length)for(var D=0;D<A.length;D++)I.push(A[D])}for(;b=T.pop();)S(b,M);e.hierNode.modifier=-f.hierNode.prelim,I0(f,Um),I0(l=s=r=f,function(t){var e=t.getLayout().x;e<r.getLayout().x&&(r=t),e>s.getLayout().x&&(s=t),t.depth>l.depth&&(l=t)}),e=r===s?1:a(r,s)/2,u=e-r.getLayout().x,p=d=c=h=0,"radial"===n?(h=i/(s.getLayout().x+e+u),c=o/(l.depth-1||1),I0(f,function(t){d=(t.getLayout().x+u)*h,p=(t.depth-1)*c;var e=qm(d,p);t.setLayout({x:e.x,y:e.y,rawX:d,rawY:p},!0)})):"RL"===(g=t.getOrient())||"LR"===g?(c=o/(s.getLayout().x+e+u),h=i/(l.depth-1||1),I0(f,function(t){p=(t.getLayout().x+u)*c,d="LR"===g?(t.depth-1)*h:i-(t.depth-1)*h,t.setLayout({x:d,y:p},!0)})):"TB"!==g&&"BT"!==g||(h=i/(s.getLayout().x+e+u),c=o/(l.depth-1||1),I0(f,function(t){d=(t.getLayout().x+u)*h,p="TB"===g?(t.depth-1)*c:o-(t.depth-1)*c,t.setLayout({x:d,y:p},!0)}))}})}),Ku.extend({type:"series.treemap",layoutMode:"box",dependencies:["grid","polar"],_viewRoot:null,defaultOption:{progressive:0,hoverLayerThreshold:1/0,left:"center",top:"middle",right:null,bottom:null,width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"โ–ถ",zoomToNodeRatio:.1024,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",borderColor:"rgba(255,255,255,0.7)",borderWidth:1,shadowColor:"rgba(150,150,150,1)",shadowBlur:3,shadowOffsetX:0,shadowOffsetY:0,textStyle:{color:"#fff"}},emphasis:{textStyle:{}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",ellipsis:!0},upperLabel:{show:!1,position:[0,"50%"],height:20,color:"#fff",ellipsis:!0,verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],color:"#fff",ellipsis:!0,verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},getInitialData:function(t,e){var n={name:t.name,children:t.data},i=(!function e(t){var n=0;Z(t.children,function(t){e(t);t=t.value;D(t)&&(t=t[0]),n+=t});var i=t.value;D(i)&&(i=i[0]),null!=i&&!isNaN(i)||(i=n),i<0&&(i=0),D(t.value)?t.value[0]=i:t.value=i}(n),t.levels||[]),i=t.levels=function(t,e){var n,e=e.get("color");if(e)return Z(t=t||[],function(t){var t=new w(t),e=t.get("color");(t.get("itemStyle.color")||e&&"none"!==e)&&(n=!0)}),n||((t[0]||(t[0]={})).color=e.slice()),t}(i,e),t={};return t.levels=i,Xm.createTree(n,this,t).data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(t){var e=this.getData(),n=this.getRawValue(t),n=D(n)?$s(n[0]):$s(n);return nl(e.getName(t)+": "+n)},getDataParams:function(t){var e=Ku.prototype.getDataParams.apply(this,arguments),t=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=C0(t,this),e},setLayoutInfo:function(t){this.layoutInfo=this.layoutInfo||{},O(this.layoutInfo,t)},mapIdToIndex:function(t){var e=this._idIndexMap,n=(e||(e=this._idIndexMap=E(),this._idIndexMapCount=0),e.get(t));return null==n&&e.set(t,n=this._idIndexMapCount++),n},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)}});function L0(t){this.group=new R,t.add(this.group)}L0.prototype={constructor:L0,render:function(t,e,n,i){var o,a,r=t.getModel("breadcrumb"),s=this.group;s.removeAll(),r.get("show")&&n&&(a=(o=r.getModel("itemStyle")).getModel("textStyle"),e={pos:{left:r.get("left"),right:r.get("right"),top:r.get("top"),bottom:r.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:r.get("emptyItemWidth"),totalWidth:0,renderList:[]},this._prepare(n,e,a),this._renderContent(t,e,o,a,i),vl(s,e.pos,e.box))},_prepare:function(t,e,n){for(var i=t;i;i=i.parentNode){var o=i.getModel().get("name"),a=n.getTextRect(o),a=Math.max(a.width+16,e.emptyItemWidth);e.totalWidth+=a+8,e.renderList.push({node:i,text:o,width:a})}},_renderContent:function(t,e,n,i,o){for(var a,r,s,l,u,h,c,d,p,g,f,m,y,v=0,x=e.emptyItemWidth,_=t.get("breadcrumb.height"),w=(h=e.pos,c=e.box,p=c.width,c=c.height,g=F(h.x,p),f=F(h.y,c),m=F(h.x2,p),y=F(h.y2,c),(isNaN(g)||isNaN(parseFloat(h.x)))&&(g=0),(isNaN(m)||isNaN(parseFloat(h.x2)))&&(m=p),(isNaN(f)||isNaN(parseFloat(h.y)))&&(f=0),(isNaN(y)||isNaN(parseFloat(h.y2)))&&(y=c),d=Qs(d||0),{width:Math.max(m-g-d[1]-d[3],0),height:Math.max(y-f-d[0]-d[2],0)}),b=e.totalWidth,S=e.renderList,M=S.length-1;0<=M;M--){var I=S[M],T=I.node,A=I.width,I=I.text,D=(w.width<b&&(b-=A-x,A=x,I=null),new yr({shape:{points:(a=v,r=0,D=A,s=_,l=M===S.length-1,u=void 0,u=[[l?a:a-5,r],[a+D,r],[a+D,r+s],[l?a:a-5,r+s]],0===M||u.splice(2,0,[a+D+5,r+s/2]),l||u.push([a,r+s/2]),u)},style:C(n.getItemStyle(),{lineJoin:"bevel",text:I,textFill:i.getTextColor(),textFont:i.getFont()}),z:10,onclick:L(o,T)}));this.group.add(D),l=t,a=T,D.eventData={componentType:"series",componentSubType:"treemap",componentIndex:l.componentIndex,seriesIndex:l.componentIndex,seriesName:l.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:a&&a.dataIndex,name:a&&a.name},treePathInfo:a&&C0(a,l)},v+=A+8}},remove:function(){this.group.removeAll()}};function k0(t){return(t=F0(t)).stroke=t.fill=t.lineWidth=null,t}var P0=A,N0=R,O0=V,E0=Z,z0=["label"],R0=["emphasis","label"],B0=["upperLabel"],V0=["emphasis","upperLabel"],G0=10,F0=zo([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]);function W0(){return{nodeGroup:[],background:[],content:[]}}function H0(h,l,u,c,d,n,p,t,e,i){if(p){var g=p.getLayout();if(g&&g.isInView){var o=g.width,a=g.height,r=g.borderWidth,f=g.invisible,m=p.getRawIndex(),y=t&&t.getRawIndex(),t=p.viewChildren,s=g.upperHeight,t=t&&t.length,v=p.getModel("itemStyle"),x=p.getModel("emphasis.itemStyle"),_=P("nodeGroup",N0);if(_)return e.add(_),_.attr("position",[g.x||0,g.y||0]),_.__tmNodeWidth=o,_.__tmNodeHeight=a,g.isAboveViewRoot||((e=P("background",O0,i,1))&&(I=_,T=e,A=t&&g.upperHeight,T.dataIndex=p.dataIndex,T.seriesIndex=h.seriesIndex,T.setShape({x:0,y:0,width:o,height:a}),D=p.getVisual("borderColor",!0),C=x.get("borderColor"),L(T,function(){var t,e=k0(v),n=(e.fill=D,F0(x));n.fill=C,A?k(e,n,D,t=o-2*r,s,{x:r,y:0,width:t,height:s}):e.text=n.text=null,T.setStyle(e),ss(T,n)}),I.add(T)),t||(e=P("content",O0,i,2))&&(I=_,(w=e).dataIndex=p.dataIndex,w.seriesIndex=h.seriesIndex,b=Math.max(o-2*r,0),S=Math.max(a-2*r,0),w.culling=!0,w.setShape({x:r,y:r,width:b,height:S}),M=p.getVisual("color",!0),L(w,function(){var t=k0(v),e=(t.fill=M,F0(x));k(t,e,M,b,S),w.setStyle(t),ss(w,e)}),I.add(w))),_}}var w,b,S,M,I,T,A,D,C;function L(t,e){f?t.invisible||n.push(t):(e(),t.__tmWillVisible||(t.invisible=!1))}function k(t,e,n,i,o,a){var r=p.getModel(),s=rt(h.getFormattedLabel(p.dataIndex,"normal",null,null,a?"upperLabel":"label"),r.get("name")),l=(!a&&g.isLeafRoot&&(s=(l=h.get("drillDownIcon",!0))?l+" "+s:s),r.getModel(a?B0:z0)),r=r.getModel(a?V0:R0),u=l.getShallow("show");us(t,e,l,r,{defaultText:u?s:null,autoColor:n,isRectText:!0}),a&&(t.textRect=N(a)),t.truncate=u&&l.get("ellipsis")?{outerWidth:i,outerHeight:o,minChar:2}:null}function P(t,e,n,i){var o,a,r=null!=y&&u[t][y],s=d[t];return r?(u[t][y]=null,o=r,a=t,(s[m]={}).old="nodeGroup"===a?o.position.slice():O({},o.shape)):f||((r=new e({z:function(t,e){t=t*G0+e;return(t-1)/t}(n,i)})).__tmDepth=n,r.__tmStorageName=t,a=t,o=s[m]={},!(e=p.parentNode)||c&&"drillDown"!==c.direction||(n=i=0,e=d.background[e.getRawIndex()],!c&&e&&e.old&&(i=e.old.width,n=e.old.height),o.old="nodeGroup"===a?[0,n]:{x:i,y:n,width:0,height:0}),o.fadein="nodeGroup"!==a),l[t][m]=r}}ld({type:"treemap",init:function(t,e){this._containerGroup,this._storage=W0(),this._oldTree,this._breadcrumb,this._controller,this._state="ready"},render:function(t,e,n,i){var o,a,r,s;S(e.findComponents({mainType:"series",subType:"treemap",query:i}),t)<0||(this.seriesModel=t,this.api=n,this.ecModel=e,e=T0(i,["treemapZoomToNode","treemapRootToNode"],t),o=i&&i.type,s=t.layoutInfo,a=!this._oldTree,r=this._storage,r="treemapRootToNode"===o&&e&&r?{rootNodeGroup:r.nodeGroup[e.node.getRawIndex()],direction:i.direction}:null,i=this._giveContainerGroup(s),s=this._doRender(i,t,r),a||o&&"treemapZoomToNode"!==o&&"treemapRootToNode"!==o?s.renderFinally():this._doAnimation(i,s,t,r),this._resetController(n),this._renderBreadcrumb(t,n,e))},_giveContainerGroup:function(t){var e=this._containerGroup;return e||(e=this._containerGroup=new N0,this._initEvents(e),this.group.add(e)),e.attr("position",[t.x,t.y]),e},_doRender:function(t,e,n){var i,o=e.getData().tree,a=this._oldTree,r=W0(),s=W0(),l=this._storage,u=[],h=L(H0,e,s,l,n,r,u),c=(!function i(o,a,r,s,l){function t(t){return t.getId()}function n(t,e){var t=null!=t?o[t]:null,e=null!=e?a[e]:null,n=h(t,e,r,l);n&&i(t&&t.viewChildren||[],e&&e.viewChildren||[],n,s,l+1)}s?E0(a=o,function(t,e){t.isRemoved()||n(e,e)}):new hd(a,o,t,t).add(n).update(n).remove(L(n,null)).execute()}(o.root?[o.root]:[],a&&a.root?[a.root]:[],t,o===a||!a,0),i=W0(),l&&E0(l,function(t,e){var n=i[e];E0(t,function(t){t&&(n.push(t),t.__tmWillDelete=1)})}),i);return this._oldTree=o,this._storage=s,{lastsForAnimation:r,willDeleteEls:c,renderFinally:function(){E0(c,function(t){E0(t,function(t){t.parent&&t.parent.remove(t)})}),E0(u,function(t){t.invisible=!0,t.dirty()})}}},_doAnimation:function(t,o,e,r){var s,l,u,a,h,c;e.get("animation")&&(s=e.get("animationDurationUpdate"),l=e.get("animationEasing"),h=[],c={},u={add:function(t,e,n,i,o){return T(i)&&(o=i,i=0),!c[t.id]&&(c[t.id]=1,h.push({el:t,target:e,time:n,delay:i,easing:o}),!0)},done:function(t){return a=t,this},start:function(){for(var t=h.length,e=0,n=h.length;e<n;e++){var i=h[e];i.el.animateTo(i.target,i.time,i.delay,i.easing,o)}return this;function o(){--t||(h.length=0,c={},a&&a())}}},E0(o.willDeleteEls,function(t,a){E0(t,function(t,e){var n,i,o;!t.invisible&&(o=t.parent,o=r&&"drillDown"===r.direction?o===r.rootNodeGroup?{shape:{x:0,y:0,width:o.__tmNodeWidth,height:o.__tmNodeHeight},style:{opacity:0}}:{style:{opacity:0}}:(i=n=0,o.__tmWillDelete||(n=o.__tmNodeWidth/2,i=o.__tmNodeHeight/2),"nodeGroup"===a?{position:[n,i],style:{opacity:0}}:{shape:{x:n,y:i,width:0,height:0},style:{opacity:0}}))&&u.add(t,o,s,l)})}),E0(this._storage,function(t,i){E0(t,function(t,e){var e=o.lastsForAnimation[i][e],n={};e&&("nodeGroup"===i?e.old&&(n.position=t.position.slice(),t.attr("position",e.old)):(e.old&&(n.shape=O({},t.shape),t.setShape(e.old)),e.fadein?(t.setStyle("opacity",0),n.style={opacity:1}):1!==t.style.opacity&&(n.style={opacity:1})),u.add(t,n,s,l))})},this),this._state="animating",u.done(P0(function(){this._state="ready",o.renderFinally()},this)).start())},_resetController:function(t){var e=this._controller,i=(e||((e=this._controller=new l0(t.getZr())).enable(this.seriesModel.get("roam")),e.on("pan",P0(this._onPan,this)),e.on("zoom",P0(this._onZoom,this))),new z(0,0,t.getWidth(),t.getHeight()));e.setPointerChecker(function(t,e,n){return i.contain(e,n)})},_clearController:function(){var t=this._controller;t&&t.dispose()},_onPan:function(t){var e;"animating"!==this._state&&(3<Math.abs(t.dx)||3<Math.abs(t.dy))&&(e=this.seriesModel.getData().tree.root)&&(e=e.getLayout())&&this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:e.x+t.dx,y:e.y+t.dy,width:e.width,height:e.height}})},_onZoom:function(t){var e,n,i=t.originX,o=t.originY;"animating"!==this._state&&(e=this.seriesModel.getData().tree.root)&&(e=e.getLayout())&&(e=new z(e.x,e.y,e.width,e.height),i-=(n=this.seriesModel.layoutInfo).x,o-=n.y,ce(n=se(),n,[-i,-o]),pe(n,n,[t.scale,t.scale]),ce(n,n,[i,o]),e.applyTransform(n),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:e.x,y:e.y,width:e.width,height:e.height}}))},_initEvents:function(t){t.on("click",function(t){var e,n;"ready"===this._state&&(e=this.seriesModel.get("nodeClick",!0))&&(t=this.findTarget(t.offsetX,t.offsetY))&&((n=t.node).getLayout().isLeafRoot?this._rootToNode(t):"zoomToNode"===e?this._zoomToNode(t):"link"===e&&(e=(t=n.hostTree.data.getItemModel(n.dataIndex)).get("link",!0),n=t.get("target",!0)||"blank",e)&&window.open(e,n))},this)},_renderBreadcrumb:function(e,t,n){n=(n=n||(null!=e.get("leafDepth",!0)?{node:e.getViewRoot()}:this.findTarget(t.getWidth()/2,t.getHeight()/2)))||{node:e.getData().tree.root},(this._breadcrumb||(this._breadcrumb=new L0(this.group))).render(e,t,n.node,P0(function(t){"animating"!==this._state&&(D0(e.getViewRoot(),t)?this._rootToNode({node:t}):this._zoomToNode({node:t}))},this))},remove:function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=W0(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},dispose:function(){this._clearController()},_zoomToNode:function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},_rootToNode:function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},findTarget:function(i,o){var a;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},function(t){var e=this._storage.background[t.getRawIndex()];if(e){var n=e.transformCoordToLocal(i,o),e=e.shape;if(!(e.x<=n[0]&&n[0]<=e.x+e.width&&e.y<=n[1]&&n[1]<=e.y+e.height))return!1;a={node:t,offsetX:n[0],offsetY:n[1]}}},this),a}});for(var Z0=function(){},X0=["treemapZoomToNode","treemapRender","treemapMove"],Y0=0;Y0<X0.length;Y0++)s({type:X0[Y0],update:"updateView"},Z0);s({type:"treemapRootToNode",update:"updateView"},function(o,t){t.eachComponent({mainType:"series",subType:"treemap",query:o},function(t,e){var n,i=T0(o,["treemapZoomToNode","treemapRootToNode"],t);i&&((n=t.getViewRoot())&&(o.direction=D0(n,i.node)?"rollUp":"drillDown"),t.resetViewRoot(i.node))})});var U0=Z,j0=k,q0=-1,M=function(t){var n,i,e=t.mappingMethod,o=t.type,t=this.option=N(t),o=(this.type=o,this.mappingMethod=e,this._normalizeData=ry[e],K0[o]);if(this.applyVisual=o.applyVisual,this.getColorMapper=o.getColorMapper,this._doMap=o._doMap[e],"piecewise"===e)$0(t),o=(i=t).pieceList,i.hasSpecialVisual=!1,Z(o,function(t,e){t.originIndex=e,null!=t.visual&&(i.hasSpecialVisual=!0)});else if("category"===e)if(t.categories){var a=(o=t).categories,r=o.visual,s=o.categoryMap={};U0(a,function(t,e){s[t]=e}),D(r)||(n=[],k(r)?U0(r,function(t,e){e=s[e];n[null!=e?e:q0]=t}):n[q0]=r,r=ay(o,n));for(var l=a.length-1;0<=l;l--)null==r[l]&&(delete s[a[l]],a.pop())}else $0(t,!0);else P("linear"!==e||t.dataExtent),$0(t)},K0=(M.prototype={constructor:M,mapValueToVisual:function(t){var e=this._normalizeData(t);return this._doMap(e,t)},getNormalizer:function(){return A(this._normalizeData,this)}},M.visualHandlers={color:{applyVisual:ty("color"),getColorMapper:function(){var o=this.option;return A("category"===o.mappingMethod?function(t,e){return e||(t=this._normalizeData(t)),ey.call(this,t)}:function(t,e,n){var i=!!n;return n=Ye(t=e?t:this._normalizeData(t),o.parsedVisual,n),i?n:Ke(n,"rgba")},this)},_doMap:{linear:function(t){return Ke(Ye(t,this.option.parsedVisual),"rgba")},category:ey,piecewise:function(t,e){e=oy.call(this,e);return e=null==e?Ke(Ye(t,this.option.parsedVisual),"rgba"):e},fixed:ny}},colorHue:J0(function(t,e){return je(t,e)}),colorSaturation:J0(function(t,e){return je(t,null,e)}),colorLightness:J0(function(t,e){return je(t,null,null,e)}),colorAlpha:J0(qe),opacity:{applyVisual:ty("opacity"),_doMap:iy([0,1])},liftZ:{applyVisual:ty("liftZ"),_doMap:{linear:ny,category:ny,piecewise:ny,fixed:ny}},symbol:{applyVisual:function(t,e,n){var i=this.mapValueToVisual(t);if(T(i))n("symbol",i);else if(j0(i))for(var o in i)i.hasOwnProperty(o)&&n(o,i[o])},_doMap:{linear:Q0,category:ey,piecewise:function(t,e){e=oy.call(this,e);return e=null==e?Q0.call(this,t):e},fixed:ny}},symbolSize:{applyVisual:ty("symbolSize"),_doMap:iy([0,1])}});function $0(t,e){var n=t.visual,i=[];k(n)?U0(n,function(t){i.push(t)}):null!=n&&i.push(n),e||1!==i.length||{color:1,symbol:1}.hasOwnProperty(t.type)||(i[1]=i[0]),ay(t,i)}function J0(i){return{applyVisual:function(t,e,n){t=this.mapValueToVisual(t),n("color",i(e("color"),t))},_doMap:iy([0,1])}}function Q0(t){var e=this.option.visual;return e[Math.round(Os(t,[0,1],[0,e.length-1],!0))]||{}}function ty(i){return function(t,e,n){n(i,this.mapValueToVisual(t))}}function ey(t){var e=this.option.visual;return e[this.option.loop&&t!==q0?t%e.length:t]}function ny(){return this.option.visual[0]}function iy(n){return{linear:function(t){return Os(t,n,this.option.visual,!0)},category:ey,piecewise:function(t,e){e=oy.call(this,e);return e=null==e?Os(t,n,this.option.visual,!0):e},fixed:ny}}function oy(t){var e=this.option,n=e.pieceList;if(e.hasSpecialVisual){e=n[M.findPieceIndex(t,n)];if(e&&e.visual)return e.visual[this.type]}}function ay(t,e){return t.visual=e,"color"===t.type&&(t.parsedVisual=I(e,function(t){return We(t)})),e}var ry={linear:function(t){return Os(t,this.option.dataExtent,[0,1],!0)},piecewise:function(t){var e=this.option.pieceList,t=M.findPieceIndex(t,e,!0);if(null!=t)return Os(t,[0,e.length-1],[0,1],!0)},category:function(t){t=this.option.categories?this.option.categoryMap[t]:t;return null==t?q0:t},fixed:yt};function sy(t,e,n){return t?e<=n:e<n}M.listVisualTypes=function(){var n=[];return Z(K0,function(t,e){n.push(e)}),n},M.addVisualHandler=function(t,e){K0[t]=e},M.isValidType=function(t){return K0.hasOwnProperty(t)},M.eachVisual=function(t,e,n){k(t)?Z(t,e,n):e.call(n,t)},M.mapVisual=function(t,n,i){var o,a=D(t)?[]:k(t)?{}:(o=!0,null);return M.eachVisual(t,function(t,e){t=n.call(i,t,e);o?a=t:a[e]=t}),a},M.retrieveVisuals=function(n){var i,o={};return n&&U0(K0,function(t,e){n.hasOwnProperty(e)&&(o[e]=n[e],i=!0)}),i?o:null},M.prepareVisualTypes=function(t){if(j0(t)){var n=[];U0(t,function(t,e){n.push(e)}),t=n}else{if(!D(t))return[];t=t.slice()}return t.sort(function(t,e){return"color"===e&&"color"!==t&&0===t.indexOf("color")?1:-1}),t},M.dependsOn=function(t,e){return"color"===e?!(!t||0!==t.indexOf(e)):t===e},M.findPieceIndex=function(n,t,e){for(var i,o=1/0,a=0,r=t.length;a<r;a++){var s=t[a].value;if(null!=s){if(s===n||"string"==typeof s&&s===n+"")return a;e&&h(s,a)}}for(a=0,r=t.length;a<r;a++){var l=t[a],u=l.interval,l=l.close;if(u){if(u[0]===-1/0){if(sy(l[1],n,u[1]))return a}else if(u[1]===1/0){if(sy(l[0],u[0],n))return a}else if(sy(l[0],u[0],n)&&sy(l[1],n,u[1]))return a;e&&h(u[0],a),e&&h(u[1],a)}}if(e)return n===1/0?t.length-1:n===-1/0?0:i;function h(t,e){t=Math.abs(t-n);t<o&&(o=t,i=e)}};var ly=D,uy="itemStyle";function hy(n,i,o,a){var r=O({},i);return Z(["color","colorAlpha","colorSaturation"],function(t){var e=n.get(t,!0);null!=(e=null==(e=null==(e=null==e&&o?o[t]:e)?i[t]:e)?a.get(t):e)&&(r[t]=e)}),r}function cy(t){var e,n=py(t,"color");if(n)return e=py(t,"colorAlpha"),(t=py(t,"colorSaturation"))&&(n=je(n,null,null,t)),e?qe(n,e):n}function dy(t,e){return null!=e?je(e,null,null,t):null}function py(t,e){t=t[e];if(null!=t&&"none"!==t)return t}function gy(t,e,n,i,o,a){if(a&&a.length){var r,a=fy(e,"color")||null!=o.color&&"none"!==o.color&&(fy(e,"colorAlpha")||fy(e,"colorSaturation"));if(a)return o=e.get("visualMin"),r=e.get("visualMax"),n=n.dataExtent.slice(),null!=o&&o<n[0]&&(n[0]=o),null!=r&&r>n[1]&&(n[1]=r),o=e.get("colorMappingBy"),"color"!==(r={type:a.name,dataExtent:n,visual:a.range}).type||"index"!==o&&"id"!==o?r.mappingMethod="linear":(r.mappingMethod="category",r.loop=!0),(e=new M(r)).__drColorMappingBy=o,e}}function fy(t,e){t=t.get(e);return ly(t)&&t.length?{name:e,range:t}:null}function my(t,e,n,i,o,a){var r,s,e=O({},e);return o&&(i="index"===(s="color"===(r=o.type)&&o.__drColorMappingBy)?i:"id"===s?a.mapIdToIndex(n.getId()):n.getValue(t.get("visualDimension")),e[r]=o.mapValueToVisual(i)),e}var yy=Math.max,vy=Math.min,xy=rt,_y=Z,wy=["itemStyle","borderWidth"],by=["itemStyle","gapWidth"],Sy=["upperLabel","show"],My=["upperLabel","height"],c={seriesType:"treemap",reset:function(t,e,n,i){var o,a=n.getWidth(),r=n.getHeight(),s=t.option,n=yl(t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()}),l=s.size||[],u=F(xy(n.width,l[0]),a),l=F(xy(n.height,l[1]),r),h=i&&i.type,c=T0(i,["treemapZoomToNode","treemapRootToNode"],t),i="treemapRender"===h||"treemapMove"===h?i.rootRect:null,d=t.getViewRoot(),p=A0(d),u=("treemapMove"!==h&&(h="treemapZoomToNode"===h?function(t,e,n,i,o){var a,r=(e||{}).node,s=[i,o];if(!r||r===n)return s;for(var e=i*o,l=e*t.option.zoomToNodeRatio;a=r.parentNode;){for(var u=0,h=a.children,c=0,d=h.length;c<d;c++)u+=h[c].getValue();var p=r.getValue();if(0===p)return s;l*=u/p;var p=a.getModel(),g=p.get(wy);(l+=4*g*g+(3*g+Math.max(g,Dy(p)))*Math.pow(l,.5))>Fs&&(l=Fs),r=a}l<e&&(l=e);n=Math.pow(l/e,.5);return[i*n,o*n]}(t,c,d,u,l):i?[i.width,i.height]:[u,l],u=s.sort,l={squareRatio:s.squareRatio,sort:u=u&&"asc"!==u&&"desc"!==u?"desc":u,leafDepth:s.leafDepth},d.hostTree.clearLayouts(),o={x:0,y:0,width:h[0],height:h[1],area:h[0]*h[1]},d.setLayout(o),function t(e,n,i,o){var a;if(!e.isRemoved()){var r=e.getLayout(),s=(a=r.width,r=r.height,(p=e.getModel()).get(wy)),l=p.get(by)/2,u=Dy(p),h=Math.max(s,u),c=s-l,d=h-l,p=e.getModel(),s=(e.setLayout({borderWidth:s,upperHeight:h,upperLabelHeight:u},!0),(a=yy(a-2*c,0))*(r=yy(r-c-d,0))),g=Iy(e,p,s,n,i,o);if(g.length){for(var f={x:c,y:d,width:a,height:r},m=vy(a,r),y=1/0,v=[],x=v.area=0,_=g.length;x<_;){var w=g[x],w=(v.push(w),v.area+=w.getLayout().area,Ty(v,m,n.squareRatio));y=w<=y?(x++,w):(v.area-=v.pop().getLayout().area,Ay(v,m,f,l,!1),m=vy(f.width,f.height),1/(v.length=v.area=0))}for(v.length&&Ay(v,m,f,l,!0),i||null!=(h=p.get("childrenVisibleMin"))&&s<h&&(i=!0),x=0,_=g.length;x<_;x++)t(g[x],n,i,o+1)}}}(d,l,!1,0),o=d.getLayout(),_y(p,function(t,e){e=(p[e+1]||d).getValue();t.setLayout(O({dataExtent:[e,e],borderWidth:0,upperHeight:0},o))})),t.getData().tree.root);u.setLayout(function(t,e,n){if(e)return{x:e.x,y:e.y};e={x:0,y:0};if(!n)return e;var n=n.node,i=n.getLayout();if(!i)return e;for(var o=[i.width/2,i.height/2],a=n;a;){var r=a.getLayout();o[0]+=r.x,o[1]+=r.y,a=a.parentNode}return{x:t.width/2-o[0],y:t.height/2-o[1]}}(n,i,c),!0),t.setLayoutInfo(n),function e(t,n,i,o,a){var r=t.getLayout(),s=i[a],l=s&&s===t;{var u;s&&!l||a===i.length&&t!==o||(t.setLayout({isInView:!0,invisible:!l&&!n.intersect(r),isAboveViewRoot:l},!0),u=new z(n.x-r.x,n.y-r.y,n.width,n.height),_y(t.viewChildren||[],function(t){e(t,u,i,o,a+1)}))}}(u,new z(-n.x,-n.y,a,r),p,d,0)}};function Iy(t,e,n,i,o,a){var r,s=t.children||[],l=i.sort,i=("asc"!==l&&"desc"!==l&&(l=null),null!=i.leafDepth&&i.leafDepth<=a);if(o&&!i)return t.viewChildren=[];a=s=tt(s,function(t){return!t.isRemoved()}),(r=l)&&a.sort(function(t,e){var n="asc"===r?t.getValue()-e.getValue():e.getValue()-t.getValue();return 0==n?"asc"===r?t.dataIndex-e.dataIndex:e.dataIndex-t.dataIndex:n});var u=function(t,e,n){for(var i=0,o=0,a=e.length;o<a;o++)i+=e[o].getValue();var r=t.get("visualDimension");{var s;e&&e.length?"value"===r&&n?(s=[e[e.length-1].getValue(),e[0].getValue()],"asc"===n&&s.reverse()):(s=[1/0,-1/0],_y(e,function(t){t=t.getValue(r);t<s[0]&&(s[0]=t),t>s[1]&&(s[1]=t)})):s=[NaN,NaN]}return{sum:i,dataExtent:s}}(e,s,l);if(0===u.sum)return t.viewChildren=[];if(u.sum=function(t,e,n,i,o){if(i){for(var a=t.get("visibleMin"),r=o.length,s=r,l=r-1;0<=l;l--){var u=o["asc"===i?r-l-1:l].getValue();u/n*e<a&&(s=l,n-=u)}"asc"===i?o.splice(0,r-s):o.splice(s,r-s)}return n}(e,n,u.sum,l,s),0===u.sum)return t.viewChildren=[];for(var h=0,c=s.length;h<c;h++){var d=s[h].getValue()/u.sum*n;s[h].setLayout({area:d})}return i&&(s.length&&t.setLayout({isLeafRoot:!0},!0),s.length=0),t.viewChildren=s,t.setLayout({dataExtent:u.dataExtent},!0),s}function Ty(t,e,n){for(var i,o=0,a=1/0,r=0,s=t.length;r<s;r++)(i=t[r].getLayout().area)&&(i<a&&(a=i),o<i)&&(o=i);var l=t.area*t.area,e=e*e*n;return l?yy(e*o/l,l/(e*a)):1/0}function Ay(t,e,n,i,o){var a=e===n.width?0:1,r=1-a,s=["x","y"],l=["width","height"],u=n[s[a]],h=e?t.area/e:0;(o||h>n[l[r]])&&(h=n[l[r]]);for(var c=0,d=t.length;c<d;c++){var p=t[c],g={},f=h?p.getLayout().area/h:0,m=g[l[r]]=yy(h-2*i,0),y=n[s[a]]+n[l[a]]-u,y=c===d-1||y<f?y:f,f=g[l[a]]=yy(y-2*i,0);g[s[r]]=n[s[r]]+vy(i,m/2),g[s[a]]=u+vy(i,f/2),u+=y,p.setLayout(g,!0)}n[s[r]]+=h,n[l[r]]-=h}function Dy(t){return t.get(Sy)?t.get(My):0}nd({seriesType:"treemap",reset:function(t,e,n,i){var o=t.getData().tree,a=o.root,r=t.getModel(uy);a.isRemoved()||function n(t,e,i,o,a,r){var s=t.getModel(),l=t.getLayout();{var u,h,c,d,p;l&&!l.invisible&&l.isInView&&(h=t.getModel(uy),c=hy(h,e,i[t.depth],o),e=h.get("borderColor"),null!=(d=h.get("borderColorSaturation"))&&(e=dy(d,u=cy(c))),t.setVisual("borderColor",e),(d=t.viewChildren)&&d.length?(p=gy(0,s,l,0,c,d),Z(d,function(t,e){(t.depth>=a.length||t===a[t.depth])&&n(t,my(s,c,t,e,p,r),i,o,a,r)})):(u=cy(c),t.setVisual("color",u)))}}(a,{},I(o.levelModels,function(t){return t?t.get(uy):null}),r,t.getViewRoot().getAncestors(),t)}}),ed(c),Ku.extend({type:"series.sunburst",_viewRoot:null,getInitialData:function(t,e){var n={name:t.name,children:t.data},t=(!function e(t){var n=0;Z(t.children,function(t){e(t);t=t.value;D(t)&&(t=t[0]),n+=t});var i=t.value;D(i)&&(i=i[0]),null!=i&&!isNaN(i)||(i=n),i<0&&(i=0),D(t.value)?t.value[0]=i:t.value=i}(n),t.levels||[]),i={};return i.levels=t,Xm.createTree(n,this,i).data},optionUpdated:function(){this.resetViewRoot()},getDataParams:function(t){var e=Ku.prototype.getDataParams.apply(this,arguments),t=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=C0(t,this),e},defaultOption:{zlevel:0,z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,percentPrecision:2,stillShowZeroSum:!0,highlightPolicy:"descendant",nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0,emphasis:{}},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1,emphasis:{},highlight:{opacity:1},downplay:{opacity:.9}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicOut",data:[],levels:[],sort:"desc"},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)}});var Cy="none",Ly="ancestor",ky="self";function Py(t,e,n){R.call(this);var i=new pr({z2:2}),o=(i.seriesIndex=e.seriesIndex,new B({z2:4,silent:t.getModel("label").get("silent")}));function a(){o.ignore=o.hoverIgnore}function r(){o.ignore=o.normalIgnore}this.add(i),this.add(o),this.updateData(!0,t,"normal",e,n),this.on("emphasis",a).on("normal",r).on("mouseover",a).on("mouseout",r)}h=Py.prototype;h.updateData=function(t,e,n,i,o){(this.node=e).piece=this,i=i||this._seriesModel,o=o||this._ecModel;var a=this.childAt(0),r=(a.dataIndex=e.dataIndex,e.getModel()),s=e.getLayout(),l=O({},s),u=(l.label=null,u=o,d=(h=e).getVisual("color"),(c=h.getVisual("visualMeta"))&&0!==c.length||(d=null),(c=h.getModel("itemStyle").get("color"))||d||(0===h.depth?u.option.color[0]:(d=u.option.color.length,c=u.option.color[function(t){for(var e=t;1<e.depth;)e=e.parentNode;return S(t.getAncestors()[0].children,e)}(h)%d])));h=e,d=u,i.getData().setItemVisual(h.dataIndex,"color",d);var h,c=r.getModel("itemStyle").getItemStyle(),d=(h=C({lineJoin:"bevel",fill:(h="normal"===n?c:f(r.getModel(n+".itemStyle").getItemStyle(),c)).fill||u},h),t?(a.setShape(l),a.shape.r=s.r0,G(a,{shape:{r:s.r}},i,e.dataIndex),a.useStyle(h)):"object"==typeof h.fill&&h.fill.type||"object"==typeof a.style.fill&&a.style.fill.type?(G(a,{shape:l},i),a.useStyle(h)):G(a,{shape:l,style:h},i),this._updateLabel(i,u,n),r.getShallow("cursor"));d&&a.attr("cursor",d),t&&(c=i.getShallow("highlightPolicy"),this._initEvents(a,e,i,c)),this._seriesModel=i||this._seriesModel,this._ecModel=o||this._ecModel},h.onEmphasis=function(o){var a=this;this.node.hostTree.root.eachNode(function(t){var e,n,i;t.piece&&(a.node===t?t.piece.updateData(!1,t,"emphasis"):(e=t,n=a.node,(i=o)!==Cy&&(i===ky?e===n:i===Ly?e===n||e.isAncestorOf(n):e===n||e.isDescendantOf(n))?t.piece.childAt(0).trigger("highlight"):o!==Cy&&t.piece.childAt(0).trigger("downplay")))})},h.onNormal=function(){this.node.hostTree.root.eachNode(function(t){t.piece&&t.piece.updateData(!1,t,"normal")})},h.onHighlight=function(){this.updateData(!1,this.node,"highlight")},h.onDownplay=function(){this.updateData(!1,this.node,"downplay")},h._updateLabel=function(t,e,n){var i=this.node.getModel(),o=i.getModel("label"),a="normal"===n||"emphasis"===n?o:i.getModel(n+".label"),n=i.getModel("emphasis.label"),i=rt(t.getFormattedLabel(this.node.dataIndex,"normal",null,null,"label"),this.node.name),t=(!1===d("show")&&(i=""),this.node.getLayout()),r=a.get("minAngle"),s=(r=(r=null==r?o.get("minAngle"):r)/180*Math.PI,t.endAngle-t.startAngle),s=(null!=r&&Math.abs(s)<r&&(i=""),this.childAt(1));us(s.style,s.hoverStyle||{},o,n,{defaultText:a.getShallow("show")?i:null,autoColor:e,useInsideStyle:!0});var l,r=(t.startAngle+t.endAngle)/2,n=Math.cos(r),e=Math.sin(r),u=d("position"),h=d("distance")||0,c=d("align"),u=("outside"===u?(l=t.r+h,c=r>Math.PI/2?"right":"left"):c&&"center"!==c?"left"===c?(l=t.r0+h,r>Math.PI/2&&(c="right")):"right"===c&&(l=t.r-h,r>Math.PI/2)&&(c="left"):(l=(t.r+t.r0)/2,c="center"),s.attr("style",{text:i,textAlign:c,textVerticalAlign:d("verticalAlign")||"middle",opacity:d("opacity")}),l*n+t.cx),h=l*e+t.cy,i=(s.attr("position",[u,h]),d("rotate")),c=0;function d(t){var e=a.get(t);return null==e?o.get(t):e}"radial"===i?(c=-r)<-Math.PI/2&&(c+=Math.PI):"tangential"===i?(c=Math.PI/2-r)>Math.PI/2?c-=Math.PI:c<-Math.PI/2&&(c+=Math.PI):"number"==typeof i&&(c=i*Math.PI/180),s.attr("rotation",c)},h._initEvents=function(t,e,n,i){t.off("mouseover").off("mouseout").off("emphasis").off("normal");function o(){r.onEmphasis(i)}function a(){r.onNormal()}var r=this;n.isAnimationEnabled()&&t.on("mouseover",o).on("mouseout",a).on("emphasis",o).on("normal",a).on("downplay",function(){r.onDownplay()}).on("highlight",function(){r.onHighlight()})},a(Py,R);lh.extend({type:"sunburst",init:function(){},render:function(n,i,t,e){var o,a,r,s=this,l=(this.seriesModel=n,this.api=t,this.ecModel=i,n.getData()),u=l.tree.root,t=n.getViewRoot(),h=this.group,c=n.get("renderLabelForZeroData"),d=[],p=(t.eachNode(function(t){d.push(t)}),this._oldChildren||[]);function g(t){return t.getId()}function f(t,e){t=null==t?null:a[t],e=null==e?null:r[e],(t=c||!t||t.getValue()?t:null)!==u&&e!==u&&(e&&e.piece?t?(e.piece.updateData(!1,t,"normal",n,i),l.setItemGraphicEl(t.dataIndex,e.piece)):(e=e)&&e.piece&&(h.remove(e.piece),e.piece=null):t&&(e=new Py(t,n,i),h.add(e),l.setItemGraphicEl(t.dataIndex,e)))}r=p,0===(a=d).length&&0===r.length||new hd(r,a,g,g).add(f).update(f).remove(L(f,null)).execute(),p=u,0<(o=t).depth?(s.virtualPiece?s.virtualPiece.updateData(!1,p,"normal",n,i):(s.virtualPiece=new Py(p,n,i),h.add(s.virtualPiece)),o.piece._onclickEvent&&o.piece.off("click",o.piece._onclickEvent),o.piece._onclickEvent=p=function(t){s._rootToNode(o.parentNode)},s.virtualPiece.on("click",p)):s.virtualPiece&&(h.remove(s.virtualPiece),s.virtualPiece=null),e&&e.highlight&&e.highlight.piece?(t=n.getShallow("highlightPolicy"),e.highlight.piece.onEmphasis(t)):e&&e.unhighlight&&(p=!(p=this.virtualPiece)&&u.children.length?u.children[0].piece:p)&&p.onNormal(),this._initEvents(),this._oldChildren=d},dispose:function(){},_initEvents:function(){function t(n){var i=!1;o.seriesModel.getViewRoot().eachNode(function(t){var e;!i&&t.piece&&t.piece.childAt(0)===n.target&&("rootToNode"===(e=t.getModel().get("nodeClick"))?o._rootToNode(t):"link"===e&&(t=(e=t.getModel()).get("link"))&&(e=e.get("target",!0)||"_blank",window.open(t,e)),i=!0)})}var o=this;this.group._onclickEvent&&this.group.off("click",this.group._onclickEvent),this.group.on("click",t),this.group._onclickEvent=t},_rootToNode:function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:"sunburstRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},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}});var Ny="sunburstRootToNode",Oy=(s({type:Ny,update:"updateView"},function(o,t){t.eachComponent({mainType:"series",subType:"sunburst",query:o},function(t,e){var n,i=T0(o,[Ny],t);i&&((n=t.getViewRoot())&&(o.direction=D0(n,i.node)?"rollUp":"drillDown"),t.resetViewRoot(i.node))})}),"sunburstHighlight"),Ey=(s({type:Oy,update:"updateView"},function(n,t){t.eachComponent({mainType:"series",subType:"sunburst",query:n},function(t,e){t=T0(n,[Oy],t);t&&(n.highlight=t.node)})}),s({type:"sunburstUnhighlight",update:"updateView"},function(n,t){t.eachComponent({mainType:"series",subType:"sunburst",query:n},function(t,e){n.unhighlight=!0})}),Math.PI/180);function zy(t,e){var i;return"function"==typeof e?t.sort(e):(i="asc"===e,t.sort(function(t,e){var n=(t.getValue()-e.getValue())*(i?1:-1);return 0==n?(t.dataIndex-e.dataIndex)*(i?-1:1):n}))}nd(L(nm,"sunburst")),ed(L(function(t,e,r,n){e.eachSeriesByType(t,function(t){var e=t.get("center"),n=t.get("radius"),i=(D(n)||(n=[0,n]),D(e)||(e=[e,e]),r.getWidth()),o=r.getHeight(),l=Math.min(i,o),u=F(e[0],i),h=F(e[1],o),c=F(n[0],l/2),i=F(n[1],l/2),e=-t.get("startAngle")*Ey,d=t.get("minAngle")*Ey,p=t.getData().tree.root,o=t.getViewRoot(),g=o.depth,n=t.get("sort"),a=(null!=n&&function e(t,n){var i=t.children||[];t.children=zy(i,n),i.length&&Z(t.children,function(t){e(t,n)})}(o,n),0),f=(Z(o.children,function(t){isNaN(t.getValue())||a++}),o.getValue()),m=Math.PI/(f||a)*2,y=0<o.depth,n=o.height-(y?-1:1),v=(i-c)/(n||1),x=t.get("clockwise"),_=t.get("stillShowZeroSum"),w=x?1:-1,b=function(t,e){var n,i,o,a,r,s;if(t)return n=e,t!==p&&(i=t.getValue(),n=e+w*(i=(i=0===f&&_?m:i*m)<d?d:i),a=t.depth-g-(y?-1:1),o=c+v*a,a=c+v*(1+a),null!=(r=t.getModel()).get("r0")&&(o=F(r.get("r0"),l/2)),null!=r.get("r")&&(a=F(r.get("r"),l/2)),t.setLayout({angle:i,startAngle:e,endAngle:n,clockwise:x,cx:u,cy:h,r0:o,r:a})),t.children&&t.children.length&&(s=0,Z(t.children,function(t){s+=b(t,e+s)})),n-e};y&&(i=2*Math.PI,p.setLayout({angle:i,startAngle:e,endAngle:e+i,clockwise:x,cx:u,cy:h,r0:c,r:c+v})),b(o,e)})},"sunburst")),Qc(L(lm,"sunburst"));for(var Ry=[126,25],By=[[[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]]],Vy=0;Vy<By.length;Vy++)for(var Gy=0;Gy<By[Vy].length;Gy++)By[Vy][Gy][0]/=10.5,By[Vy][Gy][1]/=-14,By[Vy][Gy][0]+=Ry[0],By[Vy][Gy][1]+=Ry[1];var Fy={"ๅ—ๆตท่ฏธๅฒ›":[32,80],"ๅนฟไธœ":[0,-10],"้ฆ™ๆธฏ":[10,5],"ๆพณ้—จ":[-10,10],"ๅคฉๆดฅ":[5,5]};var Wy={Russia:[100,60],"United States":[-99,38],"United States of America":[-99,38]};var Hy=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];var Zy=_o(),c={load:function(o,t){var e=Zy(t).parsed;if(e)return e;var n,a=t.specialAreas||{},e=t.geoJSON;try{n=e?jp(e):[]}catch(o){throw new Error("Invalid geoJson format\n"+o.message)}return Z(n,function(t){var e,n=t.name,i=(e=t,"china"===(i=o)&&(i=Fy[e.name])&&((e=e.center)[0]+=i[0]/10.5,e[1]+=-i[1]/14),e=t,"world"===(i=o)&&(i=Wy[e.name])&&((e=e.center)[0]=i[0],e[1]=i[1]),e=t,"china"===o&&"ๅฐๆนพ"===e.name&&e.geometries.push({type:"polygon",exterior:Hy[0]}),a[n]);i&&t.transformTo(i.left,i.top,i.width,i.height)}),e=n,"china"===o&&e.push(new Yp("ๅ—ๆตท่ฏธๅฒ›",I(By,function(t){return{type:"polygon",exterior:t}}),Ry)),Zy(t).parsed={regions:n,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}(n)}}};var Xy=_o();function Yy(t,e){var n,i,o,a=t.svgXML;try{P(null!=(n=(s=a&&(i=a,o={ignoreViewBox:!0,ignoreRootClip:!0},(new Xh).parse(i,o))||{}).root))}catch(t){throw new Error("Invalid svg format\n"+t.message)}var a=s.width,r=s.height,s=s.viewBoxRect;return e||(e=null==a||null==r?n.getBoundingRect():new z(0,0,0,0),null!=a&&(e.width=a),null!=r&&(e.height=r)),s&&(a=nc(s,e.width,e.height),r=n,(n=new R).add(r),r.scale=a.scale,r.position=a.position),n.setClipPath(new V({shape:e.plain()})),{root:n,boundingRect:e}}var Uy={geoJSON:c,svg:{load:function(t,e){var n=Xy(e).originRoot;return n?{root:n,boundingRect:Xy(e).boundingRect}:(n=Yy(e),Xy(e).originRoot=n.root,Xy(e).boundingRect=n.boundingRect,n)},makeGraphic:function(t,e,n){var i,o,a=Xy(e),r=a.rootMap||(a.rootMap=E()),s=r.get(n);return s||(i=a.originRoot,o=a.boundingRect,s=a.originRootHostKey?Yy(e,o).root:(a.originRootHostKey=n,i),r.set(n,s))},removeGraphic:function(t,e,n){var e=Xy(e),i=e.rootMap;i&&i.removeKey(n),n===e.originRootHostKey&&(e.originRootHostKey=null)}}},jy={load:function(e,n){var i,o=[],a=E(),r=E();return Z(Ky(e),function(t){t=Uy[t.type].load(e,t),Z(t.regions,function(t){var e=t.name;n&&n.hasOwnProperty(e)&&(t=t.cloneShallow(e=n[e])),o.push(t),a.set(e,t),r.set(e,t.center)}),t=t.boundingRect;t&&(i?i.union(t):i=t.clone())}),{regions:o,regionsMap:a,nameCoordMap:r,boundingRect:i||new z(0,0,0,0)}},makeGraphic:qy("makeGraphic"),removeGraphic:qy("removeGraphic")};function qy(a){return function(n,i){var t=Ky(n),o=[];return Z(t,function(t){var e=Uy[t.type][a];e&&o.push(e(n,t,i))}),o}}function Ky(t){var e=ac(t)||[];return!H||e.length||(t=t,H&&console.error("Map "+t+" not exists. You can download map file on http://echarts.baidu.com/download-map.html")),e}function $y(t){var e=t.getItemStyle(),t=t.get("areaColor");return null!=t&&(e.fill=t),e}function Jy(n,t){t.eachChild(function(e){Z(e.__regions,function(t){e.trigger(n.isSelected(t.name)?"emphasis":"normal")})})}function Qy(t,e){var n=new R;this.uid=Ns("ec_map_draw"),this._controller=new l0(t.getZr()),this._controllerHost={target:e?n:null},this.group=n,this._updateGroup=e,this._mouseDownFlag,this._mapName,this._initialized,n.add(this._regionsGroup=new R),n.add(this._backgroundGroup=new R)}i(Ku.extend({type:"series.map",dependencies:["geo"],layoutMode:"box",needsDrawMap:!1,seriesGroup:[],getInitialData:function(t){for(var e=Kf(this,["value"]),n=e.mapDimension("value"),i=E(),o=[],a=[],r=0,s=e.count();r<s;r++){var l=e.getName(r);i.set(l,!0),o.push({name:l,value:e.get(n,r),selected:Eu(e,r,"selected")})}return Z(jy.load(this.getMapType(),this.option.nameMap).regions,function(t){t=t.name;i.get(t)||(o.push({name:t}),a.push(t))}),this.updateSelectedMap(o),e.appendValues([],a),e},getHostGeoModel:function(){var t=this.option.geoIndex;return null!=t?this.dependentModels.geo[t]:null},getMapType:function(){return(this.getHostGeoModel()||this).option.map},getRawValue:function(t){var e=this.getData();return e.get(e.mapDimension("value"),t)},getRegionModel:function(t){var e=this.getData();return e.getItemModel(e.indexOfName(t))},formatTooltip:function(t){for(var e=this.getData(),n=$s(this.getRawValue(t)),i=e.getName(t),o=this.seriesGroup,a=[],r=0;r<o.length;r++){var s=o[r].originalData.indexOfName(i),l=e.mapDimension("value");isNaN(o[r].originalData.get(l,s))||a.push(nl(o[r].name))}return a.join(", ")+"<br />"+nl(i+" : "+n)},getTooltipPosition:function(t){var e;if(null!=t)return t=this.getData().getName(t),(t=(e=this.coordinateSystem).getRegion(t))&&e.dataToPoint(t.center)},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},defaultOption:{zlevel:0,z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:.75,showLegendSymbol:!0,dataRangeHoverLink:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}}}}),l),Qy.prototype={constructor:Qy,draw:function(p,t,e,n,i){var o,a,r,s,l,g="geo"===p.mainType,f=p.getData&&p.getData(),u=(g&&t.eachComponent({mainType:"series",subType:"map"},function(t){f||t.getHostGeoModel()!==p||(f=t.getData())}),p.coordinateSystem),m=(this._updateBackground(u),this._regionsGroup),h=this.group,y=u.scale,c={position:u.position,scale:y},v=(!m.childAt(0)||i?h.attr(c):G(h,c,p),m.removeAll(),["itemStyle"]),x=["emphasis","itemStyle"],_=["label"],w=["emphasis","label"],b=E();Z(u.regions,function(t){var e=b.get(t.name)||b.set(t.name,new R),n=new kr({shape:{paths:[]}});e.add(n);var i,o,a,r=(a=p.getRegionModel(t.name)||p).getModel(v),s=a.getModel(x),r=$y(r),s=$y(s),l=a.getModel(_),u=a.getModel(w),h=(f&&(i=f.indexOfName(t.name),h=f.getItemVisual(i,"color",!0))&&(r.fill=h),Z(t.geometries,function(t){if("polygon"===t.type){n.shape.paths.push(new yr({shape:{points:t.exterior}}));for(var e=0;e<(t.interiors?t.interiors.length:0);e++)n.shape.paths.push(new yr({shape:{points:t.interiors[e]}}))}}),n.setStyle(r),n.style.strokeNoScale=!0,n.culling=!0,l.get("show")),r=u.get("show"),c=f&&isNaN(f.get(f.mapDimension("value"),i)),d=f&&f.getItemLayout(i);(g||c&&(h||r)||d&&d.showLabel)&&(c=g?t.name:i,(!f||0<=i)&&(o=p),us((h=new B({position:t.center.slice(),scale:[1/y[0],1/y[1]],z2:10,silent:!0})).style,h.hoverStyle={},l,u,{labelFetcher:o,labelDataIndex:c,defaultText:t.name,useInsideStyle:!1},{textAlign:"center",textVerticalAlign:"middle"}),e.add(h)),f?f.setItemGraphicEl(i,e):(a=p.getRegionModel(t.name),n.eventData={componentType:"geo",componentIndex:p.componentIndex,geoIndex:p.componentIndex,name:t.name,region:a&&a.option||{}}),(e.__regions||(e.__regions=[])).push(t),ss(e,s,{hoverSilentOnTouch:!!p.get("selectedMode")}),m.add(e)}),this._updateController(p,t,e),o=this,a=p,s=e,l=n,(r=m).off("click"),r.off("mousedown"),a.get("selectedMode")&&(r.on("mousedown",function(){o._mouseDownFlag=!0}),r.on("click",function(t){if(o._mouseDownFlag){o._mouseDownFlag=!1;for(var e=t.target;!e.__regions;)e=e.parent;e&&((t={type:("geo"===a.mainType?"geo":"map")+"ToggleSelect",batch:I(e.__regions,function(t){return{name:t.name,from:l.uid}})})[a.mainType+"Id"]=a.id,s.dispatchAction(t),Jy(a,r))}})),Jy(p,m)},remove:function(){this._regionsGroup.removeAll(),this._backgroundGroup.removeAll(),this._controller.dispose(),this._mapName&&jy.removeGraphic(this._mapName,this.uid),this._mapName=null,this._controllerHost={}},_updateBackground:function(t){t=t.map;this._mapName!==t&&Z(jy.makeGraphic(t,this.uid),function(t){this._backgroundGroup.add(t)},this),this._mapName=t},_updateController:function(i,t,o){var a=i.coordinateSystem,e=this._controller,n=this._controllerHost,r=(n.zoomLimit=i.get("scaleLimit"),n.zoom=a.getZoom(),e.enable(i.get("roam")||!1),i.mainType);function s(){var t={type:"geoRoam",componentType:r};return t[r+"Id"]=i.id,t}e.off("pan").on("pan",function(t){this._mouseDownFlag=!1,i0(n,t.dx,t.dy),o.dispatchAction(O(s(),{dx:t.dx,dy:t.dy}))},this),e.off("zoom").on("zoom",function(t){var e;this._mouseDownFlag=!1,o0(n,t.scale,t.originX,t.originY),o.dispatchAction(O(s(),{zoom:t.scale,originX:t.originX,originY:t.originY})),this._updateGroup&&(e=this.group.scale,this._regionsGroup.traverse(function(t){"text"===t.type&&t.attr("scale",[1/e[0],1/e[1]])}))},this),e.setPointerChecker(function(t,e,n){return a.getViewRectAfterRoam().contain(e,n)&&!v0(t,o,i)})}};var tv="__seriesMapHighDown",ev="__seriesMapCallKey";function nv(t){var e=this[tv];e&&e.recordVersion===this[ev]&&iv(e,t)}function iv(t,e){var n=t.circle,i=t.labelModel,o=t.hoverLabelModel,a=t.emphasisText,t=t.normalText;e?(n.style.extendFrom(hs({},o,{text:o.get("show")?a:null},{isRectText:!0,useInsideStyle:!1},!0)),n.__mapOriginalZ2=n.z2,n.z2+=Br):(hs(n.style,i,{text:i.get("show")?t:null,textPosition:i.getShallow("position")||"bottom"},{isRectText:!0,useInsideStyle:!1}),n.dirty(!1),null!=n.__mapOriginalZ2&&(n.z2=n.__mapOriginalZ2,n.__mapOriginalZ2=null))}function ov(t,e,n,i){e0.call(this,t),this.map=e;t=jy.load(e,n);this._nameCoordMap=t.nameCoordMap,this._regionsMap=t.regionsMap,this._invertLongitute=null==i||i,this.regions=t.regions,this._rect=t.boundingRect}function av(t,e,n,i){var o=n.geoModel,n=n.seriesModel,o=o?o.coordinateSystem:n?n.coordinateSystem||(n.getReferringComponents("geo")[0]||{}).coordinateSystem:null;return o===this?o[t](i):null}function rv(t,e){var n=t.get("boundingCoords");null!=n&&(o=n[0],n=n[1],isNaN(o[0])||isNaN(o[1])||isNaN(n[0])||isNaN(n[1])?H&&console.error("Invalid boundingCoords"):this.setBoundingRect(o[0],o[1],n[0]-o[0],n[1]-o[1]));var i,n=this.getBoundingRect(),o=t.get("layoutCenter"),a=t.get("layoutSize"),r=e.getWidth(),e=e.getHeight(),n=n.width/n.height*this.aspectScale,s=!1;o&&a&&(o=[F(o[0],r),F(o[1],e)],a=F(a,Math.min(r,e)),isNaN(o[0])||isNaN(o[1])||isNaN(a)?H&&console.warn("Given layoutCenter or layoutSize data are invalid. Use left/top/width/height instead."):s=!0),s?(i={},1<n?(i.width=a,i.height=a/n):(i.height=a,i.width=a*n),i.y=o[1]-i.height/2,i.x=o[0]-i.width/2):((s=t.getBoxLayoutParams()).aspect=n,i=yl(s,{width:r,height:e})),this.setViewRect(i.x,i.y,i.width,i.height),this.setCenter(t.get("center")),this.setZoom(t.get("zoom"))}function sv(n,t){Z(t.get("geoCoord"),function(t,e){n.addGeoCoord(e,t)})}ld({type:"map",render:function(t,e,n,i){var o,a;i&&"mapToggleSelect"===i.type&&i.from===this.uid||((o=this.group).removeAll(),t.getHostGeoModel())||(i&&"geoRoam"===i.type&&"series"===i.componentType&&i.seriesId===t.id?(a=this._mapDraw)&&o.add(a.group):t.needsDrawMap?(a=this._mapDraw||new Qy(n,!0),o.add(a.group),a.draw(t,e,n,this,i),this._mapDraw=a):(this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null),t.get("showLegendSymbol")&&e.getComponent("legend")&&this._renderSymbols(t,e,n))},remove:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},dispose:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},_renderSymbols:function(h,t,e){var c=h.originalData,d=this.group;c.each(c.mapDimension("value"),function(t,e){var n,i,o,a,r,s,l,u;isNaN(t)||(t=c.getItemLayout(e))&&t.point&&(n=t.point,t=t.offset,n=new hr({style:{fill:h.getData().getVisual("color")},shape:{cx:n[0]+9*t,cy:n[1],r:3},silent:!0,z2:8+(t?0:Br+1)}),t||(t=h.mainSeries.getData(),o=c.getName(e),a=t.indexOfName(o),i=(e=c.getItemModel(e)).getModel("label"),e=e.getModel("emphasis.label"),t=t.getItemGraphicEl(a),o=st(h.getFormattedLabel(a,"normal"),o),a=st(h.getFormattedLabel(a,"emphasis"),o),s=t[tv],r=Math.random(),s||(s=t[tv]={},l=L(nv,!0),u=L(nv,!1),t.on("mouseover",l).on("mouseout",u).on("emphasis",l).on("normal",u)),O(s,{recordVersion:t[ev]=r,circle:n,labelModel:i,hoverLabelModel:e,emphasisText:a,normalText:o}),iv(s,!1)),d.add(n))})}}),s({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(i,t){var o=i.componentType||"series";t.eachComponent({mainType:o,query:i},function(t){var e,n=t.coordinateSystem;"geo"===n.type&&(e=M0(n,i,t.get("scaleLimit")),t.setCenter&&t.setCenter(e.center),t.setZoom&&t.setZoom(e.zoom),"series"===o)&&Z(t.seriesGroup,function(t){t.setCenter(e.center),t.setZoom(e.zoom)})})}),ov.prototype={constructor:ov,type:"geo",dimensions:["lng","lat"],containCoord:function(t){for(var e=this.regions,n=0;n<e.length;n++)if(e[n].contain(t))return!0;return!1},transformTo:function(t,e,n,i){var o=this.getBoundingRect(),a=this._invertLongitute,o=o.clone(),r=(a&&(o.y=-o.y-o.height),this._rawTransformable);r.transform=o.calculateTransform(new z(t,e,n,i)),r.decomposeTransform(),a&&((o=r.scale)[1]=-o[1]),r.updateTransform(),this._updateTransform()},getRegion:function(t){return this._regionsMap.get(t)},getRegionByCoord:function(t){for(var e=this.regions,n=0;n<e.length;n++)if(e[n].contain(t))return e[n]},addGeoCoord:function(t,e){this._nameCoordMap.set(t,e)},getGeoCoord:function(t){return this._nameCoordMap.get(t)},getBoundingRect:function(){return this._rect},dataToPoint:function(t,e,n){if(t="string"==typeof t?this.getGeoCoord(t):t)return e0.prototype.dataToPoint.call(this,t,e,n)},convertToPixel:L(av,"dataToPoint"),convertFromPixel:L(av,"pointToData")},i(ov,e0);var lv={dimensions:ov.prototype.dimensions,create:function(t,r){var s=[],n=(t.eachComponent("geo",function(t,e){var n=t.get("map"),i=t.get("aspectScale"),o=!0,a=ac(n),a=(a&&a[0]&&"svg"===a[0].type?(null==i&&(i=1),o=!1):null==i&&(i=.75),new ov(n+e,n,t.get("nameMap"),o));a.aspectScale=i,a.zoomLimit=t.get("scaleLimit"),s.push(a),sv(a,t),(t.coordinateSystem=a).model=t,a.resize=rv,a.resize(t,r)}),t.eachSeries(function(t){var e;"geo"===t.get("coordinateSystem")&&(e=t.get("geoIndex")||0,t.coordinateSystem=s[e])}),{});return t.eachSeriesByType("map",function(t){var e;t.getHostGeoModel()||(e=t.getMapType(),n[e]=n[e]||[],n[e].push(t))}),Z(n,function(t,e){var n=new ov(e,e,q(I(t,function(t){return t.get("nameMap")})));n.zoomLimit=rt.apply(null,I(t,function(t){return t.get("scaleLimit")})),s.push(n),n.resize=rv,n.aspectScale=t[0].get("aspectScale"),n.resize(t[0],r),Z(t,function(t){sv(t.coordinateSystem=n,t)})}),s},getFilledRegions:function(t,e,n){for(var i=(t||[]).slice(),o=E(),a=0;a<i.length;a++)o.set(i[a].name,i[a]);return Z(jy.load(e,n).regions,function(t){t=t.name;o.get(t)||i.push({name:t})}),i}};td("geo",lv),ed(function(n){var o={};n.eachSeriesByType("map",function(t){var r,i,e=t.getMapType();t.getHostGeoModel()||o[e]||(r={},Z(t.seriesGroup,function(t){var o=t.coordinateSystem,a=t.originalData;t.get("showLegendSymbol")&&n.getComponent("legend")&&a.each(a.mapDimension("value"),function(t,e){var n=a.getName(e),i=o.getRegion(n);i&&!isNaN(t)&&(t=r[n]||0,i=o.dataToPoint(i.center),r[n]=t+1,a.setItemLayout(e,{point:i,offset:t}))})}),(i=t.getData()).each(function(t){var e=i.getName(t),n=i.getItemLayout(t)||{};n.showLabel=!r[e],i.setItemLayout(t,n)}),o[e]=!0)})}),nd(function(t){t.eachSeriesByType("map",function(t){var e=t.get("color"),n=t.getModel("itemStyle"),i=n.get("areaColor"),n=n.get("color")||e[t.seriesIndex%e.length];t.getData().setVisual({areaColor:i,color:n})})}),Qc(pc.PROCESSOR.STATISTIC,function(t){var n={};t.eachSeriesByType("map",function(t){var e=t.getHostGeoModel(),e=e?"o"+e.id:"i"+t.getMapType();(n[e]=n[e]||[]).push(t)}),Z(n,function(t,e){l=I(t,function(t){return t.getData()}),u=t[0].get("mapValueCalculation"),h={},Z(l,function(n){n.each(n.mapDimension("value"),function(t,e){e="ec-"+n.getName(e);h[e]=h[e]||[],isNaN(t)||h[e].push(t)})});for(var l,u,h,n=l[0].map(l[0].mapDimension("value"),function(t,e){for(var n="ec-"+l[0].getName(e),i=0,o=1/0,a=-1/0,r=h[n].length,s=0;s<r;s++)o=Math.min(o,h[n][s]),a=Math.max(a,h[n][s]),i+=h[n][s];return 0===r?NaN:"min"===u?o:"max"===u?a:"average"===u?i/r:i}),i=0;i<t.length;i++)t[i].originalData=t[i].getData();for(i=0;i<t.length;i++)(t[i].seriesGroup=t)[i].needsDrawMap=0===i&&!t[i].getHostGeoModel(),t[i].setData(n.cloneShallow()),t[i].mainSeries=t[0]})}),Jc(function(t){Z(t.series,function(t){t&&"map"===t.type&&(t.map=t.map||t.mapType,C(t,t.mapLocation))})}),em("map",[{type:"mapToggleSelect",event:"mapselectchanged",method:"toggleSelected"},{type:"mapSelect",event:"mapselected",method:"select"},{type:"mapUnSelect",event:"mapunselected",method:"unSelect"}]);var uv="undefined"==typeof Uint32Array?Array:Uint32Array,hv="undefined"==typeof Float64Array?Array:Float64Array;function cv(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(H&&console.warn("Lines data configuration has been changed to { coords:[[1,2],[2,3]] }"),t.data=I(e,function(t){var e={coords:[t[0].coord,t[1].coord]};return t[0].name&&(e.fromName=t[0].name),t[1].name&&(e.toName=t[1].name),q([e,t[0],t[1]])}))}var dv=Ku.extend({type:"series.lines",dependencies:["grid","polar"],visualColorAccessPath:"lineStyle.color",init:function(t){t.data=t.data||[],cv(t);var e=this._processFlatCoordsArray(t.data);this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset,e.flatCoords&&(t.data=new Float32Array(e.count)),dv.superApply(this,"init",arguments)},mergeOption:function(t){var e;t.data=t.data||[],cv(t),t.data&&(e=this._processFlatCoordsArray(t.data),this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset,e.flatCoords)&&(t.data=new Float32Array(e.count)),dv.superApply(this,"mergeOption",arguments)},appendData:function(t){var e=this._processFlatCoordsArray(t.data);e.flatCoords&&(this._flatCoords?(this._flatCoords=mt(this._flatCoords,e.flatCoords),this._flatCoordsOffset=mt(this._flatCoordsOffset,e.flatCoordsOffset)):(this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset),t.data=new Float32Array(e.count)),this.getRawData().appendData(t.data)},_getCoordsFromItemModel:function(t){t=this.getData().getItemModel(t),t=t.option instanceof Array?t.option:t.getShallow("coords");if(!H||t instanceof Array&&0<t.length&&t[0]instanceof Array)return t;throw new Error("Invalid coords "+JSON.stringify(t)+". Lines must have 2d coords array in data item.")},getLineCoordsCount:function(t){return this._flatCoordsOffset?this._flatCoordsOffset[2*t+1]:this._getCoordsFromItemModel(t).length},getLineCoords:function(t,e){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[2*t],i=this._flatCoordsOffset[2*t+1],o=0;o<i;o++)e[o]=e[o]||[],e[o][0]=this._flatCoords[n+2*o],e[o][1]=this._flatCoords[n+2*o+1];return i}for(var a=this._getCoordsFromItemModel(t),o=0;o<a.length;o++)e[o]=e[o]||[],e[o][0]=a[o][0],e[o][1]=a[o][1];return a.length},_processFlatCoordsArray:function(t){var e=0;if(this._flatCoords&&(e=this._flatCoords.length),"number"!=typeof t[0])return{flatCoordsOffset:null,flatCoords:null,count:t.length};for(var n=t.length,i=new uv(n),o=new hv(n),a=0,r=0,s=0,l=0;l<n;){s++;var u=t[l++];i[r++]=a+e,i[r++]=u;for(var h=0;h<u;h++){var c=t[l++],d=t[l++];if(o[a++]=c,o[a++]=d,n<l&&H)throw new Error("Invalid data format.")}}return{flatCoordsOffset:new Uint32Array(i.buffer,0,r),flatCoords:o,count:s}},getInitialData:function(t,e){if(H&&!eu.get(t.coordinateSystem))throw new Error("Unkown coordinate system "+t.coordinateSystem);var o=new Sd(["value"],this);return o.hasItemOption=!1,o.initData(t.data,[],function(t,e,n,i){if(t instanceof Array)return NaN;o.hasItemOption=!0;t=t.value;return null!=t?t instanceof Array?t[i]:t:void 0}),o},formatTooltip:function(t){var e,t=this.getData().getItemModel(t),n=t.get("name");return n||(n=t.get("fromName"),t=t.get("toName"),e=[],null!=n&&e.push(n),null!=t&&e.push(t),nl(e.join(" > ")))},preventIncremental:function(){return!!this.get("effect.show")},getProgressive:function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},getProgressiveThreshold:function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},defaultOption:{coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,label:{show:!1,position:"end"},lineStyle:{opacity:.5}}}),pv=Sr.prototype,gv=Cr.prototype;function fv(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}var mv=Vr({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(t,e){(fv(e)?pv:gv).buildPath(t,e)},pointAt:function(t){return(fv(this.shape)?pv:gv).pointAt.call(this,t)},tangentAt:function(t){var e=this.shape,e=fv(e)?[e.x2-e.x1,e.y2-e.y1]:gv.tangentAt.call(this,t);return Lt(e,e)}}),yv=["fromSymbol","toSymbol"];function vv(t){return"_"+t+"Type"}function xv(t,e,n){var i=e.getItemVisual(n,"color"),o=e.getItemVisual(n,t),e=e.getItemVisual(n,t+"Size");if(o&&"none"!==o)return(n=Wp(o,-(e=D(e)?e:[e,e])[0]/2,-e[1]/2,e[0],e[1],i)).name=t,n}function _v(t,e){var n=e[0],i=e[1],e=e[2];t.x1=n[0],t.y1=n[1],t.x2=i[0],t.y2=i[1],t.percent=1,e?(t.cpx1=e[0],t.cpy1=e[1]):(t.cpx1=NaN,t.cpy1=NaN)}function wv(t,e,n){R.call(this),this._createLine(t,e,n)}h=wv.prototype;function bv(t){this._ctor=t||wv,this.group=new R}h.beforeUpdate=function(){var t=this.childOfName("fromSymbol"),e=this.childOfName("toSymbol"),n=this.childOfName("label");if(t||e||!n.ignore){for(var i=1,o=this.parent;o;)o.scale&&(i/=o.scale[0]),o=o.parent;var a,r,s,l,u,h,c,d,p=this.childOfName("line");(this.__dirty||p.__dirty)&&(d=p.shape.percent,a=p.pointAt(0),Lt(s=Tt([],r=p.pointAt(d),a),s),t&&(t.attr("position",a),l=p.tangentAt(0),t.attr("rotation",Math.PI/2-Math.atan2(l[1],l[0])),t.attr("scale",[i*d,i*d])),e&&(e.attr("position",r),l=p.tangentAt(1),e.attr("rotation",-Math.PI/2-Math.atan2(l[1],l[0])),e.attr("scale",[i*d,i*d])),n.ignore||(n.attr("position",r),t=5*i,"end"===n.__position?(u=[s[0]*t+r[0],s[1]*t+r[1]],h=.8<s[0]?"left":s[0]<-.8?"right":"center",c=.8<s[1]?"top":s[1]<-.8?"bottom":"middle"):"middle"===n.__position?(d=[(l=p.tangentAt(e=d/2))[1],-l[0]],p=p.pointAt(e),0<d[1]&&(d[0]=-d[0],d[1]=-d[1]),u=[p[0]+d[0]*t,p[1]+d[1]*t],h="center",c="bottom",e=-Math.atan2(l[1],l[0]),r[0]<a[0]&&(e=Math.PI+e),n.attr("rotation",e)):(u=[-s[0]*t+a[0],-s[1]*t+a[1]],h=.8<s[0]?"right":s[0]<-.8?"left":"center",c=.8<s[1]?"bottom":s[1]<-.8?"top":"middle"),n.attr({style:{textVerticalAlign:n.__verticalAlign||c,textAlign:n.__textAlign||h},position:u,scale:[i,i]})))}},h._createLine=function(n,i,t){var e=n.hostModel,o=(o=n.getItemLayout(i),_v((a=new mv({name:"line"})).shape,o),a),a=(o.shape.percent=0,vs(o,{shape:{percent:1}},e,i),this.add(o),new B({name:"label",lineLabelOriginalOpacity:1}));this.add(a),Z(yv,function(t){var e=xv(t,n,i);this.add(e),this[vv(t)]=n.getItemVisual(i,t)},this),this._updateCommonStl(n,i,t)},h.updateData=function(i,o,t){var e=i.hostModel,n=this.childOfName("line"),a=i.getItemLayout(o),r={shape:{}};_v(r.shape,a),G(n,r,e,o),Z(yv,function(t){var e=i.getItemVisual(o,t),n=vv(t);this[n]!==e&&(this.remove(this.childOfName(t)),t=xv(t,i,o),this.add(t)),this[n]=e},this),this._updateCommonStl(i,o,t)},h._updateCommonStl=function(t,e,n){var i=t.hostModel,o=this.childOfName("line"),a=n&&n.lineStyle,r=n&&n.hoverLineStyle,s=n&&n.labelModel,l=n&&n.hoverLabelModel,u=(n&&!t.hasItemOption||(a=(n=t.getItemModel(e)).getModel("lineStyle").getLineStyle(),r=n.getModel("emphasis.lineStyle").getLineStyle(),s=n.getModel("label"),l=n.getModel("emphasis.label")),t.getItemVisual(e,"color")),h=lt(t.getItemVisual(e,"opacity"),a.opacity,1);o.useStyle(C({strokeNoScale:!0,fill:"none",stroke:u,opacity:h},a)),o.hoverStyle=r,Z(yv,function(t){t=this.childOfName(t);t&&(t.setColor(u),t.setStyle({opacity:h}))},this);var c,d,n=s.getShallow("show"),a=l.getShallow("show"),o=this.childOfName("label"),r=((n||a)&&(c=u||"#000",null==(d=i.getFormattedLabel(e,"normal",t.dataType)))&&(d=null==(r=i.getRawValue(e))?t.getName(e):isFinite(r)?Es(r):r),n?d:null),i=a?st(i.getFormattedLabel(e,"emphasis",t.dataType),d):null,e=o.style;null==r&&null==i||(hs(o.style,s,{text:r},{autoColor:c}),o.__textAlign=e.textAlign,o.__verticalAlign=e.textVerticalAlign,o.__position=s.get("position")||"middle"),o.hoverStyle=null!=i?{text:i,textFill:l.getTextColor(!0),fontStyle:l.getShallow("fontStyle"),fontWeight:l.getShallow("fontWeight"),fontSize:l.getShallow("fontSize"),fontFamily:l.getShallow("fontFamily")}:{text:null},o.ignore=!n&&!a,ss(this)},h.highlight=function(){this.trigger("emphasis")},h.downplay=function(){this.trigger("normal")},h.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},h.setLinePoints=function(t){var e=this.childOfName("line");_v(e.shape,t),e.dirty()},a(wv,R);c=bv.prototype;function Sv(t){t=t.hostModel;return{lineStyle:t.getModel("lineStyle").getLineStyle(),hoverLineStyle:t.getModel("emphasis.lineStyle").getLineStyle(),labelModel:t.getModel("label"),hoverLabelModel:t.getModel("emphasis.label")}}function Mv(t){return isNaN(t[0])||isNaN(t[1])}function Iv(t){return!Mv(t[0])&&!Mv(t[1])}function Tv(t,e,n){R.call(this),this.add(this.createLine(t,e,n)),this._updateEffectSymbol(t,e)}c.isPersistent=function(){return!0},c.updateData=function(r){var s=this,e=s.group,l=s._lineData,u=(s._lineData=r,l||e.removeAll(),Sv(r));r.diff(l).add(function(t){var e,n,i;e=s,t=t,i=u,Iv((n=r).getItemLayout(t))&&(i=new e._ctor(n,t,i),n.setItemGraphicEl(t,i),e.group.add(i))}).update(function(t,e){var n,i,o,a;n=s,o=r,t=t,a=u,i=(i=l).getItemGraphicEl(e),Iv(o.getItemLayout(t))?(i?i.updateData(o,t,a):i=new n._ctor(o,t,a),o.setItemGraphicEl(t,i),n.group.add(i)):n.group.remove(i)}).remove(function(t){e.remove(l.getItemGraphicEl(t))}).execute()},c.updateLayout=function(){var n=this._lineData;n&&n.eachItemGraphicEl(function(t,e){t.updateLayout(n,e)},this)},c.incrementalPrepareUpdate=function(t){this._seriesScope=Sv(t),this._lineData=null,this.group.removeAll()},c.incrementalUpdate=function(t,e){function n(t){t.isGroup||(t.incremental=t.useHoverLayer=!0)}for(var i,o=t.start;o<t.end;o++)Iv(e.getItemLayout(o))&&((i=new this._ctor(e,o,this._seriesScope)).traverse(n),this.group.add(i),e.setItemGraphicEl(o,i))},c.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},c._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};h=Tv.prototype;function Av(t,e,n){R.call(this),this._createPolyline(t,e,n)}h.createLine=function(t,e,n){return new wv(t,e,n)},h._updateEffectSymbol=function(t,e){var n=t.getItemModel(e).getModel("effect"),i=n.get("symbolSize"),o=n.get("symbol"),a=(D(i)||(i=[i,i]),n.get("color")||t.getItemVisual(e,"color")),r=this.childAt(1);this._symbolType!==o&&(this.remove(r),(r=Wp(o,-.5,-.5,1,1,a)).z2=100,r.culling=!0,this.add(r)),r&&(r.setStyle("shadowColor",a),r.setStyle(n.getItemStyle(["color"])),r.attr("scale",i),r.setColor(a),r.attr("scale",i),this._symbolType=o,this._updateEffectAnimation(t,n,e))},h._updateEffectAnimation=function(e,t,n){var i,o,a,r,s,l,u=this.childAt(1);u&&(i=this,s=e.getItemLayout(n),o=1e3*t.get("period"),a=t.get("loop"),l=t.get("constantSpeed"),r="function"==typeof(t=rt(t.get("delay"),function(t){return t/e.count()*o/3})),u.ignore=!0,this.updateAnimationPoints(u,s),(o=0<l?this.getLineLength(u)/l*1e3:o)===this._period&&a===this._loop||(u.stopAnimation(),s=t,r&&(s=t(n)),0<u.__t&&(s=-o*u.__t),u.__t=0,l=u.animate("",a).when(o,{__t:1}).delay(s).during(function(){i.updateSymbolPosition(u)}),a||l.done(function(){i.remove(u)}),l.start()),this._period=o,this._loop=a)},h.getLineLength=function(t){return Pt(t.__p1,t.__cp1)+Pt(t.__cp1,t.__p2)},h.updateAnimationPoints=function(t,e){t.__p1=e[0],t.__p2=e[1],t.__cp1=e[2]||[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]},h.updateData=function(t,e,n){this.childAt(0).updateData(t,e,n),this._updateEffectSymbol(t,e)},h.updateSymbolPosition=function(t){var e=t.__p1,n=t.__p2,i=t.__cp1,o=t.__t,a=t.position,r=ea,s=na,a=(a[0]=r(e[0],i[0],n[0],o),a[1]=r(e[1],i[1],n[1],o),s(e[0],i[0],n[0],o)),r=s(e[1],i[1],n[1],o);t.rotation=-Math.atan2(r,a)-Math.PI/2,t.ignore=!1},h.updateLayout=function(t,e){this.childAt(0).updateLayout(t,e);var n=t.getItemModel(e).getModel("effect");this._updateEffectAnimation(t,n,e)},a(Tv,R);c=Av.prototype;function Dv(t,e,n){Tv.call(this,t,e,n),this._lastFrame=0,this._lastFramePercent=0}c._createPolyline=function(t,e,n){var i=t.getItemLayout(e),i=new vr({shape:{points:i}});this.add(i),this._updateCommonStl(t,e,n)},c.updateData=function(t,e,n){var i=t.hostModel;G(this.childAt(0),{shape:{points:t.getItemLayout(e)}},i,e),this._updateCommonStl(t,e,n)},c._updateCommonStl=function(t,e,n){var i=this.childAt(0),o=t.getItemModel(e),e=t.getItemVisual(e,"color"),a=n&&n.lineStyle,r=n&&n.hoverLineStyle;n&&!t.hasItemOption||(a=o.getModel("lineStyle").getLineStyle(),r=o.getModel("emphasis.lineStyle").getLineStyle()),i.useStyle(C({strokeNoScale:!0,fill:"none",stroke:e},a)),i.hoverStyle=r,ss(this)},c.updateLayout=function(t,e){this.childAt(0).setShape("points",t.getItemLayout(e))},a(Av,R);var h=Dv.prototype,Cv=(h.createLine=function(t,e,n){return new Av(t,e,n)},h.updateAnimationPoints=function(t,e){this._points=e;for(var n=[0],i=0,o=1;o<e.length;o++){var a=e[o-1],r=e[o];i+=Pt(a,r),n.push(i)}if(0!==i){for(o=0;o<n.length;o++)n[o]/=i;this._offsets=n,this._length=i}},h.getLineLength=function(t){return this._length},h.updateSymbolPosition=function(t){var e=t.__t,n=this._points,i=this._offsets,o=n.length;if(i){var a=this._lastFrame;if(e<this._lastFramePercent){for(r=Math.min(a+1,o-1);0<=r&&!(i[r]<=e);r--);r=Math.min(r,o-2)}else{for(var r=a;r<o&&!(i[r]>e);r++);r=Math.min(r-1,o-2)}Et(t.position,n[r],n[r+1],(e-i[r])/(i[r+1]-i[r]));a=n[r+1][0]-n[r][0],n=n[r+1][1]-n[r][1];t.rotation=-Math.atan2(n,a)-Math.PI/2,this._lastFrame=r,this._lastFramePercent=e,t.ignore=!1}},a(Dv,Tv),Vr({shape:{polyline:!1,curveness:0,segs:[]},buildPath:function(t,e){var n=e.segs,i=e.curveness;if(e.polyline)for(var o=0;o<n.length;){var a=n[o++];if(0<a){t.moveTo(n[o++],n[o++]);for(var r=1;r<a;r++)t.lineTo(n[o++],n[o++])}}else for(o=0;o<n.length;){var s=n[o++],l=n[o++],u=n[o++],h=n[o++];t.moveTo(s,l),0<i?t.quadraticCurveTo((s+u)/2-(l-h)*i,(l+h)/2-(u-s)*i,u,h):t.lineTo(u,h)}},findDataIndex:function(t,e){var n=this.shape,i=n.segs,o=n.curveness;if(n.polyline)for(var a=0,r=0;r<i.length;){var s=i[r++];if(0<s)for(var l=i[r++],u=i[r++],h=1;h<s;h++){var c=i[r++],d=i[r++];if(La(l,u,c,d))return a}a++}else for(r=a=0;r<i.length;){l=i[r++],u=i[r++],c=i[r++],d=i[r++];if(0<o){if(Pa(l,u,(l+c)/2-(u-d)*o,(u+d)/2-(c-l)*o,c,d))return a}else if(La(l,u,c,d))return a;a++}return-1}}));function Lv(){this.group=new R}var c=Lv.prototype,kv=(c.isPersistent=function(){return!this._incremental},c.updateData=function(t){this.group.removeAll();var e=new Cv({rectHover:!0,cursor:"default"});e.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},c.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),5e5<t.count()?(this._incremental||(this._incremental=new Pr({silent:!0})),this.group.add(this._incremental)):this._incremental=null},c.incrementalUpdate=function(t,e){var n=new Cv;n.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(n,e,!!this._incremental),this._incremental?this._incremental.addDisplayable(n,!0):(n.rectHover=!0,n.cursor="default",n.__startIndex=t.start,this.group.add(n))},c.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},c._setCommon=function(e,t,n){var i=t.hostModel,t=(e.setShape({polyline:i.get("polyline"),curveness:i.get("lineStyle.curveness")}),e.useStyle(i.getModel("lineStyle").getLineStyle()),e.style.strokeNoScale=!0,t.getVisual("color"));t&&e.setStyle("stroke",t),e.setStyle("fill"),n||(e.seriesIndex=i.seriesIndex,e.on("mousemove",function(t){e.dataIndex=null;t=e.findDataIndex(t.offsetX,t.offsetY);0<t&&(e.dataIndex=t+e.__startIndex)}))},c._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()},{seriesType:"lines",plan:ah(),reset:function(g){var f=g.coordinateSystem,m=g.get("polyline"),y=g.pipelineContext.large;return{progress:function(t,e){var n=[];if(y){var i,o=t.end-t.start;if(m){for(var a=0,r=t.start;r<t.end;r++)a+=g.getLineCoordsCount(r);i=new Float32Array(o+2*a)}else i=new Float32Array(4*o);for(var s=0,l=[],r=t.start;r<t.end;r++){var u=g.getLineCoords(r,n);m&&(i[s++]=u);for(var h=0;h<u;h++)l=f.dataToPoint(n[h],!1,l),i[s++]=l[0],i[s++]=l[1]}e.setLayout("linesPoints",i)}else for(r=t.start;r<t.end;r++){var c=e.getItemModel(r),d=(u=g.getLineCoords(r,n),[]);if(m)for(var p=0;p<u;p++)d.push(f.dataToPoint(n[p]));else{d[0]=f.dataToPoint(n[0]),d[1]=f.dataToPoint(n[1]);c=c.get("lineStyle.curveness");+c&&(d[2]=[(d[0][0]+d[1][0])/2-(d[0][1]-d[1][1])*c,(d[0][1]+d[1][1])/2-(d[1][0]-d[0][0])*c])}e.setItemLayout(r,d)}}}}});function Pv(t){return t=t instanceof Array?t:[t,t]}ld({type:"lines",init:function(){},render:function(e,t,n){var i,o=e.getData(),a=this._updateLineDraw(o,e),r=e.get("zlevel"),s=e.get("effect.trailLength"),n=n.getZr(),l="svg"===n.painter.getType();l||n.painter.getLayer(r).clear(!0),null==this._lastZlevel||l||n.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(e)&&s&&(H&&(i=!1,t.eachSeries(function(t){t!==e&&t.get("zlevel")===r&&(i=!0)}),i)&&console.warn("Lines with trail effect should have an individual zlevel"),l||n.configLayer(r,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(s/10+.9,1),0)})),a.updateData(o),this._lastZlevel=r,this._finished=!0},incrementalPrepareRender:function(t,e,n){var i=t.getData();this._updateLineDraw(i,t).incrementalPrepareUpdate(i),this._clearLayer(n),this._finished=!1},incrementalRender:function(t,e,n){this._lineDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},updateTransform:function(t,e,n){var i=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};o=kv.reset(t);o.progress&&o.progress({start:0,end:i.count()},i),this._lineDraw.updateLayout(),this._clearLayer(n)},_updateLineDraw:function(t,e){var n=this._lineDraw,i=this._showEffect(e),o=!!e.get("polyline"),e=e.pipelineContext.large;return H&&i&&e&&console.warn("Large lines not support effect"),n&&i===this._hasEffet&&o===this._isPolyline&&e===this._isLargeDraw||(n&&n.remove(),n=this._lineDraw=e?new Lv:new bv(o?i?Dv:Av:i?Tv:wv),this._hasEffet=i,this._isPolyline=o,this._isLargeDraw=e,this.group.removeAll()),this.group.add(n.group),n},_showEffect:function(t){return!!t.get("effect.show")},_clearLayer:function(t){t=t.getZr();"svg"!==t.painter.getType()&&null!=this._lastZlevel&&t.painter.getLayer(this._lastZlevel).clear(!0)},remove:function(t,e){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(e)},dispose:function(){}});var Nv="lineStyle.opacity".split("."),h={seriesType:"lines",reset:function(t,e,n){var i=Pv(t.get("symbol")),o=Pv(t.get("symbolSize")),a=t.getData();return a.setVisual("fromSymbol",i&&i[0]),a.setVisual("toSymbol",i&&i[1]),a.setVisual("fromSymbolSize",o&&o[0]),a.setVisual("toSymbolSize",o&&o[1]),a.setVisual("opacity",t.get(Nv)),{dataEach:a.hasItemOption?function(t,e){var n=t.getItemModel(e),i=Pv(n.getShallow("symbol",!0)),o=Pv(n.getShallow("symbolSize",!0)),n=n.get(Nv);i[0]&&t.setItemVisual(e,"fromSymbol",i[0]),i[1]&&t.setItemVisual(e,"toSymbol",i[1]),o[0]&&t.setItemVisual(e,"fromSymbolSize",o[0]),o[1]&&t.setItemVisual(e,"toSymbolSize",o[1]),t.setItemVisual(e,"opacity",n)}:null}}};function Ov(t){return"_EC_"+t}ed(kv),nd(h);function Ev(t){this._directed=t||!1,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this.data,this.edgeData}c=Ev.prototype;function zv(t,e){this.id=null==t?"":t,this.inEdges=[],this.outEdges=[],this.edges=[],this.hostGraph,this.dataIndex=null==e?-1:e}function Rv(t,e,n){this.node1=t,this.node2=e,this.dataIndex=null==n?-1:n}c.type="graph",c.isDirected=function(){return this._directed},c.addNode=function(t,e){var n=this._nodesMap;if(!n[Ov(t=t||""+e)])return((e=new zv(t,e)).hostGraph=this).nodes.push(e),n[Ov(t)]=e;H&&console.error("Graph nodes have duplicate name or id")},c.getNodeByIndex=function(t){t=this.data.getRawIndex(t);return this.nodes[t]},c.getNodeById=function(t){return this._nodesMap[Ov(t)]},c.addEdge=function(t,e,n){var i=this._nodesMap,o=this._edgesMap;if("number"==typeof t&&(t=this.nodes[t]),"number"==typeof e&&(e=this.nodes[e]),zv.isInstance(t)||(t=i[Ov(t)]),zv.isInstance(e)||(e=i[Ov(e)]),t&&e){i=t.id+"-"+e.id;if(!o[i])return((n=new Rv(t,e,n)).hostGraph=this)._directed&&(t.outEdges.push(n),e.inEdges.push(n)),t.edges.push(n),t!==e&&e.edges.push(n),this.edges.push(n),o[i]=n}},c.getEdgeByIndex=function(t){t=this.edgeData.getRawIndex(t);return this.edges[t]},c.getEdge=function(t,e){zv.isInstance(t)&&(t=t.id),zv.isInstance(e)&&(e=e.id);var n=this._edgesMap;return this._directed?n[t+"-"+e]:n[t+"-"+e]||n[e+"-"+t]},c.eachNode=function(t,e){for(var n=this.nodes,i=n.length,o=0;o<i;o++)0<=n[o].dataIndex&&t.call(e,n[o],o)},c.eachEdge=function(t,e){for(var n=this.edges,i=n.length,o=0;o<i;o++)0<=n[o].dataIndex&&0<=n[o].node1.dataIndex&&0<=n[o].node2.dataIndex&&t.call(e,n[o],o)},c.breadthFirstTraverse=function(t,e,n,i){if(e=zv.isInstance(e)?e:this._nodesMap[Ov(e)]){for(var o="out"===n?"outEdges":"in"===n?"inEdges":"edges",a=0;a<this.nodes.length;a++)this.nodes[a].__visited=!1;if(!t.call(i,e,null))for(var r=[e];r.length;)for(var s=r.shift(),l=s[o],a=0;a<l.length;a++){var u=l[a],u=u.node1===s?u.node2:u.node1;if(!u.__visited){if(t.call(i,u,s))return;r.push(u),u.__visited=!0}}}},c.update=function(){for(var t=this.data,e=this.edgeData,n=this.nodes,i=this.edges,o=0,a=n.length;o<a;o++)n[o].dataIndex=-1;for(o=0,a=t.count();o<a;o++)n[t.getRawIndex(o)].dataIndex=o;for(e.filterSelf(function(t){t=i[e.getRawIndex(t)];return 0<=t.node1.dataIndex&&0<=t.node2.dataIndex}),o=0,a=i.length;o<a;o++)i[o].dataIndex=-1;for(o=0,a=e.count();o<a;o++)i[e.getRawIndex(o)].dataIndex=o},c.clone=function(){for(var t=new Ev(this._directed),e=this.nodes,n=this.edges,i=0;i<e.length;i++)t.addNode(e[i].id,e[i].dataIndex);for(i=0;i<n.length;i++){var o=n[i];t.addEdge(o.node1.id,o.node2.id,o.dataIndex)}return t},zv.prototype={constructor:zv,degree:function(){return this.edges.length},inDegree:function(){return this.inEdges.length},outDegree:function(){return this.outEdges.length},getModel:function(t){if(!(this.dataIndex<0))return this.hostGraph.data.getItemModel(this.dataIndex).getModel(t)}},Rv.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(t)};function Bv(n,i){return{getValue:function(t){var e=this[n][i];return e.get(e.getDimension(t||"value"),this.dataIndex)},setVisual:function(t,e){0<=this.dataIndex&&this[n][i].setItemVisual(this.dataIndex,t,e)},getVisual:function(t,e){return this[n][i].getItemVisual(this.dataIndex,t,e)},setLayout:function(t,e){0<=this.dataIndex&&this[n][i].setItemLayout(this.dataIndex,t,e)},getLayout:function(){return this[n][i].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[n][i].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[n][i].getRawIndex(this.dataIndex)}}}function Vv(t,e,n,i,o){for(var a=new Ev(i),r=0;r<t.length;r++)a.addNode(rt(t[r].id,t[r].name,r),r);for(var s=[],l=[],u=0,r=0;r<e.length;r++){var h=e[r],c=h.source,d=h.target;a.addEdge(c,d,u)&&(l.push(h),s.push(rt(h.id,c+" > "+d)),u++)}var p,i=n.get("coordinateSystem"),i=("cartesian2d"===i||"polar"===i?p=Fd(t,n):(S(i=(i=eu.get(i))&&"view"!==i.type&&i.dimensions||[],"value")<0&&i.concat(["value"]),i=Rd(t,{coordDimensions:i}),(p=new Sd(i,n)).initData(t)),new Sd(["value"],n));return i.initData(l,s),o&&o(p,i),Rm({mainData:p,struct:a,structAttr:"graph",datas:{node:p,edge:i},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a}i(zv,Bv("hostGraph","data")),i(Rv,Bv("hostGraph","edgeData")),Ev.Node=zv,Ev.Edge=Rv,Po(zv),Po(Rv);var Gv=sd({type:"series.graph",init:function(t){Gv.superApply(this,"init",arguments),this.legendDataProvider=function(){return this._categoriesData},this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeOption:function(t){Gv.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(t){Gv.superApply(this,"mergeDefaultAndTheme",arguments),co(t,["edgeLabel"],["show"])},getInitialData:function(t,a){var e=t.edges||t.links||[],t=t.data||t.nodes||[],r=this;if(t&&e)return Vv(t,e,this,!0,function(t,e){t.wrapMethod("getItemModel",function(t){var e=r._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t});var t=r.getModel("edgeLabel"),n=new w({label:t.option},t.parentModel,a),t=r.getModel("emphasis.edgeLabel"),i=new w({emphasis:{label:t.option}},t.parentModel,a);function o(t){return(t=this.parsePath(t))&&"label"===t[0]?n:t&&"emphasis"===t[0]&&"label"===t[1]?i:this.parentModel}e.wrapMethod("getItemModel",function(t){return t.customizeGetParent(o),t})}).data},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},formatTooltip:function(t,e,n){var i,o;return"edge"===n?(o=this.getData(),n=this.getDataParams(t,n),t=o.graph.getEdgeByIndex(t),i=o.getName(t.node1.dataIndex),o=o.getName(t.node2.dataIndex),t=[],null!=i&&t.push(i),null!=o&&t.push(o),t=nl(t.join(" > ")),n.value&&(t+=" : "+nl(n.value)),t):Gv.superApply(this,"formatTooltip",arguments)},_updateCategoriesData:function(){var t=I(this.option.categories||[],function(t){return null!=t.value?t:O({value:0},t)}),e=new Sd(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray(function(t){return e.getItemModel(t,!0)})},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},isAnimationEnabled:function(){return Gv.superCall(this,"isAnimationEnabled")&&!("force"===this.get("layout")&&this.get("force.layoutAnimation"))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",legendHoverLink:!0,hoverAnimation:!0,layout:null,focusNodeAdjacency:!1,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle"},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,curveness:0,opacity:.5},emphasis:{label:{show:!0}}}}),Fv=[],Wv=[],Hv=[],Zv=ea,Xv=Ot,Yv=Math.abs;function Uv(t,e,n){for(var i,o=t[0],a=t[1],r=t[2],s=1/0,l=n*n,u=.1,h=.1;h<=.9;h+=.1)Fv[0]=Zv(o[0],a[0],r[0],h),Fv[1]=Zv(o[1],a[1],r[1],h),(p=Yv(Xv(Fv,e)-l))<s&&(s=p,i=h);for(var c=0;c<32;c++){var d=i+u,p=(Wv[0]=Zv(o[0],a[0],r[0],i),Wv[1]=Zv(o[1],a[1],r[1],i),Hv[0]=Zv(o[0],a[0],r[0],d),Hv[1]=Zv(o[1],a[1],r[1],d),Xv(Wv,e)-l);if(Yv(p)<.01)break;d=Xv(Hv,e)-l;u/=2,p<0?0<=d?i+=u:i-=u:0<=d?i-=u:i+=u}return i}function jv(t,l){var u=[],h=oa,c=[[],[],[]],d=[[],[]],p=[];function g(t){t=t.getVisual("symbolSize");return t=t instanceof Array?(t[0]+t[1])/2:t}l/=2,t.eachEdge(function(t,e){var n,i,o=t.getLayout(),a=t.getVisual("fromSymbol"),r=t.getVisual("toSymbol"),s=(o.__original||(o.__original=[bt(o[0]),bt(o[1])],o[2]&&o.__original.push(bt(o[2]))),o.__original);null!=o[2]?(wt(c[0],s[0]),wt(c[1],s[2]),wt(c[2],s[1]),a&&"none"!==a&&(n=g(t.node1),i=Uv(c,s[0],n*l),h(c[0][0],c[1][0],c[2][0],i,u),c[0][0]=u[3],c[1][0]=u[4],h(c[0][1],c[1][1],c[2][1],i,u),c[0][1]=u[3],c[1][1]=u[4]),r&&"none"!==r&&(n=g(t.node2),i=Uv(c,s[1],n*l),h(c[0][0],c[1][0],c[2][0],i,u),c[1][0]=u[1],c[2][0]=u[2],h(c[0][1],c[1][1],c[2][1],i,u),c[1][1]=u[1],c[2][1]=u[2]),wt(o[0],c[0]),wt(o[1],c[2]),wt(o[2],c[1])):(wt(d[0],s[0]),wt(d[1],s[1]),Tt(p,d[1],d[0]),Lt(p,p),a&&"none"!==a&&(n=g(t.node1),It(d[0],d[0],p,n*l)),r&&"none"!==r&&(n=g(t.node2),It(d[1],d[1],p,-n*l)),wt(o[0],d[0]),wt(o[1],d[1]))})}var qv="__focusNodeAdjacency",Kv="__unfocusNodeAdjacency",$v=["itemStyle","opacity"],Jv=["lineStyle","opacity"];function Qv(t,e){return t.getVisual("opacity")||t.getModel().get(e)}function tx(t,e,n){var i=t.getGraphicEl(),o=Qv(t,e);null!=n&&(null==o&&(o=1),o*=n),i.downplay&&i.downplay(),i.traverse(function(t){var e;"group"!==t.type&&(null!=(e=t.lineLabelOriginalOpacity)&&null==n||(e=o),t.setStyle("opacity",e))})}function ex(t,e){var n=Qv(t,e),e=t.getGraphicEl();e.highlight&&e.highlight(),e.traverse(function(t){"group"!==t.type&&t.setStyle("opacity",n)})}ld({type:"graph",init:function(t,e){var n=new _f,i=new bv,o=this.group;this._controller=new l0(e.getZr()),this._controllerHost={target:o},o.add(n.group),o.add(i.group),this._symbolDraw=n,this._lineDraw=i,this._firstRender=!0},render:function(o,t,a){var e=o.coordinateSystem,n=(this._model=o,this._nodeScaleRatio=o.get("nodeScaleRatio"),this._symbolDraw),i=this._lineDraw,r=this.group,s=("view"===e.type&&(e={position:e.position,scale:e.scale},this._firstRender?r.attr(e):G(r,e,o)),jv(o.getGraph(),this._getNodeGlobalScale(o)),o.getData()),r=(n.updateData(s),o.getEdgeData()),l=(i.updateData(r),this._updateNodeAndLinkScale(),this._updateController(o,t,a),clearTimeout(this._layoutTimeout),o.forceLayout),u=o.get("force.layoutAnimation"),h=(l&&this._startForceLayoutIteration(l,u),s.eachItemGraphicEl(function(t,e){var n=s.getItemModel(e),i=(t.off("drag").off("dragend"),n.get("draggable"));i&&t.on("drag",function(){l&&(l.warmUp(),this._layouting||this._startForceLayoutIteration(l,u),l.setFixed(e),s.setItemLayout(e,t.position))},this).on("dragend",function(){l&&l.setUnfixed(e)},this),t.setDraggable(i&&l),t[qv]&&t.off("mouseover",t[qv]),t[Kv]&&t.off("mouseout",t[Kv]),n.get("focusNodeAdjacency")&&(t.on("mouseover",t[qv]=function(){a.dispatchAction({type:"focusNodeAdjacency",seriesId:o.id,dataIndex:t.dataIndex})}),t.on("mouseout",t[Kv]=function(){a.dispatchAction({type:"unfocusNodeAdjacency",seriesId:o.id})}))},this),s.graph.eachEdge(function(t){var e=t.getGraphicEl();e[qv]&&e.off("mouseover",e[qv]),e[Kv]&&e.off("mouseout",e[Kv]),t.getModel().get("focusNodeAdjacency")&&(e.on("mouseover",e[qv]=function(){a.dispatchAction({type:"focusNodeAdjacency",seriesId:o.id,edgeDataIndex:t.dataIndex})}),e.on("mouseout",e[Kv]=function(){a.dispatchAction({type:"unfocusNodeAdjacency",seriesId:o.id})}))}),"circular"===o.get("layout")&&o.get("circular.rotateLabel")),c=s.getLayout("cx"),d=s.getLayout("cy");s.eachItemGraphicEl(function(t,e){var n,t=t.getSymbolPath();h?(e=s.getItemLayout(e),(n=Math.atan2(e[1]-d,e[0]-c))<0&&(n=2*Math.PI+n),(e=e[0]<c)&&(n-=Math.PI),t.setStyle({textRotation:-n,textPosition:n=e?"left":"right",textOrigin:"center"}),t.hoverStyle&&(t.hoverStyle.textPosition=n)):t.setStyle({textRotation:0})}),this._firstRender=!1},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={}},focusNodeAdjacency:function(t,e,n,i){var o=this._model.getData().graph,a=i.dataIndex,i=i.edgeDataIndex,a=o.getNodeByIndex(a),i=o.getEdgeByIndex(i);(a||i)&&(o.eachNode(function(t){tx(t,$v,.1)}),o.eachEdge(function(t){tx(t,Jv,.1)}),a&&(ex(a,$v),Z(a.edges,function(t){t.dataIndex<0||(ex(t,Jv),ex(t.node1,$v),ex(t.node2,$v))})),i)&&(ex(i,Jv),ex(i.node1,$v),ex(i.node2,$v))},unfocusNodeAdjacency:function(t,e,n,i){var o=this._model.getData().graph;o.eachNode(function(t){tx(t,$v)}),o.eachEdge(function(t){tx(t,Jv)})},_startForceLayoutIteration:function(t,n){var i=this;!function e(){t.step(function(t){i.updateLayout(i._model),(i._layouting=!t)&&(n?i._layoutTimeout=setTimeout(e,16):e())})}()},_updateController:function(o,t,a){var e=this._controller,n=this._controllerHost,r=this.group;e.setPointerChecker(function(t,e,n){var i=r.getBoundingRect();return i.applyTransform(r.transform),i.contain(e,n)&&!v0(t,a,o)}),"view"===o.coordinateSystem.type?(e.enable(o.get("roam")),n.zoomLimit=o.get("scaleLimit"),n.zoom=o.coordinateSystem.getZoom(),e.off("pan").off("zoom").on("pan",function(t){i0(n,t.dx,t.dy),a.dispatchAction({seriesId:o.id,type:"graphRoam",dx:t.dx,dy:t.dy})}).on("zoom",function(t){o0(n,t.scale,t.originX,t.originY),a.dispatchAction({seriesId:o.id,type:"graphRoam",zoom:t.scale,originX:t.originX,originY:t.originY}),this._updateNodeAndLinkScale(),jv(o.getGraph(),this._getNodeGlobalScale(o)),this._lineDraw.updateLayout()},this)):e.disable()},_updateNodeAndLinkScale:function(){var t=this._model,e=t.getData(),t=this._getNodeGlobalScale(t),n=[t,t];e.eachItemGraphicEl(function(t,e){t.attr("scale",n)})},_getNodeGlobalScale:function(t){var e,n,t=t.coordinateSystem;return"view"!==t.type?1:(e=this._nodeScaleRatio,n=(n=t.scale)&&n[0]||1,((t.getZoom()-1)*e+1)/n)},updateLayout:function(t){jv(t.getGraph(),this._getNodeGlobalScale(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()}}),s({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},function(){}),s({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},function(){});function nx(t){return t=t instanceof Array?t:[t,t]}function ix(t){var e=t.coordinateSystem;e&&"view"!==e.type||((e=t.getGraph()).eachNode(function(t){var e=t.getModel();t.setLayout([+e.get("x"),+e.get("y")])}),ox(e))}function ox(t){t.eachEdge(function(t){var e=t.getModel().get("lineStyle.curveness")||0,n=bt(t.node1.getLayout()),i=bt(t.node2.getLayout()),o=[n,i];+e&&o.push([(n[0]+i[0])/2-(n[1]-i[1])*e,(n[1]+i[1])/2-(i[0]-n[0])*e]),t.setLayout(o)})}function ax(t){var e,n,i,o,s,l,a,r=t.coordinateSystem;r&&"view"!==r.type||(r=r.getBoundingRect(),e=(t=t.getData()).graph,n=0,i=t.getSum("value"),o=2*Math.PI/(i||t.count()),s=r.width/2+r.x,l=r.height/2+r.y,a=Math.min(r.width,r.height)/2,e.eachNode(function(t){var e=t.getValue("value");n+=o*(i?e:1)/2,t.setLayout([a*Math.cos(n)+s,a*Math.sin(n)+l]),n+=o*(i?e:1)/2}),t.setLayout({cx:s,cy:l}),e.eachEdge(function(t){var e,n=t.getModel().get("lineStyle.curveness")||0,i=bt(t.node1.getLayout()),o=bt(t.node2.getLayout()),a=(i[0]+o[0])/2,r=(i[1]+o[1])/2;+n&&(e=[s*(n*=3)+a*(1-n),l*n+r*(1-n)]),t.setLayout([i,o,e])}))}s({type:"graphRoam",event:"graphRoam",update:"none"},function(n,t){t.eachComponent({mainType:"series",query:n},function(t){var e=M0(t.coordinateSystem,n);t.setCenter&&t.setCenter(e.center),t.setZoom&&t.setZoom(e.zoom)})});var rx=It;Qc(function(t){var a=t.findComponents({mainType:"legend"});a&&a.length&&t.eachSeriesByType("graph",function(t){var e=t.getCategoriesData(),i=t.getGraph().data,o=e.mapArray(e.getName);i.filterSelf(function(t){var e=i.getItemModel(t).getShallow("category");if(null!=e){"number"==typeof e&&(e=o[e]);for(var n=0;n<a.length;n++)if(!a[n].isSelected(e))return!1}return!0})},this)}),nd(Yf("graph","circle",null)),nd(function(t){var r={};t.eachSeriesByType("graph",function(n){var i=n.getCategoriesData(),o=n.getData(),a={};i.each(function(t){var e=i.getName(t),e=(a["ec-"+e]=t,i.getItemModel(t).get("itemStyle.color")||n.getColorFromPalette(e,r));i.setItemVisual(t,"color",e)}),i.count()&&o.each(function(t){var e=o.getItemModel(t).getShallow("category");null!=e&&("string"==typeof e&&(e=a["ec-"+e]),o.getItemVisual(t,"color",!0)||o.setItemVisual(t,"color",i.getItemVisual(e,"color")))})})}),nd(function(t){t.eachSeriesByType("graph",function(t){var a=t.getGraph(),r=t.getEdgeData(),e=nx(t.get("edgeSymbol")),n=nx(t.get("edgeSymbolSize")),s="lineStyle.color".split("."),l="lineStyle.opacity".split(".");r.setVisual("fromSymbol",e&&e[0]),r.setVisual("toSymbol",e&&e[1]),r.setVisual("fromSymbolSize",n&&n[0]),r.setVisual("toSymbolSize",n&&n[1]),r.setVisual("color",t.get(s)),r.setVisual("opacity",t.get(l)),r.each(function(t){var e=r.getItemModel(t),n=a.getEdgeByIndex(t),t=nx(e.getShallow("symbol",!0)),i=nx(e.getShallow("symbolSize",!0)),o=e.get(s),e=e.get(l);switch(o){case"source":o=n.node1.getVisual("color");break;case"target":o=n.node2.getVisual("color")}t[0]&&n.setVisual("fromSymbol",t[0]),t[1]&&n.setVisual("toSymbol",t[1]),i[0]&&n.setVisual("fromSymbolSize",i[0]),i[1]&&n.setVisual("toSymbolSize",i[1]),n.setVisual("color",o),n.setVisual("opacity",e)})})}),ed(function(t,e){t.eachSeriesByType("graph",function(t){var e=t.get("layout"),n=t.coordinateSystem;if(n&&"view"!==n.type){var i=t.getData(),o=[];Z(n.dimensions,function(t){o=o.concat(i.mapDimension(t,!0))});for(var a=0;a<i.count();a++){for(var r=[],s=!1,l=0;l<o.length;l++){var u=i.get(o[l],a);isNaN(u)||(s=!0),r.push(u)}s?i.setItemLayout(a,n.dataToPoint(r)):i.setItemLayout(a,[NaN,NaN])}ox(i.graph)}else e&&"none"!==e||ix(t)})}),ed(function(t){t.eachSeriesByType("graph",function(t){"circular"===t.get("layout")&&ax(t)})}),ed(function(t){t.eachSeriesByType("graph",function(t){var c,d,p,e,i,n,o,a,r,s,l,u,g;(u=t.coordinateSystem)&&"view"!==u.type||("force"===t.get("layout")?(c=t.preservedPoints||{},d=t.getGraph(),p=d.data,l=d.edgeData,s=(e=t.getModel("force")).get("initLayout"),t.preservedPoints?p.each(function(t){var e=p.getId(t);p.setItemLayout(t,c[e]||[NaN,NaN])}):s&&"none"!==s?"circular"===s&&ax(t):ix(t),i=p.getDataExtent("value"),n=l.getDataExtent("value"),o=e.get("repulsion"),a=e.get("edgeLength"),D(o)||(o=[o,o]),a=[(a=D(a)?a:[a,a])[1],a[0]],r=p.mapArray("value",function(t,e){var n=p.getItemLayout(e),t=Os(t,i,o);return{w:t=isNaN(t)?(o[0]+o[1])/2:t,rep:t,fixed:p.getItemModel(e).get("fixed"),p:!n||isNaN(n[0])||isNaN(n[1])?null:n}}),s=l.mapArray("value",function(t,e){e=d.getEdgeByIndex(e),t=Os(t,n,a);return isNaN(t)&&(t=(a[0]+a[1])/2),{n1:r[e.node1.dataIndex],n2:r[e.node2.dataIndex],d:t,curveness:e.getModel().get("lineStyle.curveness")||0}}),l=(u=t.coordinateSystem).getBoundingRect(),u=function(d,p,t){for(var e=t.rect,n=e.width,i=e.height,g=[e.x+n/2,e.y+i/2],f=null==t.gravity?.1:t.gravity,o=0;o<d.length;o++){var a=d[o];a.p||(a.p=_t(n*(Math.random()-.5)+g[0],i*(Math.random()-.5)+g[1])),a.pp=bt(a.p),a.edges=null}var m=.6;return{warmUp:function(){m=.5},setFixed:function(t){d[t].fixed=!0},setUnfixed:function(t){d[t].fixed=!1},step:function(t){for(var e=[],n=d.length,i=0;i<p.length;i++){var o=p[i],a=o.n1,r=o.n2,s=(Tt(e,r.p,a.p),At(e)-o.d),o=r.w/(a.w+r.w);isNaN(o)&&(o=0),Lt(e,e),a.fixed||rx(a.p,a.p,e,o*s*m),r.fixed||rx(r.p,r.p,e,-(1-o)*s*m)}for(i=0;i<n;i++)(h=d[i]).fixed||(Tt(e,g,h.p),rx(h.p,h.p,e,f*m));for(i=0;i<n;i++)for(var a=d[i],l=i+1;l<n;l++){Tt(e,(r=d[l]).p,a.p),0===(s=At(e))&&(St(e,Math.random()-.5,Math.random()-.5),s=1);var u=(a.rep+r.rep)/s/s;a.fixed||rx(a.pp,a.pp,e,u),r.fixed||rx(r.pp,r.pp,e,-u)}for(var h,c=[],i=0;i<n;i++)(h=d[i]).fixed||(Tt(c,h.p,h.pp),rx(h.p,h.p,c,m),wt(h.pp,h.p));m*=.992,t&&t(d,p,m<.01)}}}(r,s,{rect:l,gravity:e.get("gravity")}),g=u.step,u.step=function(h){for(var t=0,e=r.length;t<e;t++)r[t].fixed&&wt(r[t].p,d.getNodeByIndex(t).getLayout());g(function(t,e,n){for(var i=0,o=t.length;i<o;i++)t[i].fixed||d.getNodeByIndex(i).setLayout(t[i].p),c[p.getId(i)]=t[i].p;for(i=0,o=e.length;i<o;i++){var a=e[i],r=d.getEdgeByIndex(i),s=a.n1.p,l=a.n2.p,u=r.getLayout();(u=u?u.slice():[])[0]=u[0]||[],u[1]=u[1]||[],wt(u[0],s),wt(u[1],l),+a.curveness&&(u[2]=[(s[0]+l[0])/2-(s[1]-l[1])*a.curveness,(s[1]+l[1])/2-(l[0]-s[0])*a.curveness]),r.setLayout(u)}h&&h(n)})},t.forceLayout=u,t.preservedPoints=c,u.step()):t.forceLayout=null)})}),td("graphView",{create:function(t,u){var h=[];return t.eachSeriesByType("graph",function(t){var e,n,i,o,a,r,s,l=t.get("coordinateSystem");l&&"view"!==l||(l=[],i=[],pa((e=t.getData()).mapArray(function(t){t=e.getItemModel(t);return[+t.get("x"),+t.get("y")]}),l,i),i[0]-l[0]==0&&(i[0]+=1,--l[0]),i[1]-l[1]==0&&(i[1]+=1,--l[1]),n=(i[0]-l[0])/(i[1]-l[1]),r=u,s=n,(a=(a=t).getBoxLayoutParams()).aspect=s,s=yl(a,{width:r.getWidth(),height:r.getHeight()}),isNaN(n)&&(l=[s.x,s.y],i=[s.x+s.width,s.y+s.height]),a=i[0]-l[0],r=i[1]-l[1],n=s.width,i=s.height,(o=t.coordinateSystem=new e0).zoomLimit=t.get("scaleLimit"),o.setBoundingRect(l[0],l[1],a,r),o.setViewRect(s.x,s.y,n,i),o.setCenter(t.get("center")),o.setZoom(t.get("zoom")),h.push(o))}),h}});i(Ku.extend({type:"series.boxplot",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:2,shadowOffsetY:2,shadowColor:"rgba(0,0,0,0.4)"}},animationEasing:"elasticOut",animationDuration:800}}),n,!0);var sx=["itemStyle"],lx=["emphasis","itemStyle"],ux=(lh.extend({type:"boxplot",render:function(t,e,n){var i=t.getData(),o=this.group,a=this._data,r=(this._data||o.removeAll(),"horizontal"===t.get("layout")?1:0);i.diff(a).add(function(t){var e;i.hasValue(t)&&(e=hx(i.getItemLayout(t),i,t,r,!0),i.setItemGraphicEl(t,e),o.add(e))}).update(function(t,e){var n,e=a.getItemGraphicEl(e);i.hasValue(t)?(n=i.getItemLayout(t),e?cx(n,e,i,t):e=hx(n,i,t,r),o.add(e),i.setItemGraphicEl(t,e)):o.remove(e)}).remove(function(t){t=a.getItemGraphicEl(t);t&&o.remove(t)}).execute(),this._data=i},remove:function(t){var e=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl(function(t){t&&e.remove(t)})},dispose:yt}),r.extend({type:"boxplotBoxPath",shape:{},buildPath:function(t,e){var n=e.points,i=0;for(t.moveTo(n[i][0],n[i][1]),i++;i<4;i++)t.lineTo(n[i][0],n[i][1]);for(t.closePath();i<n.length;i++)t.moveTo(n[i][0],n[i][1]),t.lineTo(n[++i][0],n[i][1])}}));function hx(t,e,n,i,o){var a,r,s=t.ends,i=new ux({shape:{points:o?(a=i,r=t,I(s,function(t){return(t=t.slice())[a]=r.initBaseline,t})):s}});return cx(t,i,e,n,o),i}function cx(t,e,n,i,o){var a=n.hostModel,o=((0,Is[o?"initProps":"updateProps"])(e,{shape:{points:t.ends}},a,i),n.getItemModel(i)),t=o.getModel(sx),a=n.getItemVisual(i,"color"),n=t.getItemStyle(["borderColor"]),i=(n.stroke=a,n.strokeNoScale=!0,e.useStyle(n),e.z2=100,o.getModel(lx).getItemStyle());ss(e,i)}var dx=["itemStyle","borderColor"];var px=Z;nd(function(i,t){var o=i.get("color");i.eachRawSeriesByType("boxplot",function(t){var e=o[t.seriesIndex%o.length],n=t.getData();n.setVisual({legendSymbol:"roundRect",color:t.get(dx)||e}),i.isSeriesFiltered(t)||n.each(function(t){var e=n.getItemModel(t);n.setItemVisual(t,{color:e.get(dx,!0)})})})}),ed(function(t){var i,o;i=[],o=[],t.eachSeriesByType("boxplot",function(t){var e=t.getBaseAxis(),n=S(o,e);n<0&&(n=o.length,o[n]=e,i[n]={axis:e,seriesModels:[]}),i[n].seriesModels.push(t)}),px(i,function(_){var e,t,n,i,o,a,r,s,l,u,h,c,d=_.seriesModels;d.length&&(l=(t=_).axis,i=t.seriesModels,o=i.length,a=t.boxWidthList=[],r=t.boxOffsetList=[],s=[],"category"===l.type?n=l.getBandWidth():(e=0,px(i,function(t){e=Math.max(e,t.getData().count())}),t=l.getExtent(),Math.abs(t[1]-t[0])),px(i,function(t){t=t.get("boxWidth");D(t)||(t=[t,t]),s.push([F(t[0],n)||0,F(t[1],n)||0])}),u=(l=.8*n-2)/o*.3,c=(h=(l-u*(o-1))/o)/2-l/2,px(i,function(t,e){r.push(c),c+=u+h,a.push(Math.min(Math.max(h,s[e][0]),s[e][1]))}),px(d,function(t,e){var o=_.boxOffsetList[e],e=_.boxWidthList[e],a=t.coordinateSystem,r=t.getData(),s=e/2,l="horizontal"===t.get("layout")?0:1,u=1-l,e=["x","y"],n=r.mapDimension(e[l]),i=r.mapDimension(e[u],!0);if(!(null==n||i.length<5))for(var h=0;h<r.count();h++){var c=r.get(n,h),d=y(c,i[2],h),p=y(c,i[0],h),g=y(c,i[1],h),f=y(c,i[3],h),c=y(c,i[4],h),m=[];v(m,g,0),v(m,f,1),m.push(p,g,c,f),x(m,p),x(m,c),x(m,d),r.setItemLayout(h,{initBaseline:d[u],ends:m})}function y(t,e,n){var i,e=r.get(e,n),n=[];return n[l]=t,n[u]=e,isNaN(t)||isNaN(e)?i=[NaN,NaN]:(i=a.dataToPoint(n))[l]+=o,i}function v(t,e,n){var i=e.slice(),e=e.slice();i[l]+=s,e[l]-=s,n?t.push(i,e):t.push(e,i)}function x(t,e){var n=e.slice(),e=e.slice();n[l]-=s,e[l]+=s,t.push(n,e)}}))})});function gx(t,e,n,i,o){og.call(this,t,e,n),this.type=i||"value",this.axisIndex=o}function fx(t,e,n,i,o,a){e[0]=yx(e[0],n),e[1]=yx(e[1],n),t=t||0;var r=n[1]-n[0],r=(null!=o&&(o=yx(o,[0,r])),null!=a&&(a=Math.max(a,null!=o?o:0)),"all"===i&&(o=a=Math.abs(e[1]-e[0]),i=0),mx(e,i)),t=(e[i]+=t,o||0),n=n.slice(),t=(r.sign<0?n[0]+=t:n[1]-=t,e[i]=yx(e[i],n),mx(e,i));return null!=o&&(t.sign!==r.sign||t.span<o)&&(e[1-i]=e[i]+r.sign*o),t=mx(e,i),null!=a&&t.span>a&&(e[1-i]=e[i]+t.sign*a),e}function mx(t,e){t=t[e]-t[1-e];return{span:Math.abs(t),sign:0<t||!(t<0)&&e?-1:1}}function yx(t,e){return Math.min(e[1],Math.max(e[0],t))}gx.prototype={constructor:gx,model:null,isHorizontal:function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")}},a(gx,og);var vx=Z,xx=Math.min,_x=Math.max,bx=Math.floor,Sx=Math.ceil,Mx=Es,Ix=Math.PI;function Tx(t,e,n){this._axesMap=E(),this._axesLayout={},this.dimensions=t.dimensions,this._rect,this._model=t,this._init(t,e,n)}function Ax(t,e){return xx(_x(t,e[0]),e[1])}Tx.prototype={type:"parallel",constructor:Tx,_init:function(t,i,e){var n=t.dimensions,o=t.parallelAxisIndex;vx(n,function(t,e){var e=o[e],n=i.getComponent("parallelAxis",e),t=this._axesMap.set(t,new gx(t,Lp(n),[0,0],n.get("type"),e)),e="category"===t.type;t.onBand=e&&n.get("boundaryGap"),t.inverse=n.get("inverse"),(n.axis=t).model=n,t.coordinateSystem=n.coordinateSystem=this},this)},update:function(t,e){this._updateAxesFromSeries(this._model,t)},containPoint:function(t){var e=this._makeLayoutInfo(),n=e.axisBase,i=e.layoutBase,o=e.pixelDimIndex,a=t[1-o],t=t[o];return n<=a&&a<=n+e.axisLength&&i<=t&&t<=i+e.layoutLength},getModel:function(){return this._model},_updateAxesFromSeries:function(e,i){i.eachSeries(function(t){var n;e.contains(t,i)&&(n=t.getData(),vx(this.dimensions,function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(n,n.mapDimension(t)),Cp(e.scale,e.model)},this))},this)},resize:function(t,e){this._rect=yl(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},getRect:function(){return this._rect},_makeLayoutInfo:function(){var t=this._model,e=this._rect,n=["x","y"],i=["width","height"],o=t.get("layout"),a="horizontal"===o?0:1,r=e[i[a]],s=[0,r],l=this.dimensions.length,u=Ax(t.get("axisExpandWidth"),s),h=Ax(t.get("axisExpandCount")||0,[0,l]),c=t.get("axisExpandable")&&3<l&&h<l&&1<h&&0<u&&0<r,d=t.get("axisExpandWindow"),s=(d?(p=Ax(d[1]-d[0],s),d[1]=d[0]+p):(p=Ax(u*(h-1),s),(d=[u*(t.get("axisExpandCenter")||bx(l/2))-p/2])[1]=d[0]+p),(r-p)/(l-h)),t=(s<3&&(s=0),[bx(Mx(d[0]/u,1))+1,Sx(Mx(d[1]/u,1))-1]),p=s/u*d[0];return{layout:o,pixelDimIndex:a,layoutBase:e[n[a]],layoutLength:r,axisBase:e[n[1-a]],axisLength:e[i[1-a]],axisExpandable:c,axisExpandWidth:u,axisCollapseWidth:s,axisExpandWindow:d,axisCount:l,winInnerIndices:t,axisExpandWindow0Pos:p}},_layoutAxes:function(){var a=this._rect,t=this._axesMap,e=this.dimensions,r=this._makeLayoutInfo(),s=r.layout;t.each(function(t){var e=[0,r.axisLength],n=t.inverse?1:0;t.setExtent(e[n],e[1-n])}),vx(e,function(t,e){var e=(r.axisExpandable?function(t,e){var n,i,o=e.layoutLength,a=e.axisExpandWidth,r=e.axisCount,s=e.axisCollapseWidth,l=e.winInnerIndices,u=s,h=!1;return t<l[0]?(n=t*s,i=s):t<=l[1]?(n=e.axisExpandWindow0Pos+t*a-e.axisExpandWindow[0],u=a,h=!0):(n=o-(r-1-t)*s,i=s),{position:n,axisNameAvailableWidth:u,axisLabelShow:h,nameTruncateMaxWidth:i}}:function(t,e){return{position:(e=e.layoutLength/(e.axisCount-1))*t,axisNameAvailableWidth:e,axisLabelShow:!0}})(e,r),n={horizontal:{x:e.position,y:r.axisLength},vertical:{x:0,y:e.position}},n=[n[s].x+a.x,n[s].y+a.y],i={horizontal:Ix/2,vertical:0}[s],o=se();de(o,o,i),ce(o,o,n),this._axesLayout[t]={position:n,rotation:i,transform:o,axisNameAvailableWidth:e.axisNameAvailableWidth,axisLabelShow:e.axisLabelShow,nameTruncateMaxWidth:e.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},getAxis:function(t){return this._axesMap.get(t)},dataToPoint:function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},eachActiveState:function(e,t,n,i){null==n&&(n=0),null==i&&(i=e.count());var o=this._axesMap,a=this.dimensions,r=[],s=[];Z(a,function(t){r.push(e.mapDimension(t)),s.push(o.get(t).model)});for(var l=this.hasAxisBrushed(),u=n;u<i;u++){if(l){for(var h="active",c=e.getValues(r,u),d=0,p=a.length;d<p;d++)if("inactive"===s[d].getActiveState(c[d])){h="inactive";break}}else h="normal";t(h,u)}},hasAxisBrushed:function(){for(var t=this.dimensions,e=this._axesMap,n=!1,i=0,o=t.length;i<o;i++)"normal"!==e.get(t[i]).model.getActiveState()&&(n=!0);return n},axisCoordToPoint:function(t,e){return _s([t,0],this._axesLayout[e].transform)},getAxisLayout:function(t){return N(this._axesLayout[t])},getSlidedAxisExpandWindow:function(t){var e,n,i,o,a=this._makeLayoutInfo(),r=a.pixelDimIndex,s=a.axisExpandWindow.slice(),l=s[1]-s[0],u=[0,a.axisExpandWidth*(a.axisCount-1)];return this.containPoint(t)?(t=t[r]-a.layoutBase-a.axisExpandWindow0Pos,r="slide",n=a.axisCollapseWidth,o=null!=(i=this._model.get("axisExpandSlideTriggerArea"))[0],n?(o&&n&&t<l*i[0]?(r="jump",e=t-l*i[2]):o&&n&&t>l*(1-i[0])?(r="jump",e=t-l*(1-i[2])):0<=(e=t-l*i[1])&&(e=t-l*(1-i[1]))<=0&&(e=0),(e*=a.axisExpandWidth/n)?fx(e,s,u,"all"):r="none"):(l=s[1]-s[0],(s=[_x(0,u[1]*t/l-l/2)])[1]=xx(u[1],s[0]+l),s[0]=s[1]-l),{axisExpandWindow:s,behavior:r}):{behavior:"none",axisExpandWindow:s}}},eu.register("parallel",{create:function(i,o){var a=[];return i.eachComponent("parallel",function(t,e){var n=new Tx(t,i,o);n.name="parallel_"+e,n.resize(t,o),(t.coordinateSystem=n).model=t,a.push(n)}),i.eachSeries(function(t){var e;"parallel"===t.get("coordinateSystem")&&(e=i.queryComponents({mainType:"parallel",index:t.get("parallelIndex"),id:t.get("parallelId")})[0],t.coordinateSystem=e.coordinateSystem)}),a}});h=u.extend({type:"baseParallelAxis",axis:null,activeIntervals:[],getAreaSelectStyle:function(){return zo([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},setActiveIntervals:function(t){var e=this.activeIntervals=N(t);if(e)for(var n=e.length-1;0<=n;n--)zs(e[n])},getActiveState:function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null!=t&&!isNaN(t))if(1===e.length){var n=e[0];if(n[0]<=t&&t<=n[1])return"active"}else for(var i=0,o=e.length;i<o;i++)if(e[i][0]<=t&&t<=e[i][1])return"active";return"inactive"}});f(h.prototype,zp),fg("parallel",h,function(t,e){return e.type||(e.data?"category":"value")},{type:"value",dim:null,areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10}),u.extend({type:"parallel",dependencies:["parallelAxis"],coordinateSystem:null,dimensions:null,parallelAxisIndex:null,layoutMode:"box",defaultOption:{zlevel:0,z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},init:function(){u.prototype.init.apply(this,arguments),this.mergeOption({})},mergeOption:function(t){var e=this.option;t&&f(e,t,!0),this._initDimensions()},contains:function(t,e){t=t.get("parallelIndex");return null!=t&&e.getComponent("parallel",t)===this},setAxisExpand:function(e){Z(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(t){e.hasOwnProperty(t)&&(this.option[t]=e[t])},this)},_initDimensions:function(){var e=this.dimensions=[],n=this.parallelAxisIndex=[];Z(tt(this.dependentModels.parallelAxis,function(t){return(t.get("parallelIndex")||0)===this.componentIndex},this),function(t){e.push("dim"+t.get("dim")),n.push(t.componentIndex)})}});s({type:"axisAreaSelect",event:"axisAreaSelected"},function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},function(t){t.axis.model.setActiveIntervals(e.intervals)})}),s("parallelAxisExpand",function(e,t){t.eachComponent({mainType:"parallel",query:e},function(t){t.setAxisExpand(e)})});var Dx=L,Cx=Z,Lx=I,kx=Math.min,Px=Math.max,Nx=Math.pow,Ox=1e4,Ex=6,zx=6,Rx="globalPan",Bx={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},Vx={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},Gx={brushStyle:{lineWidth:2,stroke:"rgba(0,0,0,0.3)",fill:"rgba(0,0,0,0.1)"},transformable:!0,brushMode:"single",removeOnClick:!1},Fx=0;function Wx(t){H&&P(t),Wt.call(this),this._zr=t,this.group=new R,this._brushType,this._brushOption,this._panels,this._track=[],this._dragging,this._covers=[],this._creatingCover,this._creatingPanel,this._enableGlobalPan,H&&this._mounted,this._uid="brushController_"+Fx++,this._handlers={},Cx(y1,function(t,e){this._handlers[e]=A(t,this)},this)}function Hx(t,e){var n,i,o=t._zr;t._enableGlobalPan||(n=Rx,i=t._uid,s0(o)[n]=i),Cx(t._handlers,function(t,e){o.on(e,t)}),t._brushType=e.brushType,t._brushOption=f(N(Gx),e,!0)}function Zx(t){var e,n,i,o=t._zr;e=o,n=Rx,i=t._uid,(e=s0(e))[n]===i&&(e[n]=null),Cx(t._handlers,function(t,e){o.off(e,t)}),t._brushType=t._brushOption=null}function Xx(t,e){var n=x1[e.brushType].createCover(t,e);return n.__brushOption=e,jx(n,e),t.group.add(n),n}function Yx(t,e){var n=Kx(e);return n.endCreating&&(n.endCreating(t,e),jx(e,e.__brushOption)),e}function Ux(t,e){var n=e.__brushOption;Kx(e).updateCoverShape(t,e,n.range,n)}function jx(t,e){var n=e.z;null==n&&(n=Ox),t.traverse(function(t){t.z=n,t.z2=n})}function qx(t,e){Kx(e).updateCommon(t,e),Ux(t,e)}function Kx(t){return x1[t.__brushOption.brushType]}function $x(t,e,n){var i,o,a=t._panels;return!a||(o=t._transform,Cx(a,function(t){t.isTargetByCursor(e,n,o)&&(i=t)}),i)}function Jx(t,e){t=t._panels;return!t||null==(e=e.__brushOption.panelId)||t[e]}function Qx(e){var t=e._covers,n=t.length;return Cx(t,function(t){e.group.remove(t)},e),t.length=0,n}function t1(t,e){var n=Lx(t._covers,function(t){var t=t.__brushOption,e=N(t.range);return{brushType:t.brushType,panelId:t.panelId,range:e}});t.trigger("brush",n,{isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function e1(t){var e=t.length-1;return[t[0],t[e=e<0?0:e]]}function n1(e,n,t,i){var o=new R;return o.add(new V({name:"main",style:r1(t),silent:!0,draggable:!0,cursor:"move",drift:Dx(e,n,o,"nswe"),ondragend:Dx(t1,n,{isEnd:!0})})),Cx(i,function(t){o.add(new V({name:t,style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:Dx(e,n,o,t),ondragend:Dx(t1,n,{isEnd:!0})}))}),o}function i1(t,e,n,i){var o=i.brushStyle.lineWidth||0,a=Px(o,zx),r=n[0][0],s=n[1][0],l=r-o/2,u=s-o/2,h=n[0][1],n=n[1][1],c=h-a+o/2,d=n-a+o/2,h=h-r,n=n-s,p=h+o,o=n+o;a1(t,e,"main",r,s,h,n),i.transformable&&(a1(t,e,"w",l,u,a,o),a1(t,e,"e",c,u,a,o),a1(t,e,"n",l,u,p,a),a1(t,e,"s",l,d,p,a),a1(t,e,"nw",l,u,a,a),a1(t,e,"ne",c,u,a,a),a1(t,e,"sw",l,d,a,a),a1(t,e,"se",c,d,a,a))}function o1(n,i){var t=i.__brushOption,o=t.transformable,e=i.childAt(0);e.useStyle(r1(t)),e.attr({silent:!o,cursor:o?"move":"default"}),Cx(["w","e","n","s","se","sw","ne","nw"],function(t){var e=i.childOfName(t),t=function t(e,n){if(1<n.length)return"e"!==(i=[t(e,(n=n.split(""))[0]),t(e,n[1])])[0]&&"w"!==i[0]||i.reverse(),i.join("");var i;return{left:"w",right:"e",top:"n",bottom:"s"}[i=ws({w:"left",e:"right",n:"top",s:"bottom"}[n],l1(e))]}(n,t);e&&e.attr({silent:!o,invisible:!o,cursor:o?Vx[t]+"-resize":null})})}function a1(t,e,n,i,o,a,r){var n=e.childOfName(n);n&&n.setShape((n=d1(t,e,[[i,o],[i+a,o+r]]),t=kx(n[0][0],n[1][0]),e=kx(n[0][1],n[1][1]),{x:t,y:e,width:Px(n[0][0],n[1][0])-t,height:Px(n[0][1],n[1][1])-e}))}function r1(t){return C({strokeNoScale:!0},t.brushStyle)}function s1(t,e,n,i){var o=[kx(t,n),kx(e,i)],t=[Px(t,n),Px(e,i)];return[[o[0],t[0]],[o[1],t[1]]]}function l1(t){return xs(t.group)}function u1(t,e,n,i,o,a,r,s){var l=i.__brushOption,u=t(l.range),h=c1(n,a,r);Cx(o.split(""),function(t){t=Bx[t];u[t[0]][t[1]]+=h[t[0]]}),l.range=e(s1(u[0][0],u[1][0],u[0][1],u[1][1])),qx(n,i),t1(n,{isEnd:!1})}function h1(t,e,n,i,o){var a=e.__brushOption.range,r=c1(t,n,i);Cx(a,function(t){t[0]+=r[0],t[1]+=r[1]}),qx(t,e),t1(t,{isEnd:!1})}function c1(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 d1(t,e,n){e=Jx(t,e);return e&&!0!==e?e.clipPath(n,t._transform):N(n)}function p1(t){t=t.event;t.preventDefault&&t.preventDefault()}function g1(t,e,n){return t.childOfName("main").contain(e,n)}function f1(t,e,n,i){var o,a,r=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],Nx(e*e+n*n,.5)>Ex}(t)||r?(s&&!r&&("single"===l.brushMode&&Qx(t),(a=N(l)).brushType=m1(a.brushType,s),a.panelId=!0===s?null:s.panelId,r=t._creatingCover=Xx(t,a),t._covers.push(r)),r&&(a=x1[m1(t._brushType,s)],r.__brushOption.range=a.getCreatingRange(d1(t,r,t._track)),i&&(Yx(t,r),a.updateCommon(t,r)),Ux(t,r),o={isEnd:i})):i&&"single"===l.brushMode&&l.removeOnClick&&$x(t,e,n)&&Qx(t)&&(o={isEnd:i,removeOnClick:!0}),o}function m1(t,e){return"auto"===t?(H&&P(e&&e.defaultBrushType,'MUST have defaultBrushType when brushType is "atuo"'),e.defaultBrushType):t}Wx.prototype={constructor:Wx,enableBrush:function(t){return H&&P(this._mounted),this._brushType&&Zx(this),t.brushType&&Hx(this,t),this},setPanels:function(t){var e;return t&&t.length?(e=this._panels={},Z(t,function(t){e[t.panelId]=N(t)})):this._panels=null,this},mount:function(t){t=t||{},H&&(this._mounted=!0),this._enableGlobalPan=t.enableGlobalPan;var e=this.group;return this._zr.add(e),e.attr({position:t.position||[0,0],rotation:t.rotation||0,scale:t.scale||[1,1]}),this._transform=e.getLocalTransform(),this},eachCover:function(t,e){Cx(this._covers,t,e)},updateCovers:function(i){H&&P(this._mounted),i=I(i,function(t){return f(N(Gx),t,!0)});var o=this._covers,a=this._covers=[],r=this,s=this._creatingCover;return new hd(o,i,function(t,e){return n(t.__brushOption,e)},n).add(t).update(t).remove(function(t){o[t]!==s&&r.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?a[t]=o[e]:(t=a[t]=null!=e?(o[e].__brushOption=n,o[e]):Yx(r,Xx(r,n)),qx(r,t))}},unmount:function(){if(!H||this._mounted)return this.enableBrush(!1),Qx(this),this._zr.remove(this.group),H&&(this._mounted=!1),this},dispose:function(){this.unmount(),this.off()}},i(Wx,Wt);var y1={mousedown:function(t){var e;this._dragging?v1.call(this,t):t.target&&t.target.draggable||(p1(t),e=this.group.transformCoordToLocal(t.offsetX,t.offsetY),this._creatingCover=null,(this._creatingPanel=$x(this,t,e))&&(this._dragging=!0,this._track=[e.slice()]))},mousemove:function(t){var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);(function(t,e,n){if(t._brushType){var i=t._zr,o=t._covers,a=$x(t,e,n);if(!t._dragging)for(var r=0;r<o.length;r++){var s=o[r].__brushOption;if(a&&(!0===a||s.panelId===a.panelId)&&x1[s.brushType].contain(o[r],n[0],n[1]))return}a&&i.setCursorStyle("crosshair")}})(this,t,e),this._dragging&&(p1(t),t=f1(this,t,e,!1))&&t1(this,t)},mouseup:v1};function v1(t){this._dragging&&(p1(t),t=f1(this,t,this.group.transformCoordToLocal(t.offsetX,t.offsetY),!0),this._dragging=!1,this._track=[],this._creatingCover=null,t)&&t1(this,t)}var x1={lineX:_1(0),lineY:_1(1),rect:{createCover:function(t,e){return n1(Dx(u1,function(t){return t},function(t){return t}),t,e,["w","e","n","s","se","sw","ne","nw"])},getCreatingRange:function(t){t=e1(t);return s1(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(t,e,n,i){i1(t,e,n,i)},updateCommon:o1,contain:g1},polygon:{createCover:function(t,e){var n=new R;return n.add(new vr({name:"main",style:r1(e),silent:!0})),n},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new yr({name:"main",draggable:!0,drift:Dx(h1,t,e),ondragend:Dx(t1,t,{isEnd:!0})}))},updateCoverShape:function(t,e,n,i){e.childAt(0).setShape({points:d1(t,e,n)})},updateCommon:o1,contain:g1}};function _1(a){return{createCover:function(t,e){return n1(Dx(u1,function(t){t=[t,[0,100]];return a&&t.reverse(),t},function(t){return t[a]}),t,e,[["w","e"],["n","s"]][a])},getCreatingRange:function(t){t=e1(t);return[kx(t[0][a],t[1][a]),Px(t[0][a],t[1][a])]},updateCoverShape:function(t,e,n,i){var o=Jx(t,e),o=[n,!0!==o&&o.getLinearBrushOtherExtent?o.getLinearBrushOtherExtent(a,t._transform):[0,[(n=t._zr).getWidth(),n.getHeight()][1-a]]];a&&o.reverse(),i1(t,e,o,i)},updateCommon:o1,contain:g1}}function w1(n){return n=M1(n),function(t,e){return Ss(t,n)}}function b1(n,i){return n=M1(n),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)]}}function S1(i,o,a){return i=M1(i),function(t,e,n){return i.contain(e[0],e[1])&&!v0(t,o,a)}}function M1(t){return z.create(t)}var I1=["axisLine","axisTickLabel","axisName"],T1=rd({type:"parallelAxis",init:function(t,e){T1.superApply(this,"init",arguments),(this._brushController=new Wx(e.getZr())).on("brush",A(this._onBrush,this))},render:function(t,e,n,i){var o,a,r,s,l;r=t,s=e,(l=i)&&"axisAreaSelect"===l.type&&s.findComponents({mainType:"parallelAxis",query:l})[0]===r||(this.axisModel=t,this.api=n,this.group.removeAll(),s=this._axisGroup,this._axisGroup=new R,this.group.add(this._axisGroup),t.get("show")&&(r=(l=e.getComponent("parallel",t.get("parallelIndex"))).coordinateSystem,o=(e=t.getAreaSelectStyle()).width,a=t.axis.dim,r=O({strokeContainThreshold:o},r.getAxisLayout(a)),a=new Vg(t,r),Z(I1,a.add,a),this._axisGroup.add(a.getGroup()),this._refreshBrushController(r,e,t,l,o,n),a=i&&!1===i.animation?null:t,bs(s,this._axisGroup,a)))},_refreshBrushController:function(t,e,n,i,o,a){var r,s=n.axis.getExtent(),l=s[1]-s[0],u=Math.min(30,.1*Math.abs(l)),s=z.create({x:s[0],y:-o/2,width:l,height:o});s.x-=u,s.width+=2*u,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,position:t.position}).setPanels([{panelId:"pl",clipPath:w1(s),isTargetByCursor:S1(s,a,i),getLinearBrushOtherExtent:b1(s,0)}]).enableBrush({brushType:"lineX",brushStyle:e,removeOnClick:!0}).updateCovers((r=n.axis,I(n.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[r.dataToCoord(t[0],!0),r.dataToCoord(t[1],!0)]}})))},_onBrush:function(t,e){var n=this.axisModel,i=n.axis,t=I(t,function(t){return[i.coordToData(t.range[0],!0),i.coordToData(t.range[1],!0)]});!n.option.realtime!==e.isEnd&&!e.removeOnClick||this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:n.id,intervals:t})},dispose:function(){this._brushController.dispose()}});rd({type:"parallel",render:function(t,e,n){this._model=t,this._api=n,this._handlers||(this._handlers={},Z(A1,function(t,e){n.getZr().on(e,this._handlers[e]=A(t,this))},this)),vh(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},dispose:function(t,n){Z(this._handlers,function(t,e){n.getZr().off(e,t)}),this._handlers=null},_throttledDispatchExpand:function(t){this._dispatchExpand(t)},_dispatchExpand:function(t){t&&this._api.dispatchAction(O({type:"parallelAxisExpand"},t))}});var A1={mousedown:function(t){D1(this,"click")&&(this._mouseDownPoint=[t.offsetX,t.offsetY])},mouseup:function(t){var e=this._mouseDownPoint;if(D1(this,"click")&&e){var n=[t.offsetX,t.offsetY];if(5<Math.pow(e[0]-n[0],2)+Math.pow(e[1]-n[1],2))return;e=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);"none"!==e.behavior&&this._dispatchExpand({axisExpandWindow:e.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){var e,n;!this._mouseDownPoint&&D1(this,"mousemove")&&("jump"===(n=(t=(e=this._model).coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY])).behavior)&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===n?null:{axisExpandWindow:t.axisExpandWindow,animation:"jump"===n&&null}))}};function D1(t,e){t=t._model;return t.get("axisExpandable")&&t.get("axisExpandTriggerOn")===e}Jc(function(t){var e,n,i=t;i.parallel||(e=!1,Z(i.series,function(t){t&&"parallel"===t.type&&(e=!0)}),e&&(i.parallel=[{}])),Z(ho((n=t).parallelAxis),function(t){var e;k(t)&&(e=t.parallelIndex||0,e=ho(n.parallel)[e])&&e.parallelAxisDefault&&f(t,e.parallelAxisDefault,!1)})}),Ku.extend({type:"series.parallel",dependencies:["parallel"],visualColorAccessPath:"lineStyle.color",getInitialData:function(t,e){var n,i=this.getSource(),o=i,a=this;return o.encodeDefine||(a=a.ecModel.getComponent("parallel",a.get("parallelIndex")))&&(n=o.encodeDefine=E(),Z(a.dimensions,function(t){var e=+t.replace("dim","");n.set(t,e)})),Fd(i,this)},getRawIndicesByActiveState:function(n){var t=this.coordinateSystem,i=this.getData(),o=[];return t.eachActiveState(i,function(t,e){n===t&&o.push(i.getRawIndex(e))}),o},defaultOption:{zlevel:0,z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"}});function C1(t,e,n,i){for(var o,a=[],r=0;r<n.length;r++){var s=n[r],l=t.get(t.mapDimension(s),e);o=l,("category"===i.getAxis(s).type?null==o:null==o||isNaN(o))||a.push(i.dataToPoint(l,s))}return a}function L1(t,e,n,i,o){i=C1(t,n,i,o),o=new vr({shape:{points:i},silent:!0,z2:10});return e.add(o),t.setItemGraphicEl(n,o),o}function k1(t){var e=t.get("smooth",!0);return!0===e&&(e=.3),{lineStyle:t.getModel("lineStyle").getLineStyle(),smooth:null!=e?e:.3}}function P1(t,e,n,i){var o=i.lineStyle,o=(e.hasItemOption&&(o=e.getItemModel(n).getModel("lineStyle").getLineStyle()),t.useStyle(o),t.style);o.fill=null,o.stroke=e.getItemVisual(n,"color"),o.opacity=e.getItemVisual(n,"opacity"),i.smooth&&(t.shape.smooth=i.smooth)}lh.extend({type:"parallel",init:function(){this._dataGroup=new R,this.group.add(this._dataGroup),this._data,this._initialized},render:function(i,t,e,o){var n,a,r,s,l,u=this._dataGroup,h=i.getData(),c=this._data,d=i.coordinateSystem,p=d.dimensions,g=k1(i);h.diff(c).add(function(t){P1(L1(h,u,t,p,d),h,t,g)}).update(function(t,e){var e=c.getItemGraphicEl(e),n=C1(h,t,p,d);h.setItemGraphicEl(t,e),G(e,{shape:{points:n}},o&&!1===o.animation?null:i,t),P1(e,h,t,g)}).remove(function(t){t=c.getItemGraphicEl(t);u.remove(t)}).execute(),this._initialized||(this._initialized=!0,a=i,r=function(){setTimeout(function(){u.removeClipPath()})},s=(n=d).model,n=n.getRect(),l=new V({shape:{x:n.x,y:n.y,width:n.width,height:n.height}}),s="horizontal"===s.get("layout")?"width":"height",l.setShape(s,0),vs(l,{shape:{width:n.width,height:n.height}},a,r),s=l,u.setClipPath(s)),this._data=h},incrementalPrepareRender:function(t,e,n){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},incrementalRender:function(t,e,n){for(var i=e.getData(),o=e.coordinateSystem,a=o.dimensions,r=k1(e),s=t.start;s<t.end;s++){var l=L1(i,this._dataGroup,s,a,o);l.incremental=!0,P1(l,i,s,r)}},dispose:function(){},remove:function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null}});var N1=["lineStyle","normal","opacity"],O1=(nd({seriesType:"parallel",reset:function(t,e,n){var i=t.getModel("itemStyle"),o=t.getModel("lineStyle"),e=e.get("color"),o=o.get("color")||i.get("color")||e[t.seriesIndex%e.length],i=t.get("inactiveOpacity"),e=t.get("activeOpacity"),a=t.getModel("lineStyle").getLineStyle(),r=t.coordinateSystem,t=t.getData(),s={normal:a.opacity,active:e,inactive:i};return t.setVisual("color",o),{progress:function(t,i){r.eachActiveState(i,function(t,e){var n=s[t];"normal"===t&&i.hasItemOption&&null!=(t=i.getItemModel(e).get(N1,!0))&&(n=t),i.setItemVisual(e,"opacity",n)},t.start,t.end)}}}}),Ku.extend({type:"series.gauge",getInitialData:function(t,e){var n=t.data||[];return D(n)||(n=[n]),t.data=n,Kf(this,["value"])},defaultOption:{zlevel:0,z:2,center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,lineStyle:{color:[[.2,"#91c7ae"],[.8,"#63869e"],[1,"#c23531"]],width:30}},splitLine:{show:!0,length:30,lineStyle:{color:"#eee",width:2,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:8,lineStyle:{color:"#eee",width:1,type:"solid"}},axisLabel:{show:!0,distance:5,color:"auto"},pointer:{show:!0,length:"80%",width:8},itemStyle:{color:"auto"},title:{show:!0,offsetCenter:[0,"-40%"],color:"#333",fontSize:15},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"auto",fontSize:30}}}),r.extend({type:"echartsGaugePointer",shape:{angle:0,width:10,r:10,x:0,y:0},buildPath:function(t,e){var n=Math.cos,i=Math.sin,o=e.r,a=e.width,r=e.angle,s=e.x-n(r)*a*(o/3<=a?1:2),l=e.y-i(r)*a*(o/3<=a?1:2),r=e.angle-Math.PI/2;t.moveTo(s,l),t.lineTo(e.x+n(r)*a,e.y+i(r)*a),t.lineTo(e.x+n(e.angle)*o,e.y+i(e.angle)*o),t.lineTo(e.x-n(r)*a,e.y-i(r)*a),t.lineTo(s,l)}}));function E1(t,e){return e&&("string"==typeof e?t=e.replace("{value}",null!=t?t:""):"function"==typeof e&&(t=e(t))),t}var z1=2*Math.PI,R1=(lh.extend({type:"gauge",render:function(t,e,n){this.group.removeAll();var i,o,a,r,s=t.get("axisLine.lineStyle.color"),l=(o=n,a=(i=t).get("center"),r=o.getWidth(),l=o.getHeight(),r=Math.min(r,l),{cx:F(a[0],o.getWidth()),cy:F(a[1],o.getHeight()),r:F(i.get("radius"),r/2)});this._renderMain(t,e,n,s,l)},dispose:function(){},_renderMain:function(t,e,n,i,o){for(var a=this.group,r=t.getModel("axisLine").getModel("lineStyle"),s=t.get("clockwise"),l=-t.get("startAngle")/180*Math.PI,u=((p=-t.get("endAngle")/180*Math.PI)-l)%z1,h=l,c=r.get("width"),d=0;d<i.length;d++){var p=l+u*Math.min(Math.max(i[d][0],0),1),g=new pr({shape:{startAngle:h,endAngle:p,cx:o.cx,cy:o.cy,clockwise:s,r0:o.r-c,r:o.r},silent:!0});g.setStyle({fill:i[d][1]}),g.setStyle(r.getLineStyle(["color","borderWidth","borderColor"])),a.add(g),h=p}function f(t){if(t<=0)return i[0][1];for(var e=0;e<i.length;e++)if(i[e][0]>=t&&(0===e?0:i[e-1][0])<t)return i[e][1];return i[e-1][1]}var m;s||(m=l,l=p,p=m),this._renderTicks(t,e,n,f,o,l,p,s),this._renderPointer(t,e,n,f,o,l,p,s),this._renderTitle(t,e,n,f,o),this._renderDetail(t,e,n,f,o)},_renderTicks:function(t,e,n,i,o,a,r,s){for(var l=this.group,u=o.cx,h=o.cy,c=o.r,d=+t.get("min"),p=+t.get("max"),g=t.getModel("splitLine"),f=t.getModel("axisTick"),m=t.getModel("axisLabel"),y=t.get("splitNumber"),v=f.get("splitNumber"),x=F(g.get("length"),c),_=F(f.get("length"),c),w=a,b=(r-a)/y,S=b/v,M=g.getModel("lineStyle").getLineStyle(),I=f.getModel("lineStyle").getLineStyle(),T=0;T<=y;T++){var A,D,C,L=Math.cos(w),k=Math.sin(w);if(g.get("show")&&(A=new Sr({shape:{x1:L*c+u,y1:k*c+h,x2:L*(c-x)+u,y2:k*(c-x)+h},style:M,silent:!0}),"auto"===M.stroke&&A.setStyle({stroke:i(T/y)}),l.add(A)),m.get("show")&&(A=E1(Es(T/y*(p-d)+d),m.get("formatter")),D=m.get("distance"),C=i(T/y),l.add(new B({style:hs({},m,{text:A,x:L*(c-x-D)+u,y:k*(c-x-D)+h,textVerticalAlign:k<-.4?"top":.4<k?"bottom":"middle",textAlign:L<-.4?"left":.4<L?"right":"center"},{autoColor:C}),silent:!0}))),f.get("show")&&T!==y){for(var P=0;P<=v;P++){var L=Math.cos(w),k=Math.sin(w),N=new Sr({shape:{x1:L*c+u,y1:k*c+h,x2:L*(c-_)+u,y2:k*(c-_)+h},silent:!0,style:I});"auto"===I.stroke&&N.setStyle({stroke:i((T+P/v)/y)}),l.add(N),w+=S}w-=S}else w+=b}},_renderPointer:function(n,t,e,o,a,i,r,s){var l,u,h,c,d=this.group,p=this._data;n.get("pointer.show")?(l=[+n.get("min"),+n.get("max")],u=[i,r],h=n.getData(),c=h.mapDimension("value"),h.diff(p).add(function(t){var e=new O1({shape:{angle:i}});vs(e,{shape:{angle:Os(h.get(c,t),l,u,!0)}},n),d.add(e),h.setItemGraphicEl(t,e)}).update(function(t,e){e=p.getItemGraphicEl(e);G(e,{shape:{angle:Os(h.get(c,t),l,u,!0)}},n),d.add(e),h.setItemGraphicEl(t,e)}).remove(function(t){t=p.getItemGraphicEl(t);d.remove(t)}).execute(),h.eachItemGraphicEl(function(t,e){var n=h.getItemModel(e),i=n.getModel("pointer");t.setShape({x:a.cx,y:a.cy,width:F(i.get("width"),a.r),r:F(i.get("length"),a.r)}),t.useStyle(n.getModel("itemStyle").getItemStyle()),"auto"===t.style.fill&&t.setStyle("fill",o(Os(h.get(c,e),l,[0,1],!0))),ss(t,n.getModel("emphasis.itemStyle").getItemStyle())}),this._data=h):p&&p.eachItemGraphicEl(function(t){d.remove(t)})},_renderTitle:function(t,e,n,i,o){var a,r,s,l=t.getData(),u=l.mapDimension("value"),h=t.getModel("title");h.get("show")&&(r=h.get("offsetCenter"),a=o.cx+F(r[0],o.r),r=o.cy+F(r[1],o.r),o=+t.get("min"),s=+t.get("max"),i=i(Os(t.getData().get(u,0),[o,s],[0,1],!0)),this.group.add(new B({silent:!0,style:hs({},h,{x:a,y:r,text:l.getName(0),textAlign:"center",textVerticalAlign:"middle"},{autoColor:i,forceRich:!0})})))},_renderDetail:function(t,e,n,i,o){var a,r,s,l=t.getModel("detail"),u=+t.get("min"),h=+t.get("max");l.get("show")&&(r=l.get("offsetCenter"),a=o.cx+F(r[0],o.r),r=o.cy+F(r[1],o.r),s=F(l.get("width"),o.r),o=F(l.get("height"),o.r),i=i(Os(t=(i=t.getData()).get(i.mapDimension("value"),0),[u,h],[0,1],!0)),this.group.add(new B({silent:!0,style:hs({},l,{x:a,y:r,text:E1(t,l.get("formatter")),textWidth:isNaN(s)?null:s,textHeight:isNaN(o)?null:o,textAlign:"center",textVerticalAlign:"middle"},{autoColor:i,forceRich:!0})})))}}),sd({type:"series.funnel",init:function(t){R1.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()},this._defaultLabelLine(t)},getInitialData:function(t,e){return Kf(this,["value"])},_defaultLabelLine:function(t){co(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},getDataParams:function(t){var e=this.getData(),n=R1.superCall(this,"getDataParams",t),i=e.mapDimension("value"),o=e.getSum(i);return n.percent=o?+(e.get(i,t)/o*100).toFixed(2):0,n.$vars.push("percent"),n},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1,type:"solid"}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}}}}));function B1(t,e){R.call(this);var n=new yr,i=new vr,o=new B;function a(){i.ignore=i.hoverIgnore,o.ignore=o.hoverIgnore}function r(){i.ignore=i.normalIgnore,o.ignore=o.normalIgnore}this.add(n),this.add(i),this.add(o),this.updateData(t,e,!0),this.on("emphasis",a).on("normal",r).on("mouseover",a).on("mouseout",r)}var c=B1.prototype,V1=["itemStyle","opacity"];c.updateData=function(t,e,n){var i=this.childAt(0),o=t.hostModel,a=t.getItemModel(e),r=t.getItemLayout(e),s=null==(s=t.getItemModel(e).get(V1))?1:s,n=(i.useStyle({}),n?(i.setShape({points:r.points}),i.setStyle({opacity:0}),vs(i,{style:{opacity:s}},o,e)):G(i,{style:{opacity:s},shape:{points:r.points}},o,e),a.getModel("itemStyle")),s=t.getItemVisual(e,"color");i.setStyle(C({lineJoin:"round",fill:s},n.getItemStyle(["opacity"]))),i.hoverStyle=n.getModel("emphasis").getItemStyle(),this._updateLabel(t,e),ss(this)},c._updateLabel=function(t,e){var n=this.childAt(1),i=this.childAt(2),o=t.hostModel,a=t.getItemModel(e),r=t.getItemLayout(e).label,o=(t.getItemVisual(e,"color"),G(n,{shape:{points:r.linePoints||r.linePoints}},o,e),G(i,{style:{x:r.x,y:r.y}},o,e),i.attr({rotation:r.rotation,origin:[r.x,r.y],z2:10}),a.getModel("label")),s=a.getModel("emphasis.label"),l=a.getModel("labelLine"),a=a.getModel("emphasis.labelLine"),u=t.getItemVisual(e,"color");us(i.style,i.hoverStyle={},o,s,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:t.getName(e),autoColor:u,useInsideStyle:!!r.inside},{textAlign:r.textAlign,textVerticalAlign:r.verticalAlign}),i.ignore=i.normalIgnore=!o.get("show"),i.hoverIgnore=!s.get("show"),n.ignore=n.normalIgnore=!l.get("show"),n.hoverIgnore=!a.get("show"),n.setStyle({stroke:u}),n.setStyle(l.getModel("lineStyle").getLineStyle()),n.hoverStyle=a.getModel("lineStyle").getLineStyle()},a(B1,R),lh.extend({type:"funnel",render:function(t,e,n){var i=t.getData(),o=this._data,a=this.group;i.diff(o).add(function(t){var e=new B1(i,t);i.setItemGraphicEl(t,e),a.add(e)}).update(function(t,e){e=o.getItemGraphicEl(e);e.updateData(i,t),a.add(e),i.setItemGraphicEl(t,e)}).remove(function(t){t=o.getItemGraphicEl(t);a.remove(t)}).execute(),this._data=i},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}}),nd(nm("funnel")),ed(function(t,w,e){t.eachSeriesByType("funnel",function(t){function e(t,e){var n,i=Os(o.get(a,t)||0,[u,h],s,!0);switch(c){case"left":n=r.x;break;case"center":n=r.x+(r.width-i)/2;break;case"right":n=r.x+r.width-i}return[[n,e],[n+i,e]]}var o=t.getData(),a=o.mapDimension("value"),n=t.get("sort"),r=(l=w,yl(t.getBoxLayoutParams(),{width:l.getWidth(),height:l.getHeight()})),i=function(t,e){for(var n=t.mapDimension("value"),i=t.mapArray(n,function(t){return t}),o=[],a="ascending"===e,r=0,s=t.count();r<s;r++)o[r]=r;return"function"==typeof e?o.sort(e):"none"!==e&&o.sort(function(t,e){return a?i[t]-i[e]:i[e]-i[t]}),o}(o,n),s=[F(t.get("minSize"),r.width),F(t.get("maxSize"),r.width)],l=o.getDataExtent(a),u=t.get("min"),h=t.get("max"),c=(null==u&&(u=Math.min(l[0],0)),null==h&&(h=l[1]),t.get("funnelAlign")),d=t.get("gap"),p=(r.height-d*(o.count()-1))/o.count(),g=r.y;"ascending"===n&&(p=-p,d=-d,g+=r.height,i=i.reverse());for(var f,m=0;m<i.length;m++){var y=i[m],v=i[m+1],x=o.getItemModel(y).get("itemStyle.height"),_=(null==x?x=p:(x=F(x,r.height),"ascending"===n&&(x=-x)),e(y,g)),v=e(v,g+x);g+=x+d,o.setItemLayout(y,{points:_.concat(v.slice().reverse())})}(f=o).each(function(t){var e,n,i,o,a,r,s,l=f.getItemModel(t),u=l.getModel("label").get("position"),l=l.getModel("labelLine"),t=f.getItemLayout(t),h=t.points,c="inner"===u||"inside"===u||"center"===u;c?(a="center",r=[[e=(h[0][0]+h[1][0]+h[2][0]+h[3][0])/4,s=(h[0][1]+h[1][1]+h[2][1]+h[3][1])/4],[e,s]]):(l=l.get("length"),a="left"===u?(n=(h[3][0]+h[0][0])/2,i=(h[3][1]+h[0][1])/2,e=(o=n-l)-5,"right"):(n=(h[1][0]+h[2][0])/2,i=(h[1][1]+h[2][1])/2,e=(o=n+l)+5,"left"),r=[[n,i],[o,i]],s=i),t.label={linePoints:r,x:e,y:s,verticalAlign:"middle",textAlign:a,inside:c}})})}),Qc(lm("funnel"));var G1=Ku.extend({type:"series.sankey",layoutInfo:null,getInitialData:function(t){var e=t.edges||t.links,t=t.data||t.nodes;if(t&&e)return Vv(t,e,this,!0).data},setNodePosition:function(t,e){t=this.option.data[t];t.localX=e[0],t.localY=e[1]},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},formatTooltip:function(t,e,n){var i;return"edge"===n?(i=(i=(n=this.getDataParams(t,n)).data).source+" -- "+i.target,n.value&&(i+=" : "+n.value),nl(i)):G1.superCall(this,"formatTooltip",t,e)},optionUpdated:function(){var t=this.option;!0===t.focusNodeAdjacency&&(t.focusNodeAdjacency="allEdges")},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",layout:null,left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,focusNodeAdjacency:!1,layoutIterations:32,label:{show:!0,position:"right",color:"#000",fontSize:12},itemStyle:{borderWidth:1,borderColor:"#333"},lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.6}},animationEasing:"linear",animationDuration:1e3}}),F1=["itemStyle","opacity"],W1=["lineStyle","opacity"];function H1(t,e){return t.getVisual("opacity")||t.getModel().get(e)}function Z1(t,e,n){var i=t.getGraphicEl(),o=H1(t,e);null!=n&&(null==o&&(o=1),o*=n),i.downplay&&i.downplay(),i.traverse(function(t){"group"!==t.type&&t.setStyle("opacity",o)})}function X1(t,e){var n=H1(t,e),e=t.getGraphicEl();e.highlight&&e.highlight(),e.traverse(function(t){"group"!==t.type&&t.setStyle("opacity",n)})}var Y1=Vr({shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,cpx2:0,cpy2:0,extent:0,orient:""},buildPath:function(t,e){var n=e.extent;"vertical"===e.orient?(t.moveTo(e.x1,e.y1),t.bezierCurveTo(e.cpx1,e.cpy1,e.cpx2,e.cpy2,e.x2,e.y2),t.lineTo(e.x2+n,e.y2),t.bezierCurveTo(e.cpx2+n,e.cpy2,e.cpx1+n,e.cpy1,e.x1+n,e.y1)):(t.moveTo(e.x1,e.y1),t.bezierCurveTo(e.cpx1,e.cpy1,e.cpx2,e.cpy2,e.x2,e.y2),t.lineTo(e.x2,e.y2+n),t.bezierCurveTo(e.cpx2,e.cpy2+n,e.cpx1,e.cpy1+n,e.x1,e.y1+n)),t.closePath()}});function U1(t,l,u,h,c){Z(t,function(t){var e,n,i,o,a,r=0,s=t.length;if("vertical"===c){for(t.sort(function(t,e){return t.getLayout().x-e.getLayout().x}),i=0;i<s;i++)0<(n=r-(e=t[i]).getLayout().x)&&(o=e.getLayout().x+n,e.setLayout({x:o},!0)),r=e.getLayout().x+e.getLayout().dx+l;if(0<(n=r-l-h))for(o=e.getLayout().x-n,e.setLayout({x:o},!0),r=o,i=s-2;0<=i;--i)0<(n=(e=t[i]).getLayout().x+e.getLayout().dx+l-r)&&(o=e.getLayout().x-n,e.setLayout({x:o},!0)),r=e.getLayout().x}else{for(t.sort(function(t,e){return t.getLayout().y-e.getLayout().y}),i=0;i<s;i++)0<(n=r-(e=t[i]).getLayout().y)&&(a=e.getLayout().y+n,e.setLayout({y:a},!0)),r=e.getLayout().y+e.getLayout().dy+l;if(0<(n=r-l-u))for(a=e.getLayout().y-n,e.setLayout({y:a},!0),r=a,i=s-2;0<=i;--i)0<(n=(e=t[i]).getLayout().y+e.getLayout().dy+l-r)&&(a=e.getLayout().y-n,e.setLayout({y:a},!0)),r=e.getLayout().y}})}function j1(t,e){return K1(t.node2,e)*t.getValue()}function q1(t,e){return K1(t.node1,e)*t.getValue()}function K1(t,e){return"vertical"===e?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function $1(t){return t.getValue()}function J1(t,e,n){for(var i=0,o=t.length,a=-1;++a<o;){var r=+e.call(t,t[a],n);isNaN(r)||(i+=r)}return i}ld({type:"sankey",_model:null,_focusAdjacencyDisabled:!1,render:function(v,t,i){var e,n,o=this,a=v.getGraph(),x=this.group,r=v.layoutInfo,_=r.width,w=r.height,s=v.getData(),b=v.getData("edge"),S=v.get("orient");this._model=v,x.removeAll(),x.attr("position",[r.x,r.y]),a.eachEdge(function(t){var e=new Y1;e.dataIndex=t.dataIndex,e.seriesIndex=v.seriesIndex,e.dataType="edge";var n,i,o,a,r,s,l,u=t.getModel("lineStyle"),h=u.get("curveness"),c=t.node1.getLayout(),d=t.node1.getModel(),p=d.get("localX"),d=d.get("localY"),g=t.node2.getLayout(),f=t.node2.getModel(),m=f.get("localX"),f=f.get("localY"),y=t.getLayout();switch(e.shape.extent=Math.max(1,y.dy),p="vertical"===(e.shape.orient=S)?(n=(null!=p?p*_:c.x)+y.sy,i=(null!=d?d*w:c.y)+c.dy,o=(null!=m?m*_:g.x)+y.ty,r=n,s=i*(1-h)+(a=null!=f?f*w:g.y)*h,l=o,i*h+a*(1-h)):(n=(null!=p?p*_:c.x)+c.dx,i=(null!=d?d*w:c.y)+y.sy,r=n*(1-h)+(o=null!=m?m*_:g.x)*h,s=i,l=n*h+o*(1-h),a=(null!=f?f*w:g.y)+y.ty),e.setShape({x1:n,y1:i,x2:o,y2:a,cpx1:r,cpy1:s,cpx2:l,cpy2:p}),e.setStyle(u.getItemStyle()),e.style.fill){case"source":e.style.fill=t.node1.getVisual("color");break;case"target":e.style.fill=t.node2.getVisual("color")}ss(e,t.getModel("emphasis.lineStyle").getItemStyle()),x.add(e),b.setItemGraphicEl(t.dataIndex,e)}),a.eachNode(function(t){var e=t.getLayout(),n=t.getModel(),i=n.get("localX"),o=n.get("localY"),a=n.getModel("label"),r=n.getModel("emphasis.label"),i=new V({shape:{x:null!=i?i*_:e.x,y:null!=o?o*w:e.y,width:e.dx,height:e.dy},style:n.getModel("itemStyle").getItemStyle()}),o=t.getModel("emphasis.itemStyle").getItemStyle();us(i.style,o,a,r,{labelFetcher:v,labelDataIndex:t.dataIndex,defaultText:t.id,isRectText:!0}),i.setStyle("fill",t.getVisual("color")),ss(i,o),x.add(i),s.setItemGraphicEl(t.dataIndex,i),i.dataType="node"}),s.eachItemGraphicEl(function(t,n){var e=s.getItemModel(n);e.get("draggable")&&(t.drift=function(t,e){o._focusAdjacencyDisabled=!0,this.shape.x+=t,this.shape.y+=e,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:v.id,dataIndex:s.getRawIndex(n),localX:this.shape.x/_,localY:this.shape.y/w})},t.ondragend=function(){o._focusAdjacencyDisabled=!1},t.draggable=!0,t.cursor="move"),e.get("focusNodeAdjacency")&&(t.off("mouseover").on("mouseover",function(){o._focusAdjacencyDisabled||i.dispatchAction({type:"focusNodeAdjacency",seriesId:v.id,dataIndex:t.dataIndex})}),t.off("mouseout").on("mouseout",function(){o._focusAdjacencyDisabled||i.dispatchAction({type:"unfocusNodeAdjacency",seriesId:v.id})}))}),b.eachItemGraphicEl(function(t,e){b.getItemModel(e).get("focusNodeAdjacency")&&(t.off("mouseover").on("mouseover",function(){o._focusAdjacencyDisabled||i.dispatchAction({type:"focusNodeAdjacency",seriesId:v.id,edgeDataIndex:t.dataIndex})}),t.off("mouseout").on("mouseout",function(){o._focusAdjacencyDisabled||i.dispatchAction({type:"unfocusNodeAdjacency",seriesId:v.id})}))}),!this._data&&v.get("animation")&&x.setClipPath((r=x.getBoundingRect(),a=v,e=function(){x.removeClipPath()},vs(n=new V({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}}),{shape:{width:r.width+20,height:r.height+20}},a,e),n)),this._data=v.getData()},dispose:function(){},focusNodeAdjacency:function(t,e,n,i){var o=this._model.getData(),a=o.graph,r=i.dataIndex,o=o.getItemModel(r),i=i.edgeDataIndex;null==r&&null==i||(r=a.getNodeByIndex(r),i=a.getEdgeByIndex(i),a.eachNode(function(t){Z1(t,F1,.1)}),a.eachEdge(function(t){Z1(t,W1,.1)}),r&&(X1(r,F1),"outEdges"===(a=o.get("focusNodeAdjacency"))?Z(r.outEdges,function(t){t.dataIndex<0||(X1(t,W1),X1(t.node2,F1))}):"inEdges"===a?Z(r.inEdges,function(t){t.dataIndex<0||(X1(t,W1),X1(t.node1,F1))}):"allEdges"===a&&Z(r.edges,function(t){t.dataIndex<0||(X1(t,W1),X1(t.node1,F1),X1(t.node2,F1))})),i&&(X1(i,W1),X1(i.node1,F1),X1(i.node2,F1)))},unfocusNodeAdjacency:function(t,e,n,i){var o=this._model.getGraph();o.eachNode(function(t){Z1(t,F1)}),o.eachEdge(function(t){Z1(t,W1)})}}),s({type:"dragNode",event:"dragNode",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(t){t.setNodePosition(e.dataIndex,[e.localX,e.localY])})}),ed(function(t,W,e){t.eachSeriesByType("sankey",function(t){for(var e,n=t.get("nodeWidth"),i=t.get("nodeGap"),o=(o=W,yl(t.getBoxLayoutParams(),{width:o.getWidth(),height:o.getHeight()})),a=(t.layoutInfo=o).width,o=o.height,r=t.getGraph(),s=r.nodes,r=r.edges,l=(Z(s,function(t){var e=J1(t.outEdges,$1),n=J1(t.inEdges,$1),e=Math.max(e,n);t.setLayout({value:e},!0)}),r=r,n=n,i=i,a=a,o=o,e=0!==tt(s=s,function(t){return 0===t.getLayout().value}).length?0:t.get("layoutIterations"),t=t.get("orient"),s),u=r,h=n,n=a,c=o,d=t,p=[],g=[],f=[],m=[],y=0,v=0;v<u.length;v++)p[v]=1;for(v=0;v<l.length;v++)g[v]=l[v].inEdges.length,0===g[v]&&f.push(l[v]);for(;f.length;){for(var x=0;x<f.length;x++){var _=f[x];"vertical"===d?(_.setLayout({y:y},!0),_.setLayout({dy:h},!0)):(_.setLayout({x:y},!0),_.setLayout({dx:h},!0));for(var w=0;w<_.outEdges.length;w++){var b=_.outEdges[w],b=(p[u.indexOf(b)]=0,b.node2);0==--g[l.indexOf(b)]&&m.push(b)}}++y,f=m,m=[]}for(v=0;v<p.length;v++)if(H&&1===p[v])throw new Error("Sankey is a DAG, the original data has cycle!");var S=y,z=d,M=(Z(l,function(t){t.outEdges.length||("vertical"===z?t.setLayout({y:S-1},!0):t.setLayout({x:S-1},!0))}),l),I="vertical"===d?(c-h)/(y-1):(n-h)/(y-1),R=d,c=(Z(M,function(t){var e;"vertical"===R?(e=t.getLayout().y*I,t.setLayout({y:e},!0)):(e=t.getLayout().x*I,t.setLayout({x:e},!0))}),s),n=r,T=o,A=a,D=i,C=e,L=t,k=function(t,e){var n=[],i="vertical"===e?"y":"x",o=To(t,function(t){return t.getLayout()[i]});return o.keys.sort(function(t,e){return t-e}),Z(o.keys,function(t){n.push(o.buckets.get(t))}),n}(c,L),M=k,r=n,B=T,V=A,P=D,N=L,O=[],E=(Z(M,function(t){var e=t.length,n=0;Z(t,function(t){n+=t.getLayout().value}),t="vertical"===N?(V-(e-1)*P)/n:(B-(e-1)*P)/n,O.push(t)}),O.sort(function(t,e){return t-e}),O[0]);Z(M,function(t){Z(t,function(t,e){var n=t.getLayout().value*E;"vertical"===N?(t.setLayout({x:e},!0),t.setLayout({dx:n},!0)):(t.setLayout({y:e},!0),t.setLayout({dy:n},!0))})}),Z(r,function(t){var e=+t.getValue()*E;t.setLayout({dy:e},!0)}),U1(k,D,T,A,L);for(var G=1;0<C;C--)(function(t,i,o){Z(t.slice().reverse(),function(t){Z(t,function(t){var e,n;t.outEdges.length&&(e=J1(t.outEdges,j1,o)/J1(t.outEdges,$1,o),"vertical"===o?(n=t.getLayout().x+(e-K1(t,o))*i,t.setLayout({x:n},!0)):(n=t.getLayout().y+(e-K1(t,o))*i,t.setLayout({y:n},!0)))})})})(k,G*=.99,L),U1(k,D,T,A,L),function(t,i,o){Z(t,function(t){Z(t,function(t){var e,n;t.inEdges.length&&(e=J1(t.inEdges,q1,o)/J1(t.inEdges,$1,o),"vertical"===o?(n=t.getLayout().x+(e-K1(t,o))*i,t.setLayout({x:n},!0)):(n=t.getLayout().y+(e-K1(t,o))*i,t.setLayout({y:n},!0)))})})}(k,G,L),U1(k,D,T,A,L);var o=s,F=t;Z(o,function(t){"vertical"===F?(t.outEdges.sort(function(t,e){return t.node2.getLayout().x-e.node2.getLayout().x}),t.inEdges.sort(function(t,e){return t.node1.getLayout().x-e.node1.getLayout().x})):(t.outEdges.sort(function(t,e){return t.node2.getLayout().y-e.node2.getLayout().y}),t.inEdges.sort(function(t,e){return t.node1.getLayout().y-e.node1.getLayout().y}))}),Z(o,function(t){var e=0,n=0;Z(t.outEdges,function(t){t.setLayout({sy:e},!0),e+=t.getLayout().dy}),Z(t.inEdges,function(t){t.setLayout({ty:n},!0),n+=t.getLayout().dy})})})}),nd(function(t,e){t.eachSeriesByType("sankey",function(n){var i,o,t=n.getGraph().nodes;t.length&&(i=1/0,o=-1/0,Z(t,function(t){t=t.getLayout().value;t<i&&(i=t),o<t&&(o=t)}),Z(t,function(t){var e=new M({type:"color",mappingMethod:"linear",dataExtent:[i,o],visual:n.get("color")}).mapValueToVisual(t.getLayout().value),e=(t.setVisual("color",e),t.getModel().get("itemStyle.color"));null!=e&&t.setVisual("color",e)}))})});function Q1(t,e,n,i,o){og.call(this,t,e,n),this.type=i||"value",this.position=o||"bottom",this.orient=null}function t_(t,e,n){this.dimension="single",this.dimensions=["single"],this._axis=null,this._rect,this._init(t,e,n),this.model=t}function e_(t,e){e=e||{};var n=t.coordinateSystem,i=t.axis,o={},a=i.position,i=i.orient,n=n.getRect(),n=[n.x,n.x+n.width,n.y,n.y+n.height],r={horizontal:{top:n[2],bottom:n[3]},vertical:{left:n[0],right:n[1]}},r=(o.position=["vertical"===i?r.vertical[a]:n[0],"horizontal"===i?r.horizontal[a]:n[3]],o.rotation=Math.PI/2*{horizontal:0,vertical:1}[i],o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,right:1,left:-1}[a],t.get("axisTick.inside")&&(o.tickDirection=-o.tickDirection),rt(e.labelInside,t.get("axisLabel.inside"))&&(o.labelDirection=-o.labelDirection),e.rotate);return null==r&&(r=t.get("axisLabel.rotate")),o.labelRotation="top"===a?-r:r,o.z2=1,o}Q1.prototype={constructor:Q1,model:null,isHorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},pointToData:function(t,e){return this.coordinateSystem.pointToData(t,e)[0]},toGlobalCoord:null,toLocalCoord:null},a(Q1,og),eu.register("single",{create:function(i,o){var a=[];return i.eachComponent("singleAxis",function(t,e){var n=new t_(t,i,o);n.name="single_"+e,n.resize(t,o),t.coordinateSystem=n,a.push(n)}),i.eachSeries(function(t){var e;"singleAxis"===t.get("coordinateSystem")&&(e=i.queryComponents({mainType:"singleAxis",index:t.get("singleAxisIndex"),id:t.get("singleAxisId")})[0],t.coordinateSystem=e&&e.coordinateSystem)}),a},dimensions:(t_.prototype={type:"singleAxis",axisPointerEnabled:!0,constructor:t_,_init:function(t,e,n){var i=this.dimension,i=new Q1(i,Lp(t),[0,0],t.get("type"),t.get("position")),o="category"===i.type;i.onBand=o&&t.get("boundaryGap"),i.inverse=t.get("inverse"),i.orient=t.get("orient"),(t.axis=i).model=t,(i.coordinateSystem=this)._axis=i},update:function(t,e){t.eachSeries(function(t){var e;t.coordinateSystem===this&&(Z((e=t.getData()).mapDimension(this.dimension,!0),function(t){this._axis.scale.unionExtentFromData(e,t)},this),Cp(this._axis.scale,this._axis.model))},this)},resize:function(t,e){this._rect=yl({left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")},{width:e.getWidth(),height:e.getHeight()}),this._adjustAxis()},getRect:function(){return this._rect},_adjustAxis:function(){var t=this._rect,e=this._axis,n=e.isHorizontal(),i=n?[0,t.width]:[0,t.height],o=e.reverse?1:0;e.setExtent(i[o],i[1-o]),this._updateAxisTransform(e,n?t.x:t.y)},_updateAxisTransform:function(t,e){var n=t.getExtent(),i=n[0]+n[1],n=t.isHorizontal();t.toGlobalCoord=n?function(t){return t+e}:function(t){return i-t+e},t.toLocalCoord=n?function(t){return t-e}:function(t){return i-t+e}},getAxis:function(){return this._axis},getBaseAxis:function(){return this._axis},getAxes:function(){return[this._axis]},getTooltipAxes:function(){return{baseAxes:[this.getAxis()]}},containPoint:function(t){var e=this.getRect(),n=this.getAxis();return"horizontal"===n.orient?n.contain(n.toLocalCoord(t[0]))&&t[1]>=e.y&&t[1]<=e.y+e.height:n.contain(n.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},pointToData:function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},dataToPoint:function(t){var e=this.getAxis(),n=this.getRect(),i=[],o="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),i[o]=e.toGlobalCoord(e.dataToCoord(+t)),i[1-o]=0==o?n.y+n.height/2:n.x+n.width/2,i}}).dimensions});var n_=["axisLine","axisTickLabel","axisName"],i_="splitLine",o_=Qg.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(t,e,n,i){var o=this.group,a=(o.removeAll(),e_(t)),a=new Vg(t,a);Z(n_,a.add,a),o.add(a.getGroup()),t.get(i_+".show")&&this["_"+i_](t),o_.superCall(this,"render",t,e,n,i)},_splitLine:function(t){var e=t.axis;if(!e.scale.isBlank()){for(var n=t.getModel("splitLine"),i=n.getModel("lineStyle"),o=i.get("width"),a=(a=i.get("color"))instanceof Array?a:[a],r=t.coordinateSystem.getRect(),s=e.isHorizontal(),l=[],u=0,h=e.getTicksCoords({tickModel:n}),c=[],d=[],p=0;p<h.length;++p){var g=e.toGlobalCoord(h[p].coord),g=(s?(c[0]=g,c[1]=r.y,d[0]=g,d[1]=r.y+r.height):(c[0]=r.x,c[1]=g,d[0]=r.x+r.width,d[1]=g),u++%a.length);l[g]=l[g]||[],l[g].push(new Sr(Xr({shape:{x1:c[0],y1:c[1],x2:d[0],y2:d[1]},style:{lineWidth:o},silent:!0})))}for(p=0;p<l.length;++p)this.group.add(Hr(l[p],{style:{stroke:a[p%a.length],lineDash:i.getLineDash(o),lineWidth:o},silent:!0}))}}}),n=u.extend({type:"singleAxis",layoutMode:"box",axis:null,coordinateSystem:null,getCoordSysModel:function(){return this}});function a_(t,e){var n,i,o=[],a=t.seriesIndex;return null==a||!(e=e.getSeriesByIndex(a))||null==(a=xo(n=e.getData(),t))||a<0||D(a)?{point:[]}:(t=n.getItemGraphicEl(a),i=e.coordinateSystem,e.getTooltipPosition?o=e.getTooltipPosition(a)||[]:i&&i.dataToPoint?o=i.dataToPoint(n.getValues(I(i.dimensions,function(t){return n.mapDimension(t)}),a,!0))||[]:t&&((e=t.getBoundingRect().clone()).applyTransform(t.transform),o=[e.x+e.width/2,e.y+e.height/2]),{point:o,el:t})}f(n.prototype,zp),fg("single",n,function(t,e){return e.type||(e.data?"category":"value")},{left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:2,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:2}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}});var r_=Z,s_=L,l_=_o();function u_(t,e,n,i,o){var a,r,s,l,u,h,c,d,p,g,f=t.axis;!f.scale.isBlank()&&f.containData(e)&&(t.involveSeries?(l=e,u=t.axis,h=u.dim,c=l,d=[],p=Number.MAX_VALUE,g=-1,r_(t.seriesModels,function(e,t){var n,i=e.getData().mapDimension(h,!0);if(e.getAxisTooltipData)var o=e.getAxisTooltipData(i,l,u),a=o.dataIndices,o=o.nestestValue;else{if(!(a=e.getData().indicesOfNearest(i[0],l,"category"===u.type?.5:null)).length)return;o=e.getData().get(i[0],a[0])}null!=o&&isFinite(o)&&(i=l-o,(n=Math.abs(i))<=p)&&((n<p||0<=i&&g<0)&&(p=n,g=i,c=o,d.length=0),r_(a,function(t){d.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})}))}),s=(a={payloadBatch:d,snapToValue:c}).snapToValue,(r=a.payloadBatch)[0]&&null==o.seriesIndex&&O(o,r[0]),!i&&t.snap&&f.containData(s)&&null!=s&&(e=s),n.showPointer(t,e,r,o),n.showTooltip(t,a,s)):n.showPointer(t,e))}function h_(t,e,n,i){t[e.key]={value:n,payloadBatch:i}}function c_(t,e,n,i){var o,a,n=n.payloadBatch,r=e.axis,s=r.model,l=e.axisPointerModel;e.triggerTooltip&&n.length&&(o=Jg(e=e.coordSys.model),(a=t.map[o])||(a=t.map[o]={coordSysId:e.id,coordSysIndex:e.componentIndex,coordSysType:e.type,coordSysMainType:e.mainType,dataByAxis:[]},t.list.push(a)),a.dataByAxis.push({axisDim:r.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 d_(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 p_(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}ad({type:"axisPointer",coordSysAxesInfo:null,defaultOption:{show:"auto",triggerOn:null,zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#aaa",width:1,type:"solid"},shadowStyle:{color:"rgba(150,150,150,0.3)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,shadowBlur:3,shadowColor:"#aaa"},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 g_=_o(),f_=Z;function m_(t,e,n){var i,c,d;function o(t,h){c.on(t,function(e){n=d;var n,i,t,o,a,r,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))}f_(g_(c).records,function(t){t&&h(t,e,l.dispatchAction)}),o=d,r=(t=l.pendings).showTip.length,s=t.hideTip.length,r?a=t.showTip[r-1]:s&&(a=t.hideTip[s-1]),a&&(a.dispatchAction=null,o.dispatchAction(a))})}y.node||(i=e.getZr(),g_(i).records||(g_(i).records={}),d=e,g_(c=i).initialized||(g_(c).initialized=!0,o("click",L(v_,"click")),o("mousemove",L(v_,"mousemove")),o("globalout",y_)),(g_(i).records[t]||(g_(i).records[t]={})).handler=n)}function y_(t,e,n){t.handler("leave",null,n)}function v_(t,e,n,i){e.handler(t,n,i)}function x_(t,e){y.node||(e=e.getZr(),(g_(e).records||{})[t]&&(g_(e).records[t]=null))}var __=rd({type:"axisPointer",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})})},remove:function(t,e){x_(e.getZr(),"axisPointer"),__.superApply(this._model,"remove",arguments)},dispose:function(t,e){x_("axisPointer",e),__.superApply(this._model,"dispose",arguments)}}),w_=_o(),b_=N,S_=A;function M_(){}function I_(t,e,n,i){!function n(i,t){{var o;if(k(i)&&k(t))return o=!0,Z(t,function(t,e){o=o&&n(i[e],t)}),!!o}return i===t}(w_(n).lastProp,i)&&(w_(n).lastProp=i,e?G(n,i,t):(n.stopAnimation(),n.attr(i)))}function T_(t,e){t[e.get("label.show")?"show":"hide"]()}function A_(t){return{position:t.position.slice(),rotation:t.rotation||0}}function D_(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 C_(t){var e,n=t.get("type"),t=t.getModel(n+"Style");return"line"===n?(e=t.getLineStyle()).fill=null:"shadow"===n&&((e=t.getAreaStyle()).stroke=null),e}function L_(t,e,n,i,o){var a,r=k_(n.get("value"),e.axis,e.ecModel,n.get("seriesDataIndices"),{precision:n.get("label.precision"),formatter:n.get("label.formatter")}),n=n.getModel("label"),s=Qs(n.get("padding")||0),l=n.getFont(),u=ii(r,l),h=o.position,c=u.width+s[1]+s[3],u=u.height+s[0]+s[2],s=o.align,s=("right"===s&&(h[0]-=c),"center"===s&&(h[0]-=c/2),o.verticalAlign),d=("bottom"===s&&(h[1]-=u),"middle"===s&&(h[1]-=u/2),o=h,s=c,a=u,d=(i=i).getWidth(),i=i.getHeight(),o[0]=Math.min(o[0]+s,d)-s,o[1]=Math.min(o[1]+a,i)-a,o[0]=Math.max(o[0],0),o[1]=Math.max(o[1],0),n.get("backgroundColor"));d&&"auto"!==d||(d=e.get("axisLine.lineStyle.color")),t.label={shape:{x:0,y:0,width:c,height:u,r:n.get("borderRadius")},position:h.slice(),style:{text:r,textFont:l,textFill:n.getTextColor(),textPosition:"inside",fill:d,stroke:n.get("borderColor")||"transparent",lineWidth:n.get("borderWidth")||0,shadowBlur:n.get("shadowBlur"),shadowColor:n.get("shadowColor"),shadowOffsetX:n.get("shadowOffsetX"),shadowOffsetY:n.get("shadowOffsetY")},z2:10}}function k_(t,e,n,i,o){t=e.scale.parse(t);var a,r=e.scale.getLabel(t,{precision:o.precision}),o=o.formatter;return o&&(a={value:Pp(e,t),seriesData:[]},Z(i,function(t){var e=n.getSeriesByIndex(t.seriesIndex),t=t.dataIndexInside,e=e&&e.getDataParams(t);e&&a.seriesData.push(e)}),T(o)?r=o.replace("{value}",r):et(o)&&(r=o(a))),r}function P_(t,e,n){var i=se();return de(i,i,n.rotation),ce(i,i,n.position),_s([t.dataToCoord(e),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}function N_(t,e,n,i,o,a){var r=Vg.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=o.get("label.margin"),L_(e,i,o,a,{position:P_(i.axis,t,n),align:r.textAlign,verticalAlign:r.textVerticalAlign})}function O_(t,e,n){return{x1:t[n=n||0],y1:t[1-n],x2:e[n],y2:e[1-n]}}function E_(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}}function z_(t,e,n,i,o,a){return{cx:t,cy:e,r0:n,r:i,startAngle:o,endAngle:a,clockwise:!0}}Lo((M_.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(t,e,n,i){var o,a,r=e.get("value"),s=e.get("status");this._axisModel=t,this._axisPointerModel=e,this._api=n,!i&&this._lastValue===r&&this._lastStatus===s||(this._lastValue=r,this._lastStatus=s,i=this._group,o=this._handle,s&&"hide"!==s?(i&&i.show(),o&&o.show(),this.makeElOption(s={},r,t,e,n),(a=s.graphicKey)!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=a,a=this._moveAnimation=this.determineAnimation(t,e),i?(a=L(I_,e,a),this.updatePointerEl(i,s,a,e),this.updateLabelEl(i,s,a,e)):(i=this._group=new R,this.createPointerEl(i,s,t,e),this.createLabelEl(i,s,t,e),n.getZr().add(i)),D_(i,e,!0),this._renderHandle(r)):(i&&i.hide(),o&&o.hide()))},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineAnimation:function(t,e){var n,i=e.get("animation"),o=t.axis,a="category"===o.type,e=e.get("snap");return!(!e&&!a)&&("auto"===i||null==i?(n=this.animationThreshold,a&&o.getBandWidth()>n||!!e&&(a=Kg(t).seriesDataCount,e=o.getExtent(),Math.abs(e[0]-e[1])/a>n)):!0===i)},makeElOption:function(t,e,n,i,o){},createPointerEl:function(t,e,n,i){var o=e.pointer;o&&(o=w_(t).pointerEl=new Is[o.type](b_(e.pointer)),t.add(o))},createLabelEl:function(t,e,n,i){e.label&&(e=w_(t).labelEl=new V(b_(e.label)),t.add(e),T_(e,i))},updatePointerEl:function(t,e,n){t=w_(t).pointerEl;t&&(t.setStyle(e.pointer.style),n(t,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,n,i){t=w_(t).labelEl;t&&(t.setStyle(e.label.style),n(t,{shape:e.label.shape,position:e.label.position}),T_(t,i))},_renderHandle:function(t){var e,n,i,o,a,r;!this._dragging&&this.updateHandleTransform&&(n=this._axisPointerModel,i=this._api.getZr(),o=this._handle,a=n.getModel("handle"),r=n.get("status"),a.get("show")&&r&&"hide"!==r?(this._handle||(e=!0,o=this._handle=Ms(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){$t(t.event)},onmousedown:S_(this._onHandleDragMove,this,0,0),drift:S_(this._onHandleDragMove,this),ondragend:S_(this._onHandleDragEnd,this)}),i.add(o)),D_(o,n,!1),o.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"])),D(r=a.get("size"))||(r=[r,r]),o.attr("scale",[r[0]/2,r[1]/2]),vh(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)):(o&&i.remove(o),this._handle=null))},_moveHandleToValue:function(t,e){I_(this._axisPointerModel,!e&&this._moveAnimation,this._handle,A_(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var n=this._handle;n&&(this._dragging=!0,t=this.updateHandleTransform(A_(n),[t,e],this._axisModel,this._axisPointerModel),this._payloadInfo=t,n.stopAnimation(),n.attr(A_(t)),w_(n).lastProp=null,this._doDispatchAxisPointer())},_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}]}))},_onHandleDragEnd:function(t){var e;this._dragging=!1,this._handle&&(e=this._axisPointerModel.get("value"),this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"}))},getHandleTransform:null,updateHandleTransform:null,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)},doClear:function(){},buildLabel:function(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}}}).constructor=M_);h=M_.extend({makeElOption:function(t,e,n,i,o){var a,r=n.axis,s=r.grid,l=i.get("type"),u=R_(s,r).getOtherAxis(r).getGlobalExtent(),h=r.toGlobalCoord(r.dataToCoord(e,!0)),r=(l&&"none"!==l&&(a=C_(i),(l=B_[l](r,h,u,a)).style=a,t.graphicKey=l.type,t.pointer=l),of(s.model,n));N_(e,t,r,n,i,o)},getHandleTransform:function(t,e,n){var i=of(e.axis.grid.model,e,{labelInside:!1});return i.labelMargin=n.get("handle.margin"),{position:P_(e.axis,t,i),rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,n,i){var n=n.axis,o=n.grid,a=n.getGlobalExtent(!0),o=R_(o,n).getOtherAxis(n).getGlobalExtent(),n="x"===n.dim?0:1,r=t.position,e=(r[n]+=e[n],r[n]=Math.min(a[1],r[n]),r[n]=Math.max(a[0],r[n]),(o[1]+o[0])/2),a=[e,e];return a[n]=r[n],{position:r,rotation:t.rotation,cursorPoint:a,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][n]}}});function R_(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}var B_={line:function(t,e,n,i){e=O_([e,n[0]],[e,n[1]],V_(t));return Xr({shape:e,style:i}),{type:"Line",shape:e}},shadow:function(t,e,n,i){var o=Math.max(1,t.getBandWidth()),a=n[1]-n[0];return{type:"Rect",shape:E_([e-o/2,n[0]],[o,a],V_(t))}}};function V_(t){return"x"===t.dim?0:1}Qg.registerAxisPointerClass("CartesianAxisPointer",h),Jc(function(t){var e;t&&(t.axisPointer&&0!==t.axisPointer.length||(t.axisPointer={}),e=t.axisPointer.link)&&!D(e)&&(t.axisPointer.link=[e])}),Qc(pc.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=jg(t,e)}),s({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},function(t,e,n){var a,r,i,s,l,o,u,h,c,d,p,g,f,m,y=t.currTrigger,v=[t.x,t.y],x=t,_=t.dispatchAction||A(n.dispatchAction,n),w=e.getComponent("axisPointer").coordSysAxesInfo;if(w)return p_(v)&&(v=a_({seriesIndex:x.seriesIndex,dataIndex:x.dataIndex},e).point),a=p_(v),r=x.axesInfo,i=w.axesInfo,s="leave"===y||p_(v),l={},e={list:[],map:{}},u={showPointer:s_(h_,o={}),showTooltip:s_(c_,e)},r_(w.coordSysMap,function(t,e){var o=a||t.containPoint(v);r_(w.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}}(r,t);s||!o||r&&!i||null!=(i=null!=(i=i&&i.value)||a?i:n.pointToData(v))&&u_(t,i,u,!1,l)})}),h={},r_(i,function(n,t){var i=n.linkGroup;i&&!o[t]&&r_(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,d_(t),d_(n)))),h[n.key]=e)})}),r_(h,function(t,e){u_(i[e],t,u,!0,l)}),f=o,x=i,m=l.axesInfo=[],r_(x,function(t,e){var n=t.axisPointerModel.option,e=f[e];e?(t.useHandle||(n.status="show"),n.value=e.value,n.seriesDataIndices=(e.payloadBatch||[]).slice()):t.useHandle||(n.status="hide"),"show"===n.status&&m.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:n.value})}),y=e,x=t,e=_,!p_(t=v)&&y.list.length?(_=((y.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{},e({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:x.tooltipOption,position:x.position,dataIndexInside:_.dataIndexInside,dataIndex:_.dataIndex,seriesIndex:_.seriesIndex,dataByCoordSys:y.list})):e({type:"hideTip"}),t=i,_=(x=n).getZr(),y="axisPointerLastHighlights",c=l_(_)[y]||{},d=l_(_)[y]={},r_(t,function(t,e){t=t.axisPointerModel.option;"show"===t.status&&r_(t.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;d[e]=t})}),p=[],g=[],Z(c,function(t,e){d[e]||g.push(t)}),Z(d,function(t,e){c[e]||p.push(t)}),g.length&&x.dispatchAction({type:"downplay",escapeConnect:!0,batch:g}),p.length&&x.dispatchAction({type:"highlight",escapeConnect:!0,batch:p}),l});var G_=["x","y"],F_=["width","height"],c=M_.extend({makeElOption:function(t,e,n,i,o){var a,r=n.axis,s=r.coordinateSystem,l=Z_(s,1-H_(r)),s=s.dataToPoint(e)[0],u=i.get("type"),r=(u&&"none"!==u&&(a=C_(i),(u=W_[u](r,s,l,a)).style=a,t.graphicKey=u.type,t.pointer=u),e_(n));N_(e,t,r,n,i,o)},getHandleTransform:function(t,e,n){var i=e_(e,{labelInside:!1});return i.labelMargin=n.get("handle.margin"),{position:P_(e.axis,t,i),rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,n,i){var n=n.axis,o=n.coordinateSystem,n=H_(n),a=Z_(o,n),r=t.position,e=(r[n]+=e[n],r[n]=Math.min(a[1],r[n]),r[n]=Math.max(a[0],r[n]),Z_(o,1-n)),a=(e[1]+e[0])/2,o=[a,a];return o[n]=r[n],{position:r,rotation:t.rotation,cursorPoint:o,tooltipOption:{verticalAlign:"middle"}}}}),W_={line:function(t,e,n,i){e=O_([e,n[0]],[e,n[1]],H_(t));return Xr({shape:e,style:i}),{type:"Line",shape:e}},shadow:function(t,e,n,i){var o=t.getBandWidth(),a=n[1]-n[0];return{type:"Rect",shape:E_([e-o/2,n[0]],[o,a],H_(t))}}};function H_(t){return t.isHorizontal()?0:1}function Z_(t,e){t=t.getRect();return[t[G_[e]],t[G_[e]]+t[F_[e]]]}Qg.registerAxisPointerClass("SingleAxisPointer",c),rd({type:"single"});var X_=Ku.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(t){X_.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()}},fixData:function(t){var e=t.length,n=To(t,function(t){return t[2]}),i=[];n.buckets.each(function(t,e){i.push({name:e,dataList:t})});for(var o=i.length,a=-1,r=-1,s=0;s<o;++s){var l=i[s].dataList.length;a<l&&(a=l,r=s)}for(var u=0;u<o;++u)if(u!==r)for(var h=i[u].name,c=0;c<a;++c){for(var d=i[r].dataList[c][0],p=i[u].dataList.length,g=-1,f=0;f<p;++f)if(i[u].dataList[f][0]===d){g=f;break}-1===g&&(t[e]=[],t[e][0]=d,t[e][1]=0,t[e][2]=h,e++)}return t},getInitialData:function(t,e){for(var e=e.queryComponents({mainType:"singleAxis",index:this.get("singleAxisIndex"),id:this.get("singleAxisId")})[0].get("type"),t=tt(t.data,function(t){return void 0!==t[2]}),n=this.fixData(t||[]),i=[],o=this.nameMap=E(),a=0,r=0;r<n.length;++r)i.push(n[r][2]),o.get(n[r][2])||(o.set(n[r][2],a),a++);t=Rd(n,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:pd(e)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}),e=new Sd(t,this);return e.initData(n),e},getLayerSeries:function(){for(var n=this.getData(),t=n.count(),e=[],i=0;i<t;++i)e[i]=i;var o=n.mapDimension("single"),a=To(e,function(t){return n.get("name",t)}),r=[];return a.buckets.each(function(t,e){t.sort(function(t,e){return n.get(o,t)-n.get(o,e)}),r.push({name:e,indices:t})}),r},getAxisTooltipData:function(t,e,n){D(t)||(t=t?[t]:[]);for(var i,o=this.getData(),a=this.getLayerSeries(),r=[],s=a.length,l=0;l<s;++l){for(var u=Number.MAX_VALUE,h=-1,c=a[l].indices.length,d=0;d<c;++d){var p=o.get(t[0],a[l].indices[d]),g=Math.abs(p-e);g<=u&&(i=p,u=g,h=a[l].indices[d])}r.push(h)}return{dataIndices:r,nestestValue:i}},formatTooltip:function(t){var e=this.getData(),n=e.getName(t),e=e.get(e.mapDimension("value"),t);return nl(n+" : "+(e=!isNaN(e)&&null!=e?e:"-"))},defaultOption:{zlevel:0,z:2,coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",color:"#000",fontSize:11},emphasis:{label:{show:!0}}}});function Y_(n,t,e){if(n.count())for(var i,o=t.coordinateSystem,a=t.getLayerSeries(),r=n.mapDimension("single"),s=n.mapDimension("value"),l=I(a,function(t){return I(t.indices,function(t){var e=o.dataToPoint(n.get(r,t));return e[1]=n.get(s,t),e})}),t=function(t){for(var e=t.length,n=t[0].length,i=[],o=[],a=0,r={},s=0;s<n;++s){for(var l=0,u=0;l<e;++l)u+=t[l][s][1];a<u&&(a=u),i.push(u)}for(var h=0;h<n;++h)o[h]=(a-i[h])/2;for(var c=a=0;c<n;++c){var d=i[c]+o[c];a<d&&(a=d)}return r.y0=o,r.max=a,r}(l),u=t.y0,h=e/t.max,c=a.length,d=a[0].indices.length,p=0;p<d;++p){i=u[p]*h,n.setItemLayout(a[0].indices[p],{layerIndex:0,x:l[0][p][0],y0:i,y:l[0][p][1]*h});for(var g=1;g<c;++g)i+=l[g-1][p][1]*h,n.setItemLayout(a[g].indices[p],{layerIndex:g,x:l[g][p][0],y0:i,y:l[g][p][1]*h})}}ld({type:"themeRiver",init:function(){this._layers=[]},render:function(b,t,e){var S=b.getData(),M=this.group,I=b.getLayerSeries(),n=S.getLayout("layoutInfo"),i=n.rect,n=n.boundaryGap;function o(t){return t.name}M.attr("position",[0,i.y+n[0]]);var i=new hd(this._layersSeries||[],I,o,o),T={};function a(t,e,n){var i,o,a=this._layers;if("remove"!==t){for(var r,s=[],l=[],u=I[e].indices,h=0;h<u.length;h++){var c=S.getItemLayout(u[h]),d=c.x,p=c.y0,c=c.y;s.push([d,p]),l.push([d,p+c]),r=S.getItemVisual(u[h],"color")}var g,f,m,y=S.getItemLayout(u[0]),v=S.getItemModel(u[h-1]),x=v.getModel("label"),_=x.get("margin"),t=("add"===t?(g=T[e]=new R,f=new Vf({shape:{points:s,stackedOnPoints:l,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),m=new B({style:{x:y.x-_,y:y.y0+y.y/2}}),g.add(f),g.add(m),M.add(g),f.setClipPath((t=f.getBoundingRect(),w=b,i=function(){f.removeClipPath()},vs(o=new V({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}}),{shape:{width:t.width+20,height:t.height+20}},w,i),o))):(g=a[n],f=g.childAt(0),m=g.childAt(1),M.add(g),T[e]=g,G(f,{shape:{points:s,stackedOnPoints:l}},b),G(m,{style:{x:y.x-_,y:y.y0+y.y/2}},b)),v.getModel("emphasis.itemStyle")),w=v.getModel("itemStyle");hs(m.style,x,{text:x.get("show")?b.getFormattedLabel(u[h-1],"normal")||S.getName(u[h-1]):null,textVerticalAlign:"middle"}),f.setStyle(O({fill:r},w.getItemStyle(["color"]))),ss(f,t.getItemStyle())}else M.remove(a[e])}i.add(A(a,this,"add")).update(A(a,this,"update")).remove(A(a,this,"remove")).execute(),this._layersSeries=I,this._layers=T},dispose:function(){}}),ed(function(t,e){t.eachSeriesByType("themeRiver",function(t){var e=t.getData(),n=t.coordinateSystem,i={},o=n.getRect(),a=(i.rect=o,t.get("boundaryGap")),n=n.getAxis();i.boundaryGap=a,"horizontal"===n.orient?(a[0]=F(a[0],o.height),a[1]=F(a[1],o.height),Y_(e,t,o.height-a[0]-a[1])):(a[0]=F(a[0],o.width),a[1]=F(a[1],o.width),Y_(e,t,o.width-a[0]-a[1])),e.setLayout("layoutInfo",i)})}),nd(function(t){t.eachSeriesByType("themeRiver",function(n){var i=n.getData(),o=n.getRawData(),a=n.get("color"),r=E();i.each(function(t){r.set(i.getRawIndex(t),t)}),o.each(function(t){var e=o.getName(t),e=a[(n.nameMap.get(e)-1)%a.length],t=(o.setItemVisual(t,"color",e),r.get(t));null!=t&&i.setItemVisual(t,"color",e)})})}),Qc(lm("themeRiver"));var U_=Fh.extend({type:"series.pictorialBar",dependencies:["grid"],defaultOption:{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",progressive:0,hoverAnimation:!1},getInitialData:function(t){return t.stack=null,U_.superApply(this,"getInitialData",arguments)}}),j_=["itemStyle","borderWidth"],q_=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],K_=new hr;function $_(t,e,n,i){var o,a=t.getItemLayout(e),r=n.get("symbolRepeat"),s=n.get("symbolClip"),l=n.get("symbolPosition")||"start",u=(n.get("symbolRotate")||0)*Math.PI/180||0,h=n.get("symbolPatternSize")||2,c=n.isAnimationEnabled(),s={dataIndex:e,layout:a,itemModel:n,symbolType:t.getItemVisual(e,"symbol")||"circle",color:t.getItemVisual(e,"color"),symbolClip:s,symbolRepeat:r,symbolRepeatDirection:n.get("symbolRepeatDirection"),symbolPatternSize:h,rotation:u,animationModel:c?n:null,hoverAnimation:c&&n.get("hoverAnimation"),z2:n.getShallow("z",!0)||0},c=n,d=r,p=a,g=i,f=s,m=g.valueDim,c=c.get("symbolBoundingData"),y=g.coordSys.getOtherAxis(g.coordSys.getBaseAxis()),v=y.toGlobalCoord(y.dataToCoord(0)),x=1-(p[m.wh]<=0),e=(o=D(c)?((o=[J_(y,c[0])-v,J_(y,c[1])-v])[1]<o[0]&&o.reverse(),o[x]):null!=c?J_(y,c)-v:d?g.coordSysExtent[m.index][x]-v:p[m.wh],f.boundingLength=o,d&&(f.repeatCutLength=p[m.wh]),f.pxSign=0<o?1:o<0?-1:0,y=t,c=e,g=a,x=r,v=s.boundingLength,d=s.pxSign,p=h,m=s,o=(f=i).valueDim,t=f.categoryDim,g=Math.abs(g[t.wh]),(y=D(y=y.getItemVisual(c,"symbolSize"))?y.slice():[y=null==y?"100%":y,y])[t.index]=F(y[t.index],g),y[o.index]=F(y[o.index],x?g:Math.abs(v)),m.symbolSize=y,(m.symbolScale=[y[0]/p,y[1]/p])[o.index]*=(f.isHorizontal?-1:1)*d,n),h=s.symbolScale,c=u,t=i,x=s,g=((e=e.get(j_)||0)&&(K_.attr({scale:h.slice(),rotation:c}),K_.updateTransform(),e=(e/=K_.getLineScale())*h[t.valueDim.index]),x.valueLineWidth=e,s.symbolSize),v=n.get("symbolOffset"),m=(D(v)&&(v=[F(v[0],g[0]),F(v[1],g[1])]),n),y=g,p=a,f=r,d=v,u=l,c=s.valueLineWidth,h=s.boundingLength,t=s.repeatCutLength,x=i,e=s,n=x.categoryDim,g=x.valueDim,a=e.pxSign,r=c=Math.max(y[g.index]+c,0),_=(f&&(_=Math.abs(h),m=rt(m.get("symbolMargin"),"15%")+"",w=!1,m.lastIndexOf("!")===m.length-1&&(w=!0,m=m.slice(0,m.length-1)),m=F(m,y[g.index]),y=Math.max(c+2*m,0),v=w?0:2*m,b=Ks(f),l=b?f:gw((_+v)/y),y=c+2*(m=(_-l*c)/2/(w?l:l-1)),v=w?0:2*m,b||"fixed"===f||(l=t?gw((Math.abs(t)+v)/y):0),r=l*y-v,e.repeatTimes=l,e.symbolMargin=m),a*(r/2)),w=((c=e.pathPosition=[])[n.index]=p[n.wh]/2,c[g.index]="start"===u?_:"end"===u?h-_:h/2,d&&(c[0]+=d[0],c[1]+=d[1]),e.bundlePosition=[]),b=(w[n.index]=p[n.xy],w[g.index]=p[g.xy],e.barRectShape=O({},p));return b[g.wh]=a*Math.max(Math.abs(p[g.wh]),Math.abs(c[g.index]+_)),b[n.wh]=p[n.wh],(f=e.clipShape={})[n.xy]=-p[n.xy],f[n.wh]=x.ecSize[n.wh],f[g.xy]=0,f[g.wh]=p[g.wh],s}function J_(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function Q_(t){var e=t.symbolPatternSize,e=Wp(t.symbolType,-e/2,-e/2,e,e,t.color);return e.attr({culling:!0}),"image"!==e.type&&e.setStyle({strokeNoScale:!0}),e}function tw(t,e,o,n){var i=t.__pictorialBundle,a=o.symbolSize,r=o.valueLineWidth,s=o.pathPosition,l=e.valueDim,u=o.repeatTimes||0,h=0,c=a[e.valueDim.index]+r+2*o.symbolMargin;for(cw(t,function(t){t.__pictorialAnimationIndex=h,t.__pictorialRepeatTimes=u,h<u?dw(t,null,g(h),o,n):dw(t,null,{scale:[0,0]},o,n,function(){i.remove(t)}),sw(t,o),h++});h<u;h++){var d=Q_(o),p=(d.__pictorialAnimationIndex=h,d.__pictorialRepeatTimes=u,i.add(d),g(h));dw(d,{position:p.position,scale:[0,0]},{scale:p.scale,rotation:p.rotation},o,n),d.on("mouseover",f).on("mouseout",m),sw(d,o)}function g(t){var e=s.slice(),n=o.pxSign,i=t;return("start"===o.symbolRepeatDirection?0<n:n<0)&&(i=u-1-t),e[l.index]=c*(i-u/2+.5)+s[l.index],{position:e,scale:o.symbolScale.slice(),rotation:o.rotation}}function f(){cw(t,function(t){t.trigger("emphasis")})}function m(){cw(t,function(t){t.trigger("normal")})}}function ew(t,e,n,i){var o=t.__pictorialBundle,a=t.__pictorialMainPath;a?dw(a,null,{position:n.pathPosition.slice(),scale:n.symbolScale.slice(),rotation:n.rotation},n,i):(a=t.__pictorialMainPath=Q_(n),o.add(a),dw(a,{position:n.pathPosition.slice(),scale:[0,0],rotation:n.rotation},{scale:n.symbolScale.slice()},n,i),a.on("mouseover",function(){this.trigger("emphasis")}).on("mouseout",function(){this.trigger("normal")})),sw(a,n)}function nw(t,e,n){var i=O({},e.barRectShape),o=t.__pictorialBarRect;o?dw(o,null,{shape:i},e,n):(o=t.__pictorialBarRect=new V({z2:2,shape:i,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),t.add(o))}function iw(t,e,n,i){var o,a,r,s;n.symbolClip&&(o=t.__pictorialClipPath,s=O({},n.clipShape),e=e.valueDim,a=n.animationModel,r=n.dataIndex,o?G(o,{shape:s},a,r):(s[e.wh]=0,o=new V({shape:s}),t.__pictorialBundle.setClipPath(o),t.__pictorialClipPath=o,(s={})[e.wh]=n.clipShape[e.wh],Is[i?"updateProps":"initProps"](o,{shape:s},a,r)))}function ow(t,e){t=t.getItemModel(e);return t.getAnimationDelayParams=aw,t.isAnimationEnabled=rw,t}function aw(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function rw(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function sw(t,e){t.off("emphasis").off("normal");var n=e.symbolScale.slice();e.hoverAnimation&&t.on("emphasis",function(){this.animateTo({scale:[1.1*n[0],1.1*n[1]]},400,"elasticOut")}).on("normal",function(){this.animateTo({scale:n.slice()},400,"elasticOut")})}function lw(t,e,n,i){var o=new R,a=new R;return o.add(a),(o.__pictorialBundle=a).attr("position",n.bundlePosition.slice()),n.symbolRepeat?tw(o,e,n):ew(o,0,n),nw(o,n,i),iw(o,e,n,i),o.__pictorialShapeStr=hw(t,n),o.__pictorialSymbolMeta=n,o}function uw(t,e,n,i){var o=i.__pictorialBarRect,a=(o&&(o.style.text=null),[]);cw(i,function(t){a.push(t)}),i.__pictorialMainPath&&a.push(i.__pictorialMainPath),i.__pictorialClipPath&&(n=null),Z(a,function(t){G(t,{scale:[0,0]},n,e,function(){i.parent&&i.parent.remove(i)})}),t.setItemGraphicEl(e,null)}function hw(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function cw(e,n,i){Z(e.__pictorialBundle.children(),function(t){t!==e.__pictorialBarRect&&n.call(i,t)})}function dw(t,e,n,i,o,a){e&&t.attr(e),i.symbolClip&&!o?n&&t.attr(n):n&&Is[o?"updateProps":"initProps"](t,n,i.animationModel,i.dataIndex,a)}function pw(t,e,n){var i=n.color,o=n.dataIndex,a=n.itemModel,r=a.getModel("itemStyle").getItemStyle(["color"]),s=a.getModel("emphasis.itemStyle").getItemStyle(),l=a.getShallow("cursor"),u=(cw(t,function(t){t.setColor(i),t.setStyle(C({fill:i,opacity:n.opacity},r)),ss(t,s),l&&(t.cursor=l),t.z2=n.z2}),{}),t=(e.valueDim.posDesc[+(0<n.boundingLength)],t.__pictorialBarRect);Tg(t.style,u,a,i,e.seriesModel,o),ss(t,u)}function gw(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}function fw(i,o){return o=o||[0,0],I(["x","y"],function(t,e){var t=this.getAxis(t),n=o[e],e=i[e]/2;return"category"===t.type?t.getBandWidth():Math.abs(t.dataToCoord(n-e)-t.dataToCoord(n+e))},this)}function mw(a,r){return r=r||[0,0],I([0,1],function(t){var e=r[t],n=a[t]/2,i=[],o=[];return i[t]=e-n,o[t]=e+n,i[1-t]=o[1-t]=r[1-t],Math.abs(this.dataToPoint(i)[t]-this.dataToPoint(o)[t])},this)}function yw(t,e){var n=this.getAxis(),e=e instanceof Array?e[0]:e,t=(t instanceof Array?t[0]:t)/2;return"category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(e-t)-n.dataToCoord(e+t))}function vw(a,r){return I(["Radius","Angle"],function(t,e){var n=this["get"+t+"Axis"](),i=r[e],e=a[e]/2,o="dataTo"+t,n="category"===n.type?n.getBandWidth():Math.abs(n[o](i-e)-n[o](i+e));return n="Angle"===t?n*Math.PI/180:n},this)}ld({type:"pictorialBar",render:function(t,e,n){var l=this.group,u=t.getData(),h=this._data,i=t.coordinateSystem,o=!!i.getBaseAxis().isHorizontal(),a=i.grid.getRect(),c={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:t,coordSys:i,coordSysExtent:[[a.x,a.x+a.width],[a.y,a.y+a.height]],isHorizontal:o,valueDim:q_[+o],categoryDim:q_[1-o]};return u.diff(h).add(function(t){var e,n;u.hasValue(t)&&(e=ow(u,t),e=$_(u,t,e,c),n=lw(u,c,e),u.setItemGraphicEl(t,n),l.add(n),pw(n,c,e))}).update(function(t,e){var n,i,o,a,r,s,e=h.getItemGraphicEl(e);u.hasValue(t)?(n=ow(u,t),n=$_(u,t,n,c),i=hw(u,n),e&&i!==e.__pictorialShapeStr&&(l.remove(e),u.setItemGraphicEl(t,null),e=null),e?(i=e,o=c,r=(a=n).animationModel,s=a.dataIndex,G(i.__pictorialBundle,{position:a.bundlePosition.slice()},r,s),(a.symbolRepeat?tw:ew)(i,o,a,!0),nw(i,a,!0),iw(i,o,a,!0)):e=lw(u,c,n,!0),u.setItemGraphicEl(t,e),e.__pictorialSymbolMeta=n,l.add(e),pw(e,c,n)):l.remove(e)}).remove(function(t){var e=h.getItemGraphicEl(t);e&&uw(h,t,e.__pictorialSymbolMeta.animationModel,e)}).execute(),this._data=u,this.group},dispose:yt,remove:function(e,t){var n=this.group,i=this._data;e.get("animation")?i&&i.eachItemGraphicEl(function(t){uw(i,t.dataIndex,e,t)}):n.removeAll()}}),ed(L(lp,"pictorialBar")),nd(Yf("pictorialBar","roundRect"));var xw=["itemStyle"],_w=["emphasis","itemStyle"],ww=["label"],bw=["emphasis","label"],Sw="e\0\0",Mw={cartesian2d:function(e){var t=e.grid.getRect();return{coordSys:{type:"cartesian2d",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:A(fw,e)}}},geo:function(e){var t=e.getBoundingRect();return{coordSys:{type:"geo",x:t.x,y:t.y,width:t.width,height:t.height,zoom:e.getZoom()},api:{coord:function(t){return e.dataToPoint(t)},size:A(mw,e)}}},singleAxis:function(e){var t=e.getRect();return{coordSys:{type:"singleAxis",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:A(yw,e)}}},polar:function(i){var o=i.getRadiusAxis(),a=i.getAngleAxis(),t=o.getExtent();return t[0]>t[1]&&t.reverse(),{coordSys:{type:"polar",cx:i.cx,cy:i.cy,r:t[1],r0:t[0]},api:{coord:A(function(t){var e=o.dataToRadius(t[0]),t=a.dataToAngle(t[1]),n=i.coordToPoint([e,t]);return n.push(e,t*Math.PI/180),n}),size:A(vw,i)}}},calendar:function(n){var t=n.getRect(),e=n.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:n.getCellWidth(),cellHeight:n.getCellHeight(),rangeInfo:{start:e.start,end:e.end,weeks:e.weeks,dayCount:e.allDay}},api:{coord:function(t,e){return n.dataToPoint(t,e)}}}}};function Iw(t,e,n,i,o){null==n[t]||o||(e[t]=n[t],n[t]=i[t])}function Tw(o,a,e,t){var n=o.get("renderItem"),l=o.coordinateSystem,i={};l&&(H&&(P(n,"series.render is required."),P(l.prepareCustoms||Mw[l.type],"This coordSys does not support custom series.")),i=l.prepareCustoms?l.prepareCustoms():Mw[l.type](l));var r,s,u,h,c,d,p,g=C({getWidth:t.getWidth,getHeight:t.getHeight,getZr:t.getZr,getDevicePixelRatio:t.getDevicePixelRatio,value:function(t,e){return null==e&&(e=r),a.get(a.getDimension(t||0),e)},style:function(t,e){y(e=null==e?r:e);var n=s.getModel(xw).getItemStyle(),i=(null!=c&&(n.fill=c),a.getItemVisual(e,"opacity"));return null!=i&&(n.opacity=i),hs(n,u,null,{autoColor:c,isRectText:!0}),n.text=u.getShallow("show")?st(o.getFormattedLabel(e,"normal"),Ig(a,e)):null,t&&O(n,t),n},styleEmphasis:function(t,e){y(e=null==e?r:e);var n=s.getModel(_w).getItemStyle();return hs(n,h,null,{isRectText:!0},!0),n.text=h.getShallow("show")?lt(o.getFormattedLabel(e,"emphasis"),o.getFormattedLabel(e,"normal"),Ig(a,e)):null,t&&O(n,t),n},visual:function(t,e){return null==e&&(e=r),a.getItemVisual(e,t)},barLayout:function(t){if(l.getBaseAxis){var e=C({axis:l.getBaseAxis()},t),n=[],t=e.axis;if("category"===t.type){for(var i=t.getBandWidth(),o=0;o<e.count;o++)n.push(C({bandWidth:i,axisKey:"axis0",stackId:tp+o},e));for(var a=rp(n),r=[],o=0;o<e.count;o++){var s=a.axis0[tp+o];s.offsetCenter=s.offset+s.width/2,r.push(s)}return r}}},currentSeriesIndices:function(){return e.getCurrentSeriesIndices()},font:function(t){return ms(t,e)}},i.api||{}),f={context:{},seriesId:o.id,seriesName:o.name,seriesIndex:o.seriesIndex,coordSys:i.coordSys,dataInsideLength:a.count(),encode:(d=o.getData(),p={},Z(d.dimensions,function(t,e){var n,t=d.getDimensionInfo(t);t.isExtraCoord||(n=t.coordDim,(p[n]=p[n]||[])[t.coordDimIndex]=e)}),p)},m=!0;return function(t,e){return r=t,m=!0,n&&n(C({dataIndexInside:t,dataIndex:a.getRawIndex(t),actionType:e?e.type:null},f),g)};function y(t){null==t&&(t=r),m&&(s=a.getItemModel(t),u=s.getModel(ww),h=s.getModel(bw),c=a.getItemVisual(t,"color"),m=!1)}}function Aw(t,e,n,i,o,a){return(t=Dw(t,e,n,i,o,a,!0))&&a.setItemGraphicEl(e,t),t}function Dw(t,e,n,i,o,a,r){var s,l,u,h,c,d,p,g=!n,f=(n=n||{}).type,m=n.shape,y=n.style;if(t&&(g||null!=f&&f!==t.__customGraphicType||"path"===f&&(v=m)&&(v.hasOwnProperty("pathData")||v.hasOwnProperty("d"))&&Pw(m)!==t.__customPathData||"image"===f&&Nw(y,"image")&&y.image!==t.__customImagePath||"text"===f&&Nw(m,"text")&&y.text!==t.__customText)&&(o.remove(t),t=null),!g){var v=!t;if(t||("path"===(y=(m=n).type)?(d=null!=(p=m.shape).width&&null!=p.height?{x:p.x||0,y:p.y||0,width:p.width,height:p.height}:null,(d=Gr(g=Pw(p),null,d,p.layout||"center")).__customPathData=g):"image"===y?(d=new Ri({})).__customImagePath=m.style.image:"text"===y?(d=new B({})).__customText=m.style.text:(p=Is[y.charAt(0).toUpperCase()+y.slice(1)],H&&P(p,'graphic type "'+y+'" can not be found.'),d=new p),d.__customGraphicType=y,d.name=m.name,t=d),s=t,g=e,p=i,l=v,y=r,m={},h=(d=n).style||{},d.shape&&(m.shape=N(d.shape)),d.position&&(m.position=d.position.slice()),d.scale&&(m.scale=d.scale.slice()),d.origin&&(m.origin=d.origin.slice()),d.rotation&&(m.rotation=d.rotation),"image"===s.type&&d.style&&(u=m.style={},Z(["x","y","width","height"],function(t){Iw(t,u,h,s.style,l)})),"text"===s.type&&d.style&&(u=m.style={},Z(["x","y"],function(t){Iw(t,u,h,s.style,l)}),!h.hasOwnProperty("textFill")&&h.fill&&(h.textFill=h.fill),!h.hasOwnProperty("textStroke"))&&h.stroke&&(h.textStroke=h.stroke),"group"!==s.type&&(s.useStyle(h),l)&&(s.style.opacity=0,c=h.opacity,vs(s,{style:{opacity:c=null==c?1:c}},p,g)),l?s.attr(m):G(s,m,p,g),d.hasOwnProperty("z2")&&s.attr("z2",d.z2||0),d.hasOwnProperty("silent")&&s.attr("silent",d.silent),d.hasOwnProperty("invisible")&&s.attr("invisible",d.invisible),d.hasOwnProperty("ignore")&&s.attr("ignore",d.ignore),d.hasOwnProperty("info")&&s.attr("info",d.info),c=d.styleEmphasis,m=!1===c,s.__cusHasEmphStl&&null==c||!s.__cusHasEmphStl&&m||(es(s,c),s.__cusHasEmphStl=!m),y&&ls(s,!m),"group"===f){var x=t;var _=e;r=n;var w=i;var b=a;var S=r.children,M=S?S.length:0,g=r.$mergeChildren,r="byName"===g||r.diffChildrenByName,g=!1===g;if(M||r||g)if(r)!function(t){new hd(t.oldChildren,t.newChildren,Cw,Cw,t).add(Lw).update(Lw).remove(kw).execute()}({oldChildren:x.children()||[],newChildren:S||[],dataIndex:_,animatableModel:w,group:x,data:b});else{g&&x.removeAll();for(var I=0;I<M;I++)S[I]&&Dw(x.childAt(I),_,S[I],w,x,b);H&&P(!g||x.childCount()===I,"MUST NOT contain empty item in children array when `group.$mergeChildren` is `false`.")}}return o.add(t),t}}function Cw(t,e){t=t&&t.name;return null!=t?t:Sw+e}function Lw(t,e){var n=this.context,t=null!=t?n.newChildren[t]:null;Dw(null!=e?n.oldChildren[e]:null,n.dataIndex,t,n.animatableModel,n.group,n.data)}function kw(t){var e=this.context,t=e.oldChildren[t];t&&e.group.remove(t)}function Pw(t){return t&&(t.pathData||t.d)}function Nw(t,e){return t&&t.hasOwnProperty(e)}function Ow(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function Ew(t,e){og.call(this,"radius",t,e),this.type="category"}Ku.extend({type:"series.custom",dependencies:["grid","polar","geo","singleAxis","calendar"],defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,useTransform:!0},getInitialData:function(t,e){return Fd(this.getSource(),this)},getDataParams:function(t,e,n){var i=Ku.prototype.getDataParams.apply(this,arguments);return n&&(i.info=n.info),i}}),lh.extend({type:"custom",_data:null,render:function(n,t,e,i){var o=this._data,a=n.getData(),r=this.group,s=Tw(n,a,t,e);a.diff(o).add(function(t){Aw(null,t,s(t,i),n,r,a)}).update(function(t,e){Aw(o.getItemGraphicEl(e),t,s(t,i),n,r,a)}).remove(function(t){t=o.getItemGraphicEl(t);t&&r.remove(t)}).execute(),this._data=a},incrementalPrepareRender:function(t,e,n){this.group.removeAll(),this._data=null},incrementalRender:function(t,e,n,i,o){var a=e.getData(),r=Tw(e,a,n,i);function s(t){t.isGroup||(t.incremental=!0,t.useHoverLayer=!0)}for(var l=t.start;l<t.end;l++)Aw(null,l,r(l,o),e,this.group,a).traverse(s)},dispose:yt,filterForExposedEvent:function(t,e,n,i){var o=e.element;if(null==o||n.name===o)return!0;for(;(n=n.parent)&&n!==this.group;)if(n.name===o)return!0;return!1}}),Ew.prototype={constructor:Ew,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToRadius:og.prototype.dataToCoord,radiusToData:og.prototype.coordToData},a(Ew,og);var zw=_o();function Rw(t,e){og.call(this,"angle",t,e=e||[0,360]),this.type="category"}Rw.prototype={constructor:Rw,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToAngle:og.prototype.dataToCoord,angleToData:og.prototype.coordToData,calculateCategoryInterval:function(){var t,e,n=this.getLabelModel(),i=this.scale,o=i.getExtent(),i=i.count();return o[1]-o[0]<1?0:(o=o[0],t=this.dataToCoord(o+1)-this.dataToCoord(o),t=Math.abs(t),o=ii(o,n.getFont(),"center","top"),n=Math.max(o.height,7)/t,isNaN(n)&&(n=1/0),o=Math.max(0,Math.floor(n)),n=(t=zw(this.model)).lastAutoInterval,e=t.lastTickCount,null!=n&&null!=e&&Math.abs(n-o)<=1&&Math.abs(e-i)<=1&&o<n?o=n:(t.lastTickCount=i,t.lastAutoInterval=o),o)}},a(Rw,og);function Bw(t){this.name=t||"",this.cx=0,this.cy=0,this._radiusAxis=new Ew,this._angleAxis=new Rw,this._radiusAxis.polar=this._angleAxis.polar=this}Bw.prototype={type:"polar",axisPointerEnabled:!0,constructor:Bw,dimensions:["radius","angle"],model:null,containPoint:function(t){t=this.pointToCoord(t);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},containData:function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},getAxis:function(t){return this["_"+t+"Axis"]},getAxes:function(){return[this._radiusAxis,this._angleAxis]},getAxesByScale:function(t){var e=[],n=this._angleAxis,i=this._radiusAxis;return n.scale.type===t&&e.push(n),i.scale.type===t&&e.push(i),e},getAngleAxis:function(){return this._angleAxis},getRadiusAxis:function(){return this._radiusAxis},getOtherAxis:function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},getTooltipAxes:function(t){t=null!=t&&"auto"!==t?this.getAxis(t):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},dataToPoint:function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},pointToData:function(t,e){t=this.pointToCoord(t);return[this._radiusAxis.radiusToData(t[0],e),this._angleAxis.angleToData(t[1],e)]},pointToCoord:function(t){var e=t[0]-this.cx,t=t[1]-this.cy,n=this.getAngleAxis(),i=n.getExtent(),o=Math.min(i[0],i[1]),a=Math.max(i[0],i[1]),i=(n.inverse?o=a-360:a=o+360,Math.sqrt(e*e+t*t));e/=i,t/=i;for(var r=Math.atan2(-t,e)/Math.PI*180,s=r<o?1:-1;r<o||a<r;)r+=360*s;return[i,r]},coordToPoint:function(t){var e=t[0],t=t[1]/180*Math.PI;return[Math.cos(t)*e+this.cx,-Math.sin(t)*e+this.cy]}};n=u.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});f(n.prototype,zp);h={splitNumber:5};function Vw(t,e){return e.type||(e.data?"category":"value")}function Gw(t,e){var n,i=this,o=i.getAngleAxis(),a=i.getRadiusAxis();o.scale.setExtent(1/0,-1/0),a.scale.setExtent(1/0,-1/0),t.eachSeries(function(t){var e;t.coordinateSystem===i&&(Z((e=t.getData()).mapDimension("radius",!0),function(t){a.scale.unionExtentFromData(e,Gd(e,t))}),Z(e.mapDimension("angle",!0),function(t){o.scale.unionExtentFromData(e,Gd(e,t))}))}),Cp(o.scale,o.model),Cp(a.scale,a.model),"category"!==o.type||o.onBand||(t=o.getExtent(),n=360/o.scale.count(),o.inverse?t[1]+=n:t[1]-=n,o.setExtent(t[0],t[1]))}function Fw(t,e){var n;t.type=e.get("type"),t.scale=Lp(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,t.inverse=e.get("inverse"),"angleAxis"===e.mainType&&(t.inverse^=e.get("clockwise"),n=e.get("startAngle"),t.setExtent(n,n+(t.inverse?-360:360))),(e.axis=t).model=e}fg("angle",n,Vw,{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}}),fg("radius",n,Vw,h),ad({type:"polar",dependencies:["polarAxis","angleAxis"],coordinateSystem:null,findAxisModel:function(t){var e;return this.ecModel.eachComponent(t,function(t){t.getCoordSysModel()===this&&(e=t)},this),e},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"80%"}});eu.register("polar",{dimensions:Bw.prototype.dimensions,create:function(n,s){var l=[];return n.eachComponent("polar",function(t,e){var n,e=new Bw(e),i=(e.update=Gw,e.getRadiusAxis()),o=e.getAngleAxis(),a=t.findAxisModel("radiusAxis"),r=t.findAxisModel("angleAxis");Fw(i,a),Fw(o,r),i=e,a=s,r=(o=t).get("center"),n=a.getWidth(),a=a.getHeight(),i.cx=F(r[0],n),i.cy=F(r[1],a),r=i.getRadiusAxis(),i=Math.min(n,a)/2,n=F(o.get("radius"),i),r.inverse?r.setExtent(n,0):r.setExtent(0,n),l.push(e),(t.coordinateSystem=e).model=t}),n.eachSeries(function(t){if("polar"===t.get("coordinateSystem")){var e=n.queryComponents({mainType:"polar",index:t.get("polarIndex"),id:t.get("polarId")})[0];if(H&&!e)throw new Error('Polar "'+rt(t.get("polarIndex"),t.get("polarId"),0)+'" not found');t.coordinateSystem=e.coordinateSystem}}),l}});var Ww=["axisLine","axisLabel","axisTick","splitLine","splitArea"];function Hw(t,e,n){e[1]>e[0]&&(e=e.slice().reverse());var i=t.coordToPoint([e[0],n]),t=t.coordToPoint([e[1],n]);return{x1:i[0],y1:i[1],x2:t[0],y2:t[1]}}function Zw(t){return t.getRadiusAxis().inverse?0:1}function Xw(t){var e=t[0],n=t[t.length-1];e&&n&&Math.abs(Math.abs(e.coord-n.coord)-360)<1e-4&&t.pop()}Qg.extend({type:"angleAxis",axisPointerClass:"PolarAxisPointer",render:function(e,t){var n,i,o,a,r;this.group.removeAll(),e.get("show")&&(n=e.axis,i=n.polar,o=i.getRadiusAxis().getExtent(),a=n.getTicksCoords(),Xw(r=I(n.getViewLabels(),function(t){return(t=N(t)).coord=n.dataToCoord(t.tickValue),t})),Xw(a),Z(Ww,function(t){!e.get(t+".show")||n.scale.isBlank()&&"axisLine"!==t||this["_"+t](e,i,a,o,r)},this))},_axisLine:function(t,e,n,i){t=t.getModel("axisLine.lineStyle"),i=new hr({shape:{cx:e.cx,cy:e.cy,r:i[Zw(e)]},style:t.getLineStyle(),z2:1,silent:!0});i.style.fill=null,this.group.add(i)},_axisTick:function(t,e,n,i){var o=t.getModel("axisTick"),a=(o.get("inside")?-1:1)*o.get("length"),r=i[Zw(e)],i=I(n,function(t){return new Sr({shape:Hw(e,[r,r+a],t.coord)})});this.group.add(Hr(i,{style:C(o.getModel("lineStyle").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})}))},_axisLabel:function(l,u,t,h,e){var c=l.getCategories(!0),d=l.getModel("axisLabel"),p=d.get("margin");Z(e,function(t,e){var n=d,i=t.tickValue,o=h[Zw(u)],a=u.coordToPoint([o+p,t.coord]),r=u.cx,s=u.cy,r=Math.abs(a[0]-r)/o<.3?"center":a[0]>r?"left":"right",o=Math.abs(a[1]-s)/o<.3?"middle":a[1]>s?"top":"bottom",s=(c&&c[i]&&c[i].textStyle&&(n=new w(c[i].textStyle,d,d.ecModel)),new B({silent:!0}));this.group.add(s),hs(s.style,n,{x:a[0],y:a[1],textFill:n.getTextColor()||l.get("axisLine.lineStyle.color"),text:t.formattedLabel,textAlign:r,textVerticalAlign:o})},this)},_splitLine:function(t,e,n,i){for(var o=t.getModel("splitLine").getModel("lineStyle"),a=0,r=(r=o.get("color"))instanceof Array?r:[r],s=[],l=0;l<n.length;l++){var u=a++%r.length;s[u]=s[u]||[],s[u].push(new Sr({shape:Hw(e,i,n[l].coord)}))}for(l=0;l<s.length;l++)this.group.add(Hr(s[l],{style:C({stroke:r[l%r.length]},o.getLineStyle()),silent:!0,z:t.get("z")}))},_splitArea:function(t,e,n,i){if(n.length){for(var o=t.getModel("splitArea").getModel("areaStyle"),a=0,r=(r=o.get("color"))instanceof Array?r:[r],s=[],l=Math.PI/180,u=-n[0].coord*l,h=Math.min(i[0],i[1]),c=Math.max(i[0],i[1]),d=t.get("clockwise"),p=1;p<n.length;p++){var g=a++%r.length;s[g]=s[g]||[],s[g].push(new pr({shape:{cx:e.cx,cy:e.cy,r0:h,r:c,startAngle:u,endAngle:-n[p].coord*l,clockwise:d},silent:!0})),u=-n[p].coord*l}for(p=0;p<s.length;p++)this.group.add(Hr(s[p],{style:C({fill:r[p%r.length]},o.getAreaStyle()),silent:!0}))}}});var Yw=["axisLine","axisTickLabel","axisName"],Uw=["splitLine","splitArea"];Qg.extend({type:"radiusAxis",axisPointerClass:"PolarAxisPointer",render:function(e,t){var n,i,o,a,r,s;this.group.removeAll(),e.get("show")&&(n=e.axis,s=(i=n.polar).getAngleAxis(),o=n.getTicksCoords(),a=s.getExtent()[0],r=n.getExtent(),s={position:[i.cx,i.cy],rotation:a/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:e.getModel("axisLabel").get("rotate"),z2:1},s=new Vg(e,s),Z(Yw,s.add,s),this.group.add(s.getGroup()),Z(Uw,function(t){e.get(t+".show")&&!n.scale.isBlank()&&this["_"+t](e,i,a,r,o)},this))},_splitLine:function(t,e,n,i,o){for(var a=t.getModel("splitLine").getModel("lineStyle"),r=0,s=(s=a.get("color"))instanceof Array?s:[s],l=[],u=0;u<o.length;u++){var h=r++%s.length;l[h]=l[h]||[],l[h].push(new hr({shape:{cx:e.cx,cy:e.cy,r:o[u].coord},silent:!0}))}for(u=0;u<l.length;u++)this.group.add(Hr(l[u],{style:C({stroke:s[u%s.length],fill:null},a.getLineStyle()),silent:!0}))},_splitArea:function(t,e,n,i,o){if(o.length){for(var a=t.getModel("splitArea").getModel("areaStyle"),r=0,s=(s=a.get("color"))instanceof Array?s:[s],l=[],u=o[0].coord,h=1;h<o.length;h++){var c=r++%s.length;l[c]=l[c]||[],l[c].push(new pr({shape:{cx:e.cx,cy:e.cy,r0:u,r:o[h].coord,startAngle:0,endAngle:2*Math.PI},silent:!0})),u=o[h].coord}for(h=0;h<l.length;h++)this.group.add(Hr(l[h],{style:C({fill:s[h%s.length]},a.getAreaStyle()),silent:!0}))}}});c=M_.extend({makeElOption:function(t,e,n,i,o){var a=n.axis;"angle"===a.dim&&(this.animationThreshold=Math.PI/18);var r,s=a.polar,l=s.getOtherAxis(a).getExtent(),u=a["dataTo"+hl(a.dim)](e),h=i.get("type"),a=(h&&"none"!==h&&(r=C_(i),(h=jw[h](a,s,u,l,r)).style=r,t.graphicKey=h.type,t.pointer=h),i.get("label.margin"));L_(t,n,i,o,function(t,e,n,i){var o=e.axis,t=o.dataToCoord(t);l=(l=n.getAngleAxis().getExtent()[0])/180*Math.PI;var a,r,s=n.getRadiusAxis().getExtent();{var l;s="radius"===o.dim?(o=se(),de(o,o,l),ce(o,o,[n.cx,n.cy]),a=_s([t,-i],o),o=e.getModel("axisLabel").get("rotate")||0,e=Vg.innerTextLayout(l,o*Math.PI/180,-1),r=e.textAlign,e.textVerticalAlign):(l=s[1],a=n.coordToPoint([l+i,t]),o=n.cx,e=n.cy,r=Math.abs(a[0]-o)/l<.3?"center":a[0]>o?"left":"right",Math.abs(a[1]-e)/l<.3?"middle":a[1]>e?"top":"bottom")}return{position:a,align:r,verticalAlign:s}}(e,n,s,a))}});var jw={line:function(t,e,n,i,o){return"angle"===t.dim?{type:"Line",shape:O_(e.coordToPoint([i[0],n]),e.coordToPoint([i[1],n]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:n}}},shadow:function(t,e,n,i,o){var a=Math.max(1,t.getBandWidth()),r=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:z_(e.cx,e.cy,i[0],i[1],(-n-a/2)*r,(a/2-n)*r)}:{type:"Sector",shape:z_(e.cx,e.cy,n-a/2,n+a/2,0,2*Math.PI)}}};function qw(i,t){t.update="updateView",s(t,function(t,e){var n={};return e.eachComponent({mainType:"geo",query:t},function(e){e[i](t.name),Z(e.coordinateSystem.regions,function(t){n[t.name]=e.isSelected(t.name)||!1})}),{selected:n,name:t.name}})}Qg.registerAxisPointerClass("PolarAxisPointer",c),ed(L(function(t,e,n){n.getWidth(),n.getHeight();var l,c,A={},D=(n=tt(e.getSeriesByType(t),function(t){return!e.isSeriesFiltered(t)&&t.coordinateSystem&&"polar"===t.coordinateSystem.type}),l={},Z(n,function(t,e){var n=t.getData(),i=t.coordinateSystem.getBaseAxis(),o=i.getExtent(),o="category"===i.type?i.getBandWidth():Math.abs(o[1]-o[0])/n.count(),n=l[i.dim]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},a=n.stacks,i=(l[i.dim]=n,Ow(t)),r=(a[i]||n.autoWidthCount++,a[i]=a[i]||{width:0,maxWidth:0},F(t.get("barWidth"),o)),o=F(t.get("barMaxWidth"),o),s=t.get("barGap"),t=t.get("barCategoryGap");r&&!a[i].width&&(r=Math.min(n.remainedWidth,r),a[i].width=r,n.remainedWidth-=r),o&&(a[i].maxWidth=o),null!=s&&(n.gap=s),null!=t&&(n.categoryGap=t)}),c={},Z(l,function(t,n){c[n]={};var e=t.stacks,i=t.bandWidth,i=F(t.categoryGap,i),o=F(t.gap,1),a=t.remainedWidth,r=t.autoWidthCount,s=(a-i)/(r+(r-1)*o),s=Math.max(s,0);Z(e,function(t,e){var n=t.maxWidth;n&&n<s&&(n=Math.min(n,a),t.width&&(n=Math.min(n,t.width)),a-=n,t.width=n,r--)}),s=(a-i)/(r+(r-1)*o),s=Math.max(s,0);var l,u=0,h=(Z(e,function(t,e){t.width||(t.width=s),u+=(l=t).width*(1+o)}),l&&(u-=l.width*o),-u/2);Z(e,function(t,e){c[n][e]=c[n][e]||{offset:h,width:t.width},h+=t.width*(1+o)})}),c);e.eachSeriesByType(t,function(t){if("polar"===t.coordinateSystem.type){var e=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),o=Ow(t),a=D[i.dim][o],r=a.offset,s=a.width,l=n.getOtherAxis(i),u=t.coordinateSystem.cx,h=t.coordinateSystem.cy,c=t.get("barMinHeight")||0,d=t.get("barMinAngle")||0;A[o]=A[o]||[];for(var p=e.mapDimension(l.dim),g=e.mapDimension(i.dim),f=Vd(e,p),m=l.getExtent()[0],y=0,v=e.count();y<v;y++){var x,_,w,b,S,M,I=e.get(p,y),T=e.get(g,y);isNaN(I)||(_=0<=I?"p":"n",w=m,f&&(A[o][T]||(A[o][T]={p:m,n:m}),w=A[o][T][_]),"radius"===l.dim?(S=l.dataToRadius(I)-m,b=i.dataToAngle(T),S=(x=w)+(S=Math.abs(S)<c?(S<0?-1:1)*c:S),M=(b=b-r)-s,f&&(A[o][T][_]=S)):(I=l.dataToAngle(I,!0)-m,S=(x=i.dataToRadius(T)+r)+s,M=(b=w)+(I=Math.abs(I)<d?(I<0?-1:1)*d:I),f&&(A[o][T][_]=M)),e.setItemLayout(y,{cx:u,cy:h,r0:x,r:S,startAngle:-b*Math.PI/180,endAngle:-M*Math.PI/180}))}}},this)},"bar")),rd({type:"polar"}),i(u.extend({type:"geo",coordinateSystem:null,layoutMode:"box",init:function(t){u.prototype.init.apply(this,arguments),co(t,"label",["show"])},optionUpdated:function(){var t=this.option,n=this;t.regions=lv.getFilledRegions(t.regions,t.map,t.nameMap),this._optionModelMap=Q(t.regions||[],function(t,e){return e.name&&t.set(e.name,new w(e,n)),t},E()),this.updateSelectedMap(t.regions)},defaultOption:{zlevel:0,z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",color:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},getRegionModel:function(t){return this._optionModelMap.get(t)||new w(null,this,this.ecModel)},getFormattedLabel:function(t,e){var n=this.getRegionModel(t).get("label."+e+".formatter"),i={name:t};return"function"==typeof n?(i.status=e,n(i)):"string"==typeof n?n.replace("{a}",null!=t?t:""):void 0},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t}}),l),rd({type:"geo",init:function(t,e){e=new Qy(e,!0);this._mapDraw=e,this.group.add(e.group)},render:function(t,e,n,i){var o;i&&"geoToggleSelect"===i.type&&i.from===this.uid||(o=this._mapDraw,t.get("show")?o.draw(t,e,n,this,i):this._mapDraw.group.removeAll(),this.group.silent=t.get("silent"))},dispose:function(){this._mapDraw&&this._mapDraw.remove()}}),qw("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),qw("select",{type:"geoSelect",event:"geoselected"}),qw("unSelect",{type:"geoUnSelect",event:"geounselected"});function Kw(t,e,n){this._model=t}function $w(t,e,n,i){var o=n.calendarModel,n=n.seriesModel,o=o?o.coordinateSystem:n?n.coordinateSystem:null;return o===this?o[t](i):null}Kw.prototype={constructor:Kw,type:"calendar",dimensions:["time","value"],getDimensionsInfo:function(){return[{name:"time",type:"time"},"value"]},getRangeInfo:function(){return this._rangeInfo},getModel:function(){return this._model},getRect:function(){return this._rect},getCellWidth:function(){return this._sw},getCellHeight:function(){return this._sh},getOrient:function(){return this._orient},getFirstDayOfWeek:function(){return this._firstDayOfWeek},getDateInfo:function(t){var e=(t=Xs(t)).getFullYear(),n=(n=t.getMonth()+1)<10?"0"+n:n,i=(i=t.getDate())<10?"0"+i:i,o=t.getDay();return{y:e,m:n,d:i,day:Math.abs((o+7-this.getFirstDayOfWeek())%7),time:t.getTime(),formatedDate:e+"-"+n+"-"+i,date:t}},getNextNDay:function(t,e){return 0!==(e=e||0)&&(t=new Date(this.getDateInfo(t).time)).setDate(t.getDate()+e),this.getDateInfo(t)},update:function(t,e){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var n=this._rangeInfo.weeks||1,i=["width","height"],o=this._model.get("cellSize").slice(),a=this._model.getBoxLayoutParams(),r="horizontal"===this._orient?[n,7]:[7,n],n=(Z([0,1],function(t){l(o,t)&&(a[i[t]]=o[t]*r[t])}),{width:e.getWidth(),height:e.getHeight()}),s=this._rect=yl(a,n);function l(t,e){return null!=t[e]&&"auto"!==t[e]}Z([0,1],function(t){l(o,t)||(o[t]=s[i[t]]/r[t])}),this._sw=o[0],this._sh=o[1]},dataToPoint:function(t,e){D(t)&&(t=t[0]),null==e&&(e=!0);var t=this.getDateInfo(t),n=this._rangeInfo,i=t.formatedDate;return!e||t.time>=n.start.time&&t.time<n.end.time+864e5?(e=t.day,t=this._getRangeInfo([n.start.time,i]).nthWeek,"vertical"===this._orient?[this._rect.x+e*this._sw+this._sw/2,this._rect.y+t*this._sh+this._sh/2]:[this._rect.x+t*this._sw+this._sw/2,this._rect.y+e*this._sh+this._sh/2]):[NaN,NaN]},pointToData:function(t){t=this.pointToDate(t);return t&&t.time},dataToRect:function(t,e){t=this.dataToPoint(t,e);return{contentShape:{x:t[0]-(this._sw-this._lineWidth)/2,y:t[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:t,tl:[t[0]-this._sw/2,t[1]-this._sh/2],tr:[t[0]+this._sw/2,t[1]-this._sh/2],br:[t[0]+this._sw/2,t[1]+this._sh/2],bl:[t[0]-this._sw/2,t[1]+this._sh/2]}},pointToDate:function(t){var e=Math.floor((t[0]-this._rect.x)/this._sw)+1,t=Math.floor((t[1]-this._rect.y)/this._sh)+1,n=this._rangeInfo.range;return"vertical"===this._orient?this._getDateByWeeksAndDay(t,e-1,n):this._getDateByWeeksAndDay(e,t-1,n)},convertToPixel:L($w,"dataToPoint"),convertFromPixel:L($w,"pointToData"),_initRangeOption:function(){var t,e=this._model.get("range"),n=e,i=(D(n)&&1===n.length&&(n=n[0]),/^\d{4}$/.test(n)&&(e=[n+"-01-01",n+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(n)&&((t=(i=this.getDateInfo(n)).date).setMonth(t.getMonth()+1),t=this.getNextNDay(t,-1),e=[i.formatedDate,t.formatedDate]),/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(n)&&(e=[n,n]),this._getRangeInfo(e));return i.start.time>i.end.time&&e.reverse(),e},_getRangeInfo:function(t){(t=[this.getDateInfo(t[0]),this.getDateInfo(t[1])])[0].time>t[1].time&&(e=!0,t.reverse());var e,n=Math.floor(t[1].time/864e5)-Math.floor(t[0].time/864e5)+1,i=new Date(t[0].time),o=i.getDate(),a=t[1].date.getDate();if(i.setDate(o+n-1),i.getDate()!==a)for(var r=0<i.getTime()-t[1].time?1:-1;i.getDate()!==a&&0<(i.getTime()-t[1].time)*r;)i.setDate(o+(n-=r)-1);var s=Math.floor((n+t[0].day+6)/7),l=e?1-s:s-1;return e&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:n,weeks:s,nthWeek:l,fweek:t[0].day,lweek:t[1].day}},_getDateByWeeksAndDay:function(t,e,n){n=this._getRangeInfo(n);return!(t>n.weeks||0===t&&e<n.fweek||t===n.weeks&&e>n.lweek)&&(t=7*(t-1)-n.fweek+e,(e=new Date(n.start.time)).setDate(n.start.d+t),this.getDateInfo(e))}},Kw.dimensions=Kw.prototype.dimensions,Kw.getDimensionsInfo=Kw.prototype.getDimensionsInfo,Kw.create=function(t,e){var n=[];return t.eachComponent("calendar",function(t){var e=new Kw(t);n.push(e),t.coordinateSystem=e}),t.eachSeries(function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=n[t.get("calendarIndex")||0])}),n},eu.register("calendar",Kw);var Jw=u.extend({type:"calendar",coordinateSystem:null,defaultOption:{zlevel:0,z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",nameMap:"en",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",nameMap:"en",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},init:function(t,e,n,i){var o=_l(t);Jw.superApply(this,"init",arguments),Qw(t,o)},mergeOption:function(t,e){Jw.superApply(this,"mergeOption",arguments),Qw(this.option,t)}});function Qw(t,i){var o=t.cellSize,e=(D(o)?1===o.length&&(o[1]=o[0]):o=t.cellSize=[o,o],I([0,1],function(t){return(null!=(e=i)[gl[n=t][0]]||null!=e[gl[n][1]]&&null!=e[gl[n][2]])&&(o[t]="auto"),null!=o[t]&&"auto"!==o[t];var e,n}));xl(t,i,{type:"box",ignoreSize:e})}var tb={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["ไธ€ๆœˆ","ไบŒๆœˆ","ไธ‰ๆœˆ","ๅ››ๆœˆ","ไบ”ๆœˆ","ๅ…ญๆœˆ","ไธƒๆœˆ","ๅ…ซๆœˆ","ไนๆœˆ","ๅๆœˆ","ๅไธ€ๆœˆ","ๅไบŒๆœˆ"]},eb={EN:["S","M","T","W","T","F","S"],CN:["ๆ—ฅ","ไธ€","ไบŒ","ไธ‰","ๅ››","ไบ”","ๅ…ญ"]},nb=(rd({type:"calendar",_tlpoints:null,_blpoints:null,_firstDayOfMonth:null,_firstDayPoints:null,render:function(t,e,n){var i=this.group,o=(i.removeAll(),t.coordinateSystem),a=o.getRangeInfo(),o=o.getOrient();this._renderDayRect(t,a,i),this._renderLines(t,a,o,i),this._renderYearText(t,a,o,i),this._renderMonthText(t,o,i),this._renderWeekText(t,a,o,i)},_renderDayRect:function(t,e,n){for(var i=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),a=i.getCellWidth(),r=i.getCellHeight(),s=e.start.time;s<=e.end.time;s=i.getNextNDay(s,1).time){var l=i.dataToRect([s],!1).tl,l=new V({shape:{x:l[0],y:l[1],width:a,height:r},cursor:"default",style:o});n.add(l)}},_renderLines:function(e,t,n,i){var o=this,a=e.coordinateSystem,r=e.getModel("splitLine.lineStyle").getLineStyle(),s=e.get("splitLine.show"),l=r.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=t.start,h=0;u.time<=t.end.time;h++){d(u.formatedDate);var c=(u=0===h?a.getDateInfo(t.start.y+"-"+t.start.m):u).date;c.setMonth(c.getMonth()+1),u=a.getDateInfo(c)}function d(t){o._firstDayOfMonth.push(a.getDateInfo(t)),o._firstDayPoints.push(a.dataToRect([t],!1).tl);t=o._getLinePointsOfOneWeek(e,t,n);o._tlpoints.push(t[0]),o._blpoints.push(t[t.length-1]),s&&o._drawSplitline(t,r,i)}d(a.getNextNDay(t.end.time,1).formatedDate),s&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,l,n),r,i),s&&this._drawSplitline(o._getEdgesPoints(o._blpoints,l,n),r,i)},_getEdgesPoints:function(t,e,n){t=[t[0].slice(),t[t.length-1].slice()],n="horizontal"===n?0:1;return t[0][n]=t[0][n]-e/2,t[1][n]=t[1][n]+e/2,t},_drawSplitline:function(t,e,n){t=new vr({z2:20,shape:{points:t},style:e});n.add(t)},_getLinePointsOfOneWeek:function(t,e,n){var i=t.coordinateSystem;e=i.getDateInfo(e);for(var o=[],a=0;a<7;a++){var r=i.getNextNDay(e.time,a),s=i.dataToRect([r.time],!1);o[2*r.day]=s.tl,o[2*r.day+1]=s["horizontal"===n?"bl":"tr"]}return o},_formatterLabel:function(t,e){return"string"==typeof t&&t?rl(t,e):"function"==typeof t?t(e):e.nameMap},_yearTextPositionControl:function(t,e,n,i,o){e=e.slice();var a=["center","bottom"],o=("bottom"===i?(e[1]+=o,a=["center","top"]):"left"===i?e[0]-=o:"right"===i?(e[0]+=o,a=["center","top"]):e[1]-=o,0);return{rotation:o="left"!==i&&"right"!==i?o:Math.PI/2,position:e,style:{textAlign:a[0],textVerticalAlign:a[1]}}},_renderYearText:function(t,e,n,i){var o,a,r,s,l,u,t=t.getModel("yearLabel");t.get("show")&&(o=t.get("margin"),a=(a=t.get("position"))||("horizontal"!==n?"top":"left"),r=((u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]])[0][0]+u[1][0])/2,l=(u[0][1]+u[1][1])/2,r={top:[r,u[s="horizontal"===n?0:1][1]],bottom:[r,u[1-s][1]],left:[u[1-s][0],l],right:[u[s][0],l]},u=e.start.y,+e.end.y>+e.start.y&&(u=u+"-"+e.end.y),s=t.get("formatter"),l={start:e.start.y,end:e.end.y,nameMap:u},e=this._formatterLabel(s,l),hs((u=new B({z2:30})).style,t,{text:e}),u.attr(this._yearTextPositionControl(u,r[a],n,a,o)),i.add(u))},_monthTextPositionControl:function(t,e,n,i,o){var a="left",r="top",s=t[0],t=t[1];return"horizontal"===n?(t+=o,e&&(a="center"),"start"===i&&(r="bottom")):(s+=o,e&&(r="middle"),"start"===i&&(a="right")),{x:s,y:t,textAlign:a,textVerticalAlign:r}},_renderMonthText:function(t,e,n){var i=t.getModel("monthLabel");if(i.get("show"))for(var o=i.get("nameMap"),a=i.get("margin"),r=i.get("position"),t=i.get("align"),s=[this._tlpoints,this._blpoints],l=(T(o)&&(o=tb[o.toUpperCase()]||[]),"start"===r?0:1),u="horizontal"===e?0:1,a="start"===r?-a:a,h="center"===t,c=0;c<s[l].length-1;c++){var d=s[l][c].slice(),p=this._firstDayOfMonth[c],g=(h&&(g=this._firstDayPoints[c],d[u]=(g[u]+s[0][c+1][u])/2),i.get("formatter")),f=o[+p.m-1],p={yyyy:p.y,yy:(p.y+"").slice(2),MM:p.m,M:+p.m,nameMap:f},f=this._formatterLabel(g,p),p=new B({z2:30});O(hs(p.style,i,{text:f}),this._monthTextPositionControl(d,h,e,r,a)),n.add(p)}},_weekTextPositionControl:function(t,e,n,i,o){var a="center",r="middle",s=t[0],t=t[1],n="start"===n;return"horizontal"===e?(s=s+i+(n?1:-1)*o[0]/2,a=n?"right":"left"):(t=t+i+(n?1:-1)*o[1]/2,r=n?"bottom":"top"),{x:s,y:t,textAlign:a,textVerticalAlign:r}},_renderWeekText:function(t,e,n,i){var o=t.getModel("dayLabel");if(o.get("show")){var a=t.coordinateSystem,r=o.get("position"),s=o.get("nameMap"),l=o.get("margin"),u=a.getFirstDayOfWeek(),h=(T(s)&&(s=eb[s.toUpperCase()]||[]),a.getNextNDay(e.end.time,7-e.lweek).time),c=[a.getCellWidth(),a.getCellHeight()],l=F(l,c["horizontal"===n?0:1]);"start"===r&&(h=a.getNextNDay(e.start.time,-(7+e.fweek)).time,l=-l);for(var d=0;d<7;d++){var p=a.getNextNDay(h,d),p=a.dataToRect([p.time],!1).center,g=Math.abs((d+u)%7),f=new B({z2:30});O(hs(f.style,o,{text:s[g]}),this._weekTextPositionControl(p,n,r,l,c)),i.add(f)}}}}),ad({type:"title",layoutMode:{type:"box",ignoreSize:!0},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:"bolder",color:"#333"},subtextStyle:{color:"#aaa"}}}),rd({type:"title",render:function(t,e,n){var i,o,a,r,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=t.get("textBaseline"),s=(u=new B({style:hs({},u,{text:t.get("text"),textFill:u.getTextColor()},{disableBox:!0}),z2:10})).getBoundingRect(),l=t.get("subtext"),o=new B({style:hs({},o,{text:l,textFill:o.getTextColor(),y:s.height+t.get("itemGap"),textVerticalAlign:"top"},{disableBox:!0}),z2:10}),a=t.get("link"),r=t.get("sublink"),s=t.get("triggerEvent",!0),u.silent=!a&&!s,o.silent=!r&&!s,a&&u.on("click",function(){window.open(a,"_"+t.get("target"))}),r&&o.on("click",function(){window.open(r,"_"+t.get("subtarget"))}),u.eventData=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=yl(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.attr("position",[l.x,l.y]),u.setStyle(n={textAlign:h,textVerticalAlign:c}),o.setStyle(n),s=i.getBoundingRect(),u=l.margin,(h=t.getItemStyle(["color","opacity"])).fill=t.get("backgroundColor"),Yr(c=new V({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,silent:!0})),i.add(c))}}),ad({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(t,e,n){this.mergeDefaultAndTheme(t,n),t.selected=t.selected||{}},mergeOption:function(t){nb.superCall(this,"mergeOption",t)},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"))}},_updateData:function(i){var o=[],a=[];i.eachRawSeries(function(t){var e,n=t.name;a.push(n),t.legendDataProvider&&(n=(n=t.legendDataProvider()).mapArray(n.getName),i.isSeriesFiltered(t)||(a=a.concat(n)),n.length)?o=o.concat(n):e=!0,e&&yo(t)&&o.push(t.name)}),this._availableNames=a;var t=I(this.get("data")||o,function(t){return new w(t="string"!=typeof t&&"number"!=typeof t?t:{name:t},this,this.ecModel)},this);this._data=t},getData:function(){return this._data},select:function(t){var e=this.option.selected;"single"===this.get("selectedMode")&&Z(this._data,function(t){e[t.get("name")]=!1}),e[t]=!0},unSelect:function(t){"single"!==this.get("selectedMode")&&(this.option.selected[t]=!1)},toggleSelected:function(t){var e=this.option.selected;e.hasOwnProperty(t)||(e[t]=!0),this[e[t]?"unSelect":"select"](t)},isSelected:function(t){var e=this.option.selected;return!(e.hasOwnProperty(t)&&!e[t])&&0<=S(this._availableNames,t)},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,inactiveColor:"#ccc",textStyle:{color:"#333"},selectedMode:!0,tooltip:{show:!1}}}));function ib(t,e,n){var i,o={},a="toggleSelected"===t;return n.eachComponent("legend",function(n){a&&null!=i?n[i?"select":"unSelect"](e.name):(n[t](e.name),i=n.isSelected(e.name)),Z(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)})}),{name:e.name,selected:o}}function ob(t,e){var n=Qs(e.get("padding")),i=e.getItemStyle(["color","opacity"]);return i.fill=e.get("backgroundColor"),new V({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})}s("legendToggleSelect","legendselectchanged",L(ib,"toggleSelected")),s("legendSelect","legendselected",L(ib,"select")),s("legendUnSelect","legendunselected",L(ib,"unSelect"));var ab=L,rb=Z,sb=R,Fh=rd({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new sb),this._backgroundEl,this._isFirstRender=!0},getContentGroup:function(){return this._contentGroup},render:function(t,e,n){var i,o,a,r=this._isFirstRender;this._isFirstRender=!1,this.resetInner(),t.get("show",!0)&&((o=t.get("align"))&&"auto"!==o||(o="right"===t.get("left")&&"vertical"===t.get("orient")?"right":"left"),this.renderInner(o,t,e,n),a=yl(e=t.getBoxLayoutParams(),n={width:n.getWidth(),height:n.getHeight()},i=t.get("padding")),a=yl(C({width:(o=this.layoutInner(t,o,a,r)).width,height:o.height},e),n,i),this.group.attr("position",[a.x-o.x,a.y-o.y]),this.group.add(this._backgroundEl=ob(o,t)))},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl)},renderInner:function(s,l,u,h){var c=this.getContentGroup(),d=E(),p=l.get("selectedMode"),g=[];u.eachRawSeries(function(t){t.get("legendHoverLink")||g.push(t.id)}),rb(l.getData(),function(n,i){var t,e,o,a,r=n.get("name");this.newlineDisabled||""!==r&&"\n"!==r?(t=u.getSeriesByName(r)[0],d.get(r)||(t?("function"==typeof(e=(a=t.getData()).getVisual("color"))&&(e=e(t.getDataParams(0))),o=a.getVisual("legendSymbol")||"roundRect",a=a.getVisual("symbol"),this._createItem(r,i,n,l,o,a,s,e,p).on("click",ab(lb,r,h)).on("mouseover",ab(ub,t.name,null,h,g)).on("mouseout",ab(hb,t.name,null,h,g)),d.set(r,!0)):u.eachRawSeries(function(t){var e;d.get(r)||!t.legendDataProvider||(e=(t=t.legendDataProvider()).indexOfName(r))<0||(t=t.getItemVisual(e,"color"),this._createItem(r,i,n,l,"roundRect",null,s,t,p).on("click",ab(lb,r,h)).on("mouseover",ab(ub,null,r,h,g)).on("mouseout",ab(hb,null,r,h,g)),d.set(r,!0))},this),!H)||d.get(r)||console.warn(r+" series not exists. Legend data should be same with series name or data name.")):c.add(new sb({newline:!0}))},this)},_createItem:function(t,e,n,i,o,a,r,s,l){var u=i.get("itemWidth"),h=i.get("itemHeight"),c=i.get("inactiveColor"),d=i.get("symbolKeepAspect"),p=i.isSelected(t),g=new sb,f=n.getModel("textStyle"),m=n.get("icon"),n=n.getModel("tooltip"),y=n.parentModel,o=(g.add(Wp(o=m||o,0,0,u,h,p?s:c,null==d||d)),m||!a||a===o&&"none"!==a||g.add(Wp(a="none"===a?"circle":a,(u-(m=.8*h))/2,(h-m)/2,m,m,p?s:c,null==d||d)),"left"===r?u+5:-5),a=r,m=i.get("formatter"),s=t,d=("string"==typeof m&&m?s=m.replace("{name}",null!=t?t:""):"function"==typeof m&&(s=m(t)),g.add(new B({style:hs({},f,{text:s,x:o,y:h/2,textFill:p?f.getTextColor():c,textAlign:a,textVerticalAlign:"middle"})})),new V({shape:g.getBoundingRect(),invisible:!0,tooltip:n.get("show")?O({content:t,formatter:y.get("formatter",!0)||function(){return t},formatterParams:{componentType:"legend",legendIndex:i.componentIndex,name:t,$vars:["name"]}},n.option):null}));return g.add(d),g.eachChild(function(t){t.silent=!0}),d.silent=!l,this.getContentGroup().add(g),ss(g),g.__legendDataIndex=e,g},layoutInner:function(t,e,n){var i=this.getContentGroup(),t=(ml(t.get("orient"),i,t.get("itemGap"),n.width,n.height),i.getBoundingRect());return i.attr("position",[-t.x,-t.y]),this.group.getBoundingRect()},remove:function(){this.getContentGroup().removeAll(),this._isFirstRender=!0}});function lb(t,e){e.dispatchAction({type:"legendToggleSelect",name:t})}function ub(t,e,n,i){var o=n.getZr().storage.getDisplayList()[0];o&&o.useHoverLayer||n.dispatchAction({type:"highlight",seriesName:t,name:e,excludeSeriesId:i})}function hb(t,e,n,i){var o=n.getZr().storage.getDisplayList()[0];o&&o.useHoverLayer||n.dispatchAction({type:"downplay",seriesName:t,name:e,excludeSeriesId:i})}Qc(function(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})}),u.registerSubTypeDefaulter("legend",function(){return"plain"});var cb=nb.extend({type:"legend.scroll",setScrollDataIndex:function(t){this.option.scrollDataIndex=t},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},init:function(t,e,n,i){var o=_l(t);cb.superCall(this,"init",t,e,n,i),db(this,t,o)},mergeOption:function(t,e){cb.superCall(this,"mergeOption",t,e),db(this,this.option,t)},getOrient:function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}}});function db(t,e,n){var i=[1,1];i[t.getOrient().index]=0,xl(e,n,{type:"box",ignoreSize:i})}var pb=R,gb=["width","height"],fb=["x","y"],mb=Fh.extend({type:"legend.scroll",newlineDisabled:!0,init:function(){mb.superCall(this,"init"),this._currentIndex=0,this.group.add(this._containerGroup=new pb),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new pb),this._showController},resetInner:function(){mb.superCall(this,"resetInner"),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},renderInner:function(t,i,e,o){var a=this,r=(mb.superCall(this,"renderInner",t,i,e,o),this._controllerGroup),s=i.get("pageIconSize",!0),t=(D(s)||(s=[s,s]),n("pagePrev",0),i.getModel("pageTextStyle"));function n(t,e){var n=t+"DataIndex",e=Ms(i.get("pageIcons",!0)[i.getOrient().name][e],{onclick:A(a._pageGo,a,n,i,o)},{x:-s[0]/2,y:-s[1]/2,width:s[0],height:s[1]});e.name=t,r.add(e)}r.add(new B({name:"pageText",style:{textFill:t.getTextColor(),font:t.getFont(),textVerticalAlign:"middle",textAlign:"center"},silent:!0})),n("pageNext",1)},layoutInner:function(t,e,n,i){var o=this.getContentGroup(),a=this._containerGroup,r=this._controllerGroup,s=t.getOrient().index,l=gb[s],u=gb[1-s],h=fb[1-s],c=(ml(t.get("orient"),o,t.get("itemGap"),s?n.width:null,s?null:n.height),ml("horizontal",r,t.get("pageButtonItemGap",!0)),o.getBoundingRect()),d=r.getBoundingRect(),p=this._showController=c[l]>n[l],g=[-c.x,-c.y],i=(i||(g[s]=o.position[s]),[0,0]),f=[-d.x,-d.y],m=st(t.get("pageButtonGap",!0),t.get("itemGap",!0)),g=(p&&("end"===t.get("pageButtonPosition",!0)?f[s]+=n[l]-d[l]:i[s]+=d[l]+m),f[1-s]+=c[u]/2-d[u]/2,o.attr("position",g),a.attr("position",i),r.attr("position",f),this.group.getBoundingRect()),c=((g={x:0,y:0})[l]=(p?n:c)[l],g[u]=Math.max(c[u],d[u]),g[h]=Math.min(0,d[h]+f[1-s]),a.__rectSize=n[l],p?((i={x:0,y:0})[l]=Math.max(n[l]-d[l]-m,0),i[u]=g[u],a.setClipPath(new V({shape:i})),a.__rectSize=i[l]):r.eachChild(function(t){t.attr({invisible:!0,silent:!0})}),this._getPageInfo(t));return null!=c.pageIndex&&G(o,{position:c.contentPosition},!!p&&t),this._updatePageInfoView(t,c),g},_pageGo:function(t,e,n){t=this._getPageInfo(e)[t];null!=t&&n.dispatchAction({type:"legendScroll",scrollDataIndex:t,legendId:e.id})},_updatePageInfoView:function(n,i){var o=this._controllerGroup,t=(Z(["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"),a=i.pageIndex,a=null!=a?a+1:0,r=i.pageCount;t&&e&&t.setStyle("text",T(e)?e.replace("{current}",a).replace("{total}",r):e({current:a,total:r}))},_getPageInfo:function(t){var e=t.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,o=t.getOrient().index,a=gb[o],r=fb[o],t=this._findTargetItemIndex(e),s=n.children(),e=s[t],l=s.length,u=l?1:0,h={contentPosition:n.position.slice(),pageCount:u,pageIndex:u-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(e){n=f(e);h.contentPosition[o]=-n.s;for(var c=t+1,d=n,p=n,g=null;c<=l;++c)(!(g=f(s[c]))&&p.e>d.s+i||g&&!m(g,d.s))&&(d=p.i>d.i?p:g)&&(null==h.pageNextDataIndex&&(h.pageNextDataIndex=d.i),++h.pageCount),p=g;for(c=t-1,p=d=n,g=null;-1<=c;--c)(g=f(s[c]))&&m(p,g.s)||!(d.i<p.i)||(p=d,null==h.pagePrevDataIndex&&(h.pagePrevDataIndex=d.i),++h.pageCount,++h.pageIndex),d=g}return h;function f(t){var e,n;if(t)return{s:n=(e=t.getBoundingRect())[r]+t.position[o],e:n+e[a],i:t.__legendDataIndex}}function m(t,e){return t.e>=e&&t.s<=e+i}},_findTargetItemIndex:function(n){var i,t=this.getContentGroup();return this._showController?t.eachChild(function(t,e){t.__legendDataIndex===n&&(i=e)}):i=0,i}}),yb=(s("legendScroll","legendscroll",function(t,e){var n=t.scrollDataIndex;null!=n&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(t){t.setScrollDataIndex(n)})}),ad({type:"tooltip",dependencies:["axisPointer"],defaultOption:{zlevel:0,z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:!1,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"rgba(50,50,50,0.7)",borderColor:"#333",borderRadius:4,borderWidth:0,padding:5,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#fff",fontSize:14}}}),Z),vb=Js,xb=["","-webkit-","-moz-","-o-"];function _b(i){var n,o,t,e,a=[],r=i.get("transitionDuration"),s=i.get("backgroundColor"),l=i.getModel("textStyle"),u=i.get("padding");return r&&a.push((e="left "+r+"s "+(t="cubic-bezier(0.23, 1, 0.32, 1)")+",top "+r+"s "+t,I(xb,function(t){return t+"transition:"+e}).join(";"))),s&&(y.canvasSupported?a.push("background-Color:"+s):(a.push("background-Color:#"+Xe(s)),a.push("filter:alpha(opacity=70)"))),yb(["width","color","radius"],function(t){var e="border-"+t,n=vb(e),n=i.get(n);null!=n&&a.push(e+":"+n+("color"===t?"":"px"))}),a.push((o=[],r=(n=l).get("fontSize"),(t=n.getTextColor())&&o.push("color:"+t),o.push("font:"+n.getFont()),r&&o.push("line-height:"+Math.round(3*r/2)+"px"),yb(["decoration","align"],function(t){var e=n.get(t);e&&o.push("text-"+t+":"+e)}),o.join(";"))),null!=u&&a.push("padding:"+Qs(u).join("px ")+"px"),a.join(";")+";"}function wb(n,t){if(y.wxa)return null;var e=document.createElement("div"),i=this._zr=t.getZr(),o=(this.el=e,this._x=t.getWidth()/2,this._y=t.getHeight()/2,n.appendChild(e),this._container=n,this._show=!1,this._hideTimeout,this);e.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},e.onmousemove=function(t){var e;t=t||window.event,o._enterable||(e=i.handler,qt(n,t,!0),e.dispatch("mousemove",t))},e.onmouseleave=function(){o._enterable&&o._show&&o.hideLater(o._hideDelay),o._inContent=!1}}function bb(t){this._zr=t.getZr(),this._show=!1,this._hideTimeout}wb.prototype={constructor:wb,_enterable:!0,update:function(){var t=this._container,e=t.currentStyle||document.defaultView.getComputedStyle(t),t=t.style;"absolute"!==t.position&&"absolute"!==e.position&&(t.position="relative")},show:function(t){clearTimeout(this._hideTimeout);var e=this.el;e.style.cssText="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+_b(t)+";left:"+this._x+"px;top:"+this._y+"px;"+(t.get("extraCssText")||""),e.style.display=e.innerHTML?"block":"none",e.style.pointerEvents=this._enterable?"auto":"none",this._show=!0},setContent:function(t){this.el.innerHTML=null==t?"":t},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el;return[t.clientWidth,t.clientHeight]},moveTo:function(t,e){var n=this._zr,n=(n&&n.painter&&(n=n.painter.getViewportRootOffset())&&(t+=n.offsetLeft,e+=n.offsetTop),this.el.style);n.left=t+"px",n.top=e+"px",this._x=t,this._y=e},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(A(this.hide,this),t)):this.hide())},isShow:function(){return this._show},getOuterSize:function(){var t,e=this.el.clientWidth,n=this.el.clientHeight;return document.defaultView&&document.defaultView.getComputedStyle&&(t=document.defaultView.getComputedStyle(this.el))&&(e+=parseInt(t.paddingLeft,10)+parseInt(t.paddingRight,10)+parseInt(t.borderLeftWidth,10)+parseInt(t.borderRightWidth,10),n+=parseInt(t.paddingTop,10)+parseInt(t.paddingBottom,10)+parseInt(t.borderTopWidth,10)+parseInt(t.borderBottomWidth,10)),{width:e,height:n}}},bb.prototype={constructor:bb,_enterable:!0,update:function(){},show:function(t){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.attr("show",!0),this._show=!0},setContent:function(t,e,n){this.el&&this._zr.remove(this.el);for(var i={},o=t,a=o.indexOf("{marker");0<=a;){var r=o.indexOf("|}"),s=o.substr(a+7,r-a-7);-1<s.indexOf("sub")?i["marker"+s]={textWidth:4,textHeight:4,textBorderRadius:2,textBackgroundColor:e[s],textOffset:[3,0]}:i["marker"+s]={textWidth:10,textHeight:10,textBorderRadius:5,textBackgroundColor:e[s]},a=(o=o.substr(r+1)).indexOf("{marker")}this.el=new B({style:{rich:i,text:t,textLineHeight:20,textBackgroundColor:n.get("backgroundColor"),textBorderRadius:n.get("borderRadius"),textFill:n.get("textStyle.color"),textPadding:n.get("padding")},z:n.get("z")}),this._zr.add(this.el);var l=this;this.el.on("mouseover",function(){l._enterable&&(clearTimeout(l._hideTimeout),l._show=!0),l._inContent=!0}),this.el.on("mouseout",function(){l._enterable&&l._show&&l.hideLater(l._hideDelay),l._inContent=!1})},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el.getBoundingRect();return[t.width,t.height]},moveTo:function(t,e){this.el&&this.el.attr("position",[t,e])},hide:function(){this.el.hide(),this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(A(this.hide,this),t)):this.hide())},isShow:function(){return this._show},getOuterSize:function(){return this.getSize()}};var Sb=A,Mb=Z,Ib=F,Tb=new V({shape:{x:-1,y:-1,width:2,height:2}});function Ab(t){for(var e=t.pop();t.length;){var n=t.pop();n&&(w.isInstance(n)&&(n=n.get("tooltip",!0)),e=new w(n="string"==typeof n?{formatter:n}:n,e,e.ecModel))}return e}function Db(t,e){return t.dispatchAction||A(e.dispatchAction,e)}function Cb(t){return"center"===t||"middle"===t}rd({type:"tooltip",init:function(t,e){var n;y.node||(t=t.getComponent("tooltip").get("renderMode"),this._renderMode=Io(t),"html"===this._renderMode?(n=new wb(e.getDom(),e),this._newLine="<br/>"):(n=new bb(e),this._newLine="\n"),this._tooltipContent=n)},render:function(t,e,n){y.node||(this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=n,this._lastDataByCoordSys=null,this._alwaysShowContent=t.get("alwaysShowContent"),(e=this._tooltipContent).update(),e.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow())},_initGlobalListener:function(){var i=this._tooltipModel.get("triggerOn");m_("itemTooltip",this._api,Sb(function(t,e,n){"none"!==i&&(0<=i.indexOf(t)?this._tryShow(e,n):"leave"===t&&this._hide(n))},this))},_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(){t.manuallyShowTip(e,n,i,{x:t._lastX,y:t._lastY})}))},manuallyShowTip:function(t,e,n,i){var o,a,r;i.from===this.uid||y.node||(o=Db(i,n),this._ticket="",r=i.dataByCoordSys,i.tooltip&&null!=i.x&&null!=i.y?((a=Tb).position=[i.x,i.y],a.update(),a.tooltip=i.tooltip,this._tryShow({offsetX:i.x,offsetY:i.y,target:a},o)):r?this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,event:{},dataByCoordSys:i.dataByCoordSys,tooltipOption:i.tooltipOption},o):null!=i.seriesIndex?this._manuallyAxisShowTip(t,e,n,i)||(r=(a=a_(i,e)).point[0],t=a.point[1],null!=r&&null!=t&&this._tryShow({offsetX:r,offsetY:t,position:i.position,target:a.el,event:{}},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,event:{}},o)))},manuallyHideTip:function(t,e,n,i){var o=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,i.from!==this.uid&&this._hide(Db(i,n))},_manuallyAxisShowTip:function(t,e,n,i){var o=i.seriesIndex,a=i.dataIndex,r=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=o&&null!=a&&null!=r){r=e.getSeriesByIndex(o);if(r&&"axis"===(t=Ab([r.getData().getItemModel(a),r,(r.coordinateSystem||{}).model,t])).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:a,position:i.position}),!0}},_tryShow:function(t,e){var n,i=t.target;this._tooltipModel&&(this._lastX=t.offsetX,this._lastY=t.offsetY,(n=t.dataByCoordSys)&&n.length?this._showAxisTooltip(n,t):i&&null!=i.dataIndex?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(t,i,e)):i&&i.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(t,i,e)):(this._lastDataByCoordSys=null,this._hide(e)))},_showOrMove:function(t,e){t=t.get("showDelay");e=A(e,this),clearTimeout(this._showTimout),0<t?this._showTimout=setTimeout(e,t):e()},_showAxisTooltip:function(t,e){var u=this._ecModel,n=this._tooltipModel,i=[e.offsetX,e.offsetY],h=[],c=[],o=Ab([e.tooltipOption,n]),d=this._renderMode,p=this._newLine,g={},a=(Mb(t,function(t){Mb(t.dataByAxis,function(o){var a,t,r=u.getComponent(o.axisDim+"Axis",o.axisIndex),s=o.value,l=[];r&&null!=s&&(a=k_(s,r.axis,u,o.seriesDataIndices,o.valueLabelOpt),Z(o.seriesDataIndices,function(t){var e,n=u.getSeriesByIndex(t.seriesIndex),t=t.dataIndexInside,i=n&&n.getDataParams(t);i.axisDim=o.axisDim,i.axisIndex=o.axisIndex,i.axisType=o.axisType,i.axisId=o.axisId,i.axisValue=Pp(r.axis,s),i.axisValueLabel=a,i&&(c.push(i),k(i=n.formatTooltip(t,!0,null,d))?(e=i.html,n=i.markers,f(g,n)):e=i,l.push(e))}),t=a,"html"!==d?h.push(l.join(p)):h.push((t?nl(t)+p:"")+l.join(p)))})},this),h.reverse(),h=h.join(this._newLine+this._newLine),e.position);this._showOrMove(o,function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(o,a,i[0],i[1],this._tooltipContent,c):this._showTooltipContent(o,h,c,Math.random(),i[0],i[1],a,void 0,g)})},_showSeriesItemTooltip:function(t,e,n){var i,o,a,r,s=this._ecModel,l=e.seriesIndex,s=s.getSeriesByIndex(l),u=e.dataModel||s,h=e.dataIndex,e=e.dataType,c=u.getData(),d=Ab([c.getItemModel(h),u,s&&(s.coordinateSystem||{}).model,this._tooltipModel]),s=d.get("trigger");null!=s&&"item"!==s||(o=u.getDataParams(h,e),s=u.formatTooltip(h,!1,e,this._renderMode),a=k(s)?(i=s.html,s.markers):(i=s,null),r="item_"+u.name+"_"+h,this._showOrMove(d,function(){this._showTooltipContent(d,i,o,r,t.offsetX,t.offsetY,t.position,t.target,a)}),n({type:"showTip",dataIndexInside:h,dataIndex:c.getRawIndex(h),seriesIndex:l,from:this.uid}))},_showComponentItemTooltip:function(t,e,n){var i=e.tooltip,o=new w(i="string"==typeof i?{content:i,formatter:i}:i,this._tooltipModel,this._ecModel),a=o.get("content"),r=Math.random();this._showOrMove(o,function(){this._showTooltipContent(o,a,o.get("formatterParams")||{},r,t.offsetX,t.offsetY,t.position,e)}),n({type:"showTip",from:this.uid})},_showTooltipContent:function(n,t,i,e,o,a,r,s,l){var u,h,c;this._ticket="",n.get("showContent")&&n.get("show")&&(u=this._tooltipContent,h=n.get("formatter"),r=r||n.get("position"),t=t,h&&"string"==typeof h?t=al(h,i,!0):"function"==typeof h&&(c=Sb(function(t,e){t===this._ticket&&(u.setContent(e,l,n),this._updatePosition(n,r,o,a,u,i,s))},this),this._ticket=e,t=h(i,e,c)),u.setContent(t,l,n),u.show(n),this._updatePosition(n,r,o,a,u,i,s))},_updatePosition:function(t,e,n,i,o,a,r){var s,l,u,h,c=this._api.getWidth(),d=this._api.getHeight(),p=(e=e||t.get("position"),o.getSize()),g=t.get("align"),f=t.get("verticalAlign"),m=r&&r.getBoundingRect().clone();r&&m.applyTransform(r.transform),D(e="function"==typeof e?e([n,i],a,o.el,m,{viewSize:[c,d],contentSize:p.slice()}):e)?(n=Ib(e[0],c),i=Ib(e[1],d)):k(e)?(e.width=p[0],e.height=p[1],n=(a=yl(e,{width:c,height:d})).x,i=a.y,f=g=null):i=(n=(s="string"==typeof e&&r?function(t,e,n){var i=n[0],o=n[1],a=0,r=0,s=e.width,l=e.height;switch(t){case"inside":a=e.x+s/2-i/2,r=e.y+l/2-o/2;break;case"top":a=e.x+s/2-i/2,r=e.y-o-5;break;case"bottom":a=e.x+s/2-i/2,r=e.y+l+5;break;case"left":a=e.x-i-5,r=e.y+l/2-o/2;break;case"right":a=e.x+s+5,r=e.y+l/2-o/2}return[a,r]}(e,m,p):(a=n,r=i,e=c,m=d,l=g?null:20,u=f?null:20,h=(h=o).getOuterSize(),s=h.width,h=h.height,null!=l&&(e<a+s+l?a-=s+l:a+=l),null!=u&&(m<r+h+u?r-=h+u:r+=u),[a,r]))[0],s[1]),g&&(n-=Cb(g)?p[0]/2:"right"===g?p[0]:0),f&&(i-=Cb(f)?p[1]/2:"bottom"===f?p[1]:0),t.get("confine")&&(e=n,l=i,m=c,h=d,u=(u=o).getOuterSize(),a=u.width,u=u.height,e=Math.min(e+a,m)-a,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)},_updateContentNotChangedOnAxis:function(n){var t=this._lastDataByCoordSys,a=!!t&&t.length===n.length;return a&&Mb(t,function(t,e){var t=t.dataByAxis||{},o=(n[e]||{}).dataByAxis||[];(a&=t.length===o.length)&&Mb(t,function(t,e){var e=o[e]||{},n=t.seriesDataIndices||[],i=e.seriesDataIndices||[];(a&=t.value===e.value&&t.axisType===e.axisType&&t.axisId===e.axisId&&n.length===i.length)&&Mb(n,function(t,e){e=i[e];a&=t.seriesIndex===e.seriesIndex&&t.dataIndex===e.dataIndex})})}),this._lastDataByCoordSys=n,!!a},_hide:function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},dispose:function(t,e){y.node||(this._tooltipContent.hide(),x_("itemTooltip",e))}}),s({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},function(){}),s({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},function(){});var Lb=$s,kb=nl;function Pb(t){co(t,"label",["show"])}var n=ad({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,n,i){if(H&&"marker"===this.type)throw new Error("Marker component is abstract component. Use markLine, markPoint, markArea instead.");this.mergeDefaultAndTheme(t,n),this.mergeOption(t,n,i.createdBySelf,!0)},isAnimationEnabled:function(){var t;return!y.node&&(t=this.__hostSeries,this.getShallow("animation"))&&t&&t.isAnimationEnabled()},mergeOption:function(t,i,e,o){var a=this.constructor,r=this.mainType+"Model";e||i.eachSeries(function(t){var e=t.get(this.mainType,!0),n=t[r];e&&e.data?(n?n.mergeOption(e,i,!0):(o&&Pb(e),Z(e.data,function(t){t instanceof Array?(Pb(t[0]),Pb(t[1])):Pb(t)}),O(n=new a(e,this,i),{mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0}),n.__hostSeries=t),t[r]=n):t[r]=null},this)},formatTooltip:function(t){var e=this.getData(),n=this.getRawValue(t),i=D(n)?I(n,Lb).join(", "):Lb(n),e=e.getName(t),t=kb(this.name);return null==n&&!e||(t+="<br />"),e&&(t+=kb(e),null!=n)&&(t+=" : "),null!=n&&(t+=kb(i)),t},getData:function(){return this._data},setData:function(t){this._data=t}}),Nb=(i(n,Ds),n.extend({type:"markPoint",defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}}}),S);function Ob(t,e,n,i,o,a){var r=[],s=Vd(e,i)?e.getCalculationInfo("stackResultDimension"):i,t=Gb(e,s,t),s=e.indicesOfNearest(s,t)[0],t=(r[o]=e.get(n,s),r[a]=e.get(i,s),Rs(e.get(i,s)));return 0<=(t=Math.min(t,20))&&(r[a]=+r[a].toFixed(t)),r}var h=L,Eb={min:h(Ob,"min"),max:h(Ob,"max"),average:h(Ob,"average")};function zb(t,e){var n=t.getData(),i=t.coordinateSystem;if(e&&(a=e,isNaN(parseFloat(a.x))||isNaN(parseFloat(a.y)))&&!D(e.coord)&&i){var o=i.dimensions,a=Rb(e,n,i,t);if((e=N(e)).type&&Eb[e.type]&&a.baseAxis&&a.valueAxis){i=Nb(o,a.baseAxis.dim),t=Nb(o,a.valueAxis.dim);e.coord=Eb[e.type](n,a.baseDataDim,a.valueDataDim,i,t),e.value=e.coord[t]}else{for(var r=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],s=0;s<2;s++)Eb[r[s]]&&(r[s]=Gb(n,n.mapDimension(o[s]),r[s]));e.coord=r}}return e}function Rb(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 a=n.getDimensionInfo(i[o]);if(a.name===e)return a.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 Bb(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 Vb(t,e,n,i){return i<2?t.coord&&t.coord[i]:t.value}function Gb(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,!0)["max"===n?1:0]}c=rd({type:"marker",init:function(){this.markerGroupMap=E()},render:function(t,n,i){var e=this.markerGroupMap,o=(e.each(function(t){t.__keep=!1}),this.type+"Model");n.eachSeries(function(t){var e=t[o];e&&this.renderSeries(t,e,n,i)},this),e.each(function(t){t.__keep||this.group.remove(t.group)},this)},renderSeries:function(){}});function Fb(r,s,l){var u=s.coordinateSystem;r.each(function(t){var e,n,i,o=r.getItemModel(t),a=F(o.get("x"),l.getWidth()),o=F(o.get("y"),l.getHeight());isNaN(a)||isNaN(o)?s.getMarkerPosition?i=s.getMarkerPosition(r.getValues(r.dimensions,t)):u&&(e=r.get(u.dimensions[0],t),n=r.get(u.dimensions[1],t),i=u.dataToPoint([e,n])):i=[a,o],isNaN(a)||(i[0]=a),isNaN(o)||(i[1]=o),r.setItemLayout(t,i)})}c.extend({type:"markPoint",updateTransform:function(t,e,n){e.eachSeries(function(t){var e=t.markPointModel;e&&(Fb(e.getData(),t,n),this.markerGroupMap.get(t.id).updateLayout(e))},this)},renderSeries:function(t,i,e,n){var o,a,r=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,u=u.get(s)||u.set(s,new _f),h=(o=t,s=i,a=(r=r)?I(r&&r.dimensions,function(t){return C({name:t},o.getData().getDimensionInfo(o.getData().mapDimension(t))||{})}):[{name:"value",type:"float"}],a=new Sd(a,s),s=I(s.get("data"),L(zb,o)),r&&(s=tt(s,L(Bb,r))),a.initData(s,null,r?Vb:function(t){return t.value}),a);i.setData(h),Fb(i.getData(),t,n),h.each(function(t){var e=h.getItemModel(t),n=e.getShallow("symbolSize");"function"==typeof n&&(n=n(i.getRawValue(t),i.getDataParams(t))),h.setItemVisual(t,{symbolSize:n,color:e.get("itemStyle.color")||l.getVisual("color"),symbol:e.getShallow("symbol")})}),u.updateData(h),this.group.add(u.group),h.eachItemGraphicEl(function(t){t.traverse(function(t){t.dataModel=i})}),u.__keep=!0,u.group.silent=i.get("silent")||t.get("silent")}}),Jc(function(t){t.markPoint=t.markPoint||{}}),n.extend({type:"markLine",defaultOption:{zlevel:0,z:5,symbol:["circle","arrow"],symbolSize:[8,16],precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end"},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"}});function Wb(t,e,n,i){var o,a,r,s=t.getData(),l=i.type;return D(i)||"min"!==l&&"max"!==l&&"average"!==l&&"median"!==l&&null==i.xAxis&&null==i.yAxis||(e=null!=i.yAxis||null!=i.xAxis?(r=null!=i.yAxis?"y":"x",e.getAxis(r),rt(i.yAxis,i.xAxis)):(r=(e=Rb(i,s,e,t)).valueDataDim,e.valueAxis,Gb(s,r,l)),r=1-(s="x"===r?0:1),a={},(o=N(i)).type=null,o.coord=[],a.coord=[],o.coord[r]=-1/0,a.coord[r]=1/0,0<=(r=n.get("precision"))&&"number"==typeof e&&(e=+e.toFixed(Math.min(r,20))),o.coord[s]=a.coord[s]=e,i=[o,a,{type:l,valueIndex:i.valueIndex,value:e}]),(i=[zb(t,i[0]),zb(t,i[1]),O({},i[2])])[2].type=i[2].type||"",f(i[2],i[0]),f(i[2],i[1]),i}function Hb(t){return!isNaN(t)&&!isFinite(t)}function Zb(t,e,n,i){var o=1-t,a=i.dimensions[t];return Hb(e[o])&&Hb(n[o])&&e[t]===n[t]&&i.getAxis(a).containData(e[t])}function Xb(t,e){if("cartesian2d"===t.type){var n=e[0].coord,i=e[1].coord;if(n&&i&&(Zb(1,n,i,t)||Zb(0,n,i,t)))return!0}return Bb(t,e[0])&&Bb(t,e[1])}function Yb(t,e,n,i,o){var a,r,s=i.coordinateSystem,l=t.getItemModel(e),u=F(l.get("x"),o.getWidth()),l=F(l.get("y"),o.getHeight());isNaN(u)||isNaN(l)?(a=i.getMarkerPosition?i.getMarkerPosition(t.getValues(t.dimensions,e)):(r=s.dimensions,o=t.get(r[0],e),i=t.get(r[1],e),s.dataToPoint([o,i])),"cartesian2d"===s.type&&(o=s.getAxis("x"),i=s.getAxis("y"),r=s.dimensions,Hb(t.get(r[0],e))?a[0]=o.toGlobalCoord(o.getExtent()[n?0:1]):Hb(t.get(r[1],e))&&(a[1]=i.toGlobalCoord(i.getExtent()[n?0:1]))),isNaN(u)||(a[0]=u),isNaN(l)||(a[1]=l)):a=[u,l],t.setItemLayout(e,a)}c.extend({type:"markLine",updateTransform:function(t,e,a){e.eachSeries(function(e){var n,i,o,t=e.markLineModel;t&&(n=t.getData(),i=t.__from,o=t.__to,i.each(function(t){Yb(i,t,!0,e,a),Yb(o,t,!1,e,a)}),n.each(function(t){n.setItemLayout(t,[i.getItemLayout(t),o.getItemLayout(t)])}),this.markerGroupMap.get(e.id).updateLayout())},this)},renderSeries:function(o,n,t,a){var e,i,r,s,l=o.coordinateSystem,u=o.id,h=o.getData(),c=this.markerGroupMap,c=c.get(u)||c.set(u,new bv),l=(this.group.add(c.group),e=o,u=n,r=(l=l)?I(l&&l.dimensions,function(t){return C({name:t},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{})}):[{name:"value",type:"float"}],i=new Sd(r,u),r=new Sd(r,u),s=new Sd([],u),u=I(u.get("data"),L(Wb,e,l,u)),l&&(u=tt(u,L(Xb,l))),l=l?Vb:function(t){return t.value},i.initData(I(u,function(t){return t[0]}),null,l),r.initData(I(u,function(t){return t[1]}),null,l),s.initData(I(u,function(t){return t[2]})),s.hasItemOption=!0,{from:i,to:r,line:s}),d=l.from,p=l.to,g=l.line,f=(n.__from=d,n.__to=p,n.setData(g),n.get("symbol")),m=n.get("symbolSize");function y(t,e,n){var i=t.getItemModel(e);Yb(t,e,n,o,a),t.setItemVisual(e,{symbolSize:i.get("symbolSize")||m[n?0:1],symbol:i.get("symbol",!0)||f[n?0:1],color:i.get("itemStyle.color")||h.getVisual("color")})}D(f)||(f=[f,f]),"number"==typeof m&&(m=[m,m]),l.from.each(function(t){y(d,t,!0),y(p,t,!1)}),g.each(function(t){var e=g.getItemModel(t).get("lineStyle.color");g.setItemVisual(t,{color:e||d.getItemVisual(t,"color")}),g.setItemLayout(t,[d.getItemLayout(t),p.getItemLayout(t)]),g.setItemVisual(t,{fromSymbolSize:d.getItemVisual(t,"symbolSize"),fromSymbol:d.getItemVisual(t,"symbol"),toSymbolSize:p.getItemVisual(t,"symbolSize"),toSymbol:p.getItemVisual(t,"symbol")})}),c.updateData(g),l.line.eachItemGraphicEl(function(t,e){t.traverse(function(t){t.dataModel=n})}),c.__keep=!0,c.group.silent=n.get("silent")||o.get("silent")}}),Jc(function(t){t.markLine=t.markLine||{}}),n.extend({type:"markArea",defaultOption:{zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}}});function Ub(t,e,n,i){var o=zb(t,i[0]),t=zb(t,i[1]),i=rt,a=o.coord,r=t.coord;return a[0]=i(a[0],-1/0),a[1]=i(a[1],-1/0),r[0]=i(r[0],1/0),r[1]=i(r[1],1/0),(a=q([{},o,t])).coord=[o.coord,t.coord],a.x0=o.x,a.y0=o.y,a.x1=t.x,a.y1=t.y,a}function jb(t){return!isNaN(t)&&!isFinite(t)}function qb(t,e,n){t=1-t;return jb(e[t])&&jb(n[t])}function Kb(t,e){var n=e.coord[0],i=e.coord[1];return!("cartesian2d"!==t.type||!n||!i||!qb(1,n,i)&&!qb(0,n,i))||Bb(t,{coord:n,x:e.x0,y:e.y0})||Bb(t,{coord:i,x:e.x1,y:e.y1})}function $b(t,e,n,i,o){var a,r,s,l=i.coordinateSystem,u=t.getItemModel(e),h=F(u.get(n[0]),o.getWidth()),u=F(u.get(n[1]),o.getHeight());return isNaN(h)||isNaN(u)?(s=i.getMarkerPosition?i.getMarkerPosition(t.getValues(n,e)):(o=[a=t.get(n[0],e),r=t.get(n[1],e)],l.clampData&&l.clampData(o,o),l.dataToPoint(o,!0)),"cartesian2d"===l.type&&(i=l.getAxis("x"),o=l.getAxis("y"),a=t.get(n[0],e),r=t.get(n[1],e),jb(a)?s[0]=i.toGlobalCoord(i.getExtent()["x0"===n[0]?0:1]):jb(r)&&(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 Jb=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];function Qb(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};Z(t,function(t,e){i[e]||tS(n,e)||(n[e]=t)}),e.label&&!tS(t,"emphasis")&&(t.emphasis=e.label,delete e.label)}function tS(t,e){return t.hasOwnProperty(e)}c.extend({type:"markArea",updateTransform:function(t,e,o){e.eachSeries(function(n){var i,t=n.markAreaModel;t&&(i=t.getData()).each(function(e){var t=I(Jb,function(t){return $b(i,e,t,n,o)});i.setItemLayout(e,t),i.getItemGraphicEl(e).setShape("points",t)})},this)},renderSeries:function(n,r,t,i){var o,a,e=n.coordinateSystem,s=n.id,l=n.getData(),u=this.markerGroupMap,h=u.get(s)||u.set(s,{group:new R}),c=(this.group.add(h.group),h.__keep=!0,o=n,u=r,e=(s=e)?(a=I(s&&s.dimensions,function(t){var e=o.getData();return C({name:t},e.getDimensionInfo(e.mapDimension(t))||{})}),new Sd(I(["x0","y0","x1","y1"],function(t,e){return{name:t,type:a[e%2].type}}),u)):new Sd(a=[{name:"value",type:"float"}],u),u=I(u.get("data"),L(Ub,o,s,u)),s&&(u=tt(u,L(Kb,s))),s=s?function(t,e,n,i){return t.coord[Math.floor(i/2)][i%2]}:function(t){return t.value},e.initData(u,null,s),e.hasItemOption=!0,e);r.setData(c),c.each(function(e){c.setItemLayout(e,I(Jb,function(t){return $b(c,e,t,n,i)})),c.setItemVisual(e,{color:l.getVisual("color")})}),c.diff(h.__data).add(function(t){var e=new yr({shape:{points:c.getItemLayout(t)}});c.setItemGraphicEl(t,e),h.group.add(e)}).update(function(t,e){e=h.__data.getItemGraphicEl(e);G(e,{shape:{points:c.getItemLayout(t)}},r,t),h.group.add(e),c.setItemGraphicEl(t,e)}).remove(function(t){t=h.__data.getItemGraphicEl(t);h.group.remove(t)}).execute(),c.eachItemGraphicEl(function(t,e){var n=c.getItemModel(e),i=n.getModel("label"),o=n.getModel("emphasis.label"),a=c.getItemVisual(e,"color");t.useStyle(C(n.getModel("itemStyle").getItemStyle(),{fill:qe(a,.4),stroke:a})),t.hoverStyle=n.getModel("emphasis.itemStyle").getItemStyle(),us(t.style,t.hoverStyle,i,o,{labelFetcher:r,labelDataIndex:e,defaultText:c.getName(e)||"",isRectText:!0,autoColor:a}),ss(t,{}),t.dataModel=r}),h.__data=c,h.group.silent=r.get("silent")||n.get("silent")}}),Jc(function(t){t.markArea=t.markArea||{}}),u.registerSubTypeDefaulter("timeline",function(){return"slider"}),s({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"),C({currentIndex:n.option.currentIndex},t)}),s({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,e){e=e.getComponent("timeline");e&&null!=t.playState&&e.setPlayState(t.playState)});function eS(t,e,n,i){og.call(this,t,e,n),this.type=i||"value",this.model=null}var nS=u.extend({type:"timeline",layoutMode:"box",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:[]},init:function(t,e,n){this._data,this._names,this.mergeDefaultAndTheme(t,n),this._initData()},mergeOption:function(t){nS.superApply(this,"mergeOption",arguments),this._initData()},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},getCurrentIndex:function(){return this.option.currentIndex},isIndexMax:function(){return this.getCurrentIndex()>=this._data.count()-1},setPlayState:function(t){this.option.autoPlay=!!t},getPlayState:function(){return!!this.option.autoPlay},_initData:function(){var o,t=this.option,e=t.data||[],t=t.axisType,a=this._names=[],t=("category"===t&&(o=[],Z(e,function(t,e){var n,i=go(t);k(t)?(n=N(t)).value=e:n=e,o.push(n),T(i)||null!=i&&!isNaN(i)||(i=""),a.push(i+"")}),e=o),{category:"ordinal",time:"time"}[t]||"number");(this._data=new Sd([{name:"value",type:t}],this)).initData(e,a)},getData:function(){return this._data},getCategories:function(){if("category"===this.get("axisType"))return this._names.slice()}}),l=(i(nS.extend({type:"timeline.slider",defaultOption:{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"emptyCircle",symbolSize:10,lineStyle:{show:!0,width:2,color:"#304654"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#304654"},itemStyle:{color:"#304654",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:13,color:"#c23531",borderWidth:5,borderColor:"rgba(194,53,49, 0.5)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:22,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:"path://M18.6,50.8l22.5-22.5c0.2-0.2,0.3-0.4,0.3-0.7c0-0.3-0.1-0.5-0.3-0.7L18.7,4.4c-0.1-0.1-0.2-0.3-0.2-0.5 c0-0.4,0.3-0.8,0.8-0.8c0.2,0,0.5,0.1,0.6,0.3l23.5,23.5l0,0c0.2,0.2,0.3,0.4,0.3,0.7c0,0.3-0.1,0.5-0.3,0.7l-0.1,0.1L19.7,52 c-0.1,0.1-0.3,0.2-0.5,0.2c-0.4,0-0.8-0.3-0.8-0.8C18.4,51.2,18.5,51,18.6,50.8z",prevIcon:"path://M43,52.8L20.4,30.3c-0.2-0.2-0.3-0.4-0.3-0.7c0-0.3,0.1-0.5,0.3-0.7L42.9,6.4c0.1-0.1,0.2-0.3,0.2-0.5 c0-0.4-0.3-0.8-0.8-0.8c-0.2,0-0.5,0.1-0.6,0.3L18.3,28.8l0,0c-0.2,0.2-0.3,0.4-0.3,0.7c0,0.3,0.1,0.5,0.3,0.7l0.1,0.1L41.9,54 c0.1,0.1,0.3,0.2,0.5,0.2c0.4,0,0.8-0.3,0.8-0.8C43.2,53.2,43.1,53,43,52.8z",color:"#304654",borderColor:"#304654",borderWidth:1},emphasis:{label:{show:!0,color:"#c23531"},itemStyle:{color:"#c23531"},controlStyle:{color:"#c23531",borderColor:"#c23531",borderWidth:2}},data:[]}}),Ds),oh.extend({type:"timeline"})),iS=(eS.prototype={constructor:eS,getLabelModel:function(){return this.model.getModel("label")},isHorizontal:function(){return"horizontal"===this.model.get("orient")}},a(eS,og),A),oS=Z,aS=Math.PI;function rS(t,e,n,i,o,a){var r=e.get("color"),r=(o?(o.setColor(r),n.add(o),a&&a.onUpdate(o)):((o=Wp(t.get("symbol"),-1,-1,2,2,r)).setStyle("strokeNoScale",!0),n.add(o),a&&a.onCreate(o)),e.getItemStyle(["color","symbol","symbolSize"])),n=(o.setStyle(r),i=f({rectHover:!0,z2:100},i,!0),t.get("symbolSize")),a=((n=n instanceof Array?n.slice():[+n,+n])[0]/=2,n[1]/=2,i.scale=n,t.get("symbolOffset")),r=(a&&((e=i.position=i.position||[0,0])[0]+=F(a[0],n[0]),e[1]+=F(a[1],n[1])),t.get("symbolRotate"));return i.rotation=(r||0)*Math.PI/180||0,o.attr(i),o.updateTransform(),o}function sS(t,e,n,i,o){var a;t.dragging||(a=i.getModel("checkpointStyle"),n=n.dataToCoord(i.getData().get(["value"],e)),o||!a.get("animation",!0)?t.attr({position:[n,0]}):(t.stopAnimation(!0),t.animateTo({position:[n,0]},a.get("animationDuration",!0),a.get("animationEasing",!0))))}l.extend({type:"timeline.slider",init:function(t,e){this.api=e,this._axis,this._viewRect,this._timer,this._currentPointer,this._mainGroup,this._labelGroup},render:function(e,t,n,i){var o,a,r;this.model=e,this.api=n,this.ecModel=t,this.group.removeAll(),e.get("show",!0)&&(o=this._layout(e,n),a=this._createGroup("mainGroup"),t=this._createGroup("labelGroup"),r=this._axis=this._createAxis(o,e),e.formatTooltip=function(t){return nl(r.scale.getLabel(t))},oS(["AxisLine","AxisTick","Control","CurrentPointer"],function(t){this["_render"+t](o,a,r,e)},this),this._renderAxisLabel(o,t,r,e),this._position(o,e)),this._doPlayStop()},remove:function(){this._clearTimer(),this.group.removeAll()},dispose:function(){this._clearTimer()},_layout:function(t,e){var n=t.get("label.position"),i=t.get("orient"),o=(o=e,yl((l=t).getBoxLayoutParams(),{width:o.getWidth(),height:o.getHeight()},l.get("padding")));null==n||"auto"===n?n="horizontal"===i?o.y+o.height/2<e.getHeight()/2?"-":"+":o.x+o.width/2<e.getWidth()/2?"+":"-":isNaN(n)&&(n={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[i][n]);var a,r,s,l={horizontal:"center",vertical:0<=n||"+"===n?"left":"right"},e={horizontal:0<=n||"+"===n?"top":"bottom",vertical:"middle"},u={horizontal:0,vertical:aS/2},h="vertical"===i?o.height:o.width,c=t.getModel("controlStyle"),d=c.get("show",!0),p=d?c.get("itemSize"):0,g=d?c.get("itemGap"):0,f=p+g,m=(t.get("label.rotate")||0)*aS/180,y=c.get("position",!0),v=d&&c.get("showPlayBtn",!0),x=d&&c.get("showPrevBtn",!0),d=d&&c.get("showNextBtn",!0),c=0,_=h;return"left"===y||"bottom"===y?(v&&(a=[0,0],c+=f),x&&(r=[c,0],c+=f)):(v&&(a=[_-p,0],_-=f),x&&(r=[0,0],c+=f)),d&&(s=[_-p,0],_-=f),y=[c,_],t.get("inverse")&&y.reverse(),{viewRect:o,mainLength:h,orient:i,rotation:u[i],labelRotation:m,labelPosOpt:n,labelAlign:t.get("label.align")||l[i],labelBaseline:t.get("label.verticalAlign")||t.get("label.baseline")||e[i],playPosition:a,prevBtnPosition:r,nextBtnPosition:s,axisExtent:y,controlSize:p,controlGap:g}},_position:function(t,e){var n=this._mainGroup,i=this._labelGroup,o=t.viewRect,a=("vertical"===t.orient&&(ce(l=se(),l,[-(r=o.x),-(s=o.y+o.height)]),de(l,l,-aS/2),ce(l,l,[r,s]),(o=o.clone()).applyTransform(l)),d(o)),r=d(n.getBoundingRect()),s=d(i.getBoundingRect()),l=n.position,o=i.position;o[0]=l[0]=a[0][0];var u,h=t.labelPosOpt;function c(t){var e=t.position;t.origin=[a[0][0]-e[0],a[1][0]-e[1]]}function d(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function p(t,e,n,i,o){t[i]+=n[i][o]-e[i][o]}isNaN(h)?(p(l,r,a,1,u="+"===h?0:1),p(o,s,a,1,1-u)):(p(l,r,a,1,u=0<=h?0:1),o[1]=l[1]+h),n.attr("position",l),i.attr("position",o),n.rotation=i.rotation=t.rotation,c(n),c(i)},_createAxis:function(t,e){var n=e.getData(),i=e.get("axisType"),o=Lp(e,i),a=(o.getTicks=function(){return n.mapArray(["value"],function(t){return t})},n.getDataExtent("value")),a=(o.setExtent(a[0],a[1]),o.niceTicks(),new eS("value",o,t.axisExtent,i));return a.model=e,a},_createGroup:function(t){t=this["_"+t]=new R;return this.group.add(t),t},_renderAxisLine:function(t,e,n,i){n=n.getExtent();i.get("lineStyle.show")&&e.add(new Sr({shape:{x1:n[0],y1:0,x2:n[1],y2:0},style:O({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1}))},_renderAxisTick:function(t,a,r,s){var l=s.getData(),e=r.scale.getTicks();oS(e,function(t){var e=r.dataToCoord(t),n=l.getItemModel(t),i=n.getModel("itemStyle"),o=n.getModel("emphasis.itemStyle"),e={position:[e,0],onclick:iS(this._changeTimeline,this,t)},i=rS(n,i,a,e);ss(i,o.getItemStyle()),n.get("tooltip")?(i.dataIndex=t,i.dataModel=s):i.dataIndex=i.dataModel=null},this)},_renderAxisLabel:function(a,r,s,t){var l;s.getLabelModel().get("show")&&(l=t.getData(),t=s.getViewLabels(),oS(t,function(t){var e=t.tickValue,n=l.getItemModel(e),i=n.getModel("label"),n=n.getModel("emphasis.label"),o=s.dataToCoord(t.tickValue),o=new B({position:[o,0],rotation:a.labelRotation-a.rotation,onclick:iS(this._changeTimeline,this,e),silent:!1});hs(o.style,i,{text:t.formattedLabel,textAlign:a.labelAlign,textVerticalAlign:a.labelBaseline}),r.add(o),ss(o,hs({},n))},this))},_renderControl:function(t,a,e,r){var s=t.controlSize,l=t.rotation,u=r.getModel("controlStyle").getItemStyle(),h=r.getModel("emphasis.controlStyle").getItemStyle(),c=[0,-s/2,s,s],n=r.getPlayState(),i=r.get("inverse",!0);function o(t,e,n,i){var o;t&&(o=c,t={position:t,origin:[s/2,0],rotation:i?-l:0,rectHover:!0,style:u,onclick:n},i=Gr(r.get(e).replace(/^path:\/\//,""),N(t||{}),new z(o[0],o[1],o[2],o[3]),"center"),a.add(i),ss(i,h))}o(t.nextBtnPosition,"controlStyle.nextIcon",iS(this._changeTimeline,this,i?"-":"+")),o(t.prevBtnPosition,"controlStyle.prevIcon",iS(this._changeTimeline,this,i?"+":"-")),o(t.playPosition,"controlStyle."+(n?"stopIcon":"playIcon"),iS(this._handlePlayClick,this,!n),!0)},_renderCurrentPointer:function(t,e,n,i){var o=i.getData(),a=i.getCurrentIndex(),o=o.getItemModel(a).getModel("checkpointStyle"),r=this;this._currentPointer=rS(o,o,this._mainGroup,{},this._currentPointer,{onCreate:function(t){t.draggable=!0,t.drift=iS(r._handlePointerDrag,r),t.ondragend=iS(r._handlePointerDragend,r),sS(t,a,n,i,!0)},onUpdate:function(t){sS(t,a,n,i)}})},_handlePlayClick:function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},_handlePointerDrag:function(t,e,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},_handlePointerDragend:function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},_pointerChangeTimeline:function(t,e){var t=this._toAxisCoord(t)[0],n=zs(this._axis.getExtent().slice()),n=((t=t>n[1]?n[1]:t)<n[0]&&(t=n[0]),this._currentPointer.position[0]=t,this._currentPointer.dirty(),this._findNearestTick(t)),t=this.model;(e||n!==t.getCurrentIndex()&&t.get("realtime"))&&this._changeTimeline(n)},_doPlayStop:function(){this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(iS(function(){var t=this.model;this._changeTimeline(t.getCurrentIndex()+(t.get("rewind",!0)?-1:1))},this),this.model.get("playInterval")))},_toAxisCoord:function(t){return _s(t,this._mainGroup.getLocalTransform(),!0)},_findNearestTick:function(n){var i,t=this.model.getData(),o=1/0,a=this._axis;return t.each(["value"],function(t,e){t=a.dataToCoord(t),t=Math.abs(t-n);t<o&&(o=t,i=e)}),i},_clearTimer:function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},_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})}}),Jc(function(t){Z(t=D(t=t&&t.timeline)?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),Qb(t),tS(t,"controlPosition")&&(tS(n=t.controlStyle||(t.controlStyle={}),"position")||(n.position=t.controlPosition),"none"!==n.position||tS(n,"show")||(n.show=!1,delete n.position),delete t.controlPosition),Z(t.data||[],function(t){k(t)&&!D(t)&&(!tS(t,"value")&&tS(t,"name")&&(t.value=t.name),Qb(t))}))})}),u.registerSubTypeDefaulter("dataZoom",function(){return"slider"});var lS=["cartesian2d","polar","singleAxis"];function uS(o,a){Z(hS,function(t,e){for(var n={name:t,capital:dS[e]},i=0;i<cS.length;i++)n[cS[i]]=t+pS[i];o.call(a,n)})}var hS,cS,dS,pS;cS=["axisIndex","axis","index","id"],dS=I(hS=(hS=["x","y","z","radius","angle","single"]).slice(),hl),pS=I(cS=(cS||[]).slice(),hl);function gS(i,r,s){return function(t){var e,a={nodes:[],records:{}};if(r(function(t){a.records[t.name]={}}),t)for(l(t,a);e=!1,i(n),e;);return a;function n(t){var n,i,o;0<=S(a.nodes,t)||(n=t,i=a,o=!1,r(function(e){Z(s(n,e)||[],function(t){i.records[e.name][t]&&(o=!0)})}),!o)||(l(t,a),e=!0)}};function l(t,n){n.nodes.push(t),r(function(e){Z(s(t,e)||[],function(t){n.records[e.name][t]=!0})})}}function fS(t,e,n,i){this._dimName=t,this._axisIndex=e,this._valueWindow,this._percentWindow,this._dataExtent,this._minMaxSpan,this.ecModel=i,this._dataZoomModel=n}var mS=Z,yS=zs;function vS(t,n,e){var i,o,a,r=[1/0,-1/0];return mS(e,function(t){var e=t.getData();e&&mS(e.mapDimension(n,!0),function(t){t=e.getApproximateExtent(t);t[0]<r[0]&&(r[0]=t[0]),t[1]>r[1]&&(r[1]=t[1])})}),r[1]<r[0]&&(r=[NaN,NaN]),e=r,t=(t=t).getAxisModel(),i=t.getMin(!0),o="category"===t.get("type"),a=o&&t.getCategories().length,null!=i&&"dataMin"!==i&&"function"!=typeof i?e[0]=i:o&&(e[0]=0<a?0:NaN),null!=(i=t.getMax(!0))&&"dataMax"!==i&&"function"!=typeof i?e[1]=i:o&&(e[1]=0<a?a-1:NaN),t.get("scale",!0)||(0<e[0]&&(e[0]=0),e[1]<0&&(e[1]=0)),r}function xS(t,e){var n,i=t.getAxisModel(),o=t._percentWindow,t=t._valueWindow;o&&(n=Vs(t,[0,500]),n=Math.min(n,20),e=e||0===o[0]&&100===o[1],i.setRange(e?null:+t[0].toFixed(n),e?null:+t[1].toFixed(n)))}fS.prototype={constructor:fS,hostedBy:function(t){return this._dataZoomModel===t},getDataValueWindow:function(){return this._valueWindow.slice()},getDataPercentWindow:function(){return this._percentWindow.slice()},getTargetSeriesModels:function(){var n=[],i=this.ecModel;return i.eachSeries(function(t){var e;e=t.get("coordinateSystem"),0<=S(lS,e)&&(e=this._dimName,e=i.queryComponents({mainType:e+"Axis",index:t.get(e+"AxisIndex"),id:t.get(e+"AxisId")})[0],this._axisIndex===(e&&e.componentIndex))&&n.push(t)},this),n},getAxisModel:function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},getOtherAxisModel:function(){var e,n,t=this._dimName,i=this.ecModel,o=this.getAxisModel(),t="x"===t||"y"===t?(e="gridIndex","x"===t?"y":"x"):(e="polarIndex","angle"===t?"radius":"angle");return i.eachComponent(t+"Axis",function(t){(t.get(e)||0)===(o.get(e)||0)&&(n=t)}),n},getMinMaxSpan:function(){return N(this._minMaxSpan)},calculateDataWindow:function(e){var i=this._dataExtent,o=this.getAxisModel().axis.scale,a=this._dataZoomModel.getRangePropMode(),r=[0,100],s=[e.start,e.end],l=[];return mS(["startValue","endValue"],function(t){l.push(null!=e[t]?o.parse(e[t]):null)}),mS([0,1],function(t){var e=l[t],n=s[t];"percent"===a[t]?e=o.parse(Os(n=null==n?r[t]:n,r,i,!0)):n=Os(e,i,r,!0),l[t]=e,s[t]=n}),{valueWindow:yS(l),percentWindow:yS(s)}},reset:function(t){var e,i,o,a;t===this._dataZoomModel&&(e=this.getTargetSeriesModels(),this._dataExtent=vS(this,this._dimName,e),e=this.calculateDataWindow(t.option),this._valueWindow=e.valueWindow,this._percentWindow=e.percentWindow,o=(i=this)._minMaxSpan={},a=i._dataZoomModel,mS(["min","max"],function(t){o[t+"Span"]=a.get(t+"Span");var e,n=a.get(t+"ValueSpan");null!=n&&(o[t+"ValueSpan"]=n,null!=(n=i.getAxisModel().axis.scale.parse(n)))&&(e=i._dataExtent,o[t+"Span"]=Os(e[0]+n,e,[0,100],!0))}),xS(this))},restore:function(t){t===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,xS(this,!0))},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)&&mS(n,function(n){var l=n.getData(),u=l.mapDimension(i,!0);u.length&&("weakFilter"===o?l.filterSelf(function(t){for(var e,n,i,o=0;o<u.length;o++){var a=l.get(u[o],t),r=!isNaN(a),s=a<h[0],a=a>h[1];if(r&&!s&&!a)return!0;r&&(i=!0),s&&(e=!0),a&&(n=!0)}return i&&e&&n}):mS(u,function(t){var e;"empty"===o?n.setData(l.map(t,function(t){return t>=h[0]&&t<=h[1]?t:NaN})):((e={})[t]=h,l.selectRange(e))}),mS(u,function(t){l.setApproximateExtent(h,t)}))})}};var _S=Z,wS=uS,Fh=ad({type:"dataZoom",dependencies:["xAxis","yAxis","zAxis","radiusAxis","angleAxis","singleAxis","series"],defaultOption:{zlevel:0,z:4,orient:null,xAxisIndex:null,yAxisIndex:null,filterMode:"filter",throttle:null,start:0,end:100,startValue:null,endValue:null,minSpan:null,maxSpan:null,minValueSpan:null,maxValueSpan:null,rangeMode:null},init:function(t,e,n){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0,this._rangePropMode=["percent","percent"];var i=bS(t);this.mergeDefaultAndTheme(t,n),this.doInit(i)},mergeOption:function(t){var e=bS(t);f(this.option,t,!0),this.doInit(e)},doInit:function(t){var n=this.option;y.canvasSupported||(n.realtime=!1),this._setDefaultThrottle(t),SS(this,t),_S([["start","startValue"],["end","endValue"]],function(t,e){"value"===this._rangePropMode[e]&&(n[t[0]]=null)},this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var a=this._axisProxies;this.eachTargetAxis(function(t,e,n,i){var o=this.dependentModels[t.axis][e],o=o.__dzAxisProxy||(o.__dzAxisProxy=new fS(t.name,e,this,i));a[t.name+"_"+e]=o},this)},_resetTarget:function(){var e=this.option,t=this._judgeAutoMode();wS(function(t){t=t.axisIndex;e[t]=ho(e[t])},this),"axisIndex"===t?this._autoSetAxisIndex():"orient"===t&&this._autoSetOrient()},_judgeAutoMode:function(){var e=this.option,n=!1,t=(wS(function(t){null!=e[t.axisIndex]&&(n=!0)},this),e.orient);return null==t&&n?"orient":n?void 0:(null==t&&(e.orient="horizontal"),"axisIndex")},_autoSetAxisIndex:function(){var t,a=!0,e=this.get("orient",!0),r=this.option,n=this.dependentModels;a&&(n[(t="vertical"===e?"y":"x")+"Axis"].length?(r[t+"AxisIndex"]=[0],a=!1):_S(n.singleAxis,function(t){a&&t.get("orient",!0)===e&&(r.singleAxisIndex=[t.componentIndex],a=!1)})),a&&wS(function(t){if(a){var e=[],n=this.dependentModels[t.axis];if(n.length&&!e.length)for(var i=0,o=n.length;i<o;i++)"category"===n[i].get("type")&&e.push(i);(r[t.axisIndex]=e).length&&(a=!1)}},this),a&&this.ecModel.eachSeries(function(a){this._isSeriesHasAllAxesTypeOf(a,"value")&&wS(function(t){var e=r[t.axisIndex],n=a.get(t.axisIndex),i=a.get(t.axisId),o=a.ecModel.queryComponents({mainType:t.axis,index:n,id:i})[0];if(H&&!o)throw new Error(t.axis+' "'+rt(n,i,0)+'" not found');S(e,n=o.componentIndex)<0&&e.push(n)})},this)},_autoSetOrient:function(){var e;this.eachTargetAxis(function(t){e=e||t.name},this),this.option.orient="y"===e?"vertical":"horizontal"},_isSeriesHasAllAxesTypeOf:function(n,i){var o=!0;return wS(function(t){var e=n.get(t.axisIndex),t=this.dependentModels[t.axis][e];t&&t.get("type")===i||(o=!1)},this),o},_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)},getFirstTargetAxisModel:function(){var n;return wS(function(t){var e;null==n&&(e=this.get(t.axisIndex)).length&&(n=this.dependentModels[t.axis][e[0]])},this),n},eachTargetAxis:function(n,i){var o=this.ecModel;wS(function(e){_S(this.get(e.axisIndex),function(t){n.call(i,e,t,this,o)},this)},this)},getAxisProxy:function(t,e){return this._axisProxies[t+"_"+e]},getAxisModel:function(t,e){t=this.getAxisProxy(t,e);return t&&t.getAxisModel()},setRawRange:function(e,t){var n=this.option;_S([["start","startValue"],["end","endValue"]],function(t){null==e[t[0]]&&null==e[t[1]]||(n[t[0]]=e[t[0]],n[t[1]]=e[t[1]])},this),t||SS(this,e)},getPercentRange:function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},getValueRange:function(t,e){return null!=t||null!=e?this.getAxisProxy(t,e).getDataValueWindow():(t=this.findRepresentativeAxisProxy())?t.getDataValueWindow():void 0},findRepresentativeAxisProxy:function(t){if(t)return t.__dzAxisProxy;var e,n=this._axisProxies;for(e in n)if(n.hasOwnProperty(e)&&n[e].hostedBy(this))return n[e];for(e in n)if(n.hasOwnProperty(e)&&!n[e].hostedBy(this))return n[e]},getRangePropMode:function(){return this._rangePropMode.slice()}});function bS(e){var n={};return _S(["start","end","startValue","endValue","throttle"],function(t){e.hasOwnProperty(t)&&(n[t]=e[t])}),n}function SS(t,i){var o=t._rangePropMode,a=t.get("rangeMode");_S([["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":a?o[e]=a[e]:n&&(o[e]="percent")})}var h=oh.extend({type:"dataZoom",render:function(t,e,n,i){this.dataZoomModel=t,this.ecModel=e,this.api=n},getTargetCoordInfo:function(){var t=this.dataZoomModel,r=this.ecModel,s={};return t.eachTargetAxis(function(t,e){t=r.getComponent(t.axis,e);if(t){e=t.getCoordSysModel();if(e){for(var n,i=e,o=s[e.mainType]||(s[e.mainType]=[]),e=e.componentIndex,a=0;a<o.length;a++)if(o[a].model===i){n=o[a];break}n||o.push(n={model:i,axisModels:[],coordIndex:e}),n.axisModels.push(t)}}},this),s}}),MS=(Fh.extend({type:"dataZoom.slider",layoutMode:"box",defaultOption:{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#2f4554",width:.5,opacity:.3},areaStyle:{color:"rgba(47,69,84,0.3)",opacity:.3}},borderColor:"#ddd",fillerColor:"rgba(167,183,204,0.4)",handleIcon:"M8.2,13.6V3.9H6.3v9.7H3.1v14.9h3.3v9.7h1.8v-9.7h3.3V13.6H8.2z M9.7,24.4H4.8v-1.4h4.9V24.4z M9.7,19.1H4.8v-1.4h4.9V19.1z",handleSize:"100%",handleStyle:{color:"#a7b7cc"},labelPrecision:null,labelFormatter:null,showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#333"}}}),V),IS=Os,TS=zs,AS=A,DS=Z,CS="horizontal",LS="vertical",kS=["line","bar","candlestick","scatter"],PS=h.extend({type:"dataZoom.slider",init:function(t,e){this._displayables={},this._orient,this._range,this._handleEnds,this._size,this._handleWidth,this._handleHeight,this._location,this._dragging,this._dataShadowInfo,this.api=e},render:function(t,e,n,i){PS.superApply(this,"render",arguments),vh(this,"_dispatchZoomAction",this.dataZoomModel.get("throttle"),"fixRate"),this._orient=t.get("orient"),!1!==this.dataZoomModel.get("show")?(i&&"dataZoom"===i.type&&i.from===this.uid||this._buildView(),this._updateView()):this.group.removeAll()},remove:function(){PS.superApply(this,"remove",arguments),xh(this,"_dispatchZoomAction")},dispose:function(){PS.superApply(this,"dispose",arguments),xh(this,"_dispatchZoomAction")},_buildView:function(){var t=this.group,e=(t.removeAll(),this._resetLocation(),this._resetInterval(),this._displayables.barGroup=new R);this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},_resetLocation:function(){var t=this.dataZoomModel,e=this.api,n=this._findCoordRect(),e={width:e.getWidth(),height:e.getHeight()},i=this._orient===CS?{right:e.width-n.x-n.width,top:e.height-30-7,width:n.width,height:30}:{right:7,top:n.y,width:30,height:n.height},o=_l(t.option),n=(Z(["right","top","width","height"],function(t){"ph"===o[t]&&(o[t]=i[t])}),yl(o,e,t.padding));this._location={x:n.x,y:n.y},this._size=[n.width,n.height],this._orient===LS&&this._size.reverse()},_positionGroup:function(){var t=this.group,e=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),i=i&&i.get("inverse"),o=this._displayables.barGroup,a=(this._dataShadowInfo||{}).otherAxisInverse,n=(o.attr(n!==CS||i?n===CS&&i?{scale:a?[-1,1]:[-1,-1]}:n!==LS||i?{scale:a?[-1,-1]:[-1,1],rotation:Math.PI/2}:{scale:a?[1,-1]:[1,1],rotation:Math.PI/2}:{scale:a?[1,1]:[1,-1]}),t.getBoundingRect([o]));t.attr("position",[e.x-n.x,e.y-n.y])},_getViewExtent:function(){return[0,this._size[0]]},_renderBackground:function(){var t=this.dataZoomModel,e=this._size,n=this._displayables.barGroup;n.add(new MS({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40})),n.add(new MS({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:A(this._onClickPanelClick,this)}))},_renderDataShadow:function(){var t,e,n,i,o,a,r,s,l,u,h,c=this._dataShadowInfo=this._prepareDataShadowInfo();c&&(t=this._size,e=(n=c.series).getRawData(),null!=(n=n.getShadowDim?n.getShadowDim():c.otherDim))&&(c=.3*((i=e.getDataExtent(n))[1]-i[0]),i=[i[0]-c,i[1]+c],a=[0,t[1]],c=[0,t[0]],r=[[t[0],0],[0,0]],s=[],l=c[1]/(e.count()-1),u=0,h=Math.round(e.count()/t[0]),e.each([n],function(t,e){var n;0<h&&e%h?u+=l:(t=(n=null==t||isNaN(t)||""===t)?0:IS(t,i,a,!0),n&&!o&&e?(r.push([r[r.length-1][0],0]),s.push([s[s.length-1][0],0])):!n&&o&&(r.push([u,0]),s.push([u,0])),r.push([u,t]),s.push([u,t]),u+=l,o=n)}),c=this.dataZoomModel,this._displayables.barGroup.add(new yr({shape:{points:r},style:C({fill:c.get("dataBackgroundColor")},c.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new vr({shape:{points:s},style:c.getModel("dataBackground.lineStyle").getLineStyle(),silent:!0,z2:-19})))},_prepareDataShadowInfo:function(){var s,l,t=this.dataZoomModel,u=t.get("showDataShadow");if(!1!==u)return l=this.ecModel,t.eachTargetAxis(function(a,r){Z(t.getAxisProxy(a.name,r).getTargetSeriesModels(),function(t){var e,n,i,o;s||!0!==u&&S(kS,t.get("type"))<0||(n=l.getComponent(a.axis,r).axis,i={x:"y",y:"x",radius:"angle",angle:"radius"}[a.name],o=t.coordinateSystem,null!=i&&o.getOtherAxis&&(e=o.getOtherAxis(n).inverse),i=t.getData().mapDimension(i),s={thisAxis:n,series:t,thisDim:a.name,otherDim:i,otherAxisInverse:e})},this)},this),s},_renderHandle:function(){var t=this._displayables,i=t.handles=[],o=t.handleLabels=[],a=this._displayables.barGroup,e=this._size,r=this.dataZoomModel;a.add(t.filler=new MS({draggable:!0,cursor:NS(this._orient),drift:AS(this._onDragMove,this,"all"),onmousemove:function(t){$t(t.event)},ondragstart:AS(this._showDataInfo,this,!0),ondragend:AS(this._onDragEnd,this),onmouseover:AS(this._showDataInfo,this,!0),onmouseout:AS(this._showDataInfo,this,!1),style:{fill:r.get("fillerColor"),textPosition:"inside"}})),a.add(new MS(Yr({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{stroke:r.get("dataBackgroundColor")||r.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}}))),DS([0,1],function(t){var e=Ms(r.get("handleIcon"),{cursor:NS(this._orient),draggable:!0,drift:AS(this._onDragMove,this,t),onmousemove:function(t){$t(t.event)},ondragend:AS(this._onDragEnd,this),onmouseover:AS(this._showDataInfo,this,!0),onmouseout:AS(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),n=e.getBoundingRect(),n=(this._handleHeight=F(r.get("handleSize"),this._size[1]),this._handleWidth=n.width/n.height*this._handleHeight,e.setStyle(r.getModel("handleStyle").getItemStyle()),r.get("handleColor")),n=(null!=n&&(e.style.fill=n),a.add(i[t]=e),r.textStyleModel);this.group.add(o[t]=new B({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textVerticalAlign:"middle",textAlign:"center",textFill:n.getTextColor(),textFont:n.getFont()},z2:10}))},this)},_resetInterval:function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[IS(t[0],[0,100],e,!0),IS(t[1],[0,100],e,!0)]},_updateInterval:function(t,e){var n=this.dataZoomModel,i=this._handleEnds,o=this._getViewExtent(),a=n.findRepresentativeAxisProxy().getMinMaxSpan(),r=[0,100],e=(fx(e,i,o,n.get("zoomLock")?"all":t,null!=a.minSpan?IS(a.minSpan,r,o,!0):null,null!=a.maxSpan?IS(a.maxSpan,r,o,!0):null),this._range),n=this._range=TS([IS(i[0],o,r,!0),IS(i[1],o,r,!0)]);return!e||e[0]!==n[0]||e[1]!==n[1]},_updateView:function(t){var i=this._displayables,o=this._handleEnds,e=TS(o.slice()),a=this._size;DS([0,1],function(t){var e=i.handles[t],n=this._handleHeight;e.attr({scale:[n/2,n/2],position:[o[t],a[1]/2-n/2]})},this),i.filler.setShape({x:e[0],y:0,width:e[1]-e[0],height:a[1]}),this._updateDataInfo(t)},_updateDataInfo:function(t){var e,n,i=this.dataZoomModel,o=this._displayables,a=o.handleLabels,r=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)]),TS(this._handleEnds.slice()));function u(t){var e=xs(o.handles[t].parent,this.group),n=ws(0===t?"right":"left",e),i=this._handleWidth/2+5,i=_s([l[t]+(0===t?-i:i),this._size[1]/2],e);a[t].setStyle({x:i[0],y:i[1],textVerticalAlign:r===CS?"middle":n,textAlign:r===CS?n:"center",text:s[t]})}u.call(this,0),u.call(this,1)},_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(Math.round(t)):t.toFixed(Math.min(n,20)));return et(i)?i(t,e):T(i)?i.replace("{value}",e):e},_showDataInfo:function(t){t=this._dragging||t;var e=this._displayables.handleLabels;e[0].attr("invisible",!t),e[1].attr("invisible",!t)},_onDragMove:function(t,e,n){this._dragging=!0;e=_s([e,n],this._displayables.barGroup.getLocalTransform(),!0),n=this._updateInterval(t,e[0]),t=this.dataZoomModel.get("realtime");this._updateView(!t),n&&t&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=!1,this._showDataInfo(!1),this.dataZoomModel.get("realtime")||this._dispatchZoomAction()},_onClickPanelClick:function(t){var e=this._size,t=this._displayables.barGroup.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())},_dispatchZoomAction:function(){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:t[0],end:t[1]})},_findCoordRect:function(){var t,e,n;return DS(this.getTargetCoordInfo(),function(t){!n&&t.length&&(t=t[0].model.coordinateSystem,n=t.getRect&&t.getRect())}),n||(t=this.api.getWidth(),e=this.api.getHeight(),n={x:.2*t,y:.2*e,width:.6*t,height:.6*e}),n}});function NS(t){return"vertical"===t?"ns-resize":"ew-resize"}Fh.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}});var OS="\0_ec_dataZoom_roams";function ES(t,i){var a,e,n,o,r,s=RS(t),l=i.dataZoomId,u=i.coordId,h=(Z(s,function(t,e){var n=t.dataZoomInfos;n[l]&&S(i.allCoordIds,u)<0&&(delete n[l],t.count--)}),BS(s),s[u]),t=(h||((h=s[u]={coordId:u,dataZoomInfos:{},count:0}).controller=(a=h,e=new l0(t.getZr()),Z(["pan","zoom","scrollMove"],function(o){e.on(o,function(n){var i=[];Z(a.dataZoomInfos,function(t){var e;n.isAvailableBehavior(t.dataZoomModel.option)&&(e=(e=(t.getRange||{})[o])&&e(a.controller,n),!t.dataZoomModel.get("disabled",!0))&&e&&i.push({dataZoomId:t.dataZoomId,start:e[0],end:e[1]})}),i.length&&a.dispatchAction(i)})}),e),h.dispatchAction=L(VS,t)),h.dataZoomInfos[l]||h.count++,h.dataZoomInfos[l]=i,s=h.dataZoomInfos,o={type_true:2,type_move:1,type_false:0,type_undefined:-1},r=!0,Z(s,function(t){var t=t.dataZoomModel,e=!t.get("disabled",!0)&&(!t.get("zoomLock",!0)||"move");o["type_"+n]<o["type_"+e]&&(n=e),r&=t.get("preventDefaultMouseMove",!0)}),{controlType:n,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!r}});h.controller.enable(t.controlType,t.opt),h.controller.setPointerChecker(i.containsPoint),vh(h,"dispatchAction",i.dataZoomModel.get("throttle",!0),"fixRate")}function zS(t){return t.type+"\0_"+t.id}function RS(t){t=t.getZr();return t[OS]||(t[OS]={})}function BS(n){Z(n,function(t,e){t.count||(t.controller.dispose(),delete n[e])})}function VS(t,e){t.dispatchAction({type:"dataZoom",batch:e})}var GS=A,FS=h.extend({type:"dataZoom.inside",init:function(t,e){this._range},render:function(r,t,s,e){FS.superApply(this,"render",arguments),this._range=r.getPercentRange(),Z(this.getTargetCoordInfo(),function(t,o){var a=I(t,function(t){return zS(t.model)});Z(t,function(e){var i=e.model,n={};Z(["pan","zoom","scrollMove"],function(t){n[t]=GS(WS[t],this,e,o)},this),ES(s,{coordId:zS(i),allCoordIds:a,containsPoint:function(t,e,n){return i.coordinateSystem.containPoint([e,n])},dataZoomId:r.id,dataZoomModel:r,getRange:n})},this)},this)},dispose:function(){var t,n;t=this.api,n=this.dataZoomModel.id,Z(t=RS(t),function(t){t.controller.dispose();var e=t.dataZoomInfos;e[n]&&(delete e[n],t.count--)}),BS(t),FS.superApply(this,"dispose",arguments),this._range=null}}),WS={zoom:function(t,e,n,i){var o=this._range,a=o.slice(),r=t.axisModels[0];if(r)return r=(0<(e=ZS[e](null,[i.originX,i.originY],r,n,t)).signal?e.pixelStart+e.pixelLength-e.pixel:e.pixel-e.pixelStart)/e.pixelLength*(a[1]-a[0])+a[0],n=Math.max(1/i.scale,0),a[0]=(a[0]-r)*n+r,a[1]=(a[1]-r)*n+r,fx(0,a,[0,100],0,(t=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan()).minSpan,t.maxSpan),this._range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0},pan:HS(function(t,e,n,i,o,a){i=ZS[i]([a.oldX,a.oldY],[a.newX,a.newY],e,o,n);return i.signal*(t[1]-t[0])*i.pixel/i.pixelLength}),scrollMove:HS(function(t,e,n,i,o,a){return ZS[i]([0,0],[a.scrollDelta,a.scrollDelta],e,o,n).signal*(t[1]-t[0])*a.scrollDelta})};function HS(s){return function(t,e,n,i){var o=this._range,a=o.slice(),r=t.axisModels[0];if(r)return fx(s(a,r,t,e,n,i),a,[0,100],"all"),this._range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0}}var ZS={grid:function(t,e,n,i,o){var n=n.axis,a={},o=o.model.coordinateSystem.getRect();return t=t||[0,0],"x"===n.dim?(a.pixel=e[0]-t[0],a.pixelLength=o.width,a.pixelStart=o.x,a.signal=n.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=o.height,a.pixelStart=o.y,a.signal=n.inverse?-1:1),a},polar:function(t,e,n,i,o){var a=n.axis,r={},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?(r.pixel=e[0]-t[0],r.pixelLength=s[1]-s[0],r.pixelStart=s[0],r.signal=a.inverse?1:-1):(r.pixel=e[1]-t[1],r.pixelLength=l[1]-l[0],r.pixelStart=l[0],r.signal=a.inverse?-1:1),r},singleAxis:function(t,e,n,i,o){var n=n.axis,o=o.model.coordinateSystem.getRect(),a={};return t=t||[0,0],"horizontal"===n.orient?(a.pixel=e[0]-t[0],a.pixelLength=o.width,a.pixelStart=o.x,a.signal=n.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=o.height,a.pixelStart=o.y,a.signal=n.inverse?-1:1),a}},XS=(Qc({getTargetSeries:function(t){var i=E();return t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,e,n){Z(n.getAxisProxy(t.name,e).getTargetSeriesModels(),function(t){i.set(t.uid,t)})})}),i},modifyOutputEnd:!0,overallReset:function(t,i){t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,e,n){n.getAxisProxy(t.name,e).reset(n,i)}),t.eachTargetAxis(function(t,e,n){n.getAxisProxy(t.name,e).filterData(n,i)})}),t.eachComponent("dataZoom",function(t){var e=t.findRepresentativeAxisProxy(),n=e.getDataPercentWindow(),e=e.getDataValueWindow();t.setRawRange({start:n[0],end:n[1],startValue:e[0],endValue:e[1]},!0)})}}),s("dataZoom",function(n,t){var i=gS(A(t.eachComponent,t,"dataZoom"),uS,function(t,e){return t.get(e.axisIndex)}),o=[];t.eachComponent({mainType:"dataZoom",query:n},function(t,e){o.push.apply(o,i(t).nodes)}),Z(o,function(t,e){t.setRawRange({start:n.start,end:n.end,startValue:n.startValue,endValue:n.endValue})})}),["rect","polygon","keep","clear"]);var YS=Z;function US(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return 1}function jS(e,t,o){var a={};return YS(t,function(n){var t,i=a[n]=((t=function(){}).prototype.__hidden=t.prototype,new t);YS(e[n],function(t,e){M.isValidType(e)&&(t={type:e,visual:t},o&&o(t,n),i[e]=new M(t),"opacity"===e)&&((t=N(t)).type="colorAlpha",i.__hidden.__alphaForOpacity=new M(t))})}),a}function qS(e,n,t){var i;Z(t,function(t){n.hasOwnProperty(t)&&US(n[t])&&(i=!0)}),i&&Z(t,function(t){n.hasOwnProperty(t)&&US(n[t])?e[t]=N(n[t]):delete e[t]})}var KS={lineX:$S(0),lineY:$S(1),rect:{point:function(t,e,n){return t&&n.boundingRect.contain(t[0],t[1])},rect:function(t,e,n){return t&&n.boundingRect.intersect(t)}},polygon:{point:function(t,e,n){return t&&n.boundingRect.contain(t[0],t[1])&&Xp(n.range,t[0],t[1])},rect:function(t,e,n){var i,o,a,r,s,n=n.range;return!(!t||n.length<=1)&&(i=t.x,o=t.y,a=t.width,r=t.height,s=n[0],!!(Xp(n,i,o)||Xp(n,i+a,o)||Xp(n,i,o+r)||Xp(n,i+a,o+r)||z.create(t).contain(s[0],s[1])||QS(i,o,i+a,o,n)||QS(i,o,i,o+r,n)||QS(i+a,o,i+a,o+r,n)||QS(i,o+r,i+a,o+r,n))||void 0)}}};function $S(i){var o=["x","y"],a=["width","height"];return{point:function(t,e,n){if(t)return n=n.range,JS(t[i],n)},rect:function(t,e,n){if(t)return n=n.range,(t=[t[o[i]],t[o[i]]+t[a[i]]])[1]<t[0]&&t.reverse(),JS(t[0],n)||JS(t[1],n)||JS(n[0],t)||JS(n[1],t)}}}function JS(t,e){return e[0]<=t&&t<=e[1]}function QS(t,e,n,i,o){for(var a,r,s,l,u,h,c,d,p,g=0,f=o[o.length-1];g<o.length;g++){var m=o[g];if(a=t,r=e,s=n,l=i,u=m[0],h=m[1],c=f[0],d=f[1],p=void 0,!function(t){return t<=1e-6&&-1e-6<=t}(p=tM(s-a,u-c,l-r,h-d))&&!((c=tM(u-a,u-c,h-r,h-d)/p)<0||1<c||(d=tM(s-a,u-a,l-r,h-r)/p)<0||1<d))return 1;f=m}}function tM(t,e,n,i){return t*i-e*n}var eM=Z,nM=S,n=L,iM=["dataToPoint","pointToData"],oM=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"];function aM(t,e,n){var i=this._targetInfoList=[],o={},a=sM(e,t);eM(lM,function(t,e){n&&n.include&&!(0<=nM(n.include,e))||t(a,i,o)})}c=aM.prototype;function rM(t){return t[0]>t[1]&&t.reverse(),t}function sM(t,e){return bo(t,e,{includeMainTypes:oM})}c.setOutputRanges=function(t,e){this.matchOutputRanges(t,e,function(t,e,n){(t.coordRanges||(t.coordRanges=[])).push(e),t.coordRange||(t.coordRange=e,n=cM[t.brushType](0,n,e),t.__rangeOffset={offset:pM[t.brushType](n.values,t.range,[1,1]),xyMinMax:n.xyMinMax})})},c.matchOutputRanges=function(t,i,o){eM(t,function(n){var t=this.findTargetInfo(n,i);t&&!0!==t&&Z(t.coordSyses,function(t){var e=cM[n.brushType](1,t,n.range);o(n,e.values,t,i)})},this)},c.setInputRanges=function(t,i){eM(t,function(t){var e,n=this.findTargetInfo(t,i);H&&(P(!n||!0===n||t.coordRange,"coordRange must be specified when coord index specified."),P(!n||!0!==n||t.range,"range must be specified in global brush.")),t.range=t.range||[],n&&!0!==n&&(t.panelId=n.panelId,n=cM[t.brushType](0,n.coordSys,t.coordRange),e=t.__rangeOffset,t.range=e?pM[t.brushType](n.values,e.offset,function(t,e){t=fM(t),e=fM(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)},c.makePanelOpts=function(n,i){return I(this._targetInfoList,function(t){var e=t.getPanelRect();return{panelId:t.panelId,defaultBrushType:i&&i(t),clipPath:w1(e),isTargetByCursor:S1(e,n,t.coordSysModel),getLinearBrushOtherExtent:b1(e)}})},c.controlSeries=function(t,e,n){t=this.findTargetInfo(t,n);return!0===t||t&&0<=nM(t.coordSyses,e.coordinateSystem)},c.findTargetInfo=function(t,e){for(var n=this._targetInfoList,i=sM(e,t),o=0;o<n.length;o++){var a=n[o],r=t.panelId;if(r){if(a.panelId===r)return a}else for(o=0;o<uM.length;o++)if(uM[o](i,a))return a}return!0};var lM={grid:function(t,i){var o=t.xAxisModels,a=t.yAxisModels,t=t.gridModels,e=E(),r={},s={};(o||a||t)&&(eM(o,function(t){t=t.axis.grid.model;e.set(t.id,t),r[t.id]=!0}),eM(a,function(t){t=t.axis.grid.model;e.set(t.id,t),s[t.id]=!0}),eM(t,function(t){e.set(t.id,t),r[t.id]=!0,s[t.id]=!0}),e.each(function(t){var e=t.coordinateSystem,n=[];eM(e.getCartesians(),function(t,e){(0<=nM(o,t.getAxis("x").model)||0<=nM(a,t.getAxis("y").model))&&n.push(t)}),i.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:n[0],coordSyses:n,getPanelRect:hM.grid,xAxisDeclared:r[t.id],yAxisDeclared:s[t.id]})}))},geo:function(t,n){eM(t.geoModels,function(t){var e=t.coordinateSystem;n.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:e,coordSyses:[e],getPanelRect:hM.geo})})}},uM=[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}],hM={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(xs(t)),e}},cM={lineX:n(dM,0),lineY:n(dM,1),rect:function(t,e,n){var i=e[iM[t]]([n[0][0],n[1][0]]),e=e[iM[t]]([n[0][1],n[1][1]]),t=[rM([i[0],e[0]]),rM([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:I(t,function(t){t=n[iM[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 dM(t,e,n,i){H&&P("cartesian2d"===n.type,"lineX/lineY brush is available only in cartesian2d.");var o=n.getAxis(["x","y"][t]),n=rM(I([0,1],function(t){return e?o.coordToData(o.toLocalCoord(i[t])):o.toGlobalCoord(o.dataToCoord(i[t]))})),a=[];return a[t]=n,a[1-t]=[NaN,NaN],{values:n,xyMinMax:a}}var pM={lineX:n(gM,0),lineY:n(gM,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 I(t,function(t,e){return[t[0]-i[0]*n[e][0],t[1]-i[1]*n[e][1]]})}};function gM(t,e,n,i){return[e[0]-i[t]*n[0],e[1]-i[t]*n[1]]}function fM(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var mM=["inBrush","outOfBrush"],yM="__ecBrushSelect",vM="__ecInBrushSelectEvent",Ds=pc.VISUAL.BRUSH;function xM(t,e){var n;t.isDisposed()||((n=t.getZr())[vM]=!0,t.dispatchAction({type:"brushSelect",batch:e}),n[vM]=!1)}function _M(t,e,n,i){for(var o=0,a=e.length;o<a;o++){var r=e[o];if(t[r.brushType](i,n,r.selectors,r))return 1}}function wM(t){var e,n,a=t.brushSelector;return T(a)?(e=[],Z(KS,function(o,t){e[t]=function(t,e,n,i){e=e.getItemLayout(t);return o[a](e,n,i)}}),e):et(a)?(n={},Z(KS,function(t,e){n[e]=a}),n):a}ed(Ds,function(e,t,n){e.eachComponent({mainType:"brush"},function(t){n&&"takeGlobalCursor"===n.type&&t.setBrushOption("brush"===n.key?n.brushOption:{brushType:!1}),(t.brushTargetManager=new aM(t.option,e)).setInputRanges(t.areas,e)})}),nd(Ds,function(d,t,e){var o,a,n,i,r,s=[];d.eachComponent({mainType:"brush"},function(h,t){var m={brushId:h.id,brushIndex:t,brushName:h.name,areas:N(h.areas),selected:[]},e=(s.push(m),h.option),n=e.brushLink,i=[],y=[],v=[],x=0,c=(t||(o=e.throttleType,a=e.throttleDelay),I(h.areas,function(t){return n=C({boundingRect:bM[t.brushType](t)},t),i=n.selectors={},Z(KS[n.brushType],function(e,t){i[t]=function(t){return e(t,i,n)}}),n;var n,i})),_=jS(h.option,mM,function(t){t.mappingMethod="fixed"});function w(t){return"all"===n||i[t]}function b(t){return!!t.length}D(n)&&Z(n,function(t){i[t]=1}),d.eachSeries(function(t,e){var n,i,o,a,r,s,l,u=v[e]=[];"parallel"===t.subType?(s=e,l=(r=t).coordinateSystem,x|=l.hasAxisBrushed(),w(s)&&l.eachActiveState(r.getData(),function(t,e){"active"===t&&(y[e]=1)})):(s=e,i=u,(a=wM(n=t))&&(l=s,null==(r=(r=h).option.seriesIndex)||"all"===r||!(D(r)?S(r,l)<0:l!==r))&&(Z(c,function(t){a[t.brushType]&&h.brushTargetManager.controlSeries(t,n,d)&&i.push(t),x|=b(i)}),w(s)&&b(i))&&(o=n.getData()).each(function(t){_M(a,i,o,t)&&(y[t]=1)}))}),d.eachSeries(function(t,e){var s,l,u,h,c,d,p,n={seriesId:t.id,seriesIndex:e,seriesName:t.name,dataIndex:[]},i=(m.selected.push(n),wM(t)),o=v[e],a=t.getData(),t=w(e)?function(t){return y[t]?(n.dataIndex.push(a.getRawIndex(t)),"inBrush"):"outOfBrush"}:function(t){return _M(i,o,a,t)?(n.dataIndex.push(a.getRawIndex(t)),"inBrush"):"outOfBrush"};function g(t){return l.getItemVisual(d,t)}function f(t,e){l.setItemVisual(d,t,e)}function r(t,e){d=null==c?t:e;e=l.getRawDataItem(d);if(!e||!1!==e.visualMap)for(var e=u.call(h,t),n=s[e],i=p[e],o=0,a=i.length;o<a;o++){var r=i[o];n[r]&&n[r].applyVisual(t,g,f)}}(w(e)?x:b(o))&&(s=_,l=a,u=t,p={},Z(mM,function(t){var e=M.prepareVisualTypes(s[t]);p[t]=e}),null==c?l.each(r):l.each([c],r))})}),t=t,n=o,i=a,r=s,(e=e)&&!(e=t.getZr())[vM]&&(e[yM]||(e[yM]=xM),vh(e,yM,i,n)(t,r))});var bM={lineX:yt,lineY:yt,rect:function(t){return SM(t.range)},polygon:function(t){for(var e=t.range,n=0,i=e.length;n<i;n++){var o=o||[[1/0,-1/0],[1/0,-1/0]],a=e[n];a[0]<o[0][0]&&(o[0][0]=a[0]),a[0]>o[0][1]&&(o[0][1]=a[0]),a[1]<o[1][0]&&(o[1][0]=a[1]),a[1]>o[1][1]&&(o[1][1]=a[1])}return o&&SM(o)}};function SM(t){return new z(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var MM=["#ddd"];function IM(t,e){return f({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new w(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}function TM(t,e,n,i){i&&i.$from===t.id||this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())}ad({type:"brush",dependencies:["geo","grid","xAxis","yAxis","parallel","series"],defaultOption:{toolbox:null,brushLink:null,seriesIndex:"all",geoIndex:null,xAxisIndex:null,yAxisIndex:null,brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(120,140,180,0.3)",borderColor:"rgba(120,140,180,0.8)"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},areas:[],brushType:null,brushOption:{},coordInfoList:[],optionUpdated:function(t,e){var n=this.option,e=(e||qS(n,t,["inBrush","outOfBrush"]),n.inBrush=n.inBrush||{});n.outOfBrush=n.outOfBrush||{color:MM},e.hasOwnProperty("liftZ")||(e.liftZ=5)},setAreas:function(t){H&&(P(D(t)),Z(t,function(t){P(t.brushType,"Illegal areas")})),t&&(this.areas=I(t,function(t){return IM(this.option,t)},this))},setBrushOption:function(t){this.brushOption=IM(this.option,t),this.brushType=this.brushOption.brushType}}),rd({type:"brush",init:function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new Wx(e.getZr())).on("brush",A(this._onBrush,this)).mount()},render:function(t){return this.model=t,TM.apply(this,arguments)},updateTransform:TM,updateView:TM,dispose:function(){this._brushController.dispose()},_onBrush:function(t,e){var n=this.model.id;this.model.brushTargetManager.setOutputRanges(t,this.ecModel),e.isEnd&&!e.removeOnClick||this.api.dispatchAction({type:"brush",brushId:n,areas:N(t),$from:n})}}),s({type:"brush",event:"brush"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(t){t.setAreas(e.areas)})}),s({type:"brushSelect",event:"brushSelected",update:"none"},function(){});var AM={};function DM(t,e){AM[t]=e}l=_h.toolbox.brush;function CM(t,e,n){this.model=t,this.ecModel=e,this.api=n,this._brushType,this._brushMode}CM.defaultOption={show:!0,type:["rect","polygon","lineX","lineY","keep","clear"],icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:N(l.title)};var c=CM.prototype,LM=(c.render=c.updateView=function(e,t,n){var i,o,a;t.eachComponent({mainType:"brush"},function(t){i=t.brushType,o=t.brushOption.brushMode||"single",a|=t.areas.length}),this._brushType=i,this._brushMode=o,Z(e.get("type",!0),function(t){e.setIconStatus(t,("keep"===t?"multiple"===o:"clear"===t?a:t===i)?"emphasis":"normal")})},c.getIcons=function(){var t=this.model,e=t.get("icon",!0),n={};return Z(t.get("type",!0),function(t){e[t]&&(n[t]=e[t])}),n},c.onclick=function(t,e,n){var i=this._brushType,o=this._brushMode;"clear"===n?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===n?i:i!==n&&n,brushMode:"keep"===n?"multiple"===o?"single":"multiple":o}})},DM("brush",CM),Jc(function(t,e){var n,i,o,a=t&&t.brush;(a=D(a)?a:a?[a]:[]).length&&(n=[],Z(a,function(t){t=t.hasOwnProperty("toolbox")?t.toolbox:[];t instanceof Array&&(n=n.concat(t))}),(a=D(a=t&&t.toolbox)?a[0]:a)||(t.toolbox=[a={feature:{}}]),(t=(a=(t=a.feature||(a.feature={})).brush||(t.brush={})).type||(a.type=[])).push.apply(t,n),o={},Z(i=t,function(t){o[t]=1}),i.length=0,Z(o,function(t,e){i.push(e)}),e)&&!t.length&&t.push.apply(t,XS)}),Z);function kM(t){t=t&&t.visualMap;D(t)||(t=t?[t]:[]),LM(t,function(t){t&&(PM(t,"splitList")&&!PM(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList),t=t.pieces)&&D(t)&&LM(t,function(t){k(t)&&(PM(t,"start")&&!PM(t,"min")&&(t.min=t.start),PM(t,"end"))&&!PM(t,"max")&&(t.max=t.end)})})}function PM(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}u.registerSubTypeDefaulter("visualMap",function(t){return t.categories||(t.pieces?0<t.pieces.length:0<t.splitNumber)&&!t.calculable?"piecewise":"continuous"});n=pc.VISUAL.COMPONENT;function NM(t,e,n,i){for(var o=e.targetVisuals[i],a=M.prepareVisualTypes(o),r={color:t.getData().getVisual("color")},s=0,l=a.length;s<l;s++){var u=a[s],u=o["opacity"===u?"__alphaForOpacity":u];u&&u.applyVisual(n,h,c)}return r.color;function h(t){return r[t]}function c(t,e){r[t]=e}}nd(n,{createOnAllSeries:!0,reset:function(n,t){var i=[];return t.eachComponent("visualMap",function(t){var d,p,g,f,e=n.pipelineContext;!t.isTargetSeries(n)||e&&e.large||i.push((e=t.stateList,d=t.targetVisuals,p=A(t.getValueState,t),g=t.getDataDimension(n.getData()),f={},Z(e,function(t){var e=M.prepareVisualTypes(d[t]);f[t]=e}),{progress:function(t,n){function e(t){return n.getItemVisual(o,t)}function i(t,e){n.setItemVisual(o,t,e)}var o;for(null!=g&&(g=n.getDimension(g));null!=(o=t.next());){var a=n.getRawDataItem(o);if(!a||!1!==a.visualMap)for(var r=null!=g?n.get(g,o,!0):o,a=p(r),s=d[a],l=f[a],u=0,h=l.length;u<h;u++){var c=l[u];s[c]&&s[c].applyVisual(r,e,i)}}}}))}),i}}),nd(n,{createOnAllSeries:!0,reset:function(n,t){var i=n.getData(),o=[];t.eachComponent("visualMap",function(t){var e;t.isTargetSeries(n)&&(e=t.getVisualMeta(A(NM,null,n,t))||{stops:[],outerColors:[]},t=t.getDataDimension(i),null!=(t=i.getDimensionInfo(t)))&&(e.dimension=t.index,o.push(e))}),n.getData().setVisual("visualMeta",o)}});var OM=function(t,e,n){t=N((EM[t]||{})[e]);return n&&D(t)?t[t.length-1]:t},EM={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},zM=M.mapVisual,RM=M.eachVisual,BM=D,VM=Z,GM=zs,FM=Os,WM=ad({type:"visualMap",dependencies:["series"],stateList:["inRange","outOfRange"],replacableOptionKeys:["inRange","outOfRange","target","controller","color"],dataBound:[-1/0,1/0],layoutMode:{type:"box",ignoreSize:!0},defaultOption:{show:!0,zlevel:0,z:4,seriesIndex:"all",min:0,max:200,dimension:null,inRange:null,outOfRange:null,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,color:null,formatter:null,text:null,textStyle:{color:"#333"}},init:function(t,e,n){this._dataExtent,this.targetVisuals={},this.controllerVisuals={},this.textStyleModel,this.itemSize,this.mergeDefaultAndTheme(t,n)},optionUpdated:function(t,e){var n=this.option;y.canvasSupported||(n.realtime=!1),e||qS(n,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},resetVisual:function(t){var e=this.stateList;t=A(t,this),this.controllerVisuals=jS(this.option.controller,e,t),this.targetVisuals=jS(this.option.target,e,t)},getTargetSeriesIndices:function(){var t=this.option.seriesIndex,n=[];return null==t||"all"===t?this.ecModel.eachSeries(function(t,e){n.push(e)}):n=ho(t),n},eachTargetSeries:function(e,n){Z(this.getTargetSeriesIndices(),function(t){e.call(n,this.ecModel.getSeriesByIndex(t))},this)},isTargetSeries:function(e){var n=!1;return this.eachTargetSeries(function(t){t===e&&(n=!0)}),n},formatValueText:function(t,e,n){var i,o=this.option,a=o.precision,r=this.dataBound,o=o.formatter;return n=n||["<",">"],D(t)&&(t=t.slice(),i=!0),e=e?t:i?[s(t[0]),s(t[1])]:s(t),T(o)?o.replace("{value}",i?e[0]:e).replace("{value2}",i?e[1]:e):et(o)?i?o(t[0],t[1]):o(t):i?t[0]===r[0]?n[0]+" "+e[1]:t[1]===r[1]?n[1]+" "+e[0]:e[0]+" - "+e[1]:e;function s(t){return t===r[0]?"min":t===r[1]?"max":(+t).toFixed(Math.min(a,20))}},resetExtent:function(){var t=this.option,t=GM([t.min,t.max]);this._dataExtent=t},getDataDimension:function(t){var e=this.option.dimension,n=t.dimensions;if(null!=e||n.length){if(null!=e)return t.getDimension(e);for(var i=t.dimensions,o=i.length-1;0<=o;o--){var a=i[o];if(!t.getDimensionInfo(a).isCalculationCoord)return a}}},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){var t=this.ecModel,e=this.option,n={inRange:e.inRange,outOfRange:e.outOfRange},i=e.target||(e.target={}),o=e.controller||(e.controller={}),l=(f(i,n),f(o,n),this.isCategory());function a(i){BM(e.color)&&!i.inRange&&(i.inRange={color:e.color.slice().reverse()}),i.inRange=i.inRange||{color:t.get("gradientColor")},VM(this.stateList,function(t){var e,n=i[t];T(n)&&((e=OM(n,"active",l))?(i[t]={},i[t][n]=e):delete i[t])},this)}a.call(this,i),a.call(this,o),function(t,e,n){var e=t[e],i=t[n];e&&!i&&(i=t[n]={},VM(e,function(t,e){var n;M.isValidType(e)&&null!=(n=OM(e,"inactive",l))&&(i[e]=n,"color"!==e||i.hasOwnProperty("opacity")||i.hasOwnProperty("colorAlpha")||(i.opacity=[0,0]))}))}.call(this,i,"inRange","outOfRange"),function(o){var a=(o.inRange||{}).symbol||(o.outOfRange||{}).symbol,r=(o.inRange||{}).symbolSize||(o.outOfRange||{}).symbolSize,s=this.get("inactiveColor");VM(this.stateList,function(t){var e,n=this.itemSize,i=o[t],t=(null==(i=i||(o[t]={color:l?s:[s]})).symbol&&(i.symbol=a&&N(a)||(l?"roundRect":["roundRect"])),null==i.symbolSize&&(i.symbolSize=r&&N(r)||(l?n[0]:[n[0],n[0]])),i.symbol=zM(i.symbol,function(t){return"none"===t||"square"===t?"roundRect":t}),i.symbolSize);null!=t&&(e=-1/0,RM(t,function(t){e<t&&(e=t)}),i.symbolSize=zM(t,function(t){return FM(t,[0,e],[0,n[0]],!0)}))},this)}.call(this,o)},resetItemSize:function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},isCategory:function(){return!!this.option.categories},setSelected:yt,getValueState:yt,getVisualMeta:yt}),HM=[20,140],ZM=WM.extend({type:"visualMap.continuous",defaultOption:{align:"auto",calculable:!1,range:null,realtime:!0,itemHeight:null,itemWidth:null,hoverLink:!0,hoverLinkDataSize:null,hoverLinkOnHandle:null},optionUpdated:function(t,e){ZM.superApply(this,"optionUpdated",arguments),this.resetExtent(),this.resetVisual(function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()}),this._resetRange()},resetItemSize:function(){ZM.superApply(this,"resetItemSize",arguments);var t=this.itemSize;"horizontal"===this._orient&&t.reverse(),null!=t[0]&&!isNaN(t[0])||(t[0]=HM[0]),null!=t[1]&&!isNaN(t[1])||(t[1]=HM[1])},_resetRange:function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):D(e)&&(e[0]>e[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},completeVisualOption:function(){WM.prototype.completeVisualOption.apply(this,arguments),Z(this.stateList,function(t){t=this.option.controller[t].symbolSize;t&&t[0]!==t[1]&&(t[0]=0)},this)},setSelected:function(t){this.option.range=t.slice(),this._resetRange()},getSelected:function(){var t=this.getExtent(),e=zs((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]<t[0]&&(e[0]=t[0]),e[1]<t[0]&&(e[1]=t[0]),e},getValueState:function(t){var e=this.option.range,n=this.getExtent();return(e[0]<=n[0]||e[0]<=t)&&(e[1]>=n[1]||t<=e[1])?"inRange":"outOfRange"},findTargetDataIndices:function(i){var o=[];return this.eachTargetSeries(function(t){var n=[],e=t.getData();e.each(this.getDataDimension(e),function(t,e){i[0]<=t&&t<=i[1]&&n.push(e)},this),o.push({seriesId:t.id,dataIndex:n})},this),o},getVisualMeta:function(n){var t=XM(0,0,this.getExtent()),e=XM(0,0,this.option.range.slice()),i=[];function o(t,e){i.push({value:t,color:n(t,e)})}for(var a=0,r=0,s=e.length,l=t.length;r<l&&(!e.length||t[r]<=e[0]);r++)t[r]<e[a]&&o(t[r],"outOfRange");for(var u=1;a<s;a++,u=0)u&&i.length&&o(e[a],"outOfRange"),o(e[a],"inRange");for(u=1;r<l;r++)(!e.length||e[e.length-1]<t[r])&&(u&&(i.length&&o(i[i.length-1].value,"outOfRange"),u=0),o(t[r],"outOfRange"));var h=i.length;return{stops:i,outerColors:[h?i[0].color:"transparent",h?i[h-1].color:"transparent"]}}});function XM(t,e,n){if(n[0]===n[1])return n.slice();for(var i=(n[1]-n[0])/200,o=n[0],a=[],r=0;r<=200&&o<n[1];r++)a.push(o),o+=i;return a.push(n[1]),a}Ds=rd({type:"visualMap",autoPositionValues:{left:1,right:1,top:1,bottom:1},init:function(t,e){this.ecModel=t,this.api=e,this.visualMapModel},render:function(t,e,n,i){!1!==(this.visualMapModel=t).get("show")?this.doRender.apply(this,arguments):this.group.removeAll()},renderBackground:function(t){var e=this.visualMapModel,n=Qs(e.get("padding")||0),i=t.getBoundingRect();t.add(new V({z2:-1,silent:!0,shape:{x:i.x-n[3],y:i.y-n[0],width:i.width+n[3]+n[1],height:i.height+n[0]+n[2]},style:{fill:e.get("backgroundColor"),stroke:e.get("borderColor"),lineWidth:e.get("borderWidth")}}))},getControllerVisual:function(n,i,o){var t,e=(o=o||{}).forceState,a=this.visualMapModel,r={};function s(t){return r[t]}function l(t,e){r[t]=e}"symbol"===i&&(r.symbol=a.get("itemSymbol")),"color"===i&&(t=a.get("contentColor"),r.color=t);var u=a.controllerVisuals[e||a.getValueState(n)];return Z(M.prepareVisualTypes(u),function(t){var e=u[t];o.convertOpacityToAlpha&&"opacity"===t&&(t="colorAlpha",e=u.__alphaForOpacity),M.dependsOn(t,i)&&e&&e.applyVisual(n,s,l)}),r[i]},positionGroup:function(t){var e=this.visualMapModel,n=this.api;vl(t,e.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()})},doRender:yt});function YM(t,e,n){var i=t.option,t=i.align;if(null!=t&&"auto"!==t)return t;for(var t={width:e.getWidth(),height:e.getHeight()},o="horizontal"===i.orient?1:0,a=[["left","right","width"],["top","bottom","height"]],r=a[o],s=[0,null,10],l={},u=0;u<3;u++)l[a[1-o][u]]=s[u],l[r[u]]=2===u?n[0]:i[r[u]];var e=[["x","width",3],["y","height",0]][o],h=yl(l,t,i.padding);return r[(h.margin[e[2]]||0)+h[e[0]]+.5*h[e[1]]<.5*t[e[1]]?0:1]}function UM(e){return Z(e||[],function(t){null!=e.dataIndex&&(e.dataIndexInside=e.dataIndex,e.dataIndex=null)}),e}var jM=Os,qM=Z,KM=Math.min,$M=Math.max,JM=Ds.extend({type:"visualMap.continuous",init:function(){JM.superApply(this,"init",arguments),this._shapes={},this._dataInterval=[],this._handleEnds=[],this._orient,this._useHandle,this._hoverLinkDataIndices=[],this._dragging,this._hovering},doRender:function(t,e,n,i){i&&"selectDataRange"===i.type&&i.from===this.uid||this._buildView()},_buildView:function(){this.group.removeAll();var t=this.visualMapModel,e=this.group,t=(this._orient=t.get("orient"),this._useHandle=t.get("calculable"),this._resetInterval(),this._renderBar(e),t.get("text"));this._renderEndsText(e,t,0),this._renderEndsText(e,t,1),this._updateView(!0),this.renderBackground(e),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(e)},_renderEndsText:function(t,e,n){var i,o,a;e&&(e=null!=(e=e[1-n])?e+"":"",o=(i=this.visualMapModel).get("textGap"),i=i.itemSize,a=this._shapes.barGroup,i=this._applyTransform([i[0]/2,0===n?-o:i[1]+o],a),o=this._applyTransform(0===n?"bottom":"top",a),n=this._orient,a=this.visualMapModel.textStyleModel,this.group.add(new B({style:{x:i[0],y:i[1],textVerticalAlign:"horizontal"===n?"middle":o,textAlign:"horizontal"===n?o:"center",text:e,textFont:a.getFont(),textFill:a.getTextColor()}})))},_renderBar:function(t){var e=this.visualMapModel,n=this._shapes,i=e.itemSize,o=this._orient,a=this._useHandle,r=YM(e,this.api,i),s=n.barGroup=this._createBarGroup(r),e=(s.add(n.outOfRange=QM()),s.add(n.inRange=QM(null,a?eI(this._orient):null,A(this._dragHandle,this,"all",!1),A(this._dragHandle,this,"all",!0))),e.textStyleModel.getTextRect("ๅ›ฝ")),e=$M(e.width,e.height);a&&(n.handleThumbs=[],n.handleLabels=[],n.handleLabelPoints=[],this._createHandle(s,0,i,e,o,r),this._createHandle(s,1,i,e,o,r)),this._createIndicator(s,i,e,o),t.add(s)},_createHandle:function(t,e,n,i,o){var a=A(this._dragHandle,this,e,!1),r=A(this._dragHandle,this,e,!0),s=QM((s=i,0===e?[[0,0],[s,0],[s,-s]]:[[0,0],[s,0],[s,s]]),eI(this._orient),a,r),n=(s.position[0]=n[0],t.add(s),this.visualMapModel.textStyleModel),t=new B({draggable:!0,drift:a,onmousemove:function(t){$t(t.event)},ondragend:r,style:{x:0,y:0,text:"",textFont:n.getFont(),textFill:n.getTextColor()}}),a=(this.group.add(t),["horizontal"===o?i/2:1.5*i,"horizontal"===o?0===e?-1.5*i:1.5*i:0===e?-i/2:i/2]),r=this._shapes;r.handleThumbs[e]=s,r.handleLabelPoints[e]=a,r.handleLabels[e]=t},_createIndicator:function(t,e,n,i){var o=QM([[0,0]],"move"),e=(o.position[0]=e[0],o.attr({invisible:!0,silent:!0}),t.add(o),this.visualMapModel.textStyleModel),t=new B({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textFont:e.getFont(),textFill:e.getTextColor()}}),e=(this.group.add(t),["horizontal"===i?n/2:9,0]),i=this._shapes;i.indicator=o,i.indicatorLabel=t,i.indicatorLabelPoint=e},_dragHandle:function(t,e,n,i){this._useHandle&&(this._dragging=!e,e||(n=this._applyTransform([n,i],this._shapes.barGroup,!0),this._updateInterval(t,n[1]),this._updateView()),e===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),e?this._hovering||this._clearHoverLinkToSeries():tI(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1))},_resetInterval:function(){var t=this.visualMapModel,e=this._dataInterval=t.getSelected(),n=t.getExtent(),t=[0,t.itemSize[1]];this._handleEnds=[jM(e[0],n,t,!0),jM(e[1],n,t,!0)]},_updateInterval:function(t,e){var n=this.visualMapModel,i=this._handleEnds,o=[0,n.itemSize[1]],e=(fx(e=e||0,i,o,t,0),n.getExtent());this._dataInterval=[jM(i[0],o,e,!0),jM(i[1],o,e,!0)]},_updateView:function(t){var e=this.visualMapModel,n=e.getExtent(),i=this._shapes,e=[0,e.itemSize[1]],t=t?e:this._handleEnds,o=this._createBarVisual(this._dataInterval,n,t,"inRange"),n=this._createBarVisual(n,n,e,"outOfRange");i.inRange.setStyle({fill:o.barColor,opacity:o.opacity}).setShape("points",o.barPoints),i.outOfRange.setStyle({fill:n.barColor,opacity:n.opacity}).setShape("points",n.barPoints),this._updateHandle(t,o)},_createBarVisual:function(t,e,n,i){var i={forceState:i,convertOpacityToAlpha:!0},o=this._makeColorGradient(t,i),t=[this.getControllerVisual(t[0],"symbolSize",i),this.getControllerVisual(t[1],"symbolSize",i)],i=this._createBarPoints(n,t);return{barColor:new Ar(0,0,0,1,o),barPoints:i,handlesColor:[o[0].color,o[o.length-1].color]}},_makeColorGradient:function(t,e){var n=[],i=(t[1]-t[0])/100;n.push({color:this.getControllerVisual(t[0],"color",e),offset:0});for(var o=1;o<100;o++){var a=t[0]+i*o;if(a>t[1])break;n.push({color:this.getControllerVisual(a,"color",e),offset:o/100})}return n.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),n},_createBarPoints:function(t,e){var n=this.visualMapModel.itemSize;return[[n[0]-e[0],t[0]],[n[0],t[0]],[n[0],t[1]],[n[0]-e[1],t[1]]]},_createBarGroup:function(t){var e=this._orient,n=this.visualMapModel.get("inverse");return new R("horizontal"!==e||n?"horizontal"===e&&n?{scale:"bottom"===t?[-1,1]:[1,1],rotation:-Math.PI/2}:"vertical"!==e||n?{scale:"left"===t?[1,1]:[-1,1]}:{scale:"left"===t?[1,-1]:[-1,-1]}:{scale:"bottom"===t?[1,1]:[-1,1],rotation:Math.PI/2})},_updateHandle:function(n,i){var o,a,r,s;this._useHandle&&(o=this._shapes,a=this.visualMapModel,r=o.handleThumbs,s=o.handleLabels,qM([0,1],function(t){var e=r[t],e=(e.setStyle("fill",i.handlesColor[t]),e.position[1]=n[t],_s(o.handleLabelPoints[t],xs(e,this.group)));s[t].setStyle({x:e[0],y:e[1],text:a.formatValueText(this._dataInterval[t]),textVerticalAlign:"middle",textAlign:this._applyTransform("horizontal"===this._orient?0===t?"bottom":"top":"left",o.barGroup)})},this))},_showIndicator:function(t,e,n,i){var o,a=this.visualMapModel,r=a.getExtent(),s=a.itemSize,l=[0,s[1]],r=jM(t,r,l,!0),l=this._shapes,u=l.indicator;u&&(u.position[1]=r,u.attr("invisible",!1),u.setShape("points",(o=!!n,i=i,r=r,s=s[1],o?[[0,-KM(i,$M(r,0))],[6,0],[0,KM(i,$M(s-r,0))]]:[[0,0],[5,-5],[5,5]])),o=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0}),u.setStyle("fill",o),i=_s(l.indicatorLabelPoint,xs(u,this.group)),(s=l.indicatorLabel).attr("invisible",!1),r=this._applyTransform("left",l.barGroup),t=this._orient,s.setStyle({text:(n||"")+a.formatValueText(e),textVerticalAlign:"horizontal"===t?r:"middle",textAlign:"horizontal"===t?"center":r,x:i[0],y:i[1]}))},_enableHoverLinkToSeries:function(){var n=this;this._shapes.barGroup.on("mousemove",function(t){var e;n._hovering=!0,n._dragging||(e=n.visualMapModel.itemSize,(t=n._applyTransform([t.offsetX,t.offsetY],n._shapes.barGroup,!0,!0))[1]=KM($M(0,t[1]),e[1]),n._doHoverLinkToSeries(t[1],0<=t[0]&&t[0]<=e[0]))}).on("mouseout",function(){n._hovering=!1,n._dragging||n._clearHoverLinkToSeries()})},_enableHoverLinkFromSeries:function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},_doHoverLinkToSeries:function(t,e){var n,i,o,a,r,s=this.visualMapModel,l=s.itemSize;function u(t,e,n){for(var i=0,o=t.length;i<o;i++)for(var a=t[i].seriesId,r=ho(t[i].dataIndex),s=n&&n[a],l=0,u=r.length;l<u;l++){var h=r[l];s&&s[h]?s[h]=null:(e[a]||(e[a]={}))[h]=1}}function h(t,e){var n,i,o=[];for(n in t)t.hasOwnProperty(n)&&null!=t[n]&&(e?o.push(+n):(i=h(t[n],!0)).length&&o.push({seriesId:n,dataIndex:i}));return o}s.option.hoverLink&&(l=[0,l[1]],n=s.getExtent(),t=KM($M(l[0],t),l[1]),o=n,a=l,r=6,i=(i=s).get("hoverLinkDataSize"),o=[t-(i=r=i?jM(i,o,a,!0)/2:r),t+i],a=jM(t,l,n,!0),r=[jM(o[0],l,n,!0),jM(o[1],l,n,!0)],o[0]<l[0]&&(r[0]=-1/0),l[1]<o[1]&&(r[1]=1/0),e&&(r[0]===-1/0?this._showIndicator(a,r[1],"< ",i):r[1]===1/0?this._showIndicator(a,r[0],"> ",i):this._showIndicator(a,a,"โ‰ˆ ",i)),t=this._hoverLinkDataIndices,n=[],(e||tI(s))&&(n=this._hoverLinkDataIndices=s.findTargetDataIndices(r)),l=n,o={},u(t||[],a={}),u(l||[],o,a),i=[h(a),h(o)],this._dispatchHighDown("downplay",UM(i[0])),this._dispatchHighDown("highlight",UM(i[1])))},_hoverLinkFromSeriesMouseOver:function(t){var e,t=t.target,n=this.visualMapModel;t&&null!=t.dataIndex&&(e=this.ecModel.getSeriesByIndex(t.seriesIndex),n.isTargetSeries(e))&&(n=(e=e.getData(t.dataType)).get(n.getDataDimension(e),t.dataIndex,!0),isNaN(n)||this._showIndicator(n,n))},_hideIndicator:function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0)},_clearHoverLinkToSeries:function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",UM(t)),t.length=0},_clearHoverLinkFromSeries:function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},_applyTransform:function(t,e,n,i){e=xs(e,i?null:this.group);return Is[D(t)?"applyTransform":"transformDirection"](t,e,n)},_dispatchHighDown:function(t,e){e&&e.length&&this.api.dispatchAction({type:t,batch:e})},dispose:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},remove:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()}});function QM(t,e,n,i){return new yr({shape:{points:t},draggable:!!n,cursor:e,drift:n,onmousemove:function(t){$t(t.event)},ondragend:i})}function tI(t){var e=t.get("hoverLinkOnHandle");return null==e?t.get("realtime"):e}function eI(t){return"vertical"===t?"ns-resize":"ew-resize"}s({type:"selectDataRange",event:"dataRangeSelected",update:"update"},function(e,t){t.eachComponent({mainType:"visualMap",query:e},function(t){t.setSelected(e.selected)})}),Jc(kM);var nI=WM.extend({type:"visualMap.piecewise",defaultOption:{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieceList:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0,showLabel:null},optionUpdated:function(t,e){nI.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetExtent();var n=this._mode=this._determineMode(),i=(iI[this._mode].call(this),this._resetSelected(t,e),this.option.categories);this.resetVisual(function(t,e){"categories"===n?(t.mappingMethod="category",t.categories=N(i)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=I(this._pieceList,function(t){return t=N(t),"inRange"!==e&&(t.visual=null),t}))})},completeVisualOption:function(){var i=this.option,n={},t=M.listVisualTypes(),o=this.isCategory();function a(t,e,n){return t&&t[e]&&(k(t[e])?t[e].hasOwnProperty(n):t[e]===n)}Z(i.pieces,function(e){Z(t,function(t){e.hasOwnProperty(t)&&(n[t]=1)})}),Z(n,function(t,e){var n=0;Z(this.stateList,function(t){n|=a(i,t,e)||a(i.target,t,e)},this),n||Z(this.stateList,function(t){(i[t]||(i[t]={}))[e]=OM(e,"inRange"===t?"active":"inactive",o)})},this),WM.prototype.completeVisualOption.apply(this,arguments)},_resetSelected:function(t,e){var n,i=this.option,o=this._pieceList,a=(e?i:t).selected||{};i.selected=a,Z(o,function(t,e){t=this.getSelectedMapKey(t);a.hasOwnProperty(t)||(a[t]=!0)},this),"single"===i.selectedMode&&(n=!1,Z(o,function(t,e){t=this.getSelectedMapKey(t);a[t]&&(n?a[t]=!1:n=!0)},this))},getSelectedMapKey:function(t){return"categories"===this._mode?t.value+"":t.index+""},getPieceList:function(){return this._pieceList},_determineMode:function(){var t=this.option;return t.pieces&&0<t.pieces.length?"pieces":this.option.categories?"categories":"splitNumber"},setSelected:function(t){this.option.selected=N(t)},getValueState:function(t){t=M.findPieceIndex(t,this._pieceList);return null!=t&&this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?"inRange":"outOfRange"},findTargetDataIndices:function(i){var o=[];return this.eachTargetSeries(function(t){var n=[],e=t.getData();e.each(this.getDataDimension(e),function(t,e){M.findPieceIndex(t,this._pieceList)===i&&n.push(e)},this),o.push({seriesId:t.id,dataIndex:n})},this),o},getRepresentValue:function(t){return this.isCategory()||null!=t.value?t.value:(t=t.interval||[])[0]===-1/0&&t[1]===1/0?0:(t[0]+t[1])/2},getVisualMeta:function(i){var o,a,r,t,e,n;if(!this.isCategory())return o=[],a=[],(t=(r=this)._pieceList.slice()).length?((e=t[0].interval[0])!==-1/0&&t.unshift({interval:[-1/0,e]}),(e=t[t.length-1].interval[1])!==1/0&&t.push({interval:[e,1/0]})):t.push({interval:[-1/0,1/0]}),n=-1/0,Z(t,function(t){t=t.interval;t&&(t[0]>n&&s([n,t[0]],"outOfRange"),s(t.slice()),n=t[1])},this),{stops:o,outerColors:a};function s(t,e){var n=r.getRepresentValue({interval:t}),n=(e=e||r.getValueState(n),i(n,e));t[0]===-1/0?a[0]=n:t[1]===1/0?a[1]=n:o.push({value:t[0],color:n},{value:t[1],color:n})}}}),iI={splitNumber:function(){var t=this.option,e=this._pieceList,n=Math.min(t.precision,20),i=this.getExtent(),o=t.splitNumber,o=Math.max(parseInt(o,10),1);t.splitNumber=o;for(var a=(i[1]-i[0])/o;+a.toFixed(n)!==a&&n<5;)n++;t.precision=n;var a=+a.toFixed(n),r=0;t.minOpen&&e.push({index:r++,interval:[-1/0,i[0]],close:[0,0]});for(var s=i[0],l=r+o;r<l;s+=a){var u=r===o-1?i[1]:s+a;e.push({index:r++,interval:[s,u],close:[1,1]})}t.maxOpen&&e.push({index:r++,interval:[i[1],1/0],close:[0,0]}),qs(e),Z(e,function(t){t.text=this.formatValueText(t.interval)},this)},categories:function(){var t=this.option;Z(t.categories,function(t){this._pieceList.push({text:this.formatValueText(t,!0),value:t})},this),oI(t,this._pieceList)},pieces:function(){var t=this.option,d=this._pieceList;Z(t.pieces,function(t,e){var n={text:"",index:e};if(null!=(t=k(t)?t:{value:t}).label&&(n.text=t.label),t.hasOwnProperty("value")){var i=n.value=t.value;n.interval=[i,i],n.close=[1,1]}else{for(var o=n.interval=[],a=n.close=[0,0],r=[1,0,1],s=[-1/0,1/0],l=[],u=0;u<2;u++){for(var h=[["gte","gt","min"],["lte","lt","max"]][u],c=0;c<3&&null==o[u];c++)o[u]=t[h[c]],a[u]=r[c],l[u]=2===c;null==o[u]&&(o[u]=s[u])}l[0]&&o[1]===1/0&&(a[0]=0),l[1]&&o[0]===-1/0&&(a[1]=0),H&&o[0]>o[1]&&console.warn("Piece "+e+"is illegal: "+o+" lower bound should not greater then uppper bound."),o[0]===o[1]&&a[0]&&a[1]&&(n.value=o[0])}n.visual=M.retrieveVisuals(t),d.push(n)},this),oI(t,d),qs(d),Z(d,function(t){var e=t.close,e=[["<","โ‰ค"][e[1]],[">","โ‰ฅ"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,e)},this)}};function oI(t,e){var n=t.inverse;("vertical"===t.orient?!n:n)&&e.reverse()}Ds.extend({type:"visualMap.piecewise",doRender:function(){var i=this.group,o=(i.removeAll(),this.visualMapModel),a=o.get("textGap"),t=o.textStyleModel,r=t.getFont(),s=t.getTextColor(),l=this._getItemAlign(),u=o.itemSize,t=this._getViewData(),e=t.endsText,h=rt(o.get("showLabel",!0),!e);e&&this._renderEndsText(i,e[0],u,h,l),Z(t.viewPieceList,function(t){var e=t.piece,n=new R,t=(n.onclick=A(this._onItemClick,this,e),this._enableHoverLink(n,t.indexInModelPieceList),o.getRepresentValue(e));this._createItemSymbol(n,t,[0,0,u[0],u[1]]),h&&(t=this.visualMapModel.getValueState(t),n.add(new B({style:{x:"right"===l?-a:u[0]+a,y:u[1]/2,text:e.text,textVerticalAlign:"middle",textAlign:l,textFont:r,textFill:s,opacity:"outOfRange"===t?.5:1}}))),i.add(n)},this),e&&this._renderEndsText(i,e[1],u,h,l),ml(o.get("orient"),i,o.get("itemGap")),this.renderBackground(i),this.positionGroup(i)},_enableHoverLink:function(t,n){function e(t){var e=this.visualMapModel;e.option.hoverLink&&this.api.dispatchAction({type:t,batch:UM(e.findTargetDataIndices(n))})}t.on("mouseover",A(e,this,"highlight")).on("mouseout",A(e,this,"downplay"))},_getItemAlign:function(){var t=this.visualMapModel,e=t.option;return"vertical"===e.orient?YM(t,this.api,t.itemSize):(t=e.align)&&"auto"!==t?t:"left"},_renderEndsText:function(t,e,n,i,o){var a,r;e&&(a=new R,r=this.visualMapModel.textStyleModel,a.add(new B({style:{x:i?"right"===o?n[0]:0:n[0]/2,y:n[1]/2,textVerticalAlign:"middle",textAlign:i?o:"center",text:e,textFont:r.getFont(),textFill:r.getTextColor()}})),t.add(a))},_getViewData:function(){var t=this.visualMapModel,e=I(t.getPieceList(),function(t,e){return{piece:t,indexInModelPieceList:e}}),n=t.get("text"),i=t.get("orient"),t=t.get("inverse");return("horizontal"===i?t:!t)?e.reverse():n=n&&n.slice().reverse(),{viewPieceList:e,endsText:n}},_createItemSymbol:function(t,e,n){t.add(Wp(this.getControllerVisual(e,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(e,"color")))},_onItemClick:function(t){var e=this.visualMapModel,n=e.option,i=N(n.selected),o=e.getSelectedMapKey(t);"single"===n.selectedMode?(i[o]=!0,Z(i,function(t,e){i[e]=e===o})):i[o]=!i[o],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:i})}}),Jc(kM);var aI=ad({type:"toolbox",layoutMode:{type:"box",ignoreSize:!0},optionUpdated:function(){aI.superApply(this,"optionUpdated",arguments),Z(this.option.feature,function(t,e){e=AM[e];e&&f(t,e.defaultOption)})},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"}}}});rd({type:"toolbox",render:function(d,p,g,f){var m,y,v,x,t,e,n,i,o,a,_=this.group;function r(t,e){var n,i,o,a,r,s,l,u,t=x[t],e=x[e],h=new w(y[t],d,d.ecModel);if(t&&!e){if(0===t.indexOf("my"))n={model:h,onclick:h.option.onclick,featureName:t};else{var c=AM[t];if(!c)return;n=new c(h,p,g)}v[t]=n}else{if(!(n=v[e]))return;n.model=h,n.ecModel=p,n.api=g}t||!e?h.get("show")&&!n.unusable?(o=n,c=t,r=(i=h).getModel("iconStyle"),s=i.getModel("emphasis.iconStyle"),e=o.getIcons?o.getIcons():i.get("icon"),l=i.get("title")||{},"string"==typeof e&&(t=e,a=l,l={},(e={})[c]=t,l[c]=a),u=i.iconPaths={},Z(e,function(t,e){var n=Ms(t,{},{x:-m/2,y:-m/2,width:m,height:m});n.setStyle(r.getItemStyle()),n.hoverStyle=s.getItemStyle(),ss(n),d.get("showTitle")&&(n.__title=l[e],n.on("mouseover",function(){var t=s.getItemStyle();n.setStyle({text:l[e],textPosition:t.textPosition||"bottom",textFill:t.fill||t.stroke||"#000",textAlign:t.textAlign||"center"})}).on("mouseout",function(){n.setStyle({textFill:null})})),n.trigger(i.get("iconStatus."+e)||"normal"),_.add(n),n.on("click",A(o.onclick,o,p,g,e)),u[e]=n}),h.setIconStatus=function(t,e){var n=this.option,i=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[t]=e,i[t]&&i[t].trigger(e)},n.render&&n.render(h,p,g,f)):n.remove&&n.remove(p,g):n.dispose&&n.dispose(p,g)}_.removeAll(),d.get("show")&&(m=+d.get("itemSize"),y=d.get("feature")||{},v=this._features||(this._features={}),x=[],Z(y,function(t,e){x.push(e)}),new hd(this._featureNames||[],x).add(r).update(r).remove(L(r,null)).execute(),this._featureNames=x,t=_,n=g,i=(e=d).getBoxLayoutParams(),o=e.get("padding"),n={width:n.getWidth(),height:n.getHeight()},a=yl(i,n,o),ml(e.get("orient"),t,e.get("itemGap"),a.width,a.height),vl(t,i,n,o),_.add(ob(_.getBoundingRect(),d)),_.eachChild(function(t){var e,n,i=t.__title,o=t.hoverStyle;o&&i&&(i=ii(i,pi(o)),e=t.position[0]+_.position[0],n=!1,t.position[1]+_.position[1]+m+i.height>g.getHeight()&&(o.textPosition="top",n=!0),t=n?-5-i.height:m+8,e+i.width/2>g.getWidth()?(o.textPosition=["100%",t],o.textAlign="right"):e-i.width/2<0&&(o.textPosition=[0,t],o.textAlign="left"))}))},updateView:function(t,e,n,i){Z(this._features,function(t){t.updateView&&t.updateView(t.model,e,n,i)})},remove:function(e,n){Z(this._features,function(t){t.remove&&t.remove(e,n)}),this.group.removeAll()},dispose:function(e,n){Z(this._features,function(t){t.dispose&&t.dispose(e,n)})}});l=_h.toolbox.saveAsImage;function rI(t){this.model=t}rI.defaultOption={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:l.title,type:"png",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:l.lang.slice()},rI.prototype.unusable=!y.canvasSupported;rI.prototype.onclick=function(t,e){var n=this.model,i=n.get("name")||t.get("title.0.text")||"echarts",o=document.createElement("a"),a=n.get("type",!0)||"png",e=(o.download=i+"."+a,o.target="_blank",e.getConnectedDataURL({type:a,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}));if(o.href=e,"function"!=typeof MouseEvent||y.browser.ie||y.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var r=atob(e.split(",")[1]),s=r.length,l=new Uint8Array(s);s--;)l[s]=r.charCodeAt(s);t=new Blob([l]);window.navigator.msSaveOrOpenBlob(t,i+"."+a)}else{t=n.get("lang"),i='<body style="margin:0;"><img src="'+e+'" style="max-width:100%;" title="'+(t&&t[0]||"")+'" /></body>';window.open().document.write(i)}else{a=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});o.dispatchEvent(a)}},DM("saveAsImage",rI);c=_h.toolbox.magicType;function sI(t){this.model=t}sI.defaultOption={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",tiled:"M2.3,2.2h22.8V25H2.3V2.2z M35,2.2h22.8V25H35V2.2zM2.3,35h22.8v22.8H2.3V35z M35,35h22.8v22.8H35V35z"},title:N(c.title),option:{},seriesIndex:{}};var n=sI.prototype,lI=(n.getIcons=function(){var t=this.model,e=t.get("icon"),n={};return Z(t.get("type"),function(t){e[t]&&(n[t]=e[t])}),n},{line:function(t,e,n,i){if("bar"===t)return f({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 f({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){if("line"===t||"bar"===t)return f({id:e,stack:"__ec_magicType_stack__"},i.get("option.stack")||{},!0)},tiled:function(t,e,n,i){if("line"===t||"bar"===t)return f({id:e,stack:""},i.get("option.tiled")||{},!0)}}),uI=[["line","bar"],["stack","tiled"]],Ds=(n.onclick=function(r,t,s){var l,u=this.model,e=u.get("seriesIndex."+s);lI[s]&&(l={series:[]},Z(uI,function(t){0<=S(t,s)&&Z(t,function(t){u.setIconStatus(t,"normal")})}),u.setIconStatus(s,"emphasis"),r.eachComponent({mainType:"series",query:null==e?null:{seriesIndex:e}},function(t){var e=t.subType,n=t.id,e=lI[s](e,n,t,u),n=(e&&(C(e,t.option),l.series.push(e)),t.coordinateSystem);if(n&&"cartesian2d"===n.type&&("line"===s||"bar"===s)){e=n.getAxesByScale("ordinal")[0];if(e){var i=e.dim+"Axis",o=r.queryComponents({mainType:i,index:t.get(name+"Index"),id:t.get(name+"Id")})[0].componentIndex;l[i]=l[i]||[];for(var a=0;a<=o;a++)l[i][o]=l[i][o]||{};l[i][o].boundaryGap="bar"===s}}}),t.dispatchAction({type:"changeMagicType",currentType:s,newOption:l}))},s({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)}),DM("magicType",sI),_h.toolbox.dataView),hI=new Array(60).join("-"),cI="\t";function dI(t){o={},a=[],r=[],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:[]},r.push({axisDim:e.dim,axisIndex:e.index})),o[n].series):a).push(t)});var o,a,r,h,t={seriesGroupByCategoryAxis:o,other:a,meta:r};return{value:tt([(h=[],Z(t.seriesGroupByCategoryAxis,function(t,e){var n=t.categoryAxis,i=t.valueAxis.dim,o=[" "].concat(I(t.series,function(t){return t.name})),a=[n.model.getCategories()];Z(t.series,function(t){a.push(t.getRawData().mapArray(i,function(t){return t}))});for(var r=[o.join(cI)],s=0;s<a[0].length;s++){for(var l=[],u=0;u<a.length;u++)l.push(a[u][s]);r.push(l.join(cI))}h.push(r.join("\n"))}),h.join("\n\n"+hI+"\n\n")),I(t.other,function(t){var i=t.getRawData(),o=[t.name],a=[];return i.each(i.dimensions,function(){for(var t=arguments.length,e=i.getName(arguments[t-1]),n=0;n<t-1;n++)a[n]=arguments[n];o.push((e?e+cI:"")+a.join(cI))}),o.join("\n")}).join("\n\n"+hI+"\n\n")],function(t){return t.replace(/[\n\t\s]/g,"")}).join("\n\n"+hI+"\n\n"),meta:t.meta}}function pI(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var gI=new RegExp("["+cI+"]+","g");function fI(t,o){var t=t.split(new RegExp("\n*"+hI+"\n*","g")),a={series:[]};return Z(t,function(t,e){var n,i;0<=t.slice(0,t.indexOf("\n")).indexOf(cI)?(n=function(t){for(var e=t.split(/\n+/g),n=[],i=I(pI(e.shift()).split(gI),function(t){return{name:t,data:[]}}),o=0;o<e.length;o++){var a=pI(e[o]).split(gI);n.push(a.shift());for(var r=0;r<a.length;r++)i[r]&&(i[r].data[o]=a[r])}return{series:i,categories:n}}(t),i=(e=o[e]).axisDim+"Axis",e&&(a[i]=a[i]||[],a[i][e.axisIndex]={data:n.categories},a.series=a.series.concat(n.series))):(n=function(t){for(var e=t.split(/\n+/g),t=pI(e.shift()),n=[],i=0;i<e.length;i++){for(var o,a=pI(e[i]).split(gI),r=!1,s=isNaN(a[0])?(r=!0,o=a[0],a=a.slice(1),n[i]={name:o,value:[]},n[i].value):n[i]=[],l=0;l<a.length;l++)s.push(+a[l]);1===s.length&&(r?n[i].value=s[0]:n[i]=s[0])}return{name:t,data:n}}(t),a.series.push(n))}),a}function mI(t){this._dom=null,this.model=t}mI.defaultOption={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:N(Ds.title),lang:N(Ds.lang),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"},mI.prototype.onclick=function(t,e){var n=e.getDom(),i=this.model,o=(this._dom&&n.removeChild(this._dom),document.createElement("div")),a=(o.style.cssText="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",o.style.backgroundColor=i.get("backgroundColor")||"#fff",document.createElement("h4")),r=i.get("lang")||[],s=(a.innerHTML=r[0]||i.get("title"),a.style.cssText="margin: 10px 20px;",a.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=dI(t),c=("function"==typeof u?"string"==typeof(u=u(e.getOption()))?s.innerHTML=u:ot(u)&&s.appendChild(u):(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),u=document.createElement("div"),t=(u.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"),p=document.createElement("div"),g=(t=(t+=";background-color:"+i.get("buttonColor"))+(";color:"+i.get("buttonTextColor")),this);function f(){n.removeChild(o),g._dom=null}Kt(d,"click",f),Kt(p,"click",function(){var t;try{t="function"==typeof h?h(s,e.getOption()):fI(l.value,c)}catch(t){throw f(),new Error("Data view format error "+t)}t&&e.dispatchAction({type:"changeDataView",newOption:t}),f()}),d.innerHTML=r[1],p.innerHTML=r[2],p.style.cssText=t,d.style.cssText=t,i.get("readOnly")||u.appendChild(p),u.appendChild(d),Kt(l,"keydown",function(t){var e,n,i;9===(t.keyCode||t.which)&&(e=this.value,n=this.selectionStart,i=this.selectionEnd,this.value=e.substring(0,n)+cI+e.substring(i),this.selectionStart=this.selectionEnd=n+1,$t(t))}),o.appendChild(a),o.appendChild(s),o.appendChild(u),s.style.height=n.clientHeight-80+"px",n.appendChild(o),this._dom=o},mI.prototype.remove=function(t,e){this._dom&&e.getDom().removeChild(this._dom)},mI.prototype.dispose=function(t,e){this.remove(t,e)},DM("dataView",mI),s({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(t,o){var a=[];Z(t.newOption.series,function(t){var e,n,i=o.getSeriesByName(t.name)[0];i?(i=i.get("data"),a.push({name:t.name,data:(e=t.data,n=i,I(e,function(t,e){e=n&&n[e];return k(e)&&!D(e)?C({value:t=k(t)&&!D(t)?t.value:t},e):t}))})):a.push(O({type:"scatter"},t))}),o.mergeOption(C({series:a},t.newOption))});var yI=Z,vI="\0_ec_hist_store";function xI(t){return t[vI]||(t[vI]=[{}])}Fh.extend({type:"dataZoom.select"}),h.extend({type:"dataZoom.select"});var l=_h.toolbox.dataZoom,_I=Z,wI="\0_ec_\0toolbox-dataZoom_";function bI(t,e,n){(this._brushController=new Wx(n.getZr())).on("brush",A(this._onBrush,this)).mount(),this._isZoomActive}bI.defaultOption={show:!0,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:N(l.title)};var c=bI.prototype,SI=(c.render=function(t,e,n,i){var o,a,r,s;this.model=t,this.ecModel=e,this.api=n,o=t,a=e,i=i,n=n,s=(r=this)._isZoomActive,i&&"takeGlobalCursor"===i.type&&(s="dataZoomSelect"===i.key&&i.dataZoomSelectActive),r._isZoomActive=s,o.setIconStatus("zoom",s?"emphasis":"normal"),i=new aM(MI(o.option),a,{include:["grid"]}),r._brushController.setPanels(i.makePanelOpts(n,function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"})).enableBrush(!!s&&{brushType:"auto",brushStyle:{lineWidth:0,fill:"rgba(0,0,0,0.2)"}}),t.setIconStatus("back",1<function(t){return xI(t).length}(e)?"emphasis":"normal")},c.onclick=function(t,e,n){SI[n].call(this)},c.remove=function(t,e){this._brushController.unmount()},c.dispose=function(t,e){this._brushController.dispose()},{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=xI(t),t=i[i.length-1],1<i.length&&i.pop(),o={},yI(t,function(t,e){for(var n=i.length-1;0<=n;n--)if(t=i[n][e]){o[e]=t;break}}),o))}});function MI(e){var n={};return Z(["xAxisIndex","yAxisIndex"],function(t){n[t]=e[t],null==n[t]&&(n[t]="all"),!1!==n[t]&&"none"!==n[t]||(n[t]=[])}),n}c._onBrush=function(t,e){var s,l,o,a;function i(t,e,n){var i,o,a,e=e.getAxis(t),r=e.model,t=(i=t,o=r,l.eachComponent({mainType:"dataZoom",subType:"select"},function(t){t.getAxisModel(i,o.componentIndex)&&(a=t)}),a),r=t.findRepresentativeAxisProxy(r).getMinMaxSpan();null==r.minValueSpan&&null==r.maxValueSpan||(n=fx(0,n.slice(),e.scale.getExtent(),0,r.minValueSpan,r.maxValueSpan)),t&&(s[t.id]={dataZoomId:t.id,startValue:n[0],endValue:n[1]})}e.isEnd&&t.length&&(s={},l=this.ecModel,this._brushController.updateCovers([]),new aM(MI(this.model.option),l,{include:["grid"]}).matchOutputRanges(t,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))}),e=s,a=xI(o=l),yI(e,function(t,e){for(var n,i=a.length-1;0<=i&&!a[i][e];i--);i<0&&(n=o.queryComponents({mainType:"dataZoom",subType:"select",id:e})[0])&&(n=n.getPercentRange(),a[0][e]={dataZoomId:e,start:n[0],end:n[1]})}),a.push(e),this._dispatchZoomAction(s))},c._dispatchZoomAction=function(t){var n=[];_I(t,function(t,e){n.push(N(t))}),n.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:n})},DM("dataZoom",bI),Jc(function(e){var r,t;function n(i,t){var o,a;t&&(null==(a=t[o=i+"Index"])||"all"===a||D(a)||(a=!1===a||"none"===a?[]:[a]),D(t=e[i])||(t=t?[t]:[]),_I(t,function(t,e){if(null==a||"all"===a||-1!==S(a,e)){var n={type:"select",$fromToolbox:!0,id:wI+i+e};n[o]=e,r.push(n)}}))}e&&(D(r=e.dataZoom||(e.dataZoom=[]))||(e.dataZoom=r=[r]),t=e.toolbox)&&(t=D(t)?t[0]:t)&&t.feature&&(n("xAxis",t=t.feature.dataZoom),n("yAxis",t))});n=_h.toolbox.restore;function II(t){this.model=t}II.defaultOption={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:n.title};II.prototype.onclick=function(t,e,n){t[vI]=null,e.dispatchAction({type:"restore",from:this.uid})},DM("restore",II),s({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")}),Jc(function(t){var e=t.graphic;D(e)?e[0]&&e[0].elements?t.graphic=[t.graphic[0]]:t.graphic=[{elements:e}]:e&&!e.elements&&(t.graphic=[{elements:[e]}])});var TI=ad({type:"graphic",defaultOption:{elements:[],parentId:null},_elOptionsToUpdate:null,mergeOption:function(t){var e=this.option.elements;this.option.elements=null,TI.superApply(this,"mergeOption",arguments),this.option.elements=e},optionUpdated:function(t,e){var n=this.option,t=(e?n:t).elements,i=n.elements=e?[]:n.elements,e=[],n=(this._flatten(t,e),fo(i,e)),o=(mo(n),this._elOptionsToUpdate=[]);Z(n,function(t,e){var n=t.option;H&&P(k(n)||t.exist,"Empty graphic option definition"),n&&(o.push(n),function(t,e){var n=t.exist;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,n),function(t,e,n){var i=O({},n),o=t[e],a=n.$action||"merge";{var r;"merge"===a?o?(H&&P(!(r=n.type)||o.type===r,'Please set $action: "replace" to change `type`'),f(o,i,!0),xl(o,i,{ignoreSize:!0}),wl(n,o)):t[e]=i:"replace"===a?t[e]=i:"remove"===a&&o&&(t[e]=null)}}(i,e,n),t=i[e],e=n,t)&&(t.hv=e.hv=[CI(e,["left","right"]),CI(e,["top","bottom"])],"group"===t.type)&&(null==t.width&&(t.width=e.width=0),null==t.height)&&(t.height=e.height=0)},this);for(var a=i.length-1;0<=a;a--)null==i[a]?i.splice(a,1):delete i[a].$action},_flatten:function(t,n,i){Z(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)},useElOptionsToUpdate:function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t}});function AI(t,e,n,i){var o=n.type,o=(H&&P(o,"graphic type MUST be set"),Is[o.charAt(0).toUpperCase()+o.slice(1)]),o=(H&&P(o,"graphic type can not be found"),new o(n));e.add(o),i.set(t,o),o.__ecGraphicId=t}function DI(t,e){var n=t&&t.parent;n&&("group"===t.type&&t.traverse(function(t){DI(t,e)}),e.removeKey(t.__ecGraphicId),n.remove(t))}function CI(e,t){var n;return Z(t,function(t){null!=e[t]&&"auto"!==e[t]&&(n=!0)}),n}rd({type:"graphic",init:function(t,e){this._elMap=E(),this._lastGraphicModel},render:function(t,e,n){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,n)},_updateElements:function(s){var l,u,t=s.useElOptionsToUpdate();t&&(l=this._elMap,u=this.group,Z(t,function(t){var e,n=t.$action,i=t.id,o=l.get(i),a=t.parentId,a=null!=a?l.get(a):u,r=t.style,r=("text"===t.type&&r&&(t.hv&&t.hv[1]&&(r.textVerticalAlign=r.textBaseline=null),!r.hasOwnProperty("textFill")&&r.fill&&(r.textFill=r.fill),!r.hasOwnProperty("textStroke"))&&r.stroke&&(r.textStroke=r.stroke),e=O({},e=t),Z(["id","parentId","$action","hv","bounding"].concat(pl),function(t){delete e[t]}),e),n=(H&&o&&P(a===o.parent,"Changing parent is not supported."),n&&"merge"!==n?"replace"===n?(DI(o,l),AI(i,a,r,l)):"remove"===n&&DI(o,l):o?o.attr(r):AI(i,a,r,l),l.get(i));n&&(n.__ecGraphicWidth=t.width,n.__ecGraphicHeight=t.height,o=s,r=(a=n).eventData,r=a.silent||a.ignore?r:r||(a.eventData={componentType:"graphic",componentIndex:o.componentIndex,name:a.name}))&&(r.info=a.info)}))},_relocate:function(t,e){for(var n=t.option.elements,i=this.group,o=this._elMap,a=n.length-1;0<=a;a--){var r=n[a],s=o.get(r.id);s&&vl(s,r,(s=s.parent)===i?{width:e.getWidth(),height:e.getHeight()}:{width:s.__ecGraphicWidth||0,height:s.__ecGraphicHeight||0},null,{hv:r.hv,boundingMode:r.bounding})}},_clear:function(){var e=this._elMap;e.each(function(t){DI(t,e)}),this._elMap=E()},dispose:function(){this._clear()}}),t.Axis=og,t.List=Sd,t.Model=w,t.PRIORITY=pc,t.color=De,t.connect=function(e){var t;return D(e)&&(t=e,e=null,lc(t,function(t){null!=t.group&&(e=t.group)}),e=e||"g_"+Uc++,lc(t,function(t){t.group=e})),Xc[e]=!0,e},t.dataTool={},t.dependencies=dc,t.disConnect=qc,t.disconnect=o,t.dispose=function(t){"string"==typeof t?t=Zc[t]:t instanceof xc||(t=Kc(t)),t instanceof xc&&!t.isDisposed()&&t.dispose()},t.env=y,t.extendChartView=ld,t.extendComponentModel=ad,t.extendComponentView=rd,t.extendSeriesModel=sd,t.format=Go,t.getCoordinateSystemDimensions=function(t){if(t=eu.get(t))return t.getDimensionsInfo?t.getDimensionsInfo():t.dimensions.slice()},t.getInstanceByDom=Kc,t.getInstanceById=function(t){return Zc[t]},t.getMap=function(t){return(t=ac(t))&&t[0]&&{geoJson:t[0].geoJSON,specialAreas:t[0].specialAreas}},t.graphic=lg,t.helper=e,t.init=function(t,e,n){if(H){if(+io.replace(".","")<+dc.zrender.replace(".",""))throw new Error("zrender/src 4.0.7 is too old for ECharts 4.2.1. Current version need ZRender "+dc.zrender+"+");if(!t)throw new Error("Initialize failed: invalid dom.")}var i,o,a=Kc(t);return a?H&&console.warn("There is a chart instance already initialized on the dom."):(!H||!ot(t)||"CANVAS"===t.nodeName.toUpperCase()||(t.clientWidth||n&&null!=n.width)&&(t.clientHeight||n&&null!=n.height)||console.warn("Can't get dom width or height"),(a=new xc(t,e,n)).id="ec_"+Yc++,Zc[a.id]=a,Mo(t,jc,a.id),i=a,o="__connectUpdateStatus",lc(Rc,function(t,e){i._messageCenter.on(e,function(t){var e,n;!Xc[i.group]||0===i[o]||t&&t.escapeConnect||(e=i.makeActionFromEvent(t),n=[],lc(Zc,function(t){t!==i&&t.group===i.group&&n.push(t)}),r(n,0),lc(n,function(t){1!==t[o]&&t.dispatchAction(e)}),r(n,2))})})),a;function r(t,e){for(var n=0;n<t.length;n++)t[n][o]=e}},t.matrix=me,t.number=Bo,t.parseGeoJSON=jp,t.parseGeoJson=Rp,t.registerAction=s,t.registerCoordinateSystem=td,t.registerLayout=ed,t.registerLoading=od,t.registerMap=function(t,e,n){oc(t,e,n)},t.registerPostUpdate=function(t){Gc.push(t)},t.registerPreprocessor=Jc,t.registerProcessor=Qc,t.registerTheme=$c,t.registerVisual=nd,t.setCanvasCreator=function(t){j("createCanvas",t)},t.throttle=yh,t.util=sg,t.vector=Vt,t.version="4.2.1",t.zrender=hn});