Master.CanYinWu.Web/Content/js/main/echarts-4.2.1.js

(开头部分) 876KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。


/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements.  See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership.  The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License.  You may obtain a copy of the License at
*
*   http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied.  See the License for the
* specific language governing permissions and limitations
* under the License.
*/


!function (t, e) { "object" == typeof exports && "undefined" != typeof module ? e(exports) : "function" == typeof define && define.amd ? define(["exports"], e) : e(t.echarts = {}) }(this, function (t) { "use strict"; function e(t, e) { "createCanvas" === t && (nw = null), ew[t] = e } function i(t) { if (null == t || "object" != typeof t) return t; var e = t, n = Y_.call(t); if ("[object Array]" === n) { if (!O(t)) { e = []; for (var o = 0, a = t.length; o < a; o++)e[o] = i(t[o]) } } else if (j_[n]) { if (!O(t)) { var r = t.constructor; if (t.constructor.from) e = r.from(t); else { e = new r(t.length); for (var o = 0, a = t.length; o < a; o++)e[o] = i(t[o]) } } } else if (!X_[n] && !O(t) && !M(t)) { e = {}; for (var s in t) t.hasOwnProperty(s) && (e[s] = i(t[s])) } return e } function n(t, e, o) { if (!w(e) || !w(t)) return o ? i(e) : t; for (var a in e) if (e.hasOwnProperty(a)) { var r = t[a], s = e[a]; !w(s) || !w(r) || y(s) || y(r) || M(s) || M(r) || b(s) || b(r) || O(s) || O(r) ? !o && a in t || (t[a] = i(e[a], !0)) : n(r, s, o) } return t } function o(t, e) { for (var i = t[0], o = 1, a = t.length; o < a; o++)i = n(i, t[o], e); return i } function a(t, e) { for (var i in e) e.hasOwnProperty(i) && (t[i] = e[i]); return t } function r(t, e, i) { for (var n in e) e.hasOwnProperty(n) && (i ? null != e[n] : null == t[n]) && (t[n] = e[n]); return t } function s() { return nw || (nw = iw().getContext("2d")), nw } function l(t, e) { if (t) { if (t.indexOf) return t.indexOf(e); for (var i = 0, n = t.length; i < n; i++)if (t[i] === e) return i } return -1 } function u(t, e) { function i() { } var n = t.prototype; i.prototype = e.prototype, t.prototype = new i; for (var o in n) t.prototype[o] = n[o]; t.prototype.constructor = t, t.superClass = e } function h(t, e, i) { r(t = "prototype" in t ? t.prototype : t, e = "prototype" in e ? e.prototype : e, i) } function c(t) { if (t) return "string" != typeof t && "number" == typeof t.length } function d(t, e, i) { if (t && e) if (t.forEach && t.forEach === K_) t.forEach(e, i); else if (t.length === +t.length) for (var n = 0, o = t.length; n < o; n++)e.call(i, t[n], n, t); else for (var a in t) t.hasOwnProperty(a) && e.call(i, t[a], a, t) } function f(t, e, i) { if (t && e) { if (t.map && t.map === Q_) return t.map(e, i); for (var n = [], o = 0, a = t.length; o < a; o++)n.push(e.call(i, t[o], o, t)); return n } } function p(t, e, i, n) { if (t && e) { if (t.reduce && t.reduce === tw) return t.reduce(e, i, n); for (var o = 0, a = t.length; o < a; o++)i = e.call(n, i, t[o], o, t); return i } } function g(t, e, i) { if (t && e) { if (t.filter && t.filter === $_) return t.filter(e, i); for (var n = [], o = 0, a = t.length; o < a; o++)e.call(i, t[o], o, t) && n.push(t[o]); return n } } function m(t, e) { var i = J_.call(arguments, 2); return function () { return t.apply(e, i.concat(J_.call(arguments))) } } function v(t) { var e = J_.call(arguments, 1); return function () { return t.apply(this, e.concat(J_.call(arguments))) } } function y(t) { return "[object Array]" === Y_.call(t) } function x(t) { return "function" == typeof t } function _(t) { return "[object String]" === Y_.call(t) } function w(t) { var e = typeof t; return "function" === e || !!t && "object" === e } function b(t) { return !!X_[Y_.call(t)] } function S(t) { return !!j_[Y_.call(t)] } function M(t) { return "object" == typeof t && "number" == typeof t.nodeType && "object" == typeof t.ownerDocument } function I(t) { return t !== t } function T(t) { for (var e = 0, i = arguments.length; e < i; e++)if (null != arguments[e]) return arguments[e] } function A(t, e) { return null != t ? t : e } function D(t, e, i) { return null != t ? t : null != e ? e : i } function C() { return Function.call.apply(J_, arguments) } function L(t) { if ("number" == typeof t) return [t, t, t, t]; var e = t.length; return 2 === e ? [t[0], t[1], t[0], t[1]] : 3 === e ? [t[0], t[1], t[2], t[1]] : t } function k(t, e) { if (!t) throw new Error(e) } function P(t) { return null == t ? null : "function" == typeof t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "") } function N(t) { t[ow] = !0 } function O(t) { return t[ow] } function E(t) { function e(t, e) { i ? n.set(t, e) : n.set(e, t) } var i = y(t); this.data = {}; var n = this; t instanceof E ? t.each(e) : t && d(t, e) } function R(t) { return new E(t) } function z(t, e) { for (var i = new t.constructor(t.length + e.length), n = 0; n < t.length; n++)i[n] = t[n]; var o = t.length; for (n = 0; n < e.length; n++)i[n + o] = e[n]; return i } function B() { } function V(t, e) { var i = new rw(2); return null == t && (t = 0), null == e && (e = 0), i[0] = t, i[1] = e, i } function G(t, e) { return t[0] = e[0], t[1] = e[1], t } function F(t) { var e = new rw(2); return e[0] = t[0], e[1] = t[1], e } function W(t, e, i) { return t[0] = e, t[1] = i, t } function H(t, e, i) { return t[0] = e[0] + i[0], t[1] = e[1] + i[1], t } function Z(t, e, i, n) { return t[0] = e[0] + i[0] * n, t[1] = e[1] + i[1] * n, t } function U(t, e, i) { return t[0] = e[0] - i[0], t[1] = e[1] - i[1], t } function X(t) { return Math.sqrt(j(t)) } function j(t) { return t[0] * t[0] + t[1] * t[1] } function Y(t, e, i) { return t[0] = e[0] * i, t[1] = e[1] * i, t } function q(t, e) { var i = X(e); return 0 === i ? (t[0] = 0, t[1] = 0) : (t[0] = e[0] / i, t[1] = e[1] / i), t } function K(t, e) { return Math.sqrt((t[0] - e[0]) * (t[0] - e[0]) + (t[1] - e[1]) * (t[1] - e[1])) } function $(t, e) { return (t[0] - e[0]) * (t[0] - e[0]) + (t[1] - e[1]) * (t[1] - e[1]) } function J(t, e, i, n) { return t[0] = e[0] + n * (i[0] - e[0]), t[1] = e[1] + n * (i[1] - e[1]), t } function Q(t, e, i) { var n = e[0], o = e[1]; return t[0] = i[0] * n + i[2] * o + i[4], t[1] = i[1] * n + i[3] * o + i[5], t } function tt(t, e, i) { return t[0] = Math.min(e[0], i[0]), t[1] = Math.min(e[1], i[1]), t } function et(t, e, i) { return t[0] = Math.max(e[0], i[0]), t[1] = Math.max(e[1], i[1]), t } function it() { this.on("mousedown", this._dragStart, this), this.on("mousemove", this._drag, this), this.on("mouseup", this._dragEnd, this), this.on("globalout", this._dragEnd, this) } function nt(t, e) { return { target: t, topTarget: e && e.topTarget } } function ot(t, e) { var i = t._$eventProcessor; return null != e && i && i.normalizeQuery && (e = i.normalizeQuery(e)), e } function at(t, e, i, n, o, a) { var r = t._$handlers; if ("function" == typeof i && (o = n, n = i, i = null), !n || !e) return t; i = ot(t, i), r[e] || (r[e] = []); for (var s = 0; s < r[e].length; s++)if (r[e][s].h === n) return t; var l = { h: n, one: a, query: i, ctx: o || t, callAtLast: n.zrEventfulCallAtLast }, u = r[e].length - 1, h = r[e][u]; return h && h.callAtLast ? r[e].splice(u, 0, l) : r[e].push(l), t } function rt(t) { return t.getBoundingClientRect ? t.getBoundingClientRect() : { left: 0, top: 0 } } function st(t, e, i, n) { return i = i || {}, n || !U_.canvasSupported ? lt(t, e, i) : U_.browser.firefox && null != e.layerX && e.layerX !== e.offsetX ? (i.zrX = e.layerX, i.zrY = e.layerY) : null != e.offsetX ? (i.zrX = e.offsetX, i.zrY = e.offsetY) : lt(t, e, i), i } function lt(t, e, i) { var n = rt(t); i.zrX = e.clientX - n.left, i.zrY = e.clientY - n.top } function ut(t, e, i) { if (null != (e = e || window.event).zrX) return e; var n = e.type; if (n && n.indexOf("touch") >= 0) { var o = "touchend" !== n ? e.targetTouches[0] : e.changedTouches[0]; o && st(t, o, e, i) } else st(t, e, e, i), e.zrDelta = e.wheelDelta ? e.wheelDelta / 120 : -(e.detail || 0) / 3; var a = e.button; return null == e.which && void 0 !== a && gw.test(e.type) && (e.which = 1 & a ? 1 : 2 & a ? 3 : 4 & a ? 2 : 0), e } function ht(t, e, i) { pw ? t.addEventListener(e, i) : t.attachEvent("on" + e, i) } function ct(t, e, i) { pw ? t.removeEventListener(e, i) : t.detachEvent("on" + e, i) } function dt(t) { return 2 === t.which || 3 === t.which } function ft(t) { var e = t[1][0] - t[0][0], i = t[1][1] - t[0][1]; return Math.sqrt(e * e + i * i) } function pt(t) { return [(t[0][0] + t[1][0]) / 2, (t[0][1] + t[1][1]) / 2] } function gt(t, e, i) { return { type: t, event: i, target: e.target, topTarget: e.topTarget, cancelBubble: !1, offsetX: i.zrX, offsetY: i.zrY, gestureEvent: i.gestureEvent, pinchX: i.pinchX, pinchY: i.pinchY, pinchScale: i.pinchScale, wheelDelta: i.zrDelta, zrByTouch: i.zrByTouch, which: i.which, stop: mt } } function mt(t) { mw(this.event) } function vt() { } function yt(t, e, i) { if (t[t.rectHover ? "rectContain" : "contain"](e, i)) { for (var n, o = t; o;) { if (o.clipPath && !o.clipPath.contain(e, i)) return !1; o.silent && (n = !0), o = o.parent } return !n || xw } return !1 } function xt() { var t = new bw(6); return _t(t), t } function _t(t) { return t[0] = 1, t[1] = 0, t[2] = 0, t[3] = 1, t[4] = 0, t[5] = 0, t } function wt(t, e) { return t[0] = e[0], t[1] = e[1], t[2] = e[2], t[3] = e[3], t[4] = e[4], t[5] = e[5], t } function bt(t, e, i) { var n = e[0] * i[0] + e[2] * i[1], o = e[1] * i[0] + e[3] * i[1], a = e[0] * i[2] + e[2] * i[3], r = e[1] * i[2] + e[3] * i[3], s = e[0] * i[4] + e[2] * i[5] + e[4], l = e[1] * i[4] + e[3] * i[5] + e[5]; return t[0] = n, t[1] = o, t[2] = a, t[3] = r, t[4] = s, t[5] = l, t } function St(t, e, i) { return t[0] = e[0], t[1] = e[1], t[2] = e[2], t[3] = e[3], t[4] = e[4] + i[0], t[5] = e[5] + i[1], t } function Mt(t, e, i) { var n = e[0], o = e[2], a = e[4], r = e[1], s = e[3], l = e[5], u = Math.sin(i), h = Math.cos(i); return t[0] = n * h + r * u, t[1] = -n * u + r * h, t[2] = o * h + s * u, t[3] = -o * u + h * s, t[4] = h * a + u * l, t[5] = h * l - u * a, t } function It(t, e, i) { var n = i[0], o = i[1]; return t[0] = e[0] * n, t[1] = e[1] * o, t[2] = e[2] * n, t[3] = e[3] * o, t[4] = e[4] * n, t[5] = e[5] * o, t } function Tt(t, e) { var i = e[0], n = e[2], o = e[4], a = e[1], r = e[3], s = e[5], l = i * r - a * n; return l ? (l = 1 / l, t[0] = r * l, t[1] = -a * l, t[2] = -n * l, t[3] = i * l, t[4] = (n * s - r * o) * l, t[5] = (a * o - i * s) * l, t) : null } function At(t) { var e = xt(); return wt(e, t), e } function Dt(t) { return t > Iw || t < -Iw } function Ct(t) { this._target = t.target, this._life = t.life || 1e3, this._delay = t.delay || 0, this._initialized = !1, this.loop = null != t.loop && t.loop, this.gap = t.gap || 0, this.easing = t.easing || "Linear", this.onframe = t.onframe, this.ondestroy = t.ondestroy, this.onrestart = t.onrestart, this._pausedTime = 0, this._paused = !1 } function Lt(t) { return (t = Math.round(t)) < 0 ? 0 : t > 255 ? 255 : t } function kt(t) { return (t = Math.round(t)) < 0 ? 0 : t > 360 ? 360 : t } function Pt(t) { return t < 0 ? 0 : t > 1 ? 1 : t } function Nt(t) { return Lt(t.length && "%" === t.charAt(t.length - 1) ? parseFloat(t) / 100 * 255 : parseInt(t, 10)) } function Ot(t) { return Pt(t.length && "%" === t.charAt(t.length - 1) ? parseFloat(t) / 100 : parseFloat(t)) } function Et(t, e, i) { return i < 0 ? i += 1 : i > 1 && (i -= 1), 6 * i < 1 ? t + (e - t) * i * 6 : 2 * i < 1 ? e : 3 * i < 2 ? t + (e - t) * (2 / 3 - i) * 6 : t } function Rt(t, e, i) { return t + (e - t) * i } function zt(t, e, i, n, o) { return t[0] = e, t[1] = i, t[2] = n, t[3] = o, t } function Bt(t, e) { return t[0] = e[0], t[1] = e[1], t[2] = e[2], t[3] = e[3], t } function Vt(t, e) { Vw && Bt(Vw, e), Vw = Bw.put(t, Vw || e.slice()) } function Gt(t, e) { if (t) { e = e || []; var i = Bw.get(t); if (i) return Bt(e, i); var n = (t += "").replace(/ /g, "").toLowerCase(); if (n in zw) return Bt(e, zw[n]), Vt(t, e), e; if ("#" !== n.charAt(0)) { var o = n.indexOf("("), a = n.indexOf(")"); if (-1 !== o && a + 1 === n.length) { var r = n.substr(0, o), s = n.substr(o + 1, a - (o + 1)).split(","), l = 1; switch (r) { case "rgba": if (4 !== s.length) return void zt(e, 0, 0, 0, 1); l = Ot(s.pop()); case "rgb": return 3 !== s.length ? void zt(e, 0, 0, 0, 1) : (zt(e, Nt(s[0]), Nt(s[1]), Nt(s[2]), l), Vt(t, e), e); case "hsla": return 4 !== s.length ? void zt(e, 0, 0, 0, 1) : (s[3] = Ot(s[3]), Ft(s, e), Vt(t, e), e); case "hsl": return 3 !== s.length ? void zt(e, 0, 0, 0, 1) : (Ft(s, e), Vt(t, e), e); default: return } } zt(e, 0, 0, 0, 1) } else { if (4 === n.length) return (u = parseInt(n.substr(1), 16)) >= 0 && u <= 4095 ? (zt(e, (3840 & u) >> 4 | (3840 & u) >> 8, 240 & u | (240 & u) >> 4, 15 & u | (15 & u) << 4, 1), Vt(t, e), e) : void zt(e, 0, 0, 0, 1); if (7 === n.length) { var u = parseInt(n.substr(1), 16); return u >= 0 && u <= 16777215 ? (zt(e, (16711680 & u) >> 16, (65280 & u) >> 8, 255 & u, 1), Vt(t, e), e) : void zt(e, 0, 0, 0, 1) } } } } function Ft(t, e) { var i = (parseFloat(t[0]) % 360 + 360) % 360 / 360, n = Ot(t[1]), o = Ot(t[2]), a = o <= .5 ? o * (n + 1) : o + n - o * n, r = 2 * o - a; return e = e || [], zt(e, Lt(255 * Et(r, a, i + 1 / 3)), Lt(255 * Et(r, a, i)), Lt(255 * Et(r, a, i - 1 / 3)), 1), 4 === t.length && (e[3] = t[3]), e } function Wt(t) { if (t) { var e, i, n = t[0] / 255, o = t[1] / 255, a = t[2] / 255, r = Math.min(n, o, a), s = Math.max(n, o, a), l = s - r, u = (s + r) / 2; if (0 === l) e = 0, i = 0; else { i = u < .5 ? l / (s + r) : l / (2 - s - r); var h = ((s - n) / 6 + l / 2) / l, c = ((s - o) / 6 + l / 2) / l, d = ((s - a) / 6 + l / 2) / l; n === s ? e = d - c : o === s ? e = 1 / 3 + h - d : a === s && (e = 2 / 3 + c - h), e < 0 && (e += 1), e > 1 && (e -= 1) } var f = [360 * e, i, u]; return null != t[3] && f.push(t[3]), f } } function Ht(t, e) { var i = Gt(t); if (i) { for (var n = 0; n < 3; n++)i[n] = e < 0 ? i[n] * (1 - e) | 0 : (255 - i[n]) * e + i[n] | 0, i[n] > 255 ? i[n] = 255 : t[n] < 0 && (i[n] = 0); return qt(i, 4 === i.length ? "rgba" : "rgb") } } function Zt(t) { var e = Gt(t); if (e) return ((1 << 24) + (e[0] << 16) + (e[1] << 8) + +e[2]).toString(16).slice(1) } function Ut(t, e, i) { if (e && e.length && t >= 0 && t <= 1) { i = i || []; var n = t * (e.length - 1), o = Math.floor(n), a = Math.ceil(n), r = e[o], s = e[a], l = n - o; return i[0] = Lt(Rt(r[0], s[0], l)), i[1] = Lt(Rt(r[1], s[1], l)), i[2] = Lt(Rt(r[2], s[2], l)), i[3] = Pt(Rt(r[3], s[3], l)), i } } function Xt(t, e, i) { if (e && e.length && t >= 0 && t <= 1) { var n = t * (e.length - 1), o = Math.floor(n), a = Math.ceil(n), r = Gt(e[o]), s = Gt(e[a]), l = n - o, u = qt([Lt(Rt(r[0], s[0], l)), Lt(Rt(r[1], s[1], l)), Lt(Rt(r[2], s[2], l)), Pt(Rt(r[3], s[3], l))], "rgba"); return i ? { color: u, leftIndex: o, rightIndex: a, value: n } : u } } function jt(t, e, i, n) { if (t = Gt(t)) return t = Wt(t), null != e && (t[0] = kt(e)), null != i && (t[1] = Ot(i)), null != n && (t[2] = Ot(n)), qt(Ft(t), "rgba") } function Yt(t, e) { if ((t = Gt(t)) && null != e) return t[3] = Pt(e), qt(t, "rgba") } function qt(t, e) { if (t && t.length) { var i = t[0] + "," + t[1] + "," + t[2]; return "rgba" !== e && "hsva" !== e && "hsla" !== e || (i += "," + t[3]), e + "(" + i + ")" } } function Kt(t, e) { return t[e] } function $t(t, e, i) { t[e] = i } function Jt(t, e, i) { return (e - t) * i + t } function Qt(t, e, i) { return i > .5 ? e : t } function te(t, e, i, n, o) { var a = t.length; if (1 === o) for (s = 0; s < a; s++)n[s] = Jt(t[s], e[s], i); else for (var r = a && t[0].length, s = 0; s < a; s++)for (var l = 0; l < r; l++)n[s][l] = Jt(t[s][l], e[s][l], i) } function ee(t, e, i) { var n = t.length, o = e.length; if (n !== o) if (n > o) t.length = o; else for (r = n; r < o; r++)t.push(1 === i ? e[r] : Hw.call(e[r])); for (var a = t[0] && t[0].length, r = 0; r < t.length; r++)if (1 === i) isNaN(t[r]) && (t[r] = e[r]); else for (var s = 0; s < a; s++)isNaN(t[r][s]) && (t[r][s] = e[r][s]) } function ie(t, e, i) { if (t === e) return !0; var n = t.length; if (n !== e.length) return !1; if (1 === i) { for (a = 0; a < n; a++)if (t[a] !== e[a]) return !1 } else for (var o = t[0].length, a = 0; a < n; a++)for (var r = 0; r < o; r++)if (t[a][r] !== e[a][r]) return !1; return !0 } function ne(t, e, i, n, o, a, r, s, l) { var u = t.length; if (1 === l) for (c = 0; c < u; c++)s[c] = oe(t[c], e[c], i[c], n[c], o, a, r); else for (var h = t[0].length, c = 0; c < u; c++)for (var d = 0; d < h; d++)s[c][d] = oe(t[c][d], e[c][d], i[c][d], n[c][d], o, a, r) } function oe(t, e, i, n, o, a, r) { var s = .5 * (i - t), l = .5 * (n - e); return (2 * (e - i) + s + l) * r + (-3 * (e - i) - 2 * s - l) * a + s * o + e } function ae(t) { if (c(t)) { var e = t.length; if (c(t[0])) { for (var i = [], n = 0; n < e; n++)i.push(Hw.call(t[n])); return i } return Hw.call(t) } return t } function re(t) { return t[0] = Math.floor(t[0]), t[1] = Math.floor(t[1]), t[2] = Math.floor(t[2]), "rgba(" + t.join(",") + ")" } function se(t) { var e = t[t.length - 1].value; return c(e && e[0]) ? 2 : 1 } function le(t, e, i, n, o, a) { var r = t._getter, s = t._setter, l = "spline" === e, u = n.length; if (u) { var h, d = c(n[0].value), f = !1, p = !1, g = d ? se(n) : 0; n.sort(function (t, e) { return t.time - e.time }), h = n[u - 1].time; for (var m = [], v = [], y = n[0].value, x = !0, _ = 0; _ < u; _++) { m.push(n[_].time / h); var w = n[_].value; if (d && ie(w, y, g) || !d && w === y || (x = !1), y = w, "string" == typeof w) { var b = Gt(w); b ? (w = b, f = !0) : p = !0 } v.push(w) } if (a || !x) { for (var S = v[u - 1], _ = 0; _ < u - 1; _++)d ? ee(v[_], S, g) : !isNaN(v[_]) || isNaN(S) || p || f || (v[_] = S); d && ee(r(t._target, o), S, g); var M, I, T, A, D, C, L = 0, k = 0; if (f) var P = [0, 0, 0, 0]; var N = new Ct({ target: t._target, life: h, loop: t._loop, delay: t._delay, onframe: function (t, e) { var i; if (e < 0) i = 0; else if (e < k) { for (i = M = Math.min(L + 1, u - 1); i >= 0 && !(m[i] <= e); i--); i = Math.min(i, u - 2) } else { for (i = L; i < u && !(m[i] > e); i++); i = Math.min(i - 1, u - 2) } L = i, k = e; var n = m[i + 1] - m[i]; if (0 !== n) if (I = (e - m[i]) / n, l) if (A = v[i], T = v[0 === i ? i : i - 1], D = v[i > u - 2 ? u - 1 : i + 1], C = v[i > u - 3 ? u - 1 : i + 2], d) ne(T, A, D, C, I, I * I, I * I * I, r(t, o), g); else { if (f) a = ne(T, A, D, C, I, I * I, I * I * I, P, 1), a = re(P); else { if (p) return Qt(A, D, I); a = oe(T, A, D, C, I, I * I, I * I * I) } s(t, o, a) } else if (d) te(v[i], v[i + 1], I, r(t, o), g); else { var a; if (f) te(v[i], v[i + 1], I, P, 1), a = re(P); else { if (p) return Qt(v[i], v[i + 1], I); a = Jt(v[i], v[i + 1], I) } s(t, o, a) } }, ondestroy: i }); return e && "spline" !== e && (N.easing = e), N } } } function ue(t, e, i, n, o, a, r, s) { _(n) ? (a = o, o = n, n = 0) : x(o) ? (a = o, o = "linear", n = 0) : x(n) ? (a = n, n = 0) : x(i) ? (a = i, i = 500) : i || (i = 500), t.stopAnimation(), he(t, "", t, e, i, n, s); var l = t.animators.slice(), u = l.length; u || a && a(); for (var h = 0; h < l.length; h++)l[h].done(function () { --u || a && a() }).start(o, r) } function he(t, e, i, n, o, a, r) { var s = {}, l = 0; for (var u in n) n.hasOwnProperty(u) && (null != i[u] ? w(n[u]) && !c(n[u]) ? he(t, e ? e + "." + u : u, i[u], n[u], o, a, r) : (r ? (s[u] = i[u], ce(t, e, u, n[u])) : s[u] = n[u], l++) : null == n[u] || r || ce(t, e, u, n[u])); l > 0 && t.animate(e, !1).when(null == o ? 500 : o, s).delay(a || 0) } function ce(t, e, i, n) { if (e) { var o = {}; o[e] = {}, o[e][i] = n, t.attr(o) } else t.attr(i, n) } function de(t, e, i, n) { i < 0 && (t += i, i = -i), n < 0 && (e += n, n = -n), this.x = t, this.y = e, this.width = i, this.height = n } function fe(t) { for (var e = 0; t >= eb;)e |= 1 & t, t >>= 1; return t + e } function pe(t, e, i, n) { var o = e + 1; if (o === i) return 1; if (n(t[o++], t[e]) < 0) { for (; o < i && n(t[o], t[o - 1]) < 0;)o++; ge(t, e, o) } else for (; o < i && n(t[o], t[o - 1]) >= 0;)o++; return o - e } function ge(t, e, i) { for (i--; e < i;) { var n = t[e]; t[e++] = t[i], t[i--] = n } } function me(t, e, i, n, o) { for (n === e && n++; n < i; n++) { for (var a, r = t[n], s = e, l = n; s < l;)o(r, t[a = s + l >>> 1]) < 0 ? l = a : s = a + 1; var u = n - s; switch (u) { case 3: t[s + 3] = t[s + 2]; case 2: t[s + 2] = t[s + 1]; case 1: t[s + 1] = t[s]; break; default: for (; u > 0;)t[s + u] = t[s + u - 1], u-- }t[s] = r } } function ve(t, e, i, n, o, a) { var r = 0, s = 0, l = 1; if (a(t, e[i + o]) > 0) { for (s = n - o; l < s && a(t, e[i + o + l]) > 0;)r = l, (l = 1 + (l << 1)) <= 0 && (l = s); l > s && (l = s), r += o, l += o } else { for (s = o + 1; l < s && a(t, e[i + o - l]) <= 0;)r = l, (l = 1 + (l << 1)) <= 0 && (l = s); l > s && (l = s); var u = r; r = o - l, l = o - u } for (r++; r < l;) { var h = r + (l - r >>> 1); a(t, e[i + h]) > 0 ? r = h + 1 : l = h } return l } function ye(t, e, i, n, o, a) { var r = 0, s = 0, l = 1; if (a(t, e[i + o]) < 0) { for (s = o + 1; l < s && a(t, e[i + o - l]) < 0;)r = l, (l = 1 + (l << 1)) <= 0 && (l = s); l > s && (l = s); var u = r; r = o - l, l = o - u } else { for (s = n - o; l < s && a(t, e[i + o + l]) >= 0;)r = l, (l = 1 + (l << 1)) <= 0 && (l = s); l > s && (l = s), r += o, l += o } for (r++; r < l;) { var h = r + (l - r >>> 1); a(t, e[i + h]) < 0 ? l = h : r = h + 1 } return l } function xe(t, e) { function i(i) { var s = a[i], u = r[i], h = a[i + 1], c = r[i + 1]; r[i] = u + c, i === l - 3 && (a[i + 1] = a[i + 2], r[i + 1] = r[i + 2]), l--; var d = ye(t[h], t, s, u, 0, e); s += d, 0 !== (u -= d) && 0 !== (c = ve(t[s + u - 1], t, h, c, c - 1, e)) && (u <= c ? n(s, u, h, c) : o(s, u, h, c)) } function n(i, n, o, a) { var r = 0; for (r = 0; r < n; r++)u[r] = t[i + r]; var l = 0, h = o, c = i; if (t[c++] = t[h++], 0 != --a) if (1 !== n) { for (var d, f, p, g = s; ;) { d = 0, f = 0, p = !1; do { if (e(t[h], u[l]) < 0) { if (t[c++] = t[h++], f++, d = 0, 0 == --a) { p = !0; break } } else if (t[c++] = u[l++], d++, f = 0, 1 == --n) { p = !0; break } } while ((d | f) < g); if (p) break; do { if (0 !== (d = ye(t[h], u, l, n, 0, e))) { for (r = 0; r < d; r++)t[c + r] = u[l + r]; if (c += d, l += d, (n -= d) <= 1) { p = !0; break } } if (t[c++] = t[h++], 0 == --a) { p = !0; break } if (0 !== (f = ve(u[l], t, h, a, 0, e))) { for (r = 0; r < f; r++)t[c + r] = t[h + r]; if (c += f, h += f, 0 === (a -= f)) { p = !0; break } } if (t[c++] = u[l++], 1 == --n) { p = !0; break } g-- } while (d >= ib || f >= ib); if (p) break; g < 0 && (g = 0), g += 2 } if ((s = g) < 1 && (s = 1), 1 === n) { for (r = 0; r < a; r++)t[c + r] = t[h + r]; t[c + a] = u[l] } else { if (0 === n) throw new Error; for (r = 0; r < n; r++)t[c + r] = u[l + r] } } else { for (r = 0; r < a; r++)t[c + r] = t[h + r]; t[c + a] = u[l] } else for (r = 0; r < n; r++)t[c + r] = u[l + r] } function o(i, n, o, a) { var r = 0; for (r = 0; r < a; r++)u[r] = t[o + r]; var l = i + n - 1, h = a - 1, c = o + a - 1, d = 0, f = 0; if (t[c--] = t[l--], 0 != --n) if (1 !== a) { for (var p = s; ;) { var g = 0, m = 0, v = !1; do { if (e(u[h], t[l]) < 0) { if (t[c--] = t[l--], g++, m = 0, 0 == --n) { v = !0; break } } else if (t[c--] = u[h--], m++, g = 0, 1 == --a) { v = !0; break } } while ((g | m) < p); if (v) break; do { if (0 != (g = n - ye(u[h], t, i, n, n - 1, e))) { for (n -= g, f = (c -= g) + 1, d = (l -= g) + 1, r = g - 1; r >= 0; r--)t[f + r] = t[d + r]; if (0 === n) { v = !0; break } } if (t[c--] = u[h--], 1 == --a) { v = !0; break } if (0 != (m = a - ve(t[l], u, 0, a, a - 1, e))) { for (a -= m, f = (c -= m) + 1, d = (h -= m) + 1, r = 0; r < m; r++)t[f + r] = u[d + r]; if (a <= 1) { v = !0; break } } if (t[c--] = t[l--], 0 == --n) { v = !0; break } p-- } while (g >= ib || m >= ib); if (v) break; p < 0 && (p = 0), p += 2 } if ((s = p) < 1 && (s = 1), 1 === a) { for (f = (c -= n) + 1, d = (l -= n) + 1, r = n - 1; r >= 0; r--)t[f + r] = t[d + r]; t[c] = u[h] } else { if (0 === a) throw new Error; for (d = c - (a - 1), r = 0; r < a; r++)t[d + r] = u[r] } } else { for (f = (c -= n) + 1, d = (l -= n) + 1, r = n - 1; r >= 0; r--)t[f + r] = t[d + r]; t[c] = u[h] } else for (d = c - (a - 1), r = 0; r < a; r++)t[d + r] = u[r] } var a, r, s = ib, l = 0, u = []; a = [], r = [], this.mergeRuns = function () { for (; l > 1;) { var t = l - 2; if (t >= 1 && r[t - 1] <= r[t] + r[t + 1] || t >= 2 && r[t - 2] <= r[t] + r[t - 1]) r[t - 1] < r[t + 1] && t--; else if (r[t] > r[t + 1]) break; i(t) } }, this.forceMergeRuns = function () { for (; l > 1;) { var t = l - 2; t > 0 && r[t - 1] < r[t + 1] && t--, i(t) } }, this.pushRun = function (t, e) { a[l] = t, r[l] = e, l += 1 } } function _e(t, e, i, n) { i || (i = 0), n || (n = t.length); var o = n - i; if (!(o < 2)) { var a = 0; if (o < eb) return a = pe(t, i, n, e), void me(t, i, n, i + a, e); var r = new xe(t, e), s = fe(o); do { if ((a = pe(t, i, n, e)) < s) { var l = o; l > s && (l = s), me(t, i, i + l, i + a, e), a = l } r.pushRun(i, a), r.mergeRuns(), o -= a, i += a } while (0 !== o); r.forceMergeRuns() } } function we(t, e) { return t.zlevel === e.zlevel ? t.z === e.z ? t.z2 - e.z2 : t.z - e.z : t.zlevel - e.zlevel } function be(t, e, i) { var n = null == e.x ? 0 : e.x, o = null == e.x2 ? 1 : e.x2, a = null == e.y ? 0 : e.y, r = null == e.y2 ? 0 : e.y2; return e.global || (n = n * i.width + i.x, o = o * i.width + i.x, a = a * i.height + i.y, r = r * i.height + i.y), n = isNaN(n) ? 0 : n, o = isNaN(o) ? 1 : o, a = isNaN(a) ? 0 : a, r = isNaN(r) ? 0 : r, t.createLinearGradient(n, a, o, r) } function Se(t, e, i) { var n = i.width, o = i.height, a = Math.min(n, o), r = null == e.x ? .5 : e.x, s = null == e.y ? .5 : e.y, l = null == e.r ? .5 : e.r; return e.global || (r = r * n + i.x, s = s * o + i.y, l *= a), t.createRadialGradient(r, s, 0, r, s, l) } function Me() { return !1 } function Ie(t, e, i) { var n = iw(), o = e.getWidth(), a = e.getHeight(), r = n.style; return r && (r.position = "absolute", r.left = 0, r.top = 0, r.width = o + "px", r.height = a + "px", n.setAttribute("data-zr-dom-id", t)), n.width = o * i, n.height = a * i, n } function Te(t) { if ("string" == typeof t) { var e = mb.get(t); return e && e.image } return t } function Ae(t, e, i, n, o) { if (t) { if ("string" == typeof t) { if (e && e.__zrImageSrc === t || !i) return e; var a = mb.get(t), r = { hostEl: i, cb: n, cbPayload: o }; return a ? !Ce(e = a.image) && a.pending.push(r) : ((e = new Image).onload = e.onerror = De, mb.put(t, e.__cachedImgObj = { image: e, pending: [r] }), e.src = e.__zrImageSrc = t), e } return t } return e } function De() { var t = this.__cachedImgObj; this.onload = this.onerror = this.__cachedImgObj = null; for (var e = 0; e < t.pending.length; e++) { var i = t.pending[e], n = i.cb; n && n(this, i.cbPayload), i.hostEl.dirty() } t.pending.length = 0 } function Ce(t) { return t && t.width && t.height } function Le(t, e) { var i = t + ":" + (e = e || wb); if (vb[i]) return vb[i]; for (var n = (t + "").split("\n"), o = 0, a = 0, r = n.length; a < r; a++)o = Math.max(We(n[a], e).width, o); return yb > xb && (yb = 0, vb = {}), yb++, vb[i] = o, o } function ke(t, e, i, n, o, a, r, s) { return r ? Ne(t, e, i, n, o, a, r, s) : Pe(t, e, i, n, o, a, s) } function Pe(t, e, i, n, o, a, r) { var s = He(t, e, o, a, r), l = Le(t, e); o && (l += o[1] + o[3]); var u = s.outerHeight, h = new de(Oe(0, l, i), Ee(0, u, n), l, u); return h.lineHeight = s.lineHeight, h } function Ne(t, e, i, n, o, a, r, s) { var l = Ze(t, { rich: r, truncate: s, font: e, textAlign: i, textPadding: o, textLineHeight: a }), u = l.outerWidth, h = l.outerHeight; return new de(Oe(0, u, i), Ee(0, h, n), u, h) } function Oe(t, e, i) { return "right" === i ? t -= e : "center" === i && (t -= e / 2), t } function Ee(t, e, i) { return "middle" === i ? t -= e / 2 : "bottom" === i && (t -= e), t } function Re(t, e, i) { var n = e.x, o = e.y, a = e.height, r = e.width, s = a / 2, l = "left", u = "top"; switch (t) { case "left": n -= i, o += s, l = "right", u = "middle"; break; case "right": n += i + r, o += s, u = "middle"; break; case "top": n += r / 2, o -= i, l = "center", u = "bottom"; break; case "bottom": n += r / 2, o += a + i, l = "center"; break; case "inside": n += r / 2, o += s, l = "center", u = "middle"; break; case "insideLeft": n += i, o += s, u = "middle"; break; case "insideRight": n += r - i, o += s, l = "right", u = "middle"; break; case "insideTop": n += r / 2, o += i, l = "center"; break; case "insideBottom": n += r / 2, o += a - i, l = "center", u = "bottom"; break; case "insideTopLeft": n += i, o += i; break; case "insideTopRight": n += r - i, o += i, l = "right"; break; case "insideBottomLeft": n += i, o += a - i, u = "bottom"; break; case "insideBottomRight": n += r - i, o += a - i, l = "right", u = "bottom" }return { x: n, y: o, textAlign: l, textVerticalAlign: u } } function ze(t, e, i, n, o) { if (!e) return ""; var a = (t + "").split("\n"); o = Be(e, i, n, o); for (var r = 0, s = a.length; r < s; r++)a[r] = Ve(a[r], o); return a.join("\n") } function Be(t, e, i, n) { (n = a({}, n)).font = e; var i = A(i, "..."); n.maxIterations = A(n.maxIterations, 2); var o = n.minChar = A(n.minChar, 0); n.cnCharWidth = Le("国", e); var r = n.ascCharWidth = Le("a", e); n.placeholder = A(n.placeholder, ""); for (var s = t = Math.max(0, t - 1), l = 0; l < o && s >= r; l++)s -= r; var u = Le(i, e); return u > s && (i = "", u = 0), s = t - u, n.ellipsis = i, n.ellipsisWidth = u, n.contentWidth = s, n.containerWidth = t, n } function Ve(t, e) { var i = e.containerWidth, n = e.font, o = e.contentWidth; if (!i) return ""; var a = Le(t, n); if (a <= i) return t; for (var r = 0; ; r++) { if (a <= o || r >= e.maxIterations) { t += e.ellipsis; break } var s = 0 === r ? Ge(t, o, e.ascCharWidth, e.cnCharWidth) : a > 0 ? Math.floor(t.length * o / a) : 0; a = Le(t = t.substr(0, s), n) } return "" === t && (t = e.placeholder), t } function Ge(t, e, i, n) { for (var o = 0, a = 0, r = t.length; a < r && o < e; a++) { var s = t.charCodeAt(a); o += 0 <= s && s <= 127 ? i : n } return a } function Fe(t) { return Le("国", t) } function We(t, e) { return bb.measureText(t, e) } function He(t, e, i, n, o) { null != t && (t += ""); var a = A(n, Fe(e)), r = t ? t.split("\n") : [], s = r.length * a, l = s; if (i && (l += i[0] + i[2]), t && o) { var u = o.outerHeight, h = o.outerWidth; if (null != u && l > u) t = "", r = []; else if (null != h) for (var c = Be(h - (i ? i[1] + i[3] : 0), e, o.ellipsis, { minChar: o.minChar, placeholder: o.placeholder }), d = 0, f = r.length; d < f; d++)r[d] = Ve(r[d], c) } return { lines: r, height: s, outerHeight: l, lineHeight: a } } function Ze(t, e) { var i = { lines: [], width: 0, height: 0 }; if (null != t && (t += ""), !t) return i; for (var n, o = _b.lastIndex = 0; null != (n = _b.exec(t));) { var a = n.index; a > o && Ue(i, t.substring(o, a)), Ue(i, n[2], n[1]), o = _b.lastIndex } o < t.length && Ue(i, t.substring(o, t.length)); var r = i.lines, s = 0, l = 0, u = [], h = e.textPadding, c = e.truncate, d = c && c.outerWidth, f = c && c.outerHeight; h && (null != d && (d -= h[1] + h[3]), null != f && (f -= h[0] + h[2])); for (L = 0; L < r.length; L++) { for (var p = r[L], g = 0, m = 0, v = 0; v < p.tokens.length; v++) { var y = (k = p.tokens[v]).styleName && e.rich[k.styleName] || {}, x = k.textPadding = y.textPadding, _ = k.font = y.font || e.font, w = k.textHeight = A(y.textHeight, Fe(_)); if (x && (w += x[0] + x[2]), k.height = w, k.lineHeight = D(y.textLineHeight, e.textLineHeight, w), k.textAlign = y && y.textAlign || e.textAlign, k.textVerticalAlign = y && y.textVerticalAlign || "middle", null != f && s + k.lineHeight > f) return { lines: [], width: 0, height: 0 }; k.textWidth = Le(k.text, _); var b = y.textWidth, S = null == b || "auto" === b; if ("string" == typeof b && "%" === b.charAt(b.length - 1)) k.percentWidth = b, u.push(k), b = 0; else { if (S) { b = k.textWidth; var M = y.textBackgroundColor, I = M && M.image; I && Ce(I = Te(I)) && (b = Math.max(b, I.width * w / I.height)) } var T = x ? x[1] + x[3] : 0; b += T; var C = null != d ? d - m : null; null != C && C < b && (!S || C < T ? (k.text = "", k.textWidth = b = 0) : (k.text = ze(k.text, C - T, _, c.ellipsis, { minChar: c.minChar }), k.textWidth = Le(k.text, _), b = k.textWidth + T)) } m += k.width = b, y && (g = Math.max(g, k.lineHeight)) } p.width = m, p.lineHeight = g, s += g, l = Math.max(l, m) } i.outerWidth = i.width = A(e.textWidth, l), i.outerHeight = i.height = A(e.textHeight, s), h && (i.outerWidth += h[1] + h[3], i.outerHeight += h[0] + h[2]); for (var L = 0; L < u.length; L++) { var k = u[L], P = k.percentWidth; k.width = parseInt(P, 10) / 100 * l } return i } function Ue(t, e, i) { for (var n = "" === e, o = e.split("\n"), a = t.lines, r = 0; r < o.length; r++) { var s = o[r], l = { styleName: i, text: s, isLineHolder: !s && !n }; if (r) a.push({ tokens: [l] }); else { var u = (a[a.length - 1] || (a[0] = { tokens: [] })).tokens, h = u.length; 1 === h && u[0].isLineHolder ? u[0] = l : (s || !h || n) && u.push(l) } } } function Xe(t) { var e = (t.fontSize || t.fontFamily) && [t.fontStyle, t.fontWeight, (t.fontSize || 12) + "px", t.fontFamily || "sans-serif"].join(" "); return e && P(e) || t.textFont || t.font } function je(t, e) { var i, n, o, a, r = e.x, s = e.y, l = e.width, u = e.height, h = e.r; l < 0 && (r += l, l = -l), u < 0 && (s += u, u = -u), "number" == typeof h ? i = n = o = a = h : h instanceof Array ? 1 === h.length ? i = n = o = a = h[0] : 2 === h.length ? (i = o = h[0], n = a = h[1]) : 3 === h.length ? (i = h[0], n = a = h[1], o = h[2]) : (i = h[0], n = h[1], o = h[2], a = h[3]) : i = n = o = a = 0; var c; i + n > l && (i *= l / (c = i + n), n *= l / c), o + a > l && (o *= l / (c = o + a), a *= l / c), n + o > u && (n *= u / (c = n + o), o *= u / c), i + a > u && (i *= u / (c = i + a), a *= u / c), t.moveTo(r + i, s), t.lineTo(r + l - n, s), 0 !== n && t.arc(r + l - n, s + n, n, -Math.PI / 2, 0), t.lineTo(r + l, s + u - o), 0 !== o && t.arc(r + l - o, s + u - o, o, 0, Math.PI / 2), t.lineTo(r + a, s + u), 0 !== a && t.arc(r + a, s + u - a, a, Math.PI / 2, Math.PI), t.lineTo(r, s + i), 0 !== i && t.arc(r + i, s + i, i, Math.PI, 1.5 * Math.PI) } function Ye(t) { return qe(t), d(t.rich, qe), t } function qe(t) { if (t) { t.font = Xe(t); var e = t.textAlign; "middle" === e && (e = "center"), t.textAlign = null == e || Mb[e] ? e : "left"; var i = t.textVerticalAlign || t.textBaseline; "center" === i && (i = "middle"), t.textVerticalAlign = null == i || Ib[i] ? i : "top", t.textPadding && (t.textPadding = L(t.textPadding)) } } function Ke(t, e, i, n, o, a) { n.rich ? Je(t, e, i, n, o, a) : $e(t, e, i, n, o, a) } function $e(t, e, i, n, o, a) { var r, s = ii(n), l = !1, u = e.__attrCachedBy === rb.PLAIN_TEXT; a !== sb ? (a && (r = a.style, l = !s && u && r), e.__attrCachedBy = s ? rb.NONE : rb.PLAIN_TEXT) : u && (e.__attrCachedBy = rb.NONE); var h = n.font || Sb; l && h === (r.font || Sb) || (e.font = h); var c = t.__computedFont; t.__styleFont !== h && (t.__styleFont = h, c = t.__computedFont = e.font); var d = n.textPadding, f = n.textLineHeight, p = t.__textCotentBlock; p && !t.__dirtyText || (p = t.__textCotentBlock = He(i, c, d, f, n.truncate)); var g = p.outerHeight, m = p.lines, v = p.lineHeight, y = ai(g, n, o), x = y.baseX, _ = y.baseY, w = y.textAlign || "left", b = y.textVerticalAlign; ti(e, n, o, x, _); var S = Ee(_, g, b), M = x, I = S; if (s || d) { var T = Le(i, c); d && (T += d[1] + d[3]); var A = Oe(x, T, w); s && ni(t, e, n, A, S, T, g), d && (M = hi(x, w, d), I += d[0]) } e.textAlign = w, e.textBaseline = "middle", e.globalAlpha = n.opacity || 1; for (B = 0; B < Tb.length; B++) { var D = Tb[B], C = D[0], L = D[1], k = n[C]; l && k === r[C] || (e[L] = ab(e, L, k || D[2])) } I += v / 2; var P = n.textStrokeWidth, N = l ? r.textStrokeWidth : null, O = !l || P !== N, E = !l || O || n.textStroke !== r.textStroke, R = si(n.textStroke, P), z = li(n.textFill); if (R && (O && (e.lineWidth = P), E && (e.strokeStyle = R)), z && (l && n.textFill === r.textFill || (e.fillStyle = z)), 1 === m.length) R && e.strokeText(m[0], M, I), z && e.fillText(m[0], M, I); else for (var B = 0; B < m.length; B++)R && e.strokeText(m[B], M, I), z && e.fillText(m[B], M, I), I += v } function Je(t, e, i, n, o, a) { a !== sb && (e.__attrCachedBy = rb.NONE); var r = t.__textCotentBlock; r && !t.__dirtyText || (r = t.__textCotentBlock = Ze(i, n)), Qe(t, e, r, n, o) } function Qe(t, e, i, n, o) { var a = i.width, r = i.outerWidth, s = i.outerHeight, l = n.textPadding, u = ai(s, n, o), h = u.baseX, c = u.baseY, d = u.textAlign, f = u.textVerticalAlign; ti(e, n, o, h, c); var p = Oe(h, r, d), g = Ee(c, s, f), m = p, v = g; l && (m += l[3], v += l[0]); var y = m + a; ii(n) && ni(t, e, n, p, g, r, s); for (var x = 0; x < i.lines.length; x++) { for (var _, w = i.lines[x], b = w.tokens, S = b.length, M = w.lineHeight, I = w.width, T = 0, A = m, D = y, C = S - 1; T < S && (!(_ = b[T]).textAlign || "left" === _.textAlign);)ei(t, e, _, n, M, v, A, "left"), I -= _.width, A += _.width, T++; for (; C >= 0 && "right" === (_ = b[C]).textAlign;)ei(t, e, _, n, M, v, D, "right"), I -= _.width, D -= _.width, C--; for (A += (a - (A - m) - (y - D) - I) / 2; T <= C;)ei(t, e, _ = b[T], n, M, v, A + _.width / 2, "center"), A += _.width, T++; v += M } } function ti(t, e, i, n, o) { if (i && e.textRotation) { var a = e.textOrigin; "center" === a ? (n = i.width / 2 + i.x, o = i.height / 2 + i.y) : a && (n = a[0] + i.x, o = a[1] + i.y), t.translate(n, o), t.rotate(-e.textRotation), t.translate(-n, -o) } } function ei(t, e, i, n, o, a, r, s) { var l = n.rich[i.styleName] || {}; l.text = i.text; var u = i.textVerticalAlign, h = a + o / 2; "top" === u ? h = a + i.height / 2 : "bottom" === u && (h = a + o - i.height / 2), !i.isLineHolder && ii(l) && ni(t, e, l, "right" === s ? r - i.width : "center" === s ? r - i.width / 2 : r, h - i.height / 2, i.width, i.height); var c = i.textPadding; c && (r = hi(r, s, c), h -= i.height / 2 - c[2] - i.textHeight / 2), ri(e, "shadowBlur", D(l.textShadowBlur, n.textShadowBlur, 0)), ri(e, "shadowColor", l.textShadowColor || n.textShadowColor || "transparent"), ri(e, "shadowOffsetX", D(l.textShadowOffsetX, n.textShadowOffsetX, 0)), ri(e, "shadowOffsetY", D(l.textShadowOffsetY, n.textShadowOffsetY, 0)), ri(e, "textAlign", s), ri(e, "textBaseline", "middle"), ri(e, "font", i.font || Sb); var d = si(l.textStroke || n.textStroke, p), f = li(l.textFill || n.textFill), p = A(l.textStrokeWidth, n.textStrokeWidth); d && (ri(e, "lineWidth", p), ri(e, "strokeStyle", d), e.strokeText(i.text, r, h)), f && (ri(e, "fillStyle", f), e.fillText(i.text, r, h)) } function ii(t) { return !!(t.textBackgroundColor || t.textBorderWidth && t.textBorderColor) } function ni(t, e, i, n, o, a, r) { var s = i.textBackgroundColor, l = i.textBorderWidth, u = i.textBorderColor, h = _(s); if (ri(e, "shadowBlur", i.textBoxShadowBlur || 0), ri(e, "shadowColor", i.textBoxShadowColor || "transparent"), ri(e, "shadowOffsetX", i.textBoxShadowOffsetX || 0), ri(e, "shadowOffsetY", i.textBoxShadowOffsetY || 0), h || l && u) { e.beginPath(); var c = i.textBorderRadius; c ? je(e, { x: n, y: o, width: a, height: r, r: c }) : e.rect(n, o, a, r), e.closePath() } if (h) if (ri(e, "fillStyle", s), null != i.fillOpacity) { f = e.globalAlpha; e.globalAlpha = i.fillOpacity * i.opacity, e.fill(), e.globalAlpha = f } else e.fill(); else if (w(s)) { var d = s.image; (d = Ae(d, null, t, oi, s)) && Ce(d) && e.drawImage(d, n, o, a, r) } if (l && u) if (ri(e, "lineWidth", l), ri(e, "strokeStyle", u), null != i.strokeOpacity) { var f = e.globalAlpha; e.globalAlpha = i.strokeOpacity * i.opacity, e.stroke(), e.globalAlpha = f } else e.stroke() } function oi(t, e) { e.image = t } function ai(t, e, i) { var n = e.x || 0, o = e.y || 0, a = e.textAlign, r = e.textVerticalAlign; if (i) { var s = e.textPosition; if (s instanceof Array) n = i.x + ui(s[0], i.width), o = i.y + ui(s[1], i.height); else { var l = Re(s, i, e.textDistance); n = l.x, o = l.y, a = a || l.textAlign, r = r || l.textVerticalAlign } var u = e.textOffset; u && (n += u[0], o += u[1]) } return { baseX: n, baseY: o, textAlign: a, textVerticalAlign: r } } function ri(t, e, i) { return t[e] = ab(t, e, i), t[e] } function si(t, e) { return null == t || e <= 0 || "transparent" === t || "none" === t ? null : t.image || t.colorStops ? "#000" : t } function li(t) { return null == t || "none" === t ? null : t.image || t.colorStops ? "#000" : t } function ui(t, e) { return "string" == typeof t ? t.lastIndexOf("%") >= 0 ? parseFloat(t) / 100 * e : parseFloat(t) : t } function hi(t, e, i) { return "right" === e ? t - i[1] : "center" === e ? t + i[3] / 2 - i[1] / 2 : t + i[3] } function ci(t, e) { return null != t && (t || e.textBackgroundColor || e.textBorderWidth && e.textBorderColor || e.textPadding) } function di(t) { t = t || {}, Kw.call(this, t); for (var e in t) t.hasOwnProperty(e) && "style" !== e && (this[e] = t[e]); this.style = new ub(t.style, this), this._rect = null, this.__clipPaths = [] } function fi(t) { di.call(this, t) } function pi(t) { return parseInt(t, 10) } function gi(t) { return !!t && (!!t.__builtin__ || "function" == typeof t.resize && "function" == typeof t.refresh) } function mi(t, e, i) { return Cb.copy(t.getBoundingRect()), t.transform && Cb.applyTransform(t.transform), Lb.width = e, Lb.height = i, !Cb.intersect(Lb) } function vi(t, e) { if (t === e) return !1; if (!t || !e || t.length !== e.length) return !0; for (var i = 0; i < t.length; i++)if (t[i] !== e[i]) return !0 } function yi(t, e) { for (var i = 0; i < t.length; i++) { var n = t[i]; n.setTransform(e), e.beginPath(), n.buildPath(e, n.shape), e.clip(), n.restoreTransform(e) } } function xi(t, e) { var i = document.createElement("div"); return i.style.cssText = ["position:relative", "overflow:hidden", "width:" + t + "px", "height:" + e + "px", "padding:0", "margin:0", "border-width:0"].join(";") + ";", i } function _i(t) { return "mousewheel" === t && U_.browser.firefox ? "DOMMouseScroll" : t } function wi(t) { t._touching = !0, clearTimeout(t._touchTimer), t._touchTimer = setTimeout(function () { t._touching = !1 }, 700) } function bi(t) { var e = t.pointerType; return "pen" === e || "touch" === e } function Si(t) { function e(t, e) { return function () { if (!e._touching) return t.apply(e, arguments) } } d(Ob, function (e) { t._handlers[e] = m(zb[e], t) }), d(Rb, function (e) { t._handlers[e] = m(zb[e], t) }), d(Nb, function (i) { t._handlers[i] = e(zb[i], t) }) } function Mi(t) { function e(e, i) { d(e, function (e) { ht(t, _i(e), i._handlers[e]) }, i) } fw.call(this), this.dom = t, this._touching = !1, this._touchTimer, this._handlers = {}, Si(this), U_.pointerEventsSupported ? e(Rb, this) : (U_.touchEventsSupported && e(Ob, this), e(Nb, this)) } function Ii(t, e) { var i = new Wb(H_(), t, e); return Fb[i.id] = i, i } function Ti(t, e) { Gb[t] = e } function Ai(t) { delete Fb[t] } function Di(t) { return t instanceof Array ? t : null == t ? [] : [t] } function Ci(t, e, i) { if (t) { t[e] = t[e] || {}, t.emphasis = t.emphasis || {}, t.emphasis[e] = t.emphasis[e] || {}; for (var n = 0, o = i.length; n < o; n++) { var a = i[n]; !t.emphasis[e].hasOwnProperty(a) && t[e].hasOwnProperty(a) && (t.emphasis[e][a] = t[e][a]) } } } function Li(t) { return !Ub(t) || Xb(t) || t instanceof Date ? t : t.value } function ki(t) { return Ub(t) && !(t instanceof Array) } function Pi(t, e) { e = (e || []).slice(); var i = f(t || [], function (t, e) { return { exist: t } }); return Zb(e, function (t, n) { if (Ub(t)) { for (o = 0; o < i.length; o++)if (!i[o].option && null != t.id && i[o].exist.id === t.id + "") return i[o].option = t, void (e[n] = null); for (var o = 0; o < i.length; o++) { var a = i[o].exist; if (!(i[o].option || null != a.id && null != t.id || null == t.name || Ei(t) || Ei(a) || a.name !== t.name + "")) return i[o].option = t, void (e[n] = null) } } }), Zb(e, function (t, e) { if (Ub(t)) { for (var n = 0; n < i.length; n++) { var o = i[n].exist; if (!i[n].option && !Ei(o) && null == t.id) { i[n].option = t; break } } n >= i.length && i.push({ option: t }) } }), i } function Ni(t) { var e = R(); Zb(t, function (t, i) { var n = t.exist; n && e.set(n.id, t) }), Zb(t, function (t, i) { var n = t.option; k(!n || null == n.id || !e.get(n.id) || e.get(n.id) === t, "id duplicates: " + (n && n.id)), n && null != n.id && e.set(n.id, t), !t.keyInfo && (t.keyInfo = {}) }), Zb(t, function (t, i) { var n = t.exist, o = t.option, a = t.keyInfo; if (Ub(o)) { if (a.name = null != o.name ? o.name + "" : n ? n.name : jb + i, n) a.id = n.id; else if (null != o.id) a.id = o.id + ""; else { var r = 0; do { a.id = "\0" + a.name + "\0" + r++ } while (e.get(a.id)) } e.set(a.id, t) } }) } function Oi(t) { var e = t.name; return !(!e || !e.indexOf(jb)) } function Ei(t) { return Ub(t) && t.id && 0 === (t.id + "").indexOf("\0_ec_\0") } function Ri(t, e) { function i(t, e, i) { for (var n = 0, o = t.length; n < o; n++)for (var a = t[n].seriesId, r = Di(t[n].dataIndex), s = i && i[a], l = 0, u = r.length; l < u; l++) { var h = r[l]; s && s[h] ? s[h] = null : (e[a] || (e[a] = {}))[h] = 1 } } function n(t, e) { var i = []; for (var o in t) if (t.hasOwnProperty(o) && null != t[o]) if (e) i.push(+o); else { var a = n(t[o], !0); a.length && i.push({ seriesId: o, dataIndex: a }) } return i } var o = {}, a = {}; return i(t || [], o), i(e || [], a, o), [n(o), n(a)] } function zi(t, e) { return null != e.dataIndexInside ? e.dataIndexInside : null != e.dataIndex ? y(e.dataIndex) ? f(e.dataIndex, function (e) { return t.indexOfRawIndex(e) }) : t.indexOfRawIndex(e.dataIndex) : null != e.name ? y(e.name) ? f(e.name, function (e) { return t.indexOfName(e) }) : t.indexOfName(e.name) : void 0 } function Bi() { var t = "__\0ec_inner_" + qb++ + "_" + Math.random().toFixed(5); return function (e) { return e[t] || (e[t] = {}) } } function Vi(t, e, i) { if (_(e)) { var n = {}; n[e + "Index"] = 0, e = n } var o = i && i.defaultMainType; !o || Gi(e, o + "Index") || Gi(e, o + "Id") || Gi(e, o + "Name") || (e[o + "Index"] = 0); var a = {}; return Zb(e, function (n, o) { var n = e[o]; if ("dataIndex" !== o && "dataIndexInside" !== o) { var r = o.match(/^(\w+)(Index|Id|Name)$/) || [], s = r[1], u = (r[2] || "").toLowerCase(); if (!(!s || !u || null == n || "index" === u && "none" === n || i && i.includeMainTypes && l(i.includeMainTypes, s) < 0)) { var h = { mainType: s }; "index" === u && "all" === n || (h[u] = n); var c = t.queryComponents(h); a[s + "Models"] = c, a[s + "Model"] = c[0] } } else a[o] = n }), a } function Gi(t, e) { return t && t.hasOwnProperty(e) } function Fi(t, e, i) { t.setAttribute ? t.setAttribute(e, i) : t[e] = i } function Wi(t, e) { return t.getAttribute ? t.getAttribute(e) : t[e] } function Hi(t) { return "auto" === t ? U_.domSupported ? "html" : "richText" : t || "html" } function Zi(t, e) { var i = R(), n = []; return d(t, function (t) { var o = e(t); (i.get(o) || (n.push(o), i.set(o, []))).push(t) }), { keys: n, buckets: i } } function Ui(t) { var e = { main: "", sub: "" }; return t && (t = t.split(Kb), e.main = t[0] || "", e.sub = t[1] || ""), e } function Xi(t) { k(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t), 'componentType "' + t + '" illegal') } function ji(t, e) { t.$constructor = t, t.extend = function (t) { var e = this, i = function () { t.$constructor ? t.$constructor.apply(this, arguments) : e.apply(this, arguments) }; return a(i.prototype, t), i.extend = this.extend, i.superCall = qi, i.superApply = Ki, u(i, this), i.superClass = e, i } } function Yi(t) { var e = ["__\0is_clz", Jb++, Math.random().toFixed(3)].join("_"); t.prototype[e] = !0, t.isInstance = function (t) { return !(!t || !t[e]) } } function qi(t, e) { var i = C(arguments, 2); return this.superClass.prototype[e].apply(t, i) } function Ki(t, e, i) { return this.superClass.prototype[e].apply(t, i) } function $i(t, e) { function i(t) { var e = n[t.main]; return e && e[$b] || ((e = n[t.main] = {})[$b] = !0), e } e = e || {}; var n = {}; if (t.registerClass = function (t, e) { return e && (Xi(e), (e = Ui(e)).sub ? e.sub !== $b && (i(e)[e.sub] = t) : n[e.main] = t), t }, t.getClass = function (t, e, i) { var o = n[t]; if (o && o[$b] && (o = e ? o[e] : null), i && !o) throw new Error(e ? "Component " + t + "." + (e || "") + " not exists. Load it first." : t + ".type should be specified."); return o }, t.getClassesByMainType = function (t) { t = Ui(t); var e = [], i = n[t.main]; return i && i[$b] ? d(i, function (t, i) { i !== $b && e.push(t) }) : e.push(i), e }, t.hasClass = function (t) { return t = Ui(t), !!n[t.main] }, t.getAllClassMainTypes = function () { var t = []; return d(n, function (e, i) { t.push(i) }), t }, t.hasSubTypes = function (t) { t = Ui(t); var e = n[t.main]; return e && e[$b] }, t.parseClassType = Ui, e.registerWhenExtend) { var o = t.extend; o && (t.extend = function (e) { var i = o.call(this, e); return t.registerClass(i, e.type) }) } return t } function Ji(t) { return t > -rS && t < rS } function Qi(t) { return t > rS || t < -rS } function tn(t, e, i, n, o) { var a = 1 - o; return a * a * (a * t + 3 * o * e) + o * o * (o * n + 3 * a * i) } function en(t, e, i, n, o) { var a = 1 - o; return 3 * (((e - t) * a + 2 * (i - e) * o) * a + (n - i) * o * o) } function nn(t, e, i, n, o, a) { var r = n + 3 * (e - i) - t, s = 3 * (i - 2 * e + t), l = 3 * (e - t), u = t - o, h = s * s - 3 * r * l, c = s * l - 9 * r * u, d = l * l - 3 * s * u, f = 0; if (Ji(h) && Ji(c)) Ji(s) ? a[0] = 0 : (M = -l / s) >= 0 && M <= 1 && (a[f++] = M); else { var p = c * c - 4 * h * d; if (Ji(p)) { var g = c / h, m = -g / 2; (M = -s / r + g) >= 0 && M <= 1 && (a[f++] = M), m >= 0 && m <= 1 && (a[f++] = m) } else if (p > 0) { var v = aS(p), y = h * s + 1.5 * r * (-c + v), x = h * s + 1.5 * r * (-c - v); (M = (-s - ((y = y < 0 ? -oS(-y, uS) : oS(y, uS)) + (x = x < 0 ? -oS(-x, uS) : oS(x, uS)))) / (3 * r)) >= 0 && M <= 1 && (a[f++] = M) } else { var _ = (2 * h * s - 3 * r * c) / (2 * aS(h * h * h)), w = Math.acos(_) / 3, b = aS(h), S = Math.cos(w), M = (-s - 2 * b * S) / (3 * r), m = (-s + b * (S + lS * Math.sin(w))) / (3 * r), I = (-s + b * (S - lS * Math.sin(w))) / (3 * r); M >= 0 && M <= 1 && (a[f++] = M), m >= 0 && m <= 1 && (a[f++] = m), I >= 0 && I <= 1 && (a[f++] = I) } } return f } function on(t, e, i, n, o) { var a = 6 * i - 12 * e + 6 * t, r = 9 * e + 3 * n - 3 * t - 9 * i, s = 3 * e - 3 * t, l = 0; if (Ji(r)) Qi(a) && (c = -s / a) >= 0 && c <= 1 && (o[l++] = c); else { var u = a * a - 4 * r * s; if (Ji(u)) o[0] = -a / (2 * r); else if (u > 0) { var h = aS(u), c = (-a + h) / (2 * r), d = (-a - h) / (2 * r); c >= 0 && c <= 1 && (o[l++] = c), d >= 0 && d <= 1 && (o[l++] = d) } } return l } function an(t, e, i, n, o, a) { var r = (e - t) * o + t, s = (i - e) * o + e, l = (n - i) * o + i, u = (s - r) * o + r, h = (l - s) * o + s, c = (h - u) * o + u; a[0] = t, a[1] = r, a[2] = u, a[3] = c, a[4] = c, a[5] = h, a[6] = l, a[7] = n } function rn(t, e, i, n, o, a, r, s, l, u, h) { var c, d, f, p, g, m = .005, v = 1 / 0; hS[0] = l, hS[1] = u; for (var y = 0; y < 1; y += .05)cS[0] = tn(t, i, o, r, y), cS[1] = tn(e, n, a, s, y), (p = hw(hS, cS)) < v && (c = y, v = p); v = 1 / 0; for (var x = 0; x < 32 && !(m < sS); x++)d = c - m, f = c + m, cS[0] = tn(t, i, o, r, d), cS[1] = tn(e, n, a, s, d), p = hw(cS, hS), d >= 0 && p < v ? (c = d, v = p) : (dS[0] = tn(t, i, o, r, f), dS[1] = tn(e, n, a, s, f), g = hw(dS, hS), f <= 1 && g < v ? (c = f, v = g) : m *= .5); return h && (h[0] = tn(t, i, o, r, c), h[1] = tn(e, n, a, s, c)), aS(v) } function sn(t, e, i, n) { var o = 1 - n; return o * (o * t + 2 * n * e) + n * n * i } function ln(t, e, i, n) { return 2 * ((1 - n) * (e - t) + n * (i - e)) } function un(t, e, i, n, o) { var a = t - 2 * e + i, r = 2 * (e - t), s = t - n, l = 0; if (Ji(a)) Qi(r) && (c = -s / r) >= 0 && c <= 1 && (o[l++] = c); else { var u = r * r - 4 * a * s; if (Ji(u)) (c = -r / (2 * a)) >= 0 && c <= 1 && (o[l++] = c); else if (u > 0) { var h = aS(u), c = (-r + h) / (2 * a), d = (-r - h) / (2 * a); c >= 0 && c <= 1 && (o[l++] = c), d >= 0 && d <= 1 && (o[l++] = d) } } return l } function hn(t, e, i) { var n = t + i - 2 * e; return 0 === n ? .5 : (t - e) / n } function cn(t, e, i, n, o) { var a = (e - t) * n + t, r = (i - e) * n + e, s = (r - a) * n + a; o[0] = t, o[1] = a, o[2] = s, o[3] = s, o[4] = r, o[5] = i } function dn(t, e, i, n, o, a, r, s, l) { var u, h = .005, c = 1 / 0; hS[0] = r, hS[1] = s; for (var d = 0; d < 1; d += .05)cS[0] = sn(t, i, o, d), cS[1] = sn(e, n, a, d), (m = hw(hS, cS)) < c && (u = d, c = m); c = 1 / 0; for (var f = 0; f < 32 && !(h < sS); f++) { var p = u - h, g = u + h; cS[0] = sn(t, i, o, p), cS[1] = sn(e, n, a, p); var m = hw(cS, hS); if (p >= 0 && m < c) u = p, c = m; else { dS[0] = sn(t, i, o, g), dS[1] = sn(e, n, a, g); var v = hw(dS, hS); g <= 1 && v < c ? (u = g, c = v) : h *= .5 } } return l && (l[0] = sn(t, i, o, u), l[1] = sn(e, n, a, u)), aS(c) } function fn(t, e, i) { if (0 !== t.length) { var n, o = t[0], a = o[0], r = o[0], s = o[1], l = o[1]; for (n = 1; n < t.length; n++)o = t[n], a = fS(a, o[0]), r = pS(r, o[0]), s = fS(s, o[1]), l = pS(l, o[1]); e[0] = a, e[1] = s, i[0] = r, i[1] = l } } function pn(t, e, i, n, o, a) { o[0] = fS(t, i), o[1] = fS(e, n), a[0] = pS(t, i), a[1] = pS(e, n) } function gn(t, e, i, n, o, a, r, s, l, u) { var h, c = on, d = tn, f = c(t, i, o, r, wS); for (l[0] = 1 / 0, l[1] = 1 / 0, u[0] = -1 / 0, u[1] = -1 / 0, h = 0; h < f; h++) { var p = d(t, i, o, r, wS[h]); l[0] = fS(p, l[0]), u[0] = pS(p, u[0]) } for (f = c(e, n, a, s, bS), h = 0; h < f; h++) { var g = d(e, n, a, s, bS[h]); l[1] = fS(g, l[1]), u[1] = pS(g, u[1]) } l[0] = fS(t, l[0]), u[0] = pS(t, u[0]), l[0] = fS(r, l[0]), u[0] = pS(r, u[0]), l[1] = fS(e, l[1]), u[1] = pS(e, u[1]), l[1] = fS(s, l[1]), u[1] = pS(s, u[1]) } function mn(t, e, i, n, o, a, r, s) { var l = hn, u = sn, h = pS(fS(l(t, i, o), 1), 0), c = pS(fS(l(e, n, a), 1), 0), d = u(t, i, o, h), f = u(e, n, a, c); r[0] = fS(t, o, d), r[1] = fS(e, a, f), s[0] = pS(t, o, d), s[1] = pS(e, a, f) } function vn(t, e, i, n, o, a, r, s, l) { var u = tt, h = et, c = Math.abs(o - a); if (c % vS < 1e-4 && c > 1e-4) return s[0] = t - i, s[1] = e - n, l[0] = t + i, void (l[1] = e + n); if (yS[0] = mS(o) * i + t, yS[1] = gS(o) * n + e, xS[0] = mS(a) * i + t, xS[1] = gS(a) * n + e, u(s, yS, xS), h(l, yS, xS), (o %= vS) < 0 && (o += vS), (a %= vS) < 0 && (a += vS), o > a && !r ? a += vS : o < a && r && (o += vS), r) { var d = a; a = o, o = d } for (var f = 0; f < a; f += Math.PI / 2)f > o && (_S[0] = mS(f) * i + t, _S[1] = gS(f) * n + e, u(s, _S, s), h(l, _S, l)) } function yn(t, e, i, n, o, a, r) { if (0 === o) return !1; var s = o, l = 0, u = t; if (r > e + s && r > n + s || r < e - s && r < n - s || a > t + s && a > i + s || a < t - s && a < i - s) return !1; if (t === i) return Math.abs(a - t) <= s / 2; var h = (l = (e - n) / (t - i)) * a - r + (u = (t * n - i * e) / (t - i)); return h * h / (l * l + 1) <= s / 2 * s / 2 } function xn(t, e, i, n, o, a, r, s, l, u, h) { if (0 === l) return !1; var c = l; return !(h > e + c && h > n + c && h > a + c && h > s + c || h < e - c && h < n - c && h < a - c && h < s - c || u > t + c && u > i + c && u > o + c && u > r + c || u < t - c && u < i - c && u < o - c && u < r - c) && rn(t, e, i, n, o, a, r, s, u, h, null) <= c / 2 } function _n(t, e, i, n, o, a, r, s, l) { if (0 === r) return !1; var u = r; return !(l > e + u && l > n + u && l > a + u || l < e - u && l < n - u && l < a - u || s > t + u && s > i + u && s > o + u || s < t - u && s < i - u && s < o - u) && dn(t, e, i, n, o, a, s, l, null) <= u / 2 } function wn(t) { return (t %= RS) < 0 && (t += RS), t } function bn(t, e, i, n, o, a, r, s, l) { if (0 === r) return !1; var u = r; s -= t, l -= e; var h = Math.sqrt(s * s + l * l); if (h - u > i || h + u < i) return !1; if (Math.abs(n - o) % zS < 1e-4) return !0; if (a) { var c = n; n = wn(o), o = wn(c) } else n = wn(n), o = wn(o); n > o && (o += zS); var d = Math.atan2(l, s); return d < 0 && (d += zS), d >= n && d <= o || d + zS >= n && d + zS <= o } function Sn(t, e, i, n, o, a) { if (a > e && a > n || a < e && a < n) return 0; if (n === e) return 0; var r = n < e ? 1 : -1, s = (a - e) / (n - e); 1 !== s && 0 !== s || (r = n < e ? .5 : -.5); var l = s * (i - t) + t; return l === o ? 1 / 0 : l > o ? r : 0 } function Mn(t, e) { return Math.abs(t - e) < GS } function In() { var t = WS[0]; WS[0] = WS[1], WS[1] = t } function Tn(t, e, i, n, o, a, r, s, l, u) { if (u > e && u > n && u > a && u > s || u < e && u < n && u < a && u < s) return 0; var h = nn(e, n, a, s, u, FS); if (0 === h) return 0; for (var c, d, f = 0, p = -1, g = 0; g < h; g++) { var m = FS[g], v = 0 === m || 1 === m ? .5 : 1; tn(t, i, o, r, m) < l || (p < 0 && (p = on(e, n, a, s, WS), WS[1] < WS[0] && p > 1 && In(), c = tn(e, n, a, s, WS[0]), p > 1 && (d = tn(e, n, a, s, WS[1]))), 2 === p ? m < WS[0] ? f += c < e ? v : -v : m < WS[1] ? f += d < c ? v : -v : f += s < d ? v : -v : m < WS[0] ? f += c < e ? v : -v : f += s < c ? v : -v) } return f } function An(t, e, i, n, o, a, r, s) { if (s > e && s > n && s > a || s < e && s < n && s < a) return 0; var l = un(e, n, a, s, FS); if (0 === l) return 0; var u = hn(e, n, a); if (u >= 0 && u <= 1) { for (var h = 0, c = sn(e, n, a, u), d = 0; d < l; d++) { f = 0 === FS[d] || 1 === FS[d] ? .5 : 1; (p = sn(t, i, o, FS[d])) < r || (FS[d] < u ? h += c < e ? f : -f : h += a < c ? f : -f) } return h } var f = 0 === FS[0] || 1 === FS[0] ? .5 : 1, p = sn(t, i, o, FS[0]); return p < r ? 0 : a < e ? f : -f } function Dn(t, e, i, n, o, a, r, s) { if ((s -= e) > i || s < -i) return 0; u = Math.sqrt(i * i - s * s); FS[0] = -u, FS[1] = u; var l = Math.abs(n - o); if (l < 1e-4) return 0; if (l % VS < 1e-4) { n = 0, o = VS; p = a ? 1 : -1; return r >= FS[0] + t && r <= FS[1] + t ? p : 0 } if (a) { var u = n; n = wn(o), o = wn(u) } else n = wn(n), o = wn(o); n > o && (o += VS); for (var h = 0, c = 0; c < 2; c++) { var d = FS[c]; if (d + t > r) { var f = Math.atan2(s, d), p = a ? 1 : -1; f < 0 && (f = VS + f), (f >= n && f <= o || f + VS >= n && f + VS <= o) && (f > Math.PI / 2 && f < 1.5 * Math.PI && (p = -p), h += p) } } return h } function Cn(t, e, i, n, o) { for (var a = 0, r = 0, s = 0, l = 0, u = 0, h = 0; h < t.length;) { var c = t[h++]; switch (c === BS.M && h > 1 && (i || (a += Sn(r, s, l, u, n, o))), 1 === h && (l = r = t[h], u = s = t[h + 1]), c) { case BS.M: r = l = t[h++], s = u = t[h++]; break; case BS.L: if (i) { if (yn(r, s, t[h], t[h + 1], e, n, o)) return !0 } else a += Sn(r, s, t[h], t[h + 1], n, o) || 0; r = t[h++], s = t[h++]; break; case BS.C: if (i) { if (xn(r, s, t[h++], t[h++], t[h++], t[h++], t[h], t[h + 1], e, n, o)) return !0 } else a += Tn(r, s, t[h++], t[h++], t[h++], t[h++], t[h], t[h + 1], n, o) || 0; r = t[h++], s = t[h++]; break; case BS.Q: if (i) { if (_n(r, s, t[h++], t[h++], t[h], t[h + 1], e, n, o)) return !0 } else a += An(r, s, t[h++], t[h++], t[h], t[h + 1], n, o) || 0; r = t[h++], s = t[h++]; break; case BS.A: var d = t[h++], f = t[h++], p = t[h++], g = t[h++], m = t[h++], v = t[h++]; h += 1; var y = 1 - t[h++], x = Math.cos(m) * p + d, _ = Math.sin(m) * g + f; h > 1 ? a += Sn(r, s, x, _, n, o) : (l = x, u = _); var w = (n - d) * g / p + d; if (i) { if (bn(d, f, g, m, m + v, y, e, w, o)) return !0 } else a += Dn(d, f, g, m, m + v, y, w, o); r = Math.cos(m + v) * p + d, s = Math.sin(m + v) * g + f; break; case BS.R: l = r = t[h++], u = s = t[h++]; var x = l + t[h++], _ = u + t[h++]; if (i) { if (yn(l, u, x, u, e, n, o) || yn(x, u, x, _, e, n, o) || yn(x, _, l, _, e, n, o) || yn(l, _, l, u, e, n, o)) return !0 } else a += Sn(x, u, x, _, n, o), a += Sn(l, _, l, u, n, o); break; case BS.Z: if (i) { if (yn(r, s, l, u, e, n, o)) return !0 } else a += Sn(r, s, l, u, n, o); r = l, s = u } } return i || Mn(s, u) || (a += Sn(r, s, l, u, n, o) || 0), 0 !== a } function Ln(t, e, i) { return Cn(t, 0, !1, e, i) } function kn(t, e, i, n) { return Cn(t, e, !0, i, n) } function Pn(t) { di.call(this, t), this.path = null } function Nn(t, e, i, n, o, a, r, s, l, u, h) { var c = l * (tM / 180), d = QS(c) * (t - i) / 2 + JS(c) * (e - n) / 2, f = -1 * JS(c) * (t - i) / 2 + QS(c) * (e - n) / 2, p = d * d / (r * r) + f * f / (s * s); p > 1 && (r *= $S(p), s *= $S(p)); var g = (o === a ? -1 : 1) * $S((r * r * (s * s) - r * r * (f * f) - s * s * (d * d)) / (r * r * (f * f) + s * s * (d * d))) || 0, m = g * r * f / s, v = g * -s * d / r, y = (t + i) / 2 + QS(c) * m - JS(c) * v, x = (e + n) / 2 + JS(c) * m + QS(c) * v, _ = nM([1, 0], [(d - m) / r, (f - v) / s]), w = [(d - m) / r, (f - v) / s], b = [(-1 * d - m) / r, (-1 * f - v) / s], S = nM(w, b); iM(w, b) <= -1 && (S = tM), iM(w, b) >= 1 && (S = 0), 0 === a && S > 0 && (S -= 2 * tM), 1 === a && S < 0 && (S += 2 * tM), h.addData(u, y, x, r, s, _, S, c, a) } function On(t) { if (!t) return new ES; for (var e, i = 0, n = 0, o = i, a = n, r = new ES, s = ES.CMD, l = t.match(oM), u = 0; u < l.length; u++) { for (var h, c = l[u], d = c.charAt(0), f = c.match(aM) || [], p = f.length, g = 0; g < p; g++)f[g] = parseFloat(f[g]); for (var m = 0; m < p;) { var v, y, x, _, w, b, S, M = i, I = n; switch (d) { case "l": i += f[m++], n += f[m++], h = s.L, r.addData(h, i, n); break; case "L": i = f[m++], n = f[m++], h = s.L, r.addData(h, i, n); break; case "m": i += f[m++], n += f[m++], h = s.M, r.addData(h, i, n), o = i, a = n, d = "l"; break; case "M": i = f[m++], n = f[m++], h = s.M, r.addData(h, i, n), o = i, a = n, d = "L"; break; case "h": i += f[m++], h = s.L, r.addData(h, i, n); break; case "H": i = f[m++], h = s.L, r.addData(h, i, n); break; case "v": n += f[m++], h = s.L, r.addData(h, i, n); break; case "V": n = f[m++], h = s.L, r.addData(h, i, n); break; case "C": h = s.C, r.addData(h, f[m++], f[m++], f[m++], f[m++], f[m++], f[m++]), i = f[m - 2], n = f[m - 1]; break; case "c": h = s.C, r.addData(h, f[m++] + i, f[m++] + n, f[m++] + i, f[m++] + n, f[m++] + i, f[m++] + n), i += f[m - 2], n += f[m - 1]; break; case "S": v = i, y = n; var T = r.len(), A = r.data; e === s.C && (v += i - A[T - 4], y += n - A[T - 3]), h = s.C, M = f[m++], I = f[m++], i = f[m++], n = f[m++], r.addData(h, v, y, M, I, i, n); break; case "s": v = i, y = n; var T = r.len(), A = r.data; e === s.C && (v += i - A[T - 4], y += n - A[T - 3]), h = s.C, M = i + f[m++], I = n + f[m++], i += f[m++], n += f[m++], r.addData(h, v, y, M, I, i, n); break; case "Q": M = f[m++], I = f[m++], i = f[m++], n = f[m++], h = s.Q, r.addData(h, M, I, i, n); break; case "q": M = f[m++] + i, I = f[m++] + n, i += f[m++], n += f[m++], h = s.Q, r.addData(h, M, I, i, n); break; case "T": v = i, y = n; var T = r.len(), A = r.data; e === s.Q && (v += i - A[T - 4], y += n - A[T - 3]), i = f[m++], n = f[m++], h = s.Q, r.addData(h, v, y, i, n); break; case "t": v = i, y = n; var T = r.len(), A = r.data; e === s.Q && (v += i - A[T - 4], y += n - A[T - 3]), i += f[m++], n += f[m++], h = s.Q, r.addData(h, v, y, i, n); break; case "A": x = f[m++], _ = f[m++], w = f[m++], b = f[m++], S = f[m++], Nn(M = i, I = n, i = f[m++], n = f[m++], b, S, x, _, w, h = s.A, r); break; case "a": x = f[m++], _ = f[m++], w = f[m++], b = f[m++], S = f[m++], Nn(M = i, I = n, i += f[m++], n += f[m++], b, S, x, _, w, h = s.A, r) } } "z" !== d && "Z" !== d || (h = s.Z, r.addData(h), i = o, n = a), e = h } return r.toStatic(), r } function En(t, e) { var i = On(t); return e = e || {}, e.buildPath = function (t) { if (t.setData) t.setData(i.data), (e = t.getContext()) && t.rebuildPath(e); else { var e = t; i.rebuildPath(e) } }, e.applyTransform = function (t) { KS(i, t), this.dirty(!0) }, e } function Rn(t, e) { return new Pn(En(t, e)) } function zn(t, e) { return Pn.extend(En(t, e)) } function Bn(t, e, i, n, o, a, r) { var s = .5 * (i - t), l = .5 * (n - e); return (2 * (e - i) + s + l) * r + (-3 * (e - i) - 2 * s - l) * a + s * o + e } function Vn(t, e, i) { var n = e.points, o = e.smooth; if (n && n.length >= 2) { if (o && "spline" !== o) { var a = fM(n, o, i, e.smoothConstraint); t.moveTo(n[0][0], n[0][1]); for (var r = n.length, s = 0; s < (i ? r : r - 1); s++) { var l = a[2 * s], u = a[2 * s + 1], h = n[(s + 1) % r]; t.bezierCurveTo(l[0], l[1], u[0], u[1], h[0], h[1]) } } else { "spline" === o && (n = dM(n, i)), t.moveTo(n[0][0], n[0][1]); for (var s = 1, c = n.length; s < c; s++)t.lineTo(n[s][0], n[s][1]) } i && t.closePath() } } function Gn(t, e, i) { var n = i && i.lineWidth; if (e && n) { var o = e.x1, a = e.x2, r = e.y1, s = e.y2; mM(2 * o) === mM(2 * a) ? t.x1 = t.x2 = Wn(o, n, !0) : (t.x1 = o, t.x2 = a), mM(2 * r) === mM(2 * s) ? t.y1 = t.y2 = Wn(r, n, !0) : (t.y1 = r, t.y2 = s) } } function Fn(t, e, i) { var n = i && i.lineWidth; if (e && n) { var o = e.x, a = e.y, r = e.width, s = e.height; t.x = Wn(o, n, !0), t.y = Wn(a, n, !0), t.width = Math.max(Wn(o + r, n, !1) - t.x, 0 === r ? 0 : 1), t.height = Math.max(Wn(a + s, n, !1) - t.y, 0 === s ? 0 : 1) } } function Wn(t, e, i) { var n = mM(2 * t); return (n + mM(e)) % 2 == 0 ? n / 2 : (n + (i ? 1 : -1)) / 2 } function Hn(t, e, i) { var n = t.cpx2, o = t.cpy2; return null === n || null === o ? [(i ? en : tn)(t.x1, t.cpx1, t.cpx2, t.x2, e), (i ? en : tn)(t.y1, t.cpy1, t.cpy2, t.y2, e)] : [(i ? ln : sn)(t.x1, t.cpx1, t.x2, e), (i ? ln : sn)(t.y1, t.cpy1, t.y2, e)] } function Zn(t) { di.call(this, t), this._displayables = [], this._temporaryDisplayables = [], this._cursor = 0, this.notClear = !0 } function Un(t) { return Pn.extend(t) } function Xn(t, e, i, n) { var o = Rn(t, e); return i && ("center" === n && (i = Yn(i, o.getBoundingRect())), qn(o, i)), o } function jn(t, e, i) { var n = new fi({ style: { image: t, x: e.x, y: e.y, width: e.width, height: e.height }, onload: function (t) { if ("center" === i) { var o = { width: t.width, height: t.height }; n.setStyle(Yn(e, o)) } } }); return n } function Yn(t, e) { var i, n = e.width / e.height, o = t.height * n; return i = o <= t.width ? t.height : (o = t.width) / n, { x: t.x + t.width / 2 - o / 2, y: t.y + t.height / 2 - i / 2, width: o, height: i } } function qn(t, e) { if (t.applyTransform) { var i = t.getBoundingRect().calculateTransform(e); t.applyTransform(i) } } function Kn(t) { var e = t.shape, i = t.style.lineWidth; return CM(2 * e.x1) === CM(2 * e.x2) && (e.x1 = e.x2 = Jn(e.x1, i, !0)), CM(2 * e.y1) === CM(2 * e.y2) && (e.y1 = e.y2 = Jn(e.y1, i, !0)), t } function $n(t) { var e = t.shape, i = t.style.lineWidth, n = e.x, o = e.y, a = e.width, r = e.height; return e.x = Jn(e.x, i, !0), e.y = Jn(e.y, i, !0), e.width = Math.max(Jn(n + a, i, !1) - e.x, 0 === a ? 0 : 1), e.height = Math.max(Jn(o + r, i, !1) - e.y, 0 === r ? 0 : 1), t } function Jn(t, e, i) { var n = CM(2 * t); return (n + CM(e)) % 2 == 0 ? n / 2 : (n + (i ? 1 : -1)) / 2 } function Qn(t) { return null != t && "none" !== t } function to(t) { if ("string" != typeof t) return t; var e = EM.get(t); return e || (e = Ht(t, -.1), RM < 1e4 && (EM.set(t, e), RM++)), e } function eo(t) { if (t.__hoverStlDirty) { t.__hoverStlDirty = !1; var e = t.__hoverStl; if (e) { var i = t.__cachedNormalStl = {}; t.__cachedNormalZ2 = t.z2; var n = t.style; for (var o in e) null != e[o] && (i[o] = n[o]); i.fill = n.fill, i.stroke = n.stroke } else t.__cachedNormalStl = t.__cachedNormalZ2 = null } } function io(t) { var e = t.__hoverStl; if (e && !t.__highlighted) { var i = t.useHoverLayer; t.__highlighted = i ? "layer" : "plain"; var n = t.__zr; if (n || !i) { var o = t, a = t.style; i && (a = (o = n.addHover(t)).style), bo(a), i || eo(o), a.extendFrom(e), no(a, e, "fill"), no(a, e, "stroke"), wo(a), i || (t.dirty(!1), t.z2 += NM) } } } function no(t, e, i) { !Qn(e[i]) && Qn(t[i]) && (t[i] = to(t[i])) } function oo(t) { var e = t.__highlighted; if (e) if (t.__highlighted = !1, "layer" === e) t.__zr && t.__zr.removeHover(t); else if (e) { var i = t.style, n = t.__cachedNormalStl; n && (bo(i), t.setStyle(n), wo(i)); var o = t.__cachedNormalZ2; null != o && t.z2 - o === NM && (t.z2 = o) } } function ao(t, e) { t.isGroup ? t.traverse(function (t) { !t.isGroup && e(t) }) : e(t) } function ro(t, e) { e = t.__hoverStl = !1 !== e && (e || {}), t.__hoverStlDirty = !0, t.__highlighted && (t.__cachedNormalStl = null, oo(t), io(t)) } function so(t) { return t && t.__isEmphasisEntered } function lo(t) { this.__hoverSilentOnTouch && t.zrByTouch || !this.__isEmphasisEntered && ao(this, io) } function uo(t) { this.__hoverSilentOnTouch && t.zrByTouch || !this.__isEmphasisEntered && ao(this, oo) } function ho() { this.__isEmphasisEntered = !0, ao(this, io) } function co() { this.__isEmphasisEntered = !1, ao(this, oo) } function fo(t, e, i) { t.isGroup ? t.traverse(function (t) { !t.isGroup && ro(t, t.hoverStyle || e) }) : ro(t, t.hoverStyle || e), po(t, i) } function po(t, e) { var i = !1 === e; if (t.__hoverSilentOnTouch = null != e && e.hoverSilentOnTouch, !i || t.__hoverStyleTrigger) { var n = i ? "off" : "on"; t[n]("mouseover", lo)[n]("mouseout", uo), t[n]("emphasis", ho)[n]("normal", co), t.__hoverStyleTrigger = !i } } function go(t, e, i, n, o, a, r) { var s, l = (o = o || PM).labelFetcher, u = o.labelDataIndex, h = o.labelDimIndex, c = i.getShallow("show"), d = n.getShallow("show"); (c || d) && (l && (s = l.getFormattedLabel(u, "normal", null, h)), null == s && (s = x(o.defaultText) ? o.defaultText(u, o) : o.defaultText)); var f = c ? s : null, p = d ? A(l ? l.getFormattedLabel(u, "emphasis", null, h) : null, s) : null; null == f && null == p || (mo(t, i, a, o), mo(e, n, r, o, !0)), t.text = f, e.text = p } function mo(t, e, i, n, o) { return vo(t, e, n, o), i && a(t, i), t } function vo(t, e, i, n) { if ((i = i || PM).isRectText) { var o = e.getShallow("position") || (n ? null : "inside"); "outside" === o && (o = "top"), t.textPosition = o, t.textOffset = e.getShallow("offset"); var a = e.getShallow("rotate"); null != a && (a *= Math.PI / 180), t.textRotation = a, t.textDistance = A(e.getShallow("distance"), n ? null : 5) } var r, s = e.ecModel, l = s && s.option.textStyle, u = yo(e); if (u) { r = {}; for (var h in u) if (u.hasOwnProperty(h)) { var c = e.getModel(["rich", h]); xo(r[h] = {}, c, l, i, n) } } return t.rich = r, xo(t, e, l, i, n, !0), i.forceRich && !i.textStyle && (i.textStyle = {}), t } function yo(t) { for (var e; t && t !== t.ecModel;) { var i = (t.option || PM).rich; if (i) { e = e || {}; for (var n in i) i.hasOwnProperty(n) && (e[n] = 1) } t = t.parentModel } return e } function xo(t, e, i, n, o, a) { i = !o && i || PM, t.textFill = _o(e.getShallow("color"), n) || i.color, t.textStroke = _o(e.getShallow("textBorderColor"), n) || i.textBorderColor, t.textStrokeWidth = A(e.getShallow("textBorderWidth"), i.textBorderWidth), t.insideRawTextPosition = t.textPosition, o || (a && (t.insideRollbackOpt = n, wo(t)), null == t.textFill && (t.textFill = n.autoColor)), t.fontStyle = e.getShallow("fontStyle") || i.fontStyle, t.fontWeight = e.getShallow("fontWeight") || i.fontWeight, t.fontSize = e.getShallow("fontSize") || i.fontSize, t.fontFamily = e.getShallow("fontFamily") || i.fontFamily, t.textAlign = e.getShallow("align"), t.textVerticalAlign = e.getShallow("verticalAlign") || e.getShallow("baseline"), t.textLineHeight = e.getShallow("lineHeight"), t.textWidth = e.getShallow("width"), t.textHeight = e.getShallow("height"), t.textTag = e.getShallow("tag"), a && n.disableBox || (t.textBackgroundColor = _o(e.getShallow("backgroundColor"), n), t.textPadding = e.getShallow("padding"), t.textBorderColor = _o(e.getShallow("borderColor"), n), t.textBorderWidth = e.getShallow("borderWidth"), t.textBorderRadius = e.getShallow("borderRadius"), t.textBoxShadowColor = e.getShallow("shadowColor"), t.textBoxShadowBlur = e.getShallow("shadowBlur"), t.textBoxShadowOffsetX = e.getShallow("shadowOffsetX"), t.textBoxShadowOffsetY = e.getShallow("shadowOffsetY")), t.textShadowColor = e.getShallow("textShadowColor") || i.textShadowColor, t.textShadowBlur = e.getShallow("textShadowBlur") || i.textShadowBlur, t.textShadowOffsetX = e.getShallow("textShadowOffsetX") || i.textShadowOffsetX, t.textShadowOffsetY = e.getShallow("textShadowOffsetY") || i.textShadowOffsetY } function _o(t, e) { return "auto" !== t ? t : e && e.autoColor ? e.autoColor : null } function wo(t) { var e = t.insideRollbackOpt; if (e && null == t.textFill) { var i, n = e.useInsideStyle, o = t.insideRawTextPosition, a = e.autoColor; !1 !== n && (!0 === n || e.isRectText && o && "string" == typeof o && o.indexOf("inside") >= 0) ? (i = { textFill: null, textStroke: t.textStroke, textStrokeWidth: t.textStrokeWidth }, t.textFill = "#fff", null == t.textStroke && (t.textStroke = a, null == t.textStrokeWidth && (t.textStrokeWidth = 2))) : null != a && (i = { textFill: null }, t.textFill = a), i && (t.insideRollback = i) } } function bo(t) { var e = t.insideRollback; e && (t.textFill = e.textFill, t.textStroke = e.textStroke, t.textStrokeWidth = e.textStrokeWidth, t.insideRollback = null) } function So(t, e) { var i = e || e.getModel("textStyle"); return P([t.fontStyle || i && i.getShallow("fontStyle") || "", t.fontWeight || i && i.getShallow("fontWeight") || "", (t.fontSize || i && i.getShallow("fontSize") || 12) + "px", t.fontFamily || i && i.getShallow("fontFamily") || "sans-serif"].join(" ")) } function Mo(t, e, i, n, o, a) { if ("function" == typeof o && (a = o, o = null), n && n.isAnimationEnabled()) { var r = t ? "Update" : "", s = n.getShallow("animationDuration" + r), l = n.getShallow("animationEasing" + r), u = n.getShallow("animationDelay" + r); "function" == typeof u && (u = u(o, n.getAnimationDelayParams ? n.getAnimationDelayParams(e, o) : null)), "function" == typeof s && (s = s(o)), s > 0 ? e.animateTo(i, s, u || 0, l, a, !!a) : (e.stopAnimation(), e.attr(i), a && a()) } else e.stopAnimation(), e.attr(i), a && a() } function Io(t, e, i, n, o) { Mo(!0, t, e, i, n, o) } function To(t, e, i, n, o) { Mo(!1, t, e, i, n, o) } function Ao(t, e) { for (var i = _t([]); t && t !== e;)bt(i, t.getLocalTransform(), i), t = t.parent; return i } function Do(t, e, i) { return e && !c(e) && (e = Tw.getLocalTransform(e)), i && (e = Tt([], e)), Q([], t, e) } function Co(t, e, i) { var n = 0 === e[4] || 0 === e[5] || 0 === e[0] ? 1 : Math.abs(2 * e[4] / e[0]), o = 0 === e[4] || 0 === e[5] || 0 === e[2] ? 1 : Math.abs(2 * e[4] / e[2]), a = ["left" === t ? -n : "right" === t ? n : 0, "top" === t ? -o : "bottom" === t ? o : 0]; return a = Do(a, e, i), Math.abs(a[0]) > Math.abs(a[1]) ? a[0] > 0 ? "right" : "left" : a[1] > 0 ? "bottom" : "top" } function Lo(t, e, i, n) { function o(t) { var e = { position: F(t.position), rotation: t.rotation }; return t.shape && (e.shape = a({}, t.shape)), e } if (t && e) { var r = function (t) { var e = {}; return t.traverse(function (t) { !t.isGroup && t.anid && (e[t.anid] = t) }), e }(t); e.traverse(function (t) { if (!t.isGroup && t.anid) { var e = r[t.anid]; if (e) { var n = o(t); t.attr(o(e)), Io(t, n, i, t.dataIndex) } } }) } } function ko(t, e) { return f(t, function (t) { var i = t[0]; i = LM(i, e.x), i = kM(i, e.x + e.width); var n = t[1]; return n = LM(n, e.y), n = kM(n, e.y + e.height), [i, n] }) } function Po(t, e, i) { var n = (e = a({ rectHover: !0 }, e)).style = { strokeNoScale: !0 }; if (i = i || { x: -1, y: -1, width: 2, height: 2 }, t) return 0 === t.indexOf("image://") ? (n.image = t.slice(8), r(n, i), new fi(e)) : Xn(t.replace("path://", ""), e, i, "center") } function No(t, e, i) { this.parentModel = e, this.ecModel = i, this.option = t } function Oo(t, e, i) { for (var n = 0; n < e.length && (!e[n] || null != (t = t && "object" == typeof t ? t[e[n]] : null)); n++); return null == t && i && (t = i.get(e)), t } function Eo(t, e) { var i = HM(t).getParent; return i ? i.call(t, e) : t.parentModel } function Ro(t) { return [t || "", ZM++, Math.random().toFixed(5)].join("_") } function zo(t) { return t.replace(/^\s+/, "").replace(/\s+$/, "") } function Bo(t, e, i, n) { var o = e[1] - e[0], a = i[1] - i[0]; if (0 === o) return 0 === a ? i[0] : (i[0] + i[1]) / 2; if (n) if (o > 0) { if (t <= e[0]) return i[0]; if (t >= e[1]) return i[1] } else { if (t >= e[0]) return i[0]; if (t <= e[1]) return i[1] } else { if (t === e[0]) return i[0]; if (t === e[1]) return i[1] } return (t - e[0]) / o * a + i[0] } function Vo(t, e) { switch (t) { case "center": case "middle": t = "50%"; break; case "left": case "top": t = "0%"; break; case "right": case "bottom": t = "100%" }return "string" == typeof t ? zo(t).match(/%$/) ? parseFloat(t) / 100 * e : parseFloat(t) : null == t ? NaN : +t } function Go(t, e, i) { return null == e && (e = 10), e = Math.min(Math.max(0, e), 20), t = (+t).toFixed(e), i ? t : +t } function Fo(t) { return t.sort(function (t, e) { return t - e }), t } function Wo(t) { if (t = +t, isNaN(t)) return 0; for (var e = 1, i = 0; Math.round(t * e) / e !== t;)e *= 10, i++; return i } function Ho(t) { var e = t.toString(), i = e.indexOf("e"); if (i > 0) { var n = +e.slice(i + 1); return n < 0 ? -n : 0 } var o = e.indexOf("."); return o < 0 ? 0 : e.length - 1 - o } function Zo(t, e) { var i = Math.log, n = Math.LN10, o = Math.floor(i(t[1] - t[0]) / n), a = Math.round(i(Math.abs(e[1] - e[0])) / n), r = Math.min(Math.max(-o + a, 0), 20); return isFinite(r) ? r : 20 } function Uo(t, e, i) { if (!t[e]) return 0; var n = p(t, function (t, e) { return t + (isNaN(e) ? 0 : e) }, 0); if (0 === n) return 0; for (var o = Math.pow(10, i), a = f(t, function (t) { return (isNaN(t) ? 0 : t) / n * o * 100 }), r = 100 * o, s = f(a, function (t) { return Math.floor(t) }), l = p(s, function (t, e) { return t + e }, 0), u = f(a, function (t, e) { return t - s[e] }); l < r;) { for (var h = Number.NEGATIVE_INFINITY, c = null, d = 0, g = u.length; d < g; ++d)u[d] > h && (h = u[d], c = d); ++s[c], u[c] = 0, ++l } return s[e] / o } function Xo(t) { var e = 2 * Math.PI; return (t % e + e) % e } function jo(t) { return t > -UM && t < UM } function Yo(t) { if (t instanceof Date) return t; if ("string" == typeof t) { var e = jM.exec(t); if (!e) return new Date(NaN); if (e[8]) { var i = +e[4] || 0; return "Z" !== e[8].toUpperCase() && (i -= e[8].slice(0, 3)), new Date(Date.UTC(+e[1], +(e[2] || 1) - 1, +e[3] || 1, i, +(e[5] || 0), +e[6] || 0, +e[7] || 0)) } return new Date(+e[1], +(e[2] || 1) - 1, +e[3] || 1, +e[4] || 0, +(e[5] || 0), +e[6] || 0, +e[7] || 0) } return null == t ? new Date(NaN) : new Date(Math.round(t)) } function qo(t) { return Math.pow(10, Ko(t)) } function Ko(t) { return Math.floor(Math.log(t) / Math.LN10) } function $o(t, e) { var i, n = Ko(t), o = Math.pow(10, n), a = t / o; return i = e ? 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, t = i * o, n >= -20 ? +t.toFixed(n < 0 ? -n : 0) : t } function Jo(t) { function e(t, i, n) { return t.interval[n] < i.interval[n] || t.interval[n] === i.interval[n] && (t.close[n] - i.close[n] == (n ? -1 : 1) || !n && e(t, i, 1)) } t.sort(function (t, i) { return e(t, i, 0) ? -1 : 1 }); for (var i = -1 / 0, n = 1, o = 0; o < t.length;) { for (var a = t[o].interval, r = t[o].close, s = 0; s < 2; s++)a[s] <= i && (a[s] = i, r[s] = s ? 1 : 1 - n), i = a[s], n = r[s]; a[0] === a[1] && r[0] * r[1] != 1 ? t.splice(o, 1) : o++ } return t } function Qo(t) { return t - parseFloat(t) >= 0 } function ta(t) { return isNaN(t) ? "-" : (t = (t + "").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g, "$1,") + (t.length > 1 ? "." + t[1] : "") } function ea(t, e) { return t = (t || "").toLowerCase().replace(/-(.)/g, function (t, e) { return e.toUpperCase() }), e && t && (t = t.charAt(0).toUpperCase() + t.slice(1)), t } function ia(t) { return null == t ? "" : (t + "").replace(KM, function (t, e) { return $M[e] }) } function na(t, e, i) { y(e) || (e = [e]); var n = e.length; if (!n) return ""; for (var o = e[0].$vars || [], a = 0; a < o.length; a++) { var r = JM[a]; t = t.replace(QM(r), QM(r, 0)) } for (var s = 0; s < n; s++)for (var l = 0; l < o.length; l++) { var u = e[s][o[l]]; t = t.replace(QM(JM[l], s), i ? ia(u) : u) } return t } function oa(t, e, i) { return d(e, function (e, n) { t = t.replace("{" + n + "}", i ? ia(e) : e) }), t } function aa(t, e) { var i = (t = _(t) ? { color: t, extraCssText: e } : t || {}).color, n = t.type, e = t.extraCssText, o = t.renderMode || "html", a = t.markerId || "X"; return i ? "html" === o ? "subItem" === n ? '<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:' + ia(i) + ";" + (e || "") + '"></span>' : '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:' + ia(i) + ";" + (e || "") + '"></span>' : { renderMode: o, content: "{marker" + a + "|}  ", style: { color: i } } : "" } function ra(t, e) { return t += "", "0000".substr(0, e - t.length) + t } function sa(t, e, i) { "week" !== t && "month" !== t && "quarter" !== t && "half-year" !== t && "year" !== t || (t = "MM-dd\nyyyy"); var n = Yo(e), o = i ? "UTC" : "", a = n["get" + o + "FullYear"](), r = n["get" + o + "Month"]() + 1, s = n["get" + o + "Date"](), l = n["get" + o + "Hours"](), u = n["get" + o + "Minutes"](), h = n["get" + o + "Seconds"](), c = n["get" + o + "Milliseconds"](); return t = t.replace("MM", ra(r, 2)).replace("M", r).replace("yyyy", a).replace("yy", a % 100).replace("dd", ra(s, 2)).replace("d", s).replace("hh", ra(l, 2)).replace("h", l).replace("mm", ra(u, 2)).replace("m", u).replace("ss", ra(h, 2)).replace("s", h).replace("SSS", ra(c, 3)) } function la(t) { return t ? t.charAt(0).toUpperCase() + t.substr(1) : t } function ua(t, e, i, n, o) { var a = 0, r = 0; null == n && (n = 1 / 0), null == o && (o = 1 / 0); var s = 0; e.eachChild(function (l, u) { var h, c, d = l.position, f = l.getBoundingRect(), p = e.childAt(u + 1), g = p && p.getBoundingRect(); if ("horizontal" === t) { var m = f.width + (g ? -g.x + f.x : 0); (h = a + m) > n || l.newline ? (a = 0, h = m, r += s + i, s = f.height) : s = Math.max(s, f.height) } else { var v = f.height + (g ? -g.y + f.y : 0); (c = r + v) > o || l.newline ? (a += s + i, r = 0, c = v, s = f.width) : s = Math.max(s, f.width) } l.newline || (d[0] = a, d[1] = r, "horizontal" === t ? a = h + i : r = c + i) }) } function ha(t, e, i) { var n = e.width, o = e.height, a = Vo(t.x, n), r = Vo(t.y, o), s = Vo(t.x2, n), l = Vo(t.y2, o); return (isNaN(a) || isNaN(parseFloat(t.x))) && (a = 0), (isNaN(s) || isNaN(parseFloat(t.x2))) && (s = n), (isNaN(r) || isNaN(parseFloat(t.y))) && (r = 0), (isNaN(l) || isNaN(parseFloat(t.y2))) && (l = o), i = qM(i || 0), { width: Math.max(s - a - i[1] - i[3], 0), height: Math.max(l - r - i[0] - i[2], 0) } } function ca(t, e, i) { i = qM(i || 0); var n = e.width, o = e.height, a = Vo(t.left, n), r = Vo(t.top, o), s = Vo(t.right, n), l = Vo(t.bottom, o), u = Vo(t.width, n), h = Vo(t.height, o), c = i[2] + i[0], d = i[1] + i[3], f = t.aspect; switch (isNaN(u) && (u = n - s - d - a), isNaN(h) && (h = o - l - c - r), null != f && (isNaN(u) && isNaN(h) && (f > n / o ? u = .8 * n : h = .8 * o), isNaN(u) && (u = f * h), isNaN(h) && (h = u / f)), isNaN(a) && (a = n - s - u - d), isNaN(r) && (r = o - l - h - c), t.left || t.right) { case "center": a = n / 2 - u / 2 - i[3]; break; case "right": a = n - u - d }switch (t.top || t.bottom) { case "middle": case "center": r = o / 2 - h / 2 - i[0]; break; case "bottom": r = o - h - c }a = a || 0, r = r || 0, isNaN(u) && (u = n - d - a - (s || 0)), isNaN(h) && (h = o - c - r - (l || 0)); var p = new de(a + i[3], r + i[0], u, h); return p.margin = i, p } function da(t, e, i, n, o) { var a = !o || !o.hv || o.hv[0], s = !o || !o.hv || o.hv[1], l = o && o.boundingMode || "all"; if (a || s) { var u; if ("raw" === l) u = "group" === t.type ? new de(0, 0, +e.width || 0, +e.height || 0) : t.getBoundingRect(); else if (u = t.getBoundingRect(), t.needLocalTransform()) { var h = t.getLocalTransform(); (u = u.clone()).applyTransform(h) } e = ca(r({ width: u.width, height: u.height }, e), i, n); var c = t.position, d = a ? e.x - u.x : 0, f = s ? e.y - u.y : 0; t.attr("position", "raw" === l ? [d, f] : [c[0] + d, c[1] + f]) } } function fa(t, e) { return null != t[oI[e][0]] || null != t[oI[e][1]] && null != t[oI[e][2]] } function pa(t, e, i) { function n(i, n) { var r = {}, l = 0, u = {}, h = 0; if (iI(i, function (e) { u[e] = t[e] }), iI(i, function (t) { o(e, t) && (r[t] = u[t] = e[t]), a(r, t) && l++, a(u, t) && h++ }), s[n]) return a(e, i[1]) ? u[i[2]] = null : a(e, i[2]) && (u[i[1]] = null), u; if (2 !== h && l) { if (l >= 2) return r; for (var c = 0; c < i.length; c++) { var d = i[c]; if (!o(r, d) && o(t, d)) { r[d] = t[d]; break } } return r } return u } function o(t, e) { return t.hasOwnProperty(e) } function a(t, e) { return null != t[e] && "auto" !== t[e] } function r(t, e, i) { iI(t, function (t) { e[t] = i[t] }) } !w(i) && (i = {}); var s = i.ignoreSize; !y(s) && (s = [s, s]); var l = n(oI[0], 0), u = n(oI[1], 1); r(oI[0], t, l), r(oI[1], t, u) } function ga(t) { return ma({}, t) } function ma(t, e) { return e && t && iI(nI, function (i) { e.hasOwnProperty(i) && (t[i] = e[i]) }), t } function va(t, e) { for (var i = t.length, n = 0; n < i; n++)if (t[n].length > e) return t[n]; return t[i - 1] } function ya(t) { var e = t.get("coordinateSystem"), i = { coordSysName: e, coordSysDims: [], axisMap: R(), categoryAxisMap: R() }, n = fI[e]; if (n) return n(t, i, i.axisMap, i.categoryAxisMap), i } function xa(t) { return "category" === t.get("type") } function _a(t) { this.fromDataset = t.fromDataset, this.data = t.data || (t.sourceFormat === vI ? {} : []), this.sourceFormat = t.sourceFormat || yI, this.seriesLayoutBy = t.seriesLayoutBy || _I, this.dimensionsDefine = t.dimensionsDefine, this.encodeDefine = t.encodeDefine && R(t.encodeDefine), this.startIndex = t.startIndex || 0, this.dimensionsDetectCount = t.dimensionsDetectCount } function wa(t) { var e = t.option.source, i = yI; if (S(e)) i = xI; else if (y(e)) { 0 === e.length && (i = gI); for (var n = 0, o = e.length; n < o; n++) { var a = e[n]; if (null != a) { if (y(a)) { i = gI; break } if (w(a)) { i = mI; break } } } } else if (w(e)) { for (var r in e) if (e.hasOwnProperty(r) && c(e[r])) { i = vI; break } } else if (null != e) throw new Error("Invalid data"); bI(t).sourceFormat = i } function ba(t) { return bI(t).source } function Sa(t) { bI(t).datasetMap = R() } function Ma(t) { var e = t.option, i = e.data, n = S(i) ? xI : pI, o = !1, a = e.seriesLayoutBy, r = e.sourceHeader, s = e.dimensions, l = La(t); if (l) { var u = l.option; i = u.source, n = bI(l).sourceFormat, o = !0, a = a || u.seriesLayoutBy, null == r && (r = u.sourceHeader), s = s || u.dimensions } var h = Ia(i, n, a, r, s), c = e.encode; !c && l && (c = Ca(t, l, i, n, a, h)), bI(t).source = new _a({ data: i, fromDataset: o, seriesLayoutBy: a, sourceFormat: n, dimensionsDefine: h.dimensionsDefine, startIndex: h.startIndex, dimensionsDetectCount: h.dimensionsDetectCount, encodeDefine: c }) } function Ia(t, e, i, n, o) { if (!t) return { dimensionsDefine: Ta(o) }; var a, r, s; if (e === gI) "auto" === n || null == n ? Aa(function (t) { null != t && "-" !== t && (_(t) ? null == r && (r = 1) : r = 0) }, i, t, 10) : r = n ? 1 : 0, o || 1 !== r || (o = [], Aa(function (t, e) { o[e] = null != t ? t : "" }, i, t)), a = o ? o.length : i === wI ? t.length : t[0] ? t[0].length : null; else if (e === mI) o || (o = Da(t), s = !0); else if (e === vI) o || (o = [], s = !0, d(t, function (t, e) { o.push(e) })); else if (e === pI) { var l = Li(t[0]); a = y(l) && l.length || 1 } var u; return s && d(o, function (t, e) { "name" === (w(t) ? t.name : t) && (u = e) }), { startIndex: r, dimensionsDefine: Ta(o), dimensionsDetectCount: a, potentialNameDimIndex: u } } function Ta(t) { if (t) { var e = R(); return f(t, function (t, i) { if (null == (t = a({}, w(t) ? t : { name: t })).name) return t; t.name += "", null == t.displayName && (t.displayName = t.name); var n = e.get(t.name); return n ? t.name += "-" + n.count++ : e.set(t.name, { count: 1 }), t }) } } function Aa(t, e, i, n) { if (null == n && (n = 1 / 0), e === wI) for (a = 0; a < i.length && a < n; a++)t(i[a] ? i[a][0] : null, a); else for (var o = i[0] || [], a = 0; a < o.length && a < n; a++)t(o[a], a) } function Da(t) { for (var e, i = 0; i < t.length && !(e = t[i++]);); if (e) { var n = []; return d(e, function (t, e) { n.push(e) }), n } } function Ca(t, e, i, n, o, a) { var r = ya(t), s = {}, l = [], u = [], h = t.subType, c = R(["pie", "map", "funnel"]), f = R(["line", "bar", "pictorialBar", "scatter", "effectScatter", "candlestick", "boxplot"]); if (r && null != f.get(h)) { var p = t.ecModel, g = bI(p).datasetMap, m = e.uid + "_" + o, v = g.get(m) || g.set(m, { categoryWayDim: 1, valueWayDim: 0 }); d(r.coordSysDims, function (t) { if (null == r.firstCategoryDimIndex) { e = v.valueWayDim++; s[t] = e, u.push(e) } else if (r.categoryAxisMap.get(t)) s[t] = 0, l.push(0); else { var e = v.categoryWayDim++; s[t] = e, u.push(e) } }) } else if (null != c.get(h)) { for (var y, x = 0; x < 5 && null == y; x++)Pa(i, n, o, a.dimensionsDefine, a.startIndex, x) || (y = x); if (null != y) { s.value = y; var _ = a.potentialNameDimIndex || Math.max(y - 1, 0); u.push(_), l.push(_) } } return l.length && (s.itemName = l), u.length && (s.seriesName = u), s } function La(t) { var e = t.option; if (!e.data) return t.ecModel.getComponent("dataset", e.datasetIndex || 0) } function ka(t, e) { return Pa(t.data, t.sourceFormat, t.seriesLayoutBy, t.dimensionsDefine, t.startIndex, e) } function Pa(t, e, i, n, o, a) { function r(t) { return (null == t || !isFinite(t) || "" === t) && (!(!_(t) || "-" === t) || void 0) } var s; if (S(t)) return !1; var l; if (n && (l = w(l = n[a]) ? l.name : l), e === gI) if (i === wI) { for (var u = t[a], h = 0; h < (u || []).length && h < 5; h++)if (null != (s = r(u[o + h]))) return s } else for (h = 0; h < t.length && h < 5; h++) { var c = t[o + h]; if (c && null != (s = r(c[a]))) return s } else if (e === mI) { if (!l) return; for (h = 0; h < t.length && h < 5; h++)if ((d = t[h]) && null != (s = r(d[l]))) return s } else if (e === vI) { if (!l) return; if (!(u = t[l]) || S(u)) return !1; for (h = 0; h < u.length && h < 5; h++)if (null != (s = r(u[h]))) return s } else if (e === pI) for (h = 0; h < t.length && h < 5; h++) { var d = t[h], f = Li(d); if (!y(f)) return !1; if (null != (s = r(f[a]))) return s } return !1 } function Na(t, e) { if (e) { var i = e.seiresIndex, n = e.seriesId, o = e.seriesName; return null != i && t.componentIndex !== i || null != n && t.id !== n || null != o && t.name !== o } } function Oa(t, e) { var o = t.color && !t.colorLayer; d(e, function (e, a) { "colorLayer" === a && o || lI.hasClass(a) || ("object" == typeof e ? t[a] = t[a] ? n(t[a], e, !1) : i(e) : null == t[a] && (t[a] = e)) }) } function Ea(t) { t = t, this.option = {}, this.option[SI] = 1, this._componentsMap = R({ series: [] }), this._seriesIndices, this._seriesIndicesMap, Oa(t, this._theme.option), n(t, hI, !1), this.mergeOption(t) } function Ra(t, e) { y(e) || (e = e ? [e] : []); var i = {}; return d(e, function (e) { i[e] = (t.get(e) || []).slice() }), i } function za(t, e, i) { return e.type ? e.type : i ? i.subType : lI.determineSubType(t, e) } function Ba(t, e) { t._seriesIndicesMap = R(t._seriesIndices = f(e, function (t) { return t.componentIndex }) || []) } function Va(t, e) { return e.hasOwnProperty("subType") ? g(t, function (t) { return t.subType === e.subType }) : t } function Ga(t) { d(II, function (e) { this[e] = m(t[e], t) }, this) } function Fa() { this._coordinateSystems = [] } function Wa(t) { this._api = t, this._timelineOptions = [], this._mediaList = [], this._mediaDefault, this._currentMediaIndices = [], this._optionBackup, this._newBaseOption } function Ha(t, e, i) { var n, o, a = [], r = [], s = t.timeline; if (t.baseOption && (o = t.baseOption), (s || t.options) && (o = o || {}, a = (t.options || []).slice()), t.media) { o = o || {}; var l = t.media; AI(l, function (t) { t && t.option && (t.query ? r.push(t) : n || (n = t)) }) } return o || (o = t), o.timeline || (o.timeline = s), AI([o].concat(a).concat(f(r, function (t) { return t.option })), function (t) { AI(e, function (e) { e(t, i) }) }), { baseOption: o, timelineOptions: a, mediaDefault: n, mediaList: r } } function Za(t, e, i) { var n = { width: e, height: i, aspectratio: e / i }, o = !0; return d(t, function (t, e) { var i = e.match(kI); if (i && i[1] && i[2]) { var a = i[1], r = i[2].toLowerCase(); Ua(n[r], t, a) || (o = !1) } }), o } function Ua(t, e, i) { return "min" === i ? t >= e : "max" === i ? t <= e : t === e } function Xa(t, e) { return t.join(",") === e.join(",") } function ja(t, e) { AI(e = e || {}, function (e, i) { if (null != e) { var n = t[i]; if (lI.hasClass(i)) { e = Di(e); var o = Pi(n = Di(n), e); t[i] = CI(o, function (t) { return t.option && t.exist ? LI(t.exist, t.option, !0) : t.exist || t.option }) } else t[i] = LI(n, e, !0) } }) } function Ya(t) { var e = t && t.itemStyle; if (e) for (var i = 0, o = OI.length; i < o; i++) { var a = OI[i], r = e.normal, s = e.emphasis; r && r[a] && (t[a] = t[a] || {}, t[a].normal ? n(t[a].normal, r[a]) : t[a].normal = r[a], r[a] = null), s && s[a] && (t[a] = t[a] || {}, t[a].emphasis ? n(t[a].emphasis, s[a]) : t[a].emphasis = s[a], s[a] = null) } } function qa(t, e, i) { if (t && t[e] && (t[e].normal || t[e].emphasis)) { var n = t[e].normal, o = t[e].emphasis; n && (i ? (t[e].normal = t[e].emphasis = null, r(t[e], n)) : t[e] = n), o && (t.emphasis = t.emphasis || {}, t.emphasis[e] = o) } } function Ka(t) { qa(t, "itemStyle"), qa(t, "lineStyle"), qa(t, "areaStyle"), qa(t, "label"), qa(t, "labelLine"), qa(t, "upperLabel"), qa(t, "edgeLabel") } function $a(t, e) { var i = NI(t) && t[e], n = NI(i) && i.textStyle; if (n) for (var o = 0, a = Yb.length; o < a; o++) { var e = Yb[o]; n.hasOwnProperty(e) && (i[e] = n[e]) } } function Ja(t) { t && (Ka(t), $a(t, "label"), t.emphasis && $a(t.emphasis, "label")) } function Qa(t) { if (NI(t)) { Ya(t), Ka(t), $a(t, "label"), $a(t, "upperLabel"), $a(t, "edgeLabel"), t.emphasis && ($a(t.emphasis, "label"), $a(t.emphasis, "upperLabel"), $a(t.emphasis, "edgeLabel")); var e = t.markPoint; e && (Ya(e), Ja(e)); var i = t.markLine; i && (Ya(i), Ja(i)); var n = t.markArea; n && Ja(n); var o = t.data; if ("graph" === t.type) { o = o || t.nodes; var a = t.links || t.edges; if (a && !S(a)) for (s = 0; s < a.length; s++)Ja(a[s]); d(t.categories, function (t) { Ka(t) }) } if (o && !S(o)) for (s = 0; s < o.length; s++)Ja(o[s]); if ((e = t.markPoint) && e.data) for (var r = e.data, s = 0; s < r.length; s++)Ja(r[s]); if ((i = t.markLine) && i.data) for (var l = i.data, s = 0; s < l.length; s++)y(l[s]) ? (Ja(l[s][0]), Ja(l[s][1])) : Ja(l[s]); "gauge" === t.type ? ($a(t, "axisLabel"), $a(t, "title"), $a(t, "detail")) : "treemap" === t.type ? (qa(t.breadcrumb, "itemStyle"), d(t.levels, function (t) { Ka(t) })) : "tree" === t.type && Ka(t.leaves) } } function tr(t) { return y(t) ? t : t ? [t] : [] } function er(t) { return (y(t) ? t[0] : t) || {} } function ir(t, e) { e = e.split(","); for (var i = t, n = 0; n < e.length && null != (i = i && i[e[n]]); n++); return i } function nr(t, e, i, n) { e = e.split(","); for (var o, a = t, r = 0; r < e.length - 1; r++)null == a[o = e[r]] && (a[o] = {}), a = a[o]; (n || null == a[e[r]]) && (a[e[r]] = i) } function or(t) { d(RI, function (e) { e[0] in t && !(e[1] in t) && (t[e[1]] = t[e[0]]) }) } function ar(t) { d(t, function (e, i) { var n = [], o = [NaN, NaN], a = [e.stackResultDimension, e.stackedOverDimension], r = e.data, s = e.isStackedByIndex, l = r.map(a, function (a, l, u) { var h = r.get(e.stackedDimension, u); if (isNaN(h)) return o; var c, d; s ? d = r.getRawIndex(u) : c = r.get(e.stackedByDimension, u); for (var f = NaN, p = i - 1; p >= 0; p--) { var g = t[p]; if (s || (d = g.data.rawIndexOf(g.stackedByDimension, c)), d >= 0) { var m = g.data.getByRawIndex(g.stackResultDimension, d); if (h >= 0 && m > 0 || h <= 0 && m < 0) { h += m, f = m; break } } } return n[0] = h, n[1] = f, n }); r.hostModel.setData(l), e.data = l }) } function rr(t, e) { _a.isInstance(t) || (t = _a.seriesDataToSource(t)), this._source = t; var i = this._data = t.data, n = t.sourceFormat; n === xI && (this._offset = 0, this._dimSize = e, this._data = i), a(this, GI[n === gI ? n + "_" + t.seriesLayoutBy : n]) } function sr() { return this._data.length } function lr(t) { return this._data[t] } function ur(t) { for (var e = 0; e < t.length; e++)this._data.push(t[e]) } function hr(t, e, i, n) { return null != i ? t[i] : t } function cr(t, e, i, n) { return dr(t[n], this._dimensionInfos[e]) } function dr(t, e) { var i = e && e.type; if ("ordinal" === i) { var n = e && e.ordinalMeta; return n ? n.parseAndCollect(t) : t } return "time" === i && "number" != typeof t && null != t && "-" !== t && (t = +Yo(t)), null == t || "" === t ? NaN : +t } function fr(t, e, i) { if (t) { var n = t.getRawDataItem(e); if (null != n) { var o, a, r = t.getProvider().getSource().sourceFormat, s = t.getDimensionInfo(i); return s && (o = s.name, a = s.index), FI[r](n, e, a, o) } } } function pr(t, e, i) { if (t) { var n = t.getProvider().getSource().sourceFormat; if (n === pI || n === mI) { var o = t.getRawDataItem(e); return n !== pI || w(o) || (o = null), o ? o[i] : void 0 } } } function gr(t) { return new mr(t) } function mr(t) { t = t || {}, this._reset = t.reset, this._plan = t.plan, this._count = t.count, this._onDirty = t.onDirty, this._dirty = !0, this.context } function vr(t, e, i, n, o, a) { XI.reset(i, n, o, a), t._callingProgress = e, t._callingProgress({ start: i, end: n, count: n - i, next: XI.next }, t.context) } function yr(t, e) { t._dueIndex = t._outputDueEnd = t._dueEnd = 0, t._settedOutputEnd = null; var i, n; !e && t._reset && ((i = t._reset(t.context)) && i.progress && (n = i.forceFirstProgress, i = i.progress), y(i) && !i.length && (i = null)), t._progress = i, t._modBy = t._modDataCount = null; var o = t._downstream; return o && o.dirty(), n } function xr(t) { var e = t.name; Oi(t) || (t.name = _r(t) || e) } function _r(t) { var e = t.getRawData(), i = []; return d(e.mapDimension("seriesName", !0), function (t) { var n = e.getDimensionInfo(t); n.displayName && i.push(n.displayName) }), i.join(" ") } function wr(t) { return t.model.getRawData().count() } function br(t) { var e = t.model; return e.setData(e.getRawData().cloneShallow()), Sr } function Sr(t, e) { t.end > e.outputData.count() && e.model.getRawData().cloneShallow(e.outputData) } function Mr(t, e) { d(t.CHANGABLE_METHODS, function (i) { t.wrapMethod(i, v(Ir, e)) }) } function Ir(t) { var e = Tr(t); e && e.setOutputEnd(this.count()) } function Tr(t) { var e = (t.ecModel || {}).scheduler, i = e && e.getPipeline(t.uid); if (i) { var n = i.currentTask; if (n) { var o = n.agentStubMap; o && (n = o.get(t.uid)) } return n } } function Ar() { this.group = new tb, this.uid = Ro("viewChart"), this.renderTask = gr({ plan: Lr, reset: kr }), this.renderTask.context = { view: this } } function Dr(t, e) { if (t && (t.trigger(e), "group" === t.type)) for (var i = 0; i < t.childCount(); i++)Dr(t.childAt(i), e) } function Cr(t, e, i) { var n = zi(t, e); null != n ? d(Di(n), function (e) { Dr(t.getItemGraphicEl(e), i) }) : t.eachItemGraphicEl(function (t) { Dr(t, i) }) } function Lr(t) { return QI(t.model) } function kr(t) { var e = t.model, i = t.ecModel, n = t.api, o = t.payload, a = e.pipelineContext.progressiveRender, r = t.view, s = o && JI(o).updateMethod, l = a ? "incrementalPrepareRender" : s && r[s] ? s : "render"; return "render" !== l && r[l](e, i, n, o), eT[l] } function Pr(t, e, i) { function n() { h = (new Date).getTime(), c = null, t.apply(r, s || []) } var o, a, r, s, l, u = 0, h = 0, c = null; e = e || 0; var d = function () { o = (new Date).getTime(), r = this, s = arguments; var t = l || e, d = l || i; l = null, a = o - (d ? u : h) - t, clearTimeout(c), d ? c = setTimeout(n, t) : a >= 0 ? n() : c = setTimeout(n, -a), u = o }; return d.clear = function () { c && (clearTimeout(c), c = null) }, d.debounceNextCall = function (t) { l = t }, d } function Nr(t, e, i, n) { var o = t[e]; if (o) { var a = o[iT] || o, r = o[oT]; if (o[nT] !== i || r !== n) { if (null == i || !n) return t[e] = a; (o = t[e] = Pr(a, i, "debounce" === n))[iT] = a, o[oT] = n, o[nT] = i } return o } } function Or(t, e) { var i = t[e]; i && i[iT] && (t[e] = i[iT]) } function Er(t, e, i, n) { this.ecInstance = t, this.api = e, this.unfinished; var i = this._dataProcessorHandlers = i.slice(), n = this._visualHandlers = n.slice(); this._allHandlers = i.concat(n), this._stageTaskMap = R() } function Rr(t, e, i, n, o) { function a(t, e) { return t.setDirty && (!t.dirtyMap || t.dirtyMap.get(e.__pipeline.id)) } o = o || {}; var r; d(e, function (e, s) { if (!o.visualType || o.visualType === e.visualType) { var l = t._stageTaskMap.get(e.uid), u = l.seriesTaskMap, h = l.overallTask; if (h) { var c, d = h.agentStubMap; d.each(function (t) { a(o, t) && (t.dirty(), c = !0) }), c && h.dirty(), hT(h, n); var f = t.getPerformArgs(h, o.block); d.each(function (t) { t.perform(f) }), r |= h.perform(f) } else u && u.each(function (s, l) { a(o, s) && s.dirty(); var u = t.getPerformArgs(s, o.block); u.skip = !e.performRawSeries && i.isSeriesFiltered(s.context.model), hT(s, n), r |= s.perform(u) }) } }), t.unfinished |= r } function zr(t, e, i, n, o) { function a(i) { var a = i.uid, s = r.get(a) || r.set(a, gr({ plan: Hr, reset: Zr, count: Xr })); s.context = { model: i, ecModel: n, api: o, useClearVisual: e.isVisual && !e.isLayout, plan: e.plan, reset: e.reset, scheduler: t }, jr(t, i, s) } var r = i.seriesTaskMap || (i.seriesTaskMap = R()), s = e.seriesType, l = e.getTargetSeries; e.createOnAllSeries ? n.eachRawSeries(a) : s ? n.eachRawSeriesByType(s, a) : l && l(n, o).each(a); var u = t._pipelineMap; r.each(function (t, e) { u.get(e) || (t.dispose(), r.removeKey(e)) }) } function Br(t, e, i, n, o) { function a(e) { var i = e.uid, n = s.get(i); n || (n = s.set(i, gr({ reset: Gr, onDirty: Wr })), r.dirty()), n.context = { model: e, overallProgress: h, modifyOutputEnd: c }, n.agent = r, n.__block = h, jr(t, e, n) } var r = i.overallTask = i.overallTask || gr({ reset: Vr }); r.context = { ecModel: n, api: o, overallReset: e.overallReset, scheduler: t }; var s = r.agentStubMap = r.agentStubMap || R(), l = e.seriesType, u = e.getTargetSeries, h = !0, c = e.modifyOutputEnd; l ? n.eachRawSeriesByType(l, a) : u ? u(n, o).each(a) : (h = !1, d(n.getSeries(), a)); var f = t._pipelineMap; s.each(function (t, e) { f.get(e) || (t.dispose(), r.dirty(), s.removeKey(e)) }) } function Vr(t) { t.overallReset(t.ecModel, t.api, t.payload) } function Gr(t, e) { return t.overallProgress && Fr } function Fr() { this.agent.dirty(), this.getDownstream().dirty() } function Wr() { this.agent && this.agent.dirty() } function Hr(t) { return t.plan && t.plan(t.model, t.ecModel, t.api, t.payload) } function Zr(t) { t.useClearVisual && t.data.clearAllVisual(); var e = t.resetDefines = Di(t.reset(t.model, t.ecModel, t.api, t.payload)); return e.length > 1 ? f(e, function (t, e) { return Ur(e) }) : cT } function Ur(t) { return function (e, i) { var n = i.data, o = i.resetDefines[t]; if (o && o.dataEach) for (var a = e.start; a < e.end; a++)o.dataEach(n, a); else o && o.progress && o.progress(e, n) } } function Xr(t) { return t.data.count() } function jr(t, e, i) { var n = e.uid, o = t._pipelineMap.get(n); !o.head && (o.head = i), o.tail && o.tail.pipe(i), o.tail = i, i.__idxInPipeline = o.count++, i.__pipeline = o } function Yr(t) { dT = null; try { t(fT, pT) } catch (t) { } return dT } function qr(t, e) { for (var i in e.prototype) t[i] = B } function Kr(t) { for (_(t) && (t = (new DOMParser).parseFromString(t, "text/xml")), 9 === t.nodeType && (t = t.firstChild); "svg" !== t.nodeName.toLowerCase() || 1 !== t.nodeType;)t = t.nextSibling; return t } function $r() { this._defs = {}, this._root = null, this._isDefine = !1, this._isText = !1 } function Jr(t, e) { for (var i = t.firstChild; i;) { if (1 === i.nodeType) { var n = i.getAttribute("offset"); n = n.indexOf("%") > 0 ? parseInt(n, 10) / 100 : n ? parseFloat(n) : 0; var o = i.getAttribute("stop-color") || "#000000"; e.addColorStop(n, o) } i = i.nextSibling } } function Qr(t, e) { t && t.__inheritedStyle && (e.__inheritedStyle || (e.__inheritedStyle = {}), r(e.__inheritedStyle, t.__inheritedStyle)) } function ts(t) { for (var e = P(t).split(_T), i = [], n = 0; n < e.length; n += 2) { var o = parseFloat(e[n]), a = parseFloat(e[n + 1]); i.push([o, a]) } return i } function es(t, e, i, n) { var o = e.__inheritedStyle || {}, r = "text" === e.type; if (1 === t.nodeType && (ns(t, e), a(o, os(t)), !n)) for (var s in ST) if (ST.hasOwnProperty(s)) { var l = t.getAttribute(s); null != l && (o[ST[s]] = l) } var u = r ? "textFill" : "fill", h = r ? "textStroke" : "stroke"; e.style = e.style || new ub; var c = e.style; null != o.fill && c.set(u, is(o.fill, i)), null != o.stroke && c.set(h, is(o.stroke, i)), d(["lineWidth", "opacity", "fillOpacity", "strokeOpacity", "miterLimit", "fontSize"], function (t) { var e = "lineWidth" === t && r ? "textStrokeWidth" : t; null != o[t] && c.set(e, parseFloat(o[t])) }), o.textBaseline && "auto" !== o.textBaseline || (o.textBaseline = "alphabetic"), "alphabetic" === o.textBaseline && (o.textBaseline = "bottom"), "start" === o.textAlign && (o.textAlign = "left"), "end" === o.textAlign && (o.textAlign = "right"), d(["lineDashOffset", "lineCap", "lineJoin", "fontWeight", "fontFamily", "fontStyle", "textAlign", "textBaseline"], function (t) { null != o[t] && c.set(t, o[t]) }), o.lineDash && (e.style.lineDash = P(o.lineDash).split(_T)), c[h] && "none" !== c[h] && (e[h] = !0), e.__inheritedStyle = o } function is(t, e) { var i = e && t && t.match(MT); return i ? e[P(i[1])] : t } function ns(t, e) { var i = t.getAttribute("transform"); if (i) { var n = null, o = []; (i = i.replace(/,/g, " ")).replace(IT, function (t, e, i) { o.push(e, i) }); for (var a = o.length - 1; a > 0; a -= 2) { var r = o[a], s = o[a - 1]; switch (n = n || xt(), s) { case "translate": r = P(r).split(_T), St(n, n, [parseFloat(r[0]), parseFloat(r[1] || 0)]); break; case "scale": r = P(r).split(_T), It(n, n, [parseFloat(r[0]), parseFloat(r[1] || r[0])]); break; case "rotate": r = P(r).split(_T), Mt(n, n, parseFloat(r[0])); break; case "skew": r = P(r).split(_T), console.warn("Skew transform is not supported yet"); break; case "matrix": r = P(r).split(_T); n[0] = parseFloat(r[0]), n[1] = parseFloat(r[1]), n[2] = parseFloat(r[2]), n[3] = parseFloat(r[3]), n[4] = parseFloat(r[4]), n[5] = parseFloat(r[5]) } } e.setLocalTransform(n) } } function os(t) { var e = t.getAttribute("style"), i = {}; if (!e) return i; var n = {}; TT.lastIndex = 0; for (var o; null != (o = TT.exec(e));)n[o[1]] = o[2]; for (var a in ST) ST.hasOwnProperty(a) && null != n[a] && (i[ST[a]] = n[a]); return i } function as(t, e, i) { var n = e / t.width, o = i / t.height, a = Math.min(n, o); return { scale: [a, a], position: [-(t.x + t.width / 2) * a + e / 2, -(t.y + t.height / 2) * a + i / 2] } } function rs(t, e) { return (new $r).parse(t, e) } function ss(t) { return function (e, i, n) { e = e && e.toLowerCase(), fw.prototype[t].call(this, e, i, n) } } function ls() { fw.call(this) } function us(t, e, n) { function o(t, e) { return t.__prio - e.__prio } n = n || {}, "string" == typeof e && (e = JT[e]), this.id, this.group, this._dom = t; var a = this._zr = Ii(t, { renderer: n.renderer || "canvas", devicePixelRatio: n.devicePixelRatio, width: n.width, height: n.height }); this._throttledZrFlush = Pr(m(a.flush, a), 17), (e = i(e)) && BI(e, !0), this._theme = e, this._chartsViews = [], this._chartsMap = {}, this._componentsViews = [], this._componentsMap = {}, this._coordSysMgr = new Fa; var r = this._api = As(this); _e($T, o), _e(YT, o), this._scheduler = new Er(this, r, YT, $T), fw.call(this, this._ecEventProcessor = new Ds), this._messageCenter = new ls, this._initEvents(), this.resize = m(this.resize, this), this._pendingActions = [], a.animation.on("frame", this._onframe, this), vs(a, this), N(this) } function hs(t, e, i) { var n, o = this._model, a = this._coordSysMgr.getCoordinateSystems(); e = Vi(o, e); for (var r = 0; r < a.length; r++) { var s = a[r]; if (s[t] && null != (n = s[t](o, e, i))) return n } } function cs(t) { var e = t._model, i = t._scheduler; i.restorePipelines(e), i.prepareStageTasks(), ys(t, "component", e, i), ys(t, "chart", e, i), i.plan() } function ds(t, e, i, n, o) { function a(n) { n && n.__alive && n[e] && n[e](n.__model, r, t._api, i) } var r = t._model; if (n) { var s = {}; s[n + "Id"] = i[n + "Id"], s[n + "Index"] = i[n + "Index"], s[n + "Name"] = i[n + "Name"]; var l = { mainType: n, query: s }; o && (l.subType = o); var u = i.excludeSeriesId; null != u && (u = R(Di(u))), r && r.eachComponent(l, function (e) { u && null != u.get(e.id) || a(t["series" === n ? "_chartsMap" : "_componentsMap"][e.__viewId]) }, t) } else kT(t._componentsViews.concat(t._chartsViews), a) } function fs(t, e) { var i = t._chartsMap, n = t._scheduler; e.eachSeries(function (t) { n.updateStreamModes(t, i[t.__viewId]) }) } function ps(t, e) { var i = t.type, n = t.escapeConnect, o = XT[i], s = o.actionInfo, l = (s.update || "update").split(":"), u = l.pop(); l = null != l[0] && OT(l[0]), this[GT] = !0; var h = [t], c = !1; t.batch && (c = !0, h = f(t.batch, function (e) { return e = r(a({}, e), t), e.batch = null, e })); var d, p = [], g = "highlight" === i || "downplay" === i; kT(h, function (t) { d = o.action(t, this._model, this._api), (d = d || a({}, t)).type = s.event || d.type, p.push(d), g ? ds(this, u, t, "series") : l && ds(this, u, t, l.main, l.sub) }, this), "none" === u || g || l || (this[FT] ? (cs(this), ZT.update.call(this, t), this[FT] = !1) : ZT[u].call(this, t)), d = c ? { type: s.event || i, escapeConnect: n, batch: p } : p[0], this[GT] = !1, !e && this._messageCenter.trigger(d.type, d) } function gs(t) { for (var e = this._pendingActions; e.length;) { var i = e.shift(); ps.call(this, i, t) } } function ms(t) { !t && this.trigger("updated") } function vs(t, e) { t.on("rendered", function () { e.trigger("rendered"), !t.animation.isFinished() || e[FT] || e._scheduler.unfinished || e._pendingActions.length || e.trigger("finished") }) } function ys(t, e, i, n) { function o(t) { var e = "_ec_" + t.id + "_" + t.type, o = s[e]; if (!o) { var h = OT(t.type); (o = new (a ? qI.getClass(h.main, h.sub) : Ar.getClass(h.sub))).init(i, u), s[e] = o, r.push(o), l.add(o.group) } t.__viewId = o.__id = e, o.__alive = !0, o.__model = t, o.group.__ecComponentInfo = { mainType: t.mainType, index: t.componentIndex }, !a && n.prepareView(o, t, i, u) } for (var a = "component" === e, r = a ? t._componentsViews : t._chartsViews, s = a ? t._componentsMap : t._chartsMap, l = t._zr, u = t._api, h = 0; h < r.length; h++)r[h].__alive = !1; a ? i.eachComponent(function (t, e) { "series" !== t && o(e) }) : i.eachSeries(o); for (h = 0; h < r.length;) { var c = r[h]; c.__alive ? h++ : (!a && c.renderTask.dispose(), l.remove(c.group), c.dispose(i, u), r.splice(h, 1), delete s[c.__id], c.__id = c.group.__ecComponentInfo = null) } } function xs(t) { t.clearColorPalette(), t.eachSeries(function (t) { t.clearColorPalette() }) } function _s(t, e, i, n) { ws(t, e, i, n), kT(t._chartsViews, function (t) { t.__alive = !1 }), bs(t, e, i, n), kT(t._chartsViews, function (t) { t.__alive || t.remove(e, i) }) } function ws(t, e, i, n, o) { kT(o || t._componentsViews, function (t) { var o = t.__model; t.render(o, e, i, n), Ts(o, t) }) } function bs(t, e, i, n, o) { var a, r = t._scheduler; e.eachSeries(function (e) { var i = t._chartsMap[e.__viewId]; i.__alive = !0; var s = i.renderTask; r.updatePayload(s, n), o && o.get(e.uid) && s.dirty(), a |= s.perform(r.getPerformArgs(s)), i.group.silent = !!e.get("silent"), Ts(e, i), Is(e, i) }), r.unfinished |= a, Ms(t._zr, e), sT(t._zr.dom, e) } function Ss(t, e) { kT(KT, function (i) { i(t, e) }) } function Ms(t, e) { var i = t.storage, n = 0; i.traverse(function (t) { t.isGroup || n++ }), n > e.get("hoverLayerThreshold") && !U_.node && i.traverse(function (t) { t.isGroup || (t.useHoverLayer = !0) }) } function Is(t, e) { var i = t.get("blendMode") || null; e.group.traverse(function (t) { t.isGroup || t.style.blend !== i && t.setStyle("blend", i), t.eachPendingDisplayable && t.eachPendingDisplayable(function (t) { t.setStyle("blend", i) }) }) } function Ts(t, e) { var i = t.get("z"), n = t.get("zlevel"); e.group.traverse(function (t) { "group" !== t.type && (null != i && (t.z = i), null != n && (t.zlevel = n)) }) } function As(t) { var e = t._coordSysMgr; return a(new Ga(t), { getCoordinateSystems: m(e.getCoordinateSystems, e), getComponentByElement: function (e) { for (; e;) { var i = e.__ecComponentInfo; if (null != i) return t._model.getComponent(i.mainType, i.index); e = e.parent } } }) } function Ds() { this.eventInfo } function Cs(t) { function e(t, e) { for (var n = 0; n < t.length; n++)t[n][i] = e } var i = "__connectUpdateStatus"; kT(jT, function (n, o) { t._messageCenter.on(o, function (n) { if (eA[t.group] && 0 !== t[i]) { if (n && n.escapeConnect) return; var o = t.makeActionFromEvent(n), a = []; kT(tA, function (e) { e !== t && e.group === t.group && a.push(e) }), e(a, 0), kT(a, function (t) { 1 !== t[i] && t.dispatchAction(o) }), e(a, 2) } }) }) } function Ls(t) { eA[t] = !1 } function ks(t) { return tA[Wi(t, oA)] } function Ps(t, e) { JT[t] = e } function Ns(t) { qT.push(t) } function Os(t, e) { Vs(YT, t, e, RT) } function Es(t, e, i) { "function" == typeof e && (i = e, e = ""); var n = NT(t) ? t.type : [t, t = { event: e }][0]; t.event = (t.event || n).toLowerCase(), e = t.event, LT(WT.test(n) && WT.test(e)), XT[n] || (XT[n] = { action: i, actionInfo: t }), jT[e] = n } function Rs(t, e) { Fa.register(t, e) } function zs(t, e) { Vs($T, t, e, zT, "layout") } function Bs(t, e) { Vs($T, t, e, BT, "visual") } function Vs(t, e, i, n, o) { (PT(e) || NT(e)) && (i = e, e = n); var a = Er.wrapStageHandler(i, o); return a.__prio = e, a.__raw = i, t.push(a), a } function Gs(t, e) { QT[t] = e } function Fs(t) { return lI.extend(t) } function Ws(t) { return qI.extend(t) } function Hs(t) { return YI.extend(t) } function Zs(t) { return Ar.extend(t) } function Us(t) { return t } function Xs(t, e, i, n, o) { this._old = t, this._new = e, this._oldKeyGetter = i || Us, this._newKeyGetter = n || Us, this.context = o } function js(t, e, i, n, o) { for (var a = 0; a < t.length; a++) { var r = "_ec_" + o[n](t[a], a), s = e[r]; null == s ? (i.push(r), e[r] = a) : (s.length || (e[r] = s = [s]), s.push(a)) } } function Ys(t) { var e = {}, i = e.encode = {}, n = R(), o = [], a = []; d(t.dimensions, function (e) { var r = t.getDimensionInfo(e), s = r.coordDim; if (s) { var l = i[s]; i.hasOwnProperty(s) || (l = i[s] = []), l[r.coordDimIndex] = e, r.isExtraCoord || (n.set(s, 1), Ks(r.type) && (o[0] = e)), r.defaultTooltip && a.push(e) } sA.each(function (t, e) { var n = i[e]; i.hasOwnProperty(e) || (n = i[e] = []); var o = r.otherDims[e]; null != o && !1 !== o && (n[o] = r.name) }) }); var r = [], s = {}; n.each(function (t, e) { var n = i[e]; s[e] = n[0], r = r.concat(n) }), e.dataDimsOnCoord = r, e.encodeFirstDimNotExtra = s; var l = i.label; l && l.length && (o = l.slice()); var u = i.tooltip; return u && u.length ? a = u.slice() : a.length || (a = o.slice()), i.defaultedLabel = o, i.defaultedTooltip = a, e } function qs(t) { return "category" === t ? "ordinal" : "time" === t ? "time" : "float" } function Ks(t) { return !("ordinal" === t || "time" === t) } function $s(t) { return t._rawCount > 65535 ? dA : pA } function Js(t) { var e = t.constructor; return e === Array ? t.slice() : new e(t) } function Qs(t, e) { d(gA.concat(e.__wrappedMethods || []), function (i) { e.hasOwnProperty(i) && (t[i] = e[i]) }), t.__wrappedMethods = e.__wrappedMethods, d(mA, function (n) { t[n] = i(e[n]) }), t._calculationInfo = a(e._calculationInfo) } function tl(t, e, i, n, o) { var a = cA[e.type], r = n - 1, s = e.name, l = t[s][r]; if (l && l.length < i) { for (var u = new a(Math.min(o - r * i, i)), h = 0; h < l.length; h++)u[h] = l[h]; t[s][r] = u } for (var c = n * i; c < o; c += i)t[s].push(new a(Math.min(o - c, i))) } function el(t) { var e = t._invertedIndicesMap; d(e, function (i, n) { var o = t._dimensionInfos[n].ordinalMeta; if (o) { i = e[n] = new fA(o.categories.length); for (a = 0; a < i.length; a++)i[a] = uA; for (var a = 0; a < t._count; a++)i[t.get(n, a)] = a } }) } function il(t, e, i) { var n; if (null != e) { var o = t._chunkSize, a = Math.floor(i / o), r = i % o, s = t.dimensions[e], l = t._storage[s][a]; if (l) { n = l[r]; var u = t._dimensionInfos[s].ordinalMeta; u && u.categories.length && (n = u.categories[n]) } } return n } function nl(t) { return t } function ol(t) { return t < this._count && t >= 0 ? this._indices[t] : -1 } function al(t, e) { var i = t._idList[e]; return null == i && (i = il(t, t._idDimIdx, e)), null == i && (i = hA + e), i } function rl(t) { return y(t) || (t = [t]), t } function sl(t, e) { var i = t.dimensions, n = new vA(f(i, t.getDimensionInfo, t), t.hostModel); Qs(n, t); for (var o = n._storage = {}, a = t._storage, r = 0; r < i.length; r++) { var s = i[r]; a[s] && (l(e, s) >= 0 ? (o[s] = ll(a[s]), n._rawExtent[s] = ul(), n._extent[s] = null) : o[s] = a[s]) } return n } function ll(t) { for (var e = new Array(t.length), i = 0; i < t.length; i++)e[i] = Js(t[i]); return e } function ul() { return [1 / 0, -1 / 0] } function hl(t, e, n) { function o(t, e, i) { null != sA.get(e) ? t.otherDims[e] = i : (t.coordDim = e, t.coordDimIndex = i, h.set(e, !0)) } _a.isInstance(e) || (e = _a.seriesDataToSource(e)), n = n || {}, t = (t || []).slice(); for (var s = (n.dimsDef || []).slice(), l = R(n.encodeDef), u = R(), h = R(), c = [], f = cl(e, t, s, n.dimCount), p = 0; p < f; p++) { var g = s[p] = a({}, w(s[p]) ? s[p] : { name: s[p] }), m = g.name, v = c[p] = { otherDims: {} }; null != m && null == u.get(m) && (v.name = v.displayName = m, u.set(m, p)), null != g.type && (v.type = g.type), null != g.displayName && (v.displayName = g.displayName) } l.each(function (t, e) { if (1 === (t = Di(t).slice()).length && t[0] < 0) l.set(e, !1); else { var i = l.set(e, []); d(t, function (t, n) { _(t) && (t = u.get(t)), null != t && t < f && (i[n] = t, o(c[t], e, n)) }) } }); var y = 0; d(t, function (t, e) { var n, t, a, s; if (_(t)) n = t, t = {}; else { n = t.name; var u = t.ordinalMeta; t.ordinalMeta = null, (t = i(t)).ordinalMeta = u, a = t.dimsDef, s = t.otherDims, t.name = t.coordDim = t.coordDimIndex = t.dimsDef = t.otherDims = null } var h = l.get(n); if (!1 !== h) { if (!(h = Di(h)).length) for (var f = 0; f < (a && a.length || 1); f++) { for (; y < c.length && null != c[y].coordDim;)y++; y < c.length && h.push(y++) } d(h, function (e, i) { var l = c[e]; if (o(r(l, t), n, i), null == l.name && a) { var u = a[i]; !w(u) && (u = { name: u }), l.name = l.displayName = u.name, l.defaultTooltip = u.defaultTooltip } s && r(l.otherDims, s) }) } }); var x = n.generateCoord, b = n.generateCoordCount, S = null != b; b = x ? b || 1 : 0; for (var M = x || "value", I = 0; I < f; I++)null == (v = c[I] = c[I] || {}).coordDim && (v.coordDim = dl(M, h, S), v.coordDimIndex = 0, (!x || b <= 0) && (v.isExtraCoord = !0), b--), null == v.name && (v.name = dl(v.coordDim, u)), null == v.type && ka(e, I, v.name) && (v.type = "ordinal"); return c } function cl(t, e, i, n) { var o = Math.max(t.dimensionsDetectCount || 1, e.length, i.length, n || 0); return d(e, function (t) { var e = t.dimsDef; e && (o = Math.max(o, e.length)) }), o } function dl(t, e, i) { if (i || null != e.get(t)) { for (var n = 0; null != e.get(t + n);)n++; t += n } return e.set(t, !0), t } function fl(t, e, i) { var n, o, a, r, s = (i = i || {}).byIndex, l = i.stackedCoordDimension, u = !(!t || !t.get("stack")); if (d(e, function (t, i) { _(t) && (e[i] = t = { name: t }), u && !t.isExtraCoord && (s || n || !t.ordinalMeta || (n = t), o || "ordinal" === t.type || "time" === t.type || l && l !== t.coordDim || (o = t)) }), !o || s || n || (s = !0), o) { a = "__\0ecstackresult", r = "__\0ecstackedover", n && (n.createInvertedIndices = !0); var h = o.coordDim, c = o.type, f = 0; d(e, function (t) { t.coordDim === h && f++ }), e.push({ name: a, coordDim: h, coordDimIndex: f, type: c, isExtraCoord: !0, isCalculationCoord: !0 }), f++, e.push({ name: r, coordDim: r, coordDimIndex: f, type: c, isExtraCoord: !0, isCalculationCoord: !0 }) } return { stackedDimension: o && o.name, stackedByDimension: n && n.name, isStackedByIndex: s, stackedOverDimension: r, stackResultDimension: a } } function pl(t, e) { return !!e && e === t.getCalculationInfo("stackedDimension") } function gl(t, e) { return pl(t, e) ? t.getCalculationInfo("stackResultDimension") : e } function ml(t, e, i) { i = i || {}, _a.isInstance(t) || (t = _a.seriesDataToSource(t)); var n, o = e.get("coordinateSystem"), a = Fa.get(o), r = ya(e); r && (n = f(r.coordSysDims, function (t) { var e = { name: t }, i = r.axisMap.get(t); if (i) { var n = i.get("type"); e.type = qs(n) } return e })), n || (n = a && (a.getDimensionsInfo ? a.getDimensionsInfo() : a.dimensions.slice()) || ["x", "y"]); var s, l, u = _A(t, { coordDimensions: n, generateCoord: i.generateCoord }); r && d(u, function (t, e) { var i = t.coordDim, n = r.categoryAxisMap.get(i); n && (null == s && (s = e), t.ordinalMeta = n.getOrdinalMeta()), null != t.otherDims.itemName && (l = !0) }), l || null == s || (u[s].otherDims.itemName = 0); var h = fl(e, u), c = new vA(u, e); c.setCalculationInfo(h); var p = null != s && vl(t) ? function (t, e, i, n) { return n === s ? i : this.defaultDimValueGetter(t, e, i, n) } : null; return c.hasItemOption = !1, c.initData(t, null, p), c } function vl(t) { if (t.sourceFormat === pI) { var e = yl(t.data || []); return null != e && !y(Li(e)) } } function yl(t) { for (var e = 0; e < t.length && null == t[e];)e++; return t[e] } function xl(t) { this._setting = t || {}, this._extent = [1 / 0, -1 / 0], this._interval = 0, this.init && this.init.apply(this, arguments) } function _l(t) { this.categories = t.categories || [], this._needCollect = t.needCollect, this._deduplication = t.deduplication, this._map } function wl(t) { return t._map || (t._map = R(t.categories)) } function bl(t) { return w(t) && null != t.value ? t.value : t + "" } function Sl(t, e, i, n) { var o = {}, a = t[1] - t[0], r = o.interval = $o(a / e, !0); null != i && r < i && (r = o.interval = i), null != n && r > n && (r = o.interval = n); var s = o.intervalPrecision = Ml(r); return Tl(o.niceTickExtent = [MA(Math.ceil(t[0] / r) * r, s), MA(Math.floor(t[1] / r) * r, s)], t), o } function Ml(t) { return Ho(t) + 2 } function Il(t, e, i) { t[e] = Math.max(Math.min(t[e], i[1]), i[0]) } function Tl(t, e) { !isFinite(t[0]) && (t[0] = e[0]), !isFinite(t[1]) && (t[1] = e[1]), Il(t, 0, e), Il(t, 1, e), t[0] > t[1] && (t[0] = t[1]) } function Al(t, e, i, n) { var o = []; if (!t) return o; e[0] < i[0] && o.push(e[0]); for (var a = i[0]; a <= i[1] && (o.push(a), (a = MA(a + t, n)) !== o[o.length - 1]);)if (o.length > 1e4) return []; return e[1] > (o.length ? o[o.length - 1] : i[1]) && o.push(e[1]), o } function Dl(t) { return t.get("stack") || AA + t.seriesIndex } function Cl(t) { return t.dim + t.index } function Ll(t) { var e = [], i = t.axis; if ("category" === i.type) { for (var n = i.getBandWidth(), o = 0; o < t.count; o++)e.push(r({ bandWidth: n, axisKey: "axis0", stackId: AA + o }, t)); for (var a = Nl(e), s = [], o = 0; o < t.count; o++) { var l = a.axis0[AA + o]; l.offsetCenter = l.offset + l.width / 2, s.push(l) } return s } } function kl(t, e) { var i = []; return e.eachSeriesByType(t, function (t) { Rl(t) && !zl(t) && i.push(t) }), i } function Pl(t) { var e = []; return d(t, function (t) { var i = t.getData(), n = t.coordinateSystem.getBaseAxis(), o = n.getExtent(), a = "category" === n.type ? n.getBandWidth() : Math.abs(o[1] - o[0]) / i.count(), r = Vo(t.get("barWidth"), a), s = Vo(t.get("barMaxWidth"), a), l = t.get("barGap"), u = t.get("barCategoryGap"); e.push({ bandWidth: a, barWidth: r, barMaxWidth: s, barGap: l, barCategoryGap: u, axisKey: Cl(n), stackId: Dl(t) }) }), Nl(e) } function Nl(t) { var e = {}; d(t, function (t, i) { var n = t.axisKey, o = t.bandWidth, a = e[n] || { bandWidth: o, remainedWidth: o, autoWidthCount: 0, categoryGap: "20%", gap: "30%", stacks: {} }, r = a.stacks; e[n] = a; var s = t.stackId; r[s] || a.autoWidthCount++, r[s] = r[s] || { width: 0, maxWidth: 0 }; var l = t.barWidth; l && !r[s].width && (r[s].width = l, l = Math.min(a.remainedWidth, l), a.remainedWidth -= l); var u = t.barMaxWidth; u && (r[s].maxWidth = u); var h = t.barGap; null != h && (a.gap = h); var c = t.barCategoryGap; null != c && (a.categoryGap = c) }); var i = {}; return d(e, function (t, e) { i[e] = {}; var n = t.stacks, o = t.bandWidth, a = Vo(t.categoryGap, o), r = Vo(t.gap, 1), s = t.remainedWidth, l = t.autoWidthCount, u = (s - a) / (l + (l - 1) * r); u = Math.max(u, 0), d(n, function (t, e) { var i = t.maxWidth; i && i < u && (i = Math.min(i, s), t.width && (i = Math.min(i, t.width)), s -= i, t.width = i, l--) }), u = (s - a) / (l + (l - 1) * r), u = Math.max(u, 0); var h, c = 0; d(n, function (t, e) { t.width || (t.width = u), h = t, c += t.width * (1 + r) }), h && (c -= h.width * r); var f = -c / 2; d(n, function (t, n) { i[e][n] = i[e][n] || { offset: f, width: t.width }, f += t.width * (1 + r) }) }), i } function Ol(t, e, i) { if (t && e) { var n = t[Cl(e)]; return null != n && null != i && (n = n[Dl(i)]), n } } function El(t, e) { var i = kl(t, e), n = Pl(i), o = {}; d(i, function (t) { var e = t.getData(), i = t.coordinateSystem, a = i.getBaseAxis(), r = Dl(t), s = n[Cl(a)][r], l = s.offset, u = s.width, h = i.getOtherAxis(a), c = t.get("barMinHeight") || 0; o[r] = o[r] || [], e.setLayout({ offset: l, size: u }); for (var d = e.mapDimension(h.dim), f = e.mapDimension(a.dim), p = pl(e, d), g = h.isHorizontal(), m = Bl(a, h, p), v = 0, y = e.count(); v < y; v++) { var x = e.get(d, v), _ = e.get(f, v); if (!isNaN(x)) { var w = x >= 0 ? "p" : "n", b = m; p && (o[r][_] || (o[r][_] = { p: m, n: m }), b = o[r][_][w]); var S, M, I, T; if (g) S = b, M = (A = i.dataToPoint([x, _]))[1] + l, I = A[0] - m, T = u, Math.abs(I) < c && (I = (I < 0 ? -1 : 1) * c), p && (o[r][_][w] += I); else { var A = i.dataToPoint([_, x]); S = A[0] + l, M = b, I = u, T = A[1] - m, Math.abs(T) < c && (T = (T <= 0 ? -1 : 1) * c), p && (o[r][_][w] += T) } e.setItemLayout(v, { x: S, y: M, width: I, height: T }) } } }, this) } function Rl(t) { return t.coordinateSystem && "cartesian2d" === t.coordinateSystem.type } function zl(t) { return t.pipelineContext && t.pipelineContext.large } function Bl(t, e, i) { var n, o, a = e.getGlobalExtent(); a[0] > a[1] ? (n = a[1], o = a[0]) : (n = a[0], o = a[1]); var r = e.toGlobalCoord(e.dataToCoord(0)); return r < n && (r = n), r > o && (r = o), r } function Vl(t, e) { return VA(t, BA(e)) } function Gl(t, e) { var i, n, o, a = t.type, r = e.getMin(), s = e.getMax(), l = null != r, u = null != s, h = t.getExtent(); "ordinal" === a ? i = e.getCategories().length : (y(n = e.get("boundaryGap")) || (n = [n || 0, n || 0]), "boolean" == typeof n[0] && (n = [0, 0]), n[0] = Vo(n[0], 1), n[1] = Vo(n[1], 1), o = h[1] - h[0] || Math.abs(h[0])), null == r && (r = "ordinal" === a ? i ? 0 : NaN : h[0] - n[0] * o), null == s && (s = "ordinal" === a ? i ? i - 1 : NaN : h[1] + n[1] * o), "dataMin" === r ? r = h[0] : "function" == typeof r && (r = r({ min: h[0], max: h[1] })), "dataMax" === s ? s = h[1] : "function" == typeof s && (s = s({ min: h[0], max: h[1] })), (null == r || !isFinite(r)) && (r = NaN), (null == s || !isFinite(s)) && (s = NaN), t.setBlank(I(r) || I(s) || "ordinal" === a && !t.getOrdinalMeta().categories.length), e.getNeedCrossZero() && (r > 0 && s > 0 && !l && (r = 0), r < 0 && s < 0 && !u && (s = 0)); var c = e.ecModel; if (c && "time" === a) { var f, p = kl("bar", c); if (d(p, function (t) { f |= t.getBaseAxis() === e.axis }), f) { var g = Pl(p), m = Fl(r, s, e, g); r = m.min, s = m.max } } return [r, s] } function Fl(t, e, i, n) { var o = i.axis.getExtent(), a = o[1] - o[0], r = Ol(n, i.axis); if (void 0 === r) return { min: t, max: e }; var s = 1 / 0; d(r, function (t) { s = Math.min(t.offset, s) }); var l = -1 / 0; d(r, function (t) { l = Math.max(t.offset + t.width, l) }), s = Math.abs(s), l = Math.abs(l); var u = s + l, h = e - t, c = h / (1 - (s + l) / a) - h; return e += c * (l / u), t -= c * (s / u), { min: t, max: e } } function Wl(t, e) { var i = Gl(t, e), n = null != e.getMin(), o = null != e.getMax(), a = e.get("splitNumber"); "log" === t.type && (t.base = e.get("logBase")); var r = t.type; t.setExtent(i[0], i[1]), t.niceExtent({ splitNumber: a, fixMin: n, fixMax: o, minInterval: "interval" === r || "time" === r ? e.get("minInterval") : null, maxInterval: "interval" === r || "time" === r ? e.get("maxInterval") : null }); var s = e.get("interval"); null != s && t.setInterval && t.setInterval(s) } function Hl(t, e) { if (e = e || t.get("type")) switch (e) { case "category": return new SA(t.getOrdinalMeta ? t.getOrdinalMeta() : t.getCategories(), [1 / 0, -1 / 0]); case "value": return new TA; default: return (xl.getClass(e) || TA).create(t) } } function Zl(t) { var e = t.scale.getExtent(), i = e[0], n = e[1]; return !(i > 0 && n > 0 || i < 0 && n < 0) } function Ul(t) { var e = t.getLabelModel().get("formatter"), i = "category" === t.type ? t.scale.getExtent()[0] : null; return "string" == typeof e ? e = function (e) { return function (i) { return i = t.scale.getLabel(i), e.replace("{value}", null != i ? i : "") } }(e) : "function" == typeof e ? function (n, o) { return null != i && (o = n - i), e(Xl(t, n), o) } : function (e) { return t.scale.getLabel(e) } } function Xl(t, e) { return "category" === t.type ? t.scale.getLabel(e) : e } function jl(t) { var e = t.model, i = t.scale; if (e.get("axisLabel.show") && !i.isBlank()) { var n, o, a = "category" === t.type, r = i.getExtent(); o = a ? i.count() : (n = i.getTicks()).length; var s, l = t.getLabelModel(), u = Ul(t), h = 1; o > 40 && (h = Math.ceil(o / 40)); for (var c = 0; c < o; c += h) { var d = u(n ? n[c] : r[0] + c), f = Yl(l.getTextRect(d), l.get("rotate") || 0); s ? s.union(f) : s = f } return s } } function Yl(t, e) { var i = e * Math.PI / 180, n = t.plain(), o = n.width, a = n.height, r = o * Math.cos(i) + a * Math.sin(i), s = o * Math.sin(i) + a * Math.cos(i); return new de(n.x, n.y, r, s) } function ql(t) { var e = t.get("interval"); return null == e ? "auto" : e } function Kl(t) { return "category" === t.type && 0 === ql(t.getLabelModel()) } function $l(t, e) { if ("image" !== this.type) { var i = this.style, n = this.shape; n && "line" === n.symbolType ? i.stroke = t : this.__isEmptyBrush ? (i.stroke = t, i.fill = e || "#fff") : (i.fill && (i.fill = t), i.stroke && (i.stroke = t)), this.dirty(!1) } } function Jl(t, e, i, n, o, a, r) { var s = 0 === t.indexOf("empty"); s && (t = t.substr(5, 1).toLowerCase() + t.substr(6)); var l; return l = 0 === t.indexOf("image://") ? jn(t.slice(8), new de(e, i, n, o), r ? "center" : "cover") : 0 === t.indexOf("path://") ? Xn(t.slice(7), {}, new de(e, i, n, o), r ? "center" : "cover") : new JA({ shape: { symbolType: t, x: e, y: i, width: n, height: o } }), l.__isEmptyBrush = s, l.setColor = $l, l.setColor(a), l } function Ql(t, e) { return Math.abs(t - e) < eD } function tu(t, e, i) { var n = 0, o = t[0]; if (!o) return !1; for (var a = 1; a < t.length; a++) { var r = t[a]; n += Sn(o[0], o[1], r[0], r[1], e, i), o = r } var s = t[0]; return Ql(o[0], s[0]) && Ql(o[1], s[1]) || (n += Sn(o[0], o[1], s[0], s[1], e, i)), 0 !== n } function eu(t, e, i) { if (this.name = t, this.geometries = e, i) i = [i[0], i[1]]; else { var n = this.getBoundingRect(); i = [n.x + n.width / 2, n.y + n.height / 2] } this.center = i } function iu(t) { if (!t.UTF8Encoding) return t; var e = t.UTF8Scale; null == e && (e = 1024); for (var i = t.features, n = 0; n < i.length; n++)for (var o = i[n].geometry, a = o.coordinates, r = o.encodeOffsets, s = 0; s < a.length; s++) { var l = a[s]; if ("Polygon" === o.type) a[s] = nu(l, r[s], e); else if ("MultiPolygon" === o.type) for (var u = 0; u < l.length; u++) { var h = l[u]; l[u] = nu(h, r[s][u], e) } } return t.UTF8Encoding = !1, t } function nu(t, e, i) { for (var n = [], o = e[0], a = e[1], r = 0; r < t.length; r += 2) { var s = t.charCodeAt(r) - 64, l = t.charCodeAt(r + 1) - 64; s = s >> 1 ^ -(1 & s), l = l >> 1 ^ -(1 & l), o = s += o, a = l += a, n.push([s / i, l / i]) } return n } function ou(t) { return "category" === t.type ? ru(t) : uu(t) } function au(t, e) { return "category" === t.type ? lu(t, e) : { ticks: t.scale.getTicks() } } function ru(t) { var e = t.getLabelModel(), i = su(t, e); return !e.get("show") || t.scale.isBlank() ? { labels: [], labelCategoryInterval: i.labelCategoryInterval } : i } function su(t, e) { var i = hu(t, "labels"), n = ql(e), o = cu(i, n); if (o) return o; var a, r; return a = x(n) ? vu(t, n) : mu(t, r = "auto" === n ? fu(t) : n), du(i, n, { labels: a, labelCategoryInterval: r }) } function lu(t, e) { var i = hu(t, "ticks"), n = ql(e), o = cu(i, n); if (o) return o; var a, r; if (e.get("show") && !t.scale.isBlank() || (a = []), x(n)) a = vu(t, n, !0); else if ("auto" === n) { var s = su(t, t.getLabelModel()); r = s.labelCategoryInterval, a = f(s.labels, function (t) { return t.tickValue }) } else a = mu(t, r = n, !0); return du(i, n, { ticks: a, tickCategoryInterval: r }) } function uu(t) { var e = t.scale.getTicks(), i = Ul(t); return { labels: f(e, function (e, n) { return { formattedLabel: i(e, n), rawLabel: t.scale.getLabel(e), tickValue: e } }) } } function hu(t, e) { return nD(t)[e] || (nD(t)[e] = []) } function cu(t, e) { for (var i = 0; i < t.length; i++)if (t[i].key === e) return t[i].value } function du(t, e, i) { return t.push({ key: e, value: i }), i } function fu(t) { var e = nD(t).autoInterval; return null != e ? e : nD(t).autoInterval = t.calculateCategoryInterval() } function pu(t) { var e = gu(t), i = Ul(t), n = (e.axisRotate - e.labelRotate) / 180 * Math.PI, o = t.scale, a = o.getExtent(), r = o.count(); if (a[1] - a[0] < 1) return 0; var s = 1; r > 40 && (s = Math.max(1, Math.floor(r / 40))); for (var l = a[0], u = t.dataToCoord(l + 1) - t.dataToCoord(l), h = Math.abs(u * Math.cos(n)), c = Math.abs(u * Math.sin(n)), d = 0, f = 0; l <= a[1]; l += s) { var p = 0, g = 0, m = ke(i(l), e.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 / h, y = f / c; isNaN(v) && (v = 1 / 0), isNaN(y) && (y = 1 / 0); var x = Math.max(0, Math.floor(Math.min(v, y))), _ = nD(t.model), w = _.lastAutoInterval, b = _.lastTickCount; return null != w && null != b && Math.abs(w - x) <= 1 && Math.abs(b - r) <= 1 && w > x ? x = w : (_.lastTickCount = r, _.lastAutoInterval = x), x } function gu(t) { var e = t.getLabelModel(); return { axisRotate: t.getRotate ? t.getRotate() : t.isHorizontal && !t.isHorizontal() ? 90 : 0, labelRotate: e.get("rotate") || 0, font: e.getFont() } } function mu(t, e, i) { function n(t) { l.push(i ? t : { formattedLabel: o(t), rawLabel: a.getLabel(t), tickValue: t }) } var o = Ul(t), a = t.scale, r = a.getExtent(), s = t.getLabelModel(), l = [], u = Math.max((e || 0) + 1, 1), h = r[0], c = a.count(); 0 !== h && u > 1 && c / u > 2 && (h = Math.round(Math.ceil(h / u) * u)); var d = Kl(t), f = s.get("showMinLabel") || d, p = s.get("showMaxLabel") || d; f && h !== r[0] && n(r[0]); for (var g = h; g <= r[1]; g += u)n(g); return p && g !== r[1] && n(r[1]), l } function vu(t, e, i) { var n = t.scale, o = Ul(t), a = []; return d(n.getTicks(), function (t) { var r = n.getLabel(t); e(t, r) && a.push(i ? t : { formattedLabel: o(t), rawLabel: r, tickValue: t }) }), a } function yu(t, e) { var i = (t[1] - t[0]) / e / 2; t[0] += i, t[1] -= i } function xu(t, e, i, n, o) { function a(t, e) { return h ? t > e : t < e } var r = e.length; if (t.onBand && !n && r) { var s, l = t.getExtent(); if (1 === r) e[0].coord = l[0], s = e[1] = { coord: l[0] }; else { var u = e[1].coord - e[0].coord; d(e, function (t) { t.coord -= u / 2; var e = e || 0; e % 2 > 0 && (t.coord -= u / (2 * (e + 1))) }), s = { coord: e[r - 1].coord + u }, e.push(s) } var h = l[0] > l[1]; a(e[0].coord, l[0]) && (o ? e[0].coord = l[0] : e.shift()), o && a(l[0], e[0].coord) && e.unshift({ coord: l[0] }), a(l[1], s.coord) && (o ? s.coord = l[1] : e.pop()), o && a(s.coord, l[1]) && e.push({ coord: l[1] }) } } function _u(t, e) { var i = t.mapDimension("defaultedLabel", !0), n = i.length; if (1 === n) return fr(t, e, i[0]); if (n) { for (var o = [], a = 0; a < i.length; a++) { var r = fr(t, e, i[a]); o.push(r) } return o.join(" ") } } function wu(t, e, i) { tb.call(this), this.updateData(t, e, i) } function bu(t) { return [t[0] / 2, t[1] / 2] } function Su(t, e) { this.parent.drift(t, e) } function Mu() { !so(this) && Tu.call(this) } function Iu() { !so(this) && Au.call(this) } function Tu() { if (!this.incremental && !this.useHoverLayer) { var t = this.__symbolOriginalScale, e = t[1] / t[0]; this.animateTo({ scale: [Math.max(1.1 * t[0], t[0] + 3), Math.max(1.1 * t[1], t[1] + 3 * e)] }, 400, "elasticOut") } } function Au() { this.incremental || this.useHoverLayer || this.animateTo({ scale: this.__symbolOriginalScale }, 400, "elasticOut") } function Du(t) { this.group = new tb, this._symbolCtor = t || wu } function Cu(t, e, i, n) { return e && !isNaN(e[0]) && !isNaN(e[1]) && !(n.isIgnore && n.isIgnore(i)) && !(n.clipShape && !n.clipShape.contain(e[0], e[1])) && "none" !== t.getItemVisual(i, "symbol") } function Lu(t) { return null == t || w(t) || (t = { isIgnore: t }), t || {} } function ku(t) { var e = t.hostModel; return { itemStyle: e.getModel("itemStyle").getItemStyle(["color"]), hoverItemStyle: e.getModel("emphasis.itemStyle").getItemStyle(), symbolRotate: e.get("symbolRotate"), symbolOffset: e.get("symbolOffset"), hoverAnimation: e.get("hoverAnimation"), labelModel: e.getModel("label"), hoverLabelModel: e.getModel("emphasis.label"), cursorStyle: e.get("cursor") } } function Pu(t, e, i) { var n, o = t.getBaseAxis(), a = t.getOtherAxis(o), r = Nu(a, i), s = o.dim, l = a.dim, u = e.mapDimension(l), h = e.mapDimension(s), c = "x" === l || "radius" === l ? 1 : 0, d = f(t.dimensions, function (t) { return e.mapDimension(t) }), p = e.getCalculationInfo("stackResultDimension"); return (n |= pl(e, d[0])) && (d[0] = p), (n |= pl(e, d[1])) && (d[1] = p), { dataDimsForPoint: d, valueStart: r, valueAxisDim: l, baseAxisDim: s, stacked: !!n, valueDim: u, baseDim: h, baseDataOffset: c, stackedOverDimension: e.getCalculationInfo("stackedOverDimension") } } function Nu(t, e) { var i = 0, n = t.scale.getExtent(); return "start" === e ? i = n[0] : "end" === e ? i = n[1] : n[0] > 0 ? i = n[0] : n[1] < 0 && (i = n[1]), i } function Ou(t, e, i, n) { var o = NaN; t.stacked && (o = i.get(i.getCalculationInfo("stackedOverDimension"), n)), isNaN(o) && (o = t.valueStart); var a = t.baseDataOffset, r = []; return r[a] = i.get(t.baseDim, n), r[1 - a] = o, e.dataToPoint(r) } function Eu(t, e) { var i = []; return e.diff(t).add(function (t) { i.push({ cmd: "+", idx: t }) }).update(function (t, e) { i.push({ cmd: "=", idx: e, idx1: t }) }).remove(function (t) { i.push({ cmd: "-", idx: t }) }).execute(), i } function Ru(t) { return isNaN(t[0]) || isNaN(t[1]) } function zu(t, e, i, n, o, a, r, s, l, u, h) { return "none" !== u && u ? Bu.apply(this, arguments) : Vu.apply(this, arguments) } function Bu(t, e, i, n, o, a, r, s, l, u, h) { for (var c = 0, d = i, f = 0; f < n; f++) { var p = e[d]; if (d >= o || d < 0) break; if (Ru(p)) { if (h) { d += a; continue } break } if (d === i) t[a > 0 ? "moveTo" : "lineTo"](p[0], p[1]); else if (l > 0) { var g = e[c], m = "y" === u ? 1 : 0, v = (p[m] - g[m]) * l; _D(bD, g), bD[m] = g[m] + v, _D(SD, p), SD[m] = p[m] - v, t.bezierCurveTo(bD[0], bD[1], SD[0], SD[1], p[0], p[1]) } else t.lineTo(p[0], p[1]); c = d, d += a } return f } function Vu(t, e, i, n, o, a, r, s, l, u, h) { for (var c = 0, d = i, f = 0; f < n; f++) { var p = e[d]; if (d >= o || d < 0) break; if (Ru(p)) { if (h) { d += a; continue } break } if (d === i) t[a > 0 ? "moveTo" : "lineTo"](p[0], p[1]), _D(bD, p); else if (l > 0) { var g = d + a, m = e[g]; if (h) for (; m && Ru(e[g]);)m = e[g += a]; var v = .5, y = e[c]; if (!(m = e[g]) || Ru(m)) _D(SD, p); else { Ru(m) && !h && (m = p), U(wD, m, y); var x, _; if ("x" === u || "y" === u) { var w = "x" === u ? 0 : 1; x = Math.abs(p[w] - y[w]), _ = Math.abs(p[w] - m[w]) } else x = uw(p, y), _ = uw(p, m); xD(SD, p, wD, -l * (1 - (v = _ / (_ + x)))) } vD(bD, bD, s), yD(bD, bD, r), vD(SD, SD, s), yD(SD, SD, r), t.bezierCurveTo(bD[0], bD[1], SD[0], SD[1], p[0], p[1]), xD(bD, p, wD, l * v) } else t.lineTo(p[0], p[1]); c = d, d += a } return f } function Gu(t, e) { var i = [1 / 0, 1 / 0], n = [-1 / 0, -1 / 0]; if (e) for (var o = 0; o < t.length; o++) { var a = t[o]; a[0] < i[0] && (i[0] = a[0]), a[1] < i[1] && (i[1] = a[1]), a[0] > n[0] && (n[0] = a[0]), a[1] > n[1] && (n[1] = a[1]) } return { min: e ? i : n, max: e ? n : i } } function Fu(t, e) { if (t.length === e.length) { for (var i = 0; i < t.length; i++) { var n = t[i], o = e[i]; if (n[0] !== o[0] || n[1] !== o[1]) return } return !0 } } function Wu(t) { return "number" == typeof t ? t : t ? .5 : 0 } function Hu(t) { var e = t.getGlobalExtent(); if (t.onBand) { var i = t.getBandWidth() / 2 - 1, n = e[1] > e[0] ? 1 : -1; e[0] += n * i, e[1] -= n * i } return e } function Zu(t, e, i) { if (!i.valueDim) return []; for (var n = [], o = 0, a = e.count(); o < a; o++)n.push(Ou(i, t, e, o)); return n } function Uu(t, e, i, n) { var o = Hu(t.getAxis("x")), a = Hu(t.getAxis("y")), r = t.getBaseAxis().isHorizontal(), s = Math.min(o[0], o[1]), l = Math.min(a[0], a[1]), u = Math.max(o[0], o[1]) - s, h = Math.max(a[0], a[1]) - l; if (i) s -= .5, u += .5, l -= .5, h += .5; else { var c = n.get("lineStyle.width") || 2, d = n.get("clipOverflow") ? c / 2 : Math.max(u, h); r ? (l -= d, h += 2 * d) : (s -= d, u += 2 * d) } var f = new yM({ shape: { x: s, y: l, width: u, height: h } }); return e && (f.shape[r ? "width" : "height"] = 0, To(f, { shape: { width: u, height: h } }, n)), f } function Xu(t, e, i, n) { var o = t.getAngleAxis(), a = t.getRadiusAxis().getExtent().slice(); a[0] > a[1] && a.reverse(); var r = o.getExtent(), s = Math.PI / 180; i && (a[0] -= .5, a[1] += .5); var l = new hM({ shape: { cx: Go(t.cx, 1), cy: Go(t.cy, 1), r0: Go(a[0], 1), r: Go(a[1], 1), startAngle: -r[0] * s, endAngle: -r[1] * s, clockwise: o.inverse } }); return e && (l.shape.endAngle = -r[0] * s, To(l, { shape: { endAngle: -r[1] * s } }, n)), l } function ju(t, e, i, n) { return "polar" === t.type ? Xu(t, e, i, n) : Uu(t, e, i, n) } function Yu(t, e, i) { for (var n = e.getBaseAxis(), o = "x" === n.dim || "radius" === n.dim ? 0 : 1, a = [], r = 0; r < t.length - 1; r++) { var s = t[r + 1], l = t[r]; a.push(l); var u = []; switch (i) { case "end": u[o] = s[o], u[1 - o] = l[1 - o], a.push(u); break; case "middle": var h = (l[o] + s[o]) / 2, c = []; u[o] = c[o] = h, u[1 - o] = l[1 - o], c[1 - o] = s[1 - o], a.push(u), a.push(c); break; default: u[o] = l[o], u[1 - o] = s[1 - o], a.push(u) } } return t[r] && a.push(t[r]), a } function qu(t, e) { var i = t.getVisual("visualMeta"); if (i && i.length && t.count() && "cartesian2d" === e.type) { for (var n, o, a = i.length - 1; a >= 0; a--) { var r = i[a].dimension, s = t.dimensions[r], l = t.getDimensionInfo(s); if ("x" === (n = l && l.coordDim) || "y" === n) { o = i[a]; break } } if (o) { var u = e.getAxis(n), h = f(o.stops, function (t) { return { coord: u.toGlobalCoord(u.dataToCoord(t.value)), color: t.color } }), c = h.length, p = o.outerColors.slice(); c && h[0].coord > h[c - 1].coord && (h.reverse(), p.reverse()); var g = h[0].coord - 10, m = h[c - 1].coord + 10, v = m - g; if (v < .001) return "transparent"; d(h, function (t) { t.offset = (t.coord - g) / v }), h.push({ offset: c ? h[c - 1].offset : .5, color: p[1] || "transparent" }), h.unshift({ offset: c ? h[0].offset : .5, color: p[0] || "transparent" }); var y = new TM(0, 0, 0, 0, h, !0); return y[n] = g, y[n + "2"] = m, y } } } function Ku(t, e, i) { var n = t.get("showAllSymbol"), o = "auto" === n; if (!n || o) { var a = i.getAxesByScale("ordinal")[0]; if (a && (!o || !$u(a, e))) { var r = e.mapDimension(a.dim), s = {}; return d(a.getViewLabels(), function (t) { s[t.tickValue] = 1 }), function (t) { return !s.hasOwnProperty(e.get(r, t)) } } } } function $u(t, e) { var i = t.getExtent(), n = Math.abs(i[1] - i[0]) / t.scale.count(); isNaN(n) && (n = 0); for (var o = e.count(), a = Math.max(1, Math.round(o / 5)), r = 0; r < o; r += a)if (1.5 * wu.getSymbolSize(e, r)[t.isHorizontal() ? 1 : 0] > n) return !1; return !0 } function Ju(t) { return this._axes[t] } function Qu(t) { LD.call(this, t) } function th(t, e) { return e.type || (e.data ? "category" : "value") } function eh(t, e, i) { return t.getCoordSysModel() === e } function ih(t, e, i) { this._coordsMap = {}, this._coordsList = [], this._axesMap = {}, this._axesList = [], this._initCartesian(t, e, i), this.model = t } function nh(t, e, i, n) { function o(t) { return t.dim + "_" + t.index } i.getAxesOnZeroOf = function () { return a ? [a] : [] }; var a, r = t[e], s = i.model, l = s.get("axisLine.onZero"), u = s.get("axisLine.onZeroAxisIndex"); if (l) { if (null != u) oh(r[u]) && (a = r[u]); else for (var h in r) if (r.hasOwnProperty(h) && oh(r[h]) && !n[o(r[h])]) { a = r[h]; break } a && (n[o(a)] = !0) } } function oh(t) { return t && "category" !== t.type && "time" !== t.type && Zl(t) } function ah(t, e) { var i = t.getExtent(), n = i[0] + i[1]; t.toGlobalCoord = "x" === t.dim ? function (t) { return t + e } : function (t) { return n - t + e }, t.toLocalCoord = "x" === t.dim ? function (t) { return t - e } : function (t) { return n - t + e } } function rh(t, e) { return f(VD, function (e) { return t.getReferringComponents(e)[0] }) } function sh(t) { return "cartesian2d" === t.get("coordinateSystem") } function lh(t) { var e = { componentType: t.mainType, componentIndex: t.componentIndex }; return e[t.mainType + "Index"] = t.componentIndex, e } function uh(t, e, i, n) { var o, a, r = Xo(i - t.rotation), s = n[0] > n[1], l = "start" === e && !s || "start" !== e && s; return jo(r - GD / 2) ? (a = l ? "bottom" : "top", o = "center") : jo(r - 1.5 * GD) ? (a = l ? "top" : "bottom", o = "center") : (a = "middle", o = r < 1.5 * GD && r > GD / 2 ? l ? "left" : "right" : l ? "right" : "left"), { rotation: r, textAlign: o, textVerticalAlign: a } } function hh(t) { var e = t.get("tooltip"); return t.get("silent") || !(t.get("triggerEvent") || e && e.show) } function ch(t, e, i) { if (!Kl(t.axis)) { var n = t.get("axisLabel.showMinLabel"), o = t.get("axisLabel.showMaxLabel"); e = e || [], i = i || []; var a = e[0], r = e[1], s = e[e.length - 1], l = e[e.length - 2], u = i[0], h = i[1], c = i[i.length - 1], d = i[i.length - 2]; !1 === n ? (dh(a), dh(u)) : fh(a, r) && (n ? (dh(r), dh(h)) : (dh(a), dh(u))), !1 === o ? (dh(s), dh(c)) : fh(l, s) && (o ? (dh(l), dh(d)) : (dh(s), dh(c))) } } function dh(t) { t && (t.ignore = !0) } function fh(t, e, i) { var n = t && t.getBoundingRect().clone(), o = e && e.getBoundingRect().clone(); if (n && o) { var a = _t([]); return Mt(a, a, -t.rotation), n.applyTransform(bt([], a, t.getLocalTransform())), o.applyTransform(bt([], a, e.getLocalTransform())), n.intersect(o) } } function ph(t) { return "middle" === t || "center" === t } function gh(t, e, i) { var n = e.axis; if (e.get("axisTick.show") && !n.scale.isBlank()) { for (var o = e.getModel("axisTick"), a = o.getModel("lineStyle"), s = o.get("length"), l = n.getTicksCoords(), u = [], h = [], c = t._transform, d = [], f = 0; f < l.length; f++) { var p = l[f].coord; u[0] = p, u[1] = 0, h[0] = p, h[1] = i.tickDirection * s, c && (Q(u, u, c), Q(h, h, c)); var g = new _M(Kn({ anid: "tick_" + l[f].tickValue, shape: { x1: u[0], y1: u[1], x2: h[0], y2: h[1] }, style: r(a.getLineStyle(), { stroke: e.get("axisLine.lineStyle.color") }), z2: 2, silent: !0 })); t.group.add(g), d.push(g) } return d } } function mh(t, e, i) { var n = e.axis; if (T(i.axisLabelShow, e.get("axisLabel.show")) && !n.scale.isBlank()) { var o = e.getModel("axisLabel"), a = o.get("margin"), r = n.getViewLabels(), s = (T(i.labelRotate, o.get("rotate")) || 0) * GD / 180, l = HD(i.rotation, s, i.labelDirection), u = e.getCategories(!0), h = [], c = hh(e), f = e.get("triggerEvent"); return d(r, function (r, s) { var d = r.tickValue, p = r.formattedLabel, g = r.rawLabel, m = o; u && u[d] && u[d].textStyle && (m = new No(u[d].textStyle, o, e.ecModel)); var v = m.getTextColor() || e.get("axisLine.lineStyle.color"), y = [n.dataToCoord(d), i.labelOffset + i.labelDirection * a], x = new rM({ anid: "label_" + d, position: y, rotation: l.rotation, silent: c, z2: 10 }); mo(x.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" === n.type ? g : "value" === n.type ? d + "" : d, s) : v }), f && (x.eventData = lh(e), x.eventData.targetType = "axisLabel", x.eventData.value = g), t._dumbGroup.add(x), x.updateTransform(), h.push(x), t.group.add(x), x.decomposeTransform() }), h } } function vh(t, e) { var i = { axesInfo: {}, seriesInvolved: !1, coordSysAxesInfo: {}, coordSysMap: {} }; return yh(i, t, e), i.seriesInvolved && _h(i, t), i } function yh(t, e, i) { var n = e.getComponent("tooltip"), o = e.getComponent("axisPointer"), a = o.get("link", !0) || [], r = []; ZD(i.getCoordinateSystems(), function (i) { function s(n, s, l) { var c = l.model.getModel("axisPointer", o), d = c.get("show"); if (d && ("auto" !== d || n || Th(c))) { null == s && (s = c.get("triggerTooltip")); var f = (c = n ? xh(l, h, o, e, n, s) : c).get("snap"), p = Ah(l.model), g = s || f || "category" === l.type, m = t.axesInfo[p] = { key: p, axis: l, coordSys: i, axisPointerModel: c, triggerTooltip: s, involveSeries: g, snap: f, useHandle: Th(c), seriesModels: [] }; u[p] = m, t.seriesInvolved |= g; var v = wh(a, l); if (null != v) { var y = r[v] || (r[v] = { axesInfo: {} }); y.axesInfo[p] = m, y.mapper = a[v].mapper, m.linkGroup = y } } } if (i.axisPointerEnabled) { var l = Ah(i.model), u = t.coordSysAxesInfo[l] = {}; t.coordSysMap[l] = i; var h = i.model.getModel("tooltip", n); if (ZD(i.getAxes(), UD(s, !1, null)), i.getTooltipAxes && n && h.get("show")) { var c = "axis" === h.get("trigger"), d = "cross" === h.get("axisPointer.type"), f = i.getTooltipAxes(h.get("axisPointer.axis")); (c || d) && ZD(f.baseAxes, UD(s, !d || "cross", c)), d && ZD(f.otherAxes, UD(s, "cross", !1)) } } }) } function xh(t, e, n, o, a, s) { var l = e.getModel("axisPointer"), u = {}; ZD(["type", "snap", "lineStyle", "shadowStyle", "label", "animation", "animationDurationUpdate", "animationEasingUpdate", "z"], function (t) { u[t] = i(l.get(t)) }), u.snap = "category" !== t.type && !!s, "cross" === l.get("type") && (u.type = "line"); var h = u.label || (u.label = {}); if (null == h.show && (h.show = !1), "cross" === a) { var c = l.get("label.show"); if (h.show = null == c || c, !s) { var d = u.lineStyle = l.get("crossStyle"); d && r(h, d.textStyle) } } return t.model.getModel("axisPointer", new No(u, n, o)) } function _h(t, e) { e.eachSeries(function (e) { var i = e.coordinateSystem, n = e.get("tooltip.trigger", !0), o = e.get("tooltip.show", !0); i && "none" !== n && !1 !== n && "item" !== n && !1 !== o && !1 !== e.get("axisPointer.show", !0) && ZD(t.coordSysAxesInfo[Ah(i.model)], function (t) { var n = t.axis; i.getAxis(n.dim) === n && (t.seriesModels.push(e), null == t.seriesDataCount && (t.seriesDataCount = 0), t.seriesDataCount += e.getData().count()) }) }, this) } function wh(t, e) { for (var i = e.model, n = e.dim, o = 0; o < t.length; o++) { var a = t[o] || {}; if (bh(a[n + "AxisId"], i.id) || bh(a[n + "AxisIndex"], i.componentIndex) || bh(a[n + "AxisName"], i.name)) return o } } function bh(t, e) { return "all" === t || y(t) && l(t, e) >= 0 || t === e } function Sh(t) { var e = Mh(t); if (e) { var i = e.axisPointerModel, n = e.axis.scale, o = i.option, a = i.get("status"), r = i.get("value"); null != r && (r = n.parse(r)); var s = Th(i); null == a && (o.status = s ? "show" : "hide"); var l = n.getExtent().slice(); l[0] > l[1] && l.reverse(), (null == r || r > l[1]) && (r = l[1]), r < l[0] && (r = l[0]), o.value = r, s && (o.status = e.axis.scale.isBlank() ? "hide" : "show") } } function Mh(t) { var e = (t.ecModel.getComponent("axisPointer") || {}).coordSysAxesInfo; return e && e.axesInfo[Ah(t)] } function Ih(t) { var e = Mh(t); return e && e.axisPointerModel } function Th(t) { return !!t.get("handle.show") } function Ah(t) { return t.type + "||" + t.id } function Dh(t, e, i, n, o, a) { var r = XD.getAxisPointerClass(t.axisPointerClass); if (r) { var s = Ih(e); s ? (t._axisPointer || (t._axisPointer = new r)).render(e, s, n, a) : Ch(t, n) } } function Ch(t, e, i) { var n = t._axisPointer; n && n.dispose(e, i), t._axisPointer = null } function Lh(t, e, i) { i = i || {}; var n = t.coordinateSystem, o = e.axis, a = {}, r = o.getAxesOnZeroOf()[0], s = o.position, l = r ? "onZero" : s, u = o.dim, h = n.getRect(), c = [h.x, h.x + h.width, h.y, h.y + h.height], d = { left: 0, right: 1, top: 0, bottom: 1, onZero: 2 }, f = e.get("offset") || 0, p = "x" === u ? [c[2] - f, c[3] + f] : [c[0] - f, c[1] + f]; if (r) { var g = r.toGlobalCoord(r.dataToCoord(0)); p[d.onZero] = Math.max(Math.min(g, p[1]), p[0]) } a.position = ["y" === u ? p[d[l]] : c[0], "x" === u ? p[d[l]] : c[3]], a.rotation = Math.PI / 2 * ("x" === u ? 0 : 1); var m = { top: -1, bottom: 1, left: -1, right: 1 }; a.labelDirection = a.tickDirection = a.nameDirection = m[s], a.labelOffset = r ? p[d[s]] - p[d.onZero] : 0, e.get("axisTick.inside") && (a.tickDirection = -a.tickDirection), T(i.labelInside, e.get("axisLabel.inside")) && (a.labelDirection = -a.labelDirection); var v = e.get("axisLabel.rotate"); return a.labelRotate = "top" === l ? -v : v, a.z2 = 1, a } function kh(t, e, i, n, o, a, r) { go(t, e, i.getModel("label"), i.getModel("emphasis.label"), { labelFetcher: o, labelDataIndex: a, defaultText: _u(o.getData(), a), isRectText: !0, autoColor: n }), Ph(t), Ph(e) } function Ph(t, e) { "outside" === t.textPosition && (t.textPosition = e) } function Nh(t, e, i) { i.style.text = null, Io(i, { shape: { width: 0 } }, e, t, function () { i.parent && i.parent.remove(i) }) } function Oh(t, e, i) { i.style.text = null, Io(i, { shape: { r: i.shape.r0 } }, e, t, function () { i.parent && i.parent.remove(i) }) } function Eh(t, e, i, n, o, a, s, l) { var u = e.getItemVisual(i, "color"), h = e.getItemVisual(i, "opacity"), c = n.getModel("itemStyle"), d = n.getModel("emphasis.itemStyle").getBarItemStyle(); l || t.setShape("r", c.get("barBorderRadius") || 0), t.useStyle(r({ fill: u, opacity: h }, c.getBarItemStyle())); var f = n.getShallow("cursor"); f && t.attr("cursor", f); var p = s ? o.height > 0 ? "bottom" : "top" : o.width > 0 ? "left" : "right"; l || kh(t.style, d, n, u, a, i, p), fo(t, d) } function Rh(t, e) { var i = t.get(tC) || 0; return Math.min(i, Math.abs(e.width), Math.abs(e.height)) } function zh(t, e, i) { var n = t.getData(), o = [], a = n.getLayout("valueAxisHorizontal") ? 1 : 0; o[1 - a] = n.getLayout("valueAxisStart"); var r = new nC({ shape: { points: n.getLayout("largePoints") }, incremental: !!i, __startPoint: o, __valueIdx: a }); e.add(r), Bh(r, t, n) } function Bh(t, e, i) { var n = i.getVisual("borderColor") || i.getVisual("color"), o = e.getModel("itemStyle").getItemStyle(["color", "borderColor"]); t.useStyle(o), t.style.fill = null, t.style.stroke = n, t.style.lineWidth = i.getLayout("barWidth") } function Vh(t, e, i, n) { var o = e.getData(), a = this.dataIndex, r = o.getName(a), s = e.get("selectedOffset"); n.dispatchAction({ type: "pieToggleSelect", from: t, name: r, seriesId: e.id }), o.each(function (t) { Gh(o.getItemGraphicEl(t), o.getItemLayout(t), e.isSelected(o.getName(t)), s, i) }) } function Gh(t, e, i, n, o) { var a = (e.startAngle + e.endAngle) / 2, r = Math.cos(a), s = Math.sin(a), l = i ? n : 0, u = [r * l, s * l]; o ? t.animate().when(200, { position: u }).start("bounceOut") : t.attr("position", u) } function Fh(t, e) { function i() { a.ignore = a.hoverIgnore, r.ignore = r.hoverIgnore } function n() { a.ignore = a.normalIgnore, r.ignore = r.normalIgnore } tb.call(this); var o = new hM({ z2: 2 }), a = new gM, r = new rM; this.add(o), this.add(a), this.add(r), this.updateData(t, e, !0), this.on("emphasis", i).on("normal", n).on("mouseover", i).on("mouseout", n) } function Wh(t, e, i, n, o, a, r) { function s(e, i) { for (var n = e; n >= 0 && (t[n].y -= i, !(n > 0 && t[n].y > t[n - 1].y + t[n - 1].height)); n--); } function l(t, e, i, n, o, a) { for (var r = e ? Number.MAX_VALUE : 0, s = 0, l = t.length; s < l; s++) { var u = Math.abs(t[s].y - n), h = t[s].len, c = t[s].len2, d = u < o + h ? Math.sqrt((o + h + c) * (o + h + c) - u * u) : Math.abs(t[s].x - i); e && d >= r && (d = r - 10), !e && d <= r && (d = r + 10), t[s].x = i + d * a, r = d } } t.sort(function (t, e) { return t.y - e.y }); for (var u, h = 0, c = t.length, d = [], f = [], p = 0; p < c; p++)(u = t[p].y - h) < 0 && function (e, i, n, o) { for (var a = e; a < i; a++)if (t[a].y += n, a > e && a + 1 < i && t[a + 1].y > t[a].y + t[a].height) return void s(a, n / 2); s(i - 1, n / 2) }(p, c, -u), h = t[p].y + t[p].height; r - h < 0 && s(c - 1, h - r); for (p = 0; p < c; p++)t[p].y >= i ? f.push(t[p]) : d.push(t[p]); l(d, !1, e, i, n, o), l(f, !0, e, i, n, o) } function Hh(t, e, i, n, o, a) { for (var r = [], s = [], l = 0; l < t.length; l++)Zh(t[l]) || (t[l].x < e ? r.push(t[l]) : s.push(t[l])); Wh(s, e, i, n, 1, o, a), Wh(r, e, i, n, -1, o, a); for (l = 0; l < t.length; l++)if (!Zh(t[l])) { var u = t[l].linePoints; if (u) { var h = u[1][0] - u[2][0]; t[l].x < e ? u[2][0] = t[l].x + 3 : u[2][0] = t[l].x - 3, u[1][1] = u[2][1] = t[l].y, u[1][0] = u[2][0] + h } } } function Zh(t) { return "center" === t.position } function Uh() { this.group = new tb } function Xh(t, e, i) { aD.call(this, t, e, i), this.type = "value", this.angle = 0, this.name = "", this.model } function jh(t, e, i) { this._model = t, this.dimensions = [], this._indicatorAxes = f(t.getIndicatorModels(), function (t, e) { var i = "indicator_" + e, n = new Xh(i, new TA); return n.name = t.get("name"), n.model = t, t.axis = n, this.dimensions.push(i), n }, this), this.resize(t, i), this.cx, this.cy, this.r, this.r0, this.startAngle } function Yh(t, e) { return r({ show: e }, t) } function qh(t) { return y(t) || (t = [+t, +t]), t } function Kh(t) { for (var e, i = 0; i < t.length; i++) { var n = t[i].getBoundingRect(); (e = e || n.clone()).union(n) } return e } function $h(t, e) { var i, n, o = t.svgXML; try { k(null != (n = (i = o && rs(o, { ignoreViewBox: !0, ignoreRootClip: !0 }) || {}).root)) } catch (t) { throw new Error("Invalid svg format\n" + t.message) } var a = i.width, r = i.height, s = i.viewBoxRect; if (e || (e = null == a || null == r ? n.getBoundingRect() : new de(0, 0, 0, 0), null != a && (e.width = a), null != r && (e.height = r)), s) { var l = as(s, e.width, e.height), u = n; (n = new tb).add(u), u.scale = l.scale, u.position = l.position } return n.setClipPath(new yM({ shape: e.plain() })), { root: n, boundingRect: e } } function Jh(t) { return function (e, i) { var n = []; return d(Qh(e), function (o) { var a = NC[o.type][t]; a && n.push(a(e, o, i)) }), n } } function Qh(t) { return DT.retrieveMap(t) || [] } function tc(t, e, i) { nc(t)[e] = i } function ec(t, e, i) { var n = nc(t); n[e] === i && (n[e] = null) } function ic(t, e) { return !!nc(t)[e] } function nc(t) { return t[EC] || (t[EC] = {}) } function oc(t) { this.pointerChecker, this._zr = t, this._opt = {}; var e = m, n = e(ac, this), o = e(rc, this), a = e(sc, this), s = e(lc, this), l = e(uc, this); fw.call(this), this.setPointerChecker = function (t) { this.pointerChecker = t }, this.enable = function (e, u) { this.disable(), this._opt = r(i(u) || {}, { zoomOnMouseWheel: !0, moveOnMouseMove: !0, moveOnMouseWheel: !1, preventDefaultMouseMove: !0 }), null == e && (e = !0), !0 !== e && "move" !== e && "pan" !== e || (t.on("mousedown", n), t.on("mousemove", o), t.on("mouseup", a)), !0 !== e && "scale" !== e && "zoom" !== e || (t.on("mousewheel", s), t.on("pinch", l)) }, this.disable = function () { t.off("mousedown", n), t.off("mousemove", o), t.off("mouseup", a), t.off("mousewheel", s), t.off("pinch", l) }, this.dispose = this.disable, this.isDragging = function () { return this._dragging }, this.isPinching = function () { return this._pinching } } function ac(t) { if (!(dt(t) || t.target && t.target.draggable)) { var e = t.offsetX, i = t.offsetY; this.pointerChecker && this.pointerChecker(t, e, i) && (this._x = e, this._y = i, this._dragging = !0) } } function rc(t) { if (this._dragging && dc("moveOnMouseMove", t, this._opt) && "pinch" !== t.gestureEvent && !ic(this._zr, "globalPan")) { var e = t.offsetX, i = t.offsetY, n = this._x, o = this._y, a = e - n, r = i - o; this._x = e, this._y = i, this._opt.preventDefaultMouseMove && mw(t.event), cc(this, "pan", "moveOnMouseMove", t, { dx: a, dy: r, oldX: n, oldY: o, newX: e, newY: i }) } } function sc(t) { dt(t) || (this._dragging = !1) } function lc(t) { var e = dc("zoomOnMouseWheel", t, this._opt), i = dc("moveOnMouseWheel", t, this._opt), n = t.wheelDelta, o = Math.abs(n), a = t.offsetX, r = t.offsetY; if (0 !== n && (e || i)) { if (e) { var s = o > 3 ? 1.4 : o > 1 ? 1.2 : 1.1; hc(this, "zoom", "zoomOnMouseWheel", t, { scale: n > 0 ? s : 1 / s, originX: a, originY: r }) } if (i) { var l = Math.abs(n); hc(this, "scrollMove", "moveOnMouseWheel", t, { scrollDelta: (n > 0 ? 1 : -1) * (l > 3 ? .4 : l > 1 ? .15 : .05), originX: a, originY: r }) } } } function uc(t) { ic(this._zr, "globalPan") || hc(this, "zoom", null, t, { scale: t.pinchScale > 1 ? 1.1 : 1 / 1.1, originX: t.pinchX, originY: t.pinchY }) } function hc(t, e, i, n, o) { t.pointerChecker && t.pointerChecker(n, o.originX, o.originY) && (mw(n.event), cc(t, e, i, n, o)) } function cc(t, e, i, n, o) { o.isAvailableBehavior = m(dc, null, i, n), t.trigger(e, o) } function dc(t, e, i) { var n = i[t]; return !t || n && (!_(n) || e.event[n + "Key"]) } function fc(t, e, i) { var n = t.target, o = n.position; o[0] += e, o[1] += i, n.dirty() } function pc(t, e, i, n) { var o = t.target, a = t.zoomLimit, r = o.position, s = o.scale, l = t.zoom = t.zoom || 1; if (l *= e, a) { var u = a.min || 0, h = a.max || 1 / 0; l = Math.max(Math.min(h, l), u) } var c = l / t.zoom; t.zoom = l, r[0] -= (i - r[0]) * (c - 1), r[1] -= (n - r[1]) * (c - 1), s[0] *= c, s[1] *= c, o.dirty() } function gc(t, e, i) { var n = e.getComponentByElement(t.topTarget), o = n && n.coordinateSystem; return n && n !== i && !RC[n.mainType] && o && o.model !== i } function mc(t, e) { var i = t.getItemStyle(), n = t.get("areaColor"); return null != n && (i.fill = n), i } function vc(t, e, i, n, o) { i.off("click"), i.off("mousedown"), e.get("selectedMode") && (i.on("mousedown", function () { t._mouseDownFlag = !0 }), i.on("click", function (a) { if (t._mouseDownFlag) { t._mouseDownFlag = !1; for (var r = a.target; !r.__regions;)r = r.parent; if (r) { var s = { type: ("geo" === e.mainType ? "geo" : "map") + "ToggleSelect", batch: f(r.__regions, function (t) { return { name: t.name, from: o.uid } }) }; s[e.mainType + "Id"] = e.id, n.dispatchAction(s), yc(e, i) } } })) } function yc(t, e) { e.eachChild(function (e) { d(e.__regions, function (i) { e.trigger(t.isSelected(i.name) ? "emphasis" : "normal") }) }) } function xc(t, e) { var i = new tb; this.uid = Ro("ec_map_draw"), this._controller = new oc(t.getZr()), this._controllerHost = { target: e ? i : null }, this.group = i, this._updateGroup = e, this._mouseDownFlag, this._mapName, this._initialized, i.add(this._regionsGroup = new tb), i.add(this._backgroundGroup = new tb) } function _c(t) { var e = this[zC]; e && e.recordVersion === this[BC] && wc(e, t) } function wc(t, e) { var i = t.circle, n = t.labelModel, o = t.hoverLabelModel, a = t.emphasisText, r = t.normalText; e ? (i.style.extendFrom(mo({}, o, { text: o.get("show") ? a : null }, { isRectText: !0, useInsideStyle: !1 }, !0)), i.__mapOriginalZ2 = i.z2, i.z2 += NM) : (mo(i.style, n, { text: n.get("show") ? r : null, textPosition: n.getShallow("position") || "bottom" }, { isRectText: !0, useInsideStyle: !1 }), i.dirty(!1), null != i.__mapOriginalZ2 && (i.z2 = i.__mapOriginalZ2, i.__mapOriginalZ2 = null)) } function bc(t, e, i) { var n = t.getZoom(), o = t.getCenter(), a = e.zoom, r = t.dataToPoint(o); if (null != e.dx && null != e.dy) { r[0] -= e.dx, r[1] -= e.dy; o = t.pointToData(r); t.setCenter(o) } if (null != a) { if (i) { var s = i.min || 0, l = i.max || 1 / 0; a = Math.max(Math.min(n * a, l), s) / n } t.scale[0] *= a, t.scale[1] *= a; var u = t.position, h = (e.originX - u[0]) * (a - 1), c = (e.originY - u[1]) * (a - 1); u[0] -= h, u[1] -= c, t.updateTransform(); o = t.pointToData(r); t.setCenter(o), t.setZoom(a * n) } return { center: t.getCenter(), zoom: t.getZoom() } } function Sc() { Tw.call(this) } function Mc(t) { this.name = t, this.zoomLimit, Tw.call(this), this._roamTransformable = new Sc, this._rawTransformable = new Sc, this._center, this._zoom } function Ic(t, e, i, n) { var o = i.seriesModel, a = o ? o.coordinateSystem : null; return a === this ? a[t](n) : null } function Tc(t, e, i, n) { Mc.call(this, t), this.map = e; var o = OC.load(e, i); this._nameCoordMap = o.nameCoordMap, this._regionsMap = o.regionsMap, this._invertLongitute = null == n || n, this.regions = o.regions, this._rect = o.boundingRect } function Ac(t, e, i, n) { var o = i.geoModel, a = i.seriesModel, r = o ? o.coordinateSystem : a ? a.coordinateSystem || (a.getReferringComponents("geo")[0] || {}).coordinateSystem : null; return r === this ? r[t](n) : null } function Dc(t, e) { var i = t.get("boundingCoords"); if (null != i) { var n = i[0], o = i[1]; isNaN(n[0]) || isNaN(n[1]) || isNaN(o[0]) || isNaN(o[1]) || this.setBoundingRect(n[0], n[1], o[0] - n[0], o[1] - n[1]) } var a, r = this.getBoundingRect(), s = t.get("layoutCenter"), l = t.get("layoutSize"), u = e.getWidth(), h = e.getHeight(), c = r.width / r.height * this.aspectScale, d = !1; s && l && (s = [Vo(s[0], u), Vo(s[1], h)], l = Vo(l, Math.min(u, h)), isNaN(s[0]) || isNaN(s[1]) || isNaN(l) || (d = !0)); if (d) { var f = {}; c > 1 ? (f.width = l, f.height = l / c) : (f.height = l, f.width = l * c), f.y = s[1] - f.height / 2, f.x = s[0] - f.width / 2 } else (a = t.getBoxLayoutParams()).aspect = c, f = ca(a, { width: u, height: h }); this.setViewRect(f.x, f.y, f.width, f.height), this.setCenter(t.get("center")), this.setZoom(t.get("zoom")) } function Cc(t, e) { d(e.get("geoCoord"), function (e, i) { t.addGeoCoord(i, e) }) } function Lc(t, e) { var i = {}; return d(t, function (t) { t.each(t.mapDimension("value"), function (e, n) { var o = "ec-" + t.getName(n); i[o] = i[o] || [], isNaN(e) || i[o].push(e) }) }), t[0].map(t[0].mapDimension("value"), function (n, o) { for (var a = "ec-" + t[0].getName(o), r = 0, s = 1 / 0, l = -1 / 0, u = i[a].length, h = 0; h < u; h++)s = Math.min(s, i[a][h]), l = Math.max(l, i[a][h]), r += i[a][h]; var c; return c = "min" === e ? s : "max" === e ? l : "average" === e ? r / u : r, 0 === u ? NaN : c }) } function kc(t) { var e = t.mainData, i = t.datas; i || (i = { main: e }, t.datasAttr = { main: "data" }), t.datas = t.mainData = null, zc(e, i, t), FC(i, function (i) { FC(e.TRANSFERABLE_METHODS, function (e) { i.wrapMethod(e, v(Pc, t)) }) }), e.wrapMethod("cloneShallow", v(Oc, t)), FC(e.CHANGABLE_METHODS, function (i) { e.wrapMethod(i, v(Nc, t)) }), k(i[e.dataType] === e) } function Pc(t, e) { if (Rc(this)) { var i = a({}, this[WC]); i[this.dataType] = e, zc(e, i, t) } else Bc(e, this.dataType, this[HC], t); return e } function Nc(t, e) { return t.struct && t.struct.update(this), e } function Oc(t, e) { return FC(e[WC], function (i, n) { i !== e && Bc(i.cloneShallow(), n, e, t) }), e } function Ec(t) { var e = this[HC]; return null == t || null == e ? e : e[WC][t] } function Rc(t) { return t[HC] === t } function zc(t, e, i) { t[WC] = {}, FC(e, function (e, n) { Bc(e, n, t, i) }) } function Bc(t, e, i, n) { i[WC][e] = t, t[HC] = i, t.dataType = e, n.struct && (t[n.structAttr] = n.struct, n.struct[n.datasAttr[e]] = t), t.getLinkedData = Ec } function Vc(t, e, i) { this.root, this.data, this._nodes = [], this.hostModel = t, this.levelModels = f(e || [], function (e) { return new No(e, t, t.ecModel) }), this.leavesModel = new No(i || {}, t, t.ecModel) } function Gc(t, e) { var i = e.children; t.parentNode !== e && (i.push(t), t.parentNode = e) } function Fc(t) { t.hierNode = { defaultAncestor: null, ancestor: t, prelim: 0, modifier: 0, change: 0, shift: 0, i: 0, thread: null }; for (var e, i, n = [t]; e = n.pop();)if (i = e.children, e.isExpand && i.length) for (var o = i.length - 1; o >= 0; o--) { var a = i[o]; a.hierNode = { defaultAncestor: null, ancestor: a, prelim: 0, modifier: 0, change: 0, shift: 0, i: o, thread: null }, n.push(a) } } function Wc(t, e) { var i = t.isExpand ? t.children : [], n = t.parentNode.children, o = t.hierNode.i ? n[t.hierNode.i - 1] : null; if (i.length) { jc(t); var a = (i[0].hierNode.prelim + i[i.length - 1].hierNode.prelim) / 2; o ? (t.hierNode.prelim = o.hierNode.prelim + e(t, o), t.hierNode.modifier = t.hierNode.prelim - a) : t.hierNode.prelim = a } else o && (t.hierNode.prelim = o.hierNode.prelim + e(t, o)); t.parentNode.hierNode.defaultAncestor = Yc(t, o, t.parentNode.hierNode.defaultAncestor || n[0], e) } function Hc(t) { var e = t.hierNode.prelim + t.parentNode.hierNode.modifier; t.setLayout({ x: e }, !0), t.hierNode.modifier += t.parentNode.hierNode.modifier } function Zc(t) { return arguments.length ? t : Qc } function Uc(t, e) { var i = {}; return t -= Math.PI / 2, i.x = e * Math.cos(t), i.y = e * Math.sin(t), i } function Xc(t, e) { return ca(t.getBoxLayoutParams(), { width: e.getWidth(), height: e.getHeight() }) } function jc(t) { for (var e = t.children, i = e.length, n = 0, o = 0; --i >= 0;) { var a = e[i]; a.hierNode.prelim += n, a.hierNode.modifier += n, o += a.hierNode.change, n += a.hierNode.shift + o } } function Yc(t, e, i, n) { if (e) { for (var o = t, a = t, r = a.parentNode.children[0], s = e, l = o.hierNode.modifier, u = a.hierNode.modifier, h = r.hierNode.modifier, c = s.hierNode.modifier; s = qc(s), a = Kc(a), s && a;) { o = qc(o), r = Kc(r), o.hierNode.ancestor = t; var d = s.hierNode.prelim + c - a.hierNode.prelim - u + n(s, a); d > 0 && (Jc($c(s, t, i), t, d), u += d, l += d), c += s.hierNode.modifier, u += a.hierNode.modifier, l += o.hierNode.modifier, h += r.hierNode.modifier } s && !qc(o) && (o.hierNode.thread = s, o.hierNode.modifier += c - l), a && !Kc(r) && (r.hierNode.thread = a, r.hierNode.modifier += u - h, i = t) } return i } function qc(t) { var e = t.children; return e.length && t.isExpand ? e[e.length - 1] : t.hierNode.thread } function Kc(t) { var e = t.children; return e.length && t.isExpand ? e[0] : t.hierNode.thread } function $c(t, e, i) { return t.hierNode.ancestor.parentNode === e.parentNode ? t.hierNode.ancestor : i } function Jc(t, e, i) { var n = i / (e.hierNode.i - t.hierNode.i); e.hierNode.change -= n, e.hierNode.shift += i, e.hierNode.modifier += i, e.hierNode.prelim += i, t.hierNode.change += n } function Qc(t, e) { return t.parentNode === e.parentNode ? 1 : 2 } function td(t, e) { var i = t.getItemLayout(e); return i && !isNaN(i.x) && !isNaN(i.y) && "none" !== t.getItemVisual(e, "symbol") } function ed(t, e, i) { return i.itemModel = e, i.itemStyle = e.getModel("itemStyle").getItemStyle(), i.hoverItemStyle = e.getModel("emphasis.itemStyle").getItemStyle(), i.lineStyle = e.getModel("lineStyle").getLineStyle(), i.labelModel = e.getModel("label"), i.hoverLabelModel = e.getModel("emphasis.label"), !1 === t.isExpand && 0 !== t.children.length ? i.symbolInnerColor = i.itemStyle.fill : i.symbolInnerColor = "#fff", i } function id(t, e, i, n, o, a) { var s = !i, l = t.tree.getNodeByDataIndex(e), a = ed(l, l.getModel(), a), u = t.tree.root, h = l.parentNode === u ? l : l.parentNode || l, c = t.getItemGraphicEl(h.dataIndex), d = h.getLayout(), f = c ? { x: c.position[0], y: c.position[1], rawX: c.__radialOldRawX, rawY: c.__radialOldRawY } : d, p = l.getLayout(); s ? (i = new wu(t, e, a)).attr("position", [f.x, f.y]) : i.updateData(t, e, a), i.__radialOldRawX = i.__radialRawX, i.__radialOldRawY = i.__radialRawY, i.__radialRawX = p.rawX, i.__radialRawY = p.rawY, n.add(i), t.setItemGraphicEl(e, i), Io(i, { position: [p.x, p.y] }, o); var g = i.getSymbolPath(); if ("radial" === a.layout) { var m, v, y = u.children[0], x = y.getLayout(), _ = y.children.length; if (p.x === x.x && !0 === l.isExpand) { var w = {}; w.x = (y.children[0].getLayout().x + y.children[_ - 1].getLayout().x) / 2, w.y = (y.children[0].getLayout().y + y.children[_ - 1].getLayout().y) / 2, (m = Math.atan2(w.y - x.y, w.x - x.x)) < 0 && (m = 2 * Math.PI + m), (v = w.x < x.x) && (m -= Math.PI) } else (m = Math.atan2(p.y - x.y, p.x - x.x)) < 0 && (m = 2 * Math.PI + m), 0 === l.children.length || 0 !== l.children.length && !1 === l.isExpand ? (v = p.x < x.x) && (m -= Math.PI) : (v = p.x > x.x) || (m -= Math.PI); var b = v ? "left" : "right"; g.setStyle({ textPosition: b, textRotation: -m, textOrigin: "center", verticalAlign: "middle" }) } if (l.parentNode && l.parentNode !== u) { var S = i.__edge; S || (S = i.__edge = new bM({ shape: od(a, f, f), style: r({ opacity: 0, strokeNoScale: !0 }, a.lineStyle) })), Io(S, { shape: od(a, d, p), style: { opacity: 1 } }, o), n.add(S) } } function nd(t, e, i, n, o, a) { for (var r, s = t.tree.getNodeByDataIndex(e), l = t.tree.root, a = ed(s, s.getModel(), a), u = s.parentNode === l ? s : s.parentNode || s; null == (r = u.getLayout());)u = u.parentNode === l ? u : u.parentNode || u; Io(i, { position: [r.x + 1, r.y + 1] }, o, function () { n.remove(i), t.setItemGraphicEl(e, null) }), i.fadeOut(null, { keepLabel: !0 }); var h = i.__edge; h && Io(h, { shape: od(a, r, r), style: { opacity: 0 } }, o, function () { n.remove(h) }) } function od(t, e, i) { var n, o, a, r, s, l, u, h, c = t.orient; if ("radial" === t.layout) { s = e.rawX, u = e.rawY, l = i.rawX, h = i.rawY; var d = Uc(s, u), f = Uc(s, u + (h - u) * t.curvature), p = Uc(l, h + (u - h) * t.curvature), g = Uc(l, h); 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 = e.x, u = e.y, l = i.x, h = i.y, "LR" !== c && "RL" !== c || (n = s + (l - s) * t.curvature, o = u, a = l + (s - l) * t.curvature, r = h), "TB" !== c && "BT" !== c || (n = s, o = u + (h - u) * t.curvature, a = l, r = h + (u - h) * t.curvature), { x1: s, y1: u, x2: l, y2: h, cpx1: n, cpy1: o, cpx2: a, cpy2: r } } function ad(t, e, i) { for (var n, o = [t], a = []; n = o.pop();)if (a.push(n), n.isExpand) { var r = n.children; if (r.length) for (var s = 0; s < r.length; s++)o.push(r[s]) } for (; n = a.pop();)e(n, i) } function rd(t, e) { for (var i, n = [t]; i = n.pop();)if (e(i), i.isExpand) { var o = i.children; if (o.length) for (var a = o.length - 1; a >= 0; a--)n.push(o[a]) } } function sd(t, e) { var i = Xc(t, e); t.layoutInfo = i; var n = t.get("layout"), o = 0, a = 0, r = null; "radial" === n ? (o = 2 * Math.PI, a = Math.min(i.height, i.width) / 2, r = Zc(function (t, e) { return (t.parentNode === e.parentNode ? 1 : 2) / t.depth })) : (o = i.width, a = i.height, r = Zc()); var s = t.getData().tree.root, l = s.children[0]; if (l) { Fc(s), ad(l, Wc, r), s.hierNode.modifier = -l.hierNode.prelim, rd(l, Hc); var u = l, h = l, c = l; rd(l, function (t) { var e = t.getLayout().x; e < u.getLayout().x && (u = t), e > h.getLayout().x && (h = t), t.depth > c.depth && (c = t) }); var d = u === h ? 1 : r(u, h) / 2, f = d - u.getLayout().x, p = 0, g = 0, m = 0, v = 0; if ("radial" === n) p = o / (h.getLayout().x + d + f), g = a / (c.depth - 1 || 1), rd(l, function (t) { m = (t.getLayout().x + f) * p, v = (t.depth - 1) * g; var e = Uc(m, v); t.setLayout({ x: e.x, y: e.y, rawX: m, rawY: v }, !0) }); else { var y = t.getOrient(); "RL" === y || "LR" === y ? (g = a / (h.getLayout().x + d + f), p = o / (c.depth - 1 || 1), rd(l, function (t) { v = (t.getLayout().x + f) * g, m = "LR" === y ? (t.depth - 1) * p : o - (t.depth - 1) * p, t.setLayout({ x: m, y: v }, !0) })) : "TB" !== y && "BT" !== y || (p = o / (h.getLayout().x + d + f), g = a / (c.depth - 1 || 1), rd(l, function (t) { m = (t.getLayout().x + f) * p, v = "TB" === y ? (t.depth - 1) * g : a - (t.depth - 1) * g, t.setLayout({ x: m, y: v }, !0) })) } } } function ld(t, e, i) { if (t && l(e, t.type) >= 0) { var n = i.getData().tree.root, o = t.targetNode; if ("string" == typeof o && (o = n.getNodeById(o)), o && n.contains(o)) return { node: o }; var a = t.targetNodeId; if (null != a && (o = n.getNodeById(a))) return { node: o } } } function ud(t) { for (var e = []; t;)(t = t.parentNode) && e.push(t); return e.reverse() } function hd(t, e) { return l(ud(t), e) >= 0 } function cd(t, e) { for (var i = []; t;) { var n = t.dataIndex; i.push({ name: t.name, dataIndex: n, value: e.getRawValue(n) }), t = t.parentNode } return i.reverse(), i } function dd(t) { var e = 0; d(t.children, function (t) { dd(t); var i = t.value; y(i) && (i = i[0]), e += i }); var i = t.value; y(i) && (i = i[0]), (null == i || isNaN(i)) && (i = e), i < 0 && (i = 0), y(t.value) ? t.value[0] = i : t.value = i } function fd(t, e) { var i = e.get("color"); if (i) { var n; return d(t = t || [], function (t) { var e = new No(t), i = e.get("color"); (e.get("itemStyle.color") || i && "none" !== i) && (n = !0) }), n || ((t[0] || (t[0] = {})).color = i.slice()), t } } function pd(t) { this.group = new tb, t.add(this.group) } function gd(t, e, i, n, o, a) { var r = [[o ? t : t - UC, e], [t + i, e], [t + i, e + n], [o ? t : t - UC, e + n]]; return !a && r.splice(2, 0, [t + i + UC, e + n / 2]), !o && r.push([t, e + n / 2]), r } function md(t, e, i) { t.eventData = { componentType: "series", componentSubType: "treemap", componentIndex: e.componentIndex, seriesIndex: e.componentIndex, seriesName: e.name, seriesType: "treemap", selfType: "breadcrumb", nodeData: { dataIndex: i && i.dataIndex, name: i && i.name }, treePathInfo: i && cd(i, e) } } function vd() { var t, e = [], i = {}; return { add: function (t, n, o, a, r) { return _(a) && (r = a, a = 0), !i[t.id] && (i[t.id] = 1, e.push({ el: t, target: n, time: o, delay: a, easing: r }), !0) }, done: function (e) { return t = e, this }, start: function () { for (var n = e.length, o = 0, a = e.length; o < a; o++) { var r = e[o]; r.el.animateTo(r.target, r.time, r.delay, r.easing, function () { --n || (e.length = 0, i = {}, t && t()) }) } return this } } } function yd(t, e, n, o, r, s, l, u, h, c) { function d(t, e) { w ? !t.invisible && s.push(t) : (e(), t.__tmWillVisible || (t.invisible = !1)) } function f(e, n, o, a, r, s) { var u = l.getModel(), h = T(t.getFormattedLabel(l.dataIndex, "normal", null, null, s ? "upperLabel" : "label"), u.get("name")); if (!s && v.isLeafRoot) { var c = t.get("drillDownIcon", !0); h = c ? c + " " + h : h } var d = u.getModel(s ? JC : KC), f = u.getModel(s ? QC : $C), p = d.getShallow("show"); go(e, n, d, f, { defaultText: p ? h : null, autoColor: o, isRectText: !0 }), s && (e.textRect = i(s)), e.truncate = p && d.get("ellipsis") ? { outerWidth: a, outerHeight: r, minChar: 2 } : null } function p(t, i, o, a) { var s = null != S && n[t][S], l = r[t]; return s ? (n[t][S] = null, g(l, s, t)) : w || ((s = new i({ z: xd(o, a) })).__tmDepth = o, s.__tmStorageName = t, m(l, s, t)), e[t][b] = s } function g(t, e, i) { (t[b] = {}).old = "nodeGroup" === i ? e.position.slice() : a({}, e.shape) } function m(t, e, i) { var n = t[b] = {}, a = l.parentNode; if (a && (!o || "drillDown" === o.direction)) { var s = 0, u = 0, h = r.background[a.getRawIndex()]; !o && h && h.old && (s = h.old.width, u = h.old.height), n.old = "nodeGroup" === i ? [0, u] : { x: s, y: u, width: 0, height: 0 } } n.fadein = "nodeGroup" !== i } if (l) { var v = l.getLayout(); if (v && v.isInView) { var y = v.width, x = v.height, _ = v.borderWidth, w = v.invisible, b = l.getRawIndex(), S = u && u.getRawIndex(), M = l.viewChildren, I = v.upperHeight, A = M && M.length, D = l.getModel("itemStyle"), C = l.getModel("emphasis.itemStyle"), L = p("nodeGroup", jC); if (L) { if (h.add(L), L.attr("position", [v.x || 0, v.y || 0]), L.__tmNodeWidth = y, L.__tmNodeHeight = x, v.isAboveViewRoot) return L; var k = p("background", YC, c, eL); if (k && function (e, i, n) { i.dataIndex = l.dataIndex, i.seriesIndex = t.seriesIndex, i.setShape({ x: 0, y: 0, width: y, height: x }); var o = l.getVisual("borderColor", !0), a = C.get("borderColor"); d(i, function () { var t = oL(D); t.fill = o; var e = nL(C); if (e.fill = a, n) { var r = y - 2 * _; f(t, e, o, r, I, { x: _, y: 0, width: r, height: I }) } else t.text = e.text = null; i.setStyle(t), fo(i, e) }), e.add(i) }(L, k, A && v.upperHeight), !A) { var P = p("content", YC, c, iL); P && function (e, i) { i.dataIndex = l.dataIndex, i.seriesIndex = t.seriesIndex; var n = Math.max(y - 2 * _, 0), o = Math.max(x - 2 * _, 0); i.culling = !0, i.setShape({ x: _, y: _, width: n, height: o }); var a = l.getVisual("color", !0); d(i, function () { var t = oL(D); t.fill = a; var e = nL(C); f(t, e, a, n, o), i.setStyle(t), fo(i, e) }), e.add(i) }(L, P) } return L } } } } function xd(t, e) { var i = t * tL + e; return (i - 1) / i } function _d(t) { var e = t.pieceList; t.hasSpecialVisual = !1, d(e, function (e, i) { e.originIndex = i, null != e.visual && (t.hasSpecialVisual = !0) }) } function wd(t) { var e = t.categories, i = t.visual, n = t.categoryMap = {}; if (sL(e, function (t, e) { n[t] = e }), !y(i)) { var o = []; w(i) ? sL(i, function (t, e) { var i = n[e]; o[null != i ? i : uL] = t }) : o[uL] = i, i = Ld(t, o) } for (var a = e.length - 1; a >= 0; a--)null == i[a] && (delete n[e[a]], e.pop()) } function bd(t, e) { var i = t.visual, n = []; w(i) ? sL(i, function (t) { n.push(t) }) : null != i && n.push(i); var o = { color: 1, symbol: 1 }; e || 1 !== n.length || o.hasOwnProperty(t.type) || (n[1] = n[0]), Ld(t, n) } function Sd(t) { return { applyVisual: function (e, i, n) { e = this.mapValueToVisual(e), n("color", t(i("color"), e)) }, _doMap: Dd([0, 1]) } } function Md(t) { var e = this.option.visual; return e[Math.round(Bo(t, [0, 1], [0, e.length - 1], !0))] || {} } function Id(t) { return function (e, i, n) { n(t, this.mapValueToVisual(e)) } } function Td(t) { var e = this.option.visual; return e[this.option.loop && t !== uL ? t % e.length : t] } function Ad() { return this.option.visual[0] } function Dd(t) { return { linear: function (e) { return Bo(e, t, this.option.visual, !0) }, category: Td, piecewise: function (e, i) { var n = Cd.call(this, i); return null == n && (n = Bo(e, t, this.option.visual, !0)), n }, fixed: Ad } } function Cd(t) { var e = this.option, i = e.pieceList; if (e.hasSpecialVisual) { var n = i[hL.findPieceIndex(t, i)]; if (n && n.visual) return n.visual[this.type] } } function Ld(t, e) { return t.visual = e, "color" === t.type && (t.parsedVisual = f(e, function (t) { return Gt(t) })), e } function kd(t, e, i) { return t ? e <= i : e < i } function Pd(t, e, i, n, o, a) { var r = t.getModel(), s = t.getLayout(); if (s && !s.invisible && s.isInView) { var l, u = t.getModel(pL), h = Nd(u, e, i[t.depth], n), c = u.get("borderColor"), f = u.get("borderColorSaturation"); null != f && (c = Ed(f, l = Od(h))), t.setVisual("borderColor", c); var p = t.viewChildren; if (p && p.length) { var g = zd(t, r, s, u, h, p); d(p, function (t, e) { (t.depth >= o.length || t === o[t.depth]) && Pd(t, Vd(r, h, t, e, g, a), i, n, o, a) }) } else l = Od(h), t.setVisual("color", l) } } function Nd(t, e, i, n) { var o = a({}, e); return d(["color", "colorAlpha", "colorSaturation"], function (a) { var r = t.get(a, !0); null == r && i && (r = i[a]), null == r && (r = e[a]), null == r && (r = n.get(a)), null != r && (o[a] = r) }), o } function Od(t) { var e = Rd(t, "color"); if (e) { var i = Rd(t, "colorAlpha"), n = Rd(t, "colorSaturation"); return n && (e = jt(e, null, null, n)), i && (e = Yt(e, i)), e } } function Ed(t, e) { return null != e ? jt(e, null, null, t) : null } function Rd(t, e) { var i = t[e]; if (null != i && "none" !== i) return i } function zd(t, e, i, n, o, a) { if (a && a.length) { var r = Bd(e, "color") || null != o.color && "none" !== o.color && (Bd(e, "colorAlpha") || Bd(e, "colorSaturation")); if (r) { var s = e.get("visualMin"), l = e.get("visualMax"), u = i.dataExtent.slice(); null != s && s < u[0] && (u[0] = s), null != l && l > u[1] && (u[1] = l); var h = e.get("colorMappingBy"), c = { type: r.name, dataExtent: u, visual: r.range }; "color" !== c.type || "index" !== h && "id" !== h ? c.mappingMethod = "linear" : (c.mappingMethod = "category", c.loop = !0); var d = new hL(c); return d.__drColorMappingBy = h, d } } } function Bd(t, e) { var i = t.get(e); return fL(i) && i.length ? { name: e, range: i } : null } function Vd(t, e, i, n, o, r) { var s = a({}, e); if (o) { var l = o.type, u = "color" === l && o.__drColorMappingBy, h = "index" === u ? n : "id" === u ? r.mapIdToIndex(i.getId()) : i.getValue(t.get("visualDimension")); s[l] = o.mapValueToVisual(h) } return s } function Gd(t, e, i, n) { var o, a; if (!t.isRemoved()) { var r = t.getLayout(); o = r.width, a = r.height; var s = (f = t.getModel()).get(_L), l = f.get(wL) / 2, u = Kd(f), h = Math.max(s, u), c = s - l, d = h - l, f = t.getModel(); t.setLayout({ borderWidth: s, upperHeight: h, upperLabelHeight: u }, !0); var p = (o = mL(o - 2 * c, 0)) * (a = mL(a - c - d, 0)), g = Fd(t, f, p, e, i, n); if (g.length) { var m = { x: c, y: d, width: o, height: a }, v = vL(o, a), y = 1 / 0, x = []; x.area = 0; for (var _ = 0, w = g.length; _ < w;) { var b = g[_]; x.push(b), x.area += b.getLayout().area; var S = Ud(x, v, e.squareRatio); S <= y ? (_++, y = S) : (x.area -= x.pop().getLayout().area, Xd(x, v, m, l, !1), v = vL(m.width, m.height), x.length = x.area = 0, y = 1 / 0) } if (x.length && Xd(x, v, m, l, !0), !i) { var M = f.get("childrenVisibleMin"); null != M && p < M && (i = !0) } for (var _ = 0, w = g.length; _ < w; _++)Gd(g[_], e, i, n + 1) } } } function Fd(t, e, i, n, o, a) { var r = t.children || [], s = n.sort; "asc" !== s && "desc" !== s && (s = null); var l = null != n.leafDepth && n.leafDepth <= a; if (o && !l) return t.viewChildren = []; Hd(r = g(r, function (t) { return !t.isRemoved() }), s); var u = Zd(e, r, s); if (0 === u.sum) return t.viewChildren = []; if (u.sum = Wd(e, i, u.sum, s, r), 0 === u.sum) return t.viewChildren = []; for (var h = 0, c = r.length; h < c; h++) { var d = r[h].getValue() / u.sum * i; r[h].setLayout({ area: d }) } return l && (r.length && t.setLayout({ isLeafRoot: !0 }, !0), r.length = 0), t.viewChildren = r, t.setLayout({ dataExtent: u.dataExtent }, !0), r } function Wd(t, e, i, n, o) { if (!n) return i; for (var a = t.get("visibleMin"), r = o.length, s = r, l = r - 1; l >= 0; l--) { var u = o["asc" === n ? r - l - 1 : l].getValue(); u / i * e < a && (s = l, i -= u) } return "asc" === n ? o.splice(0, r - s) : o.splice(s, r - s), i } function Hd(t, e) { return e && t.sort(function (t, i) { var n = "asc" === e ? t.getValue() - i.getValue() : i.getValue() - t.getValue(); return 0 === n ? "asc" === e ? t.dataIndex - i.dataIndex : i.dataIndex - t.dataIndex : n }), t } function Zd(t, e, i) { for (var n = 0, o = 0, a = e.length; o < a; o++)n += e[o].getValue(); var r = t.get("visualDimension"); if (e && e.length) if ("value" === r && i) s = [e[e.length - 1].getValue(), e[0].getValue()], "asc" === i && s.reverse(); else { var s = [1 / 0, -1 / 0]; xL(e, function (t) { var e = t.getValue(r); e < s[0] && (s[0] = e), e > s[1] && (s[1] = e) }) } else s = [NaN, NaN]; return { sum: n, dataExtent: s } } function Ud(t, e, i) { for (var n, o = 0, a = 1 / 0, r = 0, s = t.length; r < s; r++)(n = t[r].getLayout().area) && (n < a && (a = n), n > o && (o = n)); var l = t.area * t.area, u = e * e * i; return l ? mL(u * o / l, l / (u * a)) : 1 / 0 } function Xd(t, e, i, n, o) { var a = e === i.width ? 0 : 1, r = 1 - a, s = ["x", "y"], l = ["width", "height"], u = i[s[a]], h = e ? t.area / e : 0; (o || h > i[l[r]]) && (h = i[l[r]]); for (var c = 0, d = t.length; c < d; c++) { var f = t[c], p = {}, g = h ? f.getLayout().area / h : 0, m = p[l[r]] = mL(h - 2 * n, 0), v = i[s[a]] + i[l[a]] - u, y = c === d - 1 || v < g ? v : g, x = p[l[a]] = mL(y - 2 * n, 0); p[s[r]] = i[s[r]] + vL(n, m / 2), p[s[a]] = u + vL(n, x / 2), u += y, f.setLayout(p, !0) } i[s[r]] += h, i[l[r]] -= h } function jd(t, e, i, n, o) { var a = (e || {}).node, r = [n, o]; if (!a || a === i) return r; for (var s, l = n * o, u = l * t.option.zoomToNodeRatio; s = a.parentNode;) { for (var h = 0, c = s.children, d = 0, f = c.length; d < f; d++)h += c[d].getValue(); var p = a.getValue(); if (0 === p) return r; u *= h / p; var g = s.getModel(), m = g.get(_L); (u += 4 * m * m + (3 * m + Math.max(m, Kd(g))) * Math.pow(u, .5)) > XM && (u = XM), a = s } u < l && (u = l); var v = Math.pow(u / l, .5); return [n * v, o * v] } function Yd(t, e, i) { if (e) return { x: e.x, y: e.y }; var n = { x: 0, y: 0 }; if (!i) return n; var o = i.node, a = o.getLayout(); if (!a) return n; for (var r = [a.width / 2, a.height / 2], s = o; s;) { var l = s.getLayout(); r[0] += l.x, r[1] += l.y, s = s.parentNode } return { x: t.width / 2 - r[0], y: t.height / 2 - r[1] } } function qd(t, e, i, n, o) { var a = t.getLayout(), r = i[o], s = r && r === t; if (!(r && !s || o === i.length && t !== n)) { t.setLayout({ isInView: !0, invisible: !s && !e.intersect(a), isAboveViewRoot: s }, !0); var l = new de(e.x - a.x, e.y - a.y, e.width, e.height); xL(t.viewChildren || [], function (t) { qd(t, l, i, n, o + 1) }) } } function Kd(t) { return t.get(bL) ? t.get(SL) : 0 } function $d(t) { return "_EC_" + t } function Jd(t, e) { this.id = null == t ? "" : t, this.inEdges = [], this.outEdges = [], this.edges = [], this.hostGraph, this.dataIndex = null == e ? -1 : e } function Qd(t, e, i) { this.node1 = t, this.node2 = e, this.dataIndex = null == i ? -1 : i } function tf(t) { return isNaN(+t.cpx1) || isNaN(+t.cpy1) } function ef(t) { return "_" + t + "Type" } function nf(t, e, i) { var n = e.getItemVisual(i, "color"), o = e.getItemVisual(i, t), a = e.getItemVisual(i, t + "Size"); if (o && "none" !== o) { y(a) || (a = [a, a]); var r = Jl(o, -a[0] / 2, -a[1] / 2, a[0], a[1], n); return r.name = t, r } } function of(t) { var e = new PL({ name: "line" }); return af(e.shape, t), e } function af(t, e) { var i = e[0], n = e[1], o = e[2]; t.x1 = i[0], t.y1 = i[1], t.x2 = n[0], t.y2 = n[1], t.percent = 1, o ? (t.cpx1 = o[0], t.cpy1 = o[1]) : (t.cpx1 = NaN, t.cpy1 = NaN) } function rf(t, e, i) { tb.call(this), this._createLine(t, e, i) } function sf(t) { this._ctor = t || rf, this.group = new tb } function lf(t, e, i, n) { if (df(e.getItemLayout(i))) { var o = new t._ctor(e, i, n); e.setItemGraphicEl(i, o), t.group.add(o) } } function uf(t, e, i, n, o, a) { var r = e.getItemGraphicEl(n); df(i.getItemLayout(o)) ? (r ? r.updateData(i, o, a) : r = new t._ctor(i, o, a), i.setItemGraphicEl(o, r), t.group.add(r)) : t.group.remove(r) } function hf(t) { var e = t.hostModel; return { lineStyle: e.getModel("lineStyle").getLineStyle(), hoverLineStyle: e.getModel("emphasis.lineStyle").getLineStyle(), labelModel: e.getModel("label"), hoverLabelModel: e.getModel("emphasis.label") } } function cf(t) { return isNaN(t[0]) || isNaN(t[1]) } function df(t) { return !cf(t[0]) && !cf(t[1]) } function ff(t, e, i) { for (var n, o = t[0], a = t[1], r = t[2], s = 1 / 0, l = i * i, u = .1, h = .1; h <= .9; h += .1)RL[0] = VL(o[0], a[0], r[0], h), RL[1] = VL(o[1], a[1], r[1], h), (f = FL(GL(RL, e) - l)) < s && (s = f, n = h); for (var c = 0; c < 32; c++) { var d = n + u; zL[0] = VL(o[0], a[0], r[0], n), zL[1] = VL(o[1], a[1], r[1], n), BL[0] = VL(o[0], a[0], r[0], d), BL[1] = VL(o[1], a[1], r[1], d); var f = GL(zL, e) - l; if (FL(f) < .01) break; var p = GL(BL, e) - l; u /= 2, f < 0 ? p >= 0 ? n += u : n -= u : p >= 0 ? n -= u : n += u } return n } function pf(t, e) { return t.getVisual("opacity") || t.getModel().get(e) } function gf(t, e, i) { var n = t.getGraphicEl(), o = pf(t, e); null != i && (null == o && (o = 1), o *= i), n.downplay && n.downplay(), n.traverse(function (t) { if ("group" !== t.type) { var e = t.lineLabelOriginalOpacity; null != e && null == i || (e = o), t.setStyle("opacity", e) } }) } function mf(t, e) { var i = pf(t, e), n = t.getGraphicEl(); n.highlight && n.highlight(), n.traverse(function (t) { "group" !== t.type && t.setStyle("opacity", i) }) } function vf(t) { return t instanceof Array || (t = [t, t]), t } function yf(t) { var e = t.coordinateSystem; if (!e || "view" === e.type) { var i = t.getGraph(); i.eachNode(function (t) { var e = t.getModel(); t.setLayout([+e.get("x"), +e.get("y")]) }), xf(i) } } function xf(t) { t.eachEdge(function (t) { var e = t.getModel().get("lineStyle.curveness") || 0, i = F(t.node1.getLayout()), n = F(t.node2.getLayout()), o = [i, n]; +e && o.push([(i[0] + n[0]) / 2 - (i[1] - n[1]) * e, (i[1] + n[1]) / 2 - (n[0] - i[0]) * e]), t.setLayout(o) }) } function _f(t) { var e = t.coordinateSystem; if (!e || "view" === e.type) { var i = e.getBoundingRect(), n = t.getData(), o = n.graph, a = 0, r = n.getSum("value"), s = 2 * Math.PI / (r || n.count()), l = i.width / 2 + i.x, u = i.height / 2 + i.y, h = Math.min(i.width, i.height) / 2; o.eachNode(function (t) { var e = t.getValue("value"); a += s * (r ? e : 1) / 2, t.setLayout([h * Math.cos(a) + l, h * Math.sin(a) + u]), a += s * (r ? e : 1) / 2 }), n.setLayout({ cx: l, cy: u }), o.eachEdge(function (t) { var e, i = t.getModel().get("lineStyle.curveness") || 0, n = F(t.node1.getLayout()), o = F(t.node2.getLayout()), a = (n[0] + o[0]) / 2, r = (n[1] + o[1]) / 2; +i && (e = [l * (i *= 3) + a * (1 - i), u * i + r * (1 - i)]), t.setLayout([n, o, e]) }) } } function wf(t, e, i) { for (var n = i.rect, o = n.width, a = n.height, r = [n.x + o / 2, n.y + a / 2], s = null == i.gravity ? .1 : i.gravity, l = 0; l < t.length; l++) { var u = t[l]; u.p || (u.p = V(o * (Math.random() - .5) + r[0], a * (Math.random() - .5) + r[1])), u.pp = F(u.p), u.edges = null } var h = .6; return { warmUp: function () { h = .5 }, setFixed: function (e) { t[e].fixed = !0 }, setUnfixed: function (e) { t[e].fixed = !1 }, step: function (i) { for (var n = [], o = t.length, a = 0; a < e.length; a++) { var l = e[a], u = l.n1; U(n, (p = l.n2).p, u.p); var c = X(n) - l.d, d = p.w / (u.w + p.w); isNaN(d) && (d = 0), q(n, n), !u.fixed && XL(u.p, u.p, n, d * c * h), !p.fixed && XL(p.p, p.p, n, -(1 - d) * c * h) } for (a = 0; a < o; a++)(v = t[a]).fixed || (U(n, r, v.p), XL(v.p, v.p, n, s * h)); for (a = 0; a < o; a++)for (var u = t[a], f = a + 1; f < o; f++) { var p = t[f]; U(n, p.p, u.p), 0 === (c = X(n)) && (W(n, Math.random() - .5, Math.random() - .5), c = 1); var g = (u.rep + p.rep) / c / c; !u.fixed && XL(u.pp, u.pp, n, g), !p.fixed && XL(p.pp, p.pp, n, -g) } for (var m = [], a = 0; a < o; a++) { var v = t[a]; v.fixed || (U(m, v.p, v.pp), XL(v.p, v.p, m, h), G(v.pp, v.p)) } h *= .992, i && i(t, e, h < .01) } } } function bf(t, e, i) { var n = t.getBoxLayoutParams(); return n.aspect = i, ca(n, { width: e.getWidth(), height: e.getHeight() }) } function Sf(t, e) { var i = t.get("center"), n = e.getWidth(), o = e.getHeight(), a = Math.min(n, o); return { cx: Vo(i[0], e.getWidth()), cy: Vo(i[1], e.getHeight()), r: Vo(t.get("radius"), a / 2) } } function Mf(t, e) { return e && ("string" == typeof e ? t = e.replace("{value}", null != t ? t : "") : "function" == typeof e && (t = e(t))), t } function If(t, e) { function i() { a.ignore = a.hoverIgnore, r.ignore = r.hoverIgnore } function n() { a.ignore = a.normalIgnore, r.ignore = r.normalIgnore } tb.call(this); var o = new pM, a = new gM, r = new rM; this.add(o), this.add(a), this.add(r), this.updateData(t, e, !0), this.on("emphasis", i).on("normal", n).on("mouseover", i).on("mouseout", n) } function Tf(t, e) { return ca(t.getBoxLayoutParams(), { width: e.getWidth(), height: e.getHeight() }) } function Af(t, e) { for (var i = t.mapDimension("value"), n = t.mapArray(i, function (t) { return t }), o = [], a = "ascending" === e, r = 0, s = t.count(); r < s; r++)o[r] = r; return "function" == typeof e ? o.sort(e) : "none" !== e && o.sort(function (t, e) { return a ? n[t] - n[e] : n[e] - n[t] }), o } function Df(t) { t.each(function (e) { var i, n, o, a, r = t.getItemModel(e), s = r.getModel("label").get("position"), l = r.getModel("labelLine"), u = t.getItemLayout(e), h = u.points, c = "inner" === s || "inside" === s || "center" === s; if (c) i = "center", a = [[n = (h[0][0] + h[1][0] + h[2][0] + h[3][0]) / 4, o = (h[0][1] + h[1][1] + h[2][1] + h[3][1]) / 4], [n, o]]; else { var d, f, p, g = l.get("length"); "left" === s ? (d = (h[3][0] + h[0][0]) / 2, f = (h[3][1] + h[0][1]) / 2, n = (p = d - g) - 5, i = "right") : (d = (h[1][0] + h[2][0]) / 2, f = (h[1][1] + h[2][1]) / 2, n = (p = d + g) + 5, i = "left"); var m = f; a = [[d, f], [p, m]], o = m } u.label = { linePoints: a, x: n, y: o, verticalAlign: "middle", textAlign: i, inside: c } }) } function Cf(t) { if (!t.parallel) { var e = !1; d(t.series, function (t) { t && "parallel" === t.type && (e = !0) }), e && (t.parallel = [{}]) } } function Lf(t) { d(Di(t.parallelAxis), function (e) { if (w(e)) { var i = e.parallelIndex || 0, o = Di(t.parallel)[i]; o && o.parallelAxisDefault && n(e, o.parallelAxisDefault, !1) } }) } function kf(t, e) { var i = t[e] - t[1 - e]; return { span: Math.abs(i), sign: i > 0 ? -1 : i < 0 ? 1 : e ? -1 : 1 } } function Pf(t, e) { return Math.min(e[1], Math.max(e[0], t)) } function Nf(t, e, i) { this._axesMap = R(), this._axesLayout = {}, this.dimensions = t.dimensions, this._rect, this._model = t, this._init(t, e, i) } function Of(t, e) { return ek(ik(t, e[0]), e[1]) } function Ef(t, e) { var i = e.layoutLength / (e.axisCount - 1); return { position: i * t, axisNameAvailableWidth: i, axisLabelShow: !0 } } function Rf(t, e) { var i, n, o = e.layoutLength, a = e.axisExpandWidth, r = e.axisCount, s = e.axisCollapseWidth, l = e.winInnerIndices, u = s, h = !1; return t < l[0] ? (i = t * s, n = s) : t <= l[1] ? (i = e.axisExpandWindow0Pos + t * a - e.axisExpandWindow[0], u = a, h = !0) : (i = o - (r - 1 - t) * s, n = s), { position: i, axisNameAvailableWidth: u, axisLabelShow: h, nameTruncateMaxWidth: n } } function zf(t) { fw.call(this), this._zr = t, this.group = new tb, this._brushType, this._brushOption, this._panels, this._track = [], this._dragging, this._covers = [], this._creatingCover, this._creatingPanel, this._enableGlobalPan, this._uid = "brushController_" + bk++, this._handlers = {}, hk(Sk, function (t, e) { this._handlers[e] = m(t, this) }, this) } function Bf(t, e) { var o = t._zr; t._enableGlobalPan || tc(o, yk, t._uid), hk(t._handlers, function (t, e) { o.on(e, t) }), t._brushType = e.brushType, t._brushOption = n(i(wk), e, !0) } function Vf(t) { var e = t._zr; ec(e, yk, t._uid), hk(t._handlers, function (t, i) { e.off(i, t) }), t._brushType = t._brushOption = null } function Gf(t, e) { var i = Mk[e.brushType].createCover(t, e); return i.__brushOption = e, Hf(i, e), t.group.add(i), i } function Ff(t, e) { var i = Uf(e); return i.endCreating && (i.endCreating(t, e), Hf(e, e.__brushOption)), e } function Wf(t, e) { var i = e.__brushOption; Uf(e).updateCoverShape(t, e, i.range, i) } function Hf(t, e) { var i = e.z; null == i && (i = gk), t.traverse(function (t) { t.z = i, t.z2 = i }) } function Zf(t, e) { Uf(e).updateCommon(t, e), Wf(t, e) } function Uf(t) { return Mk[t.__brushOption.brushType] } function Xf(t, e, i) { var n = t._panels; if (!n) return !0; var o, a = t._transform; return hk(n, function (t) { t.isTargetByCursor(e, i, a) && (o = t) }), o } function jf(t, e) { var i = t._panels; if (!i) return !0; var n = e.__brushOption.panelId; return null == n || i[n] } function Yf(t) { var e = t._covers, i = e.length; return hk(e, function (e) { t.group.remove(e) }, t), e.length = 0, !!i } function qf(t, e) { var n = ck(t._covers, function (t) { var e = t.__brushOption, n = i(e.range); return { brushType: e.brushType, panelId: e.panelId, range: n } }); t.trigger("brush", n, { isEnd: !!e.isEnd, removeOnClick: !!e.removeOnClick }) } function Kf(t) { var e = t._track; if (!e.length) return !1; var i = e[e.length - 1], n = e[0], o = i[0] - n[0], a = i[1] - n[1]; return pk(o * o + a * a, .5) > mk } function $f(t) { var e = t.length - 1; return e < 0 && (e = 0), [t[0], t[e]] } function Jf(t, e, i, n) { var o = new tb; return o.add(new yM({ name: "main", style: ip(i), silent: !0, draggable: !0, cursor: "move", drift: uk(t, e, o, "nswe"), ondragend: uk(qf, e, { isEnd: !0 }) })), hk(n, function (i) { o.add(new yM({ name: i, style: { opacity: 0 }, draggable: !0, silent: !0, invisible: !0, drift: uk(t, e, o, i), ondragend: uk(qf, e, { isEnd: !0 }) })) }), o } function Qf(t, e, i, n) { var o = n.brushStyle.lineWidth || 0, a = fk(o, vk), r = i[0][0], s = i[1][0], l = r - o / 2, u = s - o / 2, h = i[0][1], c = i[1][1], d = h - a + o / 2, f = c - a + o / 2, p = h - r, g = c - s, m = p + o, v = g + o; ep(t, e, "main", r, s, p, g), n.transformable && (ep(t, e, "w", l, u, a, v), ep(t, e, "e", d, u, a, v), ep(t, e, "n", l, u, m, a), ep(t, e, "s", l, f, m, a), ep(t, e, "nw", l, u, a, a), ep(t, e, "ne", d, u, a, a), ep(t, e, "sw", l, f, a, a), ep(t, e, "se", d, f, a, a)) } function tp(t, e) { var i = e.__brushOption, n = i.transformable, o = e.childAt(0); o.useStyle(ip(i)), o.attr({ silent: !n, cursor: n ? "move" : "default" }), hk(["w", "e", "n", "s", "se", "sw", "ne", "nw"], function (i) { var o = e.childOfName(i), a = ap(t, i); o && o.attr({ silent: !n, invisible: !n, cursor: n ? _k[a] + "-resize" : null }) }) } function ep(t, e, i, n, o, a, r) { var s = e.childOfName(i); s && s.setShape(hp(up(t, e, [[n, o], [n + a, o + r]]))) } function ip(t) { return r({ strokeNoScale: !0 }, t.brushStyle) } function np(t, e, i, n) { var o = [dk(t, i), dk(e, n)], a = [fk(t, i), fk(e, n)]; return [[o[0], a[0]], [o[1], a[1]]] } function op(t) { return Ao(t.group) } function ap(t, e) { if (e.length > 1) return ("e" === (n = [ap(t, (e = e.split(""))[0]), ap(t, e[1])])[0] || "w" === n[0]) && n.reverse(), n.join(""); var i = { left: "w", right: "e", top: "n", bottom: "s" }, n = Co({ w: "left", e: "right", n: "top", s: "bottom" }[e], op(t)); return i[n] } function rp(t, e, i, n, o, a, r, s) { var l = n.__brushOption, u = t(l.range), h = lp(i, a, r); hk(o.split(""), function (t) { var e = xk[t]; u[e[0]][e[1]] += h[e[0]] }), l.range = e(np(u[0][0], u[1][0], u[0][1], u[1][1])), Zf(i, n), qf(i, { isEnd: !1 }) } function sp(t, e, i, n, o) { var a = e.__brushOption.range, r = lp(t, i, n); hk(a, function (t) { t[0] += r[0], t[1] += r[1] }), Zf(t, e), qf(t, { isEnd: !1 }) } function lp(t, e, i) { var n = t.group, o = n.transformCoordToLocal(e, i), a = n.transformCoordToLocal(0, 0); return [o[0] - a[0], o[1] - a[1]] } function up(t, e, n) { var o = jf(t, e); return o && !0 !== o ? o.clipPath(n, t._transform) : i(n) } function hp(t) { var e = dk(t[0][0], t[1][0]), i = dk(t[0][1], t[1][1]); return { x: e, y: i, width: fk(t[0][0], t[1][0]) - e, height: fk(t[0][1], t[1][1]) - i } } function cp(t, e, i) { if (t._brushType) { var n = t._zr, o = t._covers, a = Xf(t, e, i); if (!t._dragging) for (var r = 0; r < o.length; r++) { var s = o[r].__brushOption; if (a && (!0 === a || s.panelId === a.panelId) && Mk[s.brushType].contain(o[r], i[0], i[1])) return } a && n.setCursorStyle("crosshair") } } function dp(t) { var e = t.event; e.preventDefault && e.preventDefault() } function fp(t, e, i) { return t.childOfName("main").contain(e, i) } function pp(t, e, n, o) { var a, r = t._creatingCover, s = t._creatingPanel, l = t._brushOption; if (t._track.push(n.slice()), Kf(t) || r) { if (s && !r) { "single" === l.brushMode && Yf(t); var u = i(l); u.brushType = gp(u.brushType, s), u.panelId = !0 === s ? null : s.panelId, r = t._creatingCover = Gf(t, u), t._covers.push(r) } if (r) { var h = Mk[gp(t._brushType, s)]; r.__brushOption.range = h.getCreatingRange(up(t, r, t._track)), o && (Ff(t, r), h.updateCommon(t, r)), Wf(t, r), a = { isEnd: o } } } else o && "single" === l.brushMode && l.removeOnClick && Xf(t, e, n) && Yf(t) && (a = { isEnd: o, removeOnClick: !0 }); return a } function gp(t, e) { return "auto" === t ? e.defaultBrushType : t } function mp(t) { if (this._dragging) { dp(t); var e = pp(this, t, this.group.transformCoordToLocal(t.offsetX, t.offsetY), !0); this._dragging = !1, this._track = [], this._creatingCover = null, e && qf(this, e) } } function vp(t) { return { createCover: function (e, i) { return Jf(uk(rp, function (e) { var i = [e, [0, 100]]; return t && i.reverse(), i }, function (e) { return e[t] }), e, i, [["w", "e"], ["n", "s"]][t]) }, getCreatingRange: function (e) { var i = $f(e); return [dk(i[0][t], i[1][t]), fk(i[0][t], i[1][t])] }, updateCoverShape: function (e, i, n, o) { var a, r = jf(e, i); if (!0 !== r && r.getLinearBrushOtherExtent) a = r.getLinearBrushOtherExtent(t, e._transform); else { var s = e._zr; a = [0, [s.getWidth(), s.getHeight()][1 - t]] } var l = [n, a]; t && l.reverse(), Qf(e, i, l, o) }, updateCommon: tp, contain: fp } } function yp(t) { return t = wp(t), function (e, i) { return ko(e, t) } } function xp(t, e) { return t = wp(t), function (i) { var n = null != e ? e : i, o = n ? t.width : t.height, a = n ? t.x : t.y; return [a, a + (o || 0)] } } function _p(t, e, i) { return t = wp(t), function (n, o, a) { return t.contain(o[0], o[1]) && !gc(n, e, i) } } function wp(t) { return de.create(t) } function bp(t, e, i) { return i && "axisAreaSelect" === i.type && e.findComponents({ mainType: "parallelAxis", query: i })[0] === t } function Sp(t) { var e = t.axis; return f(t.activeIntervals, function (t) { return { brushType: "lineX", panelId: "pl", range: [e.dataToCoord(t[0], !0), e.dataToCoord(t[1], !0)] } }) } function Mp(t, e) { return e.getComponent("parallel", t.get("parallelIndex")) } function Ip(t, e) { var i = t._model; return i.get("axisExpandable") && i.get("axisExpandTriggerOn") === e } function Tp(t, e) { if (!t.encodeDefine) { var i = e.ecModel.getComponent("parallel", e.get("parallelIndex")); if (i) { var n = t.encodeDefine = R(); d(i.dimensions, function (t) { var e = Ap(t); n.set(t, e) }) } } } function Ap(t) { return +t.replace("dim", "") } function Dp(t, e, i) { var n = t.model, o = t.getRect(), a = new yM({ shape: { x: o.x, y: o.y, width: o.width, height: o.height } }), r = "horizontal" === n.get("layout") ? "width" : "height"; return a.setShape(r, 0), To(a, { shape: { width: o.width, height: o.height } }, e, i), a } function Cp(t, e, i, n) { for (var o = [], a = 0; a < i.length; a++) { var r = i[a], s = t.get(t.mapDimension(r), e); Np(s, n.getAxis(r).type) || o.push(n.dataToPoint(s, r)) } return o } function Lp(t, e, i, n, o) { var a = Cp(t, i, n, o), r = new gM({ shape: { points: a }, silent: !0, z2: 10 }); return e.add(r), t.setItemGraphicEl(i, r), r } function kp(t) { var e = t.get("smooth", !0); return !0 === e && (e = Dk), { lineStyle: t.getModel("lineStyle").getLineStyle(), smooth: null != e ? e : Dk } } function Pp(t, e, i, n) { var o = n.lineStyle; e.hasItemOption && (o = e.getItemModel(i).getModel("lineStyle").getLineStyle()), t.useStyle(o); var a = t.style; a.fill = null, a.stroke = e.getItemVisual(i, "color"), a.opacity = e.getItemVisual(i, "opacity"), n.smooth && (t.shape.smooth = n.smooth) } function Np(t, e) { return "category" === e ? null == t : null == t || isNaN(t) } function Op(t, e) { return t.getVisual("opacity") || t.getModel().get(e) } function Ep(t, e, i) { var n = t.getGraphicEl(), o = Op(t, e); null != i && (null == o && (o = 1), o *= i), n.downplay && n.downplay(), n.traverse(function (t) { "group" !== t.type && t.setStyle("opacity", o) }) } function Rp(t, e) { var i = Op(t, e), n = t.getGraphicEl(); n.highlight && n.highlight(), n.traverse(function (t) { "group" !== t.type && t.setStyle("opacity", i) }) } function zp(t, e, i) { var n = new yM({ shape: { x: t.x - 10, y: t.y - 10, width: 0, height: t.height + 20 } }); return To(n, { shape: { width: t.width + 20, height: t.height + 20 } }, e, i), n } function Bp(t, e) { return ca(t.getBoxLayoutParams(), { width: e.getWidth(), height: e.getHeight() }) } function Vp(t, e, i, n, o, a, r, s) { Fp(t, e, i, o, a, s), Zp(t, e, a, o, n, r, s), eg(t, s) } function Gp(t) { d(t, function (t) { var e = Qp(t.outEdges, Jp), i = Qp(t.inEdges, Jp), n = Math.max(e, i); t.setLayout({ value: n }, !0) }) } function Fp(t, e, i, n, o, a) { for (var r = [], s = [], l = [], u = [], h = 0, c = 0; c < e.length; c++)r[c] = 1; for (c = 0; c < t.length; c++)s[c] = t[c].inEdges.length, 0 === s[c] && l.push(t[c]); for (; l.length;) { for (var d = 0; d < l.length; d++) { var f = l[d]; "vertical" === a ? (f.setLayout({ y: h }, !0), f.setLayout({ dy: i }, !0)) : (f.setLayout({ x: h }, !0), f.setLayout({ dx: i }, !0)); for (var p = 0; p < f.outEdges.length; p++) { var g = f.outEdges[p]; r[e.indexOf(g)] = 0; var m = g.node2; 0 == --s[t.indexOf(m)] && u.push(m) } } ++h, l = u, u = [] } for (c = 0; c < r.length; c++); Wp(t, h, a), Hp(t, "vertical" === a ? (o - i) / (h - 1) : (n - i) / (h - 1), a) } function Wp(t, e, i) { d(t, function (t) { t.outEdges.length || ("vertical" === i ? t.setLayout({ y: e - 1 }, !0) : t.setLayout({ x: e - 1 }, !0)) }) } function Hp(t, e, i) { d(t, function (t) { if ("vertical" === i) { var n = t.getLayout().y * e; t.setLayout({ y: n }, !0) } else { var o = t.getLayout().x * e; t.setLayout({ x: o }, !0) } }) } function Zp(t, e, i, n, o, a, r) { var s = Up(t, r); Xp(t, s, e, i, n, o, r), jp(s, o, i, n, r); for (var l = 1; a > 0; a--)Yp(s, l *= .99, r), jp(s, o, i, n, r), tg(s, l, r), jp(s, o, i, n, r) } function Up(t, e) { var i = [], n = "vertical" === e ? "y" : "x", o = Zi(t, function (t) { return t.getLayout()[n] }); return o.keys.sort(function (t, e) { return t - e }), d(o.keys, function (t) { i.push(o.buckets.get(t)) }), i } function Xp(t, e, i, n, o, a, r) { var s = []; d(e, function (t) { var e = t.length, i = 0, l = 0; d(t, function (t) { i += t.getLayout().value }), l = "vertical" === r ? (o - (e - 1) * a) / i : (n - (e - 1) * a) / i, s.push(l) }), s.sort(function (t, e) { return t - e }); var l = s[0]; d(e, function (t) { d(t, function (t, e) { var i = t.getLayout().value * l; "vertical" === r ? (t.setLayout({ x: e }, !0), t.setLayout({ dx: i }, !0)) : (t.setLayout({ y: e }, !0), t.setLayout({ dy: i }, !0)) }) }), d(i, function (t) { var e = +t.getValue() * l; t.setLayout({ dy: e }, !0) }) } function jp(t, e, i, n, o) { d(t, function (t) { var a, r, s, l = 0, u = t.length; if ("vertical" === o) { var h; for (t.sort(function (t, e) { return t.getLayout().x - e.getLayout().x }), s = 0; s < u; s++)(r = l - (a = t[s]).getLayout().x) > 0 && (h = a.getLayout().x + r, a.setLayout({ x: h }, !0)), l = a.getLayout().x + a.getLayout().dx + e; if ((r = l - e - n) > 0) for (h = a.getLayout().x - r, a.setLayout({ x: h }, !0), l = h, s = u - 2; s >= 0; --s)(r = (a = t[s]).getLayout().x + a.getLayout().dx + e - l) > 0 && (h = a.getLayout().x - r, a.setLayout({ x: h }, !0)), l = a.getLayout().x } else { var c; for (t.sort(function (t, e) { return t.getLayout().y - e.getLayout().y }), s = 0; s < u; s++)(r = l - (a = t[s]).getLayout().y) > 0 && (c = a.getLayout().y + r, a.setLayout({ y: c }, !0)), l = a.getLayout().y + a.getLayout().dy + e; if ((r = l - e - i) > 0) for (c = a.getLayout().y - r, a.setLayout({ y: c }, !0), l = c, s = u - 2; s >= 0; --s)(r = (a = t[s]).getLayout().y + a.getLayout().dy + e - l) > 0 && (c = a.getLayout().y - r, a.setLayout({ y: c }, !0)), l = a.getLayout().y } }) } function Yp(t, e, i) { d(t.slice().reverse(), function (t) { d(t, function (t) { if (t.outEdges.length) { var n = Qp(t.outEdges, qp, i) / Qp(t.outEdges, Jp, i); if ("vertical" === i) { var o = t.getLayout().x + (n - $p(t, i)) * e; t.setLayout({ x: o }, !0) } else { var a = t.getLayout().y + (n - $p(t, i)) * e; t.setLayout({ y: a }, !0) } } }) }) } function qp(t, e) { return $p(t.node2, e) * t.getValue() } function Kp(t, e) { return $p(t.node1, e) * t.getValue() } function $p(t, e) { return "vertical" === e ? t.getLayout().x + t.getLayout().dx / 2 : t.getLayout().y + t.getLayout().dy / 2 } function Jp(t) { return t.getValue() } function Qp(t, e, i) { for (var n = 0, o = t.length, a = -1; ++a < o;) { var r = +e.call(t, t[a], i); isNaN(r) || (n += r) } return n } function tg(t, e, i) { d(t, function (t) { d(t, function (t) { if (t.inEdges.length) { var n = Qp(t.inEdges, Kp, i) / Qp(t.inEdges, Jp, i); if ("vertical" === i) { var o = t.getLayout().x + (n - $p(t, i)) * e; t.setLayout({ x: o }, !0) } else { var a = t.getLayout().y + (n - $p(t, i)) * e; t.setLayout({ y: a }, !0) } } }) }) } function eg(t, e) { d(t, function (t) { "vertical" === e ? (t.outEdges.sort(function (t, e) { return t.node2.getLayout().x - e.node2.getLayout().x }), t.inEdges.sort(function (t, e) { return t.node1.getLayout().x - e.node1.getLayout().x })) : (t.outEdges.sort(function (t, e) { return t.node2.getLayout().y - e.node2.getLayout().y }), t.inEdges.sort(function (t, e) { return t.node1.getLayout().y - e.node1.getLayout().y })) }), d(t, function (t) { var e = 0, i = 0; d(t.outEdges, function (t) { t.setLayout({ sy: e }, !0), e += t.getLayout().dy }), d(t.inEdges, function (t) { t.setLayout({ ty: i }, !0), i += t.getLayout().dy }) }) } function ig(t, e, i, n, o) { var a = t.ends, r = new zk({ shape: { points: o ? og(a, n, t) : a } }); return ng(t, r, e, i, o), r } function ng(t, e, i, n, o) { var a = i.hostModel; (0, zM[o ? "initProps" : "updateProps"])(e, { shape: { points: t.ends } }, a, n); var r = i.getItemModel(n), s = r.getModel(Ek), l = i.getItemVisual(n, "color"), u = s.getItemStyle(["borderColor"]); u.stroke = l, u.strokeNoScale = !0, e.useStyle(u), e.z2 = 100, fo(e, r.getModel(Rk).getItemStyle()) } function og(t, e, i) { return f(t, function (t) { return t = t.slice(), t[e] = i.initBaseline, t }) } function ag(t) { var e = [], i = []; return t.eachSeriesByType("boxplot", function (t) { var n = t.getBaseAxis(), o = l(i, n); o < 0 && (o = i.length, i[o] = n, e[o] = { axis: n, seriesModels: [] }), e[o].seriesModels.push(t) }), e } function rg(t) { var e, i, n = t.axis, o = t.seriesModels, a = o.length, r = t.boxWidthList = [], s = t.boxOffsetList = [], l = []; if ("category" === n.type) i = n.getBandWidth(); else { var u = 0; Vk(o, function (t) { u = Math.max(u, t.getData().count()) }), e = n.getExtent(), Math.abs(e[1] - e[0]) } Vk(o, function (t) { var e = t.get("boxWidth"); y(e) || (e = [e, e]), l.push([Vo(e[0], i) || 0, Vo(e[1], i) || 0]) }); var h = .8 * i - 2, c = h / a * .3, d = (h - c * (a - 1)) / a, f = d / 2 - h / 2; Vk(o, function (t, e) { s.push(f), f += c + d, r.push(Math.min(Math.max(d, l[e][0]), l[e][1])) }) } function sg(t, e, i) { function n(t, i, n) { var o = s.get(i, n), a = []; a[u] = t, a[h] = o; var l; return isNaN(t) || isNaN(o) ? l = [NaN, NaN] : (l = r.dataToPoint(a))[u] += e, l } function o(t, e, i) { var n = e.slice(), o = e.slice(); n[u] += l, o[u] -= l, i ? t.push(n, o) : t.push(o, n) } function a(t, e) { var i = e.slice(), n = e.slice(); i[u] -= l, n[u] += l, t.push(i, n) } var r = t.coordinateSystem, s = t.getData(), l = i / 2, u = "horizontal" === t.get("layout") ? 0 : 1, h = 1 - u, c = ["x", "y"], d = s.mapDimension(c[u]), f = s.mapDimension(c[h], !0); if (!(null == d || f.length < 5)) for (var p = 0; p < s.count(); p++) { var g = s.get(d, p), m = n(g, f[2], p), v = n(g, f[0], p), y = n(g, f[1], p), x = n(g, f[3], p), _ = n(g, f[4], p), w = []; o(w, y, 0), o(w, x, 1), w.push(v, y, _, x), a(w, v), a(w, _), a(w, m), s.setItemLayout(p, { initBaseline: m[h], ends: w }) } } function lg(t, e, i) { var n = t.ends; return new Hk({ shape: { points: i ? hg(n, t) : n }, z2: 100 }) } function ug(t, e, i, n) { var o = e.getItemModel(i), a = o.getModel(Gk), r = e.getItemVisual(i, "color"), s = e.getItemVisual(i, "borderColor") || r, l = a.getItemStyle(Wk); t.useStyle(l), t.style.strokeNoScale = !0, t.style.fill = r, t.style.stroke = s, t.__simpleBox = n, fo(t, o.getModel(Fk).getItemStyle()) } function hg(t, e) { return f(t, function (t) { return t = t.slice(), t[1] = e.initBaseline, t }) } function cg(t, e, i) { var n = t.getData(), o = n.getLayout("largePoints"), a = new Zk({ shape: { points: o }, __sign: 1 }); e.add(a); var r = new Zk({ shape: { points: o }, __sign: -1 }); e.add(r), dg(1, a, t, n), dg(-1, r, t, n), i && (a.incremental = !0, r.incremental = !0) } function dg(t, e, i, n) { var o = t > 0 ? "P" : "N", a = n.getVisual("borderColor" + o) || n.getVisual("color" + o), r = i.getModel(Gk).getItemStyle(Wk); e.useStyle(r), e.style.fill = null, e.style.stroke = a } function fg(t, e, i, n, o) { return i > n ? -1 : i < n ? 1 : e > 0 ? t.get(o, e - 1) <= n ? 1 : -1 : 1 } function pg(t, e) { var i, n = t.getBaseAxis(), o = "category" === n.type ? n.getBandWidth() : (i = n.getExtent(), Math.abs(i[1] - i[0]) / e.count()), a = Vo(A(t.get("barMaxWidth"), o), o), r = Vo(A(t.get("barMinWidth"), 1), o), s = t.get("barWidth"); return null != s ? Vo(s, o) : Math.max(Math.min(o / 2, a), r) } function gg(t) { return y(t) || (t = [+t, +t]), t } function mg(t, e) { t.eachChild(function (t) { t.attr({ z: e.z, zlevel: e.zlevel, style: { stroke: "stroke" === e.brushType ? e.color : null, fill: "fill" === e.brushType ? e.color : null } }) }) } function vg(t, e) { tb.call(this); var i = new wu(t, e), n = new tb; this.add(i), this.add(n), n.beforeUpdate = function () { this.attr(i.getScale()) }, this.updateData(t, e) } function yg(t) { var e = t.data; e && e[0] && e[0][0] && e[0][0].coord && (t.data = f(e, function (t) { var e = { coords: [t[0].coord, t[1].coord] }; return t[0].name && (e.fromName = t[0].name), t[1].name && (e.toName = t[1].name), o([e, t[0], t[1]]) })) } function xg(t, e, i) { tb.call(this), this.add(this.createLine(t, e, i)), this._updateEffectSymbol(t, e) } function _g(t, e, i) { tb.call(this), this._createPolyline(t, e, i) } function wg(t, e, i) { xg.call(this, t, e, i), this._lastFrame = 0, this._lastFramePercent = 0 } function bg() { this.group = new tb } function Sg(t) { return t instanceof Array || (t = [t, t]), t } function Mg() { var t = iw(); this.canvas = t, this.blurSize = 30, this.pointSize = 20, this.maxOpacity = 1, this.minOpacity = 0, this._gradientPixels = {} } function Ig(t, e, i) { var n = t[1] - t[0], o = (e = f(e, function (e) { return { interval: [(e.interval[0] - t[0]) / n, (e.interval[1] - t[0]) / n] } })).length, a = 0; return function (t) { for (n = a; n < o; n++)if ((r = e[n].interval)[0] <= t && t <= r[1]) { a = n; break } if (n === o) for (var n = a - 1; n >= 0; n--) { var r = e[n].interval; if (r[0] <= t && t <= r[1]) { a = n; break } } return n >= 0 && n < o && i[n] } } function Tg(t, e) { var i = t[1] - t[0]; return e = [(e[0] - t[0]) / i, (e[1] - t[0]) / i], function (t) { return t >= e[0] && t <= e[1] } } function Ag(t) { var e = t.dimensions; return "lng" === e[0] && "lat" === e[1] } function Dg(t, e, i, n) { var o = t.getItemLayout(e), a = i.get("symbolRepeat"), r = i.get("symbolClip"), s = i.get("symbolPosition") || "start", l = (i.get("symbolRotate") || 0) * Math.PI / 180 || 0, u = i.get("symbolPatternSize") || 2, h = i.isAnimationEnabled(), c = { dataIndex: e, layout: o, itemModel: i, symbolType: t.getItemVisual(e, "symbol") || "circle", color: t.getItemVisual(e, "color"), symbolClip: r, symbolRepeat: a, symbolRepeatDirection: i.get("symbolRepeatDirection"), symbolPatternSize: u, rotation: l, animationModel: h ? i : null, hoverAnimation: h && i.get("hoverAnimation"), z2: i.getShallow("z", !0) || 0 }; Cg(i, a, o, n, c), kg(t, e, o, a, r, c.boundingLength, c.pxSign, u, n, c), Pg(i, c.symbolScale, l, n, c); var d = c.symbolSize, f = i.get("symbolOffset"); return y(f) && (f = [Vo(f[0], d[0]), Vo(f[1], d[1])]), Ng(i, d, o, a, r, f, s, c.valueLineWidth, c.boundingLength, c.repeatCutLength, n, c), c } function Cg(t, e, i, n, o) { var a, r = n.valueDim, s = t.get("symbolBoundingData"), l = n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()), u = l.toGlobalCoord(l.dataToCoord(0)), h = 1 - +(i[r.wh] <= 0); if (y(s)) { var c = [Lg(l, s[0]) - u, Lg(l, s[1]) - u]; c[1] < c[0] && c.reverse(), a = c[h] } else a = null != s ? Lg(l, s) - u : e ? n.coordSysExtent[r.index][h] - u : i[r.wh]; o.boundingLength = a, e && (o.repeatCutLength = i[r.wh]), o.pxSign = a > 0 ? 1 : a < 0 ? -1 : 0 } function Lg(t, e) { return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e))) } function kg(t, e, i, n, o, a, r, s, l, u) { var h = l.valueDim, c = l.categoryDim, d = Math.abs(i[c.wh]), f = t.getItemVisual(e, "symbolSize"); y(f) ? f = f.slice() : (null == f && (f = "100%"), f = [f, f]), f[c.index] = Vo(f[c.index], d), f[h.index] = Vo(f[h.index], n ? d : Math.abs(a)), u.symbolSize = f, (u.symbolScale = [f[0] / s, f[1] / s])[h.index] *= (l.isHorizontal ? -1 : 1) * r } function Pg(t, e, i, n, o) { var a = t.get(cP) || 0; a && (fP.attr({ scale: e.slice(), rotation: i }), fP.updateTransform(), a /= fP.getLineScale(), a *= e[n.valueDim.index]), o.valueLineWidth = a } function Ng(t, e, i, n, o, r, s, l, u, h, c, d) { var f = c.categoryDim, p = c.valueDim, g = d.pxSign, m = Math.max(e[p.index] + l, 0), v = m; if (n) { var y = Math.abs(u), x = T(t.get("symbolMargin"), "15%") + "", _ = !1; x.lastIndexOf("!") === x.length - 1 && (_ = !0, x = x.slice(0, x.length - 1)), x = Vo(x, e[p.index]); var w = Math.max(m + 2 * x, 0), b = _ ? 0 : 2 * x, S = Qo(n), M = S ? n : Kg((y + b) / w); w = m + 2 * (x = (y - M * m) / 2 / (_ ? M : M - 1)), b = _ ? 0 : 2 * x, S || "fixed" === n || (M = h ? Kg((Math.abs(h) + b) / w) : 0), v = M * w - b, d.repeatTimes = M, d.symbolMargin = x } var I = g * (v / 2), A = d.pathPosition = []; A[f.index] = i[f.wh] / 2, A[p.index] = "start" === s ? I : "end" === s ? u - I : u / 2, r && (A[0] += r[0], A[1] += r[1]); var D = d.bundlePosition = []; D[f.index] = i[f.xy], D[p.index] = i[p.xy]; var C = d.barRectShape = a({}, i); C[p.wh] = g * Math.max(Math.abs(i[p.wh]), Math.abs(A[p.index] + I)), C[f.wh] = i[f.wh]; var L = d.clipShape = {}; L[f.xy] = -i[f.xy], L[f.wh] = c.ecSize[f.wh], L[p.xy] = 0, L[p.wh] = i[p.wh] } function Og(t) { var e = t.symbolPatternSize, i = Jl(t.symbolType, -e / 2, -e / 2, e, e, t.color); return i.attr({ culling: !0 }), "image" !== i.type && i.setStyle({ strokeNoScale: !0 }), i } function Eg(t, e, i, n) { function o(t) { var e = l.slice(), n = i.pxSign, o = t; return ("start" === i.symbolRepeatDirection ? n > 0 : n < 0) && (o = h - 1 - t), e[u.index] = d * (o - h / 2 + .5) + l[u.index], { position: e, scale: i.symbolScale.slice(), rotation: i.rotation } } var a = t.__pictorialBundle, r = i.symbolSize, s = i.valueLineWidth, l = i.pathPosition, u = e.valueDim, h = i.repeatTimes || 0, c = 0, d = r[e.valueDim.index] + s + 2 * i.symbolMargin; for (jg(t, function (t) { t.__pictorialAnimationIndex = c, t.__pictorialRepeatTimes = h, c < h ? Yg(t, null, o(c), i, n) : Yg(t, null, { scale: [0, 0] }, i, n, function () { a.remove(t) }), Wg(t, i), c++ }); c < h; c++) { var f = Og(i); f.__pictorialAnimationIndex = c, f.__pictorialRepeatTimes = h, a.add(f); var p = o(c); Yg(f, { position: p.position, scale: [0, 0] }, { scale: p.scale, rotation: p.rotation }, i, n), f.on("mouseover", function () { jg(t, function (t) { t.trigger("emphasis") }) }).on("mouseout", function () { jg(t, function (t) { t.trigger("normal") }) }), Wg(f, i) } } function Rg(t, e, i, n) { var o = t.__pictorialBundle, a = t.__pictorialMainPath; a ? Yg(a, null, { position: i.pathPosition.slice(), scale: i.symbolScale.slice(), rotation: i.rotation }, i, n) : (a = t.__pictorialMainPath = Og(i), o.add(a), Yg(a, { position: i.pathPosition.slice(), scale: [0, 0], rotation: i.rotation }, { scale: i.symbolScale.slice() }, i, n), a.on("mouseover", function () { this.trigger("emphasis") }).on("mouseout", function () { this.trigger("normal") })), Wg(a, i) } function zg(t, e, i) { var n = a({}, e.barRectShape), o = t.__pictorialBarRect; o ? Yg(o, null, { shape: n }, e, i) : (o = t.__pictorialBarRect = new yM({ z2: 2, shape: n, silent: !0, style: { stroke: "transparent", fill: "transparent", lineWidth: 0 } }), t.add(o)) } function Bg(t, e, i, n) { if (i.symbolClip) { var o = t.__pictorialClipPath, r = a({}, i.clipShape), s = e.valueDim, l = i.animationModel, u = i.dataIndex; if (o) Io(o, { shape: r }, l, u); else { r[s.wh] = 0, o = new yM({ shape: r }), t.__pictorialBundle.setClipPath(o), t.__pictorialClipPath = o; var h = {}; h[s.wh] = i.clipShape[s.wh], zM[n ? "updateProps" : "initProps"](o, { shape: h }, l, u) } } } function Vg(t, e) { var i = t.getItemModel(e); return i.getAnimationDelayParams = Gg, i.isAnimationEnabled = Fg, i } function Gg(t) { return { index: t.__pictorialAnimationIndex, count: t.__pictorialRepeatTimes } } function Fg() { return this.parentModel.isAnimationEnabled() && !!this.getShallow("animation") } function Wg(t, e) { t.off("emphasis").off("normal"); var i = e.symbolScale.slice(); e.hoverAnimation && t.on("emphasis", function () { this.animateTo({ scale: [1.1 * i[0], 1.1 * i[1]] }, 400, "elasticOut") }).on("normal", function () { this.animateTo({ scale: i.slice() }, 400, "elasticOut") }) } function Hg(t, e, i, n) { var o = new tb, a = new tb; return o.add(a), o.__pictorialBundle = a, a.attr("position", i.bundlePosition.slice()), i.symbolRepeat ? Eg(o, e, i) : Rg(o, e, i), zg(o, i, n), Bg(o, e, i, n), o.__pictorialShapeStr = Xg(t, i), o.__pictorialSymbolMeta = i, o } function Zg(t, e, i) { var n = i.animationModel, o = i.dataIndex; Io(t.__pictorialBundle, { position: i.bundlePosition.slice() }, n, o), i.symbolRepeat ? Eg(t, e, i, !0) : Rg(t, e, i, !0), zg(t, i, !0), Bg(t, e, i, !0) } function Ug(t, e, i, n) { var o = n.__pictorialBarRect; o && (o.style.text = null); var a = []; jg(n, function (t) { a.push(t) }), n.__pictorialMainPath && a.push(n.__pictorialMainPath), n.__pictorialClipPath && (i = null), d(a, function (t) { Io(t, { scale: [0, 0] }, i, e, function () { n.parent && n.parent.remove(n) }) }), t.setItemGraphicEl(e, null) } function Xg(t, e) { return [t.getItemVisual(e.dataIndex, "symbol") || "none", !!e.symbolRepeat, !!e.symbolClip].join(":") } function jg(t, e, i) { d(t.__pictorialBundle.children(), function (n) { n !== t.__pictorialBarRect && e.call(i, n) }) } function Yg(t, e, i, n, o, a) { e && t.attr(e), n.symbolClip && !o ? i && t.attr(i) : i && zM[o ? "updateProps" : "initProps"](t, i, n.animationModel, n.dataIndex, a) } function qg(t, e, i) { var n = i.color, o = i.dataIndex, a = i.itemModel, s = a.getModel("itemStyle").getItemStyle(["color"]), l = a.getModel("emphasis.itemStyle").getItemStyle(), u = a.getShallow("cursor"); jg(t, function (t) { t.setColor(n), t.setStyle(r({ fill: n, opacity: i.opacity }, s)), fo(t, l), u && (t.cursor = u), t.z2 = i.z2 }); var h = {}, c = e.valueDim.posDesc[+(i.boundingLength > 0)], d = t.__pictorialBarRect; kh(d.style, h, a, n, e.seriesModel, o, c), fo(d, h) } function Kg(t) { var e = Math.round(t); return Math.abs(t - e) < 1e-4 ? e : Math.ceil(t) } function $g(t, e, i) { this.dimension = "single", this.dimensions = ["single"], this._axis = null, this._rect, this._init(t, e, i), this.model = t } function Jg(t, e) { e = e || {}; var i = t.coordinateSystem, n = t.axis, o = {}, a = n.position, r = n.orient, s = i.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] } }; o.position = ["vertical" === r ? u.vertical[a] : l[0], "horizontal" === r ? u.horizontal[a] : l[3]]; var h = { horizontal: 0, vertical: 1 }; o.rotation = Math.PI / 2 * h[r]; var c = { top: -1, bottom: 1, right: 1, left: -1 }; o.labelDirection = o.tickDirection = o.nameDirection = c[a], t.get("axisTick.inside") && (o.tickDirection = -o.tickDirection), T(e.labelInside, t.get("axisLabel.inside")) && (o.labelDirection = -o.labelDirection); var d = e.rotate; return null == d && (d = t.get("axisLabel.rotate")), o.labelRotation = "top" === a ? -d : d, o.z2 = 1, o } function Qg(t, e, i, n, o) { var r = t.axis; if (!r.scale.isBlank() && r.containData(e)) if (t.involveSeries) { var s = tm(e, t), l = s.payloadBatch, u = s.snapToValue; l[0] && null == o.seriesIndex && a(o, l[0]), !n && t.snap && r.containData(u) && null != u && (e = u), i.showPointer(t, e, l, o), i.showTooltip(t, s, u) } else i.showPointer(t, e) } function tm(t, e) { var i = e.axis, n = i.dim, o = t, a = [], r = Number.MAX_VALUE, s = -1; return _P(e.seriesModels, function (e, l) { var u, h, c = e.getData().mapDimension(n, !0); if (e.getAxisTooltipData) { var d = e.getAxisTooltipData(c, t, i); h = d.dataIndices, u = d.nestestValue } else { if (!(h = e.getData().indicesOfNearest(c[0], t, "category" === i.type ? .5 : null)).length) return; u = e.getData().get(c[0], h[0]) } if (null != u && isFinite(u)) { var f = t - u, p = Math.abs(f); p <= r && ((p < r || f >= 0 && s < 0) && (r = p, s = f, o = u, a.length = 0), _P(h, function (t) { a.push({ seriesIndex: e.seriesIndex, dataIndexInside: t, dataIndex: e.getData().getRawIndex(t) }) })) } }), { payloadBatch: a, snapToValue: o } } function em(t, e, i, n) { t[e.key] = { value: i, payloadBatch: n } } function im(t, e, i, n) { var o = i.payloadBatch, a = e.axis, r = a.model, s = e.axisPointerModel; if (e.triggerTooltip && o.length) { var l = e.coordSys.model, u = Ah(l), h = t.map[u]; h || (h = t.map[u] = { coordSysId: l.id, coordSysIndex: l.componentIndex, coordSysType: l.type, coordSysMainType: l.mainType, dataByAxis: [] }, t.list.push(h)), h.dataByAxis.push({ axisDim: a.dim, axisIndex: r.componentIndex, axisType: r.type, axisId: r.id, value: n, valueLabelOpt: { precision: s.get("label.precision"), formatter: s.get("label.formatter") }, seriesDataIndices: o.slice() }) } } function nm(t, e, i) { var n = i.axesInfo = []; _P(e, function (e, i) { var o = e.axisPointerModel.option, a = t[i]; a ? (!e.useHandle && (o.status = "show"), o.value = a.value, o.seriesDataIndices = (a.payloadBatch || []).slice()) : !e.useHandle && (o.status = "hide"), "show" === o.status && n.push({ axisDim: e.axis.dim, axisIndex: e.axis.model.componentIndex, value: o.value }) }) } function om(t, e, i, n) { if (!lm(e) && t.list.length) { var o = ((t.list[0].dataByAxis[0] || {}).seriesDataIndices || [])[0] || {}; n({ type: "showTip", escapeConnect: !0, x: e[0], y: e[1], tooltipOption: i.tooltipOption, position: i.position, dataIndexInside: o.dataIndexInside, dataIndex: o.dataIndex, seriesIndex: o.seriesIndex, dataByCoordSys: t.list }) } else n({ type: "hideTip" }) } function am(t, e, i) { var n = i.getZr(), o = bP(n).axisPointerLastHighlights || {}, a = bP(n).axisPointerLastHighlights = {}; _P(t, function (t, e) { var i = t.axisPointerModel.option; "show" === i.status && _P(i.seriesDataIndices, function (t) { var e = t.seriesIndex + " | " + t.dataIndex; a[e] = t }) }); var r = [], s = []; d(o, function (t, e) { !a[e] && s.push(t) }), d(a, function (t, e) { !o[e] && r.push(t) }), s.length && i.dispatchAction({ type: "downplay", escapeConnect: !0, batch: s }), r.length && i.dispatchAction({ type: "highlight", escapeConnect: !0, batch: r }) } function rm(t, e) { for (var i = 0; i < (t || []).length; i++) { var n = t[i]; if (e.axis.dim === n.axisDim && e.axis.model.componentIndex === n.axisIndex) return n } } function sm(t) { var e = t.axis.model, i = {}, n = i.axisDim = t.axis.dim; return i.axisIndex = i[n + "AxisIndex"] = e.componentIndex, i.axisName = i[n + "AxisName"] = e.name, i.axisId = i[n + "AxisId"] = e.id, i } function lm(t) { return !t || null == t[0] || isNaN(t[0]) || null == t[1] || isNaN(t[1]) } function um(t, e, i) { if (!U_.node) { var n = e.getZr(); SP(n).records || (SP(n).records = {}), hm(n, e), (SP(n).records[t] || (SP(n).records[t] = {})).handler = i } } function hm(t, e) { function i(i, n) { t.on(i, function (i) { var o = pm(e); MP(SP(t).records, function (t) { t && n(t, i, o.dispatchAction) }), cm(o.pendings, e) }) } SP(t).initialized || (SP(t).initialized = !0, i("click", v(fm, "click")), i("mousemove", v(fm, "mousemove")), i("globalout", dm)) } function cm(t, e) { var i, n = t.showTip.length, o = t.hideTip.length; n ? i = t.showTip[n - 1] : o && (i = t.hideTip[o - 1]), i && (i.dispatchAction = null, e.dispatchAction(i)) } function dm(t, e, i) { t.handler("leave", null, i) } function fm(t, e, i, n) { e.handler(t, i, n) } function pm(t) { var e = { showTip: [], hideTip: [] }, i = function (n) { var o = e[n.type]; o ? o.push(n) : (n.dispatchAction = i, t.dispatchAction(n)) }; return { dispatchAction: i, pendings: e } } function gm(t, e) { if (!U_.node) { var i = e.getZr(); (SP(i).records || {})[t] && (SP(i).records[t] = null) } } function mm() { } function vm(t, e, i, n) { ym(TP(i).lastProp, n) || (TP(i).lastProp = n, e ? Io(i, n, t) : (i.stopAnimation(), i.attr(n))) } function ym(t, e) { if (w(t) && w(e)) { var i = !0; return d(e, function (e, n) { i = i && ym(t[n], e) }), !!i } return t === e } function xm(t, e) { t[e.get("label.show") ? "show" : "hide"]() } function _m(t) { return { position: t.position.slice(), rotation: t.rotation || 0 } } function wm(t, e, i) { var n = e.get("z"), o = e.get("zlevel"); t && t.traverse(function (t) { "group" !== t.type && (null != n && (t.z = n), null != o && (t.zlevel = o), t.silent = i) }) } function bm(t) { var e, i = t.get("type"), n = t.getModel(i + "Style"); return "line" === i ? (e = n.getLineStyle()).fill = null : "shadow" === i && ((e = n.getAreaStyle()).stroke = null), e } function Sm(t, e, i, n, o) { var a = Im(i.get("value"), e.axis, e.ecModel, i.get("seriesDataIndices"), { precision: i.get("label.precision"), formatter: i.get("label.formatter") }), r = i.getModel("label"), s = qM(r.get("padding") || 0), l = r.getFont(), u = ke(a, l), h = o.position, c = u.width + s[1] + s[3], d = u.height + s[0] + s[2], f = o.align; "right" === f && (h[0] -= c), "center" === f && (h[0] -= c / 2); var p = o.verticalAlign; "bottom" === p && (h[1] -= d), "middle" === p && (h[1] -= d / 2), Mm(h, c, d, n); var g = r.get("backgroundColor"); g && "auto" !== g || (g = e.get("axisLine.lineStyle.color")), t.label = { shape: { x: 0, y: 0, width: c, height: d, r: r.get("borderRadius") }, position: h.slice(), style: { text: a, textFont: l, textFill: r.getTextColor(), textPosition: "inside", fill: g, stroke: r.get("borderColor") || "transparent", lineWidth: r.get("borderWidth") || 0, shadowBlur: r.get("shadowBlur"), shadowColor: r.get("shadowColor"), shadowOffsetX: r.get("shadowOffsetX"), shadowOffsetY: r.get("shadowOffsetY") }, z2: 10 } } function Mm(t, e, i, n) { var o = n.getWidth(), a = n.getHeight(); t[0] = Math.min(t[0] + e, o) - e, t[1] = Math.min(t[1] + i, a) - i, t[0] = Math.max(t[0], 0), t[1] = Math.max(t[1], 0) } function Im(t, e, i, n, o) { t = e.scale.parse(t); var a = e.scale.getLabel(t, { precision: o.precision }), r = o.formatter; if (r) { var s = { value: Xl(e, t), seriesData: [] }; d(n, function (t) { var e = i.getSeriesByIndex(t.seriesIndex), n = t.dataIndexInside, o = e && e.getDataParams(n); o && s.seriesData.push(o) }), _(r) ? a = r.replace("{value}", a) : x(r) && (a = r(s)) } return a } function Tm(t, e, i) { var n = xt(); return Mt(n, n, i.rotation), St(n, n, i.position), Do([t.dataToCoord(e), (i.labelOffset || 0) + (i.labelDirection || 1) * (i.labelMargin || 0)], n) } function Am(t, e, i, n, o, a) { var r = FD.innerTextLayout(i.rotation, 0, i.labelDirection); i.labelMargin = o.get("label.margin"), Sm(e, n, o, a, { position: Tm(n.axis, t, i), align: r.textAlign, verticalAlign: r.textVerticalAlign }) } function Dm(t, e, i) { return i = i || 0, { x1: t[i], y1: t[1 - i], x2: e[i], y2: e[1 - i] } } function Cm(t, e, i) { return i = i || 0, { x: t[i], y: t[1 - i], width: e[i], height: e[1 - i] } } function Lm(t, e, i, n, o, a) { return { cx: t, cy: e, r0: i, r: n, startAngle: o, endAngle: a, clockwise: !0 } } function km(t, e) { var i = {}; return i[e.dim + "AxisIndex"] = e.index, t.getCartesian(i) } function Pm(t) { return "x" === t.dim ? 0 : 1 } function Nm(t) { return t.isHorizontal() ? 0 : 1 } function Om(t, e) { var i = t.getRect(); return [i[kP[e]], i[kP[e]] + i[PP[e]]] } function Em(t, e, i) { var n = new yM({ shape: { x: t.x - 10, y: t.y - 10, width: 0, height: t.height + 20 } }); return To(n, { shape: { width: t.width + 20, height: t.height + 20 } }, e, i), n } function Rm(t, e, i) { if (t.count()) for (var n, o = e.coordinateSystem, a = e.getLayerSeries(), r = t.mapDimension("single"), s = t.mapDimension("value"), l = f(a, function (e) { return f(e.indices, function (e) { var i = o.dataToPoint(t.get(r, e)); return i[1] = t.get(s, e), i }) }), u = zm(l), h = u.y0, c = i / u.max, d = a.length, p = a[0].indices.length, g = 0; g < p; ++g) { n = h[g] * c, t.setItemLayout(a[0].indices[g], { layerIndex: 0, x: l[0][g][0], y0: n, y: l[0][g][1] * c }); for (var m = 1; m < d; ++m)n += l[m - 1][g][1] * c, t.setItemLayout(a[m].indices[g], { layerIndex: m, x: l[m][g][0], y0: n, y: l[m][g][1] * c }) } } function zm(t) { for (var e = t.length, i = t[0].length, n = [], o = [], a = 0, r = {}, s = 0; s < i; ++s) { for (var l = 0, u = 0; l < e; ++l)u += t[l][s][1]; u > a && (a = u), n.push(u) } for (var h = 0; h < i; ++h)o[h] = (a - n[h]) / 2; a = 0; for (var c = 0; c < i; ++c) { var d = n[c] + o[c]; d > a && (a = d) } return r.y0 = o, r.max = a, r } function Bm(t) { var e = 0; d(t.children, function (t) { Bm(t); var i = t.value; y(i) && (i = i[0]), e += i }); var i = t.value; y(i) && (i = i[0]), (null == i || isNaN(i)) && (i = e), i < 0 && (i = 0), y(t.value) ? t.value[0] = i : t.value = i } function Vm(t, e, i) { function n() { r.ignore = r.hoverIgnore } function o() { r.ignore = r.normalIgnore } tb.call(this); var a = new hM({ z2: zP }); a.seriesIndex = e.seriesIndex; var r = new rM({ z2: BP, silent: t.getModel("label").get("silent") }); this.add(a), this.add(r), this.updateData(!0, t, "normal", e, i), this.on("emphasis", n).on("normal", o).on("mouseover", n).on("mouseout", o) } function Gm(t, e, i) { var n = t.getVisual("color"), o = t.getVisual("visualMeta"); o && 0 !== o.length || (n = null); var a = t.getModel("itemStyle").get("color"); if (a) return a; if (n) return n; if (0 === t.depth) return i.option.color[0]; var r = i.option.color.length; return a = i.option.color[Fm(t) % r] } function Fm(t) { for (var e = t; e.depth > 1;)e = e.parentNode; return l(t.getAncestors()[0].children, e) } function Wm(t, e, i) { return i !== RP.NONE && (i === RP.SELF ? t === e : i === RP.ANCESTOR ? t === e || t.isAncestorOf(e) : t === e || t.isDescendantOf(e)) } function Hm(t, e, i) { e.getData().setItemVisual(t.dataIndex, "color", i) } function Zm(t, e) { var i = t.children || []; t.children = Um(i, e), i.length && d(t.children, function (t) { Zm(t, e) }) } function Um(t, e) { if ("function" == typeof e) return t.sort(e); var i = "asc" === e; return t.sort(function (t, e) { var n = (t.getValue() - e.getValue()) * (i ? 1 : -1); return 0 === n ? (t.dataIndex - e.dataIndex) * (i ? -1 : 1) : n }) } function Xm(t, e) { return e = e || [0, 0], f(["x", "y"], function (i, n) { var o = this.getAxis(i), a = e[n], r = t[n] / 2; return "category" === o.type ? o.getBandWidth() : Math.abs(o.dataToCoord(a - r) - o.dataToCoord(a + r)) }, this) } function jm(t, e) { return e = e || [0, 0], f([0, 1], function (i) { var n = e[i], o = t[i] / 2, a = [], r = []; return a[i] = n - o, r[i] = n + o, a[1 - i] = r[1 - i] = e[1 - i], Math.abs(this.dataToPoint(a)[i] - this.dataToPoint(r)[i]) }, this) } function Ym(t, e) { var i = this.getAxis(), n = e instanceof Array ? e[0] : e, o = (t instanceof Array ? t[0] : t) / 2; return "category" === i.type ? i.getBandWidth() : Math.abs(i.dataToCoord(n - o) - i.dataToCoord(n + o)) } function qm(t, e) { return f(["Radius", "Angle"], function (i, n) { var o = this["get" + i + "Axis"](), a = e[n], r = t[n] / 2, s = "dataTo" + i, l = "category" === o.type ? o.getBandWidth() : Math.abs(o[s](a - r) - o[s](a + r)); return "Angle" === i && (l = l * Math.PI / 180), l }, this) } function Km(t) { var e, i = t.type; if ("path" === i) { var n = t.shape, o = null != n.width && null != n.height ? { x: n.x || 0, y: n.y || 0, width: n.width, height: n.height } : null, a = lv(n); (e = Xn(a, null, o, n.layout || "center")).__customPathData = a } else "image" === i ? (e = new fi({})).__customImagePath = t.style.image : "text" === i ? (e = new rM({})).__customText = t.style.text : e = new (0, zM[i.charAt(0).toUpperCase() + i.slice(1)]); return e.__customGraphicType = i, e.name = t.name, e } function $m(t, e, n, o, a, r, s) { var l = {}, u = n.style || {}; if (n.shape && (l.shape = i(n.shape)), n.position && (l.position = n.position.slice()), n.scale && (l.scale = n.scale.slice()), n.origin && (l.origin = n.origin.slice()), n.rotation && (l.rotation = n.rotation), "image" === t.type && n.style) { h = l.style = {}; d(["x", "y", "width", "height"], function (e) { Jm(e, h, u, t.style, r) }) } if ("text" === t.type && n.style) { var h = l.style = {}; d(["x", "y"], function (e) { Jm(e, h, u, t.style, r) }), !u.hasOwnProperty("textFill") && u.fill && (u.textFill = u.fill), !u.hasOwnProperty("textStroke") && u.stroke && (u.textStroke = u.stroke) } if ("group" !== t.type && (t.useStyle(u), r)) { t.style.opacity = 0; var c = u.opacity; null == c && (c = 1), To(t, { style: { opacity: c } }, o, e) } r ? t.attr(l) : Io(t, l, o, e), n.hasOwnProperty("z2") && t.attr("z2", n.z2 || 0), n.hasOwnProperty("silent") && t.attr("silent", n.silent), n.hasOwnProperty("invisible") && t.attr("invisible", n.invisible), n.hasOwnProperty("ignore") && t.attr("ignore", n.ignore), n.hasOwnProperty("info") && t.attr("info", n.info); var f = n.styleEmphasis, p = !1 === f; t.__cusHasEmphStl && null == f || !t.__cusHasEmphStl && p || (ro(t, f), t.__cusHasEmphStl = !p), s && po(t, !p) } function Jm(t, e, i, n, o) { null == i[t] || o || (e[t] = i[t], i[t] = n[t]) } function Qm(t, e, i, n) { function o(t) { null == t && (t = h), v && (c = e.getItemModel(t), d = c.getModel(UP), f = c.getModel(XP), p = e.getItemVisual(t, "color"), v = !1) } var s = t.get("renderItem"), l = t.coordinateSystem, u = {}; l && (u = l.prepareCustoms ? l.prepareCustoms() : YP[l.type](l)); var h, c, d, f, p, g = r({ getWidth: n.getWidth, getHeight: n.getHeight, getZr: n.getZr, getDevicePixelRatio: n.getDevicePixelRatio, value: function (t, i) { return null == i && (i = h), e.get(e.getDimension(t || 0), i) }, style: function (i, n) { null == n && (n = h), o(n); var r = c.getModel(HP).getItemStyle(); null != p && (r.fill = p); var s = e.getItemVisual(n, "opacity"); return null != s && (r.opacity = s), mo(r, d, null, { autoColor: p, isRectText: !0 }), r.text = d.getShallow("show") ? A(t.getFormattedLabel(n, "normal"), _u(e, n)) : null, i && a(r, i), r }, styleEmphasis: function (i, n) { null == n && (n = h), o(n); var r = c.getModel(ZP).getItemStyle(); return mo(r, f, null, { isRectText: !0 }, !0), r.text = f.getShallow("show") ? D(t.getFormattedLabel(n, "emphasis"), t.getFormattedLabel(n, "normal"), _u(e, n)) : null, i && a(r, i), r }, visual: function (t, i) { return null == i && (i = h), e.getItemVisual(i, t) }, barLayout: function (t) { if (l.getBaseAxis) return Ll(r({ axis: l.getBaseAxis() }, t), n) }, currentSeriesIndices: function () { return i.getCurrentSeriesIndices() }, font: function (t) { return So(t, i) } }, u.api || {}), m = { context: {}, seriesId: t.id, seriesName: t.name, seriesIndex: t.seriesIndex, coordSys: u.coordSys, dataInsideLength: e.count(), encode: tv(t.getData()) }, v = !0; return function (t, i) { return h = t, v = !0, s && s(r({ dataIndexInside: t, dataIndex: e.getRawIndex(t), actionType: i ? i.type : null }, m), g) } } function tv(t) { var e = {}; return d(t.dimensions, function (i, n) { var o = t.getDimensionInfo(i); if (!o.isExtraCoord) { var a = o.coordDim; (e[a] = e[a] || [])[o.coordDimIndex] = n } }), e } function ev(t, e, i, n, o, a) { return (t = iv(t, e, i, n, o, a, !0)) && a.setItemGraphicEl(e, t), t } function iv(t, e, i, n, o, a, r) { var s = !i, l = (i = i || {}).type, u = i.shape, h = i.style; if (t && (s || null != l && l !== t.__customGraphicType || "path" === l && uv(u) && lv(u) !== t.__customPathData || "image" === l && hv(h, "image") && h.image !== t.__customImagePath || "text" === l && hv(u, "text") && h.text !== t.__customText) && (o.remove(t), t = null), !s) { var c = !t; return !t && (t = Km(i)), $m(t, e, i, n, a, c, r), "group" === l && nv(t, e, i, n, a), o.add(t), t } } function nv(t, e, i, n, o) { var a = i.children, r = a ? a.length : 0, s = i.$mergeChildren, l = "byName" === s || i.diffChildrenByName, u = !1 === s; if (r || l || u) if (l) ov({ oldChildren: t.children() || [], newChildren: a || [], dataIndex: e, animatableModel: n, group: t, data: o }); else { u && t.removeAll(); for (var h = 0; h < r; h++)a[h] && iv(t.childAt(h), e, a[h], n, t, o) } } function ov(t) { new Xs(t.oldChildren, t.newChildren, av, av, t).add(rv).update(rv).remove(sv).execute() } function av(t, e) { var i = t && t.name; return null != i ? i : jP + e } function rv(t, e) { var i = this.context, n = null != t ? i.newChildren[t] : null; iv(null != e ? i.oldChildren[e] : null, i.dataIndex, n, i.animatableModel, i.group, i.data) } function sv(t) { var e = this.context, i = e.oldChildren[t]; i && e.group.remove(i) } function lv(t) { return t && (t.pathData || t.d) } function uv(t) { return t && (t.hasOwnProperty("pathData") || t.hasOwnProperty("d")) } function hv(t, e) { return t && t.hasOwnProperty(e) } function cv(t, e, i, n) { var o = i.type, a = new (0, zM[o.charAt(0).toUpperCase() + o.slice(1)])(i); e.add(a), n.set(t, a), a.__ecGraphicId = t } function dv(t, e) { var i = t && t.parent; i && ("group" === t.type && t.traverse(function (t) { dv(t, e) }), e.removeKey(t.__ecGraphicId), i.remove(t)) } function fv(t) { return t = a({}, t), d(["id", "parentId", "$action", "hv", "bounding"].concat(nI), function (e) { delete t[e] }), t } function pv(t, e) { var i; return d(e, function (e) { null != t[e] && "auto" !== t[e] && (i = !0) }), i } function gv(t, e) { var i = t.exist; if (e.id = t.keyInfo.id, !e.type && i && (e.type = i.type), null == e.parentId) { var n = e.parentOption; n ? e.parentId = n.id : i && (e.parentId = i.parentId) } e.parentOption = null } function mv(t, e, i) { var o = a({}, i), r = t[e], s = i.$action || "merge"; "merge" === s ? r ? (n(r, o, !0), pa(r, o, { ignoreSize: !0 }), ma(i, r)) : t[e] = o : "replace" === s ? t[e] = o : "remove" === s && r && (t[e] = null) } function vv(t, e) { t && (t.hv = e.hv = [pv(e, ["left", "right"]), pv(e, ["top", "bottom"])], "group" === t.type && (null == t.width && (t.width = e.width = 0), null == t.height && (t.height = e.height = 0))) } function yv(t, e, i) { var n = t.eventData; t.silent || t.ignore || n || (n = t.eventData = { componentType: "graphic", componentIndex: e.componentIndex, name: t.name }), n && (n.info = t.info) } function xv(t, e, i) { var n, o = {}, a = "toggleSelected" === t; return i.eachComponent("legend", function (i) { a && null != n ? i[n ? "select" : "unSelect"](e.name) : (i[t](e.name), n = i.isSelected(e.name)), d(i.getData(), function (t) { var e = t.get("name"); if ("\n" !== e && "" !== e) { var n = i.isSelected(e); o.hasOwnProperty(e) ? o[e] = o[e] && n : o[e] = n } }) }), { name: e.name, selected: o } } function _v(t, e, i) { var n = e.getBoxLayoutParams(), o = e.get("padding"), a = { width: i.getWidth(), height: i.getHeight() }, r = ca(n, a, o); aI(e.get("orient"), t, e.get("itemGap"), r.width, r.height), da(t, n, a, o) } function wv(t, e) { var i = qM(e.get("padding")), n = e.getItemStyle(["color", "opacity"]); return n.fill = e.get("backgroundColor"), t = new yM({ shape: { x: t.x - i[3], y: t.y - i[0], width: t.width + i[1] + i[3], height: t.height + i[0] + i[2], r: e.get("borderRadius") }, style: n, silent: !0, z2: -1 }) } function bv(t, e) { e.dispatchAction({ type: "legendToggleSelect", name: t }) } function Sv(t, e, i, n) { var o = i.getZr().storage.getDisplayList()[0]; o && o.useHoverLayer || i.dispatchAction({ type: "highlight", seriesName: t, name: e, excludeSeriesId: n }) } function Mv(t, e, i, n) { var o = i.getZr().storage.getDisplayList()[0]; o && o.useHoverLayer || i.dispatchAction({ type: "downplay", seriesName: t, name: e, excludeSeriesId: n }) } function Iv(t, e, i) { var n = [1, 1]; n[t.getOrient().index] = 0, pa(e, i, { type: "box", ignoreSize: n }) } function Tv(t) { var e = "left " + t + "s cubic-bezier(0.23, 1, 0.32, 1),top " + t + "s cubic-bezier(0.23, 1, 0.32, 1)"; return f(lN, function (t) { return t + "transition:" + e }).join(";") } function Av(t) { var e = [], i = t.get("fontSize"), n = t.getTextColor(); return n && e.push("color:" + n), e.push("font:" + t.getFont()), i && e.push("line-height:" + Math.round(3 * i / 2) + "px"), rN(["decoration", "align"], function (i) { var n = t.get(i); n && e.push("text-" + i + ":" + n) }), e.join(";") } function Dv(t) { var e = [], i = t.get("transitionDuration"), n = t.get("backgroundColor"), o = t.getModel("textStyle"), a = t.get("padding"); return i && e.push(Tv(i)), n && (U_.canvasSupported ? e.push("background-Color:" + n) : (e.push("background-Color:#" + Zt(n)), e.push("filter:alpha(opacity=70)"))), rN(["width", "color", "radius"], function (i) { var n = "border-" + i, o = sN(n), a = t.get(o); null != a && e.push(n + ":" + a + ("color" === i ? "" : "px")) }), e.push(Av(o)), null != a && e.push("padding:" + qM(a).join("px ") + "px"), e.join(";") + ";" } function Cv(t, e) { if (U_.wxa) return null; var i = document.createElement("div"), n = this._zr = e.getZr(); this.el = i, this._x = e.getWidth() / 2, this._y = e.getHeight() / 2, t.appendChild(i), this._container = t, 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 i = n.handler; ut(t, e, !0), i.dispatch("mousemove", e) } }, i.onmouseleave = function () { o._enterable && o._show && o.hideLater(o._hideDelay), o._inContent = !1 } } function Lv(t) { this._zr = t.getZr(), this._show = !1, this._hideTimeout } function kv(t) { for (var e = t.pop(); t.length;) { var i = t.pop(); i && (No.isInstance(i) && (i = i.get("tooltip", !0)), "string" == typeof i && (i = { formatter: i }), e = new No(i, e, e.ecModel)) } return e } function Pv(t, e) { return t.dispatchAction || m(e.dispatchAction, e) } function Nv(t, e, i, n, o, a, r) { var s = i.getOuterSize(), l = s.width, u = s.height; return null != a && (t + l + a > n ? t -= l + a : t += a), null != r && (e + u + r > o ? e -= u + r : e += r), [t, e] } function Ov(t, e, i, n, o) { var a = i.getOuterSize(), r = a.width, s = a.height; return t = Math.min(t + r, n) - r, e = Math.min(e + s, o) - s, t = Math.max(t, 0), e = Math.max(e, 0), [t, e] } function Ev(t, e, i) { var n = i[0], o = i[1], a = 0, r = 0, s = e.width, l = e.height; switch (t) { case "inside": a = e.x + s / 2 - n / 2, r = e.y + l / 2 - o / 2; break; case "top": a = e.x + s / 2 - n / 2, r = e.y - o - 5; break; case "bottom": a = e.x + s / 2 - n / 2, r = e.y + l + 5; break; case "left": a = e.x - n - 5, r = e.y + l / 2 - o / 2; break; case "right": a = e.x + s + 5, r = e.y + l / 2 - o / 2 }return [a, r] } function Rv(t) { return "center" === t || "middle" === t } function zv(t) { return t.get("stack") || "__ec_stack_" + t.seriesIndex } function Bv(t) { return t.dim } function Vv(t, e) { var i = {}; d(t, function (t, e) { var n = t.getData(), o = t.coordinateSystem.getBaseAxis(), a = o.getExtent(), r = "category" === o.type ? o.getBandWidth() : Math.abs(a[1] - a[0]) / n.count(), s = i[Bv(o)] || { bandWidth: r, remainedWidth: r, autoWidthCount: 0, categoryGap: "20%", gap: "30%", stacks: {} }, l = s.stacks; i[Bv(o)] = s; var u = zv(t); l[u] || s.autoWidthCount++, l[u] = l[u] || { width: 0, maxWidth: 0 }; var h = Vo(t.get("barWidth"), r), c = Vo(t.get("barMaxWidth"), r), d = t.get("barGap"), f = t.get("barCategoryGap"); h && !l[u].width && (h = Math.min(s.remainedWidth, h), l[u].width = h, s.remainedWidth -= h), c && (l[u].maxWidth = c), null != d && (s.gap = d), null != f && (s.categoryGap = f) }); var n = {}; return d(i, function (t, e) { n[e] = {}; var i = t.stacks, o = t.bandWidth, a = Vo(t.categoryGap, o), r = Vo(t.gap, 1), s = t.remainedWidth, l = t.autoWidthCount, u = (s - a) / (l + (l - 1) * r); u = Math.max(u, 0), d(i, function (t, e) { var i = t.maxWidth; i && i < u && (i = Math.min(i, s), t.width && (i = Math.min(i, t.width)), s -= i, t.width = i, l--) }), u = (s - a) / (l + (l - 1) * r), u = Math.max(u, 0); var h, c = 0; d(i, function (t, e) { t.width || (t.width = u), h = t, c += t.width * (1 + r) }), h && (c -= h.width * r); var f = -c / 2; d(i, function (t, i) { n[e][i] = n[e][i] || { offset: f, width: t.width }, f += t.width * (1 + r) }) }), n } function Gv(t, e) { aD.call(this, "radius", t, e), this.type = "category" } function Fv(t, e) { e = e || [0, 360], aD.call(this, "angle", t, e), this.type = "category" } function Wv(t, e) { return e.type || (e.data ? "category" : "value") } function Hv(t, e, i) { var n = e.get("center"), o = i.getWidth(), a = i.getHeight(); t.cx = Vo(n[0], o), t.cy = Vo(n[1], a); var r = t.getRadiusAxis(), s = Math.min(o, a) / 2, l = Vo(e.get("radius"), s); r.inverse ? r.setExtent(l, 0) : r.setExtent(0, l) } function Zv(t, e) { var i = this, n = i.getAngleAxis(), o = i.getRadiusAxis(); if (n.scale.setExtent(1 / 0, -1 / 0), o.scale.setExtent(1 / 0, -1 / 0), t.eachSeries(function (t) { if (t.coordinateSystem === i) { var e = t.getData(); d(e.mapDimension("radius", !0), function (t) { o.scale.unionExtentFromData(e, gl(e, t)) }), d(e.mapDimension("angle", !0), function (t) { n.scale.unionExtentFromData(e, gl(e, t)) }) } }), Wl(n.scale, n.model), Wl(o.scale, o.model), "category" === n.type && !n.onBand) { var a = n.getExtent(), r = 360 / n.scale.count(); n.inverse ? a[1] += r : a[1] -= r, n.setExtent(a[0], a[1]) } } function Uv(t, e) { if (t.type = e.get("type"), t.scale = Hl(e), t.onBand = e.get("boundaryGap") && "category" === t.type, t.inverse = e.get("inverse"), "angleAxis" === e.mainType) { t.inverse ^= e.get("clockwise"); var i = e.get("startAngle"); t.setExtent(i, i + (t.inverse ? -360 : 360)) } e.axis = t, t.model = e } function Xv(t, e, i) { e[1] > e[0] && (e = e.slice().reverse()); var n = t.coordToPoint([e[0], i]), o = t.coordToPoint([e[1], i]); return { x1: n[0], y1: n[1], x2: o[0], y2: o[1] } } function jv(t) { return t.getRadiusAxis().inverse ? 0 : 1 } function Yv(t) { var e = t[0], i = t[t.length - 1]; e && i && Math.abs(Math.abs(e.coord - i.coord) - 360) < 1e-4 && t.pop() } function qv(t, e, i) { return { position: [t.cx, t.cy], rotation: i / 180 * Math.PI, labelDirection: -1, tickDirection: -1, nameDirection: 1, labelRotate: e.getModel("axisLabel").get("rotate"), z2: 1 } } function Kv(t, e, i, n, o) { var a = e.axis, r = a.dataToCoord(t), s = n.getAngleAxis().getExtent()[0]; s = s / 180 * Math.PI; var l, u, h, c = n.getRadiusAxis().getExtent(); if ("radius" === a.dim) { var d = xt(); Mt(d, d, s), St(d, d, [n.cx, n.cy]), l = Do([r, -o], d); var f = e.getModel("axisLabel").get("rotate") || 0, p = FD.innerTextLayout(s, f * Math.PI / 180, -1); u = p.textAlign, h = p.textVerticalAlign } else { var g = c[1]; l = n.coordToPoint([g + o, r]); var m = n.cx, v = n.cy; u = Math.abs(l[0] - m) / g < .3 ? "center" : l[0] > m ? "left" : "right", h = Math.abs(l[1] - v) / g < .3 ? "middle" : l[1] > v ? "top" : "bottom" } return { position: l, align: u, verticalAlign: h } } function $v(t, e) { e.update = "updateView", Es(e, function (e, i) { var n = {}; return i.eachComponent({ mainType: "geo", query: e }, function (i) { i[t](e.name), d(i.coordinateSystem.regions, function (t) { n[t.name] = i.isSelected(t.name) || !1 }) }), { selected: n, name: e.name } }) } function Jv(t) { var e = {}; d(t, function (t) { e[t] = 1 }), t.length = 0, d(e, function (e, i) { t.push(i) }) } function Qv(t) { if (t) for (var e in t) if (t.hasOwnProperty(e)) return !0 } function ty(t, e, n) { function o() { var t = function () { }; return t.prototype.__hidden = t.prototype, new t } var a = {}; return MN(e, function (e) { var r = a[e] = o(); MN(t[e], function (t, o) { if (hL.isValidType(o)) { var a = { type: o, visual: t }; n && n(a, e), r[o] = new hL(a), "opacity" === o && ((a = i(a)).type = "colorAlpha", r.__hidden.__alphaForOpacity = new hL(a)) } }) }), a } function ey(t, e, n) { var o; d(n, function (t) { e.hasOwnProperty(t) && Qv(e[t]) && (o = !0) }), o && d(n, function (n) { e.hasOwnProperty(n) && Qv(e[n]) ? t[n] = i(e[n]) : delete t[n] }) } function iy(t, e, i, n, o, a) { function r(t) { return i.getItemVisual(h, t) } function s(t, e) { i.setItemVisual(h, t, e) } function l(t, l) { h = null == a ? t : l; var c = i.getRawDataItem(h); if (!c || !1 !== c.visualMap) for (var d = n.call(o, t), f = e[d], p = u[d], g = 0, m = p.length; g < m; g++) { var v = p[g]; f[v] && f[v].applyVisual(t, r, s) } } var u = {}; d(t, function (t) { var i = hL.prepareVisualTypes(e[t]); u[t] = i }); var h; null == a ? i.each(l) : i.each([a], l) } function ny(t, e, i, n) { var o = {}; return d(t, function (t) { var i = hL.prepareVisualTypes(e[t]); o[t] = i }), { progress: function (t, a) { null != n && (n = a.getDimension(n)); for (var r; null != (r = t.next());) { var s = a.getRawDataItem(r); if (!s || !1 !== s.visualMap) for (var l = null != n ? a.get(n, r, !0) : r, u = i(l), h = e[u], c = o[u], d = 0, f = c.length; d < f; d++) { var p = c[d]; h[p] && h[p].applyVisual(l, function (t) { return a.getItemVisual(r, t) }, function (t, e) { a.setItemVisual(r, t, e) }) } } } } } function oy(t) { var e = ["x", "y"], i = ["width", "height"]; return { point: function (e, i, n) { if (e) { var o = n.range; return ay(e[t], o) } }, rect: function (n, o, a) { if (n) { var r = a.range, s = [n[e[t]], n[e[t]] + n[i[t]]]; return s[1] < s[0] && s.reverse(), ay(s[0], r) || ay(s[1], r) || ay(r[0], s) || ay(r[1], s) } } } } function ay(t, e) { return e[0] <= t && t <= e[1] } function ry(t, e, i, n, o) { for (var a = 0, r = o[o.length - 1]; a < o.length; a++) { var s = o[a]; if (sy(t, e, i, n, s[0], s[1], r[0], r[1])) return !0; r = s } } function sy(t, e, i, n, o, a, r, s) { var l = uy(i - t, o - r, n - e, a - s); if (ly(l)) return !1; var u = uy(o - t, o - r, a - e, a - s) / l; if (u < 0 || u > 1) return !1; var h = uy(i - t, o - t, n - e, a - e) / l; return !(h < 0 || h > 1) } function ly(t) { return t <= 1e-6 && t >= -1e-6 } function uy(t, e, i, n) { return t * n - e * i } function hy(t, e, i) { var n = this._targetInfoList = [], o = {}, a = dy(e, t); TN(PN, function (t, e) { (!i || !i.include || AN(i.include, e) >= 0) && t(a, n, o) }) } function cy(t) { return t[0] > t[1] && t.reverse(), t } function dy(t, e) { return Vi(t, e, { includeMainTypes: LN }) } function fy(t, e, i, n) { var o = i.getAxis(["x", "y"][t]), a = cy(f([0, 1], function (t) { return e ? o.coordToData(o.toLocalCoord(n[t])) : o.toGlobalCoord(o.dataToCoord(n[t])) })), r = []; return r[t] = a, r[1 - t] = [NaN, NaN], { values: a, xyMinMax: r } } function py(t, e, i, n) { return [e[0] - n[t] * i[0], e[1] - n[t] * i[1]] } function gy(t, e) { var i = my(t), n = my(e), o = [i[0] / n[0], i[1] / n[1]]; return isNaN(o[0]) && (o[0] = 1), isNaN(o[1]) && (o[1] = 1), o } function my(t) { return t ? [t[0][1] - t[0][0], t[1][1] - t[1][0]] : [NaN, NaN] } function vy(t, e, i, n, o) { if (o) { var a = t.getZr(); a[VN] || (a[BN] || (a[BN] = yy), Nr(a, BN, i, e)(t, n)) } } function yy(t, e) { if (!t.isDisposed()) { var i = t.getZr(); i[VN] = !0, t.dispatchAction({ type: "brushSelect", batch: e }), i[VN] = !1 } } function xy(t, e, i, n) { for (var o = 0, a = e.length; o < a; o++) { var r = e[o]; if (t[r.brushType](n, i, r.selectors, r)) return !0 } } function _y(t) { var e = t.brushSelector; if (_(e)) { var i = []; return d(IN, function (t, n) { i[n] = function (i, n, o, a) { var r = n.getItemLayout(i); return t[e](r, o, a) } }), i } if (x(e)) { var n = {}; return d(IN, function (t, i) { n[i] = e }), n } return e } function wy(t, e) { var i = t.option.seriesIndex; return null != i && "all" !== i && (y(i) ? l(i, e) < 0 : e !== i) } function by(t) { var e = t.selectors = {}; return d(IN[t.brushType], function (i, n) { e[n] = function (n) { return i(n, e, t) } }), t } function Sy(t) { return new de(t[0][0], t[1][0], t[0][1] - t[0][0], t[1][1] - t[1][0]) } function My(t, e) { return n({ brushType: t.brushType, brushMode: t.brushMode, transformable: t.transformable, brushStyle: new No(t.brushStyle).getItemStyle(), removeOnClick: t.removeOnClick, z: t.z }, e, !0) } function Iy(t, e, i, n) { (!n || n.$from !== t.id) && this._brushController.setPanels(t.brushTargetManager.makePanelOpts(i)).enableBrush(t.brushOption).updateCovers(t.areas.slice()) } function Ty(t, e) { HN[t] = e } function Ay(t) { return HN[t] } function Dy(t, e, i) { this.model = t, this.ecModel = e, this.api = i, this._brushType, this._brushMode } function Cy(t, e, i) { this._model = t } function Ly(t, e, i, n) 

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。