移风店大屏前端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1 lines
664 KiB

!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?b=window.__DEV__:"undefined"!=typeof global&&(b=global.__DEV__);var A=b=void 0===b?!0:b,d=2311;var y="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasSupported:!0}:"undefined"==typeof navigator?{browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0}:function(t){var e={},n=t.match(/Firefox\/([\d.]+)/),i=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),o=t.match(/Edge\/([\d.]+)/),t=/micromessenger/i.test(t);n&&(e.firefox=!0,e.version=n[1]);i&&(e.ie=!0,e.version=i[1]);o&&(e.edge=!0,e.version=o[1]);t&&(e.weChat=!0);return{browser:e,os:{},node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!e.ie&&!e.edge,pointerEventsSupported:"onpointerdown"in window&&(e.edge||e.ie&&11<=e.version)}}(navigator.userAgent);var 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,b=Array.prototype,M=b.forEach,W=b.filter,F=b.slice,H=b.map,U=b.reduce,X={};function Y(t,e){"createCanvas"===t&&(q=null),X[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(!ft(t))for(var e=[],i=0,o=t.length;i<o;i++)e[i]=N(t[i])}else if(m[n]){if(!ft(t)){var a=t.constructor;if(t.constructor.from)e=a.from(t);else{e=new a(t.length);for(i=0,o=t.length;i<o;i++)e[i]=N(t[i])}}}else if(!g[n]&&!ft(t)&&!at(t))for(var r in e={},t)t.hasOwnProperty(r)&&(e[r]=N(t[r]));return e}function p(t,e,n){if(!T(e)||!T(t))return n?N(e):t;for(var i in e){var o,a;e.hasOwnProperty(i)&&(o=t[i],!T(a=e[i])||!T(o)||k(a)||k(o)||at(a)||at(o)||it(a)||it(o)||ft(a)||ft(o)?!n&&i in t||(t[i]=N(e[i])):p(o,a,n))}return t}function j(t,e){for(var n=t[0],i=1,o=t.length;i<o;i++)n=p(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 q,K=function(){return X.createCanvas()};function $(){return q=q||K().getContext("2d")}function f(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 E(t,e,n){if(t&&e)if(t.forEach&&t.forEach===M)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===H)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===U)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===W)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 D(t,e){var n=F.call(arguments,2);return function(){return t.apply(e,n.concat(F.call(arguments)))}}function L(t){var e=F.call(arguments,1);return function(){return t.apply(this,e.concat(F.call(arguments)))}}function k(t){return"[object Array]"===v.call(t)}function et(t){return"function"==typeof t}function nt(t){return"[object String]"===v.call(t)}function T(t){var e=typeof t;return"function"==e||!!t&&"object"==e}function it(t){return!!g[v.call(t)]}function ot(t){return!!m[v.call(t)]}function at(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}function rt(t){return t!=t}function st(t){for(var e=0,n=arguments.length;e<n;e++)if(null!=arguments[e])return arguments[e]}function lt(t,e){return null!=t?t:e}function ht(t,e,n){return null!=t?t:null!=e?e:n}function ut(){return Function.call.apply(F,arguments)}function ct(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 x(t,e){if(!t)throw new Error(e)}function dt(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}X.createCanvas=function(){return document.createElement("canvas")};var pt="__ec_primitive__";function gt(t){t[pt]=!0}function ft(t){return t[pt]}function mt(t){var n=k(t),i=this;function e(t,e){n?i.set(t,e):i.set(e,t)}t instanceof mt?t.each(e):t&&E(t,e)}function P(t){return new mt(t)}function yt(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 vt(){}mt.prototype={constructor:mt,get:function(t){return this.hasOwnProperty(t)?this[t]:null},set:function(t,e){return this[t]=e},each:function(t,e){for(var n in void 0!==e&&(t=D(t,e)),this)this.hasOwnProperty(n)&&t(this[n],n)},removeKey:function(t){delete this[t]}};var xt=Object.freeze({__proto__:null,$override:Y,assert:x,bind:D,clone:N,concatArray:yt,createCanvas:K,createHashMap:P,curry:L,defaults:C,each:E,eqNaN:rt,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:f,inherits:a,isArray:k,isArrayLike:J,isBuiltInObject:it,isDom:at,isFunction:et,isObject:T,isPrimitive:ft,isString:nt,isTypedArray:ot,map:I,merge:p,mergeAll:j,mixin:i,noop:vt,normalizeCssArray:ct,reduce:Q,retrieve:st,retrieve2:lt,retrieve3:ht,setAsPrimitive:gt,slice:ut,trim:dt}),_t="undefined"==typeof Float32Array?Array:Float32Array;function wt(t,e){var n=new _t(2);return null==e&&(e=0),n[0]=t=null==t?0:t,n[1]=e,n}function bt(t,e){return t[0]=e[0],t[1]=e[1],t}function St(t){var e=new _t(2);return e[0]=t[0],e[1]=t[1],e}function Mt(t,e,n){return t[0]=e,t[1]=n,t}function It(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function Tt(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t}function Dt(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function At(t){return Math.sqrt(Ct(t))}function Ct(t){return t[0]*t[0]+t[1]*t[1]}function Lt(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function kt(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 Pt(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var Nt=Pt;function Ot(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var Et=Ot;function zt(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 Rt(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 Bt(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function Vt(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}b=Object.freeze({__proto__:null,add:It,applyTransform:Rt,clone:St,copy:bt,create:wt,dist:Nt,distSquare:Et,distance:Pt,distanceSquare:Ot,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:Ct,length:At,lengthSquare:Ct,lerp:zt,max:Vt,min:Bt,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:kt,scale:Lt,scaleAndAdd:Tt,set:Mt,sub:Dt});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 Wt(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(Wt(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(Wt(a,t),"drag",t.event),i=this.findHover(e,n,a).target,o=this._dropTarget,a!==(this._dropTarget=i))&&(o&&i!==o&&this.dispatchToElement(Wt(o,t),"dragleave",t.event),i)&&i!==o&&this.dispatchToElement(Wt(i,t),"dragenter",t.event)},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.dispatchToElement(Wt(e,t),"dragend",t.event),this._dropTarget&&this.dispatchToElement(Wt(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null}};function Ft(){this._$handlers={}}var Ht=Array.prototype.slice;Ft.prototype={constructor:Ft,one:function(t,e,n){var i=this._$handlers;if(e&&t){i[t]||(i[t]=[]);for(var o=0;o<i[t].length;o++)if(i[t][o].h===e)return this;i[t].push({h:e,one:!0,ctx:n||this})}return this},on:function(t,e,n){var i=this._$handlers;if(e&&t){i[t]||(i[t]=[]);for(var o=0;o<i[t].length;o++)if(i[t][o].h===e)return this;i[t].push({h:e,one:!1,ctx:n||this})}return this},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){if(this._$handlers[t])for(var e=arguments,n=e.length,i=(3<n&&(e=Ht.call(e,1)),this._$handlers[t]),o=i.length,a=0;a<o;){switch(n){case 1:i[a].h.call(i[a].ctx);break;case 2:i[a].h.call(i[a].ctx,e[1]);break;case 3:i[a].h.call(i[a].ctx,e[1],e[2]);break;default:i[a].h.apply(i[a].ctx,e)}i[a].one?(i.splice(a,1),o--):a++}return this},triggerWithContext:function(t){if(this._$handlers[t])for(var e=arguments,n=e.length,i=(e=4<n?Ht.call(e,1,e.length-1):e)[e.length-1],o=this._$handlers[t],a=o.length,r=0;r<a;){switch(n){case 1:o[r].h.call(i);break;case 2:o[r].h.call(i,e[1]);break;case 3:o[r].h.call(i,e[1],e[2]);break;default:o[r].h.apply(i,e)}o[r].one?(o.splice(r,1),a--):r++}return this}};function Zt(){}Zt.prototype.dispose=function(){};function Ut(t,e,n,i){Ft.call(this),this.storage=t,this.painter=e,this.painterRoot=i,n=n||new Zt,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,Gt.call(this),this.setHandlerProxy(n)}var Xt=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"];Ut.prototype={constructor:Ut,setHandlerProxy:function(e){this.proxy&&this.proxy.dispose(),e&&(E(Xt,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};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}},E(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(i){Ut.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<Nt(this._downPoint,[t.zrX,t.zrY]))return;this._downPoint=null}this.dispatchToElement(e,i,t)}}),i(Ut,Ft),i(Ut,Gt);var Yt="undefined"==typeof Float32Array?Array:Float32Array;function jt(){var t=new Yt(6);return qt(t),t}function qt(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function Kt(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 $t(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 Jt(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 Qt(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 te(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 ee(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 ne(t){var e=jt();return Kt(e,t),e}var ie=Object.freeze({__proto__:null,clone:ne,copy:Kt,create:jt,identity:qt,invert:ee,mul:$t,rotate:Qt,scale:te,translate:Jt}),oe=qt;function ae(t){return 5e-5<t||t<-5e-5}function re(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 se=re.prototype,le=(se.transform=null,se.needLocalTransform=function(){return ae(this.rotation)||ae(this.position[0])||ae(this.position[1])||ae(this.scale[0]-1)||ae(this.scale[1]-1)},se.updateTransform=function(){var t=this.parent,e=t&&t.transform,n=this.needLocalTransform(),i=this.transform;n||e?(i=i||jt(),n?this.getLocalTransform(i):oe(i),e&&(n?$t(i,t.transform,i):Kt(i,t.transform)),this.transform=i,this.invTransform=this.invTransform||jt(),ee(this.invTransform,i)):i&&oe(i)},se.getLocalTransform=function(t){return re.getLocalTransform(this,t)},se.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)},se.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)},[]),he=(se.decomposeTransform=function(){var t,e,n,i,o;this.transform&&(e=this.parent,t=this.transform,e&&e.transform&&($t(le,e.invTransform,t),t=le),e=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3],i=this.position,o=this.scale,ae(e-1)&&(e=Math.sqrt(e)),ae(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))},se.getGlobalScale=function(){var t,e,n=this.transform;return n?(t=Math.sqrt(n[0]*n[0]+n[1]*n[1]),e=Math.sqrt(n[2]*n[2]+n[3]*n[3]),[t=n[0]<0?-t:t,e=n[3]<0?-e:e]):[1,1]},se.transformCoordToLocal=function(t,e){t=[t,e],e=this.invTransform;return e&&Rt(t,t,e),t},se.transformCoordToGlobal=function(t,e){t=[t,e],e=this.transform;return e&&Rt(t,t,e),t},re.getLocalTransform=function(t,e){oe(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]),te(e,e,i),o&&Qt(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-he.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*he.bounceIn(2*t):.5*he.bounceOut(2*t-1)+.5}});function ue(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}ue.prototype={constructor:ue,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)?he[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 ce(){this.head=null,this.tail=null,this._len=0}function de(t){this._list=new ce,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null}var se=ce.prototype,pe=(se.insert=function(t){t=new pe(t);return this.insertEntry(t),t},se.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++},se.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--},se.len=function(){return this._len},se.clear=function(){this.head=this.tail=null,this._len=0},function(t){this.value=t,this.next,this.prev}),se=de.prototype,ge=(se.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 pe(e),n.key=t,o.insertEntry(n),a[t]=n),r},se.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},se.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 fe(t){return(t=Math.round(t))<0?0:255<t?255:t}function me(t){return t<0?0:1<t?1:t}function ye(t){return t.length&&"%"===t.charAt(t.length-1)?fe(parseFloat(t)/100*255):fe(parseInt(t,10))}function ve(t){return t.length&&"%"===t.charAt(t.length-1)?me(parseFloat(t)/100):me(parseFloat(t))}function xe(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 _e(t,e,n){return t+(e-t)*n}function we(t,e,n,i,o){t[0]=e,t[1]=n,t[2]=i,t[3]=o}function be(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var Se=new de(20),Me=null;function Ie(t,e){Me&&be(Me,e),Me=Se.put(t,Me||e.slice())}function Te(t,e){if(t){e=e||[];var n=Se.get(t);if(n)return be(e,n);n=(t+="").replace(/ /g,"").toLowerCase();if(n in ge)return be(e,ge[n]),Ie(t,e),e;if("#"===n.charAt(0))return 4===n.length?0<=(i=parseInt(n.substr(1),16))&&i<=4095?(we(e,(3840&i)>>4|(3840&i)>>8,240&i|(240&i)>>4,15&i|(15&i)<<4,1),Ie(t,e),e):void we(e,0,0,0,1):7===n.length?0<=(i=parseInt(n.substr(1),16))&&i<=16777215?(we(e,(16711680&i)>>16,(65280&i)>>8,255&i,1),Ie(t,e),e):void we(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 we(e,0,0,0,1);s=ve(r.pop());case"rgb":return 3!==r.length?void we(e,0,0,0,1):(we(e,ye(r[0]),ye(r[1]),ye(r[2]),s),Ie(t,e),e);case"hsla":return 4!==r.length?void we(e,0,0,0,1):(r[3]=ve(r[3]),De(r,e),Ie(t,e),e);case"hsl":return 3!==r.length?void we(e,0,0,0,1):(De(r,e),Ie(t,e),e);default:return}}we(e,0,0,0,1)}}function De(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=ve(t[1]),o=ve(t[2]),i=o<=.5?o*(i+1):o+i-o*i,o=2*o-i;return we(e=e||[],fe(255*xe(o,i,n+1/3)),fe(255*xe(o,i,n)),fe(255*xe(o,i,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function Ae(t,e){var n=Te(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 Oe(n,4===n.length?"rgba":"rgb")}}function Ce(t){t=Te(t);if(t)return((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)}function Le(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]=fe(_e(o[0],e[0],a=t-i)),n[1]=fe(_e(o[1],e[1],a)),n[2]=fe(_e(o[2],e[2],a)),n[3]=me(_e(o[3],e[3],a)),n}function ke(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=Te(e[i]),e=Te(e[o]),r=Oe([fe(_e(r[0],e[0],a=t-i)),fe(_e(r[1],e[1],a)),fe(_e(r[2],e[2],a)),me(_e(r[3],e[3],a))],"rgba"),n?{color:r,leftIndex:i,rightIndex:o,value:t}:r}function Pe(t,e,n,i){if(t=Te(t))return t=function(t){var e,n,i,o,a,r,s,l,h,u;if(t)return u=t[0]/255,e=t[1]/255,n=t[2]/255,s=Math.min(u,e,n),o=((i=Math.max(u,e,n))+s)/2,0==(h=i-s)?r=a=0:(r=o<.5?h/(i+s):h/(2-i-s),s=((i-u)/6+h/2)/h,l=((i-e)/6+h/2)/h,h=((i-n)/6+h/2)/h,u===i?a=h-l:e===i?a=1/3+s-h:n===i&&(a=2/3+l-s),a<0&&(a+=1),1<a&&--a),u=[360*a,r,o],null!=t[3]&&u.push(t[3]),u}(t),null!=e&&(t[0]=(e=e,(e=Math.round(e))<0?0:360<e?360:e)),null!=n&&(t[1]=ve(n)),null!=i&&(t[2]=ve(i)),Oe(De(t),"rgba")}function Ne(t,e){if((t=Te(t))&&null!=e)return t[3]=me(e),Oe(t,"rgba")}function Oe(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 se=Object.freeze({__proto__:null,fastLerp:Le,fastMapToColor:Le,lerp:ke,lift:Ae,mapToColor:ke,modifyAlpha:Ne,modifyHSL:Pe,parse:Te,stringify:Oe,toHex:Ce}),Ee=Array.prototype.slice;function ze(t,e){return t[e]}function Re(t,e,n){t[e]=n}function Be(t,e,n){return(e-t)*n+t}function Ve(t,e,n,i,o){var a=t.length;if(1==o)for(var r=0;r<a;r++)i[r]=Be(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]=Be(t[r][l],e[r][l],n)}function Ge(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]:Ee.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 We(t,e,n,i,o,a,r,s,l){var h=t.length;if(1==l)for(var u=0;u<h;u++)s[u]=Fe(t[u],e[u],n[u],i[u],o,a,r);else for(var c=t[0].length,u=0;u<h;u++)for(var d=0;d<c;d++)s[u][d]=Fe(t[u][d],e[u][d],n[u][d],i[u][d],o,a,r)}function Fe(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 He(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}function Ze(t,e,n,i,a,o){var r=t._getter,s=t._setter,l="spline"===e,h=i.length;if(h){for(var u,c=J(i[0].value),d=!1,p=!1,g=c?J((k=(k=i)[k.length-1].value)&&k[0])?2:1:0,f=(i.sort(function(t,e){return t.time-e.time}),u=i[h-1].time,[]),m=[],y=i[0].value,v=!0,x=0;x<h;x++){f.push(i[x].time/u);var _,w=i[x].value;c&&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,g)||!c&&w===y||(v=!1),"string"==typeof(y=w)&&((_=Te(w))?(w=_,d=!0):p=!0),m.push(w)}if(o||!v){for(var b=m[h-1],x=0;x<h-1;x++)c?Ge(m[x],b,g):!isNaN(m[x])||isNaN(b)||p||d||(m[x]=b);c&&Ge(r(t._target,a),b,g);var S,M,I,T,D,A,C=0,L=0,k=(d&&(A=[0,0,0,0]),new ue({target:t._target,life:u,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,h-1);0<=n&&!(f[n]<=e);n--);n=Math.min(n,h-2)}else{for(n=C;n<h&&!(e<f[n]);n++);n=Math.min(n-1,h-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[h-2<n?h-1:n+1],D=m[h-3<n?h-1:n+2],c)We(M,I,T,D,S,S*S,S*S*S,r(t,a),g);else{if(d)i=We(M,I,T,D,S,S*S,S*S*S,A,1),i=He(A);else{if(p)return.5<S?T:I;i=Fe(M,I,T,D,S,S*S,S*S*S)}s(t,a,i)}else if(c)Ve(m[n],m[n+1],S,r(t,a),g);else{if(d)Ve(m[n],m[n+1],S,A,1),i=He(A);else{if(p)return.5<S?m[n+1]:m[n];i=Be(m[n],m[n+1],S)}s(t,a,i)}},ondestroy:n}));return e&&"spline"!==e&&(k.easing=e),k}}}function Ue(t,e,n,i){this._tracks={},this._target=t,this._loop=e||!1,this._getter=n||ze,this._setter=i||Re,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]}function Xe(){this.animators=[]}function Ye(t){re.call(this,t),Ft.call(this,t),Xe.call(this,t),this.id=t.id||d++}Ue.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(Ee.call(t[i]));return n}return Ee.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=Ze(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 je,qe,Ke,$e,Je=1,Qe=Je="undefined"!=typeof window?Math.max(window.devicePixelRatio||1,1):Je,tn=(Ye.prototype={type:"element",name:"",__zr:null,ignore:!(Xe.prototype={constructor:Xe,animate:function(t,e){var n,i,o,a=!1,r=this,s=this.__zr;if(t){for(var l=t.split("."),h=r,a="shape"===l[0],u=0,c=l.length;u<c;u++)h=h&&h[l[u]];h&&(n=h)}else n=r;if(n)return i=r.animators,(o=new Ue(n,e)).during(function(t){r.dirty(a)}).done(function(){i.splice(f(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){nt(n)?(o=i,i=n,n=0):et(i)?(o=i,i="linear",n=0):et(n)?(o=n,n=0):e=et(e)?(o=e,500):e||500,this.stopAnimation(),this._animateToShallow("",this,t,e,n);var r=this.animators.slice(),s=r.length;function l(){--s||o&&o()}s||o&&o();for(var h=0;h<r.length;h++)r[h].done(l).start(i,a)},_animateToShallow:function(t,e,n,i,o){var a,r,s={},l=0;for(a in n)n.hasOwnProperty(a)&&(null!=e[a]?T(n[a])&&!J(n[a])?this._animateToShallow(t?t+"."+a:a,e[a],n[a],i,o):(s[a]=n[a],l++):null!=n[a]&&(t?((r={})[t]={},r[t][a]=n[a],this.attr(r)):this.attr(a,n[a])));return 0<l&&this.animate(t,!1).when(null==i?500:i,s).delay(o||0),this}}),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(T(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(Ye,Xe),i(Ye,re),i(Ye,Ft),Rt),en=Math.min,nn=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=en(t.x,this.x),n=en(t.y,this.y);this.width=nn(t.x+t.width,this.x+this.width)-e,this.height=nn(t.y+t.height,this.y+this.height)-n,this.x=e,this.y=n},applyTransform:(je=[],qe=[],Ke=[],$e=[],function(t){var e;t&&(je[0]=Ke[0]=this.x,je[1]=$e[1]=this.y,qe[0]=$e[0]=this.x+this.width,qe[1]=Ke[1]=this.y+this.height,tn(je,je,t),tn(qe,qe,t),tn(Ke,Ke,t),tn($e,$e,t),this.x=en(je[0],qe[0],Ke[0],$e[0]),this.y=en(je[1],qe[1],Ke[1],$e[1]),t=nn(je[0],qe[0],Ke[0],$e[0]),e=nn(je[1],qe[1],Ke[1],$e[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=jt();return Jt(i,i,[-this.x,-this.y]),te(i,i,[e,n]),Jt(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 z=function(t){for(var e in Ye.call(this,t=t||{}),t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0},on=(z.prototype={constructor:z,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 z)&&t.addChildrenToStorage(e),n&&n.refresh()},remove:function(t){var e=this.__zr,n=this.__storage,i=this._children,o=f(i,t);return o<0||(i.splice(o,1),t.parent=null,n&&(n.delFromStorage(t),t instanceof z)&&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 z)&&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 z&&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 z&&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(z,Ye),32),an=7;function rn(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 sn(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 h=i-s;switch(h){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<h;)t[s+h]=t[s+h-1],h--}t[s]=r}}function ln(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 h=r+(l-r>>>1);0<a(t,e[n+h])?r=h+1:l=h}return l}function hn(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 h=r,r=o-(l=s<l?s:l),l=o-h}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 u=r+(l-r>>>1);a(t,e[n+u])<0?l=u:r=u+1}return l}function un(L,k){var P,N,O=an,E=0,z=(L.length,[]);function e(t){var e=P[t],n=N[t],i=P[t+1],o=N[t+1],t=(N[t]=n+o,t===E-3&&(P[t+1]=P[t+2],N[t+1]=N[t+2]),E--,hn(L[i],L,e,n,0,k));if(e+=t,0!=(n-=t)&&0!==(o=ln(L[e+n-1],L,i,o,o-1,k)))if(n<=o){var a=e,r=n,t=i,s=o,l=0;for(l=0;l<r;l++)z[l]=L[a+l];var h=0,u=t,c=a;if(L[c++]=L[u++],0==--s)for(l=0;l<r;l++)L[c+l]=z[h+l];else if(1===r){for(l=0;l<s;l++)L[c+l]=L[u+l];L[c+s]=z[h]}else{for(var d,p,g,f=O;;){p=d=0,g=!1;do{if(k(L[u],z[h])<0){if(L[c++]=L[u++],p++,(d=0)==--s){g=!0;break}}else if(L[c++]=z[h++],d++,p=0,1==--r){g=!0;break}}while((d|p)<f);if(g)break;do{if(0!==(d=hn(L[u],z,h,r,0,k))){for(l=0;l<d;l++)L[c+l]=z[h+l];if(c+=d,h+=d,(r-=d)<=1){g=!0;break}}if(L[c++]=L[u++],0==--s){g=!0;break}if(0!==(p=ln(z[h],L,u,s,0,k))){for(l=0;l<p;l++)L[c+l]=L[u+l];if(c+=p,u+=p,0===(s-=p)){g=!0;break}}if(L[c++]=z[h++],1==--r){g=!0;break}}while(f--,an<=d||an<=p);if(g)break;f<0&&(f=0),f+=2}if((O=f)<1&&(O=1),1===r){for(l=0;l<s;l++)L[c+l]=L[u+l];L[c+s]=z[h]}else{if(0===r)throw new Error;for(l=0;l<r;l++)L[c+l]=z[h+l]}}}else{var m=e,y=n,v=i,x=o,_=0;for(_=0;_<x;_++)z[_]=L[v+_];var w=m+y-1,b=x-1,S=v+x-1,M=0,I=0;if(L[S--]=L[w--],0==--y)for(M=S-(x-1),_=0;_<x;_++)L[M+_]=z[_];else if(1===x){for(I=(S-=y)+1,M=(w-=y)+1,_=y-1;0<=_;_--)L[I+_]=L[M+_];L[S]=z[b]}else{for(var T=O;;){var D=0,A=0,C=!1;do{if(k(z[b],L[w])<0){if(L[S--]=L[w--],D++,(A=0)==--y){C=!0;break}}else if(L[S--]=z[b--],A++,D=0,1==--x){C=!0;break}}while((D|A)<T);if(C)break;do{if(0!==(D=y-hn(z[b],L,m,y,y-1,k))){for(y-=D,I=(S-=D)+1,M=(w-=D)+1,_=D-1;0<=_;_--)L[I+_]=L[M+_];if(0===y){C=!0;break}}if(L[S--]=z[b--],1==--x){C=!0;break}if(0!==(A=x-ln(L[w],z,0,x,x-1,k))){for(x-=A,I=(S-=A)+1,M=(b-=A)+1,_=0;_<A;_++)L[I+_]=z[M+_];if(x<=1){C=!0;break}}if(L[S--]=L[w--],0==--y){C=!0;break}}while(T--,an<=D||an<=A);if(C)break;T<0&&(T=0),T+=2}if((O=T)<1&&(O=1),1===x){for(I=(S-=y)+1,M=(w-=y)+1,_=y-1;0<=_;_--)L[I+_]=L[M+_];L[S]=z[b]}else{if(0===x)throw new Error;for(M=S-(x-1),_=0;_<x;_++)L[M+_]=z[_]}}}}P=[],N=[],this.mergeRuns=function(){for(;1<E;){var t=E-2;if(1<=t&&N[t-1]<=N[t]+N[t+1]||2<=t&&N[t-2]<=N[t]+N[t-1])N[t-1]<N[t+1]&&t--;else if(N[t]>N[t+1])break;e(t)}},this.forceMergeRuns=function(){for(;1<E;){var t=E-2;0<t&&N[t-1]<N[t+1]&&t--,e(t)}},this.pushRun=function(t,e){P[E]=t,N[E]=e,E+=1}}function cn(t,e,n,i){var o=(i=i||t.length)-(n=n||0);if(!(o<2)){var a=0;if(o<on)sn(t,n,i,n+(a=rn(t,n,i,e)),e);else{var r,s=new un(t,e),l=function(t){for(var e=0;on<=t;)e|=1&t,t>>=1;return t+e}(o);do{}while((a=rn(t,n,i,e))<l&&(sn(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 dn(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}function pn(){this._roots=[],this._displayList=[],this._displayListLen=0}var gn={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1};function fn(t,e,n){return gn.hasOwnProperty(e)?n*t.dpr:n}function mn(t,e){this.extendFrom(t,!1),this.host=e}var yn=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function vn(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)}function xn(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)}for(var _n=mn.prototype={constructor:mn,host:null,fill:"#000",stroke:null,opacity:1,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!(pn.prototype={constructor:pn,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,dn)},_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 z&&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 z&&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=f(this._roots,t);0<=o&&(this.delFromStorage(t),this._roots.splice(o,1),t instanceof z)&&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:dn}),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){for(var i=this,o=n&&n.style,a=!o,r=0;r<yn.length;r++){var s=yn[r],l=s[0];!a&&i[l]===o[l]||(t[l]=fn(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?xn:vn)(t,e,n),o=e.colorStops,a=0;a<o.length;a++)i.addColorStop(o[a].offset,o[a].color);return i}},wn=0;wn<yn.length;wn++){var bn=yn[wn];bn[0]in _n||(_n[bn[0]]=bn[1])}mn.getGradient=_n.getGradient;function Sn(t,e){this.image=t,this.repeat=e,this.type="pattern"}function Mn(){return!1}function In(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 Tn(t,e,n){var i;n=n||Qe,"string"==typeof t?i=In(t,e,n):T(t)&&(t=(i=t).id),this.id=t,(t=(this.dom=i).style)&&(i.onselectstart=Mn,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}Tn.prototype={constructor:Tn,__dirty:!0,__used:!(Sn.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=In("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,e=e||this.clearColor,t=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||mn.getGradient(o,e,{x:0,y:0,width:a,height:r}),e.__canvasGradient=n):e.image&&(n=Sn.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 Dn="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){setTimeout(t,16)},An=new de(50);function Cn(t,e,n,i,o){return t?"string"==typeof t?(e&&e.__zrImageSrc===t||!n||(n={hostEl:n,cb:i,cbPayload:o},(i=An.get(t))?kn(e=i.image)||i.pending.push(n):((e=e||new Image).onload=Ln,An.put(t,e.__cachedImgObj={image:e,pending:[n]}),e.src=e.__zrImageSrc=t)),e):t:e}function Ln(){var t=this.__cachedImgObj;this.onload=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 kn(t){return t&&t.width&&t.height}var Pn={},Nn=0,On=5e3,En=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,zn="12px sans-serif",Rn={};function Bn(t,e){var n=t+":"+(e=e||zn);if(Pn[n])return Pn[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,Rn.measureText(i,o)).width,r);return On<Nn&&(Nn=0,Pn={}),Nn++,Pn[n]=r}function Vn(t,e,n,i,o,a,r){var s,l,h,u,c,d;return a?(l=i,a=(u=Yn(u=t,{rich:a=a,truncate:s=r,font:h=e,textAlign:c=n,textPadding:d=o})).outerWidth,s=u.outerHeight,h=Gn(0,a,c),d=Wn(0,s,l),new Z(h,d,a,s)):(u=n,c=i,a=Xn(l=t,h=e,d=o,a=r),l=Bn(l,h),d&&(l+=d[1]+d[3]),h=a.outerHeight,d=Gn(0,l,u),u=Wn(0,h,c),(c=new Z(d,u,l,h)).lineHeight=a.lineHeight,c)}function Gn(t,e,n){return"right"===n?t-=e:"center"===n&&(t-=e/2),t}function Wn(t,e,n){return"middle"===n?t-=e/2:"bottom"===n&&(t-=e),t}function Fn(t,e,n,i,o){if(!e)return"";var a=(t+"").split("\n");o=Hn(e,n,i,o);for(var r=0,s=a.length;r<s;r++)a[r]=Zn(a[r],o);return a.join("\n")}function Hn(t,e,n,i){(i=O({},i)).font=e;for(var n=lt(n,"..."),o=(i.maxIterations=lt(i.maxIterations,2),i.minChar=lt(i.minChar,0)),a=(i.cnCharWidth=Bn("国",e),i.ascCharWidth=Bn("a",e)),r=(i.placeholder=lt(i.placeholder,""),t=Math.max(0,t-1)),s=0;s<o&&a<=r;s++)r-=a;e=Bn(n);return r<e&&(n="",e=0),r=t-e,i.ellipsis=n,i.ellipsisWidth=e,i.contentWidth=r,i.containerWidth=t,i}function Zn(t,e){var n=e.containerWidth,i=e.font,o=e.contentWidth;if(!n)return"";var a=Bn(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=Bn(t=t.substr(0,s),i)}""===t&&(t=e.placeholder)}return t}function Un(t){return Bn("国",t)}function Xn(t,e,n,i){null!=t&&(t+="");var o=Un(e),a=t?t.split("\n"):[],r=a.length*o,s=r;if(n&&(s+=n[0]+n[2]),t&&i){var l=i.outerHeight,h=i.outerWidth;if(null!=l&&l<s)t="",a=[];else if(null!=h)for(var u=Hn(h-(n?n[1]+n[3]:0),e,i.ellipsis,{minChar:i.minChar,placeholder:i.placeholder}),c=0,d=a.length;c<d;c++)a[c]=Zn(a[c],u)}return{lines:a,height:r,outerHeight:s,lineHeight:o}}function Yn(t,e){var n={lines:[],width:0,height:0};if(null!=t&&(t+=""),t){for(var i,o=En.lastIndex=0;null!=(i=En.exec(t));){var a=i.index;o<a&&jn(n,t.substring(o,a)),jn(n,i[2],i[1]),o=En.lastIndex}o<t.length&&jn(n,t.substring(o,t.length));var r=n.lines,s=0,l=0,h=[],u=e.textPadding,c=e.truncate,d=c&&c.outerWidth,p=c&&c.outerHeight;u&&(null!=d&&(d-=u[1]+u[3]),null!=p)&&(p-=u[0]+u[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=(A=f.tokens[v]).styleName&&e.rich[A.styleName]||{},_=A.textPadding=x.textPadding,w=A.font=x.font||e.font,b=A.textHeight=lt(x.textHeight,Un(w));if(_&&(b+=_[0]+_[2]),A.height=b,A.lineHeight=ht(x.textLineHeight,e.textLineHeight,b),A.textAlign=x&&x.textAlign||e.textAlign,A.textVerticalAlign=x&&x.textVerticalAlign||"middle",null!=p&&s+A.lineHeight>p)return{lines:[],width:0,height:0};A.textWidth=Bn(A.text,w);var S,M,I,T=x.textWidth,D=null==T||"auto"===T;"string"==typeof T&&"%"===T.charAt(T.length-1)?(A.percentWidth=T,h.push(A),T=0):(D&&(T=A.textWidth,S=(S=x.textBackgroundColor)&&S.image)&&(M=void 0,kn(S="string"==typeof(I=S)?(M=An.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&&(!D||I<M?(A.text="",A.textWidth=T=0):(A.text=Fn(A.text,I-M,w,c.ellipsis,{minChar:c.minChar}),A.textWidth=Bn(A.text,w),T=A.textWidth+M))),y+=A.width=T,x&&(m=Math.max(m,A.lineHeight))}f.width=y,s+=f.lineHeight=m,l=Math.max(l,y)}n.outerWidth=n.width=lt(e.textWidth,l),n.outerHeight=n.height=lt(e.textHeight,s),u&&(n.outerWidth+=u[1]+u[3],n.outerHeight+=u[0]+u[2]);for(g=0;g<h.length;g++){var A,C=(A=h[g]).percentWidth;A.width=parseInt(C,10)/100*l}}return n}function jn(t,e,n){for(var i=""===e,o=e.split("\n"),a=t.lines,r=0;r<o.length;r++){var s,l,h=o[r],u={styleName:n,text:h,isLineHolder:!h&&!i};r?a.push({tokens:[u]}):1===(l=(s=(a[a.length-1]||(a[0]={tokens:[]})).tokens).length)&&s[0].isLineHolder?s[0]=u:!h&&l&&!i||s.push(u)}}function qn(t){var e=(t.fontSize||t.fontFamily)&&[t.fontStyle,t.fontWeight,(t.fontSize||12)+"px",t.fontFamily||"sans-serif"].join(" ");return e&&dt(e)||t.textFont||t.font}function Kn(t,e){var n,i,o,a,r,s=e.x,l=e.y,h=e.width,u=e.height,e=e.r;h<0&&(s+=h,h=-h),u<0&&(l+=u,u=-u),"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,h<n+i&&(n*=h/(r=n+i),i*=h/r),h<o+a&&(o*=h/(r=o+a),a*=h/r),u<i+o&&(i*=u/(r=i+o),o*=u/r),u<n+a&&(n*=u/(r=n+a),a*=u/r),t.moveTo(s+n,l),t.lineTo(s+h-i,l),0!==i&&t.arc(s+h-i,l+i,i,-Math.PI/2,0),t.lineTo(s+h,l+u-o),0!==o&&t.arc(s+h-o,l+u-o,o,0,Math.PI/2),t.lineTo(s+a,l+u),0!==a&&t.arc(s+a,l+u-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)}Rn.measureText=function(t,e){var n=$();return n.font=e||zn,n.measureText(t)};var $n={left:1,right:1,center:1},Jn={top:1,bottom:1,middle:1};function Qn(t){ti(t),E(t.rich,ti)}function ti(t){var e;t&&(t.font=qn(t),e=t.textAlign,t.textAlign=null==(e="middle"===e?"center":e)||$n[e]?e:"left",e=t.textVerticalAlign||t.textBaseline,t.textVerticalAlign=null==(e="center"===e?"middle":e)||Jn[e]?e:"top",t.textPadding)&&(t.textPadding=ct(t.textPadding))}function ei(t,e,n,i,o){(i.rich?function(t,e,n,i,o){var a=t.__textCotentBlock;a&&!t.__dirty||(a=t.__textCotentBlock=Yn(n,i));!function(t,e,n,i,o){var a=n.width,r=n.outerWidth,s=n.outerHeight,l=i.textPadding,h=si(0,i,o),u=h.baseX,c=h.baseY,d=h.textAlign,h=h.textVerticalAlign,o=(ni(e,i,o,u,c),Gn(u,r,d)),u=Wn(c,s,h),p=o,g=u;l&&(p+=l[3],g+=l[0]);var f=p+a;oi(i)&&ai(t,e,i,o,u,r,s);for(var m,y=0;y<n.lines.length;y++){for(var v=n.lines[y],x=v.tokens,_=x.length,w=v.lineHeight,b=v.width,S=0,M=p,I=f,T=_-1;S<_&&(!(m=x[S]).textAlign||"left"===m.textAlign);)ii(t,e,m,i,w,g,M,"left"),b-=m.width,M+=m.width,S++;for(;0<=T&&"right"===(m=x[T]).textAlign;)ii(t,e,m,i,w,g,I,"right"),b-=m.width,I-=m.width,T--;for(M+=(a-(M-p)-(f-I)-b)/2;S<=T;)m=x[S],ii(t,e,m,i,w,g,M+m.width/2,"center"),M+=m.width,S++;g+=w}}(t,e,a,i,o)}:function(t,e,n,i,o){var a=_(e,"font",i.font||zn),r=i.textPadding,s=t.__textCotentBlock;s&&!t.__dirty||(s=t.__textCotentBlock=Xn(n,a,r,i.truncate));var l=s.outerHeight,h=s.lines,u=s.lineHeight,s=si(0,i,o),c=s.baseX,d=s.baseY,p=s.textAlign,s=s.textVerticalAlign,o=(ni(e,i,o,c,d),Wn(d,l,s)),g=c,f=o,d=oi(i);(d||r)&&(s=Bn(n,a),r&&(s+=r[1]+r[3]),n=Gn(c,s,p),d&&ai(t,e,i,n,o,s,l),r)&&(g=ci(c,p,r),f+=r[0]);_(e,"textAlign",p||"left"),_(e,"textBaseline","middle"),_(e,"shadowBlur",i.textShadowBlur||0),_(e,"shadowColor",i.textShadowColor||"transparent"),_(e,"shadowOffsetX",i.textShadowOffsetX||0),_(e,"shadowOffsetY",i.textShadowOffsetY||0),f+=u/2;var a=i.textStrokeWidth,m=li(i.textStroke,a),y=hi(i.textFill);m&&(_(e,"lineWidth",a),_(e,"strokeStyle",m));y&&_(e,"fillStyle",y);for(var v=0;v<h.length;v++)m&&e.strokeText(h[v],g,f),y&&e.fillText(h[v],g,f),f+=u})(t,e,n,i,o)}function ni(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 ii(t,e,n,i,o,a,r,s){var l=i.rich[n.styleName]||{},h=n.textVerticalAlign,u=a+o/2,h=("top"===h?u=a+n.height/2:"bottom"===h&&(u=a+o-n.height/2),!n.isLineHolder&&oi(l)&&ai(t,e,l,"right"===s?r-n.width:"center"===s?r-n.width/2:r,u-n.height/2,n.width,n.height),n.textPadding),a=(h&&(r=ci(r,s,h),u-=n.height/2-h[2]-n.textHeight/2),_(e,"shadowBlur",ht(l.textShadowBlur,i.textShadowBlur,0)),_(e,"shadowColor",l.textShadowColor||i.textShadowColor||"transparent"),_(e,"shadowOffsetX",ht(l.textShadowOffsetX,i.textShadowOffsetX,0)),_(e,"shadowOffsetY",ht(l.textShadowOffsetY,i.textShadowOffsetY,0)),_(e,"textAlign",s),_(e,"textBaseline","middle"),_(e,"font",n.font||zn),li(l.textStroke||i.textStroke,void 0)),o=hi(l.textFill||i.textFill),t=lt(l.textStrokeWidth,i.textStrokeWidth);a&&(_(e,"lineWidth",t),_(e,"strokeStyle",a),e.strokeText(n.text,r,u)),o&&(_(e,"fillStyle",o),e.fillText(n.text,r,u))}function oi(t){return t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor}function ai(t,e,n,i,o,a,r){var s=n.textBackgroundColor,l=n.textBorderWidth,h=n.textBorderColor,u=nt(s);_(e,"shadowBlur",n.textBoxShadowBlur||0),_(e,"shadowColor",n.textBoxShadowColor||"transparent"),_(e,"shadowOffsetX",n.textBoxShadowOffsetX||0),_(e,"shadowOffsetY",n.textBoxShadowOffsetY||0),(u||l&&h)&&(e.beginPath(),(n=n.textBorderRadius)?Kn(e,{x:i,y:o,width:a,height:r,r:n}):e.rect(i,o,a,r),e.closePath()),u?(_(e,"fillStyle",s),e.fill()):T(s)&&(n=Cn(s.image,null,t,ri,s))&&kn(n)&&e.drawImage(n,i,o,a,r),l&&h&&(_(e,"lineWidth",l),_(e,"strokeStyle",h),e.stroke())}function ri(t,e){e.image=t}function si(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+ui(i[0],n.width),a=n.y+ui(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",h="top";switch(t){case"left":i-=n,o+=s,l="right",h="middle";break;case"right":i+=n+r,o+=s,h="middle";break;case"top":i+=r/2,o-=n,l="center",h="bottom";break;case"bottom":i+=r/2,o+=a+n,l="center";break;case"inside":i+=r/2,o+=s,l="center",h="middle";break;case"insideLeft":i+=n,o+=s,h="middle";break;case"insideRight":i+=r-n,o+=s,l="right",h="middle";break;case"insideTop":i+=r/2,o+=n,l="center";break;case"insideBottom":i+=r/2,o+=a-n,l="center",h="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,h="bottom";break;case"insideBottomRight":i+=r-n,o+=a-n,l="right",h="bottom"}return{x:i,y:o,textAlign:l,textVerticalAlign:h}}(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 _(t,e,n){return t[e]=fn(t,e,n),t[e]}function li(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function hi(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function ui(t,e){return"string"==typeof t?0<=t.lastIndexOf("%")?parseFloat(t)/100*e:parseFloat(t):t}function ci(t,e,n){return"right"===e?t-n[1]:"center"===e?t+n[3]/2-n[1]/2:t+n[3]}function di(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)}function pi(){}var gi=new Z;function fi(t){for(var e in Ye.call(this,t=t||{}),t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new mn(t.style,this),this._rect=null,this.__clipPaths=[]}function mi(t){fi.call(this,t)}fi.prototype={constructor:fi,type:"displayable",__dirty:!0,invisible:!(pi.prototype={constructor:pi,drawRectText:function(t,e){var n,i=this.style,o=(e=i.textRect||e,this.__dirty&&Qn(i),i.text);null!=o&&(o+=""),di(o,i)&&(t.save(),n=this.transform,i.transformText?this.setTransform(t):n&&(gi.copy(e),gi.applyTransform(n),e=gi),ei(this,t,o,i,e),t.restore())}}),z:0,z2:0,zlevel:0,draggable:!1,dragging:!1,silent:!1,culling:!1,cursor:"pointer",rectHover:!1,progressive:!1,incremental:!1,inplace:!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=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(t){return this.animate("style",t)},attrKV:function(t,e){"style"!==t?Ye.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 mn(t,this),this.dirty(!1),this}},a(fi,Ye),i(fi,pi),mi.prototype={constructor:mi,type:"image",brush:function(t,e){var n,i,o,a,r,s,l=this.style,h=l.image,e=(l.bind(t,this,e),this._image=Cn(h,this._image,this,this.onload));e&&kn(e)&&(h=l.x||0,n=l.y||0,i=l.width,o=l.height,a=e.width/e.height,null==i&&null!=o?i=o*a:null==o&&null!=i?o=i/a:null==i&&null==o&&(i=e.width,o=e.height),this.setTransform(t),l.sWidth&&l.sHeight?(r=l.sx||0,s=l.sy||0,t.drawImage(e,r,s,l.sWidth,l.sHeight,h,n,i,o)):l.sx&&l.sy?(r=l.sx,s=l.sy,t.drawImage(e,r,s,i-r,o-s,h,n,i,o)):t.drawImage(e,h,n,i,o),null!=l.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(mi,fi);var yi=314159;function vi(t){return parseInt(t,10)}var xi=new Z(0,0,0,0),_i=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||Qe,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 Tn(t,this,this.dpr)).__builtin__=!0,n.initContext(),(e[yi]=n).zlevel=yi,a.push(yi),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=[]}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;t.__hoverMir||((((n=new t.constructor({style:t.style,shape:t.shape})).__from=t).__hoverMir=n).setStyle(e),this._hoverElements.push(n))},removeHover:function(t){var e=t.__hoverMir,n=this._hoverElements,e=f(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,Dn(function(){o._paintList(t,e,n)}))},_compositeManually:function(){var e=this.getLayer(yi).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,h=(s=n[r]).ctx,u={},c=(h.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,u),m.__dirty=!1,d)if(15<Date.now()-p)break}s.__drawIndex=f,s.__drawIndex<s.__endIndex&&(a=!1),u.prevElClipPaths&&h.restore(),h.restore()}return y.wxa&&E(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,xi.copy(n.getBoundingRect()),n.transform&&xi.applyTransform(n.transform),_i.width=r,_i.height=o,xi.intersect(_i)))){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),n)){a.save();for(var s=n,l=a,h=0;h<s.length;h++){var u=s[h];u.setTransform(l),l.beginPath(),u.buildPath(l,u.shape),l.clip(),u.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=yi);var n=this._layers[t];return n||((n=new Tn("zr_"+t,this,this.dpr)).zlevel=t,n.__builtin__=!0,this._layerConfig[t]&&p(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]?p(n[t],e,!0):n[t]=e;for(var i=0;i<this._zlevelList.length;i++){var o=this._zlevelList[i];o!==t&&o!==t+.01||p(this._layers[o],n[t],!0)}}},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(f(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);E(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(yi).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[yi].dom;var e=new Tn("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,h=Math.max(a/2,r-s),s=Math.max(a/2,s+r),u=Math.max(a/2,r-l),a=Math.max(a/2,l+r),l=o.width+h+s,r=o.height+u+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});t.position=[h-o.x,u-o.y],t.rotation=0,t.scale=[1,1],t.updateTransform(),t&&t.brush(i);a=new mi({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}};var bi="undefined"!=typeof window&&!!window.addEventListener,Si=/^(?:mouse|pointer|contextmenu|drag|drop)|click/;function Mi(t,e,n,i){return n=n||{},i||!y.canvasSupported?Ii(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):Ii(t,e,n),n}function Ii(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 Ti(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])&&Mi(t,i,e,n):(Mi(t,e,e,n),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3),i=e.button,null==e.which&&void 0!==i&&Si.test(e.type))&&(e.which=1&i?1:2&i?3:4&i?2:0),e}function Di(t,e,n){bi?t.addEventListener(e,n):t.attachEvent("on"+e,n)}var Ai=bi?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0};function Ci(t){return 1<t.which}function Li(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,Ft.call(this)}function ki(){this._track=[]}Li.prototype={constructor:Li,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=f(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,Dn(function t(){e._running&&(Dn(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 Ue(t,(e=e||{}).loop,e.getter,e.setter);return this.addAnimator(t),t}},i(Li,Ft);function Pi(t){var e=t[1][0]-t[0][0],t=t[1][1]-t[0][1];return Math.sqrt(e*e+t*t)}ki.prototype={constructor:ki,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=Mi(n,s,{});o.points.push([l.zrX,l.zrY]),o.touches.push(s)}this._track.push(o)}},_recognize:function(t){for(var e in Ni)if(Ni.hasOwnProperty(e)){e=Ni[e](this._track,t);if(e)return e}}};var Ni={pinch:function(t,e){var n,i=t.length;if(i)return n=(t[i-1]||{}).points,(i=(t[i-2]||{}).points||n)&&1<i.length&&n&&1<n.length?(i=Pi(n)/Pi(i),isFinite(i)||(i=1),e.pinchScale=i,i=[(n[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2],e.pinchX=i[0],e.pinchY=i[1],{type:"pinch",target:t[0].target,event:e}):void 0}},Oi=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Ei=["touchstart","touchend","touchmove"],zi={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},Ri=I(Oi,function(t){var e=t.replace("mouse","pointer");return zi[e]?e:t});function Bi(t){return"mousewheel"===t&&y.browser.firefox?"DOMMouseScroll":t}function Vi(t,e,n){var i=t._gestureMgr,o=("start"===n&&i.clear(),i.recognize(e,t.handler.findHover(e.zrX,e.zrY,null).target,t.dom));"end"===n&&i.clear(),o&&(n=o.type,e.gestureEvent=n,t.handler.dispatchToElement({target:o.target},n,o.event))}function Gi(t){t._touching=!0,clearTimeout(t._touchTimer),t._touchTimer=setTimeout(function(){t._touching=!1},700)}var Wi={mousemove:function(t){t=Ti(this.dom,t),this.trigger("mousemove",t)},mouseout:function(t){var e=(t=Ti(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=Ti(this.dom,t)).zrByTouch=!0,this._lastTouchMoment=new Date,Vi(this,t,"start"),Wi.mousemove.call(this,t),Wi.mousedown.call(this,t),Gi(this)},touchmove:function(t){(t=Ti(this.dom,t)).zrByTouch=!0,Vi(this,t,"change"),Wi.mousemove.call(this,t),Gi(this)},touchend:function(t){(t=Ti(this.dom,t)).zrByTouch=!0,Vi(this,t,"end"),Wi.mouseup.call(this,t),+new Date-this._lastTouchMoment<300&&Wi.click.call(this,t),Gi(this)},pointerdown:function(t){Wi.mousedown.call(this,t)},pointermove:function(t){Fi(t)||Wi.mousemove.call(this,t)},pointerup:function(t){Wi.mouseup.call(this,t)},pointerout:function(t){Fi(t)||Wi.mouseout.call(this,t)}};function Fi(t){t=t.pointerType;return"pen"===t||"touch"===t}function Hi(i){E(Ei,function(t){i._handlers[t]=D(Wi[t],i)}),E(Ri,function(t){i._handlers[t]=D(Wi[t],i)}),E(Oi,function(t){var e,n;i._handlers[t]=(e=Wi[t],n=i,function(){if(!n._touching)return e.apply(n,arguments)})})}function Zi(n){function t(t,e){E(t,function(t){Di(n,Bi(t),e._handlers[t])},e)}Ft.call(this),this.dom=n,this._touching=!1,this._touchTimer,this._gestureMgr=new ki,this._handlers={},Hi(this),y.pointerEventsSupported?t(Ri,this):(y.touchEventsSupported&&t(Ei,this),t(Oi,this))}E(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(e){Wi[e]=function(t){t=Ti(this.dom,t),this.trigger(e,t)}});var Je=Zi.prototype,Ui=(Je.dispose=function(){for(var t,e,n=Oi.concat(Ei),i=0;i<n.length;i++){var o=n[i];t=this.dom,e=Bi(o),o=this._handlers[o],bi?t.removeEventListener(e,o):t.detachEvent("on"+e,o)}},Je.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},i(Zi,Ft),!y.canvasSupported),Xi={canvas:wi},Yi={},ji="4.0.4";function qi(t,e){t=new Ki(d++,t,e);return Yi[t.id]=t}function Ki(t,e,n){n=n||{},this.dom=e,this.id=t;var i=this,o=new pn,a=n.renderer;if(Ui){if(!Xi.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");a="vml"}else a&&Xi[a]||(a="canvas");var a=new Xi[a](e,o,n,t),e=(this.storage=o,this.painter=a,y.node||y.worker?null:new Zi(a.getViewportRoot())),r=(this.handler=new Ut(o,a,e,a.root),this.animation=new Li({stage:{update:D(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)}}Ki.prototype={constructor:Ki,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){this.painter.addHover&&(this.painter.addHover(t,e),this.refreshHover())},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 Yi[t]}};var Je=Object.freeze({__proto__:null,dispose:function(t){if(t)t.dispose();else{for(var e in Yi)Yi.hasOwnProperty(e)&&Yi[e].dispose();Yi={}}return this},getInstance:function(t){return Yi[t]},init:qi,registerPainter:function(t,e){Xi[t]=e},version:ji}),$i=E,Ji=T,Qi=k,to="series\0";function eo(t){return t instanceof Array?t:null==t?[]:[t]}function no(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 io=["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 oo(t){return!Ji(t)||Qi(t)||t instanceof Date?t:t.value}function ao(t,o){o=(o||[]).slice();var a=I(t||[],function(t,e){return{exist:t}});return $i(o,function(t,e){if(Ji(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||lo(t)||lo(i)||i.name!==t.name+""))return a[n].option=t,void(o[e]=null)}}}),$i(o,function(t,e){if(Ji(t)){for(var n=0;n<a.length;n++){var i=a[n].exist;if(!a[n].option&&!lo(i)&&null==t.id){a[n].option=t;break}}n>=a.length&&a.push({option:t})}}),a}function ro(t){var r=P();$i(t,function(t,e){var n=t.exist;n&&r.set(n.id,t)}),$i(t,function(t,e){var n=t.option;x(!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={})}),$i(t,function(t,e){var n=t.exist,i=t.option,o=t.keyInfo;if(Ji(i)){if(o.name=null!=i.name?i.name+"":n?n.name:to+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 so(t){t=t.name;return t&&t.indexOf(to)}function lo(t){return Ji(t)&&t.id&&0===(t.id+"").indexOf("\0_ec_\0")}function ho(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?k(t.dataIndex)?I(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex):null!=t.name?k(t.name)?I(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name):void 0}function uo(){var e="__\0ec_inner_"+co+++"_"+Math.random().toFixed(5);return function(t){return t[e]||(t[e]={})}}var co=0;function po(o,a,r){nt(a)&&((t={})[a+"Index"]=0,a=t);var t=r&&r.defaultMainType,s=(!t||go(a,t+"Index")||go(a,t+"Id")||go(a,t+"Name")||(a[t+"Index"]=0),{});return $i(a,function(t,e){var n,i,t=a[e];"dataIndex"===e||"dataIndexInside"===e?s[e]=t:(n=(e=e.match(/^(\w+)(Index|Id|Name)$/)||[])[1],e=(e[2]||"").toLowerCase(),!n||!e||null==t||"index"===e&&"none"===t||r&&r.includeMainTypes&&f(r.includeMainTypes,n)<0||(i={mainType:n},"index"===e&&"all"===t||(i[e]=t),e=o.queryComponents(i),s[n+"Models"]=e,s[n+"Model"]=e[0]))}),s}function go(t,e){return t&&t.hasOwnProperty(e)}function fo(t,e,n){t.setAttribute?t.setAttribute(e,n):t[e]=n}var mo=".",yo="___EC__COMPONENT__CONTAINER___";function vo(t){var e={main:"",sub:""};return t&&(t=t.split(mo),e.main=t[0]||"",e.sub=t[1]||""),e}function xo(t,i){(t.$constructor=t).extend=function(e){A&&E(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=bo,t.superApply=So,a(t,this),t.superClass=n,t}}var _o=0;function wo(t){var e=["__\0is_clz",_o++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,A&&x(!t.isInstance,'The method "is" can not be defined.'),t.isInstance=function(t){return!(!t||!t[e])}}function bo(t,e){var n=ut(arguments,2);return this.superClass.prototype[e].apply(t,n)}function So(t,e,n){return this.superClass.prototype[e].apply(t,n)}function Mo(n,t){t=t||{};var i,o={};n.registerClass=function(t,e){var n;return e&&(n=e,x(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(n),'componentType "'+n+'" illegal'),(e=vo(e)).sub?e.sub!==yo&&(function(t){var e=o[t.main];e&&e[yo]||(e=o[t.main]={___EC__COMPONENT__CONTAINER___:!0});return e}(e)[e.sub]=t):(A&&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[yo]&&(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=vo(t);var n=[],t=o[t.main];return t&&t[yo]?E(t,function(t,e){e!==yo&&n.push(t)}):n.push(t),n},n.hasClass=function(t){return t=vo(t),!!o[t.main]},n.getAllClassMainTypes=function(){var n=[];return E(o,function(t,e){n.push(e)}),n},n.hasSubTypes=function(t){t=vo(t);t=o[t.main];return t&&t[yo]},n.parseClassType=vo,t.registerWhenExtend&&(i=n.extend)&&(n.extend=function(t){var e=i.call(this,t);return n.registerClass(e,t.type)})}function Io(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<=f(e,a)||n&&f(n,a)<0||null!=(a=t.getShallow(a))&&(i[r[o][0]]=a)}return i}}var To=Io([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Do={getLineStyle:function(t){var t=To(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]}},Ao=Io([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),Co={getAreaStyle:function(t,e){return Ao(this,t,e)}},Lo=Math.pow,ko=Math.sqrt,Po=1e-8,No=1e-4,Oo=ko(3),Eo=wt(),zo=wt(),Ro=wt();function Bo(t){return-Po<t&&t<Po}function Vo(t){return Po<t||t<-Po}function Go(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 Wo(t,e,n,i,o){var a=1-o;return 3*(((e-t)*a+2*(n-e)*o)*a+(i-n)*o*o)}function Fo(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 Bo(i)?Vo(r)&&0<=(a=-n/r)&&a<=1&&(o[e++]=a):Bo(t=r*r-4*i*n)?o[0]=-r/(2*i):0<t&&(t=(-r-(n=ko(t)))/(2*i),0<=(a=(-r+n)/(2*i))&&a<=1&&(o[e++]=a),0<=t)&&t<=1&&(o[e++]=t),e}function Ho(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 Zo(t,e,n,i){var o=1-i;return o*(o*t+2*i*e)+i*i*n}function Uo(t,e,n,i){return 2*((1-i)*(e-t)+i*(n-e))}function Xo(t,e,n){n=t+n-2*e;return 0==n?.5:(t-e)/n}function Yo(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 jo=Math.min,qo=Math.max,Ko=Math.sin,$o=Math.cos,Jo=2*Math.PI,Qo=wt(),ta=wt(),ea=wt();function na(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=jo(o,i[0]),a=qo(a,i[0]),r=jo(r,i[1]),s=qo(s,i[1]);e[0]=o,e[1]=r,n[0]=a,n[1]=s}}function ia(t,e,n,i,o,a){o[0]=jo(t,n),o[1]=jo(e,i),a[0]=qo(t,n),a[1]=qo(e,i)}var oa=[],aa=[];function ra(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null}var sa={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},la=[],ha=[],ua=[],ca=[],da=Math.min,pa=Math.max,ga=Math.cos,fa=Math.sin,ma=Math.sqrt,ya=Math.abs,va="undefined"!=typeof Float32Array;function xa(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 _a(t,e,n,i,o,a,r,s,l,h,u){if(0!==l)return!(e+(l=l)<u&&i+l<u&&a+l<u&&s+l<u||u<e-l&&u<i-l&&u<a-l&&u<s-l||t+l<h&&n+l<h&&o+l<h&&r+l<h||h<t-l&&h<n-l&&h<o-l&&h<r-l)&&function(t,e,n,i,o,a,r,s,l,h,u){var c,d,p,g,f=.005,m=1/0;Eo[0]=l,Eo[1]=h;for(var y=0;y<1;y+=.05)zo[0]=Go(t,n,o,r,y),zo[1]=Go(e,i,a,s,y),(p=Et(Eo,zo))<m&&(c=y,m=p);for(var m=1/0,v=0;v<32&&!(f<No);v++)d=c+f,zo[0]=Go(t,n,o,r,g=c-f),zo[1]=Go(e,i,a,s,g),p=Et(zo,Eo),0<=g&&p<m?(c=g,m=p):(Ro[0]=Go(t,n,o,r,d),Ro[1]=Go(e,i,a,s,d),g=Et(Ro,Eo),d<=1&&g<m?(c=d,m=g):f*=.5);return u&&(u[0]=Go(t,n,o,r,c),u[1]=Go(e,i,a,s,c)),ko(m)}(t,e,n,i,o,a,r,s,h,u,null)<=l/2}function wa(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 h,u=.005,c=1/0;Eo[0]=r,Eo[1]=s;for(var d=0;d<1;d+=.05)zo[0]=Zo(t,n,o,d),zo[1]=Zo(e,i,a,d),(m=Et(Eo,zo))<c&&(h=d,c=m);for(var c=1/0,p=0;p<32&&!(u<No);p++){var g=h-u,f=h+u,m=(zo[0]=Zo(t,n,o,g),zo[1]=Zo(e,i,a,g),Et(zo,Eo));0<=g&&m<c?(h=g,c=m):(Ro[0]=Zo(t,n,o,f),Ro[1]=Zo(e,i,a,f),g=Et(Ro,Eo),f<=1&&g<c?(h=f,c=g):u*=.5)}return l&&(l[0]=Zo(t,n,o,h),l[1]=Zo(e,i,a,h)),ko(c)}(t,e,n,i,o,a,s,l,null)<=r/2}ra.prototype={constructor:ra,_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=ya(1/Qe/t)||0,this._uy=ya(1/Qe/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(sa.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=ya(t-this._xi)>this._ux||ya(e-this._yi)>this._uy||this._len<5;return this.addData(sa.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(sa.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(sa.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(sa.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=ga(o)*n+t,this._yi=fa(o)*n+t,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(sa.R,t,e,n,i),this},closePath:function(){this.addData(sa.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||!va||(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();va&&this.data instanceof Float32Array&&(this.data=new Float32Array(i+n));for(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,h=this._yi,u=t-l,c=e-h,d=ma(u*u+c*c),p=l,g=h,f=r.length;for(a<0&&(a=o+a),p-=(a%=o)*(u/=d),g-=a*(c/=d);0<u&&p<=t||u<0&&t<=p||0==u&&(0<c&&g<=e||c<0&&e<=g);)p+=u*(n=r[i=this._dashIdx]),g+=c*n,this._dashIdx=(i+1)%f,0<u&&p<l||u<0&&l<p||0<c&&g<h||c<0&&h<g||s[i%2?"moveTo":"lineTo"]((0<=u?da:pa)(p,t),(0<=c?da:pa)(g,e));this._dashOffset=-ma((u=p-t)*u+(c=g-e)*c)},_dashedBezierTo:function(t,e,n,i,o,a){var r,s,l,h,u,c=this._dashSum,d=this._dashOffset,p=this._lineDash,g=this._ctx,f=this._xi,m=this._yi,y=Go,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+=ma(s*s+l*l);for(;x<_&&!(d<(w+=p[x]));x++);for(r=(w-d)/v;r<=1;)h=y(f,t,n,o,r),u=y(m,e,i,a,r),x%2?g.moveTo(h,u):g.lineTo(h,u),r+=p[x]/v,x=(x+1)%_;x%2!=0&&g.lineTo(o,a),this._dashOffset=-ma((s=o-h)*s+(l=a-u)*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,va)&&(this.data=new Float32Array(t))},getBoundingRect:function(){la[0]=la[1]=ua[0]=ua[1]=Number.MAX_VALUE,ha[0]=ha[1]=ca[0]=ca[1]=-Number.MAX_VALUE;for(var t,e=this.data,n=0,i=0,o=0,a=0,r=0;r<e.length;){var z=e[r++];switch(1==r&&(o=n=e[r],a=i=e[r+1]),z){case sa.M:n=o=e[r++],i=a=e[r++],ua[0]=o,ua[1]=a,ca[0]=o,ca[1]=a;break;case sa.L:ia(n,i,e[r],e[r+1],ua,ca),n=e[r++],i=e[r++];break;case sa.C:W=G=y=s=V=m=f=g=p=d=B=R=c=u=h=l=void 0;var s,l=n,h=i,u=e[r++],c=e[r++],R=e[r++],B=e[r++],d=e[r],p=e[r+1],g=ua,f=ca,m=Fo,V=Go,y=m(l,u,R,d,oa);for(g[0]=1/0,g[1]=1/0,f[0]=-1/0,f[1]=-1/0,s=0;s<y;s++){var G=V(l,u,R,d,oa[s]);g[0]=jo(G,g[0]),f[0]=qo(G,f[0])}for(y=m(h,c,B,p,aa),s=0;s<y;s++){var W=V(h,c,B,p,aa[s]);g[1]=jo(W,g[1]),f[1]=qo(W,f[1])}g[0]=jo(l,g[0]),f[0]=qo(l,f[0]),g[0]=jo(d,g[0]),f[0]=qo(d,f[0]),g[1]=jo(h,g[1]),f[1]=qo(h,f[1]),g[1]=jo(p,g[1]),f[1]=qo(p,f[1]),n=e[r++],i=e[r++];break;case sa.Q:m=n,P=i,M=e[r++],_=e[r++],S=e[r],v=e[r+1],b=ua,I=ca,t=w=t=x=void 0,x=Zo,t=qo(jo((w=Xo)(m,M,S),1),0),w=qo(jo(w(P,_,v),1),0),M=x(m,M,S,t),t=x(P,_,v,w),b[0]=jo(m,S,M),b[1]=jo(P,v,t),I[0]=qo(m,S,M),I[1]=qo(P,v,t),n=e[r++],i=e[r++];break;case sa.A:var v,x=e[r++],_=e[r++],w=e[r++],b=e[r++],S=e[r++],M=e[r++]+S,I=(e[r++],1-e[r++]),T=(1==r&&(o=ga(S)*w+x,a=fa(S)*b+_),E=v=H=F=O=N=P=k=L=C=A=D=T=void 0,x),D=_,A=w,C=b,L=S,k=M,P=I,N=ua,O=ca,F=Bt,H=Vt;if((v=Math.abs(L-k))%Jo<1e-4&&1e-4<v)N[0]=T-A,N[1]=D-C,O[0]=T+A,O[1]=D+C;else{Qo[0]=$o(L)*A+T,Qo[1]=Ko(L)*C+D,ta[0]=$o(k)*A+T,ta[1]=Ko(k)*C+D,F(N,Qo,ta),H(O,Qo,ta),(L%=Jo)<0&&(L+=Jo),(k%=Jo)<0&&(k+=Jo),k<L&&!P?k+=Jo:L<k&&P&&(L+=Jo),P&&(v=k,k=L,L=v);for(var E=0;E<k;E+=Math.PI/2)L<E&&(ea[0]=$o(E)*A+T,ea[1]=Ko(E)*C+D,F(N,ea,N),H(O,ea,O))}n=ga(M)*w+x,i=fa(M)*b+_;break;case sa.R:ia(o=n=e[r++],a=i=e[r++],o+e[r++],a+e[r++],ua,ca);break;case sa.Z:n=o,i=a}Bt(la,la,ua),Vt(ha,ha,ca)}return 0===r&&(la[0]=la[1]=ha[0]=ha[1]=0),new Z(la[0],la[1],ha[0]-la[0],ha[1]-la[1])},rebuildPath:function(t){for(var e,n,i,o,a=this.data,r=this._ux,s=this._uy,l=this._len,h=0;h<l;){var u=a[h++];switch(1==h&&(e=i=a[h],n=o=a[h+1]),u){case sa.M:e=i=a[h++],n=o=a[h++],t.moveTo(i,o);break;case sa.L:c=a[h++],d=a[h++],(ya(c-i)>r||ya(d-o)>s||h===l-1)&&(t.lineTo(c,d),i=c,o=d);break;case sa.C:t.bezierCurveTo(a[h++],a[h++],a[h++],a[h++],a[h++],a[h++]),i=a[h-2],o=a[h-1];break;case sa.Q:t.quadraticCurveTo(a[h++],a[h++],a[h++],a[h++]),i=a[h-2],o=a[h-1];break;case sa.A:var c=a[h++],d=a[h++],p=a[h++],g=a[h++],f=a[h++],m=a[h++],y=a[h++],v=a[h++],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==h&&(e=ga(f)*p+c,n=fa(f)*g+d),i=ga(m)*p+c,o=fa(m)*g+d;break;case sa.R:e=i=a[h],n=o=a[h+1],t.rect(a[h++],a[h++],a[h++],a[h++]);break;case sa.Z:t.closePath(),i=e,o=n}}}},ra.CMD=sa;var ba=2*Math.PI;function Sa(t){return(t%=ba)<0&&(t+=ba),t}var Ma=2*Math.PI;function Ia(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 Ta=ra.CMD,Da=2*Math.PI,Aa=1e-4;var Ca=[-1,-1,-1],La=[-1,-1];function ka(t,e,n,i,o,a,r,s,l,h){if(e<h&&i<h&&a<h&&s<h||h<e&&h<i&&h<a&&h<s)return 0;g=Ca,p=(p=s)+3*((c=i)-(d=a))-(u=e),y=(d=3*(d-2*c+u))*(c=3*(c-u))-9*p*(u=u-(h=h)),u=c*c-3*d*u,v=0,Bo(h=d*d-3*p*c)&&Bo(y)?Bo(d)?g[0]=0:0<=(f=-c/d)&&f<=1&&(g[v++]=f):Bo(c=y*y-4*h*u)?(m=-(u=y/h)/2,0<=(f=-d/p+u)&&f<=1&&(g[v++]=f),0<=m&&m<=1&&(g[v++]=m)):0<c?(c=h*d+1.5*p*(-y-(u=ko(c))),0<=(f=(-d-((u=(u=h*d+1.5*p*(-y+u))<0?-Lo(-u,1/3):Lo(u,1/3))+(c=c<0?-Lo(-c,1/3):Lo(c,1/3))))/(3*p))&&f<=1&&(g[v++]=f)):(u=(2*h*d-3*p*y)/(2*ko(h*h*h)),c=Math.acos(u)/3,f=(-d-2*(y=ko(h))*(u=Math.cos(c)))/(3*p),m=(-d+y*(u+Oo*Math.sin(c)))/(3*p),h=(-d+y*(u-Oo*Math.sin(c)))/(3*p),0<=f&&f<=1&&(g[v++]=f),0<=m&&m<=1&&(g[v++]=m),0<=h&&h<=1&&(g[v++]=h));var u,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=Ca[M],T=0===I||1===I?.5:1;Go(t,n,o,r,I)<l||(S<0&&(S=Fo(e,i,a,s,La),La[1]<La[0]&&1<S&&(w=void 0,w=La[0],La[0]=La[1],La[1]=w),w=Go(e,i,a,s,La[0]),1<S)&&(_=Go(e,i,a,s,La[1])),2==S?I<La[0]?b+=w<e?T:-T:I<La[1]?b+=_<w?T:-T:b+=s<_?T:-T:I<La[0]?b+=w<e?T:-T:b+=s<w?T:-T)}return b}function Pa(t,e,n,i,o,a,r,s){if(e<s&&i<s&&a<s||s<e&&s<i&&s<a)return 0;c=Ca,u=(l=e)-2*(h=i)+(u=a),h=2*(h-l),l-=s=s,s=0,Bo(u)?Vo(h)&&0<=(d=-l/h)&&d<=1&&(c[s++]=d):Bo(l=h*h-4*u*l)?0<=(d=-h/(2*u))&&d<=1&&(c[s++]=d):0<l&&(p=(-h-(l=ko(l)))/(2*u),0<=(d=(-h+l)/(2*u))&&d<=1&&(c[s++]=d),0<=p)&&p<=1&&(c[s++]=p);var l,h,u,c,d,p,g=s;if(0===g)return 0;var f=Xo(e,i,a);if(0<=f&&f<=1){for(var m=0,y=Zo(e,i,a,f),v=0;v<g;v++){var x=0===Ca[v]||1===Ca[v]?.5:1;Zo(t,n,o,Ca[v])<r||(Ca[v]<f?m+=y<e?x:-x:m+=a<y?x:-x)}return m}return x=0===Ca[0]||1===Ca[0]?.5:1,Zo(t,n,o,Ca[0])<r?0:a<e?x:-x}function Na(t,e,n,i,o){for(var a,r,s=0,l=0,h=0,u=0,c=0,d=0;d<t.length;){var p=t[d++];switch(p===Ta.M&&1<d&&(n||(s+=Ia(l,h,u,c,i,o))),1==d&&(u=l=t[d],c=h=t[d+1]),p){case Ta.M:l=u=t[d++],h=c=t[d++];break;case Ta.L:if(n){if(xa(l,h,t[d],t[d+1],e,i,o))return!0}else s+=Ia(l,h,t[d],t[d+1],i,o)||0;l=t[d++],h=t[d++];break;case Ta.C:if(n){if(_a(l,h,t[d++],t[d++],t[d++],t[d++],t[d],t[d+1],e,i,o))return!0}else s+=ka(l,h,t[d++],t[d++],t[d++],t[d++],t[d],t[d+1],i,o)||0;l=t[d++],h=t[d++];break;case Ta.Q:if(n){if(wa(l,h,t[d++],t[d++],t[d],t[d+1],e,i,o))return!0}else s+=Pa(l,h,t[d++],t[d++],t[d],t[d+1],i,o)||0;l=t[d++],h=t[d++];break;case Ta.A:var g=t[d++],f=t[d++],m=t[d++],y=t[d++],v=t[d++],x=t[d++],_=(t[d++],1-t[d++]),w=Math.cos(v)*m+g,b=Math.sin(v)*y+f,S=(1<d?s+=Ia(l,h,w,b,i,o):(u=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)%Ma<1e-4||((o=a?(e=i,i=Sa(o),Sa(e)):(i=Sa(i),Sa(o)))<i&&(o+=Ma),(t=Math.atan2(l,s))<0&&(t+=Ma),i<=t&&t<=o)||i<=t+Ma&&t+Ma<=o)}(g,f,y,v,v+x,_,e,S,o))return!0}else s+=function(t,e,n,i,o,a,r,s){if(n<(s-=e)||s<-n)return 0;if(e=Math.sqrt(n*n-s*s),Ca[0]=-e,Ca[1]=e,(n=Math.abs(i-o))<1e-4)return 0;if(n%Da<1e-4)return o=Da,u=a?1:-1,r>=Ca[i=0]+t&&r<=Ca[1]+t?u:0;(o=a?(e=i,i=Sa(o),Sa(e)):(i=Sa(i),Sa(o)))<i&&(o+=Da);for(var l=0,h=0;h<2;h++){var u,c=Ca[h];r<c+t&&(u=a?1:-1,i<=(c=(c=Math.atan2(s,c))<0?Da+c:c)&&c<=o||i<=c+Da&&c+Da<=o)&&(l+=u=c>Math.PI/2&&c<1.5*Math.PI?-u:u)}return l}(g,f,y,v,v+x,_,S,o);l=Math.cos(v+x)*m+g,h=Math.sin(v+x)*y+f;break;case Ta.R:u=l=t[d++],c=h=t[d++],w=u+t[d++],b=c+t[d++];if(n){if(xa(u,c,w,c,e,i,o)||xa(w,c,w,b,e,i,o)||xa(w,b,u,b,e,i,o)||xa(u,b,u,c,e,i,o))return!0}else s=(s+=Ia(w,c,w,b,i,o))+Ia(u,b,u,c,i,o);break;case Ta.Z:if(n){if(xa(l,h,u,c,e,i,o))return!0}else s+=Ia(l,h,u,c,i,o);l=u,h=c}}return n||(a=h,r=c,Math.abs(a-r)<Aa)||(s+=Ia(l,h,u,c,i,o)||0),0!==s}var Oa=Sn.prototype.getCanvasPattern,Ea=Math.abs,za=new ra(!0);function r(t){fi.call(this,t),this.path=null}r.prototype={constructor:r,type:"path",__dirtyPath:!0,strokeContainThreshold:5,brush:function(t,e){var n=this.style,i=this.path||za,o=n.hasStroke(),a=n.hasFill(),r=n.fill,s=n.stroke,l=a&&!!r.colorStops,h=o&&!!s.colorStops,u=a&&!!r.image,c=o&&!!s.image,e=(n.bind(t,this,e),this.setTransform(t),this.__dirty&&(l&&(d=d||this.getBoundingRect(),this._fillGradient=n.getGradient(t,r,d)),h)&&(d=d||this.getBoundingRect(),this._strokeGradient=n.getGradient(t,s,d)),l?t.fillStyle=this._fillGradient:u&&(t.fillStyle=Oa.call(r,t)),h?t.strokeStyle=this._strokeGradient:c&&(t.strokeStyle=Oa.call(s,t)),n.lineDash),d=n.lineDashOffset,l=!!t.setLineDash,u=this.getGlobalScale();i.setScale(u[0],u[1]),this.__dirtyPath||e&&!l&&o?(i.beginPath(t),e&&!l&&(i.setLineDash(e),i.setLineDashOffset(d)),this.buildPath(i,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),a&&i.fill(t),e&&l&&(t.setLineDash(e),t.lineDashOffset=d),o&&i.stroke(t),e&&l&&t.setLineDash([]),null!=n.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))},buildPath:function(t,e,n){},createPathProxy:function(){this.path=new ra},getBoundingRect:function(){var t,e,n=this._rect,i=this.style,o=!n;return o&&(t=(t=this.path)||(this.path=new ra),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)),Na(n,i/a,!0,t,e)))return!0}if(o.hasFill())return Na(n,0,!1,t,e)}return!1},dirty:function(t){(t=null==t?!0:t)&&(this.__dirtyPath=t,this._rect=null),this.__dirty=!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):fi.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var n=this.shape;if(n){if(T(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<Ea(t[0]-1)&&1e-10<Ea(t[3]-1)?Math.sqrt(Ea(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,fi);var Ra=ra.CMD,Ba=[[],[],[]],Va=Math.sqrt,Ga=Math.atan2;function Wa(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(ja(t,e))}var Fa=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"],Ha=Math.sqrt,Za=Math.sin,Ua=Math.cos,Xa=Math.PI,Ya=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},ja=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(Ya(t)*Ya(e))};function qa(t,e,n,i,o,a,r,s,l,h,u){var l=l*(Xa/180),c=Ua(l)*(t-n)/2+Za(l)*(e-i)/2,d=-1*Za(l)*(t-n)/2+Ua(l)*(e-i)/2,p=c*c/(r*r)+d*d/(s*s),p=(1<p&&(r*=Ha(p),s*=Ha(p)),(o===a?-1:1)*Ha((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+Ua(l)*o-Za(l)*p,n=(e+i)/2+Za(l)*o+Ua(l)*p,e=Wa([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=Wa(i,c);ja(i,c)<=-1&&(o=Xa),1<=ja(i,c)&&(o=0),0===a&&0<o&&(o-=2*Xa),1===a&&o<0&&(o+=2*Xa),u.addData(h,t,n,r,s,e,o,l,a)}function Ka(t,e){var _=function(t){if(!t)return[];for(var e=t.replace(/-/g," -").replace(/ /g," ").replace(/ /g,",").replace(/,,/g,","),n=0;n<Fa.length;n++)e=e.replace(new RegExp(Fa[n],"g"),"|"+Fa[n]);var i,o=e.split("|"),a=0,r=0,s=new ra,l=ra.CMD;for(n=1;n<o.length;n++){var h,u=o[n],c=u.charAt(0),d=0,p=u.slice(1).replace(/e,-/g,"e-").split(",");0<p.length&&""===p[0]&&p.shift();for(var g=0;g<p.length;g++)p[g]=parseFloat(p[g]);for(;d<p.length&&!isNaN(p[d])&&!isNaN(p[0]);){var f,m,y,v,x,_=a,w=r;switch(c){case"l":a+=p[d++],r+=p[d++],h=l.L,s.addData(h,a,r);break;case"L":a=p[d++],r=p[d++],h=l.L,s.addData(h,a,r);break;case"m":a+=p[d++],r+=p[d++],h=l.M,s.addData(h,a,r),c="l";break;case"M":a=p[d++],r=p[d++],h=l.M,s.addData(h,a,r),c="L";break;case"h":a+=p[d++],h=l.L,s.addData(h,a,r);break;case"H":a=p[d++],h=l.L,s.addData(h,a,r);break;case"v":r+=p[d++],h=l.L,s.addData(h,a,r);break;case"V":r=p[d++],h=l.L,s.addData(h,a,r);break;case"C":h=l.C,s.addData(h,p[d++],p[d++],p[d++],p[d++],p[d++],p[d++]),a=p[d-2],r=p[d-1];break;case"c":h=l.C,s.addData(h,p[d++]+a,p[d++]+r,p[d++]+a,p[d++]+r,p[d++]+a,p[d++]+r),a+=p[d-2],r+=p[d-1];break;case"S":var b=a,S=r,M=s.len(),I=s.data;i===l.C&&(b+=a-I[M-4],S+=r-I[M-3]),h=l.C,_=p[d++],w=p[d++],a=p[d++],r=p[d++],s.addData(h,b,S,_,w,a,r);break;case"s":b=a,S=r;M=s.len(),I=s.data;i===l.C&&(b+=a-I[M-4],S+=r-I[M-3]),h=l.C,_=a+p[d++],w=r+p[d++],a+=p[d++],r+=p[d++],s.addData(h,b,S,_,w,a,r);break;case"Q":_=p[d++],w=p[d++],a=p[d++],r=p[d++],h=l.Q,s.addData(h,_,w,a,r);break;case"q":_=p[d++]+a,w=p[d++]+r,a+=p[d++],r+=p[d++],h=l.Q,s.addData(h,_,w,a,r);break;case"T":b=a,S=r;M=s.len(),I=s.data;i===l.Q&&(b+=a-I[M-4],S+=r-I[M-3]),a=p[d++],r=p[d++],h=l.Q,s.addData(h,b,S,a,r);break;case"t":b=a,S=r;M=s.len(),I=s.data;i===l.Q&&(b+=a-I[M-4],S+=r-I[M-3]),a+=p[d++],r+=p[d++],h=l.Q,s.addData(h,b,S,a,r);break;case"A":f=p[d++],m=p[d++],y=p[d++],v=p[d++],x=p[d++],qa(_=a,w=r,a=p[d++],r=p[d++],v,x,f,m,y,h=l.A,s);break;case"a":f=p[d++],m=p[d++],y=p[d++],v=p[d++],x=p[d++],qa(_=a,w=r,a+=p[d++],r+=p[d++],v,x,f,m,y,h=l.A,s)}}"z"!==c&&"Z"!==c||(h=l.Z,s.addData(h)),i=h}return s.toStatic(),s}(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=Ra.M,l=Ra.C,h=Ra.L,u=Ra.R,c=Ra.A,d=Ra.Q,p=0,g=0;p<r.length;){switch(e=r[p++],g=p,n=0,e){case s:case h:n=1;break;case l:n=3;break;case d:n=2;break;case c:var f=a[4],m=a[5],y=Va(a[0]*a[0]+a[1]*a[1]),v=Va(a[2]*a[2]+a[3]*a[3]),x=Ga(-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 u:o[0]=r[p++],o[1]=r[p++],Rt(o,o,a),r[g++]=o[0],r[g++]=o[1],o[0]+=r[p++],o[1]+=r[p++],Rt(o,o,a),r[g++]=o[0],r[g++]=o[1]}for(i=0;i<n;i++)(o=Ba[i])[0]=r[p++],o[1]=r[p++],Rt(o,o,a),r[g++]=o[0],r[g++]=o[1]}this.dirty(!0)},e}function R(t){fi.call(this,t)}R.prototype={constructor:R,type:"text",brush:function(t,e){var n=this.style,i=(this.__dirty&&Qn(n),n.fill=n.stroke=n.shadowBlur=n.shadowColor=n.shadowOffsetX=n.shadowOffsetY=null,n.text);null!=i&&(i+=""),n.bind(t,this,e),di(i,n)&&(this.setTransform(t),ei(this,t,i,n),this.restoreTransform(t))},getBoundingRect:function(){var t,e=this.style;return this.__dirty&&Qn(e),this._rect||(e.text,(t=Vn(e.text+"",e.font,e.textAlign,e.textVerticalAlign,e.textPadding,e.rich)).x+=e.x||0,t.y+=e.y||0,li(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(R,fi);var $a=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)}}),Ja=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]];function Qa(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<Ja.length;r++)Ja[r][2]=n[Ja[r][0]],n[Ja[r][0]]=Ja[r][1];t=!0;break}}if(s.apply(this,arguments),t)for(r=0;r<Ja.length;r++)n[Ja[r][0]]=Ja[r][2]}:s}var tr=r.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},brush:Qa(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),h=Math.sin(r);t.moveTo(l*o+n,h*o+i),t.lineTo(l*a+n,h*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()}}),er=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 nr(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 ir(t,e,n){var i=e.points,o=e.smooth;if(i&&2<=i.length){if(o&&"spline"!==o)for(var a=function(t,e,n,i){var o,a,r=[],s=[],l=[],h=[];if(i){for(var u=[1/0,1/0],c=[-1/0,-1/0],d=0,p=t.length;d<p;d++)Bt(u,u,t[d]),Vt(c,c,t[d]);Bt(u,u,i[0]),Vt(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(St(t[d]));continue}o=t[d-1],a=t[d+1]}Dt(s,a,o),Lt(s,s,e);var f=Pt(g,o),m=Pt(g,a),y=f+m,y=(0!==y&&(f/=y,m/=y),Lt(l,s,-f),Lt(h,s,m),It([],g,l)),f=It([],g,h);i&&(Vt(y,y,u),Bt(y,y,c),Vt(f,f,u),Bt(f,f,c)),r.push(y),r.push(f)}return n&&r.push(r.shift()),r}(i,o,n,e.smoothConstraint),r=(t.moveTo(i[0][0],i[0][1]),i.length),s=0;s<(n?r:r-1);s++){var l=a[2*s],h=a[2*s+1],u=i[(s+1)%r];t.bezierCurveTo(l[0],l[1],h[0],h[1],u[0],u[1])}else{"spline"===o&&(i=function(t,e){for(var n=t.length,i=[],o=0,a=1;a<n;a++)o+=Pt(t[a-1],t[a]);for(var r=(r=o/2)<n?n:r,a=0;a<r;a++){var s,l,h=a/(r-1)*(e?n:n-1),u=Math.floor(h),h=h-u,c=t[u%n],u=e?(s=t[(u-1+n)%n],l=t[(u+1)%n],t[(u+2)%n]):(s=t[0===u?u:u-1],l=t[n-2<u?n-1:u+1],t[n-3<u?n-1:u+2]),d=h*h,p=h*d;i.push([nr(s[0],c[0],l[0],u[0],h,d,p),nr(s[1],c[1],l[1],u[1],h,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 or=r.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){ir(t,e,!0)}}),ar=r.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){ir(t,e,!1)}}),B=r.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.x,i=e.y,o=e.width,a=e.height;e.r?Kn(t,e):t.rect(n,i,o,a),t.closePath()}}),rr=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=e.x1,i=e.y1,o=e.x2,a=e.y2,e=e.percent;0!==e&&(t.moveTo(n,i),e<1&&(o=n*(1-e)+o*e,a=i*(1-e)+a*e),t.lineTo(o,a))},pointAt:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}}),sr=[];function lr(t,e,n){var i=t.cpx2,o=t.cpy2;return null===i||null===o?[(n?Wo:Go)(t.x1,t.cpx1,t.cpx2,t.x2,e),(n?Wo:Go)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(n?Uo:Zo)(t.x1,t.cpx1,t.x2,e),(n?Uo:Zo)(t.y1,t.cpy1,t.y2,e)]}function hr(t){this.colorStops=t||[]}function ur(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,hr.call(this,o)}function cr(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,hr.call(this,i)}var dr=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,h=e.cpy2,e=e.percent;0!==e&&(t.moveTo(n,i),null==l||null==h?(e<1&&(Yo(n,r,o,e,sr),r=sr[1],o=sr[2],Yo(i,s,a,e,sr),s=sr[1],a=sr[2]),t.quadraticCurveTo(r,s,o,a)):(e<1&&(Ho(n,r,l,o,e,sr),r=sr[1],l=sr[2],o=sr[3],Ho(i,s,h,a,e,sr),s=sr[1],h=sr[2],a=sr[3]),t.bezierCurveTo(r,s,l,h,o,a)))},pointAt:function(t){return lr(this.shape,t,!1)},tangentAt:function(t){t=lr(this.shape,t,!0);return kt(t,t)}}),pr=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)}}),gr=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)}});hr.prototype={constructor:hr,addColorStop:function(t,e){this.colorStops.push({offset:t,color:e})}},ur.prototype={constructor:ur},a(ur,hr);function fr(t){fi.call(this,t),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}cr.prototype={constructor:cr},a(cr,hr),fr.prototype.incremental=!0,fr.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},fr.prototype.addDisplayable=function(t,e){(e?this._temporaryDisplayables:this._displayables).push(t),this.dirty()},fr.prototype.addDisplayables=function(t,e){e=e||!1;for(var n=0;n<t.length;n++)this.addDisplayable(t[n],e)},fr.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])},fr.prototype.update=function(){this.updateTransform();for(var t=this._cursor;t<this._displayables.length;t++)(e=this._displayables[t]).parent=this,e.update(),e.parent=null;for(var e,t=0;t<this._temporaryDisplayables.length;t++)(e=this._temporaryDisplayables[t]).parent=this,e.update(),e.parent=null},fr.prototype.brush=function(t,e){for(var n=this._cursor;n<this._displayables.length;n++)(i=this._displayables[n]).beforeBrush&&i.beforeBrush(t),i.brush(t,n===this._cursor?null:this._displayables[n-1]),i.afterBrush&&i.afterBrush(t);this._cursor=n;for(var i,n=0;n<this._temporaryDisplayables.length;n++)(i=this._temporaryDisplayables[n]).beforeBrush&&i.beforeBrush(t),i.brush(t,0===n?null:this._temporaryDisplayables[n-1]),i.afterBrush&&i.afterBrush(t);this._temporaryDisplayables=[],this.notClear=!0};var mr=[],yr=(fr.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(mr)),t.union(i)}this._rect=t}return this._rect},fr.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(fr,fi),Math.round),vr=Math.max,xr=Math.min,_r={};function wr(t){return r.extend(t)}function br(t,e,n,i){t=new r(Ka(t,e)),e=t.getBoundingRect();return n&&Tr(t,n="center"===i?Mr(n,e):n),t}function Sr(t,e,n){var i=new mi({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(Mr(e,t)))}});return i}function Mr(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 Ir=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 Tr(t,e){t.applyTransform&&(e=t.getBoundingRect().calculateTransform(e),t.applyTransform(e))}function Dr(t){var e=t.shape,n=t.style.lineWidth;return yr(2*e.x1)===yr(2*e.x2)&&(e.x1=e.x2=Cr(e.x1,n,!0)),yr(2*e.y1)===yr(2*e.y2)&&(e.y1=e.y2=Cr(e.y1,n,!0)),t}function Ar(t){var e=t.shape,n=t.style.lineWidth,i=e.x,o=e.y,a=e.width,r=e.height;return e.x=Cr(e.x,n,!0),e.y=Cr(e.y,n,!0),e.width=Math.max(Cr(i+a,n,!1)-e.x,0===a?0:1),e.height=Math.max(Cr(o+r,n,!1)-e.y,0===r?0:1),t}function Cr(t,e,n){t=yr(2*t);return(t+yr(e))%2==0?t/2:(t+(n?1:-1))/2}function Lr(t){return null!=t&&"none"!=t}function kr(t){return"string"==typeof t?Ae(t,-.1):t}function Pr(t){if(t.__hoverStlDirty){var e,n=t.style.stroke,i=t.style.fill,o=t.__hoverStl,a=(o.fill=o.fill||(Lr(i)?kr(i):null),o.stroke=o.stroke||(Lr(n)?kr(n):null),{});for(e in o)null!=o[e]&&(a[e]=t.style[e]);t.__normalStl=a,t.__hoverStlDirty=!1}}function Nr(t){var e,n,i,o;t.__isHover||(Pr(t),t.useHoverLayer?t.__zr&&t.__zr.addHover(t,t.__hoverStl):((n=(e=t.style).insideRollbackOpt)&&(o=(i=e).insideRollback)&&(i.textFill=o.textFill,i.textStroke=o.textStroke,i.textStrokeWidth=o.textStrokeWidth),e.extendFrom(t.__hoverStl),n&&(jr(e,e.insideOriginalTextPosition,n),null==e.textFill)&&(e.textFill=n.autoColor),t.dirty(!1),t.z2+=1),t.__isHover=!0)}function Or(t){var e;t.__isHover&&(e=t.__normalStl,t.useHoverLayer?t.__zr&&t.__zr.removeHover(t):(e&&t.setStyle(e),--t.z2),t.__isHover=!1)}function Er(t){"group"===t.type?t.traverse(function(t){"group"!==t.type&&Nr(t)}):Nr(t)}function zr(t){"group"===t.type?t.traverse(function(t){"group"!==t.type&&Or(t)}):Or(t)}function Rr(t,e){t.__hoverStl=t.hoverStyle||e||{},t.__hoverStlDirty=!0,t.__isHover&&Pr(t)}function Br(t){this.__hoverSilentOnTouch&&t.zrByTouch||this.__isEmphasis||Er(this)}function Vr(t){this.__hoverSilentOnTouch&&t.zrByTouch||this.__isEmphasis||zr(this)}function Gr(){this.__isEmphasis=!0,Er(this)}function Wr(){this.__isEmphasis=!1,zr(this)}function Fr(t,e,n){t.__hoverSilentOnTouch=n&&n.hoverSilentOnTouch,"group"===t.type?t.traverse(function(t){"group"!==t.type&&Rr(t,e)}):Rr(t,e),t.on("mouseover",Br).on("mouseout",Vr),t.on("emphasis",Gr).on("normal",Wr)}function Hr(t,e,n,i,o,a,r){var s,l=(o=o||_r).labelFetcher,h=o.labelDataIndex,u=o.labelDimIndex,c=n.getShallow("show"),d=i.getShallow("show"),c=((c||d)&&null==(s=l?l.getFormattedLabel(h,"normal",null,u):s)&&(s=et(o.defaultText)?o.defaultText(h,o):o.defaultText),c?s:null),d=d?lt(l?l.getFormattedLabel(h,"emphasis",null,u):null,s):null;null==c&&null==d||(Zr(t,n,a,o),Zr(e,i,r,o,!0)),t.text=c,e.text=d}function Zr(t,e,n,i,o){return Ur(t,e,i,o),n&&O(t,n),t.host&&t.host.dirty&&t.host.dirty(!1),t}function Ur(t,e,n,i){(n=n||_r).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=lt(e.getShallow("distance"),i?null:5));var o,a,r=e.ecModel,s=r&&r.option.textStyle,l=function(t){var e;for(;t&&t!==t.ecModel;){var n=(t.option||_r).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 h in o={},l)l.hasOwnProperty(h)&&(a=e.getModel(["rich",h]),Xr(o[h]={},a,s,n,i));t.rich=o,Xr(t,e,s,n,i,!0),n.forceRich&&!n.textStyle&&(n.textStyle={})}function Xr(t,e,n,i,o,a){n=!o&&n||_r,t.textFill=Yr(e.getShallow("color"),i)||n.color,t.textStroke=Yr(e.getShallow("textBorderColor"),i)||n.textBorderColor,t.textStrokeWidth=lt(e.getShallow("textBorderWidth"),n.textBorderWidth),o||(a&&(o=t.textPosition,t.insideRollback=jr(t,o,i),t.insideOriginalTextPosition=o,t.insideRollbackOpt=i),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=Yr(e.getShallow("backgroundColor"),i),t.textPadding=e.getShallow("padding"),t.textBorderColor=Yr(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 Yr(t,e){return"auto"!==t?t:e&&e.autoColor?e.autoColor:null}function jr(t,e,n){var i,o=n.useInsideStyle;return null==t.textFill&&!1!==o&&(!0===o||n.isRectText&&e&&"string"==typeof e&&0<=e.indexOf("inside"))&&(i={textFill:null,textStroke:t.textStroke,textStrokeWidth:t.textStrokeWidth},t.textFill="#fff",null==t.textStroke)&&(t.textStroke=n.autoColor,null==t.textStrokeWidth)&&(t.textStrokeWidth=2),i}function qr(t,e){e=e||e.getModel("textStyle");return dt([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 Kr(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 V(t,e,n,i,o){Kr(!0,t,e,n,i,o)}function $r(t,e,n,i,o){Kr(!1,t,e,n,i,o)}function Jr(t,e){for(var n=qt([]);t&&t!==e;)$t(n,t.getLocalTransform(),n),t=t.parent;return n}function Qr(t,e,n){return e&&!J(e)&&(e=re.getLocalTransform(e)),Rt([],t,e=n?ee([],e):e)}function ts(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=Qr(["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 es(t,e,i,n){var o,a;function r(t){var e={position:St(t.position),rotation:t.rotation};return t.shape&&(e.shape=O({},t.shape)),e}t&&e&&(a={},t.traverse(function(t){!t.isGroup&&t.anid&&(a[t.anid]=t)}),o=a,e.traverse(function(t){var e,n;!t.isGroup&&t.anid&&(e=o[t.anid])&&(n=r(t),t.attr(r(e)),V(t,n,i,t.dataIndex))}))}function ns(t,n){return I(t,function(t){var e=t[0],e=vr(e,n.x),t=(e=xr(e,n.x+n.width),t[1]),t=vr(t,n.y);return[e,xr(t,n.y+n.height)]})}function is(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 mi(e)):br(t.replace("path://",""),e,n,"center")}var os=Object.freeze({__proto__:null,Arc:pr,BezierCurve:dr,BoundingRect:Z,Circle:$a,CompoundPath:gr,Group:z,Image:mi,IncrementalDisplayable:fr,Line:rr,LinearGradient:ur,Polygon:or,Polyline:ar,RadialGradient:cr,Rect:B,Ring:er,Sector:tr,Text:R,applyTransform:Qr,clipPointsByRect:ns,clipRectByRect:function(t,e){var n=vr(t.x,e.x),i=xr(t.x+t.width,e.x+e.width),o=vr(t.y,e.y),t=xr(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:is,extendPath:function(t,e){return r.extend(Ka(t,e))},extendShape:wr,getFont:qr,getTransform:Jr,groupTransition:es,initProps:$r,makeImage:Sr,makePath:br,mergePath:Ir,resizePath:Tr,setHoverStyle:Fr,setLabelStyle:Hr,setText:function(t,e,n){var i,o={isRectText:!0};!1===n?i=!0:o.autoColor=n,Ur(t,e,o,i),t.host&&t.host.dirty&&t.host.dirty(!1)},setTextStyle:Zr,subPixelOptimize:Cr,subPixelOptimizeLine:Dr,subPixelOptimizeRect:Ar,transformDirection:ts,updateProps:V}),as=["textStyle","color"],e={getTextColor:function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(as):null)},getFont:function(){return qr({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(t){return Vn(t,this.getFont(),this.getShallow("align"),this.getShallow("verticalAlign")||this.getShallow("baseline"),this.getShallow("padding"),this.getShallow("rich"),this.getShallow("truncateText"))}},rs=Io([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),ss={getItemStyle:function(t,e){t=rs(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,ls=uo();function w(t,e,n){this.parentModel=e,this.ecModel=n,this.option=t}function hs(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 us(t,e){var n=ls(t).getParent;return n?n.call(t,e):t.parentModel}w.prototype={constructor:w,init:null,mergeOption:function(t){p(this.option,t,!0)},get:function(t,e){return null==t?this.option:hs(this.option,this.parsePath(t),!e&&us(this,t))},getShallow:function(t,e){var n=this.option,n=null==n?n:n[t],e=!e&&us(this,t);return n=null==n&&e?e.getShallow(t):n},getModel:function(t,e){var n;return new w(null==t?this.option:hs(this.option,t=this.parsePath(t)),e=e||(n=us(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){ls(this).getParent=t},isAnimationEnabled:function(){if(!y.node)return null!=this.option.animation?!!this.option.animation:this.parentModel?this.parentModel.isAnimationEnabled():void 0}},xo(w),wo(w),n(w,Do),n(w,Co),n(w,e),n(w,ss);var cs=0;function ds(t){return[t||"",cs++,Math.random().toFixed(5)].join("_")}function ps(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 G(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 gs(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),n?t:+t}function fs(t){return t.sort(function(t,e){return t-e}),t}function ms(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 ys(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 xs(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 h=Number.NEGATIVE_INFINITY,u=null,c=0,d=l.length;c<d;++c)l[c]>h&&(h=l[c],u=c);++r[u],l[u]=0,++s}return r[e]/o}var _s=9007199254740991;function ws(t){var e=2*Math.PI;return(t%e+e)%e}function bs(t){return-1e-4<t&&t<1e-4}var Ss=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function Ms(t){var e,n;return t instanceof Date?t:"string"==typeof t?(e=Ss.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 Is(t){return Math.pow(10,Ts(t))}function Ts(t){return Math.floor(Math.log(t)/Math.LN10)}function Ds(t,e){var n=Ts(t),i=Math.pow(10,n),o=t/i,e=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;return t=e*i,-20<=n?+t.toFixed(n<0?-n:0):t}function As(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 Cs(t){return 0<=t-parseFloat(t)}Do=Object.freeze({__proto__:null,MAX_SAFE_INTEGER:_s,asc:fs,getPercentWithPrecision:xs,getPixelPrecision:vs,getPrecision:ms,getPrecisionSafe:ys,isNumeric:Cs,isRadianAroundZero:bs,linearMap:ps,nice:Ds,parseDate:Ms,parsePercent:G,quantity:Is,reformIntervals:As,remRadian:ws,round:gs});function Ls(t){return isNaN(t)?"-":(t=(t+"").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(1<t.length?"."+t[1]:"")}function ks(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 Ps=ct,Ns=/([&<>"'])/g,Os={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Es(t){return null==t?"":(t+"").replace(Ns,function(t,e){return Os[e]})}function zs(t,e){return"{"+t+(null==e?"":e)+"}"}var Rs=["a","b","c","d","e","f","g"];function Bs(t,e,n){var i=(e=k(e)?e:[e]).length;if(!i)return"";for(var o=e[0].$vars||[],a=0;a<o.length;a++){var r=Rs[a];t=t.replace(zs(r),zs(r,0))}for(var s=0;s<i;s++)for(var l=0;l<o.length;l++){var h=e[s][o[l]];t=t.replace(zs(Rs[l],s),n?Es(h):h)}return t}function Vs(n,t,i){return E(t,function(t,e){n=n.replace("{"+e+"}",i?Es(t):t)}),n}function Gs(t,e){var n=(t=nt(t)?{color:t,extraCssText:e}:t||{}).color,i=t.type,e=t.extraCssText;return n?"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:'+Es(n)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:'+Es(n)+";"+(e||"")+'"></span>':""}function Ws(t,e){return"0000".substr(0,e-(t+="").length)+t}function Fs(t,e,n){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var e=Ms(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=t.replace("MM",Ws(o,2)).replace("M",o).replace("yyyy",i).replace("yy",i%100).replace("dd",Ws(a,2)).replace("d",a).replace("hh",Ws(r,2)).replace("h",r).replace("mm",Ws(s,2)).replace("m",s).replace("ss",Ws(l,2)).replace("s",l).replace("SSS",Ws(e,3))}function Hs(t){return t&&t.charAt(0).toUpperCase()+t.substr(1)}var Zs=Fn,Co=Object.freeze({__proto__:null,addCommas:Ls,capitalFirst:Hs,encodeHTML:Es,formatTime:Fs,formatTpl:Bs,formatTplSimple:Vs,getTextRect:Vn,getTooltipMarker:Gs,normalizeCssArray:Ps,toCamelCase:ks,truncateText:Zs}),Us=E,Xs=["left","right","top","bottom","width","height"],Ys=[["width","left","right"],["height","top","bottom"]];function js(s,l,h,u,c){var d=0,p=0,g=(null==u&&(u=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?(i=r.width+(e?-e.x+r.x:0),u<(n=d+i)||t.newline?(d=0,n=i,p+=g+h,r.height):Math.max(g,r.height)):(i=r.height+(e?-e.y+r.y:0),c<(o=p+i)||t.newline?(d+=g+h,p=0,o=i,r.width):Math.max(g,r.width)),t.newline||(a[0]=d,a[1]=p,"horizontal"===s?d=n+h:p=o+h)})}var qs=js;function Ks(t,e,n){n=Ps(n||0);var i=e.width,o=e.height,a=G(t.left,i),r=G(t.top,o),e=G(t.right,i),s=G(t.bottom,o),l=G(t.width,i),h=G(t.height,o),u=n[2]+n[0],c=n[1]+n[3],d=t.aspect;switch(isNaN(l)&&(l=i-e-c-a),isNaN(h)&&(h=o-s-u-r),null!=d&&(isNaN(l)&&isNaN(h)&&(i/o<d?l=.8*i:h=.8*o),isNaN(l)&&(l=d*h),isNaN(h))&&(h=l/d),isNaN(a)&&(a=i-e-l-c),isNaN(r)&&(r=o-s-h-u),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-h/2-n[0];break;case"bottom":r=o-h-u}a=a||0,r=r||0,isNaN(l)&&(l=i-c-a-(e||0)),isNaN(h)&&(h=o-u-r-(s||0));d=new Z(a+n[3],r+n[0],l,h);return d.margin=n,d}function $s(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=Ks(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 Js(l,h,t){var u=(t=T(t)?t:{}).ignoreSize,t=(k(u)||(u=[u,u]),n(Ys[0],0)),e=n(Ys[1],1);function n(t,e){var n={},i=0,o={},a=0;if(Us(t,function(t){o[t]=l[t]}),Us(t,function(t){c(h,t)&&(n[t]=o[t]=h[t]),d(n,t)&&i++,d(o,t)&&a++}),u[e])d(h,t[1])?o[t[2]]=null:d(h,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){Us(t,function(t){e[t]=n[t]})}i(Ys[0],l,t),i(Ys[1],l,e)}function Qs(t){return tl({},t)}function tl(e,n){return n&&e&&Us(Xs,function(t){n.hasOwnProperty(t)&&(e[t]=n[t])}),e}L(js,"vertical"),L(js,"horizontal");var el,nl,il,ol=uo(),h=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=ds("ec_cpt_model")},init:function(t,e,n,i){this.mergeDefaultAndTheme(t,n)},mergeDefaultAndTheme:function(t,e){var n=this.layoutMode,i=n?Qs(t):{};p(t,e.getTheme().get(this.mainType)),p(t,this.getDefaultOption()),n&&Js(t,i,n)},mergeOption:function(t,e){p(this.option,t,!0);var n=this.layoutMode;n&&Js(this.option,t,n)},optionUpdated:function(t,e){},getDefaultOption:function(){var t=ol(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=p(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 al(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}Mo(h,{registerWhenExtend:!0}),nl={},(el=h).registerSubTypeDefaulter=function(t,e){t=vo(t),nl[t.main]=e},el.determineSubType=function(t,e){var n,i=e.type;return i||(n=vo(t).main,el.hasSubTypes(t)&&nl[n]&&(i=nl[n](e))),i},il=function(t){var e=[];E(h.getClassesByMainType(t),function(t){e=e.concat(t.prototype.dependencies||[])}),e=I(e,function(t){return vo(t).main}),"dataset"!==t&&f(e,"dataset")<=0&&e.unshift("dataset");return e},h.topologicalTravel=function(t,e,n,i){if(t.length){r={},s=[],E(a=e,function(n){var e,i,o=al(r,n),t=o.originalDeps=il(n),t=(e=a,i=[],E(t,function(t){0<=f(e,t)&&i.push(t)}),i);o.entryCount=t.length,0===o.entryCount&&s.push(n),E(t,function(t){f(o.predecessor,t)<0&&o.predecessor.push(t);var e=al(r,t);f(e.successor,t)<0&&e.successor.push(n)})});var a,r,s,e={graph:r,noEntryList:s},o=e.graph,l=e.noEntryList,h={};for(E(t,function(t){h[t]=!0});l.length;){var u=l.pop(),c=o[u],d=!!h[u];d&&(n.call(i,u,c.originalDeps.slice()),delete h[u]),E(c.successor,d?g:p)}E(h,function(){throw new Error("Circle dependency may exists")})}function p(t){o[t].entryCount--,0===o[t].entryCount&&l.push(t)}function g(t){h[t]=!0,p(t)}},i(h,{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="",rl={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},sl=uo();var ll={clearColorPalette:function(){sl(this).colorIdx=0,sl(this).colorNameMap={}},getColorFromPalette:function(t,e,n){var i,o,e=sl(e=e||this),a=e.colorIdx||0,r=e.colorNameMap=e.colorNameMap||{};return r.hasOwnProperty(t)?r[t]:(i=eo(this.get("color",!0)),o=this.get("colorLayer",!0),(o=(o=null!=n&&o?function(t,e){for(var n=t.length,i=0;i<n;i++)if(t[i].length>e)return t[i];return t[n-1]}(o,n):i)||i)&&o.length?(n=o[a],t&&(r[t]=n),e.colorIdx=(a+1)%o.length,n):void 0)}};function hl(t){var e=t.get("coordinateSystem"),n={coordSysName:e,coordSysDims:[],axisMap:P(),categoryAxisMap:P()},e=ul[e];if(e)return e(t,n,n.axisMap,n.categoryAxisMap),n}var ul={cartesian2d:function(t,e,n,i){var o=t.getReferringComponents("xAxis")[0],a=t.getReferringComponents("yAxis")[0];if(A){if(!o)throw new Error('xAxis "'+st(t.get("xAxisIndex"),t.get("xAxisId"),0)+'" not found');if(!a)throw new Error('yAxis "'+st(t.get("xAxisIndex"),t.get("yAxisId"),0)+'" not found')}e.coordSysDims=["x","y"],n.set("x",o),n.set("y",a),cl(o)&&(i.set("x",o),e.firstCategoryDimIndex=0),cl(a)&&(i.set("y",a),e.firstCategoryDimIndex=1)},singleAxis:function(t,e,n,i){t=t.getReferringComponents("singleAxis")[0];if(A&&!t)throw new Error("singleAxis should be specified.");e.coordSysDims=["single"],n.set("single",t),cl(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(A){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),cl(o)&&(i.set("radius",o),e.firstCategoryDimIndex=0),cl(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();E(t.parallelAxisIndex,function(t,e){var t=r.getComponent("parallelAxis",t),n=s[e];o.set(n,t),cl(t)&&null==i.firstCategoryDimIndex&&(a.set(n,t),i.firstCategoryDimIndex=e)})}};function cl(t){return"category"===t.get("type")}var dl="original",pl="arrayRows",gl="objectRows",fl="keyedColumns",ml="unknown",yl="typedArray",vl="column",xl="row";function _l(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===fl?{}:[]),this.sourceFormat=t.sourceFormat||ml,this.seriesLayoutBy=t.seriesLayoutBy||vl,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&P(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}_l.seriesDataToSource=function(t){return new _l({data:t,sourceFormat:ot(t)?yl:dl,fromDataset:!1})},wo(_l);var wl=uo();function bl(t){var e=t.option,n=e.data,i=ot(n)?yl:dl,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),h=(l&&(n=(h=l.option).source,i=wl(l).sourceFormat,o=!0,a=a||h.seriesLayoutBy,null==r&&(r=h.sourceHeader),s=s||h.dimensions),function(t,e,n,i,o){if(!t)return{dimensionsDefine:Sl(o)};var a,r,s,l;e===pl?("auto"===i||null==i?Ml(function(t){null!=t&&"-"!==t&&(nt(t)?null==r&&(r=1):r=0)},n,t,10):r=i?1:0,o||1!==r||(o=[],Ml(function(t,e){o[e]=null!=t?t:""},n,t)),a=o?o.length:n===xl?t.length:t[0]?t[0].length:null):e===gl?o||(o=function(t){var e,n=0;for(;n<t.length&&!(e=t[n++]););{var i;if(e)return i=[],E(e,function(t,e){i.push(e)}),i}}(t),s=!0):e===fl?o||(o=[],s=!0,E(t,function(t,e){o.push(e)})):e===dl?(i=oo(t[0]),a=k(i)&&i.length||1):e===yl&&A&&x(!!o,"dimensions must be given if data is TypedArray.");s&&E(o,function(t,e){"name"===(T(t)?t.name:t)&&(l=e)});return{startIndex:r,dimensionsDefine:Sl(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,s=hl(t),l={},h=[],u=[],c=t.subType,d=P(["pie","map","funnel"]),p=P(["line","bar","pictorialBar","scatter","effectScatter","candlestick","boxplot"]);if(s&&null!=p.get(c)){var p=t.ecModel,t=wl(p).datasetMap,p=e.uid+"_"+o,g=t.get(p)||t.set(p,{categoryWayDim:1,valueWayDim:0});E(s.coordSysDims,function(t){var e;null==s.firstCategoryDimIndex?(e=g.valueWayDim++,u.push(l[t]=e)):s.categoryAxisMap.get(t)?h.push(l[t]=0):(e=g.categoryWayDim++,u.push(l[t]=e))})}else if(null!=d.get(c)){for(var f=0;f<5&&null==r;f++)Il(n,i,o,a.dimensionsDefine,a.startIndex,f)||(r=f);null!=r&&(l.value=r,e=a.potentialNameDimIndex||Math.max(r-1,0),u.push(e),h.push(e))}return h.length&&(l.itemName=h),u.length&&(l.seriesName=u),l}(t,l,n,i,a,h)),wl(t).source=new _l({data:n,fromDataset:o,seriesLayoutBy:a,sourceFormat:i,dimensionsDefine:h.dimensionsDefine,startIndex:h.startIndex,dimensionsDetectCount:h.dimensionsDetectCount,encodeDefine:r})}function Sl(t){var i;if(t)return i=P(),I(t,function(t,e){var n;return null!=(t=O({},T(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 Ml(t,e,n,i){if(null==i&&(i=1/0),e===xl)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 Il(t,e,n,i,o,a){var r,s;if(!ot(t))if(i&&(s=T(s=i[a])?s.name:s),e===pl)if(n===xl){for(var l=t[a],h=0;h<(l||[]).length&&h<5;h++)if(null!=(r=p(l[o+h])))return r}else for(h=0;h<t.length&&h<5;h++){var u=t[o+h];if(u&&null!=(r=p(u[a])))return r}else if(e===gl){if(!s)return;for(h=0;h<t.length&&h<5;h++)if((c=t[h])&&null!=(r=p(c[s])))return r}else if(e===fl){if(!s)return;if(!(l=t[s])||ot(l))return!1;for(h=0;h<l.length&&h<5;h++)if(null!=(r=p(l[h])))return r}else if(e===dl)for(h=0;h<t.length&&h<5;h++){var c,d=oo(c=t[h]);if(!k(d))return!1;if(null!=(r=p(d[a])))return r}return!1;function p(t){return(null==t||!isFinite(t)||""===t)&&(!(!nt(t)||"-"===t)||void 0)}}var Tl="\0_ec_inner",Dl=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){x(!(Tl 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[Tl]=1,this._componentsMap=P({series:[]}),this._seriesIndices,this._seriesIndicesMap,function(n,t){var i=n.color&&!n.colorLayer;E(t,function(t,e){"colorLayer"===e&&i||h.hasClass(e)||("object"==typeof t?n[e]=n[e]?p(n[e],t,!1):N(t):null==n[e]&&(n[e]=t))})}(t,this._theme.option),p(t,rl,!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&&E(e,function(t){this.mergeOption(t,n=!0)},this),n},mergeOption:function(n){var s=this.option,l=this._componentsMap,i=[];wl(this).datasetMap=P(),E(n,function(t,e){null!=t&&(h.hasClass(e)?e&&i.push(e):s[e]=null==s[e]?N(t):p(s[e],t,!0))}),h.topologicalTravel(i,h.getAllClassMainTypes(),function(a,t){var e=eo(n[a]),e=ao(l.get(a),e),r=(ro(e),E(e,function(t,e){var n,i=t.option;T(i)&&(t.keyInfo.mainType=a,t.keyInfo.subType=(n=a,i=i,t=t.exist,i.type||(t?t.subType:h.determineSubType(n,i))))}),function(e,t){k(t)||(t=t?[t]:[]);var n={};return E(t,function(t){n[t]=(e.get(t)||[]).slice()}),n}(l,t));s[a]=[],l.set(a,[]),E(e,function(t,e){var n,i=t.exist,o=t.option;x(T(o)||i,"Empty component definition"),o?(n=h.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&&Al(this,l.get("series"))},this),this._seriesIndicesMap=P(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var i=N(this.option);return E(i,function(t,e){if(h.hasClass(e)){for(var n=(t=eo(t)).length-1;0<=n;n--)lo(t[n])&&t.splice(n,1);i[e]=t}}),delete i[Tl],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?Cl(null!=e?tt(I(e=k(e)?e:[e],function(t){return o[t]}),function(t){return!!t}):null!=n?(a=k(n),tt(o,function(t){return a&&0<=f(n,t.id)||!a&&t.id===n})):null!=i?(r=k(i),tt(o,function(t){return r&&0<=f(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=n)||null==n[o]&&null==n[a]&&null==n[e]?null:{mainType:i,index:n[o],id:n[a],name:n[e]}),a=o?this.queryComponents(o):this._componentsMap.get(i);return n=Cl(a,t),t.filter?tt(n,t.filter):n},eachComponent:function(t,i,o){var e=this._componentsMap;"function"==typeof t?(o=i,i=t,e.each(function(t,n){E(t,function(t,e){i.call(o,n,t,e)})})):nt(t)?E(e.get(t),i,o):T(t)&&E(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){Ll(this),E(this._seriesIndices,function(t){var e=this._componentsMap.get("series")[t];n.call(i,e,t)},this)},eachRawSeries:function(t,e){E(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(n,i,o){Ll(this),E(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 E(this.getSeriesByType(t),e,n)},isSeriesFiltered:function(t){return Ll(this),null==this._seriesIndicesMap.get(t.componentIndex)},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(t,e){Ll(this);t=tt(this._componentsMap.get("series"),t,e);Al(this,t)},restoreData:function(n){var i=this._componentsMap,o=(Al(this,i.get("series")),[]);i.each(function(t,e){o.push(e)}),h.topologicalTravel(o,h.getAllClassMainTypes(),function(e,t){E(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 Al(t,e){t._seriesIndicesMap=P(t._seriesIndices=I(e,function(t){return t.componentIndex})||[])}function Cl(t,e){return e.hasOwnProperty("subType")?tt(t,function(t){return t.subType===e.subType}):t}function Ll(t){if(A&&!t._seriesIndices)throw new Error("Option should contains series.")}i(Dl,ll);var kl=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"];function Pl(e){E(kl,function(t){this[t]=D(e[t],e)},this)}var Nl={};function Ol(){this._coordinateSystems=[]}Ol.prototype={constructor:Ol,create:function(n,i){var o=[];E(Nl,function(t,e){t=t.create(n,i);o=o.concat(t||[])}),this._coordinateSystems=o},update:function(e,n){E(this._coordinateSystems,function(t){t.update&&t.update(e,n)})},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},Ol.register=function(t,e){Nl[t]=e},Ol.get=function(t){return Nl[t]};var El=E,zl=N,Rl=I,Bl=p,Vl=/^(min|max)?(.+)$/;function Gl(t){this._api=t,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}var Wl=E,Fl=T,Hl=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Zl(t){var e=t&&t.itemStyle;if(e)for(var n=0,i=Hl.length;n<i;n++){var o=Hl[n],a=e.normal,r=e.emphasis;a&&a[o]&&(t[o]=t[o]||{},t[o].normal?p(t[o].normal,a[o]):t[o].normal=a[o],a[o]=null),r&&r[o]&&(t[o]=t[o]||{},t[o].emphasis?p(t[o].emphasis,r[o]):t[o].emphasis=r[o],r[o]=null)}}function Ul(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 Xl(t){Ul(t,"itemStyle"),Ul(t,"lineStyle"),Ul(t,"areaStyle"),Ul(t,"label"),Ul(t,"labelLine"),Ul(t,"upperLabel"),Ul(t,"edgeLabel")}function Yl(t,e){var n=Fl(t)&&t[e],i=Fl(n)&&n.textStyle;if(i)for(var o=0,a=io.length;o<a;o++){e=io[o];i.hasOwnProperty(e)&&(n[e]=i[e])}}function jl(t){t&&(Xl(t),Yl(t,"label"),t.emphasis)&&Yl(t.emphasis,"label")}function ql(t){return k(t)?t:t?[t]:[]}function Kl(t){return(k(t)?t[0]:t)||{}}function $l(e,t){Wl(ql(e.series),function(t){if(Fl(t))if(Fl(t)){Zl(t),Xl(t),Yl(t,"label"),Yl(t,"upperLabel"),Yl(t,"edgeLabel"),t.emphasis&&(Yl(t.emphasis,"label"),Yl(t.emphasis,"upperLabel"),Yl(t.emphasis,"edgeLabel"));var e=t.markPoint,n=(e&&(Zl(e),jl(e)),t.markLine),i=(n&&(Zl(n),jl(n)),t.markArea),o=(i&&jl(i),t.data);if("graph"===t.type){var o=o||t.nodes,a=t.links||t.edges;if(a&&!ot(a))for(var r=0;r<a.length;r++)jl(a[r]);E(t.categories,function(t){Xl(t)})}if(o&&!ot(o))for(r=0;r<o.length;r++)jl(o[r]);if((e=t.markPoint)&&e.data)for(var s=e.data,r=0;r<s.length;r++)jl(s[r]);if((n=t.markLine)&&n.data)for(var l=n.data,r=0;r<l.length;r++)k(l[r])?(jl(l[r][0]),jl(l[r][1])):jl(l[r]);"gauge"===t.type?(Yl(t,"axisLabel"),Yl(t,"title"),Yl(t,"detail")):"treemap"===t.type?(Ul(t.breadcrumb,"itemStyle"),E(t.levels,function(t){Xl(t)})):"tree"===t.type&&Xl(t.leaves)}});var n=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&n.push("valueAxis","categoryAxis","logAxis","timeAxis"),Wl(n,function(t){Wl(ql(e[t]),function(t){t&&(Yl(t,"axisLabel"),Yl(t.axisPointer,"label"))})}),Wl(ql(e.parallel),function(t){t=t&&t.parallelAxisDefault;Yl(t,"axisLabel"),Yl(t&&t.axisPointer,"label")}),Wl(ql(e.calendar),function(t){Ul(t,"itemStyle"),Yl(t,"dayLabel"),Yl(t,"monthLabel"),Yl(t,"yearLabel")}),Wl(ql(e.radar),function(t){Yl(t,"name")}),Wl(ql(e.geo),function(t){Fl(t)&&(jl(t),Wl(ql(t.regions),function(t){jl(t)}))}),Wl(ql(e.timeline),function(t){jl(t),Ul(t,"label"),Ul(t,"itemStyle"),Ul(t,"controlStyle",!0);t=t.data;k(t)&&E(t,function(t){T(t)&&(Ul(t,"label"),Ul(t,"itemStyle"))})}),Wl(ql(e.toolbox),function(t){Ul(t,"iconStyle"),Wl(t.feature,function(t){Ul(t,"iconStyle")})}),Yl(Kl(e.axisPointer),"label"),Yl(Kl(e.tooltip).axisPointer,"label")}function Jl(e){E(Ql,function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])})}var Ql=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],th=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"];function eh(e,t){$l(e,t),e.series=eo(e.series),E(e.series,function(t){if(T(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)}}Jl(t)}}),e.dataRange&&(e.visualMap=e.dataRange),E(th,function(t){t=e[t];t&&E(t=k(t)?t:[t],function(t){Jl(t)})})}function nh(f){E(f,function(h,u){var c=[],d=[NaN,NaN],t=[h.stackResultDimension,h.stackedOverDimension],p=h.data,g=h.isStackedByIndex,t=p.map(t,function(t,e,n){var i,o,a=p.get(h.stackedDimension,n);if(isNaN(a))return d;g?o=p.getRawIndex(n):i=p.get(h.stackedByDimension,n);for(var r=NaN,s=u-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),h.data=t})}function ih(t,e){_l.isInstance(t)||(t=_l.seriesDataToSource(t)),this._source=t;var n=this._data=t.data,i=t.sourceFormat;if(i===yl){if(A&&null==e)throw new Error("Typed array data must specify dimension size");this._offset=0,this._dimSize=e,this._data=n}e=oh[i===pl?i+"_"+t.seriesLayoutBy:i];A&&x(e,"Invalide sourceFormat: "+i),O(this,e)}var n=ih.prototype,oh=(n.pure=!(Gl.prototype={constructor:Gl,setOption:function(t,e){t&&E(eo(t.series),function(t){t&&t.data&&ot(t.data)&&gt(t.data)}),t=zl(t);var o,n=this._optionBackup,t=function(t,n,i){var e,o,a=[],r=[],s=t.timeline;t.baseOption&&(o=t.baseOption);(s||t.options)&&(o=o||{},a=(t.options||[]).slice());{var l;t.media&&(o=o||{},l=t.media,El(l,function(t){t&&t.option&&(t.query?r.push(t):e=e||t)}))}o=o||t;o.timeline||(o.timeline=s);return El([o].concat(a).concat(I(r,function(t){return t.option})),function(e){El(n,function(t){t(e,i)})}),{baseOption:o,timelineOptions:a,mediaDefault:e,mediaList:r}}.call(this,t,e,!n);this._newBaseOption=t.baseOption,n?(o=n.baseOption,e=t.baseOption,El(e=e||{},function(t,e){var n,i;null!=t&&(n=o[e],h.hasClass(e)?(t=eo(t),i=ao(n=eo(n),t),o[e]=Rl(i,function(t){return t.option&&t.exist?Bl(t.exist,t.option,!0):t.exist||t.option})):o[e]=Bl(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=Rl(e.timelineOptions,zl),this._mediaList=Rl(e.mediaList,zl),this._mediaDefault=zl(e.mediaDefault),this._currentMediaIndices=[],zl(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,n=this._timelineOptions;return e=n.length&&(t=t.getComponent("timeline"))?zl(n[t.getCurrentIndex()]):e},getMediaOption:function(t){var e=this._api.getWidth(),n=this._api.getHeight(),i=this._mediaList,o=this._mediaDefault,a=[],r=[];if(i.length||o){for(var s,l,h=0,u=i.length;h<u;h++)!function(t,e,n){var i={width:e,height:n,aspectratio:e/n},o=!0;return E(t,function(t,e){var n,e=e.match(Vl);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}(i[h].query,e,n)||a.push(h);(a=!a.length&&o?[-1]:a).length&&(s=a,l=this._currentMediaIndices,s.join(",")!==l.join(","))&&(r=Rl(a,function(t){return zl((-1===t?o:i[t]).option)})),this._currentMediaIndices=a}return r}}),{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:sh},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:ah,getItem:rh,appendData:sh},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;E(t,function(t,e){for(var n=o[e]||(o[e]=[]),i=0;i<(t||[]).length;i++)n.push(t[i])})}},original:{count:ah,getItem:rh,appendData:sh},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){A&&x(ot(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 ah(){return this._data.length}function rh(t){return this._data[t]}function sh(t){for(var e=0;e<t.length;e++)this._data.push(t[e])}var lh={arrayRows:hh,objectRows:function(t,e,n,i){return null!=n?t[i]:t},keyedColumns:hh,original:function(t,e,n,i){t=oo(t);return null!=n&&t instanceof Array?t[n]:t},typedArray:hh};function hh(t,e,n,i){return null!=n?t[n]:t}var uh={arrayRows:ch,objectRows:function(t,e,n,i){return dh(t[e],this._dimensionInfos[e])},keyedColumns:ch,original:function(t,e,n,i){var o=t&&(null==t.value?t:t.value);return this._rawData.pure||!Ji(t=t)||t instanceof Array||(this.hasItemOption=!0),dh(o instanceof Array?o[i]:o,this._dimensionInfos[e])},typedArray:function(t,e,n,i){return t[i]}};function ch(t,e,n,i){return dh(t[i],this._dimensionInfos[e])}function dh(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?+Ms(t):t)||""===t?NaN:+t}function ph(t,e,n){if(t){var i,o,a,r=t.getRawDataItem(e);if(null!=r)return i=t.getProvider().getSource().sourceFormat,(t=t.getDimensionInfo(n))&&(o=t.name,a=t.index),lh[i](r,e,a,o)}}function gh(t,e,n){if(t){var i=t.getProvider().getSource().sourceFormat;if(i===dl||i===gl)return t=t.getRawDataItem(e),(t=i!==dl||T(t)?t:null)?t[n]:void 0}}var fh=/\{@(.+?)\}/g,ss={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");return{componentType:this.mainType,componentSubType:this.subType,seriesType:"series"===this.mainType?this.subType:null,seriesIndex:this.seriesIndex,seriesId:this.id,seriesName:this.name,name:a,dataIndex:o,data:r,dataType:e,value:i,color:n,marker:Gs(n),$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?Bs(n,e).replace(fh,function(t,e){var n=e.length;return"["===e.charAt(0)&&"]"===e.charAt(n-1)&&(e=+e.slice(1,n-1)),ph(a,i,e)}):void 0},getRawValue:function(t,e){return ph(this.getData(e),t)},formatTooltip:function(){}};function mh(t){return new yh(t)}function yh(t){this._reset=(t=t||{}).reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0,this.context}var vh,xh,_h,wh,bh,Sh,e=yh.prototype,Mh=(e.perform=function(t){var e,n,i=this._upstream,o=t&&t.skip,a=(this._dirty&&i&&((a=this.context).data=a.outputData=i.context.outputData),this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!o&&(e=this._plan(this.context)),h(this._modBy)),r=this._modDataCount||0,s=h(t&&t.modBy),l=t&&t.modDataCount||0;function h(t){return t=1<=t?t:1}a===s&&r===l||(e="reset"),!this._dirty&&"reset"!==e||(this._dirty=!1,n=function(t,e){var n,i;t._dueIndex=t._outputDueEnd=t._dueEnd=0,t._settedOutputEnd=null,!e&&t._reset&&((n=t._reset(t.context))&&n.progress&&(i=n.forceFirstProgress,n=n.progress),k(n))&&!n.length&&(n=null);t._progress=n,t._modBy=t._modDataCount=null;e=t._downstream;return e&&e.dirty(),i}(this,o)),this._modBy=s,this._modDataCount=l;a=t&&t.step;if(i?(A&&x(null!=i._outputDueEnd),this._dueEnd=i._outputDueEnd):(A&&x(!this._progress||this._count),this._dueEnd=this._count?this._count(this.context):1/0),this._progress){var u=this._dueIndex,c=Math.min(null!=a?this._dueIndex+a:1/0,this._dueEnd);if(!o&&(n||u<c)){var d=this._progress;if(k(d))for(var p=0;p<d.length;p++)Dh(this,d[p],u,c,s,l);else Dh(this,d,u,c,s,l)}this._dueIndex=c;r=null!=this._settedOutputEnd?this._settedOutputEnd:c;A&&x(r>=this._outputDueEnd),this._outputDueEnd=r}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()},Sh={reset:function(t,e,n,i){xh=t,vh=e,_h=n,wh=i,bh=Math.ceil(wh/_h),Sh.next=1<_h&&0<wh?Th:Ih}});function Ih(){return xh<vh?xh++:null}function Th(){var t=xh%bh*_h+Math.ceil(xh/bh),t=vh<=xh?null:t<wh?t:xh;return xh++,t}function Dh(t,e,n,i,o,a){Mh.reset(n,i,o,a),t._callingProgress=e,t._callingProgress({start:n,end:i,count:i-n,next:Mh.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){A&&x(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 Ah=uo(),Ch=h.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=mh({count:kh,reset:Ph}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n),bl(this);t=this.getInitialData(t,n);Oh(t,this),this.dataTask.context.data=t,A&&x(t,"getInitialData returned invalid data."),Ah(this).dataBeforeProcessed=t,Lh(this)},mergeDefaultAndTheme:function(t,e){var n=this.layoutMode,i=n?Qs(t):{},o=this.subType;h.hasClass(o),p(t,e.getTheme().get(this.subType)),p(t,this.getDefaultOption()),no(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&Js(t,i,n)},mergeOption:function(t,e){t=p(this.option,t,!0),this.fillDataTextStyle(t.data);var n=this.layoutMode,n=(n&&Js(this.option,t,n),bl(this),this.getInitialData(t,e));Oh(n,this),this.dataTask.dirty(),this.dataTask.context.data=n,Ah(this).dataBeforeProcessed=n,Lh(this)},fillDataTextStyle:function(t){if(t&&!ot(t))for(var e=["show"],n=0;n<t.length;n++)t[n]&&t[n].label&&no(t[n],"label",e)},getInitialData:function(){},appendData:function(t){this.getRawData().appendData(t.data)},getData:function(t){var e=zh(this);return e?(e=e.context.data,null==t?e:e.getLinkedData(t)):Ah(this).data},setData:function(t){var e,n=zh(this);n&&((e=n.context).data!==t&&n.modifyOutputEnd&&n.setOutputEnd(t.count()),e.outputData=t,n!==this.dataTask)&&(e.data=t),Ah(this).data=t},getSource:function(){return wl(this).source},getRawData:function(){return Ah(this).dataBeforeProcessed},getBaseAxis:function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},formatTooltip:function(e,o,t){function n(t){return Es(Ls(t))}var a,r,s=this.getData(),i=s.mapDimension("defaultedTooltip",!0),l=i.length,h=this.getRawValue(e),u=k(h),c=s.getItemVisual(e,"color"),d=(c=(c=T(c)&&c.colorStops?(c.colorStops[0]||{}).color:c)||"transparent",1<l||u&&!l?(a=Q(d=h,function(t,e,n){n=s.getDimensionInfo(n);return t|(n&&!1!==n.tooltip&&null!=n.displayName)},0),r=[],i.length?E(i,function(t){p(ph(s,e,t),t)}):E(d,p),(a?"<br/>":"")+r.join(a?"<br/>":", ")):n(l?ph(s,e,i[0]):u?h[0]:h));function p(t,e){var n,i,e=s.getDimensionInfo(e);e&&!1!==e.otherDims.tooltip&&(n=e.type,i=Gs({color:c,type:"subItem"}),i=(a?i+Es(e.displayName||"-")+": ":"")+Es("ordinal"===n?t+"":"time"===n?o?"":Fs("yyyy/MM/dd hh:mm:ss",t):Ls(t)))&&r.push(i)}l=Gs(c),i=s.getName(e),u=this.name,u=(u=so(this)?u:"")?Es(u)+(o?": ":"<br/>"):"";return o?l+u+d:u+l+(i?Es(i)+": "+d:d)},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 ll.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 Lh(t){var e,n,i=t.name;so(t)||(t.name=(t=(e=(t=t).getRawData()).mapDimension("seriesName",!0),n=[],E(t,function(t){t=e.getDimensionInfo(t);t.displayName&&n.push(t.displayName)}),n.join(" ")||i))}function kh(t){return t.model.getRawData().count()}function Ph(t){t=t.model;return t.setData(t.getRawData().cloneShallow()),Nh}function Nh(t,e){t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function Oh(e,n){E(e.CHANGABLE_METHODS,function(t){e.wrapMethod(t,L(Eh,n))})}function Eh(t){t=zh(t);t&&t.setOutputEnd(this.count())}function zh(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(Ch,ss),i(Ch,ll);var Rh=function(){this.group=new z,this.uid=ds("viewComponent")},n=(Rh.prototype={constructor:Rh,init:function(t,e){},render:function(t,e,n,i){},dispose:function(){}},Rh.prototype);function Bh(){var a=uo();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){},xo(Rh),Mo(Rh,{registerWhenExtend:!0});var Vh=uo(),Gh=Bh();function Wh(){this.group=new z,this.uid=ds("viewChart"),this.renderTask=mh({plan:Zh,reset:Uh}),this.renderTask.context={view:this}}e=Wh.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};function Fh(t,e){if(t&&(t.trigger(e),"group"===t.type))for(var n=0;n<t.childCount();n++)Fh(t.childAt(n),e)}function Hh(e,t,n){t=ho(e,t);null!=t?E(eo(t),function(t){Fh(e.getItemGraphicEl(t),n)}):e.eachItemGraphicEl(function(t){Fh(t,n)})}function Zh(t){return Gh(t.model)}function Uh(t){var e=t.model,n=t.ecModel,i=t.api,o=t.payload,a=e.pipelineContext.progressiveRender,t=t.view,r=o&&Vh(o).updateMethod,a=a?"incrementalPrepareRender":r&&t[r]?r:"render";return"render"!==a&&t[a](e,n,i,o),Xh[a]}e.updateView=e.updateLayout=e.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},xo(Wh,["dispose"]),Mo(Wh,{registerWhenExtend:!0}),Wh.markUpdateMethod=function(t,e){Vh(t).updateMethod=e};var Xh={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)}}},Yh="\0__throttleOriginMethod",jh="\0__throttleRate",qh="\0__throttleType";function Kh(t,n,i){var o,a,r,s,l,h=0,u=0,c=null;function d(){u=(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?h:u)-t,clearTimeout(c),e?c=setTimeout(d,t):0<=a?d():c=setTimeout(d,-a),h=o}return e.clear=function(){c&&(clearTimeout(c),c=null)},e.debounceNextCall=function(t){l=t},e}function $h(t,e,n,i){var o=t[e];if(o){var a=o[Yh]||o,r=o[qh];if(o[jh]!==n||r!==i){if(null==n||!i)return t[e]=a;(o=t[e]=Kh(a,n,"debounce"===i))[Yh]=a,o[qh]=i,o[jh]=n}return o}}function Jh(t,e){var n=t[e];n&&n[Yh]&&(t[e]=n[Yh])}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 hr||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}}},Qh={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:""}}}};function tu(t,e){var l,h,u,n,c,a=e.getModel("aria");function d(t,e){var n;return"string"!=typeof t?t:(n=t,E(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=Qh.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),h=a.get("data.maxCount")||10,n=a.get("series.maxCount")||10,u=Math.min(l,n),l<1||(n=(n=function(){var t=e.getModel("title").option;t&&t.length&&(t=t[0]);return t&&t.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<u){var e=t.get("name"),n="series."+(1<l?"multiple":"single")+".",e=p(e?n+"withName":n+"withoutName");e=d(e,{seriesId:t.seriesIndex,seriesName:t.get("name"),seriesType:(n=t.subType,Qh.series.typeNames[n]||"自定义图")});for(var i,o,a=t.getData(),r=((window.data=a).count()>h?e+=d(p("data.partialData"),{displayCnt:h}):e+=p("data.allData"),[]),s=0;s<a.count();s++)s<h&&(i=a.getName(s),o=ph(a,s),r.push(d(p(i?"data.withName":"data.withoutName"),{name:i,value:o})));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))))}var eu=Math.PI;function nu(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=P()}e=nu.prototype;function iu(s,t,l,h,u){var c;function d(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}u=u||{},E(t,function(i,t){var e,n,o,a,r;u.visualType&&u.visualType!==i.visualType||(e=(n=s._stageTaskMap.get(i.uid)).seriesTaskMap,(n=n.overallTask)?((a=n.agentStubMap).each(function(t){d(u,t)&&(t.dirty(),o=!0)}),o&&n.dirty(),ou(n,h),r=s.getPerformArgs(n,u.block),a.each(function(t){t.perform(r)}),c|=n.perform(r)):e&&e.each(function(t,e){d(u,t)&&t.dirty();var n=s.getPerformArgs(t,u.block);n.skip=!i.performRawSeries&&l.isSeriesFiltered(t.context.model),ou(t,h),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=P();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}),gu(i,t,t.dataTask)})},e.prepareStageTasks=function(){var x=this._stageTaskMap,_=this.ecInstance.getModel(),w=this.api;E(this._allHandlers,function(t){var n,i,o,a,r,s,l,e,h,u,c,d,p,g,f,m=x.get(t.uid)||x.set(t.uid,[]);function y(t){var e=t.uid,e=r.get(e)||r.set(e,mh({plan:hu,reset:uu,count:pu}));e.context={model:t,ecModel:o,api:a,useClearVisual:i.isVisual&&!i.isLayout,plan:i.plan,reset:i.reset,scheduler:n},gu(n,t,e)}function v(t){var e=t.uid,n=c.get(e);n||(n=c.set(e,mh({reset:ru,onDirty:lu})),u.dirty()),n.context={model:t,overallProgress:p,modifyOutputEnd:g},n.agent=u,n.__block=p,gu(l,t,n)}t.reset&&(n=this,i=t,o=_,a=w,r=(e=m).seriesTaskMap||(e.seriesTaskMap=P()),e=i.seriesType,h=i.getTargetSeries,i.createOnAllSeries?o.eachRawSeries(y):e?o.eachRawSeriesByType(e,y):h&&h(o,a).each(y),s=n._pipelineMap,r.each(function(t,e){s.get(e)||(t.dispose(),r.removeKey(e))})),t.overallReset&&(l=this,e=t,h=_,t=w,(u=(m=m).overallTask=m.overallTask||mh({reset:au})).context={ecModel:h,api:t,overallReset:e.overallReset,scheduler:l},c=u.agentStubMap=u.agentStubMap||P(),m=e.seriesType,d=e.getTargetSeries,p=!0,g=e.modifyOutputEnd,m?h.eachRawSeriesByType(m,v):d?d(h,t).each(v):(p=!1,E(h.getSeries(),v)),f=l._pipelineMap,c.each(function(t,e){f.get(e)||(t.dispose(),u.dirty(),c.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,gu(this,e,o)},e.performDataProcessorTasks=function(t,e){iu(this,this._dataProcessorHandlers,t,e,{block:!0})},e.performVisualTasks=function(t,e,n){iu(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 ou=e.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)};function au(t){t.overallReset(t.ecModel,t.api,t.payload)}function ru(t,e){return t.overallProgress&&su}function su(){this.agent.dirty(),this.getDownstream().dirty()}function lu(){this.agent&&this.agent.dirty()}function hu(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function uu(t){t.useClearVisual&&t.data.clearAllVisual();t=t.resetDefines=eo(t.reset(t.model,t.ecModel,t.api,t.payload));return 1<t.length?I(t,function(t,e){return du(e)}):cu}var cu=du(0);function du(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 pu(t){return t.data.count()}function gu(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}nu.wrapStageHandler=function(t,e){return(t=et(t)?{overallReset:t,seriesType:function(t){fu=null;try{t(mu,yu)}catch(t){}return fu}(t)}:t).uid=ds("stageHandler"),e&&(t.visualType=e),t};var fu,mu={},yu={};function vu(t,e){for(var n in e.prototype)t[n]=vt}vu(mu,Dl),vu(yu,Pl),mu.eachSeriesByType=mu.eachRawSeriesByType=function(t){fu=t},mu.eachComponent=function(t){"series"===t.mainType&&t.subType&&(fu=t.subType)};function xu(){return{axisLine:{lineStyle:{color:_u}},axisTick:{lineStyle:{color:_u}},axisLabel:{textStyle:{color:_u}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:_u}}}}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]},_u="#eee",wu=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],wu={color:wu,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:_u},crossStyle:{color:_u}}},legend:{textStyle:{color:_u}},textStyle:{color:_u},title:{textStyle:{color:_u}},toolbox:{iconStyle:{normal:{borderColor:_u}}},dataZoom:{textStyle:{color:_u}},visualMap:{textStyle:{color:_u}},timeline:{lineStyle:{color:_u},itemStyle:{normal:{color:wu[1]}},label:{normal:{textStyle:{color:_u}}},controlStyle:{normal:{color:_u,borderColor:_u}}},timeAxis:xu(),logAxis:xu(),valueAxis:xu(),categoryAxis:xu(),line:{symbol:"circle"},graph:{color:wu},gauge:{title:{textStyle:{color:_u}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}},bu=(wu.categoryAxis.splitLine.show=!1,h.extend({type:"dataset",defaultOption:{seriesLayoutBy:vl,sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){var t=this,e=t.option.source,n=ml;if(ot(e))n=yl;else if(k(e))for(var i=0,o=e.length;i<o;i++){var a=e[i];if(null!=a){if(k(a)){n=pl;break}if(T(a)){n=gl;break}}}else if(T(e)){for(var r in e)if(e.hasOwnProperty(r)&&J(e[r])){n=fl;break}}else if(null!=e)throw new Error("Invalid data");wl(t).sourceFormat=n}}),Rh.extend({type:"dataset"}),x),Su=E,Mu=et,Iu=T,Tu=h.parseClassType,Du={zrender:"4.0.4"},Au={PROCESSOR:{FILTER:1e3,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,GLOBAL:2e3,CHART:3e3,COMPONENT:4e3,BRUSH:5e3}},Cu="__flagInMainProcess",Lu="__optionUpdated",ku=/^[a-zA-Z0-9_]+$/;function Pu(i){return function(t,e,n){t=t&&t.toLowerCase(),Ft.prototype[i].call(this,t,e,n)}}function Nu(){Ft.call(this)}function Ou(t,e,n){n=n||{},"string"==typeof e&&(e=nc[e]),this.id,this.group,this._dom=t;var i="canvas",t=(A&&(i=("undefined"==typeof window?global:window).__ECHARTS__DEFAULT__RENDERER__||i),this._zr=qi(t,{renderer:n.renderer||i,devicePixelRatio:n.devicePixelRatio,width:n.width,height:n.height}));this._throttledZrFlush=Kh(D(t.flush,t),17);(e=N(e))&&eh(e,!0),this._theme=e,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new Ol;var o,a,r,n=this._api=(i=(o=this)._coordSysMgr,O(new Pl(o),{getCoordinateSystems:D(i.getCoordinateSystems,i),getComponentByElement:function(t){for(;t;){var e=t.__ecComponentInfo;if(null!=e)return o._model.getComponent(e.mainType,e.index);t=t.parent}}}));function s(t,e){return t.__prio-e.__prio}cn(ec,s),cn(Ju,s),this._scheduler=new nu(this,n,Ju,ec),Ft.call(this),this._messageCenter=new Nu,this._initEvents(),this.resize=D(this.resize,this),this._pendingActions=[],t.animation.on("frame",this._onframe,this),r=this,(a=t).on("rendered",function(){r.trigger("rendered"),!a.animation.isFinished()||r[Lu]||r._scheduler.unfinished||r._pendingActions.length||r.trigger("finished")}),gt(this)}Nu.prototype.on=Pu("on"),Nu.prototype.off=Pu("off"),Nu.prototype.one=Pu("one"),i(Nu,Ft);var o=Ou.prototype;function Eu(t,e,n){var i=this._model,o=this._coordSysMgr.getCoordinateSystems();e=po(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}A&&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[Lu]){var e=this[Lu].silent;this[Cu]=!0,Ru(this),zu.update.call(this),this[Cu]=!1,this[Lu]=!1,Wu.call(this,e),Fu.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),Vu(this,i),t.performVisualTasks(i),Xu(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;A&&bu(!this[Cu],"`setOption` should not be called during main process."),Iu(e)&&(n=e.lazyUpdate,i=e.silent,e=e.notMerge),this[Cu]=!0,this._model&&!e||(e=new Gl(this._api),o=this._theme,(a=this._model=new Dl(null,null,o,e)).scheduler=this._scheduler,a.init(null,null,o,e)),this._model.setOption(t,Qu),n?(this[Lu]={silent:i},this[Cu]=!1):(Ru(this),zu.update.call(this),this._zr.flush(),this[Lu]=!1,this[Cu]=!1,Wu.call(this,i),Fu.call(this,i))},o.setTheme=function(){console.log("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 E((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=(Su(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 Su(i,function(t){t.group.ignore=!1}),e},o.getConnectedDataURL=function(i){var o,a,r,s,l,h,u,c,e,t,n,d,p;if(y.canvasSupported)return o=this.group,a=Math.min,r=Math.max,ac[o]?(l=s=1/0,u=h=-1/0,c=[],e=i&&i.pixelRatio||1,E(oc,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),h=r(t.right,h),u=r(t.bottom,u),c.push({dom:n,left:t.left,top:t.top}))}),t=(h*=e)-(s*=e),n=(u*=e)-(l*=e),(d=K()).width=t,d.height=n,p=qi(d),Su(c,function(t){t=new mi({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(Eu,"convertToPixel"),o.convertFromPixel=L(Eu,"convertFromPixel"),o.containPixel=function(t,i){var o;return E(t=po(this._model,t),function(t,n){0<=n.indexOf("Models")&&E(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):A&&console.warn(n+": "+(e?"The found component do not support containPoint.":"No view mapping to the found component.")):A&&console.warn(n+": containPoint is not supported")},this)},this),!!o},o.getVisual=function(t,e){var n=(t=po(this._model,t,{defaultMainType:"series"})).seriesModel,n=(!A||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 zu={prepareAndUpdate:function(t){Ru(this),zu.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),Vu(this,e),o.update(e,n),Zu(e),a.performVisualTasks(e,t),Uu(this,e,n,t),o=e.get("backgroundColor")||"transparent",y.canvasSupported?i.setBackgroundColor(o):(o=Oe(a=Te(o),"rgb"),0===a[3]&&(o="transparent")),Yu(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=P(),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)}),Zu(a),this._scheduler.performVisualTasks(a,i,{setDirty:!0,dirtyMap:n}),Xu(r,a,0,i,n),Yu(a,this._api))},updateView:function(t){var e=this._model;e&&(Wh.markUpdateMethod(t,"updateView"),Zu(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),Uu(this,this._model,this._api,t),Yu(e,this._api))},updateVisual:function(t){zu.update.call(this,t)},updateLayout:function(t){zu.update.call(this,t)}};function Ru(t){var e=t._model,n=t._scheduler;n.restorePipelines(e),n.prepareStageTasks(),Hu(t,"component",e,n),Hu(t,"chart",e,n),n.plan()}function Bu(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=P(eo(r))),s&&s.eachComponent(a,function(t){r&&null!=r.get(t.id)||l(e["series"===o?"_chartsMap":"_componentsMap"][t.__viewId])},e)):Su(e._componentsViews.concat(e._chartsViews),l)}function Vu(t,e){var n=t._chartsMap,i=t._scheduler;e.eachSeries(function(t){i.updateStreamModes(t,n[t.__viewId])})}function Gu(e,t){var n,i=e.type,o=e.escapeConnect,a=Ku[i],r=a.actionInfo,s=(l=(r.update||"update").split(":")).pop(),l=null!=l[0]&&Tu(l[0]),h=(this[Cu]=!0,[e]),u=!1,c=(e.batch&&(u=!0,h=I(e.batch,function(t){return(t=C(O({},t),e)).batch=null,t})),[]),d="highlight"===i||"downplay"===i;Su(h,function(t){(n=(n=a.action(t,this._model,this._api))||O({},t)).type=r.event||n.type,c.push(n),d?Bu(this,s,t,"series"):l&&Bu(this,s,t,l.main,l.sub)},this),"none"===s||d||l||(this[Lu]?(Ru(this),zu.update.call(this,e),this[Lu]=!1):zu[s].call(this,e)),n=u?{type:r.event||i,escapeConnect:o,batch:c}:c[0],this[Cu]=!1,t||this._messageCenter.trigger(n.type,n)}function Wu(t){for(var e=this._pendingActions;e.length;){var n=e.shift();Gu.call(this,n,t)}}function Fu(t){t||this.trigger("updated")}function Hu(t,e,a,r){for(var s="component"===e,l=s?t._componentsViews:t._chartsViews,h=s?t._componentsMap:t._chartsMap,u=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=h[i];o||(e=Tu(t.type),n=s?Rh.getClass(e.main,e.sub):Wh.getClass(e.sub),A&&bu(n,e.sub+" does not exist."),(o=new n).init(a,c),h[i]=o,l.push(o),u.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)}s?a.eachComponent(function(t,e){"series"!==t&&i(e)}):a.eachSeries(i);for(n=0;n<l.length;){var o=l[n];o.__alive?n++:(s||o.renderTask.dispose(),u.remove(o.group),o.dispose(a,c),l.splice(n,1),delete h[o.__id],o.__id=o.group.__ecComponentInfo=null)}}function Zu(t){t.clearColorPalette(),t.eachSeries(function(t){t.clearColorPalette()})}function Uu(t,e,n,i){var o,a,r,s,l;o=t,a=e,r=n,s=i,Su(l||o._componentsViews,function(t){var e=t.__model;t.render(e,a,r,s),qu(e,t)}),Su(t._chartsViews,function(t){t.__alive=!1}),Xu(t,e,0,i),Su(t._chartsViews,function(t){t.__alive||t.remove(e,n)})}function Xu(o,t,e,a,r){var s,n,i,l,h=o._scheduler;t.eachSeries(function(t){var e=o._chartsMap[t.__viewId],n=(e.__alive=!0,e.renderTask),n=(h.updatePayload(n,a),r&&r.get(t.uid)&&n.dirty(),s|=n.perform(h.getPerformArgs(n)),e.group.silent=!!t.get("silent"),qu(t,e),t),t=e,i=n.get("blendMode")||null;A&&!y.canvasSupported&&i&&"source-over"!==i&&console.warn("Only canvas support blendMode"),t.group.traverse(function(t){t.isGroup||t.style.blend!==i&&t.setStyle("blend",i),t.eachPendingDisplayable&&t.eachPendingDisplayable(function(t){t.setStyle("blend",i)})})}),h.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)}),tu(o._zr.dom,t)}function Yu(e,n){Su(tc,function(t){t(e,n)})}o.resize=function(t){A&&bu(!this[Cu],"`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[Cu]=!0,e&&Ru(this),zu.update.call(this),this[Cu]=!1,Wu.call(this,t),Fu.call(this,t))},o.showLoading=function(t,e){var n;Iu(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),ic[t]?(e=ic[t](this._api,e),n=this._zr,this._loadingFX=e,n.add(e)):A&&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=$u[t.type],e},o.dispatchAction=function(t,e){Iu(e)||(e={silent:!!e}),Ku[t.type]&&this._model&&(this[Cu]?this._pendingActions.push(t):(Gu.call(this,t,e.silent),e.flush?this._zr.flush(!0):!1!==e.flush&&y.browser.weChat&&this._throttledZrFlush(),Wu.call(this,e.silent),Fu.call(this,e.silent)))},o.appendData=function(t){var e=t.seriesIndex,e=this.getModel().getSeriesByIndex(e);A&&bu(t.data&&e),e.appendData(t),this._scheduler.unfinished=!0},o.on=Pu("on"),o.off=Pu("off"),o.one=Pu("one");var ju=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function qu(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)})}o._initEvents=function(){Su(ju,function(o){this._zr.on(o,function(t){var e,n=this.getModel(),i=t.target;"globalout"===o?e={}:i&&null!=i.dataIndex?e=(n=i.dataModel||n.getSeriesByIndex(i.seriesIndex))&&n.getDataParams(i.dataIndex,i.dataType)||{}:i&&i.eventData&&(e=O({},i.eventData)),e&&(e.event=t,e.type=o,this.trigger(o,e))},this)},this),Su($u,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?A&&console.warn("Instance "+this.id+" has been disposed"):(this._disposed=!0,fo(this.getDom(),lc,""),e=this._api,n=this._model,Su(this._componentsViews,function(t){t.dispose(n,e)}),Su(this._chartsViews,function(t){t.dispose(n,e)}),this._zr.dispose(),delete oc[this.id])},i(Ou,Ft);var Ku={},$u={},Ju=[],Qu=[],tc=[],ec=[],nc={},ic={},oc={},ac={},rc=+new Date,sc=+new Date,lc="_echarts_instance_",hc={};function uc(t){ac[t]=!1}o=uc;function cc(t){return oc[e=lc,(t=t).getAttribute?t.getAttribute(e):t[e]];var e}function dc(t,e){nc[t]=e}function pc(t){Qu.push(t)}function gc(t,e){vc(Ju,t,e,1e3)}function s(t,e,n){"function"==typeof e&&(n=e,e="");var i=Iu(t)?t.type:[t,t={event:e}][0];t.event=(t.event||i).toLowerCase(),e=t.event,bu(ku.test(i)&&ku.test(e)),Ku[i]||(Ku[i]={action:n,actionInfo:t}),$u[e]=i}function fc(t,e){Ol.register(t,e)}function mc(t,e){vc(ec,t,e,1e3,"layout")}function yc(t,e){vc(ec,t,e,3e3,"visual")}function vc(t,e,n,i,o){if((Mu(e)||Iu(e))&&(n=e,e=i),A){if(isNaN(e)||null==e)throw new Error("Illegal priority");Su(t,function(t){bu(t.__raw!==n)})}i=nu.wrapStageHandler(n,o);i.__prio=e,i.__raw=n,t.push(i)}function xc(t,e){ic[t]=e}function _c(t){return h.extend(t)}function wc(t){return Rh.extend(t)}function bc(t){return Ch.extend(t)}function Sc(t){return Wh.extend(t)}function Mc(t){return hc[t]}yc(2e3,n),pc(eh),gc(5e3,function(t){var i=P();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(nh)}),xc("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 B({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4}),a=new pr({shape:{startAngle:-eu/2,endAngle:-eu/2+.1,r:10},style:{stroke:t.color,lineCap:"round",lineWidth:5},zlevel:t.zlevel,z:10001}),r=new B({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*eu/2}).start("circularInOut"),a.animateShape(!0).when(1e3,{startAngle:3*eu/2}).delay(300).start("circularInOut"),(t=new z).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"},vt),s({type:"downplay",event:"downplay",update:"downplay"},vt),dc("light",e),dc("dark",wu);function Ic(t){return t}function Tc(t,e,n,i,o){this._old=t,this._new=e,this._oldKeyGetter=n||Ic,this._newKeyGetter=i||Ic,this.context=o}function Dc(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))}}Tc.prototype={constructor:Tc,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(Dc(t,{},i,"_oldKeyGetter",this),Dc(e,n,o,"_newKeyGetter",this),a=0;a<t.length;a++)null!=(s=n[r=i[a]])?((h=s.length)?(1===h&&(n[r]=null),s=s.unshift()):n[r]=null,this._update&&this._update(s,a)):this._remove&&this._remove(a);for(var a=0;a<o.length;a++){var r=o[a];if(n.hasOwnProperty(r)){var s=n[r];if(null!=s)if(s.length)for(var l=0,h=s.length;l<h;l++)this._add&&this._add(s[l]);else this._add&&this._add(s)}}}};var Ac=P(["tooltip","label","itemName","itemId","seriesName"]);function Cc(t){return"category"===t?"ordinal":"time"===t?"time":"float"}var Lc=T,n="undefined",kc={float:typeof Float64Array==n?Array:Float64Array,int:typeof Int32Array==n?Array:Int32Array,ordinal:Array,number:Array,time:Array},Pc=typeof Uint32Array==n?Array:Uint32Array,Nc=typeof Uint16Array==n?Array:Uint16Array;function Oc(t){return 65535<t._rawCount?Pc:Nc}var Ec=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"],zc=["_extent","_approximateExtent","_rawExtent"];function Rc(e,n){E(Ec.concat(n.__wrappedMethods||[]),function(t){n.hasOwnProperty(t)&&(e[t]=n[t])}),e.__wrappedMethods=n.__wrappedMethods,E(zc,function(t){e[t]=N(n[t])}),e._calculationInfo=O(n._calculationInfo)}var Bc=function(t,e){t=t||["x","y"];for(var o,a,r,s,l,i,h,n,u={},c=[],d={},p=0;p<t.length;p++){var g=t[p],f=(g=nt(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),(u[f]=g).index=p,g.createInvertedIndices&&(d[f]=[])}this.dimensions=c,this._dimensionInfos=u,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=P(),s=[],l=[],E(o.dimensions,function(t){var e,i=o.getDimensionInfo(t),n=i.coordDim;n&&(A&&x(null==Ac.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),Ac.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=[],h={},r.each(function(t,e){var n=a[e];h[e]=n[0],i=i.concat(n)}),e.dataDimsOnCoord=i,e.encodeFirstDimNotExtra=h,(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=Bc.prototype;function Vc(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 Gc(t){return t}function Wc(t){return t<this._count&&0<=t?this._indices[t]:-1}function Fc(t,e){var n=t._idList[e];return n=null==(n=null==n?Vc(t,t._idDimIdx,e):n)?"e\0\0"+e:n}function Hc(t){return t=k(t)?t:[t]}function Zc(t,e){for(var n=0;n<e.length;n++)t._dimensionInfos[e[n]]||console.error("Unkown dimension "+e[n])}function Uc(t,e){for(var n=t.dimensions,i=new Bc(I(n,t.getDimensionInfo,t),t.hostModel),o=(Rc(i,t),i._storage={}),a=t._storage,r=0;r<n.length;r++){var s=n[r];a[s]&&(0<=f(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]=Xc(),i._extent[s]=null):o[s]=a[s])}return i}function Xc(){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=_l.isInstance(t)||J(t);if(i&&(t=new ih(t,this.dimensions.length)),A&&!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=uh[this._rawData.getSource().sourceFormat],this._dimValueGetter=n=n||this.defaultDimValueGetter,this._rawExtent={},this._initDataFromProvider(0,t.count()),t.pure&&(this.hasItemOption=!1)},e.getProvider=function(){return this._rawData},e.appendData=function(t){A&&x(!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._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,h=this._nameList,u=this._idList,c=this._rawExtent,d=this._nameRepeatCount={},p=this._chunkCount,g=p-1,f=0;f<s;f++){c[k=r[f]]||(c[k]=Xc());var m=l[k],y=(0===m.otherDims.itemName&&(n=this._nameDimIdx=f),0===m.otherDims.itemId&&(this._idDimIdx=f),kc[m.type]),v=(a[k]||(a[k]=[]),a[k][g]);if(v&&v.length<i){for(var x=new y(Math.min(e-g*i,i)),_=0;_<v.length;_++)x[_]=v[_];a[k][g]=x}for(var w=p*i;w<e;w+=i)a[k].push(new y(Math.min(e-w,i)));this._chunkCount=a[k].length}for(var b,S,M=new Array(s),I=t;I<e;I++){for(var T,D,A,M=o.getItem(I,M),C=Math.floor(I/i),L=I%i,w=0;w<s;w++){var k,P=a[k=r[w]][C],N=this._dimValueGetter(M,k,I,w),P=(P[L]=N,c[k]);N<P[0]&&(P[0]=N),N>P[1]&&(P[1]=N)}o.pure||(T=h[I],M&&null==T&&(null!=M.name?h[I]=T=M.name:null!=n&&(D=a[A=r[n]][C])&&(T=D[L],D=l[A].ordinalMeta)&&D.categories.length&&(T=D.categories[T])),null==(A=null==M?null:M.id)&&null!=T&&(d[T]=d[T]||0,0<d[A=T]&&(A+="__ec__"+d[T]),d[T]++),null!=A&&(u[I]=A))}!o.persistent&&o.clean&&o.clean(),this._rawCount=this._count=e,this._extent={},E(S=(b=this)._invertedIndicesMap,function(t,e){var n=b._dimensionInfos[e].ordinalMeta;if(n){t=S[e]=new Pc(n.categories.length);for(var i=0;i<t.length;i++)t[i]=NaN;for(i=0;i<b._count;i++)t[b.get(e,i)]=i}})}},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){o=new e(n);for(var i=0;i<n;i++)o[i]=t[i]}else o=new e(t.buffer,0,n)}else for(var o=new(e=Oc(this))(this.count()),i=0;i<o.length;i++)o[i]=i;return o},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=[];k(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=this._storage[t],n=Xc();if(!e)return n;var i=this.count();if(!this._indices)return this._rawExtent[t].slice();if(e=this._extent[t])return e.slice();for(var o=(e=n)[0],a=e[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]=e=[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){Lc(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(A&&!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),h=Math.abs(l);l<=n&&h<=o&&((h<o||0<=l&&a<0)&&(o=h,a=l,i.length=0),i.push(r))}}return i},e.getRawIndex=Gc,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]||Vc(this,this._nameDimIdx,t)||""},e.getId=function(t){return Fc(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(Hc(t),this.getDimension,this),A&&Zc(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(Hc(t),this.getDimension,this),A&&Zc(this,t);for(var o=this.count(),a=new(Oc(this))(o),r=[],s=t.length,l=0,h=t[0],u=0;u<o;u++){var c=this.getRawIndex(u);if(0===s)p=e.call(n,u);else if(1===s)var d=this._getFast(h,c),p=e.call(n,d,u);else{for(var g=0;g<s;g++)r[g]=this._getFast(h,c);r[g]=u,p=e.apply(n,r)}p&&(a[l++]=c)}return l<o&&(this._indices=a),this._count=l,this._extent={},this.getRawIndex=this._indices?Wc:Gc,this}},e.selectRange=function(t){if(this._count){var e,n=[];for(e in t)t.hasOwnProperty(e)&&n.push(e);A&&Zc(this,n);var i=n.length;if(i){var o=this.count(),a=new(Oc(this))(o),r=0,s=n[0],l=t[s][0],h=t[s][1],u=!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++)(l<=(w=g[m])&&w<=h||isNaN(w))&&(a[r++]=c),c++;u=!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<=h||isNaN(w))&&(v<=b&&b<=x||isNaN(b))&&(a[r++]=c),c++}u=!0}}if(!u)if(1===i)for(m=0;m<o;m++){var S=this.getRawIndex(m);(l<=(w=this._getFast(s,S))&&w<=h||isNaN(w))&&(a[r++]=S)}else for(m=0;m<o;m++){for(var M=!0,S=this.getRawIndex(m),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?Wc:Gc,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(Hc(t),this.getDimension,this),A&&Zc(this,t);for(var i=Uc(this,t),o=(i._indices=this._indices,i.getRawIndex=i._indices?Wc:Gc,i._storage),a=[],r=this._chunkSize,s=t.length,l=this.count(),h=[],u=i._rawExtent,c=0;c<l;c++){for(var d=0;d<s;d++)h[d]=this.get(t[d],c);h[s]=c;var p=e&&e.apply(n,h);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],_=u[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=Uc(this,[t]),a=o._storage,r=[],s=Math.floor(1/e),l=a[t],h=this.count(),u=this._chunkSize,c=o._rawExtent[t],d=new(Oc(this))(h),p=0,g=0;g<h;g+=s){h-g<s&&(r.length=s=h-g);for(var f=0;f<s;f++){var m=this.getRawIndex(g+f),y=Math.floor(m/u);r[f]=l[y][m%u]}var v=n(r),x=this.getRawIndex(Math.min(g+i(r,v)||0,h-1));(l[Math.floor(x/u)][x%u]=v)<c[0]&&(c[0]=v),v>c[1]&&(c[1]=v),d[p++]=x}return o._count=p,o._indices=d,o.getRawIndex=Wc,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 Tc(e?e.getIndices():[],this.getIndices(),function(t){return Fc(e,t)},function(t){return Fc(n,t)})},e.getVisual=function(t){var e=this._visual;return e&&e[t]},e.setVisual=function(t,e){if(Lc(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(Lc(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,Lc(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 Yc(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType}function jc(t,e,n){_l.isInstance(e)||(e=_l.seriesDataToSource(e)),n=n||{},t=(t||[]).slice();for(var i,o,a,r,s=(n.dimsDef||[]).slice(),l=P(n.encodeDef),h=P(),u=P(),c=[],d=(i=e,o=t,a=n.dimCount,r=Math.max(i.dimensionsDetectCount||1,o.length,s.length,a||0),E(o,function(t){t=t.dimsDef;t&&(r=Math.max(r,t.length))}),r),p=0;p<d;p++){var g=s[p]=O({},T(s[p])?s[p]:{name:s[p]}),f=g.name,m=c[p]={otherDims:{}};null!=f&&null==h.get(f)&&(m.name=m.displayName=f,h.set(f,p)),null!=g.type&&(m.type=g.type),null!=g.displayName&&(m.displayName=g.displayName)}l.each(function(t,n){t=eo(t).slice();var i=l.set(n,[]);E(t,function(t,e){null!=(t=nt(t)?h.get(t):t)&&t<d&&(i[e]=t,v(c[t],n,e))})});var y=0;function v(t,e,n){null!=Ac.get(e)?t.otherDims[e]=n:(t.coordDim=e,t.coordDimIndex=n,u.set(e,!0))}E(t,function(n,t){nt(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);var i,o,a,e,r=eo(l.get(a));if(!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++)}E(r,function(t,e){t=c[t];v(C(t,n),a,e),null==t.name&&i&&(T(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=qc(M,u,b),m.coordDimIndex=0,(!w||S<=0)&&(m.isExtraCoord=!0),S--),null==m.name&&(m.name=qc(m.coordDim,h)),null==m.type&&(x=e,_=I,m.name,Il(x.data,x.sourceFormat,x.seriesLayoutBy,x.dimensionsDefine,x.startIndex,_))&&(m.type="ordinal");return c}function qc(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 Kc(t,e){return jc((e=e||{}).coordDimensions||[],t,{dimsDef:e.dimensionsDefine||t.dimensionsDefine,encodeDef:e.encodeDefine||t.encodeDefine,dimCount:e.dimensionsCount,generateCoord:e.generateCoord,generateCoordCount:e.generateCoordCount})}function $c(t,n,e){var i,o,a,r,s,l,h=(e=e||{}).byIndex,u=e.stackedCoordDimension,c=!(!t||!t.get("stack"));return E(n,function(t,e){nt(t)&&(n[e]=t={name:t}),c&&!t.isExtraCoord&&(h||i||!t.ordinalMeta||(i=t),o||"ordinal"===t.type||"time"===t.type||u&&u!==t.coordDim||(o=t))}),!o||h||i||(h=!0),o&&(a="__\0ecstackresult",r="__\0ecstackedover",i&&(i.createInvertedIndices=!0),s=o.coordDim,e=o.type,l=0,E(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:h,stackedOverDimension:r,stackResultDimension:a}}function Jc(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function Qc(t,e){return Jc(t,e)?t.getCalculationInfo("stackResultDimension"):e}function td(t,e,n){n=n||{},_l.isInstance(t)||(t=_l.seriesDataToSource(t));var o,i,a=e.get("coordinateSystem"),a=Ol.get(a),r=hl(e),a=Kc(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=Cc(t)),e}):s)||a&&(a.getDimensionsInfo?a.getDimensionsInfo():a.dimensions.slice())||["x","y"],generateCoord:n.generateCoord}),s=(r&&E(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),$c(e,a)),n=new Bc(a,e),a=(n.setCalculationInfo(s),null!=o&&function(t){if(t.sourceFormat===dl)return null!=(t=function(t){var e=0;for(;e<t.length&&null==t[e];)e++;return t[e]}(t.data||[]))&&!k(oo(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 ed(t){this._setting=t||{},this._extent=[1/0,-1/0],this._interval=0,this.init&&this.init.apply(this,arguments)}function nd(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(Yc,e),this._graphicEls[t]=e},e.getItemGraphicEl=function(t){return this._graphicEls[t]},e.eachItemGraphicEl=function(n,i){E(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 Bc(e,this.hostModel)),t._storage=this._storage,Rc(t,this),this._indices?(e=this._indices.constructor,t._indices=new e(this._indices)):t._indices=null,t.getRawIndex=t._indices?Wc:Gc,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"],ed.prototype.parse=function(t){return t},ed.prototype.getSetting=function(t){return this._setting[t]},ed.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},ed.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},ed.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},ed.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])},ed.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},ed.prototype.getExtent=function(){return this._extent.slice()},ed.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},ed.prototype.isBlank=function(){return this._isBlank},ed.prototype.setBlank=function(t){this._isBlank=t},ed.prototype.getLabel=null,xo(ed),Mo(ed,{registerWhenExtend:!0}),nd.createByAxisModel=function(t){var t=t.option,e=t.data,e=e&&I(e,od);return new nd({categories:e,needCollect:!e,deduplication:!1!==t.dedplication})};wu=nd.prototype;function id(t){return t._map||(t._map=P(t.categories))}function od(t){return T(t)&&null!=t.value?t.value:t+""}wu.getOrdinal=function(t){return id(this).get(t)},wu.parseAndCollect=function(t){var e,n,i=this._needCollect;return"string"==typeof t||i?(i&&!this._deduplication?(n=this.categories.length,this.categories[n]=t):null==(n=(e=id(this)).get(t))&&(i?(n=this.categories.length,this.categories[n]=t,e.set(t,n)):n=NaN),n):t};var ad=ed.prototype,rd=ed.extend({type:"ordinal",init:function(t,e){t&&!k(t)||(t=new nd({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),ad.contain.call(this,t)&&null!=this._ordinalMeta.categories[t]},normalize:function(t){return ad.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(ad.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:vt,niceExtent:vt}),sd=(rd.create=function(){return new rd},gs);function ld(t){return ys(t)+2}function hd(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function ud(t,e){isFinite(t[0])||(t[0]=e[0]),isFinite(t[1])||(t[1]=e[1]),hd(t,0,e),hd(t,1,e),t[0]>t[1]&&(t[0]=t[1])}var cd=gs,dd=ed.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]),dd.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=ld(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=sd(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=ys(t)||0:"auto"===e&&(e=this._intervalPrecision),Ls(t=cd(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=Ds(i/a,!0),null!=t&&i<t&&(i=n.interval=t),null!=e&&e<i&&(i=n.interval=e),a=n.intervalPrecision=ld(i),ud(n.niceTickExtent=[sd(Math.ceil(o[0]/i)*i,a),sd(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]=cd(Math.floor(e[0]/n)*n)),t.fixMax||(e[1]=cd(Math.ceil(e[1]/n)*n))}}),pd=(dd.create=function(){return new dd},"__ec_stack_"),gd="undefined"!=typeof Float32Array?Float32Array:Array;function fd(t){return t.get("stack")||pd+t.seriesIndex}function md(t){return t.dim+t.index}function yd(t,e){var n=[];return e.eachSeriesByType(t,function(t){bd(t)&&!Sd(t)&&n.push(t)}),n}function vd(t){var s=[];return E(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=G(t.get("barWidth"),i),o=G(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:md(n),stackId:fd(t)})}),xd(s)}function xd(t){var r={},c=(E(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 E(r,function(t,n){c[n]={};var i,e=t.stacks,o=t.bandWidth,o=G(t.categoryGap,o),a=G(t.gap,1),r=t.remainedWidth,s=t.autoWidthCount,l=(r-o)/(s+(s-1)*a),l=Math.max(l,0),h=(E(e,function(t,e){var n=t.maxWidth;n&&n<l&&(n=Math.min(n,r),t.width&&(n=Math.min(n,t.width)),r-=n,t.width=n,s--)}),l=(r-o)/(s+(s-1)*a),l=Math.max(l,0),0),u=(E(e,function(t,e){t.width||(t.width=l),h+=(i=t).width*(1+a)}),i&&(h-=i.width*a),-h/2);E(e,function(t,e){c[n][e]=c[n][e]||{offset:u,width:t.width},u+=t.width*(1+a)})}),c}function _d(t,e,n){if(t&&e)return null!=(t=t[md(e)])&&null!=n?t[fd(n)]:t}function wd(t,e){var t=yd(t,e),I=vd(t),T={};E(t,function(t){for(var e=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),o=fd(t),a=I[md(i)][o],r=a.offset,s=a.width,a=n.getOtherAxis(i),l=t.get("barMinHeight")||0,h=(T[o]=T[o]||[],e.setLayout({offset:r,size:s}),e.mapDimension(a.dim)),u=e.mapDimension(i.dim),c=Jc(e,h),d=a.isHorizontal(),p=Md(i,a,c),g=0,f=e.count();g<f;g++){var m,y,v,x,_,w,b,S=e.get(h,g),M=e.get(u,g);isNaN(S)||(m=0<=S?"p":"n",y=p,c&&(T[o][M]||(T[o][M]={p:p,n:p}),y=T[o][M][m]),d?(v=y,x=(b=n.dataToPoint([S,M]))[1]+r,_=b[0]-p,w=s,Math.abs(_)<l&&(_=(_<0?-1:1)*l),c&&(T[o][M][m]+=_)):(v=(b=n.dataToPoint([M,S]))[0]+r,x=y,_=s,w=b[1]-p,Math.abs(w)<l&&(w=(w<=0?-1:1)*l),c&&(T[o][M][m]+=w)),e.setItemLayout(g,{x:v,y:x,width:_,height:w}))}},this)}n={seriesType:"bar",plan:Bh(),reset:function(t){var e,s,l,h,u,c,d,p,g;if(bd(t)&&Sd(t))return e=t.getData(),s=t.coordinateSystem,l=s.getBaseAxis(),h=s.getOtherAxis(l),u=e.mapDimension(h.dim),c=e.mapDimension(l.dim),d=h.isHorizontal(),p=d?0:1,.5<(g=_d(vd([t]),l,t).width)||(g=.5),{progress:function(t,e){var n,i=new gd(2*t.count),o=[],a=[],r=0;for(;null!=(n=t.next());)a[p]=e.get(u,n),a[1-p]=e.get(c,n),o=s.dataToPoint(a,null,o),i[r++]=o[0],i[r++]=o[1];e.setLayout({largePoints:i,barWidth:g,valueAxisStart:Md(l,h,!1),valueAxisHorizontal:d})}}}};function bd(t){return t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type}function Sd(t){return t.pipelineContext&&t.pipelineContext.large}function Md(t,e,n){return 0<=f(t.getAxesOnZeroOf(),e)||n?e.toGlobalCoord(e.dataToCoord(0)):e.getGlobalExtent()[0]}var Id=dd.prototype,Td=Math.ceil,Dd=Math.floor,e=36e5,Ad=864e5,Cd=dd.extend({type:"time",getLabel:function(t){var e=this._stepLvl,t=new Date(t);return Fs(e[0],t,this.getSetting("useUTC"))},niceExtent:function(t){var e=this._extent,n=(e[0]===e[1]&&(e[0]-=Ad,e[1]+=Ad),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]-Ad),this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval),this._interval);t.fixMin||(e[0]=gs(Dd(e[0]/n)*n)),t.fixMax||(e[1]=gs(Td(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),Ld.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}(Ld,a=null!=n&&n<a?n:a,0,e),a=Ld[Math.min(n,e-1)],n=a[1],e=("year"===a[0]&&(n*=Ds(o/n/t,!0)),this.getSetting("useUTC")?0:60*new Date(+i[0]||+i[1]).getTimezoneOffset()*1e3),o=[Math.round(Td((i[0]-e)/n)*n+e),Math.round(Dd((i[1]-e)/n)*n+e)];ud(o,i),this._stepLvl=a,this._interval=n,this._niceExtent=o},parse:function(t){return+Ms(t)}}),Ld=(E(["contain","normalize"],function(e){Cd.prototype[e]=function(t){return Id[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",Ad],["MM-dd\nyyyy",2*Ad],["MM-dd\nyyyy",3*Ad],["MM-dd\nyyyy",4*Ad],["MM-dd\nyyyy",5*Ad],["MM-dd\nyyyy",6*Ad],["week",7*Ad],["MM-dd\nyyyy",864e6],["week",14*Ad],["week",21*Ad],["month",31*Ad],["week",42*Ad],["month",62*Ad],["week",42*Ad],["quarter",8208e6],["month",31*Ad*4],["month",13392e6],["half-year",16416e6],["month",31*Ad*8],["month",26784e6],["year",380*Ad]]),kd=(Cd.create=function(t){return new Cd({useUTC:t.ecModel.get("useUTC")})},ed.prototype),Pd=dd.prototype,Nd=ys,Od=gs,Ed=Math.floor,zd=Math.ceil,Rd=Math.pow,Bd=Math.log,Vd=ed.extend({type:"log",base:10,$constructor:function(){ed.apply(this,arguments),this._originalScale=new dd},getTicks:function(){var n=this._originalScale,i=this._extent,o=n.getExtent();return I(Pd.getTicks.call(this),function(t){var e=gs(Rd(this.base,t)),e=t===i[0]&&n.__fixMin?Gd(e,o[0]):e;return t===i[1]&&n.__fixMax?Gd(e,o[1]):e},this)},getLabel:Pd.getLabel,scale:function(t){return t=kd.scale.call(this,t),Rd(this.base,t)},setExtent:function(t,e){var n=this.base;t=Bd(t)/Bd(n),e=Bd(e)/Bd(n),Pd.setExtent.call(this,t,e)},getExtent:function(){var t=this.base,e=kd.getExtent.call(this),t=(e[0]=Rd(t,e[0]),e[1]=Rd(t,e[1]),this._originalScale),n=t.getExtent();return t.__fixMin&&(e[0]=Gd(e[0],n[0])),t.__fixMax&&(e[1]=Gd(e[1],n[1])),e},unionExtent:function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=Bd(t[0])/Bd(e),t[1]=Bd(t[1])/Bd(e),kd.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=Is(n);for(t/n*i<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&0<Math.abs(i);)i*=10;t=[gs(zd(e[0]/i)*i),gs(Ed(e[1]/i)*i)];this._interval=i,this._niceExtent=t}},niceExtent:function(t){Pd.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});function Gd(t,e){return Od(t,Nd(e))}function Wd(t,e){var n,i,o,a,r,s=t.type,l=e.getMin(),h=e.getMax(),u=null!=l,c=null!=h,d=t.getExtent(),p=("ordinal"===s?p=e.getCategories().length:("boolean"==typeof(n=k(n=e.get("boundaryGap"))?n:[n||0,n||0])[0]&&(A&&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.'),n=[0,0]),n[0]=G(n[0],1),n[1]=G(n[1],1),o=d[1]-d[0]||Math.abs(d[0])),null==l&&(l="ordinal"===s?p?0:NaN:d[0]-n[0]*o),null==h&&(h="ordinal"===s?p?p-1:NaN:d[1]+n[1]*o),"dataMin"===l?l=d[0]:"function"==typeof l&&(l=l({min:d[0],max:d[1]})),"dataMax"===h?h=d[1]:"function"==typeof h&&(h=h({min:d[0],max:d[1]})),null!=l&&isFinite(l)||(l=NaN),null!=h&&isFinite(h)||(h=NaN),t.setBlank(rt(l)||rt(h)||"ordinal"===s&&!t.getOrdinalMeta().categories.length),e.getNeedCrossZero()&&(l=0<l&&0<h&&!u?0:l)<0&&h<0&&!c&&(h=0),e.ecModel);return p&&"time"===s&&(E(n=yd("bar",p),function(t){i|=t.getBaseAxis()===e.axis}),i)&&(o=vd(n),d=l,t=h,u=o,s=(s=(c=e).axis.getExtent())[1]-s[0],void 0!==(u=_d(u,c.axis))&&(a=1/0,E(u,function(t){a=Math.min(t.offset,a)}),r=-1/0,E(u,function(t){r=Math.max(t.offset+t.width,r)}),a=Math.abs(a),r=Math.abs(r),t+=r/(c=a+r)*(s=(u=t-d)/(1-(a+r)/s)-u),d-=a/c*s),l=(p={min:d,max:t}).min,h=p.max),[l,h]}function Fd(t,e){var n=Wd(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 Hd(t,e){if(e=e||t.get("type"))switch(e){case"category":return new rd(t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),[1/0,-1/0]);case"value":return new dd;default:return(ed.getClass(e)||dd).create(t)}}function Zd(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 e.replace("{value}",null!=t?t:"")}):"function"==typeof i?function(t,e){return null!=o&&(e=t-o),i(Ud(n,t),e)}:function(t){return n.scale.getLabel(t)}}function Ud(t,e){return"category"===t.type?t.scale.getLabel(e):e}function Xd(t){var e=t.model,n=t.scale;if(e.get("axisLabel.show")&&!n.isBlank()){var i,o,e="category"===t.type,a=n.getExtent(),r=e?n.count():(i=n.getTicks()).length,s=t.getLabelModel(),l=Zd(t),h=1;40<r&&(h=Math.ceil(r/40));for(var u,c,d,p=0;p<r;p+=h){var g=l(i?i[p]:a[0]+p),g=s.getTextRect(g),f=(g=g,u=s.get("rotate")||0,c=d=f=c=void 0,u=u*Math.PI/180,g=g.plain(),c=g.width,f=g.height,d=c*Math.cos(u)+f*Math.sin(u),c=c*Math.sin(u)+f*Math.cos(u),new Z(g.x,g.y,d,c));o?o.union(f):o=f}return o}}E(["contain","normalize"],function(e){Vd.prototype[e]=function(t){return t=Bd(t)/Bd(this.base),kd[e].call(this,t)}}),Vd.create=function(){return new Vd};var Yd={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&&!rt(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&&!rt(t)?this.axis.scale.parse(t):t},getNeedCrossZero:function(){var t=this.option;return null==t.rangeStart&&null==t.rangeEnd&&!t.scale},getCoordSysModel:vt,setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},wu=wr({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=wr({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()}}),jd=wr({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),h=Math.cos(r),u=.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*u,e+a+h*u,n,i-c,n,i),t.bezierCurveTo(n,i-c,n-s+l*u,e+a+h*u,n-s,e+a),t.closePath()}}),l=wr({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()}}),qd={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}},Kd={},$d=(E({line:rr,rect:B,roundRect:B,square:B,circle:$a,diamond:e,pin:jd,arrow:l,triangle:wu},function(t,e){Kd[e]=new t}),wr({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=Kd[i];"none"!==e.symbolType&&(o=o||Kd[i="rect"],qd[i](e.x,e.y,e.width,e.height,o.shape),o.buildPath(t,o.shape,n))}}));function Jd(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 Qd(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://")?Sr(t.slice(8),new Z(e,n,i,o),r?"center":"cover"):0===t.indexOf("path://")?br(t.slice(7),{},new Z(e,n,i,o),r?"center":"cover"):new $d({shape:{symbolType:t,x:e,y:n,width:i,height:o}})).__isEmptyBrush=s,r.setColor=Jd,r.setColor(a),r}var e=Object.freeze({__proto__:null,completeDimensions:jc,createDimensions:Kc,createList:function(t){return td(t.getSource(),t)},createScale:function(t,e){var n=e;return w.isInstance(e)||i(n=new w(e),Yd),(e=Hd(n)).setExtent(t[0],t[1]),Fd(e,n),e},createSymbol:Qd,dataStack:{isDimensionStacked:Jc,enableDataStack:$c,getStackedDimension:Qc},getLayoutRect:Ks,mixinAxisModelCommonMethods:function(t){i(t,Yd)}}),tp=1e-8;function ep(t,e){return Math.abs(t-e)<tp}function np(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+=Ia(o[0],o[1],r[0],r[1],e,n),o=r}var s=t[0];return ep(o[0],s[0])&&ep(o[1],s[1])||(i+=Ia(o[0],o[1],s[0],s[1],e,n)),0!==i}function ip(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 op(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);i.push([(o=s+=o)/n,(a=l+=a)/n])}return i}function ap(t){var e=t;if(e.UTF8Encoding){for(var n=e.UTF8Scale,i=(null==n&&(n=1024),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 h=r[l];if("Polygon"===a.type)r[l]=op(h,s[l],n);else if("MultiPolygon"===a.type)for(var u=0;u<h.length;u++){var c=h[u];h[u]=op(c,s[l][u],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&&E(n,function(t){t[0]&&i.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})}),new ip(e.name,i,e.cp));return t.properties=e,t})}ip.prototype={constructor:ip,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&&(na(a[r].exterior,i,o),Bt(e,e,i),Vt(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(np(a,t[0],t[1])){for(var s=0;s<(r?r.length:0);s++)if(np(r[s]))continue t;return!0}}return!1},transformTo:function(t,e,n,i){for(var o=this.getBoundingRect(),a=o.width/o.height,a=(n?i=i||n/a:n=a*i,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 h=s[l].exterior,u=s[l].interiors,c=0;c<h.length;c++)Rt(h[c],h[c],r);for(var d=0;d<(u?u.length:0);d++)for(c=0;c<u[d].length;c++)Rt(u[d][c],u[d][c],r)}(o=this._rect).copy(a),this.center=[o.x+o.width/2,o.y+o.height/2]}};var rp=uo();function sp(t){return"category"===t.type?(o=(e=t).getLabelModel(),a=hp(e,o),!o.get("show")||e.scale.isBlank()?{labels:[],labelCategoryInterval:a.labelCategoryInterval}:a):(o=(n=t).scale.getTicks(),i=Zd(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 lp(t,e){var n,i,o,a,r,s;return"category"===t.type?(e=e,a=up(n=t,"ticks"),r=fp(e),(s=cp(a,r))||(e.get("show")&&!n.scale.isBlank()||(i=[]),i=et(r)?gp(n,r,!0):"auto"===r?(s=hp(n,n.getLabelModel()),o=s.labelCategoryInterval,I(s.labels,function(t){return t.tickValue})):pp(n,o=r,!0),dp(a,r,{ticks:i,tickCategoryInterval:o}))):{ticks:t.scale.getTicks()}}function hp(t,e){var n,i=up(t,"labels"),e=fp(e),o=cp(i,e);return o||dp(i,e,{labels:et(e)?gp(t,e):pp(t,n="auto"===e?null!=(i=rp(o=t).autoInterval)?i:rp(o).autoInterval=o.calculateCategoryInterval():e),labelCategoryInterval:n})}function up(t,e){return rp(t)[e]||(rp(t)[e]=[])}function cp(t,e){for(var n=0;n<t.length;n++)if(t[n].key===e)return t[n].value}function dp(t,e,n){return t.push({key:e,value:n}),n}function pp(t,e,n){var i=Zd(t),o=t.scale,a=o.getExtent(),t=t.getLabelModel(),r=[],s=Math.max((e||0)+1,1),e=a[0],l=o.count();0!==e&&1<s&&2<l/s&&(e=Math.round(Math.ceil(e/s)*s));for(var l=t.get("showMinLabel"),t=t.get("showMaxLabel"),h=(l&&e!==a[0]&&u(a[0]),e);h<=a[1];h+=s)u(h);function u(t){r.push(n?t:{formattedLabel:i(t),rawLabel:o.getLabel(t),tickValue:t})}return t&&h!==a[1]&&u(a[1]),r}function gp(t,n,i){var o=t.scale,a=Zd(t),r=[];return E(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 fp(t){t=t.get("interval");return null==t?"auto":t}function mp(t,e,n){this.dim=t,this.scale=e,this._extent=n||[0,0],this.inverse=!1,this.onBand=!1}var yp=[0,1];function vp(t,e){e=(t[1]-t[0])/e/2;t[0]+=e,t[1]-=e}mp.prototype={constructor:mp,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&&vp(n=n.slice(),i.count()),ps(t,yp,n,e)},coordToData:function(t,e){var n=this._extent,i=this.scale,i=(this.onBand&&"ordinal"===i.type&&vp(n=n.slice(),i.count()),ps(t,n,yp,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=lp(this,r),l=I(s.ticks,function(t){return{coord:this.dataToCoord(t),tickValue:t}},this),r=r.get("alignWithLabel");function h(t,e){return a?e<t:t<e}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,E(n,function(t){t.coord-=o/2}),i={coord:n[t-1].coord+o},n.push(i)),a=s[0]>s[1],h(n[0].coord,s[0])&&(r?n[0].coord=s[0]:n.shift()),r&&h(s[0],n[0].coord)&&n.unshift({coord:s[0]}),h(s[1],i.coord)&&(r?i.coord=s[1]:n.pop()),r)&&h(i.coord,s[1])&&n.push({coord:s[1]}),l},getViewLabels:function(){return sp(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=Zd(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;for(var r=1,s=(40<a&&(r=Math.max(1,Math.floor(a/40))),o[0]),l=t.dataToCoord(s+1)-t.dataToCoord(s),h=Math.abs(l*Math.cos(i)),l=Math.abs(l*Math.sin(i)),u=0,c=0;s<=o[1];s+=r)var d=1.3*(p=Vn(n(s),e.font,"center","top")).width,p=1.3*p.height,u=Math.max(u,d,7),c=Math.max(c,p,7);return i=u/h,h=c/l,isNaN(i)&&(i=1/0),isNaN(h)&&(h=1/0),l=Math.max(0,Math.floor(Math.min(i,h))),i=rp(t.model),h=i.lastAutoInterval,t=i.lastTickCount,null!=h&&null!=t&&Math.abs(h-l)<=1&&Math.abs(t-a)<=1&&l<h?l=h:(i.lastTickCount=a,i.lastAutoInterval=l),l}};var jd=ap,xp={};function _p(t){return this._axes[t]}E(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],function(t){xp[t]=xt[t]});function wp(t){this._axes={},this._dimList=[],this.name=t||""}function bp(t){wp.call(this,t)}wp.prototype={constructor:wp,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return I(this._dimList,_p,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}},bp.prototype={constructor:bp,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(bp,wp);function Sp(t,e,n,i,o){mp.call(this,t,e,n),this.type=i||"value",this.position=o||"bottom"}Sp.prototype={constructor:Sp,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(Sp,mp);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)"]}}},Mp={},Ip=(Mp.categoryAxis=p({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},l),Mp.valueAxis=p({boundaryGap:[0,0],splitNumber:5},l),Mp.timeAxis=C({scale:!0,min:"dataMin",max:"dataMax"},Mp.valueAxis),Mp.logAxis=C({scale:!0,logBase:10},Mp.valueAxis),["value","category","time","log"]);function Tp(a,t,r,e){E(Ip,function(o){t.extend({type:a+"Axis."+o,mergeDefaultAndTheme:function(t,e){var n=this.layoutMode,i=n?Qs(t):{};p(t,e.getTheme().get(o+"Axis")),p(t,this.getDefaultOption()),t.type=r(a,t),n&&Js(t,i,n)},optionUpdated:function(){"category"===this.option.type&&(this.__ordinalMeta=nd.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:j([{},Mp[o+"Axis"],e],!0)})}),h.registerSubTypeDefaulter(a+"Axis",L(r,a))}var Dp=h.extend({type:"cartesian2dAxis",axis:null,init:function(){Dp.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){Dp.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){Dp.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});function Ap(t,e){return e.type||(e.data?"category":"value")}p(Dp.prototype,Yd);wu={offset:0};function Cp(t,e){return t.getCoordSysModel()===e}function Lp(t,e,n){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,n),this.model=t}Tp("x",Dp,Ap,wu),Tp("y",Dp,Ap,wu),h.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=Lp.prototype;function kp(t,e,n){n.getAxesOnZeroOf=function(){return i?[i]:[]};var i,o=t[e],t=n.model,e=t.get("axisLine.onZero"),n=t.get("axisLine.onZeroAxisIndex");if(e)if(null!=n)Pp(o[n])&&(i=o[n]);else for(var a in o)if(o.hasOwnProperty(a)&&Pp(o[a])){i=o[a];break}}function Pp(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;this._updateScale(t,this.model),E(n.x,function(t){Fd(t.scale,t.model)}),E(n.y,function(t){Fd(t.scale,t.model)}),E(n.x,function(t){kp(n,"y",t)}),E(n.y,function(t){kp(n,"x",t)}),this.resize(this.model,e)},l.resize=function(t,e,n){var r=Ks(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),i=(this._rect=r,this._axesList);function o(){E(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")&&(E(i,function(t){var e,n,i;t.model.get("axisLabel.inside")||(e=Xd(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];T(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?f(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;Cp(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 Sp(o,Hd(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?E((this._axesMap=s).x,function(i,o){E(s.y,function(t,e){var e="x"+o+"y"+e,n=new bp(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){E(e.mapDimension(n.dim,!0),function(t){n.scale.unionExtentFromData(e,Qc(e,t))})}E(this._axesList,function(t){t.scale.setExtent(1/0,-1/0)}),t.eachSeries(function(t){var e,n;Ep(t)&&(n=(e=Op(t))[0],e=e[1],Cp(n,i))&&Cp(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 E(this.getCartesians(),function(t){var e=null!=n&&"auto"!==n?t.getAxis(n):t.getBaseAxis(),t=t.getOtherAxis(e);f(i,e)<0&&i.push(e),f(o,t)<0&&o.push(t)}),{baseAxes:i,otherAxes:o}};var Np=["xAxis","yAxis"];function Op(n){return I(Np,function(t){var e=n.getReferringComponents(t)[0];if(A&&!e)throw new Error(t+' "'+st(n.get(t+"Index"),n.get(t+"Id"),0)+'" not found');return e})}function Ep(t){return"cartesian2d"===t.get("coordinateSystem")}Lp.create=function(i,o){var a=[];return i.eachComponent("grid",function(t,e){var n=new Lp(t,i,o);n.name="grid_"+e,n.resize(t,o,!0),t.coordinateSystem=n,a.push(n)}),i.eachSeries(function(t){if(Ep(t)){var e=Op(t),n=e[0],e=e[1],i=n.getCoordSysModel();if(A){if(!i)throw new Error('Grid "'+st(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},Lp.dimensions=Lp.prototype.dimensions=bp.prototype.dimensions,Ol.register("cartesian2d",Lp);wu=Ch.extend({type:"series.__base_bar__",getInitialData:function(t,e){return td(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:5e3,progressiveChunkMode:"mod",itemStyle:{},emphasis:{}}});function zp(t,e){var n=t.mapDimension("defaultedLabel",!0),i=n.length;if(1===i)return ph(t,e,n[0]);if(i){for(var o=[],a=0;a<n.length;a++){var r=ph(t,e,n[a]);o.push(r)}return o.join(" ")}}function Rp(t,e,n,i,o,a){Hr(t,e,n.getModel("label"),n.getModel("emphasis.label"),{labelFetcher:o,labelDataIndex:a,defaultText:zp(o.getData(),a),isRectText:!0,autoColor:i}),Bp(t),Bp(e)}function Bp(t,e){"outside"===t.textPosition&&(t.textPosition=e)}wu.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 Vp=Io([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Gp=["itemStyle","barBorderWidth"],Wp=(O(w.prototype,{getBarItemStyle:function(t){var e,t=Vp(this,t);return this.getBorderLineDash&&(e=this.getBorderLineDash())&&(t.lineDash=e),t}}),Sc({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):A&&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,h=o.coordinateSystem,n=h.getBaseAxis(),u=("cartesian2d"===h.type?a=n.isHorizontal():"polar"===h.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=Zp[h.type](s,t,e),i=Wp[h.type](s,t,e,n,a,u),s.setItemGraphicEl(t,i),r.add(i),Up(i,s,t,e,n,o,a,"polar"===h.type))}).update(function(t,e){var n,i,e=l.getItemGraphicEl(e);s.hasValue(t)?(n=s.getItemModel(t),i=Zp[h.type](s,t,n),e?V(e,{shape:i},u,t):e=Wp[h.type](s,t,n,i,a,u,!0),s.setItemGraphicEl(t,e),r.add(e),Up(e,s,t,n,i,o,a,"polar"===h.type)):r.remove(e)}).remove(function(t){var e=l.getItemGraphicEl(t);"cartesian2d"===h.type?e&&Fp(t,u,e):e&&Hp(t,u,e)}).execute(),this._data=s},_renderLarge:function(t,e,n){this._clear(),Yp(t,this.group)},_incrementalRenderLarge:function(t,e){Yp(e,this.group,!0)},dispose:vt,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?Hp:Fp)(t.dataIndex,e,t)}):t.removeAll(),this._data=null}}),{cartesian2d:function(t,e,n,i,o,a,r){var s,l=new B({shape:O({},i)});return a&&(s={},l.shape[o=o?"height":"width"]=0,s[o]=i[o],os[r?"updateProps":"initProps"](l,{shape:s},a,e)),l},polar:function(t,e,n,i,o,a,r){var s,l,h=i.startAngle<i.endAngle,h=new tr({shape:C({clockwise:h},i)});return a&&(l={},h.shape[s=o?"r":"endAngle"]=o?0:i.startAngle,l[s]=i[s],os[r?"updateProps":"initProps"](h,{shape:l},a,e)),h}});function Fp(t,e,n){n.style.text=null,V(n,{shape:{width:0}},e,t,function(){n.parent&&n.parent.remove(n)})}function Hp(t,e,n){n.style.text=null,V(n,{shape:{r:n.shape.r0}},e,t,function(){n.parent&&n.parent.remove(n)})}var Zp={cartesian2d:function(t,e,n){var t=t.getItemLayout(e),e=function(t,e){t=t.get(Gp)||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 Up(t,e,n,i,o,a,r,s){var l=e.getItemVisual(n,"color"),e=e.getItemVisual(n,"opacity"),h=i.getModel("itemStyle"),u=i.getModel("emphasis.itemStyle").getBarItemStyle(),e=(s||t.setShape("r",h.get("barBorderRadius")||0),t.useStyle(C({fill:l,opacity:e},h.getBarItemStyle())),i.getShallow("cursor"));e&&t.attr("cursor",e),r?o.height:o.width,s||Rp(t.style,u,i,l,a,n),Fr(t,u)}var Xp=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 Yp(t,e,n){var i=t.getData(),o=[],a=i.getLayout("valueAxisHorizontal")?1:0,n=(o[1-a]=i.getLayout("valueAxisStart"),new Xp({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 jp=Math.PI;function qp(t){var e={componentType:t.mainType};return e[t.mainType+"Index"]=t.componentIndex,e}function Kp(t,e){this.opt=e,this.axisModel=t,C(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new z,(t=new z({position:e.position.slice(),rotation:e.rotation})).updateTransform(),this._transform=t.transform,this._dumbGroup=t}Kp.prototype={constructor:Kp,hasBuilder:function(t){return!!$p[t]},add:function(t){$p[t].call(this)},getGroup:function(){return this.group}};var $p={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&&(Rt(i,i,e),Rt(t,t,e)),o=O({lineCap:"round"},n.getModel("axisLine.lineStyle").getLineStyle()),this.group.add(new rr(Dr({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],E([{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=Qd(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}),this.group.add(e))},this))},axisTickLabel:function(){var t=this.axisModel,e=this.opt,n=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=[],h=[],u=t._transform,c=[],d=0;d<s.length;d++){var p=s[d].coord,p=(l[0]=p,h[l[1]=0]=p,h[1]=n.tickDirection*r,u&&(Rt(l,l,u),Rt(h,h,u)),new rr(Dr({anid:"tick_"+s[d].tickValue,shape:{x1:l[0],y1:l[1],x2:h[0],y2:h[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,t,e),e=function(s,l,h){var u,c,t,d,p,g,f,m,y=l.axis,e=st(h.axisLabelShow,l.get("axisLabel.show"));if(e&&!y.scale.isBlank())return u=l.getModel("axisLabel"),c=u.get("margin"),e=y.getViewLabels(),t=(st(h.labelRotate,u.get("rotate"))||0)*jp/180,d=Jp(h.rotation,t,h.labelDirection),p=l.getCategories(!0),g=[],f=Qp(l),m=l.get("triggerEvent"),E(e,function(t,e){var n=t.tickValue,i=t.formattedLabel,t=t.rawLabel,o=u,a=(o=p&&p[n]&&p[n].textStyle?new w(p[n].textStyle,u,l.ecModel):o).getTextColor()||l.get("axisLine.lineStyle.color"),r=[y.dataToCoord(n),h.labelOffset+h.labelDirection*c],r=new R({anid:"label_"+n,position:r,rotation:d.rotation,silent:f,z2:10});Zr(r.style,o,{text:i,textAlign:o.getShallow("align",!0)||d.textAlign,textVerticalAlign:o.getShallow("verticalAlign",!0)||o.getShallow("baseline",!0)||d.textVerticalAlign,textFill:"function"==typeof a?a("category"===y.type?t:"value"===y.type?n+"":n,e):a}),m&&(r.eventData=qp(l),r.eventData.targetType="axisLabel",r.eventData.value=t),s._dumbGroup.add(r),r.updateTransform(),g.push(r),s.group.add(r),r.decomposeTransform()}),g}(this,t,e),i=(t=t).get("axisLabel.showMinLabel"),t=t.get("axisLabel.showMaxLabel"),o=(n=n||[],(e=e||[])[0]),a=e[1],r=e[e.length-1],e=e[e.length-2],s=n[0],l=n[1],h=n[n.length-1],n=n[n.length-2];!1===i?(tg(o),tg(s)):eg(o,a)&&(i?(tg(a),tg(l)):(tg(o),tg(s))),!1===t?(tg(r),tg(h)):eg(e,r)&&(t?(tg(e),tg(n)):(tg(r),tg(h)))},axisName:function(){var t,e,n,i,o,a,r,s,l=this.opt,h=this.axisModel,u=st(l.axisName,h.get("name"));u&&(s=h.get("nameLocation"),i=l.nameDirection,t=h.getModel("nameTextStyle"),r=h.get("nameGap")||0,e=(a=this.axisModel.axis.getExtent())[0]>a[1]?-1:1,e=["start"===s?a[0]-e*r:"end"===s?a[1]+e*r:(a[0]+a[1])/2,ng(s)?l.labelOffset+i*r:0],null!=(r=h.get("nameRotate"))&&(r=r*jp/180),ng(s)?n=Jp(l.rotation,null!=r?r:l.rotation,i):(n=function(t,e,n,i){var o,n=ws(n-t.rotation),t=i[0]>i[1],i="start"===e&&!t||"start"!==e&&t;e=bs(n-jp/2)?(o=i?"bottom":"top","center"):bs(n-1.5*jp)?(o=i?"top":"bottom","center"):(o="middle",n<1.5*jp&&jp/2<n?i?"left":"right":i?"right":"left");return{rotation:n,textAlign:e,textVerticalAlign:o}}(l,s,r||0,a),null!=(o=l.axisNameAvailableWidth)&&(o=Math.abs(o/Math.sin(n.rotation)),isFinite(o)||(o=null))),i=t.getFont(),r=(s=h.get("nameTruncate",!0)||{}).ellipsis,a=st(l.nameTruncateMaxWidth,s.maxWidth,o),l=null!=r&&null!=a?Zs(u,a,i,r,{minChar:2,placeholder:s.placeholder}):u,o=h.get("tooltip",!0),(r={componentType:a=h.mainType,name:u,$vars:["name"]})[a+"Index"]=h.componentIndex,Zr((s=new R({anid:"name",__fullText:u,__truncatedText:l,position:e,rotation:n.rotation,silent:Qp(h),z2:1,tooltip:o&&o.show?O({content:u,formatter:function(){return u},formatterParams:r},o):null})).style,t,{text:l,textFont:i,textFill:t.getTextColor()||h.get("axisLine.lineStyle.color"),textAlign:n.textAlign,textVerticalAlign:n.textVerticalAlign}),h.get("triggerEvent")&&(s.eventData=qp(h),s.eventData.targetType="axisName",s.eventData.name=u),this._dumbGroup.add(s),s.updateTransform(),this.group.add(s),s.decomposeTransform())}},Jp=Kp.innerTextLayout=function(t,e,n){var i,e=ws(e-t),t=bs(e)?(i=0<n?"top":"bottom","center"):bs(e-jp)?(i=0<n?"bottom":"top","center"):(i="middle",0<e&&e<jp?0<n?"right":"left":0<n?"left":"right");return{rotation:e,textAlign:t,textVerticalAlign:i}};function Qp(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)}function tg(t){t&&(t.ignore=!0)}function eg(t,e){var n,i=t&&t.getBoundingRect().clone(),o=e&&e.getBoundingRect().clone();if(i&&o)return Qt(n=qt([]),n,-t.rotation),i.applyTransform($t([],n,t.getLocalTransform())),o.applyTransform($t([],n,e.getLocalTransform())),i.intersect(o)}function ng(t){return"middle"===t||"center"===t}var ig=E,og=L;function ag(t,e){var h,u,o,c,d,p,n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return h=n,e=e,o=(u=t).getComponent("tooltip"),c=u.getComponent("axisPointer"),d=c.get("link",!0)||[],p=[],ig(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||lg(o))&&(null==e&&(e=o.get("triggerTooltip")),a=(o=t?function(t,e,n,i,o,a){var r=e.getModel("axisPointer"),s={};ig(["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");e=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,u,t,e):o).get("snap"),t=hg(n.model),i=e||a||"category"===n.type,e=h.axesInfo[t]={key:t,axis:n,coordSys:r,axisPointerModel:o,triggerTooltip:e,involveSeries:i,snap:a,useHandle:lg(o),seriesModels:[]},s[t]=e,h.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(rg(a[i+"AxisId"],n.id)||rg(a[i+"AxisIndex"],n.componentIndex)||rg(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=hg(r.model),s=h.coordSysAxesInfo[t]={},l=(h.coordSysMap[t]=r).model.getModel("tooltip",o),ig(r.getAxes(),og(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)&&ig(n.baseAxes,og(i,!e||"cross",t)),e)&&ig(n.otherAxes,og(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)&&ig(o.coordSysAxesInfo[hg(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 rg(t,e){return"all"===t||k(t)&&0<=f(t,e)||t===e}function sg(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[hg(t)]}function lg(t){return!!t.get("handle.show")}function hg(t){return t.type+"||"+t.id}var ug=wc({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(t,e,n,i){var o,a,r,s,l,h;this.axisPointerClass&&(o=sg(o=t))&&(l=o.axisPointerModel,a=o.axis.scale,r=l.option,h=l.get("status"),null!=(s=l.get("value"))&&(s=a.parse(s)),l=lg(l),null==h&&(r.status=l?"show":"hide"),(h=a.getExtent().slice())[0]>h[1]&&h.reverse(),(s=null==s||s>h[1]?h[1]:s)<h[0]&&(s=h[0]),r.value=s,l)&&(r.status=o.axis.scale.isBlank()?"hide":"show"),ug.superApply(this,"render",arguments),cg(this,t,0,n,0,!0)},updateAxisPointer:function(t,e,n,i,o){cg(this,t,0,n,0,!1)},remove:function(t,e){var n=this._axisPointer;n&&n.remove(e),ug.superApply(this,"remove",arguments)},dispose:function(t,e){dg(this,e),ug.superApply(this,"dispose",arguments)}});function cg(t,e,n,i,o,a){var r,s=ug.getAxisPointerClass(t.axisPointerClass);s&&((r=(r=sg(r=e))&&r.axisPointerModel)?(t._axisPointer||(t._axisPointer=new s)).render(e,r,i,a):dg(t,i))}function dg(t,e,n){var i=t._axisPointer;i&&i.dispose(e,n),t._axisPointer=null}var pg=[];function gg(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},h=e.get("offset")||0,h="x"===i?[t[2]-h,t[3]+h]:[t[0]-h,t[1]+h],u=(a&&(u=a.toGlobalCoord(a.dataToCoord(0)),h[l.onZero]=Math.max(Math.min(u,h[1]),h[0])),o.position=["y"===i?h[l[s]]:t[0],"x"===i?h[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?h[l[r]]-h[l.onZero]:0,e.get("axisTick.inside")&&(o.tickDirection=-o.tickDirection),st(n.labelInside,e.get("axisLabel.inside"))&&(o.labelDirection=-o.labelDirection),e.get("axisLabel.rotate"));return o.labelRotate="top"===s?-u:u,o.z2=1,o}ug.registerAxisPointerClass=function(t,e){if(A&&pg[t])throw new Error("axisPointer "+t+" exists");pg[t]=e},ug.getAxisPointerClass=function(t){return t&&pg[t]};var fg=["axisLine","axisTickLabel","axisName"],mg=["splitArea","splitLine"],yg=ug.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(e,t,n,i){this.group.removeAll();var o,a,r=this._axisGroup;this._axisGroup=new z,this.group.add(this._axisGroup),e.get("show")&&(a=gg(o=e.getCoordSysModel(),e),a=new Kp(e,a),E(fg,a.add,a),this._axisGroup.add(a.getGroup()),E(mg,function(t){e.get(t+".show")&&this["_"+t](e,o)},this),es(r,this._axisGroup,e),yg.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=k(o=i.get("color"))?o:[o],a=e.coordinateSystem.getRect(),r=n.isHorizontal(),s=0,l=n.getTicksCoords({tickModel:t}),h=[],u=[],c=i.getLineStyle(),d=0;d<l.length;d++){var p=n.toGlobalCoord(l[d].coord),p=(r?(h[0]=p,h[1]=a.y,u[0]=p,u[1]=a.y+a.height):(h[0]=a.x,h[1]=p,u[0]=a.x+a.width,u[1]=p),s++%o.length),g=l[d].tickValue;this._axisGroup.add(new rr(Dr({anid:null!=g?"line_"+l[d].tickValue:null,shape:{x1:h[0],y1:h[1],x2:u[0],y2:u[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,h=P(),u=0;if(l)for(var c=0;c<r.length;c++){var d=l.get(r[c].tickValue);if(null!=d){u=(d+(s-1)*c)%s;break}}for(var p=n.toGlobalCoord(r[0].coord),g=i.getAreaStyle(),o=k(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&&h.set(x,u),this._axisGroup.add(new B({anid:null!=x?"area_"+x:null,shape:{x:f,y:m,width:y,height:v},style:C({fill:o[u]},g),silent:!0})),u=(u+1)%s}this._splitAreaColors=h}}}});function vg(t,e,n){z.call(this),this.updateData(t,e,n)}yg.extend({type:"xAxis"}),yg.extend({type:"yAxis"}),wc({type:"grid",render:function(t,e){this.group.removeAll(),t.get("show")&&this.group.add(new B({shape:t.coordinateSystem.getRect(),style:C({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))}}),pc(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})}),mc(L(wd,"bar")),mc(n),yc({seriesType:"bar",reset:function(t){t.getData().setVisual("legendSymbol","roundRect")}}),Ch.extend({type:"series.line",dependencies:["grid","polar"],getInitialData:function(t,e){if(A){t=t.coordinateSystem;if("polar"!==t&&"cartesian2d"!==t)throw new Error("Line not support coordinateSystem besides cartesian and polar")}return td(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=vg.prototype,xg=vg.getSymbolSize=function(t,e){t=t.getItemVisual(e,"symbolSize");return t instanceof Array?t.slice():[+t,+t]};function _g(t){return[t[0]/2,t[1]/2]}function wg(t,e){this.parent.drift(t,e)}l._createSymbol=function(t,e,n,i,o){this.removeAll();e=Qd(t,-1,-1,2,2,e.getItemVisual(n,"color"),o);e.attr({z2:100,culling:!0,scale:_g(i)}),e.drift=wg,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=xg(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,V(i,{scale:_g(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),$r(i,o,r,e)),this._seriesModel=r};var bg=["itemStyle"],Sg=["emphasis","itemStyle"],Mg=["label"],Ig=["emphasis","label"];function Tg(t){this.group=new z,this._symbolCtor=t||vg}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,h=i&&i.symbolRotate,u=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(bg).getItemStyle(["color"]),l=f.getModel(Sg).getItemStyle(),h=f.getShallow("symbolRotate"),u=f.getShallow("symbolOffset"),c=f.getModel(Mg),d=f.getModel(Ig),p=f.getShallow("hoverAnimation"),g=f.getShallow("cursor")):l=O({},l),o.style),h=(o.attr("rotation",(h||0)*Math.PI/180||0),u&&o.attr("position",[G(u[0],e[0]),G(u[1],e[1])]),g&&o.attr("cursor",g),o.setColor(r,i&&i.symbolInnerColor),o.setStyle(s),n.getItemVisual(t,"opacity")),u=(null!=h&&(f.opacity=h),n.getItemVisual(t,"liftZ")),g=o.__z2Origin,m=(null!=u?null==g&&(o.__z2Origin=o.z2,o.z2+=u):null!=g&&(o.z2=g,o.__z2Origin=null),i&&i.useNameLabel);Hr(f,l,c,d,{labelFetcher:a,labelDataIndex:t,defaultText:function(t,e){return m?n.getName(t):zp(n,t)},isRectText:!0,autoColor:r}),o.off("mouseover").off("mouseout").off("emphasis").off("normal"),o.hoverStyle=l,Fr(o);var y=_g(e);p&&a.isAnimationEnabled()&&(s=function(){this.incremental||this.animateTo({scale:y},400,"elasticOut")},o.on("mouseover",h=function(){var t;this.incremental||(t=y[1]/y[0],this.animateTo({scale:[Math.max(1.1*y[0],y[0]+3),Math.max(1.1*y[1],y[1]+3*t)]},400,"elasticOut"))}).on("mouseout",s).on("emphasis",h).on("normal",s))},l.fadeOut=function(t,e){var n=this.childAt(0);this.silent=n.silent=!0,e&&e.keepLabel||(n.style.text=null),V(n,{style:{opacity:0},scale:[0,0]},this._seriesModel,this.dataIndex,t)},a(vg,z);n=Tg.prototype;function Dg(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 Ag(t){return(t=null==t||T(t)?t:{isIgnore:t})||{}}function Cg(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 Lg(t,e,n){var i,o=t.getBaseAxis(),a=t.getOtherAxis(o),n=function(t,e){var n=0,t=t.scale.getExtent();"start"===e?n=t[0]:"end"===e?n=t[1]:0<t[0]?n=t[0]:t[1]<0&&(n=t[1]);return n}(a,n),o=o.dim,a=a.dim,r=e.mapDimension(a),s=e.mapDimension(o),l="x"===a||"radius"===a?1:0,t=I(t.dimensions,function(t){return e.mapDimension(t)}),h=e.getCalculationInfo("stackResultDimension");return(i|=Jc(e,t[0]))&&(t[0]=h),(i|=Jc(e,t[1]))&&(t[1]=h),{dataDimsForPoint:t,valueStart:n,valueAxisDim:a,baseAxisDim:o,stacked:!!i,valueDim:r,baseDim:s,baseDataOffset:l,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function kg(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=Ag(o);var a=this.group,r=i.hostModel,s=this._data,l=this._symbolCtor,h=Cg(i);s||a.removeAll(),i.diff(s).add(function(t){var e,n=i.getItemLayout(t);Dg(i,n,t,o)&&((e=new l(i,t,h)).attr("position",n),i.setItemGraphicEl(t,e),a.add(e))}).update(function(t,e){var e=s.getItemGraphicEl(e),n=i.getItemLayout(t);Dg(i,n,t,o)?(e?(e.updateData(i,t,h),V(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=Cg(t),this._data=null,this.group.removeAll()},n.incrementalUpdate=function(t,e,n){function i(t){t.isGroup||(t.incremental=t.useHoverLayer=!0)}n=Ag(n);for(var o=t.start;o<t.end;o++){var a,r=e.getItemLayout(o);Dg(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 Pg=Bt,Ng=Vt,Og=Tt,Eg=bt,zg=[],Rg=[],Bg=[];function Vg(t){return isNaN(t[0])||isNaN(t[1])}function Gg(t,e,n,i,o,a,r,s,l,h){return("none"!==h&&h?Wg:Fg).apply(this,arguments)}function Wg(t,e,n,i,o,a,r,s,l,h,u){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(Vg(y)){if(u){d+=a;continue}break}d===n?t[0<a?"moveTo":"lineTo"](y[0],y[1]):0<l?(g=e[c],m=(y[f="y"===h?1:0]-g[f])*l,Eg(Rg,g),Rg[f]=g[f]+m,Eg(Bg,y),Bg[f]=y[f]-m,t.bezierCurveTo(Rg[0],Rg[1],Bg[0],Bg[1],y[0],y[1])):t.lineTo(y[0],y[1]),c=d,d+=a}return p}function Fg(t,e,n,i,o,a,r,s,l,h,u){for(var c=0,d=n,p=0;p<i;p++){var g=e[d];if(o<=d||d<0)break;if(Vg(g)){if(u){d+=a;continue}break}if(d===n)t[0<a?"moveTo":"lineTo"](g[0],g[1]),Eg(Rg,g);else if(0<l){var f=d+a,m=e[f];if(u)for(;m&&Vg(e[f]);)m=e[f+=a];var y,v,x=.5,_=e[c];!(m=e[f])||Vg(m)?Eg(Bg,g):(Vg(m)&&!u&&(m=g),Dt(zg,m,_),v="x"===h||"y"===h?(v="x"===h?0:1,y=Math.abs(g[v]-_[v]),Math.abs(g[v]-m[v])):(y=Nt(g,_),Nt(g,m)),Og(Bg,g,zg,-l*(1-(x=v/(v+y))))),Pg(Rg,Rg,s),Ng(Rg,Rg,r),Pg(Bg,Bg,s),Ng(Bg,Bg,r),t.bezierCurveTo(Rg[0],Rg[1],Bg[0],Bg[1],g[0],g[1]),Og(Rg,g,zg,l*x)}else t.lineTo(g[0],g[1]);c=d,d+=a}return p}function Hg(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 Zg=r.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:Qa(r.prototype.brush),buildPath:function(t,e){var n=e.points,i=0,o=n.length,a=Hg(n,e.smoothConstraint);if(e.connectNulls){for(;0<o&&Vg(n[o-1]);o--);for(;i<o&&Vg(n[i]);i++);}for(;i<o;)i+=Gg(t,n,i,o,o,1,a.min,a.max,e.smooth,e.smoothMonotone,e.connectNulls)+1}}),Ug=r.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},brush:Qa(r.prototype.brush),buildPath:function(t,e){var n=e.points,i=e.stackedOnPoints,o=0,a=n.length,r=e.smoothMonotone,s=Hg(n,e.smoothConstraint),l=Hg(i,e.smoothConstraint);if(e.connectNulls){for(;0<a&&Vg(n[a-1]);a--);for(;o<a&&Vg(n[o]);o++);}for(;o<a;){var h=Gg(t,n,o,a,a,1,s.min,s.max,e.smooth,r,e.connectNulls);Gg(t,i,o+h-1,h,a,-1,l.min,l.max,e.stackedOnSmooth,r,e.connectNulls),o+=h+1,t.closePath()}}});function Xg(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 Yg(t){return"number"==typeof t?t:t?.5:0}function jg(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 qg(t,e,n,i){return"polar"===t.type?(a=e,r=n,s=i,l=(o=t).getAngleAxis(),(h=o.getRadiusAxis().getExtent().slice())[0]>h[1]&&h.reverse(),u=l.getExtent(),c=Math.PI/180,r&&(h[0]-=.5,h[1]+=.5),r=new tr({shape:{cx:gs(o.cx,1),cy:gs(o.cy,1),r0:gs(h[0],1),r:gs(h[1],1),startAngle:-u[0]*c,endAngle:-u[1]*c,clockwise:l.inverse}}),a&&(r.shape.endAngle=-u[0]*c,$r(r,{shape:{endAngle:-u[1]*c}},s)),r):(o=e,h=n,l=i,u=jg((a=t).getAxis("x")),c=jg(a.getAxis("y")),a=a.getBaseAxis().isHorizontal(),s=Math.min(u[0],u[1]),r=Math.min(c[0],c[1]),u=Math.max(u[0],u[1])-s,c=Math.max(c[0],c[1])-r,h?(s-=.5,u+=.5,r-=.5,c+=.5):(h=l.get("lineStyle.width")||2,h=l.get("clipOverflow")?h/2:Math.max(u,c),a?(r-=h,c+=2*h):(s-=h,u+=2*h)),h=new B({shape:{x:s,y:r,width:u,height:c}}),o&&(h.shape[a?"width":"height"]=0,$r(h,{shape:{width:u,height:c}},l)),h);var o,a,r,s,l,h,u,c}function Kg(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 h=(s[i]+r[i])/2,u=[];l[i]=u[i]=h,l[1-i]=s[1-i],u[1-i]=r[1-i],o.push(l),o.push(u);break;default:l[i]=s[i],l[1-i]=r[1-i],o.push(l)}}return t[a]&&o.push(t[a]),o}function $g(t,e,n){var t=t.get("showAllSymbol"),i="auto"===t;if(!t||i){var o,a,t=n.getAxesByScale("ordinal")[0];if(t)if(!i||!function(t,e){for(var n=t.getExtent(),i=Math.abs(n[1]-n[0])/t.scale.count(),o=(isNaN(i)&&(i=0),e.count()),a=Math.max(1,Math.round(o/5)),r=0;r<o;r+=a)if(1.5*vg.getSymbolSize(e,r)[t.isHorizontal()?1:0]>i)return;return 1}(t,e))return o=e.mapDimension(t.dim),a={},E(t.getViewLabels(),function(t){a[t.tickValue]=1}),function(t){return!a.hasOwnProperty(e.get(o,t))}}}function Jg(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 Qg(t){return{seriesType:t,plan:Bh(),reset:function(t){var u,c,e=t.getData(),d=t.coordinateSystem,p=t.pipelineContext.large;if(d)return u=I(d.dimensions,function(t){return e.mapDimension(t)}).slice(0,2),c=u.length,t=e.getCalculationInfo("stackResultDimension"),Jc(e,u[0])&&(u[0]=t),Jc(e,u[1])&&(u[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=[],h=[];r<t.end;r++)i=1===c?(n=e.get(u[0],r),!isNaN(n)&&d.dataToPoint(n,null,h)):(n=l[0]=e.get(u[0],r),i=l[1]=e.get(u[1],r),!isNaN(n)&&!isNaN(i)&&d.dataToPoint(l,null,h)),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)}}}}}Wh.extend({type:"line",init:function(){var t=new z,e=new Tg;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),h="polar"===i.type,u=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(kg(n,t,e,o));return i}(i,a,Lg(i,a,y)),x=t.get("showSymbol"),_=x&&!h&&$g(t,a,i),w=this._data,h=(w&&w.eachItemGraphicEl(function(t,e){t.__temp&&(o.remove(t),w.setItemGraphicEl(e,null))}),x||c.remove(),o.add(g),!h&&t.get("step")),u=(d&&u.type===i.type&&h===this._step?(m&&!p?p=this._newPolygon(l,v,i,f):p&&!m&&(g.remove(p),p=this._polygon=null),g.setClipPath(qg(i,!1,!1,t)),x&&c.updateData(a,{isIgnore:_,clipShape:qg(i,!1,!0,t)}),a.eachItemGraphicEl(function(t){t.stopAnimation(!0)}),Xg(this._stackedOnPoints,v)&&Xg(this._points,l)||(f?this._updateAnimation(a,v,i,n,h,y):(h&&(l=Kg(l,i,h),v=Kg(v,i,h)),d.setShape({points:l}),p&&p.setShape({points:l,stackedOnPoints:v})))):(x&&c.updateData(a,{isIgnore:_,clipShape:qg(i,!1,!0,t)}),h&&(l=Kg(l,i,h),v=Kg(v,i,h)),d=this._newPolyline(l,i,f),m&&(p=this._newPolygon(l,v,i,f)),g.setClipPath(qg(i,!0,!1,t))),function(t,e){var n=t.getVisual("visualMeta");if(n&&n.length&&t.count())if("cartesian2d"!==e.type)A&&console.warn("Visual map on line style is only supported on cartesian2d.");else{for(var i,o=n.length-1;0<=o;o--){var a,r=n[o].dimension,r=t.dimensions[r],r=t.getDimensionInfo(r);if("x"===(a=r&&r.coordDim)||"y"===a){i=n[o];break}}if(i){var s=e.getAxis(a),e=I(i.stops,function(t){return{coord:s.toGlobalCoord(s.dataToCoord(t.value)),color:t.color}}),l=e.length,h=i.outerColors.slice(),u=(l&&e[0].coord>e[l-1].coord&&(e.reverse(),h.reverse()),e[0].coord-10),c=e[l-1].coord+10,d=c-u;if(d<.001)return"transparent";E(e,function(t){t.offset=(t.coord-u)/d}),e.push({offset:l?e[l-1].offset:.5,color:h[1]||"transparent"}),e.unshift({offset:l?e[0].offset:.5,color:h[0]||"transparent"});l=new ur(0,0,0,0,e,!0);return l[a]=u,l[a+"2"]=c,l}A&&console.warn("Visual map on line style only support x or y dimension.")}}(a,i)||a.getVisual("color")),n=(d.useStyle(C(r.getLineStyle(),{fill:"none",stroke:u,lineJoin:"bevel"})),t.get("smooth"),Yg(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:u,opacity:.7,lineJoin:"bevel"})),x&&(c=Yg(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=h,this._valueOrigin=y},dispose:function(){},highlight:function(t,e,n,i){var o=t.getData(),a=ho(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 vg(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 Wh.prototype.highlight.call(this,t,e,n,i)},downplay:function(t,e,n,i){var o,a=t.getData(),r=ho(a,i);null!=r&&0<=r?(o=a.getItemGraphicEl(r))&&(o.__temp?(a.setItemGraphicEl(r,null),this.group.remove(o)):o.downplay()):Wh.prototype.downplay.call(this,t,e,n,i)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new Zg({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 Ug({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(n),this._polygon=n},_updateAnimation:function(t,e,n,i,o,a){for(var r,s=this._polyline,l=this._polygon,h=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,h=l,u=[],c=[],d=[],p=[],g=[],f=[],m=[],y=Lg(o,e,r),v=Lg(a,t,s),x=0;x<h.length;x++){var _=h[x],w=!0;switch(_.cmd){case"=":var b=t.getItemLayout(_.idx),S=e.getItemLayout(_.idx1);(isNaN(b[0])||isNaN(b[1]))&&(b=S.slice()),u.push(b),c.push(S),d.push(n[_.idx]),p.push(i[_.idx1]),m.push(e.getRawIndex(_.idx1));break;case"+":var M=_.idx;u.push(o.dataToPoint([e.get(y.dataDimsForPoint[0],M),e.get(y.dataDimsForPoint[1],M)])),c.push(e.getItemLayout(M).slice()),d.push(kg(y,o,e,M)),p.push(i[M]),m.push(e.getRawIndex(M));break;case"-":var M=_.idx,b=t.getRawIndex(M);b!==M?(u.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(kg(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=[],D=[],A=[],C=[],x=0;x<f.length;x++){M=f[x];I[x]=u[M],T[x]=c[M],D[x]=d[M],A[x]=p[M],C[x]=g[M]}return{current:I,next:T,stackedOnCurrent:D,stackedOnNext:A,status:C}}(this._data,t,this._stackedOnPoints,e,this._coordSys,n,this._valueOrigin,a),a=e.current,u=e.stackedOnCurrent,c=e.next,d=e.stackedOnNext,p=(o&&(a=Kg(e.current,n,o),u=Kg(e.stackedOnCurrent,n,o),c=Kg(e.next,n,o),d=Kg(e.stackedOnNext,n,o)),s.shape.__points=e.current,s.shape.points=a,V(s,{shape:{points:c}},h),l&&(l.setShape({points:a,stackedOnPoints:u}),V(l,{shape:{points:c,stackedOnPoints:d}},h)),[]),g=e.status,f=0;f<g.length;f++)"="===g[f].cmd&&(r=t.getItemGraphicEl(g[f].idx1))&&p.push({el:r,ptIdx:f});s.animators&&s.animators.length&&s.animators[0].during(function(){for(var t=0;t<p.length;t++)p[t].el.attr("position",s.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 tf(t,e){return Math.round(t.length/2)}var ef={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 nf(t,e,n){e=k(e)?{coordDimensions:e}:O({},e);var i=t.getSource(),e=Kc(i,e),e=new Bc(e,t);return e.initData(i,n),e}yc(Jg("line","circle","line")),mc(Qg("line")),gc(Au.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&&(i=s.getBaseAxis(),s=s.getOtherAxis(i),i=(i=i.getExtent())[1]-i[0],1<(i=Math.round(a.count()/i)))&&("string"==typeof r?o=ef[r]:"function"==typeof r&&(o=r),o)&&t.setData(a.downSample(a.mapDimension(s.dim),1/i,o,tf))}});var l={updateSelectedMap:function(t){this._targetList=k(t)?t.slice():[],this._selectTargetMap=Q(t||[],function(t,e){return t.set(e.name,e),t},P())},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}},of=bc({type:"series.pie",init:function(t){of.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()},this.updateSelectedMap(this._createSelectableList()),this._defaultLabelLine(t)},mergeOption:function(t){of.superCall(this,"mergeOption",t),this.updateSelectedMap(this._createSelectableList())},getInitialData:function(t,e){return nf(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:gh(t,i,"selected")});return n},getDataParams:function(t){var e=this.getData(),n=of.superCall(this,"getDataParams",t),i=[];return e.each(e.mapDimension("value"),function(t){i.push(t)}),n.percent=xs(i,t,e.hostModel.get("percentPrecision")),n.$vars.push("percent"),n},_defaultLabelLine:function(t){no(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 af(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){rf(o.getItemGraphicEl(t),o.getItemLayout(t),e.isSelected(o.getName(t)),r,n)})}function rf(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 sf(t,e){z.call(this);var n=new tr({z2:2}),i=new ar,o=new R;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(of,l);n=sf.prototype;function lf(n,t){E(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 hf(i){return{getTargetSeries:function(t){var e={},n=P();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 uf(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,s,l,h=e?Number.MAX_VALUE:0,u=0,c=t.length;u<c;u++)"center"!==t[u].position&&(r=Math.abs(t[u].y-i),l=t[u].len,s=t[u].len2,l=r<o+l?Math.sqrt((o+l+s)*(o+l+s)-r*r):Math.abs(t[u].x-n),e&&h<=l&&(l=h-10),!e&&l<=h&&(l=h+10),t[u].x=n+l*a,h=l)}o.sort(function(t,e){return t.y-e.y});for(var h,u=0,c=o.length,d=[],p=[],g=0;g<c;g++)(h=o[g].y-u)<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,-h),u=o[g].y+o[g].height;r-u<0&&s(c-1,u-r);for(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 cf(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"),h=(o.startAngle+o.endAngle)/2,u=Math.cos(h),c=Math.sin(h),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*u:o.r*u)+v)+3*u,n=(p=(d?(o.r+o.r0)/2*c:o.r*c)+x)+3*c,d||(e=(g=(i=f+u*(l+y-o.r))+(u<0?-1:1)*a)+(u<0?-5:5),i=[[f,p],[i,n=f=p+c*(l+y-o.r)],[g,f]]),d?"center":0<u?"left":"right"),c=r.getFont(),g=r.get("rotate")?u<0?-h+Math.PI:-h:0,f=Vn(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=w,i=v,o=x,a=y,r=[],s=[],l=0;l<n.length;l++)(n[l].x<i?r:s).push(n[l]);for(uf(s,i,o,a,1,0,e),uf(r,i,o,a,-1,0,e),l=0;l<n.length;l++){var h,u=n[l].linePoints;u&&(h=u[1][0]-u[2][0],n[l].x<i?u[2][0]=n[l].x+3:u[2][0]=n[l].x-3,u[1][1]=u[2][1]=n[l].y,u[1][0]=u[2][0]+h)}}}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,$r(i,{shape:{r:r.r}},o,e)):(i.shape.endAngle=r.startAngle,V(i,{shape:{endAngle:r.endAngle}},o,e))):V(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 h(){i.stopAnimation(!0),i.animateTo({shape:{r:r.r}},300,"elasticOut")}s&&i.attr("cursor",s),rf(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",h).on("emphasis",l).on("normal",h),this._updateLabel(t,e),Fr(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"),V(n,{shape:{points:r.linePoints||[[r.x,r.y],[r.x,r.y],[r.x,r.y]]}},o,e),V(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"),h=t.getItemVisual(e,"color"),r=(Hr(i.style,i.hoverStyle={},o,s,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:t.getName(e),autoColor:h,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:h,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(sf,z),Wh.extend({type:"pie",init:function(){var t=new z;this._sectorGroup=t},render:function(t,e,n,i){var o,a,r,s,l,h,u;i&&i.from===this.uid||(o=t.getData(),a=this._data,r=this.group,i=e.get("animation"),s=!a,l=t.get("animationType"),h=L(af,this.uid,t,i,n),u=t.get("selectedMode"),o.diff(a).add(function(t){var e=new sf(o,t);s&&"scale"!==l&&e.eachChild(function(t){t.stopAnimation(!0)}),u&&e.on("click",h),o.setItemGraphicEl(t,e),r.add(e)}).update(function(t,e){e=a.getItemGraphicEl(e);e.updateData(o,t),e.off("click"),u&&e.on("click",h),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=D(r.removeClipPath,r),r.setClipPath(this._createClipPath(e.cx,e.cy,i,e.startAngle,e.clockwise,n,t))),this._data=o)},dispose:function(){},_createClipPath:function(t,e,n,i,o,a,r){t=new tr({shape:{cx:t,cy:e,r0:0,r:n,startAngle:i,endAngle:i,clockwise:o}});return $r(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 df=2*Math.PI,pf=Math.PI/180;function gf(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})}}}lf("pie",[{type:"pieToggleSelect",event:"pieselectchanged",method:"toggleSelected"},{type:"pieSelect",event:"pieselected",method:"select"},{type:"pieUnSelect",event:"pieunselected",method:"unSelect"}]),yc(hf("pie")),mc(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=(k(a)||(a=[0,a]),k(i)||(i=[i,i]),T.getWidth()),s=T.getHeight(),l=Math.min(r,s),h=G(i[0],r),u=G(i[1],s),c=G(a[0],l/2),d=G(a[1],l/2),p=-t.get("startAngle")*pf,g=t.get("minAngle")*pf,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,df),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:h,cy:u,r0:c,r:x?NaN:d}):((n="area"!==x?0===m&&_?y:t*y:df/f)<g?b-=n=g:S+=t,i=M+I*n,o.setItemLayout(e,{angle:n,startAngle:M,endAngle:i,clockwise:v,cx:h,cy:u,r0:c,r:x?ps(t,w,[c,d]):d}),M=i)}),b<df&&f&&(b<=.001?(n=df/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)}))),cf(t,d,0,s)})},"pie")),gc(gf("pie")),Ch.extend({type:"series.scatter",dependencies:["grid","polar","geo","singleAxis","calendar"],getInitialData:function(t,e){return td(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 ff=wr({shape:{points:null},symbolProxy:null,buildPath:function(t,e){var n=e.points,i=e.size,o=this.symbolProxy,a=o.shape,e=(t.getContext?t.getContext():t)&&i[0]<4;if(!e)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 mf(){this.group=new z}n=mf.prototype;n.isPersistent=function(){return!this._incremental},n.updateData=function(t){this.group.removeAll();var e=new ff({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 fr({silent:!0})),this.group.add(this._incremental)):this._incremental=null},n.incrementalUpdate=function(t,e){var n;this._incremental?(n=new ff,this._incremental.addDisplayable(n,!0)):((n=new ff({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=Qd(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()},Sc({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=Qg().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?mf:Tg),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(){}}),yc(Jg("scatter","circle")),mc(Qg("scatter")),Ch.extend({type:"series.effectScatter",dependencies:["grid","polar"],getInitialData:function(t,e){return td(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 yf(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 vf(t,e){z.call(this);var n=new vg(t,e),i=new z;this.add(n),this.add(i),i.beforeUpdate=function(){this.attr(n.getScale())},this.updateData(t,e)}var n=vf.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=Qd(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)}yf(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)}yf(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=k(l=t.getItemVisual(e,"symbolSize"))?l:[+l,+l],h=t.getItemVisual(e,"color"),u=(a.attr("scale",l),a.traverse(function(t){t.attr({fill:h})}),r.getShallow("symbolOffset")),c=(u&&((i=a.position)[0]=G(u[0],l[0]),i[1]=G(u[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=h,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",u=function(){n.highlight(),"render"!==c.showEffectOn&&this.startEffectAnimation(c)},this).on("mouseout",i,this).on("emphasis",u,this).on("normal",i,this)),this._effectCfg=c},n.fadeOut=function(t){this.off("mouseover").off("mouseout").off("emphasis").off("normal"),t&&t()},a(vf,z),Sc({type:"effectScatter",init:function(){this._symbolDraw=new Tg(vf)},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(),Qg().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=ne(t.getRoamTransform()),this.group.decomposeTransform())},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(e)},dispose:function(){}}),yc(Jg("effectScatter","circle")),mc(Qg("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=[],E(r,function(t,e){var n;t.value&&k(t.value)?(n=t.value.slice(),t.value.unshift(e)):k(t)?(n=t.slice(),t.unshift(e)):n=t,i.push(n)}),t.data=i),this.defaultValueDimensions);return nf(this,{coordDimensions:[{name:s,type:Cc(e),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:a,type:Cc(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}}),xf=(i(Ch.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:5e3,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"]),_f=["emphasis","itemStyle"],wf=["color","color0","borderColor","borderColor0"],bf=(Wh.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)&&($r(n=Sf(e=o.getItemLayout(t),0,!0),{shape:{points:e.ends}},i,t),Mf(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?V(e,{shape:{points:n.ends}},i,t):e=Sf(n),Mf(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(),Tf(t,this.group)},_incrementalRenderNormal:function(t,e){for(var n,i=e.getData(),o=i.getLayout("isSimpleBox");null!=(n=t.next());){var a=Sf(i.getItemLayout(n));Mf(a,i,n,o),a.incremental=!0,this.group.add(a)}},_incrementalRenderLarge:function(t,e){Tf(e,this.group,!0)},remove:function(t){this._clear()},_clear:function(){this.group.removeAll(),this._data=null},dispose:vt}),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 Sf(t,e,n){var i,o=t.ends;return new bf({shape:{points:n?(i=t,I(o,function(t){return(t=t.slice())[1]=i.initBaseline,t})):o},z2:100})}function Mf(t,e,n,i){var o=e.getItemModel(n),a=o.getModel(xf),r=e.getItemVisual(n,"color"),e=e.getItemVisual(n,"borderColor")||r,n=a.getItemStyle(wf),a=(t.useStyle(n),t.style.strokeNoScale=!0,t.style.fill=r,t.style.stroke=e,t.__simpleBox=i,o.getModel(_f).getItemStyle());Fr(t,a)}var If=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 Tf(t,e,n){var i=t.getData(),o=i.getLayout("largePoints"),a=new If({shape:{points:o},__sign:1}),o=(e.add(a),new If({shape:{points:o},__sign:-1}));e.add(o),Df(1,a,t,i),Df(-1,o,t,i),n&&(a.incremental=!0,o.incremental=!0)}function Df(t,e,n,i){t=0<t?"P":"N",i=i.getVisual("borderColor"+t)||i.getVisual("color"+t),t=n.getModel(xf).getItemStyle(wf);e.useStyle(t),e.style.fill=null,e.style.stroke=i}var Af=["itemStyle","borderColor"],Cf=["itemStyle","borderColor0"],Lf=["itemStyle","color"],kf=["itemStyle","color0"],u={seriesType:"candlestick",plan:Bh(),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){var n;for(;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?Lf:kf)}function r(t,e){return e.get(0<t?Af:Cf)}}},Pf="undefined"!=typeof Float32Array?Float32Array:Array,c={seriesType:"candlestick",plan:Bh(),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=G(lt(o.get("barMaxWidth"),a),a),n=G(lt(o.get("barMinWidth"),1),a),null!=(o=o.get("barWidth"))?G(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){var n,i=new Pf(5*t.count),o=0,a=[],r=[];for(;null!=(n=t.next());){var s=e.get(v,n),l=e.get(x,n),h=e.get(_,n),u=e.get(w,n),c=e.get(b,n);isNaN(s)||isNaN(u)||isNaN(c)?(i[o++]=NaN,o+=4):(i[o++]=Nf(e,n,l,h,_),a[0]=s,a[1]=u,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){var n;for(;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),h=Math.max(o,a),l=p(l,i),h=p(h,i),u=p(r,i),c=p(s,i),d=[];g(d,h,0),g(d,l,1),d.push(f(c),f(h),f(u),f(l)),e.setItemLayout(n,{sign:Nf(e,n,o,a,_),initBaseline:(a<o?h: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]=Cr(i[0]+y/2,1,!1),e[0]=Cr(e[0]-y/2,1,!0),n?t.push(i,e):t.push(e,i)}function f(t){return t[0]=Cr(t[0],1),t}}}}};function Nf(t,e,n,i,o){n=!(i<n)&&(n<i||!(0<e)||t.get(o,e-1)<=i)?1:-1;return n}function Of(t,e,n){mp.call(this,t,e,n),this.type="value",this.angle=0,this.name="",this.model}function Ef(t,e,n){this._model=t,this.dimensions=[],this._indicatorAxes=I(t.getIndicatorModels(),function(t,e){var e="indicator_"+e,n=new Of(e,new dd);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.startAngle}pc(function(t){t&&k(t.series)&&E(t.series,function(t){T(t)&&"k"===t.type&&(t.type="candlestick")})}),yc(u),mc(c),a(Of,mp),Ef.prototype.getIndicatorAxes=function(){return this._indicatorAxes},Ef.prototype.dataToPoint=function(t,e){var n=this._indicatorAxes[e];return this.coordToPoint(n.dataToCoord(t),e)},Ef.prototype.coordToPoint=function(t,e){e=this._indicatorAxes[e].angle;return[this.cx+t*Math.cos(e),this.cy-t*Math.sin(e)]},Ef.prototype.pointToData=function(t){for(var e,n=t[0]-this.cx,t=t[1]-this.cy,i=Math.sqrt(n*n+t*t),o=(n/=i,t/=i,Math.atan2(-t,n)),a=1/0,r=-1,s=0;s<this._indicatorAxes.length;s++){var l=this._indicatorAxes[s],h=Math.abs(o-l.angle);h<a&&(e=l,r=s,a=h)}return[r,+(e&&e.coodToData(i))]},Ef.prototype.resize=function(t,e){var n=t.get("center"),i=e.getWidth(),e=e.getHeight(),o=Math.min(i,e)/2;this.cx=G(n[0],i),this.cy=G(n[1],e),this.startAngle=t.get("startAngle")*Math.PI/180,this.r=G(t.get("radius"),o),E(this._indicatorAxes,function(t,e){t.setExtent(0,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)},Ef.prototype.update=function(i,t){var o=this._indicatorAxes,a=this._model,u=(E(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(),E(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}E(o,function(t,e){var n,i,o=Wd(t.scale,t.model),a=(Fd(t.scale,t.model),t.model),r=t.scale,s=a.getMin(),l=a.getMax(),h=r.getInterval();if(null!=s&&null!=l)r.setExtent(+s,+l),r.setInterval((l-s)/u);else if(null!=s)for(;r.setExtent(+s,n=s+h*u),r.setInterval(h),h=c(h),n<o[1]&&isFinite(n)&&isFinite(o[1]););else if(null!=l)for(;r.setExtent(i=l-h*u,+l),r.setInterval(h),h=c(h),i>o[0]&&isFinite(i)&&isFinite(o[0]););else{t=r.getTicks().length-1,a=(u<t&&(h=c(h)),Math.round((o[0]+o[1])/2/h)*h),t=Math.round(u/2);r.setExtent(gs(a-t*h),gs(a+(u-t)*h)),r.setInterval(h)}})},Ef.dimensions=[],Ef.create=function(t,n){var i=[];return t.eachComponent("radar",function(t){var e=new Ef(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},Ol.register("radar",Ef);u=Mp.valueAxis;function zf(t,e){return C({show:e},t)}_c({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"),h=this.get("name.show"),u=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=p(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),h||(t.name=""),"string"==typeof u?(e=t.name,t.name=u.replace("{value}",null!=e?e:"")):"function"==typeof u&&(t.name=u(t.name,t)),O(new w(t,null,this.ecModel),Yd));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:p({lineStyle:{color:"#bbb"}},u.axisLine),axisLabel:zf(u.axisLabel,!1),axisTick:zf(u.axisTick,!1),splitLine:zf(u.splitLine,!0),splitArea:zf(u.splitArea,!0),indicator:[]}});var Rf=["axisLine","axisTickLabel","axisName"],Bf=(wc({type:"radar",render:function(t,e,n){this.group.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},_buildAxes:function(t){var e=t.coordinateSystem;E(I(e.getIndicatorAxes(),function(t){return new Kp(t.model,{position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}),function(t){E(Rf,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"),h=a.get("color"),u=r.get("color"),h=k(h)?h:[h],u=k(u)?u:[u],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,h,m)].push(new $a({shape:{cx:g,cy:f,r:p[m].coord}})),l&&m<p.length-1&&d[M(d,u,m)].push(new er({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()):A&&console.error("Can't draw value axis "+m),s&&c[M(c,h,m)].push(new ar({shape:{points:_}})),l&&x&&d[M(d,u,m-1)].push(new or({shape:{points:_.concat(x)}})),x=_.slice().reverse()}var b=a.getLineStyle(),S=r.getAreaStyle();E(d,function(t,e){this.group.add(Ir(t,{style:C({stroke:"none",fill:u[e%u.length]},S),silent:!0}))},this),E(c,function(t,e){this.group.add(Ir(t,{style:C({fill:"none",stroke:h[e%h.length]},b),silent:!0}))},this)}function M(t,e,n){n%=e.length;return t[n]=t[n]||[],n}}}),Ch.extend({type:"series.radar",dependencies:["radar"],init:function(t){Bf.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()}},getInitialData:function(t,e){return nf(this,{generateCoord:"indicator_",generateCoordCount:1/0})},formatTooltip:function(i){var o=this.getData(),t=this.coordinateSystem.getIndicatorAxes(),e=this.getData().getName(i);return Es(""===e?this.name:e)+"<br/>"+I(t,function(t,e){var n=o.get(o.mapDimension(t.dim),i);return Es(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}}));Sc({type:"radar",render:function(l,t,e){var n=l.coordinateSystem,m=this.group,y=l.getData(),r=this._data;function h(t,e){var n=t.getItemVisual(e,"symbol")||"circle",i=t.getItemVisual(e,"color");if("none"!==n)return e=t=k(t=t.getItemVisual(e,"symbolSize"))?t:[+t,+t],(t=Qd(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=h(i,o);s&&(t[s.__dimIdx=r]?(s.attr("position",t[r]),os[a?"initProps":"updateProps"](s,{position:e[r]},l,o)):s.attr("position",e[r]),n.add(s))}}function u(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 or,n=new ar,i={shape:{points:a}},e.shape.points=u(a),n.shape.points=u(a),$r(e,i,l,t),$r(n,i,l,t),i=new z,o=new z,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),V(n,a,l),V(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(),h=s.isEmpty()&&s.parentModel.isEmpty()&&l,u=(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",h)}function f(){o.attr("ignore",l)}a.eachChild(function(t){t.setStyle(u),t.hoverStyle=N(c),Hr(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),Fr(t)}),this._data=y},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}}),yc(hf("radar")),yc(Jg("radar","circle")),mc(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)}})}),gc(gf("radar")),pc(function(n){var i,t=n.polar;t&&(k(t)||(t=[t]),i=[],E(t,function(t,e){(t.indicator?(t.type&&!t.shape&&(t.shape=t.type),n.radar=n.radar||[],k(n.radar)||(n.radar=[n.radar]),n.radar):i).push(t)}),n.polar=i),E(n.series,function(t){t&&"radar"===t.type&&t.polarIndex&&(t.radarIndex=t.polarIndex)})}),Ch.extend({type:"series.heatmap",getInitialData:function(t,e){return td(this.getSource(),this,{generateCoord:"value"})},preventIncremental:function(){var t=Ol.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 Vf(){var t=K();this.canvas=t,this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={}}Vf.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"),h=this.pointSize+this.blurSize,o=this.canvas,u=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]);u.globalAlpha=m,u.drawImage(r,g-h,f-h)}if(o.width&&o.height){for(var e=u.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}u.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}},Sc({type:"heatmap",render:function(n,t,e){var i;if(t.eachComponent("visualMap",function(e){e.eachTargetSeries(function(t){t===n&&(i=e)})}),A&&!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"),h=s.getAxis("y");if(A){if("category"!==l.type||"category"!==h.type)throw new Error("Heatmap on cartesian must have two category axes");if(!l.onBand||!h.onBand)throw new Error("Heatmap on cartesian must have two axes with boundaryGap true")}a=l.getBandWidth(),r=h.getBandWidth()}for(var u=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 B({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 B({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="-";Hr(g,f,m,y,{labelFetcher:t,labelDataIndex:_,defaultText:S=b&&null!=b[2]?b[2]:S,isRectText:!0}),w.setStyle(g),Fr(w,c.hasItemOption?f:O({},f)),(w.incremental=o)&&(w.useHoverLayer=!0),u.add(w),c.setItemGraphicEl(_,w)}},_renderOnGeo:function(i,t,e,n){var o,a,r,s,l,h,u,c=e.targetVisuals.inRange,d=e.targetVisuals.outOfRange,p=t.getData(),g=this._hmLayer||this._hmLayer||new Vf,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?(u=e.option.range,v=t[1]-t[0],u=[(u[0]-t[0])/v,(u[1]-t[0])/v],function(t){return t>=u[0]&&t<=u[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,h=0,function(t){for(var e=h;e<l;e++)if((n=a[e].interval)[0]<=t&&t<=n[1]){h=e;break}if(e===l)for(var n,e=h-1;0<=e;e--)if((n=a[e].interval)[0]<=t&&t<=n[1]){h=e;break}return 0<=e&&e<l&&r[e]}),t=(g.update(p,n,f,c.color.getNormalizer(),{inRange:c.color.getColorMapper(),outOfRange:d.color.getColorMapper()},v),new mi({style:{width:n,height:f,x:m,y:y,image:g.canvas},silent:!0}));this.group.add(t)},dispose:function(){}});var Gf=E,Wf="\0__link_datas",Ff="\0__link_mainData";function Hf(n){var i=n.mainData,t=n.datas;t||(t={main:i},n.datasAttr={main:"data"}),n.datas=n.mainData=null,jf(i,t,n),Gf(t,function(e){Gf(i.TRANSFERABLE_METHODS,function(t){e.wrapMethod(t,L(Zf,n))})}),i.wrapMethod("cloneShallow",L(Xf,n)),Gf(i.CHANGABLE_METHODS,function(t){i.wrapMethod(t,L(Uf,n))}),x(t[i.dataType]===i)}function Zf(t,e){var n;return(n=this)[Ff]===n?jf((n=O({},this[Wf]))[this.dataType]=e,n,t):qf(e,this.dataType,this[Ff],t),e}function Uf(t,e){return t.struct&&t.struct.update(this),e}function Xf(n,i){return Gf(i[Wf],function(t,e){t!==i&&qf(t.cloneShallow(),e,i,n)}),i}function Yf(t){var e=this[Ff];return null==t||null==e?e:e[Wf][t]}function jf(n,t,i){n[Wf]={},Gf(t,function(t,e){qf(t,e,n,i)})}function qf(t,e,n,i){(n[Wf][e]=t)[Ff]=n,t.dataType=e,i.struct&&(t[i.structAttr]=i.struct,i.struct[i.datasAttr[e]]=t),t.getLinkedData=Yf}function Kf(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 $f(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 Jf(t,e){var n=e.children;t.parentNode!==e&&(n.push(t),t.parentNode=e)}function Qf(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 h=a[r];h.hierNode.prelim+=s,h.hierNode.modifier+=s,l+=h.hierNode.change,s+=h.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,h=a.hierNode.modifier,u=r.hierNode.modifier,c=s.hierNode.modifier;s=im(s),a=om(a),s&&a;){o=im(o),r=om(r),o.hierNode.ancestor=t;var d=s.hierNode.prelim+c-a.hierNode.prelim-h+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),h+=d,l+=d),c+=s.hierNode.modifier,h+=a.hierNode.modifier,l+=o.hierNode.modifier,u+=r.hierNode.modifier}s&&!im(o)&&(o.hierNode.thread=s,o.hierNode.modifier+=c-l),a&&!om(r)&&(r.hierNode.thread=a,r.hierNode.modifier+=h-u,n=t)}return n}(t,o,t.parentNode.hierNode.defaultAncestor||i[0],e)}function tm(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function em(t){return arguments.length?t:am}function nm(t,e){var n={};return t-=Math.PI/2,n.x=e*Math.cos(t),n.y=e*Math.sin(t),n}function im(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function om(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function am(t,e){return t.parentNode===e.parentNode?1:2}function rm(t,e){var n=t.getItemLayout(e);return n&&!isNaN(n.x)&&!isNaN(n.y)&&"none"!==t.getItemVisual(e,"symbol")}function sm(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 lm(t,e,n,i,o,a){var r,s,l,h=!n,u=t.tree.getNodeByDataIndex(e),c=u.getModel(),a=sm(u,c,a),c=t.tree.root,d=u.parentNode!==c&&u.parentNode||u,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=u.getLayout(),h=(h?(n=new vg(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),V(n,{position:[g.x,g.y]},o),n.getSymbolPath());"radial"===a.layout&&(e=(t=c.children[0]).getLayout(),r=t.children.length,g.x===e.x&&!0===u.isExpand?((l={}).x=(t.children[0].getLayout().x+t.children[r-1].getLayout().x)/2,l.y=(t.children[0].getLayout().y+t.children[r-1].getLayout().y)/2,(s=Math.atan2(l.y-e.y,l.x-e.x))<0&&(s=2*Math.PI+s),(l=l.x<e.x)&&(s-=Math.PI)):((s=Math.atan2(g.y-e.y,g.x-e.x))<0&&(s=2*Math.PI+s),0===u.children.length||0!==u.children.length&&!1===u.isExpand?(l=g.x<e.x)&&(s-=Math.PI):(l=g.x>e.x)||(s-=Math.PI)),h.setStyle({textPosition:l?"left":"right",textRotation:-s,textOrigin:"center",verticalAlign:"middle"})),u.parentNode&&u.parentNode!==c&&(V(t=(t=n.__edge)||(n.__edge=new dr({shape:um(a,p,p),style:C({opacity:0},a.lineStyle)})),{shape:um(a,d,g),style:{opacity:1}},o),i.add(t))}function hm(t,e,n,i,o,a){for(var r,s=t.tree.getNodeByDataIndex(e),l=t.tree.root,h=s.getModel(),a=sm(s,h,a),u=s.parentNode!==l&&s.parentNode||s;null==(r=u.getLayout());)u=u.parentNode!==l&&u.parentNode||u;V(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&&V(c,{shape:um(a,r,r),style:{opacity:0}},o,function(){i.remove(c)})}function um(t,e,n){var i,o,a,r,s,l,h,u,c,d,p,g,f=t.orient;return"radial"===t.layout?(c=e.rawX,d=e.rawY,p=n.rawX,g=n.rawY,s=nm(c,d),l=nm(c,d+(g-d)*t.curvature),h=nm(p,g+(d-g)*t.curvature),u=nm(p,g),{x1:s.x,y1:s.y,x2:u.x,y2:u.y,cpx1:l.x,cpy1:l.y,cpx2:h.x,cpy2:h.y}):(c=e.x,d=e.y,p=n.x,g=n.y,"LR"!==f&&"RL"!==f||(i=c+(p-c)*t.curvature,o=d,a=p+(c-p)*t.curvature,r=g),"TB"!==f&&"BT"!==f||(i=c,o=d+(g-d)*t.curvature,a=p,r=g+(d-g)*t.curvature),{x1:c,y1:d,x2:p,y2:g,cpx1:i,cpy1:o,cpx2:a,cpy2:r})}function cm(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 dm(t,e,n){if(t&&0<=f(e,t.type))return e=n.getData().tree.root,(n=t.targetNode)&&e.contains(n)||null!=(t=t.targetNodeId)&&(n=e.getNodeById(t))?{node:n}:void 0}function pm(t){for(var e=[];t;)(t=t.parentNode)&&e.push(t);return e.reverse()}function gm(t,e){return 0<=f(pm(t),e)}function fm(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}Kf.prototype={constructor:Kf,isRemoved:function(){return this.dataIndex<0},eachNode:function(t,e,n){"function"==typeof t&&(n=e,e=t,t=null);var i,o=(t=nt(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 n=(e=this.hostTree).data.getItemModel(this.dataIndex),(i=this.getLevelModel())||0!==this.children.length&&(0===this.children.length||!1!==this.isExpand)||(o=this.getLeavesModel()),n.getModel(t,(i||o||e.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)}},$f.prototype={constructor:$f,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()}},$f.createTree=function(t,e,n){var s=new $f(e,n.levels,n.leaves),l=[],h=1;!function t(e,n){var i=e.value;h=Math.max(h,k(i)?i.length:1);l.push(e);var o=new Kf(e.name,s);n?Jf(o,n):s.root=o;s._nodes.push(o);var a=e.children;if(a)for(var r=0;r<a.length;r++)t(a[r],o)}(t),s.root.updateDepthAndHeight(0);n=Kc(l,{coordDimensions:["value"],dimensionsCount:h}),t=new Bc(n,e);return t.initData(l),Hf({mainData:t,struct:s,structAttr:"tree"}),s.update(),s},Ch.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,$f.createTree(e,this,i)),o=0;n.eachNode("preorder",function(t){t.depth>o&&(o=t.depth)});var a=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},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 Es(o+(isNaN(e)||null==e?"":" : "+e))},defaultOption:{zlevel:0,z:2,left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",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}}),Sc({type:"tree",init:function(t,e){this._oldTree,this._mainGroup=new z,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._data),h={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){rm(o,t)&&lm(o,t,null,r,i,h)}).update(function(t,e){var n=l.getItemGraphicEl(e);rm(o,t)?lm(o,t,n,r,i,h):n&&hm(l,e,n,r,i,h)}).remove(function(t){var e=l.getItemGraphicEl(t);e&&hm(l,t,e,r,i,h)}).execute(),!0===h.expandAndCollapse&&o.eachItemGraphicEl(function(t,e){t.off("click").on("click",function(){n.dispatchAction({type:"treeExpandAndCollapse",seriesId:i.id,dataIndex:e})})}),this._data=o},dispose:function(){},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})}),yc(Jg("tree","circle")),mc(function(t,C){t.eachSeriesByType("tree",function(t){var e=function(t,e){return Ks(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,em(function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth})):(i=e.width,o=e.height,em());var r,s,l,h,u,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=Qf,M=a,I=[f],T=[];b=I.pop();)if(T.push(b),b.isExpand){var D=b.children;if(D.length)for(var A=0;A<D.length;A++)I.push(D[A])}for(;b=T.pop();)S(b,M);e.hierNode.modifier=-f.hierNode.prelim,cm(f,tm),cm(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,h=e-r.getLayout().x,p=d=c=u=0,"radial"===n?(u=i/(s.getLayout().x+e+h),c=o/(l.depth-1||1),cm(f,function(t){d=(t.getLayout().x+h)*u,p=(t.depth-1)*c;var e=nm(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+h),u=i/(l.depth-1||1),cm(f,function(t){p=(t.getLayout().x+h)*c,d="LR"===g?(t.depth-1)*u:i-(t.depth-1)*u,t.setLayout({x:d,y:p},!0)})):"TB"!==g&&"BT"!==g||(u=i/(s.getLayout().x+e+h),c=o/(l.depth-1||1),cm(f,function(t){d=(t.getLayout().x+h)*u,p="TB"===g?(t.depth-1)*c:o-(t.depth-1)*c,t.setLayout({x:d,y:p},!0)}))}})}),Ch.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;E(t.children,function(t){e(t);t=t.value;k(t)&&(t=t[0]),n+=t});var i=t.value;k(i)&&(i=i[0]);null!=i&&!isNaN(i)||(i=n);i<0&&(i=0);k(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 E(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,$f.createTree(n,this,t).data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(t){var e=this.getData(),n=this.getRawValue(t),n=k(n)?Ls(n[0]):Ls(n);return Es(e.getName(t)+": "+n)},getDataParams:function(t){var e=Ch.prototype.getDataParams.apply(this,arguments),t=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=fm(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=P(),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 mm(t){this.group=new z,t.add(this.group)}mm.prototype={constructor:mm,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),$s(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,h,u,c,d,p,g,f,m,y,v=0,x=e.emptyItemWidth,_=t.get("breadcrumb.height"),w=(a=e.pos,r=e.box,l=r.width,r=r.height,h=G(a.x,l),u=G(a.y,r),c=G(a.x2,l),d=G(a.y2,r),(isNaN(h)||isNaN(parseFloat(a.x)))&&(h=0),(isNaN(c)||isNaN(parseFloat(a.x2)))&&(c=l),(isNaN(u)||isNaN(parseFloat(a.y)))&&(u=0),(isNaN(d)||isNaN(parseFloat(a.y2)))&&(d=r),s=Ps(s||0),{width:Math.max(c-h-s[1]-s[3],0),height:Math.max(d-u-s[0]-s[2],0)}),b=e.totalWidth,S=e.renderList,M=S.length-1;0<=M;M--){var I=S[M],T=I.node,D=I.width,I=I.text,A=(w.width<b&&(b-=D-x,D=x,I=null),new or({shape:{points:(p=v,g=0,A=D,f=_,m=M===S.length-1,y=void 0,y=[[m?p:p-5,g],[p+A,g],[p+A,g+f],[m?p:p-5,g+f]],0===M||y.splice(2,0,[p+A+5,g+f/2]),m||y.push([p,g+f/2]),y)},style:C(n.getItemStyle(),{lineJoin:"bevel",text:I,textFill:i.getTextColor(),textFont:i.getFont()}),z:10,onclick:L(o,T)}));this.group.add(A),m=t,p=T,A.eventData={componentType:"series",componentSubType:"treemap",seriesIndex:m.componentIndex,seriesName:m.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:p&&p.dataIndex,name:p&&p.name},treePathInfo:p&&fm(p,m)},v+=D+8}},remove:function(){this.group.removeAll()}};var ym="\0_ec_interaction_mutex";function vm(t,e){return xm(t)[e]}function xm(t){return t[ym]||(t[ym]={})}function _m(n){this.pointerChecker,this._zr=n,this._opt={};var t=D,i=t(wm,this),o=t(bm,this),a=t(Sm,this),r=t(Mm,this),s=t(Im,this);Ft.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,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 wm(t){var e,n;Ci(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 bm(t){var e,n,i,o,a,r;!Ci(t)&&Dm(this,"moveOnMouseMove",t)&&this._dragging&&"pinch"!==t.gestureEvent&&!vm(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&&Ai(t.event),this.trigger("pan",a,r,i,o,e,n))}function Sm(t){Ci(t)||(this._dragging=!1)}function Mm(t){var e;Dm(this,"zoomOnMouseWheel",t)&&0!==t.wheelDelta&&(e=0<t.wheelDelta?1.1:1/1.1,Tm.call(this,t,e,t.offsetX,t.offsetY))}function Im(t){var e;vm(this._zr,"globalPan")||(e=1<t.pinchScale?1.1:1/1.1,Tm.call(this,t,e,t.pinchX,t.pinchY))}function Tm(t,e,n,i){this.pointerChecker&&this.pointerChecker(t,n,i)&&(Ai(t.event),this.trigger("zoom",e,n,i))}function Dm(t,e,n){t=t._opt[e];return t&&(!nt(t)||n.event[t+"Key"])}s({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},function(){}),i(_m,Ft);function Am(t){return(t=Bm(t)).stroke=t.fill=t.lineWidth=null,t}var Cm=D,Lm=z,km=B,Pm=E,Nm=["label"],Om=["emphasis","label"],Em=["upperLabel"],zm=["emphasis","upperLabel"],Rm=10,Bm=Io([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]);function Vm(){return{nodeGroup:[],background:[],content:[]}}function Gm(u,l,h,c,d,n,p,t,e,i){if(p){var g=p.getLayout();if(g&&g.isInView){var o,a,r,s,f,m,y,v,x,_=g.width,w=g.height,b=g.borderWidth,S=g.invisible,M=p.getRawIndex(),I=t&&t.getRawIndex(),t=p.viewChildren,T=g.upperHeight,t=t&&t.length,D=p.getModel("itemStyle"),A=p.getModel("emphasis.itemStyle"),C=P("nodeGroup",Lm);if(C)return e.add(C),C.attr("position",[g.x||0,g.y||0]),C.__tmNodeWidth=_,C.__tmNodeHeight=w,g.isAboveViewRoot||((e=P("background",km,i,1))&&(f=C,o=e,a=t&&g.upperHeight,o.dataIndex=p.dataIndex,o.seriesIndex=u.seriesIndex,o.setShape({x:0,y:0,width:_,height:w}),r=p.getVisual("borderColor",!0),s=A.get("borderColor"),L(o,function(){var t,e=Am(D),n=(e.fill=r,Bm(A));n.fill=s,a?k(e,n,r,t=_-2*b,T,{x:b,y:0,width:t,height:T}):e.text=n.text=null,o.setStyle(e),Fr(o,n)}),f.add(o)),t)||(e=P("content",km,i,2))&&(f=C,(m=e).dataIndex=p.dataIndex,m.seriesIndex=u.seriesIndex,y=Math.max(_-2*b,0),v=Math.max(w-2*b,0),m.culling=!0,m.setShape({x:b,y:b,width:y,height:v}),x=p.getVisual("color",!0),L(m,function(){var t=Am(D),e=(t.fill=x,Bm(A));k(t,e,x,y,v),m.setStyle(t),Fr(m,e)}),f.add(m)),C}}function L(t,e){S?t.invisible||n.push(t):(e(),t.__tmWillVisible||(t.invisible=!1))}function k(t,e,n,i,o,a){var r=p.getModel(),s=st(u.getFormattedLabel(p.dataIndex,"normal",null,null,a?"upperLabel":"label"),r.get("name")),l=(!a&&g.isLeafRoot&&(s=(l=u.get("drillDownIcon",!0))?l+" "+s:s),r.getModel(a?Em:Nm)),r=r.getModel(a?zm:Om),h=l.getShallow("show");Hr(t,e,l,r,{defaultText:h?s:null,autoColor:n,isRectText:!0}),a&&(t.textRect=N(a)),t.truncate=h&&l.get("ellipsis")?{outerWidth:i,outerHeight:o,minChar:2}:null}function P(t,e,n,i){var o,a,r=null!=I&&h[t][I],s=d[t];return r?(h[t][I]=null,o=r,a=t,(s[M]={}).old="nodeGroup"===a?o.position.slice():O({},o.shape)):S||((r=new e({z:function(t,e){t=t*Rm+e;return(t-1)/t}(n,i)})).__tmDepth=n,a=r.__tmStorageName=t,o=(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}}Sc({type:"treemap",init:function(t,e){this._containerGroup,this._storage=Vm(),this._oldTree,this._breadcrumb,this._controller,this._state="ready"},render:function(t,e,n,i){var o,a,r,s;f(e.findComponents({mainType:"series",subType:"treemap",query:i}),t)<0||(this.seriesModel=t,this.api=n,this.ecModel=e,e=dm(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 Lm,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=Vm(),s=Vm(),l=this._storage,h=[],u=L(Gm,e,s,l,n,r,h),c=(!function i(o,a,r,s,l){s?Pm(a=o,function(t,e){t.isRemoved()||n(e,e)}):new Tc(a,o,t,t).add(n).update(n).remove(L(n,null)).execute();function t(t){return t.getId()}function n(t,e){var t=null!=t?o[t]:null,e=null!=e?a[e]:null,n=u(t,e,r,l);n&&i(t&&t.viewChildren||[],e&&e.viewChildren||[],n,s,l+1)}}(o.root?[o.root]:[],a&&a.root?[a.root]:[],t,o===a||!a,0),i=Vm(),(e=l)&&Pm(e,function(t,e){var n=i[e];Pm(t,function(t){t&&(n.push(t),t.__tmWillDelete=1)})}),i);return this._oldTree=o,this._storage=s,{lastsForAnimation:r,willDeleteEls:c,renderFinally:function(){Pm(c,function(t){Pm(t,function(t){t.parent&&t.parent.remove(t)})}),Pm(h,function(t){t.invisible=!0,t.dirty()})}}},_doAnimation:function(t,o,e,r){var s,l,h,a,u,c;e.get("animation")&&(s=e.get("animationDurationUpdate"),l=e.get("animationEasing"),u=[],c={},h={add:function(t,e,n,i,o){return nt(i)&&(o=i,i=0),!c[t.id]&&(c[t.id]=1,u.push({el:t,target:e,time:n,delay:i,easing:o}),!0)},done:function(t){return a=t,this},start:function(){for(var t=u.length,e=0,n=u.length;e<n;e++){var i=u[e];i.el.animateTo(i.target,i.time,i.delay,i.easing,o)}return this;function o(){--t||(u.length=0,c={},a&&a())}}},Pm(o.willDeleteEls,function(t,a){Pm(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}}))&&h.add(t,o,s,l)})}),Pm(this._storage,function(t,i){Pm(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})),h.add(t,n,s,l))})},this),this._state="animating",h.done(Cm(function(){this._state="ready",o.renderFinally()},this)).start())},_resetController:function(t){var e=this._controller,i=(e||((e=this._controller=new _m(t.getZr())).enable(this.seriesModel.get("roam")),e.on("pan",Cm(this._onPan,this)),e.on("zoom",Cm(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,e){var n;"animating"!==this._state&&(3<Math.abs(t)||3<Math.abs(e))&&(n=this.seriesModel.getData().tree.root)&&(n=n.getLayout())&&this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+t,y:n.y+e,width:n.width,height:n.height}})},_onZoom:function(t,e,n){var i,o;"animating"!==this._state&&(i=this.seriesModel.getData().tree.root)&&(i=i.getLayout())&&(i=new Z(i.x,i.y,i.width,i.height),e-=(o=this.seriesModel.layoutInfo).x,n-=o.y,Jt(o=jt(),o,[-e,-n]),te(o,o,[t,t]),Jt(o,o,[e,n]),i.applyTransform(o),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x,y:i.y,width:i.width,height:i.height}}))},_initEvents:function(t){t.on("click",function(t){var e,n;"ready"===this._state&&(n=this.seriesModel.get("nodeClick",!0))&&(e=this.findTarget(t.offsetX,t.offsetY))&&((t=e.node).getLayout().isLeafRoot?this._rootToNode(e):"zoomToNode"===n?this._zoomToNode(e):"link"===n&&(n=(e=t.hostTree.data.getItemModel(t.dataIndex)).get("link",!0),t=e.get("target",!0)||"blank",n)&&window.open(n,t))},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 mm(this.group))).render(e,t,n.node,Cm(function(t){"animating"!==this._state&&(gm(e.getViewRoot(),t)?this._rootToNode({node:t}):this._zoomToNode({node:t}))},this))},remove:function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=Vm(),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 Wm=function(){},Fm=["treemapZoomToNode","treemapRender","treemapMove"],Hm=0;Hm<Fm.length;Hm++)s({type:Fm[Hm],update:"updateView"},Wm);s({type:"treemapRootToNode",update:"updateView"},function(o,t){t.eachComponent({mainType:"series",subType:"treemap",query:o},function(t,e){var n=dm(o,["treemapZoomToNode","treemapRootToNode"],t);{var i;n&&((i=t.getViewRoot())&&(o.direction=gm(i,n.node)?"rollUp":"drillDown"),t.resetViewRoot(n.node))}})});var Zm=E,Um=T,Xm=-1,S=function(t){var n,e=t.mappingMethod,i=t.type,t=this.option=N(t),i=(this.type=i,this.mappingMethod=e,this._normalizeData=i0[e],Ym[i]);if(this.applyVisual=i.applyVisual,this.getColorMapper=i.getColorMapper,this._doMap=i._doMap[e],"piecewise"===e)jm(t),i=(n=t).pieceList,n.hasSpecialVisual=!1,E(i,function(t,e){t.originIndex=e,null!=t.visual&&(n.hasSpecialVisual=!0)});else if("category"===e)if(t.categories){var o,i=t,a=i.categories,r=i.visual,s=i.categoryMap={};Zm(a,function(t,e){s[t]=e}),k(r)||(o=[],T(r)?Zm(r,function(t,e){e=s[e];o[null!=e?e:Xm]=t}):o[Xm]=r,r=n0(i,o));for(var l=a.length-1;0<=l;l--)null==r[l]&&(delete s[a[l]],a.pop())}else jm(t,!0);else x("linear"!==e||t.dataExtent),jm(t)},Ym=(S.prototype={constructor:S,mapValueToVisual:function(t){var e=this._normalizeData(t);return this._doMap(e,t)},getNormalizer:function(){return D(this._normalizeData,this)}},S.visualHandlers={color:{applyVisual:$m("color"),getColorMapper:function(){var o=this.option;return D("category"===o.mappingMethod?function(t,e){return e||(t=this._normalizeData(t)),Jm.call(this,t)}:function(t,e,n){var i=!!n;return n=Le(t=e?t:this._normalizeData(t),o.parsedVisual,n),i?n:Oe(n,"rgba")},this)},_doMap:{linear:function(t){return Oe(Le(t,this.option.parsedVisual),"rgba")},category:Jm,piecewise:function(t,e){e=e0.call(this,e);return e=null==e?Oe(Le(t,this.option.parsedVisual),"rgba"):e},fixed:Qm}},colorHue:qm(function(t,e){return Pe(t,e)}),colorSaturation:qm(function(t,e){return Pe(t,null,e)}),colorLightness:qm(function(t,e){return Pe(t,null,null,e)}),colorAlpha:qm(Ne),opacity:{applyVisual:$m("opacity"),_doMap:t0([0,1])},liftZ:{applyVisual:$m("liftZ"),_doMap:{linear:Qm,category:Qm,piecewise:Qm,fixed:Qm}},symbol:{applyVisual:function(t,e,n){var i=this.mapValueToVisual(t);if(nt(i))n("symbol",i);else if(Um(i))for(var o in i)i.hasOwnProperty(o)&&n(o,i[o])},_doMap:{linear:Km,category:Jm,piecewise:function(t,e){e=e0.call(this,e);return e=null==e?Km.call(this,t):e},fixed:Qm}},symbolSize:{applyVisual:$m("symbolSize"),_doMap:t0([0,1])}});function jm(t,e){var n=t.visual,i=[];T(n)?Zm(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]),n0(t,i)}function qm(i){return{applyVisual:function(t,e,n){t=this.mapValueToVisual(t),n("color",i(e("color"),t))},_doMap:t0([0,1])}}function Km(t){var e=this.option.visual;return e[Math.round(ps(t,[0,1],[0,e.length-1],!0))]||{}}function $m(i){return function(t,e,n){n(i,this.mapValueToVisual(t))}}function Jm(t){var e=this.option.visual;return e[this.option.loop&&t!==Xm?t%e.length:t]}function Qm(){return this.option.visual[0]}function t0(n){return{linear:function(t){return ps(t,n,this.option.visual,!0)},category:Jm,piecewise:function(t,e){e=e0.call(this,e);return e=null==e?ps(t,n,this.option.visual,!0):e},fixed:Qm}}function e0(t){var e=this.option,n=e.pieceList;if(e.hasSpecialVisual){e=n[S.findPieceIndex(t,n)];if(e&&e.visual)return e.visual[this.type]}}function n0(t,e){return t.visual=e,"color"===t.type&&(t.parsedVisual=I(e,function(t){return Te(t)})),e}var i0={linear:function(t){return ps(t,this.option.dataExtent,[0,1],!0)},piecewise:function(t){var e=this.option.pieceList,t=S.findPieceIndex(t,e,!0);if(null!=t)return ps(t,[0,e.length-1],[0,1],!0)},category:function(t){t=this.option.categories?this.option.categoryMap[t]:t;return null==t?Xm:t},fixed:vt};function o0(t,e,n){return t?e<=n:e<n}S.listVisualTypes=function(){var n=[];return E(Ym,function(t,e){n.push(e)}),n},S.addVisualHandler=function(t,e){Ym[t]=e},S.isValidType=function(t){return Ym.hasOwnProperty(t)},S.eachVisual=function(t,e,n){T(t)?E(t,e,n):e.call(n,t)},S.mapVisual=function(t,n,i){var o,a=k(t)?[]:T(t)?{}:(o=!0,null);return S.eachVisual(t,function(t,e){t=n.call(i,t,e);o?a=t:a[e]=t}),a},S.retrieveVisuals=function(n){var i,o={};return n&&Zm(Ym,function(t,e){n.hasOwnProperty(e)&&(o[e]=n[e],i=!0)}),i?o:null},S.prepareVisualTypes=function(t){if(Um(t)){var n=[];Zm(t,function(t,e){n.push(e)}),t=n}else{if(!k(t))return[];t=t.slice()}return t.sort(function(t,e){return"color"===e&&"color"!==t&&0===t.indexOf("color")?1:-1}),t},S.dependsOn=function(t,e){return"color"===e?!(!t||0!==t.indexOf(e)):t===e},S.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&&u(s,a)}}for(a=0,r=t.length;a<r;a++){var l=t[a],h=l.interval,l=l.close;if(h){if(h[0]===-1/0){if(o0(l[1],n,h[1]))return a}else if(h[1]===1/0){if(o0(l[0],h[0],n))return a}else if(o0(l[0],h[0],n)&&o0(l[1],n,h[1]))return a;e&&u(h[0],a),e&&u(h[1],a)}}if(e)return n===1/0?t.length-1:n===-1/0?0:i;function u(t,e){t=Math.abs(t-n);t<o&&(o=t,i=e)}};var a0=k,r0="itemStyle";function s0(n,i,o,a){var r=O({},i);return E(["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 l0(t){var e,n=u0(t,"color");if(n)return e=u0(t,"colorAlpha"),(t=u0(t,"colorSaturation"))&&(n=Pe(n,null,null,t)),e?Ne(n,e):n}function h0(t,e){return null!=e?Pe(e,null,null,t):null}function u0(t,e){t=t[e];if(null!=t&&"none"!==t)return t}function c0(t,e,n,i,o,a){if(a&&a.length){var r,a=d0(e,"color")||null!=o.color&&"none"!==o.color&&(d0(e,"colorAlpha")||d0(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 S(r)).__drColorMappingBy=o,e}}function d0(t,e){t=t.get(e);return a0(t)&&t.length?{name:e,range:t}:null}function p0(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 g0=Math.max,f0=Math.min,m0=st,y0=E,v0=["itemStyle","borderWidth"],x0=["itemStyle","gapWidth"],_0=["upperLabel","show"],w0=["upperLabel","height"],c={seriesType:"treemap",reset:function(t,e,n,i){var o,a=n.getWidth(),r=n.getHeight(),s=t.option,n=Ks(t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()}),l=s.size||[],h=G(m0(n.width,l[0]),a),l=G(m0(n.height,l[1]),r),u=i&&i.type,c=dm(i,["treemapZoomToNode","treemapRootToNode"],t),i="treemapRender"===u||"treemapMove"===u?i.rootRect:null,d=t.getViewRoot(),p=pm(d),h=("treemapMove"!==u&&(u="treemapZoomToNode"===u?function(t,e,n,i,o){var a,r=(e||{}).node,s=[i,o];if(!r||r===n)return s;var e=i*o,l=e*t.option.zoomToNodeRatio;for(;a=r.parentNode;){for(var h=0,u=a.children,c=0,d=u.length;c<d;c++)h+=u[c].getValue();var p=r.getValue();if(0===p)return s;l*=h/p;var p=a.getModel(),g=p.get(v0),p=Math.max(g,I0(p));l+=4*g*g+(3*g+p)*Math.pow(l,.5),_s<l&&(l=_s),r=a}l<e&&(l=e);n=Math.pow(l/e,.5);return[i*n,o*n]}(t,c,d,h,l):i?[i.width,i.height]:[h,l],h=s.sort,l={squareRatio:s.squareRatio,sort:h=h&&"asc"!==h&&"desc"!==h?"desc":h,leafDepth:s.leafDepth},d.hostTree.clearLayouts(),o={x:0,y:0,width:u[0],height:u[1],area:u[0]*u[1]},d.setLayout(o),function t(e,n,i,o){var a;if(e.isRemoved())return;var r=e.getLayout();a=r.width;r=r.height;var s=e.getModel();var l=s.get(v0);var h=s.get(x0)/2;var u=I0(s);var c=Math.max(l,u);var d=l-h;var p=c-h;s=e.getModel();e.setLayout({borderWidth:l,upperHeight:c,upperLabelHeight:u},!0);a=g0(a-2*d,0);r=g0(r-d-p,0);l=a*r;var g=b0(e,s,l,n,i,o);if(!g.length)return;var f={x:d,y:p,width:a,height:r};var m=f0(a,r);var y=1/0;var v=[];v.area=0;for(var x=0,_=g.length;x<_;){var w=g[x],w=(v.push(w),v.area+=w.getLayout().area,S0(v,m,n.squareRatio));y=w<=y?(x++,w):(v.area-=v.pop().getLayout().area,M0(v,m,f,h,!1),m=f0(f.width,f.height),1/(v.length=v.area=0))}v.length&&M0(v,m,f,h,!0);i||null!=(c=s.get("childrenVisibleMin"))&&l<c&&(i=!0);for(x=0,_=g.length;x<_;x++)t(g[x],n,i,o+1)}(d,l,!1,0),o=d.getLayout(),y0(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);h.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;var o=[i.width/2,i.height/2],a=n;for(;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();var s=i[a];var l=s&&s===t;if(s&&!l||a===i.length&&t!==o)return;t.setLayout({isInView:!0,invisible:!l&&!n.intersect(r),isAboveViewRoot:l},!0);var h=new Z(n.x-r.x,n.y-r.y,n.width,n.height);y0(t.viewChildren||[],function(t){e(t,h,i,o,a+1)})}(h,new Z(-n.x,-n.y,a,r),p,d,0)}};function b0(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=[];s=tt(s,function(t){return!t.isRemoved()}),a=s,(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 h=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],y0(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===h.sum)return t.viewChildren=[];if(h.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 h=o["asc"===i?r-l-1:l].getValue();h/n*e<a&&(s=l,n-=h)}"asc"===i?o.splice(0,r-s):o.splice(s,r-s)}return n}(e,n,h.sum,l,s),0===h.sum)return t.viewChildren=[];for(var u=0,c=s.length;u<c;u++){var d=s[u].getValue()/h.sum*n;s[u].setLayout({area:d})}return i&&(s.length&&t.setLayout({isLeafRoot:!0},!0),s.length=0),t.viewChildren=s,t.setLayout({dataExtent:h.dataExtent},!0),s}function S0(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?g0(e*o/l,l/(e*a)):1/0}function M0(t,e,n,i,o){var a=e===n.width?0:1,r=1-a,s=["x","y"],l=["width","height"],h=n[s[a]],u=e?t.area/e:0;(o||u>n[l[r]])&&(u=n[l[r]]);for(var c=0,d=t.length;c<d;c++){var p=t[c],g={},f=u?p.getLayout().area/u:0,m=g[l[r]]=g0(u-2*i,0),y=n[s[a]]+n[l[a]]-h,y=c===d-1||y<f?y:f,f=g[l[a]]=g0(y-2*i,0);g[s[r]]=n[s[r]]+f0(i,m/2),g[s[a]]=h+f0(i,f/2),h+=y,p.setLayout(g,!0)}n[s[r]]+=u,n[l[r]]-=u}function I0(t){return t.get(_0)?t.get(w0):0}yc({seriesType:"treemap",reset:function(t,e,n,i){var o=t.getData().tree,a=o.root,r=t.getModel(r0);a.isRemoved()||!function n(t,e,i,o,a,r){var s=t.getModel();var l=t.getLayout();if(!l||l.invisible||!l.isInView)return;var h=t.getModel(r0);var u=i[t.depth];var c=s0(h,e,u,o);e=h.get("borderColor");u=h.get("borderColorSaturation");var d;null!=u&&(d=l0(c),e=h0(u,d));t.setVisual("borderColor",e);u=t.viewChildren;{var p;u&&u.length?(p=c0(0,s,l,0,c,u),E(u,function(t,e){(t.depth>=a.length||t===a[t.depth])&&(e=p0(s,c,t,e,p,r),n(t,e,i,o,a,r))})):(d=l0(c),t.setVisual("color",d))}}(a,{},I(o.levelModels,function(t){return t?t.get(r0):null}),r,t.getViewRoot().getAncestors(),t)}}),mc(c),Ch.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;E(t.children,function(t){e(t);t=t.value;k(t)&&(t=t[0]),n+=t});var i=t.value;k(i)&&(i=i[0]);null!=i&&!isNaN(i)||(i=n);i<0&&(i=0);k(t.value)?t.value[0]=i:t.value=i}(n),t.levels||[]),i={};return i.levels=t,$f.createTree(n,this,i).data},optionUpdated:function(){this.resetViewRoot()},getDataParams:function(t){var e=Ch.prototype.getDataParams.apply(this,arguments),t=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=fm(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",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 T0="none",D0="ancestor",A0="self";function C0(t,e,n){z.call(this);var i=new tr({z2:2}),o=(i.seriesIndex=e.seriesIndex,new R({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)}u=C0.prototype;u.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=(s||console.log(e.getLayout()),O({},s)),h=(l.label=null,function(t,e){var n=t.getVisual("color"),i=t.getVisual("visualMeta");i&&0!==i.length||(n=null);i=t.getModel("itemStyle").get("color");if(!i){if(n)return n;if(0===t.depth)return e.option.color[0];n=e.option.color.length;i=e.option.color[function(t){var e=t;for(;1<e.depth;)e=e.parentNode;return f(t.getAncestors()[0].children,e)}(t)%n]}return i}(e,o)),u=r.getModel("itemStyle").getItemStyle(),s=(u=C({lineJoin:"bevel",fill:(u="normal"===n?u:p(r.getModel(n+".itemStyle").getItemStyle(),u)).fill||h},u),t?(a.setShape(l),a.shape.r=s.r0,V(a,{shape:{r:s.r}},i,e.dataIndex),a.useStyle(u)):"object"==typeof u.fill&&u.fill.type||"object"==typeof a.style.fill&&a.style.fill.type?(V(a,{shape:l},i),a.useStyle(u)):V(a,{shape:l,style:u},i),this._updateLabel(i,h,n),r.getShallow("cursor"));s&&a.attr("cursor",s),t&&(l=i.getShallow("highlightPolicy"),this._initEvents(a,e,i,l)),this._seriesModel=i||this._seriesModel,this._ecModel=o||this._ecModel},u.onEmphasis=function(e){var n=this;this.node.hostTree.root.eachNode(function(t){t.piece&&(n.node===t?t.piece.updateData(!1,t,"emphasis"):!function(t,e,n){if(n!==T0)return n===A0?t===e:n===D0?t===e||t.isAncestorOf(e):t===e||t.isDescendantOf(e)}(t,n.node,e)?e!==T0&&t.piece.childAt(0).trigger("downplay"):t.piece.childAt(0).trigger("highlight"))})},u.onNormal=function(){this.node.hostTree.root.eachNode(function(t){t.piece&&t.piece.updateData(!1,t,"normal")})},u.onHighlight=function(){this.updateData(!1,this.node,"highlight")},u.onDownplay=function(){this.updateData(!1,this.node,"downplay")},u._updateLabel=function(t,e,n){var i,o=this.node.getModel(),a=o.getModel("label"),r="normal"===n||"emphasis"===n?a:o.getModel(n+".label"),n=o.getModel("emphasis.label"),o=st(t.getFormattedLabel(this.node.dataIndex,"normal",null,null,"label"),this.node.name),t=(!1===d("show")&&(o=""),this.node.getLayout()),s=r.get("minAngle"),l=(s=(s=null==s?a.get("minAngle"):s)/180*Math.PI,t.endAngle-t.startAngle),l=(null!=s&&Math.abs(l)<s&&(o=""),this.childAt(1)),s=(Hr(l.style,l.hoverStyle||{},a,n,{defaultText:r.getShallow("show")?o:null,autoColor:e,useInsideStyle:!0}),(t.startAngle+t.endAngle)/2),n=Math.cos(s),e=Math.sin(s),h=d("position"),u=d("distance")||0,c=d("align"),h=("outside"===h?(i=t.r+u,c=s>Math.PI/2?"right":"left"):c&&"center"!==c?"left"===c?(i=t.r0+u,s>Math.PI/2&&(c="right")):"right"===c&&(i=t.r-u,s>Math.PI/2)&&(c="left"):(i=(t.r+t.r0)/2,c="center"),l.attr("style",{text:o,textAlign:c,textVerticalAlign:d("verticalAlign")||"middle",opacity:d("opacity")}),i*n+t.cx),u=i*e+t.cy,o=(l.attr("position",[h,u]),d("rotate")),c=0;function d(t){var e=r.get(t);return null==e?a.get(t):e}"radial"===o?(c=-s)<-Math.PI/2&&(c+=Math.PI):"tangential"===o?(c=Math.PI/2-s)>Math.PI/2?c-=Math.PI:c<-Math.PI/2&&(c+=Math.PI):"number"==typeof o&&(c=o*Math.PI/180),l.attr("rotation",c)},u._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(C0,z);Wh.extend({type:"sunburst",init:function(){},render:function(i,o,t,e){var a,r,n,s=this,l=(this.seriesModel=i,this.api=t,this.ecModel=o,i.getData()),h=l.tree.root,t=i.getViewRoot(),u=this.group,c=i.get("renderLabelForZeroData"),d=[],p=(t.eachNode(function(t){d.push(t)}),this._oldChildren||[]);function g(t){return t.getId()}function f(t,e){var n,t=null==t?null:a[t],e=null==e?null:r[e];(t=c||!t||t.getValue()?t:null)!==h&&e!==h&&(e&&e.piece?t?(e.piece.updateData(!1,t,"normal",i,o),l.setItemGraphicEl(t.dataIndex,e.piece)):(n=e)&&n.piece&&(u.remove(n.piece),n.piece=null):t&&(e=new C0(t,i,o),u.add(e),l.setItemGraphicEl(t.dataIndex,e)))}r=p,0===(a=d).length&&0===r.length||new Tc(r,a,g,g).add(f).update(f).remove(L(f,null)).execute(),p=h,0<(n=t).depth?(s.virtualPiece?s.virtualPiece.updateData(!1,p,"normal",i,o):(s.virtualPiece=new C0(p,i,o),u.add(s.virtualPiece)),n.piece._onclickEvent&&n.piece.off("click",n.piece._onclickEvent),p=function(t){s._rootToNode(n.parentNode)},n.piece._onclickEvent=p,s.virtualPiece.on("click",p)):s.virtualPiece&&(u.remove(s.virtualPiece),s.virtualPiece=null),e&&e.highlight&&e.highlight.piece?(t=i.getShallow("highlightPolicy"),e.highlight.piece.onEmphasis(t)):e&&e.unhighlight&&(p=!(p=this.virtualPiece)&&h.children.length?h.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 L0="sunburstRootToNode",k0=(s({type:L0,update:"updateView"},function(o,t){t.eachComponent({mainType:"series",subType:"sunburst",query:o},function(t,e){var n=dm(o,[L0],t);{var i;n&&((i=t.getViewRoot())&&(o.direction=gm(i,n.node)?"rollUp":"drillDown"),t.resetViewRoot(n.node))}})}),"sunburstHighlight"),P0=(s({type:k0,update:"updateView"},function(n,t){t.eachComponent({mainType:"series",subType:"sunburst",query:n},function(t,e){t=dm(n,[k0],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 N0(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}))}yc(L(hf,"sunburst")),mc(L(function(t,e,r,n){e.eachSeriesByType(t,function(t){var e=t.get("center"),n=t.get("radius"),i=(k(n)||(n=[0,n]),k(e)||(e=[e,e]),r.getWidth()),o=r.getHeight(),l=Math.min(i,o),h=G(e[0],i),u=G(e[1],o),c=G(n[0],l/2),i=G(n[1],l/2),e=-t.get("startAngle")*P0,d=t.get("minAngle")*P0,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=N0(i,n);i.length&&E(t.children,function(t){e(t,n)})}(o,n),0),f=(E(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=G(r.get("r0"),l/2)),null!=r.get("r")&&(a=G(r.get("r"),l/2)),t.setLayout({angle:i,startAngle:e,endAngle:n,clockwise:x,cx:h,cy:u,r0:o,r:a})),t.children&&t.children.length&&(s=0,E(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:h,cy:u,r0:c,r:c+v})),b(o,e)})},"sunburst")),gc(L(gf,"sunburst"));var O0=Rt;function E0(){re.call(this)}function z0(t){this.name=t,this.zoomLimit,re.call(this),this._roamTransformable=new E0,this._rawTransformable=new E0,this._center,this._zoom}function R0(t,e,n,i){n=n.seriesModel,n=n?n.coordinateSystem:null;return n===this?n[t](i):null}i(E0,re),z0.prototype={constructor:z0,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=Rt([],i,t),n=Rt([],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(),Kt(this.transform||(this.transform=[]),e.transform||jt()),this._rawTransform=e.getLocalTransform(),this.invTransform=this.invTransform||[],ee(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?O0(n,t,e):bt(n,t)},pointToData:function(t){var e=this.invTransform;return e?O0([],t,e):[t[0],t[1]]},convertToPixel:L(R0,"dataToPoint"),convertFromPixel:L(R0,"pointToData"),containPoint:function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])}},i(z0,re);for(var B0=[126,25],V0=[[[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]]],G0=0;G0<V0.length;G0++)for(var W0=0;W0<V0[G0].length;W0++)V0[G0][W0][0]/=10.5,V0[G0][W0][1]/=-14,V0[G0][W0][0]+=B0[0],V0[G0][W0][1]+=B0[1];var F0={"南海诸岛":[32,80],"广东":[0,-10],"香港":[10,5],"澳门":[-10,10],"天津":[5,5]};var H0={Russia:[100,60],"United States":[-99,38],"United States of America":[-99,38]};var Z0=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];var U0,X0=[function(t){"china"===t.map&&t.regions.push(new ip("南海诸岛",I(V0,function(t){return{type:"polygon",exterior:t}}),B0))},function(t){E(t.regions,function(t){var e=F0[t.name];e&&((t=t.center)[0]+=e[0]/10.5,t[1]+=-e[1]/14)})},function(t){E(t.regions,function(t){var e=H0[t.name];e&&((t=t.center)[0]=e[0],t[1]=e[1])})},function(t){if("china"===t.map)for(var e=0,n=t.regions.length;e<n;++e)"台湾"===t.regions[e].name&&t.regions[e].geometries.push({type:"polygon",exterior:Z0[0]})}];function Y0(t,e,n,i,o){z0.call(this,t),this.map=e,this._nameCoordMap=P(),this.loadGeoJson(n,i,o)}function j0(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 q0(t,e){var n,i=t.get("boundingCoords"),i=(null!=i&&(o=i[0],i=i[1],isNaN(o[0])||isNaN(o[1])||isNaN(i[0])||isNaN(i[1])?A&&console.error("Invalid boundingCoords"):this.setBoundingRect(o[0],o[1],i[0]-o[0],i[1]-o[1])),this.getBoundingRect()),o=t.get("layoutCenter"),a=t.get("layoutSize"),r=e.getWidth(),e=e.getHeight(),s=t.get("aspectScale")||.75,i=i.width/i.height*s,s=!1;o&&a&&(o=[G(o[0],r),G(o[1],e)],a=G(a,Math.min(r,e)),isNaN(o[0])||isNaN(o[1])||isNaN(a)?A&&console.warn("Given layoutCenter or layoutSize data are invalid. Use left/top/width/height instead."):s=!0),s?(n={},1<i?(n.width=a,n.height=a/i):(n.height=a,n.width=a*i),n.y=o[1]-n.height/2,n.x=o[0]-n.width/2):((s=t.getBoxLayoutParams()).aspect=i,n=Ks(s,{width:r,height:e})),this.setViewRect(n.x,n.y,n.width,n.height),this.setCenter(t.get("center")),this.setZoom(t.get("zoom"))}function K0(n,t){E(t.get("geoCoord"),function(t,e){n.addGeoCoord(e,t)})}Y0.prototype={constructor:Y0,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},loadGeoJson:function(t,e,n){try{this.regions=t?ap(t):[]}catch(t){throw"Invalid geoJson format\n"+t.message}e=e||{},n=n||{};for(var i=this.regions,o=P(),a=0;a<i.length;a++){var r=i[a].name,r=n.hasOwnProperty(r)?n[r]:r,r=(i[a].name=r,o.set(r,i[a]),this.addGeoCoord(r,i[a].center),e[r]);r&&i[a].transformTo(r.left,r.top,r.width,r.height)}this._regionsMap=o,this._rect=null,E(X0,function(t){t(this)},this)},transformTo:function(t,e,n,i){var o=this.getBoundingRect(),a=((o=o.clone()).y=-o.y-o.height,this._rawTransformable),o=(a.transform=o.calculateTransform(new Z(t,e,n,i)),a.decomposeTransform(),a.scale);o[1]=-o[1],a.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(){if(this._rect)return this._rect;for(var t=this.regions,e=0;e<t.length;e++){var n,i=t[e].getBoundingRect();(n=n||i.clone()).union(i)}return this._rect=n||new Z(0,0,0,0)},dataToPoint:function(t,e,n){if(t="string"==typeof t?this.getGeoCoord(t):t)return z0.prototype.dataToPoint.call(this,t,e,n)},convertToPixel:L(j0,"dataToPoint"),convertFromPixel:L(j0,"pointToData")},i(Y0,z0),A&&(U0=function(t){console.error("Map "+t+" not exists. You can download map file on http://echarts.baidu.com/download-map.html")});var $0={dimensions:Y0.prototype.dimensions,create:function(t,a){var r=[],n=(t.eachComponent("geo",function(t,e){var n=t.get("map"),i=Mc(n),e=(!A||i||U0(n),new Y0(n+e,n,i&&i.geoJson,i&&i.specialAreas,t.get("nameMap")));e.zoomLimit=t.get("scaleLimit"),r.push(e),K0(e,t),(t.coordinateSystem=e).model=t,e.resize=q0,e.resize(t,a)}),t.eachSeries(function(t){var e;"geo"===t.get("coordinateSystem")&&(e=t.get("geoIndex")||0,t.coordinateSystem=r[e])}),{});return t.eachSeriesByType("map",function(t){var e;t.getHostGeoModel()||(e=t.getMapType(),n[e]=n[e]||[],n[e].push(t))}),E(n,function(t,e){var n=Mc(e),i=(!A||n||U0(t[0].get("map")),I(t,function(t){return t.get("nameMap")})),o=new Y0(e,e,n&&n.geoJson,n&&n.specialAreas,j(i));o.zoomLimit=st.apply(null,I(t,function(t){return t.get("scaleLimit")})),r.push(o),o.resize=q0,o.resize(t[0],a),E(t,function(t){K0(t.coordinateSystem=o,t)})}),r},getFilledRegions:function(t,e,n){var i=(t||[]).slice(),o=(n=n||{},Mc(e)),o=o&&o.geoJson;if(!o)return A&&U0(e),t;for(var a=P(),r=o.features,s=0;s<i.length;s++)a.set(i[s].name,i[s]);for(s=0;s<r.length;s++){var l=r[s].properties.name;a.get(l)||(n.hasOwnProperty(l)&&(l=n[l]),i.push({name:l}))}return i}},J0=(fc("geo",$0),Ch.extend({type:"series.map",dependencies:["geo"],layoutMode:"box",needsDrawMap:!1,seriesGroup:[],init:function(t){J0.superApply(this,"init",arguments),this.updateSelectedMap(this._createSelectableList())},getInitialData:function(t){return nf(this,["value"])},mergeOption:function(t){J0.superApply(this,"mergeOption",arguments),this.updateSelectedMap(this._createSelectableList())},_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:gh(t,i,"selected")});return n=$0.getFilledRegions(n,this.getMapType(),this.option.nameMap)},getHostGeoModel:function(){var t=this.option.geoIndex;return null!=t?this.dependentModels.geo[t]:null},getMapType:function(){return(this.getHostGeoModel()||this).option.map},_fillOption:function(t,e){},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=Ls(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(Es(o[r].name))}return a.join(", ")+"<br />"+Es(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)"}}}}));function Q0(t,e,n){var t=t.target,i=t.position;i[0]+=e,i[1]+=n,t.dirty()}function ty(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(J0,l);var ey={axisPointer:1,tooltip:1,brush:1};function ny(t,e,n){e=e.getComponentByElement(t.topTarget),t=e&&e.coordinateSystem;return e&&e!==n&&!ey[e.mainType]&&t&&t.model!==n}function iy(t){var e=t.getItemStyle(),t=t.get("areaColor");return null!=t&&(e.fill=t),e}function oy(n,t){t.eachChild(function(e){E(e.__regions,function(t){e.trigger(n.isSelected(t.name)?"emphasis":"normal")})})}function ay(t,e){var n=new z;this._controller=new _m(t.getZr()),this._controllerHost={target:e?n:null},this.group=n,this._updateGroup=e,this._mouseDownFlag}function ry(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()}}ay.prototype={constructor:ay,draw:function(p,t,e,n,i){var o,a,r,s,l,g="geo"===p.mainType,f=p.getData&&p.getData(),h=(g&&t.eachComponent({mainType:"series",subType:"map"},function(t){f||t.getHostGeoModel()!==p||(f=t.getData())}),p.coordinateSystem),m=this.group,y=h.scale,u={position:h.position,scale:y},v=(!m.childAt(0)||i?m.attr(u):V(m,u,p),m.removeAll(),["itemStyle"]),x=["emphasis","itemStyle"],_=["label"],w=["emphasis","label"],b=P();E(h.regions,function(t){var e,n,i=b.get(t.name)||b.set(t.name,new z),o=new gr({shape:{paths:[]}}),a=(i.add(o),p.getRegionModel(t.name)||p),r=a.getModel(v),s=a.getModel(x),r=iy(r),s=iy(s),l=a.getModel(_),h=a.getModel(w),u=(f&&(e=f.indexOfName(t.name),u=f.getItemVisual(e,"color",!0))&&(r.fill=u),E(t.geometries,function(t){if("polygon"===t.type){o.shape.paths.push(new or({shape:{points:t.exterior}}));for(var e=0;e<(t.interiors?t.interiors.length:0);e++)o.shape.paths.push(new or({shape:{points:t.interiors[e]}}))}}),o.setStyle(r),o.style.strokeNoScale=!0,o.culling=!0,l.get("show")),r=h.get("show"),c=f&&isNaN(f.get(f.mapDimension("value"),e)),d=f&&f.getItemLayout(e);(g||c&&(u||r)||d&&d.showLabel)&&(c=g?t.name:e,(!f||0<=e)&&(n=p),Hr((u=new R({position:t.center.slice(),scale:[1/y[0],1/y[1]],z2:10,silent:!0})).style,u.hoverStyle={},l,h,{labelFetcher:n,labelDataIndex:c,defaultText:t.name,useInsideStyle:!1},{textAlign:"center",textVerticalAlign:"middle"}),i.add(u)),f?f.setItemGraphicEl(e,i):(a=p.getRegionModel(t.name),o.eventData={componentType:"geo",geoIndex:p.componentIndex,name:t.name,region:a&&a.option||{}}),(i.__regions||(i.__regions=[])).push(t),Fr(i,s,{hoverSilentOnTouch:!!p.get("selectedMode")}),m.add(i)}),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),oy(a,r))}})),oy(p,m)},remove:function(){this.group.removeAll(),this._controller.dispose(),this._controllerHost={}},_updateController:function(i,t,o){var a=i.coordinateSystem,e=this._controller,r=this._controllerHost,n=(r.zoomLimit=i.get("scaleLimit"),r.zoom=a.getZoom(),e.enable(i.get("roam")||!1),i.mainType);function s(){var t={type:"geoRoam",componentType:n};return t[n+"Id"]=i.id,t}e.off("pan").on("pan",function(t,e){this._mouseDownFlag=!1,Q0(r,t,e),o.dispatchAction(O(s(),{dx:t,dy:e}))},this),e.off("zoom").on("zoom",function(t,e,n){var i;this._mouseDownFlag=!1,ty(r,t,e,n),o.dispatchAction(O(s(),{zoom:t,originX:e,originY:n})),this._updateGroup&&(t=this.group,i=t.scale,t.traverse(function(t){"text"===t.type&&t.attr("scale",[1/i[0],1/i[1]])}))},this),e.setPointerChecker(function(t,e,n){return a.getViewRectAfterRoam().contain(e,n)&&!ny(t,o,i)})}},Sc({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 ay(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(u,t,e){var c=u.originalData,d=this.group;c.each(c.mapDimension("value"),function(t,e){var n,i,o,a,r,s,l,h;isNaN(t)||(t=c.getItemLayout(e))&&t.point&&(h=t.point,t=t.offset,n=new $a({style:{fill:u.getData().getVisual("color")},shape:{cx:h[0]+9*t,cy:h[1],r:3},silent:!0,z2:t?8:10}),t||(h=u.mainSeries.getData(),t=c.getName(e),l=h.indexOfName(t),a=c.getItemModel(e),i=a.getModel("label"),o=a.getModel("emphasis.label"),a=h.getItemGraphicEl(l),r=lt(u.getFormattedLabel(e,"normal"),t),s=lt(u.getFormattedLabel(e,"emphasis"),r),h=function(){Zr(n.style,i,{text:i.get("show")?r:null,textPosition:i.getShallow("position")||"bottom"},{isRectText:!0,useInsideStyle:!1}),null!=n.__mapOriginalZ2&&(n.z2=n.__mapOriginalZ2,n.__mapOriginalZ2=null)},a.on("mouseover",l=function(){var t=Zr({},o,{text:o.get("show")?s:null},{isRectText:!0,useInsideStyle:!1},!0);n.style.extendFrom(t),n.__mapOriginalZ2=n.z2,n.z2+=1}).on("mouseout",h).on("emphasis",l).on("normal",h),h()),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=ry(n,i,t.get("scaleLimit")),t.setCenter&&t.setCenter(e.center),t.setZoom&&t.setZoom(e.zoom),"series"===o)&&E(t.seriesGroup,function(t){t.setCenter(e.center),t.setZoom(e.zoom)})})}),mc(function(n){var o={};n.eachSeriesByType("map",function(t){var r,i,e=t.getMapType();t.getHostGeoModel()||o[e]||(r={},E(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)})}),yc(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})})}),gc(Au.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)}),E(n,function(t,e){l=I(t,function(t){return t.getData()}),h=t[0].get("mapValueCalculation"),u={},E(l,function(n){n.each(n.mapDimension("value"),function(t,e){e="ec-"+n.getName(e);u[e]=u[e]||[],isNaN(t)||u[e].push(t)})});for(var l,h,u,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=u[n].length,s=0;s<r;s++)o=Math.min(o,u[n][s]),a=Math.max(a,u[n][s]),i+=u[n][s];return e="min"===h?o:"max"===h?a:"average"===h?i/r:i,0===r?NaN:e}),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]})}),pc(function(t){E(t.series,function(t){t&&"map"===t.type&&(t.map=t.map||t.mapType,C(t,t.mapLocation))})}),lf("map",[{type:"mapToggleSelect",event:"mapselectchanged",method:"toggleSelected"},{type:"mapSelect",event:"mapselected",method:"select"},{type:"mapUnSelect",event:"mapunselected",method:"unSelect"}]);var sy="undefined"==typeof Uint32Array?Array:Uint32Array,ly="undefined"==typeof Float64Array?Array:Float64Array;function hy(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(A&&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),j([e,t[0],t[1]])}))}var uy=Ch.extend({type:"series.lines",dependencies:["grid","polar"],visualColorAccessPath:"lineStyle.color",init:function(t){t.data=t.data||[],hy(t);var e=this._processFlatCoordsArray(t.data);this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset,e.flatCoords&&(t.data=new Float32Array(e.count)),uy.superApply(this,"init",arguments)},mergeOption:function(t){var e;t.data=t.data||[],hy(t),t.data&&(e=this._processFlatCoordsArray(t.data),this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset,e.flatCoords)&&(t.data=new Float32Array(e.count)),uy.superApply(this,"mergeOption",arguments)},appendData:function(t){var e=this._processFlatCoordsArray(t.data);e.flatCoords&&(this._flatCoords?(this._flatCoords=yt(this._flatCoords,e.flatCoords),this._flatCoordsOffset=yt(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(!A||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 sy(n),o=new ly(n),a=0,r=0,s=0,l=0;l<n;){s++;var h=t[l++];i[r++]=a+e,i[r++]=h;for(var u=0;u<h;u++){var c=t[l++],d=t[l++];if(o[a++]=c,o[a++]=d,n<l&&A)throw new Error("Invalid data format.")}}return{flatCoordsOffset:new Uint32Array(i.buffer,0,r),flatCoords:o,count:s}},getInitialData:function(t,e){if(A&&!Ol.get(t.coordinateSystem))throw new Error("Unkown coordinate system "+t.coordinateSystem);var o=new Bc(["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),Es(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}}}),cy=rr.prototype,dy=dr.prototype;function py(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}var gy=wr({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){(py(e)?cy:dy).buildPath(t,e)},pointAt:function(t){return(py(this.shape)?cy:dy).pointAt.call(this,t)},tangentAt:function(t){var e=this.shape,e=py(e)?[e.x2-e.x1,e.y2-e.y1]:dy.tangentAt.call(this,t);return kt(e,e)}}),fy=["fromSymbol","toSymbol"];function my(t){return"_"+t+"Type"}function yy(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=Qd(o,-(e=k(e)?e:[e,e])[0]/2,-e[1]/2,e[0],e[1],i)).name=t,n}function vy(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 xy(t,e,n){z.call(this),this._createLine(t,e,n)}c=xy.prototype;function _y(t){this._ctor=t||xy,this.group=new z}c.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,h,u,c,d,p=this.childOfName("line");(this.__dirty||p.__dirty)&&(d=p.shape.percent,a=p.pointAt(0),kt(s=Dt([],r=p.pointAt(d),a),s),t&&(t.attr("position",a),c=p.tangentAt(0),t.attr("rotation",Math.PI/2-Math.atan2(c[1],c[0])),t.attr("scale",[i*d,i*d])),e&&(e.attr("position",r),c=p.tangentAt(1),e.attr("rotation",-Math.PI/2-Math.atan2(c[1],c[0])),e.attr("scale",[i*d,i*d])),n.ignore||(n.attr("position",r),t=5*i,"end"===n.__position?(l=[s[0]*t+r[0],s[1]*t+r[1]],h=.8<s[0]?"left":s[0]<-.8?"right":"center",u=.8<s[1]?"top":s[1]<-.8?"bottom":"middle"):"middle"===n.__position?(d=[(c=p.tangentAt(e=d/2))[1],-c[0]],p=p.pointAt(e),0<d[1]&&(d[0]=-d[0],d[1]=-d[1]),l=[p[0]+d[0]*t,p[1]+d[1]*t],h="center",u="bottom",e=-Math.atan2(c[1],c[0]),r[0]<a[0]&&(e=Math.PI+e),n.attr("rotation",e)):(l=[-s[0]*t+a[0],-s[1]*t+a[1]],h=.8<s[0]?"right":s[0]<-.8?"left":"center",u=.8<s[1]?"bottom":s[1]<-.8?"top":"middle"),n.attr({style:{textVerticalAlign:n.__verticalAlign||u,textAlign:n.__textAlign||h},position:l,scale:[i,i]})))}},c._createLine=function(n,i,t){var e=n.hostModel,o=n.getItemLayout(i),o=(o=o,vy((a=new gy({name:"line"})).shape,o),a),a=(o.shape.percent=0,$r(o,{shape:{percent:1}},e,i),this.add(o),new R({name:"label"}));this.add(a),E(fy,function(t){var e=yy(t,n,i);this.add(e),this[my(t)]=n.getItemVisual(i,t)},this),this._updateCommonStl(n,i,t)},c.updateData=function(i,o,t){var e=i.hostModel,n=this.childOfName("line"),a=i.getItemLayout(o),r={shape:{}};vy(r.shape,a),V(n,r,e,o),E(fy,function(t){var e=i.getItemVisual(o,t),n=my(t);this[n]!==e&&(this.remove(this.childOfName(t)),t=yy(t,i,o),this.add(t)),this[n]=e},this),this._updateCommonStl(i,o,t)},c._updateCommonStl=function(t,e,n){var i,o,a=t.hostModel,r=this.childOfName("line"),s=n&&n.lineStyle,l=n&&n.hoverLineStyle,h=n&&n.labelModel,u=n&&n.hoverLabelModel,c=(n&&!t.hasItemOption||(s=(n=t.getItemModel(e)).getModel("lineStyle").getLineStyle(),l=n.getModel("emphasis.lineStyle").getLineStyle(),h=n.getModel("label"),u=n.getModel("emphasis.label")),t.getItemVisual(e,"color")),d=ht(t.getItemVisual(e,"opacity"),s.opacity,1),n=(r.useStyle(C({strokeNoScale:!0,fill:"none",stroke:c,opacity:d},s)),r.hoverStyle=l,E(fy,function(t){t=this.childOfName(t);t&&(t.setColor(c),t.setStyle({opacity:d}))},this),h.getShallow("show")),s=u.getShallow("show"),r=this.childOfName("label"),l=((n||s)&&(o=c||"#000",null==(i=a.getFormattedLabel(e,"normal",t.dataType)))&&(i=null==(l=a.getRawValue(e))?t.getName(e):isFinite(l)?gs(l):l),n?i:null),a=s?lt(a.getFormattedLabel(e,"emphasis",t.dataType),i):null,e=r.style;null==l&&null==a||(Zr(r.style,h,{text:l},{autoColor:o}),r.__textAlign=e.textAlign,r.__verticalAlign=e.textVerticalAlign,r.__position=h.get("position")||"middle"),r.hoverStyle=null!=a?{text:a,textFill:u.getTextColor(!0),fontStyle:u.getShallow("fontStyle"),fontWeight:u.getShallow("fontWeight"),fontSize:u.getShallow("fontSize"),fontFamily:u.getShallow("fontFamily")}:{text:null},r.ignore=!n&&!s,Fr(this)},c.highlight=function(){this.trigger("emphasis")},c.downplay=function(){this.trigger("normal")},c.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},c.setLinePoints=function(t){var e=this.childOfName("line");vy(e.shape,t),e.dirty()},a(xy,z);u=_y.prototype;function wy(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 by(t){return isNaN(t[0])||isNaN(t[1])}function Sy(t){return!by(t[0])&&!by(t[1])}function My(t,e,n){z.call(this),this.add(this.createLine(t,e,n)),this._updateEffectSymbol(t,e)}u.isPersistent=function(){return!0},u.updateData=function(r){var s=this,e=s.group,l=s._lineData,h=(s._lineData=r,l||e.removeAll(),wy(r));r.diff(l).add(function(t){var e,n,i;e=s,t=t,i=h,Sy((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=s,i=l,o=r,a=h;i=i.getItemGraphicEl(e),Sy(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()},u.updateLayout=function(){var n=this._lineData;n&&n.eachItemGraphicEl(function(t,e){t.updateLayout(n,e)},this)},u.incrementalPrepareUpdate=function(t){this._seriesScope=wy(t),this._lineData=null,this.group.removeAll()},u.incrementalUpdate=function(t,e){function n(t){t.isGroup||(t.incremental=t.useHoverLayer=!0)}for(var i,o=t.start;o<t.end;o++)Sy(e.getItemLayout(o))&&((i=new this._ctor(e,o,this._seriesScope)).traverse(n),this.group.add(i),e.setItemGraphicEl(o,i))},u.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},u._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};c=My.prototype;function Iy(t,e,n){z.call(this),this._createPolyline(t,e,n)}c.createLine=function(t,e,n){return new xy(t,e,n)},c._updateEffectSymbol=function(t,e){var n=t.getItemModel(e).getModel("effect"),i=n.get("symbolSize"),o=n.get("symbol"),a=(k(i)||(i=[i,i]),n.get("color")||t.getItemVisual(e,"color")),r=this.childAt(1);this._symbolType!==o&&(this.remove(r),(r=Qd(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))},c._updateEffectAnimation=function(e,t,n){var i,o,a,r,s,l,h=this.childAt(1);h&&(i=this,s=e.getItemLayout(n),o=1e3*t.get("period"),a=t.get("loop"),l=t.get("constantSpeed"),r="function"==typeof(t=st(t.get("delay"),function(t){return t/e.count()*o/3})),h.ignore=!0,this.updateAnimationPoints(h,s),(o=0<l?this.getLineLength(h)/l*1e3:o)===this._period&&a===this._loop||(h.stopAnimation(),s=t,r&&(s=t(n)),0<h.__t&&(s=-o*h.__t),h.__t=0,l=h.animate("",a).when(o,{__t:1}).delay(s).during(function(){i.updateSymbolPosition(h)}),a||l.done(function(){i.remove(h)}),l.start()),this._period=o,this._loop=a)},c.getLineLength=function(t){return Nt(t.__p1,t.__cp1)+Nt(t.__cp1,t.__p2)},c.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]},c.updateData=function(t,e,n){this.childAt(0).updateData(t,e,n),this._updateEffectSymbol(t,e)},c.updateSymbolPosition=function(t){var e=t.__p1,n=t.__p2,i=t.__cp1,o=t.__t,a=t.position,r=Zo,s=Uo,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},c.updateLayout=function(t,e){this.childAt(0).updateLayout(t,e);var n=t.getItemModel(e).getModel("effect");this._updateEffectAnimation(t,n,e)},a(My,z);u=Iy.prototype;function Ty(t,e,n){My.call(this,t,e,n),this._lastFrame=0,this._lastFramePercent=0}u._createPolyline=function(t,e,n){var i=t.getItemLayout(e),i=new ar({shape:{points:i}});this.add(i),this._updateCommonStl(t,e,n)},u.updateData=function(t,e,n){var i=t.hostModel;V(this.childAt(0),{shape:{points:t.getItemLayout(e)}},i,e),this._updateCommonStl(t,e,n)},u._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,Fr(this)},u.updateLayout=function(t,e){this.childAt(0).setShape("points",t.getItemLayout(e))},a(Iy,z);var c=Ty.prototype,Dy=(c.createLine=function(t,e,n){return new Iy(t,e,n)},c.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+=Nt(a,r),n.push(i)}if(0!==i){for(o=0;o<n.length;o++)n[o]/=i;this._offsets=n,this._length=i}},c.getLineLength=function(t){return this._length},c.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)}zt(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(Ty,My),wr({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++],h=n[o++],u=n[o++];t.moveTo(s,l),0<i?t.quadraticCurveTo((s+h)/2-(l-u)*i,(l+u)/2-(h-s)*i,h,u):t.lineTo(h,u)}},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++],h=i[r++],u=1;u<s;u++)if(xa(l,h,c=i[r++],d=i[r++]))return a;a++}else for(a=0,r=0;r<i.length;){var l=i[r++],h=i[r++],c=i[r++],d=i[r++];if(0<o){if(wa(l,h,(l+c)/2-(h-d)*o,(h+d)/2-(c-l)*o,c,d))return a}else if(xa(l,h,c,d))return a;a++}return-1}}));function Ay(){this.group=new z}var u=Ay.prototype,Cy=(u.isPersistent=function(){return!this._incremental},u.updateData=function(t){this.group.removeAll();var e=new Dy({rectHover:!0,cursor:"default"});e.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},u.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),5e5<t.count()?(this._incremental||(this._incremental=new fr({silent:!0})),this.group.add(this._incremental)):this._incremental=null},u.incrementalUpdate=function(t,e){var n=new Dy;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))},u.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},u._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)}))},u._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()},{seriesType:"lines",plan:Bh(),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 h=g.getLineCoords(r,n);m&&(i[s++]=h);for(var u=0;u<h;u++)l=f.dataToPoint(n[u],!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),h=g.getLineCoords(r,n),d=[];if(m)for(var p=0;p<h;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 Ly(t){return t=t instanceof Array?t:[t,t]}Sc({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&&(A&&(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=Cy.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 A&&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 Ay:new _y(o?i?Ty:Iy:i?My:xy),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 ky="lineStyle.opacity".split("."),c={seriesType:"lines",reset:function(t,e,n){var i=Ly(t.get("symbol")),o=Ly(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(ky)),{dataEach:a.hasItemOption?function(t,e){var n=Ly((o=t.getItemModel(e)).getShallow("symbol",!0)),i=Ly(o.getShallow("symbolSize",!0)),o=o.get(ky);n[0]&&t.setItemVisual(e,"fromSymbol",n[0]),n[1]&&t.setItemVisual(e,"toSymbol",n[1]),i[0]&&t.setItemVisual(e,"fromSymbolSize",i[0]),i[1]&&t.setItemVisual(e,"toSymbolSize",i[1]),t.setItemVisual(e,"opacity",o)}:null}}};function Py(t){return"_EC_"+t}mc(Cy),yc(c);function Ny(t){this._directed=t||!1,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this.data,this.edgeData}u=Ny.prototype;function Oy(t,e){this.id=null==t?"":t,this.inEdges=[],this.outEdges=[],this.edges=[],this.hostGraph,this.dataIndex=null==e?-1:e}function Ey(t,e,n){this.node1=t,this.node2=e,this.dataIndex=null==n?-1:n}u.type="graph",u.isDirected=function(){return this._directed},u.addNode=function(t,e){var n=this._nodesMap;if(!n[Py(t=t||""+e)])return((e=new Oy(t,e)).hostGraph=this).nodes.push(e),n[Py(t)]=e;A&&console.error("Graph nodes have duplicate name or id")},u.getNodeByIndex=function(t){t=this.data.getRawIndex(t);return this.nodes[t]},u.getNodeById=function(t){return this._nodesMap[Py(t)]},u.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]),Oy.isInstance(t)||(t=i[Py(t)]),Oy.isInstance(e)||(e=i[Py(e)]),t&&e){i=t.id+"-"+e.id;if(!o[i])return((n=new Ey(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}},u.getEdgeByIndex=function(t){t=this.edgeData.getRawIndex(t);return this.edges[t]},u.getEdge=function(t,e){Oy.isInstance(t)&&(t=t.id),Oy.isInstance(e)&&(e=e.id);var n=this._edgesMap;return this._directed?n[t+"-"+e]:n[t+"-"+e]||n[e+"-"+t]},u.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)},u.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)},u.breadthFirstTraverse=function(t,e,n,i){if(e=Oy.isInstance(e)?e:this._nodesMap[Py(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 h=l[a],h=h.node1===s?h.node2:h.node1;if(!h.__visited){if(t.call(i,h,s))return;r.push(h),h.__visited=!0}}}},u.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;e.filterSelf(function(t){t=i[e.getRawIndex(t)];return 0<=t.node1.dataIndex&&0<=t.node2.dataIndex});for(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},u.clone=function(){for(var t=new Ny(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},Oy.prototype={constructor:Oy,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)}},Ey.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(t)};function zy(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 Ry(t,e,n,i,o){for(var a=new Ny(i),r=0;r<t.length;r++)a.addNode(st(t[r].id,t[r].name,r),r);for(var s=[],l=[],h=0,r=0;r<e.length;r++){var u=e[r],c=u.source,d=u.target;a.addEdge(c,d,h)&&(l.push(u),s.push(st(u.id,c+" > "+d)),h++)}var p,i=n.get("coordinateSystem"),i=("cartesian2d"===i||"polar"===i?p=td(t,n):(f(i=(i=Ol.get(i))&&"view"!==i.type&&i.dimensions||[],"value")<0&&i.concat(["value"]),i=Kc(t,{coordDimensions:i}),(p=new Bc(i,n)).initData(t)),new Bc(["value"],n));return i.initData(l,s),o&&o(p,i),Hf({mainData:p,struct:a,structAttr:"graph",datas:{node:p,edge:i},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a}i(Oy,zy("hostGraph","data")),i(Ey,zy("hostGraph","edgeData")),Ny.Node=Oy,Ny.Edge=Ey,wo(Oy),wo(Ey);var By=bc({type:"series.graph",init:function(t){By.superApply(this,"init",arguments),this.legendDataProvider=function(){return this._categoriesData},this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeOption:function(t){By.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(t){By.superApply(this,"mergeDefaultAndTheme",arguments),no(t,["edgeLabel"],["show"])},getInitialData:function(t,a){var e=t.edges||t.links||[],t=t.data||t.nodes||[],r=this;if(t&&e)return Ry(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=Es(t.join(" > ")),n.value&&(t+=" : "+Es(n.value)),t):By.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 Bc(["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 By.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}}}}),Vy=[],Gy=[],Wy=[],Fy=Zo,Hy=Et,Zy=Math.abs;function Uy(t,e,n){for(var i,o=t[0],a=t[1],r=t[2],s=1/0,l=n*n,h=.1,u=.1;u<=.9;u+=.1)Vy[0]=Fy(o[0],a[0],r[0],u),Vy[1]=Fy(o[1],a[1],r[1],u),(p=Zy(Hy(Vy,e)-l))<s&&(s=p,i=u);for(var c=0;c<32;c++){var d=i+h,p=(Gy[0]=Fy(o[0],a[0],r[0],i),Gy[1]=Fy(o[1],a[1],r[1],i),Wy[0]=Fy(o[0],a[0],r[0],d),Wy[1]=Fy(o[1],a[1],r[1],d),Hy(Gy,e)-l);if(Zy(p)<.01)break;d=Hy(Wy,e)-l;h/=2,p<0?0<=d?i+=h:i-=h:0<=d?i-=h:i+=h}return i}function Xy(t,l){var h=[],u=Yo,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=[St(o[0]),St(o[1])],o[2]&&o.__original.push(St(o[2]))),o.__original);null!=o[2]?(bt(c[0],s[0]),bt(c[1],s[2]),bt(c[2],s[1]),a&&"none"!=a&&(i=g(t.node1),n=Uy(c,s[0],i*l),u(c[0][0],c[1][0],c[2][0],n,h),c[0][0]=h[3],c[1][0]=h[4],u(c[0][1],c[1][1],c[2][1],n,h),c[0][1]=h[3],c[1][1]=h[4]),r&&"none"!=r&&(i=g(t.node2),n=Uy(c,s[1],i*l),u(c[0][0],c[1][0],c[2][0],n,h),c[1][0]=h[1],c[2][0]=h[2],u(c[0][1],c[1][1],c[2][1],n,h),c[1][1]=h[1],c[2][1]=h[2]),bt(o[0],c[0]),bt(o[1],c[2]),bt(o[2],c[1])):(bt(d[0],s[0]),bt(d[1],s[1]),Dt(p,d[1],d[0]),kt(p,p),a&&"none"!=a&&(i=g(t.node1),Tt(d[0],d[0],p,i*l)),r&&"none"!=r&&(i=g(t.node2),Tt(d[1],d[1],p,-i*l)),bt(o[0],d[0]),bt(o[1],d[1]))})}var Yy=["itemStyle","opacity"],jy=["lineStyle","opacity"];function qy(t,e){return t.getVisual("opacity")||t.getModel().get(e)}function Ky(t,e,n){var i=t.getGraphicEl(),o=qy(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 $y(t,e){var n=qy(t,e),e=t.getGraphicEl();e.highlight&&e.highlight(),e.traverse(function(t){"group"!==t.type&&t.setStyle("opacity",n)})}Sc({type:"graph",init:function(t,e){var n=new Tg,i=new _y,o=this.group;this._controller=new _m(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):V(r,e,o)),Xy(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),h=o.get("force.layoutAnimation"),u=(l&&this._startForceLayoutIteration(l,h),s.eachItemGraphicEl(function(t,e){var n=s.getItemModel(e),i=(t.off("drag").off("dragend"),s.getItemModel(e).get("draggable"));i&&t.on("drag",function(){l&&(l.warmUp(),this._layouting||this._startForceLayoutIteration(l,h),l.setFixed(e),s.setItemLayout(e,t.position))},this).on("dragend",function(){l&&l.setUnfixed(e)},this),t.setDraggable(i&&l),t.off("mouseover",t.__focusNodeAdjacency),t.off("mouseout",t.__unfocusNodeAdjacency),n.get("focusNodeAdjacency")&&(t.on("mouseover",t.__focusNodeAdjacency=function(){a.dispatchAction({type:"focusNodeAdjacency",seriesId:o.id,dataIndex:t.dataIndex})}),t.on("mouseout",t.__unfocusNodeAdjacency=function(){a.dispatchAction({type:"unfocusNodeAdjacency",seriesId:o.id})}))},this),s.graph.eachEdge(function(t){var e=t.getGraphicEl();e.off("mouseover",e.__focusNodeAdjacency),e.off("mouseout",e.__unfocusNodeAdjacency),t.getModel().get("focusNodeAdjacency")&&(e.on("mouseover",e.__focusNodeAdjacency=function(){a.dispatchAction({type:"focusNodeAdjacency",seriesId:o.id,edgeDataIndex:t.dataIndex})}),e.on("mouseout",e.__unfocusNodeAdjacency=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();u?(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){Ky(t,Yy,.1)}),o.eachEdge(function(t){Ky(t,jy,.1)}),a&&($y(a,Yy),E(a.edges,function(t){t.dataIndex<0||($y(t,jy),$y(t.node1,Yy),$y(t.node2,Yy))})),i)&&($y(i,jy),$y(i.node1,Yy),$y(i.node2,Yy))},unfocusNodeAdjacency:function(t,e,n,i){var o=this._model.getData().graph;o.eachNode(function(t){Ky(t,Yy)}),o.eachEdge(function(t){Ky(t,jy)})},_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,i=this._controllerHost,r=this.group;e.setPointerChecker(function(t,e,n){var i=r.getBoundingRect();return i.applyTransform(r.transform),i.contain(e,n)&&!ny(t,a,o)}),"view"!==o.coordinateSystem.type?e.disable():(e.enable(o.get("roam")),i.zoomLimit=o.get("scaleLimit"),i.zoom=o.coordinateSystem.getZoom(),e.off("pan").off("zoom").on("pan",function(t,e){Q0(i,t,e),a.dispatchAction({seriesId:o.id,type:"graphRoam",dx:t,dy:e})}).on("zoom",function(t,e,n){ty(i,t,e,n),a.dispatchAction({seriesId:o.id,type:"graphRoam",zoom:t,originX:e,originY:n}),this._updateNodeAndLinkScale(),Xy(o.getGraph(),this._getNodeGlobalScale(o)),this._lineDraw.updateLayout()},this))},_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){Xy(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()}});function Jy(t){return t=t instanceof Array?t:[t,t]}function Qy(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")])}),tv(e))}function tv(t){t.eachEdge(function(t){var e=t.getModel().get("lineStyle.curveness")||0,n=St(t.node1.getLayout()),i=St(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 ev(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=St(t.node1.getLayout()),o=St(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=ry(t.coordinateSystem,n);t.setCenter&&t.setCenter(e.center),t.setZoom&&t.setZoom(e.zoom)})}),s({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series.graph:focusNodeAdjacency"},function(){}),s({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series.graph:unfocusNodeAdjacency"},function(){});var nv=Tt;gc(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)}),yc(Jg("graph","circle",null)),yc(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);a["ec-"+e]=t;e=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")))})})}),yc(function(t){t.eachSeriesByType("graph",function(t){var a=t.getGraph(),r=t.getEdgeData(),e=Jy(t.get("edgeSymbol")),n=Jy(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=Jy(e.getShallow("symbol",!0)),i=Jy(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)})})}),mc(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=[];E(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 h=i.get(o[l],a);isNaN(h)||(s=!0),r.push(h)}s?i.setItemLayout(a,n.dataToPoint(r)):i.setItemLayout(a,[NaN,NaN])}tv(i.graph)}else e&&"none"!==e||Qy(t)})}),mc(function(t){t.eachSeriesByType("graph",function(t){"circular"===t.get("layout")&&ev(t)})}),mc(function(t){t.eachSeriesByType("graph",function(t){var c,d,p,e,i,n,o,a,r,s,l,h,u=t.coordinateSystem;u&&"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&&ev(t):Qy(t),i=p.getDataExtent("value"),n=l.getDataExtent("value"),o=e.get("repulsion"),a=e.get("edgeLength"),k(o)||(o=[o,o]),a=[(a=k(a)?a:[a,a])[1],a[0]],r=p.mapArray("value",function(t,e){var n=p.getItemLayout(e),t=ps(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=ps(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=wt(n*(Math.random()-.5)+g[0],i*(Math.random()-.5)+g[1])),a.pp=St(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=(Dt(e,(s=o.n2).p,a.p),At(e)-o.d),o=s.w/(a.w+s.w);isNaN(o)&&(o=0),kt(e,e),a.fixed||nv(a.p,a.p,e,o*r*m),s.fixed||nv(s.p,s.p,e,-(1-o)*r*m)}for(i=0;i<n;i++)(u=d[i]).fixed||(Dt(e,g,u.p),nv(u.p,u.p,e,f*m));for(i=0;i<n;i++)for(var s,a=d[i],l=i+1;l<n;l++){Dt(e,(s=d[l]).p,a.p);0===(r=At(e))&&(Mt(e,Math.random()-.5,Math.random()-.5),r=1);var h=(a.rep+s.rep)/r/r;a.fixed||nv(a.pp,a.pp,e,h),s.fixed||nv(s.pp,s.pp,e,-h)}for(var u,c=[],i=0;i<n;i++)(u=d[i]).fixed||(Dt(c,u.p,u.pp),nv(u.p,u.p,c,m),bt(u.pp,u.p));m*=.992,t&&t(d,p,m<.01)}}}(r,s,{rect:l,gravity:e.get("gravity")}),h=u.step,u.step=function(u){for(var t=0,e=r.length;t<e;t++)r[t].fixed&&bt(r[t].p,d.getNodeByIndex(t).getLayout());h(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,h=r.getLayout();(h=h?h.slice():[])[0]=h[0]||[],h[1]=h[1]||[],bt(h[0],s),bt(h[1],l),+a.curveness&&(h[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(h)}u&&u(n)})},t.forceLayout=u,t.preservedPoints=c,u.step()):t.forceLayout=null)})}),fc("graphView",{create:function(t,h){var u=[];return t.eachSeriesByType("graph",function(t){var e,n,i,o,a,r,s,l=t.get("coordinateSystem");l&&"view"!==l||(l=[],i=[],na((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=h,s=n,(a=(a=t).getBoxLayoutParams()).aspect=s,s=Ks(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 z0).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")),u.push(o))}),u}});i(Ch.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 iv=["itemStyle"],ov=["emphasis","itemStyle"],av=(Wh.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=rv(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?sv(n,e,i,t):e=rv(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:vt}),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 rv(t,e,n,i,o){var a,r,s=t.ends,i=new av({shape:{points:o?(a=i,r=t,I(s,function(t){return(t=t.slice())[a]=r.initBaseline,t})):s}});return sv(t,i,e,n,o),i}function sv(t,e,n,i,o){var a=n.hostModel,o=((0,os[o?"initProps":"updateProps"])(e,{shape:{points:t.ends}},a,i),n.getItemModel(i)),t=o.getModel(iv),a=n.getItemVisual(i,"color"),n=t.getItemStyle(["borderColor"]),i=(n.stroke=a,n.strokeNoScale=!0,e.useStyle(n),e.z2=100,o.getModel(ov).getItemStyle());Fr(e,i)}var lv=["itemStyle","borderColor"];var hv=E;yc(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(lv)||e}),i.isSeriesFiltered(t)||n.each(function(t){var e=n.getItemModel(t);n.setItemVisual(t,{color:e.get(lv,!0)})})})}),mc(function(t){var i,o;i=[],o=[],t.eachSeriesByType("boxplot",function(t){var e=t.getBaseAxis(),n=f(o,e);n<0&&(n=o.length,o[n]=e,i[n]={axis:e,seriesModels:[]}),i[n].seriesModels.push(t)}),hv(i,function(_){var t,e,n,i,o,a,r,s,l,h,u,c,d=_.seriesModels;d.length&&(l=(t=_).axis,n=t.seriesModels,i=n.length,o=t.boxWidthList=[],a=t.boxOffsetList=[],r=[],"category"===l.type?e=l.getBandWidth():(s=0,hv(n,function(t){s=Math.max(s,t.getData().count())}),t=l.getExtent(),Math.abs(t[1]-t[0])),hv(n,function(t){t=t.get("boxWidth");k(t)||(t=[t,t]),r.push([G(t[0],e)||0,G(t[1],e)||0])}),h=(l=.8*e-2)/i*.3,c=(u=(l-h*(i-1))/i)/2-l/2,hv(n,function(t,e){a.push(c),c+=h+u,o.push(Math.min(Math.max(u,r[e][0]),r[e][1]))}),hv(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,h=1-l,e=["x","y"],n=r.mapDimension(e[l]),i=r.mapDimension(e[h],!0);if(!(null==n||i.length<5))for(var u=0;u<r.count();u++){var c=r.get(n,u),d=y(c,i[2],u),p=y(c,i[0],u),g=y(c,i[1],u),f=y(c,i[3],u),c=y(c,i[4],u),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(u,{initBaseline:d[h],ends:m})}function y(t,e,n){var i,e=r.get(e,n),n=[];return n[l]=t,n[h]=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 uv(t,e,n,i,o){mp.call(this,t,e,n),this.type=i||"value",this.axisIndex=o}function cv(t,e,n,i,o,a){e[0]=pv(e[0],n),e[1]=pv(e[1],n),t=t||0;var r=n[1]-n[0],r=(null!=o&&(o=pv(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),dv(e,i)),t=(e[i]+=t,o||0),n=n.slice(),t=(r.sign<0?n[0]+=t:n[1]-=t,e[i]=pv(e[i],n),dv(e,i)),t=(null!=o&&(t.sign!==r.sign||t.span<o)&&(e[1-i]=e[i]+r.sign*o),dv(e,i));return null!=a&&t.span>a&&(e[1-i]=e[i]+t.sign*a),e}function dv(t,e){t=t[e]-t[1-e];return{span:Math.abs(t),sign:0<t||!(t<0)&&e?-1:1}}function pv(t,e){return Math.min(e[1],Math.max(e[0],t))}uv.prototype={constructor:uv,model:null,isHorizontal:function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")}},a(uv,mp);var gv=E,fv=Math.min,mv=Math.max,yv=Math.floor,vv=Math.ceil,xv=gs,_v=Math.PI;function wv(t,e,n){this._axesMap=P(),this._axesLayout={},this.dimensions=t.dimensions,this._rect,this._model=t,this._init(t,e,n)}function bv(t,e){return fv(mv(t,e[0]),e[1])}wv.prototype={type:"parallel",constructor:wv,_init:function(t,i,e){var n=t.dimensions,o=t.parallelAxisIndex;gv(n,function(t,e){var e=o[e],n=i.getComponent("parallelAxis",e),t=this._axesMap.set(t,new uv(t,Hd(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(),gv(this.dimensions,function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(n,n.mapDimension(t)),Fd(e.scale,e.model)},this))},this)},resize:function(t,e){this._rect=Ks(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,h=bv(t.get("axisExpandWidth"),s),u=bv(t.get("axisExpandCount")||0,[0,l]),c=t.get("axisExpandable")&&3<l&&u<l&&1<u&&0<h&&0<r,d=t.get("axisExpandWindow"),s=(d?(p=bv(d[1]-d[0],s),d[1]=d[0]+p):(p=bv(h*(u-1),s),(d=[h*(t.get("axisExpandCenter")||yv(l/2))-p/2])[1]=d[0]+p),(r-p)/(l-u)),t=(s<3&&(s=0),[yv(xv(d[0]/h,1))+1,vv(xv(d[1]/h,1))-1]),p=s/h*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:h,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])}),gv(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,h=s,u=!1;t<l[0]?(n=t*s,i=s):t<=l[1]?(n=e.axisExpandWindow0Pos+t*a-e.axisExpandWindow[0],h=a,u=!0):(n=o-(r-1-t)*s,i=s);return{position:n,axisNameAvailableWidth:h,axisLabelShow:u,nameTruncateMaxWidth:i}}:function(t,e){e=e.layoutLength/(e.axisCount-1);return{position:e*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:_v/2,vertical:0}[s],o=jt();Qt(o,o,i),Jt(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());for(var o=this._axesMap,a=this.dimensions,r=[],s=[],l=(E(a,function(t){r.push(e.mapDimension(t)),s.push(o.get(t).model)}),this.hasAxisBrushed()),h=n;h<i;h++){if(l){for(var u="active",c=e.getValues(r,h),d=0,p=a.length;d<p;d++)if("inactive"===s[d].getActiveState(c[d])){u="inactive";break}}else u="normal";t(u,h)}},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 Qr([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],h=[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)?cv(e,s,h,"all"):r="none"):(l=s[1]-s[0],(s=[mv(0,h[1]*t/l-l/2)])[1]=fv(h[1],s[0]+l),s[0]=s[1]-l),{axisExpandWindow:s,behavior:r}):{behavior:"none",axisExpandWindow:s}}},Ol.register("parallel",{create:function(i,o){var a=[];return i.eachComponent("parallel",function(t,e){var n=new wv(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}});c=h.extend({type:"baseParallelAxis",axis:null,activeIntervals:[],getAreaSelectStyle:function(){return Io([["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--)fs(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"}});p(c.prototype,Yd),Tp("parallel",c,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}),h.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(){h.prototype.init.apply(this,arguments),this.mergeOption({})},mergeOption:function(t){var e=this.option;t&&p(e,t,!0),this._initDimensions()},contains:function(t,e){t=t.get("parallelIndex");return null!=t&&e.getComponent("parallel",t)===this},setAxisExpand:function(e){E(["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=[];E(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 Sv=L,Mv=E,Iv=I,Tv=Math.min,Dv=Math.max,Av=Math.pow,Cv=1e4,Lv=6,kv=6,Pv="globalPan",Nv={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},Ov={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},Ev={brushStyle:{lineWidth:2,stroke:"rgba(0,0,0,0.3)",fill:"rgba(0,0,0,0.1)"},transformable:!0,brushMode:"single",removeOnClick:!1},zv=0;function Rv(t){A&&x(t),Ft.call(this),this._zr=t,this.group=new z,this._brushType,this._brushOption,this._panels,this._track=[],this._dragging,this._covers=[],this._creatingCover,this._creatingPanel,this._enableGlobalPan,A&&this._mounted,this._uid="brushController_"+zv++,this._handlers={},Mv(u1,function(t,e){this._handlers[e]=D(t,this)},this)}function Bv(t,e){var n=d1[e.brushType].createCover(t,e);return n.__brushOption=e,Wv(n,e),t.group.add(n),n}function Vv(t,e){var n=Hv(e);return n.endCreating&&(n.endCreating(t,e),Wv(e,e.__brushOption)),e}function Gv(t,e){var n=e.__brushOption;Hv(e).updateCoverShape(t,e,n.range,n)}function Wv(t,e){var n=e.z;null==n&&(n=Cv),t.traverse(function(t){t.z=n,t.z2=n})}function Fv(t,e){Hv(e).updateCommon(t,e),Gv(t,e)}function Hv(t){return d1[t.__brushOption.brushType]}function Zv(t,e,n){var i,o,a=t._panels;return!a||(o=t._transform,Mv(a,function(t){t.isTargetByCursor(e,n,o)&&(i=t)}),i)}function Uv(t,e){t=t._panels;return!t||null==(e=e.__brushOption.panelId)||t[e]}function Xv(e){var t=e._covers,n=t.length;return Mv(t,function(t){e.group.remove(t)},e),t.length=0,n}function Yv(t,e){var n=Iv(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 jv(t){var e=t.length-1;return[t[0],t[e=e<0?0:e]]}function qv(e,n,t,i){var o=new z;return o.add(new B({name:"main",style:Qv(t),silent:!0,draggable:!0,cursor:"move",drift:Sv(e,n,o,"nswe"),ondragend:Sv(Yv,n,{isEnd:!0})})),Mv(i,function(t){o.add(new B({name:t,style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:Sv(e,n,o,t),ondragend:Sv(Yv,n,{isEnd:!0})}))}),o}function Kv(t,e,n,i){var o=i.brushStyle.lineWidth||0,a=Dv(o,kv),r=n[0][0],s=n[1][0],l=r-o/2,h=s-o/2,u=n[0][1],n=n[1][1],c=u-a+o/2,d=n-a+o/2,u=u-r,n=n-s,p=u+o,o=n+o;Jv(t,e,"main",r,s,u,n),i.transformable&&(Jv(t,e,"w",l,h,a,o),Jv(t,e,"e",c,h,a,o),Jv(t,e,"n",l,h,p,a),Jv(t,e,"s",l,d,p,a),Jv(t,e,"nw",l,h,a,a),Jv(t,e,"ne",c,h,a,a),Jv(t,e,"sw",l,d,a,a),Jv(t,e,"se",c,d,a,a))}function $v(n,i){var t=i.__brushOption,o=t.transformable,e=i.childAt(0);e.useStyle(Qv(t)),e.attr({silent:!o,cursor:o?"move":"default"}),Mv(["w","e","n","s","se","sw","ne","nw"],function(t){var e=i.childOfName(t),t=function t(e,n){{var i,o;return 1<n.length?(n=n.split(""),"e"!==(o=[t(e,n[0]),t(e,n[1])])[0]&&"w"!==o[0]||o.reverse(),o.join("")):(i={left:"w",right:"e",top:"n",bottom:"s"},o=ts({w:"left",e:"right",n:"top",s:"bottom"}[n],e1(e)),i[o])}}(n,t);e&&e.attr({silent:!o,invisible:!o,cursor:o?Ov[t]+"-resize":null})})}function Jv(t,e,n,i,o,a,r){var n=e.childOfName(n);n&&n.setShape((n=a1(t,e,[[i,o],[i+a,o+r]]),t=Tv(n[0][0],n[1][0]),e=Tv(n[0][1],n[1][1]),i=Dv(n[0][0],n[1][0]),n=Dv(n[0][1],n[1][1]),{x:t,y:e,width:i-t,height:n-e}))}function Qv(t){return C({strokeNoScale:!0},t.brushStyle)}function t1(t,e,n,i){var o=[Tv(t,n),Tv(e,i)],t=[Dv(t,n),Dv(e,i)];return[[o[0],t[0]],[o[1],t[1]]]}function e1(t){return Jr(t.group)}function n1(t,e,n,i,o,a,r,s){var l=i.__brushOption,h=t(l.range),u=o1(n,a,r);Mv(o.split(""),function(t){t=Nv[t];h[t[0]][t[1]]+=u[t[0]]}),l.range=e(t1(h[0][0],h[1][0],h[0][1],h[1][1])),Fv(n,i),Yv(n,{isEnd:!1})}function i1(t,e,n,i,o){var a=e.__brushOption.range,r=o1(t,n,i);Mv(a,function(t){t[0]+=r[0],t[1]+=r[1]}),Fv(t,e),Yv(t,{isEnd:!1})}function o1(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 a1(t,e,n){e=Uv(t,e);return e&&!0!==e?e.clipPath(n,t._transform):N(n)}function r1(t){t=t.event;t.preventDefault&&t.preventDefault()}function s1(t,e,n){return t.childOfName("main").contain(e,n)}function l1(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],t=Av(e*e+n*n,.5),Lv<t}(t)||r?(s&&!r&&("single"===l.brushMode&&Xv(t),(a=N(l)).brushType=h1(a.brushType,s),a.panelId=!0===s?null:s.panelId,r=t._creatingCover=Bv(t,a),t._covers.push(r)),r&&(a=d1[h1(t._brushType,s)],r.__brushOption.range=a.getCreatingRange(a1(t,r,t._track)),i&&(Vv(t,r),a.updateCommon(t,r)),Gv(t,r),o={isEnd:i})):i&&"single"===l.brushMode&&l.removeOnClick&&Zv(t,e,n)&&Xv(t)&&(o={isEnd:i,removeOnClick:!0}),o}function h1(t,e){return"auto"===t?(A&&x(e&&e.defaultBrushType,'MUST have defaultBrushType when brushType is "atuo"'),e.defaultBrushType):t}Rv.prototype={constructor:Rv,enableBrush:function(t){{var e,n,i;A&&x(this._mounted),this._brushType&&(e=a=(o=this)._zr,n=Pv,i=o._uid,(e=xm(e))[n]===i&&(e[n]=null),Mv(o._handlers,function(t,e){a.off(e,t)}),o._brushType=o._brushOption=null)}var o,a;if(t.brushType){e=t;var r=(i=this)._zr;if(!i._enableGlobalPan){var s=r;var l=Pv;var h=i._uid;xm(s)[l]=h}Mv(i._handlers,function(t,e){r.on(e,t)}),i._brushType=e.brushType,i._brushOption=p(N(Ev),e,!0)}return this},setPanels:function(t){var e;return t&&t.length?(e=this._panels={},E(t,function(t){e[t.panelId]=N(t)})):this._panels=null,this},mount:function(t){t=t||{},A&&(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){Mv(this._covers,t,e)},updateCovers:function(i){A&&x(this._mounted),i=I(i,function(t){return p(N(Ev),t,!0)});var n="\0-brush-index-",o=this._covers,a=this._covers=[],r=this,s=this._creatingCover;return new Tc(o,i,function(t,e){return l(t.__brushOption,e)},l).add(t).update(t).remove(function(t){o[t]!==s&&r.group.remove(o[t])}).execute(),this;function l(t,e){return(null!=t.id?t.id:n+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]):Vv(r,Bv(r,n)),Fv(r,t))}},unmount:function(){if(!A||this._mounted)return this.enableBrush(!1),Xv(this),this._zr.remove(this.group),A&&(this._mounted=!1),this},dispose:function(){this.unmount(),this.off()}},i(Rv,Ft);var u1={mousedown:function(t){var e;this._dragging?c1.call(this,t):t.target&&t.target.draggable||(r1(t),e=this.group.transformCoordToLocal(t.offsetX,t.offsetY),this._creatingCover=null,(this._creatingPanel=Zv(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=Zv(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)&&d1[s.brushType].contain(o[r],n[0],n[1]))return}a&&i.setCursorStyle("crosshair")}}(this,t,e),this._dragging&&(r1(t),t=l1(this,t,e,!1))&&Yv(this,t)},mouseup:c1};function c1(t){var e;this._dragging&&(r1(t),e=this.group.transformCoordToLocal(t.offsetX,t.offsetY),t=l1(this,t,e,!0),this._dragging=!1,this._track=[],this._creatingCover=null,t)&&Yv(this,t)}var d1={lineX:p1(0),lineY:p1(1),rect:{createCover:function(t,e){return qv(Sv(n1,function(t){return t},function(t){return t}),t,e,["w","e","n","s","se","sw","ne","nw"])},getCreatingRange:function(t){t=jv(t);return t1(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(t,e,n,i){Kv(t,e,n,i)},updateCommon:$v,contain:s1},polygon:{createCover:function(t,e){var n=new z;return n.add(new ar({name:"main",style:Qv(e),silent:!0})),n},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new or({name:"main",draggable:!0,drift:Sv(i1,t,e),ondragend:Sv(Yv,t,{isEnd:!0})}))},updateCoverShape:function(t,e,n,i){e.childAt(0).setShape({points:a1(t,e,n)})},updateCommon:$v,contain:s1}};function p1(a){return{createCover:function(t,e){return qv(Sv(n1,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=jv(t);return[Tv(t[0][a],t[1][a]),Dv(t[0][a],t[1][a])]},updateCoverShape:function(t,e,n,i){var o=Uv(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(),Kv(t,e,o,i)},updateCommon:$v,contain:s1}}function g1(n){return n=y1(n),function(t,e){return ns(t,n)}}function f1(n,i){return n=y1(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 m1(i,o,a){return i=y1(i),function(t,e,n){return i.contain(e[0],e[1])&&!ny(t,o,a)}}function y1(t){return Z.create(t)}var v1=["axisLine","axisTickLabel","axisName"],x1=wc({type:"parallelAxis",init:function(t,e){x1.superApply(this,"init",arguments),(this._brushController=new Rv(e.getZr())).on("brush",D(this._onBrush,this))},render:function(t,e,n,i){var o,a,r,s,l;s=t,o=e,(a=i)&&"axisAreaSelect"===a.type&&o.findComponents({mainType:"parallelAxis",query:a})[0]===s||(this.axisModel=t,this.api=n,this.group.removeAll(),o=this._axisGroup,this._axisGroup=new z,this.group.add(this._axisGroup),t.get("show")&&(s=(a=e.getComponent("parallel",t.get("parallelIndex"))).coordinateSystem,r=(e=t.getAreaSelectStyle()).width,l=t.axis.dim,s=O({strokeContainThreshold:r},s.getAxisLayout(l)),l=new Kp(t,s),E(v1,l.add,l),this._axisGroup.add(l.getGroup()),this._refreshBrushController(s,e,t,a,r,n),l=i&&!1===i.animation?null:t,es(o,this._axisGroup,l)))},_refreshBrushController:function(t,e,n,i,o,a){var r,s=n.axis.getExtent(),l=s[1]-s[0],h=Math.min(30,.1*Math.abs(l)),s=Z.create({x:s[0],y:-o/2,width:l,height:o});s.x-=h,s.width+=2*h,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,position:t.position}).setPanels([{panelId:"pl",clipPath:g1(s),isTargetByCursor:m1(s,a,i),getLinearBrushOtherExtent:f1(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()}});wc({type:"parallel",render:function(t,e,n){this._model=t,this._api=n,this._handlers||(this._handlers={},E(_1,function(t,e){n.getZr().on(e,this._handlers[e]=D(t,this))},this)),$h(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},dispose:function(t,n){E(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 _1={mousedown:function(t){w1(this,"click")&&(this._mouseDownPoint=[t.offsetX,t.offsetY])},mouseup:function(t){var e=this._mouseDownPoint;if(w1(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&&w1(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 w1(t,e){t=t._model;return t.get("axisExpandable")&&t.get("axisExpandTriggerOn")===e}pc(function(t){var e,n,i;(e=t).parallel||(n=!1,E(e.series,function(t){t&&"parallel"===t.type&&(n=!0)}),n&&(e.parallel=[{}])),E(eo((i=t).parallelAxis),function(t){var e;T(t)&&(e=t.parallelIndex||0,e=eo(i.parallel)[e])&&e.parallelAxisDefault&&p(t,e.parallelAxisDefault,!1)})}),Ch.extend({type:"series.parallel",dependencies:["parallel"],visualColorAccessPath:"lineStyle.color",getInitialData:function(t,e){var n,i,o,a=this.getSource();return i=this,(n=a).encodeDefine||(i=i.ecModel.getComponent("parallel",i.get("parallelIndex")))&&(o=n.encodeDefine=P(),E(i.dimensions,function(t){var e=+t.replace("dim","");o.set(t,e)})),td(a,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 b1(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 S1(t,e,n,i,o){i=b1(t,n,i,o),o=new ar({shape:{points:i},silent:!0,z2:10});return e.add(o),t.setItemGraphicEl(n,o),o}function M1(t){var e=t.get("smooth",!0);return!0===e&&(e=.3),{lineStyle:t.getModel("lineStyle").getLineStyle(),smooth:null!=e?e:.3}}function I1(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)}Wh.extend({type:"parallel",init:function(){this._dataGroup=new z,this.group.add(this._dataGroup),this._data,this._initialized},render:function(o,t,e,a){var n,i,r,s,l,h=this._dataGroup,u=o.getData(),c=this._data,d=o.coordinateSystem,p=d.dimensions,g=M1(o);u.diff(c).add(function(t){I1(S1(u,h,t,p,d),u,t,g)}).update(function(t,e){var e=c.getItemGraphicEl(e),n=b1(u,t,p,d),i=(u.setItemGraphicEl(t,e),a&&!1===a.animation?null:o);V(e,{shape:{points:n}},i,t),I1(e,u,t,g)}).remove(function(t){t=c.getItemGraphicEl(t);h.remove(t)}).execute(),this._initialized||(this._initialized=!0,i=o,r=function(){setTimeout(function(){h.removeClipPath()})},s=(n=d).model,n=n.getRect(),l=new B({shape:{x:n.x,y:n.y,width:n.width,height:n.height}}),s="horizontal"===s.get("layout")?"width":"height",l.setShape(s,0),$r(l,{shape:{width:n.width,height:n.height}},i,r),s=l,h.setClipPath(s)),this._data=u},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=M1(e),s=t.start;s<t.end;s++){var l=S1(i,this._dataGroup,s,a,o);l.incremental=!0,I1(l,i,s,r)}},dispose:function(){},remove:function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null}});var T1=["lineStyle","normal","opacity"],D1=(yc({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(T1,!0))&&(n=t),i.setItemVisual(e,"opacity",n)},t.start,t.end)}}}}),Ch.extend({type:"series.gauge",getInitialData:function(t,e){var n=t.data||[];return k(n)||(n=[n]),t.data=n,nf(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 A1(t,e){return e&&("string"==typeof e?t=e.replace("{value}",null!=t?t:""):"function"==typeof e&&(t=e(t))),t}var C1=2*Math.PI,L1=(Wh.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:G(a[0],o.getWidth()),cy:G(a[1],o.getHeight()),r:G(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,h=((p=-t.get("endAngle")/180*Math.PI)-l)%C1,u=l,c=r.get("width"),d=0;d<i.length;d++){var p,g=Math.min(Math.max(i[d][0],0),1),g=new tr({shape:{startAngle:u,endAngle:p=l+h*g,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),u=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,h=o.cx,u=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=G(g.get("length"),c),_=G(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 D,A,C,L=Math.cos(w),k=Math.sin(w);if(g.get("show")&&(D=new rr({shape:{x1:L*c+h,y1:k*c+u,x2:L*(c-x)+h,y2:k*(c-x)+u},style:M,silent:!0}),"auto"===M.stroke&&D.setStyle({stroke:i(T/y)}),l.add(D)),m.get("show")&&(D=A1(gs(T/y*(p-d)+d),m.get("formatter")),A=m.get("distance"),C=i(T/y),l.add(new R({style:Zr({},m,{text:D,x:L*(c-x-A)+h,y:k*(c-x-A)+u,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 rr({shape:{x1:L*c+h,y1:k*c+u,x2:L*(c-_)+h,y2:k*(c-_)+u},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,h,u,c,d=this.group,p=this._data;n.get("pointer.show")?(l=[+n.get("min"),+n.get("max")],h=[i,r],u=n.getData(),c=u.mapDimension("value"),u.diff(p).add(function(t){var e=new D1({shape:{angle:i}});$r(e,{shape:{angle:ps(u.get(c,t),l,h,!0)}},n),d.add(e),u.setItemGraphicEl(t,e)}).update(function(t,e){e=p.getItemGraphicEl(e);V(e,{shape:{angle:ps(u.get(c,t),l,h,!0)}},n),d.add(e),u.setItemGraphicEl(t,e)}).remove(function(t){t=p.getItemGraphicEl(t);d.remove(t)}).execute(),u.eachItemGraphicEl(function(t,e){var n=u.getItemModel(e),i=n.getModel("pointer");t.setShape({x:a.cx,y:a.cy,width:G(i.get("width"),a.r),r:G(i.get("length"),a.r)}),t.useStyle(n.getModel("itemStyle").getItemStyle()),"auto"===t.style.fill&&t.setStyle("fill",o(ps(u.get(c,e),l,[0,1],!0))),Fr(t,n.getModel("emphasis.itemStyle").getItemStyle())}),this._data=u):p&&p.eachItemGraphicEl(function(t){d.remove(t)})},_renderTitle:function(t,e,n,i,o){var a,r,s,l=t.getData(),h=l.mapDimension("value"),u=t.getModel("title");u.get("show")&&(r=u.get("offsetCenter"),a=o.cx+G(r[0],o.r),r=o.cy+G(r[1],o.r),o=+t.get("min"),s=+t.get("max"),i=i(ps(t.getData().get(h,0),[o,s],[0,1],!0)),this.group.add(new R({silent:!0,style:Zr({},u,{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"),h=+t.get("min"),u=+t.get("max");l.get("show")&&(r=l.get("offsetCenter"),a=o.cx+G(r[0],o.r),r=o.cy+G(r[1],o.r),s=G(l.get("width"),o.r),o=G(l.get("height"),o.r),i=i(ps(t=(i=t.getData()).get(i.mapDimension("value"),0),[h,u],[0,1],!0)),this.group.add(new R({silent:!0,style:Zr({},l,{x:a,y:r,text:A1(t,l.get("formatter")),textWidth:isNaN(s)?null:s,textHeight:isNaN(o)?null:o,textAlign:"center",textVerticalAlign:"middle"},{autoColor:i,forceRich:!0})})))}}),bc({type:"series.funnel",init:function(t){L1.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()},this._defaultLabelLine(t)},getInitialData:function(t,e){return nf(this,["value"])},_defaultLabelLine:function(t){no(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=L1.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 k1(t,e){z.call(this);var n=new or,i=new ar,o=new R;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 u=k1.prototype,P1=["itemStyle","opacity"];u.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(P1))?1:s,n=(i.useStyle({}),n?(i.setShape({points:r.points}),i.setStyle({opacity:0}),$r(i,{style:{opacity:s}},o,e)):V(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),Fr(this)},u._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"),V(n,{shape:{points:r.linePoints||r.linePoints}},o,e),V(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"),h=t.getItemVisual(e,"color");Hr(i.style,i.hoverStyle={},o,s,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:t.getName(e),autoColor:h,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:h}),n.setStyle(l.getModel("lineStyle").getLineStyle()),n.hoverStyle=a.getModel("lineStyle").getLineStyle()},a(k1,z),Wh.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 k1(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(){}}),yc(hf("funnel")),mc(function(t,w,e){t.eachSeriesByType("funnel",function(t){function e(t,e){var n,i=ps(o.get(a,t)||0,[h,u],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,Ks(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=[G(t.get("minSize"),r.width),G(t.get("maxSize"),r.width)],l=o.getDataExtent(a),h=t.get("min"),u=t.get("max"),c=(null==h&&(h=Math.min(l[0],0)),null==u&&(u=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=G(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),h=l.getModel("label").get("position"),l=l.getModel("labelLine"),t=f.getItemLayout(t),u=t.points,c="inner"===h||"inside"===h||"center"===h;c?(a="center",r=[[e=(u[0][0]+u[1][0]+u[2][0]+u[3][0])/4,s=(u[0][1]+u[1][1]+u[2][1]+u[3][1])/4],[e,s]]):(l=l.get("length"),a="left"===h?(n=(u[3][0]+u[0][0])/2,i=(u[3][1]+u[0][1])/2,e=(o=n-l)-5,"right"):(n=(u[1][0]+u[2][0])/2,i=(u[1][1]+u[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}})})}),gc(gf("funnel"));var N1=Ch.extend({type:"series.sankey",layoutInfo:null,getInitialData:function(t){var e=t.edges||t.links,t=t.data||t.nodes;if(t&&e)return Ry(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),Es(i)):N1.superCall(this,"formatTooltip",t,e)},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",layout:null,left:"5%",top:"5%",right:"20%",bottom:"5%",nodeWidth:20,nodeGap:8,draggable:!0,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}}),O1=wr({shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,cpx2:0,cpy2:0,extent:0},buildPath:function(t,e){var n=e.extent/2;t.moveTo(e.x1,e.y1-n),t.bezierCurveTo(e.cpx1,e.cpy1-n,e.cpx2,e.cpy2-n,e.x2,e.y2-n),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 E1(){var u=[],e=[];return{key:function(t){return u.push(t),this},sortKeys:function(t){return e[u.length-1]=t,this},entries:function(t){return function n(t,i){var o,a;return u.length<=i?t:(o=[],a=e[i++],E(t,function(t,e){o.push({key:e,values:n(t,i)})}),a?o.sort(function(t,e){return a(t.key,e.key)}):o)}(function n(t,i){if(u.length<=i)return t;for(var e=-1,o=t.length,a=u[i++],r={},s={};++e<o;){var l=a(t[e]),h=s[l];h?h.push(t[e]):s[l]=[t[e]]}return E(s,function(t,e){r[e]=n(t,i)}),r}(t,0),0)}}}function z1(t,s,l){E(t,function(t){var e,n,i,o=0,a=t.length;for(t.sort(H1),e=0;e<a;e++)0<(i=o-(n=t[e]).getLayout().y)&&(r=n.getLayout().y+i,n.setLayout({y:r},!0)),o=n.getLayout().y+n.getLayout().dy+s;if(0<(i=o-s-l)){var r=n.getLayout().y-i;for(n.setLayout({y:r},!0),o=n.getLayout().y,e=a-2;0<=e;--e)0<(i=(n=t[e]).getLayout().y+n.getLayout().dy+s-o)&&(r=n.getLayout().y-i,n.setLayout({y:r},!0)),o=n.getLayout().y}})}function R1(t){return F1(t.node2)*t.getValue()}function B1(t){return F1(t.node1)*t.getValue()}function V1(t,e){return t.node2.getLayout().y-e.node2.getLayout().y}function G1(t,e){return t.node1.getLayout().y-e.node1.getLayout().y}function W1(t,e){for(var n=0,i=t.length,o=-1;++o<i;){var a=+e.call(t,t[o],o);isNaN(a)||(n+=a)}return n}function F1(t){return t.getLayout().y+t.getLayout().dy/2}function H1(t,e){return t.getLayout().y-e.getLayout().y}function Z1(t,e){return t-e}function U1(t){return t.getValue()}Sc({type:"sankey",_model:null,render:function(c,t,i){var e,n,o=c.getGraph(),d=this.group,a=c.layoutInfo,p=a.width,g=a.height,s=c.getData(),f=c.getData("edge");this._model=c,d.removeAll(),d.attr("position",[a.x,a.y]),o.eachEdge(function(t){var e=new O1,n=(e.dataIndex=t.dataIndex,e.seriesIndex=c.seriesIndex,e.dataType="edge",t.getModel("lineStyle")),i=n.get("curveness"),o=t.node1.getLayout(),a=t.node1.getModel(),r=a.get("localX"),a=a.get("localY"),s=t.node2.getLayout(),l=t.node2.getModel(),h=l.get("localX"),l=l.get("localY"),u=t.getLayout(),r=(e.shape.extent=Math.max(1,u.dy),(null!=r?r*p:o.x)+o.dx),a=(null!=a?a*g:o.y)+u.sy+u.dy/2,o=null!=h?h*p:s.x,h=(null!=l?l*g:s.y)+u.ty+u.dy/2;switch(e.setShape({x1:r,y1:a,x2:o,y2:h,cpx1:r*(1-i)+o*i,cpy1:a,cpx2:r*i+o*(1-i),cpy2:h}),e.setStyle(n.getItemStyle()),e.style.fill){case"source":e.style.fill=t.node1.getVisual("color");break;case"target":e.style.fill=t.node2.getVisual("color")}Fr(e,t.getModel("emphasis.lineStyle").getItemStyle()),d.add(e),f.setItemGraphicEl(t.dataIndex,e)}),o.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 B({shape:{x:null!=i?i*p:e.x,y:null!=o?o*g:e.y,width:e.dx,height:e.dy},style:n.getModel("itemStyle").getItemStyle()}),o=t.getModel("emphasis.itemStyle").getItemStyle();Hr(i.style,o,a,r,{labelFetcher:c,labelDataIndex:t.dataIndex,defaultText:t.id,isRectText:!0}),i.setStyle("fill",t.getVisual("color")),Fr(i,o),d.add(i),s.setItemGraphicEl(t.dataIndex,i),i.dataType="node"}),c.get("draggable")&&s.eachItemGraphicEl(function(t,n){t.drift=function(t,e){this.shape.x+=t,this.shape.y+=e,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:c.id,dataIndex:s.getRawIndex(n),localX:this.shape.x/p,localY:this.shape.y/g})},t.draggable=!0,t.cursor="move"}),!this._data&&c.get("animation")&&d.setClipPath((a=d.getBoundingRect(),o=c,e=function(){d.removeClipPath()},$r(n=new B({shape:{x:a.x-10,y:a.y-10,width:0,height:a.height+20}}),{shape:{width:a.width+20,height:a.height+20}},o,e),n)),this._data=c.getData()},dispose:function(){}}),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])})}),mc(function(t,D,e){t.eachSeriesByType("sankey",function(t){var e=t.get("nodeWidth"),n=t.get("nodeGap"),i=(i=D,Ks(t.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()})),o=(t.layoutInfo=i).width,i=i.height,a=t.getGraph(),r=a.nodes,a=a.edges;E(r,function(t){var e=W1(t.outEdges,U1),n=W1(t.inEdges,U1),e=Math.max(e,n);t.setLayout({value:e},!0)});for(var t=0!==tt(r,function(t){return 0===t.getLayout().value}).length?0:t.get("layoutIterations"),s=(n=n,i=i,t=t,r),l=a,h=e,e=o,u=[],c=[],d=[],p=[],g=0,f=0;f<l.length;f++)u[f]=1;for(f=0;f<s.length;f++)c[f]=s[f].inEdges.length,0===c[f]&&d.push(s[f]);for(;d.length;)E(d,function(t){t.setLayout({x:g},!0),t.setLayout({dx:h},!0),E(t.outEdges,function(t){var e=l.indexOf(t),e=(u[e]=0,t.node2),t=s.indexOf(e);0==--c[t]&&p.push(e)})}),++g,d=p,p=[];for(f=0;f<u.length;f++)if(A&&1===u[f])throw new Error("Sankey is a DAG, the original data has cycle!");var m=g,o=(E(s,function(t){t.outEdges.length||t.setLayout({x:m-1},!0)}),s),y=(e-h)/(g-1),e=(E(o,function(t){var e=t.getLayout().x*y;t.setLayout({x:e},!0)}),r),o=a,v=i,x=n,_=t,w=E1().key(function(t){return t.getLayout().x}).sortKeys(Z1).entries(e).map(function(t){return t.values}),a=w,i=o,b=v,S=x,M=[],I=(E(a,function(t){var e=t.length,n=0,t=(E(t,function(t){n+=t.getLayout().value}),(b-(e-1)*S)/n);M.push(t)}),M.sort(function(t,e){return t-e}),M[0]);E(a,function(t){E(t,function(t,e){t.setLayout({y:e},!0);e=t.getLayout().value*I;t.setLayout({dy:e},!0)})}),E(i,function(t){var e=+t.getValue()*I;t.setLayout({dy:e},!0)}),z1(w,x,v);for(var T=1;0<_;_--)!function(t,n){E(t.slice().reverse(),function(t){E(t,function(t){var e;t.outEdges.length&&(e=W1(t.outEdges,R1)/W1(t.outEdges,U1),e=t.getLayout().y+(e-F1(t))*n,t.setLayout({y:e},!0))})})}(w,T*=.99),z1(w,x,v),function(t,n){E(t,function(t){E(t,function(t){var e;t.inEdges.length&&(e=W1(t.inEdges,B1)/W1(t.inEdges,U1),e=t.getLayout().y+(e-F1(t))*n,t.setLayout({y:e},!0))})})}(w,T),z1(w,x,v);n=r;E(n,function(t){t.outEdges.sort(V1),t.inEdges.sort(G1)}),E(n,function(t){var e=0,n=0;E(t.outEdges,function(t){t.setLayout({sy:e},!0),e+=t.getLayout().dy}),E(t.inEdges,function(t){t.setLayout({ty:n},!0),n+=t.getLayout().dy})})})}),yc(function(t,e){t.eachSeriesByType("sankey",function(n){var i,o,t=n.getGraph().nodes;t.length&&(i=1/0,o=-1/0,E(t,function(t){t=t.getLayout().value;t<i&&(i=t),o<t&&(o=t)}),E(t,function(t){var e=new S({type:"color",mappingMethod:"linear",dataExtent:[i,o],visual:n.get("color")}).mapValueToVisual(t.getLayout().value);t.setVisual("color",e);e=t.getModel().get("itemStyle.color");null!=e&&t.setVisual("color",e)}))})});function X1(t,e,n,i,o){mp.call(this,t,e,n),this.type=i||"value",this.position=o||"bottom",this.orient=null}function Y1(t,e,n){this.dimension="single",this.dimensions=["single"],this._axis=null,this._rect,this._init(t,e,n),this.model=t}function j1(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),st(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}X1.prototype={constructor:X1,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(X1,mp),Ol.register("single",{create:function(i,o){var a=[];return i.eachComponent("singleAxis",function(t,e){var n=new Y1(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:(Y1.prototype={type:"singleAxis",axisPointerEnabled:!0,constructor:Y1,_init:function(t,e,n){var i=this.dimension,i=new X1(i,Hd(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&&(E((e=t.getData()).mapDimension(this.dimension,!0),function(t){this._axis.scale.unionExtentFromData(e,t)},this),Fd(this._axis.scale,this._axis.model))},this)},resize:function(t,e){this._rect=Ks({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 q1=["axisLine","axisTickLabel","axisName"],K1="splitLine",$1=ug.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(t,e,n,i){var o=this.group,a=(o.removeAll(),j1(t)),a=new Kp(t,a);E(q1,a.add,a),o.add(a.getGroup()),t.get(K1+".show")&&this["_"+K1](t),$1.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=[],h=0,u=e.getTicksCoords({tickModel:n}),c=[],d=[],p=0;p<u.length;++p){var g=e.toGlobalCoord(u[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),h++%a.length);l[g]=l[g]||[],l[g].push(new rr(Dr({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(Ir(l[p],{style:{stroke:a[p%a.length],lineDash:i.getLineDash(o),lineWidth:o},silent:!0}))}}}),n=h.extend({type:"singleAxis",layoutMode:"box",axis:null,coordinateSystem:null,getCoordSysModel:function(){return this}});function J1(t,e){var n,i,o=[],a=t.seriesIndex;return null==a||!(e=e.getSeriesByIndex(a))||null==(a=ho(n=e.getData(),t))||a<0||k(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})}p(n.prototype,Yd),Tp("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 Q1=E,tx=L,ex=uo();function nx(t,e,n,i,o){var a,r,s,l,h,u,c,d,p,g,f=t.axis;!f.scale.isBlank()&&f.containData(e)&&(t.involveSeries?(r=e,s=t.axis,l=s.dim,h=r,u=[],c=Number.MAX_VALUE,d=-1,Q1(t.seriesModels,function(e,t){var n,i=e.getData().mapDimension(l,!0);if(e.getAxisTooltipData)var o=e.getAxisTooltipData(i,r,s),a=o.dataIndices,o=o.nestestValue;else{if(!(a=e.getData().indicesOfNearest(i[0],r,"category"===s.type?.5:null)).length)return;o=e.getData().get(i[0],a[0])}null!=o&&isFinite(o)&&(i=r-o,(n=Math.abs(i))<=c)&&((n<c||0<=i&&d<0)&&(c=n,d=i,h=o,u.length=0),Q1(a,function(t){u.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})}))}),g=(a={payloadBatch:u,snapToValue:h}).snapToValue,(p=a.payloadBatch)[0]&&null==o.seriesIndex&&O(o,p[0]),!i&&t.snap&&f.containData(g)&&null!=g&&(e=g),n.showPointer(t,e,p,o),n.showTooltip(t,a,g)):n.showPointer(t,e))}function ix(t,e,n,i){t[e.key]={value:n,payloadBatch:i}}function ox(t,e,n,i){var o,a,n=n.payloadBatch,r=e.axis,s=r.model,l=e.axisPointerModel;e.triggerTooltip&&n.length&&(o=hg(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 ax(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 rx(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}_c({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 sx=uo(),lx=E;function hx(t,e,n){var i,c,d;function o(t,u){c.on(t,function(e){n=d;var n,i,o={dispatchAction:a,pendings:i={showTip:[],hideTip:[]}};function a(t){var e=i[t.type];e?e.push(t):(t.dispatchAction=a,n.dispatchAction(t))}lx(sx(c).records,function(t){t&&u(t,e,o.dispatchAction)});var t,r=o.pendings,s=d,l=r.showTip.length,h=r.hideTip.length;l?t=r.showTip[l-1]:h&&(t=r.hideTip[h-1]),t&&(t.dispatchAction=null,s.dispatchAction(t))})}y.node||(i=e.getZr(),sx(i).records||(sx(i).records={}),d=e,sx(c=i).initialized||(sx(c).initialized=!0,o("click",L(cx,"click")),o("mousemove",L(cx,"mousemove")),o("globalout",ux)),(sx(i).records[t]||(sx(i).records[t]={})).handler=n)}function ux(t,e,n){t.handler("leave",null,n)}function cx(t,e,n,i){e.handler(t,n,i)}function dx(t,e){y.node||(e=e.getZr(),(sx(e).records||{})[t]&&(sx(e).records[t]=null))}var px=wc({type:"axisPointer",render:function(t,e,n){var e=e.getComponent("tooltip"),i=t.get("triggerOn")||e&&e.get("triggerOn")||"mousemove|click";hx("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){dx(e.getZr(),"axisPointer"),px.superApply(this._model,"remove",arguments)},dispose:function(t,e){dx("axisPointer",e),px.superApply(this._model,"dispose",arguments)}}),gx=uo(),fx=N,mx=D;function yx(){}function vx(t,e,n,i){!function n(i,t){{var o;return T(i)&&T(t)?(o=!0,E(t,function(t,e){o=o&&n(i[e],t)}),!!o):i===t}}(gx(n).lastProp,i)&&(gx(n).lastProp=i,e?V(n,i,t):(n.stopAnimation(),n.attr(i)))}function xx(t,e){t[e.get("label.show")?"show":"hide"]()}function _x(t){return{position:t.position.slice(),rotation:t.rotation||0}}function bx(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 Sx(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 Mx(t,e,n,i,o){var a,r=Ix(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=Ps(n.get("padding")||0),l=n.getFont(),h=Vn(r,l),u=o.position,c=h.width+s[1]+s[3],h=h.height+s[0]+s[2],s=o.align,s=("right"===s&&(u[0]-=c),"center"===s&&(u[0]-=c/2),o.verticalAlign),d=("bottom"===s&&(u[1]-=h),"middle"===s&&(u[1]-=h/2),o=u,s=c,a=h,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:h,r:n.get("borderRadius")},position:u.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 Ix(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:Ud(e,t),seriesData:[]},E(i,function(t){var e=n.getSeriesByIndex(t.seriesIndex),t=t.dataIndexInside,e=e&&e.getDataParams(t);e&&a.seriesData.push(e)}),nt(o)?r=o.replace("{value}",r):et(o)&&(r=o(a))),r}function Tx(t,e,n){var i=jt();return Qt(i,i,n.rotation),Jt(i,i,n.position),Qr([t.dataToCoord(e),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}function Dx(t,e,n,i,o,a){var r=Kp.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=o.get("label.margin"),Mx(e,i,o,a,{position:Tx(i.axis,t,n),align:r.textAlign,verticalAlign:r.textVerticalAlign})}function Ax(t,e,n){return{x1:t[n=n||0],y1:t[1-n],x2:e[n],y2:e[1-n]}}function Cx(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}}function Lx(t,e,n,i,o,a){return{cx:t,cy:e,r0:n,r:i,startAngle:o,endAngle:a,clockwise:!0}}xo((yx.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(vx,e,a),this.updatePointerEl(i,s,a,e),this.updateLabelEl(i,s,a,e)):(i=this._group=new z,this.createPointerEl(i,s,t,e),this.createLabelEl(i,s,t,e),n.getZr().add(i)),bx(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=sg(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=gx(t).pointerEl=new os[o.type](fx(e.pointer)),t.add(o))},createLabelEl:function(t,e,n,i){e.label&&(e=gx(t).labelEl=new B(fx(e.label)),t.add(e),xx(e,i))},updatePointerEl:function(t,e,n){t=gx(t).pointerEl;t&&(t.setStyle(e.pointer.style),n(t,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,n,i){t=gx(t).labelEl;t&&(t.setStyle(e.label.style),n(t,{shape:e.label.shape,position:e.label.position}),xx(t,i))},_renderHandle:function(t){var e,n,i,o,a,r;!this._dragging&&this.updateHandleTransform&&(e=this._axisPointerModel,n=this._api.getZr(),i=this._handle,o=e.getModel("handle"),r=e.get("status"),o.get("show")&&r&&"hide"!==r?(this._handle||(a=!0,i=this._handle=is(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){Ai(t.event)},onmousedown:mx(this._onHandleDragMove,this,0,0),drift:mx(this._onHandleDragMove,this),ondragend:mx(this._onHandleDragEnd,this)}),n.add(i)),bx(i,e,!1),i.setStyle(o.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"])),k(r=o.get("size"))||(r=[r,r]),i.attr("scale",[r[0]/2,r[1]/2]),$h(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,a)):(i&&n.remove(i),this._handle=null))},_moveHandleToValue:function(t,e){vx(this._axisPointerModel,!e&&this._moveAnimation,this._handle,_x(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var n=this._handle;n&&(this._dragging=!0,t=this.updateHandleTransform(_x(n),[t,e],this._axisModel,this._axisPointerModel),this._payloadInfo=t,n.stopAnimation(),n.attr(_x(t)),gx(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=yx);c=yx.extend({makeElOption:function(t,e,n,i,o){var a,r=n.axis,s=r.grid,l=i.get("type"),h=kx(s,r).getOtherAxis(r).getGlobalExtent(),u=r.toGlobalCoord(r.dataToCoord(e,!0)),r=(l&&"none"!==l&&(a=Sx(i),(l=Px[l](r,u,h,a)).style=a,t.graphicKey=l.type,t.pointer=l),gg(s.model,n));Dx(e,t,r,n,i,o)},getHandleTransform:function(t,e,n){var i=gg(e.axis.grid.model,e,{labelInside:!1});return i.labelMargin=n.get("handle.margin"),{position:Tx(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=kx(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];a[n]=r[n];return{position:r,rotation:t.rotation,cursorPoint:a,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][n]}}});function kx(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}var Px={line:function(t,e,n,i){e=Ax([e,n[0]],[e,n[1]],Nx(t));return Dr({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:Cx([e-o/2,n[0]],[o,a],Nx(t))}}};function Nx(t){return"x"===t.dim?0:1}ug.registerAxisPointerClass("CartesianAxisPointer",c),pc(function(t){var e;t&&(t.axisPointer&&0!==t.axisPointer.length||(t.axisPointer={}),e=t.axisPointer.link)&&!k(e)&&(t.axisPointer.link=[e])}),gc(Au.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=ag(t,e)}),s({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},function(t,e,n){var a,r,i,s,l,o,h,u,c,d,p,g,f,m,y=t.currTrigger,v=[t.x,t.y],x=t,_=t.dispatchAction||D(n.dispatchAction,n),w=e.getComponent("axisPointer").coordSysAxesInfo;if(w)return rx(v)&&(v=J1({seriesIndex:x.seriesIndex,dataIndex:x.dataIndex},e).point),a=rx(v),r=x.axesInfo,i=w.axesInfo,s="leave"===y||rx(v),l={},e={list:[],map:{}},h={showPointer:tx(ix,o={}),showTooltip:tx(ox,e)},Q1(w.coordSysMap,function(t,e){var o=a||t.containPoint(v);Q1(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))&&nx(t,i,h,!1,l)})}),u={},Q1(i,function(n,t){var i=n.linkGroup;i&&!o[t]&&Q1(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,ax(t),ax(n)))),u[n.key]=e)})}),Q1(u,function(t,e){nx(i[e],t,h,!0,l)}),c=o,x=i,d=l.axesInfo=[],Q1(x,function(t,e){var n=t.axisPointerModel.option,e=c[e];e?(t.useHandle||(n.status="show"),n.value=e.value,n.seriesDataIndices=(e.payloadBatch||[]).slice()):t.useHandle||(n.status="hide"),"show"===n.status&&d.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:n.value})}),y=e,x=t,e=_,rx(t=v)||!y.list.length?e({type:"hideTip"}):(_=((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=i,x=(t=n).getZr(),_="axisPointerLastHighlights",p=ex(x)[_]||{},g=ex(x)[_]={},Q1(e,function(t,e){t=t.axisPointerModel.option;"show"===t.status&&Q1(t.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;g[e]=t})}),f=[],m=[],E(p,function(t,e){g[e]||m.push(t)}),E(g,function(t,e){p[e]||f.push(t)}),m.length&&t.dispatchAction({type:"downplay",escapeConnect:!0,batch:m}),f.length&&t.dispatchAction({type:"highlight",escapeConnect:!0,batch:f}),l});var Ox=["x","y"],Ex=["width","height"],u=yx.extend({makeElOption:function(t,e,n,i,o){var a,r=n.axis,s=r.coordinateSystem,l=Bx(s,1-Rx(r)),s=s.dataToPoint(e)[0],h=i.get("type"),r=(h&&"none"!==h&&(a=Sx(i),(h=zx[h](r,s,l,a)).style=a,t.graphicKey=h.type,t.pointer=h),j1(n));Dx(e,t,r,n,i,o)},getHandleTransform:function(t,e,n){var i=j1(e,{labelInside:!1});return i.labelMargin=n.get("handle.margin"),{position:Tx(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=Rx(n),a=Bx(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]),Bx(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"}}}}),zx={line:function(t,e,n,i){e=Ax([e,n[0]],[e,n[1]],Rx(t));return Dr({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:Cx([e-o/2,n[0]],[o,a],Rx(t))}}};function Rx(t){return t.isHorizontal()?0:1}function Bx(t,e){t=t.getRect();return[t[Ox[e]],t[Ox[e]]+t[Ex[e]]]}ug.registerAxisPointerClass("SingleAxisPointer",u),wc({type:"single"});var Vx=Ch.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(t){Vx.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()}},fixData:function(t){for(var e=t.length,n=I(E1().key(function(t){return t[2]}).entries(t),function(t){return{name:t.key,dataList:t.values}}),i=n.length,o=-1,a=-1,r=0;r<i;++r){var s=n[r].dataList.length;o<s&&(o=s,a=r)}for(var l=0;l<i;++l)if(l!==a)for(var h=n[l].name,u=0;u<o;++u){for(var c=n[a].dataList[u][0],d=n[l].dataList.length,p=-1,g=0;g<d;++g)if(n[l].dataList[g][0]===c){p=g;break}-1===p&&(t[e]=[],t[e][0]=c,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=P(),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=Kc(n,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:Cc(e)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}),e=new Bc(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;for(var o=I(E1().key(function(t){return n.get("name",t)}).entries(e),function(t){return{name:t.key,indices:t.values}}),a=n.mapDimension("single"),r=0;r<o.length;++r)o[r].indices.sort(s);function s(t,e){return n.get(a,t)-n.get(a,e)}return o},getAxisTooltipData:function(t,e,n){k(t)||(t=t?[t]:[]);for(var i,o=this.getData(),a=this.getLayerSeries(),r=[],s=a.length,l=0;l<s;++l){for(var h=Number.MAX_VALUE,u=-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<=h&&(i=p,h=g,u=a[l].indices[d])}r.push(u)}return{dataIndices:r,nestestValue:i}},formatTooltip:function(t){var e=this.getData(),n=e.getName(t),e=e.get(e.mapDimension("value"),t);return Es(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 Gx(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,h=0;l<e;++l)h+=t[l][s][1];a<h&&(a=h),i.push(h)}for(var u=0;u<n;++u)o[u]=(a-i[u])/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),h=t.y0,u=e/t.max,c=a.length,d=a[0].indices.length,p=0;p<d;++p){i=h[p]*u,n.setItemLayout(a[0].indices[p],{layerIndex:0,x:l[0][p][0],y0:i,y:l[0][p][1]*u});for(var g=1;g<c;++g)i+=l[g-1][p][1]*u,n.setItemLayout(a[g].indices[p],{layerIndex:g,x:l[g][p][0],y0:i,y:l[g][p][1]*u})}}Sc({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 Tc(this._layersSeries||[],I,o,o),T={};function a(t,e,n){var i=this._layers;if("remove"===t)M.remove(i[e]);else{for(var o,a=[],r=[],s=I[e].indices,l=0;l<s.length;l++){var h=S.getItemLayout(s[l]),u=h.x,c=h.y0,h=h.y;a.push([u,c]),r.push([u,c+h]),o=S.getItemVisual(s[l],"color")}var d,p,g,f,m,y=S.getItemLayout(s[0]),v=S.getItemModel(s[l-1]),x=v.getModel("label"),_=x.get("margin"),t=("add"===t?(g=T[e]=new z,d=new Ug({shape:{points:a,stackedOnPoints:r,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),p=new R({style:{x:y.x-_,y:y.y0+y.y/2}}),g.add(d),g.add(p),M.add(g),d.setClipPath((t=d.getBoundingRect(),w=b,f=function(){d.removeClipPath()},$r(m=new B({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,f),m))):(g=i[n],d=g.childAt(0),p=g.childAt(1),M.add(g),T[e]=g,V(d,{shape:{points:a,stackedOnPoints:r}},b),V(p,{style:{x:y.x-_,y:y.y0+y.y/2}},b)),v.getModel("emphasis.itemStyle")),w=v.getModel("itemStyle");Zr(p.style,x,{text:x.get("show")?b.getFormattedLabel(s[l-1],"normal")||S.getName(s[l-1]):null,textVerticalAlign:"middle"}),d.setStyle(O({fill:o},w.getItemStyle(["color"]))),Fr(d,t.getItemStyle())}}i.add(D(a,this,"add")).update(D(a,this,"update")).remove(D(a,this,"remove")).execute(),this._layersSeries=I,this._layers=T},dispose:function(){}}),mc(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]=G(a[0],o.height),a[1]=G(a[1],o.height),Gx(e,t,o.height-a[0]-a[1])):(a[0]=G(a[0],o.width),a[1]=G(a[1],o.width),Gx(e,t,o.width-a[0]-a[1])),e.setLayout("layoutInfo",i)})}),yc(function(t){t.eachSeriesByType("themeRiver",function(n){var i=n.getData(),o=n.getRawData(),a=n.get("color"),r=P();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)})})}),gc(gf("themeRiver"));var Wx=wu.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,Wx.superApply(this,"getInitialData",arguments)}}),Fx=["itemStyle","borderWidth"],Hx=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],Zx=new $a;function Ux(t,e,n,i){var o=t.getItemLayout(e),a=n.get("symbolRepeat"),r=n.get("symbolClip"),s=n.get("symbolPosition")||"start",l=(n.get("symbolRotate")||0)*Math.PI/180||0,h=n.get("symbolPatternSize")||2,u=n.isAnimationEnabled(),r={dataIndex:e,layout:o,itemModel:n,symbolType:t.getItemVisual(e,"symbol")||"circle",color:t.getItemVisual(e,"color"),symbolClip:r,symbolRepeat:a,symbolRepeatDirection:n.get("symbolRepeatDirection"),symbolPatternSize:h,rotation:l,animationModel:u?n:null,hoverAnimation:u&&n.get("hoverAnimation"),z2:n.getShallow("z",!0)||0},u=n,c=a,d=o,p=i,g=r,f=p.valueDim,u=u.get("symbolBoundingData"),m=p.coordSys.getOtherAxis(p.coordSys.getBaseAxis()),y=m.toGlobalCoord(m.dataToCoord(0)),v=1-(d[f.wh]<=0),m=(x=k(u)?((x=[Xx(m,u[0])-y,Xx(m,u[1])-y])[1]<x[0]&&x.reverse(),x[v]):null!=u?Xx(m,u)-y:c?p.coordSysExtent[f.index][v]-y:d[f.wh],g.boundingLength=x,c&&(g.repeatCutLength=d[f.wh]),g.pxSign=0<x?1:x<0?-1:0,t),u=e,p=o,v=a,y=r.boundingLength,c=r.pxSign,d=h,f=i,g=r,x=f.valueDim,t=f.categoryDim,p=Math.abs(p[t.wh]),e=((m=k(m=m.getItemVisual(u,"symbolSize"))?m.slice():[m=null==m?"100%":m,m])[t.index]=G(m[t.index],p),m[x.index]=G(m[x.index],v?p:Math.abs(y)),g.symbolSize=m,(g.symbolScale=[m[0]/d,m[1]/d])[x.index]*=(f.isHorizontal?-1:1)*c,n),h=r.symbolScale,u=l,t=i,v=r,p=((e=e.get(Fx)||0)&&(Zx.attr({scale:h.slice(),rotation:u}),Zx.updateTransform(),e=(e/=Zx.getLineScale())*h[t.valueDim.index]),v.valueLineWidth=e,r.symbolSize),y=n.get("symbolOffset"),g=(k(y)&&(y=[G(y[0],p[0]),G(y[1],p[1])]),n),m=p,d=o,f=a,c=y,l=s,u=r.valueLineWidth,h=r.boundingLength,t=r.repeatCutLength,v=i,e=r,n=v.categoryDim,p=v.valueDim,o=e.pxSign,a=u=Math.max(m[p.index]+u,0),_=(f&&(_=Math.abs(h),g=st(g.get("symbolMargin"),"15%")+"",w=!1,g.lastIndexOf("!")===g.length-1&&(w=!0,g=g.slice(0,g.length-1)),g=G(g,m[p.index]),m=Math.max(u+2*g,0),y=w?0:2*g,b=Cs(f),s=b?f:l_((_+y)/m),m=u+2*(g=(_-s*u)/2/(w?s:s-1)),y=w?0:2*g,b||"fixed"===f||(s=t?l_((Math.abs(t)+y)/m):0),a=s*m-y,e.repeatTimes=s,e.symbolMargin=g),o*(a/2)),w=((u=e.pathPosition=[])[n.index]=d[n.wh]/2,u[p.index]="start"===l?_:"end"===l?h-_:h/2,c&&(u[0]+=c[0],u[1]+=c[1]),e.bundlePosition=[]),b=(w[n.index]=d[n.xy],w[p.index]=d[p.xy],e.barRectShape=O({},d));return b[p.wh]=o*Math.max(Math.abs(d[p.wh]),Math.abs(u[p.index]+_)),b[n.wh]=d[n.wh],(f=e.clipShape={})[n.xy]=-d[n.xy],f[n.wh]=v.ecSize[n.wh],f[p.xy]=0,f[p.wh]=d[p.wh],r}function Xx(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function Yx(t){var e=t.symbolPatternSize,e=Qd(t.symbolType,-e/2,-e/2,e,e,t.color);return e.attr({culling:!0}),"image"!==e.type&&e.setStyle({strokeNoScale:!0}),e}function jx(t,e,o,n){var i=t.__pictorialBundle,a=o.symbolSize,r=o.valueLineWidth,s=o.pathPosition,l=e.valueDim,h=o.repeatTimes||0,u=0,c=a[e.valueDim.index]+r+2*o.symbolMargin;for(a_(t,function(t){t.__pictorialAnimationIndex=u,t.__pictorialRepeatTimes=h,u<h?r_(t,null,g(u),o,n):r_(t,null,{scale:[0,0]},o,n,function(){i.remove(t)}),e_(t,o),u++});u<h;u++){var d=Yx(o),p=(d.__pictorialAnimationIndex=u,d.__pictorialRepeatTimes=h,i.add(d),g(u));r_(d,{position:p.position,scale:[0,0]},{scale:p.scale,rotation:p.rotation},o,n),d.on("mouseover",f).on("mouseout",m),e_(d,o)}function g(t){var e=s.slice(),n=o.pxSign,i=t;return("start"===o.symbolRepeatDirection?0<n:n<0)&&(i=h-1-t),e[l.index]=c*(i-h/2+.5)+s[l.index],{position:e,scale:o.symbolScale.slice(),rotation:o.rotation}}function f(){a_(t,function(t){t.trigger("emphasis")})}function m(){a_(t,function(t){t.trigger("normal")})}}function qx(t,e,n,i){var o=t.__pictorialBundle,a=t.__pictorialMainPath;a?r_(a,null,{position:n.pathPosition.slice(),scale:n.symbolScale.slice(),rotation:n.rotation},n,i):(a=t.__pictorialMainPath=Yx(n),o.add(a),r_(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")})),e_(a,n)}function Kx(t,e,n){var i=O({},e.barRectShape),o=t.__pictorialBarRect;o?r_(o,null,{shape:i},e,n):(o=t.__pictorialBarRect=new B({z2:2,shape:i,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),t.add(o))}function $x(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?V(o,{shape:s},a,r):(s[e.wh]=0,o=new B({shape:s}),t.__pictorialBundle.setClipPath(o),t.__pictorialClipPath=o,(s={})[e.wh]=n.clipShape[e.wh],os[i?"updateProps":"initProps"](o,{shape:s},a,r)))}function Jx(t,e){t=t.getItemModel(e);return t.getAnimationDelayParams=Qx,t.isAnimationEnabled=t_,t}function Qx(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function t_(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function e_(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 n_(t,e,n,i){var o=new z,a=new z;return o.add(a),(o.__pictorialBundle=a).attr("position",n.bundlePosition.slice()),n.symbolRepeat?jx(o,e,n):qx(o,0,n),Kx(o,n,i),$x(o,e,n,i),o.__pictorialShapeStr=o_(t,n),o.__pictorialSymbolMeta=n,o}function i_(t,e,n,i){var o=i.__pictorialBarRect,a=(o&&(o.style.text=null),[]);a_(i,function(t){a.push(t)}),i.__pictorialMainPath&&a.push(i.__pictorialMainPath),i.__pictorialClipPath&&(n=null),E(a,function(t){V(t,{scale:[0,0]},n,e,function(){i.parent&&i.parent.remove(i)})}),t.setItemGraphicEl(e,null)}function o_(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function a_(e,n,i){E(e.__pictorialBundle.children(),function(t){t!==e.__pictorialBarRect&&n.call(i,t)})}function r_(t,e,n,i,o,a){e&&t.attr(e),i.symbolClip&&!o?n&&t.attr(n):n&&os[o?"updateProps":"initProps"](t,n,i.animationModel,i.dataIndex,a)}function s_(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"),h=(a_(t,function(t){t.setColor(i),t.setStyle(C({fill:i,opacity:n.opacity},r)),Fr(t,s),l&&(t.cursor=l),t.z2=n.z2}),{}),t=(e.valueDim.posDesc[+(0<n.boundingLength)],t.__pictorialBarRect);Rp(t.style,h,a,i,e.seriesModel,o),Fr(t,h)}function l_(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}function h_(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 u_(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 c_(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 d_(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)}Sc({type:"pictorialBar",render:function(t,e,n){var l=this.group,h=t.getData(),u=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:Hx[+o],categoryDim:Hx[1-o]};return h.diff(u).add(function(t){var e,n;h.hasValue(t)&&(e=Jx(h,t),e=Ux(h,t,e,c),n=n_(h,c,e),h.setItemGraphicEl(t,n),l.add(n),s_(n,c,e))}).update(function(t,e){var n,i,o,a,r,s,e=u.getItemGraphicEl(e);h.hasValue(t)?(n=Jx(h,t),n=Ux(h,t,n,c),i=o_(h,n),e&&i!==e.__pictorialShapeStr&&(l.remove(e),h.setItemGraphicEl(t,null),e=null),e?(i=e,o=c,r=(a=n).animationModel,s=a.dataIndex,V(i.__pictorialBundle,{position:a.bundlePosition.slice()},r,s),(a.symbolRepeat?jx:qx)(i,o,a,!0),Kx(i,a,!0),$x(i,o,a,!0)):e=n_(h,c,n,!0),h.setItemGraphicEl(t,e),e.__pictorialSymbolMeta=n,l.add(e),s_(e,c,n)):l.remove(e)}).remove(function(t){var e=u.getItemGraphicEl(t);e&&i_(u,t,e.__pictorialSymbolMeta.animationModel,e)}).execute(),this._data=h,this.group},dispose:vt,remove:function(e,t){var n=this.group,i=this._data;e.get("animation")?i&&i.eachItemGraphicEl(function(t){i_(i,t.dataIndex,e,t)}):n.removeAll()}}),mc(L(wd,"pictorialBar")),yc(Jg("pictorialBar","roundRect"));var p_=["itemStyle"],g_=["emphasis","itemStyle"],f_=["label"],m_=["emphasis","label"],y_="e\0\0",v_={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:D(h_,e)}}},geo:function(e){var t=e.getBoundingRect();return{coordSys:{type:"geo",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:D(u_,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:D(c_,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:D(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:D(d_,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 x_(t,e,n,i,o){null==n[t]||o||(e[t]=n[t],n[t]=i[t])}function __(o,a,e,t){var i,r,s,l,h,u,c,n=o.get("renderItem"),d=o.coordinateSystem,p={},g=(d&&(A&&(x(n,"series.render is required."),x(d.prepareCustoms||v_[d.type],"This coordSys does not support custom series.")),p=d.prepareCustoms?d.prepareCustoms():v_[d.type](d)),C({getWidth:t.getWidth,getHeight:t.getHeight,getZr:t.getZr,getDevicePixelRatio:t.getDevicePixelRatio,value:function(t,e){return null==e&&(e=s),a.get(a.getDimension(t||0),e)},style:function(t,e){y(e=null==e?s:e);var n=l.getModel(p_).getItemStyle(),i=(null!=c&&(n.fill=c),a.getItemVisual(e,"opacity"));return null!=i&&(n.opacity=i),Zr(n,h,null,{autoColor:c,isRectText:!0}),n.text=h.getShallow("show")?lt(o.getFormattedLabel(e,"normal"),zp(a,e)):null,t&&O(n,t),n},styleEmphasis:function(t,e){y(e=null==e?s:e);var n=l.getModel(g_).getItemStyle();return Zr(n,u,null,{isRectText:!0},!0),n.text=u.getShallow("show")?ht(o.getFormattedLabel(e,"emphasis"),o.getFormattedLabel(e,"normal"),zp(a,e)):null,t&&O(n,t),n},visual:function(t,e){return null==e&&(e=s),a.getItemVisual(e,t)},barLayout:function(t){if(d.getBaseAxis)return function(t){var e=[],n=t.axis;if("category"===n.type){for(var i=n.getBandWidth(),o=0;o<t.count;o++)e.push(C({bandWidth:i,axisKey:"axis0",stackId:pd+o},t));for(var a=xd(e),r=[],o=0;o<t.count;o++){var s=a.axis0[pd+o];s.offsetCenter=s.offset+s.width/2,r.push(s)}return r}}(C({axis:d.getBaseAxis()},t))},currentSeriesIndices:function(){return e.getCurrentSeriesIndices()},font:function(t){return qr(t,e)}},p.api||{})),f={context:{},seriesId:o.id,seriesName:o.name,seriesIndex:o.seriesIndex,coordSys:p.coordSys,dataInsideLength:a.count(),encode:(i=o.getData(),r={},E(i.dimensions,function(t,e){var n,t=i.getDimensionInfo(t);t.isExtraCoord||(n=t.coordDim,(r[n]=r[n]||[])[t.coordDimIndex]=e)}),r)},m=!0;return function(t){return s=t,m=!0,n&&n(C({dataIndexInside:t,dataIndex:a.getRawIndex(t)},f),g)||{}};function y(t){null==t&&(t=s),m&&(l=a.getItemModel(t),h=l.getModel(f_),u=l.getModel(m_),c=a.getItemVisual(t,"color"),m=!1)}}function w_(t,e,n,i,o,a){return(t=b_(t,e,n,i,o,a))&&a.setItemGraphicEl(e,t),t}function b_(t,e,n,i,o,a){var r=n.type;if(!t||r===t.__customGraphicType||"path"===r&&n.pathData===t.__customPathData||"image"===r&&n.style.image===t.__customImagePath||"text"===r&&n.style.text===t.__customText||(o.remove(t),t=null),null!=r){var s,l,h,u,c,d,p,g,f=!t;if(t||("path"===(u=(p=n).type)?(h=br((h=p.shape).pathData,null,{x:h.x||0,y:h.y||0,width:h.width||0,height:h.height||0},"center")).__customPathData=p.pathData:"image"===u?(h=new mi({})).__customImagePath=p.style.image:"text"===u?(h=new R({})).__customText=p.style.text:(l=os[u.charAt(0).toUpperCase()+u.slice(1)],A&&x(l,'graphic type "'+u+'" can not be found.'),h=new l),h.__customGraphicType=u,h.name=p.name,t=h),s=t,l=e,u=i,c=f,p={},g=(h=n).style||{},h.shape&&(p.shape=N(h.shape)),h.position&&(p.position=h.position.slice()),h.scale&&(p.scale=h.scale.slice()),h.origin&&(p.origin=h.origin.slice()),h.rotation&&(p.rotation=h.rotation),"image"===s.type&&h.style&&(d=p.style={},E(["x","y","width","height"],function(t){x_(t,d,g,s.style,c)})),"text"===s.type&&h.style&&(d=p.style={},E(["x","y"],function(t){x_(t,d,g,s.style,c)}),!g.hasOwnProperty("textFill")&&g.fill&&(g.textFill=g.fill),!g.hasOwnProperty("textStroke"))&&g.stroke&&(g.textStroke=g.stroke),"group"!==s.type&&(s.useStyle(g),c)&&(s.style.opacity=0,f=g.opacity,$r(s,{style:{opacity:f=null==f?1:f}},u,l)),c?s.attr(p):V(s,p,u,l),s.attr({z2:h.z2||0,silent:h.silent}),!1!==h.styleEmphasis&&Fr(s,h.styleEmphasis),"group"===r){var m=t.children()||[],y=n.children||[];if(n.diffChildrenByName)new Tc((f={oldChildren:m,newChildren:y,dataIndex:e,animatableModel:i,group:t,data:a}).oldChildren,f.newChildren,S_,S_,f).add(M_).update(M_).remove(I_).execute();else{for(var v=0;v<y.length;v++)b_(t.childAt(v),e,y[v],i,t,a);for(;v<m.length;v++)m[v]&&t.remove(m[v])}}return o.add(t),t}}function S_(t,e){t=t&&t.name;return null!=t?t:y_+e}function M_(t,e){var n=this.context,t=null!=t?n.newChildren[t]:null;b_(null!=e?n.oldChildren[e]:null,n.dataIndex,t,n.animatableModel,n.group,n.data)}function I_(t){var e=this.context,t=e.oldChildren[t];t&&e.group.remove(t)}function T_(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function D_(t,e){mp.call(this,"radius",t,e),this.type="category"}function A_(t,e){mp.call(this,"angle",t,e=e||[0,360]),this.type="category"}bc({type:"series.custom",dependencies:["grid","polar","geo","singleAxis","calendar"],defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0},getInitialData:function(t,e){return td(this.getSource(),this)}}),Sc({type:"custom",_data:null,render:function(n,t,e){var i=this._data,o=n.getData(),a=this.group,r=__(n,o,t,e);this.group.removeAll(),o.diff(i).add(function(t){w_(null,t,r(t),n,a,o)}).update(function(t,e){w_(i.getItemGraphicEl(e),t,r(t),n,a,o)}).remove(function(t){t=i.getItemGraphicEl(t);t&&a.remove(t)}).execute(),this._data=o},incrementalPrepareRender:function(t,e,n){this.group.removeAll(),this._data=null},incrementalRender:function(t,e,n,i){var o=e.getData(),a=__(e,o,n,i);function r(t){t.isGroup||(t.incremental=!0,t.useHoverLayer=!0)}for(var s=t.start;s<t.end;s++)w_(null,s,a(s),e,this.group,o).traverse(r)},dispose:vt}),D_.prototype={constructor:D_,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToRadius:mp.prototype.dataToCoord,radiusToData:mp.prototype.coordToData},a(D_,mp),A_.prototype={constructor:A_,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToAngle:mp.prototype.dataToCoord,angleToData:mp.prototype.coordToData},a(A_,mp);function C_(t){this.name=t||"",this.cx=0,this.cy=0,this._radiusAxis=new D_,this._angleAxis=new A_,this._radiusAxis.polar=this._angleAxis.polar=this}C_.prototype={type:"polar",axisPointerEnabled:!0,constructor:C_,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){for(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)),r=(e/=i,t/=i,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=h.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});p(n.prototype,Yd);c={splitNumber:5};function L_(t,e){return e.type||(e.data?"category":"value")}function k_(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&&(E((e=t.getData()).mapDimension("radius",!0),function(t){a.scale.unionExtentFromData(e,Qc(e,t))}),E(e.mapDimension("angle",!0),function(t){o.scale.unionExtentFromData(e,Qc(e,t))}))}),Fd(o.scale,o.model),Fd(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 P_(t,e){var n;t.type=e.get("type"),t.scale=Hd(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}Tp("angle",n,L_,{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}}),Tp("radius",n,L_,c),_c({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%"}});Ol.register("polar",{dimensions:C_.prototype.dimensions,create:function(n,s){var l=[];return n.eachComponent("polar",function(t,e){var n,e=new C_(e),i=(e.update=k_,e.getRadiusAxis()),o=e.getAngleAxis(),a=t.findAxisModel("radiusAxis"),r=t.findAxisModel("angleAxis");P_(i,a),P_(o,r),i=e,a=s,r=(o=t).get("center"),n=a.getWidth(),a=a.getHeight(),i.cx=G(r[0],n),i.cy=G(r[1],a),r=i.getRadiusAxis(),i=Math.min(n,a)/2,n=G(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(A&&!e)throw new Error('Polar "'+st(t.get("polarIndex"),t.get("polarId"),0)+'" not found');t.coordinateSystem=e.coordinateSystem}}),l}});var N_=["axisLine","axisLabel","axisTick","splitLine","splitArea"];function O_(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 E_(t){return t.getRadiusAxis().inverse?0:1}function z_(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()}ug.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(),z_(r=I(n.getViewLabels(),function(t){return(t=N(t)).coord=n.dataToCoord(t.tickValue),t})),z_(a),E(N_,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 $a({shape:{cx:e.cx,cy:e.cy,r:i[E_(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[E_(e)],i=I(n,function(t){return new rr({shape:O_(e,[r,r+a],t.coord)})});this.group.add(Ir(i,{style:C(o.getModel("lineStyle").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})}))},_axisLabel:function(l,h,t,u,e){var c=l.getCategories(!0),d=l.getModel("axisLabel"),p=d.get("margin");E(e,function(t,e){var n=d,i=t.tickValue,o=u[E_(h)],a=h.coordToPoint([o+p,t.coord]),r=h.cx,s=h.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 R({silent:!0}));this.group.add(s),Zr(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 h=a++%r.length;s[h]=s[h]||[],s[h].push(new rr({shape:O_(e,i,n[l].coord)}))}for(l=0;l<s.length;l++)this.group.add(Ir(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,h=-n[0].coord*l,u=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 tr({shape:{cx:e.cx,cy:e.cy,r0:u,r:c,startAngle:h,endAngle:-n[p].coord*l,clockwise:d},silent:!0})),h=-n[p].coord*l}for(p=0;p<s.length;p++)this.group.add(Ir(s[p],{style:C({fill:r[p%r.length]},o.getAreaStyle()),silent:!0}))}}});var R_=["axisLine","axisTickLabel","axisName"],B_=["splitLine","splitArea"];ug.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 Kp(e,s),E(R_,s.add,s),this.group.add(s.getGroup()),E(B_,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=[],h=0;h<o.length;h++){var u=r++%s.length;l[u]=l[u]||[],l[u].push(new $a({shape:{cx:e.cx,cy:e.cy,r:o[h].coord},silent:!0}))}for(h=0;h<l.length;h++)this.group.add(Ir(l[h],{style:C({stroke:s[h%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=[],h=o[0].coord,u=1;u<o.length;u++){var c=r++%s.length;l[c]=l[c]||[],l[c].push(new tr({shape:{cx:e.cx,cy:e.cy,r0:h,r:o[u].coord,startAngle:0,endAngle:2*Math.PI},silent:!0})),h=o[u].coord}for(u=0;u<l.length;u++)this.group.add(Ir(l[u],{style:C({fill:s[u%s.length]},a.getAreaStyle()),silent:!0}))}}});u=yx.extend({makeElOption:function(t,e,n,i,o){var a,r=n.axis,s=("angle"===r.dim&&(this.animationThreshold=Math.PI/18),r.polar),l=s.getOtherAxis(r).getExtent(),h=r["dataTo"+Hs(r.dim)](e),u=i.get("type"),r=(u&&"none"!==u&&(a=Sx(i),(u=V_[u](r,s,h,l,a)).style=a,t.graphicKey=u.type,t.pointer=u),i.get("label.margin"));Mx(t,n,i,o,function(t,e,n,i){var o,a,r=e.axis,t=r.dataToCoord(t),s=(l=(l=n.getAngleAxis().getExtent()[0])/180*Math.PI,n.getRadiusAxis().getExtent());{var l;s="radius"===r.dim?(r=jt(),Qt(r,r,l),Jt(r,r,[n.cx,n.cy]),o=Qr([t,-i],r),r=e.getModel("axisLabel").get("rotate")||0,e=Kp.innerTextLayout(l,r*Math.PI/180,-1),a=e.textAlign,e.textVerticalAlign):(l=s[1],o=n.coordToPoint([l+i,t]),r=n.cx,e=n.cy,a=Math.abs(o[0]-r)/l<.3?"center":o[0]>r?"left":"right",Math.abs(o[1]-e)/l<.3?"middle":o[1]>e?"top":"bottom")}return{position:o,align:a,verticalAlign:s}}(e,n,s,r))}});var V_={line:function(t,e,n,i,o){return"angle"===t.dim?{type:"Line",shape:Ax(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:Lx(e.cx,e.cy,i[0],i[1],(-n-a/2)*r,(a/2-n)*r)}:{type:"Sector",shape:Lx(e.cx,e.cy,n-a/2,n+a/2,0,2*Math.PI)}}};function G_(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),E(e.coordinateSystem.regions,function(t){n[t.name]=e.isSelected(t.name)||!1})}),{selected:n,name:t.name}})}ug.registerAxisPointerClass("PolarAxisPointer",u),mc(L(function(t,e,n){var l,c,D=n.getWidth(),A=n.getHeight(),C={},L=(n=tt(e.getSeriesByType(t),function(t){return!e.isSeriesFiltered(t)&&t.coordinateSystem&&"polar"===t.coordinateSystem.type}),l={},E(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,T_(t)),r=(a[i]||n.autoWidthCount++,a[i]=a[i]||{width:0,maxWidth:0},G(t.get("barWidth"),o)),o=G(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={},E(l,function(t,n){c[n]={};var i,e=t.stacks,o=t.bandWidth,o=G(t.categoryGap,o),a=G(t.gap,1),r=t.remainedWidth,s=t.autoWidthCount,l=(r-o)/(s+(s-1)*a),l=Math.max(l,0),h=(E(e,function(t,e){var n=t.maxWidth;n&&n<l&&(n=Math.min(n,r),t.width&&(n=Math.min(n,t.width)),r-=n,t.width=n,s--)}),l=(r-o)/(s+(s-1)*a),l=Math.max(l,0),0),u=(E(e,function(t,e){t.width||(t.width=l),h+=(i=t).width*(1+a)}),i&&(h-=i.width*a),-h/2);E(e,function(t,e){c[n][e]=c[n][e]||{offset:u,width:t.width},u+=t.width*(1+a)})}),c);e.eachSeriesByType(t,function(t){if("polar"===t.coordinateSystem.type)for(var e=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),o=T_(t),a=L[i.dim][o],r=a.offset,s=a.width,l=n.getOtherAxis(i),a=t.get("center")||["50%","50%"],h=G(a[0],D),u=G(a[1],A),c=t.get("barMinHeight")||0,d=t.get("barMinAngle")||0,p=(C[o]=C[o]||[],e.mapDimension(l.dim)),g=e.mapDimension(i.dim),f=Jc(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)||(x=0<=I?"p":"n",_=m,f&&(C[o][T]||(C[o][T]={p:m,n:m}),_=C[o][T][x]),"radius"===l.dim?(S=l.dataToRadius(I)-m,b=i.dataToAngle(T),S=(w=_)+(S=Math.abs(S)<c?(S<0?-1:1)*c:S),M=(b=b-r)-s,f&&(C[o][T][x]=S)):(I=l.dataToAngle(I,!0)-m,S=(w=i.dataToRadius(T)+r)+s,M=(b=_)+(I=Math.abs(I)<d?(I<0?-1:1)*d:I),f&&(C[o][T][x]=M)),e.setItemLayout(y,{cx:h,cy:u,r0:w,r:S,startAngle:-b*Math.PI/180,endAngle:-M*Math.PI/180}))}},this)},"bar")),wc({type:"polar"}),i(h.extend({type:"geo",coordinateSystem:null,layoutMode:"box",init:function(t){h.prototype.init.apply(this,arguments),no(t,"label",["show"])},optionUpdated:function(){var t=this.option,n=this;t.regions=$0.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},P()),this.updateSelectedMap(t.regions)},defaultOption:{zlevel:0,z:0,show:!0,left:"center",top:"center",aspectScale:.75,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),wc({type:"geo",init:function(t,e){e=new ay(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()}}),G_("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),G_("select",{type:"geoSelect",event:"geoselected"}),G_("unSelect",{type:"geoUnSelect",event:"geounselected"});function W_(t,e,n){this._model=t}function F_(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}W_.prototype={constructor:W_,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=Ms(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=(E([0,1],function(t){l(o,t)&&(a[i[t]]=o[t]*r[t])}),{width:e.getWidth(),height:e.getHeight()}),s=this._rect=Ks(a,n);function l(t,e){return null!=t[e]&&"auto"!==t[e]}E([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){k(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(F_,"dataToPoint"),convertFromPixel:L(F_,"pointToData"),_initRangeOption:function(){var t,e=this._model.get("range"),n=e,i=(k(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))}},W_.dimensions=W_.prototype.dimensions,W_.getDimensionsInfo=W_.prototype.getDimensionsInfo,W_.create=function(t,e){var n=[];return t.eachComponent("calendar",function(t){var e=new W_(t);n.push(e),t.coordinateSystem=e}),t.eachSeries(function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=n[t.get("calendarIndex")||0])}),n},Ol.register("calendar",W_);var H_=h.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=Qs(t);H_.superApply(this,"init",arguments),Z_(t,o)},mergeOption:function(t,e){H_.superApply(this,"mergeOption",arguments),Z_(this.option,t)}});function Z_(t,i){var o=t.cellSize,e=(k(o)?1===o.length&&(o[1]=o[0]):o=t.cellSize=[o,o],I([0,1],function(t){var e,n;return(null!=(e=i)[Ys[n=t][0]]||null!=e[Ys[n][1]]&&null!=e[Ys[n][2]])&&(o[t]="auto"),null!=o[t]&&"auto"!==o[t]}));Js(t,i,{type:"box",ignoreSize:e})}var U_={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},X_={EN:["S","M","T","W","T","F","S"],CN:["日","一","二","三","四","五","六"]},Y_=(wc({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 B({shape:{x:l[0],y:l[1],width:a,height:r},cursor:"default",style:o});n.add(l)}},_renderLines:function(e,t,n,i){for(var o=this,a=e.coordinateSystem,r=e.getModel("splitLine.lineStyle").getLineStyle(),s=e.get("splitLine.show"),l=r.lineWidth,h=(this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[],t.start),u=0;h.time<=t.end.time;u++){d(h.formatedDate);var c=(h=0===u?a.getDateInfo(t.start.y+"-"+t.start.m):h).date;c.setMonth(c.getMonth()+1),h=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 ar({z2:20,shape:{points:t},style:e});n.add(t)},_getLinePointsOfOneWeek:function(t,e,n){for(var i=t.coordinateSystem,o=(e=i.getDateInfo(e),[]),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?Vs(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,h,t=t.getModel("yearLabel");t.get("show")&&(o=t.get("margin"),a=(a=t.get("position"))||("horizontal"!==n?"top":"left"),r=((h=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]])[0][0]+h[1][0])/2,l=(h[0][1]+h[1][1])/2,r={top:[r,h[s="horizontal"===n?0:1][1]],bottom:[r,h[1-s][1]],left:[h[1-s][0],l],right:[h[s][0],l]},h=e.start.y,+e.end.y>+e.start.y&&(h=h+"-"+e.end.y),s=t.get("formatter"),l={start:e.start.y,end:e.end.y,nameMap:h},e=this._formatterLabel(s,l),Zr((h=new R({z2:30})).style,t,{text:e}),h.attr(this._yearTextPositionControl(h,r[a],n,a,o)),i.add(h))},_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=(nt(o)&&(o=U_[o.toUpperCase()]||[]),"start"===r?0:1),h="horizontal"===e?0:1,a="start"===r?-a:a,u="center"===t,c=0;c<s[l].length-1;c++){var d=s[l][c].slice(),p=this._firstDayOfMonth[c],g=(u&&(g=this._firstDayPoints[c],d[h]=(g[h]+s[0][c+1][h])/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 R({z2:30});O(Zr(p.style,i,{text:f}),this._monthTextPositionControl(d,u,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"),h=a.getFirstDayOfWeek(),u=(nt(s)&&(s=X_[s.toUpperCase()]||[]),a.getNextNDay(e.end.time,7-e.lweek).time),c=[a.getCellWidth(),a.getCellHeight()],l=G(l,c["horizontal"===n?0:1]);"start"===r&&(u=a.getNextNDay(e.start.time,-(7+e.fweek)).time,l=-l);for(var d=0;d<7;d++){var p=a.getNextNDay(u,d),p=a.dataToRect([p.time],!1).center,g=Math.abs((d+h)%7),f=new R({z2:30});O(Zr(f.style,o,{text:s[g]}),this._weekTextPositionControl(p,n,r,l,c)),i.add(f)}}}}),_c({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"}}}),wc({type:"title",render:function(t,e,n){var i,o,a,r,s,l,h,u,c;this.group.removeAll(),t.get("show")&&(i=this.group,h=t.getModel("textStyle"),o=t.getModel("subtextStyle"),u=t.get("textAlign"),c=t.get("textBaseline"),s=(h=new R({style:Zr({},h,{text:t.get("text"),textFill:h.getTextColor()},{disableBox:!0}),z2:10})).getBoundingRect(),l=t.get("subtext"),o=new R({style:Zr({},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"),h.silent=!a,o.silent=!r,a&&h.on("click",function(){window.open(a,"_"+t.get("target"))}),r&&o.on("click",function(){window.open(r,"_"+t.get("subtarget"))}),i.add(h),l&&i.add(o),s=i.getBoundingRect(),(l=t.getBoxLayoutParams()).width=s.width,l.height=s.height,l=Ks(l,{width:n.getWidth(),height:n.getHeight()},t.get("padding")),u||("right"===(u="middle"===(u=t.get("left")||t.get("right"))?"center":u)?l.x+=l.width:"center"===u&&(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]),h.setStyle(n={textAlign:u,textVerticalAlign:c}),o.setStyle(n),s=i.getBoundingRect(),h=l.margin,(u=t.getItemStyle(["color","opacity"])).fill=t.get("backgroundColor"),Ar(c=new B({shape:{x:s.x-h[3],y:s.y-h[0],width:s.width+h[1]+h[3],height:s.height+h[0]+h[2],r:t.get("borderRadius")},style:u,silent:!0})),i.add(c))}}),_c({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){Y_.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&&so(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")&&E(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<=f(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 j_(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)),E(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 q_(t,e){var n=Ps(e.get("padding")),i=e.getItemStyle(["color","opacity"]);return i.fill=e.get("backgroundColor"),t=new B({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(j_,"toggleSelected")),s("legendSelect","legendselected",L(j_,"select")),s("legendUnSelect","legendunselected",L(j_,"unSelect"));var K_=L,$_=E,J_=z,wu=wc({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new J_),this._backgroundEl},getContentGroup:function(){return this._contentGroup},render:function(t,e,n){var i,o,a;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=Ks(e=t.getBoxLayoutParams(),n={width:n.getWidth(),height:n.getHeight()},i=t.get("padding")),a=Ks(C({width:(o=this.layoutInner(t,o,a)).width,height:o.height},e),n,i),this.group.attr("position",[a.x-o.x,a.y-o.y]),this.group.add(this._backgroundEl=q_(o,t)))},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl)},renderInner:function(s,l,h,u){var c=this.getContentGroup(),d=P(),p=l.get("selectedMode"),g=[];h.eachRawSeries(function(t){t.get("legendHoverLink")||g.push(t.id)}),$_(l.getData(),function(i,o){var t,e,n,a,r=i.get("name");this.newlineDisabled||""!==r&&"\n"!==r?(t=h.getSeriesByName(r)[0],d.get(r)||(t?("function"==typeof(e=(a=t.getData()).getVisual("color"))&&(e=e(t.getDataParams(0))),n=a.getVisual("legendSymbol")||"roundRect",a=a.getVisual("symbol"),this._createItem(r,o,i,l,n,a,s,e,p).on("click",K_(Q_,r,u)).on("mouseover",K_(tw,t,null,u,g)).on("mouseout",K_(ew,t,null,u,g)),d.set(r,!0)):h.eachRawSeries(function(t){var e,n;d.get(r)||!t.legendDataProvider||(e=(n=t.legendDataProvider()).indexOfName(r))<0||(n=n.getItemVisual(e,"color"),this._createItem(r,o,i,l,"roundRect",null,s,n,p).on("click",K_(Q_,r,u)).on("mouseover",K_(tw,t,r,u,g)).on("mouseout",K_(ew,t,r,u,g)),d.set(r,!0))},this),!A)||d.get(r)||console.warn(r+" series not exists. Legend data should be same with series name or data name.")):c.add(new J_({newline:!0}))},this)},_createItem:function(t,e,n,i,o,a,r,s,l){var h=i.get("itemWidth"),u=i.get("itemHeight"),c=i.get("inactiveColor"),d=i.get("symbolKeepAspect"),p=i.isSelected(t),g=new J_,f=n.getModel("textStyle"),m=n.get("icon"),n=n.getModel("tooltip"),y=n.parentModel,o=(g.add(Qd(o=m||o,0,0,h,u,p?s:c,null==d||d)),m||!a||a===o&&"none"!=a||g.add(Qd(a="none"===a?"circle":a,(h-(m=.8*u))/2,(u-m)/2,m,m,p?s:c,null==d||d)),"left"===r?h+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 R({style:Zr({},f,{text:s,x:o,y:u/2,textFill:p?f.getTextColor():c,textAlign:a,textVerticalAlign:"middle"})})),new B({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),Fr(g),g.__legendDataIndex=e,g},layoutInner:function(t,e,n){var i=this.getContentGroup(),t=(qs(t.get("orient"),i,t.get("itemGap"),n.width,n.height),i.getBoundingRect());return i.attr("position",[-t.x,-t.y]),this.group.getBoundingRect()}});function Q_(t,e){e.dispatchAction({type:"legendToggleSelect",name:t})}function tw(t,e,n,i){var o=n.getZr().storage.getDisplayList()[0];o&&o.useHoverLayer||n.dispatchAction({type:"highlight",seriesName:t.name,name:e,excludeSeriesId:i})}function ew(t,e,n,i){var o=n.getZr().storage.getDisplayList()[0];o&&o.useHoverLayer||n.dispatchAction({type:"downplay",seriesName:t.name,name:e,excludeSeriesId:i})}gc(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})}),h.registerSubTypeDefaulter("legend",function(){return"plain"});var nw=Y_.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=Qs(t);nw.superCall(this,"init",t,e,n,i),iw(this,t,o)},mergeOption:function(t,e){nw.superCall(this,"mergeOption",t,e),iw(this,this.option,t)},getOrient:function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}}});function iw(t,e,n){var i=[1,1];i[t.getOrient().index]=0,Js(e,n,{type:"box",ignoreSize:i})}var ow=z,aw=["width","height"],rw=["x","y"],sw=wu.extend({type:"legend.scroll",newlineDisabled:!0,init:function(){sw.superCall(this,"init"),this._currentIndex=0,this.group.add(this._containerGroup=new ow),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new ow),this._showController},resetInner:function(){sw.superCall(this,"resetInner"),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},renderInner:function(t,i,e,o){var a=this,r=(sw.superCall(this,"renderInner",t,i,e,o),this._controllerGroup),s=i.get("pageIconSize",!0),t=(k(s)||(s=[s,s]),n("pagePrev",0),i.getModel("pageTextStyle"));function n(t,e){var n=t+"DataIndex",e=is(i.get("pageIcons",!0)[i.getOrient().name][e],{onclick:D(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 R({name:"pageText",style:{textFill:t.getTextColor(),font:t.getFont(),textVerticalAlign:"middle",textAlign:"center"},silent:!0})),n("pageNext",1)},layoutInner:function(t,e,n){var i=this.getContentGroup(),o=this._containerGroup,a=this._controllerGroup,r=t.getOrient().index,s=aw[r],l=aw[1-r],h=rw[1-r],u=(qs(t.get("orient"),i,t.get("itemGap"),r?n.width:null,r?null:n.height),qs("horizontal",a,t.get("pageButtonItemGap",!0)),i.getBoundingRect()),c=a.getBoundingRect(),d=this._showController=u[s]>n[s],p=[-u.x,-u.y],g=(p[r]=i.position[r],[0,0]),f=[-c.x,-c.y],m=lt(t.get("pageButtonGap",!0),t.get("itemGap",!0)),p=(d&&("end"===t.get("pageButtonPosition",!0)?f[r]+=n[s]-c[s]:g[r]+=c[s]+m),f[1-r]+=u[l]/2-c[l]/2,i.attr("position",p),o.attr("position",g),a.attr("position",f),this.group.getBoundingRect()),u=((p={x:0,y:0})[s]=(d?n:u)[s],p[l]=Math.max(u[l],c[l]),p[h]=Math.min(0,c[h]+f[1-r]),o.__rectSize=n[s],d?((g={x:0,y:0})[s]=Math.max(n[s]-c[s]-m,0),g[l]=p[l],o.setClipPath(new B({shape:g})),o.__rectSize=g[s]):a.eachChild(function(t){t.attr({invisible:!0,silent:!0})}),this._getPageInfo(t));return null!=u.pageIndex&&V(i,{position:u.contentPosition},d&&t),this._updatePageInfoView(t,u),p},_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=(E(["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",nt(e)?e.replace("{current}",a).replace("{total}",r):e({current:a,total:r}))},_getPageInfo:function(t){var e,i,n,o=t.get("scrollDataIndex",!0),a=this.getContentGroup(),r=a.getBoundingRect(),s=this._containerGroup.__rectSize,l=t.getOrient().index,h=aw[l],t=aw[1-l],u=rw[l],c=a.position.slice(),d=(this._showController?a.eachChild(function(t){t.__legendDataIndex===o&&(n=t)}):n=a.childAt(0),s?Math.ceil(r[h]/s):0);if(n){var p,g=n.getBoundingRect(),f=n.position[l]+g[u],m=(c[l]=-f-r[u],f=Math.floor(d*(f+g[u]+s/2)/r[h]),f=r[h]&&d?Math.max(0,Math.min(d-1,f)):-1,{x:0,y:0}),y=(m[h]=s,m[t]=r[t],m[u]=-c[l]-r[u],a.children());if(a.eachChild(function(t,e){var n=v(t);n.intersect(m)&&(null==p&&(p=e),i=t.__legendDataIndex),e===y.length-1&&n[u]+n[h]<=m[u]+m[h]&&(i=null)}),null!=p){g=v(y[p]);if(m[u]=g[u]+g[h]-m[h],p<=0&&g[u]>=m[u])e=null;else{for(;0<p&&v(y[p-1]).intersect(m);)p--;e=y[p].__legendDataIndex}}}return{contentPosition:c,pageIndex:f,pageCount:d,pagePrevDataIndex:e,pageNextDataIndex:i};function v(t){var e=t.getBoundingRect().clone();return e[u]+=t.position[l],e}}}),lw=(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)})}),_c({type:"tooltip",dependencies:["axisPointer"],defaultOption:{zlevel:0,z:8,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",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}}}),E),hw=ks,uw=["","-webkit-","-moz-","-o-"];function cw(i){var e,n,o,t,a=[],r=i.get("transitionDuration"),s=i.get("backgroundColor"),l=i.getModel("textStyle"),h=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(uw,function(t){return t+"transition:"+e}).join(";"))),s&&(y.canvasSupported?a.push("background-Color:"+s):(a.push("background-Color:#"+Ce(s)),a.push("filter:alpha(opacity=70)"))),lw(["width","color","radius"],function(t){var e="border-"+t,n=hw(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"),lw(["decoration","align"],function(t){var e=n.get(t);e&&o.push("text-"+t+":"+e)}),o.join(";"))),null!=h&&a.push("padding:"+Ps(h).join("px ")+"px"),a.join(";")+";"}function dw(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,Ti(n,t,!0),e.dispatch("mousemove",t))},e.onmouseleave=function(){o._enterable&&o._show&&o.hideLater(o._hideDelay),o._inContent=!1}}dw.prototype={constructor:dw,_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;"+cw(t)+";left:"+this._x+"px;top:"+this._y+"px;"+(t.get("extraCssText")||""),e.style.display=e.innerHTML?"block":"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(D(this.hide,this),t)):this.hide())},isShow:function(){return this._show}};var pw=D,gw=E,fw=G,mw=new B({shape:{x:-1,y:-1,width:2,height:2}});function yw(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 vw(t,e){return t.dispatchAction||D(e.dispatchAction,e)}function xw(t){var e=t.clientWidth,n=t.clientHeight;return document.defaultView&&document.defaultView.getComputedStyle&&(t=document.defaultView.getComputedStyle(t))&&(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}}function _w(t){return"center"===t||"middle"===t}wc({type:"tooltip",init:function(t,e){y.node||(e=new dw(e.getDom(),e),this._tooltipContent=e)},render:function(t,e,n){y.node||y.wxa||(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");hx("itemTooltip",this._api,pw(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=vw(i,n),this._ticket="",r=i.dataByCoordSys,i.tooltip&&null!=i.x&&null!=i.y?((a=mw).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=J1(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(vw(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){t=yw([r.getData().getItemModel(a),r,(r.coordinateSystem||{}).model,t]);if("axis"===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=D(e,this),clearTimeout(this._showTimout),0<t?this._showTimout=setTimeout(e,t):e()},_showAxisTooltip:function(t,e){var l=this._ecModel,n=this._tooltipModel,i=[e.offsetX,e.offsetY],h=[],u=[],o=yw([e.tooltipOption,n]),a=(gw(t,function(t){gw(t.dataByAxis,function(i){var o,a=l.getComponent(i.axisDim+"Axis",i.axisIndex),r=i.value,s=[];a&&null!=r&&(o=Ix(r,a.axis,l,i.seriesDataIndices,i.valueLabelOpt),E(i.seriesDataIndices,function(t){var e=l.getSeriesByIndex(t.seriesIndex),t=t.dataIndexInside,n=e&&e.getDataParams(t);n.axisDim=i.axisDim,n.axisIndex=i.axisIndex,n.axisType=i.axisType,n.axisId=i.axisId,n.axisValue=Ud(a.axis,r),n.axisValueLabel=o,n&&(u.push(n),s.push(e.formatTooltip(t,!0)))}),h.push((o?Es(o)+"<br />":"")+s.join("<br />")))})},this),h.reverse(),h=h.join("<br /><br />"),e.position);this._showOrMove(o,function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(o,a,i[0],i[1],this._tooltipContent,u):this._showTooltipContent(o,h,u,Math.random(),i[0],i[1],a)})},_showSeriesItemTooltip:function(t,e,n){var i,o,a,r=this._ecModel,s=e.seriesIndex,r=r.getSeriesByIndex(s),l=e.dataModel||r,h=e.dataIndex,e=e.dataType,u=l.getData(),c=yw([u.getItemModel(h),l,r&&(r.coordinateSystem||{}).model,this._tooltipModel]),r=c.get("trigger");null!=r&&"item"!==r||(i=l.getDataParams(h,e),o=l.formatTooltip(h,!1,e),a="item_"+l.name+"_"+h,this._showOrMove(c,function(){this._showTooltipContent(c,o,i,a,t.offsetX,t.offsetY,t.position,t.target)}),n({type:"showTip",dataIndexInside:h,dataIndex:u.getRawIndex(h),seriesIndex:s,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){var l,h,u;this._ticket="",n.get("showContent")&&n.get("show")&&(l=this._tooltipContent,h=n.get("formatter"),r=r||n.get("position"),t=t,h&&"string"==typeof h?t=Bs(h,i,!0):"function"==typeof h&&(u=pw(function(t,e){t===this._ticket&&(l.setContent(e),this._updatePosition(n,r,o,a,l,i,s))},this),this._ticket=e,t=h(i,e,u)),l.setContent(t),l.show(n),this._updatePosition(n,r,o,a,l,i,s))},_updatePosition:function(t,e,n,i,o,a,r){var s,l=this._api.getWidth(),h=this._api.getHeight(),u=(e=e||t.get("position"),o.getSize()),c=t.get("align"),d=t.get("verticalAlign"),p=r&&r.getBoundingRect().clone();r&&p.applyTransform(r.transform),k(e="function"==typeof e?e([n,i],a,o.el,p,{viewSize:[l,h],contentSize:u.slice()}):e)?(n=fw(e[0],l),i=fw(e[1],h)):T(e)?(e.width=u[0],e.height=u[1],n=(a=Ks(e,{width:l,height:h})).x,i=a.y,d=c=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,p,u):function(t,e,n,i,o,a,r){var n=xw(n),s=n.width,n=n.height;null!=a&&(i<t+s+a?t-=s+a:t+=a);null!=r&&(o<e+n+r?e-=n+r:e+=r);return[t,e]}(n,i,o.el,l,h,c?null:20,d?null:20))[0],s[1]),c&&(n-=_w(c)?u[0]/2:"right"===c?u[0]:0),d&&(i-=_w(d)?u[1]/2:"bottom"===d?u[1]:0),t.get("confine")&&(a=n,r=i,e=o.el,p=l,c=h,e=xw(e),d=e.width,e=e.height,a=Math.min(a+d,p)-d,r=Math.min(r+e,c)-e,a=Math.max(a,0),r=Math.max(r,0),n=(s=[a,r])[0],i=s[1]),o.moveTo(n,i)},_updateContentNotChangedOnAxis:function(n){var t=this._lastDataByCoordSys,a=!!t&&t.length===n.length;return a&&gw(t,function(t,e){var t=t.dataByAxis||{},o=(n[e]||{}).dataByAxis||[];(a&=t.length===o.length)&&gw(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)&&gw(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||y.wxa||(this._tooltipContent.hide(),dx("itemTooltip",e))}}),s({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},function(){}),s({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},function(){});var ww=Ls,bw=Es;function Sw(t){no(t,"label",["show"])}var n=_c({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,n,i){if(A&&"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&&Sw(e),E(e.data,function(t){t instanceof Array?(Sw(t[0]),Sw(t[1])):Sw(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=k(n)?I(n,ww).join(", "):ww(n),e=e.getName(t),t=bw(this.name);return null==n&&!e||(t+="<br />"),e&&(t+=bw(e),null!=n)&&(t+=" : "),null!=n&&(t+=bw(i)),t},getData:function(){return this._data},setData:function(t){this._data=t}}),Mw=(i(n,ss),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}}}}),f);function Iw(t,e,n,i,o,a){var r=[],s=Jc(e,i)?e.getCalculationInfo("stackResultDimension"):i,t=kw(e,s,t),s=e.indicesOfNearest(s,t)[0],t=(r[o]=e.get(n,s),r[a]=e.get(i,s),ms(e.get(i,s)));return 0<=(t=Math.min(t,20))&&(r[a]=+r[a].toFixed(t)),r}var c=L,Tw={min:c(Iw,"min"),max:c(Iw,"max"),average:c(Iw,"average")};function Dw(t,e){var n=t.getData(),i=t.coordinateSystem;if(e&&(a=e,isNaN(parseFloat(a.x))||isNaN(parseFloat(a.y)))&&!k(e.coord)&&i){var o=i.dimensions,a=Aw(e,n,i,t);if((e=N(e)).type&&Tw[e.type]&&a.baseAxis&&a.valueAxis){i=Mw(o,a.baseAxis.dim),t=Mw(o,a.valueAxis.dim);e.coord=Tw[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++)Tw[r[s]]&&(r[s]=kw(n,n.mapDimension(o[s]),r[s]));e.coord=r}}return e}function Aw(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 Cw(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 Lw(t,e,n,i){return i<2?t.coord&&t.coord[i]:t.value}function kw(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]}u=wc({type:"marker",init:function(){this.markerGroupMap=P()},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 Pw(r,s,l){var h=s.coordinateSystem;r.each(function(t){var e,n,i,o=r.getItemModel(t),a=G(o.get("x"),l.getWidth()),o=G(o.get("y"),l.getHeight());isNaN(a)||isNaN(o)?s.getMarkerPosition?i=s.getMarkerPosition(r.getValues(r.dimensions,t)):h&&(e=r.get(h.dimensions[0],t),n=r.get(h.dimensions[1],t),i=h.dataToPoint([e,n])):i=[a,o],isNaN(a)||(i[0]=a),isNaN(o)||(i[1]=o),r.setItemLayout(t,i)})}u.extend({type:"markPoint",updateTransform:function(t,e,n){e.eachSeries(function(t){var e=t.markPointModel;e&&(Pw(e.getData(),t,n),this.markerGroupMap.get(t.id).updateLayout(e))},this)},renderSeries:function(t,i,e,n){var o=t.coordinateSystem,a=t.id,r=t.getData(),s=this.markerGroupMap,s=s.get(a)||s.set(a,new Tg),l=function(t,e,n){i=t?I(t&&t.dimensions,function(t){return C({name:t},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{})}):[{name:"value",type:"float"}];var i=new Bc(i,n),n=I(n.get("data"),L(Dw,e));t&&(n=tt(n,L(Cw,t)));return i.initData(n,null,t?Lw:function(t){return t.value}),i}(o,t,i);i.setData(l),Pw(i.getData(),t,n),l.each(function(t){var e=l.getItemModel(t),n=e.getShallow("symbolSize");"function"==typeof n&&(n=n(i.getRawValue(t),i.getDataParams(t))),l.setItemVisual(t,{symbolSize:n,color:e.get("itemStyle.color")||r.getVisual("color"),symbol:e.getShallow("symbol")})}),s.updateData(l),this.group.add(s.group),l.eachItemGraphicEl(function(t){t.traverse(function(t){t.dataModel=i})}),s.__keep=!0,s.group.silent=i.get("silent")||t.get("silent")}}),pc(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 Nw(t,e,n,i){var o,a,r,s=t.getData(),l=i.type;return k(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),st(i.yAxis,i.xAxis)):(r=(e=Aw(i,s,e,t)).valueDataDim,e.valueAxis,kw(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=[Dw(t,i[0]),Dw(t,i[1]),O({},i[2])])[2].type=i[2].type||"",p(i[2],i[0]),p(i[2],i[1]),i}function Ow(t){return!isNaN(t)&&!isFinite(t)}function Ew(t,e,n,i){var o=1-t,a=i.dimensions[t];return Ow(e[o])&&Ow(n[o])&&e[t]===n[t]&&i.getAxis(a).containData(e[t])}function zw(t,e){if("cartesian2d"===t.type){var n=e[0].coord,i=e[1].coord;if(n&&i&&(Ew(1,n,i,t)||Ew(0,n,i,t)))return!0}return Cw(t,e[0])&&Cw(t,e[1])}function Rw(t,e,n,i,o){var a,r,s=i.coordinateSystem,l=t.getItemModel(e),h=G(l.get("x"),o.getWidth()),l=G(l.get("y"),o.getHeight());isNaN(h)||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,Ow(t.get(r[0],e))?a[0]=o.toGlobalCoord(o.getExtent()[n?0:1]):Ow(t.get(r[1],e))&&(a[1]=i.toGlobalCoord(i.getExtent()[n?0:1]))),isNaN(h)||(a[0]=h),isNaN(l)||(a[1]=l)):a=[h,l],t.setItemLayout(e,a)}u.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){Rw(i,t,!0,e,a),Rw(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=o.coordinateSystem,i=o.id,r=o.getData(),s=this.markerGroupMap,s=s.get(i)||s.set(i,new _y),i=(this.group.add(s.group),function(t,e,n){o=t?I(t&&t.dimensions,function(t){return C({name:t},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{})}):[{name:"value",type:"float"}];var i=new Bc(o,n),o=new Bc(o,n),a=new Bc([],n),n=I(n.get("data"),L(Nw,e,t,n));t&&(n=tt(n,L(zw,t)));t=t?Lw:function(t){return t.value};return i.initData(I(n,function(t){return t[0]}),null,t),o.initData(I(n,function(t){return t[1]}),null,t),a.initData(I(n,function(t){return t[2]})),a.hasItemOption=!0,{from:i,to:o,line:a}}(e,o,n)),l=i.from,h=i.to,u=i.line,c=(n.__from=l,n.__to=h,n.setData(u),n.get("symbol")),d=n.get("symbolSize");function p(t,e,n){var i=t.getItemModel(e);Rw(t,e,n,o,a),t.setItemVisual(e,{symbolSize:i.get("symbolSize")||d[n?0:1],symbol:i.get("symbol",!0)||c[n?0:1],color:i.get("itemStyle.color")||r.getVisual("color")})}k(c)||(c=[c,c]),"number"==typeof d&&(d=[d,d]),i.from.each(function(t){p(l,t,!0),p(h,t,!1)}),u.each(function(t){var e=u.getItemModel(t).get("lineStyle.color");u.setItemVisual(t,{color:e||l.getItemVisual(t,"color")}),u.setItemLayout(t,[l.getItemLayout(t),h.getItemLayout(t)]),u.setItemVisual(t,{fromSymbolSize:l.getItemVisual(t,"symbolSize"),fromSymbol:l.getItemVisual(t,"symbol"),toSymbolSize:h.getItemVisual(t,"symbolSize"),toSymbol:h.getItemVisual(t,"symbol")})}),s.updateData(u),i.line.eachItemGraphicEl(function(t,e){t.traverse(function(t){t.dataModel=n})}),s.__keep=!0,s.group.silent=n.get("silent")||o.get("silent")}}),pc(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 Bw(t,e,n,i){var o=Dw(t,i[0]),t=Dw(t,i[1]),i=st,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=j([{},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 Vw(t){return!isNaN(t)&&!isFinite(t)}function Gw(t,e,n){t=1-t;return Vw(e[t])&&Vw(n[t])}function Ww(t,e){var n=e.coord[0],i=e.coord[1];return!("cartesian2d"!==t.type||!n||!i||!Gw(1,n,i)&&!Gw(0,n,i))||Cw(t,{coord:n,x:e.x0,y:e.y0})||Cw(t,{coord:i,x:e.x1,y:e.y1})}function Fw(t,e,n,i,o){var a,r,s,l=i.coordinateSystem,h=t.getItemModel(e),u=G(h.get(n[0]),o.getWidth()),h=G(h.get(n[1]),o.getHeight());return isNaN(u)||isNaN(h)?(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),Vw(a)?s[0]=i.toGlobalCoord(i.getExtent()["x0"===n[0]?0:1]):Vw(r)&&(s[1]=o.toGlobalCoord(o.getExtent()["y0"===n[1]?0:1]))),isNaN(u)||(s[0]=u),isNaN(h)||(s[1]=h)):s=[u,h],s}var Hw=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];function Zw(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};E(t,function(t,e){i[e]||Uw(n,e)||(n[e]=t)}),e.label&&!Uw(t,"emphasis")&&(t.emphasis=e.label,delete e.label)}function Uw(t,e){return t.hasOwnProperty(e)}u.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(Hw,function(t){return Fw(i,e,t,n,o)});i.setItemLayout(e,t),i.getItemGraphicEl(e).setShape("points",t)})},this)},renderSeries:function(n,r,t,i){var e=n.coordinateSystem,o=n.id,a=n.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,{group:new z}),h=(this.group.add(l.group),l.__keep=!0,function(t,n,e){var i,o;o=t?(i=I(t&&t.dimensions,function(t){var e=n.getData();return C({name:t},e.getDimensionInfo(e.mapDimension(t))||{})}),new Bc(I(["x0","y0","x1","y1"],function(t,e){return{name:t,type:i[e%2].type}}),e)):new Bc(i=[{name:"value",type:"float"}],e);e=I(e.get("data"),L(Bw,n,t,e));t&&(e=tt(e,L(Ww,t)));t=t?function(t,e,n,i){return t.coord[Math.floor(i/2)][i%2]}:function(t){return t.value};return o.initData(e,null,t),o.hasItemOption=!0,o}(e,n,r));r.setData(h),h.each(function(e){h.setItemLayout(e,I(Hw,function(t){return Fw(h,e,t,n,i)})),h.setItemVisual(e,{color:a.getVisual("color")})}),h.diff(l.__data).add(function(t){var e=new or({shape:{points:h.getItemLayout(t)}});h.setItemGraphicEl(t,e),l.group.add(e)}).update(function(t,e){e=l.__data.getItemGraphicEl(e);V(e,{shape:{points:h.getItemLayout(t)}},r,t),l.group.add(e),h.setItemGraphicEl(t,e)}).remove(function(t){t=l.__data.getItemGraphicEl(t);l.group.remove(t)}).execute(),h.eachItemGraphicEl(function(t,e){var n=h.getItemModel(e),i=n.getModel("label"),o=n.getModel("emphasis.label"),a=h.getItemVisual(e,"color");t.useStyle(C(n.getModel("itemStyle").getItemStyle(),{fill:Ne(a,.4),stroke:a})),t.hoverStyle=n.getModel("emphasis.itemStyle").getItemStyle(),Hr(t.style,t.hoverStyle,i,o,{labelFetcher:r,labelDataIndex:e,defaultText:h.getName(e)||"",isRectText:!0,autoColor:a}),Fr(t,{}),t.dataModel=r}),l.__data=h,l.group.silent=r.get("silent")||n.get("silent")}}),pc(function(t){t.markArea=t.markArea||{}}),h.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 Xw(t,e,n,i){mp.call(this,t,e,n),this.type=i||"value",this.model=null}var Yw=h.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){Yw.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=[],E(e,function(t,e){var n,i=oo(t);T(t)?(n=N(t)).value=e:n=e,o.push(n),nt(i)||null!=i&&!isNaN(i)||(i=""),a.push(i+"")}),e=o),{category:"ordinal",time:"time"}[t]||"number");(this._data=new Bc([{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(Yw.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:[]}}),ss),Rh.extend({type:"timeline"})),jw=(Xw.prototype={constructor:Xw,getLabelModel:function(){return this.model.getModel("label")},isHorizontal:function(){return"horizontal"===this.model.get("orient")}},a(Xw,mp),D),qw=E,Kw=Math.PI;function $w(t,e,n,i,o,a){var r=e.get("color"),r=(o?(o.setColor(r),n.add(o),a&&a.onUpdate(o)):((o=Qd(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=p({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]+=G(a[0],n[0]),e[1]+=G(a[1],n[1])),t.get("symbolRotate"));return i.rotation=(r||0)*Math.PI/180||0,o.attr(i),o.updateTransform(),o}function Jw(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 Es(r.scale.getLabel(t))},qw(["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,i,o,a=t.get("label.position"),r=t.get("orient"),s=(s=e,Ks((l=t).getBoxLayoutParams(),{width:s.getWidth(),height:s.getHeight()},l.get("padding"))),l=(null==a||"auto"===a?a="horizontal"===r?s.y+s.height/2<e.getHeight()/2?"-":"+":s.x+s.width/2<e.getWidth()/2?"+":"-":isNaN(a)&&(a={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[r][a]),{horizontal:"center",vertical:0<=a||"+"===a?"left":"right"}),e={horizontal:0<=a||"+"===a?"top":"bottom",vertical:"middle"},h={horizontal:0,vertical:Kw/2},u="vertical"===r?s.height:s.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)*Kw/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,_=u;return"left"===y||"bottom"===y?(v&&(n=[0,0],c+=f),x&&(i=[c,0],c+=f)):(v&&(n=[_-p,0],_-=f),x&&(i=[0,0],c+=f)),d&&(o=[_-p,0],_-=f),y=[c,_],t.get("inverse")&&y.reverse(),{viewRect:s,mainLength:u,orient:r,rotation:h[r],labelRotation:m,labelPosOpt:a,labelAlign:t.get("label.align")||l[r],labelBaseline:t.get("label.verticalAlign")||t.get("label.baseline")||e[r],playPosition:n,prevBtnPosition:i,nextBtnPosition:o,axisExtent:y,controlSize:p,controlGap:g}},_position:function(t,e){var n,i=this._mainGroup,o=this._labelGroup,a=t.viewRect,r=("vertical"===t.orient&&(Jt(h=jt(),h,[-(s=a.x),-(l=a.y+a.height)]),Qt(h,h,-Kw/2),Jt(h,h,[s,l]),(a=a.clone()).applyTransform(h)),d(a)),s=d(i.getBoundingRect()),l=d(o.getBoundingRect()),h=i.position,a=o.position,u=(a[0]=h[0]=r[0][0],t.labelPosOpt);function c(t){var e=t.position;t.origin=[r[0][0]-e[0],r[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(u)?(p(h,s,r,1,n="+"===u?0:1),p(a,l,r,1,1-n)):(p(h,s,r,1,n=0<=u?0:1),a[1]=h[1]+u),i.attr("position",h),o.attr("position",a),i.rotation=o.rotation=t.rotation,c(i),c(o)},_createAxis:function(t,e){var n=e.getData(),i=e.get("axisType"),o=Hd(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 Xw("value",o,t.axisExtent,i));return a.model=e,a},_createGroup:function(t){t=this["_"+t]=new z;return this.group.add(t),t},_renderAxisLine:function(t,e,n,i){n=n.getExtent();i.get("lineStyle.show")&&e.add(new rr({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();qw(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:jw(this._changeTimeline,this,t)},i=$w(n,i,a,e);Fr(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(),qw(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 R({position:[o,0],rotation:a.labelRotation-a.rotation,onclick:jw(this._changeTimeline,this,e),silent:!1});Zr(o.style,i,{text:t.formattedLabel,textAlign:a.labelAlign,textVerticalAlign:a.labelBaseline}),r.add(o),Fr(o,Zr({},n))},this))},_renderControl:function(t,a,e,r){var s=t.controlSize,l=t.rotation,h=r.getModel("controlStyle").getItemStyle(),u=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:h,onclick:n},i=br(r.get(e).replace(/^path:\/\//,""),N(t||{}),new Z(o[0],o[1],o[2],o[3]),"center"),a.add(i),Fr(i,u))}o(t.nextBtnPosition,"controlStyle.nextIcon",jw(this._changeTimeline,this,i?"-":"+")),o(t.prevBtnPosition,"controlStyle.prevIcon",jw(this._changeTimeline,this,i?"+":"-")),o(t.playPosition,"controlStyle."+(n?"stopIcon":"playIcon"),jw(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=$w(o,o,this._mainGroup,{},this._currentPointer,{onCreate:function(t){t.draggable=!0,t.drift=jw(r._handlePointerDrag,r),t.ondragend=jw(r._handlePointerDragend,r),Jw(t,a,n,i,!0)},onUpdate:function(t){Jw(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=fs(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(jw(function(){var t=this.model;this._changeTimeline(t.getCurrentIndex()+(t.get("rewind",!0)?-1:1))},this),this.model.get("playInterval")))},_toAxisCoord:function(t){return Qr(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})}}),pc(function(t){E(t=k(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),Zw(t),Uw(t,"controlPosition")&&(Uw(n=t.controlStyle||(t.controlStyle={}),"position")||(n.position=t.controlPosition),"none"!==n.position||Uw(n,"show")||(n.show=!1,delete n.position),delete t.controlPosition),E(t.data||[],function(t){T(t)&&!k(t)&&(!Uw(t,"value")&&Uw(t,"name")&&(t.value=t.name),Zw(t))}))})}),h.registerSubTypeDefaulter("dataZoom",function(){return"slider"});var Qw=["cartesian2d","polar","singleAxis"];function tb(o,a){E(eb,function(t,e){for(var n={name:t,capital:ib[e]},i=0;i<nb.length;i++)n[nb[i]]=t+ob[i];o.call(a,n)})}var eb,nb,ib,ob;nb=["axisIndex","axis","index","id"],ib=I(eb=(eb=["x","y","z","radius","angle","single"]).slice(),Hs),ob=I(nb=(nb||[]).slice(),Hs);function ab(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<=f(a.nodes,t)||(n=t,i=a,o=!1,r(function(e){E(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){E(s(t,e)||[],function(t){n.records[e.name][t]=!0})})}}function rb(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 sb=E,lb=fs;function hb(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)))}rb.prototype={constructor:rb,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<=f(Qw,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 sb(["startValue","endValue"],function(t){l.push(null!=e[t]?o.parse(e[t]):null)}),sb([0,1],function(t){var e=l[t],n=s[t];"percent"===a[t]?e=o.parse(ps(n=null==n?r[t]:n,r,i,!0)):n=ps(e,i,r,!0),l[t]=e,s[t]=n}),{valueWindow:lb(l),percentWindow:lb(s)}},reset:function(t){var e,i,o,a;t===this._dataZoomModel&&(e=this.getTargetSeriesModels(),this._dataExtent=function(t,n,e){var i=[1/0,-1/0];sb(e,function(t){var e=t.getData();e&&sb(e.mapDimension(n,!0),function(t){t=e.getApproximateExtent(t);t[0]<i[0]&&(i[0]=t[0]),t[1]>i[1]&&(i[1]=t[1])})}),i[1]<i[0]&&(i=[NaN,NaN]);return function(t,e){var t=t.getAxisModel(),n=t.getMin(!0),i="category"===t.get("type"),o=i&&t.getCategories().length;null!=n&&"dataMin"!==n&&"function"!=typeof n?e[0]=n:i&&(e[0]=0<o?0:NaN);n=t.getMax(!0);null!=n&&"dataMax"!==n&&"function"!=typeof n?e[1]=n:i&&(e[1]=0<o?o-1:NaN);t.get("scale",!0)||(0<e[0]&&(e[0]=0),e[1]<0&&(e[1]=0));return e}(t,i),i}(this,this._dimName,e),e=this.calculateDataWindow(t.option),this._valueWindow=e.valueWindow,this._percentWindow=e.percentWindow,o=(i=this)._minMaxSpan={},a=i._dataZoomModel,sb(["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"]=ps(e[0]+n,e,[0,100],!0))}),hb(this))},restore:function(t){t===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,hb(this,!0))},filterData:function(t,e){var i,n,o,u;t===this._dataZoomModel&&(i=this._dimName,n=this.getTargetSeriesModels(),o=t.get("filterMode"),u=this._valueWindow,"none"!==o)&&sb(n,function(n){var l=n.getData(),h=l.mapDimension(i,!0);"weakFilter"===o?l.filterSelf(function(t){for(var e,n,i,o=0;o<h.length;o++){var a=l.get(h[o],t),r=!isNaN(a),s=a<u[0],a=a>u[1];if(r&&!s&&!a)return!0;r&&(i=!0),s&&(e=!0),a&&(n=!0)}return i&&e&&n}):sb(h,function(t){var e;"empty"===o?n.setData(l.map(t,function(t){return(e=t)>=u[0]&&e<=u[1]?t:NaN;var e})):((e={})[t]=u,l.selectRange(e))}),sb(h,function(t){l.setApproximateExtent(u,t)})})}};var ub=E,cb=tb,wu=_c({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=db(t);this.mergeDefaultAndTheme(t,n),this.doInit(i)},mergeOption:function(t){var e=db(t);p(this.option,t,!0),this.doInit(e)},doInit:function(t){var n=this.option;y.canvasSupported||(n.realtime=!1),this._setDefaultThrottle(t),pb(this,t),ub([["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 rb(t.name,e,this,i));a[t.name+"_"+e]=o},this)},_resetTarget:function(){var e=this.option,t=this._judgeAutoMode();cb(function(t){t=t.axisIndex;e[t]=eo(e[t])},this),"axisIndex"===t?this._autoSetAxisIndex():"orient"===t&&this._autoSetOrient()},_judgeAutoMode:function(){var e=this.option,n=!1,t=(cb(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):ub(n.singleAxis,function(t){a&&t.get("orient",!0)===e&&(r.singleAxisIndex=[t.componentIndex],a=!1)})),a&&cb(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")&&cb(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(A&&!o)throw new Error(t.axis+' "'+st(n,i,0)+'" not found');f(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 cb(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 cb(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;cb(function(e){ub(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;ub([["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||pb(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 db(e){var n={};return ub(["start","end","startValue","endValue","throttle"],function(t){e.hasOwnProperty(t)&&(n[t]=e[t])}),n}function pb(t,i){var o=t._rangePropMode,a=t.get("rangeMode");ub([["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 c=Rh.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}}),gb=(wu.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"}}}),B),fb=ps,mb=fs,yb=D,vb=E,xb="horizontal",_b="vertical",wb=["line","bar","candlestick","scatter"],bb=c.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){bb.superApply(this,"render",arguments),$h(this,"_dispatchZoomAction",this.dataZoomModel.get("throttle"),"fixRate"),this._orient=t.get("orient"),!1===this.dataZoomModel.get("show")?this.group.removeAll():(i&&"dataZoom"===i.type&&i.from===this.uid||this._buildView(),this._updateView())},remove:function(){bb.superApply(this,"remove",arguments),Jh(this,"_dispatchZoomAction")},dispose:function(){bb.superApply(this,"dispose",arguments),Jh(this,"_dispatchZoomAction")},_buildView:function(){var t=this.group,e=(t.removeAll(),this._resetLocation(),this._resetInterval(),this._displayables.barGroup=new z);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===xb?{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=Qs(t.option),n=(E(["right","top","width","height"],function(t){"ph"===o[t]&&(o[t]=i[t])}),Ks(o,e,t.padding));this._location={x:n.x,y:n.y},this._size=[n.width,n.height],this._orient===_b&&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!==xb||i?n===xb&&i?{scale:a?[-1,1]:[-1,-1]}:n!==_b||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 gb({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40})),n.add(new gb({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:D(this._onClickPanelClick,this)}))},_renderDataShadow:function(){var t,e,n,i,o,a,r,s,l,h,u,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],o=[0,t[1]],c=[0,t[0]],a=[[t[0],0],[0,0]],r=[],s=c[1]/(e.count()-1),l=0,h=Math.round(e.count()/t[0]),e.each([n],function(t,e){var n;0<h&&e%h?l+=s:(t=(n=null==t||isNaN(t)||""===t)?0:fb(t,i,o,!0),n&&!u&&e?(a.push([a[a.length-1][0],0]),r.push([r[r.length-1][0],0])):!n&&u&&(a.push([l,0]),r.push([l,0])),a.push([l,t]),r.push([l,t]),l+=s,u=n)}),c=this.dataZoomModel,this._displayables.barGroup.add(new or({shape:{points:a},style:C({fill:c.get("dataBackgroundColor")},c.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new ar({shape:{points:r},style:c.getModel("dataBackground.lineStyle").getLineStyle(),silent:!0,z2:-19})))},_prepareDataShadowInfo:function(){var s,l,t=this.dataZoomModel,h=t.get("showDataShadow");if(!1!==h)return l=this.ecModel,t.eachTargetAxis(function(a,r){E(t.getAxisProxy(a.name,r).getTargetSeriesModels(),function(t){var e,n,i,o;s||!0!==h&&f(wb,t.get("type"))<0||(e=l.getComponent(a.axis,r).axis,n={x:"y",y:"x",radius:"angle",angle:"radius"}[a.name],o=t.coordinateSystem,null!=n&&o.getOtherAxis&&(i=o.getOtherAxis(e).inverse),n=t.getData().mapDimension(n),s={thisAxis:e,series:t,thisDim:a.name,otherDim:n,otherAxisInverse:i})},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 gb({draggable:!0,cursor:Sb(this._orient),drift:yb(this._onDragMove,this,"all"),onmousemove:function(t){Ai(t.event)},ondragstart:yb(this._showDataInfo,this,!0),ondragend:yb(this._onDragEnd,this),onmouseover:yb(this._showDataInfo,this,!0),onmouseout:yb(this._showDataInfo,this,!1),style:{fill:r.get("fillerColor"),textPosition:"inside"}})),a.add(new gb(Ar({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)"}}))),vb([0,1],function(t){var e=is(r.get("handleIcon"),{cursor:Sb(this._orient),draggable:!0,drift:yb(this._onDragMove,this,t),onmousemove:function(t){Ai(t.event)},ondragend:yb(this._onDragEnd,this),onmouseover:yb(this._showDataInfo,this,!0),onmouseout:yb(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),n=e.getBoundingRect(),n=(this._handleHeight=G(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 R({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=[fb(t[0],[0,100],e,!0),fb(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=(cv(e,i,o,n.get("zoomLock")?"all":t,null!=a.minSpan?fb(a.minSpan,r,o,!0):null,null!=a.maxSpan?fb(a.maxSpan,r,o,!0):null),this._range),n=this._range=mb([fb(i[0],o,r,!0),fb(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=mb(o.slice()),a=this._size;vb([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)]),mb(this._handleEnds.slice()));function h(t){var e=Jr(o.handles[t].parent,this.group),n=ts(0===t?"right":"left",e),i=this._handleWidth/2+5,i=Qr([l[t]+(0===t?-i:i),this._size[1]/2],e);a[t].setStyle({x:i[0],y:i[1],textVerticalAlign:r===xb?"middle":n,textAlign:r===xb?n:"center",text:s[t]})}h.call(this,0),h.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):nt(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=Qr([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 vb(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 Sb(t){return"vertical"===t?"ns-resize":"ew-resize"}wu.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,preventDefaultMouseMove:!0}});var Mb=L,Ib="\0_ec_dataZoom_roams";function Tb(t,i){var n,o,a,e=Ab(t),r=i.dataZoomId,s=i.coordId,l=(E(e,function(t,e){var n=t.dataZoomInfos;n[r]&&f(i.allCoordIds,s)<0&&(delete n[r],t.count--)}),Cb(e),e[s]),t=(l||((l=e[s]={coordId:s,dataZoomInfos:{},count:0}).controller=function(t,e){t=new _m(t.getZr());return t.on("pan",Mb(Lb,e)),t.on("zoom",Mb(kb,e)),t}(t,l),l.dispatchAction=L(Nb,t)),l.dataZoomInfos[r]||l.count++,l.dataZoomInfos[r]=i,e=l.dataZoomInfos,o={},a={type_true:2,type_move:1,type_false:0,type_undefined:-1},E(e,function(t){var e=!t.disabled&&(!t.zoomLock||"move");a["type_"+n]<a["type_"+e]&&(n=e),O(o,t.roamControllerOpt)}),{controlType:n,opt:o});l.controller.enable(t.controlType,t.opt),l.controller.setPointerChecker(i.containsPoint),$h(l,"dispatchAction",i.throttleRate,"fixRate")}function Db(t){return t.type+"\0_"+t.id}function Ab(t){t=t.getZr();return t[Ib]||(t[Ib]={})}function Cb(n){E(n,function(t,e){t.count||(t.controller.dispose(),delete n[e])})}function Lb(e,n,i,o,a,r,s){Pb(e,function(t){return t.panGetRange(e.controller,n,i,o,a,r,s)})}function kb(e,n,i,o){Pb(e,function(t){return t.zoomGetRange(e.controller,n,i,o)})}function Pb(t,n){var i=[];E(t.dataZoomInfos,function(t){var e=n(t);!t.disabled&&e&&i.push({dataZoomId:t.dataZoomId,start:e[0],end:e[1]})}),i.length&&t.dispatchAction(i)}function Nb(t,e){t.dispatchAction({type:"dataZoom",batch:e})}var Ob=D,Eb=c.extend({type:"dataZoom.inside",init:function(t,e){this._range},render:function(a,t,r,e){Eb.superApply(this,"render",arguments),this._range=a.getPercentRange(),E(this.getTargetCoordInfo(),function(t,n){var o=I(t,function(t){return Db(t.model)});E(t,function(t){var i=t.model,e=a.option;Tb(r,{coordId:Db(i),allCoordIds:o,containsPoint:function(t,e,n){return i.coordinateSystem.containPoint([e,n])},dataZoomId:a.id,throttleRate:a.get("throttle",!0),panGetRange:Ob(this._onPan,this,t,n),zoomGetRange:Ob(this._onZoom,this,t,n),zoomLock:e.zoomLock,disabled:e.disabled,roamControllerOpt:{zoomOnMouseWheel:e.zoomOnMouseWheel,moveOnMouseMove:e.moveOnMouseMove,preventDefaultMouseMove:e.preventDefaultMouseMove}})},this)},this)},dispose:function(){var t,n;t=this.api,n=this.dataZoomModel.id,E(t=Ab(t),function(t){t.controller.dispose();var e=t.dataZoomInfos;e[n]&&(delete e[n],t.count--)}),Cb(t),Eb.superApply(this,"dispose",arguments),this._range=null},_onPan:function(t,e,n,i,o,a,r,s,l){var h=this._range,u=h.slice(),c=t.axisModels[0];if(c)return cv((e=zb[e]([a,r],[s,l],c,n,t)).signal*(u[1]-u[0])*e.pixel/e.pixelLength,u,[0,100],"all"),this._range=u,h[0]!==u[0]||h[1]!==u[1]?u:void 0},_onZoom:function(t,e,n,i,o,a){var r=this._range,s=r.slice(),l=t.axisModels[0];if(l)return o=(0<(e=zb[e](null,[o,a],l,n,t)).signal?e.pixelStart+e.pixelLength-e.pixel:e.pixel-e.pixelStart)/e.pixelLength*(s[1]-s[0])+s[0],i=Math.max(1/i,0),s[0]=(s[0]-o)*i+o,s[1]=(s[1]-o)*i+o,cv(0,s,[0,100],0,(a=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan()).minSpan,a.maxSpan),this._range=s,r[0]!==s[0]||r[1]!==s[1]?s:void 0}}),zb={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}},Rb=(gc({getTargetSeries:function(t){var i=P();return t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,e,n){E(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=ab(D(t.eachComponent,t,"dataZoom"),tb,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)}),E(o,function(t,e){t.setRawRange({start:n.start,end:n.end,startValue:n.startValue,endValue:n.endValue})})}),["rect","polygon","keep","clear"]);var Bb=E;function Vb(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return 1}function Gb(e,t,o){var a={};return Bb(t,function(n){var i=a[n]=(t.prototype.__hidden=t.prototype,new t);function t(){}Bb(e[n],function(t,e){S.isValidType(e)&&(t={type:e,visual:t},o&&o(t,n),i[e]=new S(t),"opacity"===e)&&((t=N(t)).type="colorAlpha",i.__hidden.__alphaForOpacity=new S(t))})}),a}function Wb(e,n,t){var i;E(t,function(t){n.hasOwnProperty(t)&&Vb(n[t])&&(i=!0)}),i&&E(t,function(t){n.hasOwnProperty(t)&&Vb(n[t])?e[t]=N(n[t]):delete e[t]})}function Fb(t,d,p,g){var f={};return E(t,function(t){var e=S.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)return;for(var r=null!=g?n.get(g,o,!0):o,a=p(r),s=d[a],l=f[a],h=0,u=l.length;h<u;h++){var c=l[h];s[c]&&s[c].applyVisual(r,e,i)}}}}}var Hb={lineX:Zb(0),lineY:Zb(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])&&np(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],!!(np(n,i,o)||np(n,i+a,o)||np(n,i,o+r)||np(n,i+a,o+r)||Z.create(t).contain(s[0],s[1])||Xb(i,o,i+a,o,n)||Xb(i,o,i,o+r,n)||Xb(i+a,o,i+a,o+r,n)||Xb(i,o+r,i+a,o+r,n))||void 0)}}};function Zb(i){var o=["x","y"],a=["width","height"];return{point:function(t,e,n){if(t)return n=n.range,Ub(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(),Ub(t[0],n)||Ub(t[1],n)||Ub(n[0],t)||Ub(n[1],t)}}}function Ub(t,e){return e[0]<=t&&t<=e[1]}function Xb(t,e,n,i,o){for(var a=0,r=o[o.length-1];a<o.length;a++){var s=o[a];if(function(t,e,n,i,o,a,r,s){var l=Yb(n-t,o-r,i-e,a-s);if(function(t){return t<=1e-6&&-1e-6<=t}(l))return;r=Yb(o-t,o-r,a-e,a-s)/l;if(r<0||1<r)return;s=Yb(n-t,o-t,i-e,a-e)/l;if(s<0||1<s)return;return 1}(t,e,n,i,s[0],s[1],r[0],r[1]))return 1;r=s}}function Yb(t,e,n,i){return t*i-e*n}var jb=E,qb=f,n=L,Kb=["dataToPoint","pointToData"],$b=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"];function Jb(t,e,n){var i=this._targetInfoList=[],o={},a=tS(e,t);jb(eS,function(t,e){n&&n.include&&!(0<=qb(n.include,e))||t(a,i,o)})}u=Jb.prototype;function Qb(t){return t[0]>t[1]&&t.reverse(),t}function tS(t,e){return po(t,e,{includeMainTypes:$b})}u.setOutputRanges=function(t,e){this.matchOutputRanges(t,e,function(t,e,n){(t.coordRanges||(t.coordRanges=[])).push(e),t.coordRange||(t.coordRange=e,n=oS[t.brushType](0,n,e),t.__rangeOffset={offset:rS[t.brushType](n.values,t.range,[1,1]),xyMinMax:n.xyMinMax})})},u.matchOutputRanges=function(t,i,o){jb(t,function(n){var t=this.findTargetInfo(n,i);t&&!0!==t&&E(t.coordSyses,function(t){var e=oS[n.brushType](1,t,n.range);o(n,e.values,t,i)})},this)},u.setInputRanges=function(t,i){jb(t,function(t){var e,n=this.findTargetInfo(t,i);A&&(x(!n||!0===n||t.coordRange,"coordRange must be specified when coord index specified."),x(!n||!0!==n||t.range,"range must be specified in global brush.")),t.range=t.range||[],n&&!0!==n&&(t.panelId=n.panelId,n=oS[t.brushType](0,n.coordSys,t.coordRange),e=t.__rangeOffset,t.range=e?rS[t.brushType](n.values,e.offset,function(t,e){t=lS(t),e=lS(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)},u.makePanelOpts=function(n,i){return I(this._targetInfoList,function(t){var e=t.getPanelRect();return{panelId:t.panelId,defaultBrushType:i&&i(t),clipPath:g1(e),isTargetByCursor:m1(e,n,t.coordSysModel),getLinearBrushOtherExtent:f1(e)}})},u.controlSeries=function(t,e,n){t=this.findTargetInfo(t,n);return!0===t||t&&0<=qb(t.coordSyses,e.coordinateSystem)},u.findTargetInfo=function(t,e){for(var n=this._targetInfoList,i=tS(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<nS.length;o++)if(nS[o](i,a))return a}return!0};var eS={grid:function(t,i){var o=t.xAxisModels,a=t.yAxisModels,t=t.gridModels,e=P(),r={},s={};(o||a||t)&&(jb(o,function(t){t=t.axis.grid.model;e.set(t.id,t),r[t.id]=!0}),jb(a,function(t){t=t.axis.grid.model;e.set(t.id,t),s[t.id]=!0}),jb(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=[];jb(e.getCartesians(),function(t,e){(0<=qb(o,t.getAxis("x").model)||0<=qb(a,t.getAxis("y").model))&&n.push(t)}),i.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:n[0],coordSyses:n,getPanelRect:iS.grid,xAxisDeclared:r[t.id],yAxisDeclared:s[t.id]})}))},geo:function(t,n){jb(t.geoModels,function(t){var e=t.coordinateSystem;n.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:e,coordSyses:[e],getPanelRect:iS.geo})})}},nS=[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}],iS={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(Jr(t)),e}},oS={lineX:n(aS,0),lineY:n(aS,1),rect:function(t,e,n){var i=e[Kb[t]]([n[0][0],n[1][0]]),e=e[Kb[t]]([n[0][1],n[1][1]]),t=[Qb([i[0],e[0]]),Qb([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[Kb[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 aS(t,e,n,i){A&&x("cartesian2d"===n.type,"lineX/lineY brush is available only in cartesian2d.");var o=n.getAxis(["x","y"][t]),n=Qb(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 rS={lineX:n(sS,0),lineY:n(sS,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 sS(t,e,n,i){return[e[0]-i[t]*n[0],e[1]-i[t]*n[1]]}function lS(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var hS=["inBrush","outOfBrush"],uS="__ecBrushSelect",cS="__ecInBrushSelectEvent",ss=Au.VISUAL.BRUSH;function dS(t,e){var n;t.isDisposed()||((n=t.getZr())[cS]=!0,t.dispatchAction({type:"brushSelect",batch:e}),n[cS]=!1)}function pS(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 gS(t){var e,n,a=t.brushSelector;return nt(a)?(e=[],E(Hb,function(o,t){e[t]=function(t,e,n,i){e=e.getItemLayout(t);return o[a](e,n,i)}}),e):et(a)?(n={},E(Hb,function(t,e){n[e]=a}),n):a}mc(ss,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 Jb(t.option,e)).setInputRanges(t.areas,e)})}),yc(ss,function(d,t,e){var o,a,n,i,r,s=[];d.eachComponent({mainType:"brush"},function(u,t){var m={brushId:u.id,brushIndex:t,brushName:u.name,areas:N(u.areas),selected:[]},e=(s.push(m),u.option),n=e.brushLink,i=[],y=[],v=[],x=0,c=(t||(o=e.throttleType,a=e.throttleDelay),I(u.areas,function(t){return n=C({boundingRect:fS[t.brushType](t)},t),i=n.selectors={},E(Hb[n.brushType],function(e,t){i[t]=function(t){return e(t,i,n)}}),n;var n,i})),_=Gb(u.option,hS,function(t){t.mappingMethod="fixed"});function w(t){return"all"===n||i[t]}function b(t){return!!t.length}k(n)&&E(n,function(t){i[t]=1}),d.eachSeries(function(t,e){var n,i,o,a,r,s,l,h=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=h,(a=gS(n=t))&&!function(t,e){t=t.option.seriesIndex;return null!=t&&"all"!==t&&(k(t)?f(t,e)<0:e!==t)}(u,s)&&(E(c,function(t){a[t.brushType]&&u.brushTargetManager.controlSeries(t,n,d)&&i.push(t),x|=b(i)}),w(s))&&b(i)&&(o=n.getData()).each(function(t){pS(a,i,o,t)&&(y[t]=1)}))}),d.eachSeries(function(t,e){var s,l,h,u,c,d,p,n={seriesId:t.id,seriesIndex:e,seriesName:t.name,dataIndex:[]},i=(m.selected.push(n),gS(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 pS(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=h.call(u,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,h=t,p={},E(hS,function(t){var e=S.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())[cS]&&(e[uS]||(e[uS]=dS),$h(e,uS,i,n)(t,r))});var fS={lineX:vt,lineY:vt,rect:function(t){return mS(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&&mS(o)}};function mS(t){return new Z(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var yS=["#ddd"];function vS(t,e){return p({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new w(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}function xS(t,e,n,i){i&&i.$from===t.id||this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())}_c({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||Wb(n,t,["inBrush","outOfBrush"]),n.inBrush=n.inBrush||{});n.outOfBrush=n.outOfBrush||{color:yS},e.hasOwnProperty("liftZ")||(e.liftZ=5)},setAreas:function(t){A&&(x(k(t)),E(t,function(t){x(t.brushType,"Illegal areas")})),t&&(this.areas=I(t,function(t){return vS(this.option,t)},this))},setBrushOption:function(t){this.brushOption=vS(this.option,t),this.brushType=this.brushOption.brushType}}),wc({type:"brush",init:function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new Rv(e.getZr())).on("brush",D(this._onBrush,this)).mount()},render:function(t){return this.model=t,xS.apply(this,arguments)},updateTransform:xS,updateView:xS,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 _S={};function wS(t,e){_S[t]=e}l=Qh.toolbox.brush;function bS(t,e,n){this.model=t,this.ecModel=e,this.api=n,this._brushType,this._brushMode}bS.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 u=bS.prototype,SS=(u.render=u.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,E(e.get("type",!0),function(t){e.setIconStatus(t,("keep"===t?"multiple"===o:"clear"===t?a:t===i)?"emphasis":"normal")})},u.getIcons=function(){var t=this.model,e=t.get("icon",!0),n={};return E(t.get("type",!0),function(t){e[t]&&(n[t]=e[t])}),n},u.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}})},wS("brush",bS),pc(function(t,e){var n,i,o,a=t&&t.brush;(a=k(a)?a:a?[a]:[]).length&&(n=[],E(a,function(t){t=t.hasOwnProperty("toolbox")?t.toolbox:[];t instanceof Array&&(n=n.concat(t))}),(a=k(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={},E(i=t,function(t){o[t]=1}),i.length=0,E(o,function(t,e){i.push(e)}),e)&&!t.length&&t.push.apply(t,Rb)}),E);function MS(t){t=t&&t.visualMap;k(t)||(t=t?[t]:[]),SS(t,function(t){t&&(IS(t,"splitList")&&!IS(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList),t=t.pieces)&&k(t)&&SS(t,function(t){T(t)&&(IS(t,"start")&&!IS(t,"min")&&(t.min=t.start),IS(t,"end"))&&!IS(t,"max")&&(t.max=t.end)})})}function IS(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}h.registerSubTypeDefaulter("visualMap",function(t){return t.categories||(t.pieces?0<t.pieces.length:0<t.splitNumber)&&!t.calculable?"piecewise":"continuous"});n=Au.VISUAL.COMPONENT;function TS(t,e,n,i){for(var o=e.targetVisuals[i],a=S.prepareVisualTypes(o),r={color:t.getData().getVisual("color")},s=0,l=a.length;s<l;s++){var h=a[s],h=o["opacity"===h?"__alphaForOpacity":h];h&&h.applyVisual(n,u,c)}return r.color;function u(t){return r[t]}function c(t,e){r[t]=e}}yc(n,{createOnAllSeries:!0,reset:function(n,t){var i=[];return t.eachComponent("visualMap",function(t){var e=n.pipelineContext;!t.isTargetSeries(n)||e&&e.large||i.push(Fb(t.stateList,t.targetVisuals,D(t.getValueState,t),t.getDataDimension(n.getData())))}),i}}),yc(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(D(TS,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 DS=function(t,e,n){t=N((AS[t]||{})[e]);return n&&k(t)?t[t.length-1]:t},AS={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]}},CS=S.mapVisual,LS=S.eachVisual,kS=k,PS=E,NS=fs,OS=ps,ES=_c({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||Wb(n,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},resetVisual:function(t){var e=this.stateList;t=D(t,this),this.controllerVisuals=Gb(this.option.controller,e,t),this.targetVisuals=Gb(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=eo(t),n},eachTargetSeries:function(e,n){E(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||["<",">"],k(t)&&(t=t.slice(),i=!0),e=e?t:i?[s(t[0]),s(t[1])]:s(t),nt(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=NS([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=(p(i,n),p(o,n),this.isCategory());function a(i){kS(e.color)&&!i.inRange&&(i.inRange={color:e.color.slice().reverse()}),i.inRange=i.inRange||{color:t.get("gradientColor")},PS(this.stateList,function(t){var e,n=i[t];nt(n)&&((e=DS(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]={},PS(e,function(t,e){var n;S.isValidType(e)&&null!=(n=DS(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");PS(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=CS(i.symbol,function(t){return"none"===t||"square"===t?"roundRect":t}),i.symbolSize);null!=t&&(e=-1/0,LS(t,function(t){e<t&&(e=t)}),i.symbolSize=CS(t,function(t){return OS(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:vt,getValueState:vt,getVisualMeta:vt}),zS=[20,140],RS=ES.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){RS.superApply(this,"optionUpdated",arguments),this.resetExtent(),this.resetVisual(function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()}),this._resetRange()},resetItemSize:function(){RS.superApply(this,"resetItemSize",arguments);var t=this.itemSize;"horizontal"===this._orient&&t.reverse(),null!=t[0]&&!isNaN(t[0])||(t[0]=zS[0]),null!=t[1]&&!isNaN(t[1])||(t[1]=zS[1])},_resetRange:function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):k(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(){ES.prototype.completeVisualOption.apply(this,arguments),E(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=fs((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=BS(0,0,this.getExtent()),e=BS(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 h=1;a<s;a++,h=0)h&&i.length&&o(e[a],"outOfRange"),o(e[a],"inRange");for(h=1;r<l;r++)(!e.length||e[e.length-1]<t[r])&&(h&&(i.length&&o(i[i.length-1].value,"outOfRange"),h=0),o(t[r],"outOfRange"));var u=i.length;return{stops:i,outerColors:[u?i[0].color:"transparent",u?i[u-1].color:"transparent"]}}});function BS(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}ss=wc({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.group.removeAll():this.doRender.apply(this,arguments)},renderBackground:function(t){var e=this.visualMapModel,n=Ps(e.get("padding")||0),i=t.getBoundingRect();t.add(new B({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 h=a.controllerVisuals[e||a.getValueState(n)];return E(S.prepareVisualTypes(h),function(t){var e=h[t];o.convertOpacityToAlpha&&"opacity"===t&&(t="colorAlpha",e=h.__alphaForOpacity),S.dependsOn(t,i)&&e&&e.applyVisual(n,s,l)}),r[i]},positionGroup:function(t){var e=this.visualMapModel,n=this.api;$s(t,e.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()})},doRender:vt});function VS(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={},h=0;h<3;h++)l[a[1-o][h]]=s[h],l[r[h]]=2===h?n[0]:i[r[h]];var e=[["x","width",3],["y","height",0]][o],u=Ks(l,t,i.padding);return r[(u.margin[e[2]]||0)+u[e[0]]+.5*u[e[1]]<.5*t[e[1]]?0:1]}function GS(e){return E(e||[],function(t){null!=e.dataIndex&&(e.dataIndexInside=e.dataIndex,e.dataIndex=null)}),e}var WS=ps,FS=E,HS=Math.min,ZS=Math.max,US=ss.extend({type:"visualMap.continuous",init:function(){US.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 R({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=VS(e,this.api,i),s=n.barGroup=this._createBarGroup(r),e=(s.add(n.outOfRange=XS()),s.add(n.inRange=XS(null,a?jS(this._orient):null,D(this._dragHandle,this,"all",!1),D(this._dragHandle,this,"all",!0))),e.textStyleModel.getTextRect("国")),e=ZS(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=D(this._dragHandle,this,e,!1),r=D(this._dragHandle,this,e,!0),s=XS((s=i,0===e?[[0,0],[s,0],[s,-s]]:[[0,0],[s,0],[s,s]]),jS(this._orient),a,r),n=(s.position[0]=n[0],t.add(s),this.visualMapModel.textStyleModel),t=new R({draggable:!0,drift:a,onmousemove:function(t){Ai(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=XS([[0,0]],"move"),e=(o.position[0]=e[0],o.attr({invisible:!0,silent:!0}),t.add(o),this.visualMapModel.textStyleModel),t=new R({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():YS(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=[WS(e[0],n,t,!0),WS(e[1],n,t,!0)]},_updateInterval:function(t,e){var n=this.visualMapModel,i=this._handleEnds,o=[0,n.itemSize[1]],e=(cv(e=e||0,i,o,t,0),n.getExtent());this._dataInterval=[WS(i[0],o,e,!0),WS(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 ur(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 z("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,FS([0,1],function(t){var e=r[t],e=(e.setStyle("fill",i.handlesColor[t]),e.position[1]=n[t],Qr(o.handleLabelPoints[t],Jr(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=WS(t,r,l,!0),l=this._shapes,h=l.indicator;h&&(h.position[1]=r,h.attr("invisible",!1),h.setShape("points",(o=!!n,i=i,r=r,s=s[1],o?[[0,-HS(i,ZS(r,0))],[6,0],[0,HS(i,ZS(s-r,0))]]:[[0,0],[5,-5],[5,5]])),o=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0}),h.setStyle("fill",o),i=Qr(l.indicatorLabelPoint,Jr(h,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]=HS(ZS(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=this.visualMapModel,r=a.itemSize;function s(t,e,n){for(var i=0,o=t.length;i<o;i++)for(var a=t[i].seriesId,r=eo(t[i].dataIndex),s=n&&n[a],l=0,h=r.length;l<h;l++){var u=r[l];s&&s[u]?s[u]=null:(e[a]||(e[a]={}))[u]=1}}function l(t,e){var n,i,o=[];for(n in t)t.hasOwnProperty(n)&&null!=t[n]&&(e?o.push(+n):(i=l(t[n],!0)).length&&o.push({seriesId:n,dataIndex:i}));return o}a.option.hoverLink&&(r=[0,r[1]],n=a.getExtent(),i=[(t=HS(ZS(r[0],t),r[1]))-(o=function(t,e,n){var i=6,t=t.get("hoverLinkDataSize");t&&(i=WS(t,e,n,!0)/2);return i}(a,n,r)),t+o],t=WS(t,r,n,!0),n=[WS(i[0],r,n,!0),WS(i[1],r,n,!0)],i[0]<r[0]&&(n[0]=-1/0),r[1]<i[1]&&(n[1]=1/0),e&&(n[0]===-1/0?this._showIndicator(t,n[1],"< ",o):n[1]===1/0?this._showIndicator(t,n[0],"> ",o):this._showIndicator(t,t,"≈ ",o)),r=this._hoverLinkDataIndices,i=[],(e||YS(a))&&(i=this._hoverLinkDataIndices=a.findTargetDataIndices(n)),t=i,o={},s(r||[],e={}),s(t||[],o,e),a=[l(e),l(o)],this._dispatchHighDown("downplay",GS(a[0])),this._dispatchHighDown("highlight",GS(a[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",GS(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=Jr(e,i?null:this.group);return os[k(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 XS(t,e,n,i){return new or({shape:{points:t},draggable:!!n,cursor:e,drift:n,onmousemove:function(t){Ai(t.event)},ondragend:i})}function YS(t){var e=t.get("hoverLinkOnHandle");return null==e?t.get("realtime"):e}function jS(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)})}),pc(MS);var qS=ES.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){qS.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetExtent();var n=this._mode=this._determineMode(),i=(KS[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){t=N(t);return"inRange"!==e&&(t.visual=null),t}))})},completeVisualOption:function(){var i=this.option,n={},t=S.listVisualTypes(),o=this.isCategory();function a(t,e,n){return t&&t[e]&&(T(t[e])?t[e].hasOwnProperty(n):t[e]===n)}E(i.pieces,function(e){E(t,function(t){e.hasOwnProperty(t)&&(n[t]=1)})}),E(n,function(t,e){var n=0;E(this.stateList,function(t){n|=a(i,t,e)||a(i.target,t,e)},this),n||E(this.stateList,function(t){(i[t]||(i[t]={}))[e]=DS(e,"inRange"===t?"active":"inactive",o)})},this),ES.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,E(o,function(t,e){t=this.getSelectedMapKey(t);a.hasOwnProperty(t)||(a[t]=!0)},this),"single"===i.selectedMode&&(n=!1,E(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=S.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){S.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,E(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})}}}),KS={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 h=r===o-1?i[1]:s+a;e.push({index:r++,interval:[s,h],close:[1,1]})}t.maxOpen&&e.push({index:r++,interval:[i[1],1/0],close:[0,0]}),As(e),E(e,function(t){t.text=this.formatValueText(t.interval)},this)},categories:function(){var t=this.option;E(t.categories,function(t){this._pieceList.push({text:this.formatValueText(t,!0),value:t})},this),$S(t,this._pieceList)},pieces:function(){var t=this.option,d=this._pieceList;E(t.pieces,function(t,e){var n={text:"",index:e};if(null!=(t=T(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=[],h=0;h<2;h++){for(var u=[["gte","gt","min"],["lte","lt","max"]][h],c=0;c<3&&null==o[h];c++)o[h]=t[u[c]],a[h]=r[c],l[h]=2===c;null==o[h]&&(o[h]=s[h])}l[0]&&o[1]===1/0&&(a[0]=0),l[1]&&o[0]===-1/0&&(a[1]=0),A&&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=S.retrieveVisuals(t),d.push(n)},this),$S(t,d),As(d),E(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 $S(t,e){var n=t.inverse;("vertical"===t.orient?!n:n)&&e.reverse()}ss.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(),h=o.itemSize,t=this._getViewData(),e=t.endsText,u=st(o.get("showLabel",!0),!e);e&&this._renderEndsText(i,e[0],h,u,l),E(t.viewPieceList,function(t){var e=t.piece,n=new z,t=(n.onclick=D(this._onItemClick,this,e),this._enableHoverLink(n,t.indexInModelPieceList),o.getRepresentValue(e));this._createItemSymbol(n,t,[0,0,h[0],h[1]]),u&&(t=this.visualMapModel.getValueState(t),n.add(new R({style:{x:"right"===l?-a:h[0]+a,y:h[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],h,u,l),qs(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:GS(e.findTargetDataIndices(n))})}t.on("mouseover",D(e,this,"highlight")).on("mouseout",D(e,this,"downplay"))},_getItemAlign:function(){var t=this.visualMapModel,e=t.option;return"vertical"===e.orient?VS(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 z,r=this.visualMapModel.textStyleModel,a.add(new R({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(Qd(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,E(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})}}),pc(MS);var JS=_c({type:"toolbox",layoutMode:{type:"box",ignoreSize:!0},optionUpdated:function(){JS.superApply(this,"optionUpdated",arguments),E(this.option.feature,function(t,e){e=_S[e];e&&p(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"}}}});wc({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,h,t=x[t],e=x[e],u=new w(y[t],d,d.ecModel);if(t&&!e){if(0===t.indexOf("my"))n={model:u,onclick:u.option.onclick,featureName:t};else{var c=_S[t];if(!c)return;n=new c(u,p,g)}v[t]=n}else{if(!(n=v[e]))return;n.model=u,n.ecModel=p,n.api=g}!t&&e?n.dispose&&n.dispose(p,g):!u.get("show")||n.unusable?n.remove&&n.remove(p,g):(o=n,c=t,a=(i=u).getModel("iconStyle"),r=i.getModel("emphasis.iconStyle"),e=o.getIcons?o.getIcons():i.get("icon"),s=i.get("title")||{},"string"==typeof e&&(t=e,l=s,s={},(e={})[c]=t,s[c]=l),h=i.iconPaths={},E(e,function(t,e){var n=is(t,{},{x:-m/2,y:-m/2,width:m,height:m});n.setStyle(a.getItemStyle()),n.hoverStyle=r.getItemStyle(),Fr(n),d.get("showTitle")&&(n.__title=s[e],n.on("mouseover",function(){var t=r.getItemStyle();n.setStyle({text:s[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",D(o.onclick,o,p,g,e)),h[e]=n}),u.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(u,p,g,f))}_.removeAll(),d.get("show")&&(m=+d.get("itemSize"),y=d.get("feature")||{},v=this._features||(this._features={}),x=[],E(y,function(t,e){x.push(e)}),new Tc(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=Ks(i,n,o),qs(e.get("orient"),t,e.get("itemGap"),a.width,a.height),$s(t,i,n,o),_.add(q_(_.getBoundingRect(),d)),_.eachChild(function(t){var e,n,i=t.__title,o=t.hoverStyle;o&&i&&(i=Vn(i,qn(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){E(this._features,function(t){t.updateView&&t.updateView(t.model,e,n,i)})},remove:function(e,n){E(this._features,function(t){t.remove&&t.remove(e,n)}),this.group.removeAll()},dispose:function(e,n){E(this._features,function(t){t.dispose&&t.dispose(e,n)})}});l=Qh.toolbox.saveAsImage;function QS(t){this.model=t}QS.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()},QS.prototype.unusable=!y.canvasSupported;QS.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)}},wS("saveAsImage",QS);u=Qh.toolbox.magicType;function tM(t){this.model=t}tM.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(u.title),option:{},seriesIndex:{}};var n=tM.prototype,eM=(n.getIcons=function(){var t=this.model,e=t.get("icon"),n={};return E(t.get("type"),function(t){e[t]&&(n[t]=e[t])}),n},{line:function(t,e,n,i){if("bar"===t)return p({id:e,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get("option.line")||{},!0)},bar:function(t,e,n,i){if("line"===t)return p({id:e,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get("option.bar")||{},!0)},stack:function(t,e,n,i){if("line"===t||"bar"===t)return p({id:e,stack:"__ec_magicType_stack__"},i.get("option.stack")||{},!0)},tiled:function(t,e,n,i){if("line"===t||"bar"===t)return p({id:e,stack:""},i.get("option.tiled")||{},!0)}}),nM=[["line","bar"],["stack","tiled"]],ss=(n.onclick=function(r,t,s){var l,h=this.model,e=h.get("seriesIndex."+s);eM[s]&&(l={series:[]},E(nM,function(t){0<=f(t,s)&&E(t,function(t){h.setIconStatus(t,"normal")})}),h.setIconStatus(s,"emphasis"),r.eachComponent({mainType:"series",query:null==e?null:{seriesIndex:e}},function(t){var e=t.subType,n=t.id,e=eM[s](e,n,t,h),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)}),wS("magicType",tM),Qh.toolbox.dataView),iM=new Array(60).join("-"),oM="\t";function aM(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,u,t={seriesGroupByCategoryAxis:o,other:a,meta:r};return{value:tt([(u=[],E(t.seriesGroupByCategoryAxis,function(t,e){for(var n=t.categoryAxis,i=t.valueAxis.dim,o=[" "].concat(I(t.series,function(t){return t.name})),a=[n.model.getCategories()],r=(E(t.series,function(t){a.push(t.getRawData().mapArray(i,function(t){return t}))}),[o.join(oM)]),s=0;s<a[0].length;s++){for(var l=[],h=0;h<a.length;h++)l.push(a[h][s]);r.push(l.join(oM))}u.push(r.join("\n"))}),u.join("\n\n"+iM+"\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+oM:"")+a.join(oM))}),o.join("\n")}).join("\n\n"+iM+"\n\n")],function(t){return t.replace(/[\n\t\s]/g,"")}).join("\n\n"+iM+"\n\n"),meta:t.meta}}function rM(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var sM=new RegExp("["+oM+"]+","g");function lM(t,o){var t=t.split(new RegExp("\n*"+iM+"\n*","g")),a={series:[]};return E(t,function(t,e){var n,i;0<=t.slice(0,t.indexOf("\n")).indexOf(oM)?(i=function(t){for(var e=t.split(/\n+/g),n=[],i=I(rM(e.shift()).split(sM),function(t){return{name:t,data:[]}}),o=0;o<e.length;o++){var a=rM(e[o]).split(sM);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),n=(e=o[e]).axisDim+"Axis",e&&(a[n]=a[n]||[],a[n][e.axisIndex]={data:i.categories},a.series=a.series.concat(i.series))):(i=function(t){for(var e=t.split(/\n+/g),t=rM(e.shift()),n=[],i=0;i<e.length;i++){for(var o,a=rM(e[i]).split(sM),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(i))}),a}function hM(t){this._dom=null,this.model=t}hM.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(ss.title),lang:N(ss.lang),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"},hM.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"),h=(s.style.cssText="display:block;width:100%;overflow:auto;",i.get("optionToContent")),u=i.get("contentToOption"),t=aM(t),c=("function"==typeof h?"string"==typeof(h=h(e.getOption()))?s.innerHTML=h:at(h)&&s.appendChild(h):(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),h=document.createElement("div"),t=(h.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}Di(d,"click",f),Di(p,"click",function(){var t;try{t="function"==typeof u?u(s,e.getOption()):lM(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")||h.appendChild(p),h.appendChild(d),Di(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)+oM+e.substring(i),this.selectionStart=this.selectionEnd=n+1,Ai(t))}),o.appendChild(a),o.appendChild(s),o.appendChild(h),s.style.height=n.clientHeight-80+"px",n.appendChild(o),this._dom=o},hM.prototype.remove=function(t,e){this._dom&&e.getDom().removeChild(this._dom)},hM.prototype.dispose=function(t,e){this.remove(t,e)},wS("dataView",hM),s({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(t,o){var a=[];E(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 T(e)&&!k(e)?C({value:t=T(t)&&!k(t)?t.value:t},e):t}))})):a.push(O({type:"scatter"},t))}),o.mergeOption(C({series:a},t.newOption))});var uM=E,cM="\0_ec_hist_store";function dM(t){return t[cM]||(t[cM]=[{}])}wu.extend({type:"dataZoom.select"}),c.extend({type:"dataZoom.select"});var l=Qh.toolbox.dataZoom,pM=E;function gM(t,e,n){(this._brushController=new Rv(n.getZr())).on("brush",D(this._onBrush,this)).mount(),this._isZoomActive}gM.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 u=gM.prototype,fM=(u.render=function(t,e,n,i){this.model=t,this.ecModel=e,this.api=n;var o=t,a=e,r=this,s=r._isZoomActive;i&&"takeGlobalCursor"===i.type&&(s="dataZoomSelect"===i.key&&i.dataZoomSelectActive),r._isZoomActive=s,o.setIconStatus("zoom",s?"emphasis":"normal"),i=new Jb(mM(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 dM(t).length}(e)?"emphasis":"normal")},u.onclick=function(t,e,n){fM[n].call(this)},u.remove=function(t,e){this._brushController.unmount()},u.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=dM(t),t=i[i.length-1],1<i.length&&i.pop(),o={},uM(t,function(t,e){for(var n=i.length-1;0<=n;n--)if(t=i[n][e]){o[e]=t;break}}),o))}});function mM(e){var n={};return E(["xAxisIndex","yAxisIndex"],function(t){n[t]=e[t],null==n[t]&&(n[t]="all"),!1!==n[t]&&"none"!==n[t]||(n[t]=[])}),n}u._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=cv(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 Jb(mM(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=dM(o=l),uM(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))},u._dispatchZoomAction=function(t){var n=[];pM(t,function(t,e){n.push(N(t))}),n.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:n})},wS("dataZoom",gM),pc(function(n){var r,t;function e(i,t){var o,a,e;t&&(null==(a=t[o=i+"Index"])||"all"==a||k(a)||(a=!1===a||"none"===a?[]:[a]),t=function(t,e){var n;null!=a&&"all"!=a&&-1===f(a,e)||((n={type:"select",$fromToolbox:!0,id:"\0_ec_\0toolbox-dataZoom_"+i+e})[o]=e,r.push(n))},k(e=n[e=i])||(e=e?[e]:[]),pM(e,t))}n&&(k(r=n.dataZoom||(n.dataZoom=[]))||(n.dataZoom=r=[r]),t=(t=n.toolbox)&&(k(t)?t[0]:t))&&t.feature&&(e("xAxis",t=t.feature.dataZoom),e("yAxis",t))});n=Qh.toolbox.restore;function yM(t){this.model=t}yM.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};yM.prototype.onclick=function(t,e,n){t[cM]=null,e.dispatchAction({type:"restore",from:this.uid})},wS("restore",yM),s({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")}),pc(function(t){var e=t.graphic;k(e)?e[0]&&e[0].elements?t.graphic=[t.graphic[0]]:t.graphic=[{elements:e}]:e&&!e.elements&&(t.graphic=[{elements:[e]}])});var vM=_c({type:"graphic",defaultOption:{elements:[],parentId:null},_elOptionsToUpdate:null,mergeOption:function(t){var e=this.option.elements;this.option.elements=null,vM.superApply(this,"mergeOption",arguments),this.option.elements=e},optionUpdated:function(t,e){var n=this.option,t=(e?n:t).elements,h=n.elements=e?[]:n.elements,e=[],n=(this._flatten(t,e),ao(h,e)),u=(ro(n),this._elOptionsToUpdate=[]);E(n,function(t,e){var n,i,o,a,r,s,l=t.option;A&&x(T(l)||t.exist,"Empty graphic option definition"),l&&(u.push(l),s=l,n=(t=t).exist,s.id=t.keyInfo.id,!s.type&&n&&(s.type=n.type),null==s.parentId&&((t=s.parentOption)?s.parentId=t.id:n&&(s.parentId=n.parentId)),s.parentOption=null,t=h,n=e,i=O({},s=l),o=t[n],"merge"===(a=s.$action||"merge")?o?(A&&x(!(r=s.type)||o.type===r,'Please set $action: "replace" to change `type`'),p(o,i,!0),Js(o,i,{ignoreSize:!0}),tl(s,o)):t[n]=i:"replace"===a?t[n]=i:"remove"===a&&o&&(t[n]=null),r=h[e],s=l,r)&&(r.hv=s.hv=[wM(s,["left","right"]),wM(s,["top","bottom"])],"group"===r.type)&&(null==r.width&&(r.width=s.width=0),null==r.height)&&(r.height=s.height=0)},this);for(var i=h.length-1;0<=i;i--)null==h[i]?h.splice(i,1):delete h[i].$action},_flatten:function(t,n,i){E(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 xM(t,e,n,i){var o=n.type,o=(A&&x(o,"graphic type MUST be set"),os[o.charAt(0).toUpperCase()+o.slice(1)]),o=(A&&x(o,"graphic type can not be found"),new o(n));e.add(o),i.set(t,o),o.__ecGraphicId=t}function _M(t,e){var n=t&&t.parent;n&&("group"===t.type&&t.traverse(function(t){_M(t,e)}),e.removeKey(t.__ecGraphicId),n.remove(t))}function wM(e,t){var n;return E(t,function(t){null!=e[t]&&"auto"!==e[t]&&(n=!0)}),n}wc({type:"graphic",init:function(t,e){this._elMap=P(),this._lastGraphicModel},render:function(t,e,n){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t,n),this._relocate(t,n)},_updateElements:function(t,e){var s,l,t=t.useElOptionsToUpdate();t&&(s=this._elMap,l=this.group,E(t,function(t){var e,n=t.$action,i=t.id,o=s.get(i),a=t.parentId,a=null!=a?s.get(a):l,r=("text"===t.type&&(r=t.style,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),E(["id","parentId","$action","hv","bounding"].concat(Xs),function(t){delete e[t]}),e),n=(A&&o&&x(a===o.parent,"Changing parent is not supported."),n&&"merge"!==n?"replace"===n?(_M(o,s),xM(i,a,r,s)):"remove"===n&&_M(o,s):o?o.attr(r):xM(i,a,r,s),s.get(i));n&&(n.__ecGraphicWidth=t.width,n.__ecGraphicHeight=t.height)}))},_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&&$s(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){_M(t,e)}),this._elMap=P()},dispose:function(){this._clear()}}),t.Axis=mp,t.List=Bc,t.Model=w,t.PRIORITY=Au,t.color=se,t.connect=function(e){var t;return k(e)&&(t=e,e=null,Su(t,function(t){null!=t.group&&(e=t.group)}),e=e||"g_"+sc++,Su(t,function(t){t.group=e})),ac[e]=!0,e},t.dataTool={},t.dependencies=Du,t.disConnect=uc,t.disconnect=o,t.dispose=function(t){"string"==typeof t?t=oc[t]:t instanceof Ou||(t=cc(t)),t instanceof Ou&&!t.isDisposed()&&t.dispose()},t.env=y,t.extendChartView=Sc,t.extendComponentModel=_c,t.extendComponentView=wc,t.extendSeriesModel=bc,t.format=Co,t.getCoordinateSystemDimensions=function(t){if(t=Ol.get(t))return t.getDimensionsInfo?t.getDimensionsInfo():t.dimensions.slice()},t.getInstanceByDom=cc,t.getInstanceById=function(t){return oc[t]},t.getMap=Mc,t.graphic=os,t.helper=e,t.init=function(t,e,n){if(A){if(+ji.replace(".","")<+Du.zrender.replace(".",""))throw new Error("zrender/src 4.0.4 is too old for ECharts 4.1.0. Current version need ZRender "+Du.zrender+"+");if(!t)throw new Error("Initialize failed: invalid dom.")}var i,o,a=cc(t);return a?A&&console.warn("There is a chart instance already initialized on the dom."):(!A||!at(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 Ou(t,e,n)).id="ec_"+rc++,oc[a.id]=a,fo(t,lc,a.id),i=a,o="__connectUpdateStatus",Su($u,function(t,e){i._messageCenter.on(e,function(t){var e,n;!ac[i.group]||0===i[o]||t&&t.escapeConnect||(e=i.makeActionFromEvent(t),n=[],Su(oc,function(t){t!==i&&t.group===i.group&&n.push(t)}),r(n,0),Su(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=ie,t.number=Do,t.parseGeoJSON=ap,t.parseGeoJson=jd,t.registerAction=s,t.registerCoordinateSystem=fc,t.registerLayout=mc,t.registerLoading=xc,t.registerMap=function(t,e,n){e.geoJson&&!e.features&&(n=e.specialAreas,e=e.geoJson),"string"==typeof e&&(e="undefined"!=typeof JSON&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")()),hc[t]={geoJson:e,specialAreas:n}},t.registerPostUpdate=function(t){tc.push(t)},t.registerPreprocessor=pc,t.registerProcessor=gc,t.registerTheme=dc,t.registerVisual=yc,t.setCanvasCreator=function(t){Y("createCanvas",t)},t.throttle=Kh,t.util=xp,t.vector=b,t.version="4.1.0",t.zrender=Je});