define(["gpui-style-inject","react","mobx"],(function(e,t,n){"use strict";e=e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e;var i="default"in t?t.default:t,a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};
/*! *****************************************************************************
    Copyright (c) Microsoft Corporation.

    Permission to use, copy, modify, and/or distribute this software for any
    purpose with or without fee is hereby granted.

    THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
    REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
    AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
    INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
    LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
    OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
    PERFORMANCE OF THIS SOFTWARE.
    ***************************************************************************** */function r(e,t,n,i){var a,r=arguments.length,o=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(o=(r<3?a(o):r>3?a(t,n,o):a(t,n))||o);return r>3&&o&&Object.defineProperty(t,n,o),o}function o(e,t,n,i){return new(n||(n=Promise))((function(a,r){function o(e){try{l(i.next(e))}catch(e){r(e)}}function s(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((i=i.apply(e,t||[])).next())}))}function s(e,t){var n,i,a,r,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(a=2&r[0]?i.return:r[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,r[1])).done)return a;switch(i=0,a&&(r=[2&r[0],a.value]),r[0]){case 0:case 1:a=r;break;case 4:return o.label++,{value:r[1],done:!1};case 5:o.label++,i=r[1],r=[0];continue;case 7:r=o.ops.pop(),o.trys.pop();continue;default:if(!(a=o.trys,(a=a.length>0&&a[a.length-1])||6!==r[0]&&2!==r[0])){o=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){o.label=r[1];break}if(6===r[0]&&o.label<a[1]){o.label=a[1],a=r;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(r);break}a[2]&&o.ops.pop(),o.trys.pop();continue}r=t.call(e,o)}catch(e){r=[6,e],i=0}finally{n=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,s])}}}function l(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var i=Array(e),a=0;for(t=0;t<n;t++)for(var r=arguments[t],o=0,s=r.length;o<s;o++,a++)i[a]=r[o];return i}e("html, body, #root {\n  width: 100%;\n  height: 100%;\n  margin: 0;\n  padding: 0;\n  overflow: hidden; }\n\n.g__index {\n  position: relative;\n  box-sizing: border-box;\n  width: 100%;\n  height: 100%; }\n");var u="index-module_main__19CDD",c="index-module_chart__2f8ve",h="index-module_summary__KGery",d="index-module_title__2Mgti",f="index-module_total__1UMaq";if(e(".index-module_main__19CDD {\n  position: relative;\n  width: 100%;\n  height: 100%; }\n  .index-module_main__19CDD .index-module_chart__2f8ve {\n    width: 100%;\n    height: 100%; }\n  .index-module_main__19CDD .index-module_summary__KGery {\n    position: absolute;\n    top: 50%;\n    left: 50%;\n    display: flex;\n    flex-direction: column;\n    justify-content: center;\n    align-items: center;\n    transform: translate(-50%, -50%); }\n    .index-module_main__19CDD .index-module_summary__KGery .index-module_title__2Mgti {\n      font-size: 4.8vh;\n      color: #cde0ff; }\n    .index-module_main__19CDD .index-module_summary__KGery .index-module_total__1UMaq {\n      font-size: 6vh;\n      font-weight: 600;\n      background-image: linear-gradient(to bottom, #0096ff 0%, #00d8ff 100%);\n      -webkit-text-fill-color: transparent;\n      -webkit-background-clip: text; }\n      .index-module_main__19CDD .index-module_summary__KGery .index-module_total__1UMaq > span {\n        padding-left: 1vh;\n        font-size: 3vh;\n        font-weight: 400; }\n"),!t.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!n.spy)throw new Error("mobx-react-lite requires mobx at least version 4 to be available");function p(){return(p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function g(){var e=t.useState(0)[1];return t.useCallback((function(){e((function(e){return e+1}))}),[])}function m(e){return n.getDependencyTree(e)}var v,y=1e4,_=new Set;function x(){void 0===v&&(v=setTimeout(b,1e4))}function b(){v=void 0;var e=Date.now();_.forEach((function(t){var n=t.current;n&&e>=n.cleanAt&&(n.reaction.dispose(),t.current=null,_.delete(t))})),_.size>0&&x()}var w={};function S(e){return"observer"+e}function M(e,t,a){void 0===t&&(t="observed"),void 0===a&&(a=w);var r,o=(a.useForceUpdate||g)(),s=i.useRef(null);if(!s.current){var l=new n.Reaction(S(t),(function(){u.mounted?o():(l.dispose(),s.current=null)})),u=function(e){return{cleanAt:Date.now()+y,reaction:e}}(l);s.current=u,r=s,_.add(r),x()}var c,h,d=s.current.reaction;if(i.useDebugValue(d,m),i.useEffect((function(){var e;return e=s,_.delete(e),s.current?s.current.mounted=!0:(s.current={reaction:new n.Reaction(S(t),(function(){o()})),cleanAt:1/0},o()),function(){s.current.reaction.dispose(),s.current=null}}),[]),d.track((function(){try{c=e()}catch(e){h=e}})),h)throw h;return c}function T(e,n){var i,a=p({forwardRef:!1},n),r=e.displayName||e.name,o=function(t,n){return M((function(){return e(t,n)}),r)};return o.displayName=r,i=a.forwardRef?t.memo(t.forwardRef(o)):t.memo(o),function(e,t){Object.keys(e).forEach((function(n){I[n]||Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}(e,i),i.displayName=r,i}var I={$$typeof:!0,render:!0,compare:!0,type:!0};function A(e){var t=e.children,n=e.render,i=t||n;return"function"!=typeof i?null:M(i)}function D(e,t,n,i,a){var r="children"===t?"render":"children",o="function"==typeof e[t],s="function"==typeof e[r];return o&&s?new Error("MobX Observer: Do not use children and render in the same time in`"+n):o||s?null:new Error("Invalid prop `"+a+"` of type `"+typeof e[t]+"` supplied to `"+n+"`, expected `function`.")}A.propTypes={children:D,render:D},A.displayName="Observer";var C=0;var O={};function k(e){return O[e]||(O[e]=function(e){if("function"==typeof Symbol)return Symbol(e);var t="__$mobx-react "+e+" ("+C+")";return C++,t}(e)),O[e]}function L(e,t){if(E(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(var a=0;a<n.length;a++)if(!Object.hasOwnProperty.call(t,n[a])||!E(e[n[a]],t[n[a]]))return!1;return!0}function E(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function N(e,t,n){Object.hasOwnProperty.call(e,t)?e[t]=n:Object.defineProperty(e,t,{enumerable:!1,configurable:!0,writable:!0,value:n})}var P=k("patchMixins"),R=k("patchedDefinition");function z(e,t){for(var n=this,i=arguments.length,a=new Array(i>2?i-2:0),r=2;r<i;r++)a[r-2]=arguments[r];t.locks++;try{var o;return null!=e&&(o=e.apply(this,a)),o}finally{t.locks--,0===t.locks&&t.methods.forEach((function(e){e.apply(n,a)}))}}function B(e,t){return function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];z.call.apply(z,[this,e,t].concat(i))}}function V(e,t,n){var i=function(e,t){var n=e[P]=e[P]||{},i=n[t]=n[t]||{};return i.locks=i.locks||0,i.methods=i.methods||[],i}(e,t);i.methods.indexOf(n)<0&&i.methods.push(n);var a=Object.getOwnPropertyDescriptor(e,t);if(!a||!a[R]){var r=e[t],o=function e(t,n,i,a,r){var o,s=B(r,a);return(o={})[R]=!0,o.get=function(){return s},o.set=function(r){if(this===t)s=B(r,a);else{var o=e(this,n,i,a,r);Object.defineProperty(this,n,o)}},o.configurable=!0,o.enumerable=i,o}(e,t,a?a.enumerable:void 0,i,r);Object.defineProperty(e,t,o)}}var H=n.$mobx||"$mobx",Y=k("isUnmounted"),F=k("skipRender"),G=k("isForcingUpdate");function W(e){var n=e.prototype;if(n.componentWillReact)throw new Error("The componentWillReact life-cycle event is no longer supported");if(e.__proto__!==t.PureComponent)if(n.shouldComponentUpdate){if(n.shouldComponentUpdate!==U)throw new Error("It is not allowed to use shouldComponentUpdate in observer based components.")}else n.shouldComponentUpdate=U;Z(n,"props"),Z(n,"state");var i=n.render;return n.render=function(){return j.call(this,i)},V(n,"componentWillUnmount",(function(){this.render[H]&&this.render[H].dispose(),this[Y]=!0})),e}function j(e){var i=this;N(this,F,!1),N(this,G,!1);var a,r=(a=this).displayName||a.name||a.constructor&&(a.constructor.displayName||a.constructor.name)||"<component>",o=e.bind(this),s=!1,l=new n.Reaction(r+".render()",(function(){if(!s&&(s=!0,!0!==i[Y])){var e=!0;try{N(i,G,!0),i[F]||t.Component.prototype.forceUpdate.call(i),e=!1}finally{N(i,G,!1),e&&l.dispose()}}}));function u(){s=!1;var e=void 0,t=void 0;if(l.track((function(){try{t=n._allowStateChanges(!1,o)}catch(t){e=t}})),e)throw e;return t}return l.reactComponent=this,u[H]=l,this.render=u,u.call(this)}function U(e,t){return this.state!==t||!L(this.props,e)}function Z(e,t){var i=k("reactProp_"+t+"_valueHolder"),a=k("reactProp_"+t+"_atomHolder");function r(){return this[a]||N(this,a,n.createAtom("reactive "+t)),this[a]}Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){var e=!1;return n._allowStateReadsStart&&n._allowStateReadsEnd&&(e=n._allowStateReadsStart(!0)),r.call(this).reportObserved(),n._allowStateReadsStart&&n._allowStateReadsEnd&&n._allowStateReadsEnd(e),this[i]},set:function(e){this[G]||L(this[i],e)?N(this,i,e):(N(this,i,e),N(this,F,!0),r.call(this).reportChanged(),N(this,F,!1))}})}var X="function"==typeof Symbol&&Symbol.for,q=X?Symbol.for("react.forward_ref"):"function"==typeof t.forwardRef&&t.forwardRef((function(e){return null})).$$typeof,K=X?Symbol.for("react.memo"):"function"==typeof t.memo&&t.memo((function(e){return null})).$$typeof;function Q(e){if(!0===e.isMobxInjector&&console.warn("Mobx observer: You are trying to use 'observer' on a component that already has 'inject'. Please apply 'observer' before applying 'inject'"),K&&e.$$typeof===K)throw new Error("Mobx observer: You are trying to use 'observer' on a function component wrapped in either another observer or 'React.memo'. The observer already applies 'React.memo' for you.");if(q&&e.$$typeof===q){var n=e.render;if("function"!=typeof n)throw new Error("render property of ForwardRef was not a function");return t.forwardRef((function(){var e=arguments;return t.createElement(A,null,(function(){return n.apply(void 0,e)}))}))}return"function"!=typeof e||e.prototype&&e.prototype.render||e.isReactClass||Object.prototype.isPrototypeOf.call(t.Component,e)?W(e):T(e)}if(!t.Component)throw new Error("mobx-react requires React to be available");if(!n.observable)throw new Error("mobx-react requires mobx to be available");"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function $(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return J(null==t&&n.path)}},n.exports),n.exports}function J(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var ee=2311;var te=function(){return ee++};var ne="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:"undefined"==typeof navigator?{browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:function(e){var t={},n=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge\/([\d.]+)/),r=/micromessenger/i.test(e);n&&(t.firefox=!0,t.version=n[1]);i&&(t.ie=!0,t.version=i[1]);a&&(t.edge=!0,t.version=a[1]);r&&(t.weChat=!0);return{browser:t,os:{},node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!t.ie&&!t.edge,pointerEventsSupported:"onpointerdown"in window&&(t.edge||t.ie&&t.version>=11),domSupported:"undefined"!=typeof document}}(navigator.userAgent),ie={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},ae={"[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},re=Object.prototype.toString,oe=Array.prototype,se=oe.forEach,le=oe.filter,ue=oe.slice,ce=oe.map,he=oe.reduce,de={};function fe(e){if(null==e||"object"!=typeof e)return e;var t=e,n=re.call(e);if("[object Array]"===n){if(!Me(e)){t=[];for(var i=0,a=e.length;i<a;i++)t[i]=fe(e[i])}}else if(ae[n]){if(!Me(e)){var r=e.constructor;if(e.constructor.from)t=r.from(e);else{t=new r(e.length);for(i=0,a=e.length;i<a;i++)t[i]=fe(e[i])}}}else if(!ie[n]&&!Me(e)&&!Se(e))for(var o in t={},e)e.hasOwnProperty(o)&&(t[o]=fe(e[o]));return t}function pe(e,t,n){if(!be(t)||!be(e))return n?fe(t):e;for(var i in t)if(t.hasOwnProperty(i)){var a=e[i],r=t[i];!be(r)||!be(a)||xe(r)||xe(a)||Se(r)||Se(a)||we(r)||we(a)||Me(r)||Me(a)?!n&&i in e||(e[i]=fe(t[i])):pe(a,r,n)}return e}function ge(e,t,n){for(var i in t)t.hasOwnProperty(i)&&(n?null!=t[i]:null==e[i])&&(e[i]=t[i]);return e}var me,ve=function(){return de.createCanvas()};function ye(e,t,n){if(e&&t)if(e.forEach&&e.forEach===se)e.forEach(t,n);else if(e.length===+e.length)for(var i=0,a=e.length;i<a;i++)t.call(n,e[i],i,e);else for(var r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e)}function _e(e,t){var n=ue.call(arguments,2);return function(){return e.apply(t,n.concat(ue.call(arguments)))}}function xe(e){return"[object Array]"===re.call(e)}function be(e){var t=typeof e;return"function"===t||!!e&&"object"===t}function we(e){return!!ie[re.call(e)]}function Se(e){return"object"==typeof e&&"number"==typeof e.nodeType&&"object"==typeof e.ownerDocument}de.createCanvas=function(){return document.createElement("canvas")};function Me(e){return e.__ec_primitive__}function Te(e){var t=xe(e);this.data={};var n=this;function i(e,i){t?n.set(e,i):n.set(i,e)}e instanceof Te?e.each(i):e&&ye(e,i)}Te.prototype={constructor:Te,get:function(e){return this.data.hasOwnProperty(e)?this.data[e]:null},set:function(e,t){return this.data[e]=t},each:function(e,t){for(var n in void 0!==t&&(e=_e(e,t)),this.data)this.data.hasOwnProperty(n)&&e(this.data[n],n)},removeKey:function(e){delete this.data[e]}};var Ie={$override:function(e,t){"createCanvas"===e&&(me=null),de[e]=t},clone:fe,merge:pe,mergeAll:function(e,t){for(var n=e[0],i=1,a=e.length;i<a;i++)n=pe(n,e[i],t);return n},extend:function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},defaults:ge,createCanvas:ve,getContext:function(){return me||(me=ve().getContext("2d")),me},indexOf:function(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var n=0,i=e.length;n<i;n++)if(e[n]===t)return n}return-1},inherits:function(e,t){var n=e.prototype;function i(){}for(var a in i.prototype=t.prototype,e.prototype=new i,n)n.hasOwnProperty(a)&&(e.prototype[a]=n[a]);e.prototype.constructor=e,e.superClass=t},mixin:function(e,t,n){ge(e="prototype"in e?e.prototype:e,t="prototype"in t?t.prototype:t,n)},isArrayLike:function(e){if(e)return"string"!=typeof e&&"number"==typeof e.length},each:ye,map:function(e,t,n){if(e&&t){if(e.map&&e.map===ce)return e.map(t,n);for(var i=[],a=0,r=e.length;a<r;a++)i.push(t.call(n,e[a],a,e));return i}},reduce:function(e,t,n,i){if(e&&t){if(e.reduce&&e.reduce===he)return e.reduce(t,n,i);for(var a=0,r=e.length;a<r;a++)n=t.call(i,n,e[a],a,e);return n}},filter:function(e,t,n){if(e&&t){if(e.filter&&e.filter===le)return e.filter(t,n);for(var i=[],a=0,r=e.length;a<r;a++)t.call(n,e[a],a,e)&&i.push(e[a]);return i}},find:function(e,t,n){if(e&&t)for(var i=0,a=e.length;i<a;i++)if(t.call(n,e[i],i,e))return e[i]},bind:_e,curry:function(e){var t=ue.call(arguments,1);return function(){return e.apply(this,t.concat(ue.call(arguments)))}},isArray:xe,isFunction:function(e){return"function"==typeof e},isString:function(e){return"[object String]"===re.call(e)},isObject:be,isBuiltInObject:we,isTypedArray:function(e){return!!ae[re.call(e)]},isDom:Se,eqNaN:function(e){return e!=e},retrieve:function(e){for(var t=0,n=arguments.length;t<n;t++)if(null!=arguments[t])return arguments[t]},retrieve2:function(e,t){return null!=e?e:t},retrieve3:function(e,t,n){return null!=e?e:null!=t?t:n},slice:function(){return Function.call.apply(ue,arguments)},normalizeCssArray:function(e){if("number"==typeof e)return[e,e,e,e];var t=e.length;return 2===t?[e[0],e[1],e[0],e[1]]:3===t?[e[0],e[1],e[2],e[1]]:e},assert:function(e,t){if(!e)throw new Error(t)},trim:function(e){return null==e?null:"function"==typeof e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},setAsPrimitive:function(e){e.__ec_primitive__=!0},isPrimitive:Me,createHashMap:function(e){return new Te(e)},concatArray:function(e,t){for(var n=new e.constructor(e.length+t.length),i=0;i<e.length;i++)n[i]=e[i];var a=e.length;for(i=0;i<t.length;i++)n[i+a]=t[i];return n},noop:function(){}},Ae="undefined"==typeof Float32Array?Array:Float32Array;function De(e){return Math.sqrt(Ce(e))}function Ce(e){return e[0]*e[0]+e[1]*e[1]}function Oe(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}function ke(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}var Le={create:function(e,t){var n=new Ae(2);return null==e&&(e=0),null==t&&(t=0),n[0]=e,n[1]=t,n},copy:function(e,t){return e[0]=t[0],e[1]=t[1],e},clone:function(e){var t=new Ae(2);return t[0]=e[0],t[1]=e[1],t},set:function(e,t,n){return e[0]=t,e[1]=n,e},add:function(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e},scaleAndAdd:function(e,t,n,i){return e[0]=t[0]+n[0]*i,e[1]=t[1]+n[1]*i,e},sub:function(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e},len:De,length:De,lenSquare:Ce,lengthSquare:Ce,mul:function(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e},div:function(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e},dot:function(e,t){return e[0]*t[0]+e[1]*t[1]},scale:function(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e},normalize:function(e,t){var n=De(t);return 0===n?(e[0]=0,e[1]=0):(e[0]=t[0]/n,e[1]=t[1]/n),e},distance:Oe,dist:Oe,distanceSquare:ke,distSquare:ke,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e},lerp:function(e,t,n,i){return e[0]=t[0]+i*(n[0]-t[0]),e[1]=t[1]+i*(n[1]-t[1]),e},applyTransform:function(e,t,n){var i=t[0],a=t[1];return e[0]=n[0]*i+n[2]*a+n[4],e[1]=n[1]*i+n[3]*a+n[5],e},min:function(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e},max:function(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}};function Ee(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this)}function Ne(e,t){return{target:e,topTarget:t&&t.topTarget}}Ee.prototype={constructor:Ee,_dragStart:function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.dispatchToElement(Ne(t,e),"dragstart",e.event))},_drag:function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,i=e.offsetY,a=n-this._x,r=i-this._y;this._x=n,this._y=i,t.drift(a,r,e),this.dispatchToElement(Ne(t,e),"drag",e.event);var o=this.findHover(n,i,t).target,s=this._dropTarget;this._dropTarget=o,t!==o&&(s&&o!==s&&this.dispatchToElement(Ne(s,e),"dragleave",e.event),o&&o!==s&&this.dispatchToElement(Ne(o,e),"dragenter",e.event))}},_dragEnd:function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.dispatchToElement(Ne(t,e),"dragend",e.event),this._dropTarget&&this.dispatchToElement(Ne(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null}};var Pe=Ee,Re=Array.prototype.slice,ze=function(e){this._$handlers={},this._$eventProcessor=e};function Be(e,t,n,i,a,r){var o=e._$handlers;if("function"==typeof n&&(a=i,i=n,n=null),!i||!t)return e;n=function(e,t){var n=e._$eventProcessor;return null!=t&&n&&n.normalizeQuery&&(t=n.normalizeQuery(t)),t}(e,n),o[t]||(o[t]=[]);for(var s=0;s<o[t].length;s++)if(o[t][s].h===i)return e;var l={h:i,one:r,query:n,ctx:a||e,callAtLast:i.zrEventfulCallAtLast},u=o[t].length-1,c=o[t][u];return c&&c.callAtLast?o[t].splice(u,0,l):o[t].push(l),e}ze.prototype={constructor:ze,one:function(e,t,n,i){return Be(this,e,t,n,i,!0)},on:function(e,t,n,i){return Be(this,e,t,n,i,!1)},isSilent:function(e){var t=this._$handlers;return!t[e]||!t[e].length},off:function(e,t){var n=this._$handlers;if(!e)return this._$handlers={},this;if(t){if(n[e]){for(var i=[],a=0,r=n[e].length;a<r;a++)n[e][a].h!==t&&i.push(n[e][a]);n[e]=i}n[e]&&0===n[e].length&&delete n[e]}else delete n[e];return this},trigger:function(e){var t=this._$handlers[e],n=this._$eventProcessor;if(t){var i=arguments,a=i.length;a>3&&(i=Re.call(i,1));for(var r=t.length,o=0;o<r;){var s=t[o];if(n&&n.filter&&null!=s.query&&!n.filter(e,s.query))o++;else{switch(a){case 1:s.h.call(s.ctx);break;case 2:s.h.call(s.ctx,i[1]);break;case 3:s.h.call(s.ctx,i[1],i[2]);break;default:s.h.apply(s.ctx,i)}s.one?(t.splice(o,1),r--):o++}}}return n&&n.afterTrigger&&n.afterTrigger(e),this},triggerWithContext:function(e){var t=this._$handlers[e],n=this._$eventProcessor;if(t){var i=arguments,a=i.length;a>4&&(i=Re.call(i,1,i.length-1));for(var r=i[i.length-1],o=t.length,s=0;s<o;){var l=t[s];if(n&&n.filter&&null!=l.query&&!n.filter(e,l.query))s++;else{switch(a){case 1:l.h.call(r);break;case 2:l.h.call(r,i[1]);break;case 3:l.h.call(r,i[1],i[2]);break;default:l.h.apply(r,i)}l.one?(t.splice(s,1),o--):s++}}}return n&&n.afterTrigger&&n.afterTrigger(e),this}};var Ve=ze,He=Math.log(2);function Ye(e,t,n,i,a,r){var o=i+"-"+a,s=e.length;if(r.hasOwnProperty(o))return r[o];if(1===t){var l=Math.round(Math.log((1<<s)-1&~a)/He);return e[n][l]}for(var u=i|1<<n,c=n+1;i&1<<c;)c++;for(var h=0,d=0,f=0;d<s;d++){var p=1<<d;p&a||(h+=(f%2?-1:1)*e[n][d]*Ye(e,t-1,c,u,a|p,r),f++)}return r[o]=h,h}var Fe={buildTransformer:function(e,t){var n=[[e[0],e[1],1,0,0,0,-t[0]*e[0],-t[0]*e[1]],[0,0,0,e[0],e[1],1,-t[1]*e[0],-t[1]*e[1]],[e[2],e[3],1,0,0,0,-t[2]*e[2],-t[2]*e[3]],[0,0,0,e[2],e[3],1,-t[3]*e[2],-t[3]*e[3]],[e[4],e[5],1,0,0,0,-t[4]*e[4],-t[4]*e[5]],[0,0,0,e[4],e[5],1,-t[5]*e[4],-t[5]*e[5]],[e[6],e[7],1,0,0,0,-t[6]*e[6],-t[6]*e[7]],[0,0,0,e[6],e[7],1,-t[7]*e[6],-t[7]*e[7]]],i={},a=Ye(n,8,0,0,0,i);if(0!==a){for(var r=[],o=0;o<8;o++)for(var s=0;s<8;s++)null==r[s]&&(r[s]=0),r[s]+=((o+s)%2?-1:1)*Ye(n,7,0===o?1:0,1<<o,1<<s,i)/a*t[o];return function(e,t,n){var i=t*r[6]+n*r[7]+1;e[0]=(t*r[0]+n*r[1]+r[2])/i,e[1]=(t*r[3]+n*r[4]+r[5])/i}}}}.buildTransformer,Ge=[];function We(e,t,n,i,a){if(t.getBoundingClientRect&&ne.domSupported&&!je(t)){var r=t.___zrEVENTSAVED||(t.___zrEVENTSAVED={}),o=function(e,t,n){for(var i=n?"invTrans":"trans",a=t[i],r=t.srcCoords,o=!0,s=[],l=[],u=0;u<4;u++){var c=e[u].getBoundingClientRect(),h=2*u,d=c.left,f=c.top;s.push(d,f),o=o&&r&&d===r[h]&&f===r[h+1],l.push(e[u].offsetLeft,e[u].offsetTop)}return o&&a?a:(t.srcCoords=s,t[i]=n?Fe(l,s):Fe(s,l))}(function(e,t){var n=t.markers;if(n)return n;n=t.markers=[];for(var i=["left","right"],a=["top","bottom"],r=0;r<4;r++){var o=document.createElement("div"),s=o.style,l=r%2,u=(r>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[l]+":0",a[u]+":0",i[1-l]+":auto",a[1-u]+":auto",""].join("!important;"),e.appendChild(o),n.push(o)}return n}(t,r),r,a);if(o)return o(e,n,i),!0}return!1}function je(e){return"CANVAS"===e.nodeName.toUpperCase()}var Ue={transformLocalCoord:function(e,t,n,i,a){return We(Ge,t,i,a,!0)&&We(e,n,Ge[0],Ge[1])},transformCoordWithViewport:We,isCanvasEl:je},Ze=Ve,Xe=Ue.isCanvasEl,qe=Ue.transformCoordWithViewport,Ke="undefined"!=typeof window&&!!window.addEventListener,Qe=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,$e=[];function Je(e,t,n,i){return n=n||{},i||!ne.canvasSupported?et(e,t,n):ne.browser.firefox&&null!=t.layerX&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):null!=t.offsetX?(n.zrX=t.offsetX,n.zrY=t.offsetY):et(e,t,n),n}function et(e,t,n){if(ne.domSupported&&e.getBoundingClientRect){var i=t.clientX,a=t.clientY;if(Xe(e)){var r=e.getBoundingClientRect();return n.zrX=i-r.left,void(n.zrY=a-r.top)}if(qe($e,e,i,a))return n.zrX=$e[0],void(n.zrY=$e[1])}n.zrX=n.zrY=0}function tt(e){return e||window.event}var nt={Dispatcher:Ze,clientToLocal:Je,getNativeEvent:tt,normalizeEvent:function(e,t,n){if(null!=(t=tt(t)).zrX)return t;var i=t.type;if(i&&i.indexOf("touch")>=0){var a="touchend"!==i?t.targetTouches[0]:t.changedTouches[0];a&&Je(e,a,t,n)}else Je(e,t,t,n),t.zrDelta=t.wheelDelta?t.wheelDelta/120:-(t.detail||0)/3;var r=t.button;return null==t.which&&void 0!==r&&Qe.test(t.type)&&(t.which=1&r?1:2&r?3:4&r?2:0),t},addEventListener:function(e,t,n,i){Ke?e.addEventListener(t,n,i):e.attachEvent("on"+t,n)},removeEventListener:function(e,t,n,i){Ke?e.removeEventListener(t,n,i):e.detachEvent("on"+t,n)},stop:Ke?function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0}:function(e){e.returnValue=!1,e.cancelBubble=!0},isMiddleOrRightButtonOnMouseUpDown:function(e){return 2===e.which||3===e.which},notLeftMouse:function(e){return e.which>1}},it=function(){this._track=[]};function at(e){var t=e[1][0]-e[0][0],n=e[1][1]-e[0][1];return Math.sqrt(t*t+n*n)}it.prototype={constructor:it,recognize:function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},clear:function(){return this._track.length=0,this},_doTrack:function(e,t,n){var i=e.touches;if(i){for(var a={points:[],touches:[],target:t,event:e},r=0,o=i.length;r<o;r++){var s=i[r],l=nt.clientToLocal(n,s,{});a.points.push([l.zrX,l.zrY]),a.touches.push(s)}this._track.push(a)}},_recognize:function(e){for(var t in rt)if(rt.hasOwnProperty(t)){var n=rt[t](this._track,e);if(n)return n}}};var rt={pinch:function(e,t){var n=e.length;if(n){var i,a=(e[n-1]||{}).points,r=(e[n-2]||{}).points||a;if(r&&r.length>1&&a&&a.length>1){var o=at(a)/at(r);!isFinite(o)&&(o=1),t.pinchScale=o;var s=[((i=a)[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2];return t.pinchX=s[0],t.pinchY=s[1],{type:"pinch",target:e[0].target,event:t}}}}},ot=it;function st(){nt.stop(this.event)}function lt(){}lt.prototype.dispose=function(){};var ut=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],ct=function(e,t,n,i){Ve.call(this),this.storage=e,this.painter=t,this.painterRoot=i,n=n||new lt,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,Pe.call(this),this.setHandlerProxy(n)};function ht(e,t,n){if(e[e.rectHover?"rectContain":"contain"](t,n)){for(var i,a=e;a;){if(a.clipPath&&!a.clipPath.contain(t,n))return!1;a.silent&&(i=!0),a=a.parent}return!i||"silent"}return!1}function dt(e,t,n){var i=e.painter;return t<0||t>i.getWidth()||n<0||n>i.getHeight()}ct.prototype={constructor:ct,setHandlerProxy:function(e){this.proxy&&this.proxy.dispose(),e&&(Ie.each(ut,(function(t){e.on&&e.on(t,this[t],this)}),this),e.handler=this),this.proxy=e},mousemove:function(e){var t=e.zrX,n=e.zrY,i=dt(this,t,n),a=this._hovered,r=a.target;r&&!r.__zr&&(r=(a=this.findHover(a.x,a.y)).target);var o=this._hovered=i?{x:t,y:n}:this.findHover(t,n),s=o.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),r&&s!==r&&this.dispatchToElement(a,"mouseout",e),this.dispatchToElement(o,"mousemove",e),s&&s!==r&&this.dispatchToElement(o,"mouseover",e)},mouseout:function(e){var t=e.zrEventControl,n=e.zrIsToLocalDOM;"only_globalout"!==t&&this.dispatchToElement(this._hovered,"mouseout",e),"no_globalout"!==t&&!n&&this.trigger("globalout",{type:"globalout",event:e})},resize:function(e){this._hovered={}},dispatch:function(e,t){var n=this[e];n&&n.call(this,t)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},dispatchToElement:function(e,t,n){var i=(e=e||{}).target;if(!i||!i.silent){for(var a="on"+t,r=function(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:st}}(t,e,n);i&&(i[a]&&(r.cancelBubble=i[a].call(i,r)),i.trigger(t,r),i=i.parent,!r.cancelBubble););r.cancelBubble||(this.trigger(t,r),this.painter&&this.painter.eachOtherLayer((function(e){"function"==typeof e[a]&&e[a].call(e,r),e.trigger&&e.trigger(t,r)})))}},findHover:function(e,t,n){for(var i=this.storage.getDisplayList(),a={x:e,y:t},r=i.length-1;r>=0;r--){var o;if(i[r]!==n&&!i[r].ignore&&(o=ht(i[r],e,t))&&(!a.topTarget&&(a.topTarget=i[r]),"silent"!==o)){a.target=i[r];break}}return a},processGesture:function(e,t){this._gestureMgr||(this._gestureMgr=new ot);var n=this._gestureMgr;"start"===t&&n.clear();var i=n.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if("end"===t&&n.clear(),i){var a=i.type;e.gestureEvent=a,this.dispatchToElement({target:i.target},a,i.event)}}},Ie.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(e){ct.prototype[e]=function(t){var n,i,a=t.zrX,r=t.zrY,o=dt(this,a,r);if("mouseup"===e&&o||(i=(n=this.findHover(a,r)).target),"mousedown"===e)this._downEl=i,this._downPoint=[t.zrX,t.zrY],this._upEl=i;else if("mouseup"===e)this._upEl=i;else if("click"===e){if(this._downEl!==this._upEl||!this._downPoint||Le.dist(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,e,t)}})),Ie.mixin(ct,Ve),Ie.mixin(ct,Pe);var ft=ct,pt="undefined"==typeof Float32Array?Array:Float32Array;function gt(){var e=new pt(6);return mt(e),e}function mt(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function vt(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}var yt={create:gt,identity:mt,copy:vt,mul:function(e,t,n){var i=t[0]*n[0]+t[2]*n[1],a=t[1]*n[0]+t[3]*n[1],r=t[0]*n[2]+t[2]*n[3],o=t[1]*n[2]+t[3]*n[3],s=t[0]*n[4]+t[2]*n[5]+t[4],l=t[1]*n[4]+t[3]*n[5]+t[5];return e[0]=i,e[1]=a,e[2]=r,e[3]=o,e[4]=s,e[5]=l,e},translate:function(e,t,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+n[0],e[5]=t[5]+n[1],e},rotate:function(e,t,n){var i=t[0],a=t[2],r=t[4],o=t[1],s=t[3],l=t[5],u=Math.sin(n),c=Math.cos(n);return e[0]=i*c+o*u,e[1]=-i*u+o*c,e[2]=a*c+s*u,e[3]=-a*u+c*s,e[4]=c*r+u*l,e[5]=c*l-u*r,e},scale:function(e,t,n){var i=n[0],a=n[1];return e[0]=t[0]*i,e[1]=t[1]*a,e[2]=t[2]*i,e[3]=t[3]*a,e[4]=t[4]*i,e[5]=t[5]*a,e},invert:function(e,t){var n=t[0],i=t[2],a=t[4],r=t[1],o=t[3],s=t[5],l=n*o-r*i;return l?(l=1/l,e[0]=o*l,e[1]=-r*l,e[2]=-i*l,e[3]=n*l,e[4]=(i*s-o*a)*l,e[5]=(r*a-n*s)*l,e):null},clone:function(e){var t=gt();return vt(t,e),t}},_t=yt.identity;function xt(e){return e>5e-5||e<-5e-5}var bt=function(e){(e=e||{}).position||(this.position=[0,0]),null==e.rotation&&(this.rotation=0),e.scale||(this.scale=[1,1]),this.origin=this.origin||null},wt=bt.prototype;wt.transform=null,wt.needLocalTransform=function(){return xt(this.rotation)||xt(this.position[0])||xt(this.position[1])||xt(this.scale[0]-1)||xt(this.scale[1]-1)};var St=[];wt.updateTransform=function(){var e=this.parent,t=e&&e.transform,n=this.needLocalTransform(),i=this.transform;if(n||t){i=i||yt.create(),n?this.getLocalTransform(i):_t(i),t&&(n?yt.mul(i,e.transform,i):yt.copy(i,e.transform)),this.transform=i;var a=this.globalScaleRatio;if(null!=a&&1!==a){this.getGlobalScale(St);var r=St[0]<0?-1:1,o=St[1]<0?-1:1,s=((St[0]-r)*a+r)/St[0]||0,l=((St[1]-o)*a+o)/St[1]||0;i[0]*=s,i[1]*=s,i[2]*=l,i[3]*=l}this.invTransform=this.invTransform||yt.create(),yt.invert(this.invTransform,i)}else i&&_t(i)},wt.getLocalTransform=function(e){return bt.getLocalTransform(this,e)},wt.setTransform=function(e){var t=this.transform,n=e.dpr||1;t?e.setTransform(n*t[0],n*t[1],n*t[2],n*t[3],n*t[4],n*t[5]):e.setTransform(n,0,0,n,0,0)},wt.restoreTransform=function(e){var t=e.dpr||1;e.setTransform(t,0,0,t,0,0)};var Mt=[],Tt=yt.create();wt.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],i=this.position,a=this.scale;xt(t-1)&&(t=Math.sqrt(t)),xt(n-1)&&(n=Math.sqrt(n)),e[0]<0&&(t=-t),e[3]<0&&(n=-n),i[0]=e[4],i[1]=e[5],a[0]=t,a[1]=n,this.rotation=Math.atan2(-e[1]/n,e[0]/t)}},wt.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(yt.mul(Mt,e.invTransform,t),t=Mt);var n=this.origin;n&&(n[0]||n[1])&&(Tt[4]=n[0],Tt[5]=n[1],yt.mul(Mt,t,Tt),Mt[4]-=n[0],Mt[5]-=n[1],t=Mt),this.setLocalTransform(t)}},wt.getGlobalScale=function(e){var t=this.transform;return e=e||[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},wt.transformCoordToLocal=function(e,t){var n=[e,t],i=this.invTransform;return i&&Le.applyTransform(n,n,i),n},wt.transformCoordToGlobal=function(e,t){var n=[e,t],i=this.transform;return i&&Le.applyTransform(n,n,i),n},bt.getLocalTransform=function(e,t){_t(t=t||[]);var n=e.origin,i=e.scale||[1,1],a=e.rotation||0,r=e.position||[0,0];return n&&(t[4]-=n[0],t[5]-=n[1]),yt.scale(t,t,i),a&&yt.rotate(t,t,a),n&&(t[4]+=n[0],t[5]+=n[1]),t[4]+=r[0],t[5]+=r[1],t};var It=bt,At={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return.5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return 0===e?0:Math.pow(1024,e-1)},exponentialOut:function(e){return 1===e?1:1-Math.pow(2,-10*e)},exponentialInOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(2-Math.pow(2,-10*(e-1)))},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1;return 0===e?0:1===e?1:(!n||n<1?(n=1,t=.1):t=.4*Math.asin(1/n)/(2*Math.PI),-n*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/.4))},elasticOut:function(e){var t,n=.1;return 0===e?0:1===e?1:(!n||n<1?(n=1,t=.1):t=.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/.4)+1)},elasticInOut:function(e){var t,n=.1,i=.4;return 0===e?0:1===e?1:(!n||n<1?(n=1,t=.1):t=i*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?n*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/i)*-.5:n*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/i)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-At.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?.5*At.bounceIn(2*e):.5*At.bounceOut(2*e-1)+.5}},Dt=At;function Ct(e){this._target=e.target,this._life=e.life||1e3,this._delay=e.delay||0,this._initialized=!1,this.loop=null!=e.loop&&e.loop,this.gap=e.gap||0,this.easing=e.easing||"Linear",this.onframe=e.onframe,this.ondestroy=e.ondestroy,this.onrestart=e.onrestart,this._pausedTime=0,this._paused=!1}Ct.prototype={constructor:Ct,step:function(e,t){if(this._initialized||(this._startTime=e+this._delay,this._initialized=!0),this._paused)this._pausedTime+=t;else{var n=(e-this._startTime-this._pausedTime)/this._life;if(!(n<0)){n=Math.min(n,1);var i=this.easing,a="string"==typeof i?Dt[i]:i,r="function"==typeof a?a(n):n;return this.fire("frame",r),1===n?this.loop?(this.restart(e),"restart"):(this._needsRemove=!0,"destroy"):null}}},restart:function(e){var t=(e-this._startTime-this._pausedTime)%this._life;this._startTime=e-t+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(e,t){this[e="on"+e]&&this[e](this._target,t)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var Ot=Ct,kt=function(){this.head=null,this.tail=null,this._len=0},Lt=kt.prototype;Lt.insert=function(e){var t=new Et(e);return this.insertEntry(t),t},Lt.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},Lt.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},Lt.len=function(){return this._len},Lt.clear=function(){this.head=this.tail=null,this._len=0};var Et=function(e){this.value=e,this.next,this.prev},Nt=function(e){this._list=new kt,this._map={},this._maxSize=e||10,this._lastRemovedEntry=null},Pt=Nt.prototype;Pt.put=function(e,t){var n=this._list,i=this._map,a=null;if(null==i[e]){var r=n.len(),o=this._lastRemovedEntry;if(r>=this._maxSize&&r>0){var s=n.head;n.remove(s),delete i[s.key],a=s.value,this._lastRemovedEntry=s}o?o.value=t:o=new Et(t),o.key=e,n.insertEntry(o),i[e]=o}return a},Pt.get=function(e){var t=this._map[e],n=this._list;if(null!=t)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},Pt.clear=function(){this._list.clear(),this._map={}};var Rt=Nt,zt={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 Bt(e){return(e=Math.round(e))<0?0:e>255?255:e}function Vt(e){return e<0?0:e>1?1:e}function Ht(e){return e.length&&"%"===e.charAt(e.length-1)?Bt(parseFloat(e)/100*255):Bt(parseInt(e,10))}function Yt(e){return e.length&&"%"===e.charAt(e.length-1)?Vt(parseFloat(e)/100):Vt(parseFloat(e))}function Ft(e,t,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?e+(t-e)*n*6:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}function Gt(e,t,n){return e+(t-e)*n}function Wt(e,t,n,i,a){return e[0]=t,e[1]=n,e[2]=i,e[3]=a,e}function jt(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var Ut=new Rt(20),Zt=null;function Xt(e,t){Zt&&jt(Zt,t),Zt=Ut.put(e,Zt||t.slice())}function qt(e,t){if(e){t=t||[];var n=Ut.get(e);if(n)return jt(t,n);var i,a=(e+="").replace(/ /g,"").toLowerCase();if(a in zt)return jt(t,zt[a]),Xt(e,t),t;if("#"===a.charAt(0))return 4===a.length?(i=parseInt(a.substr(1),16))>=0&&i<=4095?(Wt(t,(3840&i)>>4|(3840&i)>>8,240&i|(240&i)>>4,15&i|(15&i)<<4,1),Xt(e,t),t):void Wt(t,0,0,0,1):7===a.length?(i=parseInt(a.substr(1),16))>=0&&i<=16777215?(Wt(t,(16711680&i)>>16,(65280&i)>>8,255&i,1),Xt(e,t),t):void Wt(t,0,0,0,1):void 0;var r=a.indexOf("("),o=a.indexOf(")");if(-1!==r&&o+1===a.length){var s=a.substr(0,r),l=a.substr(r+1,o-(r+1)).split(","),u=1;switch(s){case"rgba":if(4!==l.length)return void Wt(t,0,0,0,1);u=Yt(l.pop());case"rgb":return 3!==l.length?void Wt(t,0,0,0,1):(Wt(t,Ht(l[0]),Ht(l[1]),Ht(l[2]),u),Xt(e,t),t);case"hsla":return 4!==l.length?void Wt(t,0,0,0,1):(l[3]=Yt(l[3]),Kt(l,t),Xt(e,t),t);case"hsl":return 3!==l.length?void Wt(t,0,0,0,1):(Kt(l,t),Xt(e,t),t);default:return}}Wt(t,0,0,0,1)}}function Kt(e,t){var n=(parseFloat(e[0])%360+360)%360/360,i=Yt(e[1]),a=Yt(e[2]),r=a<=.5?a*(i+1):a+i-a*i,o=2*a-r;return Wt(t=t||[],Bt(255*Ft(o,r,n+1/3)),Bt(255*Ft(o,r,n)),Bt(255*Ft(o,r,n-1/3)),1),4===e.length&&(t[3]=e[3]),t}function Qt(e,t,n){if(t&&t.length&&e>=0&&e<=1){n=n||[];var i=e*(t.length-1),a=Math.floor(i),r=Math.ceil(i),o=t[a],s=t[r],l=i-a;return n[0]=Bt(Gt(o[0],s[0],l)),n[1]=Bt(Gt(o[1],s[1],l)),n[2]=Bt(Gt(o[2],s[2],l)),n[3]=Vt(Gt(o[3],s[3],l)),n}}function $t(e,t,n){if(t&&t.length&&e>=0&&e<=1){var i=e*(t.length-1),a=Math.floor(i),r=Math.ceil(i),o=qt(t[a]),s=qt(t[r]),l=i-a,u=Jt([Bt(Gt(o[0],s[0],l)),Bt(Gt(o[1],s[1],l)),Bt(Gt(o[2],s[2],l)),Vt(Gt(o[3],s[3],l))],"rgba");return n?{color:u,leftIndex:a,rightIndex:r,value:i}:u}}function Jt(e,t){if(e&&e.length){var n=e[0]+","+e[1]+","+e[2];return"rgba"!==t&&"hsva"!==t&&"hsla"!==t||(n+=","+e[3]),t+"("+n+")"}}var en={parse:qt,lift:function(e,t){var n=qt(e);if(n){for(var i=0;i<3;i++)n[i]=t<0?n[i]*(1-t)|0:(255-n[i])*t+n[i]|0,n[i]>255?n[i]=255:e[i]<0&&(n[i]=0);return Jt(n,4===n.length?"rgba":"rgb")}},toHex:function(e){var t=qt(e);if(t)return((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)},fastLerp:Qt,fastMapToColor:Qt,lerp:$t,mapToColor:$t,modifyHSL:function(e,t,n,i){if(e=qt(e))return e=function(e){if(e){var t,n,i=e[0]/255,a=e[1]/255,r=e[2]/255,o=Math.min(i,a,r),s=Math.max(i,a,r),l=s-o,u=(s+o)/2;if(0===l)t=0,n=0;else{n=u<.5?l/(s+o):l/(2-s-o);var c=((s-i)/6+l/2)/l,h=((s-a)/6+l/2)/l,d=((s-r)/6+l/2)/l;i===s?t=d-h:a===s?t=1/3+c-d:r===s&&(t=2/3+h-c),t<0&&(t+=1),t>1&&(t-=1)}var f=[360*t,n,u];return null!=e[3]&&f.push(e[3]),f}}(e),null!=t&&(e[0]=function(e){return(e=Math.round(e))<0?0:e>360?360:e}(t)),null!=n&&(e[1]=Yt(n)),null!=i&&(e[2]=Yt(i)),Jt(Kt(e),"rgba")},modifyAlpha:function(e,t){if((e=qt(e))&&null!=t)return e[3]=Vt(t),Jt(e,"rgba")},stringify:Jt},tn=Ie.isArrayLike,nn=Array.prototype.slice;function an(e,t){return e[t]}function rn(e,t,n){e[t]=n}function on(e,t,n){return(t-e)*n+e}function sn(e,t,n){return n>.5?t:e}function ln(e,t,n,i,a){var r=e.length;if(1===a)for(var o=0;o<r;o++)i[o]=on(e[o],t[o],n);else{var s=r&&e[0].length;for(o=0;o<r;o++)for(var l=0;l<s;l++)i[o][l]=on(e[o][l],t[o][l],n)}}function un(e,t,n){var i=e.length,a=t.length;if(i!==a)if(i>a)e.length=a;else for(var r=i;r<a;r++)e.push(1===n?t[r]:nn.call(t[r]));var o=e[0]&&e[0].length;for(r=0;r<e.length;r++)if(1===n)isNaN(e[r])&&(e[r]=t[r]);else for(var s=0;s<o;s++)isNaN(e[r][s])&&(e[r][s]=t[r][s])}function cn(e,t,n){if(e===t)return!0;var i=e.length;if(i!==t.length)return!1;if(1===n){for(var a=0;a<i;a++)if(e[a]!==t[a])return!1}else{var r=e[0].length;for(a=0;a<i;a++)for(var o=0;o<r;o++)if(e[a][o]!==t[a][o])return!1}return!0}function hn(e,t,n,i,a,r,o,s,l){var u=e.length;if(1===l)for(var c=0;c<u;c++)s[c]=dn(e[c],t[c],n[c],i[c],a,r,o);else{var h=e[0].length;for(c=0;c<u;c++)for(var d=0;d<h;d++)s[c][d]=dn(e[c][d],t[c][d],n[c][d],i[c][d],a,r,o)}}function dn(e,t,n,i,a,r,o){var s=.5*(n-e),l=.5*(i-t);return(2*(t-n)+s+l)*o+(-3*(t-n)-2*s-l)*r+s*a+t}function fn(e){if(tn(e)){var t=e.length;if(tn(e[0])){for(var n=[],i=0;i<t;i++)n.push(nn.call(e[i]));return n}return nn.call(e)}return e}function pn(e){return e[0]=Math.floor(e[0]),e[1]=Math.floor(e[1]),e[2]=Math.floor(e[2]),"rgba("+e.join(",")+")"}function gn(e,t,n,i,a,r){var o=e._getter,s=e._setter,l="spline"===t,u=i.length;if(u){var c,h=i[0].value,d=tn(h),f=!1,p=!1,g=d?function(e){var t=e[e.length-1].value;return tn(t&&t[0])?2:1}(i):0;i.sort((function(e,t){return e.time-t.time})),c=i[u-1].time;for(var m=[],v=[],y=i[0].value,_=!0,x=0;x<u;x++){m.push(i[x].time/c);var b=i[x].value;if(d&&cn(b,y,g)||!d&&b===y||(_=!1),y=b,"string"==typeof b){var w=en.parse(b);w?(b=w,f=!0):p=!0}v.push(b)}if(r||!_){var S=v[u-1];for(x=0;x<u-1;x++)d?un(v[x],S,g):!isNaN(v[x])||isNaN(S)||p||f||(v[x]=S);d&&un(o(e._target,a),S,g);var M,T,I,A,D,C=0,O=0;if(f)var k=[0,0,0,0];var L=new Ot({target:e._target,life:c,loop:e._loop,delay:e._delay,onframe:function(e,t){var n;if(t<0)n=0;else if(t<O){for(n=Math.min(C+1,u-1);n>=0&&!(m[n]<=t);n--);n=Math.min(n,u-2)}else{for(n=C;n<u&&!(m[n]>t);n++);n=Math.min(n-1,u-2)}C=n,O=t;var i=m[n+1]-m[n];if(0!==i)if(M=(t-m[n])/i,l)if(I=v[n],T=v[0===n?n:n-1],A=v[n>u-2?u-1:n+1],D=v[n>u-3?u-1:n+2],d)hn(T,I,A,D,M,M*M,M*M*M,o(e,a),g);else{if(f)r=hn(T,I,A,D,M,M*M,M*M*M,k,1),r=pn(k);else{if(p)return sn(I,A,M);r=dn(T,I,A,D,M,M*M,M*M*M)}s(e,a,r)}else if(d)ln(v[n],v[n+1],M,o(e,a),g);else{var r;if(f)ln(v[n],v[n+1],M,k,1),r=pn(k);else{if(p)return sn(v[n],v[n+1],M);r=on(v[n],v[n+1],M)}s(e,a,r)}},ondestroy:n});return t&&"spline"!==t&&(L.easing=t),L}}}var mn=function(e,t,n,i){this._tracks={},this._target=e,this._loop=t||!1,this._getter=n||an,this._setter=i||rn,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};mn.prototype={when:function(e,t){var n=this._tracks;for(var i in t)if(t.hasOwnProperty(i)){if(!n[i]){n[i]=[];var a=this._getter(this._target,i);if(null==a)continue;0!==e&&n[i].push({time:0,value:fn(a)})}n[i].push({time:e,value:t[i]})}return this},during:function(e){return this._onframeList.push(e),this},pause:function(){for(var e=0;e<this._clipList.length;e++)this._clipList[e].pause();this._paused=!0},resume:function(){for(var e=0;e<this._clipList.length;e++)this._clipList[e].resume();this._paused=!1},isPaused:function(){return!!this._paused},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var e=this._doneList,t=e.length,n=0;n<t;n++)e[n].call(this)},start:function(e,t){var n,i=this,a=0,r=function(){--a||i._doneCallback()};for(var o in this._tracks)if(this._tracks.hasOwnProperty(o)){var s=gn(this,e,r,this._tracks[o],o,t);s&&(this._clipList.push(s),a++,this.animation&&this.animation.addClip(s),n=s)}if(n){var l=n.onframe;n.onframe=function(e,t){l(e,t);for(var n=0;n<i._onframeList.length;n++)i._onframeList[n](e,t)}}return a||this._doneCallback(),this},stop:function(e){for(var t=this._clipList,n=this.animation,i=0;i<t.length;i++){var a=t[i];e&&a.onframe(this._target,1),n&&n.removeClip(a)}t.length=0},delay:function(e){return this._delay=e,this},done:function(e){return e&&this._doneList.push(e),this},getClips:function(){return this._clipList}};var vn=mn,yn=1;"undefined"!=typeof window&&(yn=Math.max(window.devicePixelRatio||1,1));var _n={debugMode:0,devicePixelRatio:yn},xn=function(){},bn=Ie.isString,wn=Ie.isFunction,Sn=Ie.isObject,Mn=Ie.isArrayLike,Tn=Ie.indexOf,In=function(){this.animators=[]};function An(e,t,n,i,a,r,o,s){bn(i)?(r=a,a=i,i=0):wn(a)?(r=a,a="linear",i=0):wn(i)?(r=i,i=0):wn(n)?(r=n,n=500):n||(n=500),e.stopAnimation(),function e(t,n,i,a,r,o,s){var l={},u=0;for(var c in a)a.hasOwnProperty(c)&&(null!=i[c]?Sn(a[c])&&!Mn(a[c])?e(t,n?n+"."+c:c,i[c],a[c],r,o,s):(s?(l[c]=i[c],Dn(t,n,c,a[c])):l[c]=a[c],u++):null==a[c]||s||Dn(t,n,c,a[c]));u>0&&t.animate(n,!1).when(null==r?500:r,l).delay(o||0)}(e,"",e,t,n,i,s);var l=e.animators.slice(),u=l.length;function c(){--u||r&&r()}u||r&&r();for(var h=0;h<l.length;h++)l[h].done(c).start(a,o)}function Dn(e,t,n,i){if(t){var a={};a[t]={},a[t][n]=i,e.attr(a)}else e.attr(n,i)}In.prototype={constructor:In,animate:function(e,t){var n,i=!1,a=this,r=this.__zr;if(e){var o=e.split("."),s=a;i="shape"===o[0];for(var l=0,u=o.length;l<u;l++)s&&(s=s[o[l]]);s&&(n=s)}else n=a;if(n){var c=a.animators,h=new vn(n,t);return h.during((function(e){a.dirty(i)})).done((function(){c.splice(Tn(c,h),1)})),c.push(h),r&&r.animation.addAnimator(h),h}xn('Property "'+e+'" is not existed in element '+a.id)},stopAnimation:function(e){for(var t=this.animators,n=t.length,i=0;i<n;i++)t[i].stop(e);return t.length=0,this},animateTo:function(e,t,n,i,a,r){An(this,e,t,n,i,a,r)},animateFrom:function(e,t,n,i,a,r){An(this,e,t,n,i,a,r,!0)}};var Cn=In,On=function(e){It.call(this,e),Ve.call(this,e),Cn.call(this,e),this.id=e.id||te()};On.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(e,t){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0}var n=this.transform;n||(n=this.transform=[1,0,0,1,0,0]),n[4]+=e,n[5]+=t,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(e,t){},attrKV:function(e,t){if("position"===e||"scale"===e||"origin"===e){if(t){var n=this[e];n||(n=this[e]=[]),n[0]=t[0],n[1]=t[1]}}else this[e]=t},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(e,t){if("string"==typeof e)this.attrKV(e,t);else if(Ie.isObject(e))for(var n in e)e.hasOwnProperty(n)&&this.attrKV(n,e[n]);return this.dirty(!1),this},setClipPath:function(e){var t=this.__zr;t&&e.addSelfToZr(t),this.clipPath&&this.clipPath!==e&&this.removeClipPath(),this.clipPath=e,e.__zr=t,e.__clipTarget=this,this.dirty(!1)},removeClipPath:function(){var e=this.clipPath;e&&(e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(e){this.__zr=e;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.addAnimator(t[n]);this.clipPath&&this.clipPath.addSelfToZr(e)},removeSelfFromZr:function(e){this.__zr=null;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.removeAnimator(t[n]);this.clipPath&&this.clipPath.removeSelfFromZr(e)}},Ie.mixin(On,Cn),Ie.mixin(On,It),Ie.mixin(On,Ve);var kn,Ln,En,Nn,Pn=On,Rn=Le.applyTransform,zn=Math.min,Bn=Math.max;function Vn(e,t,n,i){n<0&&(e+=n,n=-n),i<0&&(t+=i,i=-i),this.x=e,this.y=t,this.width=n,this.height=i}Vn.prototype={constructor:Vn,union:function(e){var t=zn(e.x,this.x),n=zn(e.y,this.y);this.width=Bn(e.x+e.width,this.x+this.width)-t,this.height=Bn(e.y+e.height,this.y+this.height)-n,this.x=t,this.y=n},applyTransform:(kn=[],Ln=[],En=[],Nn=[],function(e){if(e){kn[0]=En[0]=this.x,kn[1]=Nn[1]=this.y,Ln[0]=Nn[0]=this.x+this.width,Ln[1]=En[1]=this.y+this.height,Rn(kn,kn,e),Rn(Ln,Ln,e),Rn(En,En,e),Rn(Nn,Nn,e),this.x=zn(kn[0],Ln[0],En[0],Nn[0]),this.y=zn(kn[1],Ln[1],En[1],Nn[1]);var t=Bn(kn[0],Ln[0],En[0],Nn[0]),n=Bn(kn[1],Ln[1],En[1],Nn[1]);this.width=t-this.x,this.height=n-this.y}}),calculateTransform:function(e){var t=this,n=e.width/t.width,i=e.height/t.height,a=yt.create();return yt.translate(a,a,[-t.x,-t.y]),yt.scale(a,a,[n,i]),yt.translate(a,a,[e.x,e.y]),a},intersect:function(e){if(!e)return!1;e instanceof Vn||(e=Vn.create(e));var t=this,n=t.x,i=t.x+t.width,a=t.y,r=t.y+t.height,o=e.x,s=e.x+e.width,l=e.y,u=e.y+e.height;return!(i<o||s<n||r<l||u<a)},contain:function(e,t){return e>=this.x&&e<=this.x+this.width&&t>=this.y&&t<=this.y+this.height},clone:function(){return new Vn(this.x,this.y,this.width,this.height)},copy:function(e){this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},Vn.create=function(e){return new Vn(e.x,e.y,e.width,e.height)};var Hn=Vn,Yn=function(e){for(var t in e=e||{},Pn.call(this,e),e)e.hasOwnProperty(t)&&(this[t]=e[t]);this._children=[],this.__storage=null,this.__dirty=!0};Yn.prototype={constructor:Yn,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(e){return this._children[e]},childOfName:function(e){for(var t=this._children,n=0;n<t.length;n++)if(t[n].name===e)return t[n]},childCount:function(){return this._children.length},add:function(e){return e&&e!==this&&e.parent!==this&&(this._children.push(e),this._doAdd(e)),this},addBefore:function(e,t){if(e&&e!==this&&e.parent!==this&&t&&t.parent===this){var n=this._children,i=n.indexOf(t);i>=0&&(n.splice(i,0,e),this._doAdd(e))}return this},_doAdd:function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__storage,n=this.__zr;t&&t!==e.__storage&&(t.addToStorage(e),e instanceof Yn&&e.addChildrenToStorage(t)),n&&n.refresh()},remove:function(e){var t=this.__zr,n=this.__storage,i=this._children,a=Ie.indexOf(i,e);return a<0||(i.splice(a,1),e.parent=null,n&&(n.delFromStorage(e),e instanceof Yn&&e.delChildrenFromStorage(n)),t&&t.refresh()),this},removeAll:function(){var e,t,n=this._children,i=this.__storage;for(t=0;t<n.length;t++)e=n[t],i&&(i.delFromStorage(e),e instanceof Yn&&e.delChildrenFromStorage(i)),e.parent=null;return n.length=0,this},eachChild:function(e,t){for(var n=this._children,i=0;i<n.length;i++){var a=n[i];e.call(t,a,i)}return this},traverse:function(e,t){for(var n=0;n<this._children.length;n++){var i=this._children[n];e.call(t,i),"group"===i.type&&i.traverse(e,t)}return this},addChildrenToStorage:function(e){for(var t=0;t<this._children.length;t++){var n=this._children[t];e.addToStorage(n),n instanceof Yn&&n.addChildrenToStorage(e)}},delChildrenFromStorage:function(e){for(var t=0;t<this._children.length;t++){var n=this._children[t];e.delFromStorage(n),n instanceof Yn&&n.delChildrenFromStorage(e)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(e){for(var t=null,n=new Hn(0,0,0,0),i=e||this._children,a=[],r=0;r<i.length;r++){var o=i[r];if(!o.ignore&&!o.invisible){var s=o.getBoundingRect(),l=o.getLocalTransform(a);l?(n.copy(s),n.applyTransform(l),(t=t||n.clone()).union(n)):(t=t||s.clone()).union(s)}}return t||n}},Ie.inherits(Yn,Pn);var Fn=Yn;function Gn(e,t,n,i){var a=t+1;if(a===n)return 1;if(i(e[a++],e[t])<0){for(;a<n&&i(e[a],e[a-1])<0;)a++;!function(e,t,n){n--;for(;t<n;){var i=e[t];e[t++]=e[n],e[n--]=i}}(e,t,a)}else for(;a<n&&i(e[a],e[a-1])>=0;)a++;return a-t}function Wn(e,t,n,i,a){for(i===t&&i++;i<n;i++){for(var r,o=e[i],s=t,l=i;s<l;)a(o,e[r=s+l>>>1])<0?l=r:s=r+1;var u=i-s;switch(u){case 3:e[s+3]=e[s+2];case 2:e[s+2]=e[s+1];case 1:e[s+1]=e[s];break;default:for(;u>0;)e[s+u]=e[s+u-1],u--}e[s]=o}}function jn(e,t,n,i,a,r){var o=0,s=0,l=1;if(r(e,t[n+a])>0){for(s=i-a;l<s&&r(e,t[n+a+l])>0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),o+=a,l+=a}else{for(s=a+1;l<s&&r(e,t[n+a-l])<=0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var u=o;o=a-l,l=a-u}for(o++;o<l;){var c=o+(l-o>>>1);r(e,t[n+c])>0?o=c+1:l=c}return l}function Un(e,t,n,i,a,r){var o=0,s=0,l=1;if(r(e,t[n+a])<0){for(s=a+1;l<s&&r(e,t[n+a-l])<0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var u=o;o=a-l,l=a-u}else{for(s=i-a;l<s&&r(e,t[n+a+l])>=0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),o+=a,l+=a}for(o++;o<l;){var c=o+(l-o>>>1);r(e,t[n+c])<0?l=c:o=c+1}return l}function Zn(e,t){var n,i,a=7,r=0;e.length;var o=[];function s(s){var l=n[s],u=i[s],c=n[s+1],h=i[s+1];i[s]=u+h,s===r-3&&(n[s+1]=n[s+2],i[s+1]=i[s+2]),r--;var d=Un(e[c],e,l,u,0,t);l+=d,0!==(u-=d)&&0!==(h=jn(e[l+u-1],e,c,h,h-1,t))&&(u<=h?function(n,i,r,s){var l=0;for(l=0;l<i;l++)o[l]=e[n+l];var u=0,c=r,h=n;if(e[h++]=e[c++],0==--s){for(l=0;l<i;l++)e[h+l]=o[u+l];return}if(1===i){for(l=0;l<s;l++)e[h+l]=e[c+l];return void(e[h+s]=o[u])}var d,f,p,g=a;for(;;){d=0,f=0,p=!1;do{if(t(e[c],o[u])<0){if(e[h++]=e[c++],f++,d=0,0==--s){p=!0;break}}else if(e[h++]=o[u++],d++,f=0,1==--i){p=!0;break}}while((d|f)<g);if(p)break;do{if(0!==(d=Un(e[c],o,u,i,0,t))){for(l=0;l<d;l++)e[h+l]=o[u+l];if(h+=d,u+=d,(i-=d)<=1){p=!0;break}}if(e[h++]=e[c++],0==--s){p=!0;break}if(0!==(f=jn(o[u],e,c,s,0,t))){for(l=0;l<f;l++)e[h+l]=e[c+l];if(h+=f,c+=f,0===(s-=f)){p=!0;break}}if(e[h++]=o[u++],1==--i){p=!0;break}g--}while(d>=7||f>=7);if(p)break;g<0&&(g=0),g+=2}if((a=g)<1&&(a=1),1===i){for(l=0;l<s;l++)e[h+l]=e[c+l];e[h+s]=o[u]}else{if(0===i)throw new Error;for(l=0;l<i;l++)e[h+l]=o[u+l]}}(l,u,c,h):function(n,i,r,s){var l=0;for(l=0;l<s;l++)o[l]=e[r+l];var u=n+i-1,c=s-1,h=r+s-1,d=0,f=0;if(e[h--]=e[u--],0==--i){for(d=h-(s-1),l=0;l<s;l++)e[d+l]=o[l];return}if(1===s){for(f=(h-=i)+1,d=(u-=i)+1,l=i-1;l>=0;l--)e[f+l]=e[d+l];return void(e[h]=o[c])}var p=a;for(;;){var g=0,m=0,v=!1;do{if(t(o[c],e[u])<0){if(e[h--]=e[u--],g++,m=0,0==--i){v=!0;break}}else if(e[h--]=o[c--],m++,g=0,1==--s){v=!0;break}}while((g|m)<p);if(v)break;do{if(0!==(g=i-Un(o[c],e,n,i,i-1,t))){for(i-=g,f=(h-=g)+1,d=(u-=g)+1,l=g-1;l>=0;l--)e[f+l]=e[d+l];if(0===i){v=!0;break}}if(e[h--]=o[c--],1==--s){v=!0;break}if(0!==(m=s-jn(e[u],o,0,s,s-1,t))){for(s-=m,f=(h-=m)+1,d=(c-=m)+1,l=0;l<m;l++)e[f+l]=o[d+l];if(s<=1){v=!0;break}}if(e[h--]=e[u--],0==--i){v=!0;break}p--}while(g>=7||m>=7);if(v)break;p<0&&(p=0),p+=2}(a=p)<1&&(a=1);if(1===s){for(f=(h-=i)+1,d=(u-=i)+1,l=i-1;l>=0;l--)e[f+l]=e[d+l];e[h]=o[c]}else{if(0===s)throw new Error;for(d=h-(s-1),l=0;l<s;l++)e[d+l]=o[l]}}(l,u,c,h))}n=[],i=[],this.mergeRuns=function(){for(;r>1;){var e=r-2;if(e>=1&&i[e-1]<=i[e]+i[e+1]||e>=2&&i[e-2]<=i[e]+i[e-1])i[e-1]<i[e+1]&&e--;else if(i[e]>i[e+1])break;s(e)}},this.forceMergeRuns=function(){for(;r>1;){var e=r-2;e>0&&i[e-1]<i[e+1]&&e--,s(e)}},this.pushRun=function(e,t){n[r]=e,i[r]=t,r+=1}}var Xn=function(e,t,n,i){n||(n=0),i||(i=e.length);var a=i-n;if(!(a<2)){var r=0;if(a<32)Wn(e,n,i,n+(r=Gn(e,n,i,t)),t);else{var o=new Zn(e,t),s=function(e){for(var t=0;e>=32;)t|=1&e,e>>=1;return e+t}(a);do{if((r=Gn(e,n,i,t))<s){var l=a;l>s&&(l=s),Wn(e,n,n+l,n+r,t),r=l}o.pushRun(n,r),o.mergeRuns(),a-=r,n+=r}while(0!==a);o.forceMergeRuns()}}};function qn(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var Kn=function(){this._roots=[],this._displayList=[],this._displayListLen=0};Kn.prototype={constructor:Kn,traverse:function(e,t){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(e,t)},getDisplayList:function(e,t){return t=t||!1,e&&this.updateDisplayList(t),this._displayList},updateDisplayList:function(e){this._displayListLen=0;for(var t=this._roots,n=this._displayList,i=0,a=t.length;i<a;i++)this._updateAndAddDisplayable(t[i],null,e);n.length=this._displayListLen,ne.canvasSupported&&Xn(n,qn)},_updateAndAddDisplayable:function(e,t,n){if(!e.ignore||n){e.beforeUpdate(),e.__dirty&&e.update(),e.afterUpdate();var i=e.clipPath;if(i){t=t?t.slice():[];for(var a=i,r=e;a;)a.parent=r,a.updateTransform(),t.push(a),r=a,a=a.clipPath}if(e.isGroup){for(var o=e._children,s=0;s<o.length;s++){var l=o[s];e.__dirty&&(l.__dirty=!0),this._updateAndAddDisplayable(l,t,n)}e.__dirty=!1}else e.__clipPaths=t,this._displayList[this._displayListLen++]=e}},addRoot:function(e){e.__storage!==this&&(e instanceof Fn&&e.addChildrenToStorage(this),this.addToStorage(e),this._roots.push(e))},delRoot:function(e){if(null==e){for(var t=0;t<this._roots.length;t++){var n=this._roots[t];n instanceof Fn&&n.delChildrenFromStorage(this)}return this._roots=[],this._displayList=[],void(this._displayListLen=0)}if(e instanceof Array){t=0;for(var i=e.length;t<i;t++)this.delRoot(e[t])}else{var a=Ie.indexOf(this._roots,e);a>=0&&(this.delFromStorage(e),this._roots.splice(a,1),e instanceof Fn&&e.delChildrenFromStorage(this))}},addToStorage:function(e){return e&&(e.__storage=this,e.dirty(!1)),this},delFromStorage:function(e){return e&&(e.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:qn};var Qn=Kn,$n={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1};var Jn=function(e,t,n){return $n.hasOwnProperty(t)?n*e.dpr:n},ei={ContextCachedBy:{NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},WILL_BE_RESTORED:9},ti=ei.ContextCachedBy,ni=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],ii=function(e){this.extendFrom(e,!1)};function ai(e,t,n){var i=null==t.x?0:t.x,a=null==t.x2?1:t.x2,r=null==t.y?0:t.y,o=null==t.y2?0:t.y2;return t.global||(i=i*n.width+n.x,a=a*n.width+n.x,r=r*n.height+n.y,o=o*n.height+n.y),i=isNaN(i)?0:i,a=isNaN(a)?1:a,r=isNaN(r)?0:r,o=isNaN(o)?0:o,e.createLinearGradient(i,r,a,o)}function ri(e,t,n){var i=n.width,a=n.height,r=Math.min(i,a),o=null==t.x?.5:t.x,s=null==t.y?.5:t.y,l=null==t.r?.5:t.r;return t.global||(o=o*i+n.x,s=s*a+n.y,l*=r),e.createRadialGradient(o,s,0,o,s,l)}for(var oi=ii.prototype={constructor:ii,fill:"#000",stroke:null,opacity:1,fillOpacity:null,strokeOpacity:null,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,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(e,t,n){var i=n&&n.style,a=!i||e.__attrCachedBy!==ti.STYLE_BIND;e.__attrCachedBy=ti.STYLE_BIND;for(var r=0;r<ni.length;r++){var o=ni[r],s=o[0];(a||this[s]!==i[s])&&(e[s]=Jn(e,s,this[s]||o[1]))}if((a||this.fill!==i.fill)&&(e.fillStyle=this.fill),(a||this.stroke!==i.stroke)&&(e.strokeStyle=this.stroke),(a||this.opacity!==i.opacity)&&(e.globalAlpha=null==this.opacity?1:this.opacity),(a||this.blend!==i.blend)&&(e.globalCompositeOperation=this.blend||"source-over"),this.hasStroke()){var l=this.lineWidth;e.lineWidth=l/(this.strokeNoScale&&t&&t.getLineScale?t.getLineScale():1)}},hasFill:function(){var e=this.fill;return null!=e&&"none"!==e},hasStroke:function(){var e=this.stroke;return null!=e&&"none"!==e&&this.lineWidth>0},extendFrom:function(e,t){if(e)for(var n in e)!e.hasOwnProperty(n)||!0!==t&&(!1===t?this.hasOwnProperty(n):null==e[n])||(this[n]=e[n])},set:function(e,t){"string"==typeof e?this[e]=t:this.extendFrom(e,!0)},clone:function(){var e=new this.constructor;return e.extendFrom(this,!0),e},getGradient:function(e,t,n){for(var i=("radial"===t.type?ri:ai)(e,t,n),a=t.colorStops,r=0;r<a.length;r++)i.addColorStop(a[r].offset,a[r].color);return i}},si=0;si<ni.length;si++){var li=ni[si];li[0]in oi||(oi[li[0]]=li[1])}ii.getGradient=oi.getGradient;var ui=ii,ci=function(e,t){this.image=e,this.repeat=t,this.type="pattern"};ci.prototype.getCanvasPattern=function(e){return e.createPattern(this.image,this.repeat||"repeat")};var hi=ci,di=_n.devicePixelRatio;function fi(){return!1}function pi(e,t,n){var i=Ie.createCanvas(),a=t.getWidth(),r=t.getHeight(),o=i.style;return o&&(o.position="absolute",o.left=0,o.top=0,o.width=a+"px",o.height=r+"px",i.setAttribute("data-zr-dom-id",e)),i.width=a*n,i.height=r*n,i}var gi=function(e,t,n){var i;n=n||di,"string"==typeof e?i=pi(e,t,n):Ie.isObject(e)&&(e=(i=e).id),this.id=e,this.dom=i;var a=i.style;a&&(i.onselectstart=fi,a["-webkit-user-select"]="none",a["user-select"]="none",a["-webkit-touch-callout"]="none",a["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",a.padding=0,a.margin=0,a["border-width"]=0),this.domBack=null,this.ctxBack=null,this.painter=t,this.config=null,this.clearColor=0,this.motionBlur=!1,this.lastFrameAlpha=.7,this.dpr=n};gi.prototype={constructor:gi,__dirty:!0,__used:!1,__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 e=this.dpr;this.domBack=pi("back-"+this.id,this.painter,e),this.ctxBack=this.domBack.getContext("2d"),1!==e&&this.ctxBack.scale(e,e)},resize:function(e,t){var n=this.dpr,i=this.dom,a=i.style,r=this.domBack;a&&(a.width=e+"px",a.height=t+"px"),i.width=e*n,i.height=t*n,r&&(r.width=e*n,r.height=t*n,1!==n&&this.ctxBack.scale(n,n))},clear:function(e,t){var n,i=this.dom,a=this.ctx,r=i.width,o=i.height,s=(t=t||this.clearColor,this.motionBlur&&!e),l=this.lastFrameAlpha,u=this.dpr;(s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(i,0,0,r/u,o/u)),a.clearRect(0,0,r,o),t&&"transparent"!==t)&&(t.colorStops?(n=t.__canvasGradient||ui.getGradient(a,t,{x:0,y:0,width:r,height:o}),t.__canvasGradient=n):t.image&&(n=hi.prototype.getCanvasPattern.call(t,a)),a.save(),a.fillStyle=n||t,a.fillRect(0,0,r,o),a.restore());if(s){var c=this.domBack;a.save(),a.globalAlpha=l,a.drawImage(c,0,0,r,o),a.restore()}}};var mi=gi,vi="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){setTimeout(e,16)},yi=new Rt(50);function _i(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<e.pending.length;t++){var n=e.pending[t],i=n.cb;i&&i(this,n.cbPayload),n.hostEl.dirty()}e.pending.length=0}function xi(e){return e&&e.width&&e.height}var bi={findExistImage:function(e){if("string"==typeof e){var t=yi.get(e);return t&&t.image}return e},createOrUpdateImage:function(e,t,n,i,a){if(e){if("string"==typeof e){if(t&&t.__zrImageSrc===e||!n)return t;var r=yi.get(e),o={hostEl:n,cb:i,cbPayload:a};return r?!xi(t=r.image)&&r.pending.push(o):((t=new Image).onload=t.onerror=_i,yi.put(e,t.__cachedImgObj={image:t,pending:[o]}),t.src=t.__zrImageSrc=e),t}return e}return t},isImageReady:xi},wi=Ie.getContext,Si=Ie.extend,Mi=Ie.retrieve2,Ti=Ie.retrieve3,Ii=Ie.trim,Ai={},Di=0,Ci=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,Oi={};function ki(e,t){var n=e+":"+(t=t||"12px sans-serif");if(Ai[n])return Ai[n];for(var i=(e+"").split("\n"),a=0,r=0,o=i.length;r<o;r++)a=Math.max(Hi(i[r],t).width,a);return Di>5e3&&(Di=0,Ai={}),Di++,Ai[n]=a,a}function Li(e,t,n){return"right"===n?e-=t:"center"===n&&(e-=t/2),e}function Ei(e,t,n){return"middle"===n?e-=t/2:"bottom"===n&&(e-=t),e}function Ni(e,t,n){var i=t.textPosition,a=t.textDistance,r=n.x,o=n.y;a=a||0;var s=n.height,l=n.width,u=s/2,c="left",h="top";switch(i){case"left":r-=a,o+=u,c="right",h="middle";break;case"right":r+=a+l,o+=u,h="middle";break;case"top":r+=l/2,o-=a,c="center",h="bottom";break;case"bottom":r+=l/2,o+=s+a,c="center";break;case"inside":r+=l/2,o+=u,c="center",h="middle";break;case"insideLeft":r+=a,o+=u,h="middle";break;case"insideRight":r+=l-a,o+=u,c="right",h="middle";break;case"insideTop":r+=l/2,o+=a,c="center";break;case"insideBottom":r+=l/2,o+=s-a,c="center",h="bottom";break;case"insideTopLeft":r+=a,o+=a;break;case"insideTopRight":r+=l-a,o+=a,c="right";break;case"insideBottomLeft":r+=a,o+=s-a,h="bottom";break;case"insideBottomRight":r+=l-a,o+=s-a,c="right",h="bottom"}return(e=e||{}).x=r,e.y=o,e.textAlign=c,e.textVerticalAlign=h,e}function Pi(e,t,n,i,a){if(!t)return"";var r=(e+"").split("\n");a=Ri(t,n,i,a);for(var o=0,s=r.length;o<s;o++)r[o]=zi(r[o],a);return r.join("\n")}function Ri(e,t,n,i){(i=Si({},i)).font=t;n=Mi(n,"...");i.maxIterations=Mi(i.maxIterations,2);var a=i.minChar=Mi(i.minChar,0);i.cnCharWidth=ki("国",t);var r=i.ascCharWidth=ki("a",t);i.placeholder=Mi(i.placeholder,"");for(var o=e=Math.max(0,e-1),s=0;s<a&&o>=r;s++)o-=r;var l=ki(n,t);return l>o&&(n="",l=0),o=e-l,i.ellipsis=n,i.ellipsisWidth=l,i.contentWidth=o,i.containerWidth=e,i}function zi(e,t){var n=t.containerWidth,i=t.font,a=t.contentWidth;if(!n)return"";var r=ki(e,i);if(r<=n)return e;for(var o=0;;o++){if(r<=a||o>=t.maxIterations){e+=t.ellipsis;break}var s=0===o?Bi(e,a,t.ascCharWidth,t.cnCharWidth):r>0?Math.floor(e.length*a/r):0;r=ki(e=e.substr(0,s),i)}return""===e&&(e=t.placeholder),e}function Bi(e,t,n,i){for(var a=0,r=0,o=e.length;r<o&&a<t;r++){var s=e.charCodeAt(r);a+=0<=s&&s<=127?n:i}return r}function Vi(e){return ki("国",e)}function Hi(e,t){return Oi.measureText(e,t)}function Yi(e,t,n,i,a){null!=e&&(e+="");var r=Mi(i,Vi(t)),o=e?e.split("\n"):[],s=o.length*r,l=s,u=!0;if(n&&(l+=n[0]+n[2]),e&&a){u=!1;var c=a.outerHeight,h=a.outerWidth;if(null!=c&&l>c)e="",o=[];else if(null!=h)for(var d=Ri(h-(n?n[1]+n[3]:0),t,a.ellipsis,{minChar:a.minChar,placeholder:a.placeholder}),f=0,p=o.length;f<p;f++)o[f]=zi(o[f],d)}return{lines:o,height:s,outerHeight:l,lineHeight:r,canCacheByTextString:u}}function Fi(e,t){var n={lines:[],width:0,height:0};if(null!=e&&(e+=""),!e)return n;for(var i,a=Ci.lastIndex=0;null!=(i=Ci.exec(e));){var r=i.index;r>a&&Gi(n,e.substring(a,r)),Gi(n,i[2],i[1]),a=Ci.lastIndex}a<e.length&&Gi(n,e.substring(a,e.length));var o=n.lines,s=0,l=0,u=[],c=t.textPadding,h=t.truncate,d=h&&h.outerWidth,f=h&&h.outerHeight;c&&(null!=d&&(d-=c[1]+c[3]),null!=f&&(f-=c[0]+c[2]));for(var p=0;p<o.length;p++){for(var g=o[p],m=0,v=0,y=0;y<g.tokens.length;y++){var _=(C=g.tokens[y]).styleName&&t.rich[C.styleName]||{},x=C.textPadding=_.textPadding,b=C.font=_.font||t.font,w=C.textHeight=Mi(_.textHeight,Vi(b));if(x&&(w+=x[0]+x[2]),C.height=w,C.lineHeight=Ti(_.textLineHeight,t.textLineHeight,w),C.textAlign=_&&_.textAlign||t.textAlign,C.textVerticalAlign=_&&_.textVerticalAlign||"middle",null!=f&&s+C.lineHeight>f)return{lines:[],width:0,height:0};C.textWidth=ki(C.text,b);var S=_.textWidth,M=null==S||"auto"===S;if("string"==typeof S&&"%"===S.charAt(S.length-1))C.percentWidth=S,u.push(C),S=0;else{if(M){S=C.textWidth;var T=_.textBackgroundColor,I=T&&T.image;I&&(I=bi.findExistImage(I),bi.isImageReady(I)&&(S=Math.max(S,I.width*w/I.height)))}var A=x?x[1]+x[3]:0;S+=A;var D=null!=d?d-v:null;null!=D&&D<S&&(!M||D<A?(C.text="",C.textWidth=S=0):(C.text=Pi(C.text,D-A,b,h.ellipsis,{minChar:h.minChar}),C.textWidth=ki(C.text,b),S=C.textWidth+A))}v+=C.width=S,_&&(m=Math.max(m,C.lineHeight))}g.width=v,g.lineHeight=m,s+=m,l=Math.max(l,v)}n.outerWidth=n.width=Mi(t.textWidth,l),n.outerHeight=n.height=Mi(t.textHeight,s),c&&(n.outerWidth+=c[1]+c[3],n.outerHeight+=c[0]+c[2]);for(p=0;p<u.length;p++){var C,O=(C=u[p]).percentWidth;C.width=parseInt(O,10)/100*l}return n}function Gi(e,t,n){for(var i=""===t,a=t.split("\n"),r=e.lines,o=0;o<a.length;o++){var s=a[o],l={styleName:n,text:s,isLineHolder:!s&&!i};if(o)r.push({tokens:[l]});else{var u=(r[r.length-1]||(r[0]={tokens:[]})).tokens,c=u.length;1===c&&u[0].isLineHolder?u[0]=l:(s||!c||i)&&u.push(l)}}}Oi.measureText=function(e,t){var n=wi();return n.font=t||"12px sans-serif",n.measureText(e)};var Wi={DEFAULT_FONT:"12px sans-serif",$override:function(e,t){Oi[e]=t},getWidth:ki,getBoundingRect:function(e,t,n,i,a,r,o,s){return o?function(e,t,n,i,a,r,o,s){var l=Fi(e,{rich:o,truncate:s,font:t,textAlign:n,textPadding:a,textLineHeight:r}),u=l.outerWidth,c=l.outerHeight,h=Li(0,u,n),d=Ei(0,c,i);return new Hn(h,d,u,c)}(e,t,n,i,a,r,o,s):function(e,t,n,i,a,r,o){var s=Yi(e,t,a,r,o),l=ki(e,t);a&&(l+=a[1]+a[3]);var u=s.outerHeight,c=Li(0,l,n),h=Ei(0,u,i),d=new Hn(c,h,l,u);return d.lineHeight=s.lineHeight,d}(e,t,n,i,a,r,s)},adjustTextX:Li,adjustTextY:Ei,calculateTextPosition:Ni,adjustTextPositionOnRect:function(e,t,n){return Ni({},{textPosition:e,textDistance:n},t)},truncateText:Pi,getLineHeight:Vi,measureText:Hi,parsePlainText:Yi,parseRichText:Fi,makeFont:function(e){var t=(e.fontSize||e.fontFamily)&&[e.fontStyle,e.fontWeight,(e.fontSize||12)+"px",e.fontFamily||"sans-serif"].join(" ");return t&&Ii(t)||e.textFont||e.font}};var ji={buildPath:function(e,t){var n,i,a,r,o,s=t.x,l=t.y,u=t.width,c=t.height,h=t.r;u<0&&(s+=u,u=-u),c<0&&(l+=c,c=-c),"number"==typeof h?n=i=a=r=h:h instanceof Array?1===h.length?n=i=a=r=h[0]:2===h.length?(n=a=h[0],i=r=h[1]):3===h.length?(n=h[0],i=r=h[1],a=h[2]):(n=h[0],i=h[1],a=h[2],r=h[3]):n=i=a=r=0,n+i>u&&(n*=u/(o=n+i),i*=u/o),a+r>u&&(a*=u/(o=a+r),r*=u/o),i+a>c&&(i*=c/(o=i+a),a*=c/o),n+r>c&&(n*=c/(o=n+r),r*=c/o),e.moveTo(s+n,l),e.lineTo(s+u-i,l),0!==i&&e.arc(s+u-i,l+i,i,-Math.PI/2,0),e.lineTo(s+u,l+c-a),0!==a&&e.arc(s+u-a,l+c-a,a,0,Math.PI/2),e.lineTo(s+r,l+c),0!==r&&e.arc(s+r,l+c-r,r,Math.PI/2,Math.PI),e.lineTo(s,l+n),0!==n&&e.arc(s+n,l+n,n,Math.PI,1.5*Math.PI)}},Ui=Ie.retrieve2,Zi=Ie.retrieve3,Xi=Ie.each,qi=Ie.normalizeCssArray,Ki=Ie.isString,Qi=Ie.isObject,$i=ei.ContextCachedBy,Ji=ei.WILL_BE_RESTORED,ea=Wi.DEFAULT_FONT,ta={left:1,right:1,center:1},na={top:1,bottom:1,middle:1},ia=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]],aa={},ra={};function oa(e){if(e){e.font=Wi.makeFont(e);var t=e.textAlign;"middle"===t&&(t="center"),e.textAlign=null==t||ta[t]?t:"left";var n=e.textVerticalAlign||e.textBaseline;"center"===n&&(n="middle"),e.textVerticalAlign=null==n||na[n]?n:"top",e.textPadding&&(e.textPadding=qi(e.textPadding))}}function sa(e,t,n,i,a,r){var o,s=ha(i),l=!1,u=t.__attrCachedBy===$i.PLAIN_TEXT;r!==Ji?(r&&(o=r.style,l=!s&&u&&o),t.__attrCachedBy=s?$i.NONE:$i.PLAIN_TEXT):u&&(t.__attrCachedBy=$i.NONE);var c=i.font||ea;l&&c===(o.font||ea)||(t.font=c);var h=e.__computedFont;e.__styleFont!==c&&(e.__styleFont=c,h=e.__computedFont=t.font);var d=i.textPadding,f=i.textLineHeight,p=e.__textCotentBlock;p&&!e.__dirtyText||(p=e.__textCotentBlock=Wi.parsePlainText(n,h,d,f,i.truncate));var g=p.outerHeight,m=p.lines,v=p.lineHeight,y=pa(ra,e,i,a),_=y.baseX,x=y.baseY,b=y.textAlign||"left",w=y.textVerticalAlign;ua(t,i,a,_,x);var S=Wi.adjustTextY(x,g,w),M=_,T=S;if(s||d){var I=Wi.getWidth(n,h);d&&(I+=d[1]+d[3]);var A=Wi.adjustTextX(_,I,b);s&&da(e,t,i,A,S,I,g),d&&(M=_a(_,b,d),T+=d[0])}t.textAlign=b,t.textBaseline="middle",t.globalAlpha=i.opacity||1;for(var D=0;D<ia.length;D++){var C=ia[D],O=C[0],k=C[1],L=i[O];l&&L===o[O]||(t[k]=Jn(t,k,L||C[2]))}T+=v/2;var E=i.textStrokeWidth,N=l?o.textStrokeWidth:null,P=!l||E!==N,R=!l||P||i.textStroke!==o.textStroke,z=ma(i.textStroke,E),B=va(i.textFill);if(z&&(P&&(t.lineWidth=E),R&&(t.strokeStyle=z)),B&&(l&&i.textFill===o.textFill||(t.fillStyle=B)),1===m.length)z&&t.strokeText(m[0],M,T),B&&t.fillText(m[0],M,T);else for(D=0;D<m.length;D++)z&&t.strokeText(m[D],M,T),B&&t.fillText(m[D],M,T),T+=v}function la(e,t,n,i,a,r){r!==Ji&&(t.__attrCachedBy=$i.NONE);var o=e.__textCotentBlock;o&&!e.__dirtyText||(o=e.__textCotentBlock=Wi.parseRichText(n,i)),function(e,t,n,i,a){var r=n.width,o=n.outerWidth,s=n.outerHeight,l=i.textPadding,u=pa(ra,e,i,a),c=u.baseX,h=u.baseY,d=u.textAlign,f=u.textVerticalAlign;ua(t,i,a,c,h);var p=Wi.adjustTextX(c,o,d),g=Wi.adjustTextY(h,s,f),m=p,v=g;l&&(m+=l[3],v+=l[0]);var y=m+r;ha(i)&&da(e,t,i,p,g,o,s);for(var _=0;_<n.lines.length;_++){for(var x,b=n.lines[_],w=b.tokens,S=w.length,M=b.lineHeight,T=b.width,I=0,A=m,D=y,C=S-1;I<S&&(!(x=w[I]).textAlign||"left"===x.textAlign);)ca(e,t,x,i,M,v,A,"left"),T-=x.width,A+=x.width,I++;for(;C>=0&&"right"===(x=w[C]).textAlign;)ca(e,t,x,i,M,v,D,"right"),T-=x.width,D-=x.width,C--;for(A+=(r-(A-m)-(y-D)-T)/2;I<=C;)x=w[I],ca(e,t,x,i,M,v,A+x.width/2,"center"),A+=x.width,I++;v+=M}}(e,t,o,i,a)}function ua(e,t,n,i,a){if(n&&t.textRotation){var r=t.textOrigin;"center"===r?(i=n.width/2+n.x,a=n.height/2+n.y):r&&(i=r[0]+n.x,a=r[1]+n.y),e.translate(i,a),e.rotate(-t.textRotation),e.translate(-i,-a)}}function ca(e,t,n,i,a,r,o,s){var l=i.rich[n.styleName]||{};l.text=n.text;var u=n.textVerticalAlign,c=r+a/2;"top"===u?c=r+n.height/2:"bottom"===u&&(c=r+a-n.height/2),!n.isLineHolder&&ha(l)&&da(e,t,l,"right"===s?o-n.width:"center"===s?o-n.width/2:o,c-n.height/2,n.width,n.height);var h=n.textPadding;h&&(o=_a(o,s,h),c-=n.height/2-h[2]-n.textHeight/2),ga(t,"shadowBlur",Zi(l.textShadowBlur,i.textShadowBlur,0)),ga(t,"shadowColor",l.textShadowColor||i.textShadowColor||"transparent"),ga(t,"shadowOffsetX",Zi(l.textShadowOffsetX,i.textShadowOffsetX,0)),ga(t,"shadowOffsetY",Zi(l.textShadowOffsetY,i.textShadowOffsetY,0)),ga(t,"textAlign",s),ga(t,"textBaseline","middle"),ga(t,"font",n.font||ea);var d=ma(l.textStroke||i.textStroke,p),f=va(l.textFill||i.textFill),p=Ui(l.textStrokeWidth,i.textStrokeWidth);d&&(ga(t,"lineWidth",p),ga(t,"strokeStyle",d),t.strokeText(n.text,o,c)),f&&(ga(t,"fillStyle",f),t.fillText(n.text,o,c))}function ha(e){return!!(e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor)}function da(e,t,n,i,a,r,o){var s=n.textBackgroundColor,l=n.textBorderWidth,u=n.textBorderColor,c=Ki(s);if(ga(t,"shadowBlur",n.textBoxShadowBlur||0),ga(t,"shadowColor",n.textBoxShadowColor||"transparent"),ga(t,"shadowOffsetX",n.textBoxShadowOffsetX||0),ga(t,"shadowOffsetY",n.textBoxShadowOffsetY||0),c||l&&u){t.beginPath();var h=n.textBorderRadius;h?ji.buildPath(t,{x:i,y:a,width:r,height:o,r:h}):t.rect(i,a,r,o),t.closePath()}if(c)if(ga(t,"fillStyle",s),null!=n.fillOpacity){var d=t.globalAlpha;t.globalAlpha=n.fillOpacity*n.opacity,t.fill(),t.globalAlpha=d}else t.fill();else if(Qi(s)){var f=s.image;(f=bi.createOrUpdateImage(f,null,e,fa,s))&&bi.isImageReady(f)&&t.drawImage(f,i,a,r,o)}if(l&&u)if(ga(t,"lineWidth",l),ga(t,"strokeStyle",u),null!=n.strokeOpacity){d=t.globalAlpha;t.globalAlpha=n.strokeOpacity*n.opacity,t.stroke(),t.globalAlpha=d}else t.stroke()}function fa(e,t){t.image=e}function pa(e,t,n,i){var a=n.x||0,r=n.y||0,o=n.textAlign,s=n.textVerticalAlign;if(i){var l=n.textPosition;if(l instanceof Array)a=i.x+ya(l[0],i.width),r=i.y+ya(l[1],i.height);else{var u=t&&t.calculateTextPosition?t.calculateTextPosition(aa,n,i):Wi.calculateTextPosition(aa,n,i);a=u.x,r=u.y,o=o||u.textAlign,s=s||u.textVerticalAlign}var c=n.textOffset;c&&(a+=c[0],r+=c[1])}return(e=e||{}).baseX=a,e.baseY=r,e.textAlign=o,e.textVerticalAlign=s,e}function ga(e,t,n){return e[t]=Jn(e,t,n),e[t]}function ma(e,t){return null==e||t<=0||"transparent"===e||"none"===e?null:e.image||e.colorStops?"#000":e}function va(e){return null==e||"none"===e?null:e.image||e.colorStops?"#000":e}function ya(e,t){return"string"==typeof e?e.lastIndexOf("%")>=0?parseFloat(e)/100*t:parseFloat(e):e}function _a(e,t,n){return"right"===t?e-n[1]:"center"===t?e+n[3]/2-n[1]/2:e+n[3]}var xa={normalizeTextStyle:function(e){return oa(e),Xi(e.rich,oa),e},renderText:function(e,t,n,i,a,r){i.rich?la(e,t,n,i,a,r):sa(e,t,n,i,a,r)},getBoxPosition:pa,getStroke:ma,getFill:va,parsePercent:ya,needDrawText:function(e,t){return null!=e&&(e||t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor||t.textPadding)}},ba=ei.WILL_BE_RESTORED,wa=new Hn,Sa=function(){};Sa.prototype={constructor:Sa,drawRectText:function(e,t){var n=this.style;t=n.textRect||t,this.__dirty&&xa.normalizeTextStyle(n,!0);var i=n.text;if(null!=i&&(i+=""),xa.needDrawText(i,n)){e.save();var a=this.transform;n.transformText?this.setTransform(e):a&&(wa.copy(t),wa.applyTransform(a),t=wa),xa.renderText(this,e,i,n,t,ba),e.restore()}}};var Ma=Sa;function Ta(e){for(var t in e=e||{},Pn.call(this,e),e)e.hasOwnProperty(t)&&"style"!==t&&(this[t]=e[t]);this.style=new ui(e.style,this),this._rect=null,this.__clipPaths=null}Ta.prototype={constructor:Ta,type:"displayable",__dirty:!0,invisible:!1,z:0,z2:0,zlevel:0,draggable:!1,dragging:!1,silent:!1,culling:!1,cursor:"pointer",rectHover:!1,progressive:!1,incremental:!1,globalScaleRatio:1,beforeBrush:function(e){},afterBrush:function(e){},brush:function(e,t){},getBoundingRect:function(){},contain:function(e,t){return this.rectContain(e,t)},traverse:function(e,t){e.call(t,this)},rectContain:function(e,t){var n=this.transformCoordToLocal(e,t);return this.getBoundingRect().contain(n[0],n[1])},dirty:function(){this.__dirty=this.__dirtyText=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(e){return this.animate("style",e)},attrKV:function(e,t){"style"!==e?Pn.prototype.attrKV.call(this,e,t):this.style.set(t)},setStyle:function(e,t){return this.style.set(e,t),this.dirty(!1),this},useStyle:function(e){return this.style=new ui(e,this),this.dirty(!1),this},calculateTextPosition:null},Ie.inherits(Ta,Pn),Ie.mixin(Ta,Ma);var Ia=Ta;function Aa(e){Ia.call(this,e)}Aa.prototype={constructor:Aa,type:"image",brush:function(e,t){var n=this.style,i=n.image;n.bind(e,this,t);var a=this._image=bi.createOrUpdateImage(i,this._image,this,this.onload);if(a&&bi.isImageReady(a)){var r=n.x||0,o=n.y||0,s=n.width,l=n.height,u=a.width/a.height;if(null==s&&null!=l?s=l*u:null==l&&null!=s?l=s/u:null==s&&null==l&&(s=a.width,l=a.height),this.setTransform(e),n.sWidth&&n.sHeight){var c=n.sx||0,h=n.sy||0;e.drawImage(a,c,h,n.sWidth,n.sHeight,r,o,s,l)}else if(n.sx&&n.sy){var d=s-(c=n.sx),f=l-(h=n.sy);e.drawImage(a,c,h,d,f,r,o,s,l)}else e.drawImage(a,r,o,s,l);null!=n.text&&(this.restoreTransform(e),this.drawRectText(e,this.getBoundingRect()))}},getBoundingRect:function(){var e=this.style;return this._rect||(this._rect=new Hn(e.x||0,e.y||0,e.width||0,e.height||0)),this._rect}},Ie.inherits(Aa,Ia);var Da=Aa,Ca=_n.devicePixelRatio;function Oa(e){return parseInt(e,10)}var ka=new Hn(0,0,0,0),La=new Hn(0,0,0,0);var Ea=function(e,t,n){this.type="canvas";var i=!e.nodeName||"CANVAS"===e.nodeName.toUpperCase();this._opts=n=Ie.extend({},n||{}),this.dpr=n.devicePixelRatio||Ca,this._singleCanvas=i,this.root=e;var a=e.style;a&&(a["-webkit-tap-highlight-color"]="transparent",a["-webkit-user-select"]=a["user-select"]=a["-webkit-touch-callout"]="none",e.innerHTML=""),this.storage=t;var r=this._zlevelList=[],o=this._layers={};if(this._layerConfig={},this._needsManuallyCompositing=!1,i){var s=e.width,l=e.height;null!=n.width&&(s=n.width),null!=n.height&&(l=n.height),this.dpr=n.devicePixelRatio||1,e.width=s*this.dpr,e.height=l*this.dpr,this._width=s,this._height=l;var u=new mi(e,this,this.dpr);u.__builtin__=!0,u.initContext(),o[314159]=u,u.zlevel=314159,r.push(314159),this._domRoot=e}else{this._width=this._getSize(0),this._height=this._getSize(1);var c=this._domRoot=function(e,t){var n=document.createElement("div");return n.style.cssText=["position:relative","width:"+e+"px","height:"+t+"px","padding:0","margin:0","border-width:0"].join(";")+";",n}(this._width,this._height);e.appendChild(c)}this._hoverlayer=null,this._hoverElements=[]};Ea.prototype={constructor:Ea,getType:function(){return"canvas"},isSingleCanvas:function(){return this._singleCanvas},getViewportRoot:function(){return this._domRoot},getViewportRootOffset:function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},refresh:function(e){var t=this.storage.getDisplayList(!0),n=this._zlevelList;this._redrawId=Math.random(),this._paintList(t,e,this._redrawId);for(var i=0;i<n.length;i++){var a=n[i],r=this._layers[a];if(!r.__builtin__&&r.refresh){var o=0===i?this._backgroundColor:null;r.refresh(o)}}return this.refreshHover(),this},addHover:function(e,t){if(!e.__hoverMir){var n=new e.constructor({style:e.style,shape:e.shape,z:e.z,z2:e.z2,silent:e.silent});return n.__from=e,e.__hoverMir=n,t&&n.setStyle(t),this._hoverElements.push(n),n}},removeHover:function(e){var t=e.__hoverMir,n=this._hoverElements,i=Ie.indexOf(n,t);i>=0&&n.splice(i,1),e.__hoverMir=null},clearHover:function(e){for(var t=this._hoverElements,n=0;n<t.length;n++){var i=t[n].__from;i&&(i.__hoverMir=null)}t.length=0},refreshHover:function(){var e=this._hoverElements,t=e.length,n=this._hoverlayer;if(n&&n.clear(),t){Xn(e,this.storage.displayableSortFunc),n||(n=this._hoverlayer=this.getLayer(1e5));var i={};n.ctx.save();for(var a=0;a<t;){var r=e[a],o=r.__from;o&&o.__zr?(a++,o.invisible||(r.transform=o.transform,r.invTransform=o.invTransform,r.__clipPaths=o.__clipPaths,this._doPaintEl(r,n,!0,i))):(e.splice(a,1),o.__hoverMir=null,t--)}n.ctx.restore()}},getHoverLayer:function(){return this.getLayer(1e5)},_paintList:function(e,t,n){if(this._redrawId===n){t=t||!1,this._updateLayerStatus(e);var i=this._doPaintList(e,t);if(this._needsManuallyCompositing&&this._compositeManually(),!i){var a=this;vi((function(){a._paintList(e,t,n)}))}}},_compositeManually:function(){var e=this.getLayer(314159).ctx,t=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,t,n),this.eachBuiltinLayer((function(i){i.virtual&&e.drawImage(i.dom,0,0,t,n)}))},_doPaintList:function(e,t){for(var n=[],i=0;i<this._zlevelList.length;i++){var a=this._zlevelList[i];(s=this._layers[a]).__builtin__&&s!==this._hoverlayer&&(s.__dirty||t)&&n.push(s)}for(var r=!0,o=0;o<n.length;o++){var s,l=(s=n[o]).ctx,u={};l.save();var c=t?s.__startIndex:s.__drawIndex,h=!t&&s.incremental&&Date.now,d=h&&Date.now(),f=s.zlevel===this._zlevelList[0]?this._backgroundColor:null;if(s.__startIndex===s.__endIndex)s.clear(!1,f);else if(c===s.__startIndex){var p=e[c];p.incremental&&p.notClear&&!t||s.clear(!1,f)}-1===c&&(console.error("For some unknown reason. drawIndex is -1"),c=s.__startIndex);for(var g=c;g<s.__endIndex;g++){var m=e[g];if(this._doPaintEl(m,s,t,u),m.__dirty=m.__dirtyText=!1,h)if(Date.now()-d>15)break}s.__drawIndex=g,s.__drawIndex<s.__endIndex&&(r=!1),u.prevElClipPaths&&l.restore(),l.restore()}return ne.wxa&&Ie.each(this._layers,(function(e){e&&e.ctx&&e.ctx.draw&&e.ctx.draw()})),r},_doPaintEl:function(e,t,n,i){var a=t.ctx,r=e.transform;if((t.__dirty||n)&&!e.invisible&&0!==e.style.opacity&&(!r||r[0]||r[3])&&(!e.culling||!function(e,t,n){return ka.copy(e.getBoundingRect()),e.transform&&ka.applyTransform(e.transform),La.width=t,La.height=n,!ka.intersect(La)}(e,this._width,this._height))){var o=e.__clipPaths,s=i.prevElClipPaths;s&&!function(e,t){if(e===t)return!1;if(!e||!t||e.length!==t.length)return!0;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!0;return!1}(o,s)||(s&&(a.restore(),i.prevElClipPaths=null,i.prevEl=null),o&&(a.save(),function(e,t){for(var n=0;n<e.length;n++){var i=e[n];i.setTransform(t),t.beginPath(),i.buildPath(t,i.shape),t.clip(),i.restoreTransform(t)}}(o,a),i.prevElClipPaths=o)),e.beforeBrush&&e.beforeBrush(a),e.brush(a,i.prevEl||null),i.prevEl=e,e.afterBrush&&e.afterBrush(a)}},getLayer:function(e,t){this._singleCanvas&&!this._needsManuallyCompositing&&(e=314159);var n=this._layers[e];return n||((n=new mi("zr_"+e,this,this.dpr)).zlevel=e,n.__builtin__=!0,this._layerConfig[e]?Ie.merge(n,this._layerConfig[e],!0):this._layerConfig[e-.01]&&Ie.merge(n,this._layerConfig[e-.01],!0),t&&(n.virtual=t),this.insertLayer(e,n),n.initContext()),n},insertLayer:function(e,t){var n=this._layers,i=this._zlevelList,a=i.length,r=null,o=-1,s=this._domRoot;if(!n[e]&&function(e){return!!e&&(!!e.__builtin__||"function"==typeof e.resize&&"function"==typeof e.refresh)}(t)){if(a>0&&e>i[0]){for(o=0;o<a-1&&!(i[o]<e&&i[o+1]>e);o++);r=n[i[o]]}if(i.splice(o+1,0,e),n[e]=t,!t.virtual)if(r){var l=r.dom;l.nextSibling?s.insertBefore(t.dom,l.nextSibling):s.appendChild(t.dom)}else s.firstChild?s.insertBefore(t.dom,s.firstChild):s.appendChild(t.dom)}},eachLayer:function(e,t){var n,i,a=this._zlevelList;for(i=0;i<a.length;i++)n=a[i],e.call(t,this._layers[n],n)},eachBuiltinLayer:function(e,t){var n,i,a,r=this._zlevelList;for(a=0;a<r.length;a++)i=r[a],(n=this._layers[i]).__builtin__&&e.call(t,n,i)},eachOtherLayer:function(e,t){var n,i,a,r=this._zlevelList;for(a=0;a<r.length;a++)i=r[a],(n=this._layers[i]).__builtin__||e.call(t,n,i)},getLayers:function(){return this._layers},_updateLayerStatus:function(e){function t(e){a&&(a.__endIndex!==e&&(a.__dirty=!0),a.__endIndex=e)}if(this.eachBuiltinLayer((function(e,t){e.__dirty=e.__used=!1})),this._singleCanvas)for(var n=1;n<e.length;n++){if((o=e[n]).zlevel!==e[n-1].zlevel||o.incremental){this._needsManuallyCompositing=!0;break}}var i,a=null,r=0;for(n=0;n<e.length;n++){var o,s,l=(o=e[n]).zlevel;i!==l&&(i=l,r=0),o.incremental?((s=this.getLayer(l+.001,this._needsManuallyCompositing)).incremental=!0,r=1):s=this.getLayer(l+(r>0?.01:0),this._needsManuallyCompositing),s.__builtin__||xn("ZLevel "+l+" has been used by unkown layer "+s.id),s!==a&&(s.__used=!0,s.__startIndex!==n&&(s.__dirty=!0),s.__startIndex=n,s.incremental?s.__drawIndex=-1:s.__drawIndex=n,t(n),a=s),o.__dirty&&(s.__dirty=!0,s.incremental&&s.__drawIndex<0&&(s.__drawIndex=n))}t(n),this.eachBuiltinLayer((function(e,t){!e.__used&&e.getElementCount()>0&&(e.__dirty=!0,e.__startIndex=e.__endIndex=e.__drawIndex=0),e.__dirty&&e.__drawIndex<0&&(e.__drawIndex=e.__startIndex)}))},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(e){e.clear()},setBackgroundColor:function(e){this._backgroundColor=e},configLayer:function(e,t){if(t){var n=this._layerConfig;n[e]?Ie.merge(n[e],t,!0):n[e]=t;for(var i=0;i<this._zlevelList.length;i++){var a=this._zlevelList[i];if(a===e||a===e+.01){var r=this._layers[a];Ie.merge(r,n[e],!0)}}}},delLayer:function(e){var t=this._layers,n=this._zlevelList,i=t[e];i&&(i.dom.parentNode.removeChild(i.dom),delete t[e],n.splice(Ie.indexOf(n,e),1))},resize:function(e,t){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var i=this._opts;if(null!=e&&(i.width=e),null!=t&&(i.height=t),e=this._getSize(0),t=this._getSize(1),n.style.display="",this._width!==e||t!==this._height){for(var a in n.style.width=e+"px",n.style.height=t+"px",this._layers)this._layers.hasOwnProperty(a)&&this._layers[a].resize(e,t);Ie.each(this._progressiveLayers,(function(n){n.resize(e,t)})),this.refresh(!0)}this._width=e,this._height=t}else{if(null==e||null==t)return;this._width=e,this._height=t,this.getLayer(314159).resize(e,t)}return this},clearLayer:function(e){var t=this._layers[e];t&&t.clear()},dispose:function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},getRenderedCanvas:function(e){if(e=e||{},this._singleCanvas&&!this._compositeManually)return this._layers[314159].dom;var t=new mi("image",this,e.pixelRatio||this.dpr);if(t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor),e.pixelRatio<=this.dpr){this.refresh();var n=t.dom.width,i=t.dom.height,a=t.ctx;this.eachLayer((function(e){e.__builtin__?a.drawImage(e.dom,0,0,n,i):e.renderToCanvas&&(t.ctx.save(),e.renderToCanvas(t.ctx),t.ctx.restore())}))}else for(var r={},o=this.storage.getDisplayList(!0),s=0;s<o.length;s++){var l=o[s];this._doPaintEl(l,t,!0,r)}return t.dom},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(e){var t=this._opts,n=["width","height"][e],i=["clientWidth","clientHeight"][e],a=["paddingLeft","paddingTop"][e],r=["paddingRight","paddingBottom"][e];if(null!=t[n]&&"auto"!==t[n])return parseFloat(t[n]);var o=this.root,s=document.defaultView.getComputedStyle(o);return(o[i]||Oa(s[n])||Oa(o.style[n]))-(Oa(s[a])||0)-(Oa(s[r])||0)|0},pathToImage:function(e,t){t=t||this.dpr;var n=document.createElement("canvas"),i=n.getContext("2d"),a=e.getBoundingRect(),r=e.style,o=r.shadowBlur*t,s=r.shadowOffsetX*t,l=r.shadowOffsetY*t,u=r.hasStroke()?r.lineWidth:0,c=Math.max(u/2,-s+o),h=Math.max(u/2,s+o),d=Math.max(u/2,-l+o),f=Math.max(u/2,l+o),p=a.width+c+h,g=a.height+d+f;n.width=p*t,n.height=g*t,i.scale(t,t),i.clearRect(0,0,p,g),i.dpr=t;var m={position:e.position,rotation:e.rotation,scale:e.scale};e.position=[c-a.x,d-a.y],e.rotation=0,e.scale=[1,1],e.updateTransform(),e&&e.brush(i);var v=new Da({style:{x:0,y:0,image:n}});return null!=m.position&&(v.position=e.position=m.position),null!=m.rotation&&(v.rotation=e.rotation=m.rotation),null!=m.scale&&(v.scale=e.scale=m.scale),v}};var Na=Ea,Pa=nt.Dispatcher,Ra=function(e){e=e||{},this.stage=e.stage||{},this.onframe=e.onframe||function(){},this._clips=[],this._running=!1,this._time,this._pausedTime,this._pauseStart,this._paused=!1,Pa.call(this)};Ra.prototype={constructor:Ra,addClip:function(e){this._clips.push(e)},addAnimator:function(e){e.animation=this;for(var t=e.getClips(),n=0;n<t.length;n++)this.addClip(t[n])},removeClip:function(e){var t=Ie.indexOf(this._clips,e);t>=0&&this._clips.splice(t,1)},removeAnimator:function(e){for(var t=e.getClips(),n=0;n<t.length;n++)this.removeClip(t[n]);e.animation=null},_update:function(){for(var e=(new Date).getTime()-this._pausedTime,t=e-this._time,n=this._clips,i=n.length,a=[],r=[],o=0;o<i;o++){var s=n[o],l=s.step(e,t);l&&(a.push(l),r.push(s))}for(o=0;o<i;)n[o]._needsRemove?(n[o]=n[i-1],n.pop(),i--):o++;i=a.length;for(o=0;o<i;o++)r[o].fire(a[o]);this._time=e,this.onframe(t),this.trigger("frame",t),this.stage.update&&this.stage.update()},_startLoop:function(){var e=this;this._running=!0,vi((function t(){e._running&&(vi(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(e,t){var n=new vn(e,(t=t||{}).loop,t.getter,t.setter);return this.addAnimator(n),n}},Ie.mixin(Ra,Pa);var za,Ba,Va=Ra,Ha=nt.addEventListener,Ya=nt.removeEventListener,Fa=nt.normalizeEvent,Ga=nt.getNativeEvent,Wa=ne.domSupported,ja=(Ba={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:za=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:Ie.map(za,(function(e){var t=e.replace("mouse","pointer");return Ba.hasOwnProperty(t)?t:e}))}),Ua=["mousemove","mouseup"],Za=["pointermove","pointerup"];function Xa(e){return"mousewheel"===e&&ne.browser.firefox?"DOMMouseScroll":e}function qa(e){var t=e.pointerType;return"pen"===t||"touch"===t}function Ka(e){e&&(e.zrByTouch=!0)}function Qa(e,t){for(var n=t,i=!1;n&&9!==n.nodeType&&!(i=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return i}function $a(e,t){this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}var Ja=$a.prototype;Ja.stopPropagation=Ja.stopImmediatePropagation=Ja.preventDefault=Ie.noop;var er={mousedown:function(e){e=Fa(this.dom,e),this._mayPointerCapture=[e.zrX,e.zrY],this.trigger("mousedown",e)},mousemove:function(e){e=Fa(this.dom,e);var t=this._mayPointerCapture;!t||e.zrX===t[0]&&e.zrY===t[1]||or(this,!0),this.trigger("mousemove",e)},mouseup:function(e){e=Fa(this.dom,e),or(this,!1),this.trigger("mouseup",e)},mouseout:function(e){e=Fa(this.dom,e),this._pointerCapturing&&(e.zrEventControl="no_globalout");var t=e.toElement||e.relatedTarget;e.zrIsToLocalDOM=Qa(this,t),this.trigger("mouseout",e)},touchstart:function(e){Ka(e=Fa(this.dom,e)),this._lastTouchMoment=new Date,this.handler.processGesture(e,"start"),er.mousemove.call(this,e),er.mousedown.call(this,e)},touchmove:function(e){Ka(e=Fa(this.dom,e)),this.handler.processGesture(e,"change"),er.mousemove.call(this,e)},touchend:function(e){Ka(e=Fa(this.dom,e)),this.handler.processGesture(e,"end"),er.mouseup.call(this,e),+new Date-this._lastTouchMoment<300&&er.click.call(this,e)},pointerdown:function(e){er.mousedown.call(this,e)},pointermove:function(e){qa(e)||er.mousemove.call(this,e)},pointerup:function(e){er.mouseup.call(this,e)},pointerout:function(e){qa(e)||er.mouseout.call(this,e)}};Ie.each(["click","mousewheel","dblclick","contextmenu"],(function(e){er[e]=function(t){t=Fa(this.dom,t),this.trigger(e,t)}}));var tr={pointermove:function(e){qa(e)||tr.mousemove.call(this,e)},pointerup:function(e){tr.mouseup.call(this,e)},mousemove:function(e){this.trigger("mousemove",e)},mouseup:function(e){var t=this._pointerCapturing;or(this,!1),this.trigger("mouseup",e),t&&(e.zrEventControl="only_globalout",this.trigger("mouseout",e))}};function nr(e,t){var n=t.domHandlers;ne.pointerEventsSupported?Ie.each(ja.pointer,(function(i){ar(t,i,(function(t){n[i].call(e,t)}))})):(ne.touchEventsSupported&&Ie.each(ja.touch,(function(i){ar(t,i,(function(a){n[i].call(e,a),function(e){e.touching=!0,null!=e.touchTimer&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout((function(){e.touching=!1,e.touchTimer=null}),700)}(t)}))})),Ie.each(ja.mouse,(function(i){ar(t,i,(function(a){a=Ga(a),t.touching||n[i].call(e,a)}))})))}function ir(e,t){function n(n){ar(t,n,(function(i){i=Ga(i),Qa(e,i.target)||(i=function(e,t){return Fa(e.dom,new $a(e,t),!0)}(e,i),t.domHandlers[n].call(e,i))}),{capture:!0})}ne.pointerEventsSupported?Ie.each(Za,n):ne.touchEventsSupported||Ie.each(Ua,n)}function ar(e,t,n,i){e.mounted[t]=n,e.listenerOpts[t]=i,Ha(e.domTarget,Xa(t),n,i)}function rr(e){var t=e.mounted;for(var n in t)t.hasOwnProperty(n)&&Ya(e.domTarget,Xa(n),t[n],e.listenerOpts[n]);e.mounted={}}function or(e,t){if(e._mayPointerCapture=null,Wa&&e._pointerCapturing^t){e._pointerCapturing=t;var n=e._globalHandlerScope;t?ir(e,n):rr(n)}}function sr(e,t){this.domTarget=e,this.domHandlers=t,this.mounted={},this.listenerOpts={},this.touchTimer=null,this.touching=!1}function lr(e,t){Ve.call(this),this.dom=e,this.painterRoot=t,this._localHandlerScope=new sr(e,er),Wa&&(this._globalHandlerScope=new sr(document,tr)),this._pointerCapturing=!1,this._mayPointerCapture=null,nr(this,this._localHandlerScope)}var ur=lr.prototype;ur.dispose=function(){rr(this._localHandlerScope),Wa&&rr(this._globalHandlerScope)},ur.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||"default")},Ie.mixin(lr,Ve);var cr=lr,hr=!ne.canvasSupported,dr={canvas:Na},fr={};var pr=function(e,t,n){n=n||{},this.dom=t,this.id=e;var i=this,a=new Qn,r=n.renderer;if(hr){if(!dr.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");r="vml"}else r&&dr[r]||(r="canvas");var o=new dr[r](t,a,n,e);this.storage=a,this.painter=o;var s=ne.node||ne.worker?null:new cr(o.getViewportRoot(),o.root);this.handler=new ft(a,o,s,o.root),this.animation=new Va({stage:{update:Ie.bind(this.flush,this)}}),this.animation.start(),this._needsRefresh;var l=a.delFromStorage,u=a.addToStorage;a.delFromStorage=function(e){l.call(a,e),e&&e.removeSelfFromZr(i)},a.addToStorage=function(e){u.call(a,e),e.addSelfToZr(i)}};pr.prototype={constructor:pr,getId:function(){return this.id},add:function(e){this.storage.addRoot(e),this._needsRefresh=!0},remove:function(e){this.storage.delRoot(e),this._needsRefresh=!0},configLayer:function(e,t){this.painter.configLayer&&this.painter.configLayer(e,t),this._needsRefresh=!0},setBackgroundColor:function(e){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this._needsRefresh=!0},refreshImmediately:function(){this._needsRefresh=this._needsRefreshHover=!1,this.painter.refresh(),this._needsRefresh=this._needsRefreshHover=!1},refresh:function(){this._needsRefresh=!0},flush:function(){var e;this._needsRefresh&&(e=!0,this.refreshImmediately()),this._needsRefreshHover&&(e=!0,this.refreshHoverImmediately()),e&&this.trigger("rendered")},addHover:function(e,t){if(this.painter.addHover){var n=this.painter.addHover(e,t);return this.refreshHover(),n}},removeHover:function(e){this.painter.removeHover&&(this.painter.removeHover(e),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(e){e=e||{},this.painter.resize(e.width,e.height),this.handler.resize()},clearAnimation:function(){this.animation.clear()},getWidth:function(){return this.painter.getWidth()},getHeight:function(){return this.painter.getHeight()},pathToImage:function(e,t){return this.painter.pathToImage(e,t)},setCursorStyle:function(e){this.handler.setCursorStyle(e)},findHover:function(e,t){return this.handler.findHover(e,t)},on:function(e,t,n){this.handler.on(e,t,n)},off:function(e,t){this.handler.off(e,t)},trigger:function(e,t){this.handler.trigger(e,t)},clear:function(){this.storage.delRoot(),this.painter.clear()},dispose:function(){var e;this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,e=this.id,delete fr[e]}};var gr={version:"4.3.1",init:function(e,t){var n=new pr(te(),e,t);return fr[n.id]=n,n},dispose:function(e){if(e)e.dispose();else{for(var t in fr)fr.hasOwnProperty(t)&&fr[t].dispose();fr={}}return this},getInstance:function(e){return fr[e]},registerPainter:function(e,t){dr[e]=t}},mr=Ie.each,vr=Ie.isObject,yr=Ie.isArray;function _r(e){return e instanceof Array?e:null==e?[]:[e]}function xr(e){return vr(e)&&e.id&&0===(e.id+"").indexOf("\0_ec_\0")}var br=0;function wr(e,t){return e&&e.hasOwnProperty(t)}var Sr={normalizeToArray:_r,defaultEmphasis:function(e,t,n){if(e){e[t]=e[t]||{},e.emphasis=e.emphasis||{},e.emphasis[t]=e.emphasis[t]||{};for(var i=0,a=n.length;i<a;i++){var r=n[i];!e.emphasis[t].hasOwnProperty(r)&&e[t].hasOwnProperty(r)&&(e.emphasis[t][r]=e[t][r])}}},TEXT_STYLE_OPTIONS:["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"],getDataItemValue:function(e){return!vr(e)||yr(e)||e instanceof Date?e:e.value},isDataItemOption:function(e){return vr(e)&&!(e instanceof Array)},mappingToExists:function(e,t){t=(t||[]).slice();var n=Ie.map(e||[],(function(e,t){return{exist:e}}));return mr(t,(function(e,i){if(vr(e)){for(var a=0;a<n.length;a++)if(!n[a].option&&null!=e.id&&n[a].exist.id===e.id+"")return n[a].option=e,void(t[i]=null);for(a=0;a<n.length;a++){var r=n[a].exist;if(!(n[a].option||null!=r.id&&null!=e.id||null==e.name||xr(e)||xr(r)||r.name!==e.name+""))return n[a].option=e,void(t[i]=null)}}})),mr(t,(function(e,t){if(vr(e)){for(var i=0;i<n.length;i++){var a=n[i].exist;if(!n[i].option&&!xr(a)&&null==e.id){n[i].option=e;break}}i>=n.length&&n.push({option:e})}})),n},makeIdAndName:function(e){var t=Ie.createHashMap();mr(e,(function(e,n){var i=e.exist;i&&t.set(i.id,e)})),mr(e,(function(e,n){var i=e.option;Ie.assert(!i||null==i.id||!t.get(i.id)||t.get(i.id)===e,"id duplicates: "+(i&&i.id)),i&&null!=i.id&&t.set(i.id,e),!e.keyInfo&&(e.keyInfo={})})),mr(e,(function(e,n){var i=e.exist,a=e.option,r=e.keyInfo;if(vr(a)){if(r.name=null!=a.name?a.name+"":i?i.name:"series\0"+n,i)r.id=i.id;else if(null!=a.id)r.id=a.id+"";else{var o=0;do{r.id="\0"+r.name+"\0"+o++}while(t.get(r.id))}t.set(r.id,e)}}))},isNameSpecified:function(e){var t=e.name;return!(!t||!t.indexOf("series\0"))},isIdInner:xr,compressBatches:function(e,t){var n={},i={};return a(e||[],n),a(t||[],i,n),[r(n),r(i)];function a(e,t,n){for(var i=0,a=e.length;i<a;i++)for(var r=e[i].seriesId,o=_r(e[i].dataIndex),s=n&&n[r],l=0,u=o.length;l<u;l++){var c=o[l];s&&s[c]?s[c]=null:(t[r]||(t[r]={}))[c]=1}}function r(e,t){var n=[];for(var i in e)if(e.hasOwnProperty(i)&&null!=e[i])if(t)n.push(+i);else{var a=r(e[i],!0);a.length&&n.push({seriesId:i,dataIndex:a})}return n}},queryDataIndex:function(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?Ie.isArray(t.dataIndex)?Ie.map(t.dataIndex,(function(t){return e.indexOfRawIndex(t)})):e.indexOfRawIndex(t.dataIndex):null!=t.name?Ie.isArray(t.name)?Ie.map(t.name,(function(t){return e.indexOfName(t)})):e.indexOfName(t.name):void 0},makeInner:function(){var e="__\0ec_inner_"+br+++"_"+Math.random().toFixed(5);return function(t){return t[e]||(t[e]={})}},parseFinder:function(e,t,n){if(Ie.isString(t)){var i={};i[t+"Index"]=0,t=i}var a=n&&n.defaultMainType;!a||wr(t,a+"Index")||wr(t,a+"Id")||wr(t,a+"Name")||(t[a+"Index"]=0);var r={};return mr(t,(function(i,a){i=t[a];if("dataIndex"!==a&&"dataIndexInside"!==a){var o=a.match(/^(\w+)(Index|Id|Name)$/)||[],s=o[1],l=(o[2]||"").toLowerCase();if(!(!s||!l||null==i||"index"===l&&"none"===i||n&&n.includeMainTypes&&Ie.indexOf(n.includeMainTypes,s)<0)){var u={mainType:s};"index"===l&&"all"===i||(u[l]=i);var c=e.queryComponents(u);r[s+"Models"]=c,r[s+"Model"]=c[0]}}else r[a]=i})),r},setAttribute:function(e,t,n){e.setAttribute?e.setAttribute(t,n):e[t]=n},getAttribute:function(e,t){return e.getAttribute?e.getAttribute(t):e[t]},getTooltipRenderMode:function(e){return"auto"===e?ne.domSupported?"html":"richText":e||"html"},groupData:function(e,t){var n=Ie.createHashMap(),i=[];return Ie.each(e,(function(e){var a=t(e);(n.get(a)||(i.push(a),n.set(a,[]))).push(e)})),{keys:i,buckets:n}}},Mr="___EC__COMPONENT__CONTAINER___";function Tr(e){var t={main:"",sub:""};return e&&(e=e.split("."),t.main=e[0]||"",t.sub=e[1]||""),t}var Ir=0;function Ar(e,t){var n=Ie.slice(arguments,2);return this.superClass.prototype[t].apply(e,n)}function Dr(e,t,n){return this.superClass.prototype[t].apply(e,n)}var Cr={parseClassType:Tr,enableClassExtend:function(e,t){e.$constructor=e,e.extend=function(e){var t=this,n=function(){e.$constructor?e.$constructor.apply(this,arguments):t.apply(this,arguments)};return Ie.extend(n.prototype,e),n.extend=this.extend,n.superCall=Ar,n.superApply=Dr,Ie.inherits(n,this),n.superClass=t,n}},enableClassCheck:function(e){var t=["__\0is_clz",Ir++,Math.random().toFixed(3)].join("_");e.prototype[t]=!0,e.isInstance=function(e){return!(!e||!e[t])}},enableClassManagement:function(e,t){t=t||{};var n={};if(e.registerClass=function(e,t){if(t)if(function(e){Ie.assert(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),'componentType "'+e+'" illegal')}(t),(t=Tr(t)).sub){if(t.sub!==Mr){(function(e){var t=n[e.main];t&&t[Mr]||((t=n[e.main]={})[Mr]=!0);return t}(t))[t.sub]=e}}else n[t.main]=e;return e},e.getClass=function(e,t,i){var a=n[e];if(a&&a[Mr]&&(a=t?a[t]:null),i&&!a)throw new Error(t?"Component "+e+"."+(t||"")+" not exists. Load it first.":e+".type should be specified.");return a},e.getClassesByMainType=function(e){e=Tr(e);var t=[],i=n[e.main];return i&&i[Mr]?Ie.each(i,(function(e,n){n!==Mr&&t.push(e)})):t.push(i),t},e.hasClass=function(e){return e=Tr(e),!!n[e.main]},e.getAllClassMainTypes=function(){var e=[];return Ie.each(n,(function(t,n){e.push(n)})),e},e.hasSubTypes=function(e){e=Tr(e);var t=n[e.main];return t&&t[Mr]},e.parseClassType=Tr,t.registerWhenExtend){var i=e.extend;i&&(e.extend=function(t){var n=i.call(this,t);return e.registerClass(n,t.type)})}return e},setReadOnly:function(e,t){}};var Or=function(e){for(var t=0;t<e.length;t++)e[t][1]||(e[t][1]=e[t][0]);return function(t,n,i){for(var a={},r=0;r<e.length;r++){var o=e[r][1];if(!(n&&Ie.indexOf(n,o)>=0||i&&Ie.indexOf(i,o)<0)){var s=t.getShallow(o);null!=s&&(a[e[r][0]]=s)}}return a}},kr=Or([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Lr={getLineStyle:function(e){var t=kr(this,e);return t.lineDash=this.getLineDash(t.lineWidth),t},getLineDash:function(e){null==e&&(e=1);var t=this.get("type"),n=Math.max(e,2),i=4*e;return"solid"!==t&&null!=t&&("dashed"===t?[i,i]:[n,n])}},Er=Or([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),Nr={getAreaStyle:function(e,t){return Er(this,e,t)}},Pr=Le.create,Rr=Le.distSquare,zr=Math.pow,Br=Math.sqrt,Vr=Br(3),Hr=Pr(),Yr=Pr(),Fr=Pr();function Gr(e){return e>-1e-8&&e<1e-8}function Wr(e){return e>1e-8||e<-1e-8}function jr(e,t,n,i,a){var r=1-a;return r*r*(r*e+3*a*t)+a*a*(a*i+3*r*n)}function Ur(e,t,n,i){var a=1-i;return a*(a*e+2*i*t)+i*i*n}var Zr={cubicAt:jr,cubicDerivativeAt:function(e,t,n,i,a){var r=1-a;return 3*(((t-e)*r+2*(n-t)*a)*r+(i-n)*a*a)},cubicRootAt:function(e,t,n,i,a,r){var o=i+3*(t-n)-e,s=3*(n-2*t+e),l=3*(t-e),u=e-a,c=s*s-3*o*l,h=s*l-9*o*u,d=l*l-3*s*u,f=0;if(Gr(c)&&Gr(h)){if(Gr(s))r[0]=0;else(M=-l/s)>=0&&M<=1&&(r[f++]=M)}else{var p=h*h-4*c*d;if(Gr(p)){var g=h/c,m=-g/2;(M=-s/o+g)>=0&&M<=1&&(r[f++]=M),m>=0&&m<=1&&(r[f++]=m)}else if(p>0){var v=Br(p),y=c*s+1.5*o*(-h+v),_=c*s+1.5*o*(-h-v);(M=(-s-((y=y<0?-zr(-y,1/3):zr(y,1/3))+(_=_<0?-zr(-_,1/3):zr(_,1/3))))/(3*o))>=0&&M<=1&&(r[f++]=M)}else{var x=(2*c*s-3*o*h)/(2*Br(c*c*c)),b=Math.acos(x)/3,w=Br(c),S=Math.cos(b),M=(-s-2*w*S)/(3*o),T=(m=(-s+w*(S+Vr*Math.sin(b)))/(3*o),(-s+w*(S-Vr*Math.sin(b)))/(3*o));M>=0&&M<=1&&(r[f++]=M),m>=0&&m<=1&&(r[f++]=m),T>=0&&T<=1&&(r[f++]=T)}}return f},cubicExtrema:function(e,t,n,i,a){var r=6*n-12*t+6*e,o=9*t+3*i-3*e-9*n,s=3*t-3*e,l=0;if(Gr(o)){if(Wr(r))(c=-s/r)>=0&&c<=1&&(a[l++]=c)}else{var u=r*r-4*o*s;if(Gr(u))a[0]=-r/(2*o);else if(u>0){var c,h=Br(u),d=(-r-h)/(2*o);(c=(-r+h)/(2*o))>=0&&c<=1&&(a[l++]=c),d>=0&&d<=1&&(a[l++]=d)}}return l},cubicSubdivide:function(e,t,n,i,a,r){var o=(t-e)*a+e,s=(n-t)*a+t,l=(i-n)*a+n,u=(s-o)*a+o,c=(l-s)*a+s,h=(c-u)*a+u;r[0]=e,r[1]=o,r[2]=u,r[3]=h,r[4]=h,r[5]=c,r[6]=l,r[7]=i},cubicProjectPoint:function(e,t,n,i,a,r,o,s,l,u,c){var h,d,f,p,g,m=.005,v=1/0;Hr[0]=l,Hr[1]=u;for(var y=0;y<1;y+=.05)Yr[0]=jr(e,n,a,o,y),Yr[1]=jr(t,i,r,s,y),(p=Rr(Hr,Yr))<v&&(h=y,v=p);v=1/0;for(var _=0;_<32&&!(m<1e-4);_++)d=h-m,f=h+m,Yr[0]=jr(e,n,a,o,d),Yr[1]=jr(t,i,r,s,d),p=Rr(Yr,Hr),d>=0&&p<v?(h=d,v=p):(Fr[0]=jr(e,n,a,o,f),Fr[1]=jr(t,i,r,s,f),g=Rr(Fr,Hr),f<=1&&g<v?(h=f,v=g):m*=.5);return c&&(c[0]=jr(e,n,a,o,h),c[1]=jr(t,i,r,s,h)),Br(v)},quadraticAt:Ur,quadraticDerivativeAt:function(e,t,n,i){return 2*((1-i)*(t-e)+i*(n-t))},quadraticRootAt:function(e,t,n,i,a){var r=e-2*t+n,o=2*(t-e),s=e-i,l=0;if(Gr(r)){if(Wr(o))(c=-s/o)>=0&&c<=1&&(a[l++]=c)}else{var u=o*o-4*r*s;if(Gr(u))(c=-o/(2*r))>=0&&c<=1&&(a[l++]=c);else if(u>0){var c,h=Br(u),d=(-o-h)/(2*r);(c=(-o+h)/(2*r))>=0&&c<=1&&(a[l++]=c),d>=0&&d<=1&&(a[l++]=d)}}return l},quadraticExtremum:function(e,t,n){var i=e+n-2*t;return 0===i?.5:(e-t)/i},quadraticSubdivide:function(e,t,n,i,a){var r=(t-e)*i+e,o=(n-t)*i+t,s=(o-r)*i+r;a[0]=e,a[1]=r,a[2]=s,a[3]=s,a[4]=o,a[5]=n},quadraticProjectPoint:function(e,t,n,i,a,r,o,s,l){var u,c=.005,h=1/0;Hr[0]=o,Hr[1]=s;for(var d=0;d<1;d+=.05){Yr[0]=Ur(e,n,a,d),Yr[1]=Ur(t,i,r,d),(m=Rr(Hr,Yr))<h&&(u=d,h=m)}h=1/0;for(var f=0;f<32&&!(c<1e-4);f++){var p=u-c,g=u+c;Yr[0]=Ur(e,n,a,p),Yr[1]=Ur(t,i,r,p);var m=Rr(Yr,Hr);if(p>=0&&m<h)u=p,h=m;else{Fr[0]=Ur(e,n,a,g),Fr[1]=Ur(t,i,r,g);var v=Rr(Fr,Hr);g<=1&&v<h?(u=g,h=v):c*=.5}}return l&&(l[0]=Ur(e,n,a,u),l[1]=Ur(t,i,r,u)),Br(h)}},Xr=Math.min,qr=Math.max,Kr=Math.sin,Qr=Math.cos,$r=2*Math.PI,Jr=Le.create(),eo=Le.create(),to=Le.create();var no=[],io=[];var ao={fromPoints:function(e,t,n){if(0!==e.length){var i,a=e[0],r=a[0],o=a[0],s=a[1],l=a[1];for(i=1;i<e.length;i++)a=e[i],r=Xr(r,a[0]),o=qr(o,a[0]),s=Xr(s,a[1]),l=qr(l,a[1]);t[0]=r,t[1]=s,n[0]=o,n[1]=l}},fromLine:function(e,t,n,i,a,r){a[0]=Xr(e,n),a[1]=Xr(t,i),r[0]=qr(e,n),r[1]=qr(t,i)},fromCubic:function(e,t,n,i,a,r,o,s,l,u){var c,h=Zr.cubicExtrema,d=Zr.cubicAt,f=h(e,n,a,o,no);for(l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0,c=0;c<f;c++){var p=d(e,n,a,o,no[c]);l[0]=Xr(p,l[0]),u[0]=qr(p,u[0])}for(f=h(t,i,r,s,io),c=0;c<f;c++){var g=d(t,i,r,s,io[c]);l[1]=Xr(g,l[1]),u[1]=qr(g,u[1])}l[0]=Xr(e,l[0]),u[0]=qr(e,u[0]),l[0]=Xr(o,l[0]),u[0]=qr(o,u[0]),l[1]=Xr(t,l[1]),u[1]=qr(t,u[1]),l[1]=Xr(s,l[1]),u[1]=qr(s,u[1])},fromQuadratic:function(e,t,n,i,a,r,o,s){var l=Zr.quadraticExtremum,u=Zr.quadraticAt,c=qr(Xr(l(e,n,a),1),0),h=qr(Xr(l(t,i,r),1),0),d=u(e,n,a,c),f=u(t,i,r,h);o[0]=Xr(e,a,d),o[1]=Xr(t,r,f),s[0]=qr(e,a,d),s[1]=qr(t,r,f)},fromArc:function(e,t,n,i,a,r,o,s,l){var u=Le.min,c=Le.max,h=Math.abs(a-r);if(h%$r<1e-4&&h>1e-4)return s[0]=e-n,s[1]=t-i,l[0]=e+n,void(l[1]=t+i);if(Jr[0]=Qr(a)*n+e,Jr[1]=Kr(a)*i+t,eo[0]=Qr(r)*n+e,eo[1]=Kr(r)*i+t,u(s,Jr,eo),c(l,Jr,eo),(a%=$r)<0&&(a+=$r),(r%=$r)<0&&(r+=$r),a>r&&!o?r+=$r:a<r&&o&&(a+=$r),o){var d=r;r=a,a=d}for(var f=0;f<r;f+=Math.PI/2)f>a&&(to[0]=Qr(f)*n+e,to[1]=Kr(f)*i+t,u(s,to,s),c(l,to,l))}},ro=_n.devicePixelRatio,oo={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},so=[],lo=[],uo=[],co=[],ho=Math.min,fo=Math.max,po=Math.cos,go=Math.sin,mo=Math.sqrt,vo=Math.abs,yo="undefined"!=typeof Float32Array,_o=function(e){this._saveData=!e,this._saveData&&(this.data=[]),this._ctx=null};_o.prototype={constructor:_o,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(e,t,n){n=n||0,this._ux=vo(n/ro/e)||0,this._uy=vo(n/ro/t)||0},getContext:function(){return this._ctx},beginPath:function(e){return this._ctx=e,e&&e.beginPath(),e&&(this.dpr=e.dpr),this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(e,t){return this.addData(oo.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},lineTo:function(e,t){var n=vo(e-this._xi)>this._ux||vo(t-this._yi)>this._uy||this._len<5;return this.addData(oo.L,e,t),this._ctx&&n&&(this._needsDash()?this._dashedLineTo(e,t):this._ctx.lineTo(e,t)),n&&(this._xi=e,this._yi=t),this},bezierCurveTo:function(e,t,n,i,a,r){return this.addData(oo.C,e,t,n,i,a,r),this._ctx&&(this._needsDash()?this._dashedBezierTo(e,t,n,i,a,r):this._ctx.bezierCurveTo(e,t,n,i,a,r)),this._xi=a,this._yi=r,this},quadraticCurveTo:function(e,t,n,i){return this.addData(oo.Q,e,t,n,i),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(e,t,n,i):this._ctx.quadraticCurveTo(e,t,n,i)),this._xi=n,this._yi=i,this},arc:function(e,t,n,i,a,r){return this.addData(oo.A,e,t,n,n,i,a-i,0,r?0:1),this._ctx&&this._ctx.arc(e,t,n,i,a,r),this._xi=po(a)*n+e,this._yi=go(a)*n+t,this},arcTo:function(e,t,n,i,a){return this._ctx&&this._ctx.arcTo(e,t,n,i,a),this},rect:function(e,t,n,i){return this._ctx&&this._ctx.rect(e,t,n,i),this.addData(oo.R,e,t,n,i),this},closePath:function(){this.addData(oo.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&(this._needsDash()&&this._dashedLineTo(t,n),e.closePath()),this._xi=t,this._yi=n,this},fill:function(e){e&&e.fill(),this.toStatic()},stroke:function(e){e&&e.stroke(),this.toStatic()},setLineDash:function(e){if(e instanceof Array){this._lineDash=e,this._dashIdx=0;for(var t=0,n=0;n<e.length;n++)t+=e[n];this._dashSum=t}return this},setLineDashOffset:function(e){return this._dashOffset=e,this},len:function(){return this._len},setData:function(e){var t=e.length;this.data&&this.data.length===t||!yo||(this.data=new Float32Array(t));for(var n=0;n<t;n++)this.data[n]=e[n];this._len=t},appendPath:function(e){e instanceof Array||(e=[e]);for(var t=e.length,n=0,i=this._len,a=0;a<t;a++)n+=e[a].len();yo&&this.data instanceof Float32Array&&(this.data=new Float32Array(i+n));for(a=0;a<t;a++)for(var r=e[a].data,o=0;o<r.length;o++)this.data[i++]=r[o];this._len=i},addData:function(e){if(this._saveData){var t=this.data;this._len+arguments.length>t.length&&(this._expandData(),t=this.data);for(var n=0;n<arguments.length;n++)t[this._len++]=arguments[n];this._prevCmd=e}},_expandData:function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t<this._len;t++)e[t]=this.data[t];this.data=e}},_needsDash:function(){return this._lineDash},_dashedLineTo:function(e,t){var n,i,a=this._dashSum,r=this._dashOffset,o=this._lineDash,s=this._ctx,l=this._xi,u=this._yi,c=e-l,h=t-u,d=mo(c*c+h*h),f=l,p=u,g=o.length;for(r<0&&(r=a+r),f-=(r%=a)*(c/=d),p-=r*(h/=d);c>0&&f<=e||c<0&&f>=e||0===c&&(h>0&&p<=t||h<0&&p>=t);)f+=c*(n=o[i=this._dashIdx]),p+=h*n,this._dashIdx=(i+1)%g,c>0&&f<l||c<0&&f>l||h>0&&p<u||h<0&&p>u||s[i%2?"moveTo":"lineTo"](c>=0?ho(f,e):fo(f,e),h>=0?ho(p,t):fo(p,t));c=f-e,h=p-t,this._dashOffset=-mo(c*c+h*h)},_dashedBezierTo:function(e,t,n,i,a,r){var o,s,l,u,c,h=this._dashSum,d=this._dashOffset,f=this._lineDash,p=this._ctx,g=this._xi,m=this._yi,v=Zr.cubicAt,y=0,_=this._dashIdx,x=f.length,b=0;for(d<0&&(d=h+d),d%=h,o=0;o<1;o+=.1)s=v(g,e,n,a,o+.1)-v(g,e,n,a,o),l=v(m,t,i,r,o+.1)-v(m,t,i,r,o),y+=mo(s*s+l*l);for(;_<x&&!((b+=f[_])>d);_++);for(o=(b-d)/y;o<=1;)u=v(g,e,n,a,o),c=v(m,t,i,r,o),_%2?p.moveTo(u,c):p.lineTo(u,c),o+=f[_]/y,_=(_+1)%x;_%2!=0&&p.lineTo(a,r),s=a-u,l=r-c,this._dashOffset=-mo(s*s+l*l)},_dashedQuadraticTo:function(e,t,n,i){var a=n,r=i;n=(n+2*e)/3,i=(i+2*t)/3,e=(this._xi+2*e)/3,t=(this._yi+2*t)/3,this._dashedBezierTo(e,t,n,i,a,r)},toStatic:function(){var e=this.data;e instanceof Array&&(e.length=this._len,yo&&(this.data=new Float32Array(e)))},getBoundingRect:function(){so[0]=so[1]=uo[0]=uo[1]=Number.MAX_VALUE,lo[0]=lo[1]=co[0]=co[1]=-Number.MAX_VALUE;for(var e=this.data,t=0,n=0,i=0,a=0,r=0;r<e.length;){var o=e[r++];switch(1===r&&(i=t=e[r],a=n=e[r+1]),o){case oo.M:t=i=e[r++],n=a=e[r++],uo[0]=i,uo[1]=a,co[0]=i,co[1]=a;break;case oo.L:ao.fromLine(t,n,e[r],e[r+1],uo,co),t=e[r++],n=e[r++];break;case oo.C:ao.fromCubic(t,n,e[r++],e[r++],e[r++],e[r++],e[r],e[r+1],uo,co),t=e[r++],n=e[r++];break;case oo.Q:ao.fromQuadratic(t,n,e[r++],e[r++],e[r],e[r+1],uo,co),t=e[r++],n=e[r++];break;case oo.A:var s=e[r++],l=e[r++],u=e[r++],c=e[r++],h=e[r++],d=e[r++]+h;r+=1;var f=1-e[r++];1===r&&(i=po(h)*u+s,a=go(h)*c+l),ao.fromArc(s,l,u,c,h,d,f,uo,co),t=po(d)*u+s,n=go(d)*c+l;break;case oo.R:i=t=e[r++],a=n=e[r++];var p=e[r++],g=e[r++];ao.fromLine(i,a,i+p,a+g,uo,co);break;case oo.Z:t=i,n=a}Le.min(so,so,uo),Le.max(lo,lo,co)}return 0===r&&(so[0]=so[1]=lo[0]=lo[1]=0),new Hn(so[0],so[1],lo[0]-so[0],lo[1]-so[1])},rebuildPath:function(e){for(var t,n,i,a,r,o,s=this.data,l=this._ux,u=this._uy,c=this._len,h=0;h<c;){var d=s[h++];switch(1===h&&(t=i=s[h],n=a=s[h+1]),d){case oo.M:t=i=s[h++],n=a=s[h++],e.moveTo(i,a);break;case oo.L:r=s[h++],o=s[h++],(vo(r-i)>l||vo(o-a)>u||h===c-1)&&(e.lineTo(r,o),i=r,a=o);break;case oo.C:e.bezierCurveTo(s[h++],s[h++],s[h++],s[h++],s[h++],s[h++]),i=s[h-2],a=s[h-1];break;case oo.Q:e.quadraticCurveTo(s[h++],s[h++],s[h++],s[h++]),i=s[h-2],a=s[h-1];break;case oo.A:var f=s[h++],p=s[h++],g=s[h++],m=s[h++],v=s[h++],y=s[h++],_=s[h++],x=s[h++],b=g>m?g:m,w=g>m?1:g/m,S=g>m?m/g:1,M=v+y;Math.abs(g-m)>.001?(e.translate(f,p),e.rotate(_),e.scale(w,S),e.arc(0,0,b,v,M,1-x),e.scale(1/w,1/S),e.rotate(-_),e.translate(-f,-p)):e.arc(f,p,b,v,M,1-x),1===h&&(t=po(v)*g+f,n=go(v)*m+p),i=po(M)*g+f,a=go(M)*m+p;break;case oo.R:t=i=s[h],n=a=s[h+1],e.rect(s[h++],s[h++],s[h++],s[h++]);break;case oo.Z:e.closePath(),i=t,a=n}}}},_o.CMD=oo;var xo=_o;var bo={containStroke:function(e,t,n,i,a,r,o){if(0===a)return!1;var s=a,l=0;if(o>t+s&&o>i+s||o<t-s&&o<i-s||r>e+s&&r>n+s||r<e-s&&r<n-s)return!1;if(e===n)return Math.abs(r-e)<=s/2;var u=(l=(t-i)/(e-n))*r-o+(e*i-n*t)/(e-n);return u*u/(l*l+1)<=s/2*s/2}};var wo={containStroke:function(e,t,n,i,a,r,o,s,l,u,c){if(0===l)return!1;var h=l;return!(c>t+h&&c>i+h&&c>r+h&&c>s+h||c<t-h&&c<i-h&&c<r-h&&c<s-h||u>e+h&&u>n+h&&u>a+h&&u>o+h||u<e-h&&u<n-h&&u<a-h&&u<o-h)&&Zr.cubicProjectPoint(e,t,n,i,a,r,o,s,u,c,null)<=h/2}},So=Zr.quadraticProjectPoint;var Mo={containStroke:function(e,t,n,i,a,r,o,s,l){if(0===o)return!1;var u=o;return!(l>t+u&&l>i+u&&l>r+u||l<t-u&&l<i-u&&l<r-u||s>e+u&&s>n+u&&s>a+u||s<e-u&&s<n-u&&s<a-u)&&So(e,t,n,i,a,r,s,l,null)<=u/2}},To=2*Math.PI;var Io={normalizeRadian:function(e){return(e%=To)<0&&(e+=To),e}},Ao=Io.normalizeRadian,Do=2*Math.PI;var Co={containStroke:function(e,t,n,i,a,r,o,s,l){if(0===o)return!1;var u=o;s-=e,l-=t;var c=Math.sqrt(s*s+l*l);if(c-u>n||c+u<n)return!1;if(Math.abs(i-a)%Do<1e-4)return!0;if(r){var h=i;i=Ao(a),a=Ao(h)}else i=Ao(i),a=Ao(a);i>a&&(a+=Do);var d=Math.atan2(l,s);return d<0&&(d+=Do),d>=i&&d<=a||d+Do>=i&&d+Do<=a}};var Oo=function(e,t,n,i,a,r){if(r>t&&r>i||r<t&&r<i)return 0;if(i===t)return 0;var o=i<t?1:-1,s=(r-t)/(i-t);1!==s&&0!==s||(o=i<t?.5:-.5);var l=s*(n-e)+e;return l===a?1/0:l>a?o:0},ko=Io.normalizeRadian,Lo=xo.CMD,Eo=2*Math.PI;var No=[-1,-1,-1],Po=[-1,-1];function Ro(e,t,n,i,a,r,o,s,l,u){if(u>t&&u>i&&u>r&&u>s||u<t&&u<i&&u<r&&u<s)return 0;var c,h=Zr.cubicRootAt(t,i,r,s,u,No);if(0===h)return 0;for(var d,f,p=0,g=-1,m=0;m<h;m++){var v=No[m],y=0===v||1===v?.5:1;Zr.cubicAt(e,n,a,o,v)<l||(g<0&&(g=Zr.cubicExtrema(t,i,r,s,Po),Po[1]<Po[0]&&g>1&&(c=void 0,c=Po[0],Po[0]=Po[1],Po[1]=c),d=Zr.cubicAt(t,i,r,s,Po[0]),g>1&&(f=Zr.cubicAt(t,i,r,s,Po[1]))),2===g?v<Po[0]?p+=d<t?y:-y:v<Po[1]?p+=f<d?y:-y:p+=s<f?y:-y:v<Po[0]?p+=d<t?y:-y:p+=s<d?y:-y)}return p}function zo(e,t,n,i,a,r,o,s){if(s>t&&s>i&&s>r||s<t&&s<i&&s<r)return 0;var l=Zr.quadraticRootAt(t,i,r,s,No);if(0===l)return 0;var u=Zr.quadraticExtremum(t,i,r);if(u>=0&&u<=1){for(var c=0,h=Zr.quadraticAt(t,i,r,u),d=0;d<l;d++){var f=0===No[d]||1===No[d]?.5:1;Zr.quadraticAt(e,n,a,No[d])<o||(No[d]<u?c+=h<t?f:-f:c+=r<h?f:-f)}return c}f=0===No[0]||1===No[0]?.5:1;return Zr.quadraticAt(e,n,a,No[0])<o?0:r<t?f:-f}function Bo(e,t,n,i,a,r,o,s){if((s-=t)>n||s<-n)return 0;var l=Math.sqrt(n*n-s*s);No[0]=-l,No[1]=l;var u=Math.abs(i-a);if(u<1e-4)return 0;if(u%Eo<1e-4){i=0,a=Eo;var c=r?1:-1;return o>=No[0]+e&&o<=No[1]+e?c:0}if(r){l=i;i=ko(a),a=ko(l)}else i=ko(i),a=ko(a);i>a&&(a+=Eo);for(var h=0,d=0;d<2;d++){var f=No[d];if(f+e>o){var p=Math.atan2(s,f);c=r?1:-1;p<0&&(p=Eo+p),(p>=i&&p<=a||p+Eo>=i&&p+Eo<=a)&&(p>Math.PI/2&&p<1.5*Math.PI&&(c=-c),h+=c)}}return h}function Vo(e,t,n,i,a){for(var r,o,s=0,l=0,u=0,c=0,h=0,d=0;d<e.length;){var f=e[d++];switch(f===Lo.M&&d>1&&(n||(s+=Oo(l,u,c,h,i,a))),1===d&&(c=l=e[d],h=u=e[d+1]),f){case Lo.M:l=c=e[d++],u=h=e[d++];break;case Lo.L:if(n){if(bo.containStroke(l,u,e[d],e[d+1],t,i,a))return!0}else s+=Oo(l,u,e[d],e[d+1],i,a)||0;l=e[d++],u=e[d++];break;case Lo.C:if(n){if(wo.containStroke(l,u,e[d++],e[d++],e[d++],e[d++],e[d],e[d+1],t,i,a))return!0}else s+=Ro(l,u,e[d++],e[d++],e[d++],e[d++],e[d],e[d+1],i,a)||0;l=e[d++],u=e[d++];break;case Lo.Q:if(n){if(Mo.containStroke(l,u,e[d++],e[d++],e[d],e[d+1],t,i,a))return!0}else s+=zo(l,u,e[d++],e[d++],e[d],e[d+1],i,a)||0;l=e[d++],u=e[d++];break;case Lo.A:var p=e[d++],g=e[d++],m=e[d++],v=e[d++],y=e[d++],_=e[d++];d+=1;var x=1-e[d++],b=Math.cos(y)*m+p,w=Math.sin(y)*v+g;d>1?s+=Oo(l,u,b,w,i,a):(c=b,h=w);var S=(i-p)*v/m+p;if(n){if(Co.containStroke(p,g,v,y,y+_,x,t,S,a))return!0}else s+=Bo(p,g,v,y,y+_,x,S,a);l=Math.cos(y+_)*m+p,u=Math.sin(y+_)*v+g;break;case Lo.R:c=l=e[d++],h=u=e[d++];b=c+e[d++],w=h+e[d++];if(n){if(bo.containStroke(c,h,b,h,t,i,a)||bo.containStroke(b,h,b,w,t,i,a)||bo.containStroke(b,w,c,w,t,i,a)||bo.containStroke(c,w,c,h,t,i,a))return!0}else s+=Oo(b,h,b,w,i,a),s+=Oo(c,w,c,h,i,a);break;case Lo.Z:if(n){if(bo.containStroke(l,u,c,h,t,i,a))return!0}else s+=Oo(l,u,c,h,i,a);l=c,u=h}}return n||(r=u,o=h,Math.abs(r-o)<1e-4)||(s+=Oo(l,u,c,h,i,a)||0),0!==s}var Ho={contain:function(e,t,n){return Vo(e,0,!1,t,n)},containStroke:function(e,t,n,i){return Vo(e,t,!0,n,i)}},Yo=hi.prototype.getCanvasPattern,Fo=Math.abs,Go=new xo(!0);function Wo(e){Ia.call(this,e),this.path=null}Wo.prototype={constructor:Wo,type:"path",__dirtyPath:!0,strokeContainThreshold:5,segmentIgnoreThreshold:0,subPixelOptimize:!1,brush:function(e,t){var n,i=this.style,a=this.path||Go,r=i.hasStroke(),o=i.hasFill(),s=i.fill,l=i.stroke,u=o&&!!s.colorStops,c=r&&!!l.colorStops,h=o&&!!s.image,d=r&&!!l.image;(i.bind(e,this,t),this.setTransform(e),this.__dirty)&&(u&&(n=n||this.getBoundingRect(),this._fillGradient=i.getGradient(e,s,n)),c&&(n=n||this.getBoundingRect(),this._strokeGradient=i.getGradient(e,l,n)));u?e.fillStyle=this._fillGradient:h&&(e.fillStyle=Yo.call(s,e)),c?e.strokeStyle=this._strokeGradient:d&&(e.strokeStyle=Yo.call(l,e));var f=i.lineDash,p=i.lineDashOffset,g=!!e.setLineDash,m=this.getGlobalScale();if(a.setScale(m[0],m[1],this.segmentIgnoreThreshold),this.__dirtyPath||f&&!g&&r?(a.beginPath(e),f&&!g&&(a.setLineDash(f),a.setLineDashOffset(p)),this.buildPath(a,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(e.beginPath(),this.path.rebuildPath(e)),o)if(null!=i.fillOpacity){var v=e.globalAlpha;e.globalAlpha=i.fillOpacity*i.opacity,a.fill(e),e.globalAlpha=v}else a.fill(e);if(f&&g&&(e.setLineDash(f),e.lineDashOffset=p),r)if(null!=i.strokeOpacity){v=e.globalAlpha;e.globalAlpha=i.strokeOpacity*i.opacity,a.stroke(e),e.globalAlpha=v}else a.stroke(e);f&&g&&e.setLineDash([]),null!=i.text&&(this.restoreTransform(e),this.drawRectText(e,this.getBoundingRect()))},buildPath:function(e,t,n){},createPathProxy:function(){this.path=new xo},getBoundingRect:function(){var e=this._rect,t=this.style,n=!e;if(n){var i=this.path;i||(i=this.path=new xo),this.__dirtyPath&&(i.beginPath(),this.buildPath(i,this.shape,!1)),e=i.getBoundingRect()}if(this._rect=e,t.hasStroke()){var a=this._rectWithStroke||(this._rectWithStroke=e.clone());if(this.__dirty||n){a.copy(e);var r=t.lineWidth,o=t.strokeNoScale?this.getLineScale():1;t.hasFill()||(r=Math.max(r,this.strokeContainThreshold||4)),o>1e-10&&(a.width+=r/o,a.height+=r/o,a.x-=r/o/2,a.y-=r/o/2)}return a}return e},contain:function(e,t){var n=this.transformCoordToLocal(e,t),i=this.getBoundingRect(),a=this.style;if(e=n[0],t=n[1],i.contain(e,t)){var r=this.path.data;if(a.hasStroke()){var o=a.lineWidth,s=a.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(a.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),Ho.containStroke(r,o/s,e,t)))return!0}if(a.hasFill())return Ho.contain(r,e,t)}return!1},dirty:function(e){null==e&&(e=!0),e&&(this.__dirtyPath=e,this._rect=null),this.__dirty=this.__dirtyText=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(e){return this.animate("shape",e)},attrKV:function(e,t){"shape"===e?(this.setShape(t),this.__dirtyPath=!0,this._rect=null):Ia.prototype.attrKV.call(this,e,t)},setShape:function(e,t){var n=this.shape;if(n){if(Ie.isObject(e))for(var i in e)e.hasOwnProperty(i)&&(n[i]=e[i]);else n[e]=t;this.dirty(!0)}return this},getLineScale:function(){var e=this.transform;return e&&Fo(e[0]-1)>1e-10&&Fo(e[3]-1)>1e-10?Math.sqrt(Fo(e[0]*e[3]-e[2]*e[1])):1}},Wo.extend=function(e){var t=function(t){Wo.call(this,t),e.style&&this.style.extendFrom(e.style,!1);var n=e.shape;if(n){this.shape=this.shape||{};var i=this.shape;for(var a in n)!i.hasOwnProperty(a)&&n.hasOwnProperty(a)&&(i[a]=n[a])}e.init&&e.init.call(this,t)};for(var n in Ie.inherits(t,Wo),e)"style"!==n&&"shape"!==n&&(t.prototype[n]=e[n]);return t},Ie.inherits(Wo,Ia);var jo=Wo,Uo=Le.applyTransform,Zo=xo.CMD,Xo=[[],[],[]],qo=Math.sqrt,Ko=Math.atan2;var Qo=function(e,t){var n,i,a,r,o,s=e.data,l=Zo.M,u=Zo.C,c=Zo.L,h=Zo.R,d=Zo.A,f=Zo.Q;for(a=0,r=0;a<s.length;){switch(n=s[a++],r=a,i=0,n){case l:case c:i=1;break;case u:i=3;break;case f:i=2;break;case d:var p=t[4],g=t[5],m=qo(t[0]*t[0]+t[1]*t[1]),v=qo(t[2]*t[2]+t[3]*t[3]),y=Ko(-t[1]/v,t[0]/m);s[a]*=m,s[a++]+=p,s[a]*=v,s[a++]+=g,s[a++]*=m,s[a++]*=v,s[a++]+=y,s[a++]+=y,r=a+=2;break;case h:_[0]=s[a++],_[1]=s[a++],Uo(_,_,t),s[r++]=_[0],s[r++]=_[1],_[0]+=s[a++],_[1]+=s[a++],Uo(_,_,t),s[r++]=_[0],s[r++]=_[1]}for(o=0;o<i;o++){var _;(_=Xo[o])[0]=s[a++],_[1]=s[a++],Uo(_,_,t),s[r++]=_[0],s[r++]=_[1]}}},$o=Math.sqrt,Jo=Math.sin,es=Math.cos,ts=Math.PI,ns=function(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])},is=function(e,t){return(e[0]*t[0]+e[1]*t[1])/(ns(e)*ns(t))},as=function(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(is(e,t))};function rs(e,t,n,i,a,r,o,s,l,u,c){var h=l*(ts/180),d=es(h)*(e-n)/2+Jo(h)*(t-i)/2,f=-1*Jo(h)*(e-n)/2+es(h)*(t-i)/2,p=d*d/(o*o)+f*f/(s*s);p>1&&(o*=$o(p),s*=$o(p));var g=(a===r?-1:1)*$o((o*o*(s*s)-o*o*(f*f)-s*s*(d*d))/(o*o*(f*f)+s*s*(d*d)))||0,m=g*o*f/s,v=g*-s*d/o,y=(e+n)/2+es(h)*m-Jo(h)*v,_=(t+i)/2+Jo(h)*m+es(h)*v,x=as([1,0],[(d-m)/o,(f-v)/s]),b=[(d-m)/o,(f-v)/s],w=[(-1*d-m)/o,(-1*f-v)/s],S=as(b,w);is(b,w)<=-1&&(S=ts),is(b,w)>=1&&(S=0),0===r&&S>0&&(S-=2*ts),1===r&&S<0&&(S+=2*ts),c.addData(u,y,_,o,s,x,S,h,r)}var os=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,ss=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function ls(e,t){var n=function(e){if(!e)return new xo;for(var t,n=0,i=0,a=n,r=i,o=new xo,s=xo.CMD,l=e.match(os),u=0;u<l.length;u++){for(var c,h=l[u],d=h.charAt(0),f=h.match(ss)||[],p=f.length,g=0;g<p;g++)f[g]=parseFloat(f[g]);for(var m=0;m<p;){var v,y,_,x,b,w,S,M=n,T=i;switch(d){case"l":n+=f[m++],i+=f[m++],c=s.L,o.addData(c,n,i);break;case"L":n=f[m++],i=f[m++],c=s.L,o.addData(c,n,i);break;case"m":n+=f[m++],i+=f[m++],c=s.M,o.addData(c,n,i),a=n,r=i,d="l";break;case"M":n=f[m++],i=f[m++],c=s.M,o.addData(c,n,i),a=n,r=i,d="L";break;case"h":n+=f[m++],c=s.L,o.addData(c,n,i);break;case"H":n=f[m++],c=s.L,o.addData(c,n,i);break;case"v":i+=f[m++],c=s.L,o.addData(c,n,i);break;case"V":i=f[m++],c=s.L,o.addData(c,n,i);break;case"C":c=s.C,o.addData(c,f[m++],f[m++],f[m++],f[m++],f[m++],f[m++]),n=f[m-2],i=f[m-1];break;case"c":c=s.C,o.addData(c,f[m++]+n,f[m++]+i,f[m++]+n,f[m++]+i,f[m++]+n,f[m++]+i),n+=f[m-2],i+=f[m-1];break;case"S":v=n,y=i;var I=o.len(),A=o.data;t===s.C&&(v+=n-A[I-4],y+=i-A[I-3]),c=s.C,M=f[m++],T=f[m++],n=f[m++],i=f[m++],o.addData(c,v,y,M,T,n,i);break;case"s":v=n,y=i;I=o.len(),A=o.data;t===s.C&&(v+=n-A[I-4],y+=i-A[I-3]),c=s.C,M=n+f[m++],T=i+f[m++],n+=f[m++],i+=f[m++],o.addData(c,v,y,M,T,n,i);break;case"Q":M=f[m++],T=f[m++],n=f[m++],i=f[m++],c=s.Q,o.addData(c,M,T,n,i);break;case"q":M=f[m++]+n,T=f[m++]+i,n+=f[m++],i+=f[m++],c=s.Q,o.addData(c,M,T,n,i);break;case"T":v=n,y=i;I=o.len(),A=o.data;t===s.Q&&(v+=n-A[I-4],y+=i-A[I-3]),n=f[m++],i=f[m++],c=s.Q,o.addData(c,v,y,n,i);break;case"t":v=n,y=i;I=o.len(),A=o.data;t===s.Q&&(v+=n-A[I-4],y+=i-A[I-3]),n+=f[m++],i+=f[m++],c=s.Q,o.addData(c,v,y,n,i);break;case"A":_=f[m++],x=f[m++],b=f[m++],w=f[m++],S=f[m++],rs(M=n,T=i,n=f[m++],i=f[m++],w,S,_,x,b,c=s.A,o);break;case"a":_=f[m++],x=f[m++],b=f[m++],w=f[m++],S=f[m++],rs(M=n,T=i,n+=f[m++],i+=f[m++],w,S,_,x,b,c=s.A,o)}}"z"!==d&&"Z"!==d||(c=s.Z,o.addData(c),n=a,i=r),t=c}return o.toStatic(),o}(e);return(t=t||{}).buildPath=function(e){if(e.setData){e.setData(n.data),(t=e.getContext())&&e.rebuildPath(t)}else{var t=e;n.rebuildPath(t)}},t.applyTransform=function(e){Qo(n,e),this.dirty(!0)},t}var us={createFromString:function(e,t){return new jo(ls(e,t))},extendFromString:function(e,t){return jo.extend(ls(e,t))},mergePath:function(e,t){for(var n=[],i=e.length,a=0;a<i;a++){var r=e[a];r.path||r.createPathProxy(),r.__dirtyPath&&r.buildPath(r.path,r.shape,!0),n.push(r.path)}var o=new jo(t);return o.createPathProxy(),o.buildPath=function(e){e.appendPath(n);var t=e.getContext();t&&e.rebuildPath(t)},o}},cs=ei.ContextCachedBy,hs=function(e){Ia.call(this,e)};hs.prototype={constructor:hs,type:"text",brush:function(e,t){var n=this.style;this.__dirty&&xa.normalizeTextStyle(n,!0),n.fill=n.stroke=n.shadowBlur=n.shadowColor=n.shadowOffsetX=n.shadowOffsetY=null;var i=n.text;null!=i&&(i+=""),xa.needDrawText(i,n)?(this.setTransform(e),xa.renderText(this,e,i,n,null,t),this.restoreTransform(e)):e.__attrCachedBy=cs.NONE},getBoundingRect:function(){var e=this.style;if(this.__dirty&&xa.normalizeTextStyle(e,!0),!this._rect){var t=e.text;null!=t?t+="":t="";var n=Wi.getBoundingRect(e.text+"",e.font,e.textAlign,e.textVerticalAlign,e.textPadding,e.textLineHeight,e.rich);if(n.x+=e.x||0,n.y+=e.y||0,xa.getStroke(e.textStroke,e.textStrokeWidth)){var i=e.textStrokeWidth;n.x-=i/2,n.y-=i/2,n.width+=i,n.height+=i}this._rect=n}return this._rect}},Ie.inherits(hs,Ia);var ds=hs,fs=jo.extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(e,t,n){n&&e.moveTo(t.cx+t.r,t.cy),e.arc(t.cx,t.cy,t.r,0,2*Math.PI,!0)}}),ps=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]];var gs=function(e){return ne.browser.ie&&ne.browser.version>=11?function(){var t,n=this.__clipPaths,i=this.style;if(n)for(var a=0;a<n.length;a++){var r=n[a],o=r&&r.shape,s=r&&r.type;if(o&&("sector"===s&&o.startAngle===o.endAngle||"rect"===s&&(!o.width||!o.height))){for(var l=0;l<ps.length;l++)ps[l][2]=i[ps[l][0]],i[ps[l][0]]=ps[l][1];t=!0;break}}if(e.apply(this,arguments),t)for(l=0;l<ps.length;l++)i[ps[l][0]]=ps[l][2]}:e},ms=jo.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},brush:gs(jo.prototype.brush),buildPath:function(e,t){var n=t.cx,i=t.cy,a=Math.max(t.r0||0,0),r=Math.max(t.r,0),o=t.startAngle,s=t.endAngle,l=t.clockwise,u=Math.cos(o),c=Math.sin(o);e.moveTo(u*a+n,c*a+i),e.lineTo(u*r+n,c*r+i),e.arc(n,i,r,o,s,!l),e.lineTo(Math.cos(s)*a+n,Math.sin(s)*a+i),0!==a&&e.arc(n,i,a,s,o,l),e.closePath()}}),vs=jo.extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(e,t){var n=t.cx,i=t.cy,a=2*Math.PI;e.moveTo(n+t.r,i),e.arc(n,i,t.r,0,a,!1),e.moveTo(n+t.r0,i),e.arc(n,i,t.r0,0,a,!0)}}),ys=Le.distance;function _s(e,t,n,i,a,r,o){var s=.5*(n-e),l=.5*(i-t);return(2*(t-n)+s+l)*o+(-3*(t-n)-2*s-l)*r+s*a+t}var xs=function(e,t){for(var n=e.length,i=[],a=0,r=1;r<n;r++)a+=ys(e[r-1],e[r]);var o=a/2;for(o=o<n?n:o,r=0;r<o;r++){var s,l,u,c=r/(o-1)*(t?n:n-1),h=Math.floor(c),d=c-h,f=e[h%n];t?(s=e[(h-1+n)%n],l=e[(h+1)%n],u=e[(h+2)%n]):(s=e[0===h?h:h-1],l=e[h>n-2?n-1:h+1],u=e[h>n-3?n-1:h+2]);var p=d*d,g=d*p;i.push([_s(s[0],f[0],l[0],u[0],d,p,g),_s(s[1],f[1],l[1],u[1],d,p,g)])}return i},bs=Le.min,ws=Le.max,Ss=Le.scale,Ms=Le.distance,Ts=Le.add,Is=Le.clone,As=Le.sub;var Ds=function(e,t,n,i){var a,r,o,s,l=[],u=[],c=[],h=[];if(i){o=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,f=e.length;d<f;d++)bs(o,o,e[d]),ws(s,s,e[d]);bs(o,o,i[0]),ws(s,s,i[1])}for(d=0,f=e.length;d<f;d++){var p=e[d];if(n)a=e[d?d-1:f-1],r=e[(d+1)%f];else{if(0===d||d===f-1){l.push(Is(e[d]));continue}a=e[d-1],r=e[d+1]}As(u,r,a),Ss(u,u,t);var g=Ms(p,a),m=Ms(p,r),v=g+m;0!==v&&(g/=v,m/=v),Ss(c,u,-g),Ss(h,u,m);var y=Ts([],p,c),_=Ts([],p,h);i&&(ws(y,y,o),bs(y,y,s),ws(_,_,o),bs(_,_,s)),l.push(y),l.push(_)}return n&&l.push(l.shift()),l};var Cs={buildPath:function(e,t,n){var i=t.points,a=t.smooth;if(i&&i.length>=2){if(a&&"spline"!==a){var r=Ds(i,a,n,t.smoothConstraint);e.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(n?o:o-1);s++){var l=r[2*s],u=r[2*s+1],c=i[(s+1)%o];e.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{"spline"===a&&(i=xs(i,n)),e.moveTo(i[0][0],i[0][1]);s=1;for(var h=i.length;s<h;s++)e.lineTo(i[s][0],i[s][1])}n&&e.closePath()}}},Os=jo.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(e,t){Cs.buildPath(e,t,!0)}}),ks=jo.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(e,t){Cs.buildPath(e,t,!1)}}),Ls=Math.round;function Es(e,t,n){if(!t)return e;var i=Ls(2*e);return(i+Ls(t))%2==0?i/2:(i+(n?1:-1))/2}var Ns={subPixelOptimizeLine:function(e,t,n){if(t){var i=t.x1,a=t.x2,r=t.y1,o=t.y2;e.x1=i,e.x2=a,e.y1=r,e.y2=o;var s=n&&n.lineWidth;s&&(Ls(2*i)===Ls(2*a)&&(e.x1=e.x2=Es(i,s,!0)),Ls(2*r)===Ls(2*o)&&(e.y1=e.y2=Es(r,s,!0)))}},subPixelOptimizeRect:function(e,t,n){if(t){var i=t.x,a=t.y,r=t.width,o=t.height;e.x=i,e.y=a,e.width=r,e.height=o;var s=n&&n.lineWidth;s&&(e.x=Es(i,s,!0),e.y=Es(a,s,!0),e.width=Math.max(Es(i+r,s,!1)-e.x,0===r?0:1),e.height=Math.max(Es(a+o,s,!1)-e.y,0===o?0:1))}},subPixelOptimize:Es},Ps=Ns.subPixelOptimizeRect,Rs={},zs=jo.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(e,t){var n,i,a,r;this.subPixelOptimize?(Ps(Rs,t,this.style),n=Rs.x,i=Rs.y,a=Rs.width,r=Rs.height,Rs.r=t.r,t=Rs):(n=t.x,i=t.y,a=t.width,r=t.height),t.r?ji.buildPath(e,t):e.rect(n,i,a,r),e.closePath()}}),Bs=Ns.subPixelOptimizeLine,Vs={},Hs=jo.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(e,t){var n,i,a,r;this.subPixelOptimize?(Bs(Vs,t,this.style),n=Vs.x1,i=Vs.y1,a=Vs.x2,r=Vs.y2):(n=t.x1,i=t.y1,a=t.x2,r=t.y2);var o=t.percent;0!==o&&(e.moveTo(n,i),o<1&&(a=n*(1-o)+a*o,r=i*(1-o)+r*o),e.lineTo(a,r))},pointAt:function(e){var t=this.shape;return[t.x1*(1-e)+t.x2*e,t.y1*(1-e)+t.y2*e]}}),Ys=Zr.quadraticSubdivide,Fs=Zr.cubicSubdivide,Gs=Zr.quadraticAt,Ws=Zr.cubicAt,js=Zr.quadraticDerivativeAt,Us=Zr.cubicDerivativeAt,Zs=[];function Xs(e,t,n){var i=e.cpx2,a=e.cpy2;return null===i||null===a?[(n?Us:Ws)(e.x1,e.cpx1,e.cpx2,e.x2,t),(n?Us:Ws)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(n?js:Gs)(e.x1,e.cpx1,e.x2,t),(n?js:Gs)(e.y1,e.cpy1,e.y2,t)]}var qs=jo.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(e,t){var n=t.x1,i=t.y1,a=t.x2,r=t.y2,o=t.cpx1,s=t.cpy1,l=t.cpx2,u=t.cpy2,c=t.percent;0!==c&&(e.moveTo(n,i),null==l||null==u?(c<1&&(Ys(n,o,a,c,Zs),o=Zs[1],a=Zs[2],Ys(i,s,r,c,Zs),s=Zs[1],r=Zs[2]),e.quadraticCurveTo(o,s,a,r)):(c<1&&(Fs(n,o,l,a,c,Zs),o=Zs[1],l=Zs[2],a=Zs[3],Fs(i,s,u,r,c,Zs),s=Zs[1],u=Zs[2],r=Zs[3]),e.bezierCurveTo(o,s,l,u,a,r)))},pointAt:function(e){return Xs(this.shape,e,!1)},tangentAt:function(e){var t=Xs(this.shape,e,!0);return Le.normalize(t,t)}}),Ks=jo.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(e,t){var n=t.cx,i=t.cy,a=Math.max(t.r,0),r=t.startAngle,o=t.endAngle,s=t.clockwise,l=Math.cos(r),u=Math.sin(r);e.moveTo(l*a+n,u*a+i),e.arc(n,i,a,r,o,!s)}}),Qs=jo.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var e=this.__dirtyPath,t=this.shape.paths,n=0;n<t.length;n++)e=e||t[n].__dirtyPath;this.__dirtyPath=e,this.__dirty=this.__dirty||e},beforeBrush:function(){this._updatePathDirty();for(var e=this.shape.paths||[],t=this.getGlobalScale(),n=0;n<e.length;n++)e[n].path||e[n].createPathProxy(),e[n].path.setScale(t[0],t[1],e[n].segmentIgnoreThreshold)},buildPath:function(e,t){for(var n=t.paths||[],i=0;i<n.length;i++)n[i].buildPath(e,n[i].shape,!0)},afterBrush:function(){for(var e=this.shape.paths||[],t=0;t<e.length;t++)e[t].__dirtyPath=!1},getBoundingRect:function(){return this._updatePathDirty(),jo.prototype.getBoundingRect.call(this)}}),$s=function(e){this.colorStops=e||[]};$s.prototype={constructor:$s,addColorStop:function(e,t){this.colorStops.push({offset:e,color:t})}};var Js=$s,el=function(e,t,n,i,a,r){this.x=null==e?0:e,this.y=null==t?0:t,this.x2=null==n?1:n,this.y2=null==i?0:i,this.type="linear",this.global=r||!1,Js.call(this,a)};el.prototype={constructor:el},Ie.inherits(el,Js);var tl=el,nl=function(e,t,n,i,a){this.x=null==e?.5:e,this.y=null==t?.5:t,this.r=null==n?.5:n,this.type="radial",this.global=a||!1,Js.call(this,i)};nl.prototype={constructor:nl},Ie.inherits(nl,Js);var il=nl,al=Ie.inherits;function rl(e){Ia.call(this,e),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}rl.prototype.incremental=!0,rl.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},rl.prototype.addDisplayable=function(e,t){t?this._temporaryDisplayables.push(e):this._displayables.push(e),this.dirty()},rl.prototype.addDisplayables=function(e,t){t=t||!1;for(var n=0;n<e.length;n++)this.addDisplayable(e[n],t)},rl.prototype.eachPendingDisplayable=function(e){for(var t=this._cursor;t<this._displayables.length;t++)e&&e(this._displayables[t]);for(t=0;t<this._temporaryDisplayables.length;t++)e&&e(this._temporaryDisplayables[t])},rl.prototype.update=function(){this.updateTransform();for(var e=this._cursor;e<this._displayables.length;e++){(t=this._displayables[e]).parent=this,t.update(),t.parent=null}for(e=0;e<this._temporaryDisplayables.length;e++){var t;(t=this._temporaryDisplayables[e]).parent=this,t.update(),t.parent=null}},rl.prototype.brush=function(e,t){for(var n=this._cursor;n<this._displayables.length;n++){(i=this._displayables[n]).beforeBrush&&i.beforeBrush(e),i.brush(e,n===this._cursor?null:this._displayables[n-1]),i.afterBrush&&i.afterBrush(e)}this._cursor=n;for(n=0;n<this._temporaryDisplayables.length;n++){var i;(i=this._temporaryDisplayables[n]).beforeBrush&&i.beforeBrush(e),i.brush(e,0===n?null:this._temporaryDisplayables[n-1]),i.afterBrush&&i.afterBrush(e)}this._temporaryDisplayables=[],this.notClear=!0};var ol=[];rl.prototype.getBoundingRect=function(){if(!this._rect){for(var e=new Hn(1/0,1/0,-1/0,-1/0),t=0;t<this._displayables.length;t++){var n=this._displayables[t],i=n.getBoundingRect().clone();n.needLocalTransform()&&i.applyTransform(n.getLocalTransform(ol)),e.union(i)}this._rect=e}return this._rect},rl.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t);if(this.getBoundingRect().contain(n[0],n[1]))for(var i=0;i<this._displayables.length;i++){if(this._displayables[i].contain(e,t))return!0}return!1},al(rl,Ia);var sl=rl,ll=Da,ul=Fn,cl=ds,hl=fs,dl=ms,fl=vs,pl=Os,gl=ks,ml=zs,vl=Hs,yl=qs,_l=Ks,xl=Qs,bl=tl,wl=il,Sl=Hn,Ml=sl,Tl=Math.max,Il=Math.min,Al={},Dl=1,Cl={},Ol={};function kl(e,t){Ol[e]=t}function Ll(e,t,n,i){var a=us.createFromString(e,t);return n&&("center"===i&&(n=El(n,a.getBoundingRect())),Pl(a,n)),a}function El(e,t){var n,i=t.width/t.height,a=e.height*i;return n=a<=e.width?e.height:(a=e.width)/i,{x:e.x+e.width/2-a/2,y:e.y+e.height/2-n/2,width:a,height:n}}var Nl=us.mergePath;function Pl(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}var Rl=Ns.subPixelOptimize;function zl(e){return null!=e&&"none"!==e}var Bl=Ie.createHashMap(),Vl=0;function Hl(e){var t=e.__hoverStl;if(t&&!e.__highlighted){var n=e.__zr,i=e.useHoverLayer&&n&&"canvas"===n.painter.type;if(e.__highlighted=i?"layer":"plain",!(e.isGroup||!n&&e.useHoverLayer)){var a=e,r=e.style;i&&(r=(a=n.addHover(e)).style),nu(r),i||function(e){if(e.__hoverStlDirty){e.__hoverStlDirty=!1;var t=e.__hoverStl;if(t){var n=e.__cachedNormalStl={};e.__cachedNormalZ2=e.z2;var i=e.style;for(var a in t)null!=t[a]&&(n[a]=i[a]);n.fill=i.fill,n.stroke=i.stroke}else e.__cachedNormalStl=e.__cachedNormalZ2=null}}(a),r.extendFrom(t),Yl(r,t,"fill"),Yl(r,t,"stroke"),tu(r),i||(e.dirty(!1),e.z2+=1)}}}function Yl(e,t,n){!zl(t[n])&&zl(e[n])&&(e[n]=function(e){if("string"!=typeof e)return e;var t=Bl.get(e);return t||(t=en.lift(e,-.1),Vl<1e4&&(Bl.set(e,t),Vl++)),t}(e[n]))}function Fl(e){var t=e.__highlighted;if(t&&(e.__highlighted=!1,!e.isGroup))if("layer"===t)e.__zr&&e.__zr.removeHover(e);else{var n=e.style,i=e.__cachedNormalStl;i&&(nu(n),e.setStyle(i),tu(n));var a=e.__cachedNormalZ2;null!=a&&e.z2-a==1&&(e.z2=a)}}function Gl(e,t,n){var i,a="normal",r="normal";e.__highlighted&&(a="emphasis",i=!0),t(e,n),e.__highlighted&&(r="emphasis",i=!0),e.isGroup&&e.traverse((function(e){!e.isGroup&&t(e,n)})),i&&e.__highDownOnUpdate&&e.__highDownOnUpdate(a,r)}function Wl(e,t){t=e.__hoverStl=!1!==t&&(e.hoverStyle||t||{}),e.__hoverStlDirty=!0,e.__highlighted&&(e.__cachedNormalStl=null,Fl(e),Hl(e))}function jl(e){!ql(this,e)&&!this.__highByOuter&&Gl(this,Hl)}function Ul(e){!ql(this,e)&&!this.__highByOuter&&Gl(this,Fl)}function Zl(e){this.__highByOuter|=1<<(e||0),Gl(this,Hl)}function Xl(e){!(this.__highByOuter&=~(1<<(e||0)))&&Gl(this,Fl)}function ql(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function Kl(e,t){var n=!1===t;if(e.__highDownSilentOnTouch=e.highDownSilentOnTouch,e.__highDownOnUpdate=e.highDownOnUpdate,!n||e.__highDownDispatcher){var i=n?"off":"on";e[i]("mouseover",jl)[i]("mouseout",Ul),e[i]("emphasis",Zl)[i]("normal",Xl),e.__highByOuter=e.__highByOuter||0,e.__highDownDispatcher=!n}}function Ql(e,t,n,i,a){return $l(e,t,i,a),n&&Ie.extend(e,n),e}function $l(e,t,n,i){if((n=n||Al).isRectText){var a;n.getTextPosition?a=n.getTextPosition(t,i):"outside"===(a=t.getShallow("position")||(i?null:"inside"))&&(a="top"),e.textPosition=a,e.textOffset=t.getShallow("offset");var r=t.getShallow("rotate");null!=r&&(r*=Math.PI/180),e.textRotation=r,e.textDistance=Ie.retrieve2(t.getShallow("distance"),i?null:5)}var o,s=t.ecModel,l=s&&s.option.textStyle,u=function(e){var t;for(;e&&e!==e.ecModel;){var n=(e.option||Al).rich;if(n)for(var i in t=t||{},n)n.hasOwnProperty(i)&&(t[i]=1);e=e.parentModel}return t}(t);if(u)for(var c in o={},u)if(u.hasOwnProperty(c)){var h=t.getModel(["rich",c]);Jl(o[c]={},h,l,n,i)}return e.rich=o,Jl(e,t,l,n,i,!0),n.forceRich&&!n.textStyle&&(n.textStyle={}),e}function Jl(e,t,n,i,a,r){n=!a&&n||Al,e.textFill=eu(t.getShallow("color"),i)||n.color,e.textStroke=eu(t.getShallow("textBorderColor"),i)||n.textBorderColor,e.textStrokeWidth=Ie.retrieve2(t.getShallow("textBorderWidth"),n.textBorderWidth),a||(r&&(e.insideRollbackOpt=i,tu(e)),null==e.textFill&&(e.textFill=i.autoColor)),e.fontStyle=t.getShallow("fontStyle")||n.fontStyle,e.fontWeight=t.getShallow("fontWeight")||n.fontWeight,e.fontSize=t.getShallow("fontSize")||n.fontSize,e.fontFamily=t.getShallow("fontFamily")||n.fontFamily,e.textAlign=t.getShallow("align"),e.textVerticalAlign=t.getShallow("verticalAlign")||t.getShallow("baseline"),e.textLineHeight=t.getShallow("lineHeight"),e.textWidth=t.getShallow("width"),e.textHeight=t.getShallow("height"),e.textTag=t.getShallow("tag"),r&&i.disableBox||(e.textBackgroundColor=eu(t.getShallow("backgroundColor"),i),e.textPadding=t.getShallow("padding"),e.textBorderColor=eu(t.getShallow("borderColor"),i),e.textBorderWidth=t.getShallow("borderWidth"),e.textBorderRadius=t.getShallow("borderRadius"),e.textBoxShadowColor=t.getShallow("shadowColor"),e.textBoxShadowBlur=t.getShallow("shadowBlur"),e.textBoxShadowOffsetX=t.getShallow("shadowOffsetX"),e.textBoxShadowOffsetY=t.getShallow("shadowOffsetY")),e.textShadowColor=t.getShallow("textShadowColor")||n.textShadowColor,e.textShadowBlur=t.getShallow("textShadowBlur")||n.textShadowBlur,e.textShadowOffsetX=t.getShallow("textShadowOffsetX")||n.textShadowOffsetX,e.textShadowOffsetY=t.getShallow("textShadowOffsetY")||n.textShadowOffsetY}function eu(e,t){return"auto"!==e?e:t&&t.autoColor?t.autoColor:null}function tu(e){var t,n=e.textPosition,i=e.insideRollbackOpt;if(i&&null==e.textFill){var a=i.autoColor,r=i.isRectText,o=i.useInsideStyle,s=!1!==o&&(!0===o||r&&n&&"string"==typeof n&&n.indexOf("inside")>=0),l=!s&&null!=a;(s||l)&&(t={textFill:e.textFill,textStroke:e.textStroke,textStrokeWidth:e.textStrokeWidth}),s&&(e.textFill="#fff",null==e.textStroke&&(e.textStroke=a,null==e.textStrokeWidth&&(e.textStrokeWidth=2))),l&&(e.textFill=a)}e.insideRollback=t}function nu(e){var t=e.insideRollback;t&&(e.textFill=t.textFill,e.textStroke=t.textStroke,e.textStrokeWidth=t.textStrokeWidth,e.insideRollback=null)}function iu(e,t,n,i,a,r){if("function"==typeof a&&(r=a,a=null),i&&i.isAnimationEnabled()){var o=e?"Update":"",s=i.getShallow("animationDuration"+o),l=i.getShallow("animationEasing"+o),u=i.getShallow("animationDelay"+o);"function"==typeof u&&(u=u(a,i.getAnimationDelayParams?i.getAnimationDelayParams(t,a):null)),"function"==typeof s&&(s=s(a)),s>0?t.animateTo(n,s,u||0,l,r,!!r):(t.stopAnimation(),t.attr(n),r&&r())}else t.stopAnimation(),t.attr(n),r&&r()}function au(e,t,n,i,a){iu(!0,e,t,n,i,a)}function ru(e,t,n){return t&&!Ie.isArrayLike(t)&&(t=It.getLocalTransform(t)),n&&(t=yt.invert([],t)),Le.applyTransform([],e,t)}function ou(e,t,n,i,a,r,o,s){var l,u=n-e,c=i-t,h=o-a,d=s-r,f=su(h,d,u,c);if((l=f)<=1e-6&&l>=-1e-6)return!1;var p=e-a,g=t-r,m=su(p,g,u,c)/f;if(m<0||m>1)return!1;var v=su(p,g,h,d)/f;return!(v<0||v>1)}function su(e,t,n,i){return e*i-n*t}kl("circle",fs),kl("sector",ms),kl("ring",vs),kl("polygon",Os),kl("polyline",ks),kl("rect",zs),kl("line",Hs),kl("bezierCurve",qs),kl("arc",Ks);var lu={Image:ll,Group:ul,Text:cl,Circle:hl,Sector:dl,Ring:fl,Polygon:pl,Polyline:gl,Rect:ml,Line:vl,BezierCurve:yl,Arc:_l,CompoundPath:xl,LinearGradient:bl,RadialGradient:wl,BoundingRect:Sl,IncrementalDisplayable:Ml,Z2_EMPHASIS_LIFT:1,CACHED_LABEL_STYLE_PROPERTIES:{color:"textFill",textBorderColor:"textStroke",textBorderWidth:"textStrokeWidth"},extendShape:function(e){return jo.extend(e)},extendPath:function(e,t){return us.extendFromString(e,t)},registerShape:kl,getShapeClass:function(e){if(Ol.hasOwnProperty(e))return Ol[e]},makePath:Ll,makeImage:function(e,t,n){var i=new Da({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(e){if("center"===n){var a={width:e.width,height:e.height};i.setStyle(El(t,a))}}});return i},mergePath:Nl,resizePath:Pl,subPixelOptimizeLine:function(e){return Ns.subPixelOptimizeLine(e.shape,e.shape,e.style),e},subPixelOptimizeRect:function(e){return Ns.subPixelOptimizeRect(e.shape,e.shape,e.style),e},subPixelOptimize:Rl,setElementHoverStyle:Wl,setHoverStyle:function(e,t){Kl(e,!0),Gl(e,Wl,t)},setAsHighDownDispatcher:Kl,isHighDownDispatcher:function(e){return!(!e||!e.__highDownDispatcher)},getHighlightDigit:function(e){var t=Cl[e];return null==t&&Dl<=32&&(t=Cl[e]=Dl++),t},setLabelStyle:function(e,t,n,i,a,r,o){var s,l=(a=a||Al).labelFetcher,u=a.labelDataIndex,c=a.labelDimIndex,h=a.labelProp,d=n.getShallow("show"),f=i.getShallow("show");(d||f)&&(l&&(s=l.getFormattedLabel(u,"normal",null,c,h)),null==s&&(s=Ie.isFunction(a.defaultText)?a.defaultText(u,a):a.defaultText));var p=d?s:null,g=f?Ie.retrieve2(l?l.getFormattedLabel(u,"emphasis",null,c,h):null,s):null;null==p&&null==g||(Ql(e,n,r,a),Ql(t,i,o,a,!0)),e.text=p,t.text=g},modifyLabelStyle:function(e,t,n){var i=e.style;t&&(nu(i),e.setStyle(t),tu(i)),i=e.__hoverStl,n&&i&&(nu(i),Ie.extend(i,n),tu(i))},setTextStyle:Ql,setText:function(e,t,n){var i,a={isRectText:!0};!1===n?i=!0:a.autoColor=n,$l(e,t,a,i)},getFont:function(e,t){var n=t&&t.getModel("textStyle");return Ie.trim([e.fontStyle||n&&n.getShallow("fontStyle")||"",e.fontWeight||n&&n.getShallow("fontWeight")||"",(e.fontSize||n&&n.getShallow("fontSize")||12)+"px",e.fontFamily||n&&n.getShallow("fontFamily")||"sans-serif"].join(" "))},updateProps:au,initProps:function(e,t,n,i,a){iu(!1,e,t,n,i,a)},getTransform:function(e,t){for(var n=yt.identity([]);e&&e!==t;)yt.mul(n,e.getLocalTransform(),n),e=e.parent;return n},applyTransform:ru,transformDirection:function(e,t,n){var i=0===t[4]||0===t[5]||0===t[0]?1:Math.abs(2*t[4]/t[0]),a=0===t[4]||0===t[5]||0===t[2]?1:Math.abs(2*t[4]/t[2]),r=["left"===e?-i:"right"===e?i:0,"top"===e?-a:"bottom"===e?a:0];return r=ru(r,t,n),Math.abs(r[0])>Math.abs(r[1])?r[0]>0?"right":"left":r[1]>0?"bottom":"top"},groupTransition:function(e,t,n,i){if(e&&t){var a,r=(a={},e.traverse((function(e){!e.isGroup&&e.anid&&(a[e.anid]=e)})),a);t.traverse((function(e){if(!e.isGroup&&e.anid){var t=r[e.anid];if(t){var i=o(e);e.attr(o(t)),au(e,i,n,e.dataIndex)}}}))}function o(e){var t={position:Le.clone(e.position),rotation:e.rotation};return e.shape&&(t.shape=Ie.extend({},e.shape)),t}},clipPointsByRect:function(e,t){return Ie.map(e,(function(e){var n=e[0];n=Tl(n,t.x),n=Il(n,t.x+t.width);var i=e[1];return i=Tl(i,t.y),[n,i=Il(i,t.y+t.height)]}))},clipRectByRect:function(e,t){var n=Tl(e.x,t.x),i=Il(e.x+e.width,t.x+t.width),a=Tl(e.y,t.y),r=Il(e.y+e.height,t.y+t.height);if(i>=n&&r>=a)return{x:n,y:a,width:i-n,height:r-a}},createIcon:function(e,t,n){var i=(t=Ie.extend({rectHover:!0},t)).style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},e)return 0===e.indexOf("image://")?(i.image=e.slice(8),Ie.defaults(i,n),new Da(t)):Ll(e.replace("path://",""),t,n,"center")},linePolygonIntersect:function(e,t,n,i,a){for(var r=0,o=a[a.length-1];r<a.length;r++){var s=a[r];if(ou(e,t,n,i,s[0],s[1],o[0],o[1]))return!0;o=s}},lineLineIntersect:ou},uu=["textStyle","color"],cu={getTextColor:function(e){var t=this.ecModel;return this.getShallow("color")||(!e&&t?t.get(uu):null)},getFont:function(){return lu.getFont({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(e){return Wi.getBoundingRect(e,this.getFont(),this.getShallow("align"),this.getShallow("verticalAlign")||this.getShallow("baseline"),this.getShallow("padding"),this.getShallow("lineHeight"),this.getShallow("rich"),this.getShallow("truncateText"))}},hu=Or([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),du={getItemStyle:function(e,t){var n=hu(this,e,t),i=this.getBorderLineDash();return i&&(n.lineDash=i),n},getBorderLineDash:function(){var e=this.get("borderType");return"solid"===e||null==e?null:"dashed"===e?[5,5]:[1,1]}},fu=Sr.makeInner,pu=Cr.enableClassExtend,gu=Cr.enableClassCheck,mu=Ie.mixin,vu=fu();function yu(e,t,n){this.parentModel=t,this.ecModel=n,this.option=e}function _u(e,t,n){for(var i=0;i<t.length&&(!t[i]||null!=(e=e&&"object"==typeof e?e[t[i]]:null));i++);return null==e&&n&&(e=n.get(t)),e}function xu(e,t){var n=vu(e).getParent;return n?n.call(e,t):e.parentModel}yu.prototype={constructor:yu,init:null,mergeOption:function(e){Ie.merge(this.option,e,!0)},get:function(e,t){return null==e?this.option:_u(this.option,this.parsePath(e),!t&&xu(this,e))},getShallow:function(e,t){var n=this.option,i=null==n?n:n[e],a=!t&&xu(this,e);return null==i&&a&&(i=a.getShallow(e)),i},getModel:function(e,t){var n;return new yu(null==e?this.option:_u(this.option,e=this.parsePath(e)),t=t||(n=xu(this,e))&&n.getModel(e),this.ecModel)},isEmpty:function(){return null==this.option},restoreData:function(){},clone:function(){return new(0,this.constructor)(Ie.clone(this.option))},setReadOnly:function(e){},parsePath:function(e){return"string"==typeof e&&(e=e.split(".")),e},customizeGetParent:function(e){vu(this).getParent=e},isAnimationEnabled:function(){if(!ne.node){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}}},pu(yu),gu(yu),mu(yu,Lr),mu(yu,Nr),mu(yu,cu),mu(yu,du);var bu=yu,wu=Cr.parseClassType,Su=0;var Mu={getUID:function(e){return[e||"",Su++,Math.random().toFixed(5)].join("_")},enableSubTypeDefaulter:function(e){var t={};return e.registerSubTypeDefaulter=function(e,n){e=wu(e),t[e.main]=n},e.determineSubType=function(n,i){var a=i.type;if(!a){var r=wu(n).main;e.hasSubTypes(n)&&t[r]&&(a=t[r](i))}return a},e},enableTopologicalTravel:function(e,t){function n(e,t){return e[t]||(e[t]={predecessor:[],successor:[]}),e[t]}e.topologicalTravel=function(e,i,a,r){if(e.length){var o=function(e){var i={},a=[];return Ie.each(e,(function(r){var o=n(i,r),s=function(e,t){var n=[];return Ie.each(e,(function(e){Ie.indexOf(t,e)>=0&&n.push(e)})),n}(o.originalDeps=t(r),e);o.entryCount=s.length,0===o.entryCount&&a.push(r),Ie.each(s,(function(e){Ie.indexOf(o.predecessor,e)<0&&o.predecessor.push(e);var t=n(i,e);Ie.indexOf(t.successor,e)<0&&t.successor.push(r)}))})),{graph:i,noEntryList:a}}(i),s=o.graph,l=o.noEntryList,u={};for(Ie.each(e,(function(e){u[e]=!0}));l.length;){var c=l.pop(),h=s[c],d=!!u[c];d&&(a.call(r,c,h.originalDeps.slice()),delete u[c]),Ie.each(h.successor,d?p:f)}Ie.each(u,(function(){throw new Error("Circle dependency may exists")}))}function f(e){s[e].entryCount--,0===s[e].entryCount&&l.push(e)}function p(e){u[e]=!0,f(e)}}}};var Tu=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function Iu(e){if(0===e)return 0;var t=Math.floor(Math.log(e)/Math.LN10);return e/Math.pow(10,t)>=10&&t++,t}var Au={linearMap:function(e,t,n,i){var a=t[1]-t[0],r=n[1]-n[0];if(0===a)return 0===r?n[0]:(n[0]+n[1])/2;if(i)if(a>0){if(e<=t[0])return n[0];if(e>=t[1])return n[1]}else{if(e>=t[0])return n[0];if(e<=t[1])return n[1]}else{if(e===t[0])return n[0];if(e===t[1])return n[1]}return(e-t[0])/a*r+n[0]},parsePercent:function(e,t){switch(e){case"center":case"middle":e="50%";break;case"left":case"top":e="0%";break;case"right":case"bottom":e="100%"}return"string"==typeof e?(n=e,n.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(e)/100*t:parseFloat(e):null==e?NaN:+e;var n},round:function(e,t,n){return null==t&&(t=10),t=Math.min(Math.max(0,t),20),e=(+e).toFixed(t),n?e:+e},asc:function(e){return e.sort((function(e,t){return e-t})),e},getPrecision:function(e){if(e=+e,isNaN(e))return 0;for(var t=1,n=0;Math.round(e*t)/t!==e;)t*=10,n++;return n},getPrecisionSafe:function(e){var t=e.toString(),n=t.indexOf("e");if(n>0){var i=+t.slice(n+1);return i<0?-i:0}var a=t.indexOf(".");return a<0?0:t.length-1-a},getPixelPrecision:function(e,t){var n=Math.log,i=Math.LN10,a=Math.floor(n(e[1]-e[0])/i),r=Math.round(n(Math.abs(t[1]-t[0]))/i),o=Math.min(Math.max(-a+r,0),20);return isFinite(o)?o:20},getPercentWithPrecision:function(e,t,n){if(!e[t])return 0;var i=Ie.reduce(e,(function(e,t){return e+(isNaN(t)?0:t)}),0);if(0===i)return 0;for(var a=Math.pow(10,n),r=Ie.map(e,(function(e){return(isNaN(e)?0:e)/i*a*100})),o=100*a,s=Ie.map(r,(function(e){return Math.floor(e)})),l=Ie.reduce(s,(function(e,t){return e+t}),0),u=Ie.map(r,(function(e,t){return e-s[t]}));l<o;){for(var c=Number.NEGATIVE_INFINITY,h=null,d=0,f=u.length;d<f;++d)u[d]>c&&(c=u[d],h=d);++s[h],u[h]=0,++l}return s[t]/a},MAX_SAFE_INTEGER:9007199254740991,remRadian:function(e){var t=2*Math.PI;return(e%t+t)%t},isRadianAroundZero:function(e){return e>-1e-4&&e<1e-4},parseDate:function(e){if(e instanceof Date)return e;if("string"==typeof e){var t=Tu.exec(e);if(!t)return new Date(NaN);if(t[8]){var n=+t[4]||0;return"Z"!==t[8].toUpperCase()&&(n-=t[8].slice(0,3)),new Date(Date.UTC(+t[1],+(t[2]||1)-1,+t[3]||1,n,+(t[5]||0),+t[6]||0,+t[7]||0))}return new Date(+t[1],+(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,+t[7]||0)}return null==e?new Date(NaN):new Date(Math.round(e))},quantity:function(e){return Math.pow(10,Iu(e))},quantityExponent:Iu,nice:function(e,t){var n=Iu(e),i=Math.pow(10,n),a=e/i;return e=(t?a<1.5?1:a<2.5?2:a<4?3:a<7?5:10:a<1?1:a<2?2:a<3?3:a<5?5:10)*i,n>=-20?+e.toFixed(n<0?-n:0):e},quantile:function(e,t){var n=(e.length-1)*t+1,i=Math.floor(n),a=+e[i-1],r=n-i;return r?a+r*(e[i]-a):a},reformIntervals:function(e){e.sort((function(e,t){return function e(t,n,i){return t.interval[i]<n.interval[i]||t.interval[i]===n.interval[i]&&(t.close[i]-n.close[i]==(i?-1:1)||!i&&e(t,n,1))}(e,t,0)?-1:1}));for(var t=-1/0,n=1,i=0;i<e.length;){for(var a=e[i].interval,r=e[i].close,o=0;o<2;o++)a[o]<=t&&(a[o]=t,r[o]=o?1:1-n),t=a[o],n=r[o];a[0]===a[1]&&r[0]*r[1]!=1?e.splice(i,1):i++}return e},isNumeric:function(e){return e-parseFloat(e)>=0}};var Du=Ie.normalizeCssArray,Cu=/([&<>"'])/g,Ou={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function ku(e){return null==e?"":(e+"").replace(Cu,(function(e,t){return Ou[t]}))}var Lu=["a","b","c","d","e","f","g"],Eu=function(e,t){return"{"+e+(null==t?"":t)+"}"};function Nu(e,t){return"0000".substr(0,t-(e+="").length)+e}var Pu={addCommas:function(e){return isNaN(e)?"-":(e=(e+"").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")},toCamelCase:function(e,t){return e=(e||"").toLowerCase().replace(/-(.)/g,(function(e,t){return t.toUpperCase()})),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e},normalizeCssArray:Du,encodeHTML:ku,formatTpl:function(e,t,n){Ie.isArray(t)||(t=[t]);var i=t.length;if(!i)return"";for(var a=t[0].$vars||[],r=0;r<a.length;r++){var o=Lu[r];e=e.replace(Eu(o),Eu(o,0))}for(var s=0;s<i;s++)for(var l=0;l<a.length;l++){var u=t[s][a[l]];e=e.replace(Eu(Lu[l],s),n?ku(u):u)}return e},formatTplSimple:function(e,t,n){return Ie.each(t,(function(t,i){e=e.replace("{"+i+"}",n?ku(t):t)})),e},getTooltipMarker:function(e,t){var n=(e=Ie.isString(e)?{color:e,extraCssText:t}:e||{}).color,i=e.type,a=(t=e.extraCssText,e.renderMode||"html"),r=e.markerId||"X";return n?"html"===a?"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:'+ku(n)+";"+(t||"")+'"></span>':'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:'+ku(n)+";"+(t||"")+'"></span>':{renderMode:a,content:"{marker"+r+"|}  ",style:{color:n}}:""},formatTime:function(e,t,n){"week"!==e&&"month"!==e&&"quarter"!==e&&"half-year"!==e&&"year"!==e||(e="MM-dd\nyyyy");var i=Au.parseDate(t),a=n?"UTC":"",r=i["get"+a+"FullYear"](),o=i["get"+a+"Month"]()+1,s=i["get"+a+"Date"](),l=i["get"+a+"Hours"](),u=i["get"+a+"Minutes"](),c=i["get"+a+"Seconds"](),h=i["get"+a+"Milliseconds"]();return e=e.replace("MM",Nu(o,2)).replace("M",o).replace("yyyy",r).replace("yy",r%100).replace("dd",Nu(s,2)).replace("d",s).replace("hh",Nu(l,2)).replace("h",l).replace("mm",Nu(u,2)).replace("m",u).replace("ss",Nu(c,2)).replace("s",c).replace("SSS",Nu(h,3))},capitalFirst:function(e){return e?e.charAt(0).toUpperCase()+e.substr(1):e},truncateText:Wi.truncateText,getTextBoundingRect:function(e){return Wi.getBoundingRect(e.text,e.font,e.textAlign,e.textVerticalAlign,e.textPadding,e.textLineHeight,e.rich,e.truncate)},getTextRect:function(e,t,n,i,a,r,o,s){return Wi.getBoundingRect(e,t,n,i,a,s,r,o)},windowOpen:function(e,t){if("_blank"===t||"blank"===t){var n=window.open();n.opener=null,n.location=e}else window.open(e,t)}},Ru=Au.parsePercent,zu=Ie.each,Bu=["left","right","top","bottom","width","height"],Vu=[["width","left","right"],["height","top","bottom"]];function Hu(e,t,n,i,a){var r=0,o=0;null==i&&(i=1/0),null==a&&(a=1/0);var s=0;t.eachChild((function(l,u){var c,h,d=l.position,f=l.getBoundingRect(),p=t.childAt(u+1),g=p&&p.getBoundingRect();if("horizontal"===e){var m=f.width+(g?-g.x+f.x:0);(c=r+m)>i||l.newline?(r=0,c=m,o+=s+n,s=f.height):s=Math.max(s,f.height)}else{var v=f.height+(g?-g.y+f.y:0);(h=o+v)>a||l.newline?(r+=s+n,o=0,h=v,s=f.width):s=Math.max(s,f.width)}l.newline||(d[0]=r,d[1]=o,"horizontal"===e?r=c+n:o=h+n)}))}var Yu=Hu,Fu=Ie.curry(Hu,"vertical"),Gu=Ie.curry(Hu,"horizontal");function Wu(e,t,n){n=Pu.normalizeCssArray(n||0);var i=t.width,a=t.height,r=Ru(e.left,i),o=Ru(e.top,a),s=Ru(e.right,i),l=Ru(e.bottom,a),u=Ru(e.width,i),c=Ru(e.height,a),h=n[2]+n[0],d=n[1]+n[3],f=e.aspect;switch(isNaN(u)&&(u=i-s-d-r),isNaN(c)&&(c=a-l-h-o),null!=f&&(isNaN(u)&&isNaN(c)&&(f>i/a?u=.8*i:c=.8*a),isNaN(u)&&(u=f*c),isNaN(c)&&(c=u/f)),isNaN(r)&&(r=i-s-u-d),isNaN(o)&&(o=a-l-c-h),e.left||e.right){case"center":r=i/2-u/2-n[3];break;case"right":r=i-u-d}switch(e.top||e.bottom){case"middle":case"center":o=a/2-c/2-n[0];break;case"bottom":o=a-c-h}r=r||0,o=o||0,isNaN(u)&&(u=i-d-r-(s||0)),isNaN(c)&&(c=a-h-o-(l||0));var p=new Hn(r+n[3],o+n[0],u,c);return p.margin=n,p}function ju(e,t){return t&&e&&zu(Bu,(function(n){t.hasOwnProperty(n)&&(e[n]=t[n])})),e}var Uu={LOCATION_PARAMS:Bu,HV_NAMES:Vu,box:Yu,vbox:Fu,hbox:Gu,getAvailableSize:function(e,t,n){var i=t.width,a=t.height,r=Ru(e.x,i),o=Ru(e.y,a),s=Ru(e.x2,i),l=Ru(e.y2,a);return(isNaN(r)||isNaN(parseFloat(e.x)))&&(r=0),(isNaN(s)||isNaN(parseFloat(e.x2)))&&(s=i),(isNaN(o)||isNaN(parseFloat(e.y)))&&(o=0),(isNaN(l)||isNaN(parseFloat(e.y2)))&&(l=a),n=Pu.normalizeCssArray(n||0),{width:Math.max(s-r-n[1]-n[3],0),height:Math.max(l-o-n[0]-n[2],0)}},getLayoutRect:Wu,positionElement:function(e,t,n,i,a){var r=!a||!a.hv||a.hv[0],o=!a||!a.hv||a.hv[1],s=a&&a.boundingMode||"all";if(r||o){var l;if("raw"===s)l="group"===e.type?new Hn(0,0,+t.width||0,+t.height||0):e.getBoundingRect();else if(l=e.getBoundingRect(),e.needLocalTransform()){var u=e.getLocalTransform();(l=l.clone()).applyTransform(u)}t=Wu(Ie.defaults({width:l.width,height:l.height},t),n,i);var c=e.position,h=r?t.x-l.x:0,d=o?t.y-l.y:0;e.attr("position","raw"===s?[h,d]:[c[0]+h,c[1]+d])}},sizeCalculable:function(e,t){return null!=e[Vu[t][0]]||null!=e[Vu[t][1]]&&null!=e[Vu[t][2]]},mergeLayoutParam:function(e,t,n){!Ie.isObject(n)&&(n={});var i=n.ignoreSize;!Ie.isArray(i)&&(i=[i,i]);var a=o(Vu[0],0),r=o(Vu[1],1);function o(n,a){var r={},o=0,u={},c=0;if(zu(n,(function(t){u[t]=e[t]})),zu(n,(function(e){s(t,e)&&(r[e]=u[e]=t[e]),l(r,e)&&o++,l(u,e)&&c++})),i[a])return l(t,n[1])?u[n[2]]=null:l(t,n[2])&&(u[n[1]]=null),u;if(2!==c&&o){if(o>=2)return r;for(var h=0;h<n.length;h++){var d=n[h];if(!s(r,d)&&s(e,d)){r[d]=e[d];break}}return r}return u}function s(e,t){return e.hasOwnProperty(t)}function l(e,t){return null!=e[t]&&"auto"!==e[t]}function u(e,t,n){zu(e,(function(e){t[e]=n[e]}))}u(Vu[0],e,a),u(Vu[1],e,r)},getLayoutParams:function(e){return ju({},e)},copyLayoutParams:ju},Zu={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")}}},Xu=Cr.enableClassManagement,qu=Cr.parseClassType,Ku=(0,Sr.makeInner)(),Qu=bu.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(e,t,n,i){bu.call(this,e,t,n,i),this.uid=Mu.getUID("ec_cpt_model")},init:function(e,t,n,i){this.mergeDefaultAndTheme(e,n)},mergeDefaultAndTheme:function(e,t){var n=this.layoutMode,i=n?Uu.getLayoutParams(e):{},a=t.getTheme();Ie.merge(e,a.get(this.mainType)),Ie.merge(e,this.getDefaultOption()),n&&Uu.mergeLayoutParam(e,i,n)},mergeOption:function(e,t){Ie.merge(this.option,e,!0);var n=this.layoutMode;n&&Uu.mergeLayoutParam(this.option,e,n)},optionUpdated:function(e,t){},getDefaultOption:function(){var e=Ku(this);if(!e.defaultOption){for(var t=[],n=this.constructor;n;){var i=n.prototype.defaultOption;i&&t.push(i),n=n.superClass}for(var a={},r=t.length-1;r>=0;r--)a=Ie.merge(a,t[r],!0);e.defaultOption=a}return e.defaultOption},getReferringComponents:function(e){return this.ecModel.queryComponents({mainType:e,index:this.get(e+"Index",!0),id:this.get(e+"Id",!0)})}});Xu(Qu,{registerWhenExtend:!0}),Mu.enableSubTypeDefaulter(Qu),Mu.enableTopologicalTravel(Qu,(function(e){var t=[];Ie.each(Qu.getClassesByMainType(e),(function(e){t=t.concat(e.prototype.dependencies||[])})),t=Ie.map(t,(function(e){return qu(e).main})),"dataset"!==e&&Ie.indexOf(t,"dataset")<=0&&t.unshift("dataset");return t})),Ie.mixin(Qu,Zu);var $u=Qu,Ju="";"undefined"!=typeof navigator&&(Ju=navigator.platform||"");var ec={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:Ju.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},tc=Sr.makeInner,nc=Sr.normalizeToArray,ic=tc();var ac={clearColorPalette:function(){ic(this).colorIdx=0,ic(this).colorNameMap={}},getColorFromPalette:function(e,t,n){var i=ic(t=t||this),a=i.colorIdx||0,r=i.colorNameMap=i.colorNameMap||{};if(r.hasOwnProperty(e))return r[e];var o=nc(this.get("color",!0)),s=this.get("colorLayer",!0),l=null!=n&&s?function(e,t){for(var n=e.length,i=0;i<n;i++)if(e[i].length>t)return e[i];return e[n-1]}(s,n):o;if((l=l||o)&&l.length){var u=l[a];return e&&(r[e]=u),i.colorIdx=(a+1)%l.length,u}}},rc={SOURCE_FORMAT_ORIGINAL:"original",SOURCE_FORMAT_ARRAY_ROWS:"arrayRows",SOURCE_FORMAT_OBJECT_ROWS:"objectRows",SOURCE_FORMAT_KEYED_COLUMNS:"keyedColumns",SOURCE_FORMAT_UNKNOWN:"unknown",SOURCE_FORMAT_TYPED_ARRAY:"typedArray",SERIES_LAYOUT_BY_COLUMN:"column",SERIES_LAYOUT_BY_ROW:"row"},oc=Ie.createHashMap,sc=Ie.isTypedArray,lc=Cr.enableClassCheck,uc=rc.SOURCE_FORMAT_ORIGINAL,cc=rc.SERIES_LAYOUT_BY_COLUMN,hc=rc.SOURCE_FORMAT_UNKNOWN,dc=rc.SOURCE_FORMAT_TYPED_ARRAY,fc=rc.SOURCE_FORMAT_KEYED_COLUMNS;function pc(e){this.fromDataset=e.fromDataset,this.data=e.data||(e.sourceFormat===fc?{}:[]),this.sourceFormat=e.sourceFormat||hc,this.seriesLayoutBy=e.seriesLayoutBy||cc,this.dimensionsDefine=e.dimensionsDefine,this.encodeDefine=e.encodeDefine&&oc(e.encodeDefine),this.startIndex=e.startIndex||0,this.dimensionsDetectCount=e.dimensionsDetectCount}pc.seriesDataToSource=function(e){return new pc({data:e,sourceFormat:sc(e)?dc:uc,fromDataset:!1})},lc(pc);var gc=pc,mc=Sr.makeInner,vc=Sr.getDataItemValue,yc=Ie.createHashMap,_c=Ie.each,xc=Ie.map,bc=Ie.isArray,wc=Ie.isString,Sc=Ie.isObject,Mc=Ie.isTypedArray,Tc=Ie.isArrayLike,Ic=Ie.extend,Ac=rc.SOURCE_FORMAT_ORIGINAL,Dc=rc.SOURCE_FORMAT_ARRAY_ROWS,Cc=rc.SOURCE_FORMAT_OBJECT_ROWS,Oc=rc.SOURCE_FORMAT_KEYED_COLUMNS,kc=rc.SOURCE_FORMAT_UNKNOWN,Lc=rc.SOURCE_FORMAT_TYPED_ARRAY,Ec=rc.SERIES_LAYOUT_BY_ROW,Nc={Must:1,Might:2,Not:3},Pc=mc();function Rc(e){if(e){var t=yc();return xc(e,(function(e,n){if(null==(e=Ic({},Sc(e)?e:{name:e})).name)return e;e.name+="",null==e.displayName&&(e.displayName=e.name);var i=t.get(e.name);return i?e.name+="-"+i.count++:t.set(e.name,{count:1}),e}))}}function zc(e,t,n,i){if(null==i&&(i=1/0),t===Ec)for(var a=0;a<n.length&&a<i;a++)e(n[a]?n[a][0]:null,a);else{var r=n[0]||[];for(a=0;a<r.length&&a<i;a++)e(r[a],a)}}function Bc(e){var t=e.option;if(!t.data)return e.ecModel.getComponent("dataset",t.datasetIndex||0)}function Vc(e,t,n,i,a,r){var o,s,l;if(Mc(e))return Nc.Not;if(i){var u=i[r];Sc(u)?(s=u.name,l=u.type):wc(u)&&(s=u)}if(null!=l)return"ordinal"===l?Nc.Must:Nc.Not;if(t===Dc)if(n===Ec){for(var c=e[r],h=0;h<(c||[]).length&&h<5;h++)if(null!=(o=g(c[a+h])))return o}else for(h=0;h<e.length&&h<5;h++){var d=e[a+h];if(d&&null!=(o=g(d[r])))return o}else if(t===Cc){if(!s)return Nc.Not;for(h=0;h<e.length&&h<5;h++){if((f=e[h])&&null!=(o=g(f[s])))return o}}else if(t===Oc){if(!s)return Nc.Not;if(!(c=e[s])||Mc(c))return Nc.Not;for(h=0;h<c.length&&h<5;h++)if(null!=(o=g(c[h])))return o}else if(t===Ac)for(h=0;h<e.length&&h<5;h++){var f=e[h],p=vc(f);if(!bc(p))return Nc.Not;if(null!=(o=g(p[r])))return o}function g(e){var t=wc(e);return null!=e&&isFinite(e)&&""!==e?t?Nc.Might:Nc.Not:t&&"-"!==e?Nc.Must:void 0}return Nc.Not}var Hc={BE_ORDINAL:Nc,detectSourceFormat:function(e){var t=e.option.source,n=kc;if(Mc(t))n=Lc;else if(bc(t)){0===t.length&&(n=Dc);for(var i=0,a=t.length;i<a;i++){var r=t[i];if(null!=r){if(bc(r)){n=Dc;break}if(Sc(r)){n=Cc;break}}}}else if(Sc(t)){for(var o in t)if(t.hasOwnProperty(o)&&Tc(t[o])){n=Oc;break}}else if(null!=t)throw new Error("Invalid data");Pc(e).sourceFormat=n},getSource:function(e){return Pc(e).source},resetSourceDefaulter:function(e){Pc(e).datasetMap=yc()},prepareSource:function(e){var t=e.option,n=t.data,i=Mc(n)?Lc:Ac,a=!1,r=t.seriesLayoutBy,o=t.sourceHeader,s=t.dimensions,l=Bc(e);if(l){var u=l.option;n=u.source,i=Pc(l).sourceFormat,a=!0,r=r||u.seriesLayoutBy,null==o&&(o=u.sourceHeader),s=s||u.dimensions}var c=function(e,t,n,i,a){if(!e)return{dimensionsDefine:Rc(a)};var r,o;if(t===Dc)"auto"===i||null==i?zc((function(e){null!=e&&"-"!==e&&(wc(e)?null==o&&(o=1):o=0)}),n,e,10):o=i?1:0,a||1!==o||(a=[],zc((function(e,t){a[t]=null!=e?e:""}),n,e)),r=a?a.length:n===Ec?e.length:e[0]?e[0].length:null;else if(t===Cc)a||(a=function(e){var t,n=0;for(;n<e.length&&!(t=e[n++]););if(t){var i=[];return _c(t,(function(e,t){i.push(t)})),i}}(e));else if(t===Oc)a||(a=[],_c(e,(function(e,t){a.push(t)})));else if(t===Ac){var s=vc(e[0]);r=bc(s)&&s.length||1}return{startIndex:o,dimensionsDefine:Rc(a),dimensionsDetectCount:r}}(n,i,r,o,s);Pc(e).source=new gc({data:n,fromDataset:a,seriesLayoutBy:r,sourceFormat:i,dimensionsDefine:c.dimensionsDefine,startIndex:c.startIndex,dimensionsDetectCount:c.dimensionsDetectCount,encodeDefine:t.encode})},makeSeriesEncodeForAxisCoordSys:function(e,t,n){var i={},a=Bc(t);if(!a||!e)return i;var r,o,s=[],l=[],u=t.ecModel,c=Pc(u).datasetMap,h=a.uid+"_"+n.seriesLayoutBy;e=e.slice(),_c(e,(function(t,n){!Sc(t)&&(e[n]={name:t}),"ordinal"===t.type&&null==r&&(r=n,o=p(e[n])),i[t.name]=[]}));var d=c.get(h)||c.set(h,{categoryWayDim:o,valueWayDim:0});function f(e,t,n){for(var i=0;i<n;i++)e.push(t+i)}function p(e){var t=e.dimsDef;return t?t.length:1}return _c(e,(function(e,t){var n=e.name,a=p(e);if(null==r){var o=d.valueWayDim;f(i[n],o,a),f(l,o,a),d.valueWayDim+=a}else if(r===t)f(i[n],0,a),f(s,0,a);else{o=d.categoryWayDim;f(i[n],o,a),f(l,o,a),d.categoryWayDim+=a}})),s.length&&(i.itemName=s),l.length&&(i.seriesName=l),i},makeSeriesEncodeForNameBased:function(e,t,n){var i={};if(!Bc(e))return i;var a,r=t.sourceFormat,o=t.dimensionsDefine;r!==Cc&&r!==Oc||_c(o,(function(e,t){"name"===(Sc(e)?e.name:e)&&(a=t)}));var s=function(){for(var e={},i={},s=[],l=0,u=Math.min(5,n);l<u;l++){var c=Vc(t.data,r,t.seriesLayoutBy,o,t.startIndex,l);s.push(c);var h=c===Nc.Not;if(h&&null==e.v&&l!==a&&(e.v=l),(null==e.n||e.n===e.v||!h&&s[e.n]===Nc.Not)&&(e.n=l),d(e)&&s[e.n]!==Nc.Not)return e;h||(c===Nc.Might&&null==i.v&&l!==a&&(i.v=l),null!=i.n&&i.n!==i.v||(i.n=l))}function d(e){return null!=e.v&&null!=e.n}return d(e)?e:d(i)?i:null}();if(s){i.value=s.v;var l=null!=a?a:s.n;i.itemName=[l],i.seriesName=[l]}return i},guessOrdinal:function(e,t){return Vc(e.data,e.sourceFormat,e.seriesLayoutBy,e.dimensionsDefine,e.startIndex,t)}},Yc=Ie.each,Fc=Ie.filter,Gc=Ie.map,Wc=Ie.isArray,jc=Ie.indexOf,Uc=Ie.isObject,Zc=Ie.isString,Xc=Ie.createHashMap,qc=Ie.assert,Kc=Ie.clone,Qc=Ie.merge,$c=Ie.extend,Jc=Ie.mixin,eh=Hc.resetSourceDefaulter,th=bu.extend({init:function(e,t,n,i){n=n||{},this.option=null,this._theme=new bu(n),this._optionManager=i},setOption:function(e,t){qc(!("\0_ec_inner"in e),"please use chart.getOption()"),this._optionManager.setOption(e,t),this.resetOption(null)},resetOption:function(e){var t=!1,n=this._optionManager;if(!e||"recreate"===e){var i=n.mountOption("recreate"===e);this.option&&"recreate"!==e?(this.restoreData(),this.mergeOption(i)):nh.call(this,i),t=!0}if("timeline"!==e&&"media"!==e||this.restoreData(),!e||"recreate"===e||"timeline"===e){var a=n.getTimelineOption(this);a&&(this.mergeOption(a),t=!0)}if(!e||"recreate"===e||"media"===e){var r=n.getMediaOption(this,this._api);r.length&&Yc(r,(function(e){this.mergeOption(e,t=!0)}),this)}return t},mergeOption:function(e){var t=this.option,n=this._componentsMap,i=[];eh(this),Yc(e,(function(e,n){null!=e&&($u.hasClass(n)?n&&i.push(n):t[n]=null==t[n]?Kc(e):Qc(t[n],e,!0))})),$u.topologicalTravel(i,$u.getAllClassMainTypes(),(function(i,a){var r=Sr.normalizeToArray(e[i]),o=Sr.mappingToExists(n.get(i),r);Sr.makeIdAndName(o),Yc(o,(function(e,t){var n=e.option;Uc(n)&&(e.keyInfo.mainType=i,e.keyInfo.subType=function(e,t,n){return t.type?t.type:n?n.subType:$u.determineSubType(e,t)}(i,n,e.exist))}));var s=function(e,t){Wc(t)||(t=t?[t]:[]);var n={};return Yc(t,(function(t){n[t]=(e.get(t)||[]).slice()})),n}(n,a);t[i]=[],n.set(i,[]),Yc(o,(function(e,a){var r=e.exist,o=e.option;if(qc(Uc(o)||r,"Empty component definition"),o){var l=$u.getClass(i,e.keyInfo.subType,!0);if(r&&r.constructor===l)r.name=e.keyInfo.name,r.mergeOption(o,this),r.optionUpdated(o,!1);else{var u=$c({dependentModels:s,componentIndex:a},e.keyInfo);r=new l(o,this,this,u),$c(r,u),r.init(o,this,this,u),r.optionUpdated(null,!0)}}else r.mergeOption({},this),r.optionUpdated({},!1);n.get(i)[a]=r,t[i][a]=r.option}),this),"series"===i&&ih(this,n.get("series"))}),this),this._seriesIndicesMap=Xc(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var e=Kc(this.option);return Yc(e,(function(t,n){if($u.hasClass(n)){for(var i=(t=Sr.normalizeToArray(t)).length-1;i>=0;i--)Sr.isIdInner(t[i])&&t.splice(i,1);e[n]=t}})),delete e["\0_ec_inner"],e},getTheme:function(){return this._theme},getComponent:function(e,t){var n=this._componentsMap.get(e);if(n)return n[t||0]},queryComponents:function(e){var t=e.mainType;if(!t)return[];var n,i=e.index,a=e.id,r=e.name,o=this._componentsMap.get(t);if(!o||!o.length)return[];if(null!=i)Wc(i)||(i=[i]),n=Fc(Gc(i,(function(e){return o[e]})),(function(e){return!!e}));else if(null!=a){var s=Wc(a);n=Fc(o,(function(e){return s&&jc(a,e.id)>=0||!s&&e.id===a}))}else if(null!=r){var l=Wc(r);n=Fc(o,(function(e){return l&&jc(r,e.name)>=0||!l&&e.name===r}))}else n=o.slice();return ah(n,e)},findComponents:function(e){var t,n,i,a,r,o=e.query,s=e.mainType,l=(n=s+"Index",i=s+"Id",a=s+"Name",!(t=o)||null==t[n]&&null==t[i]&&null==t[a]?null:{mainType:s,index:t[n],id:t[i],name:t[a]}),u=l?this.queryComponents(l):this._componentsMap.get(s);return r=ah(u,e),e.filter?Fc(r,e.filter):r},eachComponent:function(e,t,n){var i=this._componentsMap;if("function"==typeof e)n=t,t=e,i.each((function(e,i){Yc(e,(function(e,a){t.call(n,i,e,a)}))}));else if(Zc(e))Yc(i.get(e),t,n);else if(Uc(e)){var a=this.findComponents(e);Yc(a,t,n)}},getSeriesByName:function(e){var t=this._componentsMap.get("series");return Fc(t,(function(t){return t.name===e}))},getSeriesByIndex:function(e){return this._componentsMap.get("series")[e]},getSeriesByType:function(e){var t=this._componentsMap.get("series");return Fc(t,(function(t){return t.subType===e}))},getSeries:function(){return this._componentsMap.get("series").slice()},getSeriesCount:function(){return this._componentsMap.get("series").length},eachSeries:function(e,t){Yc(this._seriesIndices,(function(n){var i=this._componentsMap.get("series")[n];e.call(t,i,n)}),this)},eachRawSeries:function(e,t){Yc(this._componentsMap.get("series"),e,t)},eachSeriesByType:function(e,t,n){Yc(this._seriesIndices,(function(i){var a=this._componentsMap.get("series")[i];a.subType===e&&t.call(n,a,i)}),this)},eachRawSeriesByType:function(e,t,n){return Yc(this.getSeriesByType(e),t,n)},isSeriesFiltered:function(e){return null==this._seriesIndicesMap.get(e.componentIndex)},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(e,t){ih(this,Fc(this._componentsMap.get("series"),e,t))},restoreData:function(e){var t=this._componentsMap;ih(this,t.get("series"));var n=[];t.each((function(e,t){n.push(t)})),$u.topologicalTravel(n,$u.getAllClassMainTypes(),(function(n,i){Yc(t.get(n),(function(t){("series"!==n||!function(e,t){if(t){var n=t.seiresIndex,i=t.seriesId,a=t.seriesName;return null!=n&&e.componentIndex!==n||null!=i&&e.id!==i||null!=a&&e.name!==a}}(t,e))&&t.restoreData()}))}))}});function nh(e){e=e,this.option={},this.option["\0_ec_inner"]=1,this._componentsMap=Xc({series:[]}),this._seriesIndices,this._seriesIndicesMap,function(e,t){var n=e.color&&!e.colorLayer;Yc(t,(function(t,i){"colorLayer"===i&&n||$u.hasClass(i)||("object"==typeof t?e[i]=e[i]?Qc(e[i],t,!1):Kc(t):null==e[i]&&(e[i]=t))}))}(e,this._theme.option),Qc(e,ec,!1),this.mergeOption(e)}function ih(e,t){e._seriesIndicesMap=Xc(e._seriesIndices=Gc(t,(function(e){return e.componentIndex}))||[])}function ah(e,t){return t.hasOwnProperty("subType")?Fc(e,(function(e){return e.subType===t.subType})):e}Jc(th,ac);var rh=th,oh=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"];var sh=function(e){Ie.each(oh,(function(t){this[t]=Ie.bind(e[t],e)}),this)},lh={};function uh(){this._coordinateSystems=[]}uh.prototype={constructor:uh,create:function(e,t){var n=[];Ie.each(lh,(function(i,a){var r=i.create(e,t);n=n.concat(r||[])})),this._coordinateSystems=n},update:function(e,t){Ie.each(this._coordinateSystems,(function(n){n.update&&n.update(e,t)}))},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},uh.register=function(e,t){lh[e]=t},uh.get=function(e){return lh[e]};var ch=uh,hh=Ie.each,dh=Ie.clone,fh=Ie.map,ph=Ie.merge,gh=/^(min|max)?(.+)$/;function mh(e){this._api=e,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}function vh(e,t,n){var i,a,r=[],o=[],s=e.timeline;if(e.baseOption&&(a=e.baseOption),(s||e.options)&&(a=a||{},r=(e.options||[]).slice()),e.media){a=a||{};var l=e.media;hh(l,(function(e){e&&e.option&&(e.query?o.push(e):i||(i=e))}))}return a||(a=e),a.timeline||(a.timeline=s),hh([a].concat(r).concat(Ie.map(o,(function(e){return e.option}))),(function(e){hh(t,(function(t){t(e,n)}))})),{baseOption:a,timelineOptions:r,mediaDefault:i,mediaList:o}}function yh(e,t,n){var i={width:t,height:n,aspectratio:t/n},a=!0;return Ie.each(e,(function(e,t){var n=t.match(gh);if(n&&n[1]&&n[2]){var r=n[1],o=n[2].toLowerCase();(function(e,t,n){return"min"===n?e>=t:"max"===n?e<=t:e===t})(i[o],e,r)||(a=!1)}})),a}mh.prototype={constructor:mh,setOption:function(e,t){e&&Ie.each(Sr.normalizeToArray(e.series),(function(e){e&&e.data&&Ie.isTypedArray(e.data)&&Ie.setAsPrimitive(e.data)})),e=dh(e);var n,i,a=this._optionBackup,r=vh.call(this,e,t,!a);this._newBaseOption=r.baseOption,a?(n=a.baseOption,i=r.baseOption,hh(i=i||{},(function(e,t){if(null!=e){var i=n[t];if($u.hasClass(t)){e=Sr.normalizeToArray(e),i=Sr.normalizeToArray(i);var a=Sr.mappingToExists(i,e);n[t]=fh(a,(function(e){return e.option&&e.exist?ph(e.exist,e.option,!0):e.exist||e.option}))}else n[t]=ph(i,e,!0)}})),r.timelineOptions.length&&(a.timelineOptions=r.timelineOptions),r.mediaList.length&&(a.mediaList=r.mediaList),r.mediaDefault&&(a.mediaDefault=r.mediaDefault)):this._optionBackup=r},mountOption:function(e){var t=this._optionBackup;return this._timelineOptions=fh(t.timelineOptions,dh),this._mediaList=fh(t.mediaList,dh),this._mediaDefault=dh(t.mediaDefault),this._currentMediaIndices=[],dh(e?t.baseOption:this._newBaseOption)},getTimelineOption:function(e){var t,n=this._timelineOptions;if(n.length){var i=e.getComponent("timeline");i&&(t=dh(n[i.getCurrentIndex()],!0))}return t},getMediaOption:function(e){var t,n,i=this._api.getWidth(),a=this._api.getHeight(),r=this._mediaList,o=this._mediaDefault,s=[],l=[];if(!r.length&&!o)return l;for(var u=0,c=r.length;u<c;u++)yh(r[u].query,i,a)&&s.push(u);return!s.length&&o&&(s=[-1]),s.length&&(t=s,n=this._currentMediaIndices,t.join(",")!==n.join(","))&&(l=fh(s,(function(e){return dh(-1===e?o.option:r[e].option)}))),this._currentMediaIndices=s,l}};var _h=mh,xh=Ie.each,bh=Ie.isObject,wh=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Sh(e){var t=e&&e.itemStyle;if(t)for(var n=0,i=wh.length;n<i;n++){var a=wh[n],r=t.normal,o=t.emphasis;r&&r[a]&&(e[a]=e[a]||{},e[a].normal?Ie.merge(e[a].normal,r[a]):e[a].normal=r[a],r[a]=null),o&&o[a]&&(e[a]=e[a]||{},e[a].emphasis?Ie.merge(e[a].emphasis,o[a]):e[a].emphasis=o[a],o[a]=null)}}function Mh(e,t,n){if(e&&e[t]&&(e[t].normal||e[t].emphasis)){var i=e[t].normal,a=e[t].emphasis;i&&(n?(e[t].normal=e[t].emphasis=null,Ie.defaults(e[t],i)):e[t]=i),a&&(e.emphasis=e.emphasis||{},e.emphasis[t]=a)}}function Th(e){Mh(e,"itemStyle"),Mh(e,"lineStyle"),Mh(e,"areaStyle"),Mh(e,"label"),Mh(e,"labelLine"),Mh(e,"upperLabel"),Mh(e,"edgeLabel")}function Ih(e,t){var n=bh(e)&&e[t],i=bh(n)&&n.textStyle;if(i)for(var a=0,r=Sr.TEXT_STYLE_OPTIONS.length;a<r;a++){t=Sr.TEXT_STYLE_OPTIONS[a];i.hasOwnProperty(t)&&(n[t]=i[t])}}function Ah(e){e&&(Th(e),Ih(e,"label"),e.emphasis&&Ih(e.emphasis,"label"))}function Dh(e){return Ie.isArray(e)?e:e?[e]:[]}function Ch(e){return(Ie.isArray(e)?e[0]:e)||{}}var Oh=function(e,t){xh(Dh(e.series),(function(e){bh(e)&&function(e){if(bh(e)){Sh(e),Th(e),Ih(e,"label"),Ih(e,"upperLabel"),Ih(e,"edgeLabel"),e.emphasis&&(Ih(e.emphasis,"label"),Ih(e.emphasis,"upperLabel"),Ih(e.emphasis,"edgeLabel")),(n=e.markPoint)&&(Sh(n),Ah(n)),(i=e.markLine)&&(Sh(i),Ah(i));var t=e.markArea;t&&Ah(t);var n,i,a=e.data;if("graph"===e.type){a=a||e.nodes;var r=e.links||e.edges;if(r&&!Ie.isTypedArray(r))for(var o=0;o<r.length;o++)Ah(r[o]);Ie.each(e.categories,(function(e){Th(e)}))}if(a&&!Ie.isTypedArray(a))for(o=0;o<a.length;o++)Ah(a[o]);if((n=e.markPoint)&&n.data){var s=n.data;for(o=0;o<s.length;o++)Ah(s[o])}if((i=e.markLine)&&i.data){var l=i.data;for(o=0;o<l.length;o++)Ie.isArray(l[o])?(Ah(l[o][0]),Ah(l[o][1])):Ah(l[o])}"gauge"===e.type?(Ih(e,"axisLabel"),Ih(e,"title"),Ih(e,"detail")):"treemap"===e.type?(Mh(e.breadcrumb,"itemStyle"),Ie.each(e.levels,(function(e){Th(e)}))):"tree"===e.type&&Th(e.leaves)}}(e)}));var n=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&n.push("valueAxis","categoryAxis","logAxis","timeAxis"),xh(n,(function(t){xh(Dh(e[t]),(function(e){e&&(Ih(e,"axisLabel"),Ih(e.axisPointer,"label"))}))})),xh(Dh(e.parallel),(function(e){var t=e&&e.parallelAxisDefault;Ih(t,"axisLabel"),Ih(t&&t.axisPointer,"label")})),xh(Dh(e.calendar),(function(e){Mh(e,"itemStyle"),Ih(e,"dayLabel"),Ih(e,"monthLabel"),Ih(e,"yearLabel")})),xh(Dh(e.radar),(function(e){Ih(e,"name")})),xh(Dh(e.geo),(function(e){bh(e)&&(Ah(e),xh(Dh(e.regions),(function(e){Ah(e)})))})),xh(Dh(e.timeline),(function(e){Ah(e),Mh(e,"label"),Mh(e,"itemStyle"),Mh(e,"controlStyle",!0);var t=e.data;Ie.isArray(t)&&Ie.each(t,(function(e){Ie.isObject(e)&&(Mh(e,"label"),Mh(e,"itemStyle"))}))})),xh(Dh(e.toolbox),(function(e){Mh(e,"iconStyle"),xh(e.feature,(function(e){Mh(e,"iconStyle")}))})),Ih(Ch(e.axisPointer),"label"),Ih(Ch(e.tooltip).axisPointer,"label")},kh=Ie.each,Lh=Ie.isArray,Eh=Ie.isObject,Nh=Sr.normalizeToArray;function Ph(e){kh(Rh,(function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])}))}var Rh=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],zh=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"];var Bh=function(e,t){Oh(e,t),e.series=Nh(e.series),kh(e.series,(function(e){if(Eh(e)){var t=e.type;if("line"===t)null!=e.clipOverflow&&(e.clip=e.clipOverflow);else if("pie"===t||"gauge"===t)null!=e.clockWise&&(e.clockwise=e.clockWise);else if("gauge"===t){var n=function(e,t){t=t.split(",");for(var n=e,i=0;i<t.length&&null!=(n=n&&n[t[i]]);i++);return n}(e,"pointer.color");null!=n&&function(e,t,n,i){t=t.split(",");for(var a,r=e,o=0;o<t.length-1;o++)null==r[a=t[o]]&&(r[a]={}),r=r[a];(i||null==r[t[o]])&&(r[t[o]]=n)}(e,"itemStyle.color",n)}Ph(e)}})),e.dataRange&&(e.visualMap=e.dataRange),kh(zh,(function(t){var n=e[t];n&&(Lh(n)||(n=[n]),kh(n,(function(e){Ph(e)})))}))},Vh=Ie.createHashMap,Hh=Ie.each;function Yh(e){Hh(e,(function(t,n){var i=[],a=[NaN,NaN],r=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,l=o.map(r,(function(r,l,u){var c,h,d=o.get(t.stackedDimension,u);if(isNaN(d))return a;s?h=o.getRawIndex(u):c=o.get(t.stackedByDimension,u);for(var f=NaN,p=n-1;p>=0;p--){var g=e[p];if(s||(h=g.data.rawIndexOf(g.stackedByDimension,c)),h>=0){var m=g.data.getByRawIndex(g.stackResultDimension,h);if(d>=0&&m>0||d<=0&&m<0){d+=m,f=m;break}}}return i[0]=d,i[1]=f,i}));o.hostModel.setData(l),t.data=l}))}var Fh=function(e){var t=Vh();e.eachSeries((function(e){var n=e.get("stack");if(n){var i=t.get(n)||t.set(n,[]),a=e.getData(),r={stackResultDimension:a.getCalculationInfo("stackResultDimension"),stackedOverDimension:a.getCalculationInfo("stackedOverDimension"),stackedDimension:a.getCalculationInfo("stackedDimension"),stackedByDimension:a.getCalculationInfo("stackedByDimension"),isStackedByIndex:a.getCalculationInfo("isStackedByIndex"),data:a,seriesModel:e};if(!r.stackedDimension||!r.isStackedByIndex&&!r.stackedByDimension)return;i.length&&a.setCalculationInfo("stackedOnSeries",i[i.length-1].seriesModel),i.push(r)}})),t.each(Yh)},Gh=Ie.extend,Wh=Ie.each,jh=Ie.isObject,Uh=Sr.getDataItemValue,Zh=Sr.isDataItemOption,Xh=Au.parseDate,qh=rc.SOURCE_FORMAT_TYPED_ARRAY,Kh=rc.SOURCE_FORMAT_ARRAY_ROWS,Qh=rc.SOURCE_FORMAT_ORIGINAL,$h=rc.SOURCE_FORMAT_OBJECT_ROWS;function Jh(e,t){gc.isInstance(e)||(e=gc.seriesDataToSource(e)),this._source=e;var n=this._data=e.data,i=e.sourceFormat;i===qh&&(this._offset=0,this._dimSize=t,this._data=n);var a=td[i===Kh?i+"_"+e.seriesLayoutBy:i];Gh(this,a)}var ed=Jh.prototype;ed.pure=!1,ed.persistent=!0,ed.getSource=function(){return this._source};var td={arrayRows_column:{pure:!0,count:function(){return Math.max(0,this._data.length-this._source.startIndex)},getItem:function(e){return this._data[e+this._source.startIndex]},appendData:ad},arrayRows_row:{pure:!0,count:function(){var e=this._data[0];return e?Math.max(0,e.length-this._source.startIndex):0},getItem:function(e){e+=this._source.startIndex;for(var t=[],n=this._data,i=0;i<n.length;i++){var a=n[i];t.push(a?a[e]:null)}return t},appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},objectRows:{pure:!0,count:nd,getItem:id,appendData:ad},keyedColumns:{pure:!0,count:function(){var e=this._source.dimensionsDefine[0].name,t=this._data[e];return t?t.length:0},getItem:function(e){for(var t=[],n=this._source.dimensionsDefine,i=0;i<n.length;i++){var a=this._data[n[i].name];t.push(a?a[e]:null)}return t},appendData:function(e){var t=this._data;Wh(e,(function(e,n){for(var i=t[n]||(t[n]=[]),a=0;a<(e||[]).length;a++)i.push(e[a])}))}},original:{count:nd,getItem:id,appendData:ad},typedArray:{persistent:!1,pure:!0,count:function(){return this._data?this._data.length/this._dimSize:0},getItem:function(e,t){e-=this._offset,t=t||[];for(var n=this._dimSize*e,i=0;i<this._dimSize;i++)t[i]=this._data[n+i];return t},appendData:function(e){this._data=e},clean:function(){this._offset+=this.count(),this._data=null}}};function nd(){return this._data.length}function id(e){return this._data[e]}function ad(e){for(var t=0;t<e.length;t++)this._data.push(e[t])}var rd={arrayRows:od,objectRows:function(e,t,n,i){return null!=n?e[i]:e},keyedColumns:od,original:function(e,t,n,i){var a=Uh(e);return null!=n&&a instanceof Array?a[n]:a},typedArray:od};function od(e,t,n,i){return null!=n?e[n]:e}function sd(e,t,n,i){return ld(e[i],this._dimensionInfos[t])}function ld(e,t){var n=t&&t.type;if("ordinal"===n){var i=t&&t.ordinalMeta;return i?i.parseAndCollect(e):e}return"time"===n&&"number"!=typeof e&&null!=e&&"-"!==e&&(e=+Xh(e)),null==e||""===e?NaN:+e}var ud={DefaultDataProvider:Jh,defaultDimValueGetters:{arrayRows:sd,objectRows:function(e,t,n,i){return ld(e[t],this._dimensionInfos[t])},keyedColumns:sd,original:function(e,t,n,i){var a=e&&(null==e.value?e:e.value);return!this._rawData.pure&&Zh(e)&&(this.hasItemOption=!0),ld(a instanceof Array?a[i]:a,this._dimensionInfos[t])},typedArray:function(e,t,n,i){return e[i]}},retrieveRawValue:function(e,t,n){if(e){var i=e.getRawDataItem(t);if(null!=i){var a,r,o=e.getProvider().getSource().sourceFormat,s=e.getDimensionInfo(n);return s&&(a=s.name,r=s.index),rd[o](i,t,r,a)}}},retrieveRawAttr:function(e,t,n){if(e){var i=e.getProvider().getSource().sourceFormat;if(i===Qh||i===$h){var a=e.getRawDataItem(t);return i!==Qh||jh(a)||(a=null),a?a[n]:void 0}}}},cd=ud.retrieveRawValue,hd=Pu.getTooltipMarker,dd=Pu.formatTpl,fd=Sr.getTooltipRenderMode,pd=/\{@(.+?)\}/g,gd={getDataParams:function(e,t){var n=this.getData(t),i=this.getRawValue(e,t),a=n.getRawIndex(e),r=n.getName(e),o=n.getRawDataItem(e),s=n.getItemVisual(e,"color"),l=n.getItemVisual(e,"borderColor"),u=this.ecModel.getComponent("tooltip"),c=u&&u.get("renderMode"),h=fd(c),d=this.mainType,f="series"===d,p=n.userOutput;return{componentType:d,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:f?this.subType:null,seriesIndex:this.seriesIndex,seriesId:f?this.id:null,seriesName:f?this.name:null,name:r,dataIndex:a,data:o,dataType:t,value:i,color:s,borderColor:l,dimensionNames:p?p.dimensionNames:null,encode:p?p.encode:null,marker:hd({color:s,renderMode:h}),$vars:["seriesName","name","value"]}},getFormattedLabel:function(e,t,n,i,a){t=t||"normal";var r=this.getData(n),o=r.getItemModel(e),s=this.getDataParams(e,n);null!=i&&s.value instanceof Array&&(s.value=s.value[i]);var l=o.get("normal"===t?[a||"label","formatter"]:[t,a||"label","formatter"]);return"function"==typeof l?(s.status=t,s.dimensionIndex=i,l(s)):"string"==typeof l?dd(l,s).replace(pd,(function(t,n){var i=n.length;return"["===n.charAt(0)&&"]"===n.charAt(i-1)&&(n=+n.slice(1,i-1)),cd(r,e,n)})):void 0},getRawValue:function(e,t){return cd(this.getData(t),e)},formatTooltip:function(){}},md=Ie.isArray;function vd(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0,this.context}var yd=vd.prototype;yd.perform=function(e){var t,n=this._upstream,i=e&&e.skip;if(this._dirty&&n){var a=this.context;a.data=a.outputData=n.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!i&&(t=this._plan(this.context));var r,o=c(this._modBy),s=this._modDataCount||0,l=c(e&&e.modBy),u=e&&e.modDataCount||0;function c(e){return!(e>=1)&&(e=1),e}o===l&&s===u||(t="reset"),(this._dirty||"reset"===t)&&(this._dirty=!1,r=function(e,t){var n,i;e._dueIndex=e._outputDueEnd=e._dueEnd=0,e._settedOutputEnd=null,!t&&e._reset&&((n=e._reset(e.context))&&n.progress&&(i=n.forceFirstProgress,n=n.progress),md(n)&&!n.length&&(n=null));e._progress=n,e._modBy=e._modDataCount=null;var a=e._downstream;return a&&a.dirty(),i}(this,i)),this._modBy=l,this._modDataCount=u;var h=e&&e.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,f=Math.min(null!=h?this._dueIndex+h:1/0,this._dueEnd);if(!i&&(r||d<f)){var p=this._progress;if(md(p))for(var g=0;g<p.length;g++)xd(this,p[g],d,f,l,u);else xd(this,p,d,f,l,u)}this._dueIndex=f;var m=null!=this._settedOutputEnd?this._settedOutputEnd:f;this._outputDueEnd=m}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()};var _d=function(){var e,t,n,i,a,r={reset:function(l,u,c,h){t=l,e=u,n=c,i=h,a=Math.ceil(i/n),r.next=n>1&&i>0?s:o}};return r;function o(){return t<e?t++:null}function s(){var r=t%a*n+Math.ceil(t/a),o=t>=e?null:r<i?r:t;return t++,o}}();function xd(e,t,n,i,a,r){_d.reset(n,i,a,r),e._callingProgress=t,e._callingProgress({start:n,end:i,count:i-n,next:_d.next},e.context)}yd.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},yd.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},yd.pipe=function(e){(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},yd.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},yd.getUpstream=function(){return this._upstream},yd.getDownstream=function(){return this._downstream},yd.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e};var bd={createTask:function(e){return new vd(e)}},wd=Pu.formatTime,Sd=Pu.encodeHTML,Md=Pu.addCommas,Td=Pu.getTooltipMarker,Id=Uu.getLayoutParams,Ad=Uu.mergeLayoutParam,Dd=bd.createTask,Cd=Hc.prepareSource,Od=Hc.getSource,kd=ud.retrieveRawValue,Ld=Sr.makeInner(),Ed=$u.extend({type:"series.__base__",seriesIndex:0,coordinateSystem:null,defaultOption:null,legendVisualProvider:null,visualColorAccessPath:"itemStyle.color",visualBorderColorAccessPath:"itemStyle.borderColor",layoutMode:null,init:function(e,t,n,i){this.seriesIndex=this.componentIndex,this.dataTask=Dd({count:Pd,reset:Rd}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),Cd(this);var a=this.getInitialData(e,n);Bd(a,this),this.dataTask.context.data=a,Ld(this).dataBeforeProcessed=a,Nd(this)},mergeDefaultAndTheme:function(e,t){var n=this.layoutMode,i=n?Id(e):{},a=this.subType;$u.hasClass(a)&&(a+="Series"),Ie.merge(e,t.getTheme().get(this.subType)),Ie.merge(e,this.getDefaultOption()),Sr.defaultEmphasis(e,"label",["show"]),this.fillDataTextStyle(e.data),n&&Ad(e,i,n)},mergeOption:function(e,t){e=Ie.merge(this.option,e,!0),this.fillDataTextStyle(e.data);var n=this.layoutMode;n&&Ad(this.option,e,n),Cd(this);var i=this.getInitialData(e,t);Bd(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,Ld(this).dataBeforeProcessed=i,Nd(this)},fillDataTextStyle:function(e){if(e&&!Ie.isTypedArray(e))for(var t=["show"],n=0;n<e.length;n++)e[n]&&e[n].label&&Sr.defaultEmphasis(e[n],"label",t)},getInitialData:function(){},appendData:function(e){this.getRawData().appendData(e.data)},getData:function(e){var t=Hd(this);if(t){var n=t.context.data;return null==e?n:n.getLinkedData(e)}return Ld(this).data},setData:function(e){var t=Hd(this);if(t){var n=t.context;n.data!==e&&t.modifyOutputEnd&&t.setOutputEnd(e.count()),n.outputData=e,t!==this.dataTask&&(n.data=e)}Ld(this).data=e},getSource:function(){return Od(this)},getRawData:function(){return Ld(this).dataBeforeProcessed},getBaseAxis:function(){var e=this.coordinateSystem;return e&&e.getBaseAxis&&e.getBaseAxis()},formatTooltip:function(e,t,n,i){var a=this,r="html"===(i=i||"html")?"<br/>":"\n",o="richText"===i,s={},l=0;function u(e){return{renderMode:i,content:Sd(Md(e)),style:s}}var c=this.getData(),h=c.mapDimension("defaultedTooltip",!0),d=h.length,f=this.getRawValue(e),p=Ie.isArray(f),g=c.getItemVisual(e,"color");Ie.isObject(g)&&g.colorStops&&(g=(g.colorStops[0]||{}).color),g=g||"transparent";var m=(d>1||p&&!d?function(n){var r=Ie.reduce(n,(function(e,t,n){var i=c.getDimensionInfo(n);return e|(i&&!1!==i.tooltip&&null!=i.displayName)}),0),u=[];function d(e,n){var h=c.getDimensionInfo(n);if(h&&!1!==h.otherDims.tooltip){var d=h.type,f="sub"+a.seriesIndex+"at"+l,p=Td({color:g,type:"subItem",renderMode:i,markerId:f}),m="string"==typeof p?p:p.content,v=(r?m+Sd(h.displayName||"-")+": ":"")+Sd("ordinal"===d?e+"":"time"===d?t?"":wd("yyyy/MM/dd hh:mm:ss",e):Md(e));v&&u.push(v),o&&(s[f]=g,++l)}}h.length?Ie.each(h,(function(t){d(kd(c,e,t),t)})):Ie.each(n,d);var f=r?o?"\n":"<br/>":"",p=f+u.join(f||", ");return{renderMode:i,content:p,style:s}}(f):u(d?kd(c,e,h[0]):p?f[0]:f)).content,v=a.seriesIndex+"at"+l,y=Td({color:g,type:"item",renderMode:i,markerId:v});s[v]=g,++l;var _=c.getName(e),x=this.name;Sr.isNameSpecified(this)||(x=""),x=x?Sd(x)+(t?": ":r):"";var b="string"==typeof y?y:y.content;return{html:t?b+x+m:x+b+(_?Sd(_)+": "+m:m),markers:s}},isAnimationEnabled:function(){if(ne.node)return!1;var e=this.getShallow("animation");return e&&this.getData().count()>this.getShallow("animationThreshold")&&(e=!1),e},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(e,t,n){var i=this.ecModel,a=ac.getColorFromPalette.call(this,e,t,n);return a||(a=i.getColorFromPalette(e,t,n)),a},coordDimToDataDim:function(e){return this.getRawData().mapDimension(e,!0)},getProgressive:function(){return this.get("progressive")},getProgressiveThreshold:function(){return this.get("progressiveThreshold")},getAxisTooltipData:null,getTooltipPosition:null,pipeTask:null,preventIncremental:null,pipelineContext:null});function Nd(e){var t=e.name;Sr.isNameSpecified(e)||(e.name=function(e){var t=e.getRawData(),n=t.mapDimension("seriesName",!0),i=[];return Ie.each(n,(function(e){var n=t.getDimensionInfo(e);n.displayName&&i.push(n.displayName)})),i.join(" ")}(e)||t)}function Pd(e){return e.model.getRawData().count()}function Rd(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),zd}function zd(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function Bd(e,t){Ie.each(e.CHANGABLE_METHODS,(function(n){e.wrapMethod(n,Ie.curry(Vd,t))}))}function Vd(e){var t=Hd(e);t&&t.setOutputEnd(this.count())}function Hd(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var i=n.currentTask;if(i){var a=i.agentStubMap;a&&(i=a.get(e.uid))}return i}}Ie.mixin(Ed,gd),Ie.mixin(Ed,ac);var Yd=Ed,Fd=function(){this.group=new Fn,this.uid=Mu.getUID("viewComponent")},Gd=Fd.prototype={constructor:Fd,init:function(e,t){},render:function(e,t,n,i){},dispose:function(){},filterForExposedEvent:null};Gd.updateView=Gd.updateLayout=Gd.updateVisual=function(e,t,n,i){},Cr.enableClassExtend(Fd),Cr.enableClassManagement(Fd,{registerWhenExtend:!0});var Wd=Fd,jd=Sr.makeInner;var Ud=function(){var e=jd();return function(t){var n=e(t),i=t.pipelineContext,a=n.large,r=n.progressiveRender,o=n.large=i&&i.large,s=n.progressiveRender=i&&i.progressiveRender;return!!(a^o||r^s)&&"reset"}},Zd=Ie.each,Xd=bd.createTask,qd=Sr.makeInner(),Kd=Ud();function Qd(){this.group=new Fn,this.uid=Mu.getUID("viewChart"),this.renderTask=Xd({plan:tf,reset:nf}),this.renderTask.context={view:this}}Qd.prototype={type:"chart",init:function(e,t){},render:function(e,t,n,i){},highlight:function(e,t,n,i){ef(e.getData(),i,"emphasis")},downplay:function(e,t,n,i){ef(e.getData(),i,"normal")},remove:function(e,t){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};var $d=Qd.prototype;function Jd(e,t,n){if(e&&(e.trigger(t,n),e.isGroup&&!lu.isHighDownDispatcher(e)))for(var i=0,a=e.childCount();i<a;i++)Jd(e.childAt(i),t,n)}function ef(e,t,n){var i=Sr.queryDataIndex(e,t),a=t&&null!=t.highlightKey?lu.getHighlightDigit(t.highlightKey):null;null!=i?Zd(Sr.normalizeToArray(i),(function(t){Jd(e.getItemGraphicEl(t),n,a)})):e.eachItemGraphicEl((function(e){Jd(e,n,a)}))}function tf(e){return Kd(e.model)}function nf(e){var t=e.model,n=e.ecModel,i=e.api,a=e.payload,r=t.pipelineContext.progressiveRender,o=e.view,s=a&&qd(a).updateMethod,l=r?"incrementalPrepareRender":s&&o[s]?s:"render";return"render"!==l&&o[l](t,n,i,a),af[l]}$d.updateView=$d.updateLayout=$d.updateVisual=function(e,t,n,i){this.render(e,t,n,i)},Cr.enableClassExtend(Qd,["dispose"]),Cr.enableClassManagement(Qd,{registerWhenExtend:!0}),Qd.markUpdateMethod=function(e,t){qd(e).updateMethod=t};var af={incrementalPrepareRender:{progress:function(e,t){t.view.incrementalRender(e,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(e,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},rf=Qd,of="\0__throttleOriginMethod",sf="\0__throttleRate";function lf(e,t,n){var i,a,r,o,s,l=0,u=0,c=null;function h(){u=(new Date).getTime(),c=null,e.apply(r,o||[])}t=t||0;var d=function(){i=(new Date).getTime(),r=this,o=arguments;var e=s||t,d=s||n;s=null,a=i-(d?l:u)-e,clearTimeout(c),d?c=setTimeout(h,e):a>=0?h():c=setTimeout(h,-a),l=i};return d.clear=function(){c&&(clearTimeout(c),c=null)},d.debounceNextCall=function(e){s=e},d}var uf={throttle:lf,createOrUpdate:function(e,t,n,i){var a=e[t];if(a){var r=a[of]||a,o=a["\0__throttleType"];if(a[sf]!==n||o!==i){if(null==n||!i)return e[t]=r;(a=e[t]=lf(r,n,"debounce"===i))[of]=r,a["\0__throttleType"]=i,a[sf]=n}return a}},clear:function(e,t){var n=e[t];n&&n[of]&&(e[t]=n[of])}},cf=Ie.isFunction,hf={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),i=(e.visualColorAccessPath||"itemStyle.color").split("."),a=e.get(i),r=!cf(a)||a instanceof Js?null:a;a&&!r||(a=e.getColorFromPalette(e.name,null,t.getSeriesCount())),n.setVisual("color",a);var o=(e.visualBorderColorAccessPath||"itemStyle.borderColor").split("."),s=e.get(o);if(n.setVisual("borderColor",s),!t.isSeriesFiltered(e)){r&&n.each((function(t){n.setItemVisual(t,"color",r(e.getDataParams(t)))}));return{dataEach:n.hasItemOption?function(e,t){var n=e.getItemModel(t),a=n.get(i,!0),r=n.get(o,!0);null!=a&&e.setItemVisual(t,"color",a),null!=r&&e.setItemVisual(t,"borderColor",r)}:null}}}},df={legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表，"},series:{single:{prefix:"",withName:"图表类型是{seriesType}，表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType}，",withoutName:"第{seriesId}个系列是一个{seriesType}，",separator:{middle:"；",end:"。"}}},data:{allData:"其数据是——",partialData:"其中，前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:"，",end:""}}}},ff=ud.retrieveRawValue;var pf=function(e,t){var n=t.getModel("aria");if(n.get("show"))if(n.get("description"))e.setAttribute("aria-label",n.get("description"));else{var i=0;t.eachSeries((function(e,t){++i}),this);var a,r=n.get("data.maxCount")||10,o=n.get("series.maxCount")||10,s=Math.min(i,o);if(!(i<1)){var l=function(){var e=t.getModel("title").option;e&&e.length&&(e=e[0]);return e&&e.text}();a=l?c(h("general.withTitle"),{title:l}):h("general.withoutTitle");var u=[];a+=c(h(i>1?"series.multiple.prefix":"series.single.prefix"),{seriesCount:i}),t.eachSeries((function(e,t){if(t<s){var n,a=e.get("name"),o="series."+(i>1?"multiple":"single")+".";n=c(n=h(a?o+"withName":o+"withoutName"),{seriesId:e.seriesIndex,seriesName:e.get("name"),seriesType:(m=e.subType,df.series.typeNames[m]||"自定义图")});var l=e.getData();window.data=l,l.count()>r?n+=c(h("data.partialData"),{displayCnt:r}):n+=h("data.allData");for(var d=[],f=0;f<l.count();f++)if(f<r){var p=l.getName(f),g=ff(l,f);d.push(c(h(p?"data.withName":"data.withoutName"),{name:p,value:g}))}n+=d.join(h("data.separator.middle"))+h("data.separator.end"),u.push(n)}var m})),a+=u.join(h("series.multiple.separator.middle"))+h("series.multiple.separator.end"),e.setAttribute("aria-label",a)}}function c(e,t){if("string"!=typeof e)return e;var n=e;return Ie.each(t,(function(e,t){n=n.replace(new RegExp("\\{\\s*"+t+"\\s*\\}","g"),e)})),n}function h(e){var t=n.get(e);if(null==t){for(var i=e.split("."),a=df.aria,r=0;r<i.length;++r)a=a[i[r]];return a}return t}},gf=Math.PI;var mf=function(e,t){t=t||{},Ie.defaults(t,{text:"loading",textColor:"#000",fontSize:"12px",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#c23531",spinnerRadius:10,lineWidth:5,zlevel:0});var n=new lu.Group,i=new lu.Rect({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(i);var a=t.fontSize+" sans-serif",r=new lu.Rect({style:{fill:"none",text:t.text,font:a,textPosition:"right",textDistance:10,textFill:t.textColor},zlevel:t.zlevel,z:10001});if(n.add(r),t.showSpinner){var o=new lu.Arc({shape:{startAngle:-gf/2,endAngle:-gf/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001});o.animateShape(!0).when(1e3,{endAngle:3*gf/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:3*gf/2}).delay(300).start("circularInOut"),n.add(o)}return n.resize=function(){var n=Wi.getWidth(t.text,a),s=t.showSpinner?t.spinnerRadius:0,l=(e.getWidth()-2*s-(t.showSpinner&&n?10:0)-n)/2-(t.showSpinner?0:n/2),u=e.getHeight()/2;t.showSpinner&&o.setShape({cx:l,cy:u}),r.setShape({x:l-s,y:u-s,width:2*s,height:2*s}),i.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n},vf=Ie.each,yf=Ie.map,_f=Ie.isFunction,xf=Ie.createHashMap,bf=Ie.noop,wf=bd.createTask,Sf=Mu.getUID,Mf=Sr.normalizeToArray;function Tf(e,t,n,i){this.ecInstance=e,this.api=t,this.unfinished;n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice();this._allHandlers=n.concat(i),this._stageTaskMap=xf()}var If=Tf.prototype;function Af(e,t,n,i,a){var r;function o(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}a=a||{},vf(t,(function(t,s){if(!a.visualType||a.visualType===t.visualType){var l=e._stageTaskMap.get(t.uid),u=l.seriesTaskMap,c=l.overallTask;if(c){var h,d=c.agentStubMap;d.each((function(e){o(a,e)&&(e.dirty(),h=!0)})),h&&c.dirty(),Df(c,i);var f=e.getPerformArgs(c,a.block);d.each((function(e){e.perform(f)})),r|=c.perform(f)}else u&&u.each((function(s,l){o(a,s)&&s.dirty();var u=e.getPerformArgs(s,a.block);u.skip=!t.performRawSeries&&n.isSeriesFiltered(s.context.model),Df(s,i),r|=s.perform(u)}))}})),e.unfinished|=r}If.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each((function(e){var t=e.overallTask;t&&t.dirty()}))},If.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),i=n.context,a=!t&&n.progressiveEnabled&&(!i||i.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,r=i&&i.modDataCount;return{step:a,modBy:null!=r?Math.ceil(r/a):null,modDataCount:r}}},If.getPipeline=function(e){return this._pipelineMap.get(e)},If.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid),i=e.getData().count(),a=n.progressiveEnabled&&t.incrementalPrepareRender&&i>=n.threshold,r=e.get("large")&&i>=e.get("largeThreshold"),o="mod"===e.get("progressiveChunkMode")?i:null;e.pipelineContext=n.context={progressiveRender:a,modDataCount:o,large:r}},If.restorePipelines=function(e){var t=this,n=t._pipelineMap=xf();e.eachSeries((function(e){var i=e.getProgressive(),a=e.uid;n.set(a,{id:a,head:null,tail:null,threshold:e.getProgressiveThreshold(),progressiveEnabled:i&&!(e.preventIncremental&&e.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),Bf(t,e,e.dataTask)}))},If.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.ecInstance.getModel(),n=this.api;vf(this._allHandlers,(function(i){var a=e.get(i.uid)||e.set(i.uid,[]);i.reset&&function(e,t,n,i,a){var r=n.seriesTaskMap||(n.seriesTaskMap=xf()),o=t.seriesType,s=t.getTargetSeries;t.createOnAllSeries?i.eachRawSeries(l):o?i.eachRawSeriesByType(o,l):s&&s(i,a).each(l);function l(n){var o=n.uid,s=r.get(o)||r.set(o,wf({plan:Ef,reset:Nf,count:zf}));s.context={model:n,ecModel:i,api:a,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:e},Bf(e,n,s)}var u=e._pipelineMap;r.each((function(e,t){u.get(t)||(e.dispose(),r.removeKey(t))}))}(this,i,a,t,n),i.overallReset&&function(e,t,n,i,a){var r=n.overallTask=n.overallTask||wf({reset:Cf});r.context={ecModel:i,api:a,overallReset:t.overallReset,scheduler:e};var o=r.agentStubMap=r.agentStubMap||xf(),s=t.seriesType,l=t.getTargetSeries,u=!0,c=t.modifyOutputEnd;s?i.eachRawSeriesByType(s,h):l?l(i,a).each(h):(u=!1,vf(i.getSeries(),h));function h(t){var n=t.uid,i=o.get(n);i||(i=o.set(n,wf({reset:Of,onDirty:Lf})),r.dirty()),i.context={model:t,overallProgress:u,modifyOutputEnd:c},i.agent=r,i.__block=u,Bf(e,t,i)}var d=e._pipelineMap;o.each((function(e,t){d.get(t)||(e.dispose(),r.dirty(),o.removeKey(t))}))}(this,i,a,t,n)}),this)},If.prepareView=function(e,t,n,i){var a=e.renderTask,r=a.context;r.model=t,r.ecModel=n,r.api=i,a.__block=!e.incrementalPrepareRender,Bf(this,t,a)},If.performDataProcessorTasks=function(e,t){Af(this,this._dataProcessorHandlers,e,t,{block:!0})},If.performVisualTasks=function(e,t,n){Af(this,this._visualHandlers,e,t,n)},If.performSeriesTasks=function(e){var t;e.eachSeries((function(e){t|=e.dataTask.perform()})),this.unfinished|=t},If.plan=function(){this._pipelineMap.each((function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)}))};var Df=If.updatePayload=function(e,t){"remain"!==t&&(e.context.payload=t)};function Cf(e){e.overallReset(e.ecModel,e.api,e.payload)}function Of(e,t){return e.overallProgress&&kf}function kf(){this.agent.dirty(),this.getDownstream().dirty()}function Lf(){this.agent&&this.agent.dirty()}function Ef(e){return e.plan&&e.plan(e.model,e.ecModel,e.api,e.payload)}function Nf(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=Mf(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?yf(t,(function(e,t){return Rf(t)})):Pf}var Pf=Rf(0);function Rf(e){return function(t,n){var i=n.data,a=n.resetDefines[e];if(a&&a.dataEach)for(var r=t.start;r<t.end;r++)a.dataEach(i,r);else a&&a.progress&&a.progress(t,i)}}function zf(e){return e.data.count()}function Bf(e,t,n){var i=t.uid,a=e._pipelineMap.get(i);!a.head&&(a.head=n),a.tail&&a.tail.pipe(n),a.tail=n,n.__idxInPipeline=a.count++,n.__pipeline=a}function Vf(e){Hf=null;try{e(Yf,Ff)}catch(e){}return Hf}Tf.wrapStageHandler=function(e,t){return _f(e)&&(e={overallReset:e,seriesType:Vf(e)}),e.uid=Sf("stageHandler"),t&&(e.visualType=t),e};var Hf,Yf={},Ff={};function Gf(e,t){for(var n in t.prototype)e[n]=bf}Gf(Yf,rh),Gf(Ff,sh),Yf.eachSeriesByType=Yf.eachRawSeriesByType=function(e){Hf=e},Yf.eachComponent=function(e){"series"===e.mainType&&e.subType&&(Hf=e.subType)};var Wf=Tf,jf=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],Uf={color:jf,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],jf]},Zf=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],Xf={color:Zf,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:"#eee"},crossStyle:{color:"#eee"},label:{color:"#000"}}},legend:{textStyle:{color:"#eee"}},textStyle:{color:"#eee"},title:{textStyle:{color:"#eee"}},toolbox:{iconStyle:{normal:{borderColor:"#eee"}}},dataZoom:{textStyle:{color:"#eee"}},visualMap:{textStyle:{color:"#eee"}},timeline:{lineStyle:{color:"#eee"},itemStyle:{normal:{color:Zf[1]}},label:{normal:{textStyle:{color:"#eee"}}},controlStyle:{normal:{color:"#eee",borderColor:"#eee"}}},timeAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},logAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},valueAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},categoryAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},line:{symbol:"circle"},graph:{color:Zf},gauge:{title:{textStyle:{color:"#eee"}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};Xf.categoryAxis.splitLine.show=!1;var qf=Xf,Kf=Hc.detectSourceFormat,Qf=rc.SERIES_LAYOUT_BY_COLUMN;$u.extend({type:"dataset",defaultOption:{seriesLayoutBy:Qf,sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){Kf(this)}}),Wd.extend({type:"dataset"});var $f=jo.extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(e,t){var n=.5522848,i=t.cx,a=t.cy,r=t.rx,o=t.ry,s=r*n,l=o*n;e.moveTo(i-r,a),e.bezierCurveTo(i-r,a-l,i-s,a-o,i,a-o),e.bezierCurveTo(i+s,a-o,i+r,a-l,i+r,a),e.bezierCurveTo(i+r,a+l,i+s,a+o,i,a+o),e.bezierCurveTo(i-s,a+o,i-r,a+l,i-r,a),e.closePath()}}),Jf=us.createFromString,ep=Ie.isString,tp=Ie.extend,np=Ie.defaults,ip=Ie.trim,ap=Ie.each,rp=/[\s,]+/;function op(e){ep(e)&&(e=(new DOMParser).parseFromString(e,"text/xml"));for(9===e.nodeType&&(e=e.firstChild);"svg"!==e.nodeName.toLowerCase()||1!==e.nodeType;)e=e.nextSibling;return e}function sp(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}sp.prototype.parse=function(e,t){t=t||{};var n=op(e);if(!n)throw new Error("Illegal svg");var i=new Fn;this._root=i;var a=n.getAttribute("viewBox")||"",r=parseFloat(n.getAttribute("width")||t.width),o=parseFloat(n.getAttribute("height")||t.height);isNaN(r)&&(r=null),isNaN(o)&&(o=null),fp(n,i,null,!0);for(var s,l,u=n.firstChild;u;)this._parseNode(u,i),u=u.nextSibling;if(a){var c=ip(a).split(rp);c.length>=4&&(s={x:parseFloat(c[0]||0),y:parseFloat(c[1]||0),width:parseFloat(c[2]),height:parseFloat(c[3])})}if(s&&null!=r&&null!=o&&(l=yp(s,r,o),!t.ignoreViewBox)){var h=i;(i=new Fn).add(h),h.scale=l.scale.slice(),h.position=l.position.slice()}return t.ignoreRootClip||null==r||null==o||i.setClipPath(new zs({shape:{x:0,y:0,width:r,height:o}})),{root:i,width:r,height:o,viewBoxRect:s,viewBoxTransform:l}},sp.prototype._parseNode=function(e,t){var n,i,a=e.nodeName.toLowerCase();if("defs"===a?this._isDefine=!0:"text"===a&&(this._isText=!0),this._isDefine){if(i=up[a]){var r=i.call(this,e),o=e.getAttribute("id");o&&(this._defs[o]=r)}}else(i=lp[a])&&(n=i.call(this,e,t),t.add(n));for(var s=e.firstChild;s;)1===s.nodeType&&this._parseNode(s,n),3===s.nodeType&&this._isText&&this._parseText(s,n),s=s.nextSibling;"defs"===a?this._isDefine=!1:"text"===a&&(this._isText=!1)},sp.prototype._parseText=function(e,t){if(1===e.nodeType){var n=e.getAttribute("dx")||0,i=e.getAttribute("dy")||0;this._textX+=parseFloat(n),this._textY+=parseFloat(i)}var a=new ds({style:{text:e.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});cp(t,a),fp(e,a,this._defs);var r=a.style.fontSize;r&&r<9&&(a.style.fontSize=9,a.scale=a.scale||[1,1],a.scale[0]*=r/9,a.scale[1]*=r/9);var o=a.getBoundingRect();return this._textX+=o.width,t.add(a),a};var lp={g:function(e,t){var n=new Fn;return cp(t,n),fp(e,n,this._defs),n},rect:function(e,t){var n=new zs;return cp(t,n),fp(e,n,this._defs),n.setShape({x:parseFloat(e.getAttribute("x")||0),y:parseFloat(e.getAttribute("y")||0),width:parseFloat(e.getAttribute("width")||0),height:parseFloat(e.getAttribute("height")||0)}),n},circle:function(e,t){var n=new fs;return cp(t,n),fp(e,n,this._defs),n.setShape({cx:parseFloat(e.getAttribute("cx")||0),cy:parseFloat(e.getAttribute("cy")||0),r:parseFloat(e.getAttribute("r")||0)}),n},line:function(e,t){var n=new Hs;return cp(t,n),fp(e,n,this._defs),n.setShape({x1:parseFloat(e.getAttribute("x1")||0),y1:parseFloat(e.getAttribute("y1")||0),x2:parseFloat(e.getAttribute("x2")||0),y2:parseFloat(e.getAttribute("y2")||0)}),n},ellipse:function(e,t){var n=new $f;return cp(t,n),fp(e,n,this._defs),n.setShape({cx:parseFloat(e.getAttribute("cx")||0),cy:parseFloat(e.getAttribute("cy")||0),rx:parseFloat(e.getAttribute("rx")||0),ry:parseFloat(e.getAttribute("ry")||0)}),n},polygon:function(e,t){var n=e.getAttribute("points");n&&(n=hp(n));var i=new Os({shape:{points:n||[]}});return cp(t,i),fp(e,i,this._defs),i},polyline:function(e,t){var n=new jo;cp(t,n),fp(e,n,this._defs);var i=e.getAttribute("points");return i&&(i=hp(i)),new ks({shape:{points:i||[]}})},image:function(e,t){var n=new Da;return cp(t,n),fp(e,n,this._defs),n.setStyle({image:e.getAttribute("xlink:href"),x:e.getAttribute("x"),y:e.getAttribute("y"),width:e.getAttribute("width"),height:e.getAttribute("height")}),n},text:function(e,t){var n=e.getAttribute("x")||0,i=e.getAttribute("y")||0,a=e.getAttribute("dx")||0,r=e.getAttribute("dy")||0;this._textX=parseFloat(n)+parseFloat(a),this._textY=parseFloat(i)+parseFloat(r);var o=new Fn;return cp(t,o),fp(e,o,this._defs),o},tspan:function(e,t){var n=e.getAttribute("x"),i=e.getAttribute("y");null!=n&&(this._textX=parseFloat(n)),null!=i&&(this._textY=parseFloat(i));var a=e.getAttribute("dx")||0,r=e.getAttribute("dy")||0,o=new Fn;return cp(t,o),fp(e,o,this._defs),this._textX+=a,this._textY+=r,o},path:function(e,t){var n=e.getAttribute("d")||"",i=Jf(n);return cp(t,i),fp(e,i,this._defs),i}},up={lineargradient:function(e){var t=parseInt(e.getAttribute("x1")||0,10),n=parseInt(e.getAttribute("y1")||0,10),i=parseInt(e.getAttribute("x2")||10,10),a=parseInt(e.getAttribute("y2")||0,10),r=new tl(t,n,i,a);return function(e,t){var n=e.firstChild;for(;n;){if(1===n.nodeType){var i=n.getAttribute("offset");i=i.indexOf("%")>0?parseInt(i,10)/100:i?parseFloat(i):0;var a=n.getAttribute("stop-color")||"#000000";t.addColorStop(i,a)}n=n.nextSibling}}(e,r),r},radialgradient:function(e){}};function cp(e,t){e&&e.__inheritedStyle&&(t.__inheritedStyle||(t.__inheritedStyle={}),np(t.__inheritedStyle,e.__inheritedStyle))}function hp(e){for(var t=ip(e).split(rp),n=[],i=0;i<t.length;i+=2){var a=parseFloat(t[i]),r=parseFloat(t[i+1]);n.push([a,r])}return n}var dp={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-align":"textAlign","alignment-baseline":"textBaseline"};function fp(e,t,n,i){var a=t.__inheritedStyle||{},r="text"===t.type;if(1===e.nodeType&&(function(e,t){var n=e.getAttribute("transform");if(n){n=n.replace(/,/g," ");var i=null,a=[];n.replace(mp,(function(e,t,n){a.push(t,n)}));for(var r=a.length-1;r>0;r-=2){var o=a[r],s=a[r-1];switch(i=i||yt.create(),s){case"translate":o=ip(o).split(rp),yt.translate(i,i,[parseFloat(o[0]),parseFloat(o[1]||0)]);break;case"scale":o=ip(o).split(rp),yt.scale(i,i,[parseFloat(o[0]),parseFloat(o[1]||o[0])]);break;case"rotate":o=ip(o).split(rp),yt.rotate(i,i,parseFloat(o[0]));break;case"skew":o=ip(o).split(rp),console.warn("Skew transform is not supported yet");break;case"matrix":o=ip(o).split(rp);i[0]=parseFloat(o[0]),i[1]=parseFloat(o[1]),i[2]=parseFloat(o[2]),i[3]=parseFloat(o[3]),i[4]=parseFloat(o[4]),i[5]=parseFloat(o[5])}}t.setLocalTransform(i)}}(e,t),tp(a,function(e){var t=e.getAttribute("style"),n={};if(!t)return n;var i,a={};vp.lastIndex=0;for(;null!=(i=vp.exec(t));)a[i[1]]=i[2];for(var r in dp)dp.hasOwnProperty(r)&&null!=a[r]&&(n[dp[r]]=a[r]);return n}(e)),!i))for(var o in dp)if(dp.hasOwnProperty(o)){var s=e.getAttribute(o);null!=s&&(a[dp[o]]=s)}var l=r?"textFill":"fill",u=r?"textStroke":"stroke";t.style=t.style||new ui;var c=t.style;null!=a.fill&&c.set(l,gp(a.fill,n)),null!=a.stroke&&c.set(u,gp(a.stroke,n)),ap(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],(function(e){var t="lineWidth"===e&&r?"textStrokeWidth":e;null!=a[e]&&c.set(t,parseFloat(a[e]))})),a.textBaseline&&"auto"!==a.textBaseline||(a.textBaseline="alphabetic"),"alphabetic"===a.textBaseline&&(a.textBaseline="bottom"),"start"===a.textAlign&&(a.textAlign="left"),"end"===a.textAlign&&(a.textAlign="right"),ap(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],(function(e){null!=a[e]&&c.set(e,a[e])})),a.lineDash&&(t.style.lineDash=ip(a.lineDash).split(rp)),c[u]&&"none"!==c[u]&&(t[u]=!0),t.__inheritedStyle=a}var pp=/url\(\s*#(.*?)\)/;function gp(e,t){var n=t&&e&&e.match(pp);return n?t[ip(n[1])]:e}var mp=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g;var vp=/([^\s:;]+)\s*:\s*([^:;]+)/g;function yp(e,t,n){var i=t/e.width,a=n/e.height,r=Math.min(i,a);return{scale:[r,r],position:[-(e.x+e.width/2)*r+t/2,-(e.y+e.height/2)*r+n/2]}}var _p={parseXML:op,makeViewBoxTransform:yp,parseSVG:function(e,t){return(new sp).parse(e,t)}},xp=Ie.createHashMap,bp=Ie.isString,wp=Ie.isArray,Sp=Ie.each,Mp=_p.parseXML,Tp=xp(),Ip={registerMap:function(e,t,n){var i;return wp(t)?i=t:t.svg?i=[{type:"svg",source:t.svg,specialAreas:t.specialAreas}]:(t.geoJson&&!t.features&&(n=t.specialAreas,t=t.geoJson),i=[{type:"geoJSON",source:t,specialAreas:n}]),Sp(i,(function(e){var t=e.type;"geoJson"===t&&(t=e.type="geoJSON"),(0,Ap[t])(e)})),Tp.set(e,i)},retrieveMap:function(e){return Tp.get(e)}},Ap={geoJSON:function(e){var t=e.source;e.geoJSON=bp(t)?"undefined"!=typeof JSON&&JSON.parse?JSON.parse(t):new Function("return ("+t+");")():t},svg:function(e){e.svgXML=Mp(e.source)}},Dp=Ip;function Cp(e){return e}function Op(e,t,n,i,a){this._old=e,this._new=t,this._oldKeyGetter=n||Cp,this._newKeyGetter=i||Cp,this.context=a}function kp(e,t,n,i,a){for(var r=0;r<e.length;r++){var o="_ec_"+a[i](e[r],r),s=t[o];null==s?(n.push(o),t[o]=r):(s.length||(t[o]=s=[s]),s.push(r))}}Op.prototype={constructor:Op,add:function(e){return this._add=e,this},update:function(e){return this._update=e,this},remove:function(e){return this._remove=e,this},execute:function(){var e=this._old,t=this._new,n={},i=[],a=[];for(kp(e,{},i,"_oldKeyGetter",this),kp(t,n,a,"_newKeyGetter",this),r=0;r<e.length;r++){if(null!=(s=n[o=i[r]]))(u=s.length)?(1===u&&(n[o]=null),s=s.shift()):n[o]=null,this._update&&this._update(s,r);else this._remove&&this._remove(r)}for(var r=0;r<a.length;r++){var o=a[r];if(n.hasOwnProperty(o)){var s;if(null==(s=n[o]))continue;if(s.length)for(var l=0,u=s.length;l<u;l++)this._add&&this._add(s[l]);else this._add&&this._add(s)}}}};var Lp=Op,Ep=Ie.each,Np=Ie.createHashMap,Pp=Np(["tooltip","label","itemName","itemId","seriesName"]);function Rp(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}var zp={OTHER_DIMENSIONS:Pp,summarizeDimensions:function(e){var t={},n=t.encode={},i=Np(),a=[],r=[],o=t.userOutput={dimensionNames:e.dimensions.slice(),encode:{}};Ep(e.dimensions,(function(t){var s,l=e.getDimensionInfo(t),u=l.coordDim;if(u){var c=l.coordDimIndex;Rp(n,u)[c]=t,l.isExtraCoord||(i.set(u,1),"ordinal"!==(s=l.type)&&"time"!==s&&(a[0]=t),Rp(o.encode,u)[c]=l.index),l.defaultTooltip&&r.push(t)}Pp.each((function(e,t){var i=Rp(n,t),a=l.otherDims[t];null!=a&&!1!==a&&(i[a]=l.name)}))}));var s=[],l={};i.each((function(e,t){var i=n[t];l[t]=i[0],s=s.concat(i)})),t.dataDimsOnCoord=s,t.encodeFirstDimNotExtra=l;var u=n.label;u&&u.length&&(a=u.slice());var c=n.tooltip;return c&&c.length?r=c.slice():r.length||(r=a.slice()),n.defaultedLabel=a,n.defaultedTooltip=r,t},getDimensionTypeByAxis:function(e){return"category"===e?"ordinal":"time"===e?"time":"float"}};var Bp=function(e){null!=e&&Ie.extend(this,e),this.otherDims={}},Vp=ud.defaultDimValueGetters,Hp=ud.DefaultDataProvider,Yp=zp.summarizeDimensions,Fp=Ie.isObject,Gp={float:"undefined"==typeof Float64Array?Array:Float64Array,int:"undefined"==typeof Int32Array?Array:Int32Array,ordinal:Array,number:Array,time:Array},Wp="undefined"==typeof Uint32Array?Array:Uint32Array,jp="undefined"==typeof Int32Array?Array:Int32Array,Up="undefined"==typeof Uint16Array?Array:Uint16Array;function Zp(e){return e._rawCount>65535?Wp:Up}var Xp=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"],qp=["_extent","_approximateExtent","_rawExtent"];function Kp(e,t){Ie.each(Xp.concat(t.__wrappedMethods||[]),(function(n){t.hasOwnProperty(n)&&(e[n]=t[n])})),e.__wrappedMethods=t.__wrappedMethods,Ie.each(qp,(function(n){e[n]=Ie.clone(t[n])})),e._calculationInfo=Ie.extend(t._calculationInfo)}var Qp=function(e,t){e=e||["x","y"];for(var n={},i=[],a={},r=0;r<e.length;r++){var o=e[r];Ie.isString(o)?o=new Bp({name:o}):o instanceof Bp||(o=new Bp(o));var s=o.name;o.type=o.type||"float",o.coordDim||(o.coordDim=s,o.coordDimIndex=0),o.otherDims=o.otherDims||{},i.push(s),n[s]=o,o.index=r,o.createInvertedIndices&&(a[s]=[])}this.dimensions=i,this._dimensionInfos=n,this.hostModel=t,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=Yp(this),this._invertedIndicesMap=a,this._calculationInfo={},this.userOutput=this._dimensionsSummary.userOutput},$p=Qp.prototype;function Jp(e,t,n,i,a){var r=Gp[t.type],o=i-1,s=t.name,l=e[s][o];if(l&&l.length<n){for(var u=new r(Math.min(a-o*n,n)),c=0;c<l.length;c++)u[c]=l[c];e[s][o]=u}for(var h=i*n;h<a;h+=n)e[s].push(new r(Math.min(a-h,n)))}function eg(e){var t=e._invertedIndicesMap;Ie.each(t,(function(n,i){var a=e._dimensionInfos[i].ordinalMeta;if(a){n=t[i]=new jp(a.categories.length);for(var r=0;r<n.length;r++)n[r]=-1;for(r=0;r<e._count;r++)n[e.get(i,r)]=r}}))}function tg(e,t,n){var i;if(null!=t){var a=e._chunkSize,r=Math.floor(n/a),o=n%a,s=e.dimensions[t],l=e._storage[s][r];if(l){i=l[o];var u=e._dimensionInfos[s].ordinalMeta;u&&u.categories.length&&(i=u.categories[i])}}return i}function ng(e){return e}function ig(e){return e<this._count&&e>=0?this._indices[e]:-1}function ag(e,t){var n=e._idList[t];return null==n&&(n=tg(e,e._idDimIdx,t)),null==n&&(n="e\0\0"+t),n}function rg(e){return Ie.isArray(e)||(e=[e]),e}function og(e,t){var n=e.dimensions,i=new Qp(Ie.map(n,e.getDimensionInfo,e),e.hostModel);Kp(i,e);for(var a=i._storage={},r=e._storage,o=0;o<n.length;o++){var s=n[o];r[s]&&(Ie.indexOf(t,s)>=0?(a[s]=sg(r[s]),i._rawExtent[s]=lg(),i._extent[s]=null):a[s]=r[s])}return i}function sg(e){for(var t,n,i=new Array(e.length),a=0;a<e.length;a++)i[a]=(t=e[a],n=void 0,(n=t.constructor)===Array?t.slice():new n(t));return i}function lg(){return[1/0,-1/0]}$p.type="list",$p.hasItemOption=!0,$p.getDimension=function(e){return"number"!=typeof e&&(isNaN(e)||this._dimensionInfos.hasOwnProperty(e))||(e=this.dimensions[e]),e},$p.getDimensionInfo=function(e){return this._dimensionInfos[this.getDimension(e)]},$p.getDimensionsOnCoord=function(){return this._dimensionsSummary.dataDimsOnCoord.slice()},$p.mapDimension=function(e,t){var n=this._dimensionsSummary;if(null==t)return n.encodeFirstDimNotExtra[e];var i=n.encode[e];return!0===t?(i||[]).slice():i&&i[t]},$p.initData=function(e,t,n){(gc.isInstance(e)||Ie.isArrayLike(e))&&(e=new Hp(e,this.dimensions.length)),this._rawData=e,this._storage={},this._indices=null,this._nameList=t||[],this._idList=[],this._nameRepeatCount={},n||(this.hasItemOption=!1),this.defaultDimValueGetter=Vp[this._rawData.getSource().sourceFormat],this._dimValueGetter=n=n||this.defaultDimValueGetter,this._dimValueGetterArrayRows=Vp.arrayRows,this._rawExtent={},this._initDataFromProvider(0,e.count()),e.pure&&(this.hasItemOption=!1)},$p.getProvider=function(){return this._rawData},$p.appendData=function(e){var t=this._rawData,n=this.count();t.appendData(e);var i=t.count();t.persistent||(i+=n),this._initDataFromProvider(n,i)},$p.appendValues=function(e,t){for(var n=this._chunkSize,i=this._storage,a=this.dimensions,r=a.length,o=this._rawExtent,s=this.count(),l=s+Math.max(e.length,t?t.length:0),u=this._chunkCount,c=0;c<r;c++){o[v=a[c]]||(o[v]=lg()),i[v]||(i[v]=[]),Jp(i,this._dimensionInfos[v],n,u,l),this._chunkCount=i[v].length}for(var h=new Array(r),d=s;d<l;d++){for(var f=d-s,p=Math.floor(d/n),g=d%n,m=0;m<r;m++){var v=a[m],y=this._dimValueGetterArrayRows(e[f]||h,v,f,m);i[v][p][g]=y;var _=o[v];y<_[0]&&(_[0]=y),y>_[1]&&(_[1]=y)}t&&(this._nameList[d]=t[f])}this._rawCount=this._count=l,this._extent={},eg(this)},$p._initDataFromProvider=function(e,t){if(!(e>=t)){for(var n,i=this._chunkSize,a=this._rawData,r=this._storage,o=this.dimensions,s=o.length,l=this._dimensionInfos,u=this._nameList,c=this._idList,h=this._rawExtent,d=this._nameRepeatCount={},f=this._chunkCount,p=0;p<s;p++){h[b=o[p]]||(h[b]=lg());var g=l[b];0===g.otherDims.itemName&&(n=this._nameDimIdx=p),0===g.otherDims.itemId&&(this._idDimIdx=p),r[b]||(r[b]=[]),Jp(r,g,i,f,t),this._chunkCount=r[b].length}for(var m=new Array(s),v=e;v<t;v++){m=a.getItem(v,m);for(var y=Math.floor(v/i),_=v%i,x=0;x<s;x++){var b,w=r[b=o[x]][y],S=this._dimValueGetter(m,b,v,x);w[_]=S;var M=h[b];S<M[0]&&(M[0]=S),S>M[1]&&(M[1]=S)}if(!a.pure){var T=u[v];if(m&&null==T)if(null!=m.name)u[v]=T=m.name;else if(null!=n){var I=o[n],A=r[I][y];if(A){T=A[_];var D=l[I].ordinalMeta;D&&D.categories.length&&(T=D.categories[T])}}var C=null==m?null:m.id;null==C&&null!=T&&(d[T]=d[T]||0,C=T,d[T]>0&&(C+="__ec__"+d[T]),d[T]++),null!=C&&(c[v]=C)}}!a.persistent&&a.clean&&a.clean(),this._rawCount=this._count=t,this._extent={},eg(this)}},$p.count=function(){return this._count},$p.getIndices=function(){var e=this._indices;if(e){var t=e.constructor,n=this._count;if(t===Array){a=new t(n);for(var i=0;i<n;i++)a[i]=e[i]}else a=new t(e.buffer,0,n)}else{var a=new(t=Zp(this))(this.count());for(i=0;i<a.length;i++)a[i]=i}return a},$p.get=function(e,t){if(!(t>=0&&t<this._count))return NaN;var n=this._storage;if(!n[e])return NaN;t=this.getRawIndex(t);var i=Math.floor(t/this._chunkSize),a=t%this._chunkSize;return n[e][i][a]},$p.getByRawIndex=function(e,t){if(!(t>=0&&t<this._rawCount))return NaN;var n=this._storage[e];if(!n)return NaN;var i=Math.floor(t/this._chunkSize),a=t%this._chunkSize;return n[i][a]},$p._getFast=function(e,t){var n=Math.floor(t/this._chunkSize),i=t%this._chunkSize;return this._storage[e][n][i]},$p.getValues=function(e,t){var n=[];Ie.isArray(e)||(t=e,e=this.dimensions);for(var i=0,a=e.length;i<a;i++)n.push(this.get(e[i],t));return n},$p.hasValue=function(e){for(var t=this._dimensionsSummary.dataDimsOnCoord,n=0,i=t.length;n<i;n++)if(isNaN(this.get(t[n],e)))return!1;return!0},$p.getDataExtent=function(e){e=this.getDimension(e);var t=this._storage[e],n=lg();if(!t)return n;var i,a=this.count();if(!this._indices)return this._rawExtent[e].slice();if(i=this._extent[e])return i.slice();for(var r=(i=n)[0],o=i[1],s=0;s<a;s++){var l=this._getFast(e,this.getRawIndex(s));l<r&&(r=l),l>o&&(o=l)}return i=[r,o],this._extent[e]=i,i},$p.getApproximateExtent=function(e){return e=this.getDimension(e),this._approximateExtent[e]||this.getDataExtent(e)},$p.setApproximateExtent=function(e,t){t=this.getDimension(t),this._approximateExtent[t]=e.slice()},$p.getCalculationInfo=function(e){return this._calculationInfo[e]},$p.setCalculationInfo=function(e,t){Fp(e)?Ie.extend(this._calculationInfo,e):this._calculationInfo[e]=t},$p.getSum=function(e){var t=0;if(this._storage[e])for(var n=0,i=this.count();n<i;n++){var a=this.get(e,n);isNaN(a)||(t+=a)}return t},$p.getMedian=function(e){var t=[];this.each(e,(function(e,n){isNaN(e)||t.push(e)}));var n=[].concat(t).sort((function(e,t){return e-t})),i=this.count();return 0===i?0:i%2==1?n[(i-1)/2]:(n[i/2]+n[i/2-1])/2},$p.rawIndexOf=function(e,t){var n=(e&&this._invertedIndicesMap[e])[t];return null==n||isNaN(n)?-1:n},$p.indexOfName=function(e){for(var t=0,n=this.count();t<n;t++)if(this.getName(t)===e)return t;return-1},$p.indexOfRawIndex=function(e){if(e>=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(null!=n&&n<this._count&&n===e)return e;for(var i=0,a=this._count-1;i<=a;){var r=(i+a)/2|0;if(t[r]<e)i=r+1;else{if(!(t[r]>e))return r;a=r-1}}return-1},$p.indicesOfNearest=function(e,t,n){var i=[];if(!this._storage[e])return i;null==n&&(n=1/0);for(var a=1/0,r=-1,o=0,s=0,l=this.count();s<l;s++){var u=t-this.get(e,s),c=Math.abs(u);c<=n&&((c<a||c===a&&u>=0&&r<0)&&(a=c,r=u,o=0),u===r&&(i[o++]=s))}return i.length=o,i},$p.getRawIndex=ng,$p.getRawDataItem=function(e){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(e));for(var t=[],n=0;n<this.dimensions.length;n++){var i=this.dimensions[n];t.push(this.get(i,e))}return t},$p.getName=function(e){var t=this.getRawIndex(e);return this._nameList[t]||tg(this,this._nameDimIdx,t)||""},$p.getId=function(e){return ag(this,this.getRawIndex(e))},$p.each=function(e,t,n,i){if(this._count){"function"==typeof e&&(i=n,n=t,t=e,e=[]),n=n||i||this;for(var a=(e=Ie.map(rg(e),this.getDimension,this)).length,r=0;r<this.count();r++)switch(a){case 0:t.call(n,r);break;case 1:t.call(n,this.get(e[0],r),r);break;case 2:t.call(n,this.get(e[0],r),this.get(e[1],r),r);break;default:for(var o=0,s=[];o<a;o++)s[o]=this.get(e[o],r);s[o]=r,t.apply(n,s)}}},$p.filterSelf=function(e,t,n,i){if(this._count){"function"==typeof e&&(i=n,n=t,t=e,e=[]),n=n||i||this,e=Ie.map(rg(e),this.getDimension,this);for(var a=this.count(),r=new(Zp(this))(a),o=[],s=e.length,l=0,u=e[0],c=0;c<a;c++){var h,d=this.getRawIndex(c);if(0===s)h=t.call(n,c);else if(1===s){var f=this._getFast(u,d);h=t.call(n,f,c)}else{for(var p=0;p<s;p++)o[p]=this._getFast(u,d);o[p]=c,h=t.apply(n,o)}h&&(r[l++]=d)}return l<a&&(this._indices=r),this._count=l,this._extent={},this.getRawIndex=this._indices?ig:ng,this}},$p.selectRange=function(e){if(this._count){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);var i=t.length;if(i){var a=this.count(),r=new(Zp(this))(a),o=0,s=t[0],l=e[s][0],u=e[s][1],c=!1;if(!this._indices){var h=0;if(1===i){for(var d=this._storage[t[0]],f=0;f<this._chunkCount;f++)for(var p=d[f],g=Math.min(this._count-f*this._chunkSize,this._chunkSize),m=0;m<g;m++){((b=p[m])>=l&&b<=u||isNaN(b))&&(r[o++]=h),h++}c=!0}else if(2===i){d=this._storage[s];var v=this._storage[t[1]],y=e[t[1]][0],_=e[t[1]][1];for(f=0;f<this._chunkCount;f++){p=d[f];var x=v[f];for(g=Math.min(this._count-f*this._chunkSize,this._chunkSize),m=0;m<g;m++){var b=p[m],w=x[m];(b>=l&&b<=u||isNaN(b))&&(w>=y&&w<=_||isNaN(w))&&(r[o++]=h),h++}}c=!0}}if(!c)if(1===i)for(m=0;m<a;m++){var S=this.getRawIndex(m);((b=this._getFast(s,S))>=l&&b<=u||isNaN(b))&&(r[o++]=S)}else for(m=0;m<a;m++){var M=!0;for(S=this.getRawIndex(m),f=0;f<i;f++){var T=t[f];((b=this._getFast(n,S))<e[T][0]||b>e[T][1])&&(M=!1)}M&&(r[o++]=this.getRawIndex(m))}return o<a&&(this._indices=r),this._count=o,this._extent={},this.getRawIndex=this._indices?ig:ng,this}}},$p.mapArray=function(e,t,n,i){"function"==typeof e&&(i=n,n=t,t=e,e=[]),n=n||i||this;var a=[];return this.each(e,(function(){a.push(t&&t.apply(this,arguments))}),n),a},$p.map=function(e,t,n,i){n=n||i||this;var a=og(this,e=Ie.map(rg(e),this.getDimension,this));a._indices=this._indices,a.getRawIndex=a._indices?ig:ng;for(var r=a._storage,o=[],s=this._chunkSize,l=e.length,u=this.count(),c=[],h=a._rawExtent,d=0;d<u;d++){for(var f=0;f<l;f++)c[f]=this.get(e[f],d);c[l]=d;var p=t&&t.apply(n,c);if(null!=p){"object"!=typeof p&&(o[0]=p,p=o);for(var g=this.getRawIndex(d),m=Math.floor(g/s),v=g%s,y=0;y<p.length;y++){var _=e[y],x=p[y],b=h[_],w=r[_];w&&(w[m][v]=x),x<b[0]&&(b[0]=x),x>b[1]&&(b[1]=x)}}}return a},$p.downSample=function(e,t,n,i){for(var a=og(this,[e]),r=a._storage,o=[],s=Math.floor(1/t),l=r[e],u=this.count(),c=this._chunkSize,h=a._rawExtent[e],d=new(Zp(this))(u),f=0,p=0;p<u;p+=s){s>u-p&&(s=u-p,o.length=s);for(var g=0;g<s;g++){var m=this.getRawIndex(p+g),v=Math.floor(m/c),y=m%c;o[g]=l[v][y]}var _=n(o),x=this.getRawIndex(Math.min(p+i(o,_)||0,u-1)),b=x%c;l[Math.floor(x/c)][b]=_,_<h[0]&&(h[0]=_),_>h[1]&&(h[1]=_),d[f++]=x}return a._count=f,a._indices=d,a.getRawIndex=ig,a},$p.getItemModel=function(e){var t=this.hostModel;return new bu(this.getRawDataItem(e),t,t&&t.ecModel)},$p.diff=function(e){var t=this;return new Lp(e?e.getIndices():[],this.getIndices(),(function(t){return ag(e,t)}),(function(e){return ag(t,e)}))},$p.getVisual=function(e){var t=this._visual;return t&&t[e]},$p.setVisual=function(e,t){if(Fp(e))for(var n in e)e.hasOwnProperty(n)&&this.setVisual(n,e[n]);else this._visual=this._visual||{},this._visual[e]=t},$p.setLayout=function(e,t){if(Fp(e))for(var n in e)e.hasOwnProperty(n)&&this.setLayout(n,e[n]);else this._layout[e]=t},$p.getLayout=function(e){return this._layout[e]},$p.getItemLayout=function(e){return this._itemLayouts[e]},$p.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?Ie.extend(this._itemLayouts[e]||{},t):t},$p.clearItemLayouts=function(){this._itemLayouts.length=0},$p.getItemVisual=function(e,t,n){var i=this._itemVisuals[e],a=i&&i[t];return null!=a||n?a:this.getVisual(t)},$p.setItemVisual=function(e,t,n){var i=this._itemVisuals[e]||{},a=this.hasItemVisual;if(this._itemVisuals[e]=i,Fp(t))for(var r in t)t.hasOwnProperty(r)&&(i[r]=t[r],a[r]=!0);else i[t]=n,a[t]=!0},$p.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};var ug=function(e){e.seriesIndex=this.seriesIndex,e.dataIndex=this.dataIndex,e.dataType=this.dataType};$p.setItemGraphicEl=function(e,t){var n=this.hostModel;t&&(t.dataIndex=e,t.dataType=this.dataType,t.seriesIndex=n&&n.seriesIndex,"group"===t.type&&t.traverse(ug,t)),this._graphicEls[e]=t},$p.getItemGraphicEl=function(e){return this._graphicEls[e]},$p.eachItemGraphicEl=function(e,t){Ie.each(this._graphicEls,(function(n,i){n&&e&&e.call(t,n,i)}))},$p.cloneShallow=function(e){if(!e){var t=Ie.map(this.dimensions,this.getDimensionInfo,this);e=new Qp(t,this.hostModel)}if(e._storage=this._storage,Kp(e,this),this._indices){var n=this._indices.constructor;e._indices=new n(this._indices)}else e._indices=null;return e.getRawIndex=e._indices?ig:ng,e},$p.wrapMethod=function(e,t){var n=this[e];"function"==typeof n&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(Ie.slice(arguments)))})},$p.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],$p.CHANGABLE_METHODS=["filterSelf","selectRange"];var cg=Qp,hg=Ie.createHashMap,dg=Ie.each,fg=Ie.isString,pg=Ie.defaults,gg=Ie.extend,mg=Ie.isObject,vg=Ie.clone,yg=Sr.normalizeToArray,_g=Hc.guessOrdinal,xg=Hc.BE_ORDINAL,bg=zp.OTHER_DIMENSIONS;function wg(e,t,n){if(n||null!=t.get(e)){for(var i=0;null!=t.get(e+i);)i++;e+=i}return t.set(e,!0),e}var Sg=function(e,t,n){gc.isInstance(t)||(t=gc.seriesDataToSource(t)),n=n||{},e=(e||[]).slice();for(var i=(n.dimsDef||[]).slice(),a=hg(),r=hg(),o=[],s=function(e,t,n,i){var a=Math.max(e.dimensionsDetectCount||1,t.length,n.length,i||0);return dg(t,(function(e){var t=e.dimsDef;t&&(a=Math.max(a,t.length))})),a}(t,e,i,n.dimCount),l=0;l<s;l++){var u=i[l]=gg({},mg(i[l])?i[l]:{name:i[l]}),c=u.name,h=o[l]=new Bp;null!=c&&null==a.get(c)&&(h.name=h.displayName=c,a.set(c,l)),null!=u.type&&(h.type=u.type),null!=u.displayName&&(h.displayName=u.displayName)}var d=n.encodeDef;!d&&n.encodeDefaulter&&(d=n.encodeDefaulter(t,s)),(d=hg(d)).each((function(e,t){if(1===(e=yg(e).slice()).length&&!fg(e[0])&&e[0]<0)d.set(t,!1);else{var n=d.set(t,[]);dg(e,(function(e,i){fg(e)&&(e=a.get(e)),null!=e&&e<s&&(n[i]=e,p(o[e],t,i))}))}}));var f=0;function p(e,t,n){null!=bg.get(t)?e.otherDims[t]=n:(e.coordDim=t,e.coordDimIndex=n,r.set(t,!0))}dg(e,(function(e,t){var n,i,a;if(fg(e))n=e,e={};else{n=e.name;var r=e.ordinalMeta;e.ordinalMeta=null,(e=vg(e)).ordinalMeta=r,i=e.dimsDef,a=e.otherDims,e.name=e.coordDim=e.coordDimIndex=e.dimsDef=e.otherDims=null}if(!1!==(s=d.get(n))){var s;if(!(s=yg(s)).length)for(var l=0;l<(i&&i.length||1);l++){for(;f<o.length&&null!=o[f].coordDim;)f++;f<o.length&&s.push(f++)}dg(s,(function(t,r){var s=o[t];if(p(pg(s,e),n,r),null==s.name&&i){var l=i[r];!mg(l)&&(l={name:l}),s.name=s.displayName=l.name,s.defaultTooltip=l.defaultTooltip}a&&pg(s.otherDims,a)}))}}));var g=n.generateCoord,m=n.generateCoordCount,v=null!=m;m=g?m||1:0;for(var y=g||"value",_=0;_<s;_++){null==(h=o[_]=o[_]||new Bp).coordDim&&(h.coordDim=wg(y,r,v),h.coordDimIndex=0,(!g||m<=0)&&(h.isExtraCoord=!0),m--),null==h.name&&(h.name=wg(h.coordDim,a)),null!=h.type||_g(t,_,h.name)!==xg.Must&&(!h.isExtraCoord||null==h.otherDims.itemName&&null==h.otherDims.seriesName)||(h.type="ordinal")}return o};var Mg=function(e,t){return Sg((t=t||{}).coordDimensions||[],e,{dimsDef:t.dimensionsDefine||e.dimensionsDefine,encodeDef:t.encodeDefine||e.encodeDefine,dimCount:t.dimensionsCount,encodeDefaulter:t.encodeDefaulter,generateCoord:t.generateCoord,generateCoordCount:t.generateCoordCount})},Tg=Ie.createHashMap,Ig=Ie.each;function Ag(e){this.coordSysName=e,this.coordSysDims=[],this.axisMap=Tg(),this.categoryAxisMap=Tg(),this.firstCategoryDimIndex=null}var Dg={cartesian2d:function(e,t,n,i){var a=e.getReferringComponents("xAxis")[0],r=e.getReferringComponents("yAxis")[0];t.coordSysDims=["x","y"],n.set("x",a),n.set("y",r),Cg(a)&&(i.set("x",a),t.firstCategoryDimIndex=0),Cg(r)&&(i.set("y",r),t.firstCategoryDimIndex,t.firstCategoryDimIndex=1)},singleAxis:function(e,t,n,i){var a=e.getReferringComponents("singleAxis")[0];t.coordSysDims=["single"],n.set("single",a),Cg(a)&&(i.set("single",a),t.firstCategoryDimIndex=0)},polar:function(e,t,n,i){var a=e.getReferringComponents("polar")[0],r=a.findAxisModel("radiusAxis"),o=a.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],n.set("radius",r),n.set("angle",o),Cg(r)&&(i.set("radius",r),t.firstCategoryDimIndex=0),Cg(o)&&(i.set("angle",o),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},geo:function(e,t,n,i){t.coordSysDims=["lng","lat"]},parallel:function(e,t,n,i){var a=e.ecModel,r=a.getComponent("parallel",e.get("parallelIndex")),o=t.coordSysDims=r.dimensions.slice();Ig(r.parallelAxisIndex,(function(e,r){var s=a.getComponent("parallelAxis",e),l=o[r];n.set(l,s),Cg(s)&&null==t.firstCategoryDimIndex&&(i.set(l,s),t.firstCategoryDimIndex=r)}))}};function Cg(e){return"category"===e.get("type")}var Og={getCoordSysInfoBySeries:function(e){var t=e.get("coordinateSystem"),n=new Ag(t),i=Dg[t];if(i)return i(e,n,n.axisMap,n.categoryAxisMap),n}},kg=Ie.each,Lg=Ie.isString;function Eg(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}var Ng={enableDataStack:function(e,t,n){var i,a,r,o,s=(n=n||{}).byIndex,l=n.stackedCoordDimension,u=!(!e||!e.get("stack"));if(kg(t,(function(e,n){Lg(e)&&(t[n]=e={name:e}),u&&!e.isExtraCoord&&(s||i||!e.ordinalMeta||(i=e),a||"ordinal"===e.type||"time"===e.type||l&&l!==e.coordDim||(a=e))})),!a||s||i||(s=!0),a){r="__\0ecstackresult",o="__\0ecstackedover",i&&(i.createInvertedIndices=!0);var c=a.coordDim,h=a.type,d=0;kg(t,(function(e){e.coordDim===c&&d++})),t.push({name:r,coordDim:c,coordDimIndex:d,type:h,isExtraCoord:!0,isCalculationCoord:!0}),d++,t.push({name:o,coordDim:o,coordDimIndex:d,type:h,isExtraCoord:!0,isCalculationCoord:!0})}return{stackedDimension:a&&a.name,stackedByDimension:i&&i.name,isStackedByIndex:s,stackedOverDimension:o,stackResultDimension:r}},isDimensionStacked:Eg,getStackedDimension:function(e,t){return Eg(e,t)?e.getCalculationInfo("stackResultDimension"):t}},Pg=rc.SOURCE_FORMAT_ORIGINAL,Rg=zp.getDimensionTypeByAxis,zg=Sr.getDataItemValue,Bg=Og.getCoordSysInfoBySeries,Vg=Ng.enableDataStack,Hg=Hc.makeSeriesEncodeForAxisCoordSys;var Yg=function(e,t,n){n=n||{},gc.isInstance(e)||(e=gc.seriesDataToSource(e));var i,a=t.get("coordinateSystem"),r=ch.get(a),o=Bg(t);o&&(i=Ie.map(o.coordSysDims,(function(e){var t={name:e},n=o.axisMap.get(e);if(n){var i=n.get("type");t.type=Rg(i)}return t}))),i||(i=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||["x","y"]);var s,l,u=Mg(e,{coordDimensions:i,generateCoord:n.generateCoord,encodeDefaulter:n.useEncodeDefaulter?Ie.curry(Hg,i,t):null});o&&Ie.each(u,(function(e,t){var n=e.coordDim,i=o.categoryAxisMap.get(n);i&&(null==s&&(s=t),e.ordinalMeta=i.getOrdinalMeta()),null!=e.otherDims.itemName&&(l=!0)})),l||null==s||(u[s].otherDims.itemName=0);var c=Vg(t,u),h=new cg(u,t);h.setCalculationInfo(c);var d=null!=s&&function(e){if(e.sourceFormat===Pg){var t=function(e){var t=0;for(;t<e.length&&null==e[t];)t++;return e[t]}(e.data||[]);return null!=t&&!Ie.isArray(zg(t))}}(e)?function(e,t,n,i){return i===s?n:this.defaultDimValueGetter(e,t,n,i)}:null;return h.hasItemOption=!1,h.initData(e,null,d),h};function Fg(e){this._setting=e||{},this._extent=[1/0,-1/0],this._interval=0,this.init&&this.init.apply(this,arguments)}Fg.prototype.parse=function(e){return e},Fg.prototype.getSetting=function(e){return this._setting[e]},Fg.prototype.contain=function(e){var t=this._extent;return e>=t[0]&&e<=t[1]},Fg.prototype.normalize=function(e){var t=this._extent;return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])},Fg.prototype.scale=function(e){var t=this._extent;return e*(t[1]-t[0])+t[0]},Fg.prototype.unionExtent=function(e){var t=this._extent;e[0]<t[0]&&(t[0]=e[0]),e[1]>t[1]&&(t[1]=e[1])},Fg.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},Fg.prototype.getExtent=function(){return this._extent.slice()},Fg.prototype.setExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(t)||(n[1]=t)},Fg.prototype.isBlank=function(){return this._isBlank},Fg.prototype.setBlank=function(e){this._isBlank=e},Fg.prototype.getLabel=null,Cr.enableClassExtend(Fg),Cr.enableClassManagement(Fg,{registerWhenExtend:!0});var Gg=Fg,Wg=Ie.createHashMap,jg=Ie.isObject,Ug=Ie.map;function Zg(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this._map}Zg.createByAxisModel=function(e){var t=e.option,n=t.data,i=n&&Ug(n,Kg);return new Zg({categories:i,needCollect:!i,deduplication:!1!==t.dedplication})};var Xg=Zg.prototype;function qg(e){return e._map||(e._map=Wg(e.categories))}function Kg(e){return jg(e)&&null!=e.value?e.value:e+""}Xg.getOrdinal=function(e){return qg(this).get(e)},Xg.parseAndCollect=function(e){var t,n=this._needCollect;if("string"!=typeof e&&!n)return e;if(n&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,t;var i=qg(this);return null==(t=i.get(e))&&(n?(t=this.categories.length,this.categories[t]=e,i.set(e,t)):t=NaN),t};var Qg=Zg,$g=Gg.prototype,Jg=Gg.extend({type:"ordinal",init:function(e,t){e&&!Ie.isArray(e)||(e=new Qg({categories:e})),this._ordinalMeta=e,this._extent=t||[0,e.categories.length-1]},parse:function(e){return"string"==typeof e?this._ordinalMeta.getOrdinal(e):Math.round(e)},contain:function(e){return e=this.parse(e),$g.contain.call(this,e)&&null!=this._ordinalMeta.categories[e]},normalize:function(e){return $g.normalize.call(this,this.parse(e))},scale:function(e){return Math.round($g.scale.call(this,e))},getTicks:function(){for(var e=[],t=this._extent,n=t[0];n<=t[1];)e.push(n),n++;return e},getLabel:function(e){if(!this.isBlank())return this._ordinalMeta.categories[e]},count:function(){return this._extent[1]-this._extent[0]+1},unionExtentFromData:function(e,t){this.unionExtent(e.getApproximateExtent(t))},getOrdinalMeta:function(){return this._ordinalMeta},niceTicks:Ie.noop,niceExtent:Ie.noop});Jg.create=function(){return new Jg};var em=Jg,tm=Au.round;function nm(e){return Au.getPrecisionSafe(e)+2}function im(e,t,n){e[t]=Math.max(Math.min(e[t],n[1]),n[0])}function am(e,t){!isFinite(e[0])&&(e[0]=t[0]),!isFinite(e[1])&&(e[1]=t[1]),im(e,0,t),im(e,1,t),e[0]>e[1]&&(e[0]=e[1])}var rm={intervalScaleNiceTicks:function(e,t,n,i){var a={},r=e[1]-e[0],o=a.interval=Au.nice(r/t,!0);null!=n&&o<n&&(o=a.interval=n),null!=i&&o>i&&(o=a.interval=i);var s=a.intervalPrecision=nm(o);return am(a.niceTickExtent=[tm(Math.ceil(e[0]/o)*o,s),tm(Math.floor(e[1]/o)*o,s)],e),a},getIntervalPrecision:nm,fixExtent:am},om=Au.round,sm=Gg.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(e,t){var n=this._extent;isNaN(e)||(n[0]=parseFloat(e)),isNaN(t)||(n[1]=parseFloat(t))},unionExtent:function(e){var t=this._extent;e[0]<t[0]&&(t[0]=e[0]),e[1]>t[1]&&(t[1]=e[1]),sm.prototype.setExtent.call(this,t[0],t[1])},getInterval:function(){return this._interval},setInterval:function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=rm.getIntervalPrecision(e)},getTicks:function(e){var t=this._interval,n=this._extent,i=this._niceExtent,a=this._intervalPrecision,r=[];if(!t)return r;n[0]<i[0]&&(e?r.push(om(i[0]-t,a)):r.push(n[0]));for(var o=i[0];o<=i[1]&&(r.push(o),(o=om(o+t,a))!==r[r.length-1]);)if(r.length>1e4)return[];var s=r.length?r[r.length-1]:i[1];return n[1]>s&&(e?r.push(om(s+t,a)):r.push(n[1])),r},getMinorTicks:function(e){for(var t=this.getTicks(!0),n=[],i=this.getExtent(),a=1;a<t.length;a++){for(var r=t[a],o=t[a-1],s=0,l=[],u=(r-o)/e;s<e-1;){var c=Au.round(o+(s+1)*u);c>i[0]&&c<i[1]&&l.push(c),s++}n.push(l)}return n},getLabel:function(e,t){if(null==e)return"";var n=t&&t.precision;return null==n?n=Au.getPrecisionSafe(e)||0:"auto"===n&&(n=this._intervalPrecision),e=om(e,n,!0),Pu.addCommas(e)},niceTicks:function(e,t,n){e=e||5;var i=this._extent,a=i[1]-i[0];if(isFinite(a)){a<0&&(a=-a,i.reverse());var r=rm.intervalScaleNiceTicks(i,e,t,n);this._intervalPrecision=r.intervalPrecision,this._interval=r.interval,this._niceExtent=r.niceTickExtent}},niceExtent:function(e){var t=this._extent;if(t[0]===t[1])if(0!==t[0]){var n=t[0];e.fixMax||(t[1]+=n/2),t[0]-=n/2}else t[1]=1;var i=t[1]-t[0];isFinite(i)||(t[0]=0,t[1]=1),this.niceTicks(e.splitNumber,e.minInterval,e.maxInterval);var a=this._interval;e.fixMin||(t[0]=om(Math.floor(t[0]/a)*a)),e.fixMax||(t[1]=om(Math.ceil(t[1]/a)*a))}});sm.create=function(){return new sm};var lm=sm,um=Au.parsePercent,cm=Ng.isDimensionStacked,hm="undefined"!=typeof Float32Array?Float32Array:Array;function dm(e){return e.get("stack")||"__ec_stack_"+e.seriesIndex}function fm(e){return e.dim+e.index}function pm(e,t){var n=[];return t.eachSeriesByType(e,(function(e){_m(e)&&!xm(e)&&n.push(e)})),n}function gm(e){var t=function(e){var t={};Ie.each(e,(function(e){var n=e.coordinateSystem.getBaseAxis();if("time"===n.type||"value"===n.type)for(var i=e.getData(),a=n.dim+"_"+n.index,r=i.mapDimension(n.dim),o=0,s=i.count();o<s;++o){var l=i.get(r,o);t[a]?t[a].push(l):t[a]=[l]}}));var n=[];for(var i in t)if(t.hasOwnProperty(i)){var a=t[i];if(a){a.sort((function(e,t){return e-t}));for(var r=null,o=1;o<a.length;++o){var s=a[o]-a[o-1];s>0&&(r=null===r?s:Math.min(r,s))}n[i]=r}}return n}(e),n=[];return Ie.each(e,(function(e){var i,a=e.coordinateSystem.getBaseAxis(),r=a.getExtent();if("category"===a.type)i=a.getBandWidth();else if("value"===a.type||"time"===a.type){var o=a.dim+"_"+a.index,s=t[o],l=Math.abs(r[1]-r[0]),u=a.scale.getExtent(),c=Math.abs(u[1]-u[0]);i=s?l/c*s:l}else{var h=e.getData();i=Math.abs(r[1]-r[0])/h.count()}var d=um(e.get("barWidth"),i),f=um(e.get("barMaxWidth"),i),p=um(e.get("barMinWidth")||1,i),g=e.get("barGap"),m=e.get("barCategoryGap");n.push({bandWidth:i,barWidth:d,barMaxWidth:f,barMinWidth:p,barGap:g,barCategoryGap:m,axisKey:fm(a),stackId:dm(e)})})),mm(n)}function mm(e){var t={};Ie.each(e,(function(e,n){var i=e.axisKey,a=e.bandWidth,r=t[i]||{bandWidth:a,remainedWidth:a,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},o=r.stacks;t[i]=r;var s=e.stackId;o[s]||r.autoWidthCount++,o[s]=o[s]||{width:0,maxWidth:0};var l=e.barWidth;l&&!o[s].width&&(o[s].width=l,l=Math.min(r.remainedWidth,l),r.remainedWidth-=l);var u=e.barMaxWidth;u&&(o[s].maxWidth=u);var c=e.barMinWidth;c&&(o[s].minWidth=c);var h=e.barGap;null!=h&&(r.gap=h);var d=e.barCategoryGap;null!=d&&(r.categoryGap=d)}));var n={};return Ie.each(t,(function(e,t){n[t]={};var i=e.stacks,a=e.bandWidth,r=um(e.categoryGap,a),o=um(e.gap,1),s=e.remainedWidth,l=e.autoWidthCount,u=(s-r)/(l+(l-1)*o);u=Math.max(u,0),Ie.each(i,(function(e){var t=e.maxWidth,n=e.minWidth;if(e.width){i=e.width;t&&(i=Math.min(i,t)),n&&(i=Math.max(i,n)),e.width=i,s-=i+o*i,l--}else{var i=u;t&&t<i&&(i=Math.min(t,s)),n&&n>i&&(i=n),i!==u&&(e.width=i,s-=i+o*i,l--)}})),u=(s-r)/(l+(l-1)*o),u=Math.max(u,0);var c,h=0;Ie.each(i,(function(e,t){e.width||(e.width=u),c=e,h+=e.width*(1+o)})),c&&(h-=c.width*o);var d=-h/2;Ie.each(i,(function(e,i){n[t][i]=n[t][i]||{bandWidth:a,offset:d,width:e.width},d+=e.width*(1+o)}))})),n}function vm(e,t,n){if(e&&t){var i=e[fm(t)];return null!=i&&null!=n&&(i=i[dm(n)]),i}}var ym={seriesType:"bar",plan:Ud(),reset:function(e){if(_m(e)&&xm(e)){var t=e.getData(),n=e.coordinateSystem,i=n.grid.getRect(),a=n.getBaseAxis(),r=n.getOtherAxis(a),o=t.mapDimension(r.dim),s=t.mapDimension(a.dim),l=r.isHorizontal(),u=l?0:1,c=vm(gm([e]),a,e).width;return c>.5||(c=.5),{progress:function(e,t){var h,d=e.count,f=new hm(2*d),p=new hm(2*d),g=new hm(d),m=[],v=[],y=0,_=0;for(;null!=(h=e.next());)v[u]=t.get(o,h),v[1-u]=t.get(s,h),m=n.dataToPoint(v,null,m),p[y]=l?i.x+i.width:m[0],f[y++]=m[0],p[y]=l?m[1]:i.y+i.height,f[y++]=m[1],g[_++]=h;t.setLayout({largePoints:f,largeDataIndices:g,largeBackgroundPoints:p,barWidth:c,valueAxisStart:bm(a,r),backgroundStart:l?i.x:i.y,valueAxisHorizontal:l})}}}}};function _m(e){return e.coordinateSystem&&"cartesian2d"===e.coordinateSystem.type}function xm(e){return e.pipelineContext&&e.pipelineContext.large}function bm(e,t,n){return t.toGlobalCoord(t.dataToCoord("log"===t.type?1:0))}var wm={getLayoutOnAxis:function(e){var t=[],n=e.axis;if("category"===n.type){for(var i=n.getBandWidth(),a=0;a<e.count;a++)t.push(Ie.defaults({bandWidth:i,axisKey:"axis0",stackId:"__ec_stack_"+a},e));var r=mm(t),o=[];for(a=0;a<e.count;a++){var s=r.axis0["__ec_stack_"+a];s.offsetCenter=s.offset+s.width/2,o.push(s)}return o}},prepareLayoutBarSeries:pm,makeColumnLayout:gm,retrieveColumnLayout:vm,layout:function(e,t){var n=pm(e,t),i=gm(n),a={};Ie.each(n,(function(e){var t=e.getData(),n=e.coordinateSystem,r=n.getBaseAxis(),o=dm(e),s=i[fm(r)][o],l=s.offset,u=s.width,c=n.getOtherAxis(r),h=e.get("barMinHeight")||0;a[o]=a[o]||[],t.setLayout({bandWidth:s.bandWidth,offset:l,size:u});for(var d=t.mapDimension(c.dim),f=t.mapDimension(r.dim),p=cm(t,d),g=c.isHorizontal(),m=bm(r,c),v=0,y=t.count();v<y;v++){var _,x,b,w,S,M=t.get(d,v),T=t.get(f,v),I=M>=0?"p":"n",A=m;if(p&&(a[o][T]||(a[o][T]={p:m,n:m}),A=a[o][T][I]),g)_=A,x=(S=n.dataToPoint([M,T]))[1]+l,b=S[0]-m,w=u,Math.abs(b)<h&&(b=(b<0?-1:1)*h),isNaN(b)||p&&(a[o][T][I]+=b);else _=(S=n.dataToPoint([T,M]))[0]+l,x=A,b=u,w=S[1]-m,Math.abs(w)<h&&(w=(w<=0?-1:1)*h),isNaN(w)||p&&(a[o][T][I]+=w);t.setItemLayout(v,{x:_,y:x,width:b,height:w})}}),this)},largeLayout:ym},Sm=lm.prototype,Mm=Math.ceil,Tm=Math.floor,Im=864e5,Am=lm.extend({type:"time",getLabel:function(e){var t=this._stepLvl,n=new Date(e);return Pu.formatTime(t[0],n,this.getSetting("useUTC"))},niceExtent:function(e){var t=this._extent;if(t[0]===t[1]&&(t[0]-=Im,t[1]+=Im),t[1]===-1/0&&t[0]===1/0){var n=new Date;t[1]=+new Date(n.getFullYear(),n.getMonth(),n.getDate()),t[0]=t[1]-Im}this.niceTicks(e.splitNumber,e.minInterval,e.maxInterval);var i=this._interval;e.fixMin||(t[0]=Au.round(Tm(t[0]/i)*i)),e.fixMax||(t[1]=Au.round(Mm(t[1]/i)*i))},niceTicks:function(e,t,n){e=e||10;var i=this._extent,a=i[1]-i[0],r=a/e;null!=t&&r<t&&(r=t),null!=n&&r>n&&(r=n);var o=Dm.length,s=function(e,t,n,i){for(;n<i;){var a=n+i>>>1;e[a][1]<t?n=a+1:i=a}return n}(Dm,r,0,o),l=Dm[Math.min(s,o-1)],u=l[1];if("year"===l[0]){var c=a/u;u*=Au.nice(c/e,!0)}var h=this.getSetting("useUTC")?0:60*new Date(+i[0]||+i[1]).getTimezoneOffset()*1e3,d=[Math.round(Mm((i[0]-h)/u)*u+h),Math.round(Tm((i[1]-h)/u)*u+h)];rm.fixExtent(d,i),this._stepLvl=l,this._interval=u,this._niceExtent=d},parse:function(e){return+Au.parseDate(e)}});Ie.each(["contain","normalize"],(function(e){Am.prototype[e]=function(t){return Sm[e].call(this,this.parse(t))}}));var Dm=[["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",36e5],["hh:mm\nMM-dd",72e5],["hh:mm\nMM-dd",216e5],["hh:mm\nMM-dd",432e5],["MM-dd\nyyyy",Im],["MM-dd\nyyyy",2*Im],["MM-dd\nyyyy",3*Im],["MM-dd\nyyyy",4*Im],["MM-dd\nyyyy",5*Im],["MM-dd\nyyyy",6*Im],["week",7*Im],["MM-dd\nyyyy",10*Im],["week",14*Im],["week",21*Im],["month",31*Im],["week",42*Im],["month",62*Im],["week",70*Im],["quarter",95*Im],["month",31*Im*4],["month",31*Im*5],["half-year",380*Im/2],["month",31*Im*8],["month",31*Im*10],["year",380*Im]];Am.create=function(e){return new Am({useUTC:e.ecModel.get("useUTC")})};var Cm=Gg.prototype,Om=lm.prototype,km=Au.getPrecisionSafe,Lm=Au.round,Em=Math.floor,Nm=Math.ceil,Pm=Math.pow,Rm=Math.log,zm=Gg.extend({type:"log",base:10,$constructor:function(){Gg.apply(this,arguments),this._originalScale=new lm},getTicks:function(e){var t=this._originalScale,n=this._extent,i=t.getExtent();return Ie.map(Om.getTicks.call(this,e),(function(e){var a=Au.round(Pm(this.base,e));return a=e===n[0]&&t.__fixMin?Bm(a,i[0]):a,a=e===n[1]&&t.__fixMax?Bm(a,i[1]):a}),this)},getMinorTicks:Om.getMinorTicks,getLabel:Om.getLabel,scale:function(e){return e=Cm.scale.call(this,e),Pm(this.base,e)},setExtent:function(e,t){var n=this.base;e=Rm(e)/Rm(n),t=Rm(t)/Rm(n),Om.setExtent.call(this,e,t)},getExtent:function(){var e=this.base,t=Cm.getExtent.call(this);t[0]=Pm(e,t[0]),t[1]=Pm(e,t[1]);var n=this._originalScale,i=n.getExtent();return n.__fixMin&&(t[0]=Bm(t[0],i[0])),n.__fixMax&&(t[1]=Bm(t[1],i[1])),t},unionExtent:function(e){this._originalScale.unionExtent(e);var t=this.base;e[0]=Rm(e[0])/Rm(t),e[1]=Rm(e[1])/Rm(t),Cm.unionExtent.call(this,e)},unionExtentFromData:function(e,t){this.unionExtent(e.getApproximateExtent(t))},niceTicks:function(e){e=e||10;var t=this._extent,n=t[1]-t[0];if(!(n===1/0||n<=0)){var i=Au.quantity(n);for(e/n*i<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var a=[Au.round(Nm(t[0]/i)*i),Au.round(Em(t[1]/i)*i)];this._interval=i,this._niceExtent=a}},niceExtent:function(e){Om.niceExtent.call(this,e);var t=this._originalScale;t.__fixMin=e.fixMin,t.__fixMax=e.fixMax}});function Bm(e,t){return Lm(e,km(t))}Ie.each(["contain","normalize"],(function(e){zm.prototype[e]=function(t){return t=Rm(t)/Rm(this.base),Cm[e].call(this,t)}})),zm.create=function(){return new zm};var Vm=zm,Hm=wm.prepareLayoutBarSeries,Ym=wm.makeColumnLayout,Fm=wm.retrieveColumnLayout;function Gm(e,t){var n,i,a,r=e.type,o=t.getMin(),s=t.getMax(),l=e.getExtent();"ordinal"===r?n=t.getCategories().length:(i=t.get("boundaryGap"),Ie.isArray(i)||(i=[i||0,i||0]),"boolean"==typeof i[0]&&(i=[0,0]),i[0]=Au.parsePercent(i[0],1),i[1]=Au.parsePercent(i[1],1),a=l[1]-l[0]||Math.abs(l[0])),"dataMin"===o?o=l[0]:"function"==typeof o&&(o=o({min:l[0],max:l[1]})),"dataMax"===s?s=l[1]:"function"==typeof s&&(s=s({min:l[0],max:l[1]}));var u=null!=o,c=null!=s;null==o&&(o="ordinal"===r?n?0:NaN:l[0]-i[0]*a),null==s&&(s="ordinal"===r?n?n-1:NaN:l[1]+i[1]*a),(null==o||!isFinite(o))&&(o=NaN),(null==s||!isFinite(s))&&(s=NaN),e.setBlank(Ie.eqNaN(o)||Ie.eqNaN(s)||"ordinal"===r&&!e.getOrdinalMeta().categories.length),t.getNeedCrossZero()&&(o>0&&s>0&&!u&&(o=0),o<0&&s<0&&!c&&(s=0));var h=t.ecModel;if(h&&"time"===r){var d,f=Hm("bar",h);if(Ie.each(f,(function(e){d|=e.getBaseAxis()===t.axis})),d){var p=Ym(f),g=function(e,t,n,i){var a=n.axis.getExtent(),r=a[1]-a[0],o=Fm(i,n.axis);if(void 0===o)return{min:e,max:t};var s=1/0;Ie.each(o,(function(e){s=Math.min(e.offset,s)}));var l=-1/0;Ie.each(o,(function(e){l=Math.max(e.offset+e.width,l)})),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=t-e,h=c/(1-(s+l)/r)-c;return{min:e-=h*(s/u),max:t+=h*(l/u)}}(o,s,t,p);o=g.min,s=g.max}}return{extent:[o,s],fixMin:u,fixMax:c}}function Wm(e){var t,n=e.getLabelModel().get("formatter"),i="category"===e.type?e.scale.getExtent()[0]:null;return"string"==typeof n?(t=n,n=function(n){return n=e.scale.getLabel(n),t.replace("{value}",null!=n?n:"")}):"function"==typeof n?function(t,a){return null!=i&&(a=t-i),n(jm(e,t),a)}:function(t){return e.scale.getLabel(t)}}function jm(e,t){return"category"===e.type?e.scale.getLabel(t):t}function Um(e,t){var n=t*Math.PI/180,i=e.plain(),a=i.width,r=i.height,o=a*Math.cos(n)+r*Math.sin(n),s=a*Math.sin(n)+r*Math.cos(n);return new Hn(i.x,i.y,o,s)}function Zm(e){var t=e.get("interval");return null==t?"auto":t}var Xm={getScaleExtent:Gm,niceScaleExtent:function(e,t){var n=Gm(e,t),i=n.extent,a=t.get("splitNumber");"log"===e.type&&(e.base=t.get("logBase"));var r=e.type;e.setExtent(i[0],i[1]),e.niceExtent({splitNumber:a,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:"interval"===r||"time"===r?t.get("minInterval"):null,maxInterval:"interval"===r||"time"===r?t.get("maxInterval"):null});var o=t.get("interval");null!=o&&e.setInterval&&e.setInterval(o)},createScaleByModel:function(e,t){if(t=t||e.get("type"))switch(t){case"category":return new em(e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),[1/0,-1/0]);case"value":return new lm;default:return(Gg.getClass(t)||lm).create(e)}},ifAxisCrossZero:function(e){var t=e.scale.getExtent(),n=t[0],i=t[1];return!(n>0&&i>0||n<0&&i<0)},makeLabelFormatter:Wm,getAxisRawValue:jm,estimateLabelUnionRect:function(e){var t=e.model,n=e.scale;if(t.get("axisLabel.show")&&!n.isBlank()){var i,a,r="category"===e.type,o=n.getExtent();a=r?n.count():(i=n.getTicks()).length;var s,l=e.getLabelModel(),u=Wm(e),c=1;a>40&&(c=Math.ceil(a/40));for(var h=0;h<a;h+=c){var d=u(i?i[h]:o[0]+h),f=Um(l.getTextRect(d),l.get("rotate")||0);s?s.union(f):s=f}return s}},getOptionCategoryInterval:Zm,shouldShowAllLabels:function(e){return"category"===e.type&&0===Zm(e.getLabelModel())}},qm={getMin:function(e){var t=this.option,n=e||null==t.rangeStart?t.min:t.rangeStart;return this.axis&&null!=n&&"dataMin"!==n&&"function"!=typeof n&&!Ie.eqNaN(n)&&(n=this.axis.scale.parse(n)),n},getMax:function(e){var t=this.option,n=e||null==t.rangeEnd?t.max:t.rangeEnd;return this.axis&&null!=n&&"dataMax"!==n&&"function"!=typeof n&&!Ie.eqNaN(n)&&(n=this.axis.scale.parse(n)),n},getNeedCrossZero:function(){var e=this.option;return null==e.rangeStart&&null==e.rangeEnd&&!e.scale},getCoordSysModel:Ie.noop,setRange:function(e,t){this.option.rangeStart=e,this.option.rangeEnd=t},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},Km=Wi.calculateTextPosition,Qm=lu.extendShape({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,i=t.cy,a=t.width/2,r=t.height/2;e.moveTo(n,i-r),e.lineTo(n+a,i+r),e.lineTo(n-a,i+r),e.closePath()}}),$m=lu.extendShape({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,i=t.cy,a=t.width/2,r=t.height/2;e.moveTo(n,i-r),e.lineTo(n+a,i),e.lineTo(n,i+r),e.lineTo(n-a,i),e.closePath()}}),Jm=lu.extendShape({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.x,i=t.y,a=t.width/5*3,r=Math.max(a,t.height),o=a/2,s=o*o/(r-o),l=i-r+o+s,u=Math.asin(s/o),c=Math.cos(u)*o,h=Math.sin(u),d=Math.cos(u),f=.6*o,p=.7*o;e.moveTo(n-c,l+s),e.arc(n,l,o,Math.PI-u,2*Math.PI+u),e.bezierCurveTo(n+c-h*f,l+s+d*f,n,i-p,n,i),e.bezierCurveTo(n,i-p,n-c+h*f,l+s+d*f,n-c,l+s),e.closePath()}}),ev=lu.extendShape({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.height,i=t.width,a=t.x,r=t.y,o=i/3*2;e.moveTo(a,r),e.lineTo(a+o,r+n),e.lineTo(a,r+n/4*3),e.lineTo(a-o,r+n),e.lineTo(a,r),e.closePath()}}),tv={line:lu.Line,rect:lu.Rect,roundRect:lu.Rect,square:lu.Rect,circle:lu.Circle,diamond:$m,pin:Jm,arrow:ev,triangle:Qm},nv={line:function(e,t,n,i,a){a.x1=e,a.y1=t+i/2,a.x2=e+n,a.y2=t+i/2},rect:function(e,t,n,i,a){a.x=e,a.y=t,a.width=n,a.height=i},roundRect:function(e,t,n,i,a){a.x=e,a.y=t,a.width=n,a.height=i,a.r=Math.min(n,i)/4},square:function(e,t,n,i,a){var r=Math.min(n,i);a.x=e,a.y=t,a.width=r,a.height=r},circle:function(e,t,n,i,a){a.cx=e+n/2,a.cy=t+i/2,a.r=Math.min(n,i)/2},diamond:function(e,t,n,i,a){a.cx=e+n/2,a.cy=t+i/2,a.width=n,a.height=i},pin:function(e,t,n,i,a){a.x=e+n/2,a.y=t+i/2,a.width=n,a.height=i},arrow:function(e,t,n,i,a){a.x=e+n/2,a.y=t+i/2,a.width=n,a.height=i},triangle:function(e,t,n,i,a){a.cx=e+n/2,a.cy=t+i/2,a.width=n,a.height=i}},iv={};Ie.each(tv,(function(e,t){iv[t]=new e}));var av=lu.extendShape({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var i=Km(e,t,n),a=this.shape;return a&&"pin"===a.symbolType&&"inside"===t.textPosition&&(i.y=n.y+.4*n.height),i},buildPath:function(e,t,n){var i=t.symbolType;if("none"!==i){var a=iv[i];a||(a=iv[i="rect"]),nv[i](t.x,t.y,t.width,t.height,a.shape),a.buildPath(e,a.shape,n)}}});function rv(e,t){if("image"!==this.type){var n=this.style,i=this.shape;i&&"line"===i.symbolType?n.stroke=e:this.__isEmptyBrush?(n.stroke=e,n.fill=t||"#fff"):(n.fill&&(n.fill=e),n.stroke&&(n.stroke=e)),this.dirty(!1)}}var ov={createSymbol:function(e,t,n,i,a,r,o){var s,l=0===e.indexOf("empty");return l&&(e=e.substr(5,1).toLowerCase()+e.substr(6)),(s=0===e.indexOf("image://")?lu.makeImage(e.slice(8),new Hn(t,n,i,a),o?"center":"cover"):0===e.indexOf("path://")?lu.makePath(e.slice(7),{},new Hn(t,n,i,a),o?"center":"cover"):new av({shape:{symbolType:e,x:t,y:n,width:i,height:a}})).__isEmptyBrush=l,s.setColor=rv,s.setColor(r),s}},sv=Uu.getLayoutRect,lv=Ng.enableDataStack,uv=Ng.isDimensionStacked,cv=Ng.getStackedDimension;var hv={getLayoutRect:sv,completeDimensions:Sg,createDimensions:Mg,createSymbol:ov.createSymbol,createList:function(e){return Yg(e.getSource(),e)},dataStack:{isDimensionStacked:uv,enableDataStack:lv,getStackedDimension:cv},createScale:function(e,t){var n=t;bu.isInstance(t)||(n=new bu(t),Ie.mixin(n,qm));var i=Xm.createScaleByModel(n);return i.setExtent(e[0],e[1]),Xm.niceScaleExtent(i,n),i},mixinAxisModelCommonMethods:function(e){Ie.mixin(e,qm)}};function dv(e,t){return Math.abs(e-t)<1e-8}var fv={contain:function(e,t,n){var i=0,a=e[0];if(!a)return!1;for(var r=1;r<e.length;r++){var o=e[r];i+=Oo(a[0],a[1],o[0],o[1],t,n),a=o}var s=e[0];return dv(a[0],s[0])&&dv(a[1],s[1])||(i+=Oo(a[0],a[1],s[0],s[1],t,n)),0!==i}};function pv(e,t,n){if(this.name=e,this.geometries=t,n)n=[n[0],n[1]];else{var i=this.getBoundingRect();n=[i.x+i.width/2,i.y+i.height/2]}this.center=n}pv.prototype={constructor:pv,properties:null,getBoundingRect:function(){var e=this._rect;if(e)return e;for(var t=Number.MAX_VALUE,n=[t,t],i=[-t,-t],a=[],r=[],o=this.geometries,s=0;s<o.length;s++)if("polygon"===o[s].type){var l=o[s].exterior;ao.fromPoints(l,a,r),Le.min(n,n,a),Le.max(i,i,r)}return 0===s&&(n[0]=n[1]=i[0]=i[1]=0),this._rect=new Hn(n[0],n[1],i[0]-n[0],i[1]-n[1])},contain:function(e){var t=this.getBoundingRect(),n=this.geometries;if(!t.contain(e[0],e[1]))return!1;e:for(var i=0,a=n.length;i<a;i++)if("polygon"===n[i].type){var r=n[i].exterior,o=n[i].interiors;if(fv.contain(r,e[0],e[1])){for(var s=0;s<(o?o.length:0);s++)if(fv.contain(o[s]))continue e;return!0}}return!1},transformTo:function(e,t,n,i){var a=this.getBoundingRect(),r=a.width/a.height;n?i||(i=n/r):n=r*i;for(var o=new Hn(e,t,n,i),s=a.calculateTransform(o),l=this.geometries,u=0;u<l.length;u++)if("polygon"===l[u].type){for(var c=l[u].exterior,h=l[u].interiors,d=0;d<c.length;d++)Le.applyTransform(c[d],c[d],s);for(var f=0;f<(h?h.length:0);f++)for(d=0;d<h[f].length;d++)Le.applyTransform(h[f][d],h[f][d],s)}(a=this._rect).copy(o),this.center=[a.x+a.width/2,a.y+a.height/2]},cloneShallow:function(e){null==e&&(e=this.name);var t=new pv(e,this.geometries,this.center);return t._rect=this._rect,t.transformTo=null,t}};var gv=pv;function mv(e,t,n){for(var i=[],a=t[0],r=t[1],o=0;o<e.length;o+=2){var s=e.charCodeAt(o)-64,l=e.charCodeAt(o+1)-64;s=s>>1^-(1&s),l=l>>1^-(1&l),a=s+=a,r=l+=r,i.push([s/n,l/n])}return i}var vv=function(e,t){return function(e){if(!e.UTF8Encoding)return e;var t=e.UTF8Scale;null==t&&(t=1024);for(var n=e.features,i=0;i<n.length;i++)for(var a=n[i].geometry,r=a.coordinates,o=a.encodeOffsets,s=0;s<r.length;s++){var l=r[s];if("Polygon"===a.type)r[s]=mv(l,o[s],t);else if("MultiPolygon"===a.type)for(var u=0;u<l.length;u++){var c=l[u];l[u]=mv(c,o[s][u],t)}}e.UTF8Encoding=!1}(e),Ie.map(Ie.filter(e.features,(function(e){return e.geometry&&e.properties&&e.geometry.coordinates.length>0})),(function(e){var n=e.properties,i=e.geometry,a=i.coordinates,r=[];"Polygon"===i.type&&r.push({type:"polygon",exterior:a[0],interiors:a.slice(1)}),"MultiPolygon"===i.type&&Ie.each(a,(function(e){e[0]&&r.push({type:"polygon",exterior:e[0],interiors:e.slice(1)})}));var o=new gv(n[t||"name"],r,n.cp);return o.properties=n,o}))},yv=Sr.makeInner,_v=Xm.makeLabelFormatter,xv=Xm.getOptionCategoryInterval,bv=Xm.shouldShowAllLabels,wv=yv();function Sv(e,t){var n,i,a=Mv(e,"labels"),r=xv(t),o=Tv(a,r);return o||(Ie.isFunction(r)?n=Dv(e,r):(i="auto"===r?function(e){var t=wv(e).autoInterval;return null!=t?t:wv(e).autoInterval=e.calculateCategoryInterval()}(e):r,n=Av(e,i)),Iv(a,r,{labels:n,labelCategoryInterval:i}))}function Mv(e,t){return wv(e)[t]||(wv(e)[t]=[])}function Tv(e,t){for(var n=0;n<e.length;n++)if(e[n].key===t)return e[n].value}function Iv(e,t,n){return e.push({key:t,value:n}),n}function Av(e,t,n){var i=_v(e),a=e.scale,r=a.getExtent(),o=e.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=r[0],c=a.count();0!==u&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var h=bv(e),d=o.get("showMinLabel")||h,f=o.get("showMaxLabel")||h;d&&u!==r[0]&&g(r[0]);for(var p=u;p<=r[1];p+=l)g(p);function g(e){s.push(n?e:{formattedLabel:i(e),rawLabel:a.getLabel(e),tickValue:e})}return f&&p-l!==r[1]&&g(r[1]),s}function Dv(e,t,n){var i=e.scale,a=_v(e),r=[];return Ie.each(i.getTicks(),(function(e){var o=i.getLabel(e);t(e,o)&&r.push(n?e:{formattedLabel:a(e),rawLabel:o,tickValue:e})})),r}var Cv={createAxisLabels:function(e){return"category"===e.type?function(e){var t=e.getLabelModel(),n=Sv(e,t);return!t.get("show")||e.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}(e):function(e){var t=e.scale.getTicks(),n=_v(e);return{labels:Ie.map(t,(function(t,i){return{formattedLabel:n(t,i),rawLabel:e.scale.getLabel(t),tickValue:t}}))}}(e)},createAxisTicks:function(e,t){return"category"===e.type?function(e,t){var n,i,a=Mv(e,"ticks"),r=xv(t),o=Tv(a,r);if(o)return o;t.get("show")&&!e.scale.isBlank()||(n=[]);if(Ie.isFunction(r))n=Dv(e,r,!0);else if("auto"===r){var s=Sv(e,e.getLabelModel());i=s.labelCategoryInterval,n=Ie.map(s.labels,(function(e){return e.tickValue}))}else n=Av(e,i=r,!0);return Iv(a,r,{ticks:n,tickCategoryInterval:i})}(e,t):{ticks:e.scale.getTicks()}},calculateCategoryInterval:function(e){var t=function(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}(e),n=_v(e),i=(t.axisRotate-t.labelRotate)/180*Math.PI,a=e.scale,r=a.getExtent(),o=a.count();if(r[1]-r[0]<1)return 0;var s=1;o>40&&(s=Math.max(1,Math.floor(o/40)));for(var l=r[0],u=e.dataToCoord(l+1)-e.dataToCoord(l),c=Math.abs(u*Math.cos(i)),h=Math.abs(u*Math.sin(i)),d=0,f=0;l<=r[1];l+=s){var p,g,m=Wi.getBoundingRect(n(l),t.font,"center","top");p=1.3*m.width,g=1.3*m.height,d=Math.max(d,p,7),f=Math.max(f,g,7)}var v=d/c,y=f/h;isNaN(v)&&(v=1/0),isNaN(y)&&(y=1/0);var _=Math.max(0,Math.floor(Math.min(v,y))),x=wv(e.model),b=e.getExtent(),w=x.lastAutoInterval,S=x.lastTickCount;return null!=w&&null!=S&&Math.abs(w-_)<=1&&Math.abs(S-o)<=1&&w>_&&x.axisExtend0===b[0]&&x.axisExtend1===b[1]?_=w:(x.lastTickCount=o,x.lastAutoInterval=_,x.axisExtend0=b[0],x.axisExtend1=b[1]),_}},Ov=Ie.each,kv=Ie.map,Lv=Au.linearMap,Ev=Au.getPixelPrecision,Nv=Au.round,Pv=Cv.createAxisTicks,Rv=Cv.createAxisLabels,zv=Cv.calculateCategoryInterval,Bv=[0,1],Vv=function(e,t,n){this.dim=e,this.scale=t,this._extent=n||[0,0],this.inverse=!1,this.onBand=!1};function Hv(e,t){var n=(e[1]-e[0])/t/2;e[0]+=n,e[1]-=n}Vv.prototype={constructor:Vv,contain:function(e){var t=this._extent,n=Math.min(t[0],t[1]),i=Math.max(t[0],t[1]);return e>=n&&e<=i},containData:function(e){return this.scale.contain(e)},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(e){return Ev(e||this.scale.getExtent(),this._extent)},setExtent:function(e,t){var n=this._extent;n[0]=e,n[1]=t},dataToCoord:function(e,t){var n=this._extent,i=this.scale;return e=i.normalize(e),this.onBand&&"ordinal"===i.type&&Hv(n=n.slice(),i.count()),Lv(e,Bv,n,t)},coordToData:function(e,t){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&Hv(n=n.slice(),i.count());var a=Lv(e,n,Bv,t);return this.scale.scale(a)},pointToData:function(e,t){},getTicksCoords:function(e){var t=(e=e||{}).tickModel||this.getTickModel(),n=Pv(this,t).ticks,i=kv(n,(function(e){return{coord:this.dataToCoord(e),tickValue:e}}),this);return function(e,t,n,i){var a=t.length;if(!e.onBand||n||!a)return;var r,o,s=e.getExtent();if(1===a)t[0].coord=s[0],r=t[1]={coord:s[0]};else{var l=t[a-1].tickValue-t[0].tickValue,u=(t[a-1].coord-t[0].coord)/l;Ov(t,(function(e){e.coord-=u/2}));var c=e.scale.getExtent();o=1+c[1]-t[a-1].tickValue,r={coord:t[a-1].coord+u*o},t.push(r)}var h=s[0]>s[1];d(t[0].coord,s[0])&&(i?t[0].coord=s[0]:t.shift());i&&d(s[0],t[0].coord)&&t.unshift({coord:s[0]});d(s[1],r.coord)&&(i?r.coord=s[1]:t.pop());i&&d(r.coord,s[1])&&t.push({coord:s[1]});function d(e,t){return e=Nv(e),t=Nv(t),h?e>t:e<t}}(this,i,t.get("alignWithLabel"),e.clamp),i},getMinorTicksCoords:function(){if("ordinal"===this.scale.type)return[];var e=this.model.getModel("minorTick").get("splitNumber");e>0&&e<100||(e=5);var t=this.scale.getMinorTicks(e);return kv(t,(function(e){return kv(e,(function(e){return{coord:this.dataToCoord(e),tickValue:e}}),this)}),this)},getViewLabels:function(){return Rv(this).labels},getLabelModel:function(){return this.model.getModel("axisLabel")},getTickModel:function(){return this.model.getModel("axisTick")},getBandWidth:function(){var e=this._extent,t=this.scale.getExtent(),n=t[1]-t[0]+(this.onBand?1:0);0===n&&(n=1);var i=Math.abs(e[1]-e[0]);return Math.abs(i)/n},isHorizontal:null,getRotate:null,calculateCategoryInterval:function(){return zv(this)}};var Yv=Vv,Fv=gr,Gv=yt,Wv=Le,jv=en,Uv=Au,Zv=Pu,Xv=uf.throttle,qv=hv,Kv=vv,Qv=cg,$v=bu,Jv=Yv,ey=ne,ty=vv,ny={};Ie.each(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],(function(e){ny[e]=Ie[e]}));var iy={};Ie.each(["extendShape","extendPath","makePath","makeImage","mergePath","resizePath","createIcon","setHoverStyle","setLabelStyle","setTextStyle","setText","getFont","updateProps","initProps","getTransform","clipPointsByRect","clipRectByRect","registerShape","getShapeClass","Group","Image","Text","Circle","Sector","Ring","Polygon","Polyline","Rect","Line","BezierCurve","Arc","IncrementalDisplayable","CompoundPath","LinearGradient","RadialGradient","BoundingRect"],(function(e){iy[e]=lu[e]}));var ay={zrender:Fv,matrix:Gv,vector:Wv,color:jv,number:Uv,format:Zv,throttle:Xv,helper:qv,parseGeoJSON:Kv,List:Qv,Model:$v,Axis:Jv,env:ey,parseGeoJson:ty,util:ny,graphic:iy},ry=$((function(e,t){var n=uf.throttle,i=Ie.assert,a=Ie.each,r=Ie.isFunction,o=Ie.isObject,s=$u.parseClassType,l={PROCESSOR:{FILTER:1e3,SERIES_FILTER:800,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,PROGRESSIVE_LAYOUT:1100,GLOBAL:2e3,CHART:3e3,POST_CHART_LAYOUT:3500,COMPONENT:4e3,BRUSH:5e3}},u="__flagInMainProcess",c=/^[a-zA-Z0-9_]+$/;function h(e,t){return function(n,i,a){t||!this._disposed?(n=n&&n.toLowerCase(),Ve.prototype[e].call(this,n,i,a)):this.id}}function d(){Ve.call(this)}function f(e,t,i){i=i||{},"string"==typeof t&&(t=z[t]),this.id,this.group,this._dom=e;var a=this._zr=gr.init(e,{renderer:i.renderer||"canvas",devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height});this._throttledZrFlush=n(Ie.bind(a.flush,a),17),(t=Ie.clone(t))&&Bh(t,!0),this._theme=t,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new ch;var r,o,s=this._api=(o=(r=this)._coordSysMgr,Ie.extend(new sh(r),{getCoordinateSystems:Ie.bind(o.getCoordinateSystems,o),getComponentByElement:function(e){for(;e;){var t=e.__ecComponentInfo;if(null!=t)return r._model.getComponent(t.mainType,t.index);e=e.parent}}}));function l(e,t){return e.__prio-t.__prio}Xn(R,l),Xn(E,l),this._scheduler=new Wf(this,s,E,R),Ve.call(this,this._ecEventProcessor=new O),this._messageCenter=new d,this._initEvents(),this.resize=Ie.bind(this.resize,this),this._pendingActions=[],a.animation.on("frame",this._onframe,this),function(e,t){e.on("rendered",(function(){t.trigger("rendered"),!e.animation.isFinished()||t.__optionUpdated||t._scheduler.unfinished||t._pendingActions.length||t.trigger("finished")}))}(a,this),Ie.setAsPrimitive(this)}d.prototype.on=h("on",!0),d.prototype.off=h("off",!0),d.prototype.one=h("one",!0),Ie.mixin(d,Ve);var p=f.prototype;function g(e,t,n){if(this._disposed)this.id;else{var i,a=this._model,r=this._coordSysMgr.getCoordinateSystems();t=Sr.parseFinder(a,t);for(var o=0;o<r.length;o++){var s=r[o];if(s[e]&&null!=(i=s[e](a,t,n)))return i}}}p._onframe=function(){if(!this._disposed){var e=this._scheduler;if(this.__optionUpdated){var t=this.__optionUpdated.silent;this[u]=!0,v(this),m.update.call(this),this[u]=!1,this.__optionUpdated=!1,b.call(this,t),w.call(this,t)}else if(e.unfinished){var n=1,i=this._model,a=this._api;e.unfinished=!1;do{var r=+new Date;e.performSeriesTasks(i),e.performDataProcessorTasks(i),_(this,i),e.performVisualTasks(i),I(this,this._model,a,"remain"),n-=+new Date-r}while(n>0&&e.unfinished);e.unfinished||this._zr.flush()}}},p.getDom=function(){return this._dom},p.getZr=function(){return this._zr},p.setOption=function(e,t,n){if(this._disposed)this.id;else{var i;if(o(t)&&(n=t.lazyUpdate,i=t.silent,t=t.notMerge),this[u]=!0,!this._model||t){var a=new _h(this._api),r=this._theme,s=this._model=new rh;s.scheduler=this._scheduler,s.init(null,null,r,a)}this._model.setOption(e,N),n?(this.__optionUpdated={silent:i},this[u]=!1):(v(this),m.update.call(this),this._zr.flush(),this.__optionUpdated=!1,this[u]=!1,b.call(this,i),w.call(this,i))}},p.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},p.getModel=function(){return this._model},p.getOption=function(){return this._model&&this._model.getOption()},p.getWidth=function(){return this._zr.getWidth()},p.getHeight=function(){return this._zr.getHeight()},p.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},p.getRenderedCanvas=function(e){if(ne.canvasSupported)return(e=e||{}).pixelRatio=e.pixelRatio||1,e.backgroundColor=e.backgroundColor||this._model.get("backgroundColor"),this._zr.painter.getRenderedCanvas(e)},p.getSvgDataURL=function(){if(ne.svgSupported){var e=this._zr,t=e.storage.getDisplayList();return Ie.each(t,(function(e){e.stopAnimation(!0)})),e.painter.toDataURL()}},p.getDataURL=function(e){if(!this._disposed){var t=(e=e||{}).excludeComponents,n=this._model,i=[],r=this;a(t,(function(e){n.eachComponent({mainType:e},(function(e){var t=r._componentsMap[e.__viewId];t.group.ignore||(i.push(t),t.group.ignore=!0)}))}));var o="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.getRenderedCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return a(i,(function(e){e.group.ignore=!1})),o}this.id},p.getConnectedDataURL=function(e){if(this._disposed)this.id;else if(ne.canvasSupported){var t="svg"===e.type,n=this.group,i=Math.min,r=Math.max;if(H[n]){var o=1/0,s=1/0,l=-1/0,u=-1/0,c=[],h=e&&e.pixelRatio||1;Ie.each(V,(function(a,h){if(a.group===n){var d=t?a.getZr().painter.getSvgDom().innerHTML:a.getRenderedCanvas(Ie.clone(e)),f=a.getDom().getBoundingClientRect();o=i(f.left,o),s=i(f.top,s),l=r(f.right,l),u=r(f.bottom,u),c.push({dom:d,left:f.left,top:f.top})}}));var d=(l*=h)-(o*=h),f=(u*=h)-(s*=h),p=Ie.createCanvas(),g=gr.init(p,{renderer:t?"svg":"canvas"});if(g.resize({width:d,height:f}),t){var m="";return a(c,(function(e){var t=e.left-o,n=e.top-s;m+='<g transform="translate('+t+","+n+')">'+e.dom+"</g>"})),g.painter.getSvgRoot().innerHTML=m,e.connectedBackgroundColor&&g.painter.setBackgroundColor(e.connectedBackgroundColor),g.refreshImmediately(),g.painter.toDataURL()}return e.connectedBackgroundColor&&g.add(new lu.Rect({shape:{x:0,y:0,width:d,height:f},style:{fill:e.connectedBackgroundColor}})),a(c,(function(e){var t=new lu.Image({style:{x:e.left*h-o,y:e.top*h-s,image:e.dom}});g.add(t)})),g.refreshImmediately(),p.toDataURL("image/"+(e&&e.type||"png"))}return this.getDataURL(e)}},p.convertToPixel=Ie.curry(g,"convertToPixel"),p.convertFromPixel=Ie.curry(g,"convertFromPixel"),p.containPixel=function(e,t){if(!this._disposed){var n,i=this._model;return e=Sr.parseFinder(i,e),Ie.each(e,(function(e,i){i.indexOf("Models")>=0&&Ie.each(e,(function(e){var a=e.coordinateSystem;if(a&&a.containPoint)n|=!!a.containPoint(t);else if("seriesModels"===i){var r=this._chartsMap[e.__viewId];r&&r.containPoint&&(n|=r.containPoint(t,e))}}),this)}),this),!!n}this.id},p.getVisual=function(e,t){var n=this._model,i=(e=Sr.parseFinder(n,e,{defaultMainType:"series"})).seriesModel.getData(),a=e.hasOwnProperty("dataIndexInside")?e.dataIndexInside:e.hasOwnProperty("dataIndex")?i.indexOfRawIndex(e.dataIndex):null;return null!=a?i.getItemVisual(a,t):i.getVisual(t)},p.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},p.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]};var m={prepareAndUpdate:function(e){v(this),m.update.call(this,e)},update:function(e){var t=this._model,n=this._api,i=this._zr,a=this._coordSysMgr,r=this._scheduler;if(t){r.restoreData(t,e),r.performSeriesTasks(t),a.create(t,n),r.performDataProcessorTasks(t,e),_(this,t),a.update(t,n),M(t),r.performVisualTasks(t,e),T(this,t,n,e);var o=t.get("backgroundColor")||"transparent";if(ne.canvasSupported)i.setBackgroundColor(o);else{var s=en.parse(o);o=en.stringify(s,"rgb"),0===s[3]&&(o="transparent")}A(t,n)}},updateTransform:function(e){var t=this._model,n=this,i=this._api;if(t){var a=[];t.eachComponent((function(r,o){var s=n.getViewOfComponentModel(o);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(o,t,i,e);l&&l.update&&a.push(s)}else a.push(s)}));var r=Ie.createHashMap();t.eachSeries((function(a){var o=n._chartsMap[a.__viewId];if(o.updateTransform){var s=o.updateTransform(a,t,i,e);s&&s.update&&r.set(a.uid,1)}else r.set(a.uid,1)})),M(t),this._scheduler.performVisualTasks(t,e,{setDirty:!0,dirtyMap:r}),I(n,t,i,e,r),A(t,this._api)}},updateView:function(e){var t=this._model;t&&(rf.markUpdateMethod(e,"updateView"),M(t),this._scheduler.performVisualTasks(t,e,{setDirty:!0}),T(this,this._model,this._api,e),A(t,this._api))},updateVisual:function(e){m.update.call(this,e)},updateLayout:function(e){m.update.call(this,e)}};function v(e){var t=e._model,n=e._scheduler;n.restorePipelines(t),n.prepareStageTasks(),S(e,"component",t,n),S(e,"chart",t,n),n.plan()}function y(e,t,n,i,r){var o=e._model;if(i){var s={};s[i+"Id"]=n[i+"Id"],s[i+"Index"]=n[i+"Index"],s[i+"Name"]=n[i+"Name"];var l={mainType:i,query:s};r&&(l.subType=r);var u=n.excludeSeriesId;null!=u&&(u=Ie.createHashMap(Sr.normalizeToArray(u))),o&&o.eachComponent(l,(function(t){u&&null!=u.get(t.id)||c(e["series"===i?"_chartsMap":"_componentsMap"][t.__viewId])}),e)}else a(e._componentsViews.concat(e._chartsViews),c);function c(i){i&&i.__alive&&i[t]&&i[t](i.__model,o,e._api,n)}}function _(e,t){var n=e._chartsMap,i=e._scheduler;t.eachSeries((function(e){i.updateStreamModes(e,n[e.__viewId])}))}function x(e,t){var n=e.type,i=e.escapeConnect,r=k[n],o=r.actionInfo,l=(o.update||"update").split(":"),c=l.pop();l=null!=l[0]&&s(l[0]),this[u]=!0;var h=[e],d=!1;e.batch&&(d=!0,h=Ie.map(e.batch,(function(t){return(t=Ie.defaults(Ie.extend({},t),e)).batch=null,t})));var f,p=[],g="highlight"===n||"downplay"===n;a(h,(function(e){(f=(f=r.action(e,this._model,this._api))||Ie.extend({},e)).type=o.event||f.type,p.push(f),g?y(this,c,e,"series"):l&&y(this,c,e,l.main,l.sub)}),this),"none"===c||g||l||(this.__optionUpdated?(v(this),m.update.call(this,e),this.__optionUpdated=!1):m[c].call(this,e)),f=d?{type:o.event||n,escapeConnect:i,batch:p}:p[0],this[u]=!1,!t&&this._messageCenter.trigger(f.type,f)}function b(e){for(var t=this._pendingActions;t.length;){var n=t.shift();x.call(this,n,e)}}function w(e){!e&&this.trigger("updated")}function S(e,t,n,i){for(var a="component"===t,r=a?e._componentsViews:e._chartsViews,o=a?e._componentsMap:e._chartsMap,l=e._zr,u=e._api,c=0;c<r.length;c++)r[c].__alive=!1;function h(e){var t="_ec_"+e.id+"_"+e.type,c=o[t];if(!c){var h=s(e.type);(c=new(a?Wd.getClass(h.main,h.sub):rf.getClass(h.sub))).init(n,u),o[t]=c,r.push(c),l.add(c.group)}e.__viewId=c.__id=t,c.__alive=!0,c.__model=e,c.group.__ecComponentInfo={mainType:e.mainType,index:e.componentIndex},!a&&i.prepareView(c,e,n,u)}a?n.eachComponent((function(e,t){"series"!==e&&h(t)})):n.eachSeries(h);for(c=0;c<r.length;){var d=r[c];d.__alive?c++:(!a&&d.renderTask.dispose(),l.remove(d.group),d.dispose(n,u),r.splice(c,1),delete o[d.__id],d.__id=d.group.__ecComponentInfo=null)}}function M(e){e.clearColorPalette(),e.eachSeries((function(e){e.clearColorPalette()}))}function T(e,t,n,i){!function(e,t,n,i,r){a(r||e._componentsViews,(function(e){var a=e.__model;e.render(a,t,n,i),C(a,e)}))}(e,t,n,i),a(e._chartsViews,(function(e){e.__alive=!1})),I(e,t,n,i),a(e._chartsViews,(function(e){e.__alive||e.remove(t,n)}))}function I(e,t,n,i,a){var r,o=e._scheduler;t.eachSeries((function(t){var n=e._chartsMap[t.__viewId];n.__alive=!0;var s=n.renderTask;o.updatePayload(s,i),a&&a.get(t.uid)&&s.dirty(),r|=s.perform(o.getPerformArgs(s)),n.group.silent=!!t.get("silent"),C(t,n),function(e,t){var n=e.get("blendMode")||null;t.group.traverse((function(e){e.isGroup||e.style.blend!==n&&e.setStyle("blend",n),e.eachPendingDisplayable&&e.eachPendingDisplayable((function(e){e.setStyle("blend",n)}))}))}(t,n)})),o.unfinished|=r,function(e,t){var n=e._zr.storage,i=0;n.traverse((function(e){i++})),i>t.get("hoverLayerThreshold")&&!ne.node&&t.eachSeries((function(t){if(!t.preventUsingHoverLayer){var n=e._chartsMap[t.__viewId];n.__alive&&n.group.traverse((function(e){e.useHoverLayer=!0}))}}))}(e,t),pf(e._zr.dom,t)}function A(e,t){a(P,(function(n){n(e,t)}))}p.resize=function(e){if(this._disposed)this.id;else{this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var n=t.resetOption("media"),i=e&&e.silent;this[u]=!0,n&&v(this),m.update.call(this),this[u]=!1,b.call(this,i),w.call(this,i)}}},p.showLoading=function(e,t){if(this._disposed)this.id;else if(o(e)&&(t=e,e=""),e=e||"default",this.hideLoading(),B[e]){var n=B[e](this._api,t),i=this._zr;this._loadingFX=n,i.add(n)}},p.hideLoading=function(){this._disposed?this.id:(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},p.makeActionFromEvent=function(e){var t=Ie.extend({},e);return t.type=L[e.type],t},p.dispatchAction=function(e,t){this._disposed?this.id:(o(t)||(t={silent:!!t}),k[e.type]&&this._model&&(this[u]?this._pendingActions.push(e):(x.call(this,e,t.silent),t.flush?this._zr.flush(!0):!1!==t.flush&&ne.browser.weChat&&this._throttledZrFlush(),b.call(this,t.silent),w.call(this,t.silent))))},p.appendData=function(e){if(this._disposed)this.id;else{var t=e.seriesIndex;this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0}},p.on=h("on",!1),p.off=h("off",!1),p.one=h("one",!1);var D=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function C(e,t){var n=e.get("z"),i=e.get("zlevel");t.group.traverse((function(e){"group"!==e.type&&(null!=n&&(e.z=n),null!=i&&(e.zlevel=i))}))}function O(){this.eventInfo}p._initEvents=function(){a(D,(function(e){var t=function(t){var n,i=this.getModel(),a=t.target;if("globalout"===e)n={};else if(a&&null!=a.dataIndex){var r=a.dataModel||i.getSeriesByIndex(a.seriesIndex);n=r&&r.getDataParams(a.dataIndex,a.dataType,a)||{}}else a&&a.eventData&&(n=Ie.extend({},a.eventData));if(n){var o=n.componentType,s=n.componentIndex;"markLine"!==o&&"markPoint"!==o&&"markArea"!==o||(o="series",s=n.seriesIndex);var l=o&&null!=s&&i.getComponent(o,s),u=l&&this["series"===l.mainType?"_chartsMap":"_componentsMap"][l.__viewId];n.event=t,n.type=e,this._ecEventProcessor.eventInfo={targetEl:a,packedEvent:n,model:l,view:u},this.trigger(e,n)}};t.zrEventfulCallAtLast=!0,this._zr.on(e,t,this)}),this),a(L,(function(e,t){this._messageCenter.on(t,(function(e){this.trigger(t,e)}),this)}),this)},p.isDisposed=function(){return this._disposed},p.clear=function(){this._disposed?this.id:this.setOption({series:[]},!0)},p.dispose=function(){if(this._disposed)this.id;else{this._disposed=!0,Sr.setAttribute(this.getDom(),G,"");var e=this._api,t=this._model;a(this._componentsViews,(function(n){n.dispose(t,e)})),a(this._chartsViews,(function(n){n.dispose(t,e)})),this._zr.dispose(),delete V[this.id]}},Ie.mixin(f,Ve),O.prototype={constructor:O,normalizeQuery:function(e){var t={},n={},i={};if(Ie.isString(e)){var a=s(e);t.mainType=a.main||null,t.subType=a.sub||null}else{var r=["Index","Name","Id"],o={name:1,dataIndex:1,dataType:1};Ie.each(e,(function(e,a){for(var s=!1,l=0;l<r.length;l++){var u=r[l],c=a.lastIndexOf(u);if(c>0&&c===a.length-u.length){var h=a.slice(0,c);"data"!==h&&(t.mainType=h,t[u.toLowerCase()]=e,s=!0)}}o.hasOwnProperty(a)&&(n[a]=e,s=!0),s||(i[a]=e)}))}return{cptQuery:t,dataQuery:n,otherQuery:i}},filter:function(e,t,n){var i=this.eventInfo;if(!i)return!0;var a=i.targetEl,r=i.packedEvent,o=i.model,s=i.view;if(!o||!s)return!0;var l=t.cptQuery,u=t.dataQuery;return c(l,o,"mainType")&&c(l,o,"subType")&&c(l,o,"index","componentIndex")&&c(l,o,"name")&&c(l,o,"id")&&c(u,r,"name")&&c(u,r,"dataIndex")&&c(u,r,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,t.otherQuery,a,r));function c(e,t,n,i){return null==e[n]||t[i||n]===e[n]}},afterTrigger:function(){this.eventInfo=null}};var k={},L={},E=[],N=[],P=[],R=[],z={},B={},V={},H={},Y=new Date-0,F=new Date-0,G="_echarts_instance_";function W(e){H[e]=!1}var j=W;function U(e){return V[Sr.getAttribute(e,G)]}function Z(e,t){z[e]=t}function X(e){N.push(e)}function q(e,t){$(E,e,t,1e3)}function K(e,t,n){"function"==typeof t&&(n=t,t="");var a=o(e)?e.type:[e,e={event:t}][0];e.event=(e.event||a).toLowerCase(),t=e.event,i(c.test(a)&&c.test(t)),k[a]||(k[a]={action:n,actionInfo:e}),L[t]=a}function Q(e,t){$(R,e,t,3e3,"visual")}function $(e,t,n,i,a){(r(t)||o(t))&&(n=t,t=i);var s=Wf.wrapStageHandler(n,a);return s.__prio=t,s.__raw=n,e.push(s),s}function J(e,t){B[e]=t}Q(2e3,hf),X(Bh),q(900,Fh),J("default",mf),K({type:"highlight",event:"highlight",update:"highlight"},Ie.noop),K({type:"downplay",event:"downplay",update:"downplay"},Ie.noop),Z("light",Uf),Z("dark",qf);t.version="4.8.0",t.dependencies={zrender:"4.3.1"},t.PRIORITY=l,t.init=function(e,t,n){var i=U(e);if(i)return i;var r=new f(e,t,n);return r.id="ec_"+Y++,V[r.id]=r,Sr.setAttribute(e,G,r.id),function(e){var t="__connectUpdateStatus";function n(e,n){for(var i=0;i<e.length;i++){e[i][t]=n}}a(L,(function(i,r){e._messageCenter.on(r,(function(i){if(H[e.group]&&0!==e[t]){if(i&&i.escapeConnect)return;var r=e.makeActionFromEvent(i),o=[];a(V,(function(t){t!==e&&t.group===e.group&&o.push(t)})),n(o,0),a(o,(function(e){1!==e[t]&&e.dispatchAction(r)})),n(o,2)}}))}))}(r),r},t.connect=function(e){if(Ie.isArray(e)){var t=e;e=null,a(t,(function(t){null!=t.group&&(e=t.group)})),e=e||"g_"+F++,a(t,(function(t){t.group=e}))}return H[e]=!0,e},t.disConnect=W,t.disconnect=j,t.dispose=function(e){"string"==typeof e?e=V[e]:e instanceof f||(e=U(e)),e instanceof f&&!e.isDisposed()&&e.dispose()},t.getInstanceByDom=U,t.getInstanceById=function(e){return V[e]},t.registerTheme=Z,t.registerPreprocessor=X,t.registerProcessor=q,t.registerPostUpdate=function(e){P.push(e)},t.registerAction=K,t.registerCoordinateSystem=function(e,t){ch.register(e,t)},t.getCoordinateSystemDimensions=function(e){var t=ch.get(e);if(t)return t.getDimensionsInfo?t.getDimensionsInfo():t.dimensions.slice()},t.registerLayout=function(e,t){$(R,e,t,1e3,"layout")},t.registerVisual=Q,t.registerLoading=J,t.extendComponentModel=function(e){return $u.extend(e)},t.extendComponentView=function(e){return Wd.extend(e)},t.extendSeriesModel=function(e){return Yd.extend(e)},t.extendChartView=function(e){return rf.extend(e)},t.setCanvasCreator=function(e){Ie.$override("createCanvas",e)},t.registerMap=function(e,t,n){Dp.registerMap(e,t,n)},t.getMap=function(e){var t=Dp.retrieveMap(e);return t&&t[0]&&{geoJson:t[0].geoJSON,specialAreas:t[0].specialAreas}},t.dataTool={},function(){for(var e in ay)ay.hasOwnProperty(e)&&(t[e]=ay[e])}()})),oy=(ry.version,ry.dependencies,ry.PRIORITY,ry.init,ry.connect,ry.disConnect,ry.disconnect,ry.dispose,ry.getInstanceByDom,ry.getInstanceById,ry.registerTheme,ry.registerPreprocessor,ry.registerProcessor,ry.registerPostUpdate,ry.registerAction,ry.registerCoordinateSystem,ry.getCoordinateSystemDimensions,ry.registerLayout,ry.registerVisual,ry.registerLoading,ry.extendComponentModel,ry.extendComponentView,ry.extendSeriesModel,ry.extendChartView,ry.setCanvasCreator,ry.registerMap,ry.getMap,ry.dataTool,Yd.extend({type:"series.line",dependencies:["grid","polar"],getInitialData:function(e,t){return Yg(this.getSource(),this,{useEncodeDefaulter:!0})},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,clip:!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}}),ud.retrieveRawValue);var sy={getDefaultLabel:function(e,t){var n=e.mapDimension("defaultedLabel",!0),i=n.length;if(1===i)return oy(e,t,n[0]);if(i){for(var a=[],r=0;r<n.length;r++){var o=oy(e,t,n[r]);a.push(o)}return a.join(" ")}}},ly=ov.createSymbol,uy=Au.parsePercent,cy=sy.getDefaultLabel;function hy(e,t,n){lu.Group.call(this),this.updateData(e,t,n)}var dy=hy.prototype,fy=hy.getSymbolSize=function(e,t){var n=e.getItemVisual(t,"symbolSize");return n instanceof Array?n.slice():[+n,+n]};function py(e){return[e[0]/2,e[1]/2]}function gy(e,t){this.parent.drift(e,t)}dy._createSymbol=function(e,t,n,i,a){this.removeAll();var r=t.getItemVisual(n,"color"),o=ly(e,-1,-1,2,2,r,a);o.attr({z2:100,culling:!0,scale:py(i)}),o.drift=gy,this._symbolType=e,this.add(o)},dy.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(e)},dy.getSymbolPath=function(){return this.childAt(0)},dy.getScale=function(){return this.childAt(0).scale},dy.highlight=function(){this.childAt(0).trigger("emphasis")},dy.downplay=function(){this.childAt(0).trigger("normal")},dy.setZ=function(e,t){var n=this.childAt(0);n.zlevel=e,n.z=t},dy.setDraggable=function(e){var t=this.childAt(0);t.draggable=e,t.cursor=e?"move":t.cursor},dy.updateData=function(e,t,n){this.silent=!1;var i=e.getItemVisual(t,"symbol")||"circle",a=e.hostModel,r=fy(e,t),o=i!==this._symbolType;if(o){var s=e.getItemVisual(t,"symbolKeepAspect");this._createSymbol(i,e,t,r,s)}else{(l=this.childAt(0)).silent=!1,lu.updateProps(l,{scale:py(r)},a,t)}if(this._updateCommon(e,t,r,n),o){var l=this.childAt(0),u=n&&n.fadeIn,c={scale:l.scale.slice()};u&&(c.style={opacity:l.style.opacity}),l.scale=[0,0],u&&(l.style.opacity=0),lu.initProps(l,c,a,t)}this._seriesModel=a};var my=["itemStyle"],vy=["emphasis","itemStyle"],yy=["label"],_y=["emphasis","label"];function xy(e,t){if(!this.incremental&&!this.useHoverLayer)if("emphasis"===t){var n=this.__symbolOriginalScale,i=n[1]/n[0],a={scale:[Math.max(1.1*n[0],n[0]+3),Math.max(1.1*n[1],n[1]+3*i)]};this.animateTo(a,400,"elasticOut")}else"normal"===t&&this.animateTo({scale:this.__symbolOriginalScale},400,"elasticOut")}dy._updateCommon=function(e,t,n,i){var a=this.childAt(0),r=e.hostModel,o=e.getItemVisual(t,"color");"image"!==a.type?a.useStyle({strokeNoScale:!0}):a.setStyle({opacity:null,shadowBlur:null,shadowOffsetX:null,shadowOffsetY:null,shadowColor:null});var s=i&&i.itemStyle,l=i&&i.hoverItemStyle,u=i&&i.symbolOffset,c=i&&i.labelModel,h=i&&i.hoverLabelModel,d=i&&i.hoverAnimation,f=i&&i.cursorStyle;if(!i||e.hasItemOption){var p=i&&i.itemModel?i.itemModel:e.getItemModel(t);s=p.getModel(my).getItemStyle(["color"]),l=p.getModel(vy).getItemStyle(),u=p.getShallow("symbolOffset"),c=p.getModel(yy),h=p.getModel(_y),d=p.getShallow("hoverAnimation"),f=p.getShallow("cursor")}else l=Ie.extend({},l);var g=a.style,m=e.getItemVisual(t,"symbolRotate");a.attr("rotation",(m||0)*Math.PI/180||0),u&&a.attr("position",[uy(u[0],n[0]),uy(u[1],n[1])]),f&&a.attr("cursor",f),a.setColor(o,i&&i.symbolInnerColor),a.setStyle(s);var v=e.getItemVisual(t,"opacity");null!=v&&(g.opacity=v);var y=e.getItemVisual(t,"liftZ"),_=a.__z2Origin;null!=y?null==_&&(a.__z2Origin=a.z2,a.z2+=y):null!=_&&(a.z2=_,a.__z2Origin=null);var x=i&&i.useNameLabel;lu.setLabelStyle(g,l,c,h,{labelFetcher:r,labelDataIndex:t,defaultText:function(t,n){return x?e.getName(t):cy(e,t)},isRectText:!0,autoColor:o}),a.__symbolOriginalScale=py(n),a.hoverStyle=l,a.highDownOnUpdate=d&&r.isAnimationEnabled()?xy:null,lu.setHoverStyle(a)},dy.fadeOut=function(e,t){var n=this.childAt(0);this.silent=n.silent=!0,(!t||!t.keepLabel)&&(n.style.text=null),lu.updateProps(n,{style:{opacity:0},scale:[0,0]},this._seriesModel,this.dataIndex,e)},Ie.inherits(hy,lu.Group);var by=hy,wy=Ie.isObject;function Sy(e){this.group=new lu.Group,this._symbolCtor=e||by}var My=Sy.prototype;function Ty(e,t,n,i){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(i.isIgnore&&i.isIgnore(n))&&!(i.clipShape&&!i.clipShape.contain(t[0],t[1]))&&"none"!==e.getItemVisual(n,"symbol")}function Iy(e){return null==e||wy(e)||(e={isIgnore:e}),e||{}}function Ay(e){var t=e.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")}}My.updateData=function(e,t){t=Iy(t);var n=this.group,i=e.hostModel,a=this._data,r=this._symbolCtor,o=Ay(e);a||n.removeAll(),e.diff(a).add((function(i){var a=e.getItemLayout(i);if(Ty(e,a,i,t)){var s=new r(e,i,o);s.attr("position",a),e.setItemGraphicEl(i,s),n.add(s)}})).update((function(s,l){var u=a.getItemGraphicEl(l),c=e.getItemLayout(s);Ty(e,c,s,t)?(u?(u.updateData(e,s,o),lu.updateProps(u,{position:c},i)):(u=new r(e,s)).attr("position",c),n.add(u),e.setItemGraphicEl(s,u)):n.remove(u)})).remove((function(e){var t=a.getItemGraphicEl(e);t&&t.fadeOut((function(){n.remove(t)}))})).execute(),this._data=e},My.isPersistent=function(){return!0},My.updateLayout=function(){var e=this._data;e&&e.eachItemGraphicEl((function(t,n){var i=e.getItemLayout(n);t.attr("position",i)}))},My.incrementalPrepareUpdate=function(e){this._seriesScope=Ay(e),this._data=null,this.group.removeAll()},My.incrementalUpdate=function(e,t,n){function i(e){e.isGroup||(e.incremental=e.useHoverLayer=!0)}n=Iy(n);for(var a=e.start;a<e.end;a++){var r=t.getItemLayout(a);if(Ty(t,r,a,n)){var o=new this._symbolCtor(t,a,this._seriesScope);o.traverse(i),o.attr("position",r),this.group.add(o),t.setItemGraphicEl(a,o)}}},My.remove=function(e){var t=this.group,n=this._data;n&&e?n.eachItemGraphicEl((function(e){e.fadeOut((function(){t.remove(e)}))})):t.removeAll()};var Dy=Sy,Cy=Ng.isDimensionStacked,Oy=Ie.map;var ky={prepareDataCoordInfo:function(e,t,n){var i,a=e.getBaseAxis(),r=e.getOtherAxis(a),o=function(e,t){var n=0,i=e.scale.getExtent();"start"===t?n=i[0]:"end"===t?n=i[1]:i[0]>0?n=i[0]:i[1]<0&&(n=i[1]);return n}(r,n),s=a.dim,l=r.dim,u=t.mapDimension(l),c=t.mapDimension(s),h="x"===l||"radius"===l?1:0,d=Oy(e.dimensions,(function(e){return t.mapDimension(e)})),f=t.getCalculationInfo("stackResultDimension");return(i|=Cy(t,d[0]))&&(d[0]=f),(i|=Cy(t,d[1]))&&(d[1]=f),{dataDimsForPoint:d,valueStart:o,valueAxisDim:l,baseAxisDim:s,stacked:!!i,valueDim:u,baseDim:c,baseDataOffset:h,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}},getStackedOnPoint:function(e,t,n,i){var a=NaN;e.stacked&&(a=n.get(n.getCalculationInfo("stackedOverDimension"),i)),isNaN(a)&&(a=e.valueStart);var r=e.baseDataOffset,o=[];return o[r]=n.get(e.baseDim,i),o[1-r]=a,t.dataToPoint(o)}},Ly=ky.prepareDataCoordInfo,Ey=ky.getStackedOnPoint;var Ny=function(e,t,n,i,a,r,o,s){for(var l=function(e,t){var n=[];return t.diff(e).add((function(e){n.push({cmd:"+",idx:e})})).update((function(e,t){n.push({cmd:"=",idx:t,idx1:e})})).remove((function(e){n.push({cmd:"-",idx:e})})).execute(),n}(e,t),u=[],c=[],h=[],d=[],f=[],p=[],g=[],m=Ly(a,t,o),v=Ly(r,e,s),y=0;y<l.length;y++){var _=l[y],x=!0;switch(_.cmd){case"=":var b=e.getItemLayout(_.idx),w=t.getItemLayout(_.idx1);(isNaN(b[0])||isNaN(b[1]))&&(b=w.slice()),u.push(b),c.push(w),h.push(n[_.idx]),d.push(i[_.idx1]),g.push(t.getRawIndex(_.idx1));break;case"+":var S=_.idx;u.push(a.dataToPoint([t.get(m.dataDimsForPoint[0],S),t.get(m.dataDimsForPoint[1],S)])),c.push(t.getItemLayout(S).slice()),h.push(Ey(m,a,t,S)),d.push(i[S]),g.push(t.getRawIndex(S));break;case"-":S=_.idx;var M=e.getRawIndex(S);M!==S?(u.push(e.getItemLayout(S)),c.push(r.dataToPoint([e.get(v.dataDimsForPoint[0],S),e.get(v.dataDimsForPoint[1],S)])),h.push(n[S]),d.push(Ey(v,r,e,S)),g.push(M)):x=!1}x&&(f.push(_),p.push(p.length))}p.sort((function(e,t){return g[e]-g[t]}));var T=[],I=[],A=[],D=[],C=[];for(y=0;y<p.length;y++){S=p[y];T[y]=u[S],I[y]=c[S],A[y]=h[S],D[y]=d[S],C[y]=f[S]}return{current:T,next:I,stackedOnCurrent:A,stackedOnNext:D,status:C}},Py=Le.min,Ry=Le.max,zy=Le.scaleAndAdd,By=Le.copy,Vy=[],Hy=[],Yy=[];function Fy(e){return isNaN(e[0])||isNaN(e[1])}function Gy(e,t,n,i,a,r,o,s,l,u,c){return"none"!==u&&u?Wy.apply(this,arguments):jy.apply(this,arguments)}function Wy(e,t,n,i,a,r,o,s,l,u,c){for(var h=0,d=n,f=0;f<i;f++){var p=t[d];if(d>=a||d<0)break;if(Fy(p)){if(c){d+=r;continue}break}if(d===n)e[r>0?"moveTo":"lineTo"](p[0],p[1]);else if(l>0){var g=t[h],m="y"===u?1:0,v=(p[m]-g[m])*l;By(Hy,g),Hy[m]=g[m]+v,By(Yy,p),Yy[m]=p[m]-v,e.bezierCurveTo(Hy[0],Hy[1],Yy[0],Yy[1],p[0],p[1])}else e.lineTo(p[0],p[1]);h=d,d+=r}return f}function jy(e,t,n,i,a,r,o,s,l,u,c){for(var h=0,d=n,f=0;f<i;f++){var p=t[d];if(d>=a||d<0)break;if(Fy(p)){if(c){d+=r;continue}break}if(d===n)e[r>0?"moveTo":"lineTo"](p[0],p[1]),By(Hy,p);else if(l>0){var g=d+r,m=t[g];if(c)for(;m&&Fy(t[g]);)m=t[g+=r];var v=.5,y=t[h];if(!(m=t[g])||Fy(m))By(Yy,p);else{var _,x;if(Fy(m)&&!c&&(m=p),Le.sub(Vy,m,y),"x"===u||"y"===u){var b="x"===u?0:1;_=Math.abs(p[b]-y[b]),x=Math.abs(p[b]-m[b])}else _=Le.dist(p,y),x=Le.dist(p,m);zy(Yy,p,Vy,-l*(1-(v=x/(x+_))))}Py(Hy,Hy,s),Ry(Hy,Hy,o),Py(Yy,Yy,s),Ry(Yy,Yy,o),e.bezierCurveTo(Hy[0],Hy[1],Yy[0],Yy[1],p[0],p[1]),zy(Hy,p,Vy,l*v)}else e.lineTo(p[0],p[1]);h=d,d+=r}return f}function Uy(e,t){var n=[1/0,1/0],i=[-1/0,-1/0];if(t)for(var a=0;a<e.length;a++){var r=e[a];r[0]<n[0]&&(n[0]=r[0]),r[1]<n[1]&&(n[1]=r[1]),r[0]>i[0]&&(i[0]=r[0]),r[1]>i[1]&&(i[1]=r[1])}return{min:t?n:i,max:t?i:n}}var Zy={Polyline:jo.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:gs(jo.prototype.brush),buildPath:function(e,t){var n=t.points,i=0,a=n.length,r=Uy(n,t.smoothConstraint);if(t.connectNulls){for(;a>0&&Fy(n[a-1]);a--);for(;i<a&&Fy(n[i]);i++);}for(;i<a;)i+=Gy(e,n,i,a,a,1,r.min,r.max,t.smooth,t.smoothMonotone,t.connectNulls)+1}}),Polygon:jo.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},brush:gs(jo.prototype.brush),buildPath:function(e,t){var n=t.points,i=t.stackedOnPoints,a=0,r=n.length,o=t.smoothMonotone,s=Uy(n,t.smoothConstraint),l=Uy(i,t.smoothConstraint);if(t.connectNulls){for(;r>0&&Fy(n[r-1]);r--);for(;a<r&&Fy(n[a]);a++);}for(;a<r;){var u=Gy(e,n,a,r,r,1,s.min,s.max,t.smooth,o,t.connectNulls);Gy(e,i,a+u-1,u,r,-1,l.min,l.max,t.stackedOnSmooth,o,t.connectNulls),a+=u+1,e.closePath()}}})},Xy=Au.round;function qy(e,t,n){var i=e.getArea(),a=e.getBaseAxis().isHorizontal(),r=i.x,o=i.y,s=i.width,l=i.height,u=n.get("lineStyle.width")||2;r-=u/2,o-=u/2,s+=u,l+=u,r=Math.floor(r),s=Math.round(s);var c=new lu.Rect({shape:{x:r,y:o,width:s,height:l}});return t&&(c.shape[a?"width":"height"]=0,lu.initProps(c,{shape:{width:s,height:l}},n)),c}function Ky(e,t,n){var i=e.getArea(),a=new lu.Sector({shape:{cx:Xy(e.cx,1),cy:Xy(e.cy,1),r0:Xy(i.r0,1),r:Xy(i.r,1),startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}});return t&&(a.shape.endAngle=i.startAngle,lu.initProps(a,{shape:{endAngle:i.endAngle}},n)),a}var Qy={createGridClipPath:qy,createPolarClipPath:Ky,createClipPath:function(e,t,n){return e?"polar"===e.type?Ky(e,t,n):"cartesian2d"===e.type?qy(e,t,n):null:null}},$y=ao.fromPoints,Jy=Zy.Polyline,e_=Zy.Polygon,t_=ky.prepareDataCoordInfo,n_=ky.getStackedOnPoint,i_=Qy.createGridClipPath,a_=Qy.createPolarClipPath;function r_(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++){var i=e[n],a=t[n];if(i[0]!==a[0]||i[1]!==a[1])return}return!0}}function o_(e,t){var n=[],i=[],a=[],r=[];return $y(e,n,i),$y(t,a,r),Math.max(Math.abs(n[0]-a[0]),Math.abs(n[1]-a[1]),Math.abs(i[0]-r[0]),Math.abs(i[1]-r[1]))}function s_(e){return"number"==typeof e?e:e?.5:0}function l_(e,t,n){for(var i=t.getBaseAxis(),a="x"===i.dim||"radius"===i.dim?0:1,r=[],o=0;o<e.length-1;o++){var s=e[o+1],l=e[o];r.push(l);var u=[];switch(n){case"end":u[a]=s[a],u[1-a]=l[1-a],r.push(u);break;case"middle":var c=(l[a]+s[a])/2,h=[];u[a]=h[a]=c,u[1-a]=l[1-a],h[1-a]=s[1-a],r.push(u),r.push(h);break;default:u[a]=l[a],u[1-a]=s[1-a],r.push(u)}}return e[o]&&r.push(e[o]),r}function u_(e,t,n){var i=e.get("showAllSymbol"),a="auto"===i;if(!i||a){var r=n.getAxesByScale("ordinal")[0];if(r&&(!a||!function(e,t){var n=e.getExtent(),i=Math.abs(n[1]-n[0])/e.scale.count();isNaN(i)&&(i=0);for(var a=t.count(),r=Math.max(1,Math.round(a/5)),o=0;o<a;o+=r)if(1.5*by.getSymbolSize(t,o)[e.isHorizontal()?1:0]>i)return!1;return!0}(r,t))){var o=t.mapDimension(r.dim),s={};return Ie.each(r.getViewLabels(),(function(e){s[e.tickValue]=1})),function(e){return!s.hasOwnProperty(t.get(o,e))}}}}function c_(e,t,n){if("cartesian2d"===e.type){var i=e.getBaseAxis().isHorizontal(),a=i_(e,t,n);if(!n.get("clip",!0)){var r=a.shape,o=Math.max(r.width,r.height);i?(r.y-=o,r.height+=2*o):(r.x-=o,r.width+=2*o)}return a}return a_(e,t,n)}rf.extend({type:"line",init:function(){var e=new lu.Group,t=new Dy;this.group.add(t.group),this._symbolDraw=t,this._lineGroup=e},render:function(e,t,n){var i=e.coordinateSystem,a=this.group,r=e.getData(),o=e.getModel("lineStyle"),s=e.getModel("areaStyle"),l=r.mapArray(r.getItemLayout),u="polar"===i.type,c=this._coordSys,h=this._symbolDraw,d=this._polyline,f=this._polygon,p=this._lineGroup,g=e.get("animation"),m=!s.isEmpty(),v=s.get("origin"),y=function(e,t,n){if(!n.valueDim)return[];for(var i=[],a=0,r=t.count();a<r;a++)i.push(n_(n,e,t,a));return i}(i,r,t_(i,r,v)),_=e.get("showSymbol"),x=_&&!u&&u_(e,r,i),b=this._data;b&&b.eachItemGraphicEl((function(e,t){e.__temp&&(a.remove(e),b.setItemGraphicEl(t,null))})),_||h.remove(),a.add(p);var w,S=!u&&e.get("step");i&&i.getArea&&e.get("clip",!0)&&(null!=(w=i.getArea()).width?(w.x-=.1,w.y-=.1,w.width+=.2,w.height+=.2):w.r0&&(w.r0-=.5,w.r1+=.5)),this._clipShapeForSymbol=w,d&&c.type===i.type&&S===this._step?(m&&!f?f=this._newPolygon(l,y,i,g):f&&!m&&(p.remove(f),f=this._polygon=null),p.setClipPath(c_(i,!1,e)),_&&h.updateData(r,{isIgnore:x,clipShape:w}),r.eachItemGraphicEl((function(e){e.stopAnimation(!0)})),r_(this._stackedOnPoints,y)&&r_(this._points,l)||(g?this._updateAnimation(r,y,i,n,S,v):(S&&(l=l_(l,i,S),y=l_(y,i,S)),d.setShape({points:l}),f&&f.setShape({points:l,stackedOnPoints:y})))):(_&&h.updateData(r,{isIgnore:x,clipShape:w}),S&&(l=l_(l,i,S),y=l_(y,i,S)),d=this._newPolyline(l,i,g),m&&(f=this._newPolygon(l,y,i,g)),p.setClipPath(c_(i,!0,e)));var M=function(e,t){var n=e.getVisual("visualMeta");if(n&&n.length&&e.count()&&"cartesian2d"===t.type){for(var i,a,r=n.length-1;r>=0;r--){var o=n[r].dimension,s=e.dimensions[o],l=e.getDimensionInfo(s);if("x"===(i=l&&l.coordDim)||"y"===i){a=n[r];break}}if(a){var u=t.getAxis(i),c=Ie.map(a.stops,(function(e){return{coord:u.toGlobalCoord(u.dataToCoord(e.value)),color:e.color}})),h=c.length,d=a.outerColors.slice();h&&c[0].coord>c[h-1].coord&&(c.reverse(),d.reverse());var f=c[0].coord-10,p=c[h-1].coord+10,g=p-f;if(g<.001)return"transparent";Ie.each(c,(function(e){e.offset=(e.coord-f)/g})),c.push({offset:h?c[h-1].offset:.5,color:d[1]||"transparent"}),c.unshift({offset:h?c[0].offset:.5,color:d[0]||"transparent"});var m=new lu.LinearGradient(0,0,0,0,c,!0);return m[i]=f,m[i+"2"]=p,m}}}(r,i)||r.getVisual("color");d.useStyle(Ie.defaults(o.getLineStyle(),{fill:"none",stroke:M,lineJoin:"bevel"}));var T=e.get("smooth");if(T=s_(e.get("smooth")),d.setShape({smooth:T,smoothMonotone:e.get("smoothMonotone"),connectNulls:e.get("connectNulls")}),f){var I=r.getCalculationInfo("stackedOnSeries"),A=0;f.useStyle(Ie.defaults(s.getAreaStyle(),{fill:M,opacity:.7,lineJoin:"bevel"})),I&&(A=s_(I.get("smooth"))),f.setShape({smooth:T,stackedOnSmooth:A,smoothMonotone:e.get("smoothMonotone"),connectNulls:e.get("connectNulls")})}this._data=r,this._coordSys=i,this._stackedOnPoints=y,this._points=l,this._step=S,this._valueOrigin=v},dispose:function(){},highlight:function(e,t,n,i){var a=e.getData(),r=Sr.queryDataIndex(a,i);if(!(r instanceof Array)&&null!=r&&r>=0){var o=a.getItemGraphicEl(r);if(!o){var s=a.getItemLayout(r);if(!s)return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(s[0],s[1]))return;(o=new by(a,r)).position=s,o.setZ(e.get("zlevel"),e.get("z")),o.ignore=isNaN(s[0])||isNaN(s[1]),o.__temp=!0,a.setItemGraphicEl(r,o),o.stopSymbolAnimation(!0),this.group.add(o)}o.highlight()}else rf.prototype.highlight.call(this,e,t,n,i)},downplay:function(e,t,n,i){var a=e.getData(),r=Sr.queryDataIndex(a,i);if(null!=r&&r>=0){var o=a.getItemGraphicEl(r);o&&(o.__temp?(a.setItemGraphicEl(r,null),this.group.remove(o)):o.downplay())}else rf.prototype.downplay.call(this,e,t,n,i)},_newPolyline:function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new Jy({shape:{points:e},silent:!0,z2:10}),this._lineGroup.add(t),this._polyline=t,t},_newPolygon:function(e,t){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new e_({shape:{points:e,stackedOnPoints:t},silent:!0}),this._lineGroup.add(n),this._polygon=n,n},_updateAnimation:function(e,t,n,i,a,r){var o=this._polyline,s=this._polygon,l=e.hostModel,u=Ny(this._data,e,this._stackedOnPoints,t,this._coordSys,n,this._valueOrigin,r),c=u.current,h=u.stackedOnCurrent,d=u.next,f=u.stackedOnNext;if(a&&(c=l_(u.current,n,a),h=l_(u.stackedOnCurrent,n,a),d=l_(u.next,n,a),f=l_(u.stackedOnNext,n,a)),o_(c,d)>3e3||s&&o_(h,f)>3e3)return o.setShape({points:d}),void(s&&s.setShape({points:d,stackedOnPoints:f}));o.shape.__points=u.current,o.shape.points=c,lu.updateProps(o,{shape:{points:d}},l),s&&(s.setShape({points:c,stackedOnPoints:h}),lu.updateProps(s,{shape:{points:d,stackedOnPoints:f}},l));for(var p=[],g=u.status,m=0;m<g.length;m++){if("="===g[m].cmd){var v=e.getItemGraphicEl(g[m].idx1);v&&p.push({el:v,ptIdx:m})}}o.animators&&o.animators.length&&o.animators[0].during((function(){for(var e=0;e<p.length;e++){p[e].el.attr("position",o.shape.__points[p[e].ptIdx])}}))},remove:function(e){var t=this.group,n=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),n&&n.eachItemGraphicEl((function(e,i){e.__temp&&(t.remove(e),n.setItemGraphicEl(i,null))})),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._data=null}});var h_=Ie.isFunction;var d_=function(e,t,n){return{seriesType:e,performRawSeries:!0,reset:function(e,i,a){var r=e.getData(),o=e.get("symbol"),s=e.get("symbolSize"),l=e.get("symbolKeepAspect"),u=e.get("symbolRotate"),c=h_(o),h=h_(s),d=h_(u),f=c||h||d,p=!c&&o?o:t,g=h?null:s;if(r.setVisual({legendSymbol:n||p,symbol:p,symbolSize:g,symbolKeepAspect:l,symbolRotate:u}),!i.isSeriesFiltered(e))return{dataEach:r.hasItemOption||f?function(t,n){if(f){var i=e.getRawValue(n),a=e.getDataParams(n);c&&t.setItemVisual(n,"symbol",o(i,a)),h&&t.setItemVisual(n,"symbolSize",s(i,a)),d&&t.setItemVisual(n,"symbolRotate",u(i,a))}if(t.hasItemOption){var r=t.getItemModel(n),l=r.getShallow("symbol",!0),p=r.getShallow("symbolSize",!0),g=r.getShallow("symbolRotate",!0),m=r.getShallow("symbolKeepAspect",!0);null!=l&&t.setItemVisual(n,"symbol",l),null!=p&&t.setItemVisual(n,"symbolSize",p),null!=g&&t.setItemVisual(n,"symbolRotate",g),null!=m&&t.setItemVisual(n,"symbolKeepAspect",m)}}:null}}}},f_=Ie.map,p_=Ng.isDimensionStacked;var g_=function(e){return{seriesType:e,plan:Ud(),reset:function(e){var t=e.getData(),n=e.coordinateSystem,i=e.pipelineContext.large;if(n){var a=f_(n.dimensions,(function(e){return t.mapDimension(e)})).slice(0,2),r=a.length,o=t.getCalculationInfo("stackResultDimension");return p_(t,a[0])&&(a[0]=o),p_(t,a[1])&&(a[1]=o),r&&{progress:function(e,t){for(var o=e.end-e.start,s=i&&new Float32Array(o*r),l=e.start,u=0,c=[],h=[];l<e.end;l++){var d;if(1===r){var f=t.get(a[0],l);d=!isNaN(f)&&n.dataToPoint(f,null,h)}else{f=c[0]=t.get(a[0],l);var p=c[1]=t.get(a[1],l);d=!isNaN(f)&&!isNaN(p)&&n.dataToPoint(c,null,h)}i?(s[u++]=d?d[0]:NaN,s[u++]=d?d[1]:NaN):t.setItemLayout(l,d&&d.slice()||[NaN,NaN])}i&&t.setLayout("symbolPoints",s)}}}}}},m_={average:function(e){for(var t=0,n=0,i=0;i<e.length;i++)isNaN(e[i])||(t+=e[i],n++);return 0===n?NaN:t/n},sum:function(e){for(var t=0,n=0;n<e.length;n++)t+=e[n]||0;return t},max:function(e){for(var t=-1/0,n=0;n<e.length;n++)e[n]>t&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;n<e.length;n++)e[n]<t&&(t=e[n]);return isFinite(t)?t:NaN},nearest:function(e){return e[0]}},v_=function(e,t){return Math.round(e.length/2)};var y_=function(e){return{seriesType:e,modifyOutputEnd:!0,reset:function(e,t,n){var i=e.getData(),a=e.get("sampling"),r=e.coordinateSystem;if("cartesian2d"===r.type&&a){var o,s=r.getBaseAxis(),l=r.getOtherAxis(s),u=s.getExtent(),c=u[1]-u[0],h=Math.round(i.count()/c);if(h>1)"string"==typeof a?o=m_[a]:"function"==typeof a&&(o=a),o&&e.setData(i.downSample(i.mapDimension(l.dim),1/h,o,v_))}}}};function __(e){return this._axes[e]}var x_=function(e){this._axes={},this._dimList=[],this.name=e||""};x_.prototype={constructor:x_,type:"cartesian",getAxis:function(e){return this._axes[e]},getAxes:function(){return Ie.map(this._dimList,__,this)},getAxesByScale:function(e){return e=e.toLowerCase(),Ie.filter(this.getAxes(),(function(t){return t.scale.type===e}))},addAxis:function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},dataToCoord:function(e){return this._dataCoordConvert(e,"dataToCoord")},coordToData:function(e){return this._dataCoordConvert(e,"coordToData")},_dataCoordConvert:function(e,t){for(var n=this._dimList,i=e instanceof Array?[]:{},a=0;a<n.length;a++){var r=n[a],o=this._axes[r];i[r]=o[t](e[r])}return i}};var b_=x_;function w_(e){b_.call(this,e)}w_.prototype={constructor:w_,type:"cartesian2d",dimensions:["x","y"],getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},containPoint:function(e){var t=this.getAxis("x"),n=this.getAxis("y");return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},containData:function(e){return this.getAxis("x").containData(e[0])&&this.getAxis("y").containData(e[1])},dataToPoint:function(e,t,n){var i=this.getAxis("x"),a=this.getAxis("y");return(n=n||[])[0]=i.toGlobalCoord(i.dataToCoord(e[0])),n[1]=a.toGlobalCoord(a.dataToCoord(e[1])),n},clampData:function(e,t){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,a=n.getExtent(),r=i.getExtent(),o=n.parse(e[0]),s=i.parse(e[1]);return(t=t||[])[0]=Math.min(Math.max(Math.min(a[0],a[1]),o),Math.max(a[0],a[1])),t[1]=Math.min(Math.max(Math.min(r[0],r[1]),s),Math.max(r[0],r[1])),t},pointToData:function(e,t){var n=this.getAxis("x"),i=this.getAxis("y");return(t=t||[])[0]=n.coordToData(n.toLocalCoord(e[0])),t[1]=i.coordToData(i.toLocalCoord(e[1])),t},getOtherAxis:function(e){return this.getAxis("x"===e.dim?"y":"x")},getArea:function(){var e=this.getAxis("x").getGlobalExtent(),t=this.getAxis("y").getGlobalExtent(),n=Math.min(e[0],e[1]),i=Math.min(t[0],t[1]),a=Math.max(e[0],e[1])-n,r=Math.max(t[0],t[1])-i;return new Hn(n,i,a,r)}},Ie.inherits(w_,b_);var S_=w_,M_=function(e,t,n,i,a){Yv.call(this,e,t,n),this.type=i||"value",this.position=a||"bottom"};M_.prototype={constructor:M_,index:0,getAxesOnZeroOf:null,model:null,isHorizontal:function(){var e=this.position;return"top"===e||"bottom"===e},getGlobalExtent:function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},getOtherAxis:function(){this.grid.getOtherAxis()},pointToData:function(e,t){return this.coordToData(this.toLocalCoord(e["x"===this.dim?0:1]),t)},toLocalCoord:null,toGlobalCoord:null},Ie.inherits(M_,Yv);var T_=M_,I_={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)"]}}},A_={};A_.categoryAxis=Ie.merge({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},I_),A_.valueAxis=Ie.merge({boundaryGap:[0,0],splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#eee",width:1}}},I_),A_.timeAxis=Ie.defaults({scale:!0,min:"dataMin",max:"dataMax"},A_.valueAxis),A_.logAxis=Ie.defaults({scale:!0,logBase:10},A_.valueAxis);var D_=A_,C_=Uu.getLayoutParams,O_=Uu.mergeLayoutParam,k_=["value","category","time","log"];var L_=function(e,t,n,i){Ie.each(k_,(function(a){t.extend({type:e+"Axis."+a,mergeDefaultAndTheme:function(t,i){var r=this.layoutMode,o=r?C_(t):{},s=i.getTheme();Ie.merge(t,s.get(a+"Axis")),Ie.merge(t,this.getDefaultOption()),t.type=n(e,t),r&&O_(t,o,r)},optionUpdated:function(){"category"===this.option.type&&(this.__ordinalMeta=Qg.createByAxisModel(this))},getCategories:function(e){var t=this.option;if("category"===t.type)return e?t.data:this.__ordinalMeta.categories},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:Ie.mergeAll([{},D_[a+"Axis"],i],!0)})})),$u.registerSubTypeDefaulter(e+"Axis",Ie.curry(n,e))},E_=$u.extend({type:"cartesian2dAxis",axis:null,init:function(){E_.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){E_.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){E_.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});function N_(e,t){return t.type||(t.data?"category":"value")}Ie.merge(E_.prototype,qm);var P_={offset:0};L_("x",E_,N_,P_),L_("y",E_,N_,P_);$u.extend({type:"grid",dependencies:["xAxis","yAxis"],layoutMode:"box",coordinateSystem:null,defaultOption:{show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:60,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"}});var R_=Ie.isObject,z_=Ie.each,B_=Ie.map,V_=Ie.indexOf,H_=Uu.getLayoutRect,Y_=Xm.createScaleByModel,F_=Xm.ifAxisCrossZero,G_=Xm.niceScaleExtent,W_=Xm.estimateLabelUnionRect,j_=Ng.getStackedDimension;function U_(e,t,n){return e.getCoordSysModel()===t}function Z_(e,t,n){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(e,t,n),this.model=e}var X_=Z_.prototype;function q_(e,t,n,i){n.getAxesOnZeroOf=function(){return a?[a]:[]};var a,r=e[t],o=n.model,s=o.get("axisLine.onZero"),l=o.get("axisLine.onZeroAxisIndex");if(s){if(null!=l)K_(r[l])&&(a=r[l]);else for(var u in r)if(r.hasOwnProperty(u)&&K_(r[u])&&!i[c(r[u])]){a=r[u];break}a&&(i[c(a)]=!0)}function c(e){return e.dim+"_"+e.index}}function K_(e){return e&&"category"!==e.type&&"time"!==e.type&&F_(e)}X_.type="grid",X_.axisPointerEnabled=!0,X_.getRect=function(){return this._rect},X_.update=function(e,t){var n=this._axesMap;this._updateScale(e,this.model),z_(n.x,(function(e){G_(e.scale,e.model)})),z_(n.y,(function(e){G_(e.scale,e.model)}));var i={};z_(n.x,(function(e){q_(n,"y",e,i)})),z_(n.y,(function(e){q_(n,"x",e,i)})),this.resize(this.model,t)},X_.resize=function(e,t,n){var i=H_(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()});this._rect=i;var a=this._axesList;function r(){z_(a,(function(e){var t=e.isHorizontal(),n=t?[0,i.width]:[0,i.height],a=e.inverse?1:0;e.setExtent(n[a],n[1-a]),function(e,t){var n=e.getExtent(),i=n[0]+n[1];e.toGlobalCoord="x"===e.dim?function(e){return e+t}:function(e){return i-e+t},e.toLocalCoord="x"===e.dim?function(e){return e-t}:function(e){return i-e+t}}(e,t?i.x:i.y)}))}r(),!n&&e.get("containLabel")&&(z_(a,(function(e){if(!e.model.get("axisLabel.inside")){var t=W_(e);if(t){var n=e.isHorizontal()?"height":"width",a=e.model.get("axisLabel.margin");i[n]-=t[n]+a,"top"===e.position?i.y+=t.height+a:"left"===e.position&&(i.x+=t.width+a)}}})),r())},X_.getAxis=function(e,t){var n=this._axesMap[e];if(null!=n){if(null==t)for(var i in n)if(n.hasOwnProperty(i))return n[i];return n[t]}},X_.getAxes=function(){return this._axesList.slice()},X_.getCartesian=function(e,t){if(null!=e&&null!=t){var n="x"+e+"y"+t;return this._coordsMap[n]}R_(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var i=0,a=this._coordsList;i<a.length;i++)if(a[i].getAxis("x").index===e||a[i].getAxis("y").index===t)return a[i]},X_.getCartesians=function(){return this._coordsList.slice()},X_.convertToPixel=function(e,t,n){var i=this._findConvertTarget(e,t);return i.cartesian?i.cartesian.dataToPoint(n):i.axis?i.axis.toGlobalCoord(i.axis.dataToCoord(n)):null},X_.convertFromPixel=function(e,t,n){var i=this._findConvertTarget(e,t);return i.cartesian?i.cartesian.pointToData(n):i.axis?i.axis.coordToData(i.axis.toLocalCoord(n)):null},X_._findConvertTarget=function(e,t){var n,i,a=t.seriesModel,r=t.xAxisModel||a&&a.getReferringComponents("xAxis")[0],o=t.yAxisModel||a&&a.getReferringComponents("yAxis")[0],s=t.gridModel,l=this._coordsList;if(a)n=a.coordinateSystem,V_(l,n)<0&&(n=null);else if(r&&o)n=this.getCartesian(r.componentIndex,o.componentIndex);else if(r)i=this.getAxis("x",r.componentIndex);else if(o)i=this.getAxis("y",o.componentIndex);else if(s){s.coordinateSystem===this&&(n=this._coordsList[0])}return{cartesian:n,axis:i}},X_.containPoint=function(e){var t=this._coordsList[0];if(t)return t.containPoint(e)},X_._initCartesian=function(e,t,n){var i={left:!1,right:!1,top:!1,bottom:!1},a={x:{},y:{}},r={x:0,y:0};if(t.eachComponent("xAxis",o("x"),this),t.eachComponent("yAxis",o("y"),this),!r.x||!r.y)return this._axesMap={},void(this._axesList=[]);function o(t){return function(n,o){if(U_(n,e)){var s=n.get("position");"x"===t?"top"!==s&&"bottom"!==s&&(s=i.bottom?"top":"bottom"):"left"!==s&&"right"!==s&&(s=i.left?"right":"left"),i[s]=!0;var l=new T_(t,Y_(n),[0,0],n.get("type"),s),u="category"===l.type;l.onBand=u&&n.get("boundaryGap"),l.inverse=n.get("inverse"),n.axis=l,l.model=n,l.grid=this,l.index=o,this._axesList.push(l),a[t][o]=l,r[t]++}}}this._axesMap=a,z_(a.x,(function(t,n){z_(a.y,(function(i,a){var r="x"+n+"y"+a,o=new S_(r);o.grid=this,o.model=e,this._coordsMap[r]=o,this._coordsList.push(o),o.addAxis(t),o.addAxis(i)}),this)}),this)},X_._updateScale=function(e,t){function n(e,t,n){z_(e.mapDimension(t.dim,!0),(function(n){t.scale.unionExtentFromData(e,j_(e,n))}))}z_(this._axesList,(function(e){e.scale.setExtent(1/0,-1/0)})),e.eachSeries((function(e){if(J_(e)){var i=$_(e),a=i[0],r=i[1];if(!U_(a,t)||!U_(r,t))return;var o=this.getCartesian(a.componentIndex,r.componentIndex),s=e.getData(),l=o.getAxis("x"),u=o.getAxis("y");"list"===s.type&&(n(s,l),n(s,u))}}),this)},X_.getTooltipAxes=function(e){var t=[],n=[];return z_(this.getCartesians(),(function(i){var a=null!=e&&"auto"!==e?i.getAxis(e):i.getBaseAxis(),r=i.getOtherAxis(a);V_(t,a)<0&&t.push(a),V_(n,r)<0&&n.push(r)})),{baseAxes:t,otherAxes:n}};var Q_=["xAxis","yAxis"];function $_(e,t){return B_(Q_,(function(t){return e.getReferringComponents(t)[0]}))}function J_(e){return"cartesian2d"===e.get("coordinateSystem")}Z_.create=function(e,t){var n=[];return e.eachComponent("grid",(function(i,a){var r=new Z_(i,e,t);r.name="grid_"+a,r.resize(i,t,!0),i.coordinateSystem=r,n.push(r)})),e.eachSeries((function(e){if(J_(e)){var t=$_(e),n=t[0],i=t[1],a=n.getCoordSysModel().coordinateSystem;e.coordinateSystem=a.getCartesian(n.componentIndex,i.componentIndex)}})),n},Z_.dimensions=Z_.prototype.dimensions=S_.prototype.dimensions,ch.register("cartesian2d",Z_);var ex=Ie.retrieve,tx=Ie.defaults,nx=Ie.extend,ix=Ie.each,ax=Au.isRadianAroundZero,rx=Au.remRadian,ox=ov.createSymbol,sx=Le.applyTransform,lx=Xm.shouldShowAllLabels,ux=Math.PI,cx=function(e,t){this.opt=t,this.axisModel=e,tx(t,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new lu.Group;var n=new lu.Group({position:t.position.slice(),rotation:t.rotation});n.updateTransform(),this._transform=n.transform,this._dumbGroup=n};cx.prototype={constructor:cx,hasBuilder:function(e){return!!hx[e]},add:function(e){hx[e].call(this)},getGroup:function(){return this.group}};var hx={axisLine:function(){var e=this.opt,t=this.axisModel;if(t.get("axisLine.show")){var n=this.axisModel.axis.getExtent(),i=this._transform,a=[n[0],0],r=[n[1],0];i&&(sx(a,a,i),sx(r,r,i));var o=nx({lineCap:"round"},t.getModel("axisLine.lineStyle").getLineStyle());this.group.add(new lu.Line({anid:"line",subPixelOptimize:!0,shape:{x1:a[0],y1:a[1],x2:r[0],y2:r[1]},style:o,strokeContainThreshold:e.strokeContainThreshold||5,silent:!0,z2:1}));var s=t.get("axisLine.symbol"),l=t.get("axisLine.symbolSize"),u=t.get("axisLine.symbolOffset")||0;if("number"==typeof u&&(u=[u,u]),null!=s){"string"==typeof s&&(s=[s,s]),"string"!=typeof l&&"number"!=typeof l||(l=[l,l]);var c=l[0],h=l[1];ix([{rotate:e.rotation+Math.PI/2,offset:u[0],r:0},{rotate:e.rotation-Math.PI/2,offset:u[1],r:Math.sqrt((a[0]-r[0])*(a[0]-r[0])+(a[1]-r[1])*(a[1]-r[1]))}],(function(t,n){if("none"!==s[n]&&null!=s[n]){var i=ox(s[n],-c/2,-h/2,c,h,o.stroke,!0),r=t.r+t.offset,l=[a[0]+r*Math.cos(e.rotation),a[1]-r*Math.sin(e.rotation)];i.attr({rotation:t.rotate,position:l,silent:!0,z2:11}),this.group.add(i)}}),this)}}},axisTickLabel:function(){var e=this.axisModel,t=this.opt,n=function(e,t,n){var i=t.axis,a=t.getModel("axisTick");if(!a.get("show")||i.scale.isBlank())return;for(var r=a.getModel("lineStyle"),o=n.tickDirection*a.get("length"),s=yx(i.getTicksCoords(),e._transform,o,tx(r.getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")}),"ticks"),l=0;l<s.length;l++)e.group.add(s[l]);return s}(this,e,t),i=function(e,t,n){var i=t.axis;if(!ex(n.axisLabelShow,t.get("axisLabel.show"))||i.scale.isBlank())return;var a=t.getModel("axisLabel"),r=a.get("margin"),o=i.getViewLabels(),s=(ex(n.labelRotate,a.get("rotate"))||0)*ux/180,l=fx(n.rotation,s,n.labelDirection),u=t.getCategories&&t.getCategories(!0),c=[],h=px(t),d=t.get("triggerEvent");return ix(o,(function(o,s){var f=o.tickValue,p=o.formattedLabel,g=o.rawLabel,m=a;u&&u[f]&&u[f].textStyle&&(m=new bu(u[f].textStyle,a,t.ecModel));var v=m.getTextColor()||t.get("axisLine.lineStyle.color"),y=[i.dataToCoord(f),n.labelOffset+n.labelDirection*r],_=new lu.Text({anid:"label_"+f,position:y,rotation:l.rotation,silent:h,z2:10});lu.setTextStyle(_.style,m,{text:p,textAlign:m.getShallow("align",!0)||l.textAlign,textVerticalAlign:m.getShallow("verticalAlign",!0)||m.getShallow("baseline",!0)||l.textVerticalAlign,textFill:"function"==typeof v?v("category"===i.type?g:"value"===i.type?f+"":f,s):v}),d&&(_.eventData=dx(t),_.eventData.targetType="axisLabel",_.eventData.value=g),e._dumbGroup.add(_),_.updateTransform(),c.push(_),e.group.add(_),_.decomposeTransform()})),c}(this,e,t);!function(e,t,n){if(lx(e.axis))return;var i=e.get("axisLabel.showMinLabel"),a=e.get("axisLabel.showMaxLabel");n=n||[];var r=(t=t||[])[0],o=t[1],s=t[t.length-1],l=t[t.length-2],u=n[0],c=n[1],h=n[n.length-1],d=n[n.length-2];!1===i?(gx(r),gx(u)):mx(r,o)&&(i?(gx(o),gx(c)):(gx(r),gx(u)));!1===a?(gx(s),gx(h)):mx(l,s)&&(a?(gx(l),gx(d)):(gx(s),gx(h)))}(e,i,n),function(e,t,n){var i=t.axis,a=t.getModel("minorTick");if(!a.get("show")||i.scale.isBlank())return;var r=i.getMinorTicksCoords();if(!r.length)return;for(var o=a.getModel("lineStyle"),s=n.tickDirection*a.get("length"),l=tx(o.getLineStyle(),tx(t.getModel("axisTick").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})),u=0;u<r.length;u++)for(var c=yx(r[u],e._transform,s,l,"minorticks_"+u),h=0;h<c.length;h++)e.group.add(c[h])}(this,e,t)},axisName:function(){var e=this.opt,t=this.axisModel,n=ex(e.axisName,t.get("name"));if(n){var i,a,r=t.get("nameLocation"),o=e.nameDirection,s=t.getModel("nameTextStyle"),l=t.get("nameGap")||0,u=this.axisModel.axis.getExtent(),c=u[0]>u[1]?-1:1,h=["start"===r?u[0]-c*l:"end"===r?u[1]+c*l:(u[0]+u[1])/2,vx(r)?e.labelOffset+o*l:0],d=t.get("nameRotate");null!=d&&(d=d*ux/180),vx(r)?i=fx(e.rotation,null!=d?d:e.rotation,o):(i=function(e,t,n,i){var a,r,o=rx(n-e.rotation),s=i[0]>i[1],l="start"===t&&!s||"start"!==t&&s;ax(o-ux/2)?(r=l?"bottom":"top",a="center"):ax(o-1.5*ux)?(r=l?"top":"bottom",a="center"):(r="middle",a=o<1.5*ux&&o>ux/2?l?"left":"right":l?"right":"left");return{rotation:o,textAlign:a,textVerticalAlign:r}}(e,r,d||0,u),null!=(a=e.axisNameAvailableWidth)&&(a=Math.abs(a/Math.sin(i.rotation)),!isFinite(a)&&(a=null)));var f=s.getFont(),p=t.get("nameTruncate",!0)||{},g=p.ellipsis,m=ex(e.nameTruncateMaxWidth,p.maxWidth,a),v=null!=g&&null!=m?Pu.truncateText(n,m,f,g,{minChar:2,placeholder:p.placeholder}):n,y=t.get("tooltip",!0),_=t.mainType,x={componentType:_,name:n,$vars:["name"]};x[_+"Index"]=t.componentIndex;var b=new lu.Text({anid:"name",__fullText:n,__truncatedText:v,position:h,rotation:i.rotation,silent:px(t),z2:1,tooltip:y&&y.show?nx({content:n,formatter:function(){return n},formatterParams:x},y):null});lu.setTextStyle(b.style,s,{text:v,textFont:f,textFill:s.getTextColor()||t.get("axisLine.lineStyle.color"),textAlign:s.get("align")||i.textAlign,textVerticalAlign:s.get("verticalAlign")||i.textVerticalAlign}),t.get("triggerEvent")&&(b.eventData=dx(t),b.eventData.targetType="axisName",b.eventData.name=n),this._dumbGroup.add(b),b.updateTransform(),this.group.add(b),b.decomposeTransform()}}},dx=cx.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},fx=cx.innerTextLayout=function(e,t,n){var i,a,r=rx(t-e);return ax(r)?(a=n>0?"top":"bottom",i="center"):ax(r-ux)?(a=n>0?"bottom":"top",i="center"):(a="middle",i=r>0&&r<ux?n>0?"right":"left":n>0?"left":"right"),{rotation:r,textAlign:i,textVerticalAlign:a}};var px=cx.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)};function gx(e){e&&(e.ignore=!0)}function mx(e,t,n){var i=e&&e.getBoundingRect().clone(),a=t&&t.getBoundingRect().clone();if(i&&a){var r=yt.identity([]);return yt.rotate(r,r,-e.rotation),i.applyTransform(yt.mul([],r,e.getLocalTransform())),a.applyTransform(yt.mul([],r,t.getLocalTransform())),i.intersect(a)}}function vx(e){return"middle"===e||"center"===e}function yx(e,t,n,i,a){for(var r=[],o=[],s=[],l=0;l<e.length;l++){var u=e[l].coord;o[0]=u,o[1]=0,s[0]=u,s[1]=n,t&&(sx(o,o,t),sx(s,s,t));var c=new lu.Line({anid:a+"_"+e[l].tickValue,subPixelOptimize:!0,shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:i,z2:2,silent:!0});r.push(c)}return r}var _x=cx,xx=Ie.each,bx=Ie.curry;function Sx(e,t){return"all"===e||Ie.isArray(e)&&Ie.indexOf(e,t)>=0||e===t}function Mx(e){var t=(e.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[Ix(e)]}function Tx(e){return!!e.get("handle.show")}function Ix(e){return e.type+"||"+e.id}var Ax={collect:function(e,t){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return function(e,t,n){var i=t.getComponent("tooltip"),a=t.getComponent("axisPointer"),r=a.get("link",!0)||[],o=[];xx(n.getCoordinateSystems(),(function(n){if(n.axisPointerEnabled){var s=Ix(n.model),l=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;var u=n.model.getModel("tooltip",i);if(xx(n.getAxes(),bx(f,!1,null)),n.getTooltipAxes&&i&&u.get("show")){var c="axis"===u.get("trigger"),h="cross"===u.get("axisPointer.type"),d=n.getTooltipAxes(u.get("axisPointer.axis"));(c||h)&&xx(d.baseAxes,bx(f,!h||"cross",c)),h&&xx(d.otherAxes,bx(f,"cross",!1))}}function f(i,s,c){var h=c.model.getModel("axisPointer",a),d=h.get("show");if(d&&("auto"!==d||i||Tx(h))){null==s&&(s=h.get("triggerTooltip"));var f=(h=i?function(e,t,n,i,a,r){var o=t.getModel("axisPointer"),s={};xx(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],(function(e){s[e]=Ie.clone(o.get(e))})),s.snap="category"!==e.type&&!!r,"cross"===o.get("type")&&(s.type="line");var l=s.label||(s.label={});if(null==l.show&&(l.show=!1),"cross"===a){var u=o.get("label.show");if(l.show=null==u||u,!r){var c=s.lineStyle=o.get("crossStyle");c&&Ie.defaults(l,c.textStyle)}}return e.model.getModel("axisPointer",new bu(s,n,i))}(c,u,a,t,i,s):h).get("snap"),p=Ix(c.model),g=s||f||"category"===c.type,m=e.axesInfo[p]={key:p,axis:c,coordSys:n,axisPointerModel:h,triggerTooltip:s,involveSeries:g,snap:f,useHandle:Tx(h),seriesModels:[]};l[p]=m,e.seriesInvolved|=g;var v=function(e,t){for(var n=t.model,i=t.dim,a=0;a<e.length;a++){var r=e[a]||{};if(Sx(r[i+"AxisId"],n.id)||Sx(r[i+"AxisIndex"],n.componentIndex)||Sx(r[i+"AxisName"],n.name))return a}}(r,c);if(null!=v){var y=o[v]||(o[v]={axesInfo:{}});y.axesInfo[p]=m,y.mapper=r[v].mapper,m.linkGroup=y}}}}))}(n,e,t),n.seriesInvolved&&function(e,t){t.eachSeries((function(t){var n=t.coordinateSystem,i=t.get("tooltip.trigger",!0),a=t.get("tooltip.show",!0);n&&"none"!==i&&!1!==i&&"item"!==i&&!1!==a&&!1!==t.get("axisPointer.show",!0)&&xx(e.coordSysAxesInfo[Ix(n.model)],(function(e){var i=e.axis;n.getAxis(i.dim)===i&&(e.seriesModels.push(t),null==e.seriesDataCount&&(e.seriesDataCount=0),e.seriesDataCount+=t.getData().count())}))}),this)}(n,e),n},fixValue:function(e){var t=Mx(e);if(t){var n=t.axisPointerModel,i=t.axis.scale,a=n.option,r=n.get("status"),o=n.get("value");null!=o&&(o=i.parse(o));var s=Tx(n);null==r&&(a.status=s?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==o||o>l[1])&&(o=l[1]),o<l[0]&&(o=l[0]),a.value=o,s&&(a.status=t.axis.scale.isBlank()?"hide":"show")}},getAxisInfo:Mx,getAxisPointerModel:function(e){var t=Mx(e);return t&&t.axisPointerModel},makeKey:Ix},Dx=ry.extendComponentView({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(e,t,n,i){this.axisPointerClass&&Ax.fixValue(e),Dx.superApply(this,"render",arguments),Cx(this,e,t,n,i,!0)},updateAxisPointer:function(e,t,n,i,a){Cx(this,e,t,n,i,!1)},remove:function(e,t){var n=this._axisPointer;n&&n.remove(t),Dx.superApply(this,"remove",arguments)},dispose:function(e,t){Ox(this,t),Dx.superApply(this,"dispose",arguments)}});function Cx(e,t,n,i,a,r){var o=Dx.getAxisPointerClass(e.axisPointerClass);if(o){var s=Ax.getAxisPointerModel(t);s?(e._axisPointer||(e._axisPointer=new o)).render(t,s,i,r):Ox(e,i)}}function Ox(e,t,n){var i=e._axisPointer;i&&i.dispose(t,n),e._axisPointer=null}var kx=[];Dx.registerAxisPointerClass=function(e,t){kx[e]=t},Dx.getAxisPointerClass=function(e){return e&&kx[e]};var Lx=Dx;var Ex={layout:function(e,t,n){n=n||{};var i=e.coordinateSystem,a=t.axis,r={},o=a.getAxesOnZeroOf()[0],s=a.position,l=o?"onZero":s,u=a.dim,c=i.getRect(),h=[c.x,c.x+c.width,c.y,c.y+c.height],d={left:0,right:1,top:0,bottom:1,onZero:2},f=t.get("offset")||0,p="x"===u?[h[2]-f,h[3]+f]:[h[0]-f,h[1]+f];if(o){var g=o.toGlobalCoord(o.dataToCoord(0));p[d.onZero]=Math.max(Math.min(g,p[1]),p[0])}r.position=["y"===u?p[d[l]]:h[0],"x"===u?p[d[l]]:h[3]],r.rotation=Math.PI/2*("x"===u?0:1),r.labelDirection=r.tickDirection=r.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],r.labelOffset=o?p[d[s]]-p[d.onZero]:0,t.get("axisTick.inside")&&(r.tickDirection=-r.tickDirection),Ie.retrieve(n.labelInside,t.get("axisLabel.inside"))&&(r.labelDirection=-r.labelDirection);var m=t.get("axisLabel.rotate");return r.labelRotate="top"===l?-m:m,r.z2=1,r}};var Nx={rectCoordAxisBuildSplitArea:function(e,t,n,i){var a=n.axis;if(!a.scale.isBlank()){var r=n.getModel("splitArea"),o=r.getModel("areaStyle"),s=o.get("color"),l=i.coordinateSystem.getRect(),u=a.getTicksCoords({tickModel:r,clamp:!0});if(u.length){var c=s.length,h=e.__splitAreaColors,d=Ie.createHashMap(),f=0;if(h)for(var p=0;p<u.length;p++){var g=h.get(u[p].tickValue);if(null!=g){f=(g+(c-1)*p)%c;break}}var m=a.toGlobalCoord(u[0].coord),v=o.getAreaStyle();s=Ie.isArray(s)?s:[s];for(p=1;p<u.length;p++){var y,_,x,b,w=a.toGlobalCoord(u[p].coord);a.isHorizontal()?(y=m,_=l.y,x=w-y,b=l.height,m=y+x):(y=l.x,_=m,x=l.width,m=_+(b=w-_));var S=u[p-1].tickValue;null!=S&&d.set(S,f),t.add(new lu.Rect({anid:null!=S?"area_"+S:null,shape:{x:y,y:_,width:x,height:b},style:Ie.defaults({fill:s[f]},v),silent:!0})),f=(f+1)%c}e.__splitAreaColors=d}}},rectCoordAxisHandleRemove:function(e){e.__splitAreaColors=null}},Px=Nx.rectCoordAxisBuildSplitArea,Rx=Nx.rectCoordAxisHandleRemove,zx=["axisLine","axisTickLabel","axisName"],Bx=["splitArea","splitLine","minorSplitLine"],Vx=Lx.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(e,t,n,i){this.group.removeAll();var a=this._axisGroup;if(this._axisGroup=new lu.Group,this.group.add(this._axisGroup),e.get("show")){var r=e.getCoordSysModel(),o=Ex.layout(r,e),s=new _x(e,o);Ie.each(zx,s.add,s),this._axisGroup.add(s.getGroup()),Ie.each(Bx,(function(t){e.get(t+".show")&&this["_"+t](e,r)}),this),lu.groupTransition(a,this._axisGroup,e),Vx.superCall(this,"render",e,t,n,i)}},remove:function(){Rx(this)},_splitLine:function(e,t){var n=e.axis;if(!n.scale.isBlank()){var i=e.getModel("splitLine"),a=i.getModel("lineStyle"),r=a.get("color");r=Ie.isArray(r)?r:[r];for(var o=t.coordinateSystem.getRect(),s=n.isHorizontal(),l=0,u=n.getTicksCoords({tickModel:i}),c=[],h=[],d=a.getLineStyle(),f=0;f<u.length;f++){var p=n.toGlobalCoord(u[f].coord);s?(c[0]=p,c[1]=o.y,h[0]=p,h[1]=o.y+o.height):(c[0]=o.x,c[1]=p,h[0]=o.x+o.width,h[1]=p);var g=l++%r.length,m=u[f].tickValue;this._axisGroup.add(new lu.Line({anid:null!=m?"line_"+u[f].tickValue:null,subPixelOptimize:!0,shape:{x1:c[0],y1:c[1],x2:h[0],y2:h[1]},style:Ie.defaults({stroke:r[g]},d),silent:!0}))}}},_minorSplitLine:function(e,t){var n=e.axis,i=e.getModel("minorSplitLine").getModel("lineStyle"),a=t.coordinateSystem.getRect(),r=n.isHorizontal(),o=n.getMinorTicksCoords();if(o.length)for(var s=[],l=[],u=i.getLineStyle(),c=0;c<o.length;c++)for(var h=0;h<o[c].length;h++){var d=n.toGlobalCoord(o[c][h].coord);r?(s[0]=d,s[1]=a.y,l[0]=d,l[1]=a.y+a.height):(s[0]=a.x,s[1]=d,l[0]=a.x+a.width,l[1]=d),this._axisGroup.add(new lu.Line({anid:"minor_line_"+o[c][h].tickValue,subPixelOptimize:!0,shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:u,silent:!0}))}},_splitArea:function(e,t){Px(this,this._axisGroup,e,t)}});Vx.extend({type:"xAxis"}),Vx.extend({type:"yAxis"}),ry.extendComponentView({type:"grid",render:function(e,t){this.group.removeAll(),e.get("show")&&this.group.add(new lu.Rect({shape:e.coordinateSystem.getRect(),style:Ie.defaults({fill:e.get("backgroundColor")},e.getItemStyle()),silent:!0,z2:-1}))}}),ry.registerPreprocessor((function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})),ry.registerVisual(d_("line","circle","line")),ry.registerLayout(g_("line")),ry.registerProcessor(ry.PRIORITY.PROCESSOR.STATISTIC,y_("line"));var Hx=Yd.extend({type:"series.__base_bar__",getInitialData:function(e,t){return Yg(this.getSource(),this,{useEncodeDefaulter:!0})},getMarkerPosition:function(e){var t=this.coordinateSystem;if(t){var n=t.dataToPoint(t.clampData(e)),i=this.getData(),a=i.getLayout("offset"),r=i.getLayout("size");return n[t.getBaseAxis().isHorizontal()?0:1]+=a+r/2,n}return[NaN,NaN]},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",itemStyle:{},emphasis:{}}}),Yx=(Hx.extend({type:"series.bar",dependencies:["grid","polar"],brushSelector:"rect",getProgressive:function(){return!!this.get("large")&&this.get("progressive")},getProgressiveThreshold:function(){var e=this.get("progressiveThreshold"),t=this.get("largeThreshold");return t>e&&(e=t),e},defaultOption:{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1}}}),sy.getDefaultLabel);function Fx(e,t){"outside"===e.textPosition&&(e.textPosition=t)}var Gx={setLabel:function(e,t,n,i,a,r,o){var s=n.getModel("label"),l=n.getModel("emphasis.label");lu.setLabelStyle(e,t,s,l,{labelFetcher:a,labelDataIndex:r,defaultText:Yx(a.getData(),r),isRectText:!0,autoColor:i}),Fx(e),Fx(t)}},Wx=Or([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),jx={getBarItemStyle:function(e){var t=Wx(this,e);if(this.getBorderLineDash){var n=this.getBorderLineDash();n&&(t.lineDash=n)}return t}},Ux=(0,lu.extendShape)({type:"sausage",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},buildPath:function(e,t){var n=t.cx,i=t.cy,a=Math.max(t.r0||0,0),r=Math.max(t.r,0),o=.5*(r-a),s=a+o,l=t.startAngle,u=t.endAngle,c=t.clockwise,h=Math.cos(l),d=Math.sin(l),f=Math.cos(u),p=Math.sin(u);(c?u-l<2*Math.PI:l-u<2*Math.PI)&&(e.moveTo(h*a+n,d*a+i),e.arc(h*s+n,d*s+i,o,-Math.PI+l,l,!c)),e.arc(n,i,r,l,u,!c),e.moveTo(f*r+n,p*r+i),e.arc(f*s+n,p*s+i,o,u-2*Math.PI,u-Math.PI,!c),0!==a&&(e.arc(n,i,a,u,l,c),e.moveTo(h*a+n,p*a+i)),e.closePath()}}),Zx=Gx.setLabel,Xx=uf.throttle,qx=Qy.createClipPath,Kx=["itemStyle","barBorderWidth"],Qx=[0,0];Ie.extend(bu.prototype,jx);ry.extendChartView({type:"bar",render:function(e,t,n){this._updateDrawMode(e);var i=e.get("coordinateSystem");return"cartesian2d"!==i&&"polar"!==i||(this._isLargeDraw?this._renderLarge(e,t,n):this._renderNormal(e,t,n)),this.group},incrementalPrepareRender:function(e,t,n){this._clear(),this._updateDrawMode(e)},incrementalRender:function(e,t,n,i){this._incrementalRenderLarge(e,t)},_updateDrawMode:function(e){var t=e.pipelineContext.large;(null==this._isLargeDraw||t^this._isLargeDraw)&&(this._isLargeDraw=t,this._clear())},_renderNormal:function(e,t,n){var i,a=this.group,r=e.getData(),o=this._data,s=e.coordinateSystem,l=s.getBaseAxis();"cartesian2d"===s.type?i=l.isHorizontal():"polar"===s.type&&(i="angle"===l.dim);var u=e.isAnimationEnabled()?e:null,c=e.get("clip",!0),h=function(e,t){var n=e.getArea&&e.getArea();if("cartesian2d"===e.type){var i=e.getBaseAxis();if("category"!==i.type||!i.onBand){var a=t.getLayout("bandWidth");i.isHorizontal()?(n.x-=a,n.width+=2*a):(n.y-=a,n.height+=2*a)}}return n}(s,r);a.removeClipPath();var d=e.get("roundCap",!0),f=e.get("showBackground",!0),p=e.getModel("backgroundStyle"),g=p.get("barBorderRadius")||0,m=[],v=this._backgroundEls||[];r.diff(o).add((function(t){var n=r.getItemModel(t),o=ab[s.type](r,t,n);if(f){var l=ab[s.type](r,t),v=function(e,t,n){return new("polar"===e.type?lu.Sector:lu.Rect)({shape:cb(t,n,e),silent:!0,z2:0})}(s,i,l);v.useStyle(p.getBarItemStyle()),"cartesian2d"===s.type&&v.setShape("r",g),m[t]=v}if(r.hasValue(t)){if(c)if(eb[s.type](h,o))return void a.remove(y);var y=tb[s.type](t,o,i,u,!1,d);r.setItemGraphicEl(t,y),a.add(y),ob(y,r,t,n,o,e,i,"polar"===s.type)}})).update((function(t,n){var l=r.getItemModel(t),y=ab[s.type](r,t,l);if(f){var _=v[n];_.useStyle(p.getBarItemStyle()),"cartesian2d"===s.type&&_.setShape("r",g),m[t]=_;var x=ab[s.type](r,t),b=cb(i,x,s);lu.updateProps(_,{shape:b},u,t)}var w=o.getItemGraphicEl(n);if(r.hasValue(t)){if(c)if(eb[s.type](h,y))return void a.remove(w);w?lu.updateProps(w,{shape:y},u,t):w=tb[s.type](t,y,i,u,!0,d),r.setItemGraphicEl(t,w),a.add(w),ob(w,r,t,l,y,e,i,"polar"===s.type)}else a.remove(w)})).remove((function(e){var t=o.getItemGraphicEl(e);"cartesian2d"===s.type?t&&nb(e,u,t):t&&ib(e,u,t)})).execute();var y=this._backgroundGroup||(this._backgroundGroup=new Fn);y.removeAll();for(var _=0;_<m.length;++_)y.add(m[_]);a.add(y),this._backgroundEls=m,this._data=r},_renderLarge:function(e,t,n){this._clear(),lb(e,this.group);var i=e.get("clip",!0)?qx(e.coordinateSystem,!1,e):null;i?this.group.setClipPath(i):this.group.removeClipPath()},_incrementalRenderLarge:function(e,t){this._removeBackground(),lb(t,this.group,!0)},dispose:Ie.noop,remove:function(e){this._clear(e)},_clear:function(e){var t=this.group,n=this._data;e&&e.get("animation")&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl((function(t){"sector"===t.type?ib(t.dataIndex,e,t):nb(t.dataIndex,e,t)}))):t.removeAll(),this._data=null},_removeBackground:function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null}});var $x=Math.max,Jx=Math.min,eb={cartesian2d:function(e,t){var n=t.width<0?-1:1,i=t.height<0?-1:1;n<0&&(t.x+=t.width,t.width=-t.width),i<0&&(t.y+=t.height,t.height=-t.height);var a=$x(t.x,e.x),r=Jx(t.x+t.width,e.x+e.width),o=$x(t.y,e.y),s=Jx(t.y+t.height,e.y+e.height);t.x=a,t.y=o,t.width=r-a,t.height=s-o;var l=t.width<0||t.height<0;return n<0&&(t.x+=t.width,t.width=-t.width),i<0&&(t.y+=t.height,t.height=-t.height),l},polar:function(e){return!1}},tb={cartesian2d:function(e,t,n,i,a){var r=new lu.Rect({shape:Ie.extend({},t),z2:1});if(r.name="item",i){var o=n?"height":"width",s={};r.shape[o]=0,s[o]=t[o],lu[a?"updateProps":"initProps"](r,{shape:s},i,e)}return r},polar:function(e,t,n,i,a,r){var o=t.startAngle<t.endAngle,s=new(!n&&r?Ux:lu.Sector)({shape:Ie.defaults({clockwise:o},t),z2:1});if(s.name="item",i){var l=n?"r":"endAngle",u={};s.shape[l]=n?0:t.startAngle,u[l]=t[l],lu[a?"updateProps":"initProps"](s,{shape:u},i,e)}return s}};function nb(e,t,n){n.style.text=null,lu.updateProps(n,{shape:{width:0}},t,e,(function(){n.parent&&n.parent.remove(n)}))}function ib(e,t,n){n.style.text=null,lu.updateProps(n,{shape:{r:n.shape.r0}},t,e,(function(){n.parent&&n.parent.remove(n)}))}var ab={cartesian2d:function(e,t,n){var i=e.getItemLayout(t),a=n?function(e,t){var n=e.get(Kx)||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(n,i,a)}(n,i):0,r=i.width>0?1:-1,o=i.height>0?1:-1;return{x:i.x+r*a/2,y:i.y+o*a/2,width:i.width-r*a,height:i.height-o*a}},polar:function(e,t,n){var i=e.getItemLayout(t);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle}}};function rb(e){return null!=e.startAngle&&null!=e.endAngle&&e.startAngle===e.endAngle}function ob(e,t,n,i,a,r,o,s){var l=t.getItemVisual(n,"color"),u=t.getItemVisual(n,"opacity"),c=t.getVisual("borderColor"),h=i.getModel("itemStyle"),d=i.getModel("emphasis.itemStyle").getBarItemStyle();s||e.setShape("r",h.get("barBorderRadius")||0),e.useStyle(Ie.defaults({stroke:rb(a)?"none":c,fill:rb(a)?"none":l,opacity:u},h.getBarItemStyle()));var f=i.getShallow("cursor");f&&e.attr("cursor",f);var p=o?a.height>0?"bottom":"top":a.width>0?"left":"right";s||Zx(e.style,d,i,l,r,n,p),rb(a)&&(d.fill=d.stroke="none"),lu.setHoverStyle(e,d)}var sb=jo.extend({type:"largeBar",shape:{points:[]},buildPath:function(e,t){for(var n=t.points,i=this.__startPoint,a=this.__baseDimIdx,r=0;r<n.length;r+=2)i[a]=n[r+a],e.moveTo(i[0],i[1]),e.lineTo(n[r],n[r+1])}});function lb(e,t,n){var i=e.getData(),a=[],r=i.getLayout("valueAxisHorizontal")?1:0;a[1-r]=i.getLayout("valueAxisStart");var o=i.getLayout("largeDataIndices"),s=i.getLayout("barWidth"),l=e.getModel("backgroundStyle");if(e.get("showBackground",!0)){var u=i.getLayout("largeBackgroundPoints"),c=[];c[1-r]=i.getLayout("backgroundStart");var h=new sb({shape:{points:u},incremental:!!n,__startPoint:c,__baseDimIdx:r,__largeDataIndices:o,__barWidth:s,silent:!0,z2:0});!function(e,t,n){var i=t.get("borderColor")||t.get("color"),a=t.getItemStyle(["color","borderColor"]);e.useStyle(a),e.style.fill=null,e.style.stroke=i,e.style.lineWidth=n.getLayout("barWidth")}(h,l,i),t.add(h)}var d=new sb({shape:{points:i.getLayout("largePoints")},incremental:!!n,__startPoint:a,__baseDimIdx:r,__largeDataIndices:o,__barWidth:s});t.add(d),function(e,t,n){var i=n.getVisual("borderColor")||n.getVisual("color"),a=t.getModel("itemStyle").getItemStyle(["color","borderColor"]);e.useStyle(a),e.style.fill=null,e.style.stroke=i,e.style.lineWidth=n.getLayout("barWidth")}(d,e,i),d.seriesIndex=e.seriesIndex,e.get("silent")||(d.on("mousedown",ub),d.on("mousemove",ub))}var ub=Xx((function(e){var t=function(e,t,n){var i=e.__baseDimIdx,a=1-i,r=e.shape.points,o=e.__largeDataIndices,s=Math.abs(e.__barWidth/2),l=e.__startPoint[a];Qx[0]=t,Qx[1]=n;for(var u=Qx[i],c=Qx[1-i],h=u-s,d=u+s,f=0,p=r.length/2;f<p;f++){var g=2*f,m=r[g+i],v=r[g+a];if(m>=h&&m<=d&&(l<=v?c>=l&&c<=v:c>=v&&c<=l))return o[f]}return-1}(this,e.offsetX,e.offsetY);this.dataIndex=t>=0?t:null}),30,!1);function cb(e,t,n){var i,a="polar"===n.type;return i=a?n.getArea():n.grid.getRect(),a?{cx:i.cx,cy:i.cy,r0:e?i.r0:t.r0,r:e?i.r:t.r,startAngle:e?t.startAngle:0,endAngle:e?t.endAngle:2*Math.PI}:{x:e?t.x:i.x,y:e?i.y:t.y,width:e?t.width:i.width,height:e?i.height:t.height}}var hb=wm.layout,db=wm.largeLayout;ry.registerLayout(ry.PRIORITY.VISUAL.LAYOUT,Ie.curry(hb,"bar")),ry.registerLayout(ry.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,db),ry.registerVisual({seriesType:"bar",reset:function(e){e.getData().setVisual("legendSymbol","roundRect")}});var fb=Ie.extend,pb=Ie.isArray;var gb=function(e,t,n){t=pb(t)&&{coordDimensions:t}||fb({},t);var i=e.getSource(),a=Mg(i,t),r=new cg(a,e);return r.initData(i,n),r},mb={updateSelectedMap:function(e){this._targetList=Ie.isArray(e)?e.slice():[],this._selectTargetMap=Ie.reduce(e||[],(function(e,t){return e.set(t.name,t),e}),Ie.createHashMap())},select:function(e,t){var n=null!=t?this._targetList[t]:this._selectTargetMap.get(e);"single"===this.get("selectedMode")&&this._selectTargetMap.each((function(e){e.selected=!1})),n&&(n.selected=!0)},unSelect:function(e,t){var n=null!=t?this._targetList[t]:this._selectTargetMap.get(e);n&&(n.selected=!1)},toggleSelected:function(e,t){var n=null!=t?this._targetList[t]:this._selectTargetMap.get(e);if(null!=n)return this[n.selected?"unSelect":"select"](e,t),n.selected},isSelected:function(e,t){var n=null!=t?this._targetList[t]:this._selectTargetMap.get(e);return n&&n.selected}};var vb=function(e,t){this.getAllNames=function(){var e=t();return e.mapArray(e.getName)},this.containName=function(e){return t().indexOfName(e)>=0},this.indexOfName=function(t){return e().indexOfName(t)},this.getItemVisual=function(t,n){return e().getItemVisual(t,n)}},yb=Au.getPercentWithPrecision,_b=ud.retrieveRawAttr,xb=Hc.makeSeriesEncodeForNameBased,bb=ry.extendSeriesModel({type:"series.pie",init:function(e){bb.superApply(this,"init",arguments),this.legendVisualProvider=new vb(Ie.bind(this.getData,this),Ie.bind(this.getRawData,this)),this.updateSelectedMap(this._createSelectableList()),this._defaultLabelLine(e)},mergeOption:function(e){bb.superCall(this,"mergeOption",e),this.updateSelectedMap(this._createSelectableList())},getInitialData:function(e,t){return gb(this,{coordDimensions:["value"],encodeDefaulter:Ie.curry(xb,this)})},_createSelectableList:function(){for(var e=this.getRawData(),t=e.mapDimension("value"),n=[],i=0,a=e.count();i<a;i++)n.push({name:e.getName(i),value:e.get(t,i),selected:_b(e,i,"selected")});return n},getDataParams:function(e){var t=this.getData(),n=bb.superCall(this,"getDataParams",e),i=[];return t.each(t.mapDimension("value"),(function(e){i.push(e)})),n.percent=yb(i,e,t.hostModel.get("percentPrecision")),n.$vars.push("percent"),n},_defaultLabelLine:function(e){Sr.defaultEmphasis(e,"labelLine",["show"]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,hoverOffset:10,avoidLabelOverlap:!0,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:!1,show:!0,position:"outer",alignTo:"none",margin:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1},animationType:"expansion",animationTypeUpdate:"transition",animationEasing:"cubicOut"}});function wb(e,t,n,i){var a=t.getData(),r=this.dataIndex,o=a.getName(r),s=t.get("selectedOffset");i.dispatchAction({type:"pieToggleSelect",from:e,name:o,seriesId:t.id}),a.each((function(e){Sb(a.getItemGraphicEl(e),a.getItemLayout(e),t.isSelected(a.getName(e)),s,n)}))}function Sb(e,t,n,i,a){var r=(t.startAngle+t.endAngle)/2,o=n?i:0,s=[Math.cos(r)*o,Math.sin(r)*o];a?e.animate().when(200,{position:s}).start("bounceOut"):e.attr("position",s)}function Mb(e,t){lu.Group.call(this);var n=new lu.Sector({z2:2}),i=new lu.Polyline,a=new lu.Text;this.add(n),this.add(i),this.add(a),this.updateData(e,t,!0)}Ie.mixin(bb,mb);var Tb=Mb.prototype;Tb.updateData=function(e,t,n){var i=this.childAt(0),a=this.childAt(1),r=this.childAt(2),o=e.hostModel,s=e.getItemModel(t),l=e.getItemLayout(t),u=Ie.extend({},l);u.label=null;var c=o.getShallow("animationTypeUpdate");n?(i.setShape(u),"scale"===o.getShallow("animationType")?(i.shape.r=l.r0,lu.initProps(i,{shape:{r:l.r}},o,t)):(i.shape.endAngle=l.startAngle,lu.updateProps(i,{shape:{endAngle:l.endAngle}},o,t))):"expansion"===c?i.setShape(u):lu.updateProps(i,{shape:u},o,t);var h=e.getItemVisual(t,"color");i.useStyle(Ie.defaults({lineJoin:"bevel",fill:h},s.getModel("itemStyle").getItemStyle())),i.hoverStyle=s.getModel("emphasis.itemStyle").getItemStyle();var d=s.getShallow("cursor");d&&i.attr("cursor",d),Sb(this,e.getItemLayout(t),o.isSelected(e.getName(t)),o.get("selectedOffset"),o.get("animation"));var f=!n&&"transition"===c;this._updateLabel(e,t,f),this.highDownOnUpdate=o.get("silent")?null:function(e,t){var n=o.isAnimationEnabled()&&s.get("hoverAnimation");"emphasis"===t?(a.ignore=a.hoverIgnore,r.ignore=r.hoverIgnore,n&&(i.stopAnimation(!0),i.animateTo({shape:{r:l.r+o.get("hoverOffset")}},300,"elasticOut"))):(a.ignore=a.normalIgnore,r.ignore=r.normalIgnore,n&&(i.stopAnimation(!0),i.animateTo({shape:{r:l.r}},300,"elasticOut")))},lu.setHoverStyle(this)},Tb._updateLabel=function(e,t,n){var i=this.childAt(1),a=this.childAt(2),r=e.hostModel,o=e.getItemModel(t),s=e.getItemLayout(t).label,l=e.getItemVisual(t,"color");if(!s||isNaN(s.x)||isNaN(s.y))a.ignore=a.normalIgnore=a.hoverIgnore=i.ignore=i.normalIgnore=i.hoverIgnore=!0;else{var u={points:s.linePoints||[[s.x,s.y],[s.x,s.y],[s.x,s.y]]},c={x:s.x,y:s.y};n?(lu.updateProps(i,{shape:u},r,t),lu.updateProps(a,{style:c},r,t)):(i.attr({shape:u}),a.attr({style:c})),a.attr({rotation:s.rotation,origin:[s.x,s.y],z2:10});var h=o.getModel("label"),d=o.getModel("emphasis.label"),f=o.getModel("labelLine"),p=o.getModel("emphasis.labelLine");l=e.getItemVisual(t,"color");lu.setLabelStyle(a.style,a.hoverStyle={},h,d,{labelFetcher:e.hostModel,labelDataIndex:t,defaultText:s.text,autoColor:l,useInsideStyle:!!s.inside},{textAlign:s.textAlign,textVerticalAlign:s.verticalAlign,opacity:e.getItemVisual(t,"opacity")}),a.ignore=a.normalIgnore=!h.get("show"),a.hoverIgnore=!d.get("show"),i.ignore=i.normalIgnore=!f.get("show"),i.hoverIgnore=!p.get("show"),i.setStyle({stroke:l,opacity:e.getItemVisual(t,"opacity")}),i.setStyle(f.getModel("lineStyle").getLineStyle()),i.hoverStyle=p.getModel("lineStyle").getLineStyle();var g=f.get("smooth");g&&!0===g&&(g=.4),i.setShape({smooth:g})}},Ie.inherits(Mb,lu.Group);rf.extend({type:"pie",init:function(){var e=new lu.Group;this._sectorGroup=e},render:function(e,t,n,i){if(!i||i.from!==this.uid){var a=e.getData(),r=this._data,o=this.group,s=t.get("animation"),l=!r,u=e.get("animationType"),c=e.get("animationTypeUpdate"),h=Ie.curry(wb,this.uid,e,s,n),d=e.get("selectedMode");if(a.diff(r).add((function(e){var t=new Mb(a,e);l&&"scale"!==u&&t.eachChild((function(e){e.stopAnimation(!0)})),d&&t.on("click",h),a.setItemGraphicEl(e,t),o.add(t)})).update((function(e,t){var n=r.getItemGraphicEl(t);l||"transition"===c||n.eachChild((function(e){e.stopAnimation(!0)})),n.updateData(a,e),n.off("click"),d&&n.on("click",h),o.add(n),a.setItemGraphicEl(e,n)})).remove((function(e){var t=r.getItemGraphicEl(e);o.remove(t)})).execute(),s&&a.count()>0&&(l?"scale"!==u:"transition"!==c)){for(var f=a.getItemLayout(0),p=1;isNaN(f.startAngle)&&p<a.count();++p)f=a.getItemLayout(p);var g=Math.max(n.getWidth(),n.getHeight())/2,m=Ie.bind(o.removeClipPath,o);o.setClipPath(this._createClipPath(f.cx,f.cy,g,f.startAngle,f.clockwise,m,e,l))}else o.removeClipPath();this._data=a}},dispose:function(){},_createClipPath:function(e,t,n,i,a,r,o,s){var l=new lu.Sector({shape:{cx:e,cy:t,r0:0,r:n,startAngle:i,endAngle:i,clockwise:a}});return(s?lu.initProps:lu.updateProps)(l,{shape:{endAngle:i+(a?1:-1)*Math.PI*2}},o,r),l},containPoint:function(e,t){var n=t.getData().getItemLayout(0);if(n){var i=e[0]-n.cx,a=e[1]-n.cy,r=Math.sqrt(i*i+a*a);return r<=n.r&&r>=n.r0}}});var Ib=function(e,t){Ie.each(t,(function(t){t.update="updateView",ry.registerAction(t,(function(n,i){var a={};return i.eachComponent({mainType:"series",subType:e,query:n},(function(e){e[t.method]&&e[t.method](n.name,n.dataIndex);var i=e.getData();i.each((function(t){var n=i.getName(t);a[n]=e.isSelected(n)||!1}))})),{name:n.name,selected:a,seriesId:n.seriesId}}))}))},Ab=Ie.createHashMap;var Db=function(e){return{getTargetSeries:function(t){var n={},i=Ab();return t.eachSeriesByType(e,(function(e){e.__paletteScope=n,i.set(e.uid,e)})),i},reset:function(e,t){var n=e.getRawData(),i={},a=e.getData();a.each((function(e){var t=a.getRawIndex(e);i[t]=e})),n.each((function(t){var r,o=i[t],s=null!=o&&a.getItemVisual(o,"color",!0),l=null!=o&&a.getItemVisual(o,"borderColor",!0);if(s&&l||(r=n.getItemModel(t)),!s){var u=r.get("itemStyle.color")||e.getColorFromPalette(n.getName(t)||t+"",e.__paletteScope,n.count());null!=o&&a.setItemVisual(o,"color",u)}if(!l){var c=r.get("itemStyle.borderColor");null!=o&&a.setItemVisual(o,"borderColor",c)}}))}}},Cb=Au.parsePercent,Ob=Math.PI/180;function kb(e,t,n,i,a,r,o,s,l,u){function c(t,n,i,a){for(var r=t;r<n&&!(e[r].y+i>l+o);r++)if(e[r].y+=i,r>t&&r+1<n&&e[r+1].y>e[r].y+e[r].height)return void h(r,i/2);h(n-1,i/2)}function h(t,n){for(var i=t;i>=0&&!(e[i].y-n<l)&&(e[i].y-=n,!(i>0&&e[i].y>e[i-1].y+e[i-1].height));i--);}function d(e,t,n,i,a,r){for(var o=t?Number.MAX_VALUE:0,s=0,l=e.length;s<l;s++)if("none"===e[s].labelAlignTo){var u=Math.abs(e[s].y-i),c=e[s].len,h=e[s].len2,d=u<a+c?Math.sqrt((a+c+h)*(a+c+h)-u*u):Math.abs(e[s].x-n);t&&d>=o&&(d=o-10),!t&&d<=o&&(d=o+10),e[s].x=n+d*r,o=d}}e.sort((function(e,t){return e.y-t.y}));for(var f,p=0,g=e.length,m=[],v=[],y=0;y<g;y++){if("outer"===e[y].position&&"labelLine"===e[y].labelAlignTo){var _=e[y].x-u;e[y].linePoints[1][0]+=_,e[y].x=u}(f=e[y].y-p)<0&&c(y,g,-f),p=e[y].y+e[y].height}o-p<0&&h(g-1,p-o);for(y=0;y<g;y++)e[y].y>=n?v.push(e[y]):m.push(e[y]);d(m,!1,t,n,i,a),d(v,!0,t,n,i,a)}function Lb(e){return"center"===e.position}var Eb=function(e,t,n,i,a,r){var o,s,l=e.getData(),u=[],c=!1,h=(e.get("minShowLabelAngle")||0)*Ob;l.each((function(i){var r=l.getItemLayout(i),d=l.getItemModel(i),f=d.getModel("label"),p=f.get("position")||d.get("emphasis.label.position"),g=f.get("distanceToLabelLine"),m=f.get("alignTo"),v=Cb(f.get("margin"),n),y=f.get("bleedMargin"),_=f.getFont(),x=d.getModel("labelLine"),b=x.get("length");b=Cb(b,n);var w=x.get("length2");if(w=Cb(w,n),!(r.angle<h)){var S,M,T,I,A=(r.startAngle+r.endAngle)/2,D=Math.cos(A),C=Math.sin(A);o=r.cx,s=r.cy;var O,k=e.getFormattedLabel(i,"normal")||l.getName(i),L=Wi.getBoundingRect(k,_,I,"top"),E="inside"===p||"inner"===p;if("center"===p)S=r.cx,M=r.cy,I="center";else{var N=(E?(r.r+r.r0)/2*D:r.r*D)+o,P=(E?(r.r+r.r0)/2*C:r.r*C)+s;if(S=N+3*D,M=P+3*C,!E){var R=N+D*(b+t-r.r),z=P+C*(b+t-r.r),B=R+(D<0?-1:1)*w;S="edge"===m?D<0?a+v:a+n-v:B+(D<0?-g:g),M=z,T=[[N,P],[R,z],[B,z]]}I=E?"center":"edge"===m?D>0?"right":"left":D>0?"left":"right"}var V=f.get("rotate");O="number"==typeof V?V*(Math.PI/180):V?D<0?-A+Math.PI:-A:0,c=!!O,r.label={x:S,y:M,position:p,height:L.height,len:b,len2:w,linePoints:T,textAlign:I,verticalAlign:"middle",rotation:O,inside:E,labelDistance:g,labelAlignTo:m,labelMargin:v,bleedMargin:y,textRect:L,text:k,font:_},E||u.push(r.label)}})),!c&&e.get("avoidLabelOverlap")&&function(e,t,n,i,a,r,o,s){for(var l=[],u=[],c=Number.MAX_VALUE,h=-Number.MAX_VALUE,d=0;d<e.length;d++)Lb(e[d])||(e[d].x<t?(c=Math.min(c,e[d].x),l.push(e[d])):(h=Math.max(h,e[d].x),u.push(e[d])));for(kb(u,t,n,i,1,0,r,0,s,h),kb(l,t,n,i,-1,0,r,0,s,c),d=0;d<e.length;d++){var f=e[d];if(!Lb(f)){var p=f.linePoints;if(p){var g,m="edge"===f.labelAlignTo,v=f.textRect.width;(g=m?f.x<t?p[2][0]-f.labelDistance-o-f.labelMargin:o+a-f.labelMargin-p[2][0]-f.labelDistance:f.x<t?f.x-o-f.bleedMargin:o+a-f.x-f.bleedMargin)<f.textRect.width&&(f.text=Wi.truncateText(f.text,g,f.font),"edge"===f.labelAlignTo&&(v=Wi.getWidth(f.text,f.font)));var y=p[1][0]-p[2][0];m?f.x<t?p[2][0]=o+f.labelMargin+v+f.labelDistance:p[2][0]=o+a-f.labelMargin-v-f.labelDistance:(f.x<t?p[2][0]=f.x+f.labelDistance:p[2][0]=f.x-f.labelDistance,p[1][0]=p[2][0]+y),p[1][1]=p[2][1]=f.y}}}}(u,o,s,t,n,i,a,r)},Nb=Au.parsePercent,Pb=Au.linearMap,Rb=2*Math.PI,zb=Math.PI/180;var Bb=function(e,t,n,i){t.eachSeriesByType(e,(function(e){var t=e.getData(),i=t.mapDimension("value"),a=function(e,t){return Uu.getLayoutRect(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}(e,n),r=e.get("center"),o=e.get("radius");Ie.isArray(o)||(o=[0,o]),Ie.isArray(r)||(r=[r,r]);var s=Nb(a.width,n.getWidth()),l=Nb(a.height,n.getHeight()),u=Math.min(s,l),c=Nb(r[0],s)+a.x,h=Nb(r[1],l)+a.y,d=Nb(o[0],u/2),f=Nb(o[1],u/2),p=-e.get("startAngle")*zb,g=e.get("minAngle")*zb,m=0;t.each(i,(function(e){!isNaN(e)&&m++}));var v=t.getSum(i),y=Math.PI/(v||m)*2,_=e.get("clockwise"),x=e.get("roseType"),b=e.get("stillShowZeroSum"),w=t.getDataExtent(i);w[0]=0;var S=Rb,M=0,T=p,I=_?1:-1;if(t.each(i,(function(e,n){var i;if(isNaN(e))t.setItemLayout(n,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:_,cx:c,cy:h,r0:d,r:x?NaN:f,viewRect:a});else{(i="area"!==x?0===v&&b?y:e*y:Rb/m)<g?(i=g,S-=g):M+=e;var r=T+I*i;t.setItemLayout(n,{angle:i,startAngle:T,endAngle:r,clockwise:_,cx:c,cy:h,r0:d,r:x?Pb(e,w,[d,f]):f,viewRect:a}),T=r}})),S<Rb&&m)if(S<=.001){var A=Rb/m;t.each(i,(function(e,n){if(!isNaN(e)){var i=t.getItemLayout(n);i.angle=A,i.startAngle=p+I*n*A,i.endAngle=p+I*(n+1)*A}}))}else y=S/M,T=p,t.each(i,(function(e,n){if(!isNaN(e)){var i=t.getItemLayout(n),a=i.angle===g?g:e*y;i.startAngle=T,i.endAngle=T+I*a,T+=I*a}}));Eb(e,f,a.width,a.height,a.x,a.y)}))};var Vb=function(e){return{seriesType:e,reset:function(e,t){var n=t.findComponents({mainType:"legend"});if(n&&n.length){var i=e.getData();i.filterSelf((function(e){for(var t=i.getName(e),a=0;a<n.length;a++)if(!n[a].isSelected(t))return!1;return!0}))}}}};Ib("pie",[{type:"pieToggleSelect",event:"pieselectchanged",method:"toggleSelected"},{type:"pieSelect",event:"pieselected",method:"select"},{type:"pieUnSelect",event:"pieunselected",method:"unSelect"}]),ry.registerVisual(Db("pie")),ry.registerLayout(Ie.curry(Bb,"pie")),ry.registerProcessor(Vb("pie"));Yd.extend({type:"series.scatter",dependencies:["grid","polar","geo","singleAxis","calendar"],getInitialData:function(e,t){return Yg(this.getSource(),this,{useEncodeDefaulter:!0})},brushSelector:"point",getProgressive:function(){var e=this.option.progressive;return null==e?this.option.large?5e3:this.get("progressive"):e},getProgressiveThreshold:function(){var e=this.option.progressiveThreshold;return null==e?this.option.large?1e4:this.get("progressiveThreshold"):e},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},clip:!0}});var Hb=ov.createSymbol,Yb=lu.extendShape({shape:{points:null},symbolProxy:null,softClipShape:null,buildPath:function(e,t){var n=t.points,i=t.size,a=this.symbolProxy,r=a.shape;if(!((e.getContext?e.getContext():e)&&i[0]<4))for(var o=0;o<n.length;){var s=n[o++],l=n[o++];isNaN(s)||isNaN(l)||(this.softClipShape&&!this.softClipShape.contain(s,l)||(r.x=s-i[0]/2,r.y=l-i[1]/2,r.width=i[0],r.height=i[1],a.buildPath(e,r,!0)))}},afterBrush:function(e){var t=this.shape,n=t.points,i=t.size;if(i[0]<4){this.setTransform(e);for(var a=0;a<n.length;){var r=n[a++],o=n[a++];isNaN(r)||isNaN(o)||(this.softClipShape&&!this.softClipShape.contain(r,o)||e.fillRect(r-i[0]/2,o-i[1]/2,i[0],i[1]))}this.restoreTransform(e)}},findDataIndex:function(e,t){for(var n=this.shape,i=n.points,a=n.size,r=Math.max(a[0],4),o=Math.max(a[1],4),s=i.length/2-1;s>=0;s--){var l=2*s,u=i[l]-r/2,c=i[l+1]-o/2;if(e>=u&&t>=c&&e<=u+r&&t<=c+o)return s}return-1}});function Fb(){this.group=new lu.Group}var Gb=Fb.prototype;Gb.isPersistent=function(){return!this._incremental},Gb.updateData=function(e,t){this.group.removeAll();var n=new Yb({rectHover:!0,cursor:"default"});n.setShape({points:e.getLayout("symbolPoints")}),this._setCommon(n,e,!1,t),this.group.add(n),this._incremental=null},Gb.updateLayout=function(e){if(!this._incremental){var t=e.getLayout("symbolPoints");this.group.eachChild((function(e){if(null!=e.startIndex){var n=2*(e.endIndex-e.startIndex),i=4*e.startIndex*2;t=new Float32Array(t.buffer,i,n)}e.setShape("points",t)}))}},Gb.incrementalPrepareUpdate=function(e){this.group.removeAll(),this._clearIncremental(),e.count()>2e6?(this._incremental||(this._incremental=new sl({silent:!0})),this.group.add(this._incremental)):this._incremental=null},Gb.incrementalUpdate=function(e,t,n){var i;this._incremental?(i=new Yb,this._incremental.addDisplayable(i,!0)):((i=new Yb({rectHover:!0,cursor:"default",startIndex:e.start,endIndex:e.end})).incremental=!0,this.group.add(i)),i.setShape({points:t.getLayout("symbolPoints")}),this._setCommon(i,t,!!this._incremental,n)},Gb._setCommon=function(e,t,n,i){var a=t.hostModel;i=i||{};var r=t.getVisual("symbolSize");e.setShape("size",r instanceof Array?r:[r,r]),e.softClipShape=i.clipShape||null,e.symbolProxy=Hb(t.getVisual("symbol"),0,0,0,0),e.setColor=e.symbolProxy.setColor;var o=e.shape.size[0]<4;e.useStyle(a.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var s=t.getVisual("color");s&&e.setColor(s),n||(e.seriesIndex=a.seriesIndex,e.on("mousemove",(function(t){e.dataIndex=null;var n=e.findDataIndex(t.offsetX,t.offsetY);n>=0&&(e.dataIndex=n+(e.startIndex||0))})))},Gb.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},Gb._clearIncremental=function(){var e=this._incremental;e&&e.clearDisplaybles()};var Wb=Fb;function jb(e,t,n){Yv.call(this,e,t,n),this.type="value",this.angle=0,this.name="",this.model}ry.extendChartView({type:"scatter",render:function(e,t,n){var i=e.getData();this._updateSymbolDraw(i,e).updateData(i,{clipShape:this._getClipShape(e)}),this._finished=!0},incrementalPrepareRender:function(e,t,n){var i=e.getData();this._updateSymbolDraw(i,e).incrementalPrepareUpdate(i),this._finished=!1},incrementalRender:function(e,t,n){this._symbolDraw.incrementalUpdate(e,t.getData(),{clipShape:this._getClipShape(t)}),this._finished=e.end===t.getData().count()},updateTransform:function(e,t,n){var i=e.getData();if(this.group.dirty(),!this._finished||i.count()>1e4||!this._symbolDraw.isPersistent())return{update:!0};var a=g_().reset(e);a.progress&&a.progress({start:0,end:i.count()},i),this._symbolDraw.updateLayout(i)},_getClipShape:function(e){var t=e.coordinateSystem,n=t&&t.getArea&&t.getArea();return e.get("clip",!0)?n:null},_updateSymbolDraw:function(e,t){var n=this._symbolDraw,i=t.pipelineContext.large;return n&&i===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=i?new Wb:new Dy,this._isLargeDraw=i,this.group.removeAll()),this.group.add(n.group),n},remove:function(e,t){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},dispose:function(){}}),ry.registerVisual(d_("scatter","circle")),ry.registerLayout(g_("scatter")),Ie.inherits(jb,Yv);var Ub=jb,Zb=Xm.getScaleExtent,Xb=Xm.niceScaleExtent;function qb(e,t,n){this._model=e,this.dimensions=[],this._indicatorAxes=Ie.map(e.getIndicatorModels(),(function(e,t){var n="indicator_"+t,i=new Ub(n,"log"===e.get("axisType")?new Vm:new lm);return i.name=e.get("name"),i.model=e,e.axis=i,this.dimensions.push(n),i}),this),this.resize(e,n),this.cx,this.cy,this.r,this.r0,this.startAngle}qb.prototype.getIndicatorAxes=function(){return this._indicatorAxes},qb.prototype.dataToPoint=function(e,t){var n=this._indicatorAxes[t];return this.coordToPoint(n.dataToCoord(e),t)},qb.prototype.coordToPoint=function(e,t){var n=this._indicatorAxes[t].angle;return[this.cx+e*Math.cos(n),this.cy-e*Math.sin(n)]},qb.prototype.pointToData=function(e){var t=e[0]-this.cx,n=e[1]-this.cy,i=Math.sqrt(t*t+n*n);t/=i,n/=i;for(var a,r=Math.atan2(-n,t),o=1/0,s=-1,l=0;l<this._indicatorAxes.length;l++){var u=this._indicatorAxes[l],c=Math.abs(r-u.angle);c<o&&(a=u,s=l,o=c)}return[s,+(a&&a.coordToData(i))]},qb.prototype.resize=function(e,t){var n=e.get("center"),i=t.getWidth(),a=t.getHeight(),r=Math.min(i,a)/2;this.cx=Au.parsePercent(n[0],i),this.cy=Au.parsePercent(n[1],a),this.startAngle=e.get("startAngle")*Math.PI/180;var o=e.get("radius");"string"!=typeof o&&"number"!=typeof o||(o=[0,o]),this.r0=Au.parsePercent(o[0],r),this.r=Au.parsePercent(o[1],r),Ie.each(this._indicatorAxes,(function(e,t){e.setExtent(this.r0,this.r);var n=this.startAngle+t*Math.PI*2/this._indicatorAxes.length;n=Math.atan2(Math.sin(n),Math.cos(n)),e.angle=n}),this)},qb.prototype.update=function(e,t){var n=this._indicatorAxes,i=this._model;Ie.each(n,(function(e){e.scale.setExtent(1/0,-1/0)})),e.eachSeriesByType("radar",(function(t,a){if("radar"===t.get("coordinateSystem")&&e.getComponent("radar",t.get("radarIndex"))===i){var r=t.getData();Ie.each(n,(function(e){e.scale.unionExtentFromData(r,r.mapDimension(e.dim))}))}}),this);var a=i.get("splitNumber");function r(e){var t=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),n=e/t;return 2===n?n=5:n*=2,n*t}Ie.each(n,(function(e,t){var n=Zb(e.scale,e.model).extent;Xb(e.scale,e.model);var i=e.model,o=e.scale,s=i.getMin(),l=i.getMax(),u=o.getInterval();if(null!=s&&null!=l)o.setExtent(+s,+l),o.setInterval((l-s)/a);else if(null!=s){do{c=s+u*a,o.setExtent(+s,c),o.setInterval(u),u=r(u)}while(c<n[1]&&isFinite(c)&&isFinite(n[1]))}else if(null!=l){do{h=l-u*a,o.setExtent(h,+l),o.setInterval(u),u=r(u)}while(h>n[0]&&isFinite(h)&&isFinite(n[0]))}else{o.getTicks().length-1>a&&(u=r(u));var c=Math.ceil(n[1]/u)*u,h=Au.round(c-u*a);o.setExtent(h,c),o.setInterval(u)}}))},qb.dimensions=[],qb.create=function(e,t){var n=[];return e.eachComponent("radar",(function(i){var a=new qb(i,e,t);n.push(a),i.coordinateSystem=a})),e.eachSeriesByType("radar",(function(e){"radar"===e.get("coordinateSystem")&&(e.coordinateSystem=n[e.get("radarIndex")||0])})),n},ch.register("radar",qb);var Kb=D_.valueAxis;function Qb(e,t){return Ie.defaults({show:t},e)}ry.extendComponentModel({type:"radar",optionUpdated:function(){var e=this.get("boundaryGap"),t=this.get("splitNumber"),n=this.get("scale"),i=this.get("axisLine"),a=this.get("axisTick"),r=this.get("axisType"),o=this.get("axisLabel"),s=this.get("name"),l=this.get("name.show"),u=this.get("name.formatter"),c=this.get("nameGap"),h=this.get("triggerEvent"),d=Ie.map(this.get("indicator")||[],(function(d){null!=d.max&&d.max>0&&!d.min?d.min=0:null!=d.min&&d.min<0&&!d.max&&(d.max=0);var f=s;if(null!=d.color&&(f=Ie.defaults({color:d.color},s)),d=Ie.merge(Ie.clone(d),{boundaryGap:e,splitNumber:t,scale:n,axisLine:i,axisTick:a,axisType:r,axisLabel:o,name:d.text,nameLocation:"end",nameGap:c,nameTextStyle:f,triggerEvent:h},!1),l||(d.name=""),"string"==typeof u){var p=d.name;d.name=u.replace("{value}",null!=p?p:"")}else"function"==typeof u&&(d.name=u(d.name,d));var g=Ie.extend(new bu(d,null,this.ecModel),qm);return g.mainType="radar",g.componentIndex=this.componentIndex,g}),this);this.getIndicatorModels=function(){return d}},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:Ie.merge({lineStyle:{color:"#bbb"}},Kb.axisLine),axisLabel:Qb(Kb.axisLabel,!1),axisTick:Qb(Kb.axisTick,!1),axisType:"interval",splitLine:Qb(Kb.splitLine,!0),splitArea:Qb(Kb.splitArea,!0),indicator:[]}});var $b=["axisLine","axisTickLabel","axisName"],Jb=(ry.extendComponentView({type:"radar",render:function(e,t,n){this.group.removeAll(),this._buildAxes(e),this._buildSplitLineAndArea(e)},_buildAxes:function(e){var t=e.coordinateSystem,n=t.getIndicatorAxes(),i=Ie.map(n,(function(e){return new _x(e.model,{position:[t.cx,t.cy],rotation:e.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}));Ie.each(i,(function(e){Ie.each($b,e.add,e),this.group.add(e.getGroup())}),this)},_buildSplitLineAndArea:function(e){var t=e.coordinateSystem,n=t.getIndicatorAxes();if(n.length){var i=e.get("shape"),a=e.getModel("splitLine"),r=e.getModel("splitArea"),o=a.getModel("lineStyle"),s=r.getModel("areaStyle"),l=a.get("show"),u=r.get("show"),c=o.get("color"),h=s.get("color");c=Ie.isArray(c)?c:[c],h=Ie.isArray(h)?h:[h];var d=[],f=[];if("circle"===i)for(var p=n[0].getTicksCoords(),g=t.cx,m=t.cy,v=0;v<p.length;v++){if(l)d[T(d,c,v)].push(new lu.Circle({shape:{cx:g,cy:m,r:p[v].coord}}));if(u&&v<p.length-1)f[T(f,h,v)].push(new lu.Ring({shape:{cx:g,cy:m,r0:p[v].coord,r:p[v+1].coord}}))}else{var y,_=Ie.map(n,(function(e,n){var i=e.getTicksCoords();return y=null==y?i.length-1:Math.min(i.length-1,y),Ie.map(i,(function(e){return t.coordToPoint(e.coord,n)}))})),x=[];for(v=0;v<=y;v++){for(var b=[],w=0;w<n.length;w++)b.push(_[w][v]);if(b[0]&&b.push(b[0].slice()),l)d[T(d,c,v)].push(new lu.Polyline({shape:{points:b}}));if(u&&x)f[T(f,h,v-1)].push(new lu.Polygon({shape:{points:b.concat(x)}}));x=b.slice().reverse()}}var S=o.getLineStyle(),M=s.getAreaStyle();Ie.each(f,(function(e,t){this.group.add(lu.mergePath(e,{style:Ie.defaults({stroke:"none",fill:h[t%h.length]},M),silent:!0}))}),this),Ie.each(d,(function(e,t){this.group.add(lu.mergePath(e,{style:Ie.defaults({fill:"none",stroke:c[t%c.length]},S),silent:!0}))}),this)}function T(e,t,n){var i=n%t.length;return e[i]=e[i]||[],i}}}),Pu.encodeHTML),ew=Yd.extend({type:"series.radar",dependencies:["radar"],init:function(e){ew.superApply(this,"init",arguments),this.legendVisualProvider=new vb(Ie.bind(this.getData,this),Ie.bind(this.getRawData,this))},getInitialData:function(e,t){return gb(this,{generateCoord:"indicator_",generateCoordCount:1/0})},formatTooltip:function(e){var t=this.getData(),n=this.coordinateSystem.getIndicatorAxes(),i=this.getData().getName(e);return Jb(""===i?this.name:i)+"<br/>"+Ie.map(n,(function(n,i){var a=t.get(t.mapDimension(n.dim),e);return Jb(n.name+" : "+a)})).join("<br />")},getTooltipPosition:function(e){if(null!=e)for(var t=this.getData(),n=this.coordinateSystem,i=t.getValues(Ie.map(n.dimensions,(function(e){return t.mapDimension(e)})),e,!0),a=0,r=i.length;a<r;a++)if(!isNaN(i[a])){var o=n.getIndicatorAxes();return n.coordToPoint(o[a].dataToCoord(i[a]),a)}},defaultOption:{zlevel:0,z:2,coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid"},label:{position:"top"},symbol:"emptyCircle",symbolSize:4}});ry.extendChartView({type:"radar",render:function(e,t,n){var i=e.coordinateSystem,a=this.group,r=e.getData(),o=this._data;function s(e,t){var n=e.getItemVisual(t,"symbol")||"circle",i=e.getItemVisual(t,"color");if("none"!==n){var a=function(e){return Ie.isArray(e)||(e=[+e,+e]),e}(e.getItemVisual(t,"symbolSize")),r=ov.createSymbol(n,-1,-1,2,2,i);return r.attr({style:{strokeNoScale:!0},z2:100,scale:[a[0]/2,a[1]/2]}),r}}function l(t,n,i,a,r,o){i.removeAll();for(var l=0;l<n.length-1;l++){var u=s(a,r);u&&(u.__dimIdx=l,t[l]?(u.attr("position",t[l]),lu[o?"initProps":"updateProps"](u,{position:n[l]},e,r)):u.attr("position",n[l]),i.add(u))}}function u(e){return Ie.map(e,(function(e){return[i.cx,i.cy]}))}r.diff(o).add((function(t){var n=r.getItemLayout(t);if(n){var i=new lu.Polygon,a=new lu.Polyline,o={shape:{points:n}};i.shape.points=u(n),a.shape.points=u(n),lu.initProps(i,o,e,t),lu.initProps(a,o,e,t);var s=new lu.Group,c=new lu.Group;s.add(a),s.add(i),s.add(c),l(a.shape.points,n,c,r,t,!0),r.setItemGraphicEl(t,s)}})).update((function(t,n){var i=o.getItemGraphicEl(n),a=i.childAt(0),s=i.childAt(1),u=i.childAt(2),c={shape:{points:r.getItemLayout(t)}};c.shape.points&&(l(a.shape.points,c.shape.points,u,r,t,!1),lu.updateProps(a,c,e),lu.updateProps(s,c,e),r.setItemGraphicEl(t,i))})).remove((function(e){a.remove(o.getItemGraphicEl(e))})).execute(),r.eachItemGraphicEl((function(e,t){var n=r.getItemModel(t),i=e.childAt(0),o=e.childAt(1),s=e.childAt(2),l=r.getItemVisual(t,"color");a.add(e),i.useStyle(Ie.defaults(n.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:l})),i.hoverStyle=n.getModel("emphasis.lineStyle").getLineStyle();var u=n.getModel("areaStyle"),c=n.getModel("emphasis.areaStyle"),h=u.isEmpty()&&u.parentModel.isEmpty(),d=c.isEmpty()&&c.parentModel.isEmpty();d=d&&h,o.ignore=h,o.useStyle(Ie.defaults(u.getAreaStyle(),{fill:l,opacity:.7})),o.hoverStyle=c.getAreaStyle();var f=n.getModel("itemStyle").getItemStyle(["color"]),p=n.getModel("emphasis.itemStyle").getItemStyle(),g=n.getModel("label"),m=n.getModel("emphasis.label");s.eachChild((function(e){e.setStyle(f),e.hoverStyle=Ie.clone(p);var n=r.get(r.dimensions[e.__dimIdx],t);(null==n||isNaN(n))&&(n=""),lu.setLabelStyle(e.style,e.hoverStyle,g,m,{labelFetcher:r.hostModel,labelDataIndex:t,labelDimIndex:e.__dimIdx,defaultText:n,autoColor:l,isRectText:!0})})),e.highDownOnUpdate=function(e,t){o.attr("ignore","emphasis"===t?d:h)},lu.setHoverStyle(e)})),this._data=r},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}});function tw(e){return!isNaN(e[0])&&!isNaN(e[1])}function nw(e){return[e.cx,e.cy]}var iw=function(e){e.eachSeriesByType("radar",(function(e){var t=e.getData(),n=[],i=e.coordinateSystem;if(i){var a=i.getIndicatorAxes();Ie.each(a,(function(e,r){t.each(t.mapDimension(a[r].dim),(function(e,t){n[t]=n[t]||[];var a=i.dataToPoint(e,r);n[t][r]=tw(a)?a:nw(i)}))})),t.each((function(e){var a=Ie.find(n[e],(function(e){return tw(e)}))||nw(i);n[e].push(a.slice()),t.setItemLayout(e,n[e])}))}}))};var aw=function(e){var t=e.polar;if(t){Ie.isArray(t)||(t=[t]);var n=[];Ie.each(t,(function(t,i){t.indicator?(t.type&&!t.shape&&(t.shape=t.type),e.radar=e.radar||[],Ie.isArray(e.radar)||(e.radar=[e.radar]),e.radar.push(t)):n.push(t)})),e.polar=n}Ie.each(e.series,(function(e){e&&"radar"===e.type&&e.polarIndex&&(e.radarIndex=e.polarIndex)}))};ry.registerVisual(Db("radar")),ry.registerVisual(d_("radar","circle")),ry.registerLayout(iw),ry.registerProcessor(Vb("radar")),ry.registerPreprocessor(aw);for(var rw=[126,25],ow=[[[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]]],sw=0;sw<ow.length;sw++)for(var lw=0;lw<ow[sw].length;lw++)ow[sw][lw][0]/=10.5,ow[sw][lw][1]/=-14,ow[sw][lw][0]+=rw[0],ow[sw][lw][1]+=rw[1];var uw=function(e,t){"china"===e&&t.push(new gv("南海诸岛",Ie.map(ow,(function(e){return{type:"polygon",exterior:e}})),rw))},cw={"南海诸岛":[32,80],"广东":[0,-10],"香港":[10,5],"澳门":[-10,10],"天津":[5,5]};var hw=function(e,t){if("china"===e){var n=cw[t.name];if(n){var i=t.center;i[0]+=n[0]/10.5,i[1]+=-n[1]/14}}},dw={Russia:[100,60],"United States":[-99,38],"United States of America":[-99,38]};var fw=function(e,t){if("world"===e){var n=dw[t.name];if(n){var i=t.center;i[0]=n[0],i[1]=n[1]}}},pw=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];var gw=function(e,t){"china"===e&&"台湾"===t.name&&t.geometries.push({type:"polygon",exterior:pw[0]})},mw=Ie.each,vw=(0,Sr.makeInner)();function yw(e){for(var t,n=0;n<e.length;n++){var i=e[n].getBoundingRect();(t=t||i.clone()).union(i)}return t}var _w={load:function(e,t,n){var i=vw(t).parsed;if(i)return i;var a,r=t.specialAreas||{},o=t.geoJSON;try{a=o?vv(o,n):[]}catch(e){throw new Error("Invalid geoJson format\n"+e.message)}return uw(e,a),mw(a,(function(t){var n=t.name;hw(e,t),fw(e,t),gw(e,t);var i=r[n];i&&t.transformTo(i.left,i.top,i.width,i.height)})),vw(t).parsed={regions:a,boundingRect:yw(a)}}},xw=_p.parseSVG,bw=_p.makeViewBoxTransform,ww=Ie.assert,Sw=Ie.createHashMap,Mw=(0,Sr.makeInner)();function Tw(e,t){var n,i,a=e.svgXML;try{i=(n=a&&xw(a,{ignoreViewBox:!0,ignoreRootClip:!0})||{}).root,ww(null!=i)}catch(e){throw new Error("Invalid svg format\n"+e.message)}var r=n.width,o=n.height,s=n.viewBoxRect;if(t||(t=null==r||null==o?i.getBoundingRect():new Hn(0,0,0,0),null!=r&&(t.width=r),null!=o&&(t.height=o)),s){var l=bw(s,t.width,t.height),u=i;(i=new Fn).add(u),u.scale=l.scale,u.position=l.position}return i.setClipPath(new zs({shape:t.plain()})),{root:i,boundingRect:t}}var Iw={load:function(e,t){var n=Mw(t).originRoot;if(n)return{root:n,boundingRect:Mw(t).boundingRect};var i=Tw(t);return Mw(t).originRoot=i.root,Mw(t).boundingRect=i.boundingRect,i},makeGraphic:function(e,t,n){var i=Mw(t),a=i.rootMap||(i.rootMap=Sw()),r=a.get(n);if(r)return r;var o=i.originRoot,s=i.boundingRect;return i.originRootHostKey?r=Tw(t,s).root:(i.originRootHostKey=n,r=o),a.set(n,r)},removeGraphic:function(e,t,n){var i=Mw(t),a=i.rootMap;a&&a.removeKey(n),n===i.originRootHostKey&&(i.originRootHostKey=null)}},Aw=Ie.each,Dw=Ie.createHashMap,Cw={geoJSON:_w,svg:Iw};function Ow(e){return function(t,n){var i=kw(t),a=[];return Aw(i,(function(i){var r=Cw[i.type][e];r&&a.push(r(t,i,n))})),a}}function kw(e){return Dp.retrieveMap(e)||[]}var Lw={load:function(e,t,n){var i,a=[],r=Dw(),o=Dw(),s=kw(e);return Aw(s,(function(s){var l=Cw[s.type].load(e,s,n);Aw(l.regions,(function(e){var n=e.name;t&&t.hasOwnProperty(n)&&(e=e.cloneShallow(n=t[n])),a.push(e),r.set(n,e),o.set(n,e.center)}));var u=l.boundingRect;u&&(i?i.union(u):i=u.clone())})),{regions:a,regionsMap:r,nameCoordMap:o,boundingRect:i||new Hn(0,0,0,0)}},makeGraphic:Ow("makeGraphic"),removeGraphic:Ow("removeGraphic")},Ew=Pu.encodeHTML,Nw=Pu.addCommas,Pw=ud.retrieveRawAttr,Rw=Hc.makeSeriesEncodeForNameBased,zw=Yd.extend({type:"series.map",dependencies:["geo"],layoutMode:"box",needsDrawMap:!1,seriesGroup:[],getInitialData:function(e){for(var t=gb(this,{coordDimensions:["value"],encodeDefaulter:Ie.curry(Rw,this)}),n=t.mapDimension("value"),i=Ie.createHashMap(),a=[],r=[],o=0,s=t.count();o<s;o++){var l=t.getName(o);i.set(l,!0),a.push({name:l,value:t.get(n,o),selected:Pw(t,o,"selected")})}var u=Lw.load(this.getMapType(),this.option.nameMap,this.option.nameProperty);return Ie.each(u.regions,(function(e){var t=e.name;i.get(t)||(a.push({name:t}),r.push(t))})),this.updateSelectedMap(a),t.appendValues([],r),t},getHostGeoModel:function(){var e=this.option.geoIndex;return null!=e?this.dependentModels.geo[e]:null},getMapType:function(){return(this.getHostGeoModel()||this).option.map},getRawValue:function(e){var t=this.getData();return t.get(t.mapDimension("value"),e)},getRegionModel:function(e){var t=this.getData();return t.getItemModel(t.indexOfName(e))},formatTooltip:function(e){for(var t=this.getData(),n=Nw(this.getRawValue(e)),i=t.getName(e),a=this.seriesGroup,r=[],o=0;o<a.length;o++){var s=a[o].originalData.indexOfName(i),l=t.mapDimension("value");isNaN(a[o].originalData.get(l,s))||r.push(Ew(a[o].name))}return r.join(", ")+"<br />"+Ew(i+" : "+n)},getTooltipPosition:function(e){if(null!=e){var t=this.getData().getName(e),n=this.coordinateSystem,i=n.getRegion(t);return i&&n.dataToPoint(i.center)}},setZoom:function(e){this.option.zoom=e},setCenter:function(e){this.option.center=e},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)"}},nameProperty:"name"}});Ie.mixin(zw,mb);var Bw="\0_ec_interaction_mutex";function Vw(e){return e[Bw]||(e[Bw]={})}ry.registerAction({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},(function(){}));var Hw={take:function(e,t,n){Vw(e)[t]=n},release:function(e,t,n){var i=Vw(e);i[t]===n&&(i[t]=null)},isTaken:function(e,t){return!!Vw(e)[t]}};function Yw(e){this.pointerChecker,this._zr=e,this._opt={};var t=Ie.bind,n=t(Fw,this),i=t(Gw,this),a=t(Ww,this),r=t(jw,this),o=t(Uw,this);Ve.call(this),this.setPointerChecker=function(e){this.pointerChecker=e},this.enable=function(t,s){this.disable(),this._opt=Ie.defaults(Ie.clone(s)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==t&&(t=!0),!0!==t&&"move"!==t&&"pan"!==t||(e.on("mousedown",n),e.on("mousemove",i),e.on("mouseup",a)),!0!==t&&"scale"!==t&&"zoom"!==t||(e.on("mousewheel",r),e.on("pinch",o))},this.disable=function(){e.off("mousedown",n),e.off("mousemove",i),e.off("mouseup",a),e.off("mousewheel",r),e.off("pinch",o)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}function Fw(e){if(!(nt.isMiddleOrRightButtonOnMouseUpDown(e)||e.target&&e.target.draggable)){var t=e.offsetX,n=e.offsetY;this.pointerChecker&&this.pointerChecker(e,t,n)&&(this._x=t,this._y=n,this._dragging=!0)}}function Gw(e){if(this._dragging&&qw("moveOnMouseMove",e,this._opt)&&"pinch"!==e.gestureEvent&&!Hw.isTaken(this._zr,"globalPan")){var t=e.offsetX,n=e.offsetY,i=this._x,a=this._y,r=t-i,o=n-a;this._x=t,this._y=n,this._opt.preventDefaultMouseMove&&nt.stop(e.event),Xw(this,"pan","moveOnMouseMove",e,{dx:r,dy:o,oldX:i,oldY:a,newX:t,newY:n})}}function Ww(e){nt.isMiddleOrRightButtonOnMouseUpDown(e)||(this._dragging=!1)}function jw(e){var t=qw("zoomOnMouseWheel",e,this._opt),n=qw("moveOnMouseWheel",e,this._opt),i=e.wheelDelta,a=Math.abs(i),r=e.offsetX,o=e.offsetY;if(0!==i&&(t||n)){if(t){var s=a>3?1.4:a>1?1.2:1.1;Zw(this,"zoom","zoomOnMouseWheel",e,{scale:i>0?s:1/s,originX:r,originY:o})}if(n){var l=Math.abs(i);Zw(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:(i>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:r,originY:o})}}}function Uw(e){Hw.isTaken(this._zr,"globalPan")||Zw(this,"zoom",null,e,{scale:e.pinchScale>1?1.1:1/1.1,originX:e.pinchX,originY:e.pinchY})}function Zw(e,t,n,i,a){e.pointerChecker&&e.pointerChecker(i,a.originX,a.originY)&&(nt.stop(i.event),Xw(e,t,n,i,a))}function Xw(e,t,n,i,a){a.isAvailableBehavior=Ie.bind(qw,null,n,i),e.trigger(t,a)}function qw(e,t,n){var i=n[e];return!e||i&&(!Ie.isString(i)||t.event[i+"Key"])}Ie.mixin(Yw,Ve);var Kw=Yw;var Qw={updateViewOnPan:function(e,t,n){var i=e.target,a=i.position;a[0]+=t,a[1]+=n,i.dirty()},updateViewOnZoom:function(e,t,n,i){var a=e.target,r=e.zoomLimit,o=a.position,s=a.scale,l=e.zoom=e.zoom||1;if(l*=t,r){var u=r.min||0,c=r.max||1/0;l=Math.max(Math.min(c,l),u)}var h=l/e.zoom;e.zoom=l,o[0]-=(n-o[0])*(h-1),o[1]-=(i-o[1])*(h-1),s[0]*=h,s[1]*=h,a.dirty()}},$w={axisPointer:1,tooltip:1,brush:1};var Jw={onIrrelevantElement:function(e,t,n){var i=t.getComponentByElement(e.topTarget),a=i&&i.coordinateSystem;return i&&i!==n&&!$w[i.mainType]&&a&&a.model!==n}},eS=Jw.onIrrelevantElement,tS=Mu.getUID;function nS(e){var t=e.getItemStyle(),n=e.get("areaColor");return null!=n&&(t.fill=n),t}function iS(e,t){t.eachChild((function(t){Ie.each(t.__regions,(function(n){t.trigger(e.isSelected(n.name)?"emphasis":"normal")}))}))}function aS(e,t){var n=new lu.Group;this.uid=tS("ec_map_draw"),this._controller=new Kw(e.getZr()),this._controllerHost={target:t?n:null},this.group=n,this._updateGroup=t,this._mouseDownFlag,this._mapName,this._initialized,n.add(this._regionsGroup=new lu.Group),n.add(this._backgroundGroup=new lu.Group)}aS.prototype={constructor:aS,draw:function(e,t,n,i,a){var r="geo"===e.mainType,o=e.getData&&e.getData();r&&t.eachComponent({mainType:"series",subType:"map"},(function(t){o||t.getHostGeoModel()!==e||(o=t.getData())}));var s=e.coordinateSystem;this._updateBackground(s);var l,u=this._regionsGroup,c=this.group,h=s.getTransformInfo(),d=!u.childAt(0)||a;if(d)c.transform=h.roamTransform,c.decomposeTransform(),c.dirty();else{var f=new It;f.transform=h.roamTransform,f.decomposeTransform();var p={scale:f.scale,position:f.position};l=f.scale,lu.updateProps(c,p,e)}var g=h.rawScale,m=h.rawPosition;u.removeAll();var v=["itemStyle"],y=["emphasis","itemStyle"],_=["label"],x=["emphasis","label"],b=Ie.createHashMap();Ie.each(s.regions,(function(t){var n=b.get(t.name)||b.set(t.name,new lu.Group),i=new lu.CompoundPath({segmentIgnoreThreshold:1,shape:{paths:[]}});n.add(i);var a,s=(N=e.getRegionModel(t.name)||e).getModel(v),h=N.getModel(y),f=nS(s),p=nS(h),w=N.getModel(_),S=N.getModel(x);if(o){a=o.indexOfName(t.name);var M=o.getItemVisual(a,"color",!0);M&&(f.fill=M)}var T=function(e){return[e[0]*g[0]+m[0],e[1]*g[1]+m[1]]};Ie.each(t.geometries,(function(e){if("polygon"===e.type){for(var t=[],n=0;n<e.exterior.length;++n)t.push(T(e.exterior[n]));i.shape.paths.push(new lu.Polygon({segmentIgnoreThreshold:1,shape:{points:t}}));for(n=0;n<(e.interiors?e.interiors.length:0);++n){for(var a=e.interiors[n],r=(t=[],0);r<a.length;++r)t.push(T(a[r]));i.shape.paths.push(new lu.Polygon({segmentIgnoreThreshold:1,shape:{points:t}}))}}})),i.setStyle(f),i.style.strokeNoScale=!0,i.culling=!0;var I=w.get("show"),A=S.get("show"),D=o&&isNaN(o.get(o.mapDimension("value"),a)),C=o&&o.getItemLayout(a);if(r||D&&(I||A)||C&&C.showLabel){var O,k=r?t.name:a;(!o||a>=0)&&(O=e);var L=new lu.Text({position:T(t.center.slice()),scale:[1/c.scale[0],1/c.scale[1]],z2:10,silent:!0});if(lu.setLabelStyle(L.style,L.hoverStyle={},w,S,{labelFetcher:O,labelDataIndex:k,defaultText:t.name,useInsideStyle:!1},{textAlign:"center",textVerticalAlign:"middle"}),!d){var E=[1/l[0],1/l[1]];lu.updateProps(L,{scale:E},e)}n.add(L)}if(o)o.setItemGraphicEl(a,n);else{var N=e.getRegionModel(t.name);i.eventData={componentType:"geo",componentIndex:e.componentIndex,geoIndex:e.componentIndex,name:t.name,region:N&&N.option||{}}}(n.__regions||(n.__regions=[])).push(t),n.highDownSilentOnTouch=!!e.get("selectedMode"),lu.setHoverStyle(n,p),u.add(n)})),this._updateController(e,t,n),function(e,t,n,i,a){n.off("click"),n.off("mousedown"),t.get("selectedMode")&&(n.on("mousedown",(function(){e._mouseDownFlag=!0})),n.on("click",(function(r){if(e._mouseDownFlag){e._mouseDownFlag=!1;for(var o=r.target;!o.__regions;)o=o.parent;if(o){var s={type:("geo"===t.mainType?"geo":"map")+"ToggleSelect",batch:Ie.map(o.__regions,(function(e){return{name:e.name,from:a.uid}}))};s[t.mainType+"Id"]=t.id,i.dispatchAction(s),iS(t,n)}}})))}(this,e,u,n,i),iS(e,u)},remove:function(){this._regionsGroup.removeAll(),this._backgroundGroup.removeAll(),this._controller.dispose(),this._mapName&&Lw.removeGraphic(this._mapName,this.uid),this._mapName=null,this._controllerHost={}},_updateBackground:function(e){var t=e.map;this._mapName!==t&&Ie.each(Lw.makeGraphic(t,this.uid),(function(e){this._backgroundGroup.add(e)}),this),this._mapName=t},_updateController:function(e,t,n){var i=e.coordinateSystem,a=this._controller,r=this._controllerHost;r.zoomLimit=e.get("scaleLimit"),r.zoom=i.getZoom(),a.enable(e.get("roam")||!1);var o=e.mainType;function s(){var t={type:"geoRoam",componentType:o};return t[o+"Id"]=e.id,t}a.off("pan").on("pan",(function(e){this._mouseDownFlag=!1,Qw.updateViewOnPan(r,e.dx,e.dy),n.dispatchAction(Ie.extend(s(),{dx:e.dx,dy:e.dy}))}),this),a.off("zoom").on("zoom",(function(e){if(this._mouseDownFlag=!1,Qw.updateViewOnZoom(r,e.scale,e.originX,e.originY),n.dispatchAction(Ie.extend(s(),{zoom:e.scale,originX:e.originX,originY:e.originY})),this._updateGroup){var t=this.group.scale;this._regionsGroup.traverse((function(e){"text"===e.type&&e.attr("scale",[1/t[0],1/t[1]])}))}}),this),a.setPointerChecker((function(t,a,r){return i.getViewRectAfterRoam().contain(a,r)&&!eS(t,n,e)}))}};var rS=aS;ry.extendChartView({type:"map",render:function(e,t,n,i){if(!i||"mapToggleSelect"!==i.type||i.from!==this.uid){var a=this.group;if(a.removeAll(),!e.getHostGeoModel()){if(i&&"geoRoam"===i.type&&"series"===i.componentType&&i.seriesId===e.id)(r=this._mapDraw)&&a.add(r.group);else if(e.needsDrawMap){var r=this._mapDraw||new rS(n,!0);a.add(r.group),r.draw(e,t,n,this,i),this._mapDraw=r}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;e.get("showLegendSymbol")&&t.getComponent("legend")&&this._renderSymbols(e,t,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(e,t,n){var i=e.originalData,a=this.group;i.each(i.mapDimension("value"),(function(t,n){if(!isNaN(t)){var r=i.getItemLayout(n);if(r&&r.point){var o=r.point,s=r.offset,l=new lu.Circle({style:{fill:e.getData().getVisual("color")},shape:{cx:o[0]+9*s,cy:o[1],r:3},silent:!0,z2:8+(s?0:lu.Z2_EMPHASIS_LIFT+1)});if(!s){var u=e.mainSeries.getData(),c=i.getName(n),h=u.indexOfName(c),d=i.getItemModel(n),f=d.getModel("label"),p=d.getModel("emphasis.label"),g=u.getItemGraphicEl(h),m=Ie.retrieve2(e.getFormattedLabel(h,"normal"),c),v=Ie.retrieve2(e.getFormattedLabel(h,"emphasis"),m),y=g.__seriesMapHighDown,_=Math.random();if(!y){y=g.__seriesMapHighDown={};var x=Ie.curry(oS,!0),b=Ie.curry(oS,!1);g.on("mouseover",x).on("mouseout",b).on("emphasis",x).on("normal",b)}g.__seriesMapCallKey=_,Ie.extend(y,{recordVersion:_,circle:l,labelModel:f,hoverLabelModel:p,emphasisText:v,normalText:m}),sS(y,!1)}a.add(l)}}}))}});function oS(e){var t=this.__seriesMapHighDown;t&&t.recordVersion===this.__seriesMapCallKey&&sS(t,e)}function sS(e,t){var n=e.circle,i=e.labelModel,a=e.hoverLabelModel,r=e.emphasisText,o=e.normalText;t?(n.style.extendFrom(lu.setTextStyle({},a,{text:a.get("show")?r:null},{isRectText:!0,useInsideStyle:!1},!0)),n.__mapOriginalZ2=n.z2,n.z2+=lu.Z2_EMPHASIS_LIFT):(lu.setTextStyle(n.style,i,{text:i.get("show")?o:null,textPosition:i.getShallow("position")||"bottom"},{isRectText:!0,useInsideStyle:!1}),n.dirty(!1),null!=n.__mapOriginalZ2&&(n.z2=n.__mapOriginalZ2,n.__mapOriginalZ2=null))}var lS={updateCenterAndZoom:function(e,t,n){var i=e.getZoom(),a=e.getCenter(),r=t.zoom,o=e.dataToPoint(a);if(null!=t.dx&&null!=t.dy){o[0]-=t.dx,o[1]-=t.dy;a=e.pointToData(o);e.setCenter(a)}if(null!=r){if(n){var s=n.min||0,l=n.max||1/0;r=Math.max(Math.min(i*r,l),s)/i}e.scale[0]*=r,e.scale[1]*=r;var u=e.position,c=(t.originX-u[0])*(r-1),h=(t.originY-u[1])*(r-1);u[0]-=c,u[1]-=h,e.updateTransform();a=e.pointToData(o);e.setCenter(a),e.setZoom(r*i)}return{center:e.getCenter(),zoom:e.getZoom()}}},uS=lS.updateCenterAndZoom;ry.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},(function(e,t){var n=e.componentType||"series";t.eachComponent({mainType:n,query:e},(function(t){var i=t.coordinateSystem;if("geo"===i.type){var a=uS(i,e,t.get("scaleLimit"));t.setCenter&&t.setCenter(a.center),t.setZoom&&t.setZoom(a.zoom),"series"===n&&Ie.each(t.seriesGroup,(function(e){e.setCenter(a.center),e.setZoom(a.zoom)}))}}))}));var cS=Le.applyTransform;function hS(){It.call(this)}function dS(e){this.name=e,this.zoomLimit,It.call(this),this._roamTransformable=new hS,this._rawTransformable=new hS,this._center,this._zoom}function fS(e,t,n,i){var a=n.seriesModel,r=a?a.coordinateSystem:null;return r===this?r[e](i):null}Ie.mixin(hS,It),dS.prototype={constructor:dS,type:"view",dimensions:["x","y"],setBoundingRect:function(e,t,n,i){return this._rect=new Hn(e,t,n,i),this._rect},getBoundingRect:function(){return this._rect},setViewRect:function(e,t,n,i){this.transformTo(e,t,n,i),this._viewRect=new Hn(e,t,n,i)},transformTo:function(e,t,n,i){var a=this.getBoundingRect(),r=this._rawTransformable;r.transform=a.calculateTransform(new Hn(e,t,n,i)),r.decomposeTransform(),this._updateTransform()},setCenter:function(e){e&&(this._center=e,this._updateCenterAndZoom())},setZoom:function(e){e=e||1;var t=this.zoomLimit;t&&(null!=t.max&&(e=Math.min(t.max,e)),null!=t.min&&(e=Math.max(t.min,e))),this._zoom=e,this._updateCenterAndZoom()},getDefaultCenter:function(){var e=this.getBoundingRect();return[e.x+e.width/2,e.y+e.height/2]},getCenter:function(){return this._center||this.getDefaultCenter()},getZoom:function(){return this._zoom||1},getRoamTransform:function(){return this._roamTransformable.getLocalTransform()},_updateCenterAndZoom:function(){var e=this._rawTransformable.getLocalTransform(),t=this._roamTransformable,n=this.getDefaultCenter(),i=this.getCenter(),a=this.getZoom();i=Le.applyTransform([],i,e),n=Le.applyTransform([],n,e),t.origin=i,t.position=[n[0]-i[0],n[1]-i[1]],t.scale=[a,a],this._updateTransform()},_updateTransform:function(){var e=this._roamTransformable,t=this._rawTransformable;t.parent=e,e.updateTransform(),t.updateTransform(),yt.copy(this.transform||(this.transform=[]),t.transform||yt.create()),this._rawTransform=t.getLocalTransform(),this.invTransform=this.invTransform||[],yt.invert(this.invTransform,this.transform),this.decomposeTransform()},getTransformInfo:function(){var e=this._roamTransformable.transform,t=this._rawTransformable;return{roamTransform:e?Ie.slice(e):yt.create(),rawScale:Ie.slice(t.scale),rawPosition:Ie.slice(t.position)}},getViewRect:function(){return this._viewRect},getViewRectAfterRoam:function(){var e=this.getBoundingRect().clone();return e.applyTransform(this.transform),e},dataToPoint:function(e,t,n){var i=t?this._rawTransform:this.transform;return n=n||[],i?cS(n,e,i):Le.copy(n,e)},pointToData:function(e){var t=this.invTransform;return t?cS([],e,t):[e[0],e[1]]},convertToPixel:Ie.curry(fS,"dataToPoint"),convertFromPixel:Ie.curry(fS,"pointToData"),containPoint:function(e){return this.getViewRectAfterRoam().contain(e[0],e[1])}},Ie.mixin(dS,It);var pS=dS;function gS(e,t,n,i){pS.call(this,e),this.map=t;var a=Lw.load(t,n);this._nameCoordMap=a.nameCoordMap,this._regionsMap=a.regionsMap,this._invertLongitute=null==i||i,this.regions=a.regions,this._rect=a.boundingRect}function mS(e,t,n,i){var a=n.geoModel,r=n.seriesModel,o=a?a.coordinateSystem:r?r.coordinateSystem||(r.getReferringComponents("geo")[0]||{}).coordinateSystem:null;return o===this?o[e](i):null}gS.prototype={constructor:gS,type:"geo",dimensions:["lng","lat"],containCoord:function(e){for(var t=this.regions,n=0;n<t.length;n++)if(t[n].contain(e))return!0;return!1},transformTo:function(e,t,n,i){var a=this.getBoundingRect(),r=this._invertLongitute;a=a.clone(),r&&(a.y=-a.y-a.height);var o=this._rawTransformable;if(o.transform=a.calculateTransform(new Hn(e,t,n,i)),o.decomposeTransform(),r){var s=o.scale;s[1]=-s[1]}o.updateTransform(),this._updateTransform()},getRegion:function(e){return this._regionsMap.get(e)},getRegionByCoord:function(e){for(var t=this.regions,n=0;n<t.length;n++)if(t[n].contain(e))return t[n]},addGeoCoord:function(e,t){this._nameCoordMap.set(e,t)},getGeoCoord:function(e){return this._nameCoordMap.get(e)},getBoundingRect:function(){return this._rect},dataToPoint:function(e,t,n){if("string"==typeof e&&(e=this.getGeoCoord(e)),e)return pS.prototype.dataToPoint.call(this,e,t,n)},convertToPixel:Ie.curry(mS,"dataToPoint"),convertFromPixel:Ie.curry(mS,"pointToData")},Ie.mixin(gS,pS);var vS=gS;function yS(e,t){var n=e.get("boundingCoords");if(null!=n){var i=n[0],a=n[1];isNaN(i[0])||isNaN(i[1])||isNaN(a[0])||isNaN(a[1])||this.setBoundingRect(i[0],i[1],a[0]-i[0],a[1]-i[1])}var r,o=this.getBoundingRect(),s=e.get("layoutCenter"),l=e.get("layoutSize"),u=t.getWidth(),c=t.getHeight(),h=o.width/o.height*this.aspectScale,d=!1;if(s&&l&&(s=[Au.parsePercent(s[0],u),Au.parsePercent(s[1],c)],l=Au.parsePercent(l,Math.min(u,c)),isNaN(s[0])||isNaN(s[1])||isNaN(l)||(d=!0)),d){var f={};h>1?(f.width=l,f.height=l/h):(f.height=l,f.width=l*h),f.y=s[1]-f.height/2,f.x=s[0]-f.width/2}else(r=e.getBoxLayoutParams()).aspect=h,f=Uu.getLayoutRect(r,{width:u,height:c});this.setViewRect(f.x,f.y,f.width,f.height),this.setCenter(e.get("center")),this.setZoom(e.get("zoom"))}function _S(e,t){Ie.each(t.get("geoCoord"),(function(t,n){e.addGeoCoord(n,t)}))}var xS={dimensions:vS.prototype.dimensions,create:function(e,t){var n=[];e.eachComponent("geo",(function(e,i){var a=e.get("map"),r=e.get("aspectScale"),o=!0,s=Dp.retrieveMap(a);s&&s[0]&&"svg"===s[0].type?(null==r&&(r=1),o=!1):null==r&&(r=.75);var l=new vS(a+i,a,e.get("nameMap"),o);l.aspectScale=r,l.zoomLimit=e.get("scaleLimit"),n.push(l),_S(l,e),e.coordinateSystem=l,l.model=e,l.resize=yS,l.resize(e,t)})),e.eachSeries((function(e){if("geo"===e.get("coordinateSystem")){var t=e.get("geoIndex")||0;e.coordinateSystem=n[t]}}));var i={};return e.eachSeriesByType("map",(function(e){if(!e.getHostGeoModel()){var t=e.getMapType();i[t]=i[t]||[],i[t].push(e)}})),Ie.each(i,(function(e,i){var a=Ie.map(e,(function(e){return e.get("nameMap")})),r=new vS(i,i,Ie.mergeAll(a));r.zoomLimit=Ie.retrieve.apply(null,Ie.map(e,(function(e){return e.get("scaleLimit")}))),n.push(r),r.resize=yS,r.aspectScale=e[0].get("aspectScale"),r.resize(e[0],t),Ie.each(e,(function(e){e.coordinateSystem=r,_S(r,e)}))})),n},getFilledRegions:function(e,t,n){for(var i=(e||[]).slice(),a=Ie.createHashMap(),r=0;r<i.length;r++)a.set(i[r].name,i[r]);var o=Lw.load(t,n);return Ie.each(o.regions,(function(e){var t=e.name;!a.get(t)&&i.push({name:t})})),i}};ry.registerCoordinateSystem("geo",xS);var bS=xS;var wS=function(e){var t={};e.eachSeriesByType("map",(function(n){var i=n.getMapType();if(!n.getHostGeoModel()&&!t[i]){var a={};Ie.each(n.seriesGroup,(function(t){var n=t.coordinateSystem,i=t.originalData;t.get("showLegendSymbol")&&e.getComponent("legend")&&i.each(i.mapDimension("value"),(function(e,t){var r=i.getName(t),o=n.getRegion(r);if(o&&!isNaN(e)){var s=a[r]||0,l=n.dataToPoint(o.center);a[r]=s+1,i.setItemLayout(t,{point:l,offset:s})}}))}));var r=n.getData();r.each((function(e){var t=r.getName(e),n=r.getItemLayout(e)||{};n.showLabel=!a[t],r.setItemLayout(e,n)})),t[i]=!0}}))};var SS=function(e){e.eachSeriesByType("map",(function(e){var t=e.get("color"),n=e.getModel("itemStyle"),i=n.get("areaColor"),a=n.get("color")||t[e.seriesIndex%t.length];e.getData().setVisual({areaColor:i,color:a})}))};var MS=function(e){var t={};e.eachSeriesByType("map",(function(e){var n=e.getHostGeoModel(),i=n?"o"+n.id:"i"+e.getMapType();(t[i]=t[i]||[]).push(e)})),Ie.each(t,(function(e,t){for(var n,i,a,r=(n=Ie.map(e,(function(e){return e.getData()})),i=e[0].get("mapValueCalculation"),a={},Ie.each(n,(function(e){e.each(e.mapDimension("value"),(function(t,n){var i="ec-"+e.getName(n);a[i]=a[i]||[],isNaN(t)||a[i].push(t)}))})),n[0].map(n[0].mapDimension("value"),(function(e,t){for(var r,o="ec-"+n[0].getName(t),s=0,l=1/0,u=-1/0,c=a[o].length,h=0;h<c;h++)l=Math.min(l,a[o][h]),u=Math.max(u,a[o][h]),s+=a[o][h];return r="min"===i?l:"max"===i?u:"average"===i?s/c:s,0===c?NaN:r}))),o=0;o<e.length;o++)e[o].originalData=e[o].getData();for(o=0;o<e.length;o++)e[o].seriesGroup=e,e[o].needsDrawMap=0===o&&!e[o].getHostGeoModel(),e[o].setData(r.cloneShallow()),e[o].mainSeries=e[0]}))};var TS=function(e){Ie.each(e.series,(function(e){e&&"map"===e.type&&(e.map=e.map||e.mapType,Ie.defaults(e,e.mapLocation))}))};ry.registerLayout(wS),ry.registerVisual(SS),ry.registerProcessor(ry.PRIORITY.PROCESSOR.STATISTIC,MS),ry.registerPreprocessor(TS),Ib("map",[{type:"mapToggleSelect",event:"mapselectchanged",method:"toggleSelected"},{type:"mapSelect",event:"mapselected",method:"select"},{type:"mapUnSelect",event:"mapunselected",method:"unSelect"}]);var IS=Ie.each,AS="\0__link_datas",DS="\0__link_mainData";function CS(e,t){if((i=this)[DS]===i){var n=Ie.extend({},this[AS]);n[this.dataType]=t,ES(t,n,e)}else NS(t,this.dataType,this[DS],e);var i;return t}function OS(e,t){return e.struct&&e.struct.update(this),t}function kS(e,t){return IS(t[AS],(function(n,i){n!==t&&NS(n.cloneShallow(),i,t,e)})),t}function LS(e){var t=this[DS];return null==e||null==t?t:t[AS][e]}function ES(e,t,n){e[AS]={},IS(t,(function(t,i){NS(t,i,e,n)}))}function NS(e,t,n,i){n[AS][t]=e,e[DS]=n,e.dataType=t,i.struct&&(e[i.structAttr]=i.struct,i.struct[i.datasAttr[t]]=e),e.getLinkedData=LS}var PS=function(e){var t=e.mainData,n=e.datas;n||(n={main:t},e.datasAttr={main:"data"}),e.datas=e.mainData=null,ES(t,n,e),IS(n,(function(n){IS(t.TRANSFERABLE_METHODS,(function(t){n.wrapMethod(t,Ie.curry(CS,e))}))})),t.wrapMethod("cloneShallow",Ie.curry(kS,e)),IS(t.CHANGABLE_METHODS,(function(n){t.wrapMethod(n,Ie.curry(OS,e))})),Ie.assert(n[t.dataType]===t)},RS=function(e,t){this.name=e||"",this.depth=0,this.height=0,this.parentNode=null,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.hostTree=t};function zS(e,t){this.root,this.data,this._nodes=[],this.hostModel=e,this.levelModels=Ie.map(t||[],(function(t){return new bu(t,e,e.ecModel)}))}RS.prototype={constructor:RS,isRemoved:function(){return this.dataIndex<0},eachNode:function(e,t,n){"function"==typeof e&&(n=t,t=e,e=null),e=e||{},Ie.isString(e)&&(e={order:e});var i,a=e.order||"preorder",r=this[e.attr||"children"];"preorder"===a&&(i=t.call(n,this));for(var o=0;!i&&o<r.length;o++)r[o].eachNode(e,t,n);"postorder"===a&&t.call(n,this)},updateDepthAndHeight:function(e){var t=0;this.depth=e;for(var n=0;n<this.children.length;n++){var i=this.children[n];i.updateDepthAndHeight(e+1),i.height>t&&(t=i.height)}this.height=t+1},getNodeById:function(e){if(this.getId()===e)return this;for(var t=0,n=this.children,i=n.length;t<i;t++){var a=n[t].getNodeById(e);if(a)return a}},contains:function(e){if(e===this)return!0;for(var t=0,n=this.children,i=n.length;t<i;t++){var a=n[t].contains(e);if(a)return a}},getAncestors:function(e){for(var t=[],n=e?this:this.parentNode;n;)t.push(n),n=n.parentNode;return t.reverse(),t},getValue:function(e){var t=this.hostTree.data;return t.get(t.getDimension(e||"value"),this.dataIndex)},setLayout:function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},getLayout:function(){return this.hostTree.data.getItemLayout(this.dataIndex)},getModel:function(e){if(!(this.dataIndex<0)){var t=this.hostTree.data.getItemModel(this.dataIndex),n=this.getLevelModel();return n?t.getModel(e,n.getModel(e)):t.getModel(e)}},getLevelModel:function(){return(this.hostTree.levelModels||[])[this.depth]},setVisual:function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},getVisual:function(e,t){return this.hostTree.data.getItemVisual(this.dataIndex,e,t)},getRawIndex:function(){return this.hostTree.data.getRawIndex(this.dataIndex)},getId:function(){return this.hostTree.data.getId(this.dataIndex)},isAncestorOf:function(e){for(var t=e.parentNode;t;){if(t===this)return!0;t=t.parentNode}return!1},isDescendantOf:function(e){return e!==this&&e.isAncestorOf(this)}},zS.prototype={constructor:zS,type:"tree",eachNode:function(e,t,n){this.root.eachNode(e,t,n)},getNodeByDataIndex:function(e){var t=this.data.getRawIndex(e);return this._nodes[t]},getNodeByName:function(e){return this.root.getNodeByName(e)},update:function(){for(var e=this.data,t=this._nodes,n=0,i=t.length;n<i;n++)t[n].dataIndex=-1;for(n=0,i=e.count();n<i;n++)t[e.getRawIndex(n)].dataIndex=n},clearLayouts:function(){this.data.clearItemLayouts()}},zS.createTree=function(e,t,n,i){var a=new zS(t,n&&n.levels),r=[],o=1;!function e(t,n){var i=t.value;o=Math.max(o,Ie.isArray(i)?i.length:1),r.push(t);var s=new RS(t.name,a);n?function(e,t){var n=t.children;if(e.parentNode===t)return;n.push(e),e.parentNode=t}(s,n):a.root=s,a._nodes.push(s);var l=t.children;if(l)for(var u=0;u<l.length;u++)e(l[u],s)}(e),a.root.updateDepthAndHeight(0);var s=Mg(r,{coordDimensions:["value"],dimensionsCount:o}),l=new cg(s,t);return l.initData(r),i&&i(l),PS({mainData:l,struct:a,structAttr:"tree"}),a.update(),a};var BS=zS,VS=Pu.encodeHTML;Yd.extend({type:"series.tree",layoutInfo:null,layoutMode:"box",getInitialData:function(e){var t={name:e.name,children:e.data},n=e.leaves||{},i=new bu(n,this,this.ecModel),a=BS.createTree(t,this,{},(function(e){e.wrapMethod("getItemModel",(function(e,t){var n=a.getNodeByDataIndex(t);return n.children.length&&n.isExpand||(e.parentModel=i),e}))}));var r=0;a.eachNode("preorder",(function(e){e.depth>r&&(r=e.depth)}));var o=e.expandAndCollapse&&e.initialTreeDepth>=0?e.initialTreeDepth:r;return a.root.eachNode("preorder",(function(e){var t=e.hostTree.data.getRawDataItem(e.dataIndex);e.isExpand=t&&null!=t.collapsed?!t.collapsed:e.depth<=o})),a.data},getOrient:function(){var e=this.get("orient");return"horizontal"===e?e="LR":"vertical"===e&&(e="TB"),e},setZoom:function(e){this.option.zoom=e},setCenter:function(e){this.option.center=e},formatTooltip:function(e){for(var t=this.getData().tree,n=t.root.children[0],i=t.getNodeByDataIndex(e),a=i.getValue(),r=i.name;i&&i!==n;)r=i.parentNode.name+"."+r,i=i.parentNode;return VS(r+(isNaN(a)||null==a?"":" : "+a))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderColor:"#c23531",borderWidth:1.5},label:{show:!0,color:"#555"},leaves:{label:{show:!0}},animationEasing:"linear",animationDuration:700,animationDurationUpdate:1e3}});function HS(e){var t=e.children;return t.length&&e.isExpand?t[t.length-1]:e.hierNode.thread}function YS(e){var t=e.children;return t.length&&e.isExpand?t[0]:e.hierNode.thread}function FS(e,t,n){return e.hierNode.ancestor.parentNode===t.parentNode?e.hierNode.ancestor:n}function GS(e,t,n){var i=n/(t.hierNode.i-e.hierNode.i);t.hierNode.change-=i,t.hierNode.shift+=n,t.hierNode.modifier+=n,t.hierNode.prelim+=n,e.hierNode.change+=i}function WS(e,t){return e.parentNode===t.parentNode?1:2}var jS={init:function(e){e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var t,n,i=[e];t=i.pop();)if(n=t.children,t.isExpand&&n.length)for(var a=n.length-1;a>=0;a--){var r=n[a];r.hierNode={defaultAncestor:null,ancestor:r,prelim:0,modifier:0,change:0,shift:0,i:a,thread:null},i.push(r)}},firstWalk:function(e,t){var n=e.isExpand?e.children:[],i=e.parentNode.children,a=e.hierNode.i?i[e.hierNode.i-1]:null;if(n.length){!function(e){var t=e.children,n=t.length,i=0,a=0;for(;--n>=0;){var r=t[n];r.hierNode.prelim+=i,r.hierNode.modifier+=i,a+=r.hierNode.change,i+=r.hierNode.shift+a}}(e);var r=(n[0].hierNode.prelim+n[n.length-1].hierNode.prelim)/2;a?(e.hierNode.prelim=a.hierNode.prelim+t(e,a),e.hierNode.modifier=e.hierNode.prelim-r):e.hierNode.prelim=r}else a&&(e.hierNode.prelim=a.hierNode.prelim+t(e,a));e.parentNode.hierNode.defaultAncestor=function(e,t,n,i){if(t){for(var a=e,r=e,o=r.parentNode.children[0],s=t,l=a.hierNode.modifier,u=r.hierNode.modifier,c=o.hierNode.modifier,h=s.hierNode.modifier;s=HS(s),r=YS(r),s&&r;){a=HS(a),o=YS(o),a.hierNode.ancestor=e;var d=s.hierNode.prelim+h-r.hierNode.prelim-u+i(s,r);d>0&&(GS(FS(s,e,n),e,d),u+=d,l+=d),h+=s.hierNode.modifier,u+=r.hierNode.modifier,l+=a.hierNode.modifier,c+=o.hierNode.modifier}s&&!HS(a)&&(a.hierNode.thread=s,a.hierNode.modifier+=h-l),r&&!YS(o)&&(o.hierNode.thread=r,o.hierNode.modifier+=u-c,n=e)}return n}(e,a,e.parentNode.hierNode.defaultAncestor||i[0],t)},secondWalk:function(e){var t=e.hierNode.prelim+e.parentNode.hierNode.modifier;e.setLayout({x:t},!0),e.hierNode.modifier+=e.parentNode.hierNode.modifier},separation:function(e){return arguments.length?e:WS},radialCoordinate:function(e,t){var n={};return e-=Math.PI/2,n.x=t*Math.cos(e),n.y=t*Math.sin(e),n},getViewRect:function(e,t){return Uu.getLayoutRect(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}},US=jS.radialCoordinate,ZS=Jw.onIrrelevantElement,XS=Au.parsePercent,qS=lu.extendShape({shape:{parentPoint:[],childPoints:[],orient:"",forkPosition:""},style:{stroke:"#000",fill:null},buildPath:function(e,t){var n=t.childPoints,i=n.length,a=t.parentPoint,r=n[0],o=n[i-1];if(1===i)return e.moveTo(a[0],a[1]),void e.lineTo(r[0],r[1]);var s=t.orient,l="TB"===s||"BT"===s?0:1,u=1-l,c=XS(t.forkPosition,1),h=[];h[l]=a[l],h[u]=a[u]+(o[u]-a[u])*c,e.moveTo(a[0],a[1]),e.lineTo(h[0],h[1]),e.moveTo(r[0],r[1]),h[l]=r[l],e.lineTo(h[0],h[1]),h[l]=o[l],e.lineTo(h[0],h[1]),e.lineTo(o[0],o[1]);for(var d=1;d<i-1;d++){var f=n[d];e.moveTo(f[0],f[1]),h[l]=f[l],e.lineTo(h[0],h[1])}}});ry.extendChartView({type:"tree",init:function(e,t){this._oldTree,this._mainGroup=new lu.Group,this._controller=new Kw(t.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},render:function(e,t,n,i){var a=e.getData(),r=e.layoutInfo,o=this._mainGroup,s=e.get("layout");"radial"===s?o.attr("position",[r.x+r.width/2,r.y+r.height/2]):o.attr("position",[r.x,r.y]),this._updateViewCoordSys(e,r,s),this._updateController(e,t,n);var l=this._data,u={expandAndCollapse:e.get("expandAndCollapse"),layout:s,edgeShape:e.get("edgeShape"),edgeForkPosition:e.get("edgeForkPosition"),orient:e.getOrient(),curvature:e.get("lineStyle.curveness"),symbolRotate:e.get("symbolRotate"),symbolOffset:e.get("symbolOffset"),hoverAnimation:e.get("hoverAnimation"),useNameLabel:!0,fadeIn:!0};a.diff(l).add((function(t){KS(a,t)&&$S(a,t,null,o,e,u)})).update((function(t,n){var i=l.getItemGraphicEl(n);KS(a,t)?$S(a,t,i,o,e,u):i&&JS(l,n,i,o,e,u)})).remove((function(t){var n=l.getItemGraphicEl(t);n&&JS(l,t,n,o,e,u)})).execute(),this._nodeScaleRatio=e.get("nodeScaleRatio"),this._updateNodeAndLinkScale(e),!0===u.expandAndCollapse&&a.eachItemGraphicEl((function(t,i){t.off("click").on("click",(function(){n.dispatchAction({type:"treeExpandAndCollapse",seriesId:e.id,dataIndex:i})}))})),this._data=a},_updateViewCoordSys:function(e){var t=e.getData(),n=[];t.each((function(e){var i=t.getItemLayout(e);!i||isNaN(i.x)||isNaN(i.y)||n.push([+i.x,+i.y])}));var i=[],a=[];ao.fromPoints(n,i,a);var r=this._min,o=this._max;a[0]-i[0]==0&&(i[0]=r?r[0]:i[0]-1,a[0]=o?o[0]:a[0]+1),a[1]-i[1]==0&&(i[1]=r?r[1]:i[1]-1,a[1]=o?o[1]:a[1]+1);var s=e.coordinateSystem=new pS;s.zoomLimit=e.get("scaleLimit"),s.setBoundingRect(i[0],i[1],a[0]-i[0],a[1]-i[1]),s.setCenter(e.get("center")),s.setZoom(e.get("zoom")),this.group.attr({position:s.position,scale:s.scale}),this._viewCoordSys=s,this._min=i,this._max=a},_updateController:function(e,t,n){var i=this._controller,a=this._controllerHost,r=this.group;i.setPointerChecker((function(t,i,a){var o=r.getBoundingRect();return o.applyTransform(r.transform),o.contain(i,a)&&!ZS(t,n,e)})),i.enable(e.get("roam")),a.zoomLimit=e.get("scaleLimit"),a.zoom=e.coordinateSystem.getZoom(),i.off("pan").off("zoom").on("pan",(function(t){Qw.updateViewOnPan(a,t.dx,t.dy),n.dispatchAction({seriesId:e.id,type:"treeRoam",dx:t.dx,dy:t.dy})}),this).on("zoom",(function(t){Qw.updateViewOnZoom(a,t.scale,t.originX,t.originY),n.dispatchAction({seriesId:e.id,type:"treeRoam",zoom:t.scale,originX:t.originX,originY:t.originY}),this._updateNodeAndLinkScale(e)}),this)},_updateNodeAndLinkScale:function(e){var t=e.getData(),n=this._getNodeGlobalScale(e),i=[n,n];t.eachItemGraphicEl((function(e,t){e.attr("scale",i)}))},_getNodeGlobalScale:function(e){var t=e.coordinateSystem;if("view"!==t.type)return 1;var n=this._nodeScaleRatio,i=t.scale,a=i&&i[0]||1;return((t.getZoom()-1)*n+1)/a},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={}},remove:function(){this._mainGroup.removeAll(),this._data=null}});function KS(e,t){var n=e.getItemLayout(t);return n&&!isNaN(n.x)&&!isNaN(n.y)&&"none"!==e.getItemVisual(t,"symbol")}function QS(e,t,n){return n.itemModel=t,n.itemStyle=t.getModel("itemStyle").getItemStyle(),n.hoverItemStyle=t.getModel("emphasis.itemStyle").getItemStyle(),n.lineStyle=t.getModel("lineStyle").getLineStyle(),n.labelModel=t.getModel("label"),n.hoverLabelModel=t.getModel("emphasis.label"),!1===e.isExpand&&0!==e.children.length?n.symbolInnerColor=n.itemStyle.fill:n.symbolInnerColor="#fff",n}function $S(e,t,n,i,a,r){var o=!n,s=e.tree.getNodeByDataIndex(t),l=s.getModel(),u=(r=QS(s,l,r),e.tree.root),c=s.parentNode===u?s:s.parentNode||s,h=e.getItemGraphicEl(c.dataIndex),d=c.getLayout(),f=h?{x:h.position[0],y:h.position[1],rawX:h.__radialOldRawX,rawY:h.__radialOldRawY}:d,p=s.getLayout();o?(n=new by(e,t,r)).attr("position",[f.x,f.y]):n.updateData(e,t,r),n.__radialOldRawX=n.__radialRawX,n.__radialOldRawY=n.__radialRawY,n.__radialRawX=p.rawX,n.__radialRawY=p.rawY,i.add(n),e.setItemGraphicEl(t,n),lu.updateProps(n,{position:[p.x,p.y]},a);var g=n.getSymbolPath();if("radial"===r.layout){var m,v,y=u.children[0],_=y.getLayout(),x=y.children.length;if(p.x===_.x&&!0===s.isExpand){var b={};b.x=(y.children[0].getLayout().x+y.children[x-1].getLayout().x)/2,b.y=(y.children[0].getLayout().y+y.children[x-1].getLayout().y)/2,(m=Math.atan2(b.y-_.y,b.x-_.x))<0&&(m=2*Math.PI+m),(v=b.x<_.x)&&(m-=Math.PI)}else(m=Math.atan2(p.y-_.y,p.x-_.x))<0&&(m=2*Math.PI+m),0===s.children.length||0!==s.children.length&&!1===s.isExpand?(v=p.x<_.x)&&(m-=Math.PI):(v=p.x>_.x)||(m-=Math.PI);var w=v?"left":"right",S=r.labelModel.get("rotate"),M=S*(Math.PI/180);g.setStyle({textPosition:r.labelModel.get("position")||w,textRotation:null==S?-m:M,textOrigin:"center",verticalAlign:"middle"})}!function(e,t,n,i,a,r,o,s,l){var u=l.edgeShape,c=i.__edge;if("curve"===u)t.parentNode&&t.parentNode!==n&&(c||(c=i.__edge=new lu.BezierCurve({shape:eM(l,a,a),style:Ie.defaults({opacity:0,strokeNoScale:!0},l.lineStyle)})),lu.updateProps(c,{shape:eM(l,r,o),style:{opacity:1}},e));else if("polyline"===u&&"orthogonal"===l.layout&&t!==n&&t.children&&0!==t.children.length&&!0===t.isExpand){for(var h=t.children,d=[],f=0;f<h.length;f++){var p=h[f].getLayout();d.push([p.x,p.y])}c||(c=i.__edge=new qS({shape:{parentPoint:[o.x,o.y],childPoints:[[o.x,o.y]],orient:l.orient,forkPosition:l.edgeForkPosition},style:Ie.defaults({opacity:0,strokeNoScale:!0},l.lineStyle)})),lu.updateProps(c,{shape:{parentPoint:[o.x,o.y],childPoints:d},style:{opacity:1}},e)}s.add(c)}(a,s,u,n,f,d,p,i,r)}function JS(e,t,n,i,a,r){for(var o,s=e.tree.getNodeByDataIndex(t),l=e.tree.root,u=s.getModel(),c=(r=QS(s,u,r),s.parentNode===l?s:s.parentNode||s),h=r.edgeShape;null==(o=c.getLayout());)c=c.parentNode===l?c:c.parentNode||c;lu.updateProps(n,{position:[o.x+1,o.y+1]},a,(function(){i.remove(n),e.setItemGraphicEl(t,null)})),n.fadeOut(null,{keepLabel:!0});var d=e.getItemGraphicEl(c.dataIndex).__edge,f=n.__edge||(!1===c.isExpand||1===c.children.length?d:void 0);h=r.edgeShape;f&&("curve"===h?lu.updateProps(f,{shape:eM(r,o,o),style:{opacity:0}},a,(function(){i.remove(f)})):"polyline"===h&&"orthogonal"===r.layout&&lu.updateProps(f,{shape:{parentPoint:[o.x,o.y],childPoints:[[o.x,o.y]]},style:{opacity:0}},a,(function(){i.remove(f)})))}function eM(e,t,n){var i,a,r,o,s,l,u,c,h=e.orient;if("radial"===e.layout){s=t.rawX,u=t.rawY,l=n.rawX,c=n.rawY;var d=US(s,u),f=US(s,u+(c-u)*e.curvature),p=US(l,c+(u-c)*e.curvature),g=US(l,c);return{x1:d.x,y1:d.y,x2:g.x,y2:g.y,cpx1:f.x,cpy1:f.y,cpx2:p.x,cpy2:p.y}}return s=t.x,u=t.y,l=n.x,c=n.y,"LR"!==h&&"RL"!==h||(i=s+(l-s)*e.curvature,a=u,r=l+(s-l)*e.curvature,o=c),"TB"!==h&&"BT"!==h||(i=s,a=u+(c-u)*e.curvature,r=l,o=c+(u-c)*e.curvature),{x1:s,y1:u,x2:l,y2:c,cpx1:i,cpy1:a,cpx2:r,cpy2:o}}var tM=lS.updateCenterAndZoom;ry.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},(function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},(function(t){var n=e.dataIndex,i=t.getData().tree.getNodeByDataIndex(n);i.isExpand=!i.isExpand}))})),ry.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},(function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},(function(t){var n=t.coordinateSystem,i=tM(n,e);t.setCenter&&t.setCenter(i.center),t.setZoom&&t.setZoom(i.zoom)}))}));var nM={eachAfter:function(e,t,n){for(var i,a=[e],r=[];i=a.pop();)if(r.push(i),i.isExpand){var o=i.children;if(o.length)for(var s=0;s<o.length;s++)a.push(o[s])}for(;i=r.pop();)t(i,n)},eachBefore:function(e,t){for(var n,i=[e];n=i.pop();)if(t(n),n.isExpand){var a=n.children;if(a.length)for(var r=a.length-1;r>=0;r--)i.push(a[r])}}},iM=nM.eachAfter,aM=nM.eachBefore,rM=jS.init,oM=jS.firstWalk,sM=jS.secondWalk,lM=jS.separation,uM=jS.radialCoordinate,cM=jS.getViewRect;var hM=function(e,t){e.eachSeriesByType("tree",(function(e){!function(e,t){var n=cM(e,t);e.layoutInfo=n;var i=e.get("layout"),a=0,r=0,o=null;"radial"===i?(a=2*Math.PI,r=Math.min(n.height,n.width)/2,o=lM((function(e,t){return(e.parentNode===t.parentNode?1:2)/e.depth}))):(a=n.width,r=n.height,o=lM());var s=e.getData().tree.root,l=s.children[0];if(l){rM(s),iM(l,oM,o),s.hierNode.modifier=-l.hierNode.prelim,aM(l,sM);var u=l,c=l,h=l;aM(l,(function(e){var t=e.getLayout().x;t<u.getLayout().x&&(u=e),t>c.getLayout().x&&(c=e),e.depth>h.depth&&(h=e)}));var d=u===c?1:o(u,c)/2,f=d-u.getLayout().x,p=0,g=0,m=0,v=0;if("radial"===i)p=a/(c.getLayout().x+d+f),g=r/(h.depth-1||1),aM(l,(function(e){m=(e.getLayout().x+f)*p,v=(e.depth-1)*g;var t=uM(m,v);e.setLayout({x:t.x,y:t.y,rawX:m,rawY:v},!0)}));else{var y=e.getOrient();"RL"===y||"LR"===y?(g=r/(c.getLayout().x+d+f),p=a/(h.depth-1||1),aM(l,(function(e){v=(e.getLayout().x+f)*g,m="LR"===y?(e.depth-1)*p:a-(e.depth-1)*p,e.setLayout({x:m,y:v},!0)}))):"TB"!==y&&"BT"!==y||(p=a/(c.getLayout().x+d+f),g=r/(h.depth-1||1),aM(l,(function(e){m=(e.getLayout().x+f)*p,v="TB"===y?(e.depth-1)*g:r-(e.depth-1)*g,e.setLayout({x:m,y:v},!0)})))}}}(e,t)}))};function dM(e){for(var t=[];e;)(e=e.parentNode)&&t.push(e);return t.reverse()}ry.registerVisual(d_("tree","circle")),ry.registerLayout(hM);var fM={retrieveTargetInfo:function(e,t,n){if(e&&Ie.indexOf(t,e.type)>=0){var i=n.getData().tree.root,a=e.targetNode;if("string"==typeof a&&(a=i.getNodeById(a)),a&&i.contains(a))return{node:a};var r=e.targetNodeId;if(null!=r&&(a=i.getNodeById(r)))return{node:a}}},getPathToRoot:dM,aboveViewRoot:function(e,t){var n=dM(e);return Ie.indexOf(n,t)>=0},wrapTreePathInfo:function(e,t){for(var n=[];e;){var i=e.dataIndex;n.push({name:e.name,dataIndex:i,value:t.getRawValue(i)}),e=e.parentNode}return n.reverse(),n}},pM=Pu.encodeHTML,gM=Pu.addCommas,mM=fM.wrapTreePathInfo;Yd.extend({type:"series.treemap",layoutMode:"box",dependencies:["grid","polar"],preventUsingHoverLayer:!0,_viewRoot:null,defaultOption:{progressive: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(e,t){var n={name:e.name,children:e.data};!function e(t){var n=0;Ie.each(t.children,(function(t){e(t);var i=t.value;Ie.isArray(i)&&(i=i[0]),n+=i}));var i=t.value;Ie.isArray(i)&&(i=i[0]);(null==i||isNaN(i))&&(i=n);i<0&&(i=0);Ie.isArray(t.value)?t.value[0]=i:t.value=i}(n);var i=e.levels||[];i=e.levels=function(e,t){var n,i=t.get("color");if(!i)return;if(e=e||[],Ie.each(e,(function(e){var t=new bu(e),i=t.get("color");(t.get("itemStyle.color")||i&&"none"!==i)&&(n=!0)})),!n){(e[0]||(e[0]={})).color=i.slice()}return e}(i,t);var a=Ie.map(i||[],(function(e){return new bu(e,this,t)}),this),r=BS.createTree(n,this,null,(function(e){e.wrapMethod("getItemModel",(function(e,t){var n=r.getNodeByDataIndex(t),i=a[n.depth];return i&&(e.parentModel=i),e}))}));return r.data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(e){var t=this.getData(),n=this.getRawValue(e),i=Ie.isArray(n)?gM(n[0]):gM(n),a=t.getName(e);return pM(a+": "+i)},getDataParams:function(e){var t=Yd.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(e);return t.treePathInfo=mM(n,this),t},setLayoutInfo:function(e){this.layoutInfo=this.layoutInfo||{},Ie.extend(this.layoutInfo,e)},mapIdToIndex:function(e){var t=this._idIndexMap;t||(t=this._idIndexMap=Ie.createHashMap(),this._idIndexMapCount=0);var n=t.get(e);return null==n&&t.set(e,n=this._idIndexMapCount++),n},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(e){e?this._viewRoot=e:e=this._viewRoot;var t=this.getRawData().tree.root;e&&(e===t||t.contains(e))||(this._viewRoot=t)}});var vM=fM.wrapTreePathInfo;function yM(e){this.group=new lu.Group,e.add(this.group)}function _M(e,t,n,i,a,r){var o=[[a?e:e-5,t],[e+n,t],[e+n,t+i],[a?e:e-5,t+i]];return!r&&o.splice(2,0,[e+n+5,t+i/2]),!a&&o.push([e,t+i/2]),o}function xM(e,t,n){e.eventData={componentType:"series",componentSubType:"treemap",componentIndex:t.componentIndex,seriesIndex:t.componentIndex,seriesName:t.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:n&&n.dataIndex,name:n&&n.name},treePathInfo:n&&vM(n,t)}}yM.prototype={constructor:yM,render:function(e,t,n,i){var a=e.getModel("breadcrumb"),r=this.group;if(r.removeAll(),a.get("show")&&n){var o=a.getModel("itemStyle"),s=o.getModel("textStyle"),l={pos:{left:a.get("left"),right:a.get("right"),top:a.get("top"),bottom:a.get("bottom")},box:{width:t.getWidth(),height:t.getHeight()},emptyItemWidth:a.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(n,l,s),this._renderContent(e,l,o,s,i),Uu.positionElement(r,l.pos,l.box)}},_prepare:function(e,t,n){for(var i=e;i;i=i.parentNode){var a=i.getModel().get("name"),r=n.getTextRect(a),o=Math.max(r.width+16,t.emptyItemWidth);t.totalWidth+=o+8,t.renderList.push({node:i,text:a,width:o})}},_renderContent:function(e,t,n,i,a){for(var r=0,o=t.emptyItemWidth,s=e.get("breadcrumb.height"),l=Uu.getAvailableSize(t.pos,t.box),u=t.totalWidth,c=t.renderList,h=c.length-1;h>=0;h--){var d=c[h],f=d.node,p=d.width,g=d.text;u>l.width&&(u-=p-o,p=o,g=null);var m=new lu.Polygon({shape:{points:_M(r,0,p,s,h===c.length-1,0===h)},style:Ie.defaults(n.getItemStyle(),{lineJoin:"bevel",text:g,textFill:i.getTextColor(),textFont:i.getFont()}),z:10,onclick:Ie.curry(a,f)});this.group.add(m),xM(m,e,f),r+=p+8}},remove:function(){this.group.removeAll()}};var bM=yM;var wM={createWrap:function(){var e,t=[],n={};return{add:function(e,i,a,r,o){return Ie.isString(r)&&(o=r,r=0),!n[e.id]&&(n[e.id]=1,t.push({el:e,target:i,time:a,delay:r,easing:o}),!0)},done:function(t){return e=t,this},start:function(){for(var i=t.length,a=0,r=t.length;a<r;a++){var o=t[a];o.el.animateTo(o.target,o.time,o.delay,o.easing,s)}return this;function s(){--i||(t.length=0,n={},e&&e())}}}}},SM=Pu.windowOpen,MM=Ie.bind,TM=lu.Group,IM=lu.Rect,AM=Ie.each,DM=["label"],CM=["emphasis","label"],OM=["upperLabel"],kM=["emphasis","upperLabel"],LM=Or([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),EM=function(e){var t=LM(e);return t.stroke=t.fill=t.lineWidth=null,t};ry.extendChartView({type:"treemap",init:function(e,t){this._containerGroup,this._storage={nodeGroup:[],background:[],content:[]},this._oldTree,this._breadcrumb,this._controller,this._state="ready"},render:function(e,t,n,i){var a=t.findComponents({mainType:"series",subType:"treemap",query:i});if(!(Ie.indexOf(a,e)<0)){this.seriesModel=e,this.api=n,this.ecModel=t;var r=fM.retrieveTargetInfo(i,["treemapZoomToNode","treemapRootToNode"],e),o=i&&i.type,s=e.layoutInfo,l=!this._oldTree,u=this._storage,c="treemapRootToNode"===o&&r&&u?{rootNodeGroup:u.nodeGroup[r.node.getRawIndex()],direction:i.direction}:null,h=this._giveContainerGroup(s),d=this._doRender(h,e,c);l||o&&"treemapZoomToNode"!==o&&"treemapRootToNode"!==o?d.renderFinally():this._doAnimation(h,d,e,c),this._resetController(n),this._renderBreadcrumb(e,n,r)}},_giveContainerGroup:function(e){var t=this._containerGroup;return t||(t=this._containerGroup=new TM,this._initEvents(t),this.group.add(t)),t.attr("position",[e.x,e.y]),t},_doRender:function(e,t,n){var i=t.getData().tree,a=this._oldTree,r={nodeGroup:[],background:[],content:[]},o={nodeGroup:[],background:[],content:[]},s=this._storage,l=[],u=Ie.curry(NM,t,o,s,n,r,l);!function e(t,n,i,a,r){a?(n=t,AM(t,(function(e,t){!e.isRemoved()&&s(t,t)}))):new Lp(n,t,o,o).add(s).update(s).remove(Ie.curry(s,null)).execute();function o(e){return e.getId()}function s(o,s){var l=null!=o?t[o]:null,c=null!=s?n[s]:null,h=u(l,c,i,r);h&&e(l&&l.viewChildren||[],c&&c.viewChildren||[],h,a,r+1)}}(i.root?[i.root]:[],a&&a.root?[a.root]:[],e,i===a||!a,0);var c=function(e){var t={nodeGroup:[],background:[],content:[]};return e&&AM(e,(function(e,n){var i=t[n];AM(e,(function(e){e&&(i.push(e),e.__tmWillDelete=1)}))})),t}(s);return this._oldTree=i,this._storage=o,{lastsForAnimation:r,willDeleteEls:c,renderFinally:function(){AM(c,(function(e){AM(e,(function(e){e.parent&&e.parent.remove(e)}))})),AM(l,(function(e){e.invisible=!0,e.dirty()}))}}},_doAnimation:function(e,t,n,i){if(n.get("animation")){var a=n.get("animationDurationUpdate"),r=n.get("animationEasing"),o=wM.createWrap();AM(t.willDeleteEls,(function(e,t){AM(e,(function(e,n){if(!e.invisible){var s,l=e.parent;if(i&&"drillDown"===i.direction)s=l===i.rootNodeGroup?{shape:{x:0,y:0,width:l.__tmNodeWidth,height:l.__tmNodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var u=0,c=0;l.__tmWillDelete||(u=l.__tmNodeWidth/2,c=l.__tmNodeHeight/2),s="nodeGroup"===t?{position:[u,c],style:{opacity:0}}:{shape:{x:u,y:c,width:0,height:0},style:{opacity:0}}}s&&o.add(e,s,a,r)}}))})),AM(this._storage,(function(e,n){AM(e,(function(e,i){var s=t.lastsForAnimation[n][i],l={};s&&("nodeGroup"===n?s.old&&(l.position=e.position.slice(),e.attr("position",s.old)):(s.old&&(l.shape=Ie.extend({},e.shape),e.setShape(s.old)),s.fadein?(e.setStyle("opacity",0),l.style={opacity:1}):1!==e.style.opacity&&(l.style={opacity:1})),o.add(e,l,a,r))}))}),this),this._state="animating",o.done(MM((function(){this._state="ready",t.renderFinally()}),this)).start()}},_resetController:function(e){var t=this._controller;t||((t=this._controller=new Kw(e.getZr())).enable(this.seriesModel.get("roam")),t.on("pan",MM(this._onPan,this)),t.on("zoom",MM(this._onZoom,this)));var n=new Hn(0,0,e.getWidth(),e.getHeight());t.setPointerChecker((function(e,t,i){return n.contain(t,i)}))},_clearController:function(){var e=this._controller;e&&(e.dispose(),e=null)},_onPan:function(e){if("animating"!==this._state&&(Math.abs(e.dx)>3||Math.abs(e.dy)>3)){var t=this.seriesModel.getData().tree.root;if(!t)return;var n=t.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+e.dx,y:n.y+e.dy,width:n.width,height:n.height}})}},_onZoom:function(e){var t=e.originX,n=e.originY;if("animating"!==this._state){var i=this.seriesModel.getData().tree.root;if(!i)return;var a=i.getLayout();if(!a)return;var r=new Hn(a.x,a.y,a.width,a.height),o=this.seriesModel.layoutInfo;t-=o.x,n-=o.y;var s=yt.create();yt.translate(s,s,[-t,-n]),yt.scale(s,s,[e.scale,e.scale]),yt.translate(s,s,[t,n]),r.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:r.x,y:r.y,width:r.width,height:r.height}})}},_initEvents:function(e){e.on("click",(function(e){if("ready"===this._state){var t=this.seriesModel.get("nodeClick",!0);if(t){var n=this.findTarget(e.offsetX,e.offsetY);if(n){var i=n.node;if(i.getLayout().isLeafRoot)this._rootToNode(n);else if("zoomToNode"===t)this._zoomToNode(n);else if("link"===t){var a=i.hostTree.data.getItemModel(i.dataIndex),r=a.get("link",!0),o=a.get("target",!0)||"blank";r&&SM(r,o)}}}}}),this)},_renderBreadcrumb:function(e,t,n){n||(n=null!=e.get("leafDepth",!0)?{node:e.getViewRoot()}:this.findTarget(t.getWidth()/2,t.getHeight()/2))||(n={node:e.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new bM(this.group))).render(e,t,n.node,MM((function(t){"animating"!==this._state&&(fM.aboveViewRoot(e.getViewRoot(),t)?this._rootToNode({node:t}):this._zoomToNode({node:t}))}),this))},remove:function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage={nodeGroup:[],background:[],content:[]},this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},dispose:function(){this._clearController()},_zoomToNode:function(e){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},_rootToNode:function(e){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},findTarget:function(e,t){var n;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},(function(i){var a=this._storage.background[i.getRawIndex()];if(a){var r=a.transformCoordToLocal(e,t),o=a.shape;if(!(o.x<=r[0]&&r[0]<=o.x+o.width&&o.y<=r[1]&&r[1]<=o.y+o.height))return!1;n={node:i,offsetX:r[0],offsetY:r[1]}}}),this),n}});function NM(e,t,n,i,a,r,o,s,l,u){if(o){var c=o.getLayout(),h=e.getData();if(h.setItemGraphicEl(o.dataIndex,null),c&&c.isInView){var d=c.width,f=c.height,p=c.borderWidth,g=c.invisible,m=o.getRawIndex(),v=s&&s.getRawIndex(),y=o.viewChildren,_=c.upperHeight,x=y&&y.length,b=o.getModel("itemStyle"),w=o.getModel("emphasis.itemStyle"),S=O("nodeGroup",TM);if(S){if(l.add(S),S.attr("position",[c.x||0,c.y||0]),S.__tmNodeWidth=d,S.__tmNodeHeight=f,c.isAboveViewRoot)return S;var M=o.getModel(),T=O("background",IM,u,1);if(T&&function(t,n,i){if(n.dataIndex=o.dataIndex,n.seriesIndex=e.seriesIndex,n.setShape({x:0,y:0,width:d,height:f}),g)A(n);else{n.invisible=!1;var a=o.getVisual("borderColor",!0),r=w.get("borderColor"),s=EM(b);s.fill=a;var l=LM(w);if(l.fill=r,i){var u=d-2*p;D(s,l,a,u,_,{x:p,y:0,width:u,height:_})}else s.text=l.text=null;n.setStyle(s),lu.setElementHoverStyle(n,l)}t.add(n)}(S,T,x&&c.upperLabelHeight),x)lu.isHighDownDispatcher(S)&&lu.setAsHighDownDispatcher(S,!1),T&&(lu.setAsHighDownDispatcher(T,!0),h.setItemGraphicEl(o.dataIndex,T));else{var I=O("content",IM,u,2);I&&function(t,n){n.dataIndex=o.dataIndex,n.seriesIndex=e.seriesIndex;var i=Math.max(d-2*p,0),a=Math.max(f-2*p,0);if(n.culling=!0,n.setShape({x:p,y:p,width:i,height:a}),g)A(n);else{n.invisible=!1;var r=o.getVisual("color",!0),s=EM(b);s.fill=r;var l=LM(w);D(s,l,r,i,a),n.setStyle(s),lu.setElementHoverStyle(n,l)}t.add(n)}(S,I),T&&lu.isHighDownDispatcher(T)&&lu.setAsHighDownDispatcher(T,!1),lu.setAsHighDownDispatcher(S,!0),h.setItemGraphicEl(o.dataIndex,S)}return S}}}function A(e){!e.invisible&&r.push(e)}function D(t,n,i,a,r,s){var l=M.get("name"),u=M.getModel(s?OM:DM),h=M.getModel(s?kM:CM),d=u.getShallow("show");lu.setLabelStyle(t,n,u,h,{defaultText:d?l:null,autoColor:i,isRectText:!0,labelFetcher:e,labelDataIndex:o.dataIndex,labelProp:s?"upperLabel":"label"}),C(t,s,c),C(n,s,c),s&&(t.textRect=Ie.clone(s)),t.truncate=d&&u.get("ellipsis")?{outerWidth:a,outerHeight:r,minChar:2}:null}function C(t,n,i){var a=t.text;if(!n&&i.isLeafRoot&&null!=a){var r=e.get("drillDownIcon",!0);t.text=r?r+" "+a:a}}function O(e,r,s,l){var u=null!=v&&n[e][v],c=a[e];return u?(n[e][v]=null,function(e,t,n){(e[m]={}).old="nodeGroup"===n?t.position.slice():Ie.extend({},t.shape)}(c,u,e)):g||((u=new r({z:PM(s,l)})).__tmDepth=s,u.__tmStorageName=e,function(e,t,n){var r=e[m]={},s=o.parentNode;if(s&&(!i||"drillDown"===i.direction)){var l=0,u=0,c=a.background[s.getRawIndex()];!i&&c&&c.old&&(l=c.old.width,u=c.old.height),r.old="nodeGroup"===n?[0,u]:{x:l,y:u,width:0,height:0}}r.fadein="nodeGroup"!==n}(c,0,e)),t[e][m]=u}}function PM(e,t){var n=10*e+t;return(n-1)/n}for(var RM=function(){},zM=["treemapZoomToNode","treemapRender","treemapMove"],BM=0;BM<zM.length;BM++)ry.registerAction({type:zM[BM],update:"updateView"},RM);ry.registerAction({type:"treemapRootToNode",update:"updateView"},(function(e,t){t.eachComponent({mainType:"series",subType:"treemap",query:e},(function(t,n){var i=fM.retrieveTargetInfo(e,["treemapZoomToNode","treemapRootToNode"],t);if(i){var a=t.getViewRoot();a&&(e.direction=fM.aboveViewRoot(a,i.node)?"rollUp":"drillDown"),t.resetViewRoot(i.node)}}))}));var VM=Au.linearMap,HM=Ie.each,YM=Ie.isObject,FM=function(e){var t=e.mappingMethod,n=e.type,i=this.option=Ie.clone(e);this.type=n,this.mappingMethod=t,this._normalizeData=JM[t];var a=GM[n];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._doMap=a._doMap[t],"piecewise"===t?(WM(i),function(e){var t=e.pieceList;e.hasSpecialVisual=!1,Ie.each(t,(function(t,n){t.originIndex=n,null!=t.visual&&(e.hasSpecialVisual=!0)}))}(i)):"category"===t?i.categories?function(e){var t=e.categories,n=e.visual,i=e.categoryMap={};if(HM(t,(function(e,t){i[e]=t})),!Ie.isArray(n)){var a=[];Ie.isObject(n)?HM(n,(function(e,t){var n=i[t];a[null!=n?n:-1]=e})):a[-1]=n,n=$M(e,a)}for(var r=t.length-1;r>=0;r--)null==n[r]&&(delete i[t[r]],t.pop())}(i):WM(i,!0):(Ie.assert("linear"!==t||i.dataExtent),WM(i))};FM.prototype={constructor:FM,mapValueToVisual:function(e){var t=this._normalizeData(e);return this._doMap(t,e)},getNormalizer:function(){return Ie.bind(this._normalizeData,this)}};var GM=FM.visualHandlers={color:{applyVisual:ZM("color"),getColorMapper:function(){var e=this.option;return Ie.bind("category"===e.mappingMethod?function(e,t){return!t&&(e=this._normalizeData(e)),XM.call(this,e)}:function(t,n,i){var a=!!i;return!n&&(t=this._normalizeData(t)),i=en.fastLerp(t,e.parsedVisual,i),a?i:en.stringify(i,"rgba")},this)},_doMap:{linear:function(e){return en.stringify(en.fastLerp(e,this.option.parsedVisual),"rgba")},category:XM,piecewise:function(e,t){var n=QM.call(this,t);return null==n&&(n=en.stringify(en.fastLerp(e,this.option.parsedVisual),"rgba")),n},fixed:qM}},colorHue:jM((function(e,t){return en.modifyHSL(e,t)})),colorSaturation:jM((function(e,t){return en.modifyHSL(e,null,t)})),colorLightness:jM((function(e,t){return en.modifyHSL(e,null,null,t)})),colorAlpha:jM((function(e,t){return en.modifyAlpha(e,t)})),opacity:{applyVisual:ZM("opacity"),_doMap:KM([0,1])},liftZ:{applyVisual:ZM("liftZ"),_doMap:{linear:qM,category:qM,piecewise:qM,fixed:qM}},symbol:{applyVisual:function(e,t,n){var i=this.mapValueToVisual(e);if(Ie.isString(i))n("symbol",i);else if(YM(i))for(var a in i)i.hasOwnProperty(a)&&n(a,i[a])},_doMap:{linear:UM,category:XM,piecewise:function(e,t){var n=QM.call(this,t);return null==n&&(n=UM.call(this,e)),n},fixed:qM}},symbolSize:{applyVisual:ZM("symbolSize"),_doMap:KM([0,1])}};function WM(e,t){var n=e.visual,i=[];Ie.isObject(n)?HM(n,(function(e){i.push(e)})):null!=n&&i.push(n);t||1!==i.length||{color:1,symbol:1}.hasOwnProperty(e.type)||(i[1]=i[0]),$M(e,i)}function jM(e){return{applyVisual:function(t,n,i){t=this.mapValueToVisual(t),i("color",e(n("color"),t))},_doMap:KM([0,1])}}function UM(e){var t=this.option.visual;return t[Math.round(VM(e,[0,1],[0,t.length-1],!0))]||{}}function ZM(e){return function(t,n,i){i(e,this.mapValueToVisual(t))}}function XM(e){var t=this.option.visual;return t[this.option.loop&&-1!==e?e%t.length:e]}function qM(){return this.option.visual[0]}function KM(e){return{linear:function(t){return VM(t,e,this.option.visual,!0)},category:XM,piecewise:function(t,n){var i=QM.call(this,n);return null==i&&(i=VM(t,e,this.option.visual,!0)),i},fixed:qM}}function QM(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var i=n[FM.findPieceIndex(e,n)];if(i&&i.visual)return i.visual[this.type]}}function $M(e,t){return e.visual=t,"color"===e.type&&(e.parsedVisual=Ie.map(t,(function(e){return en.parse(e)}))),t}var JM={linear:function(e){return VM(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=FM.findPieceIndex(e,t,!0);if(null!=n)return VM(n,[0,t.length-1],[0,1],!0)},category:function(e){var t=this.option.categories?this.option.categoryMap[e]:e;return null==t?-1:t},fixed:Ie.noop};function eT(e,t,n){return e?t<=n:t<n}FM.listVisualTypes=function(){var e=[];return Ie.each(GM,(function(t,n){e.push(n)})),e},FM.addVisualHandler=function(e,t){GM[e]=t},FM.isValidType=function(e){return GM.hasOwnProperty(e)},FM.eachVisual=function(e,t,n){Ie.isObject(e)?Ie.each(e,t,n):t.call(n,e)},FM.mapVisual=function(e,t,n){var i,a=Ie.isArray(e)?[]:Ie.isObject(e)?{}:(i=!0,null);return FM.eachVisual(e,(function(e,r){var o=t.call(n,e,r);i?a=o:a[r]=o})),a},FM.retrieveVisuals=function(e){var t,n={};return e&&HM(GM,(function(i,a){e.hasOwnProperty(a)&&(n[a]=e[a],t=!0)})),t?n:null},FM.prepareVisualTypes=function(e){if(YM(e)){var t=[];HM(e,(function(e,n){t.push(n)})),e=t}else{if(!Ie.isArray(e))return[];e=e.slice()}return e.sort((function(e,t){return"color"===t&&"color"!==e&&0===e.indexOf("color")?1:-1})),e},FM.dependsOn=function(e,t){return"color"===t?!(!e||0!==e.indexOf(t)):e===t},FM.findPieceIndex=function(e,t,n){for(var i,a=1/0,r=0,o=t.length;r<o;r++){var s=t[r].value;if(null!=s){if(s===e||"string"==typeof s&&s===e+"")return r;n&&h(s,r)}}for(r=0,o=t.length;r<o;r++){var l=t[r],u=l.interval,c=l.close;if(u){if(u[0]===-1/0){if(eT(c[1],e,u[1]))return r}else if(u[1]===1/0){if(eT(c[0],u[0],e))return r}else if(eT(c[0],u[0],e)&&eT(c[1],e,u[1]))return r;n&&h(u[0],r),n&&h(u[1],r)}}if(n)return e===1/0?t.length-1:e===-1/0?0:i;function h(t,n){var r=Math.abs(t-e);r<a&&(a=r,i=n)}};var tT=FM,nT=Ie.isArray;function iT(e){var t=aT(e,"color");if(t){var n=aT(e,"colorAlpha"),i=aT(e,"colorSaturation");return i&&(t=en.modifyHSL(t,null,null,i)),n&&(t=en.modifyAlpha(t,n)),t}}function aT(e,t){var n=e[t];if(null!=n&&"none"!==n)return n}function rT(e,t){var n=e.get(t);return nT(n)&&n.length?{name:t,range:n}:null}var oT={seriesType:"treemap",reset:function(e,t,n,i){var a=e.getData().tree,r=a.root,o=e.getModel("itemStyle");r.isRemoved()||function e(t,n,i,a,r,o){var s=t.getModel(),l=t.getLayout();if(!l||l.invisible||!l.isInView)return;var u,c=t.getModel("itemStyle"),h=i[t.depth],d=function(e,t,n,i){var a=Ie.extend({},t);return Ie.each(["color","colorAlpha","colorSaturation"],(function(r){var o=e.get(r,!0);null==o&&n&&(o=n[r]),null==o&&(o=t[r]),null==o&&(o=i.get(r)),null!=o&&(a[r]=o)})),a}(c,n,h,a),f=c.get("borderColor"),p=c.get("borderColorSaturation");null!=p&&(u=iT(d),f=function(e,t){return null!=t?en.modifyHSL(t,null,null,e):null}(p,u));t.setVisual("borderColor",f);var g=t.viewChildren;if(g&&g.length){var m=function(e,t,n,i,a,r){if(!r||!r.length)return;var o=rT(t,"color")||null!=a.color&&"none"!==a.color&&(rT(t,"colorAlpha")||rT(t,"colorSaturation"));if(!o)return;var s=t.get("visualMin"),l=t.get("visualMax"),u=n.dataExtent.slice();null!=s&&s<u[0]&&(u[0]=s),null!=l&&l>u[1]&&(u[1]=l);var c=t.get("colorMappingBy"),h={type:o.name,dataExtent:u,visual:o.range};"color"!==h.type||"index"!==c&&"id"!==c?h.mappingMethod="linear":(h.mappingMethod="category",h.loop=!0);var d=new tT(h);return d.__drColorMappingBy=c,d}(0,s,l,0,d,g);Ie.each(g,(function(t,n){if(t.depth>=r.length||t===r[t.depth]){var l=function(e,t,n,i,a,r){var o=Ie.extend({},t);if(a){var s=a.type,l="color"===s&&a.__drColorMappingBy,u="index"===l?i:"id"===l?r.mapIdToIndex(n.getId()):n.getValue(e.get("visualDimension"));o[s]=a.mapValueToVisual(u)}return o}(s,d,t,n,m,o);e(t,l,i,a,r,o)}}))}else u=iT(d),t.setVisual("color",u)}(r,{},Ie.map(a.levelModels,(function(e){return e?e.get("itemStyle"):null})),o,e.getViewRoot().getAncestors(),e)}},sT=Au.parsePercent,lT=Au.MAX_SAFE_INTEGER,uT=Math.max,cT=Math.min,hT=Ie.retrieve,dT=Ie.each,fT=["itemStyle","borderWidth"],pT=["itemStyle","gapWidth"],gT=["upperLabel","show"],mT=["upperLabel","height"];function vT(e,t,n){for(var i,a=0,r=1/0,o=0,s=e.length;o<s;o++)(i=e[o].getLayout().area)&&(i<r&&(r=i),i>a&&(a=i));var l=e.area*e.area,u=t*t*n;return l?uT(u*a/l,l/(u*r)):1/0}function yT(e,t,n,i,a){var r=t===n.width?0:1,o=1-r,s=["x","y"],l=["width","height"],u=n[s[r]],c=t?e.area/t:0;(a||c>n[l[o]])&&(c=n[l[o]]);for(var h=0,d=e.length;h<d;h++){var f=e[h],p={},g=c?f.getLayout().area/c:0,m=p[l[o]]=uT(c-2*i,0),v=n[s[r]]+n[l[r]]-u,y=h===d-1||v<g?v:g,_=p[l[r]]=uT(y-2*i,0);p[s[o]]=n[s[o]]+cT(i,m/2),p[s[r]]=u+cT(i,_/2),u+=y,f.setLayout(p,!0)}n[s[o]]+=c,n[l[o]]-=c}function _T(e){return e.get(gT)?e.get(mT):0}var xT={seriesType:"treemap",reset:function(e,t,n,i){var a=n.getWidth(),r=n.getHeight(),o=e.option,s=Uu.getLayoutRect(e.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()}),l=o.size||[],u=sT(hT(s.width,l[0]),a),c=sT(hT(s.height,l[1]),r),h=i&&i.type,d=fM.retrieveTargetInfo(i,["treemapZoomToNode","treemapRootToNode"],e),f="treemapRender"===h||"treemapMove"===h?i.rootRect:null,p=e.getViewRoot(),g=fM.getPathToRoot(p);if("treemapMove"!==h){var m="treemapZoomToNode"===h?function(e,t,n,i,a){var r,o=(t||{}).node,s=[i,a];if(!o||o===n)return s;var l=i*a,u=l*e.option.zoomToNodeRatio;for(;r=o.parentNode;){for(var c=0,h=r.children,d=0,f=h.length;d<f;d++)c+=h[d].getValue();var p=o.getValue();if(0===p)return s;u*=c/p;var g=r.getModel(),m=g.get(fT),v=Math.max(m,_T(g));(u+=4*m*m+(3*m+v)*Math.pow(u,.5))>lT&&(u=lT),o=r}u<l&&(u=l);var y=Math.pow(u/l,.5);return[i*y,a*y]}(e,d,p,u,c):f?[f.width,f.height]:[u,c],v=o.sort;v&&"asc"!==v&&"desc"!==v&&(v="desc");var y={squareRatio:o.squareRatio,sort:v,leafDepth:o.leafDepth};p.hostTree.clearLayouts();var _={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};p.setLayout(_),function e(t,n,i,a){var r,o;if(t.isRemoved())return;var s=t.getLayout();r=s.width,o=s.height;var l=(p=t.getModel()).get(fT),u=p.get(pT)/2,c=_T(p),h=Math.max(l,c),d=l-u,f=h-u,p=t.getModel();t.setLayout({borderWidth:l,upperHeight:h,upperLabelHeight:c},!0),r=uT(r-2*d,0),o=uT(o-d-f,0);var g=r*o,m=function(e,t,n,i,a,r){var o=e.children||[],s=i.sort;"asc"!==s&&"desc"!==s&&(s=null);var l=null!=i.leafDepth&&i.leafDepth<=r;if(a&&!l)return e.viewChildren=[];!function(e,t){t&&e.sort((function(e,n){var i="asc"===t?e.getValue()-n.getValue():n.getValue()-e.getValue();return 0===i?"asc"===t?e.dataIndex-n.dataIndex:n.dataIndex-e.dataIndex:i}))}(o=Ie.filter(o,(function(e){return!e.isRemoved()})),s);var u=function(e,t,n){for(var i=0,a=0,r=t.length;a<r;a++)i+=t[a].getValue();var o=e.get("visualDimension");if(t&&t.length)if("value"===o&&n)s=[t[t.length-1].getValue(),t[0].getValue()],"asc"===n&&s.reverse();else{var s=[1/0,-1/0];dT(t,(function(e){var t=e.getValue(o);t<s[0]&&(s[0]=t),t>s[1]&&(s[1]=t)}))}else s=[NaN,NaN];return{sum:i,dataExtent:s}}(t,o,s);if(0===u.sum)return e.viewChildren=[];if(u.sum=function(e,t,n,i,a){if(!i)return n;for(var r=e.get("visibleMin"),o=a.length,s=o,l=o-1;l>=0;l--){var u=a["asc"===i?o-l-1:l].getValue();u/n*t<r&&(s=l,n-=u)}return"asc"===i?a.splice(0,o-s):a.splice(s,o-s),n}(t,n,u.sum,s,o),0===u.sum)return e.viewChildren=[];for(var c=0,h=o.length;c<h;c++){var d=o[c].getValue()/u.sum*n;o[c].setLayout({area:d})}l&&(o.length&&e.setLayout({isLeafRoot:!0},!0),o.length=0);return e.viewChildren=o,e.setLayout({dataExtent:u.dataExtent},!0),o}(t,p,g,n,i,a);if(!m.length)return;var v={x:d,y:f,width:r,height:o},y=cT(r,o),_=1/0,x=[];x.area=0;for(var b=0,w=m.length;b<w;){var S=m[b];x.push(S),x.area+=S.getLayout().area;var M=vT(x,y,n.squareRatio);M<=_?(b++,_=M):(x.area-=x.pop().getLayout().area,yT(x,y,v,u,!1),y=cT(v.width,v.height),x.length=x.area=0,_=1/0)}x.length&&yT(x,y,v,u,!0);if(!i){var T=p.get("childrenVisibleMin");null!=T&&g<T&&(i=!0)}for(b=0,w=m.length;b<w;b++)e(m[b],n,i,a+1)}(p,y,!1,0);_=p.getLayout();dT(g,(function(e,t){var n=(g[t+1]||p).getValue();e.setLayout(Ie.extend({dataExtent:[n,n],borderWidth:0,upperHeight:0},_))}))}var x=e.getData().tree.root;x.setLayout(function(e,t,n){if(t)return{x:t.x,y:t.y};var i={x:0,y:0};if(!n)return i;var a=n.node,r=a.getLayout();if(!r)return i;var o=[r.width/2,r.height/2],s=a;for(;s;){var l=s.getLayout();o[0]+=l.x,o[1]+=l.y,s=s.parentNode}return{x:e.width/2-o[0],y:e.height/2-o[1]}}(s,f,d),!0),e.setLayoutInfo(s),function e(t,n,i,a,r){var o=t.getLayout(),s=i[r],l=s&&s===t;if(s&&!l||r===i.length&&t!==a)return;t.setLayout({isInView:!0,invisible:!l&&!n.intersect(o),isAboveViewRoot:l},!0);var u=new Hn(n.x-o.x,n.y-o.y,n.width,n.height);dT(t.viewChildren||[],(function(t){e(t,u,i,a,r+1)}))}(x,new Hn(-s.x,-s.y,a,r),g,p,0)}};ry.registerVisual(oT),ry.registerLayout(xT);var bT=Cr.enableClassCheck;function wT(e){return"_EC_"+e}var ST=function(e){this._directed=e||!1,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this.data,this.edgeData},MT=ST.prototype;function TT(e,t){this.id=null==e?"":e,this.inEdges=[],this.outEdges=[],this.edges=[],this.hostGraph,this.dataIndex=null==t?-1:t}function IT(e,t,n){this.node1=e,this.node2=t,this.dataIndex=null==n?-1:n}MT.type="graph",MT.isDirected=function(){return this._directed},MT.addNode=function(e,t){e=null==e?""+t:""+e;var n=this._nodesMap;if(!n[wT(e)]){var i=new TT(e,t);return i.hostGraph=this,this.nodes.push(i),n[wT(e)]=i,i}},MT.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},MT.getNodeById=function(e){return this._nodesMap[wT(e)]},MT.addEdge=function(e,t,n){var i=this._nodesMap,a=this._edgesMap;if("number"==typeof e&&(e=this.nodes[e]),"number"==typeof t&&(t=this.nodes[t]),TT.isInstance(e)||(e=i[wT(e)]),TT.isInstance(t)||(t=i[wT(t)]),e&&t){var r=e.id+"-"+t.id;if(!a[r]){var o=new IT(e,t,n);return o.hostGraph=this,this._directed&&(e.outEdges.push(o),t.inEdges.push(o)),e.edges.push(o),e!==t&&t.edges.push(o),this.edges.push(o),a[r]=o,o}}},MT.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},MT.getEdge=function(e,t){TT.isInstance(e)&&(e=e.id),TT.isInstance(t)&&(t=t.id);var n=this._edgesMap;return this._directed?n[e+"-"+t]:n[e+"-"+t]||n[t+"-"+e]},MT.eachNode=function(e,t){for(var n=this.nodes,i=n.length,a=0;a<i;a++)n[a].dataIndex>=0&&e.call(t,n[a],a)},MT.eachEdge=function(e,t){for(var n=this.edges,i=n.length,a=0;a<i;a++)n[a].dataIndex>=0&&n[a].node1.dataIndex>=0&&n[a].node2.dataIndex>=0&&e.call(t,n[a],a)},MT.breadthFirstTraverse=function(e,t,n,i){if(TT.isInstance(t)||(t=this._nodesMap[wT(t)]),t){for(var a="out"===n?"outEdges":"in"===n?"inEdges":"edges",r=0;r<this.nodes.length;r++)this.nodes[r].__visited=!1;if(!e.call(i,t,null))for(var o=[t];o.length;){var s=o.shift(),l=s[a];for(r=0;r<l.length;r++){var u=l[r],c=u.node1===s?u.node2:u.node1;if(!c.__visited){if(e.call(i,c,s))return;o.push(c),c.__visited=!0}}}}},MT.update=function(){for(var e=this.data,t=this.edgeData,n=this.nodes,i=this.edges,a=0,r=n.length;a<r;a++)n[a].dataIndex=-1;for(a=0,r=e.count();a<r;a++)n[e.getRawIndex(a)].dataIndex=a;t.filterSelf((function(e){var n=i[t.getRawIndex(e)];return n.node1.dataIndex>=0&&n.node2.dataIndex>=0}));for(a=0,r=i.length;a<r;a++)i[a].dataIndex=-1;for(a=0,r=t.count();a<r;a++)i[t.getRawIndex(a)].dataIndex=a},MT.clone=function(){for(var e=new ST(this._directed),t=this.nodes,n=this.edges,i=0;i<t.length;i++)e.addNode(t[i].id,t[i].dataIndex);for(i=0;i<n.length;i++){var a=n[i];e.addEdge(a.node1.id,a.node2.id,a.dataIndex)}return e},TT.prototype={constructor:TT,degree:function(){return this.edges.length},inDegree:function(){return this.inEdges.length},outDegree:function(){return this.outEdges.length},getModel:function(e){if(!(this.dataIndex<0))return this.hostGraph.data.getItemModel(this.dataIndex).getModel(e)}},IT.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(e)};var AT=function(e,t){return{getValue:function(n){var i=this[e][t];return i.get(i.getDimension(n||"value"),this.dataIndex)},setVisual:function(n,i){this.dataIndex>=0&&this[e][t].setItemVisual(this.dataIndex,n,i)},getVisual:function(n,i){return this[e][t].getItemVisual(this.dataIndex,n,i)},setLayout:function(n,i){this.dataIndex>=0&&this[e][t].setItemLayout(this.dataIndex,n,i)},getLayout:function(){return this[e][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[e][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[e][t].getRawIndex(this.dataIndex)}}};Ie.mixin(TT,AT("hostGraph","data")),Ie.mixin(IT,AT("hostGraph","edgeData")),ST.Node=TT,ST.Edge=IT,bT(TT),bT(IT);var DT=ST;var CT=function(e,t,n,i,a){for(var r=new DT(i),o=0;o<e.length;o++)r.addNode(Ie.retrieve(e[o].id,e[o].name,o),o);var s=[],l=[],u=0;for(o=0;o<t.length;o++){var c=t[o],h=c.source,d=c.target;r.addEdge(h,d,u)&&(l.push(c),s.push(Ie.retrieve(c.id,h+" > "+d)),u++)}var f,p=n.get("coordinateSystem");if("cartesian2d"===p||"polar"===p)f=Yg(e,n);else{var g=ch.get(p),m=g&&"view"!==g.type&&g.dimensions||[];Ie.indexOf(m,"value")<0&&m.concat(["value"]);var v=Mg(e,{coordDimensions:m});(f=new cg(v,n)).initData(e)}var y=new cg(["value"],n);return y.initData(l,s),a&&a(f,y),PS({mainData:f,struct:r,structAttr:"graph",datas:{node:f,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),r.update(),r},OT=Sr.defaultEmphasis,kT=Pu.encodeHTML,LT=ry.extendSeriesModel({type:"series.graph",init:function(e){LT.superApply(this,"init",arguments);var t=this;function n(){return t._categoriesData}this.legendVisualProvider=new vb(n,n),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},mergeOption:function(e){LT.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(e){LT.superApply(this,"mergeDefaultAndTheme",arguments),OT(e,["edgeLabel"],["show"])},getInitialData:function(e,t){var n=e.edges||e.links||[],i=e.data||e.nodes||[],a=this;if(i&&n)return CT(i,n,this,!0,(function(e,n){e.wrapMethod("getItemModel",(function(e){var t=a._categoriesModels[e.getShallow("category")];return t&&(t.parentModel=e.parentModel,e.parentModel=t),e}));var i=a.getModel("edgeLabel"),r=new bu({label:i.option},i.parentModel,t),o=a.getModel("emphasis.edgeLabel"),s=new bu({emphasis:{label:o.option}},o.parentModel,t);function l(e){return(e=this.parsePath(e))&&"label"===e[0]?r:e&&"emphasis"===e[0]&&"label"===e[1]?s:this.parentModel}n.wrapMethod("getItemModel",(function(e){return e.customizeGetParent(l),e}))})).data},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},formatTooltip:function(e,t,n){if("edge"===n){var i=this.getData(),a=this.getDataParams(e,n),r=i.graph.getEdgeByIndex(e),o=i.getName(r.node1.dataIndex),s=i.getName(r.node2.dataIndex),l=[];return null!=o&&l.push(o),null!=s&&l.push(s),l=kT(l.join(" > ")),a.value&&(l+=" : "+kT(a.value)),l}return LT.superApply(this,"formatTooltip",arguments)},_updateCategoriesData:function(){var e=Ie.map(this.option.categories||[],(function(e){return null!=e.value?e:Ie.extend({value:0},e)})),t=new cg(["value"],this);t.initData(e),this._categoriesData=t,this._categoriesModels=t.mapArray((function(e){return t.getItemModel(e,!0)}))},setZoom:function(e){this.option.zoom=e},setCenter:function(e){this.option.center=e},isAnimationEnabled:function(){return LT.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,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},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}}}}),ET=lu.Line.prototype,NT=lu.BezierCurve.prototype;function PT(e){return isNaN(+e.cpx1)||isNaN(+e.cpy1)}var RT=lu.extendShape({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(e,t){this[PT(t)?"_buildPathLine":"_buildPathCurve"](e,t)},_buildPathLine:ET.buildPath,_buildPathCurve:NT.buildPath,pointAt:function(e){return this[PT(this.shape)?"_pointAtLine":"_pointAtCurve"](e)},_pointAtLine:ET.pointAt,_pointAtCurve:NT.pointAt,tangentAt:function(e){var t=this.shape,n=PT(t)?[t.x2-t.x1,t.y2-t.y1]:this._tangentAtCurve(e);return Le.normalize(n,n)},_tangentAtCurve:NT.tangentAt}),zT=Au.round,BT=["fromSymbol","toSymbol"];function VT(e){return"_"+e+"Type"}function HT(e,t,n){var i=t.getItemVisual(n,"color"),a=t.getItemVisual(n,e),r=t.getItemVisual(n,e+"Size");if(a&&"none"!==a){Ie.isArray(r)||(r=[r,r]);var o=ov.createSymbol(a,-r[0]/2,-r[1]/2,r[0],r[1],i);return o.name=e,o}}function YT(e,t){e.x1=t[0][0],e.y1=t[0][1],e.x2=t[1][0],e.y2=t[1][1],e.percent=1;var n=t[2];n?(e.cpx1=n[0],e.cpy1=n[1]):(e.cpx1=NaN,e.cpy1=NaN)}function FT(e,t,n){lu.Group.call(this),this._createLine(e,t,n)}var GT=FT.prototype;GT.beforeUpdate=function(){var e=this.childOfName("fromSymbol"),t=this.childOfName("toSymbol"),n=this.childOfName("label");if(e||t||!n.ignore){for(var i=1,a=this.parent;a;)a.scale&&(i/=a.scale[0]),a=a.parent;var r=this.childOfName("line");if(this.__dirty||r.__dirty){var o=r.shape.percent,s=r.pointAt(0),l=r.pointAt(o),u=Le.sub([],l,s);if(Le.normalize(u,u),e){e.attr("position",s);var c=r.tangentAt(0);e.attr("rotation",Math.PI/2-Math.atan2(c[1],c[0])),e.attr("scale",[i*o,i*o])}if(t){t.attr("position",l);c=r.tangentAt(1);t.attr("rotation",-Math.PI/2-Math.atan2(c[1],c[0])),t.attr("scale",[i*o,i*o])}if(!n.ignore){var h,d,f,p;n.attr("position",l);var g=n.__labelDistance,m=g[0]*i,v=g[1]*i,y=o/2,_=[(c=r.tangentAt(y))[1],-c[0]],x=r.pointAt(y);_[1]>0&&(_[0]=-_[0],_[1]=-_[1]);var b,w=c[0]<0?-1:1;if("start"!==n.__position&&"end"!==n.__position){var S=-Math.atan2(c[1],c[0]);l[0]<s[0]&&(S=Math.PI+S),n.attr("rotation",S)}switch(n.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":b=-v,f="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":b=v,f="top";break;default:b=0,f="middle"}switch(n.__position){case"end":h=[u[0]*m+l[0],u[1]*v+l[1]],d=u[0]>.8?"left":u[0]<-.8?"right":"center",f=u[1]>.8?"top":u[1]<-.8?"bottom":"middle";break;case"start":h=[-u[0]*m+s[0],-u[1]*v+s[1]],d=u[0]>.8?"right":u[0]<-.8?"left":"center",f=u[1]>.8?"bottom":u[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":h=[m*w+s[0],s[1]+b],d=c[0]<0?"right":"left",p=[-m*w,-b];break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":h=[x[0],x[1]+b],d="center",p=[0,-b];break;case"insideEndTop":case"insideEnd":case"insideEndBottom":h=[-m*w+l[0],l[1]+b],d=c[0]>=0?"right":"left",p=[m*w,-b]}n.attr({style:{textVerticalAlign:n.__verticalAlign||f,textAlign:n.__textAlign||d},position:h,scale:[i,i],origin:p})}}}},GT._createLine=function(e,t,n){var i=e.hostModel,a=function(e){var t=new RT({name:"line",subPixelOptimize:!0});return YT(t.shape,e),t}(e.getItemLayout(t));a.shape.percent=0,lu.initProps(a,{shape:{percent:1}},i,t),this.add(a);var r=new lu.Text({name:"label",lineLabelOriginalOpacity:1});this.add(r),Ie.each(BT,(function(n){var i=HT(n,e,t);this.add(i),this[VT(n)]=e.getItemVisual(t,n)}),this),this._updateCommonStl(e,t,n)},GT.updateData=function(e,t,n){var i=e.hostModel,a=this.childOfName("line"),r=e.getItemLayout(t),o={shape:{}};YT(o.shape,r),lu.updateProps(a,o,i,t),Ie.each(BT,(function(n){var i=e.getItemVisual(t,n),a=VT(n);if(this[a]!==i){this.remove(this.childOfName(n));var r=HT(n,e,t);this.add(r)}this[a]=i}),this),this._updateCommonStl(e,t,n)},GT._updateCommonStl=function(e,t,n){var i=e.hostModel,a=this.childOfName("line"),r=n&&n.lineStyle,o=n&&n.hoverLineStyle,s=n&&n.labelModel,l=n&&n.hoverLabelModel;if(!n||e.hasItemOption){var u=e.getItemModel(t);r=u.getModel("lineStyle").getLineStyle(),o=u.getModel("emphasis.lineStyle").getLineStyle(),s=u.getModel("label"),l=u.getModel("emphasis.label")}var c=e.getItemVisual(t,"color"),h=Ie.retrieve3(e.getItemVisual(t,"opacity"),r.opacity,1);a.useStyle(Ie.defaults({strokeNoScale:!0,fill:"none",stroke:c,opacity:h},r)),a.hoverStyle=o,Ie.each(BT,(function(e){var t=this.childOfName(e);t&&(t.setColor(c),t.setStyle({opacity:h}))}),this);var d,f,p=s.getShallow("show"),g=l.getShallow("show"),m=this.childOfName("label");if((p||g)&&(d=c||"#000",null==(f=i.getFormattedLabel(t,"normal",e.dataType)))){var v=i.getRawValue(t);f=null==v?e.getName(t):isFinite(v)?zT(v):v}var y=p?f:null,_=g?Ie.retrieve2(i.getFormattedLabel(t,"emphasis",e.dataType),f):null,x=m.style;if(null!=y||null!=_){lu.setTextStyle(m.style,s,{text:y},{autoColor:d}),m.__textAlign=x.textAlign,m.__verticalAlign=x.textVerticalAlign,m.__position=s.get("position")||"middle";var b=s.get("distance");Ie.isArray(b)||(b=[b,b]),m.__labelDistance=b}m.hoverStyle=null!=_?{text:_,textFill:l.getTextColor(!0),fontStyle:l.getShallow("fontStyle"),fontWeight:l.getShallow("fontWeight"),fontSize:l.getShallow("fontSize"),fontFamily:l.getShallow("fontFamily")}:{text:null},m.ignore=!p&&!g,lu.setHoverStyle(this)},GT.highlight=function(){this.trigger("emphasis")},GT.downplay=function(){this.trigger("normal")},GT.updateLayout=function(e,t){this.setLinePoints(e.getItemLayout(t))},GT.setLinePoints=function(e){var t=this.childOfName("line");YT(t.shape,e),t.dirty()},Ie.inherits(FT,lu.Group);var WT=FT;function jT(e){this._ctor=e||WT,this.group=new lu.Group}var UT=jT.prototype;function ZT(e){var t=e.hostModel;return{lineStyle:t.getModel("lineStyle").getLineStyle(),hoverLineStyle:t.getModel("emphasis.lineStyle").getLineStyle(),labelModel:t.getModel("label"),hoverLabelModel:t.getModel("emphasis.label")}}function XT(e){return isNaN(e[0])||isNaN(e[1])}function qT(e){return!XT(e[0])&&!XT(e[1])}UT.isPersistent=function(){return!0},UT.updateData=function(e){var t=this,n=t.group,i=t._lineData;t._lineData=e,i||n.removeAll();var a=ZT(e);e.diff(i).add((function(n){!function(e,t,n,i){if(!qT(t.getItemLayout(n)))return;var a=new e._ctor(t,n,i);t.setItemGraphicEl(n,a),e.group.add(a)}(t,e,n,a)})).update((function(n,r){!function(e,t,n,i,a,r){var o=t.getItemGraphicEl(i);if(!qT(n.getItemLayout(a)))return void e.group.remove(o);o?o.updateData(n,a,r):o=new e._ctor(n,a,r);n.setItemGraphicEl(a,o),e.group.add(o)}(t,i,e,r,n,a)})).remove((function(e){n.remove(i.getItemGraphicEl(e))})).execute()},UT.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl((function(t,n){t.updateLayout(e,n)}),this)},UT.incrementalPrepareUpdate=function(e){this._seriesScope=ZT(e),this._lineData=null,this.group.removeAll()},UT.incrementalUpdate=function(e,t){function n(e){e.isGroup||function(e){return e.animators&&e.animators.length>0}(e)||(e.incremental=e.useHoverLayer=!0)}for(var i=e.start;i<e.end;i++){if(qT(t.getItemLayout(i))){var a=new this._ctor(t,i,this._seriesScope);a.traverse(n),this.group.add(a),t.setItemGraphicEl(i,a)}}},UT.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},UT._clearIncremental=function(){var e=this._incremental;e&&e.clearDisplaybles()};var KT=jT;var QT={getNodeGlobalScale:function(e){var t=e.coordinateSystem;if("view"!==t.type)return 1;var n=e.option.nodeScaleRatio,i=t.scale,a=i&&i[0]||1;return((t.getZoom()-1)*n+1)/a},getSymbolSize:function(e){var t=e.getVisual("symbolSize");return t instanceof Array&&(t=(t[0]+t[1])/2),+t}},$T=QT.getSymbolSize,JT=[],eI=[],tI=[],nI=Zr.quadraticAt,iI=Le.distSquare,aI=Math.abs;function rI(e,t,n){for(var i,a=e[0],r=e[1],o=e[2],s=1/0,l=n*n,u=.1,c=.1;c<=.9;c+=.1){JT[0]=nI(a[0],r[0],o[0],c),JT[1]=nI(a[1],r[1],o[1],c),(f=aI(iI(JT,t)-l))<s&&(s=f,i=c)}for(var h=0;h<32;h++){var d=i+u;eI[0]=nI(a[0],r[0],o[0],i),eI[1]=nI(a[1],r[1],o[1],i),tI[0]=nI(a[0],r[0],o[0],d),tI[1]=nI(a[1],r[1],o[1],d);var f=iI(eI,t)-l;if(aI(f)<.01)break;var p=iI(tI,t)-l;u/=2,f<0?p>=0?i+=u:i-=u:p>=0?i-=u:i+=u}return i}var oI=function(e,t){var n=[],i=Zr.quadraticSubdivide,a=[[],[],[]],r=[[],[]],o=[];t/=2,e.eachEdge((function(e,s){var l=e.getLayout(),u=e.getVisual("fromSymbol"),c=e.getVisual("toSymbol");l.__original||(l.__original=[Le.clone(l[0]),Le.clone(l[1])],l[2]&&l.__original.push(Le.clone(l[2])));var h=l.__original;if(null!=l[2]){if(Le.copy(a[0],h[0]),Le.copy(a[1],h[2]),Le.copy(a[2],h[1]),u&&"none"!==u){var d=$T(e.node1),f=rI(a,h[0],d*t);i(a[0][0],a[1][0],a[2][0],f,n),a[0][0]=n[3],a[1][0]=n[4],i(a[0][1],a[1][1],a[2][1],f,n),a[0][1]=n[3],a[1][1]=n[4]}if(c&&"none"!==c){d=$T(e.node2),f=rI(a,h[1],d*t);i(a[0][0],a[1][0],a[2][0],f,n),a[1][0]=n[1],a[2][0]=n[2],i(a[0][1],a[1][1],a[2][1],f,n),a[1][1]=n[1],a[2][1]=n[2]}Le.copy(l[0],a[0]),Le.copy(l[1],a[2]),Le.copy(l[2],a[1])}else{if(Le.copy(r[0],h[0]),Le.copy(r[1],h[1]),Le.sub(o,r[1],r[0]),Le.normalize(o,o),u&&"none"!==u){d=$T(e.node1);Le.scaleAndAdd(r[0],r[0],o,d*t)}if(c&&"none"!==c){d=$T(e.node2);Le.scaleAndAdd(r[1],r[1],o,-d*t)}Le.copy(l[0],r[0]),Le.copy(l[1],r[1])}}))},sI=Jw.onIrrelevantElement,lI=QT.getNodeGlobalScale,uI="__focusNodeAdjacency",cI=["itemStyle","opacity"],hI=["lineStyle","opacity"];function dI(e,t){var n=e.getVisual("opacity");return null!=n?n:e.getModel().get(t)}function fI(e,t,n){var i=e.getGraphicEl(),a=dI(e,t);null!=n&&(null==a&&(a=1),a*=n),i.downplay&&i.downplay(),i.traverse((function(e){if(!e.isGroup){var t=e.lineLabelOriginalOpacity;null!=t&&null==n||(t=a),e.setStyle("opacity",t)}}))}function pI(e,t){var n=dI(e,t),i=e.getGraphicEl();i.traverse((function(e){!e.isGroup&&e.setStyle("opacity",n)})),i.highlight&&i.highlight()}ry.extendChartView({type:"graph",init:function(e,t){var n=new Dy,i=new KT,a=this.group;this._controller=new Kw(t.getZr()),this._controllerHost={target:a},a.add(n.group),a.add(i.group),this._symbolDraw=n,this._lineDraw=i,this._firstRender=!0},render:function(e,t,n){var i=this,a=e.coordinateSystem;this._model=e;var r=this._symbolDraw,o=this._lineDraw,s=this.group;if("view"===a.type){var l={position:a.position,scale:a.scale};this._firstRender?s.attr(l):lu.updateProps(s,l,e)}oI(e.getGraph(),lI(e));var u=e.getData();r.updateData(u);var c=e.getEdgeData();o.updateData(c),this._updateNodeAndLinkScale(),this._updateController(e,t,n),clearTimeout(this._layoutTimeout);var h=e.forceLayout,d=e.get("force.layoutAnimation");h&&this._startForceLayoutIteration(h,d),u.eachItemGraphicEl((function(t,a){var r=u.getItemModel(a);t.off("drag").off("dragend");var o=r.get("draggable");o&&t.on("drag",(function(){h&&(h.warmUp(),!this._layouting&&this._startForceLayoutIteration(h,d),h.setFixed(a),u.setItemLayout(a,t.position))}),this).on("dragend",(function(){h&&h.setUnfixed(a)}),this),t.setDraggable(o&&h),t[uI]&&t.off("mouseover",t[uI]),t.__unfocusNodeAdjacency&&t.off("mouseout",t.__unfocusNodeAdjacency),r.get("focusNodeAdjacency")&&(t.on("mouseover",t[uI]=function(){i._clearTimer(),n.dispatchAction({type:"focusNodeAdjacency",seriesId:e.id,dataIndex:t.dataIndex})}),t.on("mouseout",t.__unfocusNodeAdjacency=function(){i._dispatchUnfocus(n)}))}),this),u.graph.eachEdge((function(t){var a=t.getGraphicEl();a[uI]&&a.off("mouseover",a[uI]),a.__unfocusNodeAdjacency&&a.off("mouseout",a.__unfocusNodeAdjacency),t.getModel().get("focusNodeAdjacency")&&(a.on("mouseover",a[uI]=function(){i._clearTimer(),n.dispatchAction({type:"focusNodeAdjacency",seriesId:e.id,edgeDataIndex:t.dataIndex})}),a.on("mouseout",a.__unfocusNodeAdjacency=function(){i._dispatchUnfocus(n)}))}));var f="circular"===e.get("layout")&&e.get("circular.rotateLabel"),p=u.getLayout("cx"),g=u.getLayout("cy");u.eachItemGraphicEl((function(e,t){var n=u.getItemModel(t).get("label.rotate")||0,i=e.getSymbolPath();if(f){var a=u.getItemLayout(t),r=Math.atan2(a[1]-g,a[0]-p);r<0&&(r=2*Math.PI+r);var o=a[0]<p;o&&(r-=Math.PI);var s=o?"left":"right";lu.modifyLabelStyle(i,{textRotation:-r,textPosition:s,textOrigin:"center"},{textPosition:s})}else lu.modifyLabelStyle(i,{textRotation:n*=Math.PI/180})})),this._firstRender=!1},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={},this._clearTimer()},_dispatchUnfocus:function(e,t){var n=this;this._clearTimer(),this._unfocusDelayTimer=setTimeout((function(){n._unfocusDelayTimer=null,e.dispatchAction({type:"unfocusNodeAdjacency",seriesId:n._model.id})}),500)},_clearTimer:function(){this._unfocusDelayTimer&&(clearTimeout(this._unfocusDelayTimer),this._unfocusDelayTimer=null)},focusNodeAdjacency:function(e,t,n,i){var a=e.getData().graph,r=i.dataIndex,o=i.edgeDataIndex,s=a.getNodeByIndex(r),l=a.getEdgeByIndex(o);(s||l)&&(a.eachNode((function(e){fI(e,cI,.1)})),a.eachEdge((function(e){fI(e,hI,.1)})),s&&(pI(s,cI),Ie.each(s.edges,(function(e){e.dataIndex<0||(pI(e,hI),pI(e.node1,cI),pI(e.node2,cI))}))),l&&(pI(l,hI),pI(l.node1,cI),pI(l.node2,cI)))},unfocusNodeAdjacency:function(e,t,n,i){var a=e.getData().graph;a.eachNode((function(e){fI(e,cI)})),a.eachEdge((function(e){fI(e,hI)}))},_startForceLayoutIteration:function(e,t){var n=this;!function i(){e.step((function(e){n.updateLayout(n._model),(n._layouting=!e)&&(t?n._layoutTimeout=setTimeout(i,16):i())}))}()},_updateController:function(e,t,n){var i=this._controller,a=this._controllerHost,r=this.group;i.setPointerChecker((function(t,i,a){var o=r.getBoundingRect();return o.applyTransform(r.transform),o.contain(i,a)&&!sI(t,n,e)})),"view"===e.coordinateSystem.type?(i.enable(e.get("roam")),a.zoomLimit=e.get("scaleLimit"),a.zoom=e.coordinateSystem.getZoom(),i.off("pan").off("zoom").on("pan",(function(t){Qw.updateViewOnPan(a,t.dx,t.dy),n.dispatchAction({seriesId:e.id,type:"graphRoam",dx:t.dx,dy:t.dy})})).on("zoom",(function(t){Qw.updateViewOnZoom(a,t.scale,t.originX,t.originY),n.dispatchAction({seriesId:e.id,type:"graphRoam",zoom:t.scale,originX:t.originX,originY:t.originY}),this._updateNodeAndLinkScale(),oI(e.getGraph(),lI(e)),this._lineDraw.updateLayout()}),this)):i.disable()},_updateNodeAndLinkScale:function(){var e=this._model,t=e.getData(),n=lI(e),i=[n,n];t.eachItemGraphicEl((function(e,t){e.attr("scale",i)}))},updateLayout:function(e){oI(e.getGraph(),lI(e)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},remove:function(e,t){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()}});ry.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},(function(){})),ry.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},(function(){}));var gI=lS.updateCenterAndZoom;ry.registerAction({type:"graphRoam",event:"graphRoam",update:"none"},(function(e,t){t.eachComponent({mainType:"series",query:e},(function(t){var n=t.coordinateSystem,i=gI(n,e);t.setCenter&&t.setCenter(i.center),t.setZoom&&t.setZoom(i.zoom)}))}));var mI=function(e){var t=e.findComponents({mainType:"legend"});t&&t.length&&e.eachSeriesByType("graph",(function(e){var n=e.getCategoriesData(),i=e.getGraph().data,a=n.mapArray(n.getName);i.filterSelf((function(e){var n=i.getItemModel(e).getShallow("category");if(null!=n){"number"==typeof n&&(n=a[n]);for(var r=0;r<t.length;r++)if(!t[r].isSelected(n))return!1}return!0}))}),this)};var vI=function(e){var t={};e.eachSeriesByType("graph",(function(e){var n=e.getCategoriesData(),i=e.getData(),a={};n.each((function(i){var r=n.getName(i);a["ec-"+r]=i;var o=n.getItemModel(i),s=o.get("itemStyle.color")||e.getColorFromPalette(r,t);n.setItemVisual(i,"color",s);for(var l=["opacity","symbol","symbolSize","symbolKeepAspect"],u=0;u<l.length;u++){var c=o.getShallow(l[u],!0);null!=c&&n.setItemVisual(i,l[u],c)}})),n.count()&&i.each((function(e){var t=i.getItemModel(e).getShallow("category");if(null!=t){"string"==typeof t&&(t=a["ec-"+t]);for(var r=["color","opacity","symbol","symbolSize","symbolKeepAspect"],o=0;o<r.length;o++)null==i.getItemVisual(e,r[o],!0)&&i.setItemVisual(e,r[o],n.getItemVisual(t,r[o]))}}))}))};function yI(e){return e instanceof Array||(e=[e,e]),e}var _I=function(e){e.eachSeriesByType("graph",(function(e){var t=e.getGraph(),n=e.getEdgeData(),i=yI(e.get("edgeSymbol")),a=yI(e.get("edgeSymbolSize")),r="lineStyle.color".split("."),o="lineStyle.opacity".split(".");n.setVisual("fromSymbol",i&&i[0]),n.setVisual("toSymbol",i&&i[1]),n.setVisual("fromSymbolSize",a&&a[0]),n.setVisual("toSymbolSize",a&&a[1]),n.setVisual("color",e.get(r)),n.setVisual("opacity",e.get(o)),n.each((function(e){var i=n.getItemModel(e),a=t.getEdgeByIndex(e),s=yI(i.getShallow("symbol",!0)),l=yI(i.getShallow("symbolSize",!0)),u=i.get(r),c=i.get(o);switch(u){case"source":u=a.node1.getVisual("color");break;case"target":u=a.node2.getVisual("color")}s[0]&&a.setVisual("fromSymbol",s[0]),s[1]&&a.setVisual("toSymbol",s[1]),l[0]&&a.setVisual("fromSymbolSize",l[0]),l[1]&&a.setVisual("toSymbolSize",l[1]),a.setVisual("color",u),a.setVisual("opacity",c)}))}))};function xI(e){e.eachEdge((function(e){var t=e.getModel().get("lineStyle.curveness")||0,n=Le.clone(e.node1.getLayout()),i=Le.clone(e.node2.getLayout()),a=[n,i];+t&&a.push([(n[0]+i[0])/2-(n[1]-i[1])*t,(n[1]+i[1])/2-(i[0]-n[0])*t]),e.setLayout(a)}))}var bI={simpleLayout:function(e){var t=e.coordinateSystem;if(!t||"view"===t.type){var n=e.getGraph();n.eachNode((function(e){var t=e.getModel();e.setLayout([+t.get("x"),+t.get("y")])})),xI(n)}},simpleLayoutEdge:xI},wI=Ie.each,SI=bI.simpleLayout,MI=bI.simpleLayoutEdge;var TI=function(e,t){e.eachSeriesByType("graph",(function(e){var t=e.get("layout"),n=e.coordinateSystem;if(n&&"view"!==n.type){var i=e.getData(),a=[];wI(n.dimensions,(function(e){a=a.concat(i.mapDimension(e,!0))}));for(var r=0;r<i.count();r++){for(var o=[],s=!1,l=0;l<a.length;l++){var u=i.get(a[l],r);isNaN(u)||(s=!0),o.push(u)}s?i.setItemLayout(r,n.dataToPoint(o)):i.setItemLayout(r,[NaN,NaN])}MI(i.graph)}else t&&"none"!==t||SI(e)}))},II=QT.getSymbolSize,AI=QT.getNodeGlobalScale,DI=Math.PI,CI=[];var OI={value:function(e,t,n,i,a,r,o,s){var l=0,u=i.getSum("value"),c=2*Math.PI/(u||s);n.eachNode((function(e){var t=e.getValue("value"),n=c*(u?t:1)/2;l+=n,e.setLayout([a*Math.cos(l)+r,a*Math.sin(l)+o]),l+=n}))},symbolSize:function(e,t,n,i,a,r,o,s){var l=0;CI.length=s;var u=AI(e);n.eachNode((function(e){var t=II(e);isNaN(t)&&(t=2),t<0&&(t=0),t*=u;var n=Math.asin(t/2/a);isNaN(n)&&(n=DI/2),CI[e.dataIndex]=n,l+=2*n}));var c=(2*DI-l)/s/2,h=0;n.eachNode((function(e){var t=c+CI[e.dataIndex];h+=t,e.setLayout([a*Math.cos(h)+r,a*Math.sin(h)+o]),h+=t}))}},kI={circularLayout:function(e,t){var n=e.coordinateSystem;if(!n||"view"===n.type){var i=n.getBoundingRect(),a=e.getData(),r=a.graph,o=i.width/2+i.x,s=i.height/2+i.y,l=Math.min(i.width,i.height)/2,u=a.count();a.setLayout({cx:o,cy:s}),u&&(OI[t](e,n,r,a,l,o,s,u),r.eachEdge((function(e){var t,n=e.getModel().get("lineStyle.curveness")||0,i=Le.clone(e.node1.getLayout()),a=Le.clone(e.node2.getLayout()),r=(i[0]+a[0])/2,l=(i[1]+a[1])/2;+n&&(t=[o*(n*=3)+r*(1-n),s*n+l*(1-n)]),e.setLayout([i,a,t])})))}}},LI=kI.circularLayout;var EI=function(e){e.eachSeriesByType("graph",(function(e){"circular"===e.get("layout")&&LI(e,"symbolSize")}))},NI=Le.scaleAndAdd;var PI={forceLayout:function(e,t,n){for(var i=n.rect,a=i.width,r=i.height,o=[i.x+a/2,i.y+r/2],s=null==n.gravity?.1:n.gravity,l=0;l<e.length;l++){var u=e[l];u.p||(u.p=Le.create(a*(Math.random()-.5)+o[0],r*(Math.random()-.5)+o[1])),u.pp=Le.clone(u.p),u.edges=null}var c=null==n.friction?.6:n.friction,h=c;return{warmUp:function(){h=.8*c},setFixed:function(t){e[t].fixed=!0},setUnfixed:function(t){e[t].fixed=!1},step:function(n){for(var i=[],a=e.length,r=0;r<t.length;r++){var l=t[r];if(!l.ignoreForceLayout){var u=l.n1,c=l.n2;Le.sub(i,c.p,u.p);var d=Le.len(i)-l.d,f=c.w/(u.w+c.w);isNaN(f)&&(f=0),Le.normalize(i,i),!u.fixed&&NI(u.p,u.p,i,f*d*h),!c.fixed&&NI(c.p,c.p,i,-(1-f)*d*h)}}for(r=0;r<a;r++){(v=e[r]).fixed||(Le.sub(i,o,v.p),NI(v.p,v.p,i,s*h))}for(r=0;r<a;r++){u=e[r];for(var p=r+1;p<a;p++){c=e[p];Le.sub(i,c.p,u.p),0===(d=Le.len(i))&&(Le.set(i,Math.random()-.5,Math.random()-.5),d=1);var g=(u.rep+c.rep)/d/d;!u.fixed&&NI(u.pp,u.pp,i,g),!c.fixed&&NI(c.pp,c.pp,i,-g)}}var m=[];for(r=0;r<a;r++){var v;(v=e[r]).fixed||(Le.sub(m,v.p,v.pp),NI(v.p,v.p,m,h),Le.copy(v.pp,v.p))}h*=.992,n&&n(e,t,h<.01)}}}}.forceLayout,RI=bI.simpleLayout,zI=kI.circularLayout,BI=Au.linearMap;var VI=function(e){e.eachSeriesByType("graph",(function(e){if(!(h=e.coordinateSystem)||"view"===h.type)if("force"===e.get("layout")){var t=e.preservedPoints||{},n=e.getGraph(),i=n.data,a=n.edgeData,r=e.getModel("force"),o=r.get("initLayout");e.preservedPoints?i.each((function(e){var n=i.getId(e);i.setItemLayout(e,t[n]||[NaN,NaN])})):o&&"none"!==o?"circular"===o&&zI(e,"value"):RI(e);var s=i.getDataExtent("value"),l=a.getDataExtent("value"),u=r.get("repulsion"),c=r.get("edgeLength");Ie.isArray(u)||(u=[u,u]),Ie.isArray(c)||(c=[c,c]),c=[c[1],c[0]];var h,d=i.mapArray("value",(function(e,t){var n=i.getItemLayout(t),a=BI(e,s,u);return isNaN(a)&&(a=(u[0]+u[1])/2),{w:a,rep:a,fixed:i.getItemModel(t).get("fixed"),p:!n||isNaN(n[0])||isNaN(n[1])?null:n}})),f=a.mapArray("value",(function(e,t){var i=n.getEdgeByIndex(t),a=BI(e,l,c);isNaN(a)&&(a=(c[0]+c[1])/2);var r=i.getModel();return{n1:d[i.node1.dataIndex],n2:d[i.node2.dataIndex],d:a,curveness:r.get("lineStyle.curveness")||0,ignoreForceLayout:r.get("ignoreForceLayout")}})),p=(h=e.coordinateSystem).getBoundingRect(),g=PI(d,f,{rect:p,gravity:r.get("gravity"),friction:r.get("friction")}),m=g.step;g.step=function(e){for(var a=0,r=d.length;a<r;a++)d[a].fixed&&Le.copy(d[a].p,n.getNodeByIndex(a).getLayout());m((function(a,r,o){for(var s=0,l=a.length;s<l;s++)a[s].fixed||n.getNodeByIndex(s).setLayout(a[s].p),t[i.getId(s)]=a[s].p;for(s=0,l=r.length;s<l;s++){var u=r[s],c=n.getEdgeByIndex(s),h=u.n1.p,d=u.n2.p,f=c.getLayout();(f=f?f.slice():[])[0]=f[0]||[],f[1]=f[1]||[],Le.copy(f[0],h),Le.copy(f[1],d),+u.curveness&&(f[2]=[(h[0]+d[0])/2-(h[1]-d[1])*u.curveness,(h[1]+d[1])/2-(d[0]-h[0])*u.curveness]),c.setLayout(f)}e&&e(o)}))},e.forceLayout=g,e.preservedPoints=t,g.step()}else e.forceLayout=null}))},HI=Uu.getLayoutRect;var YI=function(e,t){var n=[];return e.eachSeriesByType("graph",(function(e){var i=e.get("coordinateSystem");if(!i||"view"===i){var a=e.getData(),r=a.mapArray((function(e){var t=a.getItemModel(e);return[+t.get("x"),+t.get("y")]})),o=[],s=[];ao.fromPoints(r,o,s),s[0]-o[0]==0&&(s[0]+=1,o[0]-=1),s[1]-o[1]==0&&(s[1]+=1,o[1]-=1);var l=(s[0]-o[0])/(s[1]-o[1]),u=function(e,t,n){var i=e.getBoxLayoutParams();return i.aspect=n,HI(i,{width:t.getWidth(),height:t.getHeight()})}(e,t,l);isNaN(l)&&(o=[u.x,u.y],s=[u.x+u.width,u.y+u.height]);var c=s[0]-o[0],h=s[1]-o[1],d=u.width,f=u.height,p=e.coordinateSystem=new pS;p.zoomLimit=e.get("scaleLimit"),p.setBoundingRect(o[0],o[1],c,h),p.setViewRect(u.x,u.y,d,f),p.setCenter(e.get("center")),p.setZoom(e.get("zoom")),n.push(p)}})),n};ry.registerProcessor(mI),ry.registerVisual(d_("graph","circle",null)),ry.registerVisual(vI),ry.registerVisual(_I),ry.registerLayout(TI),ry.registerLayout(ry.PRIORITY.VISUAL.POST_CHART_LAYOUT,EI),ry.registerLayout(VI),ry.registerCoordinateSystem("graphView",{create:YI});Yd.extend({type:"series.gauge",getInitialData:function(e,t){return gb(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}}});var FI=jo.extend({type:"echartsGaugePointer",shape:{angle:0,width:10,r:10,x:0,y:0},buildPath:function(e,t){var n=Math.cos,i=Math.sin,a=t.r,r=t.width,o=t.angle,s=t.x-n(o)*r*(r>=a/3?1:2),l=t.y-i(o)*r*(r>=a/3?1:2);o=t.angle-Math.PI/2,e.moveTo(s,l),e.lineTo(t.x+n(o)*r,t.y+i(o)*r),e.lineTo(t.x+n(t.angle)*a,t.y+i(t.angle)*a),e.lineTo(t.x-n(o)*r,t.y-i(o)*r),e.lineTo(s,l)}}),GI=Au.parsePercent,WI=Au.round,jI=Au.linearMap;function UI(e,t){return t&&("string"==typeof t?e=t.replace("{value}",null!=e?e:""):"function"==typeof t&&(e=t(e))),e}var ZI=2*Math.PI,XI=(rf.extend({type:"gauge",render:function(e,t,n){this.group.removeAll();var i=e.get("axisLine.lineStyle.color"),a=function(e,t){var n=e.get("center"),i=t.getWidth(),a=t.getHeight(),r=Math.min(i,a);return{cx:GI(n[0],t.getWidth()),cy:GI(n[1],t.getHeight()),r:GI(e.get("radius"),r/2)}}(e,n);this._renderMain(e,t,n,i,a)},dispose:function(){},_renderMain:function(e,t,n,i,a){for(var r=this.group,o=e.getModel("axisLine"),s=o.getModel("lineStyle"),l=e.get("clockwise"),u=-e.get("startAngle")/180*Math.PI,c=((g=-e.get("endAngle")/180*Math.PI)-u)%ZI,h=u,d=s.get("width"),f=o.get("show"),p=0;f&&p<i.length;p++){var g=u+c*Math.min(Math.max(i[p][0],0),1),m=new lu.Sector({shape:{startAngle:h,endAngle:g,cx:a.cx,cy:a.cy,clockwise:l,r0:a.r-d,r:a.r},silent:!0});m.setStyle({fill:i[p][1]}),m.setStyle(s.getLineStyle(["color","borderWidth","borderColor"])),r.add(m),h=g}var v=function(e){if(e<=0)return i[0][1];for(var t=0;t<i.length;t++)if(i[t][0]>=e&&(0===t?0:i[t-1][0])<e)return i[t][1];return i[t-1][1]};if(!l){var y=u;u=g,g=y}this._renderTicks(e,t,n,v,a,u,g,l),this._renderPointer(e,t,n,v,a,u,g,l),this._renderTitle(e,t,n,v,a),this._renderDetail(e,t,n,v,a)},_renderTicks:function(e,t,n,i,a,r,o,s){for(var l=this.group,u=a.cx,c=a.cy,h=a.r,d=+e.get("min"),f=+e.get("max"),p=e.getModel("splitLine"),g=e.getModel("axisTick"),m=e.getModel("axisLabel"),v=e.get("splitNumber"),y=g.get("splitNumber"),_=GI(p.get("length"),h),x=GI(g.get("length"),h),b=r,w=(o-r)/v,S=w/y,M=p.getModel("lineStyle").getLineStyle(),T=g.getModel("lineStyle").getLineStyle(),I=0;I<=v;I++){var A=Math.cos(b),D=Math.sin(b);if(p.get("show")){var C=new lu.Line({shape:{x1:A*h+u,y1:D*h+c,x2:A*(h-_)+u,y2:D*(h-_)+c},style:M,silent:!0});"auto"===M.stroke&&C.setStyle({stroke:i(I/v)}),l.add(C)}if(m.get("show")){var O=UI(WI(I/v*(f-d)+d),m.get("formatter")),k=m.get("distance"),L=i(I/v);l.add(new lu.Text({style:lu.setTextStyle({},m,{text:O,x:A*(h-_-k)+u,y:D*(h-_-k)+c,textVerticalAlign:D<-.4?"top":D>.4?"bottom":"middle",textAlign:A<-.4?"left":A>.4?"right":"center"},{autoColor:L}),silent:!0}))}if(g.get("show")&&I!==v){for(var E=0;E<=y;E++){A=Math.cos(b),D=Math.sin(b);var N=new lu.Line({shape:{x1:A*h+u,y1:D*h+c,x2:A*(h-x)+u,y2:D*(h-x)+c},silent:!0,style:T});"auto"===T.stroke&&N.setStyle({stroke:i((I+E/y)/v)}),l.add(N),b+=S}b-=S}else b+=w}},_renderPointer:function(e,t,n,i,a,r,o,s){var l=this.group,u=this._data;if(e.get("pointer.show")){var c=[+e.get("min"),+e.get("max")],h=[r,o],d=e.getData(),f=d.mapDimension("value");d.diff(u).add((function(t){var n=new FI({shape:{angle:r}});lu.initProps(n,{shape:{angle:jI(d.get(f,t),c,h,!0)}},e),l.add(n),d.setItemGraphicEl(t,n)})).update((function(t,n){var i=u.getItemGraphicEl(n);lu.updateProps(i,{shape:{angle:jI(d.get(f,t),c,h,!0)}},e),l.add(i),d.setItemGraphicEl(t,i)})).remove((function(e){var t=u.getItemGraphicEl(e);l.remove(t)})).execute(),d.eachItemGraphicEl((function(e,t){var n=d.getItemModel(t),r=n.getModel("pointer");e.setShape({x:a.cx,y:a.cy,width:GI(r.get("width"),a.r),r:GI(r.get("length"),a.r)}),e.useStyle(n.getModel("itemStyle").getItemStyle()),"auto"===e.style.fill&&e.setStyle("fill",i(jI(d.get(f,t),c,[0,1],!0))),lu.setHoverStyle(e,n.getModel("emphasis.itemStyle").getItemStyle())})),this._data=d}else u&&u.eachItemGraphicEl((function(e){l.remove(e)}))},_renderTitle:function(e,t,n,i,a){var r=e.getData(),o=r.mapDimension("value"),s=e.getModel("title");if(s.get("show")){var l=s.get("offsetCenter"),u=a.cx+GI(l[0],a.r),c=a.cy+GI(l[1],a.r),h=+e.get("min"),d=+e.get("max"),f=e.getData().get(o,0),p=i(jI(f,[h,d],[0,1],!0));this.group.add(new lu.Text({silent:!0,style:lu.setTextStyle({},s,{x:u,y:c,text:r.getName(0),textAlign:"center",textVerticalAlign:"middle"},{autoColor:p,forceRich:!0})}))}},_renderDetail:function(e,t,n,i,a){var r=e.getModel("detail"),o=+e.get("min"),s=+e.get("max");if(r.get("show")){var l=r.get("offsetCenter"),u=a.cx+GI(l[0],a.r),c=a.cy+GI(l[1],a.r),h=GI(r.get("width"),a.r),d=GI(r.get("height"),a.r),f=e.getData(),p=f.get(f.mapDimension("value"),0),g=i(jI(p,[o,s],[0,1],!0));this.group.add(new lu.Text({silent:!0,style:lu.setTextStyle({},r,{x:u,y:c,text:UI(p,r.get("formatter")),textWidth:isNaN(h)?null:h,textHeight:isNaN(d)?null:d,textAlign:"center",textVerticalAlign:"middle"},{autoColor:g,forceRich:!0})}))}}}),Sr.defaultEmphasis),qI=Hc.makeSeriesEncodeForNameBased,KI=ry.extendSeriesModel({type:"series.funnel",init:function(e){KI.superApply(this,"init",arguments),this.legendVisualProvider=new vb(Ie.bind(this.getData,this),Ie.bind(this.getRawData,this)),this._defaultLabelLine(e)},getInitialData:function(e,t){return gb(this,{coordDimensions:["value"],encodeDefaulter:Ie.curry(qI,this)})},_defaultLabelLine:function(e){XI(e,"labelLine",["show"]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},getDataParams:function(e){var t=this.getData(),n=KI.superCall(this,"getDataParams",e),i=t.mapDimension("value"),a=t.getSum(i);return n.percent=a?+(t.get(i,e)/a*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 QI(e,t){lu.Group.call(this);var n=new lu.Polygon,i=new lu.Polyline,a=new lu.Text;this.add(n),this.add(i),this.add(a),this.highDownOnUpdate=function(e,t){"emphasis"===t?(i.ignore=i.hoverIgnore,a.ignore=a.hoverIgnore):(i.ignore=i.normalIgnore,a.ignore=a.normalIgnore)},this.updateData(e,t,!0)}var $I=QI.prototype,JI=["itemStyle","opacity"];$I.updateData=function(e,t,n){var i=this.childAt(0),a=e.hostModel,r=e.getItemModel(t),o=e.getItemLayout(t),s=e.getItemModel(t).get(JI);s=null==s?1:s,i.useStyle({}),n?(i.setShape({points:o.points}),i.setStyle({opacity:0}),lu.initProps(i,{style:{opacity:s}},a,t)):lu.updateProps(i,{style:{opacity:s},shape:{points:o.points}},a,t);var l=r.getModel("itemStyle"),u=e.getItemVisual(t,"color");i.setStyle(Ie.defaults({lineJoin:"round",fill:u},l.getItemStyle(["opacity"]))),i.hoverStyle=l.getModel("emphasis").getItemStyle(),this._updateLabel(e,t),lu.setHoverStyle(this)},$I._updateLabel=function(e,t){var n=this.childAt(1),i=this.childAt(2),a=e.hostModel,r=e.getItemModel(t),o=e.getItemLayout(t).label,s=e.getItemVisual(t,"color");lu.updateProps(n,{shape:{points:o.linePoints||o.linePoints}},a,t),lu.updateProps(i,{style:{x:o.x,y:o.y}},a,t),i.attr({rotation:o.rotation,origin:[o.x,o.y],z2:10});var l=r.getModel("label"),u=r.getModel("emphasis.label"),c=r.getModel("labelLine"),h=r.getModel("emphasis.labelLine");s=e.getItemVisual(t,"color");lu.setLabelStyle(i.style,i.hoverStyle={},l,u,{labelFetcher:e.hostModel,labelDataIndex:t,defaultText:e.getName(t),autoColor:s,useInsideStyle:!!o.inside},{textAlign:o.textAlign,textVerticalAlign:o.verticalAlign}),i.ignore=i.normalIgnore=!l.get("show"),i.hoverIgnore=!u.get("show"),n.ignore=n.normalIgnore=!c.get("show"),n.hoverIgnore=!h.get("show"),n.setStyle({stroke:s}),n.setStyle(c.getModel("lineStyle").getLineStyle()),n.hoverStyle=h.getModel("lineStyle").getLineStyle()},Ie.inherits(QI,lu.Group);rf.extend({type:"funnel",render:function(e,t,n){var i=e.getData(),a=this._data,r=this.group;i.diff(a).add((function(e){var t=new QI(i,e);i.setItemGraphicEl(e,t),r.add(t)})).update((function(e,t){var n=a.getItemGraphicEl(t);n.updateData(i,e),r.add(n),i.setItemGraphicEl(e,n)})).remove((function(e){var t=a.getItemGraphicEl(e);r.remove(t)})).execute(),this._data=i},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}});var eA=Au.parsePercent,tA=Au.linearMap;var nA=function(e,t,n){e.eachSeriesByType("funnel",(function(e){var n=e.getData(),i=n.mapDimension("value"),a=e.get("sort"),r=function(e,t){return Uu.getLayoutRect(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}(e,t),o=function(e,t){for(var n=e.mapDimension("value"),i=e.mapArray(n,(function(e){return e})),a=[],r="ascending"===t,o=0,s=e.count();o<s;o++)a[o]=o;return"function"==typeof t?a.sort(t):"none"!==t&&a.sort((function(e,t){return r?i[e]-i[t]:i[t]-i[e]})),a}(n,a),s=[eA(e.get("minSize"),r.width),eA(e.get("maxSize"),r.width)],l=n.getDataExtent(i),u=e.get("min"),c=e.get("max");null==u&&(u=Math.min(l[0],0)),null==c&&(c=l[1]);var h=e.get("funnelAlign"),d=e.get("gap"),f=(r.height-d*(n.count()-1))/n.count(),p=r.y,g=function(e,t){var a,o=n.get(i,e)||0,l=tA(o,[u,c],s,!0);switch(h){case"left":a=r.x;break;case"center":a=r.x+(r.width-l)/2;break;case"right":a=r.x+r.width-l}return[[a,t],[a+l,t]]};"ascending"===a&&(f=-f,d=-d,p+=r.height,o=o.reverse());for(var m=0;m<o.length;m++){var v=o[m],y=o[m+1],_=n.getItemModel(v).get("itemStyle.height");null==_?_=f:(_=eA(_,r.height),"ascending"===a&&(_=-_));var x=g(v,p),b=g(y,p+_);p+=_+d,n.setItemLayout(v,{points:x.concat(b.slice().reverse())})}!function(e){e.each((function(t){var n,i,a,r,o=e.getItemModel(t),s=o.getModel("label").get("position"),l=o.getModel("labelLine"),u=e.getItemLayout(t),c=u.points,h="inner"===s||"inside"===s||"center"===s||"insideLeft"===s||"insideRight"===s;if(h)"insideLeft"===s?(i=(c[0][0]+c[3][0])/2+5,a=(c[0][1]+c[3][1])/2,n="left"):"insideRight"===s?(i=(c[1][0]+c[2][0])/2-5,a=(c[1][1]+c[2][1])/2,n="right"):(i=(c[0][0]+c[1][0]+c[2][0]+c[3][0])/4,a=(c[0][1]+c[1][1]+c[2][1]+c[3][1])/4,n="center"),r=[[i,a],[i,a]];else{var d,f,p,g=l.get("length");"left"===s?(d=(c[3][0]+c[0][0])/2,f=(c[3][1]+c[0][1])/2,i=(p=d-g)-5,n="right"):"right"===s?(d=(c[1][0]+c[2][0])/2,f=(c[1][1]+c[2][1])/2,i=(p=d+g)+5,n="left"):"rightTop"===s?(d=c[1][0],f=c[1][1],i=(p=d+g)+5,n="top"):"rightBottom"===s?(d=c[2][0],f=c[2][1],i=(p=d+g)+5,n="bottom"):"leftTop"===s?(d=c[0][0],f=c[1][1],i=(p=d-g)-5,n="right"):"leftBottom"===s?(d=c[3][0],f=c[2][1],i=(p=d-g)-5,n="right"):(d=(c[1][0]+c[2][0])/2,f=(c[1][1]+c[2][1])/2,i=(p=d+g)+5,n="left");r=[[d,f],[p,f]],a=f}u.label={linePoints:r,x:i,y:a,verticalAlign:"middle",textAlign:n,inside:h}}))}(n)}))};ry.registerVisual(Db("funnel")),ry.registerLayout(nA),ry.registerProcessor(Vb("funnel"));var iA=function(e){!function(e){if(e.parallel)return;var t=!1;Ie.each(e.series,(function(e){e&&"parallel"===e.type&&(t=!0)})),t&&(e.parallel=[{}])}(e),function(e){var t=Sr.normalizeToArray(e.parallelAxis);Ie.each(t,(function(t){if(Ie.isObject(t)){var n=t.parallelIndex||0,i=Sr.normalizeToArray(e.parallel)[n];i&&i.parallelAxisDefault&&Ie.merge(t,i.parallelAxisDefault,!1)}}))}(e)},aA=function(e,t,n,i,a){Yv.call(this,e,t,n),this.type=i||"value",this.axisIndex=a};aA.prototype={constructor:aA,model:null,isHorizontal:function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")}},Ie.inherits(aA,Yv);var rA=aA;function oA(e,t){var n=e[t]-e[1-t];return{span:Math.abs(n),sign:n>0?-1:n<0?1:t?-1:1}}function sA(e,t){return Math.min(null!=t[1]?t[1]:1/0,Math.max(null!=t[0]?t[0]:-1/0,e))}var lA=function(e,t,n,i,a,r){e=e||0;var o=n[1]-n[0];if(null!=a&&(a=sA(a,[0,o])),null!=r&&(r=Math.max(r,null!=a?a:0)),"all"===i){var s=Math.abs(t[1]-t[0]);s=sA(s,[0,o]),a=r=sA(s,[a,r]),i=0}t[0]=sA(t[0],n),t[1]=sA(t[1],n);var l=oA(t,i);t[i]+=e;var u=a||0,c=n.slice();l.sign<0?c[0]+=u:c[1]-=u,t[i]=sA(t[i],c);var h=oA(t,i);return null!=a&&(h.sign!==l.sign||h.span<a)&&(t[1-i]=t[i]+l.sign*a),h=oA(t,i),null!=r&&h.span>r&&(t[1-i]=t[i]+h.sign*r),t},uA=Ie.each,cA=Math.min,hA=Math.max,dA=Math.floor,fA=Math.ceil,pA=Au.round,gA=Math.PI;function mA(e,t,n){this._axesMap=Ie.createHashMap(),this._axesLayout={},this.dimensions=e.dimensions,this._rect,this._model=e,this._init(e,t,n)}function vA(e,t){return cA(hA(e,t[0]),t[1])}function yA(e,t){var n=t.layoutLength/(t.axisCount-1);return{position:n*e,axisNameAvailableWidth:n,axisLabelShow:!0}}function _A(e,t){var n,i,a=t.layoutLength,r=t.axisExpandWidth,o=t.axisCount,s=t.axisCollapseWidth,l=t.winInnerIndices,u=s,c=!1;return e<l[0]?(n=e*s,i=s):e<=l[1]?(n=t.axisExpandWindow0Pos+e*r-t.axisExpandWindow[0],u=r,c=!0):(n=a-(o-1-e)*s,i=s),{position:n,axisNameAvailableWidth:u,axisLabelShow:c,nameTruncateMaxWidth:i}}mA.prototype={type:"parallel",constructor:mA,_init:function(e,t,n){var i=e.dimensions,a=e.parallelAxisIndex;uA(i,(function(e,n){var i=a[n],r=t.getComponent("parallelAxis",i),o=this._axesMap.set(e,new rA(e,Xm.createScaleByModel(r),[0,0],r.get("type"),i)),s="category"===o.type;o.onBand=s&&r.get("boundaryGap"),o.inverse=r.get("inverse"),r.axis=o,o.model=r,o.coordinateSystem=r.coordinateSystem=this}),this)},update:function(e,t){this._updateAxesFromSeries(this._model,e)},containPoint:function(e){var t=this._makeLayoutInfo(),n=t.axisBase,i=t.layoutBase,a=t.pixelDimIndex,r=e[1-a],o=e[a];return r>=n&&r<=n+t.axisLength&&o>=i&&o<=i+t.layoutLength},getModel:function(){return this._model},_updateAxesFromSeries:function(e,t){t.eachSeries((function(n){if(e.contains(n,t)){var i=n.getData();uA(this.dimensions,(function(e){var t=this._axesMap.get(e);t.scale.unionExtentFromData(i,i.mapDimension(e)),Xm.niceScaleExtent(t.scale,t.model)}),this)}}),this)},resize:function(e,t){this._rect=Uu.getLayoutRect(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),this._layoutAxes()},getRect:function(){return this._rect},_makeLayoutInfo:function(){var e,t=this._model,n=this._rect,i=["x","y"],a=["width","height"],r=t.get("layout"),o="horizontal"===r?0:1,s=n[a[o]],l=[0,s],u=this.dimensions.length,c=vA(t.get("axisExpandWidth"),l),h=vA(t.get("axisExpandCount")||0,[0,u]),d=t.get("axisExpandable")&&u>3&&u>h&&h>1&&c>0&&s>0,f=t.get("axisExpandWindow");f?(e=vA(f[1]-f[0],l),f[1]=f[0]+e):(e=vA(c*(h-1),l),(f=[c*(t.get("axisExpandCenter")||dA(u/2))-e/2])[1]=f[0]+e);var p=(s-e)/(u-h);p<3&&(p=0);var g=[dA(pA(f[0]/c,1))+1,fA(pA(f[1]/c,1))-1],m=p/c*f[0];return{layout:r,pixelDimIndex:o,layoutBase:n[i[o]],layoutLength:s,axisBase:n[i[1-o]],axisLength:n[a[1-o]],axisExpandable:d,axisExpandWidth:c,axisCollapseWidth:p,axisExpandWindow:f,axisCount:u,winInnerIndices:g,axisExpandWindow0Pos:m}},_layoutAxes:function(){var e=this._rect,t=this._axesMap,n=this.dimensions,i=this._makeLayoutInfo(),a=i.layout;t.each((function(e){var t=[0,i.axisLength],n=e.inverse?1:0;e.setExtent(t[n],t[1-n])})),uA(n,(function(t,n){var r=(i.axisExpandable?_A:yA)(n,i),o={horizontal:{x:r.position,y:i.axisLength},vertical:{x:0,y:r.position}},s={horizontal:gA/2,vertical:0},l=[o[a].x+e.x,o[a].y+e.y],u=s[a],c=yt.create();yt.rotate(c,c,u),yt.translate(c,c,l),this._axesLayout[t]={position:l,rotation:u,transform:c,axisNameAvailableWidth:r.axisNameAvailableWidth,axisLabelShow:r.axisLabelShow,nameTruncateMaxWidth:r.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}}),this)},getAxis:function(e){return this._axesMap.get(e)},dataToPoint:function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},eachActiveState:function(e,t,n,i){null==n&&(n=0),null==i&&(i=e.count());var a=this._axesMap,r=this.dimensions,o=[],s=[];Ie.each(r,(function(t){o.push(e.mapDimension(t)),s.push(a.get(t).model)}));for(var l=this.hasAxisBrushed(),u=n;u<i;u++){var c;if(l){c="active";for(var h=e.getValues(o,u),d=0,f=r.length;d<f;d++){if("inactive"===s[d].getActiveState(h[d])){c="inactive";break}}}else c="normal";t(c,u)}},hasAxisBrushed:function(){for(var e=this.dimensions,t=this._axesMap,n=!1,i=0,a=e.length;i<a;i++)"normal"!==t.get(e[i]).model.getActiveState()&&(n=!0);return n},axisCoordToPoint:function(e,t){var n=this._axesLayout[t];return lu.applyTransform([e,0],n.transform)},getAxisLayout:function(e){return Ie.clone(this._axesLayout[e])},getSlidedAxisExpandWindow:function(e){var t=this._makeLayoutInfo(),n=t.pixelDimIndex,i=t.axisExpandWindow.slice(),a=i[1]-i[0],r=[0,t.axisExpandWidth*(t.axisCount-1)];if(!this.containPoint(e))return{behavior:"none",axisExpandWindow:i};var o,s=e[n]-t.layoutBase-t.axisExpandWindow0Pos,l="slide",u=t.axisCollapseWidth,c=this._model.get("axisExpandSlideTriggerArea"),h=null!=c[0];if(u)h&&u&&s<a*c[0]?(l="jump",o=s-a*c[2]):h&&u&&s>a*(1-c[0])?(l="jump",o=s-a*(1-c[2])):(o=s-a*c[1])>=0&&(o=s-a*(1-c[1]))<=0&&(o=0),(o*=t.axisExpandWidth/u)?lA(o,i,r,"all"):l="none";else{a=i[1]-i[0];(i=[hA(0,r[1]*s/a-a/2)])[1]=cA(r[1],i[0]+a),i[0]=i[1]-a}return{axisExpandWindow:i,behavior:l}}};var xA=mA;ch.register("parallel",{create:function(e,t){var n=[];return e.eachComponent("parallel",(function(i,a){var r=new xA(i,e,t);r.name="parallel_"+a,r.resize(i,t),i.coordinateSystem=r,r.model=i,n.push(r)})),e.eachSeries((function(t){if("parallel"===t.get("coordinateSystem")){var n=e.queryComponents({mainType:"parallel",index:t.get("parallelIndex"),id:t.get("parallelId")})[0];t.coordinateSystem=n.coordinateSystem}})),n}});var bA=$u.extend({type:"baseParallelAxis",axis:null,activeIntervals:[],getAreaSelectStyle:function(){return Or([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},setActiveIntervals:function(e){var t=this.activeIntervals=Ie.clone(e);if(t)for(var n=t.length-1;n>=0;n--)Au.asc(t[n])},getActiveState:function(e){var t=this.activeIntervals;if(!t.length)return"normal";if(null==e||isNaN(e))return"inactive";if(1===t.length){var n=t[0];if(n[0]<=e&&e<=n[1])return"active"}else for(var i=0,a=t.length;i<a;i++)if(t[i][0]<=e&&e<=t[i][1])return"active";return"inactive"}});Ie.merge(bA.prototype,qm),L_("parallel",bA,(function(e,t){return t.type||(t.data?"category":"value")}),{type:"value",dim:null,areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10});$u.extend({type:"parallel",dependencies:["parallelAxis"],coordinateSystem:null,dimensions:null,parallelAxisIndex:null,layoutMode:"box",defaultOption:{zlevel:0,z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},init:function(){$u.prototype.init.apply(this,arguments),this.mergeOption({})},mergeOption:function(e){var t=this.option;e&&Ie.merge(t,e,!0),this._initDimensions()},contains:function(e,t){var n=e.get("parallelIndex");return null!=n&&t.getComponent("parallel",n)===this},setAxisExpand:function(e){Ie.each(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],(function(t){e.hasOwnProperty(t)&&(this.option[t]=e[t])}),this)},_initDimensions:function(){var e=this.dimensions=[],t=this.parallelAxisIndex=[],n=Ie.filter(this.dependentModels.parallelAxis,(function(e){return(e.get("parallelIndex")||0)===this.componentIndex}),this);Ie.each(n,(function(n){e.push("dim"+n.get("dim")),t.push(n.componentIndex)}))}});ry.registerAction({type:"axisAreaSelect",event:"axisAreaSelected"},(function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},(function(t){t.axis.model.setActiveIntervals(e.intervals)}))})),ry.registerAction("parallelAxisExpand",(function(e,t){t.eachComponent({mainType:"parallel",query:e},(function(t){t.setAxisExpand(e)}))}));var wA=Ie.curry,SA=Ie.each,MA=Ie.map,TA=Math.min,IA=Math.max,AA=Math.pow,DA={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},CA={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},OA={brushStyle:{lineWidth:2,stroke:"rgba(0,0,0,0.3)",fill:"rgba(0,0,0,0.1)"},transformable:!0,brushMode:"single",removeOnClick:!1},kA=0;function LA(e){Ve.call(this),this._zr=e,this.group=new lu.Group,this._brushType,this._brushOption,this._panels,this._track=[],this._dragging,this._covers=[],this._creatingCover,this._creatingPanel,this._enableGlobalPan,this._uid="brushController_"+kA++,this._handlers={},SA(aD,(function(e,t){this._handlers[t]=Ie.bind(e,this)}),this)}function EA(e,t){var n=oD[t.brushType].createCover(e,t);return n.__brushOption=t,RA(n,t),e.group.add(n),n}function NA(e,t){var n=BA(t);return n.endCreating&&(n.endCreating(e,t),RA(t,t.__brushOption)),t}function PA(e,t){var n=t.__brushOption;BA(t).updateCoverShape(e,t,n.range,n)}function RA(e,t){var n=t.z;null==n&&(n=1e4),e.traverse((function(e){e.z=n,e.z2=n}))}function zA(e,t){BA(t).updateCommon(e,t),PA(e,t)}function BA(e){return oD[e.__brushOption.brushType]}function VA(e,t,n){var i,a=e._panels;if(!a)return!0;var r=e._transform;return SA(a,(function(e){e.isTargetByCursor(t,n,r)&&(i=e)})),i}function HA(e,t){var n=e._panels;if(!n)return!0;var i=t.__brushOption.panelId;return null==i||n[i]}function YA(e){var t=e._covers,n=t.length;return SA(t,(function(t){e.group.remove(t)}),e),t.length=0,!!n}function FA(e,t){var n=MA(e._covers,(function(e){var t=e.__brushOption,n=Ie.clone(t.range);return{brushType:t.brushType,panelId:t.panelId,range:n}}));e.trigger("brush",n,{isEnd:!!t.isEnd,removeOnClick:!!t.removeOnClick})}function GA(e){var t=e.length-1;return t<0&&(t=0),[e[0],e[t]]}function WA(e,t,n,i){var a=new lu.Group;return a.add(new lu.Rect({name:"main",style:XA(n),silent:!0,draggable:!0,cursor:"move",drift:wA(e,t,a,"nswe"),ondragend:wA(FA,t,{isEnd:!0})})),SA(i,(function(n){a.add(new lu.Rect({name:n,style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:wA(e,t,a,n),ondragend:wA(FA,t,{isEnd:!0})}))})),a}function jA(e,t,n,i){var a=i.brushStyle.lineWidth||0,r=IA(a,6),o=n[0][0],s=n[1][0],l=o-a/2,u=s-a/2,c=n[0][1],h=n[1][1],d=c-r+a/2,f=h-r+a/2,p=c-o,g=h-s,m=p+a,v=g+a;ZA(e,t,"main",o,s,p,g),i.transformable&&(ZA(e,t,"w",l,u,r,v),ZA(e,t,"e",d,u,r,v),ZA(e,t,"n",l,u,m,r),ZA(e,t,"s",l,f,m,r),ZA(e,t,"nw",l,u,r,r),ZA(e,t,"ne",d,u,r,r),ZA(e,t,"sw",l,f,r,r),ZA(e,t,"se",d,f,r,r))}function UA(e,t){var n=t.__brushOption,i=n.transformable,a=t.childAt(0);a.useStyle(XA(n)),a.attr({silent:!i,cursor:i?"move":"default"}),SA(["w","e","n","s","se","sw","ne","nw"],(function(n){var a=t.childOfName(n),r=function e(t,n){if(n.length>1)return n=n.split(""),("e"===(i=[e(t,n[0]),e(t,n[1])])[0]||"w"===i[0])&&i.reverse(),i.join("");var i;return{left:"w",right:"e",top:"n",bottom:"s"}[i=lu.transformDirection({w:"left",e:"right",n:"top",s:"bottom"}[n],function(e){return lu.getTransform(e.group)}(t))]}(e,n);a&&a.attr({silent:!i,invisible:!i,cursor:i?CA[r]+"-resize":null})}))}function ZA(e,t,n,i,a,r,o){var s=t.childOfName(n);s&&s.setShape(function(e){var t=TA(e[0][0],e[1][0]),n=TA(e[0][1],e[1][1]),i=IA(e[0][0],e[1][0]),a=IA(e[0][1],e[1][1]);return{x:t,y:n,width:i-t,height:a-n}}(JA(e,t,[[i,a],[i+r,a+o]])))}function XA(e){return Ie.defaults({strokeNoScale:!0},e.brushStyle)}function qA(e,t,n,i){var a=[TA(e,n),TA(t,i)],r=[IA(e,n),IA(t,i)];return[[a[0],r[0]],[a[1],r[1]]]}function KA(e,t,n,i,a,r,o,s){var l=i.__brushOption,u=e(l.range),c=$A(n,r,o);SA(a.split(""),(function(e){var t=DA[e];u[t[0]][t[1]]+=c[t[0]]})),l.range=t(qA(u[0][0],u[1][0],u[0][1],u[1][1])),zA(n,i),FA(n,{isEnd:!1})}function QA(e,t,n,i,a){var r=t.__brushOption.range,o=$A(e,n,i);SA(r,(function(e){e[0]+=o[0],e[1]+=o[1]})),zA(e,t),FA(e,{isEnd:!1})}function $A(e,t,n){var i=e.group,a=i.transformCoordToLocal(t,n),r=i.transformCoordToLocal(0,0);return[a[0]-r[0],a[1]-r[1]]}function JA(e,t,n){var i=HA(e,t);return i&&!0!==i?i.clipPath(n,e._transform):Ie.clone(n)}function eD(e){var t=e.event;t.preventDefault&&t.preventDefault()}function tD(e,t,n){return e.childOfName("main").contain(t,n)}function nD(e,t,n,i){var a,r=e._creatingCover,o=e._creatingPanel,s=e._brushOption;if(e._track.push(n.slice()),function(e){var t=e._track;if(!t.length)return!1;var n=t[t.length-1],i=t[0],a=n[0]-i[0],r=n[1]-i[1];return AA(a*a+r*r,.5)>6}(e)||r){if(o&&!r){"single"===s.brushMode&&YA(e);var l=Ie.clone(s);l.brushType=iD(l.brushType,o),l.panelId=!0===o?null:o.panelId,r=e._creatingCover=EA(e,l),e._covers.push(r)}if(r){var u=oD[iD(e._brushType,o)];r.__brushOption.range=u.getCreatingRange(JA(e,r,e._track)),i&&(NA(e,r),u.updateCommon(e,r)),PA(e,r),a={isEnd:i}}}else i&&"single"===s.brushMode&&s.removeOnClick&&VA(e,t,n)&&YA(e)&&(a={isEnd:i,removeOnClick:!0});return a}function iD(e,t){return"auto"===e?t.defaultBrushType:e}LA.prototype={constructor:LA,enableBrush:function(e){var t,n;return this._brushType&&(n=(t=this)._zr,Hw.release(n,"globalPan",t._uid),function(e,t){SA(t,(function(t,n){e.off(n,t)}))}(n,t._handlers),t._brushType=t._brushOption=null),e.brushType&&function(e,t){var n=e._zr;e._enableGlobalPan||Hw.take(n,"globalPan",e._uid);(function(e,t){SA(t,(function(t,n){e.on(n,t)}))})(n,e._handlers),e._brushType=t.brushType,e._brushOption=Ie.merge(Ie.clone(OA),t,!0)}(this,e),this},setPanels:function(e){if(e&&e.length){var t=this._panels={};Ie.each(e,(function(e){t[e.panelId]=Ie.clone(e)}))}else this._panels=null;return this},mount:function(e){e=e||{},this._enableGlobalPan=e.enableGlobalPan;var t=this.group;return this._zr.add(t),t.attr({position:e.position||[0,0],rotation:e.rotation||0,scale:e.scale||[1,1]}),this._transform=t.getLocalTransform(),this},eachCover:function(e,t){SA(this._covers,e,t)},updateCovers:function(e){e=Ie.map(e,(function(e){return Ie.merge(Ie.clone(OA),e,!0)}));var t=this._covers,n=this._covers=[],i=this,a=this._creatingCover;return new Lp(t,e,(function(e,t){return r(e.__brushOption,t)}),r).add(o).update(o).remove((function(e){t[e]!==a&&i.group.remove(t[e])})).execute(),this;function r(e,t){return(null!=e.id?e.id:"\0-brush-index-"+t)+"-"+e.brushType}function o(r,o){var s=e[r];if(null!=o&&t[o]===a)n[r]=t[o];else{var l=n[r]=null!=o?(t[o].__brushOption=s,t[o]):NA(i,EA(i,s));zA(i,l)}}},unmount:function(){return this.enableBrush(!1),YA(this),this._zr.remove(this.group),this},dispose:function(){this.unmount(),this.off()}},Ie.mixin(LA,Ve);var aD={mousedown:function(e){if(this._dragging)rD(this,e);else if(!e.target||!e.target.draggable){eD(e);var t=this.group.transformCoordToLocal(e.offsetX,e.offsetY);this._creatingCover=null,(this._creatingPanel=VA(this,e,t))&&(this._dragging=!0,this._track=[t.slice()])}},mousemove:function(e){var t=e.offsetX,n=e.offsetY,i=this.group.transformCoordToLocal(t,n);if(function(e,t,n){if(e._brushType&&!function(e,t,n){var i=e._zr;return t<0||t>i.getWidth()||n<0||n>i.getHeight()}(e,t)){var i=e._zr,a=e._covers,r=VA(e,t,n);if(!e._dragging)for(var o=0;o<a.length;o++){var s=a[o].__brushOption;if(r&&(!0===r||s.panelId===r.panelId)&&oD[s.brushType].contain(a[o],n[0],n[1]))return}r&&i.setCursorStyle("crosshair")}}(this,e,i),this._dragging){eD(e);var a=nD(this,e,i,!1);a&&FA(this,a)}},mouseup:function(e){rD(this,e)}};function rD(e,t){if(e._dragging){eD(t);var n=t.offsetX,i=t.offsetY,a=e.group.transformCoordToLocal(n,i),r=nD(e,t,a,!0);e._dragging=!1,e._track=[],e._creatingCover=null,r&&FA(e,r)}}var oD={lineX:sD(0),lineY:sD(1),rect:{createCover:function(e,t){return WA(wA(KA,(function(e){return e}),(function(e){return e})),e,t,["w","e","n","s","se","sw","ne","nw"])},getCreatingRange:function(e){var t=GA(e);return qA(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(e,t,n,i){jA(e,t,n,i)},updateCommon:UA,contain:tD},polygon:{createCover:function(e,t){var n=new lu.Group;return n.add(new lu.Polyline({name:"main",style:XA(t),silent:!0})),n},getCreatingRange:function(e){return e},endCreating:function(e,t){t.remove(t.childAt(0)),t.add(new lu.Polygon({name:"main",draggable:!0,drift:wA(QA,e,t),ondragend:wA(FA,e,{isEnd:!0})}))},updateCoverShape:function(e,t,n,i){t.childAt(0).setShape({points:JA(e,t,n)})},updateCommon:UA,contain:tD}};function sD(e){return{createCover:function(t,n){return WA(wA(KA,(function(t){var n=[t,[0,100]];return e&&n.reverse(),n}),(function(t){return t[e]})),t,n,[["w","e"],["n","s"]][e])},getCreatingRange:function(t){var n=GA(t);return[TA(n[0][e],n[1][e]),IA(n[0][e],n[1][e])]},updateCoverShape:function(t,n,i,a){var r,o=HA(t,n);if(!0!==o&&o.getLinearBrushOtherExtent)r=o.getLinearBrushOtherExtent(e,t._transform);else{var s=t._zr;r=[0,[s.getWidth(),s.getHeight()][1-e]]}var l=[i,r];e&&l.reverse(),jA(t,n,l,a)},updateCommon:UA,contain:tD}}var lD=LA,uD=Jw.onIrrelevantElement;function cD(e){return Hn.create(e)}var hD={makeRectPanelClipPath:function(e){return e=cD(e),function(t,n){return lu.clipPointsByRect(t,e)}},makeLinearBrushOtherExtent:function(e,t){return e=cD(e),function(n){var i=null!=t?t:n,a=i?e.width:e.height,r=i?e.x:e.y;return[r,r+(a||0)]}},makeRectIsTargetByCursor:function(e,t,n){return e=cD(e),function(i,a,r){return e.contain(a[0],a[1])&&!uD(i,t,n)}}},dD=["axisLine","axisTickLabel","axisName"],fD=ry.extendComponentView({type:"parallelAxis",init:function(e,t){fD.superApply(this,"init",arguments),(this._brushController=new lD(t.getZr())).on("brush",Ie.bind(this._onBrush,this))},render:function(e,t,n,i){if(!function(e,t,n){return n&&"axisAreaSelect"===n.type&&t.findComponents({mainType:"parallelAxis",query:n})[0]===e}(e,t,i)){this.axisModel=e,this.api=n,this.group.removeAll();var a=this._axisGroup;if(this._axisGroup=new lu.Group,this.group.add(this._axisGroup),e.get("show")){var r=function(e,t){return t.getComponent("parallel",e.get("parallelIndex"))}(e,t),o=r.coordinateSystem,s=e.getAreaSelectStyle(),l=s.width,u=e.axis.dim,c=o.getAxisLayout(u),h=Ie.extend({strokeContainThreshold:l},c),d=new _x(e,h);Ie.each(dD,d.add,d),this._axisGroup.add(d.getGroup()),this._refreshBrushController(h,s,e,r,l,n);var f=i&&!1===i.animation?null:e;lu.groupTransition(a,this._axisGroup,f)}}},_refreshBrushController:function(e,t,n,i,a,r){var o=n.axis.getExtent(),s=o[1]-o[0],l=Math.min(30,.1*Math.abs(s)),u=lu.BoundingRect.create({x:o[0],y:-a/2,width:s,height:a});u.x-=l,u.width+=2*l,this._brushController.mount({enableGlobalPan:!0,rotation:e.rotation,position:e.position}).setPanels([{panelId:"pl",clipPath:hD.makeRectPanelClipPath(u),isTargetByCursor:hD.makeRectIsTargetByCursor(u,r,i),getLinearBrushOtherExtent:hD.makeLinearBrushOtherExtent(u,0)}]).enableBrush({brushType:"lineX",brushStyle:t,removeOnClick:!0}).updateCovers(function(e){var t=e.axis;return Ie.map(e.activeIntervals,(function(e){return{brushType:"lineX",panelId:"pl",range:[t.dataToCoord(e[0],!0),t.dataToCoord(e[1],!0)]}}))}(n))},_onBrush:function(e,t){var n=this.axisModel,i=n.axis,a=Ie.map(e,(function(e){return[i.coordToData(e.range[0],!0),i.coordToData(e.range[1],!0)]}));(!n.option.realtime===t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:n.id,intervals:a})},dispose:function(){this._brushController.dispose()}});ry.extendComponentView({type:"parallel",render:function(e,t,n){this._model=e,this._api=n,this._handlers||(this._handlers={},Ie.each(pD,(function(e,t){n.getZr().on(t,this._handlers[t]=Ie.bind(e,this))}),this)),uf.createOrUpdate(this,"_throttledDispatchExpand",e.get("axisExpandRate"),"fixRate")},dispose:function(e,t){Ie.each(this._handlers,(function(e,n){t.getZr().off(n,e)})),this._handlers=null},_throttledDispatchExpand:function(e){this._dispatchExpand(e)},_dispatchExpand:function(e){e&&this._api.dispatchAction(Ie.extend({type:"parallelAxisExpand"},e))}});var pD={mousedown:function(e){gD(this,"click")&&(this._mouseDownPoint=[e.offsetX,e.offsetY])},mouseup:function(e){var t=this._mouseDownPoint;if(gD(this,"click")&&t){var n=[e.offsetX,e.offsetY];if(Math.pow(t[0]-n[0],2)+Math.pow(t[1]-n[1],2)>5)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]);"none"!==i.behavior&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(e){if(!this._mouseDownPoint&&gD(this,"mousemove")){var t=this._model,n=t.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]),i=n.behavior;"jump"===i&&this._throttledDispatchExpand.debounceNextCall(t.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===i?null:{axisExpandWindow:n.axisExpandWindow,animation:"jump"===i&&null})}}};function gD(e,t){var n=e._model;return n.get("axisExpandable")&&n.get("axisExpandTriggerOn")===t}ry.registerPreprocessor(iA);var mD=Ie.each,vD=Ie.createHashMap;Yd.extend({type:"series.parallel",dependencies:["parallel"],visualColorAccessPath:"lineStyle.color",getInitialData:function(e,t){var n=this.getSource();return function(e,t){if(e.encodeDefine)return;var n=t.ecModel.getComponent("parallel",t.get("parallelIndex"));if(!n)return;var i=e.encodeDefine=vD();mD(n.dimensions,(function(e){var t=+e.replace("dim","");i.set(e,t)}))}(n,this),Yg(n,this)},getRawIndicesByActiveState:function(e){var t=this.coordinateSystem,n=this.getData(),i=[];return t.eachActiveState(n,(function(t,a){e===t&&i.push(n.getRawIndex(a))})),i},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"}});rf.extend({type:"parallel",init:function(){this._dataGroup=new lu.Group,this.group.add(this._dataGroup),this._data,this._initialized},render:function(e,t,n,i){var a=this._dataGroup,r=e.getData(),o=this._data,s=e.coordinateSystem,l=s.dimensions,u=xD(e);if(r.diff(o).add((function(e){bD(_D(r,a,e,l,s),r,e,u)})).update((function(t,n){var a=o.getItemGraphicEl(n),c=yD(r,t,l,s);r.setItemGraphicEl(t,a);var h=i&&!1===i.animation?null:e;lu.updateProps(a,{shape:{points:c}},h,t),bD(a,r,t,u)})).remove((function(e){var t=o.getItemGraphicEl(e);a.remove(t)})).execute(),!this._initialized){this._initialized=!0;var c=function(e,t,n){var i=e.model,a=e.getRect(),r=new lu.Rect({shape:{x:a.x,y:a.y,width:a.width,height:a.height}}),o="horizontal"===i.get("layout")?"width":"height";return r.setShape(o,0),lu.initProps(r,{shape:{width:a.width,height:a.height}},t,n),r}(s,e,(function(){setTimeout((function(){a.removeClipPath()}))}));a.setClipPath(c)}this._data=r},incrementalPrepareRender:function(e,t,n){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},incrementalRender:function(e,t,n){for(var i=t.getData(),a=t.coordinateSystem,r=a.dimensions,o=xD(t),s=e.start;s<e.end;s++){var l=_D(i,this._dataGroup,s,r,a);l.incremental=!0,bD(l,i,s,o)}},dispose:function(){},remove:function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null}});function yD(e,t,n,i){for(var a,r=[],o=0;o<n.length;o++){var s=n[o],l=e.get(e.mapDimension(s),t);a=l,("category"===i.getAxis(s).type?null==a:null==a||isNaN(a))||r.push(i.dataToPoint(l,s))}return r}function _D(e,t,n,i,a){var r=yD(e,n,i,a),o=new lu.Polyline({shape:{points:r},silent:!0,z2:10});return t.add(o),e.setItemGraphicEl(n,o),o}function xD(e){var t=e.get("smooth",!0);return!0===t&&(t=.3),{lineStyle:e.getModel("lineStyle").getLineStyle(),smooth:null!=t?t:.3}}function bD(e,t,n,i){var a=i.lineStyle;t.hasItemOption&&(a=t.getItemModel(n).getModel("lineStyle").getLineStyle());e.useStyle(a);var r=e.style;r.fill=null,r.stroke=t.getItemVisual(n,"color"),r.opacity=t.getItemVisual(n,"opacity"),i.smooth&&(e.shape.smooth=i.smooth)}var wD=["lineStyle","normal","opacity"],SD={seriesType:"parallel",reset:function(e,t,n){var i=e.getModel("itemStyle"),a=e.getModel("lineStyle"),r=t.get("color"),o=a.get("color")||i.get("color")||r[e.seriesIndex%r.length],s=e.get("inactiveOpacity"),l=e.get("activeOpacity"),u=e.getModel("lineStyle").getLineStyle(),c=e.coordinateSystem,h=e.getData(),d={normal:u.opacity,active:l,inactive:s};return h.setVisual("color",o),{progress:function(e,t){c.eachActiveState(t,(function(e,n){var i=d[e];if("normal"===e&&t.hasItemOption){var a=t.getItemModel(n).get(wD,!0);null!=a&&(i=a)}t.setItemVisual(n,"opacity",i)}),e.start,e.end)}}}};ry.registerVisual(SD);var MD=Pu.encodeHTML,TD=Yd.extend({type:"series.sankey",layoutInfo:null,levelModels:null,getInitialData:function(e,t){for(var n=e.edges||e.links,i=e.data||e.nodes,a=e.levels,r=this.levelModels={},o=0;o<a.length;o++)null!=a[o].depth&&a[o].depth>=0&&(r[a[o].depth]=new bu(a[o],this,t));if(i&&n)return CT(i,n,this,!0,(function(e,t){e.wrapMethod("getItemModel",(function(e,t){return e.customizeGetParent((function(e){var n=this.parentModel,i=n.getData().getItemLayout(t).depth;return n.levelModels[i]||this.parentModel})),e})),t.wrapMethod("getItemModel",(function(e,t){return e.customizeGetParent((function(e){var n=this.parentModel,i=n.getGraph().getEdgeByIndex(t).node1.getLayout().depth;return n.levelModels[i]||this.parentModel})),e}))})).data},setNodePosition:function(e,t){var n=this.option.data[e];n.localX=t[0],n.localY=t[1]},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},formatTooltip:function(e,t,n){if("edge"===n){var i=this.getDataParams(e,n),a=i.data,r=a.source+" -- "+a.target;return i.value&&(r+=" : "+i.value),MD(r)}if("node"===n){var o=this.getGraph().getNodeByIndex(e).getLayout().value,s=this.getDataParams(e,n).data.name;if(o)r=s+" : "+o;return MD(r)}return TD.superCall(this,"formatTooltip",e,t)},optionUpdated:function(){var e=this.option;!0===e.focusNodeAdjacency&&(e.focusNodeAdjacency="allEdges")},getDataParams:function(e,t){var n=TD.superCall(this,"getDataParams",e,t);if(null==n.value&&"node"===t){var i=this.getGraph().getNodeByIndex(e).getLayout().value;n.value=i}return n},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",layout:null,left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,focusNodeAdjacency:!1,layoutIterations:32,label:{show:!0,position:"right",color:"#000",fontSize:12},levels:[],nodeAlign:"justify",itemStyle:{borderWidth:1,borderColor:"#333"},lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},animationEasing:"linear",animationDuration:1e3}}),ID=["itemStyle","opacity"],AD=["emphasis","itemStyle","opacity"],DD=["lineStyle","opacity"],CD=["emphasis","lineStyle","opacity"];function OD(e,t){return e.getVisual("opacity")||e.getModel().get(t)}function kD(e,t,n){var i=e.getGraphicEl(),a=OD(e,t);null!=n&&(null==a&&(a=1),a*=n),i.downplay&&i.downplay(),i.traverse((function(e){"group"!==e.type&&e.setStyle("opacity",a)}))}function LD(e,t){var n=OD(e,t),i=e.getGraphicEl();i.traverse((function(e){"group"!==e.type&&e.setStyle("opacity",n)})),i.highlight&&i.highlight()}var ED=lu.extendShape({shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,cpx2:0,cpy2:0,extent:0,orient:""},buildPath:function(e,t){var n=t.extent;e.moveTo(t.x1,t.y1),e.bezierCurveTo(t.cpx1,t.cpy1,t.cpx2,t.cpy2,t.x2,t.y2),"vertical"===t.orient?(e.lineTo(t.x2+n,t.y2),e.bezierCurveTo(t.cpx2+n,t.cpy2,t.cpx1+n,t.cpy1,t.x1+n,t.y1)):(e.lineTo(t.x2,t.y2+n),e.bezierCurveTo(t.cpx2,t.cpy2+n,t.cpx1,t.cpy1+n,t.x1,t.y1+n)),e.closePath()},highlight:function(){this.trigger("emphasis")},downplay:function(){this.trigger("normal")}});ry.extendChartView({type:"sankey",_model:null,_focusAdjacencyDisabled:!1,render:function(e,t,n){var i=this,a=e.getGraph(),r=this.group,o=e.layoutInfo,s=o.width,l=o.height,u=e.getData(),c=e.getData("edge"),h=e.get("orient");this._model=e,r.removeAll(),r.attr("position",[o.x,o.y]),a.eachEdge((function(t){var n=new ED;n.dataIndex=t.dataIndex,n.seriesIndex=e.seriesIndex,n.dataType="edge";var i,a,o,u,d,f,p,g,m=t.getModel("lineStyle"),v=m.get("curveness"),y=t.node1.getLayout(),_=t.node1.getModel(),x=_.get("localX"),b=_.get("localY"),w=t.node2.getLayout(),S=t.node2.getModel(),M=S.get("localX"),T=S.get("localY"),I=t.getLayout();switch(n.shape.extent=Math.max(1,I.dy),n.shape.orient=h,"vertical"===h?(i=(null!=x?x*s:y.x)+I.sy,a=(null!=b?b*l:y.y)+y.dy,o=(null!=M?M*s:w.x)+I.ty,d=i,f=a*(1-v)+(u=null!=T?T*l:w.y)*v,p=o,g=a*v+u*(1-v)):(i=(null!=x?x*s:y.x)+y.dx,a=(null!=b?b*l:y.y)+I.sy,d=i*(1-v)+(o=null!=M?M*s:w.x)*v,f=a,p=i*v+o*(1-v),g=u=(null!=T?T*l:w.y)+I.ty),n.setShape({x1:i,y1:a,x2:o,y2:u,cpx1:d,cpy1:f,cpx2:p,cpy2:g}),n.setStyle(m.getItemStyle()),n.style.fill){case"source":n.style.fill=t.node1.getVisual("color");break;case"target":n.style.fill=t.node2.getVisual("color")}lu.setHoverStyle(n,t.getModel("emphasis.lineStyle").getItemStyle()),r.add(n),c.setItemGraphicEl(t.dataIndex,n)})),a.eachNode((function(t){var n=t.getLayout(),i=t.getModel(),a=i.get("localX"),o=i.get("localY"),c=i.getModel("label"),h=i.getModel("emphasis.label"),d=new lu.Rect({shape:{x:null!=a?a*s:n.x,y:null!=o?o*l:n.y,width:n.dx,height:n.dy},style:i.getModel("itemStyle").getItemStyle()}),f=t.getModel("emphasis.itemStyle").getItemStyle();lu.setLabelStyle(d.style,f,c,h,{labelFetcher:e,labelDataIndex:t.dataIndex,defaultText:t.id,isRectText:!0}),d.setStyle("fill",t.getVisual("color")),lu.setHoverStyle(d,f),r.add(d),u.setItemGraphicEl(t.dataIndex,d),d.dataType="node"})),u.eachItemGraphicEl((function(t,a){var r=u.getItemModel(a);r.get("draggable")&&(t.drift=function(t,r){i._focusAdjacencyDisabled=!0,this.shape.x+=t,this.shape.y+=r,this.dirty(),n.dispatchAction({type:"dragNode",seriesId:e.id,dataIndex:u.getRawIndex(a),localX:this.shape.x/s,localY:this.shape.y/l})},t.ondragend=function(){i._focusAdjacencyDisabled=!1},t.draggable=!0,t.cursor="move"),t.highlight=function(){this.trigger("emphasis")},t.downplay=function(){this.trigger("normal")},t.focusNodeAdjHandler&&t.off("mouseover",t.focusNodeAdjHandler),t.unfocusNodeAdjHandler&&t.off("mouseout",t.unfocusNodeAdjHandler),r.get("focusNodeAdjacency")&&(t.on("mouseover",t.focusNodeAdjHandler=function(){i._focusAdjacencyDisabled||(i._clearTimer(),n.dispatchAction({type:"focusNodeAdjacency",seriesId:e.id,dataIndex:t.dataIndex}))}),t.on("mouseout",t.unfocusNodeAdjHandler=function(){i._focusAdjacencyDisabled||i._dispatchUnfocus(n)}))})),c.eachItemGraphicEl((function(t,a){var r=c.getItemModel(a);t.focusNodeAdjHandler&&t.off("mouseover",t.focusNodeAdjHandler),t.unfocusNodeAdjHandler&&t.off("mouseout",t.unfocusNodeAdjHandler),r.get("focusNodeAdjacency")&&(t.on("mouseover",t.focusNodeAdjHandler=function(){i._focusAdjacencyDisabled||(i._clearTimer(),n.dispatchAction({type:"focusNodeAdjacency",seriesId:e.id,edgeDataIndex:t.dataIndex}))}),t.on("mouseout",t.unfocusNodeAdjHandler=function(){i._focusAdjacencyDisabled||i._dispatchUnfocus(n)}))})),!this._data&&e.get("animation")&&r.setClipPath(function(e,t,n){var i=new lu.Rect({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return lu.initProps(i,{shape:{width:e.width+20}},t,n),i}(r.getBoundingRect(),e,(function(){r.removeClipPath()}))),this._data=e.getData()},dispose:function(){this._clearTimer()},_dispatchUnfocus:function(e){var t=this;this._clearTimer(),this._unfocusDelayTimer=setTimeout((function(){t._unfocusDelayTimer=null,e.dispatchAction({type:"unfocusNodeAdjacency",seriesId:t._model.id})}),500)},_clearTimer:function(){this._unfocusDelayTimer&&(clearTimeout(this._unfocusDelayTimer),this._unfocusDelayTimer=null)},focusNodeAdjacency:function(e,t,n,i){var a=e.getData(),r=a.graph,o=i.dataIndex,s=a.getItemModel(o),l=i.edgeDataIndex;if(null!=o||null!=l){var u=r.getNodeByIndex(o),c=r.getEdgeByIndex(l);if(r.eachNode((function(e){kD(e,ID,.1)})),r.eachEdge((function(e){kD(e,DD,.1)})),u){LD(u,AD);var h=s.get("focusNodeAdjacency");"outEdges"===h?Ie.each(u.outEdges,(function(e){e.dataIndex<0||(LD(e,CD),LD(e.node2,AD))})):"inEdges"===h?Ie.each(u.inEdges,(function(e){e.dataIndex<0||(LD(e,CD),LD(e.node1,AD))})):"allEdges"===h&&Ie.each(u.edges,(function(e){e.dataIndex<0||(LD(e,CD),e.node1!==u&&LD(e.node1,AD),e.node2!==u&&LD(e.node2,AD))}))}c&&(LD(c,CD),LD(c.node1,AD),LD(c.node2,AD))}},unfocusNodeAdjacency:function(e,t,n,i){var a=e.getGraph();a.eachNode((function(e){kD(e,ID)})),a.eachEdge((function(e){kD(e,DD)}))}});ry.registerAction({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])}))}));var ND=Sr.groupData;function PD(e){var t=e.hostGraph.data.getRawDataItem(e.dataIndex);return null!=t.depth&&t.depth>=0}function RD(e,t,n,i,a){var r="vertical"===a?"x":"y";Ie.each(e,(function(e){var o,s,l;e.sort((function(e,t){return e.getLayout()[r]-t.getLayout()[r]}));for(var u=0,c=e.length,h="vertical"===a?"dx":"dy",d=0;d<c;d++)(l=u-(s=e[d]).getLayout()[r])>0&&(o=s.getLayout()[r]+l,"vertical"===a?s.setLayout({x:o},!0):s.setLayout({y:o},!0)),u=s.getLayout()[r]+s.getLayout()[h]+t;if((l=u-t-("vertical"===a?i:n))>0)for(o=s.getLayout()[r]-l,"vertical"===a?s.setLayout({x:o},!0):s.setLayout({y:o},!0),u=o,d=c-2;d>=0;--d)(l=(s=e[d]).getLayout()[r]+s.getLayout()[h]+t-u)>0&&(o=s.getLayout()[r]-l,"vertical"===a?s.setLayout({x:o},!0):s.setLayout({y:o},!0)),u=s.getLayout()[r]}))}function zD(e,t,n){Ie.each(e.slice().reverse(),(function(e){Ie.each(e,(function(e){if(e.outEdges.length){var i=WD(e.outEdges,BD,n)/WD(e.outEdges,GD,n);if(isNaN(i)){var a=e.outEdges.length;i=a?WD(e.outEdges,VD,n)/a:0}if("vertical"===n){var r=e.getLayout().x+(i-FD(e,n))*t;e.setLayout({x:r},!0)}else{var o=e.getLayout().y+(i-FD(e,n))*t;e.setLayout({y:o},!0)}}}))}))}function BD(e,t){return FD(e.node2,t)*e.getValue()}function VD(e,t){return FD(e.node2,t)}function HD(e,t){return FD(e.node1,t)*e.getValue()}function YD(e,t){return FD(e.node1,t)}function FD(e,t){return"vertical"===t?e.getLayout().x+e.getLayout().dx/2:e.getLayout().y+e.getLayout().dy/2}function GD(e){return e.getValue()}function WD(e,t,n){for(var i=0,a=e.length,r=-1;++r<a;){var o=+t.call(e,e[r],n);isNaN(o)||(i+=o)}return i}function jD(e,t,n){Ie.each(e,(function(e){Ie.each(e,(function(e){if(e.inEdges.length){var i=WD(e.inEdges,HD,n)/WD(e.inEdges,GD,n);if(isNaN(i)){var a=e.inEdges.length;i=a?WD(e.inEdges,YD,n)/a:0}if("vertical"===n){var r=e.getLayout().x+(i-FD(e,n))*t;e.setLayout({x:r},!0)}else{var o=e.getLayout().y+(i-FD(e,n))*t;e.setLayout({y:o},!0)}}}))}))}var UD=function(e,t,n){e.eachSeriesByType("sankey",(function(e){var n=e.get("nodeWidth"),i=e.get("nodeGap"),a=function(e,t){return Uu.getLayoutRect(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}(e,t);e.layoutInfo=a;var r=a.width,o=a.height,s=e.getGraph(),l=s.nodes,u=s.edges;!function(e){Ie.each(e,(function(e){var t=WD(e.outEdges,GD),n=WD(e.inEdges,GD),i=e.getValue()||0,a=Math.max(t,n,i);e.setLayout({value:a},!0)}))}(l),function(e,t,n,i,a,r,o,s,l){(function(e,t,n,i,a,r,o){for(var s=[],l=[],u=[],c=[],h=0,d=0;d<t.length;d++)s[d]=1;for(d=0;d<e.length;d++)l[d]=e[d].inEdges.length,0===l[d]&&u.push(e[d]);var f=-1;for(;u.length;){for(var p=0;p<u.length;p++){var g=u[p],m=g.hostGraph.data.getRawDataItem(g.dataIndex),v=null!=m.depth&&m.depth>=0;v&&m.depth>f&&(f=m.depth),g.setLayout({depth:v?m.depth:h},!0),"vertical"===r?g.setLayout({dy:n},!0):g.setLayout({dx:n},!0);for(var y=0;y<g.outEdges.length;y++){var _=g.outEdges[y],x=t.indexOf(_);s[x]=0;var b=_.node2,w=e.indexOf(b);0==--l[w]&&c.indexOf(b)<0&&c.push(b)}}++h,u=c,c=[]}for(d=0;d<s.length;d++)if(1===s[d])throw new Error("Sankey is a DAG, the original data has cycle!");var S=f>h-1?f:h-1;o&&"left"!==o&&function(e,t,n,i){if("right"===t){for(var a=[],r=e,o=0;r.length;){for(var s=0;s<r.length;s++){var l=r[s];l.setLayout({skNodeHeight:o},!0);for(var u=0;u<l.inEdges.length;u++){var c=l.inEdges[u];a.indexOf(c.node1)<0&&a.push(c.node1)}}r=a,a=[],++o}Ie.each(e,(function(e){PD(e)||e.setLayout({depth:Math.max(0,i-e.getLayout().skNodeHeight)},!0)}))}else"justify"===t&&function(e,t){Ie.each(e,(function(e){PD(e)||e.outEdges.length||e.setLayout({depth:t},!0)}))}(e,i)}(e,o,0,S);!function(e,t,n){Ie.each(e,(function(e){var i=e.getLayout().depth*t;"vertical"===n?e.setLayout({y:i},!0):e.setLayout({x:i},!0)}))}(e,"vertical"===r?(a-n)/S:(i-n)/S,r)})(e,t,n,a,r,s,l),function(e,t,n,i,a,r,o){var s=function(e,t){var n=[],i="vertical"===t?"y":"x",a=ND(e,(function(e){return e.getLayout()[i]}));return a.keys.sort((function(e,t){return e-t})),Ie.each(a.keys,(function(e){n.push(a.buckets.get(e))})),n}(e,o);(function(e,t,n,i,a,r){var o=1/0;Ie.each(e,(function(e){var t=e.length,s=0;Ie.each(e,(function(e){s+=e.getLayout().value}));var l="vertical"===r?(i-(t-1)*a)/s:(n-(t-1)*a)/s;l<o&&(o=l)})),Ie.each(e,(function(e){Ie.each(e,(function(e,t){var n=e.getLayout().value*o;"vertical"===r?(e.setLayout({x:t},!0),e.setLayout({dx:n},!0)):(e.setLayout({y:t},!0),e.setLayout({dy:n},!0))}))})),Ie.each(t,(function(e){var t=+e.getValue()*o;e.setLayout({dy:t},!0)}))})(s,t,n,i,a,o),RD(s,a,n,i,o);for(var l=1;r>0;r--)zD(s,l*=.99,o),RD(s,a,n,i,o),jD(s,l,o),RD(s,a,n,i,o)}(e,t,r,a,i,o,s),function(e,t){var n="vertical"===t?"x":"y";Ie.each(e,(function(e){e.outEdges.sort((function(e,t){return e.node2.getLayout()[n]-t.node2.getLayout()[n]})),e.inEdges.sort((function(e,t){return e.node1.getLayout()[n]-t.node1.getLayout()[n]}))})),Ie.each(e,(function(e){var t=0,n=0;Ie.each(e.outEdges,(function(e){e.setLayout({sy:t},!0),t+=e.getLayout().dy})),Ie.each(e.inEdges,(function(e){e.setLayout({ty:n},!0),n+=e.getLayout().dy}))}))}(e,s)}(l,u,n,i,r,o,0!==Ie.filter(l,(function(e){return 0===e.getLayout().value})).length?0:e.get("layoutIterations"),e.get("orient"),e.get("nodeAlign"))}))};var ZD=function(e,t){e.eachSeriesByType("sankey",(function(e){var t=e.getGraph().nodes;if(t.length){var n=1/0,i=-1/0;Ie.each(t,(function(e){var t=e.getLayout().value;t<n&&(n=t),t>i&&(i=t)})),Ie.each(t,(function(t){var a=new tT({type:"color",mappingMethod:"linear",dataExtent:[n,i],visual:e.get("color")}).mapValueToVisual(t.getLayout().value),r=t.getModel().get("itemStyle.color");null!=r?t.setVisual("color",r):t.setVisual("color",a)}))}}))};ry.registerLayout(UD),ry.registerVisual(ZD);var XD=zp.getDimensionTypeByAxis,qD=Hc.makeSeriesEncodeForAxisCoordSys,KD={seriesModelMixin:{_baseAxisDim:null,getInitialData:function(e,t){var n,i,a=t.getComponent("xAxis",this.get("xAxisIndex")),r=t.getComponent("yAxis",this.get("yAxisIndex")),o=a.get("type"),s=r.get("type");"category"===o?(e.layout="horizontal",n=a.getOrdinalMeta(),i=!0):"category"===s?(e.layout="vertical",n=r.getOrdinalMeta(),i=!0):e.layout=e.layout||"horizontal";var l=["x","y"],u="horizontal"===e.layout?0:1,c=this._baseAxisDim=l[u],h=l[1-u],d=[a,r],f=d[u].get("type"),p=d[1-u].get("type"),g=e.data;if(g&&i){var m=[];Ie.each(g,(function(e,t){var n;e.value&&Ie.isArray(e.value)?(n=e.value.slice(),e.value.unshift(t)):Ie.isArray(e)?(n=e.slice(),e.unshift(t)):n=e,m.push(n)})),e.data=m}var v=this.defaultValueDimensions,y=[{name:c,type:XD(f),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:h,type:XD(p),dimsDef:v.slice()}];return gb(this,{coordDimensions:y,dimensionsCount:v.length+1,encodeDefaulter:Ie.curry(qD,y,this)})},getBaseAxis:function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis}}},QD=KD.seriesModelMixin,$D=Yd.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}});Ie.mixin($D,QD,!0);var JD=["itemStyle"],eC=["emphasis","itemStyle"],tC=(rf.extend({type:"boxplot",render:function(e,t,n){var i=e.getData(),a=this.group,r=this._data;this._data||a.removeAll();var o="horizontal"===e.get("layout")?1:0;i.diff(r).add((function(e){if(i.hasValue(e)){var t=nC(i.getItemLayout(e),i,e,o,!0);i.setItemGraphicEl(e,t),a.add(t)}})).update((function(e,t){var n=r.getItemGraphicEl(t);if(i.hasValue(e)){var s=i.getItemLayout(e);n?iC(s,n,i,e):n=nC(s,i,e,o),a.add(n),i.setItemGraphicEl(e,n)}else a.remove(n)})).remove((function(e){var t=r.getItemGraphicEl(e);t&&a.remove(t)})).execute(),this._data=i},remove:function(e){var t=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl((function(e){e&&t.remove(e)}))},dispose:Ie.noop}),jo.extend({type:"boxplotBoxPath",shape:{},buildPath:function(e,t){var n=t.points,i=0;for(e.moveTo(n[i][0],n[i][1]),i++;i<4;i++)e.lineTo(n[i][0],n[i][1]);for(e.closePath();i<n.length;i++)e.moveTo(n[i][0],n[i][1]),i++,e.lineTo(n[i][0],n[i][1])}}));function nC(e,t,n,i,a){var r=e.ends,o=new tC({shape:{points:a?aC(r,i,e):r}});return iC(e,o,t,n,a),o}function iC(e,t,n,i,a){var r=n.hostModel;(0,lu[a?"initProps":"updateProps"])(t,{shape:{points:e.ends}},r,i);var o=n.getItemModel(i),s=o.getModel(JD),l=n.getItemVisual(i,"color"),u=s.getItemStyle(["borderColor"]);u.stroke=l,u.strokeNoScale=!0,t.useStyle(u),t.z2=100;var c=o.getModel(eC).getItemStyle();lu.setHoverStyle(t,c)}function aC(e,t,n){return Ie.map(e,(function(e){return(e=e.slice())[t]=n.initBaseline,e}))}var rC=["itemStyle","borderColor"];var oC=function(e,t){var n=e.get("color");e.eachRawSeriesByType("boxplot",(function(t){var i=n[t.seriesIndex%n.length],a=t.getData();a.setVisual({legendSymbol:"roundRect",color:t.get(rC)||i}),e.isSeriesFiltered(t)||a.each((function(e){var t=a.getItemModel(e);a.setItemVisual(e,{color:t.get(rC,!0)})}))}))},sC=Au.parsePercent,lC=Ie.each;var uC=function(e){var t=function(e){var t=[],n=[];return e.eachSeriesByType("boxplot",(function(e){var i=e.getBaseAxis(),a=Ie.indexOf(n,i);a<0&&(a=n.length,n[a]=i,t[a]={axis:i,seriesModels:[]}),t[a].seriesModels.push(e)})),t}(e);lC(t,(function(e){var t=e.seriesModels;t.length&&(!function(e){var t,n,i=e.axis,a=e.seriesModels,r=a.length,o=e.boxWidthList=[],s=e.boxOffsetList=[],l=[];if("category"===i.type)n=i.getBandWidth();else{var u=0;lC(a,(function(e){u=Math.max(u,e.getData().count())})),t=i.getExtent(),Math.abs(t[1]-t[0])}lC(a,(function(e){var t=e.get("boxWidth");Ie.isArray(t)||(t=[t,t]),l.push([sC(t[0],n)||0,sC(t[1],n)||0])}));var c=.8*n-2,h=c/r*.3,d=(c-h*(r-1))/r,f=d/2-c/2;lC(a,(function(e,t){s.push(f),f+=h+d,o.push(Math.min(Math.max(d,l[t][0]),l[t][1]))}))}(e),lC(t,(function(t,n){!function(e,t,n){var i=e.coordinateSystem,a=e.getData(),r=n/2,o="horizontal"===e.get("layout")?0:1,s=1-o,l=["x","y"],u=a.mapDimension(l[o]),c=a.mapDimension(l[s],!0);if(null==u||c.length<5)return;for(var h=0;h<a.count();h++){var d=a.get(u,h),f=_(d,c[2],h),p=_(d,c[0],h),g=_(d,c[1],h),m=_(d,c[3],h),v=_(d,c[4],h),y=[];x(y,g,0),x(y,m,1),y.push(p,g,v,m),b(y,p),b(y,v),b(y,f),a.setItemLayout(h,{initBaseline:f[s],ends:y})}function _(e,n,r){var l,u=a.get(n,r),c=[];return c[o]=e,c[s]=u,isNaN(e)||isNaN(u)?l=[NaN,NaN]:(l=i.dataToPoint(c))[o]+=t,l}function x(e,t,n){var i=t.slice(),a=t.slice();i[o]+=r,a[o]-=r,n?e.push(i,a):e.push(a,i)}function b(e,t){var n=t.slice(),i=t.slice();n[o]-=r,i[o]+=r,e.push(n,i)}}(t,e.boxOffsetList[n],e.boxWidthList[n])})))}))};ry.registerVisual(oC),ry.registerLayout(uC);var cC=KD.seriesModelMixin,hC=Yd.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,clip:!0,itemStyle:{color:"#c23531",color0:"#314656",borderWidth:1,borderColor:"#c23531",borderColor0:"#314656"},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationUpdate:!1,animationEasing:"linear",animationDuration:300},getShadowDim:function(){return"open"},brushSelector:function(e,t,n){var i=t.getItemLayout(e);return i&&n.rect(i.brushRect)}});Ie.mixin(hC,cC,!0);var dC=Qy.createClipPath,fC=["itemStyle"],pC=["emphasis","itemStyle"],gC=["color","color0","borderColor","borderColor0"],mC=(rf.extend({type:"candlestick",render:function(e,t,n){this.group.removeClipPath(),this._updateDrawMode(e),this._isLargeDraw?this._renderLarge(e):this._renderNormal(e)},incrementalPrepareRender:function(e,t,n){this._clear(),this._updateDrawMode(e)},incrementalRender:function(e,t,n,i){this._isLargeDraw?this._incrementalRenderLarge(e,t):this._incrementalRenderNormal(e,t)},_updateDrawMode:function(e){var t=e.pipelineContext.large;(null==this._isLargeDraw||t^this._isLargeDraw)&&(this._isLargeDraw=t,this._clear())},_renderNormal:function(e){var t=e.getData(),n=this._data,i=this.group,a=t.getLayout("isSimpleBox"),r=e.get("clip",!0),o=e.coordinateSystem,s=o.getArea&&o.getArea();this._data||i.removeAll(),t.diff(n).add((function(n){if(t.hasValue(n)){var o,l=t.getItemLayout(n);if(r&&yC(s,l))return;o=vC(l,n,!0),lu.initProps(o,{shape:{points:l.ends}},e,n),_C(o,t,n,a),i.add(o),t.setItemGraphicEl(n,o)}})).update((function(o,l){var u=n.getItemGraphicEl(l);if(t.hasValue(o)){var c=t.getItemLayout(o);r&&yC(s,c)?i.remove(u):(u?lu.updateProps(u,{shape:{points:c.ends}},e,o):u=vC(c),_C(u,t,o,a),i.add(u),t.setItemGraphicEl(o,u))}else i.remove(u)})).remove((function(e){var t=n.getItemGraphicEl(e);t&&i.remove(t)})).execute(),this._data=t},_renderLarge:function(e){this._clear(),wC(e,this.group);var t=e.get("clip",!0)?dC(e.coordinateSystem,!1,e):null;t?this.group.setClipPath(t):this.group.removeClipPath()},_incrementalRenderNormal:function(e,t){for(var n,i=t.getData(),a=i.getLayout("isSimpleBox");null!=(n=e.next());){var r;_C(r=vC(i.getItemLayout(n)),i,n,a),r.incremental=!0,this.group.add(r)}},_incrementalRenderLarge:function(e,t){wC(t,this.group,!0)},remove:function(e){this._clear()},_clear:function(){this.group.removeAll(),this._data=null},dispose:Ie.noop}),jo.extend({type:"normalCandlestickBox",shape:{},buildPath:function(e,t){var n=t.points;this.__simpleBox?(e.moveTo(n[4][0],n[4][1]),e.lineTo(n[6][0],n[6][1])):(e.moveTo(n[0][0],n[0][1]),e.lineTo(n[1][0],n[1][1]),e.lineTo(n[2][0],n[2][1]),e.lineTo(n[3][0],n[3][1]),e.closePath(),e.moveTo(n[4][0],n[4][1]),e.lineTo(n[5][0],n[5][1]),e.moveTo(n[6][0],n[6][1]),e.lineTo(n[7][0],n[7][1]))}}));function vC(e,t,n){var i=e.ends;return new mC({shape:{points:n?xC(i,e):i},z2:100})}function yC(e,t){for(var n=!0,i=0;i<t.ends.length;i++)if(e.contain(t.ends[i][0],t.ends[i][1])){n=!1;break}return n}function _C(e,t,n,i){var a=t.getItemModel(n),r=a.getModel(fC),o=t.getItemVisual(n,"color"),s=t.getItemVisual(n,"borderColor")||o,l=r.getItemStyle(gC);e.useStyle(l),e.style.strokeNoScale=!0,e.style.fill=o,e.style.stroke=s,e.__simpleBox=i;var u=a.getModel(pC).getItemStyle();lu.setHoverStyle(e,u)}function xC(e,t){return Ie.map(e,(function(e){return(e=e.slice())[1]=t.initBaseline,e}))}var bC=jo.extend({type:"largeCandlestickBox",shape:{},buildPath:function(e,t){for(var n=t.points,i=0;i<n.length;)if(this.__sign===n[i++]){var a=n[i++];e.moveTo(a,n[i++]),e.lineTo(a,n[i++])}else i+=3}});function wC(e,t,n){var i=e.getData(),a=i.getLayout("largePoints"),r=new bC({shape:{points:a},__sign:1});t.add(r);var o=new bC({shape:{points:a},__sign:-1});t.add(o),SC(1,r,e,i),SC(-1,o,e,i),n&&(r.incremental=!0,o.incremental=!0)}function SC(e,t,n,i){var a=e>0?"P":"N",r=i.getVisual("borderColor"+a)||i.getVisual("color"+a),o=n.getModel(fC).getItemStyle(gC);t.useStyle(o),t.style.fill=null,t.style.stroke=r}var MC=function(e){e&&Ie.isArray(e.series)&&Ie.each(e.series,(function(e){Ie.isObject(e)&&"k"===e.type&&(e.type="candlestick")}))},TC=["itemStyle","borderColor"],IC=["itemStyle","borderColor0"],AC=["itemStyle","color"],DC=["itemStyle","color0"],CC={seriesType:"candlestick",plan:Ud(),performRawSeries:!0,reset:function(e,t){if(e.getData().setVisual({legendSymbol:"roundRect",colorP:n(1,e),colorN:n(-1,e),borderColorP:i(1,e),borderColorN:i(-1,e)}),!t.isSeriesFiltered(e))return!e.pipelineContext.large&&{progress:function(e,t){var a;for(;null!=(a=e.next());){var r=t.getItemModel(a),o=t.getItemLayout(a).sign;t.setItemVisual(a,{color:n(o,r),borderColor:i(o,r)})}}};function n(e,t){return t.get(e>0?AC:DC)}function i(e,t){return t.get(e>0?TC:IC)}}},OC=lu.subPixelOptimize,kC=Au.parsePercent,LC=Ie.retrieve2,EC="undefined"!=typeof Float32Array?Float32Array:Array;function NC(e,t,n,i,a){return n>i?-1:n<i?1:t>0?e.get(a,t-1)<=i?1:-1:1}var PC={seriesType:"candlestick",plan:Ud(),reset:function(e){var t=e.coordinateSystem,n=e.getData(),i=function(e,t){var n,i=e.getBaseAxis(),a="category"===i.type?i.getBandWidth():(n=i.getExtent(),Math.abs(n[1]-n[0])/t.count()),r=kC(LC(e.get("barMaxWidth"),a),a),o=kC(LC(e.get("barMinWidth"),1),a),s=e.get("barWidth");return null!=s?kC(s,a):Math.max(Math.min(a/2,r),o)}(e,n),a=["x","y"],r=n.mapDimension(a[0]),o=n.mapDimension(a[1],!0),s=o[0],l=o[1],u=o[2],c=o[3];if(n.setLayout({candleWidth:i,isSimpleBox:i<=1.3}),!(null==r||o.length<4))return{progress:e.pipelineContext.large?function(e,n){var i,a,o=new EC(4*e.count),h=0,d=[],f=[];for(;null!=(a=e.next());){var p=n.get(r,a),g=n.get(s,a),m=n.get(l,a),v=n.get(u,a),y=n.get(c,a);isNaN(p)||isNaN(v)||isNaN(y)?(o[h++]=NaN,h+=3):(o[h++]=NC(n,a,g,m,l),d[0]=p,d[1]=v,i=t.dataToPoint(d,null,f),o[h++]=i?i[0]:NaN,o[h++]=i?i[1]:NaN,d[1]=y,i=t.dataToPoint(d,null,f),o[h++]=i?i[1]:NaN)}n.setLayout("largePoints",o)}:function(e,n){var a;for(;null!=(a=e.next());){var o=n.get(r,a),h=n.get(s,a),d=n.get(l,a),f=n.get(u,a),p=n.get(c,a),g=Math.min(h,d),m=Math.max(h,d),v=w(g,o),y=w(m,o),_=w(f,o),x=w(p,o),b=[];S(b,y,0),S(b,v,1),b.push(T(x),T(y),T(_),T(v)),n.setItemLayout(a,{sign:NC(n,a,h,d,l),initBaseline:h>d?y[1]:v[1],ends:b,brushRect:M(f,p,o)})}function w(e,n){var i=[];return i[0]=n,i[1]=e,isNaN(n)||isNaN(e)?[NaN,NaN]:t.dataToPoint(i)}function S(e,t,n){var a=t.slice(),r=t.slice();a[0]=OC(a[0]+i/2,1,!1),r[0]=OC(r[0]-i/2,1,!0),n?e.push(a,r):e.push(r,a)}function M(e,t,n){var a=w(e,n),r=w(t,n);return a[0]-=i/2,r[0]-=i/2,{x:a[0],y:a[1],width:i,height:r[1]-a[1]}}function T(e){return e[0]=OC(e[0],1),e}}}}};ry.registerPreprocessor(MC),ry.registerVisual(CC),ry.registerLayout(PC);Yd.extend({type:"series.effectScatter",dependencies:["grid","polar"],getInitialData:function(e,t){return Yg(this.getSource(),this,{useEncodeDefaulter:!0})},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}});var RC=ov.createSymbol,zC=lu.Group,BC=Au.parsePercent;function VC(e,t){var n=t.rippleEffectColor||t.color;e.eachChild((function(e){e.attr({z:t.z,zlevel:t.zlevel,style:{stroke:"stroke"===t.brushType?n:null,fill:"fill"===t.brushType?n:null}})}))}function HC(e,t){zC.call(this);var n=new by(e,t),i=new zC;this.add(n),this.add(i),i.beforeUpdate=function(){this.attr(n.getScale())},this.updateData(e,t)}var YC=HC.prototype;YC.stopEffectAnimation=function(){this.childAt(1).removeAll()},YC.startEffectAnimation=function(e){for(var t=e.symbolType,n=e.color,i=this.childAt(1),a=0;a<3;a++){var r=RC(t,-1,-1,2,2,n);r.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scale:[.5,.5]});var o=-a/3*e.period+e.effectOffset;r.animate("",!0).when(e.period,{scale:[e.rippleScale/2,e.rippleScale/2]}).delay(o).start(),r.animateStyle(!0).when(e.period,{opacity:0}).delay(o).start(),i.add(r)}VC(i,e)},YC.updateEffectAnimation=function(e){for(var t=this._effectCfg,n=this.childAt(1),i=["symbolType","period","rippleScale"],a=0;a<i.length;a++){var r=i[a];if(t[r]!==e[r])return this.stopEffectAnimation(),void this.startEffectAnimation(e)}VC(n,e)},YC.highlight=function(){this.trigger("emphasis")},YC.downplay=function(){this.trigger("normal")},YC.updateData=function(e,t){var n=e.hostModel;this.childAt(0).updateData(e,t);var i=this.childAt(1),a=e.getItemModel(t),r=e.getItemVisual(t,"symbol"),o=function(e){return Ie.isArray(e)||(e=[+e,+e]),e}(e.getItemVisual(t,"symbolSize")),s=e.getItemVisual(t,"color");i.attr("scale",o),i.traverse((function(e){e.attr({fill:s})}));var l=a.getShallow("symbolOffset");if(l){var u=i.position;u[0]=BC(l[0],o[0]),u[1]=BC(l[1],o[1])}var c=e.getItemVisual(t,"symbolRotate");i.rotation=(c||0)*Math.PI/180||0;var h={};if(h.showEffectOn=n.get("showEffectOn"),h.rippleScale=a.get("rippleEffect.scale"),h.brushType=a.get("rippleEffect.brushType"),h.period=1e3*a.get("rippleEffect.period"),h.effectOffset=t/e.count(),h.z=a.getShallow("z")||0,h.zlevel=a.getShallow("zlevel")||0,h.symbolType=r,h.color=s,h.rippleEffectColor=a.get("rippleEffect.color"),this.off("mouseover").off("mouseout").off("emphasis").off("normal"),"render"===h.showEffectOn)this._effectCfg?this.updateEffectAnimation(h):this.startEffectAnimation(h),this._effectCfg=h;else{this._effectCfg=null,this.stopEffectAnimation();var d=this.childAt(0),f=function(){d.highlight(),"render"!==h.showEffectOn&&this.startEffectAnimation(h)},p=function(){d.downplay(),"render"!==h.showEffectOn&&this.stopEffectAnimation()};this.on("mouseover",f,this).on("mouseout",p,this).on("emphasis",f,this).on("normal",p,this)}this._effectCfg=h},YC.fadeOut=function(e){this.off("mouseover").off("mouseout").off("emphasis").off("normal"),e&&e()},Ie.inherits(HC,zC);var FC=HC;ry.extendChartView({type:"effectScatter",init:function(){this._symbolDraw=new Dy(FC)},render:function(e,t,n){var i=e.getData(),a=this._symbolDraw;a.updateData(i),this.group.add(a.group)},updateTransform:function(e,t,n){var i=e.getData();this.group.dirty();var a=g_().reset(e);a.progress&&a.progress({start:0,end:i.count()},i),this._symbolDraw.updateLayout(i)},_updateGroupTransform:function(e){var t=e.coordinateSystem;t&&t.getRoamTransform&&(this.group.transform=yt.clone(t.getRoamTransform()),this.group.decomposeTransform())},remove:function(e,t){this._symbolDraw&&this._symbolDraw.remove(t)},dispose:function(){}});ry.registerVisual(d_("effectScatter","circle")),ry.registerLayout(g_("effectScatter"));var GC=Ie.concatArray,WC=Ie.mergeAll,jC=Ie.map,UC=Pu.encodeHTML,ZC="undefined"==typeof Uint32Array?Array:Uint32Array,XC="undefined"==typeof Float64Array?Array:Float64Array;function qC(e){var t=e.data;t&&t[0]&&t[0][0]&&t[0][0].coord&&(e.data=jC(t,(function(e){var t={coords:[e[0].coord,e[1].coord]};return e[0].name&&(t.fromName=e[0].name),e[1].name&&(t.toName=e[1].name),WC([t,e[0],e[1]])})))}var KC=Yd.extend({type:"series.lines",dependencies:["grid","polar"],visualColorAccessPath:"lineStyle.color",init:function(e){e.data=e.data||[],qC(e);var t=this._processFlatCoordsArray(e.data);this._flatCoords=t.flatCoords,this._flatCoordsOffset=t.flatCoordsOffset,t.flatCoords&&(e.data=new Float32Array(t.count)),KC.superApply(this,"init",arguments)},mergeOption:function(e){if(e.data=e.data||[],qC(e),e.data){var t=this._processFlatCoordsArray(e.data);this._flatCoords=t.flatCoords,this._flatCoordsOffset=t.flatCoordsOffset,t.flatCoords&&(e.data=new Float32Array(t.count))}KC.superApply(this,"mergeOption",arguments)},appendData:function(e){var t=this._processFlatCoordsArray(e.data);t.flatCoords&&(this._flatCoords?(this._flatCoords=GC(this._flatCoords,t.flatCoords),this._flatCoordsOffset=GC(this._flatCoordsOffset,t.flatCoordsOffset)):(this._flatCoords=t.flatCoords,this._flatCoordsOffset=t.flatCoordsOffset),e.data=new Float32Array(t.count)),this.getRawData().appendData(e.data)},_getCoordsFromItemModel:function(e){var t=this.getData().getItemModel(e);return t.option instanceof Array?t.option:t.getShallow("coords")},getLineCoordsCount:function(e){return this._flatCoordsOffset?this._flatCoordsOffset[2*e+1]:this._getCoordsFromItemModel(e).length},getLineCoords:function(e,t){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[2*e],i=this._flatCoordsOffset[2*e+1],a=0;a<i;a++)t[a]=t[a]||[],t[a][0]=this._flatCoords[n+2*a],t[a][1]=this._flatCoords[n+2*a+1];return i}var r=this._getCoordsFromItemModel(e);for(a=0;a<r.length;a++)t[a]=t[a]||[],t[a][0]=r[a][0],t[a][1]=r[a][1];return r.length},_processFlatCoordsArray:function(e){var t=0;if(this._flatCoords&&(t=this._flatCoords.length),"number"==typeof e[0]){for(var n=e.length,i=new ZC(n),a=new XC(n),r=0,o=0,s=0,l=0;l<n;){s++;var u=e[l++];i[o++]=r+t,i[o++]=u;for(var c=0;c<u;c++){var h=e[l++],d=e[l++];a[r++]=h,a[r++]=d}}return{flatCoordsOffset:new Uint32Array(i.buffer,0,o),flatCoords:a,count:s}}return{flatCoordsOffset:null,flatCoords:null,count:e.length}},getInitialData:function(e,t){var n=new cg(["value"],this);return n.hasItemOption=!1,n.initData(e.data,[],(function(e,t,i,a){if(e instanceof Array)return NaN;n.hasItemOption=!0;var r=e.value;return null!=r?r instanceof Array?r[a]:r:void 0})),n},formatTooltip:function(e){var t=this.getData().getItemModel(e),n=t.get("name");if(n)return n;var i=t.get("fromName"),a=t.get("toName"),r=[];return null!=i&&r.push(i),null!=a&&r.push(a),UC(r.join(" > "))},preventIncremental:function(){return!!this.get("effect.show")},getProgressive:function(){var e=this.option.progressive;return null==e?this.option.large?1e4:this.get("progressive"):e},getProgressiveThreshold:function(){var e=this.option.progressiveThreshold;return null==e?this.option.large?2e4:this.get("progressiveThreshold"):e},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,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}}}),QC=ov.createSymbol;function $C(e,t,n){lu.Group.call(this),this.add(this.createLine(e,t,n)),this._updateEffectSymbol(e,t)}var JC=$C.prototype;JC.createLine=function(e,t,n){return new WT(e,t,n)},JC._updateEffectSymbol=function(e,t){var n=e.getItemModel(t).getModel("effect"),i=n.get("symbolSize"),a=n.get("symbol");Ie.isArray(i)||(i=[i,i]);var r=n.get("color")||e.getItemVisual(t,"color"),o=this.childAt(1);this._symbolType!==a&&(this.remove(o),(o=QC(a,-.5,-.5,1,1,r)).z2=100,o.culling=!0,this.add(o)),o&&(o.setStyle("shadowColor",r),o.setStyle(n.getItemStyle(["color"])),o.attr("scale",i),o.setColor(r),o.attr("scale",i),this._symbolType=a,this._symbolScale=i,this._updateEffectAnimation(e,n,t))},JC._updateEffectAnimation=function(e,t,n){var i=this.childAt(1);if(i){var a=this,r=e.getItemLayout(n),o=1e3*t.get("period"),s=t.get("loop"),l=t.get("constantSpeed"),u=Ie.retrieve(t.get("delay"),(function(t){return t/e.count()*o/3})),c="function"==typeof u;if(i.ignore=!0,this.updateAnimationPoints(i,r),l>0&&(o=this.getLineLength(i)/l*1e3),o!==this._period||s!==this._loop){i.stopAnimation();var h=u;c&&(h=u(n)),i.__t>0&&(h=-o*i.__t),i.__t=0;var d=i.animate("",s).when(o,{__t:1}).delay(h).during((function(){a.updateSymbolPosition(i)}));s||d.done((function(){a.remove(i)})),d.start()}this._period=o,this._loop=s}},JC.getLineLength=function(e){return Le.dist(e.__p1,e.__cp1)+Le.dist(e.__cp1,e.__p2)},JC.updateAnimationPoints=function(e,t){e.__p1=t[0],e.__p2=t[1],e.__cp1=t[2]||[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]},JC.updateData=function(e,t,n){this.childAt(0).updateData(e,t,n),this._updateEffectSymbol(e,t)},JC.updateSymbolPosition=function(e){var t=e.__p1,n=e.__p2,i=e.__cp1,a=e.__t,r=e.position,o=[r[0],r[1]],s=Zr.quadraticAt,l=Zr.quadraticDerivativeAt;r[0]=s(t[0],i[0],n[0],a),r[1]=s(t[1],i[1],n[1],a);var u=l(t[0],i[0],n[0],a),c=l(t[1],i[1],n[1],a);if(e.rotation=-Math.atan2(c,u)-Math.PI/2,"line"===this._symbolType||"rect"===this._symbolType||"roundRect"===this._symbolType)if(void 0!==e.__lastT&&e.__lastT<e.__t){var h=1.05*Le.dist(o,r);e.attr("scale",[e.scale[0],h]),1===a&&(r[0]=o[0]+(r[0]-o[0])/2,r[1]=o[1]+(r[1]-o[1])/2)}else if(1===e.__lastT){h=2*Le.dist(t,r);e.attr("scale",[e.scale[0],h])}else e.attr("scale",this._symbolScale);e.__lastT=e.__t,e.ignore=!1},JC.updateLayout=function(e,t){this.childAt(0).updateLayout(e,t);var n=e.getItemModel(t).getModel("effect");this._updateEffectAnimation(e,n,t)},Ie.inherits($C,lu.Group);var eO=$C;function tO(e,t,n){lu.Group.call(this),this._createPolyline(e,t,n)}var nO=tO.prototype;nO._createPolyline=function(e,t,n){var i=e.getItemLayout(t),a=new lu.Polyline({shape:{points:i}});this.add(a),this._updateCommonStl(e,t,n)},nO.updateData=function(e,t,n){var i=e.hostModel,a=this.childAt(0),r={shape:{points:e.getItemLayout(t)}};lu.updateProps(a,r,i,t),this._updateCommonStl(e,t,n)},nO._updateCommonStl=function(e,t,n){var i=this.childAt(0),a=e.getItemModel(t),r=e.getItemVisual(t,"color"),o=n&&n.lineStyle,s=n&&n.hoverLineStyle;n&&!e.hasItemOption||(o=a.getModel("lineStyle").getLineStyle(),s=a.getModel("emphasis.lineStyle").getLineStyle()),i.useStyle(Ie.defaults({strokeNoScale:!0,fill:"none",stroke:r},o)),i.hoverStyle=s,lu.setHoverStyle(this)},nO.updateLayout=function(e,t){this.childAt(0).setShape("points",e.getItemLayout(t))},Ie.inherits(tO,lu.Group);var iO=tO;function aO(e,t,n){eO.call(this,e,t,n),this._lastFrame=0,this._lastFramePercent=0}var rO=aO.prototype;rO.createLine=function(e,t,n){return new iO(e,t,n)},rO.updateAnimationPoints=function(e,t){this._points=t;for(var n=[0],i=0,a=1;a<t.length;a++){var r=t[a-1],o=t[a];i+=Le.dist(r,o),n.push(i)}if(0!==i){for(a=0;a<n.length;a++)n[a]/=i;this._offsets=n,this._length=i}},rO.getLineLength=function(e){return this._length},rO.updateSymbolPosition=function(e){var t=e.__t,n=this._points,i=this._offsets,a=n.length;if(i){var r=this._lastFrame;if(t<this._lastFramePercent){for(o=Math.min(r+1,a-1);o>=0&&!(i[o]<=t);o--);o=Math.min(o,a-2)}else{for(var o=r;o<a&&!(i[o]>t);o++);o=Math.min(o-1,a-2)}Le.lerp(e.position,n[o],n[o+1],(t-i[o])/(i[o+1]-i[o]));var s=n[o+1][0]-n[o][0],l=n[o+1][1]-n[o][1];e.rotation=-Math.atan2(l,s)-Math.PI/2,this._lastFrame=o,this._lastFramePercent=t,e.ignore=!1}},Ie.inherits(aO,eO);var oO=aO,sO=lu.extendShape({shape:{polyline:!1,curveness:0,segs:[]},buildPath:function(e,t){var n=t.segs,i=t.curveness;if(t.polyline)for(var a=0;a<n.length;){var r=n[a++];if(r>0){e.moveTo(n[a++],n[a++]);for(var o=1;o<r;o++)e.lineTo(n[a++],n[a++])}}else for(a=0;a<n.length;){var s=n[a++],l=n[a++],u=n[a++],c=n[a++];if(e.moveTo(s,l),i>0){var h=(s+u)/2-(l-c)*i,d=(l+c)/2-(u-s)*i;e.quadraticCurveTo(h,d,u,c)}else e.lineTo(u,c)}},findDataIndex:function(e,t){var n=this.shape,i=n.segs,a=n.curveness;if(n.polyline)for(var r=0,o=0;o<i.length;){var s=i[o++];if(s>0)for(var l=i[o++],u=i[o++],c=1;c<s;c++){var h=i[o++],d=i[o++];if(bo.containStroke(l,u,h,d))return r}r++}else for(r=0,o=0;o<i.length;){l=i[o++],u=i[o++],h=i[o++],d=i[o++];if(a>0){var f=(l+h)/2-(u-d)*a,p=(u+d)/2-(h-l)*a;if(Mo.containStroke(l,u,f,p,h,d))return r}else if(bo.containStroke(l,u,h,d))return r;r++}return-1}});function lO(){this.group=new lu.Group}var uO=lO.prototype;uO.isPersistent=function(){return!this._incremental},uO.updateData=function(e){this.group.removeAll();var t=new sO({rectHover:!0,cursor:"default"});t.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(t,e),this.group.add(t),this._incremental=null},uO.incrementalPrepareUpdate=function(e){this.group.removeAll(),this._clearIncremental(),e.count()>5e5?(this._incremental||(this._incremental=new sl({silent:!0})),this.group.add(this._incremental)):this._incremental=null},uO.incrementalUpdate=function(e,t){var n=new sO;n.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(n,t,!!this._incremental),this._incremental?this._incremental.addDisplayable(n,!0):(n.rectHover=!0,n.cursor="default",n.__startIndex=e.start,this.group.add(n))},uO.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},uO._setCommon=function(e,t,n){var i=t.hostModel;e.setShape({polyline:i.get("polyline"),curveness:i.get("lineStyle.curveness")}),e.useStyle(i.getModel("lineStyle").getLineStyle()),e.style.strokeNoScale=!0;var a=t.getVisual("color");a&&e.setStyle("stroke",a),e.setStyle("fill"),n||(e.seriesIndex=i.seriesIndex,e.on("mousemove",(function(t){e.dataIndex=null;var n=e.findDataIndex(t.offsetX,t.offsetY);n>0&&(e.dataIndex=n+e.__startIndex)})))},uO._clearIncremental=function(){var e=this._incremental;e&&e.clearDisplaybles()};var cO=lO,hO={seriesType:"lines",plan:Ud(),reset:function(e){var t=e.coordinateSystem,n=e.get("polyline"),i=e.pipelineContext.large;return{progress:function(a,r){var o=[];if(i){var s,l=a.end-a.start;if(n){for(var u=0,c=a.start;c<a.end;c++)u+=e.getLineCoordsCount(c);s=new Float32Array(l+2*u)}else s=new Float32Array(4*l);var h=0,d=[];for(c=a.start;c<a.end;c++){var f=e.getLineCoords(c,o);n&&(s[h++]=f);for(var p=0;p<f;p++)d=t.dataToPoint(o[p],!1,d),s[h++]=d[0],s[h++]=d[1]}r.setLayout("linesPoints",s)}else for(c=a.start;c<a.end;c++){var g=r.getItemModel(c),m=(f=e.getLineCoords(c,o),[]);if(n)for(var v=0;v<f;v++)m.push(t.dataToPoint(o[v]));else{m[0]=t.dataToPoint(o[0]),m[1]=t.dataToPoint(o[1]);var y=g.get("lineStyle.curveness");+y&&(m[2]=[(m[0][0]+m[1][0])/2-(m[0][1]-m[1][1])*y,(m[0][1]+m[1][1])/2-(m[1][0]-m[0][0])*y])}r.setItemLayout(c,m)}}}}},dO=Qy.createClipPath;ry.extendChartView({type:"lines",init:function(){},render:function(e,t,n){var i=e.getData(),a=this._updateLineDraw(i,e),r=e.get("zlevel"),o=e.get("effect.trailLength"),s=n.getZr(),l="svg"===s.painter.getType();l||s.painter.getLayer(r).clear(!0),null==this._lastZlevel||l||s.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(e)&&o&&(l||s.configLayer(r,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(o/10+.9,1),0)})),a.updateData(i);var u=e.get("clip",!0)&&dO(e.coordinateSystem,!1,e);u?this.group.setClipPath(u):this.group.removeClipPath(),this._lastZlevel=r,this._finished=!0},incrementalPrepareRender:function(e,t,n){var i=e.getData();this._updateLineDraw(i,e).incrementalPrepareUpdate(i),this._clearLayer(n),this._finished=!1},incrementalRender:function(e,t,n){this._lineDraw.incrementalUpdate(e,t.getData()),this._finished=e.end===t.getData().count()},updateTransform:function(e,t,n){var i=e.getData(),a=e.pipelineContext;if(!this._finished||a.large||a.progressiveRender)return{update:!0};var r=hO.reset(e);r.progress&&r.progress({start:0,end:i.count()},i),this._lineDraw.updateLayout(),this._clearLayer(n)},_updateLineDraw:function(e,t){var n=this._lineDraw,i=this._showEffect(t),a=!!t.get("polyline"),r=t.pipelineContext.large;return n&&i===this._hasEffet&&a===this._isPolyline&&r===this._isLargeDraw||(n&&n.remove(),n=this._lineDraw=r?new cO:new KT(a?i?oO:iO:i?eO:WT),this._hasEffet=i,this._isPolyline=a,this._isLargeDraw=r,this.group.removeAll()),this.group.add(n.group),n},_showEffect:function(e){return!!e.get("effect.show")},_clearLayer:function(e){var t=e.getZr();"svg"===t.painter.getType()||null==this._lastZlevel||t.painter.getLayer(this._lastZlevel).clear(!0)},remove:function(e,t){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(t)},dispose:function(){}});function fO(e){return e instanceof Array||(e=[e,e]),e}var pO="lineStyle.opacity".split("."),gO={seriesType:"lines",reset:function(e,t,n){var i=fO(e.get("symbol")),a=fO(e.get("symbolSize")),r=e.getData();return r.setVisual("fromSymbol",i&&i[0]),r.setVisual("toSymbol",i&&i[1]),r.setVisual("fromSymbolSize",a&&a[0]),r.setVisual("toSymbolSize",a&&a[1]),r.setVisual("opacity",e.get(pO)),{dataEach:r.hasItemOption?function(e,t){var n=e.getItemModel(t),i=fO(n.getShallow("symbol",!0)),a=fO(n.getShallow("symbolSize",!0)),r=n.get(pO);i[0]&&e.setItemVisual(t,"fromSymbol",i[0]),i[1]&&e.setItemVisual(t,"toSymbol",i[1]),a[0]&&e.setItemVisual(t,"fromSymbolSize",a[0]),a[1]&&e.setItemVisual(t,"toSymbolSize",a[1]),e.setItemVisual(t,"opacity",r)}:null}}};ry.registerLayout(hO),ry.registerVisual(gO);Yd.extend({type:"series.heatmap",getInitialData:function(e,t){return Yg(this.getSource(),this,{generateCoord:"value"})},preventIncremental:function(){var e=ch.get(this.get("coordinateSystem"));if(e&&e.dimensions)return"lng"===e.dimensions[0]&&"lat"===e.dimensions[1]},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0}});function mO(){var e=Ie.createCanvas();this.canvas=e,this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={}}mO.prototype={update:function(e,t,n,i,a,r){var o=this._getBrush(),s=this._getGradient(e,a,"inRange"),l=this._getGradient(e,a,"outOfRange"),u=this.pointSize+this.blurSize,c=this.canvas,h=c.getContext("2d"),d=e.length;c.width=t,c.height=n;for(var f=0;f<d;++f){var p=e[f],g=p[0],m=p[1],v=i(p[2]);h.globalAlpha=v,h.drawImage(o,g-u,m-u)}if(!c.width||!c.height)return c;for(var y=h.getImageData(0,0,c.width,c.height),_=y.data,x=0,b=_.length,w=this.minOpacity,S=this.maxOpacity-w;x<b;){v=_[x+3]/256;var M=4*Math.floor(255*v);if(v>0){var T=r(v)?s:l;v>0&&(v=v*S+w),_[x++]=T[M],_[x++]=T[M+1],_[x++]=T[M+2],_[x++]=T[M+3]*v*256}else x+=4}return h.putImageData(y,0,0),c},_getBrush:function(){var e=this._brushCanvas||(this._brushCanvas=Ie.createCanvas()),t=this.pointSize+this.blurSize,n=2*t;e.width=n,e.height=n;var i=e.getContext("2d");return i.clearRect(0,0,n,n),i.shadowOffsetX=n,i.shadowBlur=this.blurSize,i.shadowColor="#000",i.beginPath(),i.arc(-t,t,this.pointSize,0,2*Math.PI,!0),i.closePath(),i.fill(),e},_getGradient:function(e,t,n){for(var i=this._gradientPixels,a=i[n]||(i[n]=new Uint8ClampedArray(1024)),r=[0,0,0,0],o=0,s=0;s<256;s++)t[n](s/255,!0,r),a[o++]=r[0],a[o++]=r[1],a[o++]=r[2],a[o++]=r[3];return a}};var vO=mO;ry.extendChartView({type:"heatmap",render:function(e,t,n){var i;t.eachComponent("visualMap",(function(t){t.eachTargetSeries((function(n){n===e&&(i=t)}))})),this.group.removeAll(),this._incrementalDisplayable=null;var a=e.coordinateSystem;"cartesian2d"===a.type||"calendar"===a.type?this._renderOnCartesianAndCalendar(e,n,0,e.getData().count()):function(e){var t=e.dimensions;return"lng"===t[0]&&"lat"===t[1]}(a)&&this._renderOnGeo(a,e,i,n)},incrementalPrepareRender:function(e,t,n){this.group.removeAll()},incrementalRender:function(e,t,n,i){t.coordinateSystem&&this._renderOnCartesianAndCalendar(t,i,e.start,e.end,!0)},_renderOnCartesianAndCalendar:function(e,t,n,i,a){var r,o,s=e.coordinateSystem;if("cartesian2d"===s.type){var l=s.getAxis("x"),u=s.getAxis("y");r=l.getBandWidth(),o=u.getBandWidth()}for(var c=this.group,h=e.getData(),d=e.getModel("itemStyle").getItemStyle(["color"]),f=e.getModel("emphasis.itemStyle").getItemStyle(),p=e.getModel("label"),g=e.getModel("emphasis.label"),m=s.type,v="cartesian2d"===m?[h.mapDimension("x"),h.mapDimension("y"),h.mapDimension("value")]:[h.mapDimension("time"),h.mapDimension("value")],y=n;y<i;y++){var _;if("cartesian2d"===m){if(isNaN(h.get(v[2],y)))continue;var x=s.dataToPoint([h.get(v[0],y),h.get(v[1],y)]);_=new lu.Rect({shape:{x:Math.floor(Math.round(x[0])-r/2),y:Math.floor(Math.round(x[1])-o/2),width:Math.ceil(r),height:Math.ceil(o)},style:{fill:h.getItemVisual(y,"color"),opacity:h.getItemVisual(y,"opacity")}})}else{if(isNaN(h.get(v[1],y)))continue;_=new lu.Rect({z2:1,shape:s.dataToRect([h.get(v[0],y)]).contentShape,style:{fill:h.getItemVisual(y,"color"),opacity:h.getItemVisual(y,"opacity")}})}var b=h.getItemModel(y);h.hasItemOption&&(d=b.getModel("itemStyle").getItemStyle(["color"]),f=b.getModel("emphasis.itemStyle").getItemStyle(),p=b.getModel("label"),g=b.getModel("emphasis.label"));var w=e.getRawValue(y),S="-";w&&null!=w[2]&&(S=w[2]),lu.setLabelStyle(d,f,p,g,{labelFetcher:e,labelDataIndex:y,defaultText:S,isRectText:!0}),_.setStyle(d),lu.setHoverStyle(_,h.hasItemOption?f:Ie.extend({},f)),_.incremental=a,a&&(_.useHoverLayer=!0),c.add(_),h.setItemGraphicEl(y,_)}},_renderOnGeo:function(e,t,n,i){var a=n.targetVisuals.inRange,r=n.targetVisuals.outOfRange,o=t.getData(),s=this._hmLayer||this._hmLayer||new vO;s.blurSize=t.get("blurSize"),s.pointSize=t.get("pointSize"),s.minOpacity=t.get("minOpacity"),s.maxOpacity=t.get("maxOpacity");var l=e.getViewRect().clone(),u=e.getRoamTransform();l.applyTransform(u);var c=Math.max(l.x,0),h=Math.max(l.y,0),d=Math.min(l.width+l.x,i.getWidth()),f=Math.min(l.height+l.y,i.getHeight()),p=d-c,g=f-h,m=[o.mapDimension("lng"),o.mapDimension("lat"),o.mapDimension("value")],v=o.mapArray(m,(function(t,n,i){var a=e.dataToPoint([t,n]);return a[0]-=c,a[1]-=h,a.push(i),a})),y=n.getExtent(),_="visualMap.continuous"===n.type?function(e,t){var n=e[1]-e[0];return t=[(t[0]-e[0])/n,(t[1]-e[0])/n],function(e){return e>=t[0]&&e<=t[1]}}(y,n.option.range):function(e,t,n){var i=e[1]-e[0],a=(t=Ie.map(t,(function(t){return{interval:[(t.interval[0]-e[0])/i,(t.interval[1]-e[0])/i]}}))).length,r=0;return function(e){for(var i=r;i<a;i++){if((o=t[i].interval)[0]<=e&&e<=o[1]){r=i;break}}if(i===a)for(i=r-1;i>=0;i--){var o;if((o=t[i].interval)[0]<=e&&e<=o[1]){r=i;break}}return i>=0&&i<a&&n[i]}}(y,n.getPieceList(),n.option.selected);s.update(v,p,g,a.color.getNormalizer(),{inRange:a.color.getColorMapper(),outOfRange:r.color.getColorMapper()},_);var x=new lu.Image({style:{width:p,height:g,x:c,y:h,image:s.canvas},silent:!0});this.group.add(x)},dispose:function(){}});var yO=Hx.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(e){return e.stack=null,yO.superApply(this,"getInitialData",arguments)}}),_O=ov.createSymbol,xO=Au.parsePercent,bO=Au.isNumeric,wO=Gx.setLabel,SO=["itemStyle","borderWidth"],MO=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],TO=new lu.Circle;ry.extendChartView({type:"pictorialBar",render:function(e,t,n){var i=this.group,a=e.getData(),r=this._data,o=e.coordinateSystem,s=!!o.getBaseAxis().isHorizontal(),l=o.grid.getRect(),u={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:e,coordSys:o,coordSysExtent:[[l.x,l.x+l.width],[l.y,l.y+l.height]],isHorizontal:s,valueDim:MO[+s],categoryDim:MO[1-s]};return a.diff(r).add((function(e){if(a.hasValue(e)){var t=EO(a,e),n=IO(a,e,t,u),r=zO(a,u,n);a.setItemGraphicEl(e,r),i.add(r),FO(r,u,n)}})).update((function(e,t){var n=r.getItemGraphicEl(t);if(a.hasValue(e)){var o=EO(a,e),s=IO(a,e,o,u),l=VO(a,s);n&&l!==n.__pictorialShapeStr&&(i.remove(n),a.setItemGraphicEl(e,null),n=null),n?function(e,t,n){var i=n.animationModel,a=n.dataIndex,r=e.__pictorialBundle;lu.updateProps(r,{position:n.bundlePosition.slice()},i,a),n.symbolRepeat?CO(e,t,n,!0):OO(e,t,n,!0);kO(e,n,!0),LO(e,t,n,!0)}(n,u,s):n=zO(a,u,s,!0),a.setItemGraphicEl(e,n),n.__pictorialSymbolMeta=s,i.add(n),FO(n,u,s)}else i.remove(n)})).remove((function(e){var t=r.getItemGraphicEl(e);t&&BO(r,e,t.__pictorialSymbolMeta.animationModel,t)})).execute(),this._data=a,this.group},dispose:Ie.noop,remove:function(e,t){var n=this.group,i=this._data;e.get("animation")?i&&i.eachItemGraphicEl((function(t){BO(i,t.dataIndex,e,t)})):n.removeAll()}});function IO(e,t,n,i){var a=e.getItemLayout(t),r=n.get("symbolRepeat"),o=n.get("symbolClip"),s=n.get("symbolPosition")||"start",l=(n.get("symbolRotate")||0)*Math.PI/180||0,u=n.get("symbolPatternSize")||2,c=n.isAnimationEnabled(),h={dataIndex:t,layout:a,itemModel:n,symbolType:e.getItemVisual(t,"symbol")||"circle",color:e.getItemVisual(t,"color"),symbolClip:o,symbolRepeat:r,symbolRepeatDirection:n.get("symbolRepeatDirection"),symbolPatternSize:u,rotation:l,animationModel:c?n:null,hoverAnimation:c&&n.get("hoverAnimation"),z2:n.getShallow("z",!0)||0};!function(e,t,n,i,a){var r,o=i.valueDim,s=e.get("symbolBoundingData"),l=i.coordSys.getOtherAxis(i.coordSys.getBaseAxis()),u=l.toGlobalCoord(l.dataToCoord(0)),c=1-+(n[o.wh]<=0);if(Ie.isArray(s)){var h=[AO(l,s[0])-u,AO(l,s[1])-u];h[1]<h[0]&&h.reverse(),r=h[c]}else r=null!=s?AO(l,s)-u:t?i.coordSysExtent[o.index][c]-u:n[o.wh];a.boundingLength=r,t&&(a.repeatCutLength=n[o.wh]);a.pxSign=r>0?1:r<0?-1:0}(n,r,a,i,h),function(e,t,n,i,a,r,o,s,l,u){var c=l.valueDim,h=l.categoryDim,d=Math.abs(n[h.wh]),f=e.getItemVisual(t,"symbolSize");Ie.isArray(f)?f=f.slice():(null==f&&(f="100%"),f=[f,f]);f[h.index]=xO(f[h.index],d),f[c.index]=xO(f[c.index],i?d:Math.abs(r)),u.symbolSize=f,(u.symbolScale=[f[0]/s,f[1]/s])[c.index]*=(l.isHorizontal?-1:1)*o}(e,t,a,r,0,h.boundingLength,h.pxSign,u,i,h),function(e,t,n,i,a){var r=e.get(SO)||0;r&&(TO.attr({scale:t.slice(),rotation:n}),TO.updateTransform(),r/=TO.getLineScale(),r*=t[i.valueDim.index]);a.valueLineWidth=r}(n,h.symbolScale,l,i,h);var d=h.symbolSize,f=n.get("symbolOffset");return Ie.isArray(f)&&(f=[xO(f[0],d[0]),xO(f[1],d[1])]),function(e,t,n,i,a,r,o,s,l,u,c,h){var d=c.categoryDim,f=c.valueDim,p=h.pxSign,g=Math.max(t[f.index]+s,0),m=g;if(i){var v=Math.abs(l),y=Ie.retrieve(e.get("symbolMargin"),"15%")+"",_=!1;y.lastIndexOf("!")===y.length-1&&(_=!0,y=y.slice(0,y.length-1)),y=xO(y,t[f.index]);var x=Math.max(g+2*y,0),b=_?0:2*y,w=bO(i),S=w?i:GO((v+b)/x);x=g+2*(y=(v-S*g)/2/(_?S:S-1)),b=_?0:2*y,w||"fixed"===i||(S=u?GO((Math.abs(u)+b)/x):0),m=S*x-b,h.repeatTimes=S,h.symbolMargin=y}var M=p*(m/2),T=h.pathPosition=[];T[d.index]=n[d.wh]/2,T[f.index]="start"===o?M:"end"===o?l-M:l/2,r&&(T[0]+=r[0],T[1]+=r[1]);var I=h.bundlePosition=[];I[d.index]=n[d.xy],I[f.index]=n[f.xy];var A=h.barRectShape=Ie.extend({},n);A[f.wh]=p*Math.max(Math.abs(n[f.wh]),Math.abs(T[f.index]+M)),A[d.wh]=n[d.wh];var D=h.clipShape={};D[d.xy]=-n[d.xy],D[d.wh]=c.ecSize[d.wh],D[f.xy]=0,D[f.wh]=n[f.wh]}(n,d,a,r,0,f,s,h.valueLineWidth,h.boundingLength,h.repeatCutLength,i,h),h}function AO(e,t){return e.toGlobalCoord(e.dataToCoord(e.scale.parse(t)))}function DO(e){var t=e.symbolPatternSize,n=_O(e.symbolType,-t/2,-t/2,t,t,e.color);return n.attr({culling:!0}),"image"!==n.type&&n.setStyle({strokeNoScale:!0}),n}function CO(e,t,n,i){var a=e.__pictorialBundle,r=n.symbolSize,o=n.valueLineWidth,s=n.pathPosition,l=t.valueDim,u=n.repeatTimes||0,c=0,h=r[t.valueDim.index]+o+2*n.symbolMargin;for(HO(e,(function(e){e.__pictorialAnimationIndex=c,e.__pictorialRepeatTimes=u,c<u?YO(e,null,p(c),n,i):YO(e,null,{scale:[0,0]},n,i,(function(){a.remove(e)})),RO(e,n),c++}));c<u;c++){var d=DO(n);d.__pictorialAnimationIndex=c,d.__pictorialRepeatTimes=u,a.add(d);var f=p(c);YO(d,{position:f.position,scale:[0,0]},{scale:f.scale,rotation:f.rotation},n,i),d.on("mouseover",g).on("mouseout",m),RO(d,n)}function p(e){var t=s.slice(),i=n.pxSign,a=e;return("start"===n.symbolRepeatDirection?i>0:i<0)&&(a=u-1-e),t[l.index]=h*(a-u/2+.5)+s[l.index],{position:t,scale:n.symbolScale.slice(),rotation:n.rotation}}function g(){HO(e,(function(e){e.trigger("emphasis")}))}function m(){HO(e,(function(e){e.trigger("normal")}))}}function OO(e,t,n,i){var a=e.__pictorialBundle,r=e.__pictorialMainPath;r?YO(r,null,{position:n.pathPosition.slice(),scale:n.symbolScale.slice(),rotation:n.rotation},n,i):(r=e.__pictorialMainPath=DO(n),a.add(r),YO(r,{position:n.pathPosition.slice(),scale:[0,0],rotation:n.rotation},{scale:n.symbolScale.slice()},n,i),r.on("mouseover",(function(){this.trigger("emphasis")})).on("mouseout",(function(){this.trigger("normal")}))),RO(r,n)}function kO(e,t,n){var i=Ie.extend({},t.barRectShape),a=e.__pictorialBarRect;a?YO(a,null,{shape:i},t,n):(a=e.__pictorialBarRect=new lu.Rect({z2:2,shape:i,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),e.add(a))}function LO(e,t,n,i){if(n.symbolClip){var a=e.__pictorialClipPath,r=Ie.extend({},n.clipShape),o=t.valueDim,s=n.animationModel,l=n.dataIndex;if(a)lu.updateProps(a,{shape:r},s,l);else{r[o.wh]=0,a=new lu.Rect({shape:r}),e.__pictorialBundle.setClipPath(a),e.__pictorialClipPath=a;var u={};u[o.wh]=n.clipShape[o.wh],lu[i?"updateProps":"initProps"](a,{shape:u},s,l)}}}function EO(e,t){var n=e.getItemModel(t);return n.getAnimationDelayParams=NO,n.isAnimationEnabled=PO,n}function NO(e){return{index:e.__pictorialAnimationIndex,count:e.__pictorialRepeatTimes}}function PO(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function RO(e,t){e.off("emphasis").off("normal");var n=t.symbolScale.slice();t.hoverAnimation&&e.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 zO(e,t,n,i){var a=new lu.Group,r=new lu.Group;return a.add(r),a.__pictorialBundle=r,r.attr("position",n.bundlePosition.slice()),n.symbolRepeat?CO(a,t,n):OO(a,0,n),kO(a,n,i),LO(a,t,n,i),a.__pictorialShapeStr=VO(e,n),a.__pictorialSymbolMeta=n,a}function BO(e,t,n,i){var a=i.__pictorialBarRect;a&&(a.style.text=null);var r=[];HO(i,(function(e){r.push(e)})),i.__pictorialMainPath&&r.push(i.__pictorialMainPath),i.__pictorialClipPath&&(n=null),Ie.each(r,(function(e){lu.updateProps(e,{scale:[0,0]},n,t,(function(){i.parent&&i.parent.remove(i)}))})),e.setItemGraphicEl(t,null)}function VO(e,t){return[e.getItemVisual(t.dataIndex,"symbol")||"none",!!t.symbolRepeat,!!t.symbolClip].join(":")}function HO(e,t,n){Ie.each(e.__pictorialBundle.children(),(function(i){i!==e.__pictorialBarRect&&t.call(n,i)}))}function YO(e,t,n,i,a,r){t&&e.attr(t),i.symbolClip&&!a?n&&e.attr(n):n&&lu[a?"updateProps":"initProps"](e,n,i.animationModel,i.dataIndex,r)}function FO(e,t,n){var i=n.color,a=n.dataIndex,r=n.itemModel,o=r.getModel("itemStyle").getItemStyle(["color"]),s=r.getModel("emphasis.itemStyle").getItemStyle(),l=r.getShallow("cursor");HO(e,(function(e){e.setColor(i),e.setStyle(Ie.defaults({fill:i,opacity:n.opacity},o)),lu.setHoverStyle(e,s),l&&(e.cursor=l),e.z2=n.z2}));var u={},c=t.valueDim.posDesc[+(n.boundingLength>0)],h=e.__pictorialBarRect;wO(h.style,u,r,i,t.seriesModel,a,c),lu.setHoverStyle(h,u)}function GO(e){var t=Math.round(e);return Math.abs(e-t)<1e-4?t:Math.ceil(e)}var WO=wm.layout;ry.registerLayout(Ie.curry(WO,"pictorialBar")),ry.registerVisual(d_("pictorialBar","roundRect"));var jO=function(e,t,n,i,a){Yv.call(this,e,t,n),this.type=i||"value",this.position=a||"bottom",this.orient=null};jO.prototype={constructor:jO,model:null,isHorizontal:function(){var e=this.position;return"top"===e||"bottom"===e},pointToData:function(e,t){return this.coordinateSystem.pointToData(e,t)[0]},toGlobalCoord:null,toLocalCoord:null},Ie.inherits(jO,Yv);var UO=jO,ZO=Uu.getLayoutRect,XO=Ie.each;function qO(e,t,n){this.dimension="single",this.dimensions=["single"],this._axis=null,this._rect,this._init(e,t,n),this.model=e}qO.prototype={type:"singleAxis",axisPointerEnabled:!0,constructor:qO,_init:function(e,t,n){var i=this.dimension,a=new UO(i,Xm.createScaleByModel(e),[0,0],e.get("type"),e.get("position")),r="category"===a.type;a.onBand=r&&e.get("boundaryGap"),a.inverse=e.get("inverse"),a.orient=e.get("orient"),e.axis=a,a.model=e,a.coordinateSystem=this,this._axis=a},update:function(e,t){e.eachSeries((function(e){if(e.coordinateSystem===this){var t=e.getData();XO(t.mapDimension(this.dimension,!0),(function(e){this._axis.scale.unionExtentFromData(t,e)}),this),Xm.niceScaleExtent(this._axis.scale,this._axis.model)}}),this)},resize:function(e,t){this._rect=ZO({left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")},{width:t.getWidth(),height:t.getHeight()}),this._adjustAxis()},getRect:function(){return this._rect},_adjustAxis:function(){var e=this._rect,t=this._axis,n=t.isHorizontal(),i=n?[0,e.width]:[0,e.height],a=t.reverse?1:0;t.setExtent(i[a],i[1-a]),this._updateAxisTransform(t,n?e.x:e.y)},_updateAxisTransform:function(e,t){var n=e.getExtent(),i=n[0]+n[1],a=e.isHorizontal();e.toGlobalCoord=a?function(e){return e+t}:function(e){return i-e+t},e.toLocalCoord=a?function(e){return e-t}:function(e){return i-e+t}},getAxis:function(){return this._axis},getBaseAxis:function(){return this._axis},getAxes:function(){return[this._axis]},getTooltipAxes:function(){return{baseAxes:[this.getAxis()]}},containPoint:function(e){var t=this.getRect(),n=this.getAxis();return"horizontal"===n.orient?n.contain(n.toLocalCoord(e[0]))&&e[1]>=t.y&&e[1]<=t.y+t.height:n.contain(n.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},pointToData:function(e){var t=this.getAxis();return[t.coordToData(t.toLocalCoord(e["horizontal"===t.orient?0:1]))]},dataToPoint:function(e){var t=this.getAxis(),n=this.getRect(),i=[],a="horizontal"===t.orient?0:1;return e instanceof Array&&(e=e[0]),i[a]=t.toGlobalCoord(t.dataToCoord(+e)),i[1-a]=0===a?n.y+n.height/2:n.x+n.width/2,i}};var KO=qO;ch.register("single",{create:function(e,t){var n=[];return e.eachComponent("singleAxis",(function(i,a){var r=new KO(i,e,t);r.name="single_"+a,r.resize(i,t),i.coordinateSystem=r,n.push(r)})),e.eachSeries((function(t){if("singleAxis"===t.get("coordinateSystem")){var n=e.queryComponents({mainType:"singleAxis",index:t.get("singleAxisIndex"),id:t.get("singleAxisId")})[0];t.coordinateSystem=n&&n.coordinateSystem}})),n},dimensions:KO.prototype.dimensions});var QO={layout:function(e,t){t=t||{};var n=e.coordinateSystem,i=e.axis,a={},r=i.position,o=i.orient,s=n.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};a.position=["vertical"===o?u.vertical[r]:l[0],"horizontal"===o?u.horizontal[r]:l[3]],a.rotation=Math.PI/2*{horizontal:0,vertical:1}[o],a.labelDirection=a.tickDirection=a.nameDirection={top:-1,bottom:1,right:1,left:-1}[r],e.get("axisTick.inside")&&(a.tickDirection=-a.tickDirection),Ie.retrieve(t.labelInside,e.get("axisLabel.inside"))&&(a.labelDirection=-a.labelDirection);var c=t.rotate;return null==c&&(c=e.get("axisLabel.rotate")),a.labelRotation="top"===r?-c:c,a.z2=1,a}},$O=Nx.rectCoordAxisBuildSplitArea,JO=Nx.rectCoordAxisHandleRemove,ek=["axisLine","axisTickLabel","axisName"],tk=["splitArea","splitLine"],nk=Lx.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(e,t,n,i){var a=this.group;a.removeAll();var r=this._axisGroup;this._axisGroup=new lu.Group;var o=QO.layout(e),s=new _x(e,o);Ie.each(ek,s.add,s),a.add(this._axisGroup),a.add(s.getGroup()),Ie.each(tk,(function(t){e.get(t+".show")&&this["_"+t](e)}),this),lu.groupTransition(r,this._axisGroup,e),nk.superCall(this,"render",e,t,n,i)},remove:function(){JO(this)},_splitLine:function(e){var t=e.axis;if(!t.scale.isBlank()){var n=e.getModel("splitLine"),i=n.getModel("lineStyle"),a=i.get("width"),r=i.get("color");r=r instanceof Array?r:[r];for(var o=e.coordinateSystem.getRect(),s=t.isHorizontal(),l=[],u=0,c=t.getTicksCoords({tickModel:n}),h=[],d=[],f=0;f<c.length;++f){var p=t.toGlobalCoord(c[f].coord);s?(h[0]=p,h[1]=o.y,d[0]=p,d[1]=o.y+o.height):(h[0]=o.x,h[1]=p,d[0]=o.x+o.width,d[1]=p);var g=u++%r.length;l[g]=l[g]||[],l[g].push(new lu.Line({subPixelOptimize:!0,shape:{x1:h[0],y1:h[1],x2:d[0],y2:d[1]},style:{lineWidth:a},silent:!0}))}for(f=0;f<l.length;++f)this.group.add(lu.mergePath(l[f],{style:{stroke:r[f%r.length],lineDash:i.getLineDash(a),lineWidth:a},silent:!0}))}},_splitArea:function(e){$O(this,this._axisGroup,e,e)}}),ik=$u.extend({type:"singleAxis",layoutMode:"box",axis:null,coordinateSystem:null,getCoordSysModel:function(){return this}});Ie.merge(ik.prototype,qm),L_("single",ik,(function(e,t){return t.type||(t.data?"category":"value")}),{left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}});var ak=function(e,t){var n,i=[],a=e.seriesIndex;if(null==a||!(n=t.getSeriesByIndex(a)))return{point:[]};var r=n.getData(),o=Sr.queryDataIndex(r,e);if(null==o||o<0||Ie.isArray(o))return{point:[]};var s=r.getItemGraphicEl(o),l=n.coordinateSystem;if(n.getTooltipPosition)i=n.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)i=l.dataToPoint(r.getValues(Ie.map(l.dimensions,(function(e){return r.mapDimension(e)})),o,!0))||[];else if(s){var u=s.getBoundingRect().clone();u.applyTransform(s.transform),i=[u.x+u.width/2,u.y+u.height/2]}return{point:i,el:s}},rk=Sr.makeInner,ok=Ie.each,sk=Ie.curry,lk=rk();function uk(e,t,n,i,a){var r=e.axis;if(!r.scale.isBlank()&&r.containData(t))if(e.involveSeries){var o=function(e,t){var n=t.axis,i=n.dim,a=e,r=[],o=Number.MAX_VALUE,s=-1;return ok(t.seriesModels,(function(t,l){var u,c,h=t.getData().mapDimension(i,!0);if(t.getAxisTooltipData){var d=t.getAxisTooltipData(h,e,n);c=d.dataIndices,u=d.nestestValue}else{if(!(c=t.getData().indicesOfNearest(h[0],e,"category"===n.type?.5:null)).length)return;u=t.getData().get(h[0],c[0])}if(null!=u&&isFinite(u)){var f=e-u,p=Math.abs(f);p<=o&&((p<o||f>=0&&s<0)&&(o=p,s=f,a=u,r.length=0),ok(c,(function(e){r.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})})))}})),{payloadBatch:r,snapToValue:a}}(t,e),s=o.payloadBatch,l=o.snapToValue;s[0]&&null==a.seriesIndex&&Ie.extend(a,s[0]),!i&&e.snap&&r.containData(l)&&null!=l&&(t=l),n.showPointer(e,t,s,a),n.showTooltip(e,o,l)}else n.showPointer(e,t)}function ck(e,t,n,i){e[t.key]={value:n,payloadBatch:i}}function hk(e,t,n,i){var a=n.payloadBatch,r=t.axis,o=r.model,s=t.axisPointerModel;if(t.triggerTooltip&&a.length){var l=t.coordSys.model,u=Ax.makeKey(l),c=e.map[u];c||(c=e.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},e.list.push(c)),c.dataByAxis.push({axisDim:r.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:i,valueLabelOpt:{precision:s.get("label.precision"),formatter:s.get("label.formatter")},seriesDataIndices:a.slice()})}}function dk(e){var t=e.axis.model,n={},i=n.axisDim=e.axis.dim;return n.axisIndex=n[i+"AxisIndex"]=t.componentIndex,n.axisName=n[i+"AxisName"]=t.name,n.axisId=n[i+"AxisId"]=t.id,n}function fk(e){return!e||null==e[0]||isNaN(e[0])||null==e[1]||isNaN(e[1])}var pk=function(e,t,n){var i=e.currTrigger,a=[e.x,e.y],r=e,o=e.dispatchAction||Ie.bind(n.dispatchAction,n),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){fk(a)&&(a=ak({seriesIndex:r.seriesIndex,dataIndex:r.dataIndex},t).point);var l=fk(a),u=r.axesInfo,c=s.axesInfo,h="leave"===i||fk(a),d={},f={},p={list:[],map:{}},g={showPointer:sk(ck,f),showTooltip:sk(hk,p)};ok(s.coordSysMap,(function(e,t){var n=l||e.containPoint(a);ok(s.coordSysAxesInfo[t],(function(e,t){var i=e.axis,r=function(e,t){for(var n=0;n<(e||[]).length;n++){var i=e[n];if(t.axis.dim===i.axisDim&&t.axis.model.componentIndex===i.axisIndex)return i}}(u,e);if(!h&&n&&(!u||r)){var o=r&&r.value;null!=o||l||(o=i.pointToData(a)),null!=o&&uk(e,o,g,!1,d)}}))}));var m={};return ok(c,(function(e,t){var n=e.linkGroup;n&&!f[t]&&ok(n.axesInfo,(function(t,i){var a=f[i];if(t!==e&&a){var r=a.value;n.mapper&&(r=e.axis.scale.parse(n.mapper(r,dk(t),dk(e)))),m[e.key]=r}}))})),ok(m,(function(e,t){uk(c[t],e,g,!0,d)})),function(e,t,n){var i=n.axesInfo=[];ok(t,(function(t,n){var a=t.axisPointerModel.option,r=e[n];r?(!t.useHandle&&(a.status="show"),a.value=r.value,a.seriesDataIndices=(r.payloadBatch||[]).slice()):!t.useHandle&&(a.status="hide"),"show"===a.status&&i.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:a.value})}))}(f,c,d),function(e,t,n,i){if(fk(t)||!e.list.length)return void i({type:"hideTip"});var a=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:a.dataIndexInside,dataIndex:a.dataIndex,seriesIndex:a.seriesIndex,dataByCoordSys:e.list})}(p,a,e,o),function(e,t,n){var i=n.getZr(),a=lk(i).axisPointerLastHighlights||{},r=lk(i).axisPointerLastHighlights={};ok(e,(function(e,t){var n=e.axisPointerModel.option;"show"===n.status&&ok(n.seriesDataIndices,(function(e){var t=e.seriesIndex+" | "+e.dataIndex;r[t]=e}))}));var o=[],s=[];Ie.each(a,(function(e,t){!r[t]&&s.push(e)})),Ie.each(r,(function(e,t){!a[t]&&o.push(e)})),s.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,batch:s}),o.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,batch:o})}(c,0,n),d}},gk=(ry.extendComponentModel({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}}}),(0,Sr.makeInner)()),mk=Ie.each;function vk(e,t,n){e.handler("leave",null,n)}function yk(e,t,n,i){t.handler(e,n,i)}var _k={register:function(e,t,n){if(!ne.node){var i=t.getZr();gk(i).records||(gk(i).records={}),function(e,t){if(gk(e).initialized)return;function n(n,i){e.on(n,(function(n){var a=function(e){var t={showTip:[],hideTip:[]},n=function(i){var a=t[i.type];a?a.push(i):(i.dispatchAction=n,e.dispatchAction(i))};return{dispatchAction:n,pendings:t}}(t);mk(gk(e).records,(function(e){e&&i(e,n,a.dispatchAction)})),function(e,t){var n,i=e.showTip.length,a=e.hideTip.length;i?n=e.showTip[i-1]:a&&(n=e.hideTip[a-1]);n&&(n.dispatchAction=null,t.dispatchAction(n))}(a.pendings,t)}))}gk(e).initialized=!0,n("click",Ie.curry(yk,"click")),n("mousemove",Ie.curry(yk,"mousemove")),n("globalout",vk)}(i,t),(gk(i).records[e]||(gk(i).records[e]={})).handler=n}},unregister:function(e,t){if(!ne.node){var n=t.getZr();(gk(n).records||{})[e]&&(gk(n).records[e]=null)}}},xk=ry.extendComponentView({type:"axisPointer",render:function(e,t,n){var i=t.getComponent("tooltip"),a=e.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";_k.register("axisPointer",n,(function(e,t,n){"none"!==a&&("leave"===e||a.indexOf(e)>=0)&&n({type:"updateAxisPointer",currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})}))},remove:function(e,t){_k.unregister(t.getZr(),"axisPointer"),xk.superApply(this._model,"remove",arguments)},dispose:function(e,t){_k.unregister("axisPointer",t),xk.superApply(this._model,"dispose",arguments)}}),bk=(0,Sr.makeInner)(),wk=Ie.clone,Sk=Ie.bind;function Mk(){}function Tk(e,t,n,i){(function e(t,n){if(Ie.isObject(t)&&Ie.isObject(n)){var i=!0;return Ie.each(n,(function(n,a){i=i&&e(t[a],n)})),!!i}return t===n})(bk(n).lastProp,i)||(bk(n).lastProp=i,t?lu.updateProps(n,i,e):(n.stopAnimation(),n.attr(i)))}function Ik(e,t){e[t.get("label.show")?"show":"hide"]()}function Ak(e){return{position:e.position.slice(),rotation:e.rotation||0}}function Dk(e,t,n){var i=t.get("z"),a=t.get("zlevel");e&&e.traverse((function(e){"group"!==e.type&&(null!=i&&(e.z=i),null!=a&&(e.zlevel=a),e.silent=n)}))}Mk.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(e,t,n,i){var a=t.get("value"),r=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=n,i||this._lastValue!==a||this._lastStatus!==r){this._lastValue=a,this._lastStatus=r;var o=this._group,s=this._handle;if(!r||"hide"===r)return o&&o.hide(),void(s&&s.hide());o&&o.show(),s&&s.show();var l={};this.makeElOption(l,a,e,t,n);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=u;var c=this._moveAnimation=this.determineAnimation(e,t);if(o){var h=Ie.curry(Tk,t,c);this.updatePointerEl(o,l,h,t),this.updateLabelEl(o,l,h,t)}else o=this._group=new lu.Group,this.createPointerEl(o,l,e,t),this.createLabelEl(o,l,e,t),n.getZr().add(o);Dk(o,t,!0),this._renderHandle(a)}},remove:function(e){this.clear(e)},dispose:function(e){this.clear(e)},determineAnimation:function(e,t){var n=t.get("animation"),i=e.axis,a="category"===i.type,r=t.get("snap");if(!r&&!a)return!1;if("auto"===n||null==n){var o=this.animationThreshold;if(a&&i.getBandWidth()>o)return!0;if(r){var s=Ax.getAxisInfo(e).seriesDataCount,l=i.getExtent();return Math.abs(l[0]-l[1])/s>o}return!1}return!0===n},makeElOption:function(e,t,n,i,a){},createPointerEl:function(e,t,n,i){var a=t.pointer;if(a){var r=bk(e).pointerEl=new lu[a.type](wk(t.pointer));e.add(r)}},createLabelEl:function(e,t,n,i){if(t.label){var a=bk(e).labelEl=new lu.Rect(wk(t.label));e.add(a),Ik(a,i)}},updatePointerEl:function(e,t,n){var i=bk(e).pointerEl;i&&t.pointer&&(i.setStyle(t.pointer.style),n(i,{shape:t.pointer.shape}))},updateLabelEl:function(e,t,n,i){var a=bk(e).labelEl;a&&(a.setStyle(t.label.style),n(a,{shape:t.label.shape,position:t.label.position}),Ik(a,i))},_renderHandle:function(e){if(!this._dragging&&this.updateHandleTransform){var t,n=this._axisPointerModel,i=this._api.getZr(),a=this._handle,r=n.getModel("handle"),o=n.get("status");if(!r.get("show")||!o||"hide"===o)return a&&i.remove(a),void(this._handle=null);this._handle||(t=!0,a=this._handle=lu.createIcon(r.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(e){nt.stop(e.event)},onmousedown:Sk(this._onHandleDragMove,this,0,0),drift:Sk(this._onHandleDragMove,this),ondragend:Sk(this._onHandleDragEnd,this)}),i.add(a)),Dk(a,n,!1);a.setStyle(r.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=r.get("size");Ie.isArray(s)||(s=[s,s]),a.attr("scale",[s[0]/2,s[1]/2]),uf.createOrUpdate(this,"_doDispatchAxisPointer",r.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,t)}},_moveHandleToValue:function(e,t){Tk(this._axisPointerModel,!t&&this._moveAnimation,this._handle,Ak(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(e,t){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(Ak(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(Ak(i)),bk(n).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){if(this._handle){var e=this._payloadInfo,t=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:t.axis.dim,axisIndex:t.componentIndex}]})}},_onHandleDragEnd:function(e){if(this._dragging=!1,this._handle){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},getHandleTransform:null,updateHandleTransform:null,clear:function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,i=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),i&&t.remove(i),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(e,t,n){return{x:e[n=n||0],y:e[1-n],width:t[n],height:t[1-n]}}},Mk.prototype.constructor=Mk,Cr.enableClassExtend(Mk);var Ck=Mk;function Ok(e,t,n,i,a){var r=kk(n.get("value"),t.axis,t.ecModel,n.get("seriesDataIndices"),{precision:n.get("label.precision"),formatter:n.get("label.formatter")}),o=n.getModel("label"),s=Pu.normalizeCssArray(o.get("padding")||0),l=o.getFont(),u=Wi.getBoundingRect(r,l),c=a.position,h=u.width+s[1]+s[3],d=u.height+s[0]+s[2],f=a.align;"right"===f&&(c[0]-=h),"center"===f&&(c[0]-=h/2);var p=a.verticalAlign;"bottom"===p&&(c[1]-=d),"middle"===p&&(c[1]-=d/2),function(e,t,n,i){var a=i.getWidth(),r=i.getHeight();e[0]=Math.min(e[0]+t,a)-t,e[1]=Math.min(e[1]+n,r)-n,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}(c,h,d,i);var g=o.get("backgroundColor");g&&"auto"!==g||(g=t.get("axisLine.lineStyle.color")),e.label={shape:{x:0,y:0,width:h,height:d,r:o.get("borderRadius")},position:c.slice(),style:{text:r,textFont:l,textFill:o.getTextColor(),textPosition:"inside",textPadding:s,fill:g,stroke:o.get("borderColor")||"transparent",lineWidth:o.get("borderWidth")||0,shadowBlur:o.get("shadowBlur"),shadowColor:o.get("shadowColor"),shadowOffsetX:o.get("shadowOffsetX"),shadowOffsetY:o.get("shadowOffsetY")},z2:10}}function kk(e,t,n,i,a){e=t.scale.parse(e);var r=t.scale.getLabel(e,{precision:a.precision}),o=a.formatter;if(o){var s={value:Xm.getAxisRawValue(t,e),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};Ie.each(i,(function(e){var t=n.getSeriesByIndex(e.seriesIndex),i=e.dataIndexInside,a=t&&t.getDataParams(i);a&&s.seriesData.push(a)})),Ie.isString(o)?r=o.replace("{value}",r):Ie.isFunction(o)&&(r=o(s))}return r}function Lk(e,t,n){var i=yt.create();return yt.rotate(i,i,n.rotation),yt.translate(i,i,n.position),lu.applyTransform([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}var Ek={buildElStyle:function(e){var t,n=e.get("type"),i=e.getModel(n+"Style");return"line"===n?(t=i.getLineStyle()).fill=null:"shadow"===n&&((t=i.getAreaStyle()).stroke=null),t},buildLabelElOption:Ok,getValueLabel:kk,getTransformedPosition:Lk,buildCartesianSingleLabelElOption:function(e,t,n,i,a,r){var o=_x.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=a.get("label.margin"),Ok(t,i,a,r,{position:Lk(i.axis,e,n),align:o.textAlign,verticalAlign:o.textVerticalAlign})},makeLineShape:function(e,t,n){return{x1:e[n=n||0],y1:e[1-n],x2:t[n],y2:t[1-n]}},makeRectShape:function(e,t,n){return{x:e[n=n||0],y:e[1-n],width:t[n],height:t[1-n]}},makeSectorShape:function(e,t,n,i,a,r){return{cx:e,cy:t,r0:n,r:i,startAngle:a,endAngle:r,clockwise:!0}}},Nk=Ck.extend({makeElOption:function(e,t,n,i,a){var r=n.axis,o=r.grid,s=i.get("type"),l=Pk(o,r).getOtherAxis(r).getGlobalExtent(),u=r.toGlobalCoord(r.dataToCoord(t,!0));if(s&&"none"!==s){var c=Ek.buildElStyle(i),h=Rk[s](r,u,l);h.style=c,e.graphicKey=h.type,e.pointer=h}var d=Ex.layout(o.model,n);Ek.buildCartesianSingleLabelElOption(t,e,d,n,i,a)},getHandleTransform:function(e,t,n){var i=Ex.layout(t.axis.grid.model,t,{labelInside:!1});return i.labelMargin=n.get("handle.margin"),{position:Ek.getTransformedPosition(t.axis,e,i),rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(e,t,n,i){var a=n.axis,r=a.grid,o=a.getGlobalExtent(!0),s=Pk(r,a).getOtherAxis(a).getGlobalExtent(),l="x"===a.dim?0:1,u=e.position;u[l]+=t[l],u[l]=Math.min(o[1],u[l]),u[l]=Math.max(o[0],u[l]);var c=(s[1]+s[0])/2,h=[c,c];h[l]=u[l];return{position:u,rotation:e.rotation,cursorPoint:h,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}}});function Pk(e,t){var n={};return n[t.dim+"AxisIndex"]=t.index,e.getCartesian(n)}var Rk={line:function(e,t,n){return{type:"Line",subPixelOptimize:!0,shape:Ek.makeLineShape([t,n[0]],[t,n[1]],zk(e))}},shadow:function(e,t,n){var i=Math.max(1,e.getBandWidth()),a=n[1]-n[0];return{type:"Rect",shape:Ek.makeRectShape([t-i/2,n[0]],[i,a],zk(e))}}};function zk(e){return"x"===e.dim?0:1}Lx.registerAxisPointerClass("CartesianAxisPointer",Nk),ry.registerPreprocessor((function(e){if(e){(!e.axisPointer||0===e.axisPointer.length)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!Ie.isArray(t)&&(e.axisPointer.link=[t])}})),ry.registerProcessor(ry.PRIORITY.PROCESSOR.STATISTIC,(function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=Ax.collect(e,t)})),ry.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},pk);var Bk=["x","y"],Vk=["width","height"],Hk=Ck.extend({makeElOption:function(e,t,n,i,a){var r=n.axis,o=r.coordinateSystem,s=Gk(o,1-Fk(r)),l=o.dataToPoint(t)[0],u=i.get("type");if(u&&"none"!==u){var c=Ek.buildElStyle(i),h=Yk[u](r,l,s);h.style=c,e.graphicKey=h.type,e.pointer=h}var d=QO.layout(n);Ek.buildCartesianSingleLabelElOption(t,e,d,n,i,a)},getHandleTransform:function(e,t,n){var i=QO.layout(t,{labelInside:!1});return i.labelMargin=n.get("handle.margin"),{position:Ek.getTransformedPosition(t.axis,e,i),rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(e,t,n,i){var a=n.axis,r=a.coordinateSystem,o=Fk(a),s=Gk(r,o),l=e.position;l[o]+=t[o],l[o]=Math.min(s[1],l[o]),l[o]=Math.max(s[0],l[o]);var u=Gk(r,1-o),c=(u[1]+u[0])/2,h=[c,c];return h[o]=l[o],{position:l,rotation:e.rotation,cursorPoint:h,tooltipOption:{verticalAlign:"middle"}}}}),Yk={line:function(e,t,n){return{type:"Line",subPixelOptimize:!0,shape:Ek.makeLineShape([t,n[0]],[t,n[1]],Fk(e))}},shadow:function(e,t,n){var i=e.getBandWidth(),a=n[1]-n[0];return{type:"Rect",shape:Ek.makeRectShape([t-i/2,n[0]],[i,a],Fk(e))}}};function Fk(e){return e.isHorizontal()?0:1}function Gk(e,t){var n=e.getRect();return[n[Bk[t]],n[Bk[t]]+n[Vk[t]]]}Lx.registerAxisPointerClass("SingleAxisPointer",Hk),ry.extendComponentView({type:"single"});var Wk=zp.getDimensionTypeByAxis,jk=Sr.groupData,Uk=Pu.encodeHTML,Zk=Yd.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(e){Zk.superApply(this,"init",arguments),this.legendVisualProvider=new vb(Ie.bind(this.getData,this),Ie.bind(this.getRawData,this))},fixData:function(e){var t=e.length,n=jk(e,(function(e){return e[2]})),i=[];n.buckets.each((function(e,t){i.push({name:t,dataList:e})}));for(var a=i.length,r=-1,o=-1,s=0;s<a;++s){var l=i[s].dataList.length;l>r&&(r=l,o=s)}for(var u=0;u<a;++u)if(u!==o)for(var c=i[u].name,h=0;h<r;++h){for(var d=i[o].dataList[h][0],f=i[u].dataList.length,p=-1,g=0;g<f;++g){if(i[u].dataList[g][0]===d){p=g;break}}-1===p&&(e[t]=[],e[t][0]=d,e[t][1]=0,e[t][2]=c,t++)}return e},getInitialData:function(e,t){for(var n=t.queryComponents({mainType:"singleAxis",index:this.get("singleAxisIndex"),id:this.get("singleAxisId")})[0].get("type"),i=Ie.filter(e.data,(function(e){return void 0!==e[2]})),a=this.fixData(i||[]),r=[],o=this.nameMap=Ie.createHashMap(),s=0,l=0;l<a.length;++l)r.push(a[l][2]),o.get(a[l][2])||(o.set(a[l][2],s),s++);var u=Mg(a,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:Wk(n)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}),c=new cg(u,this);return c.initData(a),c},getLayerSeries:function(){for(var e=this.getData(),t=e.count(),n=[],i=0;i<t;++i)n[i]=i;var a=e.mapDimension("single"),r=jk(n,(function(t){return e.get("name",t)})),o=[];return r.buckets.each((function(t,n){t.sort((function(t,n){return e.get(a,t)-e.get(a,n)})),o.push({name:n,indices:t})})),o},getAxisTooltipData:function(e,t,n){Ie.isArray(e)||(e=e?[e]:[]);for(var i,a=this.getData(),r=this.getLayerSeries(),o=[],s=r.length,l=0;l<s;++l){for(var u=Number.MAX_VALUE,c=-1,h=r[l].indices.length,d=0;d<h;++d){var f=a.get(e[0],r[l].indices[d]),p=Math.abs(f-t);p<=u&&(i=f,u=p,c=r[l].indices[d])}o.push(c)}return{dataIndices:o,nestestValue:i}},formatTooltip:function(e){var t=this.getData(),n=t.getName(e),i=t.get(t.mapDimension("value"),e);return(isNaN(i)||null==i)&&(i="-"),Uk(n+" : "+i)},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}}}}),Xk=Zy.Polygon,qk=Ie.bind,Kk=Ie.extend;ry.extendChartView({type:"themeRiver",init:function(){this._layers=[]},render:function(e,t,n){var i=e.getData(),a=this.group,r=e.getLayerSeries(),o=i.getLayout("layoutInfo"),s=o.rect,l=o.boundaryGap;function u(e){return e.name}a.attr("position",[0,s.y+l[0]]);var c=new Lp(this._layersSeries||[],r,u,u),h={};function d(t,n,o){var s=this._layers;if("remove"!==t){for(var l,u,c,d=[],f=[],p=r[n].indices,g=0;g<p.length;g++){var m=i.getItemLayout(p[g]),v=m.x,y=m.y0,_=m.y;d.push([v,y]),f.push([v,y+_]),l=i.getItemVisual(p[g],"color")}var x=i.getItemLayout(p[0]),b=i.getItemModel(p[g-1]),w=b.getModel("label"),S=w.get("margin");if("add"===t){var M=h[n]=new lu.Group;u=new Xk({shape:{points:d,stackedOnPoints:f,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),c=new lu.Text({style:{x:x.x-S,y:x.y0+x.y/2}}),M.add(u),M.add(c),a.add(M),u.setClipPath(function(e,t,n){var i=new lu.Rect({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return lu.initProps(i,{shape:{width:e.width+20,height:e.height+20}},t,n),i}(u.getBoundingRect(),e,(function(){u.removeClipPath()})))}else{M=s[o];u=M.childAt(0),c=M.childAt(1),a.add(M),h[n]=M,lu.updateProps(u,{shape:{points:d,stackedOnPoints:f}},e),lu.updateProps(c,{style:{x:x.x-S,y:x.y0+x.y/2}},e)}var T=b.getModel("emphasis.itemStyle"),I=b.getModel("itemStyle");lu.setTextStyle(c.style,w,{text:w.get("show")?e.getFormattedLabel(p[g-1],"normal")||i.getName(p[g-1]):null,textVerticalAlign:"middle"}),u.setStyle(Kk({fill:l},I.getItemStyle(["color"]))),lu.setHoverStyle(u,T.getItemStyle())}else a.remove(s[n])}c.add(qk(d,this,"add")).update(qk(d,this,"update")).remove(qk(d,this,"remove")).execute(),this._layersSeries=r,this._layers=h},dispose:function(){}});function Qk(e,t,n){if(e.count())for(var i,a=t.coordinateSystem,r=t.getLayerSeries(),o=e.mapDimension("single"),s=e.mapDimension("value"),l=Ie.map(r,(function(t){return Ie.map(t.indices,(function(t){var n=a.dataToPoint(e.get(o,t));return n[1]=e.get(s,t),n}))})),u=function(e){for(var t=e.length,n=e[0].length,i=[],a=[],r=0,o={},s=0;s<n;++s){for(var l=0,u=0;l<t;++l)u+=e[l][s][1];u>r&&(r=u),i.push(u)}for(var c=0;c<n;++c)a[c]=(r-i[c])/2;r=0;for(var h=0;h<n;++h){var d=i[h]+a[h];d>r&&(r=d)}return o.y0=a,o.max=r,o}(l),c=u.y0,h=n/u.max,d=r.length,f=r[0].indices.length,p=0;p<f;++p){i=c[p]*h,e.setItemLayout(r[0].indices[p],{layerIndex:0,x:l[0][p][0],y0:i,y:l[0][p][1]*h});for(var g=1;g<d;++g)i+=l[g-1][p][1]*h,e.setItemLayout(r[g].indices[p],{layerIndex:g,x:l[g][p][0],y0:i,y:l[g][p][1]*h})}}var $k=function(e,t){e.eachSeriesByType("themeRiver",(function(e){var t=e.getData(),n=e.coordinateSystem,i={},a=n.getRect();i.rect=a;var r=e.get("boundaryGap"),o=n.getAxis();(i.boundaryGap=r,"horizontal"===o.orient)?(r[0]=Au.parsePercent(r[0],a.height),r[1]=Au.parsePercent(r[1],a.height),Qk(t,e,a.height-r[0]-r[1])):(r[0]=Au.parsePercent(r[0],a.width),r[1]=Au.parsePercent(r[1],a.width),Qk(t,e,a.width-r[0]-r[1]));t.setLayout("layoutInfo",i)}))},Jk=Ie.createHashMap;var eL=function(e){e.eachSeriesByType("themeRiver",(function(e){var t=e.getData(),n=e.getRawData(),i=e.get("color"),a=Jk();t.each((function(e){a.set(t.getRawIndex(e),e)})),n.each((function(r){var o=n.getName(r),s=i[(e.nameMap.get(o)-1)%i.length];n.setItemVisual(r,"color",s);var l=a.get(r);null!=l&&t.setItemVisual(l,"color",s)}))}))};ry.registerLayout($k),ry.registerVisual(eL),ry.registerProcessor(Vb("themeRiver"));var tL=fM.wrapTreePathInfo;Yd.extend({type:"series.sunburst",_viewRoot:null,getInitialData:function(e,t){var n={name:e.name,children:e.data};!function e(t){var n=0;Ie.each(t.children,(function(t){e(t);var i=t.value;Ie.isArray(i)&&(i=i[0]),n+=i}));var i=t.value;Ie.isArray(i)&&(i=i[0]);(null==i||isNaN(i))&&(i=n);i<0&&(i=0);Ie.isArray(t.value)?t.value[0]=i:t.value=i}(n);var i=e.levels||[],a={};return a.levels=i,BS.createTree(n,this,a).data},optionUpdated:function(){this.resetViewRoot()},getDataParams:function(e){var t=Yd.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(e);return t.treePathInfo=tL(n,this),t},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},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},highlight:{itemStyle:{opacity:1}},downplay:{itemStyle:{opacity:.5},label:{opacity:.6}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicOut",data:[],levels:[],sort:"desc"},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(e){e?this._viewRoot=e:e=this._viewRoot;var t=this.getRawData().tree.root;e&&(e===t||t.contains(e))||(this._viewRoot=t)}});var nL="none",iL="ancestor",aL="self";function rL(e,t,n){lu.Group.call(this);var i=new lu.Sector({z2:2});i.seriesIndex=t.seriesIndex;var a=new lu.Text({z2:4,silent:e.getModel("label").get("silent")});function r(){a.ignore=a.hoverIgnore}function o(){a.ignore=a.normalIgnore}this.add(i),this.add(a),this.updateData(!0,e,"normal",t,n),this.on("emphasis",r).on("normal",o).on("mouseover",r).on("mouseout",o)}var oL=rL.prototype;oL.updateData=function(e,t,n,i,a){this.node=t,t.piece=this,i=i||this._seriesModel,a=a||this._ecModel;var r=this.childAt(0);r.dataIndex=t.dataIndex;var o=t.getModel(),s=t.getLayout(),l=Ie.extend({},s);l.label=null;var u=function(e,t,n){var i=e.getVisual("color"),a=e.getVisual("visualMeta");a&&0!==a.length||(i=null);var r=e.getModel("itemStyle").get("color");if(r)return r;if(i)return i;if(0===e.depth)return n.option.color[0];var o=n.option.color.length;r=n.option.color[function(e){var t=e;for(;t.depth>1;)t=t.parentNode;var n=e.getAncestors()[0];return Ie.indexOf(n.children,t)}(e)%o];return r}(t,0,a);!function(e,t,n){t.getData().setItemVisual(e.dataIndex,"color",n)}(t,i,u);var c,h=o.getModel("itemStyle").getItemStyle();if("normal"===n)c=h;else{var d=o.getModel(n+".itemStyle").getItemStyle();c=Ie.merge(d,h)}c=Ie.defaults({lineJoin:"bevel",fill:c.fill||u},c),e?(r.setShape(l),r.shape.r=s.r0,lu.updateProps(r,{shape:{r:s.r}},i,t.dataIndex),r.useStyle(c)):"object"==typeof c.fill&&c.fill.type||"object"==typeof r.style.fill&&r.style.fill.type?(lu.updateProps(r,{shape:l},i),r.useStyle(c)):lu.updateProps(r,{shape:l,style:c},i),this._updateLabel(i,u,n);var f=o.getShallow("cursor");if(f&&r.attr("cursor",f),e){var p=i.getShallow("highlightPolicy");this._initEvents(r,t,i,p)}this._seriesModel=i||this._seriesModel,this._ecModel=a||this._ecModel,lu.setHoverStyle(this)},oL.onEmphasis=function(e){var t=this;this.node.hostTree.root.eachNode((function(n){var i,a,r;n.piece&&(t.node===n?n.piece.updateData(!1,n,"emphasis"):(i=n,a=t.node,(r=e)!==nL&&(r===aL?i===a:r===iL?i===a||i.isAncestorOf(a):i===a||i.isDescendantOf(a))?n.piece.childAt(0).trigger("highlight"):e!==nL&&n.piece.childAt(0).trigger("downplay")))}))},oL.onNormal=function(){this.node.hostTree.root.eachNode((function(e){e.piece&&e.piece.updateData(!1,e,"normal")}))},oL.onHighlight=function(){this.updateData(!1,this.node,"highlight")},oL.onDownplay=function(){this.updateData(!1,this.node,"downplay")},oL._updateLabel=function(e,t,n){var i=this.node.getModel(),a=i.getModel("label"),r="normal"===n||"emphasis"===n?a:i.getModel(n+".label"),o=i.getModel("emphasis.label"),s=Ie.retrieve(e.getFormattedLabel(this.node.dataIndex,n,null,null,"label"),this.node.name);!1===S("show")&&(s="");var l=this.node.getLayout(),u=r.get("minAngle");null==u&&(u=a.get("minAngle")),u=u/180*Math.PI;var c=l.endAngle-l.startAngle;null!=u&&Math.abs(c)<u&&(s="");var h=this.childAt(1);lu.setLabelStyle(h.style,h.hoverStyle||{},a,o,{defaultText:r.getShallow("show")?s:null,autoColor:t,useInsideStyle:!0});var d,f=(l.startAngle+l.endAngle)/2,p=Math.cos(f),g=Math.sin(f),m=S("position"),v=S("distance")||0,y=S("align");"outside"===m?(d=l.r+v,y=f>Math.PI/2?"right":"left"):y&&"center"!==y?"left"===y?(d=l.r0+v,f>Math.PI/2&&(y="right")):"right"===y&&(d=l.r-v,f>Math.PI/2&&(y="left")):(d=(l.r+l.r0)/2,y="center"),h.attr("style",{text:s,textAlign:y,textVerticalAlign:S("verticalAlign")||"middle",opacity:S("opacity")});var _=d*p+l.cx,x=d*g+l.cy;h.attr("position",[_,x]);var b=S("rotate"),w=0;function S(e){var t=r.get(e);return null==t?a.get(e):t}"radial"===b?(w=-f)<-Math.PI/2&&(w+=Math.PI):"tangential"===b?(w=Math.PI/2-f)>Math.PI/2?w-=Math.PI:w<-Math.PI/2&&(w+=Math.PI):"number"==typeof b&&(w=b*Math.PI/180),h.attr("rotation",w)},oL._initEvents=function(e,t,n,i){e.off("mouseover").off("mouseout").off("emphasis").off("normal");var a=this,r=function(){a.onEmphasis(i)},o=function(){a.onNormal()};n.isAnimationEnabled()&&e.on("mouseover",r).on("mouseout",o).on("emphasis",r).on("normal",o).on("downplay",(function(){a.onDownplay()})).on("highlight",(function(){a.onHighlight()}))},Ie.inherits(rL,lu.Group);var sL=rL,lL=Pu.windowOpen;rf.extend({type:"sunburst",init:function(){},render:function(e,t,n,i){var a=this;this.seriesModel=e,this.api=n,this.ecModel=t;var r=e.getData(),o=r.tree.root,s=e.getViewRoot(),l=this.group,u=e.get("renderLabelForZeroData"),c=[];s.eachNode((function(e){c.push(e)}));var h=this._oldChildren||[];if(function(n,i){if(0===n.length&&0===i.length)return;function a(e){return e.getId()}function s(a,s){!function(n,i){u||!n||n.getValue()||(n=null);if(n!==o&&i!==o)if(i&&i.piece)n?(i.piece.updateData(!1,n,"normal",e,t),r.setItemGraphicEl(n.dataIndex,i.piece)):function(e){if(!e)return;e.piece&&(l.remove(e.piece),e.piece=null)}(i);else if(n){var a=new sL(n,e,t);l.add(a),r.setItemGraphicEl(n.dataIndex,a)}}(null==a?null:n[a],null==s?null:i[s])}new Lp(i,n,a,a).add(s).update(s).remove(Ie.curry(s,null)).execute()}(c,h),function(n,i){if(i.depth>0){a.virtualPiece?a.virtualPiece.updateData(!1,n,"normal",e,t):(a.virtualPiece=new sL(n,e,t),l.add(a.virtualPiece)),i.piece._onclickEvent&&i.piece.off("click",i.piece._onclickEvent);var r=function(e){a._rootToNode(i.parentNode)};i.piece._onclickEvent=r,a.virtualPiece.on("click",r)}else a.virtualPiece&&(l.remove(a.virtualPiece),a.virtualPiece=null)}(o,s),i&&i.highlight&&i.highlight.piece){var d=e.getShallow("highlightPolicy");i.highlight.piece.onEmphasis(d)}else if(i&&i.unhighlight){var f=this.virtualPiece;!f&&o.children.length&&(f=o.children[0].piece),f&&f.onNormal()}this._initEvents(),this._oldChildren=c},dispose:function(){},_initEvents:function(){var e=this,t=function(t){var n=!1;e.seriesModel.getViewRoot().eachNode((function(i){if(!n&&i.piece&&i.piece.childAt(0)===t.target){var a=i.getModel().get("nodeClick");if("rootToNode"===a)e._rootToNode(i);else if("link"===a){var r=i.getModel(),o=r.get("link");if(o){var s=r.get("target",!0)||"_blank";lL(o,s)}}n=!0}}))};this.group._onclickEvent&&this.group.off("click",this.group._onclickEvent),this.group.on("click",t),this.group._onclickEvent=t},_rootToNode:function(e){e!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:"sunburstRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e})},containPoint:function(e,t){var n=t.getData().getItemLayout(0);if(n){var i=e[0]-n.cx,a=e[1]-n.cy,r=Math.sqrt(i*i+a*a);return r<=n.r&&r>=n.r0}}});ry.registerAction({type:"sunburstRootToNode",update:"updateView"},(function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},(function(t,n){var i=fM.retrieveTargetInfo(e,["sunburstRootToNode"],t);if(i){var a=t.getViewRoot();a&&(e.direction=fM.aboveViewRoot(a,i.node)?"rollUp":"drillDown"),t.resetViewRoot(i.node)}}))}));ry.registerAction({type:"sunburstHighlight",update:"updateView"},(function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},(function(t,n){var i=fM.retrieveTargetInfo(e,["sunburstHighlight"],t);i&&(e.highlight=i.node)}))}));ry.registerAction({type:"sunburstUnhighlight",update:"updateView"},(function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},(function(t,n){e.unhighlight=!0}))}));var uL=Au.parsePercent,cL=Math.PI/180;var hL=function(e,t,n,i){t.eachSeriesByType(e,(function(e){var t=e.get("center"),i=e.get("radius");Ie.isArray(i)||(i=[0,i]),Ie.isArray(t)||(t=[t,t]);var a=n.getWidth(),r=n.getHeight(),o=Math.min(a,r),s=uL(t[0],a),l=uL(t[1],r),u=uL(i[0],o/2),c=uL(i[1],o/2),h=-e.get("startAngle")*cL,d=e.get("minAngle")*cL,f=e.getData().tree.root,p=e.getViewRoot(),g=p.depth,m=e.get("sort");null!=m&&function e(t,n){var i=t.children||[];t.children=function(e,t){if("function"==typeof t)return e.sort(t);var n="asc"===t;return e.sort((function(e,t){var i=(e.getValue()-t.getValue())*(n?1:-1);return 0===i?(e.dataIndex-t.dataIndex)*(n?-1:1):i}))}(i,n),i.length&&Ie.each(t.children,(function(t){e(t,n)}))}(p,m);var v=0;Ie.each(p.children,(function(e){!isNaN(e.getValue())&&v++}));var y=p.getValue(),_=Math.PI/(y||v)*2,x=p.depth>0,b=p.height-(x?-1:1),w=(c-u)/(b||1),S=e.get("clockwise"),M=e.get("stillShowZeroSum"),T=S?1:-1,I=function(e,t){if(e){var n=t;if(e!==f){var i=e.getValue(),a=0===y&&M?_:i*_;a<d&&(a=d),n=t+T*a;var r=e.depth-g-(x?-1:1),c=u+w*r,h=u+w*(r+1),p=e.getModel();null!=p.get("r0")&&(c=uL(p.get("r0"),o/2)),null!=p.get("r")&&(h=uL(p.get("r"),o/2)),e.setLayout({angle:a,startAngle:t,endAngle:n,clockwise:S,cx:s,cy:l,r0:c,r:h})}if(e.children&&e.children.length){var m=0;Ie.each(e.children,(function(e){m+=I(e,t+m)}))}return n-t}};if(x){var A=u,D=u+w,C=2*Math.PI;f.setLayout({angle:C,startAngle:h,endAngle:h+C,clockwise:S,cx:s,cy:l,r0:A,r:D})}I(p,h)}))};function dL(e,t){return t=t||[0,0],Ie.map(["x","y"],(function(n,i){var a=this.getAxis(n),r=t[i],o=e[i]/2;return"category"===a.type?a.getBandWidth():Math.abs(a.dataToCoord(r-o)-a.dataToCoord(r+o))}),this)}ry.registerVisual(Ie.curry(Db,"sunburst")),ry.registerLayout(Ie.curry(hL,"sunburst")),ry.registerProcessor(Ie.curry(Vb,"sunburst"));var fL=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:Ie.bind(dL,e)}}};function pL(e,t){return t=t||[0,0],Ie.map([0,1],(function(n){var i=t[n],a=e[n]/2,r=[],o=[];return r[n]=i-a,o[n]=i+a,r[1-n]=o[1-n]=t[1-n],Math.abs(this.dataToPoint(r)[n]-this.dataToPoint(o)[n])}),this)}var gL=function(e){var t=e.getBoundingRect();return{coordSys:{type:"geo",x:t.x,y:t.y,width:t.width,height:t.height,zoom:e.getZoom()},api:{coord:function(t){return e.dataToPoint(t)},size:Ie.bind(pL,e)}}};function mL(e,t){var n=this.getAxis(),i=t instanceof Array?t[0]:t,a=(e instanceof Array?e[0]:e)/2;return"category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(i-a)-n.dataToCoord(i+a))}var vL=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:Ie.bind(mL,e)}}};function yL(e,t){return Ie.map(["Radius","Angle"],(function(n,i){var a=this["get"+n+"Axis"](),r=t[i],o=e[i]/2,s="dataTo"+n,l="category"===a.type?a.getBandWidth():Math.abs(a[s](r-o)-a[s](r+o));return"Angle"===n&&(l=l*Math.PI/180),l}),this)}var _L=function(e){var t=e.getRadiusAxis(),n=e.getAngleAxis(),i=t.getExtent();return i[0]>i[1]&&i.reverse(),{coordSys:{type:"polar",cx:e.cx,cy:e.cy,r:i[1],r0:i[0]},api:{coord:Ie.bind((function(i){var a=t.dataToRadius(i[0]),r=n.dataToAngle(i[1]),o=e.coordToPoint([a,r]);return o.push(a,r*Math.PI/180),o})),size:Ie.bind(yL,e)}}};var xL=function(e){var t=e.getRect(),n=e.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:e.getCellWidth(),cellHeight:e.getCellHeight(),rangeInfo:{start:n.start,end:n.end,weeks:n.weeks,dayCount:n.allDay}},api:{coord:function(t,n){return e.dataToPoint(t,n)}}}},bL=sy.getDefaultLabel,wL=wm.getLayoutOnAxis,SL=Qy.createClipPath,ML=lu.CACHED_LABEL_STYLE_PROPERTIES,TL=["itemStyle"],IL=["emphasis","itemStyle"],AL=["label"],DL=["emphasis","label"],CL={cartesian2d:fL,geo:gL,singleAxis:vL,polar:_L,calendar:xL};function OL(e,t,n,i,a){null==n[e]||a||(t[e]=n[e],n[e]=i[e])}function kL(e,t,n,i){var a=e.get("renderItem"),r=e.coordinateSystem,o={};r&&(o=r.prepareCustoms?r.prepareCustoms():CL[r.type](r));var s,l,u,c,h,d=Ie.defaults({getWidth:i.getWidth,getHeight:i.getHeight,getZr:i.getZr,getDevicePixelRatio:i.getDevicePixelRatio,value:function(e,n){return null==n&&(n=s),t.get(t.getDimension(e||0),n)},style:function(n,i){null==i&&(i=s),g(i);var a=l.getModel(TL).getItemStyle();null!=h&&(a.fill=h);var r=t.getItemVisual(i,"opacity");null!=r&&(a.opacity=r);var o=n?zL(n,u):u;return lu.setTextStyle(a,o,null,{autoColor:h,isRectText:!0}),a.text=o.getShallow("show")?Ie.retrieve2(e.getFormattedLabel(i,"normal"),bL(t,i)):null,n&&BL(a,n),a},styleEmphasis:function(n,i){null==i&&(i=s),g(i);var a=l.getModel(IL).getItemStyle(),r=n?zL(n,c):c;return lu.setTextStyle(a,r,null,{isRectText:!0},!0),a.text=r.getShallow("show")?Ie.retrieve3(e.getFormattedLabel(i,"emphasis"),e.getFormattedLabel(i,"normal"),bL(t,i)):null,n&&BL(a,n),a},visual:function(e,n){return null==n&&(n=s),t.getItemVisual(n,e)},barLayout:function(e){if(r.getBaseAxis){var t=r.getBaseAxis();return wL(Ie.defaults({axis:t},e),i)}},currentSeriesIndices:function(){return n.getCurrentSeriesIndices()},font:function(e){return lu.getFont(e,n)}},o.api||{}),f={context:{},seriesId:e.id,seriesName:e.name,seriesIndex:e.seriesIndex,coordSys:o.coordSys,dataInsideLength:t.count(),encode:LL(e.getData())},p=!0;return function(e,n){return s=e,p=!0,a&&a(Ie.defaults({dataIndexInside:e,dataIndex:t.getRawIndex(e),actionType:n?n.type:null},f),d)};function g(e){null==e&&(e=s),p&&(l=t.getItemModel(e),u=l.getModel(AL),c=l.getModel(DL),h=t.getItemVisual(e,"color"),p=!1)}}function LL(e){var t={};return Ie.each(e.dimensions,(function(n,i){var a=e.getDimensionInfo(n);if(!a.isExtraCoord){var r=a.coordDim;(t[r]=t[r]||[])[a.coordDimIndex]=i}})),t}function EL(e,t,n,i,a,r){return(e=NL(e,t,n,i,a,r,!0))&&r.setItemGraphicEl(t,e),e}function NL(e,t,n,i,a,r,o){var s,l=!n,u=(n=n||{}).type,c=n.shape,h=n.style;if(e&&(l||null!=u&&u!==e.__customGraphicType||"path"===u&&((s=c)&&(s.hasOwnProperty("pathData")||s.hasOwnProperty("d")))&&HL(c)!==e.__customPathData||"image"===u&&YL(h,"image")&&h.image!==e.__customImagePath||"text"===u&&YL(c,"text")&&h.text!==e.__customText)&&(a.remove(e),e=null),!l){var d=!e;return!e&&(e=function(e){var t,n=e.type;if("path"===n){var i=e.shape,a=null!=i.width&&null!=i.height?{x:i.x||0,y:i.y||0,width:i.width,height:i.height}:null,r=HL(i);(t=lu.makePath(r,null,a,i.layout||"center")).__customPathData=r}else if("image"===n)(t=new lu.Image({})).__customImagePath=e.style.image;else if("text"===n)(t=new lu.Text({})).__customText=e.style.text;else if("group"===n)t=new lu.Group;else{if("compoundPath"===n)throw new Error('"compoundPath" is not supported yet.');t=new(lu.getShapeClass(n))}return t.__customGraphicType=n,t.name=e.name,t}(n)),function(e,t,n,i,a,r,o){var s={},l=n.style||{};if(n.shape&&(s.shape=Ie.clone(n.shape)),n.position&&(s.position=n.position.slice()),n.scale&&(s.scale=n.scale.slice()),n.origin&&(s.origin=n.origin.slice()),n.rotation&&(s.rotation=n.rotation),"image"===e.type&&n.style){var u=s.style={};Ie.each(["x","y","width","height"],(function(t){OL(t,u,l,e.style,r)}))}if("text"===e.type&&n.style){u=s.style={};Ie.each(["x","y"],(function(t){OL(t,u,l,e.style,r)})),!l.hasOwnProperty("textFill")&&l.fill&&(l.textFill=l.fill),!l.hasOwnProperty("textStroke")&&l.stroke&&(l.textStroke=l.stroke)}if("group"!==e.type&&(e.useStyle(l),r)){e.style.opacity=0;var c=l.opacity;null==c&&(c=1),lu.initProps(e,{style:{opacity:c}},i,t)}r?e.attr(s):lu.updateProps(e,s,i,t),n.hasOwnProperty("z2")&&e.attr("z2",n.z2||0),n.hasOwnProperty("silent")&&e.attr("silent",n.silent),n.hasOwnProperty("invisible")&&e.attr("invisible",n.invisible),n.hasOwnProperty("ignore")&&e.attr("ignore",n.ignore),n.hasOwnProperty("info")&&e.attr("info",n.info);var h=n.styleEmphasis;lu.setElementHoverStyle(e,h),o&&lu.setAsHighDownDispatcher(e,!1!==h)}(e,t,n,i,0,d,o),"group"===u&&function(e,t,n,i,a){var r=n.children,o=r?r.length:0,s=n.$mergeChildren,l="byName"===s||n.diffChildrenByName,u=!1===s;if(!o&&!l&&!u)return;if(l)return c={oldChildren:e.children()||[],newChildren:r||[],dataIndex:t,animatableModel:i,group:e,data:a},void new Lp(c.oldChildren,c.newChildren,PL,PL,c).add(RL).update(RL).remove(VL).execute();var c;u&&e.removeAll();for(var h=0;h<o;h++)r[h]&&NL(e.childAt(h),t,r[h],i,e,a)}(e,t,n,i,r),a.add(e),e}}function PL(e,t){var n=e&&e.name;return null!=n?n:"e\0\0"+t}function RL(e,t){var n=this.context,i=null!=e?n.newChildren[e]:null;NL(null!=t?n.oldChildren[t]:null,n.dataIndex,i,n.animatableModel,n.group,n.data)}function zL(e,t){var n=new bu({},t);return Ie.each(ML,(function(t,i){e.hasOwnProperty(t)&&(n.option[i]=e[t])})),n}function BL(e,t){for(var n in t)!t.hasOwnProperty(n)&&ML.hasOwnProperty(n)||(e[n]=t[n])}function VL(e){var t=this.context,n=t.oldChildren[e];n&&t.group.remove(n)}function HL(e){return e&&(e.pathData||e.d)}function YL(e,t){return e&&e.hasOwnProperty(t)}Yd.extend({type:"series.custom",dependencies:["grid","polar","geo","singleAxis","calendar"],defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,useTransform:!0,clip:!1},getInitialData:function(e,t){return Yg(this.getSource(),this)},getDataParams:function(e,t,n){var i=Yd.prototype.getDataParams.apply(this,arguments);return n&&(i.info=n.info),i}}),rf.extend({type:"custom",_data:null,render:function(e,t,n,i){var a=this._data,r=e.getData(),o=this.group,s=kL(e,r,t,n);r.diff(a).add((function(t){EL(null,t,s(t,i),e,o,r)})).update((function(t,n){EL(a.getItemGraphicEl(n),t,s(t,i),e,o,r)})).remove((function(e){var t=a.getItemGraphicEl(e);t&&o.remove(t)})).execute();var l=e.get("clip",!0)?SL(e.coordinateSystem,!1,e):null;l?o.setClipPath(l):o.removeClipPath(),this._data=r},incrementalPrepareRender:function(e,t,n){this.group.removeAll(),this._data=null},incrementalRender:function(e,t,n,i,a){var r=t.getData(),o=kL(t,r,n,i);function s(e){e.isGroup||(e.incremental=!0,e.useHoverLayer=!0)}for(var l=e.start;l<e.end;l++){EL(null,l,o(l,a),t,this.group,r).traverse(s)}},dispose:Ie.noop,filterForExposedEvent:function(e,t,n,i){var a=t.element;if(null==a||n.name===a)return!0;for(;(n=n.parent)&&n!==this.group;)if(n.name===a)return!0;return!1}});var FL=Au.parsePercent,GL=Ng.isDimensionStacked;function WL(e){return e.get("stack")||"__ec_stack_"+e.seriesIndex}function jL(e,t){return t.dim+e.model.componentIndex}var UL=function(e,t,n){var i={},a=function(e,t){var n={};Ie.each(e,(function(e,t){var i=e.getData(),a=e.coordinateSystem,r=a.getBaseAxis(),o=jL(a,r),s=r.getExtent(),l="category"===r.type?r.getBandWidth():Math.abs(s[1]-s[0])/i.count(),u=n[o]||{bandWidth:l,remainedWidth:l,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},c=u.stacks;n[o]=u;var h=WL(e);c[h]||u.autoWidthCount++,c[h]=c[h]||{width:0,maxWidth:0};var d=FL(e.get("barWidth"),l),f=FL(e.get("barMaxWidth"),l),p=e.get("barGap"),g=e.get("barCategoryGap");d&&!c[h].width&&(d=Math.min(u.remainedWidth,d),c[h].width=d,u.remainedWidth-=d),f&&(c[h].maxWidth=f),null!=p&&(u.gap=p),null!=g&&(u.categoryGap=g)}));var i={};return Ie.each(n,(function(e,t){i[t]={};var n=e.stacks,a=e.bandWidth,r=FL(e.categoryGap,a),o=FL(e.gap,1),s=e.remainedWidth,l=e.autoWidthCount,u=(s-r)/(l+(l-1)*o);u=Math.max(u,0),Ie.each(n,(function(e,t){var n=e.maxWidth;n&&n<u&&(n=Math.min(n,s),e.width&&(n=Math.min(n,e.width)),s-=n,e.width=n,l--)})),u=(s-r)/(l+(l-1)*o),u=Math.max(u,0);var c,h=0;Ie.each(n,(function(e,t){e.width||(e.width=u),c=e,h+=e.width*(1+o)})),c&&(h-=c.width*o);var d=-h/2;Ie.each(n,(function(e,n){i[t][n]=i[t][n]||{offset:d,width:e.width},d+=e.width*(1+o)}))})),i}(Ie.filter(t.getSeriesByType(e),(function(e){return!t.isSeriesFiltered(e)&&e.coordinateSystem&&"polar"===e.coordinateSystem.type})));t.eachSeriesByType(e,(function(e){if("polar"===e.coordinateSystem.type){var t=e.getData(),n=e.coordinateSystem,r=n.getBaseAxis(),o=jL(n,r),s=WL(e),l=a[o][s],u=l.offset,c=l.width,h=n.getOtherAxis(r),d=e.coordinateSystem.cx,f=e.coordinateSystem.cy,p=e.get("barMinHeight")||0,g=e.get("barMinAngle")||0;i[s]=i[s]||[];for(var m=t.mapDimension(h.dim),v=t.mapDimension(r.dim),y=GL(t,m),_="radius"!==r.dim||!e.get("roundCap",!0),x=h.getExtent()[0],b=0,w=t.count();b<w;b++){var S,M,T,I,A=t.get(m,b),D=t.get(v,b),C=A>=0?"p":"n",O=x;if(y&&(i[s][D]||(i[s][D]={p:x,n:x}),O=i[s][D][C]),"radius"===h.dim){var k=h.dataToRadius(A)-x,L=r.dataToAngle(D);Math.abs(k)<p&&(k=(k<0?-1:1)*p),S=O,M=O+k,I=(T=L-u)-c,y&&(i[s][D][C]=M)}else{var E=h.dataToAngle(A,_)-x,N=r.dataToRadius(D);Math.abs(E)<g&&(E=(E<0?-1:1)*g),M=(S=N+u)+c,T=O,I=O+E,y&&(i[s][D][C]=I)}t.setItemLayout(b,{cx:d,cy:f,r0:S,r:M,startAngle:-T*Math.PI/180,endAngle:-I*Math.PI/180})}}}),this)};function ZL(e,t){Yv.call(this,"radius",e,t),this.type="category"}ZL.prototype={constructor:ZL,pointToData:function(e,t){return this.polar.pointToData(e,t)["radius"===this.dim?0:1]},dataToRadius:Yv.prototype.dataToCoord,radiusToData:Yv.prototype.coordToData},Ie.inherits(ZL,Yv);var XL=ZL,qL=(0,Sr.makeInner)();function KL(e,t){t=t||[0,360],Yv.call(this,"angle",e,t),this.type="category"}KL.prototype={constructor:KL,pointToData:function(e,t){return this.polar.pointToData(e,t)["radius"===this.dim?0:1]},dataToAngle:Yv.prototype.dataToCoord,angleToData:Yv.prototype.coordToData,calculateCategoryInterval:function(){var e=this.getLabelModel(),t=this.scale,n=t.getExtent(),i=t.count();if(n[1]-n[0]<1)return 0;var a=n[0],r=this.dataToCoord(a+1)-this.dataToCoord(a),o=Math.abs(r),s=Wi.getBoundingRect(a,e.getFont(),"center","top"),l=Math.max(s.height,7)/o;isNaN(l)&&(l=1/0);var u=Math.max(0,Math.floor(l)),c=qL(this.model),h=c.lastAutoInterval,d=c.lastTickCount;return null!=h&&null!=d&&Math.abs(h-u)<=1&&Math.abs(d-i)<=1&&h>u?u=h:(c.lastTickCount=i,c.lastAutoInterval=u),u}},Ie.inherits(KL,Yv);var QL=KL,$L=function(e){this.name=e||"",this.cx=0,this.cy=0,this._radiusAxis=new XL,this._angleAxis=new QL,this._radiusAxis.polar=this._angleAxis.polar=this};$L.prototype={type:"polar",axisPointerEnabled:!0,constructor:$L,dimensions:["radius","angle"],model:null,containPoint:function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},containData:function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},getAxis:function(e){return this["_"+e+"Axis"]},getAxes:function(){return[this._radiusAxis,this._angleAxis]},getAxesByScale:function(e){var t=[],n=this._angleAxis,i=this._radiusAxis;return n.scale.type===e&&t.push(n),i.scale.type===e&&t.push(i),t},getAngleAxis:function(){return this._angleAxis},getRadiusAxis:function(){return this._radiusAxis},getOtherAxis:function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},getTooltipAxes:function(e){var t=null!=e&&"auto"!==e?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},dataToPoint:function(e,t){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)])},pointToData:function(e,t){var n=this.pointToCoord(e);return[this._radiusAxis.radiusToData(n[0],t),this._angleAxis.angleToData(n[1],t)]},pointToCoord:function(e){var t=e[0]-this.cx,n=e[1]-this.cy,i=this.getAngleAxis(),a=i.getExtent(),r=Math.min(a[0],a[1]),o=Math.max(a[0],a[1]);i.inverse?r=o-360:o=r+360;var s=Math.sqrt(t*t+n*n);t/=s,n/=s;for(var l=Math.atan2(-n,t)/Math.PI*180,u=l<r?1:-1;l<r||l>o;)l+=360*u;return[s,l]},coordToPoint:function(e){var t=e[0],n=e[1]/180*Math.PI;return[Math.cos(n)*t+this.cx,-Math.sin(n)*t+this.cy]},getArea:function(){var e=this.getAngleAxis(),t=this.getRadiusAxis().getExtent().slice();t[0]>t[1]&&t.reverse();var n=e.getExtent(),i=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:t[0],r:t[1],startAngle:-n[0]*i,endAngle:-n[1]*i,clockwise:e.inverse,contain:function(e,t){var n=e-this.cx,i=t-this.cy,a=n*n+i*i,r=this.r,o=this.r0;return a<=r*r&&a>=o*o}}}};var JL=$L,eE=$u.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});Ie.merge(eE.prototype,qm);var tE={splitNumber:5};function nE(e,t){return t.type||(t.data?"category":"value")}L_("angle",eE,nE,{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}}),L_("radius",eE,nE,tE);ry.extendComponentModel({type:"polar",dependencies:["polarAxis","angleAxis"],coordinateSystem:null,findAxisModel:function(e){var t;return this.ecModel.eachComponent(e,(function(e){e.getCoordSysModel()===this&&(t=e)}),this),t},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"80%"}});var iE=Au.parsePercent,aE=Xm.createScaleByModel,rE=Xm.niceScaleExtent,oE=Ng.getStackedDimension;function sE(e,t){var n=this,i=n.getAngleAxis(),a=n.getRadiusAxis();if(i.scale.setExtent(1/0,-1/0),a.scale.setExtent(1/0,-1/0),e.eachSeries((function(e){if(e.coordinateSystem===n){var t=e.getData();Ie.each(t.mapDimension("radius",!0),(function(e){a.scale.unionExtentFromData(t,oE(t,e))})),Ie.each(t.mapDimension("angle",!0),(function(e){i.scale.unionExtentFromData(t,oE(t,e))}))}})),rE(i.scale,i.model),rE(a.scale,a.model),"category"===i.type&&!i.onBand){var r=i.getExtent(),o=360/i.scale.count();i.inverse?r[1]+=o:r[1]-=o,i.setExtent(r[0],r[1])}}function lE(e,t){if(e.type=t.get("type"),e.scale=aE(t),e.onBand=t.get("boundaryGap")&&"category"===e.type,e.inverse=t.get("inverse"),"angleAxis"===t.mainType){e.inverse^=t.get("clockwise");var n=t.get("startAngle");e.setExtent(n,n+(e.inverse?-360:360))}t.axis=e,e.model=t}var uE={dimensions:JL.prototype.dimensions,create:function(e,t){var n=[];return e.eachComponent("polar",(function(e,i){var a=new JL(i);a.update=sE;var r=a.getRadiusAxis(),o=a.getAngleAxis(),s=e.findAxisModel("radiusAxis"),l=e.findAxisModel("angleAxis");lE(r,s),lE(o,l),function(e,t,n){var i=t.get("center"),a=n.getWidth(),r=n.getHeight();e.cx=iE(i[0],a),e.cy=iE(i[1],r);var o=e.getRadiusAxis(),s=Math.min(a,r)/2,l=t.get("radius");null==l?l=[0,"100%"]:Ie.isArray(l)||(l=[0,l]),l=[iE(l[0],s),iE(l[1],s)],o.inverse?o.setExtent(l[1],l[0]):o.setExtent(l[0],l[1])}(a,e,t),n.push(a),e.coordinateSystem=a,a.model=e})),e.eachSeries((function(t){if("polar"===t.get("coordinateSystem")){var n=e.queryComponents({mainType:"polar",index:t.get("polarIndex"),id:t.get("polarId")})[0];t.coordinateSystem=n.coordinateSystem}})),n}};ch.register("polar",uE);var cE=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function hE(e,t,n){t[1]>t[0]&&(t=t.slice().reverse());var i=e.coordToPoint([t[0],n]),a=e.coordToPoint([t[1],n]);return{x1:i[0],y1:i[1],x2:a[0],y2:a[1]}}function dE(e){return e.getRadiusAxis().inverse?0:1}function fE(e){var t=e[0],n=e[e.length-1];t&&n&&Math.abs(Math.abs(t.coord-n.coord)-360)<1e-4&&e.pop()}Lx.extend({type:"angleAxis",axisPointerClass:"PolarAxisPointer",render:function(e,t){if(this.group.removeAll(),e.get("show")){var n=e.axis,i=n.polar,a=i.getRadiusAxis().getExtent(),r=n.getTicksCoords(),o=n.getMinorTicksCoords(),s=Ie.map(n.getViewLabels(),(function(e){return(e=Ie.clone(e)).coord=n.dataToCoord(e.tickValue),e}));fE(s),fE(r),Ie.each(cE,(function(t){!e.get(t+".show")||n.scale.isBlank()&&"axisLine"!==t||this["_"+t](e,i,r,o,a,s)}),this)}},_axisLine:function(e,t,n,i,a){var r,o=e.getModel("axisLine.lineStyle"),s=dE(t),l=s?0:1;(r=0===a[l]?new lu.Circle({shape:{cx:t.cx,cy:t.cy,r:a[s]},style:o.getLineStyle(),z2:1,silent:!0}):new lu.Ring({shape:{cx:t.cx,cy:t.cy,r:a[s],r0:a[l]},style:o.getLineStyle(),z2:1,silent:!0})).style.fill=null,this.group.add(r)},_axisTick:function(e,t,n,i,a){var r=e.getModel("axisTick"),o=(r.get("inside")?-1:1)*r.get("length"),s=a[dE(t)],l=Ie.map(n,(function(e){return new lu.Line({shape:hE(t,[s,s+o],e.coord)})}));this.group.add(lu.mergePath(l,{style:Ie.defaults(r.getModel("lineStyle").getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")})}))},_minorTick:function(e,t,n,i,a){if(i.length){for(var r=e.getModel("axisTick"),o=e.getModel("minorTick"),s=(r.get("inside")?-1:1)*o.get("length"),l=a[dE(t)],u=[],c=0;c<i.length;c++)for(var h=0;h<i[c].length;h++)u.push(new lu.Line({shape:hE(t,[l,l+s],i[c][h].coord)}));this.group.add(lu.mergePath(u,{style:Ie.defaults(o.getModel("lineStyle").getLineStyle(),Ie.defaults(r.getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")}))}))}},_axisLabel:function(e,t,n,i,a,r){var o=e.getCategories(!0),s=e.getModel("axisLabel"),l=s.get("margin"),u=e.get("triggerEvent");Ie.each(r,(function(n,i){var r=s,c=n.tickValue,h=a[dE(t)],d=t.coordToPoint([h+l,n.coord]),f=t.cx,p=t.cy,g=Math.abs(d[0]-f)/h<.3?"center":d[0]>f?"left":"right",m=Math.abs(d[1]-p)/h<.3?"middle":d[1]>p?"top":"bottom";o&&o[c]&&o[c].textStyle&&(r=new bu(o[c].textStyle,s,s.ecModel));var v=new lu.Text({silent:_x.isLabelSilent(e)});this.group.add(v),lu.setTextStyle(v.style,r,{x:d[0],y:d[1],textFill:r.getTextColor()||e.get("axisLine.lineStyle.color"),text:n.formattedLabel,textAlign:g,textVerticalAlign:m}),u&&(v.eventData=_x.makeAxisEventDataBase(e),v.eventData.targetType="axisLabel",v.eventData.value=n.rawLabel)}),this)},_splitLine:function(e,t,n,i,a){var r=e.getModel("splitLine").getModel("lineStyle"),o=r.get("color"),s=0;o=o instanceof Array?o:[o];for(var l=[],u=0;u<n.length;u++){var c=s++%o.length;l[c]=l[c]||[],l[c].push(new lu.Line({shape:hE(t,a,n[u].coord)}))}for(u=0;u<l.length;u++)this.group.add(lu.mergePath(l[u],{style:Ie.defaults({stroke:o[u%o.length]},r.getLineStyle()),silent:!0,z:e.get("z")}))},_minorSplitLine:function(e,t,n,i,a){if(i.length){for(var r=e.getModel("minorSplitLine").getModel("lineStyle"),o=[],s=0;s<i.length;s++)for(var l=0;l<i[s].length;l++)o.push(new lu.Line({shape:hE(t,a,i[s][l].coord)}));this.group.add(lu.mergePath(o,{style:r.getLineStyle(),silent:!0,z:e.get("z")}))}},_splitArea:function(e,t,n,i,a){if(n.length){var r=e.getModel("splitArea").getModel("areaStyle"),o=r.get("color"),s=0;o=o instanceof Array?o:[o];for(var l=[],u=Math.PI/180,c=-n[0].coord*u,h=Math.min(a[0],a[1]),d=Math.max(a[0],a[1]),f=e.get("clockwise"),p=1;p<n.length;p++){var g=s++%o.length;l[g]=l[g]||[],l[g].push(new lu.Sector({shape:{cx:t.cx,cy:t.cy,r0:h,r:d,startAngle:c,endAngle:-n[p].coord*u,clockwise:f},silent:!0})),c=-n[p].coord*u}for(p=0;p<l.length;p++)this.group.add(lu.mergePath(l[p],{style:Ie.defaults({fill:o[p%o.length]},r.getAreaStyle()),silent:!0}))}}});var pE=["axisLine","axisTickLabel","axisName"],gE=["splitLine","splitArea","minorSplitLine"];Lx.extend({type:"radiusAxis",axisPointerClass:"PolarAxisPointer",render:function(e,t){if(this.group.removeAll(),e.get("show")){var n=e.axis,i=n.polar,a=i.getAngleAxis(),r=n.getTicksCoords(),o=n.getMinorTicksCoords(),s=a.getExtent()[0],l=n.getExtent(),u=function(e,t,n){return{position:[e.cx,e.cy],rotation:n/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:t.getModel("axisLabel").get("rotate"),z2:1}}(i,e,s),c=new _x(e,u);Ie.each(pE,c.add,c),this.group.add(c.getGroup()),Ie.each(gE,(function(t){e.get(t+".show")&&!n.scale.isBlank()&&this["_"+t](e,i,s,l,r,o)}),this)}},_splitLine:function(e,t,n,i,a){var r=e.getModel("splitLine").getModel("lineStyle"),o=r.get("color"),s=0;o=o instanceof Array?o:[o];for(var l=[],u=0;u<a.length;u++){var c=s++%o.length;l[c]=l[c]||[],l[c].push(new lu.Circle({shape:{cx:t.cx,cy:t.cy,r:a[u].coord}}))}for(u=0;u<l.length;u++)this.group.add(lu.mergePath(l[u],{style:Ie.defaults({stroke:o[u%o.length],fill:null},r.getLineStyle()),silent:!0}))},_minorSplitLine:function(e,t,n,i,a,r){if(r.length){for(var o=e.getModel("minorSplitLine").getModel("lineStyle"),s=[],l=0;l<r.length;l++)for(var u=0;u<r[l].length;u++)s.push(new lu.Circle({shape:{cx:t.cx,cy:t.cy,r:r[l][u].coord}}));this.group.add(lu.mergePath(s,{style:Ie.defaults({fill:null},o.getLineStyle()),silent:!0}))}},_splitArea:function(e,t,n,i,a){if(a.length){var r=e.getModel("splitArea").getModel("areaStyle"),o=r.get("color"),s=0;o=o instanceof Array?o:[o];for(var l=[],u=a[0].coord,c=1;c<a.length;c++){var h=s++%o.length;l[h]=l[h]||[],l[h].push(new lu.Sector({shape:{cx:t.cx,cy:t.cy,r0:u,r:a[c].coord,startAngle:0,endAngle:2*Math.PI},silent:!0})),u=a[c].coord}for(c=0;c<l.length;c++)this.group.add(lu.mergePath(l[c],{style:Ie.defaults({fill:o[c%o.length]},r.getAreaStyle()),silent:!0}))}}});var mE=Ck.extend({makeElOption:function(e,t,n,i,a){var r=n.axis;"angle"===r.dim&&(this.animationThreshold=Math.PI/18);var o,s=r.polar,l=s.getOtherAxis(r).getExtent();o=r["dataTo"+Pu.capitalFirst(r.dim)](t);var u=i.get("type");if(u&&"none"!==u){var c=Ek.buildElStyle(i),h=vE[u](r,s,o,l,c);h.style=c,e.graphicKey=h.type,e.pointer=h}var d=function(e,t,n,i,a){var r=t.axis,o=r.dataToCoord(e),s=i.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l,u,c,h=i.getRadiusAxis().getExtent();if("radius"===r.dim){var d=yt.create();yt.rotate(d,d,s),yt.translate(d,d,[i.cx,i.cy]),l=lu.applyTransform([o,-a],d);var f=t.getModel("axisLabel").get("rotate")||0,p=_x.innerTextLayout(s,f*Math.PI/180,-1);u=p.textAlign,c=p.textVerticalAlign}else{var g=h[1];l=i.coordToPoint([g+a,o]);var m=i.cx,v=i.cy;u=Math.abs(l[0]-m)/g<.3?"center":l[0]>m?"left":"right",c=Math.abs(l[1]-v)/g<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:u,verticalAlign:c}}(t,n,0,s,i.get("label.margin"));Ek.buildLabelElOption(e,n,i,a,d)}});var vE={line:function(e,t,n,i,a){return"angle"===e.dim?{type:"Line",shape:Ek.makeLineShape(t.coordToPoint([i[0],n]),t.coordToPoint([i[1],n]))}:{type:"Circle",shape:{cx:t.cx,cy:t.cy,r:n}}},shadow:function(e,t,n,i,a){var r=Math.max(1,e.getBandWidth()),o=Math.PI/180;return"angle"===e.dim?{type:"Sector",shape:Ek.makeSectorShape(t.cx,t.cy,i[0],i[1],(-n-r/2)*o,(r/2-n)*o)}:{type:"Sector",shape:Ek.makeSectorShape(t.cx,t.cy,n-r/2,n+r/2,0,2*Math.PI)}}};Lx.registerAxisPointerClass("PolarAxisPointer",mE),ry.registerLayout(Ie.curry(UL,"bar")),ry.extendComponentView({type:"polar"});var yE=$u.extend({type:"geo",coordinateSystem:null,layoutMode:"box",init:function(e){$u.prototype.init.apply(this,arguments),Sr.defaultEmphasis(e,"label",["show"])},optionUpdated:function(){var e=this.option,t=this;e.regions=bS.getFilledRegions(e.regions,e.map,e.nameMap),this._optionModelMap=Ie.reduce(e.regions||[],(function(e,n){return n.name&&e.set(n.name,new bu(n,t)),e}),Ie.createHashMap()),this.updateSelectedMap(e.regions)},defaultOption:{zlevel:0,z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",color:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},getRegionModel:function(e){return this._optionModelMap.get(e)||new bu(null,this,this.ecModel)},getFormattedLabel:function(e,t){var n=this.getRegionModel(e).get("label"+("normal"===t?".":t+".")+"formatter"),i={name:e};return"function"==typeof n?(i.status=t,n(i)):"string"==typeof n?n.replace("{a}",null!=e?e:""):void 0},setZoom:function(e){this.option.zoom=e},setCenter:function(e){this.option.center=e}});Ie.mixin(yE,mb);ry.extendComponentView({type:"geo",init:function(e,t){var n=new rS(t,!0);this._mapDraw=n,this.group.add(n.group)},render:function(e,t,n,i){if(!i||"geoToggleSelect"!==i.type||i.from!==this.uid){var a=this._mapDraw;e.get("show")?a.draw(e,t,n,this,i):this._mapDraw.group.removeAll(),this.group.silent=e.get("silent")}},dispose:function(){this._mapDraw&&this._mapDraw.remove()}});function _E(e,t){t.update="updateView",ry.registerAction(t,(function(t,n){var i={};return n.eachComponent({mainType:"geo",query:t},(function(n){n[e](t.name);var a=n.coordinateSystem;Ie.each(a.regions,(function(e){i[e.name]=n.isSelected(e.name)||!1}))})),{selected:i,name:t.name}}))}_E("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),_E("select",{type:"geoSelect",event:"geoselected"}),_E("unSelect",{type:"geoUnSelect",event:"geounselected"});function xE(e,t,n){this._model=e}function bE(e,t,n,i){var a=n.calendarModel,r=n.seriesModel,o=a?a.coordinateSystem:r?r.coordinateSystem:null;return o===this?o[e](i):null}xE.prototype={constructor:xE,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(e){var t=(e=Au.parseDate(e)).getFullYear(),n=e.getMonth()+1;n=n<10?"0"+n:n;var i=e.getDate();i=i<10?"0"+i:i;var a=e.getDay();return{y:t,m:n,d:i,day:a=Math.abs((a+7-this.getFirstDayOfWeek())%7),time:e.getTime(),formatedDate:t+"-"+n+"-"+i,date:e}},getNextNDay:function(e,t){return 0===(t=t||0)||(e=new Date(this.getDateInfo(e).time)).setDate(e.getDate()+t),this.getDateInfo(e)},update:function(e,t){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"],a=this._model.get("cellSize").slice(),r=this._model.getBoxLayoutParams(),o="horizontal"===this._orient?[n,7]:[7,n];Ie.each([0,1],(function(e){u(a,e)&&(r[i[e]]=a[e]*o[e])}));var s={width:t.getWidth(),height:t.getHeight()},l=this._rect=Uu.getLayoutRect(r,s);function u(e,t){return null!=e[t]&&"auto"!==e[t]}Ie.each([0,1],(function(e){u(a,e)||(a[e]=l[i[e]]/o[e])})),this._sw=a[0],this._sh=a[1]},dataToPoint:function(e,t){Ie.isArray(e)&&(e=e[0]),null==t&&(t=!0);var n=this.getDateInfo(e),i=this._rangeInfo,a=n.formatedDate;if(t&&!(n.time>=i.start.time&&n.time<i.end.time+864e5))return[NaN,NaN];var r=n.day,o=this._getRangeInfo([i.start.time,a]).nthWeek;return"vertical"===this._orient?[this._rect.x+r*this._sw+this._sw/2,this._rect.y+o*this._sh+this._sh/2]:[this._rect.x+o*this._sw+this._sw/2,this._rect.y+r*this._sh+this._sh/2]},pointToData:function(e){var t=this.pointToDate(e);return t&&t.time},dataToRect:function(e,t){var n=this.dataToPoint(e,t);return{contentShape:{x:n[0]-(this._sw-this._lineWidth)/2,y:n[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:n,tl:[n[0]-this._sw/2,n[1]-this._sh/2],tr:[n[0]+this._sw/2,n[1]-this._sh/2],br:[n[0]+this._sw/2,n[1]+this._sh/2],bl:[n[0]-this._sw/2,n[1]+this._sh/2]}},pointToDate:function(e){var t=Math.floor((e[0]-this._rect.x)/this._sw)+1,n=Math.floor((e[1]-this._rect.y)/this._sh)+1,i=this._rangeInfo.range;return"vertical"===this._orient?this._getDateByWeeksAndDay(n,t-1,i):this._getDateByWeeksAndDay(t,n-1,i)},convertToPixel:Ie.curry(bE,"dataToPoint"),convertFromPixel:Ie.curry(bE,"pointToData"),_initRangeOption:function(){var e=this._model.get("range"),t=e;if(Ie.isArray(t)&&1===t.length&&(t=t[0]),/^\d{4}$/.test(t)&&(e=[t+"-01-01",t+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(t)){var n=this.getDateInfo(t),i=n.date;i.setMonth(i.getMonth()+1);var a=this.getNextNDay(i,-1);e=[n.formatedDate,a.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(t)&&(e=[t,t]);var r=this._getRangeInfo(e);return r.start.time>r.end.time&&e.reverse(),e},_getRangeInfo:function(e){var t;(e=[this.getDateInfo(e[0]),this.getDateInfo(e[1])])[0].time>e[1].time&&(t=!0,e.reverse());var n=Math.floor(e[1].time/864e5)-Math.floor(e[0].time/864e5)+1,i=new Date(e[0].time),a=i.getDate(),r=e[1].date.getDate();i.setDate(a+n-1);var o=i.getDate();if(o!==r)for(var s=i.getTime()-e[1].time>0?1:-1;(o=i.getDate())!==r&&(i.getTime()-e[1].time)*s>0;)n-=s,i.setDate(o-s);var l=Math.floor((n+e[0].day+6)/7),u=t?1-l:l-1;return t&&e.reverse(),{range:[e[0].formatedDate,e[1].formatedDate],start:e[0],end:e[1],allDay:n,weeks:l,nthWeek:u,fweek:e[0].day,lweek:e[1].day}},_getDateByWeeksAndDay:function(e,t,n){var i=this._getRangeInfo(n);if(e>i.weeks||0===e&&t<i.fweek||e===i.weeks&&t>i.lweek)return!1;var a=7*(e-1)-i.fweek+t,r=new Date(i.start.time);return r.setDate(i.start.d+a),this.getDateInfo(r)}},xE.dimensions=xE.prototype.dimensions,xE.getDimensionsInfo=xE.prototype.getDimensionsInfo,xE.create=function(e,t){var n=[];return e.eachComponent("calendar",(function(i){var a=new xE(i,e,t);n.push(a),i.coordinateSystem=a})),e.eachSeries((function(e){"calendar"===e.get("coordinateSystem")&&(e.coordinateSystem=n[e.get("calendarIndex")||0])})),n},ch.register("calendar",xE);var wE=Uu.getLayoutParams,SE=Uu.sizeCalculable,ME=Uu.mergeLayoutParam,TE=$u.extend({type:"calendar",coordinateSystem:null,defaultOption:{zlevel:0,z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",nameMap:"en",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",nameMap:"en",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},init:function(e,t,n,i){var a=wE(e);TE.superApply(this,"init",arguments),IE(e,a)},mergeOption:function(e,t){TE.superApply(this,"mergeOption",arguments),IE(this.option,e)}});function IE(e,t){var n=e.cellSize;Ie.isArray(n)?1===n.length&&(n[1]=n[0]):n=e.cellSize=[n,n];var i=Ie.map([0,1],(function(e){return SE(t,e)&&(n[e]="auto"),null!=n[e]&&"auto"!==n[e]}));ME(e,t,{type:"box",ignoreSize:i})}var AE={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},DE={EN:["S","M","T","W","T","F","S"],CN:["日","一","二","三","四","五","六"]},CE=(ry.extendComponentView({type:"calendar",_tlpoints:null,_blpoints:null,_firstDayOfMonth:null,_firstDayPoints:null,render:function(e,t,n){var i=this.group;i.removeAll();var a=e.coordinateSystem,r=a.getRangeInfo(),o=a.getOrient();this._renderDayRect(e,r,i),this._renderLines(e,r,o,i),this._renderYearText(e,r,o,i),this._renderMonthText(e,o,i),this._renderWeekText(e,r,o,i)},_renderDayRect:function(e,t,n){for(var i=e.coordinateSystem,a=e.getModel("itemStyle").getItemStyle(),r=i.getCellWidth(),o=i.getCellHeight(),s=t.start.time;s<=t.end.time;s=i.getNextNDay(s,1).time){var l=i.dataToRect([s],!1).tl,u=new lu.Rect({shape:{x:l[0],y:l[1],width:r,height:o},cursor:"default",style:a});n.add(u)}},_renderLines:function(e,t,n,i){var a=this,r=e.coordinateSystem,o=e.getModel("splitLine.lineStyle").getLineStyle(),s=e.get("splitLine.show"),l=o.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=t.start,c=0;u.time<=t.end.time;c++){d(u.formatedDate),0===c&&(u=r.getDateInfo(t.start.y+"-"+t.start.m));var h=u.date;h.setMonth(h.getMonth()+1),u=r.getDateInfo(h)}function d(t){a._firstDayOfMonth.push(r.getDateInfo(t)),a._firstDayPoints.push(r.dataToRect([t],!1).tl);var l=a._getLinePointsOfOneWeek(e,t,n);a._tlpoints.push(l[0]),a._blpoints.push(l[l.length-1]),s&&a._drawSplitline(l,o,i)}d(r.getNextNDay(t.end.time,1).formatedDate),s&&this._drawSplitline(a._getEdgesPoints(a._tlpoints,l,n),o,i),s&&this._drawSplitline(a._getEdgesPoints(a._blpoints,l,n),o,i)},_getEdgesPoints:function(e,t,n){var i=[e[0].slice(),e[e.length-1].slice()],a="horizontal"===n?0:1;return i[0][a]=i[0][a]-t/2,i[1][a]=i[1][a]+t/2,i},_drawSplitline:function(e,t,n){var i=new lu.Polyline({z2:20,shape:{points:e},style:t});n.add(i)},_getLinePointsOfOneWeek:function(e,t,n){var i=e.coordinateSystem;t=i.getDateInfo(t);for(var a=[],r=0;r<7;r++){var o=i.getNextNDay(t.time,r),s=i.dataToRect([o.time],!1);a[2*o.day]=s.tl,a[2*o.day+1]=s["horizontal"===n?"bl":"tr"]}return a},_formatterLabel:function(e,t){return"string"==typeof e&&e?Pu.formatTplSimple(e,t):"function"==typeof e?e(t):t.nameMap},_yearTextPositionControl:function(e,t,n,i,a){t=t.slice();var r=["center","bottom"];"bottom"===i?(t[1]+=a,r=["center","top"]):"left"===i?t[0]-=a:"right"===i?(t[0]+=a,r=["center","top"]):t[1]-=a;var o=0;return"left"!==i&&"right"!==i||(o=Math.PI/2),{rotation:o,position:t,style:{textAlign:r[0],textVerticalAlign:r[1]}}},_renderYearText:function(e,t,n,i){var a=e.getModel("yearLabel");if(a.get("show")){var r=a.get("margin"),o=a.get("position");o||(o="horizontal"!==n?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,c="horizontal"===n?0:1,h={top:[l,s[c][1]],bottom:[l,s[1-c][1]],left:[s[1-c][0],u],right:[s[c][0],u]},d=t.start.y;+t.end.y>+t.start.y&&(d=d+"-"+t.end.y);var f=a.get("formatter"),p={start:t.start.y,end:t.end.y,nameMap:d},g=this._formatterLabel(f,p),m=new lu.Text({z2:30});lu.setTextStyle(m.style,a,{text:g}),m.attr(this._yearTextPositionControl(m,h[o],n,o,r)),i.add(m)}},_monthTextPositionControl:function(e,t,n,i,a){var r="left",o="top",s=e[0],l=e[1];return"horizontal"===n?(l+=a,t&&(r="center"),"start"===i&&(o="bottom")):(s+=a,t&&(o="middle"),"start"===i&&(r="right")),{x:s,y:l,textAlign:r,textVerticalAlign:o}},_renderMonthText:function(e,t,n){var i=e.getModel("monthLabel");if(i.get("show")){var a=i.get("nameMap"),r=i.get("margin"),o=i.get("position"),s=i.get("align"),l=[this._tlpoints,this._blpoints];Ie.isString(a)&&(a=AE[a.toUpperCase()]||[]);var u="start"===o?0:1,c="horizontal"===t?0:1;r="start"===o?-r:r;for(var h="center"===s,d=0;d<l[u].length-1;d++){var f=l[u][d].slice(),p=this._firstDayOfMonth[d];if(h){var g=this._firstDayPoints[d];f[c]=(g[c]+l[0][d+1][c])/2}var m=i.get("formatter"),v=a[+p.m-1],y={yyyy:p.y,yy:(p.y+"").slice(2),MM:p.m,M:+p.m,nameMap:v},_=this._formatterLabel(m,y),x=new lu.Text({z2:30});Ie.extend(lu.setTextStyle(x.style,i,{text:_}),this._monthTextPositionControl(f,h,t,o,r)),n.add(x)}}},_weekTextPositionControl:function(e,t,n,i,a){var r="center",o="middle",s=e[0],l=e[1],u="start"===n;return"horizontal"===t?(s=s+i+(u?1:-1)*a[0]/2,r=u?"right":"left"):(l=l+i+(u?1:-1)*a[1]/2,o=u?"bottom":"top"),{x:s,y:l,textAlign:r,textVerticalAlign:o}},_renderWeekText:function(e,t,n,i){var a=e.getModel("dayLabel");if(a.get("show")){var r=e.coordinateSystem,o=a.get("position"),s=a.get("nameMap"),l=a.get("margin"),u=r.getFirstDayOfWeek();Ie.isString(s)&&(s=DE[s.toUpperCase()]||[]);var c=r.getNextNDay(t.end.time,7-t.lweek).time,h=[r.getCellWidth(),r.getCellHeight()];l=Au.parsePercent(l,h["horizontal"===n?0:1]),"start"===o&&(c=r.getNextNDay(t.start.time,-(7+t.fweek)).time,l=-l);for(var d=0;d<7;d++){var f,p=r.getNextNDay(c,d),g=r.dataToRect([p.time],!1).center;f=Math.abs((d+u)%7);var m=new lu.Text({z2:30});Ie.extend(lu.setTextStyle(m.style,a,{text:s[f]}),this._weekTextPositionControl(g,n,o,l,h)),i.add(m)}}}}),Au.parsePercent),OE={path:null,compoundPath:null,group:lu.Group,image:lu.Image,text:lu.Text};ry.registerPreprocessor((function(e){var t=e.graphic;Ie.isArray(t)?t[0]&&t[0].elements?e.graphic=[e.graphic[0]]:e.graphic=[{elements:t}]:t&&!t.elements&&(e.graphic=[{elements:[t]}])}));var kE=ry.extendComponentModel({type:"graphic",defaultOption:{elements:[],parentId:null},_elOptionsToUpdate:null,mergeOption:function(e){var t=this.option.elements;this.option.elements=null,kE.superApply(this,"mergeOption",arguments),this.option.elements=t},optionUpdated:function(e,t){var n=this.option,i=(t?n:e).elements,a=n.elements=t?[]:n.elements,r=[];this._flatten(i,r);var o=Sr.mappingToExists(a,r);Sr.makeIdAndName(o);var s=this._elOptionsToUpdate=[];Ie.each(o,(function(e,t){var n=e.option;n&&(s.push(n),function(e,t){var n=e.exist;if(t.id=e.keyInfo.id,!t.type&&n&&(t.type=n.type),null==t.parentId){var i=t.parentOption;i?t.parentId=i.id:n&&(t.parentId=n.parentId)}t.parentOption=null}(e,n),function(e,t,n){var i=Ie.extend({},n),a=e[t],r=n.$action||"merge";"merge"===r?a?(Ie.merge(a,i,!0),Uu.mergeLayoutParam(a,i,{ignoreSize:!0}),Uu.copyLayoutParams(n,a)):e[t]=i:"replace"===r?e[t]=i:"remove"===r&&a&&(e[t]=null)}(a,t,n),function(e,t){if(!e)return;e.hv=t.hv=[NE(t,["left","right"]),NE(t,["top","bottom"])],"group"===e.type&&(null==e.width&&(e.width=t.width=0),null==e.height&&(e.height=t.height=0))}(a[t],n))}),this);for(var l=a.length-1;l>=0;l--)null==a[l]?a.splice(l,1):delete a[l].$action},_flatten:function(e,t,n){Ie.each(e,(function(e){if(e){n&&(e.parentOption=n),t.push(e);var i=e.children;"group"===e.type&&i&&this._flatten(i,t,e),delete e.children}}),this)},useElOptionsToUpdate:function(){var e=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,e}});function LE(e,t,n,i){var a=n.type,r=new(OE.hasOwnProperty(a)?OE[a]:lu.getShapeClass(a))(n);t.add(r),i.set(e,r),r.__ecGraphicId=e}function EE(e,t){var n=e&&e.parent;n&&("group"===e.type&&e.traverse((function(e){EE(e,t)})),t.removeKey(e.__ecGraphicId),n.remove(e))}function NE(e,t){var n;return Ie.each(t,(function(t){null!=e[t]&&"auto"!==e[t]&&(n=!0)})),n}ry.extendComponentView({type:"graphic",init:function(e,t){this._elMap=Ie.createHashMap(),this._lastGraphicModel},render:function(e,t,n){e!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=e,this._updateElements(e),this._relocate(e,n)},_updateElements:function(e){var t=e.useElOptionsToUpdate();if(t){var n=this._elMap,i=this.group;Ie.each(t,(function(t){var a=t.$action,r=t.id,o=n.get(r),s=t.parentId,l=null!=s?n.get(s):i,u=t.style;"text"===t.type&&u&&(t.hv&&t.hv[1]&&(u.textVerticalAlign=u.textBaseline=null),!u.hasOwnProperty("textFill")&&u.fill&&(u.textFill=u.fill),!u.hasOwnProperty("textStroke")&&u.stroke&&(u.textStroke=u.stroke));var c=function(e){return e=Ie.extend({},e),Ie.each(["id","parentId","$action","hv","bounding"].concat(Uu.LOCATION_PARAMS),(function(t){delete e[t]})),e}(t);a&&"merge"!==a?"replace"===a?(EE(o,n),LE(r,l,c,n)):"remove"===a&&EE(o,n):o?o.attr(c):LE(r,l,c,n);var h=n.get(r);h&&(h.__ecGraphicWidthOption=t.width,h.__ecGraphicHeightOption=t.height,function(e,t,n){var i=e.eventData;e.silent||e.ignore||i||(i=e.eventData={componentType:"graphic",componentIndex:t.componentIndex,name:e.name});i&&(i.info=e.info)}(h,e))}))}},_relocate:function(e,t){for(var n=e.option.elements,i=this.group,a=this._elMap,r=t.getWidth(),o=t.getHeight(),s=0;s<n.length;s++){var l=n[s];if((c=a.get(l.id))&&c.isGroup){var u=(h=c.parent)===i;c.__ecGraphicWidth=CE(c.__ecGraphicWidthOption,u?r:h.__ecGraphicWidth)||0,c.__ecGraphicHeight=CE(c.__ecGraphicHeightOption,u?o:h.__ecGraphicHeight)||0}}for(s=n.length-1;s>=0;s--){var c;l=n[s];if(c=a.get(l.id)){var h,d=(h=c.parent)===i?{width:r,height:o}:{width:h.__ecGraphicWidth,height:h.__ecGraphicHeight};Uu.positionElement(c,l,d,null,{hv:l.hv,boundingMode:l.bounding})}}},_clear:function(){var e=this._elMap;e.each((function(t){EE(t,e)})),this._elMap=Ie.createHashMap()},dispose:function(){this._clear()}});var PE={};var RE={register:function(e,t){PE[e]=t},get:function(e){return PE[e]}},zE=ry.extendComponentModel({type:"toolbox",layoutMode:{type:"box",ignoreSize:!0},optionUpdated:function(){zE.superApply(this,"optionUpdated",arguments),Ie.each(this.option.feature,(function(e,t){var n=RE.get(t);n&&Ie.merge(e,n.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"}},tooltip:{show:!1}}}),BE=Uu.getLayoutRect,VE=Uu.box,HE=Uu.positionElement;var YE={layout:function(e,t,n){var i=t.getBoxLayoutParams(),a=t.get("padding"),r={width:n.getWidth(),height:n.getHeight()},o=BE(i,r,a);VE(t.get("orient"),e,t.get("itemGap"),o.width,o.height),HE(e,i,r,a)},makeBackground:function(e,t){var n=Pu.normalizeCssArray(t.get("padding")),i=t.getItemStyle(["color","opacity"]);return i.fill=t.get("backgroundColor"),e=new lu.Rect({shape:{x:e.x-n[3],y:e.y-n[0],width:e.width+n[1]+n[3],height:e.height+n[0]+n[2],r:t.get("borderRadius")},style:i,silent:!0,z2:-1})}};ry.extendComponentView({type:"toolbox",render:function(e,t,n,i){var a=this.group;if(a.removeAll(),e.get("show")){var r=+e.get("itemSize"),o=e.get("feature")||{},s=this._features||(this._features={}),l=[];Ie.each(o,(function(e,t){l.push(t)})),new Lp(this._featureNames||[],l).add(u).update(u).remove(Ie.curry(u,null)).execute(),this._featureNames=l,YE.layout(a,e,n),a.add(YE.makeBackground(a.getBoundingRect(),e)),a.eachChild((function(e){var t=e.__title,i=e.hoverStyle;if(i&&t){var o=Wi.getBoundingRect(t,Wi.makeFont(i)),s=e.position[0]+a.position[0],l=!1;e.position[1]+a.position[1]+r+o.height>n.getHeight()&&(i.textPosition="top",l=!0);var u=l?-5-o.height:r+8;s+o.width/2>n.getWidth()?(i.textPosition=["100%",u],i.textAlign="right"):s-o.width/2<0&&(i.textPosition=[0,u],i.textAlign="left")}}))}function u(u,c){var h,d=l[u],f=l[c],p=o[d],g=new bu(p,e,e.ecModel);if(i&&null!=i.newTitle&&i.featureName===d&&(p.title=i.newTitle),d&&!f){if(function(e){return 0===e.indexOf("my")}(d))h={model:g,onclick:g.option.onclick,featureName:d};else{var m=RE.get(d);if(!m)return;h=new m(g,t,n)}s[d]=h}else{if(!(h=s[f]))return;h.model=g,h.ecModel=t,h.api=n}d||!f?g.get("show")&&!h.unusable?(!function(i,o,s){var l=i.getModel("iconStyle"),u=i.getModel("emphasis.iconStyle"),c=o.getIcons?o.getIcons():i.get("icon"),h=i.get("title")||{};if("string"==typeof c){var d=c,f=h;h={},(c={})[s]=d,h[s]=f}var p=i.iconPaths={};Ie.each(c,(function(s,c){var d=lu.createIcon(s,{},{x:-r/2,y:-r/2,width:r,height:r});d.setStyle(l.getItemStyle()),d.hoverStyle=u.getItemStyle(),d.setStyle({text:h[c],textAlign:u.get("textAlign"),textBorderRadius:u.get("textBorderRadius"),textPadding:u.get("textPadding"),textFill:null});var f=e.getModel("tooltip");f&&f.get("show")&&d.attr("tooltip",Ie.extend({content:h[c],formatter:f.get("formatter",!0)||function(){return h[c]},formatterParams:{componentType:"toolbox",name:c,title:h[c],$vars:["name","title"]},position:f.get("position",!0)||"bottom"},f.option)),lu.setHoverStyle(d),e.get("showTitle")&&(d.__title=h[c],d.on("mouseover",(function(){var t=u.getItemStyle(),n="vertical"===e.get("orient")?null==e.get("right")?"right":"left":null==e.get("bottom")?"bottom":"top";d.setStyle({textFill:u.get("textFill")||t.fill||t.stroke||"#000",textBackgroundColor:u.get("textBackgroundColor"),textPosition:u.get("textPosition")||n})})).on("mouseout",(function(){d.setStyle({textFill:null,textBackgroundColor:null})}))),d.trigger(i.get("iconStatus."+c)||"normal"),a.add(d),d.on("click",Ie.bind(o.onclick,o,t,n,c)),p[c]=d}))}(g,h,d),g.setIconStatus=function(e,t){var n=this.option,i=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[e]=t,i[e]&&i[e].trigger(t)},h.render&&h.render(g,t,n,i)):h.remove&&h.remove(t,n):h.dispose&&h.dispose(t,n)}},updateView:function(e,t,n,i){Ie.each(this._features,(function(e){e.updateView&&e.updateView(e.model,t,n,i)}))},remove:function(e,t){Ie.each(this._features,(function(n){n.remove&&n.remove(e,t)})),this.group.removeAll()},dispose:function(e,t){Ie.each(this._features,(function(n){n.dispose&&n.dispose(e,t)}))}});var FE=df.toolbox.saveAsImage;function GE(e){this.model=e}GE.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:FE.title,type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:FE.lang.slice()},GE.prototype.unusable=!ne.canvasSupported,GE.prototype.onclick=function(e,t){var n=this.model,i=n.get("name")||e.get("title.0.text")||"echarts",a="svg"===t.getZr().painter.getType()?"svg":n.get("type",!0)||"png",r=t.getConnectedDataURL({type:a,backgroundColor:n.get("backgroundColor",!0)||e.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")});if("function"!=typeof MouseEvent||ne.browser.ie||ne.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var o=atob(r.split(",")[1]),s=o.length,l=new Uint8Array(s);s--;)l[s]=o.charCodeAt(s);var u=new Blob([l]);window.navigator.msSaveOrOpenBlob(u,i+"."+a)}else{var c=n.get("lang"),h='<body style="margin:0;"><img src="'+r+'" style="max-width:100%;" title="'+(c&&c[0]||"")+'" /></body>';window.open().document.write(h)}else{var d=document.createElement("a");d.download=i+"."+a,d.target="_blank",d.href=r;var f=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});d.dispatchEvent(f)}},RE.register("saveAsImage",GE);var WE=df.toolbox.magicType;function jE(e){this.model=e}jE.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"},title:Ie.clone(WE.title),option:{},seriesIndex:{}};var UE=jE.prototype;UE.getIcons=function(){var e=this.model,t=e.get("icon"),n={};return Ie.each(e.get("type"),(function(e){t[e]&&(n[e]=t[e])})),n};var ZE={line:function(e,t,n,i){if("bar"===e)return Ie.merge({id:t,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(e,t,n,i){if("line"===e)return Ie.merge({id:t,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(e,t,n,i){var a="__ec_magicType_stack__"===n.get("stack");if("line"===e||"bar"===e)return i.setIconStatus("stack",a?"normal":"emphasis"),Ie.merge({id:t,stack:a?"":"__ec_magicType_stack__"},i.get("option.stack")||{},!0)}},XE=[["line","bar"],["stack"]];UE.onclick=function(e,t,n){var i=this.model,a=i.get("seriesIndex."+n);if(ZE[n]){var r,o={series:[]};if(Ie.each(XE,(function(e){Ie.indexOf(e,n)>=0&&Ie.each(e,(function(e){i.setIconStatus(e,"normal")}))})),i.setIconStatus(n,"emphasis"),e.eachComponent({mainType:"series",query:null==a?null:{seriesIndex:a}},(function(t){var a=t.subType,r=t.id,s=ZE[n](a,r,t,i);s&&(Ie.defaults(s,t.option),o.series.push(s));var l=t.coordinateSystem;if(l&&"cartesian2d"===l.type&&("line"===n||"bar"===n)){var u=l.getAxesByScale("ordinal")[0];if(u){var c=u.dim+"Axis",h=e.queryComponents({mainType:c,index:t.get(name+"Index"),id:t.get(name+"Id")})[0].componentIndex;o[c]=o[c]||[];for(var d=0;d<=h;d++)o[c][h]=o[c][h]||{};o[c][h].boundaryGap="bar"===n}}})),"stack"===n)r=o.series&&o.series[0]&&"__ec_magicType_stack__"===o.series[0].stack?Ie.merge({stack:WE.title.tiled},WE.title):Ie.clone(WE.title);t.dispatchAction({type:"changeMagicType",currentType:n,newOption:o,newTitle:r,featureName:"magicType"})}},ry.registerAction({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},(function(e,t){t.mergeOption(e.newOption)})),RE.register("magicType",jE);var qE=df.toolbox.dataView,KE=new Array(60).join("-");function QE(e){return Ie.map(e,(function(e){var t=e.getRawData(),n=[e.name],i=[];return t.each(t.dimensions,(function(){for(var e=arguments.length,a=arguments[e-1],r=t.getName(a),o=0;o<e-1;o++)i[o]=arguments[o];n.push((r?r+"\t":"")+i.join("\t"))})),n.join("\n")})).join("\n\n"+KE+"\n\n")}function $E(e){return e.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var JE=new RegExp("[\t]+","g");function eN(e,t){var n=e.split(new RegExp("\n*"+KE+"\n*","g")),i={series:[]};return Ie.each(n,(function(e,n){if(function(e){if(e.slice(0,e.indexOf("\n")).indexOf("\t")>=0)return!0}(e)){var a=function(e){for(var t=e.split(/\n+/g),n=$E(t.shift()).split(JE),i=[],a=Ie.map(n,(function(e){return{name:e,data:[]}})),r=0;r<t.length;r++){var o=$E(t[r]).split(JE);i.push(o.shift());for(var s=0;s<o.length;s++)a[s]&&(a[s].data[r]=o[s])}return{series:a,categories:i}}(e),r=t[n],o=r.axisDim+"Axis";r&&(i[o]=i[o]||[],i[o][r.axisIndex]={data:a.categories},i.series=i.series.concat(a.series))}else{a=function(e){for(var t=e.split(/\n+/g),n=$E(t.shift()),i=[],a=0;a<t.length;a++){var r,o=$E(t[a]).split(JE),s="",l=!1;isNaN(o[0])?(l=!0,s=o[0],o=o.slice(1),i[a]={name:s,value:[]},r=i[a].value):r=i[a]=[];for(var u=0;u<o.length;u++)r.push(+o[u]);1===r.length&&(l?i[a].value=r[0]:i[a]=r[0])}return{name:n,data:i}}(e);i.series.push(a)}})),i}function tN(e){this._dom=null,this.model=e}function nN(e,t){return Ie.map(e,(function(e,n){var i=t&&t[n];return Ie.isObject(i)&&!Ie.isArray(i)?(Ie.isObject(e)&&!Ie.isArray(e)&&(e=e.value),Ie.defaults({value:e},i)):e}))}tN.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:Ie.clone(qE.title),lang:Ie.clone(qE.lang),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"},tN.prototype.onclick=function(e,t){var n=t.getDom(),i=this.model;this._dom&&n.removeChild(this._dom);var a=document.createElement("div");a.style.cssText="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",a.style.backgroundColor=i.get("backgroundColor")||"#fff";var r=document.createElement("h4"),o=i.get("lang")||[];r.innerHTML=o[0]||i.get("title"),r.style.cssText="margin: 10px 20px;",r.style.color=i.get("textColor");var s=document.createElement("div"),l=document.createElement("textarea");s.style.cssText="display:block;width:100%;overflow:auto;";var u=i.get("optionToContent"),c=i.get("contentToOption"),h=function(e){var t,n,i=function(e){var t={},n=[],i=[];return e.eachRawSeries((function(e){var a=e.coordinateSystem;if(!a||"cartesian2d"!==a.type&&"polar"!==a.type)n.push(e);else{var r=a.getBaseAxis();if("category"===r.type){var o=r.dim+"_"+r.index;t[o]||(t[o]={categoryAxis:r,valueAxis:a.getOtherAxis(r),series:[]},i.push({axisDim:r.dim,axisIndex:r.index})),t[o].series.push(e)}else n.push(e)}})),{seriesGroupByCategoryAxis:t,other:n,meta:i}}(e);return{value:Ie.filter([(t=i.seriesGroupByCategoryAxis,n=[],Ie.each(t,(function(e,t){var i=e.categoryAxis,a=e.valueAxis.dim,r=[" "].concat(Ie.map(e.series,(function(e){return e.name}))),o=[i.model.getCategories()];Ie.each(e.series,(function(e){o.push(e.getRawData().mapArray(a,(function(e){return e})))}));for(var s=[r.join("\t")],l=0;l<o[0].length;l++){for(var u=[],c=0;c<o.length;c++)u.push(o[c][l]);s.push(u.join("\t"))}n.push(s.join("\n"))})),n.join("\n\n"+KE+"\n\n")),QE(i.other)],(function(e){return e.replace(/[\n\t\s]/g,"")})).join("\n\n"+KE+"\n\n"),meta:i.meta}}(e);if("function"==typeof u){var d=u(t.getOption());"string"==typeof d?s.innerHTML=d:Ie.isDom(d)&&s.appendChild(d)}else 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=h.value;var f=h.meta,p=document.createElement("div");p.style.cssText="position:absolute;bottom:0;left:0;right:0;";var g="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",m=document.createElement("div"),v=document.createElement("div");g+=";background-color:"+i.get("buttonColor"),g+=";color:"+i.get("buttonTextColor");var y=this;function _(){n.removeChild(a),y._dom=null}nt.addEventListener(m,"click",_),nt.addEventListener(v,"click",(function(){var e;try{e="function"==typeof c?c(s,t.getOption()):eN(l.value,f)}catch(e){throw _(),new Error("Data view format error "+e)}e&&t.dispatchAction({type:"changeDataView",newOption:e}),_()})),m.innerHTML=o[1],v.innerHTML=o[2],v.style.cssText=g,m.style.cssText=g,!i.get("readOnly")&&p.appendChild(v),p.appendChild(m),a.appendChild(r),a.appendChild(s),a.appendChild(p),s.style.height=n.clientHeight-80+"px",n.appendChild(a),this._dom=a},tN.prototype.remove=function(e,t){this._dom&&t.getDom().removeChild(this._dom)},tN.prototype.dispose=function(e,t){this.remove(e,t)},RE.register("dataView",tN),ry.registerAction({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},(function(e,t){var n=[];Ie.each(e.newOption.series,(function(e){var i=t.getSeriesByName(e.name)[0];if(i){var a=i.get("data");n.push({name:e.name,data:nN(e.data,a)})}else n.push(Ie.extend({type:"scatter"},e))})),t.mergeOption(Ie.defaults({series:n},e.newOption))}));var iN=Ie.each,aN=Ie.indexOf,rN=Ie.curry,oN=["dataToPoint","pointToData"],sN=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"];function lN(e,t,n){var i=this._targetInfoList=[],a={},r=hN(t,e);iN(dN,(function(e,t){(!n||!n.include||aN(n.include,t)>=0)&&e(r,i,a)}))}var uN=lN.prototype;function cN(e){return e[0]>e[1]&&e.reverse(),e}function hN(e,t){return Sr.parseFinder(e,t,{includeMainTypes:sN})}uN.setOutputRanges=function(e,t){this.matchOutputRanges(e,t,(function(e,t,n){if((e.coordRanges||(e.coordRanges=[])).push(t),!e.coordRange){e.coordRange=t;var i=gN[e.brushType](0,n,t);e.__rangeOffset={offset:vN[e.brushType](i.values,e.range,[1,1]),xyMinMax:i.xyMinMax}}}))},uN.matchOutputRanges=function(e,t,n){iN(e,(function(e){var i=this.findTargetInfo(e,t);i&&!0!==i&&Ie.each(i.coordSyses,(function(i){var a=gN[e.brushType](1,i,e.range);n(e,a.values,i,t)}))}),this)},uN.setInputRanges=function(e,t){iN(e,(function(e){var n,i,a,r,o,s=this.findTargetInfo(e,t);if(e.range=e.range||[],s&&!0!==s){e.panelId=s.panelId;var l=gN[e.brushType](0,s.coordSys,e.coordRange),u=e.__rangeOffset;e.range=u?vN[e.brushType](l.values,u.offset,(n=l.xyMinMax,i=u.xyMinMax,a=_N(n),r=_N(i),o=[a[0]/r[0],a[1]/r[1]],isNaN(o[0])&&(o[0]=1),isNaN(o[1])&&(o[1]=1),o)):l.values}}),this)},uN.makePanelOpts=function(e,t){return Ie.map(this._targetInfoList,(function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:t&&t(n),clipPath:hD.makeRectPanelClipPath(i),isTargetByCursor:hD.makeRectIsTargetByCursor(i,e,n.coordSysModel),getLinearBrushOtherExtent:hD.makeLinearBrushOtherExtent(i)}}))},uN.controlSeries=function(e,t,n){var i=this.findTargetInfo(e,n);return!0===i||i&&aN(i.coordSyses,t.coordinateSystem)>=0},uN.findTargetInfo=function(e,t){for(var n=this._targetInfoList,i=hN(t,e),a=0;a<n.length;a++){var r=n[a],o=e.panelId;if(o){if(r.panelId===o)return r}else for(a=0;a<fN.length;a++)if(fN[a](i,r))return r}return!0};var dN={grid:function(e,t){var n=e.xAxisModels,i=e.yAxisModels,a=e.gridModels,r=Ie.createHashMap(),o={},s={};(n||i||a)&&(iN(n,(function(e){var t=e.axis.grid.model;r.set(t.id,t),o[t.id]=!0})),iN(i,(function(e){var t=e.axis.grid.model;r.set(t.id,t),s[t.id]=!0})),iN(a,(function(e){r.set(e.id,e),o[e.id]=!0,s[e.id]=!0})),r.each((function(e){var a=e.coordinateSystem,r=[];iN(a.getCartesians(),(function(e,t){(aN(n,e.getAxis("x").model)>=0||aN(i,e.getAxis("y").model)>=0)&&r.push(e)})),t.push({panelId:"grid--"+e.id,gridModel:e,coordSysModel:e,coordSys:r[0],coordSyses:r,getPanelRect:pN.grid,xAxisDeclared:o[e.id],yAxisDeclared:s[e.id]})})))},geo:function(e,t){iN(e.geoModels,(function(e){var n=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:n,coordSyses:[n],getPanelRect:pN.geo})}))}},fN=[function(e,t){var n=e.xAxisModel,i=e.yAxisModel,a=e.gridModel;return!a&&n&&(a=n.axis.grid.model),!a&&i&&(a=i.axis.grid.model),a&&a===t.gridModel},function(e,t){var n=e.geoModel;return n&&n===t.geoModel}],pN={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var e=this.coordSys,t=e.getBoundingRect().clone();return t.applyTransform(lu.getTransform(e)),t}},gN={lineX:rN(mN,0),lineY:rN(mN,1),rect:function(e,t,n){var i=t[oN[e]]([n[0][0],n[1][0]]),a=t[oN[e]]([n[0][1],n[1][1]]),r=[cN([i[0],a[0]]),cN([i[1],a[1]])];return{values:r,xyMinMax:r}},polygon:function(e,t,n){var i=[[1/0,-1/0],[1/0,-1/0]];return{values:Ie.map(n,(function(n){var a=t[oN[e]](n);return i[0][0]=Math.min(i[0][0],a[0]),i[1][0]=Math.min(i[1][0],a[1]),i[0][1]=Math.max(i[0][1],a[0]),i[1][1]=Math.max(i[1][1],a[1]),a})),xyMinMax:i}}};function mN(e,t,n,i){var a=n.getAxis(["x","y"][e]),r=cN(Ie.map([0,1],(function(e){return t?a.coordToData(a.toLocalCoord(i[e])):a.toGlobalCoord(a.dataToCoord(i[e]))}))),o=[];return o[e]=r,o[1-e]=[NaN,NaN],{values:r,xyMinMax:o}}var vN={lineX:rN(yN,0),lineY:rN(yN,1),rect:function(e,t,n){return[[e[0][0]-n[0]*t[0][0],e[0][1]-n[0]*t[0][1]],[e[1][0]-n[1]*t[1][0],e[1][1]-n[1]*t[1][1]]]},polygon:function(e,t,n){return Ie.map(e,(function(e,i){return[e[0]-n[0]*t[i][0],e[1]-n[1]*t[i][1]]}))}};function yN(e,t,n,i){return[t[0]-i[e]*n[0],t[1]-i[e]*n[1]]}function _N(e){return e?[e[0][1]-e[0][0],e[1][1]-e[1][0]]:[NaN,NaN]}var xN=lN,bN=Ie.each,wN="\0_ec_hist_store";function SN(e){var t=e[wN];return t||(t=e[wN]=[{}]),t}var MN={push:function(e,t){var n=SN(e);bN(t,(function(t,i){for(var a=n.length-1;a>=0;a--){if(n[a][i])break}if(a<0){var r=e.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(r){var o=r.getPercentRange();n[0][i]={dataZoomId:i,start:o[0],end:o[1]}}}})),n.push(t)},pop:function(e){var t=SN(e),n=t[t.length-1];t.length>1&&t.pop();var i={};return bN(n,(function(e,n){for(var a=t.length-1;a>=0;a--){if(e=t[a][n]){i[n]=e;break}}})),i},clear:function(e){e[wN]=null},count:function(e){return SN(e).length}};$u.registerSubTypeDefaulter("dataZoom",(function(){return"slider"}));var TN=["cartesian2d","polar","singleAxis"];function IN(e,t){e=e.slice();var n=Ie.map(e,Pu.capitalFirst);t=(t||[]).slice();var i=Ie.map(t,Pu.capitalFirst);return function(a,r){Ie.each(e,(function(e,o){for(var s={name:e,capital:n[o]},l=0;l<t.length;l++)s[t[l]]=e+i[l];a.call(r,s)}))}}var AN=IN(["x","y","z","radius","angle","single"],["axisIndex","axis","index","id"]);var DN={isCoordSupported:function(e){return Ie.indexOf(TN,e)>=0},createNameEach:IN,eachAxisDim:AN,createLinkedNodesFinder:function(e,t,n){return function(a){var r,o={nodes:[],records:{}};if(t((function(e){o.records[e.name]={}})),!a)return o;i(a,o);do{r=!1,e(s)}while(r);function s(e){!function(e,t){return Ie.indexOf(t.nodes,e)>=0}(e,o)&&function(e,i){var a=!1;return t((function(t){Ie.each(n(e,t)||[],(function(e){i.records[t.name][e]&&(a=!0)}))})),a}(e,o)&&(i(e,o),r=!0)}return o};function i(e,i){i.nodes.push(e),t((function(t){Ie.each(n(e,t)||[],(function(e){i.records[t.name][e]=!0}))}))}}},CN=Ie.each,ON=Au.asc,kN=function(e,t,n,i){this._dimName=e,this._axisIndex=t,this._valueWindow,this._percentWindow,this._dataExtent,this._minMaxSpan,this.ecModel=i,this._dataZoomModel=n};function LN(e,t){var n=e.getAxisModel(),i=e._percentWindow,a=e._valueWindow;if(i){var r=Au.getPixelPrecision(a,[0,500]);r=Math.min(r,20);var o=t||0===i[0]&&100===i[1];n.setRange(o?null:+a[0].toFixed(r),o?null:+a[1].toFixed(r))}}kN.prototype={constructor:kN,hostedBy:function(e){return this._dataZoomModel===e},getDataValueWindow:function(){return this._valueWindow.slice()},getDataPercentWindow:function(){return this._percentWindow.slice()},getTargetSeriesModels:function(){var e=[],t=this.ecModel;return t.eachSeries((function(n){if(DN.isCoordSupported(n.get("coordinateSystem"))){var i=this._dimName,a=t.queryComponents({mainType:i+"Axis",index:n.get(i+"AxisIndex"),id:n.get(i+"AxisId")})[0];this._axisIndex===(a&&a.componentIndex)&&e.push(n)}}),this),e},getAxisModel:function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},getOtherAxisModel:function(){var e,t,n,i=this._dimName,a=this.ecModel,r=this.getAxisModel();return"x"===i||"y"===i?(t="gridIndex",e="x"===i?"y":"x"):(t="polarIndex",e="angle"===i?"radius":"angle"),a.eachComponent(e+"Axis",(function(e){(e.get(t)||0)===(r.get(t)||0)&&(n=e)})),n},getMinMaxSpan:function(){return Ie.clone(this._minMaxSpan)},calculateDataWindow:function(e){var t,n=this._dataExtent,i=this.getAxisModel().axis.scale,a=this._dataZoomModel.getRangePropMode(),r=[0,100],o=[],s=[];CN(["start","end"],(function(l,u){var c=e[l],h=e[l+"Value"];"percent"===a[u]?(null==c&&(c=r[u]),h=i.parse(Au.linearMap(c,r,n))):(t=!0,h=null==h?n[u]:i.parse(h),c=Au.linearMap(h,n,r)),s[u]=h,o[u]=c})),ON(s),ON(o);var l=this._minMaxSpan;function u(e,t,n,a,r){var o=r?"Span":"ValueSpan";lA(0,e,n,"all",l["min"+o],l["max"+o]);for(var s=0;s<2;s++)t[s]=Au.linearMap(e[s],n,a,!0),r&&(t[s]=i.parse(t[s]))}return t?u(s,o,n,r,!1):u(o,s,r,n,!0),{valueWindow:s,percentWindow:o}},reset:function(e){if(e===this._dataZoomModel){var t=this.getTargetSeriesModels();this._dataExtent=function(e,t,n){var i=[1/0,-1/0];CN(n,(function(e){var n=e.getData();n&&CN(n.mapDimension(t,!0),(function(e){var t=n.getApproximateExtent(e);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(e,t){var n=e.getAxisModel(),i=n.getMin(!0),a="category"===n.get("type"),r=a&&n.getCategories().length;null!=i&&"dataMin"!==i&&"function"!=typeof i?t[0]=i:a&&(t[0]=r>0?0:NaN);var o=n.getMax(!0);null!=o&&"dataMax"!==o&&"function"!=typeof o?t[1]=o:a&&(t[1]=r>0?r-1:NaN);n.get("scale",!0)||(t[0]>0&&(t[0]=0),t[1]<0&&(t[1]=0))}(e,i),i}(this,this._dimName,t),function(e){var t=e._minMaxSpan={},n=e._dataZoomModel,i=e._dataExtent;CN(["min","max"],(function(a){var r=n.get(a+"Span"),o=n.get(a+"ValueSpan");null!=o&&(o=e.getAxisModel().axis.scale.parse(o)),null!=o?r=Au.linearMap(i[0]+o,i,[0,100],!0):null!=r&&(o=Au.linearMap(r,[0,100],i,!0)-i[0]),t[a+"Span"]=r,t[a+"ValueSpan"]=o}))}(this);var n=this.calculateDataWindow(e.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,LN(this)}},restore:function(e){e===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,LN(this,!0))},filterData:function(e,t){if(e===this._dataZoomModel){var n=this._dimName,i=this.getTargetSeriesModels(),a=e.get("filterMode"),r=this._valueWindow;"none"!==a&&CN(i,(function(e){var t=e.getData(),i=t.mapDimension(n,!0);i.length&&("weakFilter"===a?t.filterSelf((function(e){for(var n,a,o,s=0;s<i.length;s++){var l=t.get(i[s],e),u=!isNaN(l),c=l<r[0],h=l>r[1];if(u&&!c&&!h)return!0;u&&(o=!0),c&&(n=!0),h&&(a=!0)}return o&&n&&a})):CN(i,(function(n){if("empty"===a)e.setData(t=t.map(n,(function(e){return function(e){return e>=r[0]&&e<=r[1]}(e)?e:NaN})));else{var i={};i[n]=r,t.selectRange(i)}})),CN(i,(function(e){t.setApproximateExtent(r,e)})))}))}}};var EN=kN,NN=Ie.each,PN=DN.eachAxisDim;function RN(e){var t={};return NN(["start","end","startValue","endValue","throttle"],(function(n){e.hasOwnProperty(n)&&(t[n]=e[n])})),t}function zN(e,t){var n=e._rangePropMode,i=e.get("rangeMode");NN([["start","startValue"],["end","endValue"]],(function(e,a){var r=null!=t[e[0]],o=null!=t[e[1]];r&&!o?n[a]="percent":!r&&o?n[a]="value":i?n[a]=i[a]:r&&(n[a]="percent")}))}var BN=ry.extendComponentModel({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(e,t,n){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0,this._rangePropMode=["percent","percent"];var i=RN(e);this.settledOption=i,this.mergeDefaultAndTheme(e,n),this.doInit(i)},mergeOption:function(e){var t=RN(e);Ie.merge(this.option,e,!0),Ie.merge(this.settledOption,t,!0),this.doInit(t)},doInit:function(e){var t=this.option;ne.canvasSupported||(t.realtime=!1),this._setDefaultThrottle(e),zN(this,e);var n=this.settledOption;NN([["start","startValue"],["end","endValue"]],(function(e,i){"value"===this._rangePropMode[i]&&(t[e[0]]=n[e[0]]=null)}),this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var e=this._axisProxies;this.eachTargetAxis((function(t,n,i,a){var r=this.dependentModels[t.axis][n],o=r.__dzAxisProxy||(r.__dzAxisProxy=new EN(t.name,n,this,a));e[t.name+"_"+n]=o}),this)},_resetTarget:function(){var e=this.option,t=this._judgeAutoMode();PN((function(t){var n=t.axisIndex;e[n]=Sr.normalizeToArray(e[n])}),this),"axisIndex"===t?this._autoSetAxisIndex():"orient"===t&&this._autoSetOrient()},_judgeAutoMode:function(){var e=this.option,t=!1;PN((function(n){null!=e[n.axisIndex]&&(t=!0)}),this);var n=e.orient;return null==n&&t?"orient":t?void 0:(null==n&&(e.orient="horizontal"),"axisIndex")},_autoSetAxisIndex:function(){var e=!0,t=this.get("orient",!0),n=this.option,i=this.dependentModels;if(e){var a="vertical"===t?"y":"x";i[a+"Axis"].length?(n[a+"AxisIndex"]=[0],e=!1):NN(i.singleAxis,(function(i){e&&i.get("orient",!0)===t&&(n.singleAxisIndex=[i.componentIndex],e=!1)}))}e&&PN((function(t){if(e){var i=[],a=this.dependentModels[t.axis];if(a.length&&!i.length)for(var r=0,o=a.length;r<o;r++)"category"===a[r].get("type")&&i.push(r);n[t.axisIndex]=i,i.length&&(e=!1)}}),this),e&&this.ecModel.eachSeries((function(e){this._isSeriesHasAllAxesTypeOf(e,"value")&&PN((function(t){var i=n[t.axisIndex],a=e.get(t.axisIndex),r=e.get(t.axisId);a=e.ecModel.queryComponents({mainType:t.axis,index:a,id:r})[0].componentIndex,Ie.indexOf(i,a)<0&&i.push(a)}))}),this)},_autoSetOrient:function(){var e;this.eachTargetAxis((function(t){!e&&(e=t.name)}),this),this.option.orient="y"===e?"vertical":"horizontal"},_isSeriesHasAllAxesTypeOf:function(e,t){var n=!0;return PN((function(i){var a=e.get(i.axisIndex),r=this.dependentModels[i.axis][a];r&&r.get("type")===t||(n=!1)}),this),n},_setDefaultThrottle:function(e){if(e.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var t=this.ecModel.option;this.option.throttle=t.animation&&t.animationDurationUpdate>0?100:20}},getFirstTargetAxisModel:function(){var e;return PN((function(t){if(null==e){var n=this.get(t.axisIndex);n.length&&(e=this.dependentModels[t.axis][n[0]])}}),this),e},eachTargetAxis:function(e,t){var n=this.ecModel;PN((function(i){NN(this.get(i.axisIndex),(function(a){e.call(t,i,a,this,n)}),this)}),this)},getAxisProxy:function(e,t){return this._axisProxies[e+"_"+t]},getAxisModel:function(e,t){var n=this.getAxisProxy(e,t);return n&&n.getAxisModel()},setRawRange:function(e){var t=this.option,n=this.settledOption;NN([["start","startValue"],["end","endValue"]],(function(i){null==e[i[0]]&&null==e[i[1]]||(t[i[0]]=n[i[0]]=e[i[0]],t[i[1]]=n[i[1]]=e[i[1]])}),this),zN(this,e)},setCalculatedRange:function(e){var t=this.option;NN(["start","startValue","end","endValue"],(function(n){t[n]=e[n]}))},getPercentRange:function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},getValueRange:function(e,t){if(null!=e||null!=t)return this.getAxisProxy(e,t).getDataValueWindow();var n=this.findRepresentativeAxisProxy();return n?n.getDataValueWindow():void 0},findRepresentativeAxisProxy:function(e){if(e)return e.__dzAxisProxy;var t=this._axisProxies;for(var n in t)if(t.hasOwnProperty(n)&&t[n].hostedBy(this))return t[n];for(var n in t)if(t.hasOwnProperty(n)&&!t[n].hostedBy(this))return t[n]},getRangePropMode:function(){return this._rangePropMode.slice()}}),VN=Wd.extend({type:"dataZoom",render:function(e,t,n,i){this.dataZoomModel=e,this.ecModel=t,this.api=n},getTargetCoordInfo:function(){var e=this.dataZoomModel,t=this.ecModel,n={};return e.eachTargetAxis((function(e,i){var a=t.getComponent(e.axis,i);if(a){var r=a.getCoordSysModel();r&&function(e,t,n,i){for(var a,r=0;r<n.length;r++)if(n[r].model===e){a=n[r];break}a||n.push(a={model:e,axisModels:[],coordIndex:i});a.axisModels.push(t)}(r,a,n[r.mainType]||(n[r.mainType]=[]),r.componentIndex)}}),this),n}}),HN=(BN.extend({type:"dataZoom.select"}),VN.extend({type:"dataZoom.select"}),Ie.createHashMap),YN=Ie.each;ry.registerProcessor({getTargetSeries:function(e){var t=HN();return e.eachComponent("dataZoom",(function(e){e.eachTargetAxis((function(e,n,i){var a=i.getAxisProxy(e.name,n);YN(a.getTargetSeriesModels(),(function(e){t.set(e.uid,e)}))}))})),t},modifyOutputEnd:!0,overallReset:function(e,t){e.eachComponent("dataZoom",(function(e){e.eachTargetAxis((function(e,n,i){i.getAxisProxy(e.name,n).reset(i,t)})),e.eachTargetAxis((function(e,n,i){i.getAxisProxy(e.name,n).filterData(i,t)}))})),e.eachComponent("dataZoom",(function(e){var t=e.findRepresentativeAxisProxy(),n=t.getDataPercentWindow(),i=t.getDataValueWindow();e.setCalculatedRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]})}))}}),ry.registerAction("dataZoom",(function(e,t){var n=DN.createLinkedNodesFinder(Ie.bind(t.eachComponent,t,"dataZoom"),DN.eachAxisDim,(function(e,t){return e.get(t.axisIndex)})),i=[];t.eachComponent({mainType:"dataZoom",query:e},(function(e,t){i.push.apply(i,n(e).nodes)})),Ie.each(i,(function(t,n){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})}))}));var FN=df.toolbox.dataZoom,GN=Ie.each;function WN(e,t,n){(this._brushController=new lD(n.getZr())).on("brush",Ie.bind(this._onBrush,this)).mount(),this._isZoomActive}WN.defaultOption={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:Ie.clone(FN.title)};var jN=WN.prototype;jN.render=function(e,t,n,i){this.model=e,this.ecModel=t,this.api=n,function(e,t,n,i,a){var r=n._isZoomActive;i&&"takeGlobalCursor"===i.type&&(r="dataZoomSelect"===i.key&&i.dataZoomSelectActive);n._isZoomActive=r,e.setIconStatus("zoom",r?"emphasis":"normal");var o=new xN(ZN(e.option),t,{include:["grid"]});n._brushController.setPanels(o.makePanelOpts(a,(function(e){return e.xAxisDeclared&&!e.yAxisDeclared?"lineX":!e.xAxisDeclared&&e.yAxisDeclared?"lineY":"rect"}))).enableBrush(!!r&&{brushType:"auto",brushStyle:{lineWidth:0,fill:"rgba(0,0,0,0.2)"}})}(e,t,this,i,n),function(e,t){e.setIconStatus("back",MN.count(t)>1?"emphasis":"normal")}(e,t)},jN.onclick=function(e,t,n){UN[n].call(this)},jN.remove=function(e,t){this._brushController.unmount()},jN.dispose=function(e,t){this._brushController.dispose()};var UN={zoom:function(){var e=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:e})},back:function(){this._dispatchZoomAction(MN.pop(this.ecModel))}};function ZN(e){var t={};return Ie.each(["xAxisIndex","yAxisIndex"],(function(n){t[n]=e[n],null==t[n]&&(t[n]="all"),(!1===t[n]||"none"===t[n])&&(t[n]=[])})),t}jN._onBrush=function(e,t){if(t.isEnd&&e.length){var n={},i=this.ecModel;this._brushController.updateCovers([]),new xN(ZN(this.model.option),i,{include:["grid"]}).matchOutputRanges(e,i,(function(e,t,n){if("cartesian2d"===n.type){var i=e.brushType;"rect"===i?(a("x",n,t[0]),a("y",n,t[1])):a({lineX:"x",lineY:"y"}[i],n,t)}})),MN.push(i,n),this._dispatchZoomAction(n)}function a(e,t,a){var r=t.getAxis(e),o=r.model,s=function(e,t,n){var i;return n.eachComponent({mainType:"dataZoom",subType:"select"},(function(n){n.getAxisModel(e,t.componentIndex)&&(i=n)})),i}(e,o,i),l=s.findRepresentativeAxisProxy(o).getMinMaxSpan();null==l.minValueSpan&&null==l.maxValueSpan||(a=lA(0,a.slice(),r.scale.getExtent(),0,l.minValueSpan,l.maxValueSpan)),s&&(n[s.id]={dataZoomId:s.id,startValue:a[0],endValue:a[1]})}},jN._dispatchZoomAction=function(e){var t=[];GN(e,(function(e,n){t.push(Ie.clone(e))})),t.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:t})},RE.register("dataZoom",WN),ry.registerPreprocessor((function(e){if(e){var t=e.dataZoom||(e.dataZoom=[]);Ie.isArray(t)||(e.dataZoom=t=[t]);var n=e.toolbox;if(n&&(Ie.isArray(n)&&(n=n[0]),n&&n.feature)){var i=n.feature.dataZoom;a("xAxis",i),a("yAxis",i)}}function a(n,i){if(i){var a=n+"Index",r=i[a];null==r||"all"===r||Ie.isArray(r)||(r=!1===r||"none"===r?[]:[r]),function(t,n){var i=e[t];Ie.isArray(i)||(i=i?[i]:[]);GN(i,n)}(n,(function(e,o){if(null==r||"all"===r||-1!==Ie.indexOf(r,o)){var s={type:"select",$fromToolbox:!0,filterMode:i.filterMode||"filter",id:"\0_ec_\0toolbox-dataZoom_"+n+o};s[a]=o,t.push(s)}}))}}}));var XN=df.toolbox.restore;function qN(e){this.model=e}qN.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:XN.title},qN.prototype.onclick=function(e,t,n){MN.clear(e),t.dispatchAction({type:"restore",from:this.uid})},RE.register("restore",qN),ry.registerAction({type:"restore",event:"restore",update:"prepareAndUpdate"},(function(e,t){t.resetOption("recreate")}));ry.extendComponentModel({type:"tooltip",dependencies:["axisPointer"],defaultOption:{zlevel:0,z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:!1,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"rgba(50,50,50,0.7)",borderColor:"#333",borderRadius:4,borderWidth:0,padding:5,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#fff",fontSize:14}}});var KN=Ie.each,QN=Pu.toCamelCase,$N=["","-webkit-","-moz-","-o-"];function JN(e){var t,n,i=[],a=e.get("transitionDuration"),r=e.get("backgroundColor"),o=e.getModel("textStyle"),s=e.get("padding");return a&&i.push((n="left "+(t=a)+"s cubic-bezier(0.23, 1, 0.32, 1),top "+t+"s cubic-bezier(0.23, 1, 0.32, 1)",Ie.map($N,(function(e){return e+"transition:"+n})).join(";"))),r&&(ne.canvasSupported?i.push("background-Color:"+r):(i.push("background-Color:#"+en.toHex(r)),i.push("filter:alpha(opacity=70)"))),KN(["width","color","radius"],(function(t){var n="border-"+t,a=QN(n),r=e.get(a);null!=r&&i.push(n+":"+r+("color"===t?"":"px"))})),i.push(function(e){var t=[],n=e.get("fontSize"),i=e.getTextColor();return i&&t.push("color:"+i),t.push("font:"+e.getFont()),n&&t.push("line-height:"+Math.round(3*n/2)+"px"),KN(["decoration","align"],(function(n){var i=e.get(n);i&&t.push("text-"+n+":"+i)})),t.join(";")}(o)),null!=s&&i.push("padding:"+Pu.normalizeCssArray(s).join("px ")+"px"),i.join(";")+";"}function eP(e,t,n,i,a){var r=t&&t.painter;if(n){var o=r&&r.getViewportRoot();o&&Ue.transformLocalCoord(e,o,document.body,i,a)}else{e[0]=i,e[1]=a;var s=r&&r.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}}function tP(e,t,n){if(ne.wxa)return null;var i=document.createElement("div");i.domBelongToZr=!0,this.el=i;var a=this._zr=t.getZr(),r=this._appendToBody=n&&n.appendToBody;this._styleCoord=[0,0],eP(this._styleCoord,a,r,t.getWidth()/2,t.getHeight()/2),r?document.body.appendChild(i):e.appendChild(i),this._container=e,this._show=!1,this._hideTimeout;var o=this;i.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},i.onmousemove=function(e){if(e=e||window.event,!o._enterable){var t=a.handler,n=a.painter.getViewportRoot();nt.normalizeEvent(n,e,!0),t.dispatch("mousemove",e)}},i.onmouseleave=function(){o._enterable&&o._show&&o.hideLater(o._hideDelay),o._inContent=!1}}tP.prototype={constructor:tP,_enterable:!0,update:function(){var e=this._container,t=e.currentStyle||document.defaultView.getComputedStyle(e),n=e.style;"absolute"!==n.position&&"absolute"!==t.position&&(n.position="relative")},show:function(e){clearTimeout(this._hideTimeout);var t=this.el,n=this._styleCoord;t.style.cssText="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+JN(e)+";left:"+n[0]+"px;top:"+n[1]+"px;"+(e.get("extraCssText")||""),t.style.display=t.innerHTML?"block":"none",t.style.pointerEvents=this._enterable?"auto":"none",this._show=!0},setContent:function(e){this.el.innerHTML=null==e?"":e},setEnterable:function(e){this._enterable=e},getSize:function(){var e=this.el;return[e.clientWidth,e.clientHeight]},moveTo:function(e,t){var n=this._styleCoord;eP(n,this._zr,this._appendToBody,e,t);var i=this.el.style;i.left=n[0]+"px",i.top=n[1]+"px"},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(e){!this._show||this._inContent&&this._enterable||(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(Ie.bind(this.hide,this),e)):this.hide())},isShow:function(){return this._show},dispose:function(){this.el.parentNode.removeChild(this.el)},getOuterSize:function(){var e=this.el.clientWidth,t=this.el.clientHeight;if(document.defaultView&&document.defaultView.getComputedStyle){var n=document.defaultView.getComputedStyle(this.el);n&&(e+=parseInt(n.borderLeftWidth,10)+parseInt(n.borderRightWidth,10),t+=parseInt(n.borderTopWidth,10)+parseInt(n.borderBottomWidth,10))}return{width:e,height:t}}};var nP=tP;function iP(e){this._zr=e.getZr(),this._show=!1,this._hideTimeout}iP.prototype={constructor:iP,_enterable:!0,update:function(){},show:function(e){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.attr("show",!0),this._show=!0},setContent:function(e,t,n){this.el&&this._zr.remove(this.el);for(var i={},a=e,r=a.indexOf("{marker");r>=0;){var o=a.indexOf("|}"),s=a.substr(r+"{marker".length,o-r-"{marker".length);s.indexOf("sub")>-1?i["marker"+s]={textWidth:4,textHeight:4,textBorderRadius:2,textBackgroundColor:t[s],textOffset:[3,0]}:i["marker"+s]={textWidth:10,textHeight:10,textBorderRadius:5,textBackgroundColor:t[s]},r=(a=a.substr(o+1)).indexOf("{marker")}this.el=new ds({style:{rich:i,text:e,textLineHeight:20,textBackgroundColor:n.get("backgroundColor"),textBorderRadius:n.get("borderRadius"),textFill:n.get("textStyle.color"),textPadding:n.get("padding")},z:n.get("z")}),this._zr.add(this.el);var l=this;this.el.on("mouseover",(function(){l._enterable&&(clearTimeout(l._hideTimeout),l._show=!0),l._inContent=!0})),this.el.on("mouseout",(function(){l._enterable&&l._show&&l.hideLater(l._hideDelay),l._inContent=!1}))},setEnterable:function(e){this._enterable=e},getSize:function(){var e=this.el.getBoundingRect();return[e.width,e.height]},moveTo:function(e,t){this.el&&this.el.attr("position",[e,t])},hide:function(){this.el&&this.el.hide(),this._show=!1},hideLater:function(e){!this._show||this._inContent&&this._enterable||(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(Ie.bind(this.hide,this),e)):this.hide())},isShow:function(){return this._show},getOuterSize:function(){var e=this.getSize();return{width:e[0],height:e[1]}}};var aP=iP,rP=Sr.getTooltipRenderMode,oP=Ie.bind,sP=Ie.each,lP=Au.parsePercent,uP=new lu.Rect({shape:{x:-1,y:-1,width:2,height:2}});ry.extendComponentView({type:"tooltip",init:function(e,t){if(!ne.node){var n,i=e.getComponent("tooltip"),a=i.get("renderMode");this._renderMode=rP(a),"html"===this._renderMode?(n=new nP(t.getDom(),t,{appendToBody:i.get("appendToBody",!0)}),this._newLine="<br/>"):(n=new aP(t),this._newLine="\n"),this._tooltipContent=n}},render:function(e,t,n){if(!ne.node){this.group.removeAll(),this._tooltipModel=e,this._ecModel=t,this._api=n,this._lastDataByCoordSys=null,this._alwaysShowContent=e.get("alwaysShowContent");var i=this._tooltipContent;i.update(),i.setEnterable(e.get("enterable")),this._initGlobalListener(),this._keepShow()}},_initGlobalListener:function(){var e=this._tooltipModel.get("triggerOn");_k.register("itemTooltip",this._api,oP((function(t,n,i){"none"!==e&&(e.indexOf(t)>=0?this._tryShow(n,i):"leave"===t&&this._hide(i))}),this))},_keepShow:function(){var e=this._tooltipModel,t=this._ecModel,n=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==e.get("triggerOn")){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){!n.isDisposed()&&i.manuallyShowTip(e,t,n,{x:i._lastX,y:i._lastY})}))}},manuallyShowTip:function(e,t,n,i){if(i.from!==this.uid&&!ne.node){var a=hP(i,n);this._ticket="";var r=i.dataByCoordSys;if(i.tooltip&&null!=i.x&&null!=i.y){var o=uP;o.position=[i.x,i.y],o.update(),o.tooltip=i.tooltip,this._tryShow({offsetX:i.x,offsetY:i.y,target:o},a)}else if(r)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:i.dataByCoordSys,tooltipOption:i.tooltipOption},a);else if(null!=i.seriesIndex){if(this._manuallyAxisShowTip(e,t,n,i))return;var s=ak(i,t),l=s.point[0],u=s.point[1];null!=l&&null!=u&&this._tryShow({offsetX:l,offsetY:u,position:i.position,target:s.el},a)}else 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},a))}},manuallyHideTip:function(e,t,n,i){var a=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&a.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,i.from!==this.uid&&this._hide(hP(i,n))},_manuallyAxisShowTip:function(e,t,n,i){var a=i.seriesIndex,r=i.dataIndex,o=t.getComponent("axisPointer").coordSysAxesInfo;if(null!=a&&null!=r&&null!=o){var s=t.getSeriesByIndex(a);if(s)if("axis"===(e=cP([s.getData().getItemModel(r),s,(s.coordinateSystem||{}).model,e])).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:a,dataIndex:r,position:i.position}),!0}},_tryShow:function(e,t){var n=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var i=e.dataByCoordSys;i&&i.length?this._showAxisTooltip(i,e):n&&null!=n.dataIndex?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(e,n,t)):n&&n.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(e,n,t)):(this._lastDataByCoordSys=null,this._hide(t))}},_showOrMove:function(e,t){var n=e.get("showDelay");t=Ie.bind(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},_showAxisTooltip:function(e,t){var n=this._ecModel,i=this._tooltipModel,a=[t.offsetX,t.offsetY],r=[],o=[],s=cP([t.tooltipOption,i]),l=this._renderMode,u=this._newLine,c={};sP(e,(function(e){sP(e.dataByAxis,(function(e){var t=n.getComponent(e.axisDim+"Axis",e.axisIndex),i=e.value,a=[];if(t&&null!=i){var s=Ek.getValueLabel(i,t.axis,n,e.seriesDataIndices,e.valueLabelOpt);Ie.each(e.seriesDataIndices,(function(r){var u=n.getSeriesByIndex(r.seriesIndex),h=r.dataIndexInside,d=u&&u.getDataParams(h);if(d.axisDim=e.axisDim,d.axisIndex=e.axisIndex,d.axisType=e.axisType,d.axisId=e.axisId,d.axisValue=Xm.getAxisRawValue(t.axis,i),d.axisValueLabel=s,d){o.push(d);var f,p=u.formatTooltip(h,!0,null,l);if(Ie.isObject(p)){f=p.html;var g=p.markers;Ie.merge(c,g)}else f=p;a.push(f)}}));var h=s;"html"!==l?r.push(a.join(u)):r.push((h?Pu.encodeHTML(h)+u:"")+a.join(u))}}))}),this),r.reverse(),r=r.join(this._newLine+this._newLine);var h=t.position;this._showOrMove(s,(function(){this._updateContentNotChangedOnAxis(e)?this._updatePosition(s,h,a[0],a[1],this._tooltipContent,o):this._showTooltipContent(s,r,o,Math.random(),a[0],a[1],h,void 0,c)}))},_showSeriesItemTooltip:function(e,t,n){var i=this._ecModel,a=t.seriesIndex,r=i.getSeriesByIndex(a),o=t.dataModel||r,s=t.dataIndex,l=t.dataType,u=o.getData(l),c=cP([u.getItemModel(s),o,r&&(r.coordinateSystem||{}).model,this._tooltipModel]),h=c.get("trigger");if(null==h||"item"===h){var d,f,p=o.getDataParams(s,l),g=o.formatTooltip(s,!1,l,this._renderMode);Ie.isObject(g)?(d=g.html,f=g.markers):(d=g,f=null);var m="item_"+o.name+"_"+s;this._showOrMove(c,(function(){this._showTooltipContent(c,d,p,m,e.offsetX,e.offsetY,e.position,e.target,f)})),n({type:"showTip",dataIndexInside:s,dataIndex:u.getRawIndex(s),seriesIndex:a,from:this.uid})}},_showComponentItemTooltip:function(e,t,n){var i=t.tooltip;if("string"==typeof i){i={content:i,formatter:i}}var a=new bu(i,this._tooltipModel,this._ecModel),r=a.get("content"),o=Math.random();this._showOrMove(a,(function(){this._showTooltipContent(a,r,a.get("formatterParams")||{},o,e.offsetX,e.offsetY,e.position,t)})),n({type:"showTip",from:this.uid})},_showTooltipContent:function(e,t,n,i,a,r,o,s,l){if(this._ticket="",e.get("showContent")&&e.get("show")){var u=this._tooltipContent,c=e.get("formatter");o=o||e.get("position");var h=t;if(c&&"string"==typeof c)h=Pu.formatTpl(c,n,!0);else if("function"==typeof c){var d=oP((function(t,i){t===this._ticket&&(u.setContent(i,l,e),this._updatePosition(e,o,a,r,u,n,s))}),this);this._ticket=i,h=c(n,i,d)}u.setContent(h,l,e),u.show(e),this._updatePosition(e,o,a,r,u,n,s)}},_updatePosition:function(e,t,n,i,a,r,o){var s=this._api.getWidth(),l=this._api.getHeight();t=t||e.get("position");var u=a.getSize(),c=e.get("align"),h=e.get("verticalAlign"),d=o&&o.getBoundingRect().clone();if(o&&d.applyTransform(o.transform),"function"==typeof t&&(t=t([n,i],r,a.el,d,{viewSize:[s,l],contentSize:u.slice()})),Ie.isArray(t))n=lP(t[0],s),i=lP(t[1],l);else if(Ie.isObject(t)){t.width=u[0],t.height=u[1];var f=Uu.getLayoutRect(t,{width:s,height:l});n=f.x,i=f.y,c=null,h=null}else if("string"==typeof t&&o){var p=function(e,t,n){var i=n[0],a=n[1],r=0,o=0,s=t.width,l=t.height;switch(e){case"inside":r=t.x+s/2-i/2,o=t.y+l/2-a/2;break;case"top":r=t.x+s/2-i/2,o=t.y-a-5;break;case"bottom":r=t.x+s/2-i/2,o=t.y+l+5;break;case"left":r=t.x-i-5,o=t.y+l/2-a/2;break;case"right":r=t.x+s+5,o=t.y+l/2-a/2}return[r,o]}(t,d,u);n=p[0],i=p[1]}else{p=function(e,t,n,i,a,r,o){var s=n.getOuterSize(),l=s.width,u=s.height;null!=r&&(e+l+r>i?e-=l+r:e+=r);null!=o&&(t+u+o>a?t-=u+o:t+=o);return[e,t]}(n,i,a,s,l,c?null:20,h?null:20);n=p[0],i=p[1]}if(c&&(n-=dP(c)?u[0]/2:"right"===c?u[0]:0),h&&(i-=dP(h)?u[1]/2:"bottom"===h?u[1]:0),e.get("confine")){p=function(e,t,n,i,a){var r=n.getOuterSize(),o=r.width,s=r.height;return e=Math.min(e+o,i)-o,t=Math.min(t+s,a)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}(n,i,a,s,l);n=p[0],i=p[1]}a.moveTo(n,i)},_updateContentNotChangedOnAxis:function(e){var t=this._lastDataByCoordSys,n=!!t&&t.length===e.length;return n&&sP(t,(function(t,i){var a=t.dataByAxis||{},r=(e[i]||{}).dataByAxis||[];(n&=a.length===r.length)&&sP(a,(function(e,t){var i=r[t]||{},a=e.seriesDataIndices||[],o=i.seriesDataIndices||[];(n&=e.value===i.value&&e.axisType===i.axisType&&e.axisId===i.axisId&&a.length===o.length)&&sP(a,(function(e,t){var i=o[t];n&=e.seriesIndex===i.seriesIndex&&e.dataIndex===i.dataIndex}))}))})),this._lastDataByCoordSys=e,!!n},_hide:function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},dispose:function(e,t){ne.node||(this._tooltipContent.dispose(),_k.unregister("itemTooltip",t))}});function cP(e){for(var t=e.pop();e.length;){var n=e.pop();n&&(bu.isInstance(n)&&(n=n.get("tooltip",!0)),"string"==typeof n&&(n={formatter:n}),t=new bu(n,t,t.ecModel))}return t}function hP(e,t){return e.dispatchAction||Ie.bind(t.dispatchAction,t)}function dP(e){return"center"===e||"middle"===e}ry.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},(function(){})),ry.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},(function(){}));var fP=["rect","polygon","keep","clear"];var pP=function(e,t){var n=e&&e.brush;if(Ie.isArray(n)||(n=n?[n]:[]),n.length){var i=[];Ie.each(n,(function(e){var t=e.hasOwnProperty("toolbox")?e.toolbox:[];t instanceof Array&&(i=i.concat(t))}));var a=e&&e.toolbox;Ie.isArray(a)&&(a=a[0]),a||(a={feature:{}},e.toolbox=[a]);var r=a.feature||(a.feature={}),o=r.brush||(r.brush={}),s=o.type||(o.type=[]);s.push.apply(s,i),function(e){var t={};Ie.each(e,(function(e){t[e]=1})),e.length=0,Ie.each(t,(function(t,n){e.push(n)}))}(s),t&&!s.length&&s.push.apply(s,fP)}},gP=Ie.each;function mP(e){if(e)for(var t in e)if(e.hasOwnProperty(t))return!0}var vP={createVisualMappings:function(e,t,n){var i={};return gP(t,(function(t){var a,r=i[t]=((a=function(){}).prototype.__hidden=a.prototype,new a);gP(e[t],(function(e,i){if(tT.isValidType(i)){var a={type:i,visual:e};n&&n(a,t),r[i]=new tT(a),"opacity"===i&&((a=Ie.clone(a)).type="colorAlpha",r.__hidden.__alphaForOpacity=new tT(a))}}))})),i},replaceVisualOption:function(e,t,n){var i;Ie.each(n,(function(e){t.hasOwnProperty(e)&&mP(t[e])&&(i=!0)})),i&&Ie.each(n,(function(n){t.hasOwnProperty(n)&&mP(t[n])?e[n]=Ie.clone(t[n]):delete e[n]}))},applyVisual:function(e,t,n,i,a,r){var o,s={};function l(e){return n.getItemVisual(o,e)}function u(e,t){n.setItemVisual(o,e,t)}function c(e,c){o=null==r?e:c;var h=n.getRawDataItem(o);if(!h||!1!==h.visualMap)for(var d=i.call(a,e),f=t[d],p=s[d],g=0,m=p.length;g<m;g++){var v=p[g];f[v]&&f[v].applyVisual(e,l,u)}}Ie.each(e,(function(e){var n=tT.prepareVisualTypes(t[e]);s[e]=n})),null==r?n.each(c):n.each([r],c)},incrementalApplyVisual:function(e,t,n,i){var a={};return Ie.each(e,(function(e){var n=tT.prepareVisualTypes(t[e]);a[e]=n})),{progress:function(e,r){function o(e){return r.getItemVisual(l,e)}function s(e,t){r.setItemVisual(l,e,t)}var l;for(null!=i&&(i=r.getDimension(i));null!=(l=e.next());){var u=r.getRawDataItem(l);if(!u||!1!==u.visualMap)for(var c=null!=i?r.get(i,l,!0):l,h=n(c),d=t[h],f=a[h],p=0,g=f.length;p<g;p++){var m=f[p];d[m]&&d[m].applyVisual(c,o,s)}}}}}},yP=lu.linePolygonIntersect;function _P(e){var t=["x","y"],n=["width","height"];return{point:function(t,n,i){if(t){var a=i.range;return xP(t[e],a)}},rect:function(i,a,r){if(i){var o=r.range,s=[i[t[e]],i[t[e]]+i[n[e]]];return s[1]<s[0]&&s.reverse(),xP(s[0],o)||xP(s[1],o)||xP(o[0],s)||xP(o[1],s)}}}}function xP(e,t){return t[0]<=e&&e<=t[1]}var bP={lineX:_P(0),lineY:_P(1),rect:{point:function(e,t,n){return e&&n.boundingRect.contain(e[0],e[1])},rect:function(e,t,n){return e&&n.boundingRect.intersect(e)}},polygon:{point:function(e,t,n){return e&&n.boundingRect.contain(e[0],e[1])&&fv.contain(n.range,e[0],e[1])},rect:function(e,t,n){var i=n.range;if(!e||i.length<=1)return!1;var a=e.x,r=e.y,o=e.width,s=e.height,l=i[0];return!!(fv.contain(i,a,r)||fv.contain(i,a+o,r)||fv.contain(i,a,r+s)||fv.contain(i,a+o,r+s)||Hn.create(e).contain(l[0],l[1])||yP(a,r,a+o,r,i)||yP(a,r,a,r+s,i)||yP(a+o,r,a+o,r+s,i)||yP(a,r+s,a+o,r+s,i))||void 0}}},wP=["inBrush","outOfBrush"],SP=ry.PRIORITY.VISUAL.BRUSH;function MP(e){e.eachComponent({mainType:"brush"},(function(t){(t.brushTargetManager=new xN(t.option,e)).setInputRanges(t.areas,e)}))}function TP(e,t){if(!e.isDisposed()){var n=e.getZr();n.__ecInBrushSelectEvent=!0,e.dispatchAction({type:"brushSelect",batch:t}),n.__ecInBrushSelectEvent=!1}}function IP(e,t,n,i){for(var a=0,r=t.length;a<r;a++){var o=t[a];if(e[o.brushType](i,n,o.selectors,o))return!0}}function AP(e){var t=e.brushSelector;if(Ie.isString(t)){var n=[];return Ie.each(bP,(function(e,i){n[i]=function(n,i,a,r){var o=i.getItemLayout(n);return e[t](o,a,r)}})),n}if(Ie.isFunction(t)){var i={};return Ie.each(bP,(function(e,n){i[n]=t})),i}return t}ry.registerLayout(SP,(function(e,t,n){e.eachComponent({mainType:"brush"},(function(e){n&&"takeGlobalCursor"===n.type&&e.setBrushOption("brush"===n.key?n.brushOption:{brushType:!1})})),MP(e)})),ry.registerVisual(SP,(function(e,t,n){var i,a,r=[];e.eachComponent({mainType:"brush"},(function(t,n){var o={brushId:t.id,brushIndex:n,brushName:t.name,areas:Ie.clone(t.areas),selected:[]};r.push(o);var s=t.option,l=s.brushLink,u=[],c=[],h=[],d=0;n||(i=s.throttleType,a=s.throttleDelay);var f=Ie.map(t.areas,(function(e){return function(e){var t=e.selectors={};return Ie.each(bP[e.brushType],(function(n,i){t[i]=function(i){return n(i,t,e)}})),e}(Ie.defaults({boundingRect:DP[e.brushType](e)},e))})),p=vP.createVisualMappings(t.option,wP,(function(e){e.mappingMethod="fixed"}));function g(e){return"all"===l||u[e]}function m(e){return!!e.length}Ie.isArray(l)&&Ie.each(l,(function(e){u[e]=1})),e.eachSeries((function(n,i){var a=h[i]=[];"parallel"===n.subType?function(e,t){var n=e.coordinateSystem;d|=n.hasAxisBrushed(),g(t)&&n.eachActiveState(e.getData(),(function(e,t){"active"===e&&(c[t]=1)}))}(n,i):function(n,i,a){var r=AP(n);if(!r||function(e,t){var n=e.option.seriesIndex;return null!=n&&"all"!==n&&(Ie.isArray(n)?Ie.indexOf(n,t)<0:t!==n)}(t,i))return;if(Ie.each(f,(function(i){r[i.brushType]&&t.brushTargetManager.controlSeries(i,n,e)&&a.push(i),d|=m(a)})),g(i)&&m(a)){var o=n.getData();o.each((function(e){IP(r,a,o,e)&&(c[e]=1)}))}}(n,i,a)})),e.eachSeries((function(e,t){var n={seriesId:e.id,seriesIndex:t,seriesName:e.name,dataIndex:[]};o.selected.push(n);var i=AP(e),a=h[t],r=e.getData(),s=g(t)?function(e){return c[e]?(n.dataIndex.push(r.getRawIndex(e)),"inBrush"):"outOfBrush"}:function(e){return IP(i,a,r,e)?(n.dataIndex.push(r.getRawIndex(e)),"inBrush"):"outOfBrush"};(g(t)?d:m(a))&&vP.applyVisual(wP,p,r,s)}))})),function(e,t,n,i,a){if(!a)return;var r=e.getZr();if(r.__ecInBrushSelectEvent)return;r.__ecBrushSelect||(r.__ecBrushSelect=TP);uf.createOrUpdate(r,"__ecBrushSelect",n,t)(e,i)}(t,i,a,r,n)}));var DP={lineX:Ie.noop,lineY:Ie.noop,rect:function(e){return CP(e.range)},polygon:function(e){for(var t,n=e.range,i=0,a=n.length;i<a;i++){t=t||[[1/0,-1/0],[1/0,-1/0]];var r=n[i];r[0]<t[0][0]&&(t[0][0]=r[0]),r[0]>t[0][1]&&(t[0][1]=r[0]),r[1]<t[1][0]&&(t[1][0]=r[1]),r[1]>t[1][1]&&(t[1][1]=r[1])}return t&&CP(t)}};function CP(e){return new Hn(e[0][0],e[1][0],e[0][1]-e[0][0],e[1][1]-e[1][0])}var OP={layoutCovers:MP},kP=["#ddd"];ry.extendComponentModel({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(e,t){var n=this.option;!t&&vP.replaceVisualOption(n,e,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:kP},i.hasOwnProperty("liftZ")||(i.liftZ=5)},setAreas:function(e){e&&(this.areas=Ie.map(e,(function(e){return LP(this.option,e)}),this))},setBrushOption:function(e){this.brushOption=LP(this.option,e),this.brushType=this.brushOption.brushType}});function LP(e,t){return Ie.merge({brushType:e.brushType,brushMode:e.brushMode,transformable:e.transformable,brushStyle:new bu(e.brushStyle).getItemStyle(),removeOnClick:e.removeOnClick,z:e.z},t,!0)}var EP=OP.layoutCovers;ry.extendComponentView({type:"brush",init:function(e,t){this.ecModel=e,this.api=t,this.model,(this._brushController=new lD(t.getZr())).on("brush",Ie.bind(this._onBrush,this)).mount()},render:function(e){return this.model=e,NP.apply(this,arguments)},updateTransform:function(e,t){return EP(t),NP.apply(this,arguments)},updateView:NP,dispose:function(){this._brushController.dispose()},_onBrush:function(e,t){var n=this.model.id;this.model.brushTargetManager.setOutputRanges(e,this.ecModel),(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:n,areas:Ie.clone(e),$from:n}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:n,areas:Ie.clone(e),$from:n})}});function NP(e,t,n,i){(!i||i.$from!==e.id)&&this._brushController.setPanels(e.brushTargetManager.makePanelOpts(n)).enableBrush(e.brushOption).updateCovers(e.areas.slice())}ry.registerAction({type:"brush",event:"brush"},(function(e,t){t.eachComponent({mainType:"brush",query:e},(function(t){t.setAreas(e.areas)}))})),ry.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},(function(){})),ry.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},(function(){}));var PP=df.toolbox.brush;function RP(e,t,n){this.model=e,this.ecModel=t,this.api=n,this._brushType,this._brushMode}RP.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:Ie.clone(PP.title)};var zP=RP.prototype;zP.render=zP.updateView=function(e,t,n){var i,a,r;t.eachComponent({mainType:"brush"},(function(e){i=e.brushType,a=e.brushOption.brushMode||"single",r|=e.areas.length})),this._brushType=i,this._brushMode=a,Ie.each(e.get("type",!0),(function(t){e.setIconStatus(t,("keep"===t?"multiple"===a:"clear"===t?r:t===i)?"emphasis":"normal")}))},zP.getIcons=function(){var e=this.model,t=e.get("icon",!0),n={};return Ie.each(e.get("type",!0),(function(e){t[e]&&(n[e]=t[e])})),n},zP.onclick=function(e,t,n){var i=this._brushType,a=this._brushMode;"clear"===n?(t.dispatchAction({type:"axisAreaSelect",intervals:[]}),t.dispatchAction({type:"brush",command:"clear",areas:[]})):t.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===n?i:i!==n&&n,brushMode:"keep"===n?"multiple"===a?"single":"multiple":a}})},RE.register("brush",RP),ry.registerPreprocessor(pP);var BP=Uu.getLayoutRect,VP=Pu.windowOpen;function HP(e){var t=e.itemStyle||(e.itemStyle={}),n=t.emphasis||(t.emphasis={}),i=e.label||e.label||{},a=i.normal||(i.normal={}),r={normal:1,emphasis:1};Ie.each(i,(function(e,t){r[t]||YP(a,t)||(a[t]=e)})),n.label&&!YP(i,"emphasis")&&(i.emphasis=n.label,delete n.label)}function YP(e,t){return e.hasOwnProperty(t)}ry.extendComponentModel({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"}}}),ry.extendComponentView({type:"title",render:function(e,t,n){if(this.group.removeAll(),e.get("show")){var i=this.group,a=e.getModel("textStyle"),r=e.getModel("subtextStyle"),o=e.get("textAlign"),s=Ie.retrieve2(e.get("textBaseline"),e.get("textVerticalAlign")),l=new lu.Text({style:lu.setTextStyle({},a,{text:e.get("text"),textFill:a.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),c=e.get("subtext"),h=new lu.Text({style:lu.setTextStyle({},r,{text:c,textFill:r.getTextColor(),y:u.height+e.get("itemGap"),textVerticalAlign:"top"},{disableBox:!0}),z2:10}),d=e.get("link"),f=e.get("sublink"),p=e.get("triggerEvent",!0);l.silent=!d&&!p,h.silent=!f&&!p,d&&l.on("click",(function(){VP(d,"_"+e.get("target"))})),f&&h.on("click",(function(){VP(d,"_"+e.get("subtarget"))})),l.eventData=h.eventData=p?{componentType:"title",componentIndex:e.componentIndex}:null,i.add(l),c&&i.add(h);var g=i.getBoundingRect(),m=e.getBoxLayoutParams();m.width=g.width,m.height=g.height;var v=BP(m,{width:n.getWidth(),height:n.getHeight()},e.get("padding"));o||("middle"===(o=e.get("left")||e.get("right"))&&(o="center"),"right"===o?v.x+=v.width:"center"===o&&(v.x+=v.width/2)),s||("center"===(s=e.get("top")||e.get("bottom"))&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),i.attr("position",[v.x,v.y]);var y={textAlign:o,textVerticalAlign:s};l.setStyle(y),h.setStyle(y),g=i.getBoundingRect();var _=v.margin,x=e.getItemStyle(["color","opacity"]);x.fill=e.get("backgroundColor");var b=new lu.Rect({shape:{x:g.x-_[3],y:g.y-_[0],width:g.width+_[1]+_[3],height:g.height+_[0]+_[2],r:e.get("borderRadius")},style:x,subPixelOptimize:!0,silent:!0});i.add(b)}}});var FP=function(e){var t=e&&e.timeline;Ie.isArray(t)||(t=t?[t]:[]),Ie.each(t,(function(e){e&&function(e){var t=e.type,n={number:"value",time:"time"};n[t]&&(e.axisType=n[t],delete e.type);if(HP(e),YP(e,"controlPosition")){var i=e.controlStyle||(e.controlStyle={});YP(i,"position")||(i.position=e.controlPosition),"none"!==i.position||YP(i,"show")||(i.show=!1,delete i.position),delete e.controlPosition}Ie.each(e.data||[],(function(e){Ie.isObject(e)&&!Ie.isArray(e)&&(!YP(e,"value")&&YP(e,"name")&&(e.value=e.name),HP(e))}))}(e)}))};$u.registerSubTypeDefaulter("timeline",(function(){return"slider"})),ry.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},(function(e,t){var n=t.getComponent("timeline");return n&&null!=e.currentIndex&&(n.setCurrentIndex(e.currentIndex),!n.get("loop",!0)&&n.isIndexMax()&&n.setPlayState(!1)),t.resetOption("timeline"),Ie.defaults({currentIndex:n.option.currentIndex},e)})),ry.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},(function(e,t){var n=t.getComponent("timeline");n&&null!=e.playState&&n.setPlayState(e.playState)}));var GP=$u.extend({type:"timeline",layoutMode:"box",defaultOption:{zlevel:0,z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},init:function(e,t,n){this._data,this._names,this.mergeDefaultAndTheme(e,n),this._initData()},mergeOption:function(e){GP.superApply(this,"mergeOption",arguments),this._initData()},setCurrentIndex:function(e){null==e&&(e=this.option.currentIndex);var t=this._data.count();this.option.loop?e=(e%t+t)%t:(e>=t&&(e=t-1),e<0&&(e=0)),this.option.currentIndex=e},getCurrentIndex:function(){return this.option.currentIndex},isIndexMax:function(){return this.getCurrentIndex()>=this._data.count()-1},setPlayState:function(e){this.option.autoPlay=!!e},getPlayState:function(){return!!this.option.autoPlay},_initData:function(){var e=this.option,t=e.data||[],n=e.axisType,i=this._names=[];if("category"===n){var a=[];Ie.each(t,(function(e,t){var n,r=Sr.getDataItemValue(e);Ie.isObject(e)?(n=Ie.clone(e)).value=t:n=t,a.push(n),Ie.isString(r)||null!=r&&!isNaN(r)||(r=""),i.push(r+"")})),t=a}var r={category:"ordinal",time:"time"}[n]||"number";(this._data=new cg([{name:"value",type:r}],this)).initData(t,i)},getData:function(){return this._data},getCategories:function(){if("category"===this.get("axisType"))return this._names.slice()}}),WP=GP.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:[]}});Ie.mixin(WP,gd);var jP=Wd.extend({type:"timeline"}),UP=function(e,t,n,i){Yv.call(this,e,t,n),this.type=i||"value",this.model=null};UP.prototype={constructor:UP,getLabelModel:function(){return this.model.getModel("label")},isHorizontal:function(){return"horizontal"===this.model.get("orient")}},Ie.inherits(UP,Yv);var ZP=UP,XP=ov.createSymbol,qP=Pu.encodeHTML,KP=Ie.bind,QP=Ie.each,$P=Math.PI;jP.extend({type:"timeline.slider",init:function(e,t){this.api=t,this._axis,this._viewRect,this._timer,this._currentPointer,this._mainGroup,this._labelGroup},render:function(e,t,n,i){if(this.model=e,this.api=n,this.ecModel=t,this.group.removeAll(),e.get("show",!0)){var a=this._layout(e,n),r=this._createGroup("mainGroup"),o=this._createGroup("labelGroup"),s=this._axis=this._createAxis(a,e);e.formatTooltip=function(e){return qP(s.scale.getLabel(e))},QP(["AxisLine","AxisTick","Control","CurrentPointer"],(function(t){this["_render"+t](a,r,s,e)}),this),this._renderAxisLabel(a,o,s,e),this._position(a,e)}this._doPlayStop()},remove:function(){this._clearTimer(),this.group.removeAll()},dispose:function(){this._clearTimer()},_layout:function(e,t){var n=e.get("label.position"),i=e.get("orient"),a=function(e,t){return Uu.getLayoutRect(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()},e.get("padding"))}(e,t);null==n||"auto"===n?n="horizontal"===i?a.y+a.height/2<t.getHeight()/2?"-":"+":a.x+a.width/2<t.getWidth()/2?"+":"-":isNaN(n)&&(n={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[i][n]);var r,o,s,l,u={horizontal:"center",vertical:n>=0||"+"===n?"left":"right"},c={horizontal:n>=0||"+"===n?"top":"bottom",vertical:"middle"},h={horizontal:0,vertical:$P/2},d="vertical"===i?a.height:a.width,f=e.getModel("controlStyle"),p=f.get("show",!0),g=p?f.get("itemSize"):0,m=p?f.get("itemGap"):0,v=g+m,y=e.get("label.rotate")||0;y=y*$P/180;var _=f.get("position",!0),x=p&&f.get("showPlayBtn",!0),b=p&&f.get("showPrevBtn",!0),w=p&&f.get("showNextBtn",!0),S=0,M=d;return"left"===_||"bottom"===_?(x&&(r=[0,0],S+=v),b&&(o=[S,0],S+=v),w&&(s=[M-g,0],M-=v)):(x&&(r=[M-g,0],M-=v),b&&(o=[0,0],S+=v),w&&(s=[M-g,0],M-=v)),l=[S,M],e.get("inverse")&&l.reverse(),{viewRect:a,mainLength:d,orient:i,rotation:h[i],labelRotation:y,labelPosOpt:n,labelAlign:e.get("label.align")||u[i],labelBaseline:e.get("label.verticalAlign")||e.get("label.baseline")||c[i],playPosition:r,prevBtnPosition:o,nextBtnPosition:s,axisExtent:l,controlSize:g,controlGap:m}},_position:function(e,t){var n=this._mainGroup,i=this._labelGroup,a=e.viewRect;if("vertical"===e.orient){var r=yt.create(),o=a.x,s=a.y+a.height;yt.translate(r,r,[-o,-s]),yt.rotate(r,r,-$P/2),yt.translate(r,r,[o,s]),(a=a.clone()).applyTransform(r)}var l=m(a),u=m(n.getBoundingRect()),c=m(i.getBoundingRect()),h=n.position,d=i.position;d[0]=h[0]=l[0][0];var f,p=e.labelPosOpt;isNaN(p)?(v(h,u,l,1,f="+"===p?0:1),v(d,c,l,1,1-f)):(v(h,u,l,1,f=p>=0?0:1),d[1]=h[1]+p);function g(e){var t=e.position;e.origin=[l[0][0]-t[0],l[1][0]-t[1]]}function m(e){return[[e.x,e.x+e.width],[e.y,e.y+e.height]]}function v(e,t,n,i,a){e[i]+=n[i][a]-t[i][a]}n.attr("position",h),i.attr("position",d),n.rotation=i.rotation=e.rotation,g(n),g(i)},_createAxis:function(e,t){var n=t.getData(),i=t.get("axisType"),a=Xm.createScaleByModel(t,i);a.getTicks=function(){return n.mapArray(["value"],(function(e){return e}))};var r=n.getDataExtent("value");a.setExtent(r[0],r[1]),a.niceTicks();var o=new ZP("value",a,e.axisExtent,i);return o.model=t,o},_createGroup:function(e){var t=this["_"+e]=new lu.Group;return this.group.add(t),t},_renderAxisLine:function(e,t,n,i){var a=n.getExtent();i.get("lineStyle.show")&&t.add(new lu.Line({shape:{x1:a[0],y1:0,x2:a[1],y2:0},style:Ie.extend({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1}))},_renderAxisTick:function(e,t,n,i){var a=i.getData(),r=n.scale.getTicks();QP(r,(function(e){var r=n.dataToCoord(e),o=a.getItemModel(e),s=o.getModel("itemStyle"),l=o.getModel("emphasis.itemStyle"),u={position:[r,0],onclick:KP(this._changeTimeline,this,e)},c=JP(o,s,t,u);lu.setHoverStyle(c,l.getItemStyle()),o.get("tooltip")?(c.dataIndex=e,c.dataModel=i):c.dataIndex=c.dataModel=null}),this)},_renderAxisLabel:function(e,t,n,i){if(n.getLabelModel().get("show")){var a=i.getData(),r=n.getViewLabels();QP(r,(function(i){var r=i.tickValue,o=a.getItemModel(r),s=o.getModel("label"),l=o.getModel("emphasis.label"),u=n.dataToCoord(i.tickValue),c=new lu.Text({position:[u,0],rotation:e.labelRotation-e.rotation,onclick:KP(this._changeTimeline,this,r),silent:!1});lu.setTextStyle(c.style,s,{text:i.formattedLabel,textAlign:e.labelAlign,textVerticalAlign:e.labelBaseline}),t.add(c),lu.setHoverStyle(c,lu.setTextStyle({},l))}),this)}},_renderControl:function(e,t,n,i){var a=e.controlSize,r=e.rotation,o=i.getModel("controlStyle").getItemStyle(),s=i.getModel("emphasis.controlStyle").getItemStyle(),l=[0,-a/2,a,a],u=i.getPlayState(),c=i.get("inverse",!0);function h(e,n,u,c){if(e){var h=function(e,t,n,i){return lu.makePath(e.get(t).replace(/^path:\/\//,""),Ie.clone(i||{}),new Hn(n[0],n[1],n[2],n[3]),"center")}(i,n,l,{position:e,origin:[a/2,0],rotation:c?-r:0,rectHover:!0,style:o,onclick:u});t.add(h),lu.setHoverStyle(h,s)}}h(e.nextBtnPosition,"controlStyle.nextIcon",KP(this._changeTimeline,this,c?"-":"+")),h(e.prevBtnPosition,"controlStyle.prevIcon",KP(this._changeTimeline,this,c?"+":"-")),h(e.playPosition,"controlStyle."+(u?"stopIcon":"playIcon"),KP(this._handlePlayClick,this,!u),!0)},_renderCurrentPointer:function(e,t,n,i){var a=i.getData(),r=i.getCurrentIndex(),o=a.getItemModel(r).getModel("checkpointStyle"),s=this,l={onCreate:function(e){e.draggable=!0,e.drift=KP(s._handlePointerDrag,s),e.ondragend=KP(s._handlePointerDragend,s),eR(e,r,n,i,!0)},onUpdate:function(e){eR(e,r,n,i)}};this._currentPointer=JP(o,o,this._mainGroup,{},this._currentPointer,l)},_handlePlayClick:function(e){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:e,from:this.uid})},_handlePointerDrag:function(e,t,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},_handlePointerDragend:function(e){this._pointerChangeTimeline([e.offsetX,e.offsetY],!0)},_pointerChangeTimeline:function(e,t){var n=this._toAxisCoord(e)[0],i=this._axis,a=Au.asc(i.getExtent().slice());n>a[1]&&(n=a[1]),n<a[0]&&(n=a[0]),this._currentPointer.position[0]=n,this._currentPointer.dirty();var r=this._findNearestTick(n),o=this.model;(t||r!==o.getCurrentIndex()&&o.get("realtime"))&&this._changeTimeline(r)},_doPlayStop:function(){this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(KP((function(){var e=this.model;this._changeTimeline(e.getCurrentIndex()+(e.get("rewind",!0)?-1:1))}),this),this.model.get("playInterval")))},_toAxisCoord:function(e){var t=this._mainGroup.getLocalTransform();return lu.applyTransform(e,t,!0)},_findNearestTick:function(e){var t,n=this.model.getData(),i=1/0,a=this._axis;return n.each(["value"],(function(n,r){var o=a.dataToCoord(n),s=Math.abs(o-e);s<i&&(i=s,t=r)})),t},_clearTimer:function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},_changeTimeline:function(e){var t=this.model.getCurrentIndex();"+"===e?e=t+1:"-"===e&&(e=t-1),this.api.dispatchAction({type:"timelineChange",currentIndex:e,from:this.uid})}});function JP(e,t,n,i,a,r){var o=t.get("color");if(a)a.setColor(o),n.add(a),r&&r.onUpdate(a);else{var s=e.get("symbol");(a=XP(s,-1,-1,2,2,o)).setStyle("strokeNoScale",!0),n.add(a),r&&r.onCreate(a)}var l=t.getItemStyle(["color","symbol","symbolSize"]);a.setStyle(l),i=Ie.merge({rectHover:!0,z2:100},i,!0);var u=e.get("symbolSize");(u=u instanceof Array?u.slice():[+u,+u])[0]/=2,u[1]/=2,i.scale=u;var c=e.get("symbolOffset");if(c){var h=i.position=i.position||[0,0];h[0]+=Au.parsePercent(c[0],u[0]),h[1]+=Au.parsePercent(c[1],u[1])}var d=e.get("symbolRotate");return i.rotation=(d||0)*Math.PI/180||0,a.attr(i),a.updateTransform(),a}function eR(e,t,n,i,a){if(!e.dragging){var r=i.getModel("checkpointStyle"),o=n.dataToCoord(i.getData().get(["value"],t));a||!r.get("animation",!0)?e.attr({position:[o,0]}):(e.stopAnimation(!0),e.animateTo({position:[o,0]},r.get("animationDuration",!0),r.get("animationEasing",!0)))}}ry.registerPreprocessor(FP);var tR=Pu.addCommas,nR=Pu.encodeHTML;function iR(e){Sr.defaultEmphasis(e,"label",["show"])}var aR=ry.extendComponentModel({type:"marker",dependencies:["series","grid","polar","geo"],init:function(e,t,n){this.mergeDefaultAndTheme(e,n),this._mergeOption(e,n,!1,!0)},isAnimationEnabled:function(){if(ne.node)return!1;var e=this.__hostSeries;return this.getShallow("animation")&&e&&e.isAnimationEnabled()},mergeOption:function(e,t){this._mergeOption(e,t,!1,!1)},_mergeOption:function(e,t,n,i){var a=this.constructor,r=this.mainType+"Model";n||t.eachSeries((function(e){var n=e.get(this.mainType,!0),o=e[r];n&&n.data?(o?o._mergeOption(n,t,!0):(i&&iR(n),Ie.each(n.data,(function(e){e instanceof Array?(iR(e[0]),iR(e[1])):iR(e)})),o=new a(n,this,t),Ie.extend(o,{mainType:this.mainType,seriesIndex:e.seriesIndex,name:e.name,createdBySelf:!0}),o.__hostSeries=e),e[r]=o):e[r]=null}),this)},formatTooltip:function(e){var t=this.getData(),n=this.getRawValue(e),i=Ie.isArray(n)?Ie.map(n,tR).join(", "):tR(n),a=t.getName(e),r=nR(this.name);return(null!=n||a)&&(r+="<br />"),a&&(r+=nR(a),null!=n&&(r+=" : ")),null!=n&&(r+=nR(i)),r},getData:function(){return this._data},setData:function(e){this._data=e}});Ie.mixin(aR,gd);var rR=aR,oR=(rR.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}}}}),Ng.isDimensionStacked),sR=Ie.indexOf;function lR(e,t,n,i,a,r){var o=[],s=oR(t,i)?t.getCalculationInfo("stackResultDimension"):i,l=dR(t,s,e),u=t.indicesOfNearest(s,l)[0];o[a]=t.get(n,u),o[r]=t.get(s,u);var c=t.get(i,u),h=Au.getPrecision(t.get(i,u));return(h=Math.min(h,20))>=0&&(o[r]=+o[r].toFixed(h)),[o,c]}var uR=Ie.curry,cR={min:uR(lR,"min"),max:uR(lR,"max"),average:uR(lR,"average")};function hR(e,t,n,i){var a={};return null!=e.valueIndex||null!=e.valueDim?(a.valueDataDim=null!=e.valueIndex?t.getDimension(e.valueIndex):e.valueDim,a.valueAxis=n.getAxis(function(e,t){var n=e.getData(),i=n.dimensions;t=n.getDimension(t);for(var a=0;a<i.length;a++){var r=n.getDimensionInfo(i[a]);if(r.name===t)return r.coordDim}}(i,a.valueDataDim)),a.baseAxis=n.getOtherAxis(a.valueAxis),a.baseDataDim=t.mapDimension(a.baseAxis.dim)):(a.baseAxis=i.getBaseAxis(),a.valueAxis=n.getOtherAxis(a.baseAxis),a.baseDataDim=t.mapDimension(a.baseAxis.dim),a.valueDataDim=t.mapDimension(a.valueAxis.dim)),a}function dR(e,t,n){if("average"===n){var i=0,a=0;return e.each(t,(function(e,t){isNaN(e)||(i+=e,a++)})),i/a}return"median"===n?e.getMedian(t):e.getDataExtent(t,!0)["max"===n?1:0]}var fR={dataTransform:function(e,t){var n=e.getData(),i=e.coordinateSystem;if(t&&!function(e){return!isNaN(parseFloat(e.x))&&!isNaN(parseFloat(e.y))}(t)&&!Ie.isArray(t.coord)&&i){var a=i.dimensions,r=hR(t,n,i,e);if((t=Ie.clone(t)).type&&cR[t.type]&&r.baseAxis&&r.valueAxis){var o=sR(a,r.baseAxis.dim),s=sR(a,r.valueAxis.dim),l=cR[t.type](n,r.baseDataDim,r.valueDataDim,o,s);t.coord=l[0],t.value=l[1]}else{for(var u=[null!=t.xAxis?t.xAxis:t.radiusAxis,null!=t.yAxis?t.yAxis:t.angleAxis],c=0;c<2;c++)cR[u[c]]&&(u[c]=dR(n,n.mapDimension(a[c]),u[c]));t.coord=u}}return t},getAxisInfo:hR,dataFilter:function(e,t){return!(e&&e.containData&&t.coord&&!function(e){return!(isNaN(parseFloat(e.x))&&isNaN(parseFloat(e.y)))}(t))||e.containData(t.coord)},dimValueGetter:function(e,t,n,i){return i<2?e.coord&&e.coord[i]:e.value},numCalculate:dR},pR=ry.extendComponentView({type:"marker",init:function(){this.markerGroupMap=Ie.createHashMap()},render:function(e,t,n){var i=this.markerGroupMap;i.each((function(e){e.__keep=!1}));var a=this.type+"Model";t.eachSeries((function(e){var i=e[a];i&&this.renderSeries(e,i,t,n)}),this),i.each((function(e){!e.__keep&&this.group.remove(e.group)}),this)},renderSeries:function(){}});function gR(e,t,n){var i=t.coordinateSystem;e.each((function(a){var r,o=e.getItemModel(a),s=Au.parsePercent(o.get("x"),n.getWidth()),l=Au.parsePercent(o.get("y"),n.getHeight());if(isNaN(s)||isNaN(l)){if(t.getMarkerPosition)r=t.getMarkerPosition(e.getValues(e.dimensions,a));else if(i){var u=e.get(i.dimensions[0],a),c=e.get(i.dimensions[1],a);r=i.dataToPoint([u,c])}}else r=[s,l];isNaN(s)||(r[0]=s),isNaN(l)||(r[1]=l),e.setItemLayout(a,r)}))}pR.extend({type:"markPoint",updateTransform:function(e,t,n){t.eachSeries((function(e){var t=e.markPointModel;t&&(gR(t.getData(),e,n),this.markerGroupMap.get(e.id).updateLayout(t))}),this)},renderSeries:function(e,t,n,i){var a=e.coordinateSystem,r=e.id,o=e.getData(),s=this.markerGroupMap,l=s.get(r)||s.set(r,new Dy),u=function(e,t,n){var i;i=e?Ie.map(e&&e.dimensions,(function(e){var n=t.getData().getDimensionInfo(t.getData().mapDimension(e))||{};return Ie.defaults({name:e},n)})):[{name:"value",type:"float"}];var a=new cg(i,n),r=Ie.map(n.get("data"),Ie.curry(fR.dataTransform,t));e&&(r=Ie.filter(r,Ie.curry(fR.dataFilter,e)));return a.initData(r,null,e?fR.dimValueGetter:function(e){return e.value}),a}(a,e,t);t.setData(u),gR(t.getData(),e,i),u.each((function(e){var n=u.getItemModel(e),i=n.getShallow("symbol"),a=n.getShallow("symbolSize"),r=Ie.isFunction(i),s=Ie.isFunction(a);if(r||s){var l=t.getRawValue(e),c=t.getDataParams(e);r&&(i=i(l,c)),s&&(a=a(l,c))}u.setItemVisual(e,{symbol:i,symbolSize:a,color:n.get("itemStyle.color")||o.getVisual("color")})})),l.updateData(u),this.group.add(l.group),u.eachItemGraphicEl((function(e){e.traverse((function(e){e.dataModel=t}))})),l.__keep=!0,l.group.silent=t.get("silent")||e.get("silent")}});ry.registerPreprocessor((function(e){e.markPoint=e.markPoint||{}}));rR.extend({type:"markLine",defaultOption:{zlevel:0,z:5,symbol:["circle","arrow"],symbolSize:[8,16],precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"}});var mR=Ng.getStackedDimension,vR=function(e,t,n,i){var a=e.getData(),r=i.type;if(!Ie.isArray(i)&&("min"===r||"max"===r||"average"===r||"median"===r||null!=i.xAxis||null!=i.yAxis)){var o,s;if(null!=i.yAxis||null!=i.xAxis)o=t.getAxis(null!=i.yAxis?"y":"x"),s=Ie.retrieve(i.yAxis,i.xAxis);else{var l=fR.getAxisInfo(i,a,t,e);o=l.valueAxis;var u=mR(a,l.valueDataDim);s=fR.numCalculate(a,u,r)}var c="x"===o.dim?0:1,h=1-c,d=Ie.clone(i),f={};d.type=null,d.coord=[],f.coord=[],d.coord[h]=-1/0,f.coord[h]=1/0;var p=n.get("precision");p>=0&&"number"==typeof s&&(s=+s.toFixed(Math.min(p,20))),d.coord[c]=f.coord[c]=s,i=[d,f,{type:r,valueIndex:i.valueIndex,value:s}]}return(i=[fR.dataTransform(e,i[0]),fR.dataTransform(e,i[1]),Ie.extend({},i[2])])[2].type=i[2].type||"",Ie.merge(i[2],i[0]),Ie.merge(i[2],i[1]),i};function yR(e){return!isNaN(e)&&!isFinite(e)}function _R(e,t,n,i){var a=1-e,r=i.dimensions[e];return yR(t[a])&&yR(n[a])&&t[e]===n[e]&&i.getAxis(r).containData(t[e])}function xR(e,t){if("cartesian2d"===e.type){var n=t[0].coord,i=t[1].coord;if(n&&i&&(_R(1,n,i,e)||_R(0,n,i,e)))return!0}return fR.dataFilter(e,t[0])&&fR.dataFilter(e,t[1])}function bR(e,t,n,i,a){var r,o=i.coordinateSystem,s=e.getItemModel(t),l=Au.parsePercent(s.get("x"),a.getWidth()),u=Au.parsePercent(s.get("y"),a.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition)r=i.getMarkerPosition(e.getValues(e.dimensions,t));else{var c=o.dimensions,h=e.get(c[0],t),d=e.get(c[1],t);r=o.dataToPoint([h,d])}if("cartesian2d"===o.type){var f=o.getAxis("x"),p=o.getAxis("y");c=o.dimensions;yR(e.get(c[0],t))?r[0]=f.toGlobalCoord(f.getExtent()[n?0:1]):yR(e.get(c[1],t))&&(r[1]=p.toGlobalCoord(p.getExtent()[n?0:1]))}isNaN(l)||(r[0]=l),isNaN(u)||(r[1]=u)}else r=[l,u];e.setItemLayout(t,r)}pR.extend({type:"markLine",updateTransform:function(e,t,n){t.eachSeries((function(e){var t=e.markLineModel;if(t){var i=t.getData(),a=t.__from,r=t.__to;a.each((function(t){bR(a,t,!0,e,n),bR(r,t,!1,e,n)})),i.each((function(e){i.setItemLayout(e,[a.getItemLayout(e),r.getItemLayout(e)])})),this.markerGroupMap.get(e.id).updateLayout()}}),this)},renderSeries:function(e,t,n,i){var a=e.coordinateSystem,r=e.id,o=e.getData(),s=this.markerGroupMap,l=s.get(r)||s.set(r,new KT);this.group.add(l.group);var u=function(e,t,n){var i;i=e?Ie.map(e&&e.dimensions,(function(e){var n=t.getData().getDimensionInfo(t.getData().mapDimension(e))||{};return Ie.defaults({name:e},n)})):[{name:"value",type:"float"}];var a=new cg(i,n),r=new cg(i,n),o=new cg([],n),s=Ie.map(n.get("data"),Ie.curry(vR,t,e,n));e&&(s=Ie.filter(s,Ie.curry(xR,e)));var l=e?fR.dimValueGetter:function(e){return e.value};return a.initData(Ie.map(s,(function(e){return e[0]})),null,l),r.initData(Ie.map(s,(function(e){return e[1]})),null,l),o.initData(Ie.map(s,(function(e){return e[2]}))),o.hasItemOption=!0,{from:a,to:r,line:o}}(a,e,t),c=u.from,h=u.to,d=u.line;t.__from=c,t.__to=h,t.setData(d);var f=t.get("symbol"),p=t.get("symbolSize");function g(t,n,a){var r=t.getItemModel(n);bR(t,n,a,e,i),t.setItemVisual(n,{symbolSize:r.get("symbolSize")||p[a?0:1],symbol:r.get("symbol",!0)||f[a?0:1],color:r.get("itemStyle.color")||o.getVisual("color")})}Ie.isArray(f)||(f=[f,f]),"number"==typeof p&&(p=[p,p]),u.from.each((function(e){g(c,e,!0),g(h,e,!1)})),d.each((function(e){var t=d.getItemModel(e).get("lineStyle.color");d.setItemVisual(e,{color:t||c.getItemVisual(e,"color")}),d.setItemLayout(e,[c.getItemLayout(e),h.getItemLayout(e)]),d.setItemVisual(e,{fromSymbolSize:c.getItemVisual(e,"symbolSize"),fromSymbol:c.getItemVisual(e,"symbol"),toSymbolSize:h.getItemVisual(e,"symbolSize"),toSymbol:h.getItemVisual(e,"symbol")})})),l.updateData(d),u.line.eachItemGraphicEl((function(e,n){e.traverse((function(e){e.dataModel=t}))})),l.__keep=!0,l.group.silent=t.get("silent")||e.get("silent")}});ry.registerPreprocessor((function(e){e.markLine=e.markLine||{}}));rR.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"}}}});var wR=function(e,t,n,i){var a=fR.dataTransform(e,i[0]),r=fR.dataTransform(e,i[1]),o=Ie.retrieve,s=a.coord,l=r.coord;s[0]=o(s[0],-1/0),s[1]=o(s[1],-1/0),l[0]=o(l[0],1/0),l[1]=o(l[1],1/0);var u=Ie.mergeAll([{},a,r]);return u.coord=[a.coord,r.coord],u.x0=a.x,u.y0=a.y,u.x1=r.x,u.y1=r.y,u};function SR(e){return!isNaN(e)&&!isFinite(e)}function MR(e,t,n,i){var a=1-e;return SR(t[a])&&SR(n[a])}function TR(e,t){var n=t.coord[0],i=t.coord[1];return!("cartesian2d"!==e.type||!n||!i||!MR(1,n,i)&&!MR(0,n,i))||(fR.dataFilter(e,{coord:n,x:t.x0,y:t.y0})||fR.dataFilter(e,{coord:i,x:t.x1,y:t.y1}))}function IR(e,t,n,i,a){var r,o=i.coordinateSystem,s=e.getItemModel(t),l=Au.parsePercent(s.get(n[0]),a.getWidth()),u=Au.parsePercent(s.get(n[1]),a.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition)r=i.getMarkerPosition(e.getValues(n,t));else{var c=[f=e.get(n[0],t),p=e.get(n[1],t)];o.clampData&&o.clampData(c,c),r=o.dataToPoint(c,!0)}if("cartesian2d"===o.type){var h=o.getAxis("x"),d=o.getAxis("y"),f=e.get(n[0],t),p=e.get(n[1],t);SR(f)?r[0]=h.toGlobalCoord(h.getExtent()["x0"===n[0]?0:1]):SR(p)&&(r[1]=d.toGlobalCoord(d.getExtent()["y0"===n[1]?0:1]))}isNaN(l)||(r[0]=l),isNaN(u)||(r[1]=u)}else r=[l,u];return r}var AR=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];pR.extend({type:"markArea",updateTransform:function(e,t,n){t.eachSeries((function(e){var t=e.markAreaModel;if(t){var i=t.getData();i.each((function(t){var a=Ie.map(AR,(function(a){return IR(i,t,a,e,n)}));i.setItemLayout(t,a),i.getItemGraphicEl(t).setShape("points",a)}))}}),this)},renderSeries:function(e,t,n,i){var a=e.coordinateSystem,r=e.id,o=e.getData(),s=this.markerGroupMap,l=s.get(r)||s.set(r,{group:new lu.Group});this.group.add(l.group),l.__keep=!0;var u=function(e,t,n){var i,a;e?(i=Ie.map(e&&e.dimensions,(function(e){var n=t.getData(),i=n.getDimensionInfo(n.mapDimension(e))||{};return Ie.defaults({name:e},i)})),a=new cg(Ie.map(["x0","y0","x1","y1"],(function(e,t){return{name:e,type:i[t%2].type}})),n)):a=new cg(i=[{name:"value",type:"float"}],n);var r=Ie.map(n.get("data"),Ie.curry(wR,t,e,n));e&&(r=Ie.filter(r,Ie.curry(TR,e)));var o=e?function(e,t,n,i){return e.coord[Math.floor(i/2)][i%2]}:function(e){return e.value};return a.initData(r,null,o),a.hasItemOption=!0,a}(a,e,t);t.setData(u),u.each((function(t){u.setItemLayout(t,Ie.map(AR,(function(n){return IR(u,t,n,e,i)}))),u.setItemVisual(t,{color:o.getVisual("color")})})),u.diff(l.__data).add((function(e){var t=new lu.Polygon({shape:{points:u.getItemLayout(e)}});u.setItemGraphicEl(e,t),l.group.add(t)})).update((function(e,n){var i=l.__data.getItemGraphicEl(n);lu.updateProps(i,{shape:{points:u.getItemLayout(e)}},t,e),l.group.add(i),u.setItemGraphicEl(e,i)})).remove((function(e){var t=l.__data.getItemGraphicEl(e);l.group.remove(t)})).execute(),u.eachItemGraphicEl((function(e,n){var i=u.getItemModel(n),a=i.getModel("label"),r=i.getModel("emphasis.label"),o=u.getItemVisual(n,"color");e.useStyle(Ie.defaults(i.getModel("itemStyle").getItemStyle(),{fill:en.modifyAlpha(o,.4),stroke:o})),e.hoverStyle=i.getModel("emphasis.itemStyle").getItemStyle(),lu.setLabelStyle(e.style,e.hoverStyle,a,r,{labelFetcher:t,labelDataIndex:n,defaultText:u.getName(n)||"",isRectText:!0,autoColor:o}),lu.setHoverStyle(e,{}),e.dataModel=t})),l.__data=u,l.group.silent=t.get("silent")||e.get("silent")}}),ry.registerPreprocessor((function(e){e.markArea=e.markArea||{}}));var DR=Sr.isNameSpecified,CR=df.legend.selector,OR={all:{type:"all",title:Ie.clone(CR.all)},inverse:{type:"inverse",title:Ie.clone(CR.inverse)}},kR=ry.extendComponentModel({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(e,t,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},mergeOption:function(e){kR.superCall(this,"mergeOption",e),this._updateSelector(e)},_updateSelector:function(e){var t=e.selector;!0===t&&(t=e.selector=["all","inverse"]),Ie.isArray(t)&&Ie.each(t,(function(e,n){Ie.isString(e)&&(e={type:e}),t[n]=Ie.merge(e,OR[e.type])}))},optionUpdated:function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&"single"===this.get("selectedMode")){for(var t=!1,n=0;n<e.length;n++){var i=e[n].get("name");if(this.isSelected(i)){this.select(i),t=!0;break}}!t&&this.select(e[0].get("name"))}},_updateData:function(e){var t=[],n=[];e.eachRawSeries((function(i){var a,r=i.name;if(n.push(r),i.legendVisualProvider){var o=i.legendVisualProvider.getAllNames();e.isSeriesFiltered(i)||(n=n.concat(o)),o.length?t=t.concat(o):a=!0}else a=!0;a&&DR(i)&&t.push(i.name)})),this._availableNames=n;var i=this.get("data")||t,a=Ie.map(i,(function(e){return"string"!=typeof e&&"number"!=typeof e||(e={name:e}),new bu(e,this,this.ecModel)}),this);this._data=a},getData:function(){return this._data},select:function(e){var t=this.option.selected;if("single"===this.get("selectedMode")){var n=this._data;Ie.each(n,(function(e){t[e.get("name")]=!1}))}t[e]=!0},unSelect:function(e){"single"!==this.get("selectedMode")&&(this.option.selected[e]=!1)},toggleSelected:function(e){var t=this.option.selected;t.hasOwnProperty(e)||(t[e]=!0),this[t[e]?"unSelect":"select"](e)},allSelect:function(){var e=this._data,t=this.option.selected;Ie.each(e,(function(e){t[e.get("name",!0)]=!0}))},inverseSelect:function(){var e=this._data,t=this.option.selected;Ie.each(e,(function(e){var n=e.get("name",!0);t.hasOwnProperty(n)||(t[n]=!0),t[n]=!t[n]}))},isSelected:function(e){var t=this.option.selected;return!(t.hasOwnProperty(e)&&!t[e])&&Ie.indexOf(this._availableNames,e)>=0},getOrient:function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},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",inactiveBorderColor:"#ccc",itemStyle:{borderWidth:0},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:" sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}}}),LR=kR;function ER(e,t,n){var i,a={},r="toggleSelected"===e;return n.eachComponent("legend",(function(n){r&&null!=i?n[i?"select":"unSelect"](t.name):"allSelect"===e||"inverseSelect"===e?n[e]():(n[e](t.name),i=n.isSelected(t.name));var o=n.getData();Ie.each(o,(function(e){var t=e.get("name");if("\n"!==t&&""!==t){var i=n.isSelected(t);a.hasOwnProperty(t)?a[t]=a[t]&&i:a[t]=i}}))})),"allSelect"===e||"inverseSelect"===e?{selected:a}:{name:t.name,selected:a}}ry.registerAction("legendToggleSelect","legendselectchanged",Ie.curry(ER,"toggleSelected")),ry.registerAction("legendAllSelect","legendselectall",Ie.curry(ER,"allSelect")),ry.registerAction("legendInverseSelect","legendinverseselect",Ie.curry(ER,"inverseSelect")),ry.registerAction("legendSelect","legendselected",Ie.curry(ER,"select")),ry.registerAction("legendUnSelect","legendunselected",Ie.curry(ER,"unSelect"));var NR=ov.createSymbol,PR=YE.makeBackground,RR=Ie.curry,zR=Ie.each,BR=lu.Group;function VR(e,t,n,i,a,r){var o;return"line"!==t&&t.indexOf("empty")<0?(o=n.getItemStyle(),e.style.stroke=i,r||(o.stroke=a)):o=n.getItemStyle(["borderWidth","borderColor"]),e.setStyle(o)}function HR(e,t,n,i){FR(e,t,n,i),n.dispatchAction({type:"legendToggleSelect",name:null!=e?e:t}),YR(e,t,n,i)}function YR(e,t,n,i){var a=n.getZr().storage.getDisplayList()[0];a&&a.useHoverLayer||n.dispatchAction({type:"highlight",seriesName:e,name:t,excludeSeriesId:i})}function FR(e,t,n,i){var a=n.getZr().storage.getDisplayList()[0];a&&a.useHoverLayer||n.dispatchAction({type:"downplay",seriesName:e,name:t,excludeSeriesId:i})}var GR=ry.extendComponentView({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new BR),this._backgroundEl,this.group.add(this._selectorGroup=new BR),this._isFirstRender=!0},getContentGroup:function(){return this._contentGroup},getSelectorGroup:function(){return this._selectorGroup},render:function(e,t,n){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get("show",!0)){var a=e.get("align"),r=e.get("orient");a&&"auto"!==a||(a="right"===e.get("left")&&"vertical"===r?"right":"left");var o=e.get("selector",!0),s=e.get("selectorPosition",!0);!o||s&&"auto"!==s||(s="horizontal"===r?"end":"start"),this.renderInner(a,e,t,n,o,r,s);var l=e.getBoxLayoutParams(),u={width:n.getWidth(),height:n.getHeight()},c=e.get("padding"),h=Uu.getLayoutRect(l,u,c),d=this.layoutInner(e,a,h,i,o,s),f=Uu.getLayoutRect(Ie.defaults({width:d.width,height:d.height},l),u,c);this.group.attr("position",[f.x-d.x,f.y-d.y]),this.group.add(this._backgroundEl=PR(d,e))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},renderInner:function(e,t,n,i,a,r,o){var s=this.getContentGroup(),l=Ie.createHashMap(),u=t.get("selectedMode"),c=[];n.eachRawSeries((function(e){!e.get("legendHoverLink")&&c.push(e.id)})),zR(t.getData(),(function(a,r){var o=a.get("name");if(this.newlineDisabled||""!==o&&"\n"!==o){var h=n.getSeriesByName(o)[0];if(!l.get(o))if(h){var d=h.getData(),f=d.getVisual("color"),p=d.getVisual("borderColor");"function"==typeof f&&(f=f(h.getDataParams(0))),"function"==typeof p&&(p=p(h.getDataParams(0)));var g=d.getVisual("legendSymbol")||"roundRect",m=d.getVisual("symbol");this._createItem(o,r,a,t,g,m,e,f,p,u).on("click",RR(HR,o,null,i,c)).on("mouseover",RR(YR,h.name,null,i,c)).on("mouseout",RR(FR,h.name,null,i,c)),l.set(o,!0)}else n.eachRawSeries((function(n){if(!l.get(o)&&n.legendVisualProvider){var s=n.legendVisualProvider;if(!s.containName(o))return;var h=s.indexOfName(o),d=s.getItemVisual(h,"color"),f=s.getItemVisual(h,"borderColor");this._createItem(o,r,a,t,"roundRect",null,e,d,f,u).on("click",RR(HR,null,o,i,c)).on("mouseover",RR(YR,null,o,i,c)).on("mouseout",RR(FR,null,o,i,c)),l.set(o,!0)}}),this)}else s.add(new BR({newline:!0}))}),this),a&&this._createSelector(a,t,i,r,o)},_createSelector:function(e,t,n,i,a){var r=this.getSelectorGroup();zR(e,(function(e){!function(e){var i=e.type,a=new lu.Text({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:"all"===i?"legendAllSelect":"legendInverseSelect"})}});r.add(a);var o=t.getModel("selectorLabel"),s=t.getModel("emphasis.selectorLabel");lu.setLabelStyle(a.style,a.hoverStyle={},o,s,{defaultText:e.title,isRectText:!1}),lu.setHoverStyle(a)}(e)}))},_createItem:function(e,t,n,i,a,r,o,s,l,u){var c=i.get("itemWidth"),h=i.get("itemHeight"),d=i.get("inactiveColor"),f=i.get("inactiveBorderColor"),p=i.get("symbolKeepAspect"),g=i.getModel("itemStyle"),m=i.isSelected(e),v=new BR,y=n.getModel("textStyle"),_=n.get("icon"),x=n.getModel("tooltip"),b=x.parentModel,w=NR(a=_||a,0,0,c,h,m?s:d,null==p||p);if(v.add(VR(w,a,g,l,f,m)),!_&&r&&(r!==a||"none"===r)){var S=.8*h;"none"===r&&(r="circle");var M=NR(r,(c-S)/2,(h-S)/2,S,S,m?s:d,null==p||p);v.add(VR(M,r,g,l,f,m))}var T="left"===o?c+5:-5,I=o,A=i.get("formatter"),D=e;"string"==typeof A&&A?D=A.replace("{name}",null!=e?e:""):"function"==typeof A&&(D=A(e)),v.add(new lu.Text({style:lu.setTextStyle({},y,{text:D,x:T,y:h/2,textFill:m?y.getTextColor():d,textAlign:I,textVerticalAlign:"middle"})}));var C=new lu.Rect({shape:v.getBoundingRect(),invisible:!0,tooltip:x.get("show")?Ie.extend({content:e,formatter:b.get("formatter",!0)||function(){return e},formatterParams:{componentType:"legend",legendIndex:i.componentIndex,name:e,$vars:["name"]}},x.option):null});return v.add(C),v.eachChild((function(e){e.silent=!0})),C.silent=!u,this.getContentGroup().add(v),lu.setHoverStyle(v),v.__legendDataIndex=t,v},layoutInner:function(e,t,n,i,a,r){var o=this.getContentGroup(),s=this.getSelectorGroup();Uu.box(e.get("orient"),o,e.get("itemGap"),n.width,n.height);var l=o.getBoundingRect(),u=[-l.x,-l.y];if(a){Uu.box("horizontal",s,e.get("selectorItemGap",!0));var c=s.getBoundingRect(),h=[-c.x,-c.y],d=e.get("selectorButtonGap",!0),f=e.getOrient().index,p=0===f?"width":"height",g=0===f?"height":"width",m=0===f?"y":"x";"end"===r?h[f]+=l[p]+d:u[f]+=c[p]+d,h[1-f]+=l[g]/2-c[g]/2,s.attr("position",h),o.attr("position",u);var v={x:0,y:0};return v[p]=l[p]+d+c[p],v[g]=Math.max(l[g],c[g]),v[m]=Math.min(0,c[m]+h[1-f]),v}return o.attr("position",u),this.group.getBoundingRect()},remove:function(){this.getContentGroup().removeAll(),this._isFirstRender=!0}});var WR=function(e){var t=e.findComponents({mainType:"legend"});t&&t.length&&e.filterSeries((function(e){for(var n=0;n<t.length;n++)if(!t[n].isSelected(e.name))return!1;return!0}))};ry.registerProcessor(ry.PRIORITY.PROCESSOR.SERIES_FILTER,WR),$u.registerSubTypeDefaulter("legend",(function(){return"plain"}));var jR=Uu.mergeLayoutParam,UR=Uu.getLayoutParams,ZR=LR.extend({type:"legend.scroll",setScrollDataIndex:function(e){this.option.scrollDataIndex=e},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(e,t,n,i){var a=UR(e);ZR.superCall(this,"init",e,t,n,i),XR(this,e,a)},mergeOption:function(e,t){ZR.superCall(this,"mergeOption",e,t),XR(this,this.option,e)}});function XR(e,t,n){var i=[1,1];i[e.getOrient().index]=0,jR(t,n,{type:"box",ignoreSize:i})}var qR=lu.Group,KR=["width","height"],QR=["x","y"],$R=GR.extend({type:"legend.scroll",newlineDisabled:!0,init:function(){$R.superCall(this,"init"),this._currentIndex=0,this.group.add(this._containerGroup=new qR),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new qR),this._showController},resetInner:function(){$R.superCall(this,"resetInner"),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},renderInner:function(e,t,n,i,a,r,o){var s=this;$R.superCall(this,"renderInner",e,t,n,i,a,r,o);var l=this._controllerGroup,u=t.get("pageIconSize",!0);Ie.isArray(u)||(u=[u,u]),h("pagePrev",0);var c=t.getModel("pageTextStyle");function h(e,n){var a=e+"DataIndex",r=lu.createIcon(t.get("pageIcons",!0)[t.getOrient().name][n],{onclick:Ie.bind(s._pageGo,s,a,t,i)},{x:-u[0]/2,y:-u[1]/2,width:u[0],height:u[1]});r.name=e,l.add(r)}l.add(new lu.Text({name:"pageText",style:{textFill:c.getTextColor(),font:c.getFont(),textVerticalAlign:"middle",textAlign:"center"},silent:!0})),h("pageNext",1)},layoutInner:function(e,t,n,i,a,r){var o=this.getSelectorGroup(),s=e.getOrient().index,l=KR[s],u=QR[s],c=KR[1-s],h=QR[1-s];a&&Uu.box("horizontal",o,e.get("selectorItemGap",!0));var d=e.get("selectorButtonGap",!0),f=o.getBoundingRect(),p=[-f.x,-f.y],g=Ie.clone(n);a&&(g[l]=n[l]-f[l]-d);var m=this._layoutContentAndController(e,i,g,s,l,c,h);if(a){if("end"===r)p[s]+=m[l]+d;else{var v=f[l]+d;p[s]-=v,m[u]-=v}m[l]+=f[l]+d,p[1-s]+=m[h]+m[c]/2-f[c]/2,m[c]=Math.max(m[c],f[c]),m[h]=Math.min(m[h],f[h]+p[1-s]),o.attr("position",p)}return m},_layoutContentAndController:function(e,t,n,i,a,r,o){var s=this.getContentGroup(),l=this._containerGroup,u=this._controllerGroup;Uu.box(e.get("orient"),s,e.get("itemGap"),i?n.width:null,i?null:n.height),Uu.box("horizontal",u,e.get("pageButtonItemGap",!0));var c=s.getBoundingRect(),h=u.getBoundingRect(),d=this._showController=c[a]>n[a],f=[-c.x,-c.y];t||(f[i]=s.position[i]);var p=[0,0],g=[-h.x,-h.y],m=Ie.retrieve2(e.get("pageButtonGap",!0),e.get("itemGap",!0));d&&("end"===e.get("pageButtonPosition",!0)?g[i]+=n[a]-h[a]:p[i]+=h[a]+m);g[1-i]+=c[r]/2-h[r]/2,s.attr("position",f),l.attr("position",p),u.attr("position",g);var v={x:0,y:0};if(v[a]=d?n[a]:c[a],v[r]=Math.max(c[r],h[r]),v[o]=Math.min(0,h[o]+g[1-i]),l.__rectSize=n[a],d){var y={x:0,y:0};y[a]=Math.max(n[a]-h[a]-m,0),y[r]=v[r],l.setClipPath(new lu.Rect({shape:y})),l.__rectSize=y[a]}else u.eachChild((function(e){e.attr({invisible:!0,silent:!0})}));var _=this._getPageInfo(e);return null!=_.pageIndex&&lu.updateProps(s,{position:_.contentPosition},!!d&&e),this._updatePageInfoView(e,_),v},_pageGo:function(e,t,n){var i=this._getPageInfo(t)[e];null!=i&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:t.id})},_updatePageInfoView:function(e,t){var n=this._controllerGroup;Ie.each(["pagePrev","pageNext"],(function(i){var a=null!=t[i+"DataIndex"],r=n.childOfName(i);r&&(r.setStyle("fill",a?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),r.cursor=a?"pointer":"default")}));var i=n.childOfName("pageText"),a=e.get("pageFormatter"),r=t.pageIndex,o=null!=r?r+1:0,s=t.pageCount;i&&a&&i.setStyle("text",Ie.isString(a)?a.replace("{current}",o).replace("{total}",s):a({current:o,total:s}))},_getPageInfo:function(e){var t=e.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,a=e.getOrient().index,r=KR[a],o=QR[a],s=this._findTargetItemIndex(t),l=n.children(),u=l[s],c=l.length,h=c?1:0,d={contentPosition:n.position.slice(),pageCount:h,pageIndex:h-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return d;var f=y(u);d.contentPosition[a]=-f.s;for(var p=s+1,g=f,m=f,v=null;p<=c;++p)(!(v=y(l[p]))&&m.e>g.s+i||v&&!_(v,g.s))&&(g=m.i>g.i?m:v)&&(null==d.pageNextDataIndex&&(d.pageNextDataIndex=g.i),++d.pageCount),m=v;for(p=s-1,g=f,m=f,v=null;p>=-1;--p)(v=y(l[p]))&&_(m,v.s)||!(g.i<m.i)||(m=g,null==d.pagePrevDataIndex&&(d.pagePrevDataIndex=g.i),++d.pageCount,++d.pageIndex),g=v;return d;function y(e){if(e){var t=e.getBoundingRect(),n=t[o]+e.position[a];return{s:n,e:n+t[r],i:e.__legendDataIndex}}}function _(e,t){return e.e>=t&&e.s<=t+i}},_findTargetItemIndex:function(e){return this._showController?(this.getContentGroup().eachChild((function(i,a){var r=i.__legendDataIndex;null==n&&null!=r&&(n=a),r===e&&(t=a)})),null!=t?t:n):0;var t,n}});ry.registerAction("legendScroll","legendscroll",(function(e,t){var n=e.scrollDataIndex;null!=n&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},(function(e){e.setScrollDataIndex(n)}))}));BN.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"}}});var JR=lu.Rect,ez=Au.linearMap,tz=Au.asc,nz=Ie.bind,iz=Ie.each,az=["line","bar","candlestick","scatter"],rz=VN.extend({type:"dataZoom.slider",init:function(e,t){this._displayables={},this._orient,this._range,this._handleEnds,this._size,this._handleWidth,this._handleHeight,this._location,this._dragging,this._dataShadowInfo,this.api=t},render:function(e,t,n,i){rz.superApply(this,"render",arguments),uf.createOrUpdate(this,"_dispatchZoomAction",this.dataZoomModel.get("throttle"),"fixRate"),this._orient=e.get("orient"),!1!==this.dataZoomModel.get("show")?(i&&"dataZoom"===i.type&&i.from===this.uid||this._buildView(),this._updateView()):this.group.removeAll()},remove:function(){rz.superApply(this,"remove",arguments),uf.clear(this,"_dispatchZoomAction")},dispose:function(){rz.superApply(this,"dispose",arguments),uf.clear(this,"_dispatchZoomAction")},_buildView:function(){var e=this.group;e.removeAll(),this._resetLocation(),this._resetInterval();var t=this._displayables.barGroup=new lu.Group;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(t),this._positionGroup()},_resetLocation:function(){var e=this.dataZoomModel,t=this.api,n=this._findCoordRect(),i={width:t.getWidth(),height:t.getHeight()},a="horizontal"===this._orient?{right:i.width-n.x-n.width,top:i.height-30-7,width:n.width,height:30}:{right:7,top:n.y,width:30,height:n.height},r=Uu.getLayoutParams(e.option);Ie.each(["right","top","width","height"],(function(e){"ph"===r[e]&&(r[e]=a[e])}));var o=Uu.getLayoutRect(r,i,e.padding);this._location={x:o.x,y:o.y},this._size=[o.width,o.height],"vertical"===this._orient&&this._size.reverse()},_positionGroup:function(){var e=this.group,t=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),a=i&&i.get("inverse"),r=this._displayables.barGroup,o=(this._dataShadowInfo||{}).otherAxisInverse;r.attr("horizontal"!==n||a?"horizontal"===n&&a?{scale:o?[-1,1]:[-1,-1]}:"vertical"!==n||a?{scale:o?[-1,-1]:[-1,1],rotation:Math.PI/2}:{scale:o?[1,-1]:[1,1],rotation:Math.PI/2}:{scale:o?[1,1]:[1,-1]});var s=e.getBoundingRect([r]);e.attr("position",[t.x-s.x,t.y-s.y])},_getViewExtent:function(){return[0,this._size[0]]},_renderBackground:function(){var e=this.dataZoomModel,t=this._size,n=this._displayables.barGroup;n.add(new JR({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:e.get("backgroundColor")},z2:-40})),n.add(new JR({shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:"transparent"},z2:0,onclick:Ie.bind(this._onClickPanelClick,this)}))},_renderDataShadow:function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(e){var t=this._size,n=e.series,i=n.getRawData(),a=n.getShadowDim?n.getShadowDim():e.otherDim;if(null!=a){var r=i.getDataExtent(a),o=.3*(r[1]-r[0]);r=[r[0]-o,r[1]+o];var s,l=[0,t[1]],u=[0,t[0]],c=[[t[0],0],[0,0]],h=[],d=u[1]/(i.count()-1),f=0,p=Math.round(i.count()/t[0]);i.each([a],(function(e,t){if(p>0&&t%p)f+=d;else{var n=null==e||isNaN(e)||""===e,i=n?0:ez(e,r,l,!0);n&&!s&&t?(c.push([c[c.length-1][0],0]),h.push([h[h.length-1][0],0])):!n&&s&&(c.push([f,0]),h.push([f,0])),c.push([f,i]),h.push([f,i]),f+=d,s=n}}));var g=this.dataZoomModel;this._displayables.barGroup.add(new lu.Polygon({shape:{points:c},style:Ie.defaults({fill:g.get("dataBackgroundColor")},g.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new lu.Polyline({shape:{points:h},style:g.getModel("dataBackground.lineStyle").getLineStyle(),silent:!0,z2:-19}))}}},_prepareDataShadowInfo:function(){var e=this.dataZoomModel,t=e.get("showDataShadow");if(!1!==t){var n,i=this.ecModel;return e.eachTargetAxis((function(a,r){var o=e.getAxisProxy(a.name,r).getTargetSeriesModels();Ie.each(o,(function(e){if(!(n||!0!==t&&Ie.indexOf(az,e.get("type"))<0)){var o,s=i.getComponent(a.axis,r).axis,l={x:"y",y:"x",radius:"angle",angle:"radius"}[a.name],u=e.coordinateSystem;null!=l&&u.getOtherAxis&&(o=u.getOtherAxis(s).inverse),l=e.getData().mapDimension(l),n={thisAxis:s,series:e,thisDim:a.name,otherDim:l,otherAxisInverse:o}}}),this)}),this),n}},_renderHandle:function(){var e=this._displayables,t=e.handles=[],n=e.handleLabels=[],i=this._displayables.barGroup,a=this._size,r=this.dataZoomModel;i.add(e.filler=new JR({draggable:!0,cursor:oz(this._orient),drift:nz(this._onDragMove,this,"all"),ondragstart:nz(this._showDataInfo,this,!0),ondragend:nz(this._onDragEnd,this),onmouseover:nz(this._showDataInfo,this,!0),onmouseout:nz(this._showDataInfo,this,!1),style:{fill:r.get("fillerColor"),textPosition:"inside"}})),i.add(new JR({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:a[0],height:a[1]},style:{stroke:r.get("dataBackgroundColor")||r.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),iz([0,1],(function(e){var a=lu.createIcon(r.get("handleIcon"),{cursor:oz(this._orient),draggable:!0,drift:nz(this._onDragMove,this,e),ondragend:nz(this._onDragEnd,this),onmouseover:nz(this._showDataInfo,this,!0),onmouseout:nz(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),o=a.getBoundingRect();this._handleHeight=Au.parsePercent(r.get("handleSize"),this._size[1]),this._handleWidth=o.width/o.height*this._handleHeight,a.setStyle(r.getModel("handleStyle").getItemStyle());var s=r.get("handleColor");null!=s&&(a.style.fill=s),i.add(t[e]=a);var l=r.textStyleModel;this.group.add(n[e]=new lu.Text({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textVerticalAlign:"middle",textAlign:"center",textFill:l.getTextColor(),textFont:l.getFont()},z2:10}))}),this)},_resetInterval:function(){var e=this._range=this.dataZoomModel.getPercentRange(),t=this._getViewExtent();this._handleEnds=[ez(e[0],[0,100],t,!0),ez(e[1],[0,100],t,!0)]},_updateInterval:function(e,t){var n=this.dataZoomModel,i=this._handleEnds,a=this._getViewExtent(),r=n.findRepresentativeAxisProxy().getMinMaxSpan(),o=[0,100];lA(t,i,a,n.get("zoomLock")?"all":e,null!=r.minSpan?ez(r.minSpan,o,a,!0):null,null!=r.maxSpan?ez(r.maxSpan,o,a,!0):null);var s=this._range,l=this._range=tz([ez(i[0],a,o,!0),ez(i[1],a,o,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},_updateView:function(e){var t=this._displayables,n=this._handleEnds,i=tz(n.slice()),a=this._size;iz([0,1],(function(e){var i=t.handles[e],r=this._handleHeight;i.attr({scale:[r/2,r/2],position:[n[e],a[1]/2-r/2]})}),this),t.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:a[1]}),this._updateDataInfo(e)},_updateDataInfo:function(e){var t=this.dataZoomModel,n=this._displayables,i=n.handleLabels,a=this._orient,r=["",""];if(t.get("showDetail")){var o=t.findRepresentativeAxisProxy();if(o){var s=o.getAxisModel().axis,l=this._range,u=e?o.calculateDataWindow({start:l[0],end:l[1]}).valueWindow:o.getDataValueWindow();r=[this._formatLabel(u[0],s),this._formatLabel(u[1],s)]}}var c=tz(this._handleEnds.slice());function h(e){var t=lu.getTransform(n.handles[e].parent,this.group),o=lu.transformDirection(0===e?"right":"left",t),s=this._handleWidth/2+5,l=lu.applyTransform([c[e]+(0===e?-s:s),this._size[1]/2],t);i[e].setStyle({x:l[0],y:l[1],textVerticalAlign:"horizontal"===a?"middle":o,textAlign:"horizontal"===a?o:"center",text:r[e]})}h.call(this,0),h.call(this,1)},_formatLabel:function(e,t){var n=this.dataZoomModel,i=n.get("labelFormatter"),a=n.get("labelPrecision");null!=a&&"auto"!==a||(a=t.getPixelPrecision());var r=null==e||isNaN(e)?"":"category"===t.type||"time"===t.type?t.scale.getLabel(Math.round(e)):e.toFixed(Math.min(a,20));return Ie.isFunction(i)?i(e,r):Ie.isString(i)?i.replace("{value}",r):r},_showDataInfo:function(e){e=this._dragging||e;var t=this._displayables.handleLabels;t[0].attr("invisible",!e),t[1].attr("invisible",!e)},_onDragMove:function(e,t,n,i){this._dragging=!0,nt.stop(i.event);var a=this._displayables.barGroup.getLocalTransform(),r=lu.applyTransform([t,n],a,!0),o=this._updateInterval(e,r[0]),s=this.dataZoomModel.get("realtime");this._updateView(!s),o&&s&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=!1,this._showDataInfo(!1),!this.dataZoomModel.get("realtime")&&this._dispatchZoomAction()},_onClickPanelClick:function(e){var t=this._size,n=this._displayables.barGroup.transformCoordToLocal(e.offsetX,e.offsetY);if(!(n[0]<0||n[0]>t[0]||n[1]<0||n[1]>t[1])){var i=this._handleEnds,a=(i[0]+i[1])/2,r=this._updateInterval("all",n[0]-a);this._updateView(),r&&this._dispatchZoomAction()}},_dispatchZoomAction:function(){var e=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:e[0],end:e[1]})},_findCoordRect:function(){var e;if(iz(this.getTargetCoordInfo(),(function(t){if(!e&&t.length){var n=t[0].model.coordinateSystem;e=n.getRect&&n.getRect()}})),!e){var t=this.api.getWidth(),n=this.api.getHeight();e={x:.2*t,y:.2*n,width:.6*t,height:.6*n}}return e}});function oz(e){return"vertical"===e?"ns-resize":"ew-resize"}BN.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}});var sz="\0_ec_dataZoom_roams";function lz(e){var t=e.getZr();return t[sz]||(t[sz]={})}function uz(e){Ie.each(e,(function(t,n){t.count||(t.controller.dispose(),delete e[n])}))}function cz(e,t){e.dispatchAction({type:"dataZoom",batch:t})}var hz={register:function(e,t){var n=lz(e),i=t.dataZoomId,a=t.coordId;Ie.each(n,(function(e,n){var r=e.dataZoomInfos;r[i]&&Ie.indexOf(t.allCoordIds,a)<0&&(delete r[i],e.count--)})),uz(n);var r=n[a];r||((r=n[a]={coordId:a,dataZoomInfos:{},count:0}).controller=function(e,t){var n=new Kw(e.getZr());return Ie.each(["pan","zoom","scrollMove"],(function(e){n.on(e,(function(n){var i=[];Ie.each(t.dataZoomInfos,(function(a){if(n.isAvailableBehavior(a.dataZoomModel.option)){var r=(a.getRange||{})[e],o=r&&r(t.controller,n);!a.dataZoomModel.get("disabled",!0)&&o&&i.push({dataZoomId:a.dataZoomId,start:o[0],end:o[1]})}})),i.length&&t.dispatchAction(i)}))})),n}(e,r),r.dispatchAction=Ie.curry(cz,e)),!r.dataZoomInfos[i]&&r.count++,r.dataZoomInfos[i]=t;var o,s,l,u,c=(o=r.dataZoomInfos,l={type_true:2,type_move:1,type_false:0,type_undefined:-1},u=!0,Ie.each(o,(function(e){var t=e.dataZoomModel,n=!t.get("disabled",!0)&&(!t.get("zoomLock",!0)||"move");l["type_"+n]>l["type_"+s]&&(s=n),u&=t.get("preventDefaultMouseMove",!0)})),{controlType:s,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!u}});r.controller.enable(c.controlType,c.opt),r.controller.setPointerChecker(t.containsPoint),uf.createOrUpdate(r,"dispatchAction",t.dataZoomModel.get("throttle",!0),"fixRate")},unregister:function(e,t){var n=lz(e);Ie.each(n,(function(e){e.controller.dispose();var n=e.dataZoomInfos;n[t]&&(delete n[t],e.count--)})),uz(n)},generateCoordId:function(e){return e.type+"\0_"+e.id}},dz=Ie.bind,fz=VN.extend({type:"dataZoom.inside",init:function(e,t){this._range},render:function(e,t,n,i){fz.superApply(this,"render",arguments),this._range=e.getPercentRange(),Ie.each(this.getTargetCoordInfo(),(function(t,i){var a=Ie.map(t,(function(e){return hz.generateCoordId(e.model)}));Ie.each(t,(function(t){var r=t.model,o={};Ie.each(["pan","zoom","scrollMove"],(function(e){o[e]=dz(pz[e],this,t,i)}),this),hz.register(n,{coordId:hz.generateCoordId(r),allCoordIds:a,containsPoint:function(e,t,n){return r.coordinateSystem.containPoint([t,n])},dataZoomId:e.id,dataZoomModel:e,getRange:o})}),this)}),this)},dispose:function(){hz.unregister(this.api,this.dataZoomModel.id),fz.superApply(this,"dispose",arguments),this._range=null}}),pz={zoom:function(e,t,n,i){var a=this._range,r=a.slice(),o=e.axisModels[0];if(o){var s=mz[t](null,[i.originX,i.originY],o,n,e),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(r[1]-r[0])+r[0],u=Math.max(1/i.scale,0);r[0]=(r[0]-l)*u+l,r[1]=(r[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return lA(0,r,[0,100],0,c.minSpan,c.maxSpan),this._range=r,a[0]!==r[0]||a[1]!==r[1]?r:void 0}},pan:gz((function(e,t,n,i,a,r){var o=mz[i]([r.oldX,r.oldY],[r.newX,r.newY],t,a,n);return o.signal*(e[1]-e[0])*o.pixel/o.pixelLength})),scrollMove:gz((function(e,t,n,i,a,r){return mz[i]([0,0],[r.scrollDelta,r.scrollDelta],t,a,n).signal*(e[1]-e[0])*r.scrollDelta}))};function gz(e){return function(t,n,i,a){var r=this._range,o=r.slice(),s=t.axisModels[0];if(s){var l=e(o,s,t,n,i,a);return lA(l,o,[0,100],"all"),this._range=o,r[0]!==o[0]||r[1]!==o[1]?o:void 0}}}var mz={grid:function(e,t,n,i,a){var r=n.axis,o={},s=a.model.coordinateSystem.getRect();return e=e||[0,0],"x"===r.dim?(o.pixel=t[0]-e[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=r.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=r.inverse?-1:1),o},polar:function(e,t,n,i,a){var r=n.axis,o={},s=a.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return e=e?s.pointToCoord(e):[0,0],t=s.pointToCoord(t),"radiusAxis"===n.mainType?(o.pixel=t[0]-e[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=r.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=r.inverse?-1:1),o},singleAxis:function(e,t,n,i,a){var r=n.axis,o=a.model.coordinateSystem.getRect(),s={};return e=e||[0,0],"horizontal"===r.orient?(s.pixel=t[0]-e[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=r.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=r.inverse?-1:1),s}},vz=Ie.each;function yz(e,t){return e&&e.hasOwnProperty&&e.hasOwnProperty(t)}var _z=function(e){var t=e&&e.visualMap;Ie.isArray(t)||(t=t?[t]:[]),vz(t,(function(e){if(e){yz(e,"splitList")&&!yz(e,"pieces")&&(e.pieces=e.splitList,delete e.splitList);var t=e.pieces;t&&Ie.isArray(t)&&vz(t,(function(e){Ie.isObject(e)&&(yz(e,"start")&&!yz(e,"min")&&(e.min=e.start),yz(e,"end")&&!yz(e,"max")&&(e.max=e.end))}))}}))};$u.registerSubTypeDefaulter("visualMap",(function(e){return e.categories||(e.pieces?e.pieces.length>0:e.splitNumber>0)&&!e.calculable?"piecewise":"continuous"}));var xz=ry.PRIORITY.VISUAL.COMPONENT;function bz(e,t,n,i){for(var a=t.targetVisuals[i],r=tT.prepareVisualTypes(a),o={color:e.getData().getVisual("color")},s=0,l=r.length;s<l;s++){var u=r[s],c=a["opacity"===u?"__alphaForOpacity":u];c&&c.applyVisual(n,h,d)}return o.color;function h(e){return o[e]}function d(e,t){o[e]=t}}ry.registerVisual(xz,{createOnAllSeries:!0,reset:function(e,t){var n=[];return t.eachComponent("visualMap",(function(t){var i=e.pipelineContext;!t.isTargetSeries(e)||i&&i.large||n.push(vP.incrementalApplyVisual(t.stateList,t.targetVisuals,Ie.bind(t.getValueState,t),t.getDataDimension(e.getData())))})),n}}),ry.registerVisual(xz,{createOnAllSeries:!0,reset:function(e,t){var n=e.getData(),i=[];t.eachComponent("visualMap",(function(t){if(t.isTargetSeries(e)){var a=t.getVisualMeta(Ie.bind(bz,null,e,t))||{stops:[],outerColors:[]},r=t.getDataDimension(n),o=n.getDimensionInfo(r);null!=o&&(a.dimension=o.index,i.push(a))}})),e.getData().setVisual("visualMeta",i)}});var wz={get:function(e,t,n){var i=Ie.clone((Sz[e]||{})[t]);return n&&Ie.isArray(i)?i[i.length-1]:i}},Sz={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]}},Mz=wz,Tz=tT.mapVisual,Iz=tT.eachVisual,Az=Ie.isArray,Dz=Ie.each,Cz=Au.asc,Oz=Au.linearMap,kz=Ie.noop,Lz=ry.extendComponentModel({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(e,t,n){this._dataExtent,this.targetVisuals={},this.controllerVisuals={},this.textStyleModel,this.itemSize,this.mergeDefaultAndTheme(e,n)},optionUpdated:function(e,t){var n=this.option;ne.canvasSupported||(n.realtime=!1),!t&&vP.replaceVisualOption(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},resetVisual:function(e){var t=this.stateList;e=Ie.bind(e,this),this.controllerVisuals=vP.createVisualMappings(this.option.controller,t,e),this.targetVisuals=vP.createVisualMappings(this.option.target,t,e)},getTargetSeriesIndices:function(){var e=this.option.seriesIndex,t=[];return null==e||"all"===e?this.ecModel.eachSeries((function(e,n){t.push(n)})):t=Sr.normalizeToArray(e),t},eachTargetSeries:function(e,t){Ie.each(this.getTargetSeriesIndices(),(function(n){e.call(t,this.ecModel.getSeriesByIndex(n))}),this)},isTargetSeries:function(e){var t=!1;return this.eachTargetSeries((function(n){n===e&&(t=!0)})),t},formatValueText:function(e,t,n){var i,a,r=this.option,o=r.precision,s=this.dataBound,l=r.formatter;return n=n||["<",">"],Ie.isArray(e)&&(e=e.slice(),i=!0),a=t?e:i?[u(e[0]),u(e[1])]:u(e),Ie.isString(l)?l.replace("{value}",i?a[0]:a).replace("{value2}",i?a[1]:a):Ie.isFunction(l)?i?l(e[0],e[1]):l(e):i?e[0]===s[0]?n[0]+" "+a[1]:e[1]===s[1]?n[1]+" "+a[0]:a[0]+" - "+a[1]:a;function u(e){return e===s[0]?"min":e===s[1]?"max":(+e).toFixed(Math.min(o,20))}},resetExtent:function(){var e=this.option,t=Cz([e.min,e.max]);this._dataExtent=t},getDataDimension:function(e){var t=this.option.dimension,n=e.dimensions;if(null!=t||n.length){if(null!=t)return e.getDimension(t);for(var i=e.dimensions,a=i.length-1;a>=0;a--){var r=i[a];if(!e.getDimensionInfo(r).isCalculationCoord)return r}}},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){var e=this.ecModel,t=this.option,n={inRange:t.inRange,outOfRange:t.outOfRange},i=t.target||(t.target={}),a=t.controller||(t.controller={});Ie.merge(i,n),Ie.merge(a,n);var r=this.isCategory();function o(n){Az(t.color)&&!n.inRange&&(n.inRange={color:t.color.slice().reverse()}),n.inRange=n.inRange||{color:e.get("gradientColor")},Dz(this.stateList,(function(e){var t=n[e];if(Ie.isString(t)){var i=Mz.get(t,"active",r);i?(n[e]={},n[e][t]=i):delete n[e]}}),this)}o.call(this,i),o.call(this,a),function(e,t,n){var i=e[t],a=e[n];i&&!a&&(a=e[n]={},Dz(i,(function(e,t){if(tT.isValidType(t)){var n=Mz.get(t,"inactive",r);null!=n&&(a[t]=n,"color"!==t||a.hasOwnProperty("opacity")||a.hasOwnProperty("colorAlpha")||(a.opacity=[0,0]))}})))}.call(this,i,"inRange","outOfRange"),function(e){var t=(e.inRange||{}).symbol||(e.outOfRange||{}).symbol,n=(e.inRange||{}).symbolSize||(e.outOfRange||{}).symbolSize,i=this.get("inactiveColor");Dz(this.stateList,(function(a){var o=this.itemSize,s=e[a];s||(s=e[a]={color:r?i:[i]}),null==s.symbol&&(s.symbol=t&&Ie.clone(t)||(r?"roundRect":["roundRect"])),null==s.symbolSize&&(s.symbolSize=n&&Ie.clone(n)||(r?o[0]:[o[0],o[0]])),s.symbol=Tz(s.symbol,(function(e){return"none"===e||"square"===e?"roundRect":e}));var l=s.symbolSize;if(null!=l){var u=-1/0;Iz(l,(function(e){e>u&&(u=e)})),s.symbolSize=Tz(l,(function(e){return Oz(e,[0,u],[0,o[0]],!0)}))}}),this)}.call(this,a)},resetItemSize:function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},isCategory:function(){return!!this.option.categories},setSelected:kz,getValueState:kz,getVisualMeta:kz}),Ez=[20,140],Nz=Lz.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(e,t){Nz.superApply(this,"optionUpdated",arguments),this.resetExtent(),this.resetVisual((function(e){e.mappingMethod="linear",e.dataExtent=this.getExtent()})),this._resetRange()},resetItemSize:function(){Nz.superApply(this,"resetItemSize",arguments);var e=this.itemSize;"horizontal"===this._orient&&e.reverse(),(null==e[0]||isNaN(e[0]))&&(e[0]=Ez[0]),(null==e[1]||isNaN(e[1]))&&(e[1]=Ez[1])},_resetRange:function(){var e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):Ie.isArray(t)&&(t[0]>t[1]&&t.reverse(),t[0]=Math.max(t[0],e[0]),t[1]=Math.min(t[1],e[1]))},completeVisualOption:function(){Lz.prototype.completeVisualOption.apply(this,arguments),Ie.each(this.stateList,(function(e){var t=this.option.controller[e].symbolSize;t&&t[0]!==t[1]&&(t[0]=0)}),this)},setSelected:function(e){this.option.range=e.slice(),this._resetRange()},getSelected:function(){var e=this.getExtent(),t=Au.asc((this.get("range")||[]).slice());return t[0]>e[1]&&(t[0]=e[1]),t[1]>e[1]&&(t[1]=e[1]),t[0]<e[0]&&(t[0]=e[0]),t[1]<e[0]&&(t[1]=e[0]),t},getValueState:function(e){var t=this.option.range,n=this.getExtent();return(t[0]<=n[0]||t[0]<=e)&&(t[1]>=n[1]||e<=t[1])?"inRange":"outOfRange"},findTargetDataIndices:function(e){var t=[];return this.eachTargetSeries((function(n){var i=[],a=n.getData();a.each(this.getDataDimension(a),(function(t,n){e[0]<=t&&t<=e[1]&&i.push(n)}),this),t.push({seriesId:n.id,dataIndex:i})}),this),t},getVisualMeta:function(e){var t=Pz(this,"outOfRange",this.getExtent()),n=Pz(this,"inRange",this.option.range.slice()),i=[];function a(t,n){i.push({value:t,color:e(t,n)})}for(var r=0,o=0,s=n.length,l=t.length;o<l&&(!n.length||t[o]<=n[0]);o++)t[o]<n[r]&&a(t[o],"outOfRange");for(var u=1;r<s;r++,u=0)u&&i.length&&a(n[r],"outOfRange"),a(n[r],"inRange");for(u=1;o<l;o++)(!n.length||n[n.length-1]<t[o])&&(u&&(i.length&&a(i[i.length-1].value,"outOfRange"),u=0),a(t[o],"outOfRange"));var c=i.length;return{stops:i,outerColors:[c?i[0].color:"transparent",c?i[c-1].color:"transparent"]}}});function Pz(e,t,n){if(n[0]===n[1])return n.slice();for(var i=(n[1]-n[0])/200,a=n[0],r=[],o=0;o<=200&&a<n[1];o++)r.push(a),a+=i;return r.push(n[1]),r}var Rz=ry.extendComponentView({type:"visualMap",autoPositionValues:{left:1,right:1,top:1,bottom:1},init:function(e,t){this.ecModel=e,this.api=t,this.visualMapModel},render:function(e,t,n,i){this.visualMapModel=e,!1!==e.get("show")?this.doRender.apply(this,arguments):this.group.removeAll()},renderBackground:function(e){var t=this.visualMapModel,n=Pu.normalizeCssArray(t.get("padding")||0),i=e.getBoundingRect();e.add(new lu.Rect({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:t.get("backgroundColor"),stroke:t.get("borderColor"),lineWidth:t.get("borderWidth")}}))},getControllerVisual:function(e,t,n){var i=(n=n||{}).forceState,a=this.visualMapModel,r={};if("symbol"===t&&(r.symbol=a.get("itemSymbol")),"color"===t){var o=a.get("contentColor");r.color=o}function s(e){return r[e]}function l(e,t){r[e]=t}var u=a.controllerVisuals[i||a.getValueState(e)],c=tT.prepareVisualTypes(u);return Ie.each(c,(function(i){var a=u[i];n.convertOpacityToAlpha&&"opacity"===i&&(i="colorAlpha",a=u.__alphaForOpacity),tT.dependsOn(i,t)&&a&&a.applyVisual(e,s,l)})),r[t]},positionGroup:function(e){var t=this.visualMapModel,n=this.api;Uu.positionElement(e,t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()})},doRender:Ie.noop}),zz=Uu.getLayoutRect;var Bz={getItemAlign:function(e,t,n){var i=e.option,a=i.align;if(null!=a&&"auto"!==a)return a;for(var r={width:t.getWidth(),height:t.getHeight()},o="horizontal"===i.orient?1:0,s=[["left","right","width"],["top","bottom","height"]],l=s[o],u=[0,null,10],c={},h=0;h<3;h++)c[s[1-o][h]]=u[h],c[l[h]]=2===h?n[0]:i[l[h]];var d=[["x","width",3],["y","height",0]][o],f=zz(c,r,i.padding);return l[(f.margin[d[2]]||0)+f[d[0]]+.5*f[d[1]]<.5*r[d[1]]?0:1]},makeHighDownBatch:function(e,t){return Ie.each(e||[],(function(e){null!=e.dataIndex&&(e.dataIndexInside=e.dataIndex,e.dataIndex=null),e.highlightKey="visualMap"+(t?t.componentIndex:"")})),e}},Vz=Au.linearMap,Hz=Ie.each,Yz=Math.min,Fz=Math.max,Gz=Rz.extend({type:"visualMap.continuous",init:function(){Gz.superApply(this,"init",arguments),this._shapes={},this._dataInterval=[],this._handleEnds=[],this._orient,this._useHandle,this._hoverLinkDataIndices=[],this._dragging,this._hovering},doRender:function(e,t,n,i){i&&"selectDataRange"===i.type&&i.from===this.uid||this._buildView()},_buildView:function(){this.group.removeAll();var e=this.visualMapModel,t=this.group;this._orient=e.get("orient"),this._useHandle=e.get("calculable"),this._resetInterval(),this._renderBar(t);var n=e.get("text");this._renderEndsText(t,n,0),this._renderEndsText(t,n,1),this._updateView(!0),this.renderBackground(t),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(t)},_renderEndsText:function(e,t,n){if(t){var i=t[1-n];i=null!=i?i+"":"";var a=this.visualMapModel,r=a.get("textGap"),o=a.itemSize,s=this._shapes.barGroup,l=this._applyTransform([o[0]/2,0===n?-r:o[1]+r],s),u=this._applyTransform(0===n?"bottom":"top",s),c=this._orient,h=this.visualMapModel.textStyleModel;this.group.add(new lu.Text({style:{x:l[0],y:l[1],textVerticalAlign:"horizontal"===c?"middle":u,textAlign:"horizontal"===c?u:"center",text:i,textFont:h.getFont(),textFill:h.getTextColor()}}))}},_renderBar:function(e){var t=this.visualMapModel,n=this._shapes,i=t.itemSize,a=this._orient,r=this._useHandle,o=Bz.getItemAlign(t,this.api,i),s=n.barGroup=this._createBarGroup(o);s.add(n.outOfRange=Wz()),s.add(n.inRange=Wz(null,r?Uz(this._orient):null,Ie.bind(this._dragHandle,this,"all",!1),Ie.bind(this._dragHandle,this,"all",!0)));var l=t.textStyleModel.getTextRect("国"),u=Fz(l.width,l.height);r&&(n.handleThumbs=[],n.handleLabels=[],n.handleLabelPoints=[],this._createHandle(s,0,i,u,a,o),this._createHandle(s,1,i,u,a,o)),this._createIndicator(s,i,u,a),e.add(s)},_createHandle:function(e,t,n,i,a){var r=Ie.bind(this._dragHandle,this,t,!1),o=Ie.bind(this._dragHandle,this,t,!0),s=Wz(function(e,t){return 0===e?[[0,0],[t,0],[t,-t]]:[[0,0],[t,0],[t,t]]}(t,i),Uz(this._orient),r,o);s.position[0]=n[0],e.add(s);var l=this.visualMapModel.textStyleModel,u=new lu.Text({draggable:!0,drift:r,onmousemove:function(e){nt.stop(e.event)},ondragend:o,style:{x:0,y:0,text:"",textFont:l.getFont(),textFill:l.getTextColor()}});this.group.add(u);var c=["horizontal"===a?i/2:1.5*i,"horizontal"===a?0===t?-1.5*i:1.5*i:0===t?-i/2:i/2],h=this._shapes;h.handleThumbs[t]=s,h.handleLabelPoints[t]=c,h.handleLabels[t]=u},_createIndicator:function(e,t,n,i){var a=Wz([[0,0]],"move");a.position[0]=t[0],a.attr({invisible:!0,silent:!0}),e.add(a);var r=this.visualMapModel.textStyleModel,o=new lu.Text({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textFont:r.getFont(),textFill:r.getTextColor()}});this.group.add(o);var s=["horizontal"===i?n/2:9,0],l=this._shapes;l.indicator=a,l.indicatorLabel=o,l.indicatorLabelPoint=s},_dragHandle:function(e,t,n,i){if(this._useHandle){if(this._dragging=!t,!t){var a=this._applyTransform([n,i],this._shapes.barGroup,!0);this._updateInterval(e,a[1]),this._updateView()}t===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),t?!this._hovering&&this._clearHoverLinkToSeries():jz(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[e],!1)}},_resetInterval:function(){var e=this.visualMapModel,t=this._dataInterval=e.getSelected(),n=e.getExtent(),i=[0,e.itemSize[1]];this._handleEnds=[Vz(t[0],n,i,!0),Vz(t[1],n,i,!0)]},_updateInterval:function(e,t){t=t||0;var n=this.visualMapModel,i=this._handleEnds,a=[0,n.itemSize[1]];lA(t,i,a,e,0);var r=n.getExtent();this._dataInterval=[Vz(i[0],a,r,!0),Vz(i[1],a,r,!0)]},_updateView:function(e){var t=this.visualMapModel,n=t.getExtent(),i=this._shapes,a=[0,t.itemSize[1]],r=e?a:this._handleEnds,o=this._createBarVisual(this._dataInterval,n,r,"inRange"),s=this._createBarVisual(n,n,a,"outOfRange");i.inRange.setStyle({fill:o.barColor,opacity:o.opacity}).setShape("points",o.barPoints),i.outOfRange.setStyle({fill:s.barColor,opacity:s.opacity}).setShape("points",s.barPoints),this._updateHandle(r,o)},_createBarVisual:function(e,t,n,i){var a={forceState:i,convertOpacityToAlpha:!0},r=this._makeColorGradient(e,a),o=[this.getControllerVisual(e[0],"symbolSize",a),this.getControllerVisual(e[1],"symbolSize",a)],s=this._createBarPoints(n,o);return{barColor:new tl(0,0,0,1,r),barPoints:s,handlesColor:[r[0].color,r[r.length-1].color]}},_makeColorGradient:function(e,t){var n=[],i=(e[1]-e[0])/100;n.push({color:this.getControllerVisual(e[0],"color",t),offset:0});for(var a=1;a<100;a++){var r=e[0]+i*a;if(r>e[1])break;n.push({color:this.getControllerVisual(r,"color",t),offset:a/100})}return n.push({color:this.getControllerVisual(e[1],"color",t),offset:1}),n},_createBarPoints:function(e,t){var n=this.visualMapModel.itemSize;return[[n[0]-t[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-t[1],e[1]]]},_createBarGroup:function(e){var t=this._orient,n=this.visualMapModel.get("inverse");return new lu.Group("horizontal"!==t||n?"horizontal"===t&&n?{scale:"bottom"===e?[-1,1]:[1,1],rotation:-Math.PI/2}:"vertical"!==t||n?{scale:"left"===e?[1,1]:[-1,1]}:{scale:"left"===e?[1,-1]:[-1,-1]}:{scale:"bottom"===e?[1,1]:[-1,1],rotation:Math.PI/2})},_updateHandle:function(e,t){if(this._useHandle){var n=this._shapes,i=this.visualMapModel,a=n.handleThumbs,r=n.handleLabels;Hz([0,1],(function(o){var s=a[o];s.setStyle("fill",t.handlesColor[o]),s.position[1]=e[o];var l=lu.applyTransform(n.handleLabelPoints[o],lu.getTransform(s,this.group));r[o].setStyle({x:l[0],y:l[1],text:i.formatValueText(this._dataInterval[o]),textVerticalAlign:"middle",textAlign:this._applyTransform("horizontal"===this._orient?0===o?"bottom":"top":"left",n.barGroup)})}),this)}},_showIndicator:function(e,t,n,i){var a=this.visualMapModel,r=a.getExtent(),o=a.itemSize,s=[0,o[1]],l=Vz(e,r,s,!0),u=this._shapes,c=u.indicator;if(c){c.position[1]=l,c.attr("invisible",!1),c.setShape("points",function(e,t,n,i){return e?[[0,-Yz(t,Fz(n,0))],[6,0],[0,Yz(t,Fz(i-n,0))]]:[[0,0],[5,-5],[5,5]]}(!!n,i,l,o[1]));var h=this.getControllerVisual(e,"color",{convertOpacityToAlpha:!0});c.setStyle("fill",h);var d=lu.applyTransform(u.indicatorLabelPoint,lu.getTransform(c,this.group)),f=u.indicatorLabel;f.attr("invisible",!1);var p=this._applyTransform("left",u.barGroup),g=this._orient;f.setStyle({text:(n||"")+a.formatValueText(t),textVerticalAlign:"horizontal"===g?p:"middle",textAlign:"horizontal"===g?"center":p,x:d[0],y:d[1]})}},_enableHoverLinkToSeries:function(){var e=this;this._shapes.barGroup.on("mousemove",(function(t){if(e._hovering=!0,!e._dragging){var n=e.visualMapModel.itemSize,i=e._applyTransform([t.offsetX,t.offsetY],e._shapes.barGroup,!0,!0);i[1]=Yz(Fz(0,i[1]),n[1]),e._doHoverLinkToSeries(i[1],0<=i[0]&&i[0]<=n[0])}})).on("mouseout",(function(){e._hovering=!1,!e._dragging&&e._clearHoverLinkToSeries()}))},_enableHoverLinkFromSeries:function(){var e=this.api.getZr();this.visualMapModel.option.hoverLink?(e.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),e.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},_doHoverLinkToSeries:function(e,t){var n=this.visualMapModel,i=n.itemSize;if(n.option.hoverLink){var a=[0,i[1]],r=n.getExtent();e=Yz(Fz(a[0],e),a[1]);var o=function(e,t,n){var i=6,a=e.get("hoverLinkDataSize");a&&(i=Vz(a,t,n,!0)/2);return i}(n,r,a),s=[e-o,e+o],l=Vz(e,a,r,!0),u=[Vz(s[0],a,r,!0),Vz(s[1],a,r,!0)];s[0]<a[0]&&(u[0]=-1/0),s[1]>a[1]&&(u[1]=1/0),t&&(u[0]===-1/0?this._showIndicator(l,u[1],"< ",o):u[1]===1/0?this._showIndicator(l,u[0],"> ",o):this._showIndicator(l,l,"≈ ",o));var c=this._hoverLinkDataIndices,h=[];(t||jz(n))&&(h=this._hoverLinkDataIndices=n.findTargetDataIndices(u));var d=Sr.compressBatches(c,h);this._dispatchHighDown("downplay",Bz.makeHighDownBatch(d[0],n)),this._dispatchHighDown("highlight",Bz.makeHighDownBatch(d[1],n))}},_hoverLinkFromSeriesMouseOver:function(e){var t=e.target,n=this.visualMapModel;if(t&&null!=t.dataIndex){var i=this.ecModel.getSeriesByIndex(t.seriesIndex);if(n.isTargetSeries(i)){var a=i.getData(t.dataType),r=a.get(n.getDataDimension(a),t.dataIndex,!0);isNaN(r)||this._showIndicator(r,r)}}},_hideIndicator:function(){var e=this._shapes;e.indicator&&e.indicator.attr("invisible",!0),e.indicatorLabel&&e.indicatorLabel.attr("invisible",!0)},_clearHoverLinkToSeries:function(){this._hideIndicator();var e=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",Bz.makeHighDownBatch(e,this.visualMapModel)),e.length=0},_clearHoverLinkFromSeries:function(){this._hideIndicator();var e=this.api.getZr();e.off("mouseover",this._hoverLinkFromSeriesMouseOver),e.off("mouseout",this._hideIndicator)},_applyTransform:function(e,t,n,i){var a=lu.getTransform(t,i?null:this.group);return lu[Ie.isArray(e)?"applyTransform":"transformDirection"](e,a,n)},_dispatchHighDown:function(e,t){t&&t.length&&this.api.dispatchAction({type:e,batch:t})},dispose:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},remove:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()}});function Wz(e,t,n,i){return new lu.Polygon({shape:{points:e},draggable:!!n,cursor:t,drift:n,onmousemove:function(e){nt.stop(e.event)},ondragend:i})}function jz(e){var t=e.get("hoverLinkOnHandle");return!!(null==t?e.get("realtime"):t)}function Uz(e){return"vertical"===e?"ns-resize":"ew-resize"}ry.registerAction({type:"selectDataRange",event:"dataRangeSelected",update:"update"},(function(e,t){t.eachComponent({mainType:"visualMap",query:e},(function(t){t.setSelected(e.selected)}))})),ry.registerPreprocessor(_z);var Zz=Au.reformIntervals,Xz=Lz.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(e,t){Xz.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetExtent();var n=this._mode=this._determineMode();qz[this._mode].call(this),this._resetSelected(e,t);var i=this.option.categories;this.resetVisual((function(e,t){"categories"===n?(e.mappingMethod="category",e.categories=Ie.clone(i)):(e.dataExtent=this.getExtent(),e.mappingMethod="piecewise",e.pieceList=Ie.map(this._pieceList,(function(e){e=Ie.clone(e);return"inRange"!==t&&(e.visual=null),e})))}))},completeVisualOption:function(){var e=this.option,t={},n=tT.listVisualTypes(),i=this.isCategory();function a(e,t,n){return e&&e[t]&&(Ie.isObject(e[t])?e[t].hasOwnProperty(n):e[t]===n)}Ie.each(e.pieces,(function(e){Ie.each(n,(function(n){e.hasOwnProperty(n)&&(t[n]=1)}))})),Ie.each(t,(function(t,n){var r=0;Ie.each(this.stateList,(function(t){r|=a(e,t,n)||a(e.target,t,n)}),this),!r&&Ie.each(this.stateList,(function(t){(e[t]||(e[t]={}))[n]=Mz.get(n,"inRange"===t?"active":"inactive",i)}))}),this),Lz.prototype.completeVisualOption.apply(this,arguments)},_resetSelected:function(e,t){var n=this.option,i=this._pieceList,a=(t?n:e).selected||{};if(n.selected=a,Ie.each(i,(function(e,t){var n=this.getSelectedMapKey(e);a.hasOwnProperty(n)||(a[n]=!0)}),this),"single"===n.selectedMode){var r=!1;Ie.each(i,(function(e,t){var n=this.getSelectedMapKey(e);a[n]&&(r?a[n]=!1:r=!0)}),this)}},getSelectedMapKey:function(e){return"categories"===this._mode?e.value+"":e.index+""},getPieceList:function(){return this._pieceList},_determineMode:function(){var e=this.option;return e.pieces&&e.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},setSelected:function(e){this.option.selected=Ie.clone(e)},getValueState:function(e){var t=tT.findPieceIndex(e,this._pieceList);return null!=t&&this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?"inRange":"outOfRange"},findTargetDataIndices:function(e){var t=[];return this.eachTargetSeries((function(n){var i=[],a=n.getData();a.each(this.getDataDimension(a),(function(t,n){tT.findPieceIndex(t,this._pieceList)===e&&i.push(n)}),this),t.push({seriesId:n.id,dataIndex:i})}),this),t},getRepresentValue:function(e){var t;if(this.isCategory())t=e.value;else if(null!=e.value)t=e.value;else{var n=e.interval||[];t=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return t},getVisualMeta:function(e){if(!this.isCategory()){var t=[],n=[],i=this,a=this._pieceList.slice();if(a.length){var r=a[0].interval[0];r!==-1/0&&a.unshift({interval:[-1/0,r]}),(r=a[a.length-1].interval[1])!==1/0&&a.push({interval:[r,1/0]})}else a.push({interval:[-1/0,1/0]});var o=-1/0;return Ie.each(a,(function(e){var t=e.interval;t&&(t[0]>o&&s([o,t[0]],"outOfRange"),s(t.slice()),o=t[1])}),this),{stops:t,outerColors:n}}function s(a,r){var o=i.getRepresentValue({interval:a});r||(r=i.getValueState(o));var s=e(o,r);a[0]===-1/0?n[0]=s:a[1]===1/0?n[1]=s:t.push({value:a[0],color:s},{value:a[1],color:s})}}}),qz={splitNumber:function(){var e=this.option,t=this._pieceList,n=Math.min(e.precision,20),i=this.getExtent(),a=e.splitNumber;a=Math.max(parseInt(a,10),1),e.splitNumber=a;for(var r=(i[1]-i[0])/a;+r.toFixed(n)!==r&&n<5;)n++;e.precision=n,r=+r.toFixed(n),e.minOpen&&t.push({interval:[-1/0,i[0]],close:[0,0]});for(var o=0,s=i[0];o<a;s+=r,o++){var l=o===a-1?i[1]:s+r;t.push({interval:[s,l],close:[1,1]})}e.maxOpen&&t.push({interval:[i[1],1/0],close:[0,0]}),Zz(t),Ie.each(t,(function(e,t){e.index=t,e.text=this.formatValueText(e.interval)}),this)},categories:function(){var e=this.option;Ie.each(e.categories,(function(e){this._pieceList.push({text:this.formatValueText(e,!0),value:e})}),this),Kz(e,this._pieceList)},pieces:function(){var e=this.option,t=this._pieceList;Ie.each(e.pieces,(function(e,n){Ie.isObject(e)||(e={value:e});var i={text:"",index:n};if(null!=e.label&&(i.text=e.label),e.hasOwnProperty("value")){var a=i.value=e.value;i.interval=[a,a],i.close=[1,1]}else{for(var r=i.interval=[],o=i.close=[0,0],s=[1,0,1],l=[-1/0,1/0],u=[],c=0;c<2;c++){for(var h=[["gte","gt","min"],["lte","lt","max"]][c],d=0;d<3&&null==r[c];d++)r[c]=e[h[d]],o[c]=s[d],u[c]=2===d;null==r[c]&&(r[c]=l[c])}u[0]&&r[1]===1/0&&(o[0]=0),u[1]&&r[0]===-1/0&&(o[1]=0),r[0]===r[1]&&o[0]&&o[1]&&(i.value=r[0])}i.visual=tT.retrieveVisuals(e),t.push(i)}),this),Kz(e,t),Zz(t),Ie.each(t,(function(e){var t=e.close,n=[["<","≤"][t[1]],[">","≥"][t[0]]];e.text=e.text||this.formatValueText(null!=e.value?e.value:e.interval,!1,n)}),this)}};function Kz(e,t){var n=e.inverse;("vertical"===e.orient?!n:n)&&t.reverse()}var Qz=ov.createSymbol;Rz.extend({type:"visualMap.piecewise",doRender:function(){var e=this.group;e.removeAll();var t=this.visualMapModel,n=t.get("textGap"),i=t.textStyleModel,a=i.getFont(),r=i.getTextColor(),o=this._getItemAlign(),s=t.itemSize,l=this._getViewData(),u=l.endsText,c=Ie.retrieve(t.get("showLabel",!0),!u);u&&this._renderEndsText(e,u[0],s,c,o),Ie.each(l.viewPieceList,(function(i){var l=i.piece,u=new lu.Group;u.onclick=Ie.bind(this._onItemClick,this,l),this._enableHoverLink(u,i.indexInModelPieceList);var h=t.getRepresentValue(l);if(this._createItemSymbol(u,h,[0,0,s[0],s[1]]),c){var d=this.visualMapModel.getValueState(h);u.add(new lu.Text({style:{x:"right"===o?-n:s[0]+n,y:s[1]/2,text:l.text,textVerticalAlign:"middle",textAlign:o,textFont:a,textFill:r,opacity:"outOfRange"===d?.5:1}}))}e.add(u)}),this),u&&this._renderEndsText(e,u[1],s,c,o),Uu.box(t.get("orient"),e,t.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},_enableHoverLink:function(e,t){function n(e){var n=this.visualMapModel;n.option.hoverLink&&this.api.dispatchAction({type:e,batch:Bz.makeHighDownBatch(n.findTargetDataIndices(t),n)})}e.on("mouseover",Ie.bind(n,this,"highlight")).on("mouseout",Ie.bind(n,this,"downplay"))},_getItemAlign:function(){var e=this.visualMapModel,t=e.option;if("vertical"===t.orient)return Bz.getItemAlign(e,this.api,e.itemSize);var n=t.align;return n&&"auto"!==n||(n="left"),n},_renderEndsText:function(e,t,n,i,a){if(t){var r=new lu.Group,o=this.visualMapModel.textStyleModel;r.add(new lu.Text({style:{x:i?"right"===a?n[0]:0:n[0]/2,y:n[1]/2,textVerticalAlign:"middle",textAlign:i?a:"center",text:t,textFont:o.getFont(),textFill:o.getTextColor()}})),e.add(r)}},_getViewData:function(){var e=this.visualMapModel,t=Ie.map(e.getPieceList(),(function(e,t){return{piece:e,indexInModelPieceList:t}})),n=e.get("text"),i=e.get("orient"),a=e.get("inverse");return("horizontal"===i?a:!a)?t.reverse():n&&(n=n.slice().reverse()),{viewPieceList:t,endsText:n}},_createItemSymbol:function(e,t,n){e.add(Qz(this.getControllerVisual(t,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(t,"color")))},_onItemClick:function(e){var t=this.visualMapModel,n=t.option,i=Ie.clone(n.selected),a=t.getSelectedMapKey(e);"single"===n.selectedMode?(i[a]=!0,Ie.each(i,(function(e,t){i[t]=t===a}))):i[a]=!i[a],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:i})}});ry.registerPreprocessor(_z);var $z,Jz="urn:schemas-microsoft-com:vml",eB="undefined"==typeof window?null:window,tB=!1,nB=eB&&eB.document;if(nB&&!ne.canvasSupported)try{!nB.namespaces.zrvml&&nB.namespaces.add("zrvml",Jz),$z=function(e){return nB.createElement("<zrvml:"+e+' class="zrvml">')}}catch(e){$z=function(e){return nB.createElement("<"+e+' xmlns="'+Jz+'" class="zrvml">')}}var iB={doc:nB,createNode:function(e){return $z(e)},initVML:function(){if(!tB&&nB){tB=!0;var e=nB.styleSheets;e.length<31?nB.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):e[0].addRule(".zrvml","behavior:url(#default#VML)")}}},aB=Le.applyTransform,rB=xo.CMD,oB=Math.round,sB=Math.sqrt,lB=Math.abs,uB=Math.cos,cB=Math.sin,hB=Math.max;if(!ne.canvasSupported){var dB=21600,fB=dB/2,pB=function(e){e.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",e.coordsize=dB+","+dB,e.coordorigin="0,0"},gB=function(e,t,n){return"rgb("+[e,t,n].join(",")+")"},mB=function(e,t){t&&e&&t.parentNode!==e&&e.appendChild(t)},vB=function(e,t){t&&e&&t.parentNode===e&&e.removeChild(t)},yB=function(e,t,n){return 1e5*(parseFloat(e)||0)+1e3*(parseFloat(t)||0)+n},_B=xa.parsePercent,xB=function(e,t,n){var i=en.parse(t);n=+n,isNaN(n)&&(n=1),i&&(e.color=gB(i[0],i[1],i[2]),e.opacity=n*i[3])},bB=function(e){var t=en.parse(e);return[gB(t[0],t[1],t[2]),t[3]]},wB=function(e,t,n,i){var a="fill"===t,r=e.getElementsByTagName(t)[0];null!=n[t]&&"none"!==n[t]&&(a||!a&&n.lineWidth)?(e[a?"filled":"stroked"]="true",n[t]instanceof Js&&vB(e,r),r||(r=iB.createNode(t)),a?function(e,t,n){var i=t.fill;if(null!=i)if(i instanceof Js){var a,r=0,o=[0,0],s=0,l=1,u=n.getBoundingRect(),c=u.width,h=u.height;if("linear"===i.type){a="gradient";var d=n.transform,f=[i.x*c,i.y*h],p=[i.x2*c,i.y2*h];d&&(aB(f,f,d),aB(p,p,d));var g=p[0]-f[0],m=p[1]-f[1];(r=180*Math.atan2(g,m)/Math.PI)<0&&(r+=360),r<1e-6&&(r=0)}else{a="gradientradial";f=[i.x*c,i.y*h],d=n.transform;var v=n.scale,y=c,_=h;o=[(f[0]-u.x)/y,(f[1]-u.y)/_],d&&aB(f,f,d),y/=v[0]*dB,_/=v[1]*dB;var x=hB(y,_);s=0/x,l=2*i.r/x-s}var b=i.colorStops.slice();b.sort((function(e,t){return e.offset-t.offset}));for(var w=b.length,S=[],M=[],T=0;T<w;T++){var I=b[T],A=bB(I.color);M.push(I.offset*l+s+" "+A[0]),0!==T&&T!==w-1||S.push(A)}if(w>=2){var D=S[0][0],C=S[1][0],O=S[0][1]*t.opacity,k=S[1][1]*t.opacity;e.type=a,e.method="none",e.focus="100%",e.angle=r,e.color=D,e.color2=C,e.colors=M.join(","),e.opacity=k,e.opacity2=O}"radial"===a&&(e.focusposition=o.join(","))}else xB(e,i,t.opacity)}(r,n,i):function(e,t){t.lineDash&&(e.dashstyle=t.lineDash.join(" ")),null==t.stroke||t.stroke instanceof Js||xB(e,t.stroke,t.opacity)}(r,n),mB(e,r)):(e[a?"filled":"stroked"]="false",vB(e,r))},SB=[[],[],[]];jo.prototype.brushVML=function(e){var t=this.style,n=this._vmlEl;n||(n=iB.createNode("shape"),pB(n),this._vmlEl=n),wB(n,"fill",t,this),wB(n,"stroke",t,this);var i=this.transform,a=null!=i,r=n.getElementsByTagName("stroke")[0];if(r){var o=t.lineWidth;if(a&&!t.strokeNoScale){var s=i[0]*i[3]-i[1]*i[2];o*=sB(lB(s))}r.weight=o+"px"}var l=this.path||(this.path=new xo);this.__dirtyPath&&(l.beginPath(),l.subPixelOptimize=!1,this.buildPath(l,this.shape),l.toStatic(),this.__dirtyPath=!1),n.path=function(e,t){var n,i,a,r,o,s,l=rB.M,u=rB.C,c=rB.L,h=rB.A,d=rB.Q,f=[],p=e.data,g=e.len();for(r=0;r<g;){switch(i="",n=0,a=p[r++]){case l:i=" m ",n=1,o=p[r++],s=p[r++],SB[0][0]=o,SB[0][1]=s;break;case c:i=" l ",n=1,o=p[r++],s=p[r++],SB[0][0]=o,SB[0][1]=s;break;case d:case u:i=" c ",n=3;var m,v,y=p[r++],_=p[r++],x=p[r++],b=p[r++];a===d?(m=x,v=b,x=(x+2*y)/3,b=(b+2*_)/3,y=(o+2*y)/3,_=(s+2*_)/3):(m=p[r++],v=p[r++]),SB[0][0]=y,SB[0][1]=_,SB[1][0]=x,SB[1][1]=b,SB[2][0]=m,SB[2][1]=v,o=m,s=v;break;case h:var w=0,S=0,M=1,T=1,I=0;t&&(w=t[4],S=t[5],M=sB(t[0]*t[0]+t[1]*t[1]),T=sB(t[2]*t[2]+t[3]*t[3]),I=Math.atan2(-t[1]/T,t[0]/M));var A=p[r++],D=p[r++],C=p[r++],O=p[r++],k=p[r++]+I,L=p[r++]+k+I;r++;var E=p[r++],N=A+uB(k)*C,P=D+cB(k)*O,R=(y=A+uB(L)*C,_=D+cB(L)*O,E?" wa ":" at ");Math.abs(N-y)<1e-4&&(Math.abs(L-k)>.01?E&&(N+=.0125):Math.abs(P-D)<1e-4?E&&N<A||!E&&N>A?_-=.0125:_+=.0125:E&&P<D||!E&&P>D?y+=.0125:y-=.0125),f.push(R,oB(((A-C)*M+w)*dB-fB),",",oB(((D-O)*T+S)*dB-fB),",",oB(((A+C)*M+w)*dB-fB),",",oB(((D+O)*T+S)*dB-fB),",",oB((N*M+w)*dB-fB),",",oB((P*T+S)*dB-fB),",",oB((y*M+w)*dB-fB),",",oB((_*T+S)*dB-fB)),o=y,s=_;break;case rB.R:var z=SB[0],B=SB[1];z[0]=p[r++],z[1]=p[r++],B[0]=z[0]+p[r++],B[1]=z[1]+p[r++],t&&(aB(z,z,t),aB(B,B,t)),z[0]=oB(z[0]*dB-fB),B[0]=oB(B[0]*dB-fB),z[1]=oB(z[1]*dB-fB),B[1]=oB(B[1]*dB-fB),f.push(" m ",z[0],",",z[1]," l ",B[0],",",z[1]," l ",B[0],",",B[1]," l ",z[0],",",B[1]);break;case rB.Z:f.push(" x ")}if(n>0){f.push(i);for(var V=0;V<n;V++){var H=SB[V];t&&aB(H,H,t),f.push(oB(H[0]*dB-fB),",",oB(H[1]*dB-fB),V<n-1?",":"")}}}return f.join("")}(l,this.transform),n.style.zIndex=yB(this.zlevel,this.z,this.z2),mB(e,n),null!=t.text?this.drawRectText(e,this.getBoundingRect()):this.removeRectText(e)},jo.prototype.onRemove=function(e){vB(e,this._vmlEl),this.removeRectText(e)},jo.prototype.onAdd=function(e){mB(e,this._vmlEl),this.appendRectText(e)};Da.prototype.brushVML=function(e){var t,n,i,a=this.style,r=a.image;if("object"==typeof(i=r)&&i.tagName&&"IMG"===i.tagName.toUpperCase()){var o=r.src;if(o===this._imageSrc)t=this._imageWidth,n=this._imageHeight;else{var s=r.runtimeStyle,l=s.width,u=s.height;s.width="auto",s.height="auto",t=r.width,n=r.height,s.width=l,s.height=u,this._imageSrc=o,this._imageWidth=t,this._imageHeight=n}r=o}else r===this._imageSrc&&(t=this._imageWidth,n=this._imageHeight);if(r){var c=a.x||0,h=a.y||0,d=a.width,f=a.height,p=a.sWidth,g=a.sHeight,m=a.sx||0,v=a.sy||0,y=p&&g,_=this._vmlEl;_||(_=iB.doc.createElement("div"),pB(_),this._vmlEl=_);var x,b=_.style,w=!1,S=1,M=1;if(this.transform&&(x=this.transform,S=sB(x[0]*x[0]+x[1]*x[1]),M=sB(x[2]*x[2]+x[3]*x[3]),w=x[1]||x[2]),w){var T=[c,h],I=[c+d,h],A=[c,h+f],D=[c+d,h+f];aB(T,T,x),aB(I,I,x),aB(A,A,x),aB(D,D,x);var C=hB(T[0],I[0],A[0],D[0]),O=hB(T[1],I[1],A[1],D[1]),k=[];k.push("M11=",x[0]/S,",","M12=",x[2]/M,",","M21=",x[1]/S,",","M22=",x[3]/M,",","Dx=",oB(c*S+x[4]),",","Dy=",oB(h*M+x[5])),b.padding="0 "+oB(C)+"px "+oB(O)+"px 0",b.filter="progid:DXImageTransform.Microsoft.Matrix("+k.join("")+", SizingMethod=clip)"}else x&&(c=c*S+x[4],h=h*M+x[5]),b.filter="",b.left=oB(c)+"px",b.top=oB(h)+"px";var L=this._imageEl,E=this._cropEl;L||(L=iB.doc.createElement("div"),this._imageEl=L);var N=L.style;if(y){if(t&&n)N.width=oB(S*t*d/p)+"px",N.height=oB(M*n*f/g)+"px";else{var P=new Image,R=this;P.onload=function(){P.onload=null,t=P.width,n=P.height,N.width=oB(S*t*d/p)+"px",N.height=oB(M*n*f/g)+"px",R._imageWidth=t,R._imageHeight=n,R._imageSrc=r},P.src=r}E||((E=iB.doc.createElement("div")).style.overflow="hidden",this._cropEl=E);var z=E.style;z.width=oB((d+m*d/p)*S),z.height=oB((f+v*f/g)*M),z.filter="progid:DXImageTransform.Microsoft.Matrix(Dx="+-m*d/p*S+",Dy="+-v*f/g*M+")",E.parentNode||_.appendChild(E),L.parentNode!==E&&E.appendChild(L)}else N.width=oB(S*d)+"px",N.height=oB(M*f)+"px",_.appendChild(L),E&&E.parentNode&&(_.removeChild(E),this._cropEl=null);var B="",V=a.opacity;V<1&&(B+=".Alpha(opacity="+oB(100*V)+") "),B+="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+r+", SizingMethod=scale)",N.filter=B,_.style.zIndex=yB(this.zlevel,this.z,this.z2),mB(e,_),null!=a.text&&this.drawRectText(e,this.getBoundingRect())}},Da.prototype.onRemove=function(e){vB(e,this._vmlEl),this._vmlEl=null,this._cropEl=null,this._imageEl=null,this.removeRectText(e)},Da.prototype.onAdd=function(e){mB(e,this._vmlEl),this.appendRectText(e)};var MB,TB={},IB=0,AB=document.createElement("div");Wi.$override("measureText",(function(e,t){var n=iB.doc;MB||((MB=n.createElement("div")).style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",iB.doc.body.appendChild(MB));try{MB.style.font=t}catch(e){}return MB.innerHTML="",MB.appendChild(n.createTextNode(e)),{width:MB.offsetWidth}}));for(var DB=new Hn,CB=function(e,t,n,i){var a=this.style;this.__dirty&&xa.normalizeTextStyle(a,!0);var r=a.text;if(null!=r&&(r+=""),r){if(a.rich){var o=Wi.parseRichText(r,a);r=[];for(var s=0;s<o.lines.length;s++){for(var l=o.lines[s].tokens,u=[],c=0;c<l.length;c++)u.push(l[c].text);r.push(u.join(""))}r=r.join("\n")}var h,d,f=a.textAlign,p=a.textVerticalAlign,g=function(e){var t=TB[e];if(!t){IB>100&&(IB=0,TB={});var n,i=AB.style;try{i.font=e,n=i.fontFamily.split(",")[0]}catch(e){}t={style:i.fontStyle||"normal",variant:i.fontVariant||"normal",weight:i.fontWeight||"normal",size:0|parseFloat(i.fontSize||12),family:n||"Microsoft YaHei"},TB[e]=t,IB++}return t}(a.font),m=g.style+" "+g.variant+" "+g.weight+" "+g.size+'px "'+g.family+'"';n=n||Wi.getBoundingRect(r,m,f,p,a.textPadding,a.textLineHeight);var v=this.transform;if(v&&!i&&(DB.copy(t),DB.applyTransform(v),t=DB),i)h=t.x,d=t.y;else{var y=a.textPosition;if(y instanceof Array)h=t.x+_B(y[0],t.width),d=t.y+_B(y[1],t.height),f=f||"left";else{var _=this.calculateTextPosition?this.calculateTextPosition({},a,t):Wi.calculateTextPosition({},a,t);h=_.x,d=_.y,f=f||_.textAlign,p=p||_.textVerticalAlign}}h=Wi.adjustTextX(h,n.width,f),d=Wi.adjustTextY(d,n.height,p),d+=n.height/2;var x,b,w,S=iB.createNode,M=this._textVmlEl;M?b=(x=(w=M.firstChild).nextSibling).nextSibling:(M=S("line"),x=S("path"),b=S("textpath"),w=S("skew"),b.style["v-text-align"]="left",pB(M),x.textpathok=!0,b.on=!0,M.from="0 0",M.to="1000 0.05",mB(M,w),mB(M,x),mB(M,b),this._textVmlEl=M);var T=[h,d],I=M.style;v&&i?(aB(T,T,v),w.on=!0,w.matrix=v[0].toFixed(3)+","+v[2].toFixed(3)+","+v[1].toFixed(3)+","+v[3].toFixed(3)+",0,0",w.offset=(oB(T[0])||0)+","+(oB(T[1])||0),w.origin="0 0",I.left="0px",I.top="0px"):(w.on=!1,I.left=oB(h)+"px",I.top=oB(d)+"px"),b.string=String(r).replace(/&/g,"&amp;").replace(/"/g,"&quot;");try{b.style.font=m}catch(e){}wB(M,"fill",{fill:a.textFill,opacity:a.opacity},this),wB(M,"stroke",{stroke:a.textStroke,opacity:a.opacity,lineDash:a.lineDash||null},this),M.style.zIndex=yB(this.zlevel,this.z,this.z2),mB(e,M)}},OB=function(e){vB(e,this._textVmlEl),this._textVmlEl=null},kB=function(e){mB(e,this._textVmlEl)},LB=[Ma,Ia,Da,jo,ds],EB=0;EB<LB.length;EB++){var NB=LB[EB].prototype;NB.drawRectText=CB,NB.removeRectText=OB,NB.appendRectText=kB}ds.prototype.brushVML=function(e){var t=this.style;null!=t.text?this.drawRectText(e,{x:t.x||0,y:t.y||0,width:0,height:0},this.getBoundingRect(),!0):this.removeRectText(e)},ds.prototype.onRemove=function(e){this.removeRectText(e)},ds.prototype.onAdd=function(e){this.appendRectText(e)}}var PB=Ie.each;function RB(e){return parseInt(e,10)}function zB(e,t){iB.initVML(),this.root=e,this.storage=t;var n=document.createElement("div"),i=document.createElement("div");n.style.cssText="display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",i.style.cssText="position:absolute;left:0;top:0;",e.appendChild(n),this._vmlRoot=i,this._vmlViewport=n,this.resize();var a=t.delFromStorage,r=t.addToStorage;t.delFromStorage=function(e){a.call(t,e),e&&e.onRemove&&e.onRemove(i)},t.addToStorage=function(e){e.onAdd&&e.onAdd(i),r.call(t,e)},this._firstPaint=!0}zB.prototype={constructor:zB,getType:function(){return"vml"},getViewportRoot:function(){return this._vmlViewport},getViewportRootOffset:function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},refresh:function(){var e=this.storage.getDisplayList(!0,!0);this._paintList(e)},_paintList:function(e){for(var t=this._vmlRoot,n=0;n<e.length;n++){var i=e[n];i.invisible||i.ignore?(i.__alreadyNotVisible||i.onRemove(t),i.__alreadyNotVisible=!0):(i.__alreadyNotVisible&&i.onAdd(t),i.__alreadyNotVisible=!1,i.__dirty&&(i.beforeBrush&&i.beforeBrush(),(i.brushVML||i.brush).call(i,t),i.afterBrush&&i.afterBrush())),i.__dirty=!1}this._firstPaint&&(this._vmlViewport.appendChild(t),this._firstPaint=!1)},resize:function(e,t){e=null==e?this._getWidth():e,t=null==t?this._getHeight():t;if(this._width!==e||this._height!==t){this._width=e,this._height=t;var n=this._vmlViewport.style;n.width=e+"px",n.height=t+"px"}},dispose:function(){this.root.innerHTML="",this._vmlRoot=this._vmlViewport=this.storage=null},getWidth:function(){return this._width},getHeight:function(){return this._height},clear:function(){this._vmlViewport&&this.root.removeChild(this._vmlViewport)},_getWidth:function(){var e=this.root,t=e.currentStyle;return(e.clientWidth||RB(t.width))-RB(t.paddingLeft)-RB(t.paddingRight)|0},_getHeight:function(){var e=this.root,t=e.currentStyle;return(e.clientHeight||RB(t.height))-RB(t.paddingTop)-RB(t.paddingBottom)|0}},PB(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],(function(e){zB.prototype[e]=function(){}}));var BB=zB;(0,gr.registerPainter)("vml",BB);var VB={createElement:function(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}},HB=VB.createElement,YB=xo.CMD,FB=Array.prototype.join,GB=Math.round,WB=Math.sin,jB=Math.cos,UB=Math.PI,ZB=2*Math.PI,XB=180/UB;function qB(e){return GB(1e4*e)/1e4}function KB(e){return e<1e-4&&e>-1e-4}function QB(e,t){t&&$B(e,"transform","matrix("+FB.call(t,",")+")")}function $B(e,t,n){(!n||"linear"!==n.type&&"radial"!==n.type)&&e.setAttribute(t,n)}function JB(e,t,n,i){if(function(e,t){var n=t?e.textFill:e.fill;return null!=n&&"none"!==n}(t,n)){var a=n?t.textFill:t.fill;$B(e,"fill",a="transparent"===a?"none":a),$B(e,"fill-opacity",null!=t.fillOpacity?t.fillOpacity*t.opacity:t.opacity)}else $B(e,"fill","none");if(function(e,t){var n=t?e.textStroke:e.stroke;return null!=n&&"none"!==n}(t,n)){var r=n?t.textStroke:t.stroke;$B(e,"stroke",r="transparent"===r?"none":r),$B(e,"stroke-width",(n?t.textStrokeWidth:t.lineWidth)/(!n&&t.strokeNoScale?i.getLineScale():1)),$B(e,"paint-order",n?"stroke":"fill"),$B(e,"stroke-opacity",null!=t.strokeOpacity?t.strokeOpacity:t.opacity),t.lineDash?($B(e,"stroke-dasharray",t.lineDash.join(",")),$B(e,"stroke-dashoffset",GB(t.lineDashOffset||0))):$B(e,"stroke-dasharray",""),t.lineCap&&$B(e,"stroke-linecap",t.lineCap),t.lineJoin&&$B(e,"stroke-linejoin",t.lineJoin),t.miterLimit&&$B(e,"stroke-miterlimit",t.miterLimit)}else $B(e,"stroke","none")}var eV={};eV.brush=function(e){var t=e.style,n=e.__svgEl;n||(n=HB("path"),e.__svgEl=n),e.path||e.createPathProxy();var i=e.path;if(e.__dirtyPath){i.beginPath(),i.subPixelOptimize=!1,e.buildPath(i,e.shape),e.__dirtyPath=!1;var a=function(e){for(var t=[],n=e.data,i=e.len(),a=0;a<i;){var r="",o=0;switch(n[a++]){case YB.M:r="M",o=2;break;case YB.L:r="L",o=2;break;case YB.Q:r="Q",o=4;break;case YB.C:r="C",o=6;break;case YB.A:var s=n[a++],l=n[a++],u=n[a++],c=n[a++],h=n[a++],d=n[a++],f=n[a++],p=n[a++],g=Math.abs(d),m=KB(g-ZB)||(p?d>=ZB:-d>=ZB),v=d>0?d%ZB:d%ZB+ZB,y=!1;y=!!m||!KB(g)&&v>=UB==!!p;var _=qB(s+u*jB(h)),x=qB(l+c*WB(h));m&&(d=p?ZB-1e-4:1e-4-ZB,y=!0,9===a&&t.push("M",_,x));var b=qB(s+u*jB(h+d)),w=qB(l+c*WB(h+d));t.push("A",qB(u),qB(c),GB(f*XB),+y,+p,b,w);break;case YB.Z:r="Z";break;case YB.R:b=qB(n[a++]),w=qB(n[a++]);var S=qB(n[a++]),M=qB(n[a++]);t.push("M",b,w,"L",b+S,w,"L",b+S,w+M,"L",b,w+M,"L",b,w)}r&&t.push(r);for(var T=0;T<o;T++)t.push(qB(n[a++]))}return t.join(" ")}(i);a.indexOf("NaN")<0&&$B(n,"d",a)}JB(n,t,!1,e),QB(n,e.transform),null!=t.text?sV(e,e.getBoundingRect()):uV(e)};var tV={brush:function(e){var t=e.style,n=t.image;n instanceof HTMLImageElement&&(n=n.src);if(n){var i=t.x||0,a=t.y||0,r=t.width,o=t.height,s=e.__svgEl;s||(s=HB("image"),e.__svgEl=s),n!==e.__imageSrc&&(!function(e,t,n){e.setAttributeNS("http://www.w3.org/1999/xlink",t,n)}(s,"href",n),e.__imageSrc=n),$B(s,"width",r),$B(s,"height",o),$B(s,"x",i),$B(s,"y",a),QB(s,e.transform),null!=t.text?sV(e,e.getBoundingRect()):uV(e)}}},nV={},iV=new Hn,aV={},rV=[],oV={left:"start",right:"end",center:"middle",middle:"middle"},sV=function(e,t){var n=e.style,i=e.transform,a=e instanceof ds||n.transformText;e.__dirty&&xa.normalizeTextStyle(n,!0);var r=n.text;if(null!=r&&(r+=""),xa.needDrawText(r,n)){null==r&&(r=""),!a&&i&&(iV.copy(t),iV.applyTransform(i),t=iV);var o=e.__textSvgEl;o||(o=HB("text"),e.__textSvgEl=o);var s=o.style,l=n.font||Wi.DEFAULT_FONT,u=o.__computedFont;l!==o.__styleFont&&(s.font=o.__styleFont=l,u=o.__computedFont=s.font);var c=n.textPadding,h=n.textLineHeight,d=e.__textCotentBlock;d&&!e.__dirtyText||(d=e.__textCotentBlock=Wi.parsePlainText(r,u,c,h,n.truncate));var f=d.outerHeight,p=d.lineHeight;xa.getBoxPosition(aV,e,n,t);var g=aV.baseX,m=aV.baseY,v=aV.textAlign||"left",y=aV.textVerticalAlign;!function(e,t,n,i,a,r,o){yt.identity(rV),t&&n&&yt.copy(rV,n);var s=i.textRotation;if(a&&s){var l=i.textOrigin;"center"===l?(r=a.width/2+a.x,o=a.height/2+a.y):l&&(r=l[0]+a.x,o=l[1]+a.y),rV[4]-=r,rV[5]-=o,yt.rotate(rV,rV,s),rV[4]+=r,rV[5]+=o}QB(e,rV)}(o,a,i,n,t,g,m);var _=g,x=Wi.adjustTextY(m,f,y);c&&(_=function(e,t,n){return"right"===t?e-n[1]:"center"===t?e+n[3]/2-n[1]/2:e+n[3]}(g,v,c),x+=c[0]),x+=p/2,JB(o,n,!0,e);var b=d.canCacheByTextString,w=e.__tspanList||(e.__tspanList=[]),S=w.length;if(b&&e.__canCacheByTextString&&e.__text===r){if(e.__dirtyText&&S)for(var M=0;M<S;++M)lV(w[M],v,_,x+M*p)}else{e.__text=r,e.__canCacheByTextString=b;var T=d.lines,I=T.length;for(M=0;M<I;M++){var A=w[M],D=T[M];A?A.__zrText!==D&&(A.innerHTML="",A.appendChild(document.createTextNode(D))):(A=w[M]=HB("tspan"),o.appendChild(A),A.appendChild(document.createTextNode(D))),lV(A,v,_,x+M*p)}if(S>I){for(;M<S;M++)o.removeChild(w[M]);w.length=I}}}};function lV(e,t,n,i){$B(e,"dominant-baseline","middle"),$B(e,"text-anchor",oV[t]),$B(e,"x",n),$B(e,"y",i)}function uV(e){e&&e.__textSvgEl&&(e.__textSvgEl.parentNode&&e.__textSvgEl.parentNode.removeChild(e.__textSvgEl),e.__textSvgEl=null,e.__tspanList=[],e.__text=null)}nV.drawRectText=sV,nV.brush=function(e){null!=e.style.text?sV(e,!1):uV(e)};var cV={path:eV,image:tV,text:nV};function hV(){}function dV(e,t,n,i){for(var a=0,r=t.length,o=0,s=0;a<r;a++){var l=t[a];if(l.removed){for(u=[],c=s;c<s+l.count;c++)u.push(c);l.indices=u,s+=l.count}else{for(var u=[],c=o;c<o+l.count;c++)u.push(c);l.indices=u,o+=l.count,l.added||(s+=l.count)}}return t}function fV(e){return{newPos:e.newPos,components:e.components.slice(0)}}hV.prototype={diff:function(e,t,n){n||(n=function(e,t){return e===t}),this.equals=n;var i=this;e=e.slice();var a=(t=t.slice()).length,r=e.length,o=1,s=a+r,l=[{newPos:-1,components:[]}],u=this.extractCommon(l[0],t,e,0);if(l[0].newPos+1>=a&&u+1>=r){for(var c=[],h=0;h<t.length;h++)c.push(h);return[{indices:c,count:t.length}]}function d(){for(var n=-1*o;n<=o;n+=2){var s,u=l[n-1],c=l[n+1],h=(c?c.newPos:0)-n;u&&(l[n-1]=void 0);var d=u&&u.newPos+1<a,f=c&&0<=h&&h<r;if(d||f){if(!d||f&&u.newPos<c.newPos?(s=fV(c),i.pushComponent(s.components,void 0,!0)):((s=u).newPos++,i.pushComponent(s.components,!0,void 0)),h=i.extractCommon(s,t,e,n),s.newPos+1>=a&&h+1>=r)return dV(i,s.components);l[n]=s}else l[n]=void 0}o++}for(;o<=s;){var f=d();if(f)return f}},pushComponent:function(e,t,n){var i=e[e.length-1];i&&i.added===t&&i.removed===n?e[e.length-1]={count:i.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,i){for(var a=t.length,r=n.length,o=e.newPos,s=o-i,l=0;o+1<a&&s+1<r&&this.equals(t[o+1],n[s+1]);)o++,s++,l++;return l&&e.components.push({count:l}),e.newPos=o,s},tokenize:function(e){return e.slice()},join:function(e){return e.slice()}};var pV=new hV;var gV=function(e,t,n){return pV.diff(e,t,n)},mV=VB.createElement,vV=cV.path,yV=cV.image,_V=cV.text;function xV(e,t,n,i,a){this._zrId=e,this._svgRoot=t,this._tagNames="string"==typeof n?[n]:n,this._markLabel=i,this._domName=a||"_dom",this.nextId=0}xV.prototype.createElement=mV,xV.prototype.getDefs=function(e){var t=this._svgRoot,n=this._svgRoot.getElementsByTagName("defs");return 0===n.length?e?((n=t.insertBefore(this.createElement("defs"),t.firstChild)).contains||(n.contains=function(e){var t=n.children;if(!t)return!1;for(var i=t.length-1;i>=0;--i)if(t[i]===e)return!0;return!1}),n):null:n[0]},xV.prototype.update=function(e,t){if(e){var n=this.getDefs(!1);if(e[this._domName]&&n.contains(e[this._domName]))"function"==typeof t&&t(e);else{var i=this.add(e);i&&(e[this._domName]=i)}}},xV.prototype.addDom=function(e){this.getDefs(!0).appendChild(e)},xV.prototype.removeDom=function(e){var t=this.getDefs(!1);t&&e[this._domName]&&(t.removeChild(e[this._domName]),e[this._domName]=null)},xV.prototype.getDoms=function(){var e=this.getDefs(!1);if(!e)return[];var t=[];return Ie.each(this._tagNames,(function(n){var i=e.getElementsByTagName(n);t=t.concat([].slice.call(i))})),t},xV.prototype.markAllUnused=function(){var e=this.getDoms(),t=this;Ie.each(e,(function(e){e[t._markLabel]="0"}))},xV.prototype.markUsed=function(e){e&&(e[this._markLabel]="1")},xV.prototype.removeUnused=function(){var e=this.getDefs(!1);if(e){var t=this.getDoms(),n=this;Ie.each(t,(function(t){"1"!==t[n._markLabel]&&e.removeChild(t)}))}},xV.prototype.getSvgProxy=function(e){return e instanceof jo?vV:e instanceof Da?yV:e instanceof ds?_V:vV},xV.prototype.getTextSvgElement=function(e){return e.__textSvgEl},xV.prototype.getSvgElement=function(e){return e.__svgEl};var bV=xV;function wV(e,t){bV.call(this,e,t,["linearGradient","radialGradient"],"__gradient_in_use__")}Ie.inherits(wV,bV),wV.prototype.addWithoutUpdate=function(e,t){if(t&&t.style){var n=this;Ie.each(["fill","stroke"],(function(i){if(t.style[i]&&("linear"===t.style[i].type||"radial"===t.style[i].type)){var a,r=t.style[i],o=n.getDefs(!0);r._dom?(a=r._dom,o.contains(r._dom)||n.addDom(a)):a=n.add(r),n.markUsed(t);var s=a.getAttribute("id");e.setAttribute(i,"url(#"+s+")")}}))}},wV.prototype.add=function(e){var t;if("linear"===e.type)t=this.createElement("linearGradient");else{if("radial"!==e.type)return null;t=this.createElement("radialGradient")}return e.id=e.id||this.nextId++,t.setAttribute("id","zr"+this._zrId+"-gradient-"+e.id),this.updateDom(e,t),this.addDom(t),t},wV.prototype.update=function(e){var t=this;bV.prototype.update.call(this,e,(function(){var n=e.type,i=e._dom.tagName;"linear"===n&&"linearGradient"===i||"radial"===n&&"radialGradient"===i?t.updateDom(e,e._dom):(t.removeDom(e),t.add(e))}))},wV.prototype.updateDom=function(e,t){if("linear"===e.type)t.setAttribute("x1",e.x),t.setAttribute("y1",e.y),t.setAttribute("x2",e.x2),t.setAttribute("y2",e.y2);else{if("radial"!==e.type)return;t.setAttribute("cx",e.x),t.setAttribute("cy",e.y),t.setAttribute("r",e.r)}e.global?t.setAttribute("gradientUnits","userSpaceOnUse"):t.setAttribute("gradientUnits","objectBoundingBox"),t.innerHTML="";for(var n=e.colorStops,i=0,a=n.length;i<a;++i){var r=this.createElement("stop");r.setAttribute("offset",100*n[i].offset+"%");var o=n[i].color;if(o.indexOf(!1)){var s=en.parse(o)[3],l=en.toHex(o);r.setAttribute("stop-color","#"+l),r.setAttribute("stop-opacity",s)}else r.setAttribute("stop-color",n[i].color);t.appendChild(r)}e._dom=t},wV.prototype.markUsed=function(e){if(e.style){var t=e.style.fill;t&&t._dom&&bV.prototype.markUsed.call(this,t._dom),(t=e.style.stroke)&&t._dom&&bV.prototype.markUsed.call(this,t._dom)}};var SV=wV;function MV(e,t){bV.call(this,e,t,"clipPath","__clippath_in_use__")}Ie.inherits(MV,bV),MV.prototype.update=function(e){var t=this.getSvgElement(e);t&&this.updateDom(t,e.__clipPaths,!1);var n=this.getTextSvgElement(e);n&&this.updateDom(n,e.__clipPaths,!0),this.markUsed(e)},MV.prototype.updateDom=function(e,t,n){if(t&&t.length>0){var i,a,r=this.getDefs(!0),o=t[0],s=n?"_textDom":"_dom";o[s]?(a=o[s].getAttribute("id"),i=o[s],r.contains(i)||r.appendChild(i)):(a="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,(i=this.createElement("clipPath")).setAttribute("id",a),r.appendChild(i),o[s]=i);var l=this.getSvgProxy(o);if(o.transform&&o.parent.invTransform&&!n){var u=Array.prototype.slice.call(o.transform);yt.mul(o.transform,o.parent.invTransform,o.transform),l.brush(o),o.transform=u}else l.brush(o);var c=this.getSvgElement(o);i.innerHTML="",i.appendChild(c.cloneNode()),e.setAttribute("clip-path","url(#"+a+")"),t.length>1&&this.updateDom(i,t.slice(1),n)}else e&&e.setAttribute("clip-path","none")},MV.prototype.markUsed=function(e){var t=this;e.__clipPaths&&Ie.each(e.__clipPaths,(function(e){e._dom&&bV.prototype.markUsed.call(t,e._dom),e._textDom&&bV.prototype.markUsed.call(t,e._textDom)}))};var TV=MV;function IV(e,t){bV.call(this,e,t,["filter"],"__filter_in_use__","_shadowDom")}function AV(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY||e.textShadowBlur||e.textShadowOffsetX||e.textShadowOffsetY)}Ie.inherits(IV,bV),IV.prototype.addWithoutUpdate=function(e,t){if(t&&AV(t.style)){var n;if(t._shadowDom)n=t._shadowDom,this.getDefs(!0).contains(t._shadowDom)||this.addDom(n);else n=this.add(t);this.markUsed(t);var i=n.getAttribute("id");e.style.filter="url(#"+i+")"}},IV.prototype.add=function(e){var t=this.createElement("filter");return e._shadowDomId=e._shadowDomId||this.nextId++,t.setAttribute("id","zr"+this._zrId+"-shadow-"+e._shadowDomId),this.updateDom(e,t),this.addDom(t),t},IV.prototype.update=function(e,t){if(AV(t.style)){var n=this;bV.prototype.update.call(this,t,(function(){n.updateDom(t,t._shadowDom)}))}else this.remove(e,t)},IV.prototype.remove=function(e,t){null!=t._shadowDomId&&(this.removeDom(e),e.style.filter="")},IV.prototype.updateDom=function(e,t){var n=t.getElementsByTagName("feDropShadow");n=0===n.length?this.createElement("feDropShadow"):n[0];var i,a,r,o,s=e.style,l=e.scale&&e.scale[0]||1,u=e.scale&&e.scale[1]||1;if(s.shadowBlur||s.shadowOffsetX||s.shadowOffsetY)i=s.shadowOffsetX||0,a=s.shadowOffsetY||0,r=s.shadowBlur,o=s.shadowColor;else{if(!s.textShadowBlur)return void this.removeDom(t,s);i=s.textShadowOffsetX||0,a=s.textShadowOffsetY||0,r=s.textShadowBlur,o=s.textShadowColor}n.setAttribute("dx",i/l),n.setAttribute("dy",a/u),n.setAttribute("flood-color",o);var c=r/2/l+" "+r/2/u;n.setAttribute("stdDeviation",c),t.setAttribute("x","-100%"),t.setAttribute("y","-100%"),t.setAttribute("width",Math.ceil(r/2*200)+"%"),t.setAttribute("height",Math.ceil(r/2*200)+"%"),t.appendChild(n),e._shadowDom=t},IV.prototype.markUsed=function(e){e._shadowDom&&bV.prototype.markUsed.call(this,e._shadowDom)};var DV=IV,CV=VB.createElement,OV=cV.path,kV=cV.image,LV=cV.text;function EV(e){return parseInt(e,10)}function NV(e,t){return t&&e&&t.parentNode!==e}function PV(e,t,n){if(NV(e,t)&&n){var i=n.nextSibling;i?e.insertBefore(t,i):e.appendChild(t)}}function RV(e,t){if(NV(e,t)){var n=e.firstChild;n?e.insertBefore(t,n):e.appendChild(t)}}function zV(e,t){t&&e&&t.parentNode===e&&e.removeChild(t)}function BV(e){return e.__textSvgEl}function VV(e){return e.__svgEl}var HV=function(e,t,n,i){this.root=e,this.storage=t,this._opts=n=Ie.extend({},n||{});var a=CV("svg");a.setAttribute("xmlns","http://www.w3.org/2000/svg"),a.setAttribute("version","1.1"),a.setAttribute("baseProfile","full"),a.style.cssText="user-select:none;position:absolute;left:0;top:0;";var r=CV("g");a.appendChild(r);var o=CV("g");a.appendChild(o),this.gradientManager=new SV(i,o),this.clipPathManager=new TV(i,o),this.shadowManager=new DV(i,o);var s=document.createElement("div");s.style.cssText="overflow:hidden;position:relative",this._svgDom=a,this._svgRoot=o,this._backgroundRoot=r,this._viewport=s,e.appendChild(s),s.appendChild(a),this.resize(n.width,n.height),this._visibleList=[]};HV.prototype={constructor:HV,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getSvgDom:function(){return this._svgDom},getSvgRoot:function(){return this._svgRoot},getViewportRootOffset:function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},refresh:function(){var e=this.storage.getDisplayList(!0);this._paintList(e)},setBackgroundColor:function(e){this._backgroundRoot&&this._backgroundNode&&this._backgroundRoot.removeChild(this._backgroundNode);var t=CV("rect");t.setAttribute("width",this.getWidth()),t.setAttribute("height",this.getHeight()),t.setAttribute("x",0),t.setAttribute("y",0),t.setAttribute("id",0),t.style.fill=e,this._backgroundRoot.appendChild(t),this._backgroundNode=t},_paintList:function(e){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused(),this.shadowManager.markAllUnused();var t,n,i=this._svgRoot,a=this._visibleList,r=e.length,o=[];for(t=0;t<r;t++){var s=e[t],l=(n=s)instanceof jo?OV:n instanceof Da?kV:n instanceof ds?LV:OV,u=VV(s)||BV(s);s.invisible||(s.__dirty&&(l&&l.brush(s),this.clipPathManager.update(s),s.style&&(this.gradientManager.update(s.style.fill),this.gradientManager.update(s.style.stroke),this.shadowManager.update(u,s)),s.__dirty=!1),o.push(s))}var c,h=gV(a,o);for(t=0;t<h.length;t++){if((p=h[t]).removed)for(var d=0;d<p.count;d++){u=VV(s=a[p.indices[d]]);var f=BV(s);zV(i,u),zV(i,f)}}for(t=0;t<h.length;t++){var p;if((p=h[t]).added)for(d=0;d<p.count;d++){u=VV(s=o[p.indices[d]]),f=BV(s);c?PV(i,u,c):RV(i,u),u?PV(i,f,u):c?PV(i,f,c):RV(i,f),PV(i,f,u),c=f||u||c,this.gradientManager.addWithoutUpdate(u||f,s),this.shadowManager.addWithoutUpdate(u||f,s),this.clipPathManager.markUsed(s)}else if(!p.removed)for(d=0;d<p.count;d++){u=VV(s=o[p.indices[d]]),f=BV(s),u=VV(s),f=BV(s);this.gradientManager.markUsed(s),this.gradientManager.addWithoutUpdate(u||f,s),this.shadowManager.markUsed(s),this.shadowManager.addWithoutUpdate(u||f,s),this.clipPathManager.markUsed(s),f&&PV(i,f,u),c=u||f||c}}this.gradientManager.removeUnused(),this.clipPathManager.removeUnused(),this.shadowManager.removeUnused(),this._visibleList=o},_getDefs:function(e){var t,n=this._svgDom;return 0===(t=n.getElementsByTagName("defs")).length?e?((t=n.insertBefore(CV("defs"),n.firstChild)).contains||(t.contains=function(e){var n=t.children;if(!n)return!1;for(var i=n.length-1;i>=0;--i)if(n[i]===e)return!0;return!1}),t):null:t[0]},resize:function(e,t){var n=this._viewport;n.style.display="none";var i=this._opts;if(null!=e&&(i.width=e),null!=t&&(i.height=t),e=this._getSize(0),t=this._getSize(1),n.style.display="",this._width!==e||this._height!==t){this._width=e,this._height=t;var a=n.style;a.width=e+"px",a.height=t+"px";var r=this._svgDom;r.setAttribute("width",e),r.setAttribute("height",t)}this._backgroundNode&&(this._backgroundNode.setAttribute("width",e),this._backgroundNode.setAttribute("height",t))},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(e){var t=this._opts,n=["width","height"][e],i=["clientWidth","clientHeight"][e],a=["paddingLeft","paddingTop"][e],r=["paddingRight","paddingBottom"][e];if(null!=t[n]&&"auto"!==t[n])return parseFloat(t[n]);var o=this.root,s=document.defaultView.getComputedStyle(o);return(o[i]||EV(s[n])||EV(o.style[n]))-(EV(s[a])||0)-(EV(s[r])||0)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._backgroundRoot=this._svgDom=this._backgroundNode=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)},toDataURL:function(){return this.refresh(),"data:image/svg+xml;charset=UTF-8,"+encodeURIComponent(this._svgDom.outerHTML.replace(/></g,">\n\r<"))}},Ie.each(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","pathToImage"],(function(e){HV.prototype[e]=function(){}}));var YV=HV;(0,gr.registerPainter)("svg",YV);var FV,GV,WV,jV,UV=$((function(e,t){!function(){for(var e in ry){if(null==ry||!ry.hasOwnProperty(e)||"default"===e||"__esModule"===e)return;t[e]=ry[e]}}(),function(){for(var e in ay){if(null==ay||!ay.hasOwnProperty(e)||"default"===e||"__esModule"===e)return;t[e]=ay[e]}}()})),ZV=(FV=UV)&&FV.__esModule&&Object.prototype.hasOwnProperty.call(FV,"default")?FV.default:FV,XV=$((function(e,t){var n;n=function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var a=t[i]={exports:{},id:i,loaded:!1};return e[i].call(a.exports,a,a.exports,n),a.loaded=!0,a.exports}return n.m=e,n.c=t,n.p="",n(0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){var i=n(2),a=n(3),r=n(4),o=n(22);function s(e){var t=new r(e),n=a(r.prototype.request,t);return i.extend(n,r.prototype,t),i.extend(n,t),n}var l=s(n(10));l.Axios=r,l.create=function(e){return s(o(l.defaults,e))},l.Cancel=n(23),l.CancelToken=n(24),l.isCancel=n(9),l.all=function(e){return Promise.all(e)},l.spread=n(25),e.exports=l,e.exports.default=l},function(e,t,n){var i=n(3),a=Object.prototype.toString;function r(e){return"[object Array]"===a.call(e)}function o(e){return void 0===e}function s(e){return null!==e&&"object"==typeof e}function l(e){return"[object Function]"===a.call(e)}function u(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),r(e))for(var n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.call(null,e[a],a,e)}e.exports={isArray:r,isArrayBuffer:function(e){return"[object ArrayBuffer]"===a.call(e)},isBuffer:function(e){return null!==e&&!o(e)&&null!==e.constructor&&!o(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:s,isUndefined:o,isDate:function(e){return"[object Date]"===a.call(e)},isFile:function(e){return"[object File]"===a.call(e)},isBlob:function(e){return"[object Blob]"===a.call(e)},isFunction:l,isStream:function(e){return s(e)&&l(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:u,merge:function e(){var t={};function n(n,i){"object"==typeof t[i]&&"object"==typeof n?t[i]=e(t[i],n):t[i]=n}for(var i=0,a=arguments.length;i<a;i++)u(arguments[i],n);return t},deepMerge:function e(){var t={};function n(n,i){"object"==typeof t[i]&&"object"==typeof n?t[i]=e(t[i],n):t[i]="object"==typeof n?e({},n):n}for(var i=0,a=arguments.length;i<a;i++)u(arguments[i],n);return t},extend:function(e,t,n){return u(t,(function(t,a){e[a]=n&&"function"==typeof t?i(t,n):t})),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}}},function(e,t){e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),i=0;i<n.length;i++)n[i]=arguments[i];return e.apply(t,n)}}},function(e,t,n){var i=n(2),a=n(5),r=n(6),o=n(7),s=n(22);function l(e){this.defaults=e,this.interceptors={request:new r,response:new r}}l.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[o,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)n=n.then(t.shift(),t.shift());return n},l.prototype.getUri=function(e){return e=s(this.defaults,e),a(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},i.forEach(["delete","get","head","options"],(function(e){l.prototype[e]=function(t,n){return this.request(i.merge(n||{},{method:e,url:t}))}})),i.forEach(["post","put","patch"],(function(e){l.prototype[e]=function(t,n,a){return this.request(i.merge(a||{},{method:e,url:t,data:n}))}})),e.exports=l},function(e,t,n){var i=n(2);function a(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var r;if(n)r=n(t);else if(i.isURLSearchParams(t))r=t.toString();else{var o=[];i.forEach(t,(function(e,t){null!=e&&(i.isArray(e)?t+="[]":e=[e],i.forEach(e,(function(e){i.isDate(e)?e=e.toISOString():i.isObject(e)&&(e=JSON.stringify(e)),o.push(a(t)+"="+a(e))})))})),r=o.join("&")}if(r){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e}},function(e,t,n){var i=n(2);function a(){this.handlers=[]}a.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},a.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},a.prototype.forEach=function(e){i.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=a},function(e,t,n){var i=n(2),a=n(8),r=n(9),o=n(10);function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return s(e),e.headers=e.headers||{},e.data=a(e.data,e.headers,e.transformRequest),e.headers=i.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),i.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||o.adapter)(e).then((function(t){return s(e),t.data=a(t.data,t.headers,e.transformResponse),t}),(function(t){return r(t)||(s(e),t&&t.response&&(t.response.data=a(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},function(e,t,n){var i=n(2);e.exports=function(e,t,n){return i.forEach(n,(function(n){e=n(e,t)})),e}},function(e,t){e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,n){var i=n(2),a=n(11),r={"Content-Type":"application/x-www-form-urlencoded"};function o(e,t){!i.isUndefined(e)&&i.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var s,l={adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(s=n(12)),s),transformRequest:[function(e,t){return a(t,"Accept"),a(t,"Content-Type"),i.isFormData(e)||i.isArrayBuffer(e)||i.isBuffer(e)||i.isStream(e)||i.isFile(e)||i.isBlob(e)?e:i.isArrayBufferView(e)?e.buffer:i.isURLSearchParams(e)?(o(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):i.isObject(e)?(o(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};i.forEach(["delete","get","head"],(function(e){l.headers[e]={}})),i.forEach(["post","put","patch"],(function(e){l.headers[e]=i.merge(r)})),e.exports=l},function(e,t,n){var i=n(2);e.exports=function(e,t){i.forEach(e,(function(n,i){i!==t&&i.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[i])}))}},function(e,t,n){var i=n(2),a=n(13),r=n(5),o=n(16),s=n(19),l=n(20),u=n(14);e.exports=function(e){return new Promise((function(t,c){var h=e.data,d=e.headers;i.isFormData(h)&&delete d["Content-Type"];var f=new XMLHttpRequest;if(e.auth){var p=e.auth.username||"",g=e.auth.password||"";d.Authorization="Basic "+btoa(p+":"+g)}var m=o(e.baseURL,e.url);if(f.open(e.method.toUpperCase(),r(m,e.params,e.paramsSerializer),!0),f.timeout=e.timeout,f.onreadystatechange=function(){if(f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in f?s(f.getAllResponseHeaders()):null,i={data:e.responseType&&"text"!==e.responseType?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:n,config:e,request:f};a(t,c,i),f=null}},f.onabort=function(){f&&(c(u("Request aborted",e,"ECONNABORTED",f)),f=null)},f.onerror=function(){c(u("Network Error",e,null,f)),f=null},f.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),c(u(t,e,"ECONNABORTED",f)),f=null},i.isStandardBrowserEnv()){var v=n(21),y=(e.withCredentials||l(m))&&e.xsrfCookieName?v.read(e.xsrfCookieName):void 0;y&&(d[e.xsrfHeaderName]=y)}if("setRequestHeader"in f&&i.forEach(d,(function(e,t){void 0===h&&"content-type"===t.toLowerCase()?delete d[t]:f.setRequestHeader(t,e)})),i.isUndefined(e.withCredentials)||(f.withCredentials=!!e.withCredentials),e.responseType)try{f.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&f.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&f.upload&&f.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){f&&(f.abort(),c(e),f=null)})),void 0===h&&(h=null),f.send(h)}))}},function(e,t,n){var i=n(14);e.exports=function(e,t,n){var a=n.config.validateStatus;!a||a(n.status)?e(n):t(i("Request failed with status code "+n.status,n.config,null,n.request,n))}},function(e,t,n){var i=n(15);e.exports=function(e,t,n,a,r){var o=new Error(e);return i(o,t,n,a,r)}},function(e,t){e.exports=function(e,t,n,i,a){return e.config=t,n&&(e.code=n),e.request=i,e.response=a,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},function(e,t,n){var i=n(17),a=n(18);e.exports=function(e,t){return e&&!i(t)?a(e,t):t}},function(e,t){e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t){e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){var i=n(2),a=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,r,o={};return e?(i.forEach(e.split("\n"),(function(e){if(r=e.indexOf(":"),t=i.trim(e.substr(0,r)).toLowerCase(),n=i.trim(e.substr(r+1)),t){if(o[t]&&a.indexOf(t)>=0)return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([n]):o[t]?o[t]+", "+n:n}})),o):o}},function(e,t,n){var i=n(2);e.exports=i.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function a(e){var i=e;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=a(window.location.href),function(t){var n=i.isString(t)?a(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},function(e,t,n){var i=n(2);e.exports=i.isStandardBrowserEnv()?{write:function(e,t,n,a,r,o){var s=[];s.push(e+"="+encodeURIComponent(t)),i.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),i.isString(a)&&s.push("path="+a),i.isString(r)&&s.push("domain="+r),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,n){var i=n(2);e.exports=function(e,t){t=t||{};var n={},a=["url","method","params","data"],r=["headers","auth","proxy"],o=["baseURL","url","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"];i.forEach(a,(function(e){void 0!==t[e]&&(n[e]=t[e])})),i.forEach(r,(function(a){i.isObject(t[a])?n[a]=i.deepMerge(e[a],t[a]):void 0!==t[a]?n[a]=t[a]:i.isObject(e[a])?n[a]=i.deepMerge(e[a]):void 0!==e[a]&&(n[a]=e[a])})),i.forEach(o,(function(i){void 0!==t[i]?n[i]=t[i]:void 0!==e[i]&&(n[i]=e[i])}));var s=a.concat(r).concat(o),l=Object.keys(t).filter((function(e){return-1===s.indexOf(e)}));return i.forEach(l,(function(i){void 0!==t[i]?n[i]=t[i]:void 0!==e[i]&&(n[i]=e[i])})),n}},function(e,t){function n(e){this.message=e}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,e.exports=n},function(e,t,n){var i=n(23);function a(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new i(e),t(n.reason))}))}a.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},a.source=function(){var e;return{token:new a((function(t){e=t})),cancel:e}},e.exports=a},function(e,t){e.exports=function(e){return function(t){return e.apply(null,t)}}}])},e.exports=n()}));!function(e){e.DIMENSION="dimension",e.MAP="map",e.INDICATOR="indicator",e.DETAIL="detail"}(WV||(WV={})),function(e){e.TABLE="table",e.PIE="pie",e.HISTOGRAM_LINE="histogram-line",e.HISTOGRAM_BAR="histogram-bar",e.BAR="bar",e.HISTOGRAM_MIX="histogram-mix",e.GAUGE="gauge",e.INDICATOR_CARD="indicator_card",e.MAP="map",e.DETAIL="detail"}(jV||(jV={}));Object.freeze(((GV={})[jV.TABLE]=Object.freeze({key:jV.TABLE,name:"表格",iconfont:"icon-table02",iconColor:"#2b9f7f",dataConfigMode:WV.DIMENSION}),GV[jV.PIE]=Object.freeze({key:jV.PIE,name:"饼图",iconfont:"icon-pie_chart",iconColor:"#11c5d4",dataConfigMode:WV.DIMENSION}),GV[jV.HISTOGRAM_LINE]=Object.freeze({key:jV.HISTOGRAM_LINE,name:"线图",iconfont:"icon-line_chart",iconColor:"#0091ff",dataConfigMode:WV.DIMENSION}),GV[jV.HISTOGRAM_BAR]=Object.freeze({key:jV.HISTOGRAM_BAR,name:"柱状图",iconfont:"icon-bar_chart",iconColor:"#ff822f",dataConfigMode:WV.DIMENSION}),GV[jV.INDICATOR_CARD]=Object.freeze({key:jV.INDICATOR_CARD,name:"指标卡",iconfont:"icon-indicator-card",iconColor:"#efce30",dataConfigMode:WV.INDICATOR}),GV[jV.BAR]=Object.freeze({key:jV.BAR,name:"条形图",iconfont:"icon-list",iconColor:"#ff5c31",dataConfigMode:WV.DIMENSION}),GV[jV.HISTOGRAM_MIX]=Object.freeze({key:jV.HISTOGRAM_MIX,name:"柱线混合图",iconfont:"icon-chart",iconColor:"#2b9f7f",dataConfigMode:WV.DIMENSION}),GV[jV.GAUGE]=Object.freeze({key:jV.GAUGE,name:"仪表盘",iconfont:"icon-dash-board",iconColor:"#5071f0",dataConfigMode:WV.DIMENSION}),GV[jV.MAP]=Object.freeze({key:jV.MAP,name:"地图",iconfont:"icon-thermal-map",iconColor:"#2b9f7f",dataConfigMode:WV.MAP}),GV[jV.DETAIL]=Object.freeze({key:jV.DETAIL,name:"明细表",iconfont:"icon-detail-list",iconColor:"#2b9f7f",dataConfigMode:WV.DETAIL}),GV));var qV,KV,QV,$V=$((function(e,t){e.exports=function(){var t,n;function i(){return t.apply(null,arguments)}function a(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function r(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function o(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function s(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(o(e,t))return!1;return!0}function l(e){return void 0===e}function u(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function c(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function h(e,t){var n,i=[];for(n=0;n<e.length;++n)i.push(t(e[n],n));return i}function d(e,t){for(var n in t)o(t,n)&&(e[n]=t[n]);return o(t,"toString")&&(e.toString=t.toString),o(t,"valueOf")&&(e.valueOf=t.valueOf),e}function f(e,t,n,i){return Tt(e,t,n,i,!0).utc()}function p(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function g(e){if(null==e._isValid){var t=p(e),i=n.call(t.parsedDateParts,(function(e){return null!=e})),a=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&i);if(e._strict&&(a=a&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return a;e._isValid=a}return e._isValid}function m(e){var t=f(NaN);return null!=e?d(p(t),e):p(t).userInvalidated=!0,t}n=Array.prototype.some?Array.prototype.some:function(e){var t,n=Object(this),i=n.length>>>0;for(t=0;t<i;t++)if(t in n&&e.call(this,n[t],t,n))return!0;return!1};var v=i.momentProperties=[],y=!1;function _(e,t){var n,i,a;if(l(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),l(t._i)||(e._i=t._i),l(t._f)||(e._f=t._f),l(t._l)||(e._l=t._l),l(t._strict)||(e._strict=t._strict),l(t._tzm)||(e._tzm=t._tzm),l(t._isUTC)||(e._isUTC=t._isUTC),l(t._offset)||(e._offset=t._offset),l(t._pf)||(e._pf=p(t)),l(t._locale)||(e._locale=t._locale),v.length>0)for(n=0;n<v.length;n++)l(a=t[i=v[n]])||(e[i]=a);return e}function x(e){_(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===y&&(y=!0,i.updateOffset(this),y=!1)}function b(e){return e instanceof x||null!=e&&null!=e._isAMomentObject}function w(e){!1===i.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function S(e,t){var n=!0;return d((function(){if(null!=i.deprecationHandler&&i.deprecationHandler(null,e),n){var a,r,s,l=[];for(r=0;r<arguments.length;r++){if(a="","object"==typeof arguments[r]){for(s in a+="\n["+r+"] ",arguments[0])o(arguments[0],s)&&(a+=s+": "+arguments[0][s]+", ");a=a.slice(0,-2)}else a=arguments[r];l.push(a)}w(e+"\nArguments: "+Array.prototype.slice.call(l).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)}),t)}var M,T={};function I(e,t){null!=i.deprecationHandler&&i.deprecationHandler(e,t),T[e]||(w(t),T[e]=!0)}function A(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function D(e,t){var n,i=d({},e);for(n in t)o(t,n)&&(r(e[n])&&r(t[n])?(i[n]={},d(i[n],e[n]),d(i[n],t[n])):null!=t[n]?i[n]=t[n]:delete i[n]);for(n in e)o(e,n)&&!o(t,n)&&r(e[n])&&(i[n]=d({},i[n]));return i}function C(e){null!=e&&this.set(e)}function O(e,t,n){var i=""+Math.abs(e),a=t-i.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,a)).toString().substr(1)+i}i.suppressDeprecationWarnings=!1,i.deprecationHandler=null,M=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)o(e,t)&&n.push(t);return n};var k=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,L=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,E={},N={};function P(e,t,n,i){var a=i;"string"==typeof i&&(a=function(){return this[i]()}),e&&(N[e]=a),t&&(N[t[0]]=function(){return O(a.apply(this,arguments),t[1],t[2])}),n&&(N[n]=function(){return this.localeData().ordinal(a.apply(this,arguments),e)})}function R(e,t){return e.isValid()?(t=z(t,e.localeData()),E[t]=E[t]||function(e){var t,n,i,a=e.match(k);for(t=0,n=a.length;t<n;t++)N[a[t]]?a[t]=N[a[t]]:a[t]=(i=a[t]).match(/\[[\s\S]/)?i.replace(/^\[|\]$/g,""):i.replace(/\\/g,"");return function(t){var i,r="";for(i=0;i<n;i++)r+=A(a[i])?a[i].call(t,e):a[i];return r}}(t),E[t](e)):e.localeData().invalidDate()}function z(e,t){var n=5;function i(e){return t.longDateFormat(e)||e}for(L.lastIndex=0;n>=0&&L.test(e);)e=e.replace(L,i),L.lastIndex=0,n-=1;return e}var B={};function V(e,t){var n=e.toLowerCase();B[n]=B[n+"s"]=B[t]=e}function H(e){return"string"==typeof e?B[e]||B[e.toLowerCase()]:void 0}function Y(e){var t,n,i={};for(n in e)o(e,n)&&(t=H(n))&&(i[t]=e[n]);return i}var F={};function G(e,t){F[e]=t}function W(e){return e%4==0&&e%100!=0||e%400==0}function j(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function U(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=j(t)),n}function Z(e,t){return function(n){return null!=n?(q(this,e,n),i.updateOffset(this,t),this):X(this,e)}}function X(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function q(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&W(e.year())&&1===e.month()&&29===e.date()?(n=U(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),we(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}var K,Q=/\d/,$=/\d\d/,ee=/\d{3}/,te=/\d{4}/,ne=/[+-]?\d{6}/,ie=/\d\d?/,ae=/\d\d\d\d?/,re=/\d\d\d\d\d\d?/,oe=/\d{1,3}/,se=/\d{1,4}/,le=/[+-]?\d{1,6}/,ue=/\d+/,ce=/[+-]?\d+/,he=/Z|[+-]\d\d:?\d\d/gi,de=/Z|[+-]\d\d(?::?\d\d)?/gi,fe=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function pe(e,t,n){K[e]=A(t)?t:function(e,i){return e&&n?n:t}}function ge(e,t){return o(K,e)?K[e](t._strict,t._locale):new RegExp(me(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,i,a){return t||n||i||a}))))}function me(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}K={};var ve,ye={};function _e(e,t){var n,i=t;for("string"==typeof e&&(e=[e]),u(t)&&(i=function(e,n){n[t]=U(e)}),n=0;n<e.length;n++)ye[e[n]]=i}function xe(e,t){_e(e,(function(e,n,i,a){i._w=i._w||{},t(e,i._w,i,a)}))}function be(e,t,n){null!=t&&o(ye,e)&&ye[e](t,n._a,n,e)}function we(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=function(e,t){return(e%t+t)%t}(t,12);return e+=(t-n)/12,1===n?W(e)?29:28:31-n%7%2}ve=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},P("M",["MM",2],"Mo",(function(){return this.month()+1})),P("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),P("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),V("month","M"),G("month",8),pe("M",ie),pe("MM",ie,$),pe("MMM",(function(e,t){return t.monthsShortRegex(e)})),pe("MMMM",(function(e,t){return t.monthsRegex(e)})),_e(["M","MM"],(function(e,t){t[1]=U(e)-1})),_e(["MMM","MMMM"],(function(e,t,n,i){var a=n._locale.monthsParse(e,i,n._strict);null!=a?t[1]=a:p(n).invalidMonth=e}));var Se="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Me="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Te=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Ie=fe,Ae=fe;function De(e,t,n){var i,a,r,o=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],i=0;i<12;++i)r=f([2e3,i]),this._shortMonthsParse[i]=this.monthsShort(r,"").toLocaleLowerCase(),this._longMonthsParse[i]=this.months(r,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(a=ve.call(this._shortMonthsParse,o))?a:null:-1!==(a=ve.call(this._longMonthsParse,o))?a:null:"MMM"===t?-1!==(a=ve.call(this._shortMonthsParse,o))||-1!==(a=ve.call(this._longMonthsParse,o))?a:null:-1!==(a=ve.call(this._longMonthsParse,o))||-1!==(a=ve.call(this._shortMonthsParse,o))?a:null}function Ce(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=U(t);else if(!u(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),we(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function Oe(e){return null!=e?(Ce(this,e),i.updateOffset(this,!0),this):X(this,"Month")}function ke(){function e(e,t){return t.length-e.length}var t,n,i=[],a=[],r=[];for(t=0;t<12;t++)n=f([2e3,t]),i.push(this.monthsShort(n,"")),a.push(this.months(n,"")),r.push(this.months(n,"")),r.push(this.monthsShort(n,""));for(i.sort(e),a.sort(e),r.sort(e),t=0;t<12;t++)i[t]=me(i[t]),a[t]=me(a[t]);for(t=0;t<24;t++)r[t]=me(r[t]);this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+i.join("|")+")","i")}function Le(e){return W(e)?366:365}P("Y",0,0,(function(){var e=this.year();return e<=9999?O(e,4):"+"+e})),P(0,["YY",2],0,(function(){return this.year()%100})),P(0,["YYYY",4],0,"year"),P(0,["YYYYY",5],0,"year"),P(0,["YYYYYY",6,!0],0,"year"),V("year","y"),G("year",1),pe("Y",ce),pe("YY",ie,$),pe("YYYY",se,te),pe("YYYYY",le,ne),pe("YYYYYY",le,ne),_e(["YYYYY","YYYYYY"],0),_e("YYYY",(function(e,t){t[0]=2===e.length?i.parseTwoDigitYear(e):U(e)})),_e("YY",(function(e,t){t[0]=i.parseTwoDigitYear(e)})),_e("Y",(function(e,t){t[0]=parseInt(e,10)})),i.parseTwoDigitYear=function(e){return U(e)+(U(e)>68?1900:2e3)};var Ee=Z("FullYear",!0);function Ne(e,t,n,i,a,r,o){var s;return e<100&&e>=0?(s=new Date(e+400,t,n,i,a,r,o),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,i,a,r,o),s}function Pe(e){var t,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Re(e,t,n){var i=7+t-n;return-(7+Pe(e,0,i).getUTCDay()-t)%7+i-1}function ze(e,t,n,i,a){var r,o,s=1+7*(t-1)+(7+n-i)%7+Re(e,i,a);return s<=0?o=Le(r=e-1)+s:s>Le(e)?(r=e+1,o=s-Le(e)):(r=e,o=s),{year:r,dayOfYear:o}}function Be(e,t,n){var i,a,r=Re(e.year(),t,n),o=Math.floor((e.dayOfYear()-r-1)/7)+1;return o<1?i=o+Ve(a=e.year()-1,t,n):o>Ve(e.year(),t,n)?(i=o-Ve(e.year(),t,n),a=e.year()+1):(a=e.year(),i=o),{week:i,year:a}}function Ve(e,t,n){var i=Re(e,t,n),a=Re(e+1,t,n);return(Le(e)-i+a)/7}function He(e,t){return e.slice(t,7).concat(e.slice(0,t))}P("w",["ww",2],"wo","week"),P("W",["WW",2],"Wo","isoWeek"),V("week","w"),V("isoWeek","W"),G("week",5),G("isoWeek",5),pe("w",ie),pe("ww",ie,$),pe("W",ie),pe("WW",ie,$),xe(["w","ww","W","WW"],(function(e,t,n,i){t[i.substr(0,1)]=U(e)})),P("d",0,"do","day"),P("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),P("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),P("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),P("e",0,0,"weekday"),P("E",0,0,"isoWeekday"),V("day","d"),V("weekday","e"),V("isoWeekday","E"),G("day",11),G("weekday",11),G("isoWeekday",11),pe("d",ie),pe("e",ie),pe("E",ie),pe("dd",(function(e,t){return t.weekdaysMinRegex(e)})),pe("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),pe("dddd",(function(e,t){return t.weekdaysRegex(e)})),xe(["dd","ddd","dddd"],(function(e,t,n,i){var a=n._locale.weekdaysParse(e,i,n._strict);null!=a?t.d=a:p(n).invalidWeekday=e})),xe(["d","e","E"],(function(e,t,n,i){t[i]=U(e)}));var Ye="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Fe="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ge="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),We=fe,je=fe,Ue=fe;function Ze(e,t,n){var i,a,r,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)r=f([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(r,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(a=ve.call(this._weekdaysParse,o))?a:null:"ddd"===t?-1!==(a=ve.call(this._shortWeekdaysParse,o))?a:null:-1!==(a=ve.call(this._minWeekdaysParse,o))?a:null:"dddd"===t?-1!==(a=ve.call(this._weekdaysParse,o))||-1!==(a=ve.call(this._shortWeekdaysParse,o))||-1!==(a=ve.call(this._minWeekdaysParse,o))?a:null:"ddd"===t?-1!==(a=ve.call(this._shortWeekdaysParse,o))||-1!==(a=ve.call(this._weekdaysParse,o))||-1!==(a=ve.call(this._minWeekdaysParse,o))?a:null:-1!==(a=ve.call(this._minWeekdaysParse,o))||-1!==(a=ve.call(this._weekdaysParse,o))||-1!==(a=ve.call(this._shortWeekdaysParse,o))?a:null}function Xe(){function e(e,t){return t.length-e.length}var t,n,i,a,r,o=[],s=[],l=[],u=[];for(t=0;t<7;t++)n=f([2e3,1]).day(t),i=me(this.weekdaysMin(n,"")),a=me(this.weekdaysShort(n,"")),r=me(this.weekdays(n,"")),o.push(i),s.push(a),l.push(r),u.push(i),u.push(a),u.push(r);o.sort(e),s.sort(e),l.sort(e),u.sort(e),this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function qe(){return this.hours()%12||12}function Ke(e,t){P(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function Qe(e,t){return t._meridiemParse}P("H",["HH",2],0,"hour"),P("h",["hh",2],0,qe),P("k",["kk",2],0,(function(){return this.hours()||24})),P("hmm",0,0,(function(){return""+qe.apply(this)+O(this.minutes(),2)})),P("hmmss",0,0,(function(){return""+qe.apply(this)+O(this.minutes(),2)+O(this.seconds(),2)})),P("Hmm",0,0,(function(){return""+this.hours()+O(this.minutes(),2)})),P("Hmmss",0,0,(function(){return""+this.hours()+O(this.minutes(),2)+O(this.seconds(),2)})),Ke("a",!0),Ke("A",!1),V("hour","h"),G("hour",13),pe("a",Qe),pe("A",Qe),pe("H",ie),pe("h",ie),pe("k",ie),pe("HH",ie,$),pe("hh",ie,$),pe("kk",ie,$),pe("hmm",ae),pe("hmmss",re),pe("Hmm",ae),pe("Hmmss",re),_e(["H","HH"],3),_e(["k","kk"],(function(e,t,n){var i=U(e);t[3]=24===i?0:i})),_e(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),_e(["h","hh"],(function(e,t,n){t[3]=U(e),p(n).bigHour=!0})),_e("hmm",(function(e,t,n){var i=e.length-2;t[3]=U(e.substr(0,i)),t[4]=U(e.substr(i)),p(n).bigHour=!0})),_e("hmmss",(function(e,t,n){var i=e.length-4,a=e.length-2;t[3]=U(e.substr(0,i)),t[4]=U(e.substr(i,2)),t[5]=U(e.substr(a)),p(n).bigHour=!0})),_e("Hmm",(function(e,t,n){var i=e.length-2;t[3]=U(e.substr(0,i)),t[4]=U(e.substr(i))})),_e("Hmmss",(function(e,t,n){var i=e.length-4,a=e.length-2;t[3]=U(e.substr(0,i)),t[4]=U(e.substr(i,2)),t[5]=U(e.substr(a))}));var $e,Je=Z("Hours",!0),et={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Se,monthsShort:Me,week:{dow:0,doy:6},weekdays:Ye,weekdaysMin:Ge,weekdaysShort:Fe,meridiemParse:/[ap]\.?m?\.?/i},tt={},nt={};function it(e,t){var n,i=Math.min(e.length,t.length);for(n=0;n<i;n+=1)if(e[n]!==t[n])return n;return i}function at(e){return e?e.toLowerCase().replace("_","-"):e}function rt(t){var n=null;if(void 0===tt[t]&&e&&e.exports)try{n=$e._abbr,J(),ot(n)}catch(e){tt[t]=null}return tt[t]}function ot(e,t){var n;return e&&((n=l(t)?lt(e):st(e,t))?$e=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),$e._abbr}function st(e,t){if(null!==t){var n,i=et;if(t.abbr=e,null!=tt[e])I("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=tt[e]._config;else if(null!=t.parentLocale)if(null!=tt[t.parentLocale])i=tt[t.parentLocale]._config;else{if(null==(n=rt(t.parentLocale)))return nt[t.parentLocale]||(nt[t.parentLocale]=[]),nt[t.parentLocale].push({name:e,config:t}),null;i=n._config}return tt[e]=new C(D(i,t)),nt[e]&&nt[e].forEach((function(e){st(e.name,e.config)})),ot(e),tt[e]}return delete tt[e],null}function lt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return $e;if(!a(e)){if(t=rt(e))return t;e=[e]}return function(e){for(var t,n,i,a,r=0;r<e.length;){for(t=(a=at(e[r]).split("-")).length,n=(n=at(e[r+1]))?n.split("-"):null;t>0;){if(i=rt(a.slice(0,t).join("-")))return i;if(n&&n.length>=t&&it(a,n)>=t-1)break;t--}r++}return $e}(e)}function ut(e){var t,n=e._a;return n&&-2===p(e).overflow&&(t=n[1]<0||n[1]>11?1:n[2]<1||n[2]>we(n[0],n[1])?2:n[3]<0||n[3]>24||24===n[3]&&(0!==n[4]||0!==n[5]||0!==n[6])?3:n[4]<0||n[4]>59?4:n[5]<0||n[5]>59?5:n[6]<0||n[6]>999?6:-1,p(e)._overflowDayOfYear&&(t<0||t>2)&&(t=2),p(e)._overflowWeeks&&-1===t&&(t=7),p(e)._overflowWeekday&&-1===t&&(t=8),p(e).overflow=t),e}var ct=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ht=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,dt=/Z|[+-]\d\d(?::?\d\d)?/,ft=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],pt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],gt=/^\/?Date\((-?\d+)/i,mt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,vt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function yt(e){var t,n,i,a,r,o,s=e._i,l=ct.exec(s)||ht.exec(s);if(l){for(p(e).iso=!0,t=0,n=ft.length;t<n;t++)if(ft[t][1].exec(l[1])){a=ft[t][0],i=!1!==ft[t][2];break}if(null==a)return void(e._isValid=!1);if(l[3]){for(t=0,n=pt.length;t<n;t++)if(pt[t][1].exec(l[3])){r=(l[2]||" ")+pt[t][0];break}if(null==r)return void(e._isValid=!1)}if(!i&&null!=r)return void(e._isValid=!1);if(l[4]){if(!dt.exec(l[4]))return void(e._isValid=!1);o="Z"}e._f=a+(r||"")+(o||""),St(e)}else e._isValid=!1}function _t(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function xt(e){var t,n,i,a,r,o,s,l,u=mt.exec(e._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(u){if(n=u[4],i=u[3],a=u[2],r=u[5],o=u[6],s=u[7],l=[_t(n),Me.indexOf(i),parseInt(a,10),parseInt(r,10),parseInt(o,10)],s&&l.push(parseInt(s,10)),t=l,!function(e,t,n){return!e||Fe.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(p(n).weekdayMismatch=!0,n._isValid=!1,!1)}(u[1],t,e))return;e._a=t,e._tzm=function(e,t,n){if(e)return vt[e];if(t)return 0;var i=parseInt(n,10),a=i%100;return(i-a)/100*60+a}(u[8],u[9],u[10]),e._d=Pe.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),p(e).rfc2822=!0}else e._isValid=!1}function bt(e,t,n){return null!=e?e:null!=t?t:n}function wt(e){var t,n,a,r,o,s=[];if(!e._d){for(a=function(e){var t=new Date(i.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[2]&&null==e._a[1]&&function(e){var t,n,i,a,r,o,s,l,u;null!=(t=e._w).GG||null!=t.W||null!=t.E?(r=1,o=4,n=bt(t.GG,e._a[0],Be(It(),1,4).year),i=bt(t.W,1),((a=bt(t.E,1))<1||a>7)&&(l=!0)):(r=e._locale._week.dow,o=e._locale._week.doy,u=Be(It(),r,o),n=bt(t.gg,e._a[0],u.year),i=bt(t.w,u.week),null!=t.d?((a=t.d)<0||a>6)&&(l=!0):null!=t.e?(a=t.e+r,(t.e<0||t.e>6)&&(l=!0)):a=r),i<1||i>Ve(n,r,o)?p(e)._overflowWeeks=!0:null!=l?p(e)._overflowWeekday=!0:(s=ze(n,i,a,r,o),e._a[0]=s.year,e._dayOfYear=s.dayOfYear)}(e),null!=e._dayOfYear&&(o=bt(e._a[0],a[0]),(e._dayOfYear>Le(o)||0===e._dayOfYear)&&(p(e)._overflowDayOfYear=!0),n=Pe(o,0,e._dayOfYear),e._a[1]=n.getUTCMonth(),e._a[2]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=s[t]=a[t];for(;t<7;t++)e._a[t]=s[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[3]&&0===e._a[4]&&0===e._a[5]&&0===e._a[6]&&(e._nextDay=!0,e._a[3]=0),e._d=(e._useUTC?Pe:Ne).apply(null,s),r=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[3]=24),e._w&&void 0!==e._w.d&&e._w.d!==r&&(p(e).weekdayMismatch=!0)}}function St(e){if(e._f!==i.ISO_8601)if(e._f!==i.RFC_2822){e._a=[],p(e).empty=!0;var t,n,a,r,o,s,l=""+e._i,u=l.length,c=0;for(a=z(e._f,e._locale).match(k)||[],t=0;t<a.length;t++)r=a[t],(n=(l.match(ge(r,e))||[])[0])&&((o=l.substr(0,l.indexOf(n))).length>0&&p(e).unusedInput.push(o),l=l.slice(l.indexOf(n)+n.length),c+=n.length),N[r]?(n?p(e).empty=!1:p(e).unusedTokens.push(r),be(r,n,e)):e._strict&&!n&&p(e).unusedTokens.push(r);p(e).charsLeftOver=u-c,l.length>0&&p(e).unusedInput.push(l),e._a[3]<=12&&!0===p(e).bigHour&&e._a[3]>0&&(p(e).bigHour=void 0),p(e).parsedDateParts=e._a.slice(0),p(e).meridiem=e._meridiem,e._a[3]=function(e,t,n){var i;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((i=e.isPM(n))&&t<12&&(t+=12),i||12!==t||(t=0),t):t}(e._locale,e._a[3],e._meridiem),null!==(s=p(e).era)&&(e._a[0]=e._locale.erasConvertYear(s,e._a[0])),wt(e),ut(e)}else xt(e);else yt(e)}function Mt(e){var t=e._i,n=e._f;return e._locale=e._locale||lt(e._l),null===t||void 0===n&&""===t?m({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),b(t)?new x(ut(t)):(c(t)?e._d=t:a(n)?function(e){var t,n,i,a,r,o,s=!1;if(0===e._f.length)return p(e).invalidFormat=!0,void(e._d=new Date(NaN));for(a=0;a<e._f.length;a++)r=0,o=!1,t=_({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[a],St(t),g(t)&&(o=!0),r+=p(t).charsLeftOver,r+=10*p(t).unusedTokens.length,p(t).score=r,s?r<i&&(i=r,n=t):(null==i||r<i||o)&&(i=r,n=t,o&&(s=!0));d(e,n||t)}(e):n?St(e):function(e){var t=e._i;l(t)?e._d=new Date(i.now()):c(t)?e._d=new Date(t.valueOf()):"string"==typeof t?function(e){var t=gt.exec(e._i);null===t?(yt(e),!1===e._isValid&&(delete e._isValid,xt(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:i.createFromInputFallback(e)))):e._d=new Date(+t[1])}(e):a(t)?(e._a=h(t.slice(0),(function(e){return parseInt(e,10)})),wt(e)):r(t)?function(e){if(!e._d){var t=Y(e._i),n=void 0===t.day?t.date:t.day;e._a=h([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),wt(e)}}(e):u(t)?e._d=new Date(t):i.createFromInputFallback(e)}(e),g(e)||(e._d=null),e))}function Tt(e,t,n,i,o){var l={};return!0!==t&&!1!==t||(i=t,t=void 0),!0!==n&&!1!==n||(i=n,n=void 0),(r(e)&&s(e)||a(e)&&0===e.length)&&(e=void 0),l._isAMomentObject=!0,l._useUTC=l._isUTC=o,l._l=n,l._i=e,l._f=t,l._strict=i,function(e){var t=new x(ut(Mt(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}(l)}function It(e,t,n,i){return Tt(e,t,n,i,!1)}i.createFromInputFallback=S("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),i.ISO_8601=function(){},i.RFC_2822=function(){};var At=S("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=It.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:m()})),Dt=S("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=It.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:m()}));function Ct(e,t){var n,i;if(1===t.length&&a(t[0])&&(t=t[0]),!t.length)return It();for(n=t[0],i=1;i<t.length;++i)t[i].isValid()&&!t[i][e](n)||(n=t[i]);return n}var Ot=["year","quarter","month","week","day","hour","minute","second","millisecond"];function kt(e){var t=Y(e),n=t.year||0,i=t.quarter||0,a=t.month||0,r=t.week||t.isoWeek||0,s=t.day||0,l=t.hour||0,u=t.minute||0,c=t.second||0,h=t.millisecond||0;this._isValid=function(e){var t,n,i=!1;for(t in e)if(o(e,t)&&(-1===ve.call(Ot,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<Ot.length;++n)if(e[Ot[n]]){if(i)return!1;parseFloat(e[Ot[n]])!==U(e[Ot[n]])&&(i=!0)}return!0}(t),this._milliseconds=+h+1e3*c+6e4*u+1e3*l*60*60,this._days=+s+7*r,this._months=+a+3*i+12*n,this._data={},this._locale=lt(),this._bubble()}function Lt(e){return e instanceof kt}function Et(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Nt(e,t){P(e,0,0,(function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+O(~~(e/60),2)+t+O(~~e%60,2)}))}Nt("Z",":"),Nt("ZZ",""),pe("Z",de),pe("ZZ",de),_e(["Z","ZZ"],(function(e,t,n){n._useUTC=!0,n._tzm=Rt(de,e)}));var Pt=/([\+\-]|\d\d)/gi;function Rt(e,t){var n,i,a=(t||"").match(e);return null===a?null:0===(i=60*(n=((a[a.length-1]||[])+"").match(Pt)||["-",0,0])[1]+U(n[2]))?0:"+"===n[0]?i:-i}function zt(e,t){var n,a;return t._isUTC?(n=t.clone(),a=(b(e)||c(e)?e.valueOf():It(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+a),i.updateOffset(n,!1),n):It(e).local()}function Bt(e){return-Math.round(e._d.getTimezoneOffset())}function Vt(){return!!this.isValid()&&this._isUTC&&0===this._offset}i.updateOffset=function(){};var Ht=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Yt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Ft(e,t){var n,i,a,r=e,s=null;return Lt(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:u(e)||!isNaN(+e)?(r={},t?r[t]=+e:r.milliseconds=+e):(s=Ht.exec(e))?(n="-"===s[1]?-1:1,r={y:0,d:U(s[2])*n,h:U(s[3])*n,m:U(s[4])*n,s:U(s[5])*n,ms:U(Et(1e3*s[6]))*n}):(s=Yt.exec(e))?(n="-"===s[1]?-1:1,r={y:Gt(s[2],n),M:Gt(s[3],n),w:Gt(s[4],n),d:Gt(s[5],n),h:Gt(s[6],n),m:Gt(s[7],n),s:Gt(s[8],n)}):null==r?r={}:"object"==typeof r&&("from"in r||"to"in r)&&(a=function(e,t){var n;return e.isValid()&&t.isValid()?(t=zt(t,e),e.isBefore(t)?n=Wt(e,t):((n=Wt(t,e)).milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}(It(r.from),It(r.to)),(r={}).ms=a.milliseconds,r.M=a.months),i=new kt(r),Lt(e)&&o(e,"_locale")&&(i._locale=e._locale),Lt(e)&&o(e,"_isValid")&&(i._isValid=e._isValid),i}function Gt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Wt(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function jt(e,t){return function(n,i){var a;return null===i||isNaN(+i)||(I(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),a=n,n=i,i=a),Ut(this,Ft(n,i),e),this}}function Ut(e,t,n,a){var r=t._milliseconds,o=Et(t._days),s=Et(t._months);e.isValid()&&(a=null==a||a,s&&Ce(e,X(e,"Month")+s*n),o&&q(e,"Date",X(e,"Date")+o*n),r&&e._d.setTime(e._d.valueOf()+r*n),a&&i.updateOffset(e,o||s))}Ft.fn=kt.prototype,Ft.invalid=function(){return Ft(NaN)};var Zt=jt(1,"add"),Xt=jt(-1,"subtract");function qt(e){return"string"==typeof e||e instanceof String}function Kt(e){return b(e)||c(e)||qt(e)||u(e)||function(e){var t=a(e),n=!1;return t&&(n=0===e.filter((function(t){return!u(t)&&qt(e)})).length),t&&n}(e)||function(e){var t,n,i=r(e)&&!s(e),a=!1,l=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"];for(t=0;t<l.length;t+=1)n=l[t],a=a||o(e,n);return i&&a}(e)||null==e}function Qt(e){var t,n=r(e)&&!s(e),i=!1,a=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<a.length;t+=1)i=i||o(e,a[t]);return n&&i}function $t(e,t){if(e.date()<t.date())return-$t(t,e);var n=12*(t.year()-e.year())+(t.month()-e.month()),i=e.clone().add(n,"months");return-(n+(t-i<0?(t-i)/(i-e.clone().add(n-1,"months")):(t-i)/(e.clone().add(n+1,"months")-i)))||0}function Jt(e){var t;return void 0===e?this._locale._abbr:(null!=(t=lt(e))&&(this._locale=t),this)}i.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",i.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var en=S("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function tn(){return this._locale}function nn(e,t){return(e%t+t)%t}function an(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-126227808e5:new Date(e,t,n).valueOf()}function rn(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-126227808e5:Date.UTC(e,t,n)}function on(e,t){return t.erasAbbrRegex(e)}function sn(){var e,t,n=[],i=[],a=[],r=[],o=this.eras();for(e=0,t=o.length;e<t;++e)i.push(me(o[e].name)),n.push(me(o[e].abbr)),a.push(me(o[e].narrow)),r.push(me(o[e].name)),r.push(me(o[e].abbr)),r.push(me(o[e].narrow));this._erasRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+i.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+a.join("|")+")","i")}function ln(e,t){P(0,[e,e.length],0,t)}function un(e,t,n,i,a){var r;return null==e?Be(this,i,a).year:(t>(r=Ve(e,i,a))&&(t=r),cn.call(this,e,t,n,i,a))}function cn(e,t,n,i,a){var r=ze(e,t,n,i,a),o=Pe(r.year,0,r.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}P("N",0,0,"eraAbbr"),P("NN",0,0,"eraAbbr"),P("NNN",0,0,"eraAbbr"),P("NNNN",0,0,"eraName"),P("NNNNN",0,0,"eraNarrow"),P("y",["y",1],"yo","eraYear"),P("y",["yy",2],0,"eraYear"),P("y",["yyy",3],0,"eraYear"),P("y",["yyyy",4],0,"eraYear"),pe("N",on),pe("NN",on),pe("NNN",on),pe("NNNN",(function(e,t){return t.erasNameRegex(e)})),pe("NNNNN",(function(e,t){return t.erasNarrowRegex(e)})),_e(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,n,i){var a=n._locale.erasParse(e,i,n._strict);a?p(n).era=a:p(n).invalidEra=e})),pe("y",ue),pe("yy",ue),pe("yyy",ue),pe("yyyy",ue),pe("yo",(function(e,t){return t._eraYearOrdinalRegex||ue})),_e(["y","yy","yyy","yyyy"],0),_e(["yo"],(function(e,t,n,i){var a;n._locale._eraYearOrdinalRegex&&(a=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[0]=n._locale.eraYearOrdinalParse(e,a):t[0]=parseInt(e,10)})),P(0,["gg",2],0,(function(){return this.weekYear()%100})),P(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),ln("gggg","weekYear"),ln("ggggg","weekYear"),ln("GGGG","isoWeekYear"),ln("GGGGG","isoWeekYear"),V("weekYear","gg"),V("isoWeekYear","GG"),G("weekYear",1),G("isoWeekYear",1),pe("G",ce),pe("g",ce),pe("GG",ie,$),pe("gg",ie,$),pe("GGGG",se,te),pe("gggg",se,te),pe("GGGGG",le,ne),pe("ggggg",le,ne),xe(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,i){t[i.substr(0,2)]=U(e)})),xe(["gg","GG"],(function(e,t,n,a){t[a]=i.parseTwoDigitYear(e)})),P("Q",0,"Qo","quarter"),V("quarter","Q"),G("quarter",7),pe("Q",Q),_e("Q",(function(e,t){t[1]=3*(U(e)-1)})),P("D",["DD",2],"Do","date"),V("date","D"),G("date",9),pe("D",ie),pe("DD",ie,$),pe("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),_e(["D","DD"],2),_e("Do",(function(e,t){t[2]=U(e.match(ie)[0])}));var hn=Z("Date",!0);P("DDD",["DDDD",3],"DDDo","dayOfYear"),V("dayOfYear","DDD"),G("dayOfYear",4),pe("DDD",oe),pe("DDDD",ee),_e(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=U(e)})),P("m",["mm",2],0,"minute"),V("minute","m"),G("minute",14),pe("m",ie),pe("mm",ie,$),_e(["m","mm"],4);var dn=Z("Minutes",!1);P("s",["ss",2],0,"second"),V("second","s"),G("second",15),pe("s",ie),pe("ss",ie,$),_e(["s","ss"],5);var fn,pn,gn=Z("Seconds",!1);for(P("S",0,0,(function(){return~~(this.millisecond()/100)})),P(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),P(0,["SSS",3],0,"millisecond"),P(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),P(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),P(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),P(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),P(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),P(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),V("millisecond","ms"),G("millisecond",16),pe("S",oe,Q),pe("SS",oe,$),pe("SSS",oe,ee),fn="SSSS";fn.length<=9;fn+="S")pe(fn,ue);function mn(e,t){t[6]=U(1e3*("0."+e))}for(fn="S";fn.length<=9;fn+="S")_e(fn,mn);pn=Z("Milliseconds",!1),P("z",0,0,"zoneAbbr"),P("zz",0,0,"zoneName");var vn=x.prototype;function yn(e){return e}vn.add=Zt,vn.calendar=function(e,t){1===arguments.length&&(arguments[0]?Kt(arguments[0])?(e=arguments[0],t=void 0):Qt(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||It(),a=zt(n,this).startOf("day"),r=i.calendarFormat(this,a)||"sameElse",o=t&&(A(t[r])?t[r].call(this,n):t[r]);return this.format(o||this.localeData().calendar(r,this,It(n)))},vn.clone=function(){return new x(this)},vn.diff=function(e,t,n){var i,a,r;if(!this.isValid())return NaN;if(!(i=zt(e,this)).isValid())return NaN;switch(a=6e4*(i.utcOffset()-this.utcOffset()),t=H(t)){case"year":r=$t(this,i)/12;break;case"month":r=$t(this,i);break;case"quarter":r=$t(this,i)/3;break;case"second":r=(this-i)/1e3;break;case"minute":r=(this-i)/6e4;break;case"hour":r=(this-i)/36e5;break;case"day":r=(this-i-a)/864e5;break;case"week":r=(this-i-a)/6048e5;break;default:r=this-i}return n?r:j(r)},vn.endOf=function(e){var t,n;if(void 0===(e=H(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?rn:an,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=36e5-nn(t+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":t=this._d.valueOf(),t+=6e4-nn(t,6e4)-1;break;case"second":t=this._d.valueOf(),t+=1e3-nn(t,1e3)-1}return this._d.setTime(t),i.updateOffset(this,!0),this},vn.format=function(e){e||(e=this.isUtc()?i.defaultFormatUtc:i.defaultFormat);var t=R(this,e);return this.localeData().postformat(t)},vn.from=function(e,t){return this.isValid()&&(b(e)&&e.isValid()||It(e).isValid())?Ft({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},vn.fromNow=function(e){return this.from(It(),e)},vn.to=function(e,t){return this.isValid()&&(b(e)&&e.isValid()||It(e).isValid())?Ft({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},vn.toNow=function(e){return this.to(It(),e)},vn.get=function(e){return A(this[e=H(e)])?this[e]():this},vn.invalidAt=function(){return p(this).overflow},vn.isAfter=function(e,t){var n=b(e)?e:It(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=H(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},vn.isBefore=function(e,t){var n=b(e)?e:It(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=H(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},vn.isBetween=function(e,t,n,i){var a=b(e)?e:It(e),r=b(t)?t:It(t);return!!(this.isValid()&&a.isValid()&&r.isValid())&&(("("===(i=i||"()")[0]?this.isAfter(a,n):!this.isBefore(a,n))&&(")"===i[1]?this.isBefore(r,n):!this.isAfter(r,n)))},vn.isSame=function(e,t){var n,i=b(e)?e:It(e);return!(!this.isValid()||!i.isValid())&&("millisecond"===(t=H(t)||"millisecond")?this.valueOf()===i.valueOf():(n=i.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},vn.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},vn.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},vn.isValid=function(){return g(this)},vn.lang=en,vn.locale=Jt,vn.localeData=tn,vn.max=Dt,vn.min=At,vn.parsingFlags=function(){return d({},p(this))},vn.set=function(e,t){if("object"==typeof e){var n,i=function(e){var t,n=[];for(t in e)o(e,t)&&n.push({unit:t,priority:F[t]});return n.sort((function(e,t){return e.priority-t.priority})),n}(e=Y(e));for(n=0;n<i.length;n++)this[i[n].unit](e[i[n].unit])}else if(A(this[e=H(e)]))return this[e](t);return this},vn.startOf=function(e){var t,n;if(void 0===(e=H(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?rn:an,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=nn(t+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":t=this._d.valueOf(),t-=nn(t,6e4);break;case"second":t=this._d.valueOf(),t-=nn(t,1e3)}return this._d.setTime(t),i.updateOffset(this,!0),this},vn.subtract=Xt,vn.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},vn.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},vn.toDate=function(){return new Date(this.valueOf())},vn.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?R(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):A(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",R(n,"Z")):R(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},vn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,i="moment",a="";return this.isLocal()||(i=0===this.utcOffset()?"moment.utc":"moment.parseZone",a="Z"),e="["+i+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n=a+'[")]',this.format(e+t+"-MM-DD[T]HH:mm:ss.SSS"+n)},"undefined"!=typeof Symbol&&null!=Symbol.for&&(vn[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),vn.toJSON=function(){return this.isValid()?this.toISOString():null},vn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},vn.unix=function(){return Math.floor(this.valueOf()/1e3)},vn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},vn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},vn.eraName=function(){var e,t,n,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),i[e].since<=n&&n<=i[e].until)return i[e].name;if(i[e].until<=n&&n<=i[e].since)return i[e].name}return""},vn.eraNarrow=function(){var e,t,n,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),i[e].since<=n&&n<=i[e].until)return i[e].narrow;if(i[e].until<=n&&n<=i[e].since)return i[e].narrow}return""},vn.eraAbbr=function(){var e,t,n,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),i[e].since<=n&&n<=i[e].until)return i[e].abbr;if(i[e].until<=n&&n<=i[e].since)return i[e].abbr}return""},vn.eraYear=function(){var e,t,n,a,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=r[e].since<=r[e].until?1:-1,a=this.clone().startOf("day").valueOf(),r[e].since<=a&&a<=r[e].until||r[e].until<=a&&a<=r[e].since)return(this.year()-i(r[e].since).year())*n+r[e].offset;return this.year()},vn.year=Ee,vn.isLeapYear=function(){return W(this.year())},vn.weekYear=function(e){return un.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},vn.isoWeekYear=function(e){return un.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},vn.quarter=vn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},vn.month=Oe,vn.daysInMonth=function(){return we(this.year(),this.month())},vn.week=vn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},vn.isoWeek=vn.isoWeeks=function(e){var t=Be(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},vn.weeksInYear=function(){var e=this.localeData()._week;return Ve(this.year(),e.dow,e.doy)},vn.weeksInWeekYear=function(){var e=this.localeData()._week;return Ve(this.weekYear(),e.dow,e.doy)},vn.isoWeeksInYear=function(){return Ve(this.year(),1,4)},vn.isoWeeksInISOWeekYear=function(){return Ve(this.isoWeekYear(),1,4)},vn.date=hn,vn.day=vn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},vn.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},vn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},vn.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},vn.hour=vn.hours=Je,vn.minute=vn.minutes=dn,vn.second=vn.seconds=gn,vn.millisecond=vn.milliseconds=pn,vn.utcOffset=function(e,t,n){var a,r=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Rt(de,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(a=Bt(this)),this._offset=e,this._isUTC=!0,null!=a&&this.add(a,"m"),r!==e&&(!t||this._changeInProgress?Ut(this,Ft(e-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,i.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?r:Bt(this)},vn.utc=function(e){return this.utcOffset(0,e)},vn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Bt(this),"m")),this},vn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Rt(he,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},vn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?It(e).utcOffset():0,(this.utcOffset()-e)%60==0)},vn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},vn.isLocal=function(){return!!this.isValid()&&!this._isUTC},vn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},vn.isUtc=Vt,vn.isUTC=Vt,vn.zoneAbbr=function(){return this._isUTC?"UTC":""},vn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},vn.dates=S("dates accessor is deprecated. Use date instead.",hn),vn.months=S("months accessor is deprecated. Use month instead",Oe),vn.years=S("years accessor is deprecated. Use year instead",Ee),vn.zone=S("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()})),vn.isDSTShifted=S("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!l(this._isDSTShifted))return this._isDSTShifted;var e,t={};return _(t,this),(t=Mt(t))._a?(e=t._isUTC?f(t._a):It(t._a),this._isDSTShifted=this.isValid()&&function(e,t,n){var i,a=Math.min(e.length,t.length),r=Math.abs(e.length-t.length),o=0;for(i=0;i<a;i++)(n&&e[i]!==t[i]||!n&&U(e[i])!==U(t[i]))&&o++;return o+r}(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}));var _n=C.prototype;function xn(e,t,n,i){var a=lt(),r=f().set(i,t);return a[n](r,e)}function bn(e,t,n){if(u(e)&&(t=e,e=void 0),e=e||"",null!=t)return xn(e,t,n,"month");var i,a=[];for(i=0;i<12;i++)a[i]=xn(e,i,n,"month");return a}function wn(e,t,n,i){"boolean"==typeof e?(u(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,u(t)&&(n=t,t=void 0),t=t||"");var a,r=lt(),o=e?r._week.dow:0,s=[];if(null!=n)return xn(t,(n+o)%7,i,"day");for(a=0;a<7;a++)s[a]=xn(t,(a+o)%7,i,"day");return s}_n.calendar=function(e,t,n){var i=this._calendar[e]||this._calendar.sameElse;return A(i)?i.call(t,n):i},_n.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(k).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])},_n.invalidDate=function(){return this._invalidDate},_n.ordinal=function(e){return this._ordinal.replace("%d",e)},_n.preparse=yn,_n.postformat=yn,_n.relativeTime=function(e,t,n,i){var a=this._relativeTime[n];return A(a)?a(e,t,n,i):a.replace(/%d/i,e)},_n.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return A(n)?n(t):n.replace(/%s/i,t)},_n.set=function(e){var t,n;for(n in e)o(e,n)&&(A(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},_n.eras=function(e,t){var n,a,r,o=this._eras||lt("en")._eras;for(n=0,a=o.length;n<a;++n){switch(typeof o[n].since){case"string":r=i(o[n].since).startOf("day"),o[n].since=r.valueOf()}switch(typeof o[n].until){case"undefined":o[n].until=1/0;break;case"string":r=i(o[n].until).startOf("day").valueOf(),o[n].until=r.valueOf()}}return o},_n.erasParse=function(e,t,n){var i,a,r,o,s,l=this.eras();for(e=e.toUpperCase(),i=0,a=l.length;i<a;++i)if(r=l[i].name.toUpperCase(),o=l[i].abbr.toUpperCase(),s=l[i].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(o===e)return l[i];break;case"NNNN":if(r===e)return l[i];break;case"NNNNN":if(s===e)return l[i]}else if([r,o,s].indexOf(e)>=0)return l[i]},_n.erasConvertYear=function(e,t){var n=e.since<=e.until?1:-1;return void 0===t?i(e.since).year():i(e.since).year()+(t-e.offset)*n},_n.erasAbbrRegex=function(e){return o(this,"_erasAbbrRegex")||sn.call(this),e?this._erasAbbrRegex:this._erasRegex},_n.erasNameRegex=function(e){return o(this,"_erasNameRegex")||sn.call(this),e?this._erasNameRegex:this._erasRegex},_n.erasNarrowRegex=function(e){return o(this,"_erasNarrowRegex")||sn.call(this),e?this._erasNarrowRegex:this._erasRegex},_n.months=function(e,t){return e?a(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Te).test(t)?"format":"standalone"][e.month()]:a(this._months)?this._months:this._months.standalone},_n.monthsShort=function(e,t){return e?a(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Te.test(t)?"format":"standalone"][e.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},_n.monthsParse=function(e,t,n){var i,a,r;if(this._monthsParseExact)return De.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;i<12;i++){if(a=f([2e3,i]),n&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(a,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(a,"").replace(".","")+"$","i")),n||this._monthsParse[i]||(r="^"+this.months(a,"")+"|^"+this.monthsShort(a,""),this._monthsParse[i]=new RegExp(r.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[i].test(e))return i;if(n&&"MMM"===t&&this._shortMonthsParse[i].test(e))return i;if(!n&&this._monthsParse[i].test(e))return i}},_n.monthsRegex=function(e){return this._monthsParseExact?(o(this,"_monthsRegex")||ke.call(this),e?this._monthsStrictRegex:this._monthsRegex):(o(this,"_monthsRegex")||(this._monthsRegex=Ae),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},_n.monthsShortRegex=function(e){return this._monthsParseExact?(o(this,"_monthsRegex")||ke.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(o(this,"_monthsShortRegex")||(this._monthsShortRegex=Ie),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},_n.week=function(e){return Be(e,this._week.dow,this._week.doy).week},_n.firstDayOfYear=function(){return this._week.doy},_n.firstDayOfWeek=function(){return this._week.dow},_n.weekdays=function(e,t){var n=a(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?He(n,this._week.dow):e?n[e.day()]:n},_n.weekdaysMin=function(e){return!0===e?He(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},_n.weekdaysShort=function(e){return!0===e?He(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},_n.weekdaysParse=function(e,t,n){var i,a,r;if(this._weekdaysParseExact)return Ze.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(a=f([2e3,1]).day(i),n&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(a,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(a,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(a,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[i]||(r="^"+this.weekdays(a,"")+"|^"+this.weekdaysShort(a,"")+"|^"+this.weekdaysMin(a,""),this._weekdaysParse[i]=new RegExp(r.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[i].test(e))return i;if(n&&"ddd"===t&&this._shortWeekdaysParse[i].test(e))return i;if(n&&"dd"===t&&this._minWeekdaysParse[i].test(e))return i;if(!n&&this._weekdaysParse[i].test(e))return i}},_n.weekdaysRegex=function(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||Xe.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(o(this,"_weekdaysRegex")||(this._weekdaysRegex=We),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},_n.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||Xe.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(o(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=je),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},_n.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||Xe.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(o(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Ue),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},_n.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},_n.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},ot("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===U(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),i.lang=S("moment.lang is deprecated. Use moment.locale instead.",ot),i.langData=S("moment.langData is deprecated. Use moment.localeData instead.",lt);var Sn=Math.abs;function Mn(e,t,n,i){var a=Ft(t,n);return e._milliseconds+=i*a._milliseconds,e._days+=i*a._days,e._months+=i*a._months,e._bubble()}function Tn(e){return e<0?Math.floor(e):Math.ceil(e)}function In(e){return 4800*e/146097}function An(e){return 146097*e/4800}function Dn(e){return function(){return this.as(e)}}var Cn=Dn("ms"),On=Dn("s"),kn=Dn("m"),Ln=Dn("h"),En=Dn("d"),Nn=Dn("w"),Pn=Dn("M"),Rn=Dn("Q"),zn=Dn("y");function Bn(e){return function(){return this.isValid()?this._data[e]:NaN}}var Vn=Bn("milliseconds"),Hn=Bn("seconds"),Yn=Bn("minutes"),Fn=Bn("hours"),Gn=Bn("days"),Wn=Bn("months"),jn=Bn("years"),Un=Math.round,Zn={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Xn(e,t,n,i,a){return a.relativeTime(t||1,!!n,e,i)}function qn(e,t,n,i){var a=Ft(e).abs(),r=Un(a.as("s")),o=Un(a.as("m")),s=Un(a.as("h")),l=Un(a.as("d")),u=Un(a.as("M")),c=Un(a.as("w")),h=Un(a.as("y")),d=r<=n.ss&&["s",r]||r<n.s&&["ss",r]||o<=1&&["m"]||o<n.m&&["mm",o]||s<=1&&["h"]||s<n.h&&["hh",s]||l<=1&&["d"]||l<n.d&&["dd",l];return null!=n.w&&(d=d||c<=1&&["w"]||c<n.w&&["ww",c]),(d=d||u<=1&&["M"]||u<n.M&&["MM",u]||h<=1&&["y"]||["yy",h])[2]=t,d[3]=+e>0,d[4]=i,Xn.apply(null,d)}var Kn=Math.abs;function Qn(e){return(e>0)-(e<0)||+e}function $n(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,i,a,r,o,s,l=Kn(this._milliseconds)/1e3,u=Kn(this._days),c=Kn(this._months),h=this.asSeconds();return h?(e=j(l/60),t=j(e/60),l%=60,e%=60,n=j(c/12),c%=12,i=l?l.toFixed(3).replace(/\.?0+$/,""):"",a=h<0?"-":"",r=Qn(this._months)!==Qn(h)?"-":"",o=Qn(this._days)!==Qn(h)?"-":"",s=Qn(this._milliseconds)!==Qn(h)?"-":"",a+"P"+(n?r+n+"Y":"")+(c?r+c+"M":"")+(u?o+u+"D":"")+(t||e||l?"T":"")+(t?s+t+"H":"")+(e?s+e+"M":"")+(l?s+i+"S":"")):"P0D"}var Jn=kt.prototype;return Jn.isValid=function(){return this._isValid},Jn.abs=function(){var e=this._data;return this._milliseconds=Sn(this._milliseconds),this._days=Sn(this._days),this._months=Sn(this._months),e.milliseconds=Sn(e.milliseconds),e.seconds=Sn(e.seconds),e.minutes=Sn(e.minutes),e.hours=Sn(e.hours),e.months=Sn(e.months),e.years=Sn(e.years),this},Jn.add=function(e,t){return Mn(this,e,t,1)},Jn.subtract=function(e,t){return Mn(this,e,t,-1)},Jn.as=function(e){if(!this.isValid())return NaN;var t,n,i=this._milliseconds;if("month"===(e=H(e))||"quarter"===e||"year"===e)switch(t=this._days+i/864e5,n=this._months+In(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(An(this._months)),e){case"week":return t/7+i/6048e5;case"day":return t+i/864e5;case"hour":return 24*t+i/36e5;case"minute":return 1440*t+i/6e4;case"second":return 86400*t+i/1e3;case"millisecond":return Math.floor(864e5*t)+i;default:throw new Error("Unknown unit "+e)}},Jn.asMilliseconds=Cn,Jn.asSeconds=On,Jn.asMinutes=kn,Jn.asHours=Ln,Jn.asDays=En,Jn.asWeeks=Nn,Jn.asMonths=Pn,Jn.asQuarters=Rn,Jn.asYears=zn,Jn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*U(this._months/12):NaN},Jn._bubble=function(){var e,t,n,i,a,r=this._milliseconds,o=this._days,s=this._months,l=this._data;return r>=0&&o>=0&&s>=0||r<=0&&o<=0&&s<=0||(r+=864e5*Tn(An(s)+o),o=0,s=0),l.milliseconds=r%1e3,e=j(r/1e3),l.seconds=e%60,t=j(e/60),l.minutes=t%60,n=j(t/60),l.hours=n%24,o+=j(n/24),a=j(In(o)),s+=a,o-=Tn(An(a)),i=j(s/12),s%=12,l.days=o,l.months=s,l.years=i,this},Jn.clone=function(){return Ft(this)},Jn.get=function(e){return e=H(e),this.isValid()?this[e+"s"]():NaN},Jn.milliseconds=Vn,Jn.seconds=Hn,Jn.minutes=Yn,Jn.hours=Fn,Jn.days=Gn,Jn.weeks=function(){return j(this.days()/7)},Jn.months=Wn,Jn.years=jn,Jn.humanize=function(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,i,a=!1,r=Zn;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(a=e),"object"==typeof t&&(r=Object.assign({},Zn,t),null!=t.s&&null==t.ss&&(r.ss=t.s-1)),n=this.localeData(),i=qn(this,!a,r,n),a&&(i=n.pastFuture(+this,i)),n.postformat(i)},Jn.toISOString=$n,Jn.toString=$n,Jn.toJSON=$n,Jn.locale=Jt,Jn.localeData=tn,Jn.toIsoString=S("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",$n),Jn.lang=en,P("X",0,0,"unix"),P("x",0,0,"valueOf"),pe("x",ce),pe("X",/[+-]?\d+(\.\d{1,3})?/),_e("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e))})),_e("x",(function(e,t,n){n._d=new Date(U(e))})),
//! moment.js
i.version="2.29.1",t=It,i.fn=vn,i.min=function(){var e=[].slice.call(arguments,0);return Ct("isBefore",e)},i.max=function(){var e=[].slice.call(arguments,0);return Ct("isAfter",e)},i.now=function(){return Date.now?Date.now():+new Date},i.utc=f,i.unix=function(e){return It(1e3*e)},i.months=function(e,t){return bn(e,t,"months")},i.isDate=c,i.locale=ot,i.invalid=m,i.duration=Ft,i.isMoment=b,i.weekdays=function(e,t,n){return wn(e,t,n,"weekdays")},i.parseZone=function(){return It.apply(null,arguments).parseZone()},i.localeData=lt,i.isDuration=Lt,i.monthsShort=function(e,t){return bn(e,t,"monthsShort")},i.weekdaysMin=function(e,t,n){return wn(e,t,n,"weekdaysMin")},i.defineLocale=st,i.updateLocale=function(e,t){if(null!=t){var n,i,a=et;null!=tt[e]&&null!=tt[e].parentLocale?tt[e].set(D(tt[e]._config,t)):(null!=(i=rt(e))&&(a=i._config),t=D(a,t),null==i&&(t.abbr=e),(n=new C(t)).parentLocale=tt[e],tt[e]=n),ot(e)}else null!=tt[e]&&(null!=tt[e].parentLocale?(tt[e]=tt[e].parentLocale,e===ot()&&ot(e)):null!=tt[e]&&delete tt[e]);return tt[e]},i.locales=function(){return M(tt)},i.weekdaysShort=function(e,t,n){return wn(e,t,n,"weekdaysShort")},i.normalizeUnits=H,i.relativeTimeRounding=function(e){return void 0===e?Un:"function"==typeof e&&(Un=e,!0)},i.relativeTimeThreshold=function(e,t){return void 0!==Zn[e]&&(void 0===t?Zn[e]:(Zn[e]=t,"s"===e&&(Zn.ss=t-1),!0))},i.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},i.prototype=vn,i.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},i}()}));!function(e){e.CONTAIN="contain",e.NOT_CONTAIN="not-contain",e.STARTWITH="startwidth",e.NOT_STARTWITH="not_startwith",e.ENDWITH="endwith",e.NOT_ENDWITH="not_endwith",e.EQUAL="equal",e.NOT_EQUAL="not_equal",e.NULL_STR="null_str",e.NOT_NULL_STR="not_null_str",e.NULL="null",e.NOT_NULL="not_null"}(QV||(QV={}));var JV;Object.freeze(((qV={})[QV.CONTAIN]=Object.freeze({key:QV.CONTAIN,name:"包含"}),qV[QV.NOT_CONTAIN]=Object.freeze({key:QV.NOT_CONTAIN,name:"不包含"}),qV[QV.STARTWITH]=Object.freeze({key:QV.STARTWITH,name:"开头是"}),qV[QV.NOT_STARTWITH]=Object.freeze({key:QV.NOT_STARTWITH,name:"开头不是"}),qV[QV.ENDWITH]=Object.freeze({key:QV.ENDWITH,name:"结尾是"}),qV[QV.NOT_ENDWITH]=Object.freeze({key:QV.NOT_ENDWITH,name:"结尾不是"}),qV[QV.EQUAL]=Object.freeze({key:QV.EQUAL,name:"等于"}),qV[QV.NOT_EQUAL]=Object.freeze({key:QV.NOT_EQUAL,name:"不等于"}),qV[QV.NULL_STR]=Object.freeze({key:QV.NULL_STR,name:"内容为空"}),qV[QV.NOT_NULL_STR]=Object.freeze({key:QV.NOT_NULL_STR,name:"内容非空"}),qV[QV.NULL]=Object.freeze({key:QV.NULL,name:"为NULL"}),qV[QV.NOT_NULL]=Object.freeze({key:QV.NOT_NULL,name:"不为NULL"}),qV));!function(e){e.EQUAL="equal",e.NOT_EQUAL="not_equal",e.GREAT_THAN="great_than",e.GREAT_EQUAL="great_equal",e.LESS_THAN="less_than",e.LESS_EQUAL="less_equal",e.NULL="null",e.NOT_NULL="not_null"}(JV||(JV={}));var eH,tH,nH;Object.freeze(((KV={})[JV.EQUAL]=Object.freeze({key:JV.EQUAL,name:"等于"}),KV[JV.NOT_EQUAL]=Object.freeze({key:JV.NOT_EQUAL,name:"不等于"}),KV[JV.GREAT_THAN]=Object.freeze({key:JV.GREAT_THAN,name:"大于"}),KV[JV.GREAT_EQUAL]=Object.freeze({key:JV.GREAT_EQUAL,name:"大于等于"}),KV[JV.LESS_THAN]=Object.freeze({key:JV.LESS_THAN,name:"小于"}),KV[JV.LESS_EQUAL]=Object.freeze({key:JV.LESS_EQUAL,name:"小于等于"}),KV[JV.NULL]=Object.freeze({key:JV.NULL,name:"为NULL"}),KV[JV.NOT_NULL]=Object.freeze({key:JV.NOT_NULL,name:"不为NULL"}),KV));!function(e){e.YEAR="year",e.MONTH="month",e.DAY="day",e.TIME="time"}(nH||(nH={}));var iH,aH=Object.freeze(((eH={})[nH.YEAR]=Object.freeze({key:nH.YEAR,name:"年",sqltype:"time-only_year",sqldformat:"only_year"}),eH[nH.MONTH]=Object.freeze({key:nH.MONTH,name:"月",sqltype:"time-only_month",sqldformat:"only_month"}),eH[nH.DAY]=Object.freeze({key:nH.DAY,name:"日",sqltype:"time-only_day",sqldformat:"only_day"}),eH[nH.TIME]=Object.freeze({key:nH.TIME,name:"时间",sqltype:"time-time",sqldformat:"only_time"}),eH));!function(e){e.STRING="string",e.TIME="time",e.INT="int",e.FLOAT="float",e.DOUBLE="double"}(iH||(iH={}));var rH,oH,sH,lH;Object.freeze(((tH={})[iH.STRING]=Object.freeze({key:iH.STRING,name:"文本",iconfont:"icon-word"}),tH[iH.TIME]=Object.freeze({key:iH.TIME,name:"时间",iconfont:"icon-calendar"}),tH[iH.INT]=Object.freeze({key:iH.INT,name:"数值",iconfont:"icon-number"}),tH[iH.FLOAT]=Object.freeze({key:iH.FLOAT,name:"小数",iconfont:"icon-decimal"}),tH[iH.DOUBLE]=Object.freeze({key:iH.DOUBLE,name:"小数",iconfont:"icon-decimal"}),tH));!function(e){e.NONE="none",e.FIRST_TAG="first_tag"}(lH||(lH={}));var uH,cH=Object.freeze(((rH={})[lH.NONE]=Object.freeze({key:lH.NONE,name:"无",getDefault:function(){return{type:lH.NONE}}}),rH[lH.FIRST_TAG]=Object.freeze({key:lH.FIRST_TAG,name:"选中第一项",getDefault:function(){return{type:lH.FIRST_TAG}}}),rH));!function(e){e.ALL="all",e.BEFORE="before",e.CUSTOM="custom"}(uH||(uH={}));var hH,dH=Object.freeze(((oH={})[uH.ALL]=Object.freeze({key:uH.ALL,name:"全选",getDefault:function(){return{type:uH.ALL}}}),oH[uH.BEFORE]=Object.freeze({key:uH.BEFORE,name:"选中前N项",getDefault:function(){return{type:uH.BEFORE,index:1}}}),oH[uH.CUSTOM]=Object.freeze({key:uH.CUSTOM,name:"自定义",getDefault:function(){return{type:uH.CUSTOM,val:[]}}}),oH));!function(e){e.INPUT="input",e.SELECT="select",e.CONDITION="condition",e.TAG="tag",e.TREE="tree"}(hH||(hH={}));var fH,pH,gH=Object.freeze(((sH={})[hH.INPUT]=Object.freeze({key:hH.INPUT,name:"输入框",getDefault:function(){return{default:null}}}),sH[hH.SELECT]=Object.freeze({key:hH.SELECT,name:"下拉框",searchMode:[QV.CONTAIN,QV.STARTWITH,QV.EQUAL],getDefault:function(e){var t=(void 0===e?{}:e).isMultiple,n=void 0!==t&&t;return{isMultiple:n,searchMode:QV.CONTAIN,default:n?[]:null}}}),sH[hH.CONDITION]=Object.freeze({key:hH.CONDITION,name:"条件",getDefault:function(e){var t=void 0===e?{}:e,n=t.searchMode,i=void 0===n?QV.CONTAIN:n,a=t.value;return{default:{searchMode:i,val:void 0===a?null:a}}}}),sH[hH.TAG]=Object.freeze({key:hH.TAG,name:"标签",showTagCount:[10,30,50],getDefault:function(e){var t=(void 0===e?{}:e).isMultiple,n=void 0!==t&&t,i={isMultiple:n,showTagCount:30};return n?Object.assign({},i,{selectedTagCount:null,default:dH[uH.ALL].getDefault()}):Object.assign({},i,{default:cH[lH.NONE].getDefault()})}}),sH[hH.TREE]=Object.freeze({key:hH.TREE,name:"树",getDefault:function(){return{isMultiple:!1,treeCheckStrictly:!1,defaultExpandLevel:1,default:[]}}}),sH));!function(e){e.CONDITION="condition",e.RANGE="num_range"}(pH||(pH={}));var mH,vH,yH,_H;Object.freeze(((fH={})[pH.CONDITION]=Object.freeze({key:pH.CONDITION,name:"条件",getDefault:function(e){var t=void 0===e?{}:e,n=t.searchMode,i=void 0===n?JV.EQUAL:n,a=t.value;return{default:{searchMode:i,val:void 0===a?null:a}}}}),fH[pH.RANGE]=Object.freeze({key:pH.RANGE,name:"范围",getDefault:function(){return{default:[null,null]}}}),fH));!function(e){e.NONE="none",e.CURRENT="current",e.CUSTOM="custom"}(_H||(_H={}));var xH,bH=Object.freeze(((mH={})[_H.NONE]=Object.freeze({key:_H.NONE,name:"无",getDefault:function(){return{type:_H.NONE}}}),mH[_H.CURRENT]=Object.freeze({key:_H.CURRENT,name:"当前时间",getDefault:function(){return{type:_H.CURRENT}}}),mH[_H.CUSTOM]=Object.freeze({key:_H.CUSTOM,name:"自定义",getDefault:function(){return{type:_H.CUSTOM,val:null}}}),mH));!function(e){e.NONE="none",e.TODAY="today",e.YESTERDAY="yesterday",e.THIS_WEEK="this_week",e.LAST_WEEK="last_week",e.THIS_MONTH="this_month",e.LAST_MONTH="last_month",e.THIS_QUARTER="this_quarter",e.LAST_QUARTER="last_quarter",e.THIS_YEAR="this_year",e.LAST_YEAR="last_year",e.NEARLY_A_WEEK="nearly_a_week",e.NEARLY_A_MONTH="nearly_a_month",e.NEARLY_A_YEAR="nearly_a_year",e.CUSTOM="custom"}(xH||(xH={}));var wH,SH=Object.freeze(((vH={})[xH.NONE]=Object.freeze({key:xH.NONE,name:"无",getDefault:function(){return{type:xH.NONE}}}),vH[xH.TODAY]=Object.freeze({key:xH.TODAY,name:"当天",getDefault:function(){return{type:xH.TODAY}}}),vH[xH.YESTERDAY]=Object.freeze({key:xH.YESTERDAY,name:"昨天",getDefault:function(){return{type:xH.YESTERDAY}}}),vH[xH.THIS_WEEK]=Object.freeze({key:xH.THIS_WEEK,name:"本周",getDefault:function(){return{type:xH.THIS_WEEK}}}),vH[xH.LAST_WEEK]=Object.freeze({key:xH.LAST_WEEK,name:"上周",getDefault:function(){return{type:xH.LAST_WEEK}}}),vH[xH.THIS_MONTH]=Object.freeze({key:xH.THIS_MONTH,name:"本月",getDefault:function(){return{type:xH.THIS_MONTH}}}),vH[xH.LAST_MONTH]=Object.freeze({key:xH.LAST_MONTH,name:"上月",getDefault:function(){return{type:xH.LAST_MONTH}}}),vH[xH.THIS_QUARTER]=Object.freeze({key:xH.THIS_QUARTER,name:"本季度",getDefault:function(){return{type:xH.THIS_QUARTER}}}),vH[xH.LAST_QUARTER]=Object.freeze({key:xH.LAST_QUARTER,name:"上季度",getDefault:function(){return{type:xH.LAST_QUARTER}}}),vH[xH.THIS_YEAR]=Object.freeze({key:xH.THIS_YEAR,name:"今年",getDefault:function(){return{type:xH.THIS_YEAR}}}),vH[xH.LAST_YEAR]=Object.freeze({key:xH.LAST_YEAR,name:"去年",getDefault:function(){return{type:xH.LAST_YEAR}}}),vH[xH.NEARLY_A_WEEK]=Object.freeze({key:xH.NEARLY_A_WEEK,name:"最近一周",getDefault:function(){return{type:xH.NEARLY_A_WEEK}}}),vH[xH.NEARLY_A_MONTH]=Object.freeze({key:xH.NEARLY_A_MONTH,name:"最近一月",getDefault:function(){return{type:xH.NEARLY_A_MONTH}}}),vH[xH.NEARLY_A_YEAR]=Object.freeze({key:xH.NEARLY_A_YEAR,name:"最近一年",getDefault:function(){return{type:xH.NEARLY_A_YEAR}}}),vH[xH.CUSTOM]=Object.freeze({key:xH.CUSTOM,name:"自定义",getDefault:function(){return{type:xH.CUSTOM,val:[null,null]}}}),vH));!function(e){e.DATE="date",e.DATE_RANGE="date_range",e.DATETIME="datetime",e.DATETIME_RANGE="datetime_range",e.TIME="time",e.TIME_RANGE="time_range",e.YEAR="year",e.MONTH="month",e.DAY="day"}(wH||(wH={}));var MH,TH;Object.freeze(((yH={})[wH.DATE]=Object.freeze({key:wH.DATE,name:"日期选择",getDefault:function(){return{default:bH[_H.NONE].getDefault()}}}),yH[wH.DATE_RANGE]=Object.freeze({key:wH.DATE_RANGE,name:"日期范围",getDefault:function(){return{default:SH[xH.NONE].getDefault()}}}),yH[wH.DATETIME]=Object.freeze({key:wH.DATETIME,name:"日期时间选择",getDefault:function(){return{default:bH[_H.NONE].getDefault()}}}),yH[wH.DATETIME_RANGE]=Object.freeze({key:wH.DATETIME_RANGE,name:"日期时间范围",getDefault:function(){return{default:SH[xH.NONE].getDefault()}}}),yH[wH.TIME]=Object.freeze({key:wH.TIME,name:"时间选择",getDefault:function(){return{default:bH[_H.NONE].getDefault()}}}),yH[wH.TIME_RANGE]=Object.freeze({key:wH.TIME_RANGE,name:"时间范围",getDefault:function(){return{default:SH[xH.NONE].getDefault()}}}),yH[wH.YEAR]=Object.freeze({key:wH.YEAR,name:"年",getDefault:function(){return{default:bH[_H.NONE].getDefault()}}}),yH[wH.MONTH]=Object.freeze({key:wH.MONTH,name:"月",getDefault:function(){return{default:bH[_H.NONE].getDefault()}}}),yH[wH.DAY]=Object.freeze({key:wH.DAY,name:"日",getDefault:function(){return{default:bH[_H.NONE].getDefault()}}}),yH));!function(e){e.NONE="none",e.COMPAREWITH_YEAR="comparewith_year",e.COMPAREWITH="comparewith",e.COMPAREWITH_YEAR_NUM="comparewith_year_num",e.COMPAREWITH_NUM="comparewith_num"}(TH||(TH={}));var IH,AH,DH,CH;Object.freeze(((MH={})[TH.NONE]=Object.freeze({key:TH.NONE,name:"不对比",label:"不对比"}),MH[TH.COMPAREWITH_YEAR]=Object.freeze({key:TH.COMPAREWITH_YEAR,name:"同比增长率",label:"同比增长率"}),MH[TH.COMPAREWITH]=Object.freeze({key:TH.COMPAREWITH,name:"环比增长率",label:"环比增长率"}),MH[TH.COMPAREWITH_YEAR_NUM]=Object.freeze({key:TH.COMPAREWITH_YEAR_NUM,name:"同比增长值",label:"同比增长值"}),MH[TH.COMPAREWITH_NUM]=Object.freeze({key:TH.COMPAREWITH_NUM,name:"环比增长值",label:"环比增长值"}),MH));!function(e){e.NONE="none",e.DATA="data",e.TIME="time",e.PERCENT="percent"}(CH||(CH={}));var OH;Object.freeze(((IH={})[CH.NONE]=Object.freeze({key:CH.NONE,label:"默认"}),IH[CH.DATA]=Object.freeze({key:CH.DATA,label:"数值"}),IH[CH.TIME]=Object.freeze({key:CH.TIME,label:"时间"}),IH[CH.PERCENT]=Object.freeze({key:CH.PERCENT,label:"百分比"}),IH));!function(e){e.NONE="none",e.CN_K="k-cn",e.CN_10K="10k-cn",e.CN_100K="100k-cn",e.CN_M="m-cn",e.CN_10M="10m-cn",e.CN_100M="100m-cn",e.EN_K="k-en",e.EN_M="m-en",e.EN_B="b-en"}(OH||(OH={}));var kH;Object.freeze(((AH={})[OH.NONE]=Object.freeze({key:OH.NONE,label:"无",value:1}),AH[OH.CN_K]=Object.freeze({key:OH.CN_K,label:"千",value:Math.pow(10,3)}),AH[OH.CN_10K]=Object.freeze({key:OH.CN_10K,label:"万",value:Math.pow(10,4)}),AH[OH.CN_100K]=Object.freeze({key:OH.CN_100K,label:"十万",value:Math.pow(10,5)}),AH[OH.CN_M]=Object.freeze({key:OH.CN_M,label:"百万",value:Math.pow(10,6)}),AH[OH.CN_10M]=Object.freeze({key:OH.CN_10M,label:"千万",value:Math.pow(10,7)}),AH[OH.CN_100M]=Object.freeze({key:OH.CN_100M,label:"亿",value:Math.pow(10,8)}),AH[OH.EN_K]=Object.freeze({key:OH.EN_K,label:"K",value:Math.pow(10,3)}),AH[OH.EN_M]=Object.freeze({key:OH.EN_M,label:"M",value:Math.pow(10,6)}),AH[OH.EN_B]=Object.freeze({key:OH.EN_B,label:"B",value:Math.pow(10,9)}),AH));!function(e){e.YEAR="year",e.MONTH="month",e.DAY="day",e.HOUR="hour",e.MINUTE="minute",e.SECOND="second",e.MILLISECOND="millisecond"}(kH||(kH={}));var LH,EH,NH,PH;Object.freeze(((DH={})[kH.YEAR]=Object.freeze({key:kH.YEAR,label:"年",value:31536e6}),DH[kH.MONTH]=Object.freeze({key:kH.MONTH,label:"月",value:2592e6}),DH[kH.DAY]=Object.freeze({key:kH.DAY,label:"日",value:864e5}),DH[kH.HOUR]=Object.freeze({key:kH.HOUR,label:"小时",value:36e5}),DH[kH.MINUTE]=Object.freeze({key:kH.MINUTE,label:"分钟",value:6e4}),DH[kH.SECOND]=Object.freeze({key:kH.SECOND,label:"秒",value:1e3}),DH[kH.MILLISECOND]=Object.freeze({key:kH.MILLISECOND,label:"毫秒",value:1}),DH));!function(e){e.ZERO="0",e.ONE="1",e.TWO="2",e.THREE="3",e.FOUR="4",e.FIVE="5",e.SIX="6"}(LH||(LH={})),function(e){e.DEFAULT="default",e.NONE="none",e.CN_YYYYMMDD="%Y年%m月%d日",e.MIDDLE_DASH_YYYYMMDD="%Y-%m-%d",e.SLASH_YYYYMMDD="%y/%m/%d",e.CN_YYYYMM="%Y年%m月",e.MIDDLE_DASH_YYYYMM="%Y-%m",e.SLASH_YYYYMM="%y/%m",e.CN_YYYY="%Y年",e.YYYY="%Y",e.CN_MM="%m月",e.MM="%m",e.CN_DD="%d日",e.DD="%d"}(PH||(PH={}));var RH;Object.freeze(((EH={})[PH.DEFAULT]=Object.freeze({key:PH.DEFAULT,label:"默认"}),EH[PH.NONE]=Object.freeze({key:PH.NONE,label:"隐藏"}),EH[PH.CN_YYYYMMDD]=Object.freeze({key:PH.CN_YYYYMMDD,label:"2019年03月01日(yyyy年mm月dd日)"}),EH[PH.MIDDLE_DASH_YYYYMMDD]=Object.freeze({key:PH.MIDDLE_DASH_YYYYMMDD,label:"2019-03-01(yyyy-mm-dd)"}),EH[PH.SLASH_YYYYMMDD]=Object.freeze({key:PH.SLASH_YYYYMMDD,label:"19/03/01(yy/mm/dd)"}),EH[PH.CN_YYYYMM]=Object.freeze({key:PH.CN_YYYYMM,label:"2019年03月(yyyy年mm月)"}),EH[PH.MIDDLE_DASH_YYYYMM]=Object.freeze({key:PH.MIDDLE_DASH_YYYYMM,label:"2019-03(yyyy-mm)"}),EH[PH.SLASH_YYYYMM]=Object.freeze({key:PH.SLASH_YYYYMM,label:"2019/03(yyyy/mm)"}),EH[PH.CN_YYYY]=Object.freeze({key:PH.CN_YYYY,label:"2019年(yyyy年)"}),EH[PH.YYYY]=Object.freeze({key:PH.YYYY,label:"2019(yyyy)"}),EH[PH.CN_MM]=Object.freeze({key:PH.CN_MM,label:"03月(mm月)"}),EH[PH.MM]=Object.freeze({key:PH.MM,label:"03(mm)"}),EH[PH.CN_DD]=Object.freeze({key:PH.CN_DD,label:"01日(dd日)"}),EH[PH.DD]=Object.freeze({key:PH.DD,label:"01(dd)"}),EH));!function(e){e.DEFAULT="default",e.NONE="none",e.HMS="%H:%i:%s",e.HM="%H:%i",e.CN_HMS="%H时%i分%s秒",e.CN_HM="%H时%i",e.CN_H="%H时",e.RISP="%r:%i:%s %p",e.RIP="%r:%i %p"}(RH||(RH={}));var zH,BH,VH;Object.freeze(((NH={})[RH.DEFAULT]=Object.freeze({key:RH.DEFAULT,label:"默认"}),NH[PH.NONE]=Object.freeze({key:PH.NONE,label:"隐藏"}),NH[RH.HMS]=Object.freeze({key:RH.HMS,label:"12:00:00"}),NH[RH.HM]=Object.freeze({key:RH.HM,label:"12:00"}),NH[RH.CN_HMS]=Object.freeze({key:RH.CN_HMS,label:"12时00分00秒"}),NH[RH.CN_HM]=Object.freeze({key:RH.CN_HM,label:"12时00"}),NH[RH.CN_H]=Object.freeze({key:RH.CN_H,label:"12时"}),NH[RH.RISP]=Object.freeze({key:RH.RISP,label:"12:00:00 AM"}),NH[RH.RIP]=Object.freeze({key:RH.RIP,label:"12:00 AM"}),NH));!function(e){e.NONE="none",e.DRILL="drill",e.DETAIL="detail"}(VH||(VH={}));var HH;Object.freeze(((zH={})[VH.NONE]=Object.freeze({key:VH.NONE,label:"无点击事件"}),zH[VH.DRILL]=Object.freeze({key:VH.DRILL,label:"下钻"}),zH[VH.DETAIL]=Object.freeze({key:VH.DETAIL,label:"显示详细表"}),zH));!function(e){e.DIALOG="dialog"}(HH||(HH={}));var YH,FH;Object.freeze(((BH={})[HH.DIALOG]=Object.freeze({key:HH.DIALOG,label:"通过弹窗显示",getDefaultConfig:function(){return{mode:HH.DIALOG,condition:{targetSetId:void 0,filter:[]}}},getDefaultFilerItem:function(){return{sourceFieldId:null,sourceFieldScope:null,targetFieldId:null,targetFieldScope:null}}}),BH));!function(e){e.NONE="none",e.SUM="sum",e.COUNT="count",e.DISTINCT="count_distinct",e.AVG="avg",e.MAX="max",e.MIN="min"}(FH||(FH={}));var GH,WH;Object.freeze(((YH={})[FH.NONE]=Object.freeze({key:FH.NONE,name:"不计算",label:"不计算"}),YH[FH.SUM]=Object.freeze({key:FH.SUM,name:"求和",label:"求和"}),YH[FH.COUNT]=Object.freeze({key:FH.COUNT,name:"计次",label:"计次"}),YH[FH.DISTINCT]=Object.freeze({key:FH.DISTINCT,name:"计数",label:"计数"}),YH[FH.AVG]=Object.freeze({key:FH.AVG,name:"平均",label:"平均"}),YH[FH.MAX]=Object.freeze({key:FH.MAX,name:"最大值",label:"最大值"}),YH[FH.MIN]=Object.freeze({key:FH.MIN,name:"最小值",label:"最小值"}),YH));!function(e){e.NONE="none",e.SHOW_NULL="null",e.SHOW_ZERO="zero",e.SHOW_STRIKETHROUGH="strikethrough"}(WH||(WH={}));var jH,UH;Object.freeze(((GH={})[WH.NONE]=Object.freeze({key:WH.NONE,label:"默认"}),GH[WH.SHOW_NULL]=Object.freeze({key:WH.SHOW_NULL,label:"显示为 null"}),GH[WH.SHOW_ZERO]=Object.freeze({key:WH.SHOW_ZERO,label:"显示为 0"}),GH[WH.SHOW_STRIKETHROUGH]=Object.freeze({key:WH.SHOW_STRIKETHROUGH,label:"显示为-"}),GH));!function(e){e.NONE="none",e.ASC="asc",e.DESC="desc"}(UH||(UH={}));var ZH;Object.freeze(((jH={})[UH.NONE]=Object.freeze({key:UH.NONE,name:"默认",label:"默认"}),jH[UH.ASC]=Object.freeze({key:UH.ASC,name:"↑",label:"升序 ↑"}),jH[UH.DESC]=Object.freeze({key:UH.DESC,name:"↓",label:"降序 ↓"}),jH));function XH(e){var t=e.dformat,n=e.tformat,i=[];return t&&t!==PH.DEFAULT?t!==PH.NONE&&i.push(t):i.push(PH.MIDDLE_DASH_YYYYMMDD),n&&n!==RH.DEFAULT?n!==PH.NONE&&i.push(n):i.push(RH.HMS),i.join(" ")}!function(e){e.NAME="rename",e.EXPR="expr",e.ORDER_BY="orderBy",e.FILTER="filter",e.EVENT="event",e.COMPARE="compare",e.DATA_FORMAT="data-format",e.DATE_FORMAT="date-format",e.TIME_FORMAT="time-format",e.NULL_VAL="nullVal",e.EARLY_WARNING="earlyWarning",e.DELETE="delete"}(ZH||(ZH={}));var qH=function(e){var t=e.value;return 0===t.length||t.findIndex((function(e){return e||0===e}))<0},KH=function(e){var t=e.value,n=e.dateFormat;switch(t.type){case _H.NONE:return null;case _H.CURRENT:return $V().format(n);case _H.CUSTOM:return t.val}},QH=function(e){var t=e.value,n=e.dateFormat;switch(t.type){case xH.NONE:return[null,null];case xH.TODAY:var i=$V().startOf("d"),a=$V().endOf("d");return[i.format(n),a.format(n)];case xH.YESTERDAY:var r=$V().add(-1,"days").startOf("d"),o=$V().add(-1,"days").endOf("d");return[r.format(n),o.format(n)];case xH.THIS_WEEK:var s=$V().startOf("isoWeeks").startOf("d"),l=$V().endOf("isoWeeks").endOf("d");return[s.format(n),l.format(n)];case xH.LAST_WEEK:var u=$V().add(-7,"day").startOf("isoWeeks").startOf("d"),c=$V().add(-7,"day").endOf("isoWeeks").endOf("d");return[u.format(n),c.format(n)];case xH.THIS_MONTH:var h=$V().startOf("month").startOf("d"),d=$V().endOf("month").endOf("d");return[h.format(n),d.format(n)];case xH.LAST_MONTH:var f=$V().add(-1,"month").startOf("month").startOf("d"),p=$V().add(-1,"month").endOf("month").endOf("d");return[f.format(n),p.format(n)];case xH.THIS_QUARTER:var g=$V().startOf("quarter").startOf("d"),m=$V().endOf("quarter").endOf("d");return[g.format(n),m.format(n)];case xH.LAST_QUARTER:var v=$V().add(-1,"quarter").startOf("quarter").startOf("d"),y=$V().add(-1,"quarter").endOf("quarter").endOf("d");return[v.format(n),y.format(n)];case xH.THIS_YEAR:var _=$V().startOf("year").startOf("d"),x=$V().endOf("year").endOf("d");return[_.format(n),x.format(n)];case xH.LAST_YEAR:var b=$V().add(-1,"year").startOf("year").startOf("d"),w=$V().add(-1,"year").endOf("year").endOf("d");return[b.format(n),w.format(n)];case xH.NEARLY_A_WEEK:var S=$V().add(1,"day").add(-1,"week"),M=$V();return[S.format(n),M.format(n)];case xH.NEARLY_A_MONTH:var T=$V().add(1,"day").add(-1,"month"),I=$V();return[T.format(n),I.format(n)];case xH.NEARLY_A_YEAR:var A=$V().add(1,"day").add(-1,"year"),D=$V();return[A.format(n),D.format(n)];case xH.CUSTOM:return t.val||[null,null]}},$H={},JH=function(e){var t=e.shareId,n=e.field,i=e.getTableColumnValueFunc;return o(void 0,void 0,void 0,(function(){var e,a,r,o,l,u,c,h,d,f,p,g,m,v,y,_,x,b,w,S,M;return s(this,(function(s){switch(s.label){case 0:if("string"==typeof n.filter)return[2,{op:"=",value:[n.filter],options:[]}];switch(e=null,a=Reflect.has(n.filter.params,"value"),n.type){case iH.STRING:return[3,1];case iH.TIME:return[3,23];case iH.INT:case iH.FLOAT:case iH.DOUBLE:return[3,24]}return[3,25];case 1:switch(n.filter.type){case hH.INPUT:return[3,2];case hH.SELECT:return[3,3];case hH.CONDITION:return[3,4];case hH.TAG:return[3,5];case hH.TREE:return[3,21]}return[3,22];case 2:return r=a?[n.filter.params.value]:[n.filter.params.default],e={op:"**",value:r,options:[]},[3,22];case 3:return o=a?n.filter.params.value:n.filter.params.default,n.filter.params.isMultiple||(o=[o]),e={op:"=",value:[],options:o},[3,22];case 4:switch(w=void 0,S=void 0,M=void 0,a?(w=n.filter.params.value.val,M=n.filter.params.value.searchMode):(w=n.filter.params.default.val,M=n.filter.params.default.searchMode),M){case QV.CONTAIN:S="**";break;case QV.NOT_CONTAIN:S="!**";break;case QV.STARTWITH:S="*=";break;case QV.NOT_STARTWITH:S="!*=";break;case QV.ENDWITH:S="=*";break;case QV.NOT_ENDWITH:S="!=*";break;case QV.EQUAL:S="=";break;case QV.NOT_EQUAL:S="<>";break;case QV.NULL_STR:S="empty";break;case QV.NOT_NULL_STR:S="ne";break;case QV.NULL:S="null";break;case QV.NOT_NULL:S="nn"}return e={op:S,value:[w],options:[]},[3,22];case 5:return l=void 0,u="=",a?(n.filter.params.isMultiple?(u=n.filter.params.value.exclude?"!=":"=",l=n.filter.params.value.val):l=[n.filter.params.value],[3,20]):[3,6];case 6:if(!n.filter.params.isMultiple)return[3,14];switch(n.filter.params.default.type){case uH.ALL:return[3,7];case uH.BEFORE:return[3,8];case uH.CUSTOM:return[3,12]}return[3,13];case 7:return l=[],[3,13];case 8:return c=[],$H[n.key]?(c=$H[n.key],[3,11]):[3,9];case 9:return[4,i({share_id:t,field:n.key,pp:Math.max.apply(Math,gH[hH.TAG].showTagCount),pg:1})];case 10:c=s.sent(),s.label=11;case 11:return l=c.slice(0,n.filter.params.default.index),[3,13];case 12:return l=n.filter.params.default.val,[3,13];case 13:return[3,20];case 14:switch(n.filter.params.default.type){case lH.NONE:return[3,15];case lH.FIRST_TAG:return[3,16]}return[3,20];case 15:return l=[],[3,20];case 16:return c=[],$H[n.key]?(c=$H[n.key],[3,19]):[3,17];case 17:return[4,i({field:n.key,pp:Math.max.apply(Math,gH[hH.TAG].showTagCount),pg:1})];case 18:c=s.sent(),s.label=19;case 19:return l=c.length>0?[c[0]]:[],[3,20];case 20:return e={op:u,value:[],options:l},[3,22];case 21:return n.filter.params.isMultiple?(h=a?n.filter.params.value:n.filter.params.default,o=h.map((function(e){return e.split(">",1)[0]}))):(d=n.filter.params.value||n.filter.params.default,o=[d.split(">",1)[0]]),e={op:"=",value:[],options:o},n.filter.params.treeCheckStrictly&&(e.level="mutil"),[3,22];case 22:return[3,25];case 23:switch(n.filter.type){case wH.DATE:f=void 0,f=a?n.filter.params.value:KH({value:n.filter.params.default,dateFormat:"YYYY-MM-DD"}),e={op:"between",value:f?[f+" 00:00:00",f+" 23:59:59"]:[],options:[]};break;case wH.DATE_RANGE:p=void 0,p=a?n.filter.params.value:QH({value:n.filter.params.default,dateFormat:"YYYY-MM-DD"}),e={op:"between",value:[p[0]&&p[0]+" 00:00:00",p[1]&&p[1]+" 23:59:59"],options:[]};break;case wH.DATETIME:g=void 0,g=a?n.filter.params.value:KH({value:n.filter.params.default,dateFormat:"YYYY-MM-DD HH:mm:ss"}),e={op:"=",value:[g],options:[]};break;case wH.DATETIME_RANGE:m=void 0,m=a?n.filter.params.value:QH({value:n.filter.params.default,dateFormat:"YYYY-MM-DD HH:mm:ss"}),e={op:"between",value:m,options:[]};break;case wH.TIME:v=void 0,v=a?n.filter.params.value:KH({value:n.filter.params.default,dateFormat:"HH:mm:ss"}),e={op:"=",dformat:"only_time",value:[v],options:[]};break;case wH.TIME_RANGE:y=void 0,y=a?n.filter.params.value:QH({value:n.filter.params.default,dateFormat:"HH:mm:ss"}),e={op:"between",dformat:"only_time",value:y,options:[]};break;case wH.YEAR:_=void 0,_=a?n.filter.params.value:KH({value:n.filter.params.default,dateFormat:"YYYY"}),e={op:"@only_year",value:[],options:[_]};break;case wH.MONTH:x=void 0,x=a?n.filter.params.value:KH({value:n.filter.params.default,dateFormat:"MM"}),e={op:"@only_month",value:[],options:[x]};break;case wH.DAY:b=void 0,b=a?n.filter.params.value:KH({value:n.filter.params.default,dateFormat:"DD"}),e={op:"@only_day",value:[],options:[b]}}return[3,25];case 24:switch(n.filter.type){case pH.CONDITION:switch(w=void 0,S=void 0,M=void 0,a?(w=n.filter.params.value.val,M=n.filter.params.value.searchMode):(w=n.filter.params.default.val,M=n.filter.params.default.searchMode),M){case JV.EQUAL:S="=";break;case JV.NOT_EQUAL:S="!=";break;case JV.GREAT_EQUAL:S=">=";break;case JV.GREAT_THAN:S=">";break;case JV.LESS_EQUAL:S="<=";break;case JV.LESS_THAN:S="<";break;case JV.NULL:S="null";break;case JV.NOT_NULL:S="nn"}e={op:S,value:[w],options:[]};break;case pH.RANGE:e={op:"between",value:a?n.filter.params.value:n.filter.params.default,options:[]}}return[3,25];case 25:return[2,e]}}))}))};function eY(e){var t=e.shareId,n=e.criteria,i=e.getTableColumnValueFunc;return o(this,void 0,void 0,(function(){var e,a=this;return s(this,(function(r){switch(r.label){case 0:return e=Array.from({length:n.length}),[4,Promise.all(n.map((function(n,r){return o(a,void 0,void 0,(function(){var a,o;return s(this,(function(s){switch(s.label){case 0:return a={key:n.key,type:n.type,expr:n.expr},[4,JH({shareId:t,field:n,getTableColumnValueFunc:i})];case 1:return(o=s.sent())&&!function(e){var t=e.filter;return!["empty","null","nn","ne"].includes(t.op)&&(qH({value:t.value})&&qH({value:t.options}))}({filter:o})?(a.filter=[o],o.level&&(a.level=o.level)):a.filter=[],e[r]=a,[2]}}))}))})))];case 1:return r.sent(),[2,e]}}))}))}function tY(e){return e.value.map((function(e){var t={alias:e.alias,key:e.key,type:e.type,expr:e.expr,orderBy:e.orderBy,compare:e.compare};if(e.type===iH.TIME)if(e.subtype){var n=aH[e.subtype];t.type=n.sqltype,t.dformat=n.sqldformat}else{var i=XH({dformat:e.dformat,tformat:e.tformat});i&&(t.dformat=i)}return t}))}function nY(e){var t=e.customFields,n=[];return Object.values(t.calc).forEach((function(e){n=n.concat(e)})),n}function iY(e){var t=e.shareId,n=e.setConfig,i=e.getTableColumnValueFunc;return o(this,void 0,void 0,(function(){var e,a,r;return s(this,(function(o){switch(o.label){case 0:return[4,eY({shareId:t,criteria:n.data.criteria,getTableColumnValueFunc:i})];case 1:return e=o.sent(),a=tY({value:n.data.value}),r=nY({customFields:n.customFields}),[2,{criteria:e,group:[],value:a,drillDown:[],rule:r}]}}))}))}var aY,rY,oY,sY,lY;function uY(e){var t=e.shareId,n=e.setConfig,i=e.getTableColumnValueFunc;return o(this,void 0,void 0,(function(){var e,a,r,o,l,u;return s(this,(function(s){switch(s.label){case 0:return[4,eY({shareId:t,criteria:n.data.criteria,getTableColumnValueFunc:i})];case 1:return e=s.sent(),a=function(e){var t=e.drillDown,n=e.group,i={group:[],drillDown:[]};return i.group=n.map((function(e){var t={alias:e.alias,key:e.key,type:e.type,expr:e.expr,orderBy:e.orderBy,filter:[]};if(e.type===iH.TIME)if(e.subtype){var n=aH[e.subtype];t.type=n.sqltype,t.dformat=n.sqldformat}else{var i=XH({dformat:e.dformat,tformat:e.tformat});i&&(t.dformat=i)}return t})),Object.entries(t).forEach((function(e){var t=e[0],a=e[1];if(a.current){var r=n.find((function(e){return e.id===t}));i.group.splice(r,1,{alias:a.current.alias,key:a.current.key,type:a.current.type,filter:[]});var o=[],s=[];a.path.forEach((function(e){o.push({alias:e.alias,key:e.key,type:e.type,filter:[]}),s.push(e.value)})),o.push({alias:a.current.alias,key:a.current.key,type:a.current.type,filter:[]}),i.drillDown.push({items:o,itemValues:s,currentItem:a.path.length+1,isDrill:!0})}})),i}({drillDown:n.data.drillDown,group:n.data.group}),r=a.group,o=a.drillDown,l=tY({value:n.data.value}),u=nY({customFields:n.customFields}),[2,{criteria:e,group:r,value:l,drillDown:o,rule:u}]}}))}))}!function(e){e.ALL="all",e.TODAY="today",e.YESTERDAY="yesterday",e.THIS_WEEK_TO_NOW="this_week_to_now",e.LAST_WEEK="last_week",e.THIS_MONTH_TO_NOW="this_month_to_now",e.LAST_MONTH="last_month",e.THIS_QUARTER_TO_NOW="this_quarter_to_now",e.LAST_QUARTER="last_quarter",e.THIS_YEAR_TO_NOW="this_year_to_now",e.LAST_YEAR="last_year"}(lY||(lY={}));var cY;Object.freeze(((aY={})[lY.ALL]=Object.freeze({key:lY.ALL,name:"全部"}),aY[lY.TODAY]=Object.freeze({key:lY.TODAY,name:"当天"}),aY[lY.YESTERDAY]=Object.freeze({key:lY.YESTERDAY,name:"昨天"}),aY[lY.THIS_WEEK_TO_NOW]=Object.freeze({key:lY.THIS_WEEK_TO_NOW,name:"本周至今"}),aY[lY.LAST_WEEK]=Object.freeze({key:lY.LAST_WEEK,name:"上周"}),aY[lY.THIS_MONTH_TO_NOW]=Object.freeze({key:lY.THIS_MONTH_TO_NOW,name:"本月至今"}),aY[lY.LAST_MONTH]=Object.freeze({key:lY.LAST_MONTH,name:"上月"}),aY[lY.THIS_QUARTER_TO_NOW]=Object.freeze({key:lY.THIS_QUARTER_TO_NOW,name:"本季度至今"}),aY[lY.LAST_QUARTER]=Object.freeze({key:lY.LAST_QUARTER,name:"上季度"}),aY[lY.THIS_YEAR_TO_NOW]=Object.freeze({key:lY.THIS_YEAR_TO_NOW,name:"本年至今"}),aY[lY.LAST_YEAR]=Object.freeze({key:lY.LAST_YEAR,name:"去年"}),aY));!function(e){e.SOME_DAY="some_day",e.SOME_WEEK="some_week",e.SOME_MONTH="some_month",e.SOME_YEAR="some_year"}(cY||(cY={}));var hY;Object.freeze(((rY={})[cY.SOME_DAY]=Object.freeze({key:cY.SOME_DAY,name:"前N天"}),rY[cY.SOME_WEEK]=Object.freeze({key:cY.SOME_WEEK,name:"前N周"}),rY[cY.SOME_MONTH]=Object.freeze({key:cY.SOME_MONTH,name:"前N月"}),rY[cY.SOME_YEAR]=Object.freeze({key:cY.SOME_YEAR,name:"前N年"}),rY));!function(e){e.SHORTCUTS="shortcuts",e.CUSTOM_TIME="custom_time",e.DYNAMIC_TIME="dynamic_time"}(hY||(hY={}));var dY;Object.freeze(((oY={})[hY.SHORTCUTS]=Object.freeze({key:hY.SHORTCUTS,name:"快捷选择",getDefault:function(){return{value:lY.ALL}}}),oY[hY.CUSTOM_TIME]=Object.freeze({key:hY.CUSTOM_TIME,name:"自定义时间",getDefault:function(){return{startDate:null,startTime:{enable:!1,value:"00:00:00"},endDate:null,endTime:{enable:!1,value:"23:59:59"}}}}),oY[hY.DYNAMIC_TIME]=Object.freeze({key:hY.DYNAMIC_TIME,name:"动态时间",getDefault:function(){return{type:cY.SOME_DAY,value:null}}}),oY));!function(e){e.YEAR="year",e.QUARTER="quarter",e.MONTH="month",e.WEEK="week"}(dY||(dY={}));Object.freeze(((sY={})[dY.YEAR]=Object.freeze({key:dY.YEAR,name:"年"}),sY[dY.QUARTER]=Object.freeze({key:dY.QUARTER,name:"季"}),sY[dY.MONTH]=Object.freeze({key:dY.MONTH,name:"月"}),sY[dY.WEEK]=Object.freeze({key:dY.WEEK,name:"周"}),sY));function fY(e){var t=e.timeRangeConfig,n=[null,null];switch(t.type){case hY.SHORTCUTS:var i=t.params,a=$V();switch(i.value){case lY.ALL:n=[null,null];break;case lY.TODAY:var r=a.format("YYYY-MM-DD");n=[r+" 00:00:00",r+" 23:59:59"];break;case lY.YESTERDAY:var o=a.add(-1,"days").format("YYYY-MM-DD");n=[o+" 00:00:00",o+" 23:59:59"];break;case lY.THIS_WEEK_TO_NOW:n=[$V().startOf("week").format("YYYY-MM-DD 00:00:00"),a.format("YYYY-MM-DD 23:59:59")];break;case lY.LAST_WEEK:n=[$V().add(-1,"week").startOf("week").format("YYYY-MM-DD 00:00:00"),a.format("YYYY-MM-DD 23:59:59")];break;case lY.THIS_MONTH_TO_NOW:n=[$V().startOf("month").format("YYYY-MM-DD 00:00:00"),a.format("YYYY-MM-DD 23:59:59")];break;case lY.LAST_MONTH:var s=$V().add(-1,"month").startOf("month").startOf("d"),l=$V().add(-1,"month").endOf("month").endOf("d");n=[s.format("YYYY-MM-DD 00:00:00"),l.format("YYYY-MM-DD 23:59:59")];break;case lY.THIS_QUARTER_TO_NOW:n=[a.startOf("quarter").format("YYYY-MM-DD 00:00:00"),a.format("YYYY-MM-DD 23:59:59")];break;case lY.LAST_QUARTER:var u=$V().add(-1,"quarter").startOf("quarter"),c=$V().add(-1,"quarter").endOf("quarter");n=[u.format("YYYY-MM-DD 00:00:00"),c.format("YYYY-MM-DD 23:59:59")];break;case lY.THIS_YEAR_TO_NOW:n=[$V().startOf("year").format("YYYY-MM-DD 00:00:00"),a.format("YYYY-MM-DD 23:59:59")];break;case lY.LAST_YEAR:var h=$V().add(-1,"year").startOf("year"),d=$V().add(-1,"year").endOf("year");n=[h.format("YYYY-MM-DD 00:00:00"),d.format("YYYY-MM-DD 23:59:59")]}break;case hY.CUSTOM_TIME:var f=t.params;n=[f.startDate+" "+f.startTime.value,f.endDate+" "+f.endTime.value];break;case hY.DYNAMIC_TIME:var p=t.params,g=$V(),m=$V();switch(p.type){case cY.SOME_DAY:m.add(0-p.value,"days");break;case cY.SOME_WEEK:m.add(0-p.value,"week");break;case cY.SOME_MONTH:m.add(0-p.value,"month");break;case cY.SOME_YEAR:m.add(0-p.value,"year")}n=[m.format("YYYY-MM-DD 00:00:00"),g.format("YYYY-MM-DD 23:59:59")]}return n}var pY,gY,mY=function(e){var t=e.groupField,n=e.timeRange;return{id:t.id,alias:t.alias,key:t.key,compareIndex:1,type:t.type,filter:[{op:"between",value:n||fY({timeRangeConfig:t.timeRange}),options:[]}]}};function vY(e){var t=e.shareId,n=e.setConfig,i=e.timeRange,a=e.getTableColumnValueFunc;return o(this,void 0,void 0,(function(){var e,r,o,u,c;return s(this,(function(s){switch(s.label){case 0:return[4,eY({shareId:t,criteria:n.data.criteria,getTableColumnValueFunc:a})];case 1:return e=s.sent(),r=n.data.group[0],[4,mY({groupField:r,timeRange:i})];case 2:return o=s.sent(),u=function(e){var t=e.timeRange,n=e.groupField,i=e.value,a=[];return i.forEach((function(e){var i={id:e.id,alias:e.alias,key:e.key,type:e.type,expr:e.expr};if(a.push(i),n.compare.yoy_ratio.enable){var r=Object.assign({},i,{alias:i.alias+"%%同比率"});switch(n.compare.yoy_ratio.dimension){case dY.WEEK:r.compare={type:"ratio",value:[$V(t[0]).add(-1,"week").format("YYYY-MM-DD HH:mm:ss"),$V(t[1]).add(-1,"week").format("YYYY-MM-DD HH:mm:ss")]};break;case dY.MONTH:r.compare={type:"ratio",value:[$V(t[0]).add(-1,"month").format("YYYY-MM-DD HH:mm:ss"),$V(t[1]).add(-1,"month").format("YYYY-MM-DD HH:mm:ss")]};break;case dY.QUARTER:r.compare={type:"ratio",value:[$V(t[0]).add(-1,"quarter").format("YYYY-MM-DD HH:mm:ss"),$V(t[1]).add(-1,"quarter").format("YYYY-MM-DD HH:mm:ss")]};break;case dY.YEAR:r.compare={type:"ratio",value:[$V(t[0]).add(-1,"year").format("YYYY-MM-DD HH:mm:ss"),$V(t[1]).add(-1,"year").format("YYYY-MM-DD HH:mm:ss")]}}a.push(r)}if(n.compare.yoy_value.enable){var o=Object.assign({},i,{alias:i.alias+"%%同比值"});switch(n.compare.yoy_value.dimension){case dY.WEEK:o.compare={type:"num",value:[$V(t[0]).add(-1,"week").format("YYYY-MM-DD HH:mm:ss"),$V(t[1]).add(-1,"week").format("YYYY-MM-DD HH:mm:ss")]};break;case dY.MONTH:o.compare={type:"num",value:[$V(t[0]).add(-1,"month").format("YYYY-MM-DD HH:mm:ss"),$V(t[1]).add(-1,"month").format("YYYY-MM-DD HH:mm:ss")]};break;case dY.QUARTER:o.compare={type:"num",value:[$V(t[0]).add(-1,"quarter").format("YYYY-MM-DD HH:mm:ss"),$V(t[1]).add(-1,"quarter").format("YYYY-MM-DD HH:mm:ss")]};break;case dY.YEAR:o.compare={type:"num",value:[$V(t[0]).add(-1,"year").format("YYYY-MM-DD HH:mm:ss"),$V(t[1]).add(-1,"year").format("YYYY-MM-DD HH:mm:ss")]}}a.push(o)}if(n.compare.mom_ratio.enable){var s=Object.assign({},i,{alias:i.alias+"%%环比率"}),l=$V(t[0]),u=$V(t[1]),c=l.diff(u)-1e3;s.compare={type:"ratio",value:[l.add(c,"ms").format("YYYY-MM-DD HH:mm:ss"),u.add(c,"ms").format("YYYY-MM-DD HH:mm:ss")]},a.push(s)}if(n.compare.mom_value.enable){var h=Object.assign({},i,{alias:i.alias+"%%环比值"});l=$V(t[0]),u=$V(t[1]),c=l.diff(u)-1e3;h.compare={type:"num",value:[l.add(c,"ms").format("YYYY-MM-DD HH:mm:ss"),u.add(c,"ms").format("YYYY-MM-DD HH:mm:ss")]},a.push(h)}})),a}({timeRange:o.filter[0].value,groupField:r,value:n.data.value}),c=nY({customFields:n.customFields}),[2,{criteria:l([o],e),group:[],value:u,drillDown:[],rule:c}]}}))}))}function yY(e){var t=e.shareId,n=void 0===t?null:t,i=e.setConfig,a=e.getTableColumnValueFunc;return o(this,void 0,void 0,(function(){var e,t;return s(this,(function(r){switch(r.label){case 0:switch(e={},t=i.data,i.render){case jV.TABLE:case jV.PIE:case jV.HISTOGRAM_LINE:case jV.HISTOGRAM_BAR:case jV.BAR:case jV.HISTOGRAM_MIX:return[3,1];case jV.GAUGE:return[3,3];case jV.INDICATOR_CARD:return[3,4];case jV.MAP:return[3,6];case jV.DETAIL:return[3,7]}return[3,9];case 1:return[4,uY({shareId:n,setConfig:i,getTableColumnValueFunc:a})];case 2:return e=r.sent(),[3,10];case 3:return[3,10];case 4:return[4,vY({shareId:n,setConfig:i,getTableColumnValueFunc:a})];case 5:return e=r.sent(),[3,10];case 6:return[3,10];case 7:return[4,iY({shareId:n,setConfig:i,getTableColumnValueFunc:a})];case 8:return e=r.sent(),[3,10];case 9:throw new Error("未知的图标渲染类型: "+t.render);case 10:return[2,e]}}))}))}!function(e){e.NORMAL="normal",e.CENTRAL_CONTROL="center-control",e.DOOR_PLATE="door-plate"}(gY||(gY={}));var _Y,xY,bY,wY,SY,MY;Object.freeze(((pY={})[gY.NORMAL]=Object.freeze({key:gY.NORMAL,name:"普通模式"}),pY[gY.CENTRAL_CONTROL]=Object.freeze({key:gY.CENTRAL_CONTROL,name:"中控大屏"}),pY[gY.DOOR_PLATE]=Object.freeze({key:gY.DOOR_PLATE,name:"电子门牌"}),pY));!function(e){e.SIZE8="8",e.SIZE10="10",e.SIZE12="12",e.SIZE13="13",e.SIZE14="14",e.SIZE16="16",e.SIZE18="18",e.SIZE20="20",e.SIZE24="24",e.SIZE26="26",e.SIZE28="28",e.SIZE30="30",e.SIZE32="32",e.SIZE34="34",e.SIZE36="36",e.SIZE38="38",e.SIZE40="40",e.SIZE48="48",e.SIZE64="64",e.SIZE72="72",e.SIZE128="128"}(SY||(SY={})),function(e){e.SIZE400="400",e.SIZE600="600"}(MY||(MY={}));var TY;Object.freeze(((_Y={})[MY.SIZE400]=Object.freeze({key:MY.SIZE400,name:"正常"}),_Y[MY.SIZE600]=Object.freeze({key:MY.SIZE600,name:"加粗"}),_Y));!function(e){e.NORMAL="normal",e.ITALIC="italic"}(TY||(TY={}));var IY;Object.freeze(((xY={})[TY.NORMAL]=Object.freeze({key:TY.NORMAL,name:"正常"}),xY[TY.ITALIC]=Object.freeze({key:TY.ITALIC,name:"斜体"}),xY));!function(e){e.LEFT="left",e.CENTER="center",e.RIGHT="right"}(IY||(IY={}));var AY;Object.freeze(((bY={})[IY.LEFT]=Object.freeze({key:IY.LEFT,iconfont:"icon-text_left",name:"左对齐"}),bY[IY.CENTER]=Object.freeze({key:IY.CENTER,iconfont:"icon-text_center",name:"居中对齐"}),bY[IY.RIGHT]=Object.freeze({key:IY.RIGHT,iconfont:"icon-text_right",name:"右对齐"}),bY));!function(e){e.TOP="top",e.MIDDLE="middle",e.BOTTOM="bottom"}(AY||(AY={}));Object.freeze(((wY={})[AY.TOP]=Object.freeze({key:AY.TOP,iconfont:"icon-top",name:"头部对齐"}),wY[AY.MIDDLE]=Object.freeze({key:AY.MIDDLE,iconfont:"icon-center",name:"居中对齐"}),wY[AY.BOTTOM]=Object.freeze({key:AY.BOTTOM,iconfont:"icon-bottom",name:"底部对齐"}),wY));var DY,CY,OY=Object.freeze(["#4499fa","#59d4d9","#4cd964","#ff9500","#ff3b30","#c894f6","#8c6fde","#767aee","#52c41a","#ff2d55","#ffcc00","#5ac8fa","#f478b8","#fae34c","#59d9a4"]);!function(e){e.PURE="pure",e.LINEAR="linear",e.RADIAL="radial"}(CY||(CY={}));var kY,LY,EY=Object.freeze(((DY={})[CY.PURE]=Object.freeze({key:CY.PURE,name:"纯色",getDefault:function(e){return void 0===e&&(e="#2b9f7f"),{type:CY.PURE,color:e}}}),DY[CY.LINEAR]=Object.freeze({key:CY.LINEAR,name:"线性渐变",getDefault:function(e){return void 0===e&&(e="#2b9f7f"),{type:CY.LINEAR,startColor:e,endColor:e}}}),DY[CY.RADIAL]=Object.freeze({key:CY.RADIAL,name:"径向渐变",getDefault:function(e){return void 0===e&&(e="#2b9f7f"),{type:CY.RADIAL,startColor:e,endColor:e,radius:5}}}),DY));!function(e){e.CONTINUOUS="continuous",e.PIECEWISE="piecewise"}(LY||(LY={}));var NY,PY,RY,zY=Object.freeze(((kY={})[LY.CONTINUOUS]=Object.freeze({key:LY.CONTINUOUS,name:"连续渐变",getDefault:function(e){return void 0===e&&(e="#2b9f7f"),{type:LY.CONTINUOUS,startColor:e,endColor:e}}}),kY[LY.PIECEWISE]=Object.freeze({key:LY.PIECEWISE,name:"区间渐变",getDefault:function(e){return void 0===e&&(e="#2b9f7f"),{type:LY.PIECEWISE,startColor:e,endColor:e,splitNumber:5}}}),kY));!function(e){e.TOP="top",e.BOTTOM="bottom",e.LEFT="left",e.RIGHT="right",e.INSIDE_LEFT="insideLeft",e.INSIDE_RIGHT="insideRight",e.INSIDE_TOP="insideTop",e.INSIDE_CENTER="inside",e.INSIDE_BOTTOM="insideBottom"}(RY||(RY={}));var BY;Object.freeze(((NY={})[RY.TOP]=Object.freeze({key:RY.TOP,name:"上方"}),NY[RY.BOTTOM]=Object.freeze({key:RY.BOTTOM,name:"下方"}),NY[RY.LEFT]=Object.freeze({key:RY.LEFT,name:"左边"}),NY[RY.RIGHT]=Object.freeze({key:RY.RIGHT,name:"右边"}),NY[RY.INSIDE_CENTER]=Object.freeze({key:RY.INSIDE_CENTER,name:"内部居中"}),NY[RY.INSIDE_LEFT]=Object.freeze({key:RY.INSIDE_LEFT,name:"内部左边"}),NY[RY.INSIDE_RIGHT]=Object.freeze({key:RY.INSIDE_RIGHT,name:"内部右边"}),NY[RY.INSIDE_TOP]=Object.freeze({key:RY.INSIDE_TOP,name:"内部上方"}),NY[RY.INSIDE_BOTTOM]=Object.freeze({key:RY.INSIDE_BOTTOM,name:"内部下方"}),NY));!function(e){e.GROUP="group",e.SERIES="series",e.VALUE="value",e.PERCENT="percent"}(BY||(BY={}));var VY,HY,YY,FY;Object.freeze(((PY={})[BY.GROUP]=Object.freeze({key:BY.GROUP,name:"维度项"}),PY[BY.SERIES]=Object.freeze({key:BY.SERIES,name:"数值标题"}),PY[BY.VALUE]=Object.freeze({key:BY.VALUE,name:"值"}),PY[BY.PERCENT]=Object.freeze({key:BY.PERCENT,name:"百分比"}),PY));!function(e){e.PERCENT="percent",e.INDEX="index"}(FY||(FY={}));var GY;Object.freeze(((VY={})[FY.PERCENT]=Object.freeze({key:FY.PERCENT,name:"%"}),VY[FY.INDEX]=Object.freeze({key:FY.INDEX,name:"项"}),VY));!function(e){e.BT="bt",e.E="e",e.NE="ne",e.GT="gt",e.GE="ge",e.LT="lt",e.LE="le",e.BEFORE="before",e.AFTER="after",e.INDEX="index"}(GY||(GY={}));var WY;Object.freeze(((HY={})[GY.BT]=Object.freeze({key:GY.BT,name:"介于",getDefault:function(){return{op:GY.BT,value:[null,null]}}}),HY[GY.E]=Object.freeze({key:GY.E,name:"等于",getDefault:function(){return{op:GY.E,value:null}}}),HY[GY.NE]=Object.freeze({key:GY.NE,name:"不等于",getDefault:function(){return{op:GY.NE,value:null}}}),HY[GY.GT]=Object.freeze({key:GY.GT,name:"大于",getDefault:function(){return{op:GY.GT,value:null}}}),HY[GY.GE]=Object.freeze({key:GY.GE,name:"大于等于",getDefault:function(){return{op:GY.GE,value:null}}}),HY[GY.LT]=Object.freeze({key:GY.LT,name:"小于",getDefault:function(){return{op:GY.LT,value:null}}}),HY[GY.LE]=Object.freeze({key:GY.LE,name:"小于等于",getDefault:function(){return{op:GY.LE,value:null}}}),HY[GY.BEFORE]=Object.freeze({key:GY.BEFORE,name:"前",getDefault:function(){return{op:GY.BEFORE,value:null,unit:FY.INDEX}}}),HY[GY.AFTER]=Object.freeze({key:GY.AFTER,name:"后",getDefault:function(){return{op:GY.AFTER,value:null,unit:FY.INDEX}}}),HY[GY.INDEX]=Object.freeze({key:GY.INDEX,name:"第",getDefault:function(){return{op:GY.INDEX,value:null}}}),HY));!function(e){e.SHOW="show",e.HIDDEN="hidden",e.DEFAULT="default"}(WY||(WY={}));var jY,UY,ZY;Object.freeze(((YY={})[WY.SHOW]=Object.freeze({key:WY.SHOW,name:"显示"}),YY[WY.HIDDEN]=Object.freeze({key:WY.HIDDEN,name:"隐藏"}),YY[WY.DEFAULT]=Object.freeze({key:WY.DEFAULT,name:"默认"}),YY));!function(e){e.BAR="bar",e.LINE="line"}(ZY||(ZY={}));var XY;Object.freeze(((jY={})[ZY.BAR]=Object.freeze({key:ZY.BAR,name:"柱"}),jY[ZY.LINE]=Object.freeze({key:ZY.LINE,name:"线"}),jY));!function(e){e.ITEM_STYLE="itemStyle",e.VISUAL_MAP="visualMap"}(XY||(XY={}));var qY,KY,QY=Object.freeze(((UY={})[XY.ITEM_STYLE]=Object.freeze({key:XY.ITEM_STYLE,name:"颜色填充",getDefaultConfig:function(){return{type:XY.ITEM_STYLE,params:EY[CY.PURE].getDefault()}}}),UY[XY.VISUAL_MAP]=Object.freeze({key:XY.VISUAL_MAP,name:"视觉映射",getDefaultConfig:function(){return{type:XY.VISUAL_MAP,params:zY[LY.CONTINUOUS].getDefault()}}}),UY));function $Y(e){var t=e.seriesType,n=e.axisPosition,i=e.dataLabelPosition;return{type:t,axisPosition:n,width:null,radius:0,colorFill:QY[XY.ITEM_STYLE].getDefaultConfig(),label:{show:!1,params:{position:i,fontSize:SY.SIZE12,color:{enable:!1,value:"#2b9f7f"},fontWeight:MY.SIZE400,showTooltip:Object.values(BY)}},conditionalFormatting:[]}}!function(e){e.NONE="0",e.Rotate30="30",e.Rotate45="45",e.Rotate60="60",e.Rotate90="90"}(KY||(KY={}));var JY,eF;Object.freeze(((qY={})[KY.NONE]=Object.freeze({key:KY.NONE,name:"默认"}),qY[KY.Rotate30]=Object.freeze({key:KY.Rotate30,name:"30"}),qY[KY.Rotate45]=Object.freeze({key:KY.Rotate45,name:"45"}),qY[KY.Rotate60]=Object.freeze({key:KY.Rotate60,name:"60"}),qY[KY.Rotate90]=Object.freeze({key:KY.Rotate90,name:"90"}),qY));!function(e){e.SOLID="solid",e.DASHED="dashed",e.DOTTED="dotted"}(eF||(eF={}));var tF,nF,iF;Object.freeze(((JY={})[eF.SOLID]=Object.freeze({key:eF.SOLID,name:"————"}),JY[eF.DASHED]=Object.freeze({key:eF.DASHED,name:"----"}),JY[eF.DOTTED]=Object.freeze({key:eF.DOTTED,name:"...."}),JY));!function(e){e.LEFT="left",e.RIGHT="right",e.TOP="top",e.BOTTOM="bottom"}(iF||(iF={}));var aF;Object.freeze(((tF={})[iF.LEFT]=Object.freeze({key:iF.LEFT,name:"左"}),tF[iF.RIGHT]=Object.freeze({key:iF.RIGHT,name:"右"}),tF[iF.TOP]=Object.freeze({key:iF.TOP,name:"上"}),tF[iF.BOTTOM]=Object.freeze({key:iF.BOTTOM,name:"下"}),tF));!function(e){e.START="start",e.CENTER="center",e.END="end"}(aF||(aF={}));var rF,oF;Object.freeze(((nF={})[aF.START]=Object.freeze({key:aF.START,name:"起始"}),nF[aF.CENTER]=Object.freeze({key:aF.CENTER,name:"中间"}),nF[aF.END]=Object.freeze({key:aF.END,name:"结尾"}),nF));function sF(e){return{name:"",position:e.position,unit:"",min:null,max:null,nameLocation:aF.START,nameGap:15,nameRotate:0,inverse:!1,nameTextStyle:{fontSize:SY.SIZE12,color:"#333333",fontWeight:MY.SIZE400,fontStyle:TY.NORMAL,padding:[0,0,0,0]},axisLabel:{show:!1,params:{fontSize:SY.SIZE14,color:"#333333",fontWeight:MY.SIZE400,fontStyle:TY.NORMAL,rotate:KY.NONE}},axisLine:{show:!1,params:{width:1,color:"#333333",type:eF.SOLID}},axisTick:{show:!1,params:{length:5,width:1,color:"#333333",type:eF.SOLID}},splitLine:{show:!1,params:{width:1,color:"#333333",type:eF.SOLID}}}}!function(e){e.NONE="none",e.LEFT="left",e.TOP="top",e.RIGHT="right",e.BOTTOM="bottom"}(oF||(oF={}));Object.freeze(((rF={})[oF.NONE]=Object.freeze({key:oF.NONE,name:"无",iconfont:"icon-align_center"}),rF[oF.TOP]=Object.freeze({key:oF.TOP,name:"上",iconfont:"icon-align_top"}),rF[oF.BOTTOM]=Object.freeze({key:oF.BOTTOM,name:"下",iconfont:"icon-align_bottom"}),rF[oF.LEFT]=Object.freeze({key:oF.LEFT,name:"左",iconfont:"icon-align_left"}),rF[oF.RIGHT]=Object.freeze({key:oF.RIGHT,name:"右",iconfont:"icon-align_right"}),rF));function lF(){return{position:oF.NONE}}function uF(e){var t=e.styleConfig,n=e.setConfig,i=e.dataLabelPosition,a=e.getSeriesTypeFunc,r=e.getAxisPositionFunc;t.enable&&(function(e){var t=e.stack,n=e.setConfig;if(t.enable){var i=n.data.value.map((function(e){return e.id}));t.params.forEach((function(e){e.fields=e.fields.filter((function(e){return i.includes(e)}))})),t.params=t.params.filter((function(e){return e.fields.length>0}))}}({stack:t.params.stack,setConfig:n}),function(e){var t=e.seriesCustomConfig,n=e.setConfig,i=e.dataLabelPosition,a=e.getSeriesTypeFunc,r=e.getAxisPositionFunc;Object.keys(t).forEach((function(e){n.data.value.find((function(t){return t.id===e}))||delete t[e]})),n.data.value.forEach((function(e,n){t[e.id]||(t[e.id]=$Y({seriesType:a({index:n}),axisPosition:r({index:n}),dataLabelPosition:i}))}))}({seriesCustomConfig:t.params.seriesCustom,setConfig:n,dataLabelPosition:i,getSeriesTypeFunc:a,getAxisPositionFunc:r}))}var cF,hF,dF=Object.freeze({__proto__:null,reactStyleConfig:function(e){uF({styleConfig:e.styleConfig,setConfig:e.setConfig,dataLabelPosition:RY.RIGHT,getSeriesTypeFunc:function(){return ZY.BAR},getAxisPositionFunc:function(){return iF.TOP}})},getDefaultConfigParams:function(e){var t,n=e.setConfig;return{dataRange:{start:null,end:null},grid:{top:50,bottom:30,left:70,right:50},legend:lF(),dataZoom:{show:!1,width:20,right:10,filterColor:"#2b9f7f",borderColor:"#2b9f7f"},stack:{enable:!1,params:[]},axisY:sF({position:iF.LEFT}),topAxis:sF({position:iF.TOP}),bottomAxis:sF({position:iF.BOTTOM}),seriesCustom:(t={},n.data.value.forEach((function(e){t[e.id]=$Y({dataLabelPosition:RY.RIGHT,seriesType:ZY.BAR,axisPosition:iF.TOP})})),t)}}}),fF=((cF={})[gY.NORMAL]=dF,cF);!function(e){e.SIZE10="10",e.SIZE20="20",e.SIZE30="30",e.SIZE50="50"}(hF||(hF={}));function pF(e){var t=e.styleConfig,n=e.setConfig;t.enable&&(function(e){var t=e.cell,n=e.setConfig,i=n.data.group.length+n.data.value.length;t.fixed.left>i&&(t.fixed.left=i),t.fixed.right>i&&(t.fixed.right=null)}({cell:t.params.cell,setConfig:n}),function(e){var t=e.summary,n=e.setConfig;if(t.show){var i={};n.data.value.forEach((function(e){i[e.id]=t.expr[e.id]||FH.NONE})),t.expr=i}}({summary:t.params.summary,setConfig:n}),function(e){var t=e.stack,n=e.setConfig;if(t.enable){var i=n.data.value.map((function(e){return e.id}));t.params.forEach((function(e){e.fields=e.fields.filter((function(e){return i.includes(e)}))})),t.params=t.params.filter((function(e){return e.fields.length>0}))}}({stack:t.params.stack,setConfig:n}))}function gF(e){var t=e.hasMerged,n={fixed:{left:null,right:null}};return void 0!==t&&t&&(n.merge=!1),n}function mF(){return{pageSize:hF.SIZE20,showPageSize:!1,showTotal:!1,showTotalPage:!1}}function vF(){return{bgColor:"#fafafa",fontSize:SY.SIZE12,fontWeight:MY.SIZE400,color:"#606266",textAlign:IY.LEFT}}function yF(){return{fontSize:SY.SIZE12,fontWeight:MY.SIZE400,color:"#606266",textAlign:IY.LEFT,verticalAlign:AY.MIDDLE,oddColor:"#ffffff",evenColor:"#fafbfc"}}var _F=Object.freeze({__proto__:null,getDefaultConfigParams:function(){return{dataRange:{start:null,end:null},cell:gF({}),stack:{enable:!1,params:[]},summary:{show:!1,name:"",expr:{}},pagination:mF(),showIndex:!0,header:vF(),body:yF(),border:{hasVerticalBorder:!1,hasHorizontalBorder:!0,borderColor:"#ebeef5"}}},reactStyleConfig:pF}),xF=function(){var e={};return e[gY.NORMAL]=_F,e}();var bF=Object.freeze({__proto__:null,reactStyleConfig:function(e){uF({styleConfig:e.styleConfig,setConfig:e.setConfig,dataLabelPosition:RY.TOP,getSeriesTypeFunc:function(){return ZY.BAR},getAxisPositionFunc:function(){return iF.LEFT}})},getDefaultConfigParams:function(e){var t,n=e.setConfig;return{dataRange:{start:null,end:null},grid:{top:50,bottom:30,left:70,right:50},legend:lF(),dataZoom:{show:!1,width:20,right:10,filterColor:"#2b9f7f",borderColor:"#2b9f7f"},stack:{enable:!1,params:[]},axisX:sF({position:iF.BOTTOM}),leftAxis:sF({position:iF.LEFT}),rightAxis:sF({position:iF.RIGHT}),seriesCustom:(t={},n.data.value.forEach((function(e){t[e.id]=$Y({dataLabelPosition:RY.TOP,seriesType:ZY.BAR,axisPosition:iF.LEFT})})),t)}}}),wF=function(){var e={};return e[gY.NORMAL]=bF,e}();var SF=Object.freeze({__proto__:null,reactStyleConfig:function(e){uF({styleConfig:e.styleConfig,setConfig:e.setConfig,dataLabelPosition:RY.TOP,getSeriesTypeFunc:function(){return ZY.BAR},getAxisPositionFunc:function(){return iF.LEFT}})},getDefaultConfigParams:function(e){var t,n=e.setConfig;return{dataRange:{start:null,end:null},grid:{top:50,bottom:30,left:70,right:50},legend:lF(),dataZoom:{show:!1,width:20,right:10,filterColor:"#2b9f7f",borderColor:"#2b9f7f"},stack:{enable:!1,params:[]},axisX:sF({position:iF.BOTTOM}),leftAxis:sF({position:iF.LEFT}),rightAxis:sF({position:iF.RIGHT}),seriesCustom:(t={},n.data.value.forEach((function(e){t[e.id]=$Y({dataLabelPosition:RY.TOP,seriesType:ZY.LINE,axisPosition:iF.LEFT})})),t)}}}),MF=function(){var e={};return e[gY.NORMAL]=SF,e}();var TF,IF=Object.freeze({__proto__:null,reactStyleConfig:function(e){uF({styleConfig:e.styleConfig,setConfig:e.setConfig,dataLabelPosition:RY.TOP,getSeriesTypeFunc:function(){return ZY.BAR},getAxisPositionFunc:function(){return iF.LEFT}})},getDefaultConfigParams:function(e){var t,n=e.setConfig;return{dataRange:{start:null,end:null},grid:{top:50,bottom:30,left:70,right:50},legend:lF(),dataZoom:{show:!1,width:20,right:10,filterColor:"#2b9f7f",borderColor:"#2b9f7f"},stack:{enable:!1,params:[]},axisX:sF({position:iF.BOTTOM}),leftAxis:sF({position:iF.LEFT}),rightAxis:sF({position:iF.RIGHT}),seriesCustom:(t={},n.data.value.forEach((function(e,n){t[e.id]=$Y({dataLabelPosition:RY.TOP,seriesType:n%2==0?ZY.BAR:ZY.LINE,axisPosition:iF.LEFT})})),t)}}}),AF=function(){var e={};return e[gY.NORMAL]=IF,e}();!function(e){e.ZERO="0",e.ONE="1",e.TWO="2",e.THREE="3",e.FOUR="4",e.FIVE="5",e.SIX="6"}(TF||(TF={}));var DF,CF,OF,kF,LF=Object.freeze({__proto__:null,reactStyleConfig:function(e){e.styleConfig,e.setConfig},get PrecisionType(){return TF},getDefaultConfigParams:function(){return{background:"#ffffff",title:{fontSize:SY.SIZE12,color:"#333333"},value:{fontSize:SY.SIZE12,color:"#333333"},compareValue:{positive:{precision:TF.TWO,fontSize:SY.SIZE12,color:"#333333"},negative:{precision:TF.TWO,fontSize:SY.SIZE12,color:"#333333"}}}}}),EF=function(){var e={};return e[gY.NORMAL]=LF,e}();!function(e){e.PERCENT="%",e.PX="px"}(kF||(kF={}));var NF,PF=Object.freeze(((DF={})[kF.PERCENT]=Object.freeze({key:kF.PERCENT,name:"%"}),DF[kF.PX]=Object.freeze({key:kF.PX,name:"px"}),DF));!function(e){e.AREA="area",e.RADIUS="radius"}(NF||(NF={}));var RF,zF=Object.freeze(((CF={})[NF.AREA]=Object.freeze({key:NF.AREA,name:"面积模式"}),CF[NF.RADIUS]=Object.freeze({key:NF.RADIUS,name:"半径模式"}),CF));!function(e){e.INSIDE="inside",e.OUTSIDE="outside"}(RF||(RF={}));var BF=Object.freeze(((OF={})[RF.INSIDE]=Object.freeze({key:RF.INSIDE,name:"圈内"}),OF[RF.OUTSIDE]=Object.freeze({key:RF.OUTSIDE,name:"圈外"}),OF));var VF=Object.freeze({__proto__:null,reactStyleConfig:function(e){var t=e.shareId,n=e.styleConfig,i=e.setConfig,a=e.getTableColumnValueFunc,r=e.getDataFunc;return o(this,void 0,void 0,(function(){var e,o,l,u,c,h;return s(this,(function(s){switch(s.label){case 0:return n.enable?(e=[],a&&r?[4,yY({shareId:t,setConfig:i,getTableColumnValueFunc:a})]:[3,3]):[3,4];case 1:return o=s.sent(),l={config:o,data_start:null!==n.params.dataRange.start?n.params.dataRange.start-1:0},null!==n.params.dataRange.end&&(l.data_count=n.params.dataRange.end-l.data_start),[4,r(l)];case 2:(u=s.sent()[0].data).length<100&&(e=u),s.label=3;case 3:c={},h=i.data.group[0],e.forEach((function(e,t){var i=e.group[h.alias];c[i]=n.params.customGroupValues[i]||EY[CY.PURE].getDefault(OY[t%OY.length])})),n.params.customGroupValues=c,s.label=4;case 4:return[2]}}))}))},get ChartCenterUnitType(){return kF},ChartCenterUnitTypeMesage:PF,get RoseType(){return NF},RoseTypeMesage:zF,get LabelPosition(){return RF},LabelPositionMesage:BF,getDefaultConfigParams:function(e){var t=e.shareId,n=e.setConfig,i=e.getTableColumnValueFunc,a=e.getDataFunc;return o(this,void 0,void 0,(function(){var e,r,o,l,u,c;return s(this,(function(s){switch(s.label){case 0:return e=[],i&&a?[4,yY({shareId:t,setConfig:n,getTableColumnValueFunc:i})]:[3,3];case 1:return r=s.sent(),o={config:r},n.style[jV.PIE][gY.NORMAL].enable&&(l=n.style[jV.PIE][gY.NORMAL].params,u=l.dataRange.start||1,o.data_start=u,null!==l.dataRange.end&&(o.data_count=l.dataRange.end-o.data_start)),[4,a(o)];case 2:c=s.sent()[0].data,e=c,s.label=3;case 3:return[2,{dataRange:{start:null,end:null},legend:lF(),chart:{center:{x:{value:50,unit:kF.PERCENT},y:{value:50,unit:kF.PERCENT}},radius:{inner:0,outer:80},startAngle:90,clockwise:!0,minShowLabelAngle:null},customGroupValues:(h={},d=n.data.group[0],e.forEach((function(e,t){var n=e.group[d.alias];h[n]=EY[CY.PURE].getDefault(OY[t%OY.length])})),h),roseType:{enable:!1,type:NF.AREA},label:{show:!1,params:{position:RF.INSIDE,fontSize:SY.SIZE12,fontWeight:MY.SIZE400,color:{enable:!1,value:"#ffffff"},showTooltip:Object.values(BY)}},labelLine:{show:!1,params:{color:{enable:!1,value:"#ffffff"},length:4,length2:8}}}]}var h,d}))}))}}),HF=function(){var e={};return e[gY.NORMAL]=VF,e}();var YF=Object.freeze({__proto__:null,getDefaultConfigParams:function(){return{dataRange:{start:null,end:null},cell:gF({hasMerged:!0}),stack:{enable:!1,params:[]},summary:{show:!1,name:"",expr:{}},pagination:mF(),showIndex:!0,header:vF(),body:yF(),border:{hasVerticalBorder:!1,hasHorizontalBorder:!0,borderColor:"#ebeef5"}}},reactStyleConfig:pF}),FF=function(){var e={};return e[gY.NORMAL]=YF,e}(),GF=function(){var e={};return e[jV.BAR]=fF,e[jV.DETAIL]=xF,e[jV.HISTOGRAM_BAR]=wF,e[jV.HISTOGRAM_LINE]=MF,e[jV.HISTOGRAM_MIX]=AF,e[jV.INDICATOR_CARD]=EF,e[jV.PIE]=HF,e[jV.TABLE]=FF,e}();function WF(e){var t=e.api,n=e.chartType,i=e.themeMode,a=e.setConfig;return o(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return GF[n]&&GF[n][i]?[4,GF[n][i].getDefaultConfigParams({setConfig:a,api:t})]:[3,2];case 1:return[2,e.sent()];case 2:throw new Error("style.ts(getDefaultConfigParams): 请检查图表类型和主题风格: "+n+", "+i)}}))}))}return function(e){function i(i){var a=e.call(this,i)||this;return a.chartRef=t.createRef(),a.padding="10vh 4vh 4vh",a.total={},a.renderChart=function(){return o(a,void 0,void 0,(function(){var e,t,n,i,a,r,o,l,u,c,h;return s(this,(function(s){switch(s.label){case 0:if(e=this.props.gpui.params,t=e.base_url,n=e.set_id,i=e.deviceToken,!t||!n||!i)return[2];this.timer&&(clearTimeout(this.timer),this.timer=null),s.label=1;case 1:return s.trys.push([1,8,,9]),[4,XV.get(t+"/set/"+n,{headers:{"X-Gini-Token":i}})];case 2:return a=s.sent().data,r=JSON.parse(a.config),o=this.props.gpui.params["@theme"],l=void 0,r.style.table[o].enable?(l=r.style[r.render][o].params,[3,5]):[3,3];case 3:return[4,WF({chartType:r.render,themeMode:o,setConfig:r,api:null})];case 4:l=s.sent(),s.label=5;case 5:return[4,yY({shareId:a.shareId,setConfig:r,getTableColumnValueFunc:function(){}})];case 6:return u=s.sent(),[4,XV.post(t+"/sql",{config:u,set_id:n,data_start:l.dataRange.start,data_count:l.dataRange.end},{headers:{"X-Gini-Token":i}})];case 7:return c=s.sent().data,this.total=this.generateTotal(c[0].data),this.chart.setOption(this.generateChartOption(c[0].data),{notMerge:!0}),[3,9];case 8:return h=s.sent(),console.error("@components:wall-iharbour/analysis-of-startup-use: 组件渲染时发生错误",h),[3,9];case 9:return this.props.gpui.params.interval>0&&(this.timer=setTimeout(this.renderChart,this.props.gpui.params.interval)),[2]}}))}))},a.generateTotal=function(e){var t=e.reduce((function(e,t){return e+parseFloat(t.data["使用时长"])}),0);return(t/=3600)>Math.pow(10,8)?{value:(t/Math.pow(10,8)).toFixed(2),unit:"亿"}:t>Math.pow(10,4)?{value:(t/Math.pow(10,4)).toFixed(2),unit:"万"}:t>Math.pow(10,3)?{value:(t/Math.pow(10,3)).toFixed(2),unit:"千"}:{value:t,unit:""}},a.generateChartOption=function(e){return{tooltip:{show:!0,formatter:function(e){var t=e.seriesName,n=e.data;return t+"<br/>"+n.name+": "+n.value}},color:["#4499fa","#59d4d9","#4cd964","#ff9500","#ff3b30","#c894f6","#8c6fde","#767aee","#52c41a","#ff2d55","#ffcc00","#5ac8fa","#f478b8","#fae34c","#59d9a4"],series:[{name:"服务机时",type:"pie",radius:["38%","48%"],center:["50%","50%"],startAngle:0,minAngle:5,data:e.map((function(e){return{name:e.group["使用类型"]||"其他",value:Math.round(100*e.data["使用时长"]/3600)/100}})),label:{normal:{alignTo:"labelLine",formatter:function(e){var t=e.data,n=e.percent;return t.name+" "+n.toFixed(1)+"%"},color:"#cde0ff"}}}]}},n.reaction((function(){return i.gpui.params.padding}),(function(e){a.padding=e||"10vh 4vh 4vh"}),{fireImmediately:!0}),a}return function(e,t){function n(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(i,e),i.prototype.componentDidMount=function(){var e=this;this.chart=this.chart||ZV.init(this.chartRef.current),window.addEventListener("resize",(function(){e.chart.resize()})),n.reaction((function(){return{baseURL:e.props.gpui.params.base_url,setId:e.props.gpui.params.set_id,deviceToken:e.props.gpui.params.deviceToken,interval:e.props.gpui.params.interval}}),(function(){e.renderChart()}),{fireImmediately:!0})},i.prototype.render=function(){return t.createElement("div",{className:"g__index",style:{padding:this.padding}},t.createElement("div",{className:u},t.createElement("div",{ref:this.chartRef,className:c}),t.createElement("div",{className:h},t.createElement("span",{className:d},"总机时"),t.createElement("span",{className:f,"data-text":this.total},this.total.value,t.createElement("span",null,this.total.unit)))))},r([n.observable],i.prototype,"padding",void 0),r([n.observable],i.prototype,"total",void 0),i=r([Q],i)}(t.Component)}));
