var k = 0; var g = 0; var zp = 0; var mt = 0; var url = window.location.pathname; var olower = url.toLowerCase(); function autoPicCss3(c, d, a, b) { $(c).animate({ "margin-left": -d + "px" }, function() { $(c).css({ "margin-left": "0px" }); $(c).find(b + ":first").appendTo($(a)) }) } function autoAntherCss3(e, i, a, b, h, d, c, f) { $(e).animate({ "margin-left": -i + "px" }, function() { zp++; zp = zp % d; $(f).removeClass(c); $(f).eq(zp).addClass(c); $(e).css({ "margin-left": "0px" }); $(e).find(b + ":first").appendTo($(a)) }) } function autoAntherCss3_mt(e, i, a, b, h, d, c, f) { $(e).animate({ "margin-left": -i + "px" }, function() { mt++; mt = mt % d; $(f).removeClass(c); $(f).eq(mt).addClass(c); $(e).css({ "margin-left": "0px" }); $(e).find(b + ":first").appendTo($(a)) }) } function autoPicClick(f, d, e, c, a, b, h) { if (f == 1) { $(c).removeClass(b); $(c).eq(h).addClass(b); $(d).find(a + ":last").prependTo($(d)); $(d).css({ "margin-left": -e + "px" }); $(d).animate({ "margin-left": "0px" }, function() {}) } else { if (f == 2) { $(d).animate({ "margin-left": -e + "px" }, function() { $(c).removeClass(b); $(c).eq(h).addClass(b); $(d).css({ "margin-left": "0px" }); $(d).find(a + ":first").appendTo($(d)) }) } } } $("").ready(function() { var h = $(".lunli"); var l = $(".lunli ul li"); var a = $(".lunli ul"); var m = l.width(); var q = (m * (l.length)) + (l.length * 13); var c = 999; $(h).css({ width: q }); if (q > c) { var r = setInterval("autoPicCss3('.lunli'," + m + ",'.lunli ul','.autoli')", 4000) } $("body").on("mouseenter", ".lun_pic", function() { if (q > c) { clearInterval(r); $(".lunli_left, .lunli_right").stop().show() } }); $("body").on("mouseleave", ".lun_pic", function() { if (q > c) { $(".lunli_left, .lunli_right").stop().hide(); r = setInterval("autoPicCss3('.lunli'," + m + ",'.lunli ul','.autoli')", 4000) } }); $("body").on("click", ".lunli_right", function() { $(".lunli").animate({ "margin-left": -m + "px" }, function() { $(".lunli").css({ "margin-left": "0px" }); $(".lunli").find(".autoli:first").appendTo($(".lunli ul")) }) }); $("body").on("click", ".lunli_left", function() { $(".lunli").find(".autoli:last").prependTo($(".lunli ul")); $(".lunli").css({ "margin-left": -m + "px" }); $(".lunli").animate({ "margin-left": "0px" }, function() {}) }); var n = 640; var j = $(".change_box").length; if (j > 1) { var s = setInterval("autoAntherCss3('.zp_toals'," + n + ",'.zp_toals','.change_box',1," + j + ",'changlihover','.changli')", 4000) } $("body").on("click", ".change_arrowr", function() { zp++; zp = zp % j; autoPicClick(2, ".zp_toals", n, ".changli", ".change_box", "changlihover", zp) }); $("body").on("click", ".change_arrowl", function() { zp--; zp = (zp + j) % j; autoPicClick(1, ".zp_toals", n, ".changli", ".change_box", "changlihover", zp) }); $("body").on("click", ".changli", function() { var u = $(this).index(); if (u > zp) { zp = u; $(".changli").removeClass("changlihover"); $(".changli").eq(zp).addClass("changlihover"); $(".zp_toals").animate({ "margin-left": -n + "px" }, function() { $(".zp_toals").css({ "margin-left": "0px" }); $(".zp_toals").find(".change_box:first").appendTo($(".zp_toals")) }) } else { if (u < zp) { zp = u; $(".changli").removeClass("changlihover"); $(".changli").eq(zp).addClass("changlihover"); $(".zp_toals").find(".change_box:last").prependTo($(".zp_toals")); $(".zp_toals").css({ "margin-left": -n + "px" }); $(".zp_toals").animate({ "margin-left": "0px" }, function() {}) } else { return } } }); $("body").on("mouseenter", ".zp_inbox,.zp_toals,.change_arrowr,.change_arrowl,.change_flag", function() { if (j > 1) { $(".change_arrowr, .change_arrowl").stop().show() } clearInterval(s) }); $("body").on("mouseleave", ".zp_inbox", function() { $(".change_arrowr, .change_arrowl").stop().hide(); if (j > 1) { s = setInterval("autoAntherCss3('.zp_toals'," + n + ",'.zp_toals','.change_box',1," + j + ",'changlihover','.changli')", 4000) } }); $("body").on("click", ".zp_lismall", function() { var v = $(this).index(); var w = $(".zp_ccon"); var x = w.length; $(".zp_lismall").removeClass("zplihover"); $(this).addClass("zplihover"); $(w).stop().hide(); for (var u = 0; u < x; u++) { if (u == v) { $(w[u]).stop().fadeIn() } } }); var p = 210; var o = $(".m_leftbox").length; if (o > 1) { var t = setInterval("autoAntherCss3_mt('.mb_libigb'," + p + ",'.mb_libigb','.m_leftbox',2," + o + ",'changlihover','.mleft_span')", 4000) } $("body").on("click", ".mleft_lefta", function() { mt--; mt = (mt + o) % o; autoPicClick(1, ".mb_libigb", p, ".mleft_span", ".m_leftbox", "changlihover", mt) }); $("body").on("click", ".mleft_rigta", function() { mt++; mt = mt % o; autoPicClick(2, ".mb_libigb", p, ".mleft_span", ".m_leftbox", "changlihover", mt) }); $("body").on("click", ".mleft_span", function() { var u = $(this).index(); if (u > mt) { mt = u; $(".mleft_span").removeClass("changlihover"); $(".mleft_span").eq(mt).addClass("changlihover"); $(".mb_libigb").animate({ "margin-left": -p + "px" }, function() { $(".mb_libigb").css({ "margin-left": "0px" }); $(".mb_libigb").find(".m_leftbox:first").appendTo($(".mb_libigb")) }) } else { if (u < mt) { mt = u; $(".mleft_span").removeClass("changlihover"); $(".mleft_span").eq(mt).addClass("changlihover"); $(".mb_libigb").find(".m_leftbox:last").prependTo($(".mb_libigb")); $(".mb_libigb").css({ "margin-left": -p + "px" }); $(".mb_libigb").animate({ "margin-left": "0px" }, function() {}) } else { return } } }); $("body").on("mouseenter", ".mbboxx,.mleft_rigta,.mleft_lefta,.mleft_bor", function() { $(".mleft_lefta,.mleft_rigta").stop().show(); clearInterval(t) }); $("body").on("mouseleave", ".mbboxx,.mleft_rigta,.mleft_lefta", function() { $(".mleft_lefta, .mleft_rigta").stop().hide(); if (o > 1) { t = setInterval("autoAntherCss3_mt('.mb_libigb'," + p + ",'.mb_libigb','.m_leftbox',2," + o + ",'changlihover','.mleft_span')", 4000) } }); if (olower == "/") { var i = false; if (i) { var b = ["/Content/images/newPerPic/newIndex/index_f.png"]; var f = { Fimg1: b, num: 1, oclass: "indexFbtn", otext: "了解新版" }; creatIndex.indexFpic(f) } } $("body").on("click", ".indexFbtn", function() { b = ["/Content/images/newPerPic/newIndex/indexf_2.png", "/Content/images/newPerPic/newIndex/indexf_3.png", "/Content/images/newPerPic/newIndex/indexf_4.png", "/Content/images/newPerPic/newIndex/indexf_5.png", "/Content/images/newPerPic/newIndex/indexf_6.png", "/Content/images/newPerPic/newIndex/indexf_7.png"]; f.Fimg1 = b; f.num = 2; f.oclass = "indexContinue"; f.otext = "继续"; creatIndex.indexFpic(f); $(".autopic .indexCont").stop().hide(); $(".autopic .indexCont").eq(1).show() }); var d = 0; var e = 6; $("body").on("click", ".indexContinue", function() { var v = creatIndex.web700(); $(".indexContinue").length; d++; d = d % e; if (d == 1) { var u = 30; if (v) { u = 130 } $(".index_botCricle").css({ bottom: u + "px" }) } else { if (d == 2) { var u = 190; if (v) { u = 290 } $(".index_botCricle").css({ bottom: u + "px" }) } else { if (d == 3) { var u = 100; if (v) { u = 200 } $(".index_botCricle").css({ bottom: u + "px" }) } else { if (d == 4) { var u = 45; if (v) { u = 145 } $(".index_botCricle").css({ bottom: u + "px" }) } else { if (d == 5) { var u = 25; if (v) { u = 125 } $(".index_botCricle").css({ bottom: u + "px" }) } else { if (d == 0) { d = 5; var u = 25; if (v) { u = 125 } $(".index_botCricle").css({ bottom: u + "px" }); $(".indexUP").remove(); return } } } } } } $(".autopic .ocli").stop().hide(); $(".index_botCricle span").removeClass("botCricleHover"); $(".index_botCricle span").eq(d).addClass("botCricleHover"); $(".autopic .ocli").eq(d).show() }) }); function cirleCle(e) { if (e > 1) { var f = ""; var c = "rgba(255,255,255,0.6)"; var b = navigator.appName; var a = navigator.appVersion; var l = a.split(";"); var j = l[1].replace(/[ ]/g, ""); if (b == "Microsoft Internet Explorer" && j == "MSIE8.0") { c = "#fff" } for (var h = 0; h < e; h++) { if (h == 0) { f = '' } else { if (h > 0 && h < e) { f = '' } } $(".btn_cricle").append(f) } } } function autoHeight() { if (otalowidth > num) { timer = setInterval(function() { $(".lunli").animate({ "margin-left": -oliwidth + "px" }, function() { $(".lunli").css({ "margin-left": "0px" }); $(".lunli").find(".autoli:first").appendTo($(".lunli ul")) }) }, 4000) } else { return } } function Zindex(a) { for (var b = 0; b < a; b++) { $(".ad_conli").eq(b).css({ "z-index": a - b }) } } function move(a) { $(".ad_conli").stop().fadeOut(); $(".ad_conli").eq(a).stop().fadeIn(); $(".cricle_ico").removeClass("cricle_hover"); $(".cricle_ico").eq(a).addClass("cricle_hover") } function oConmonVal(e, f, a) { var d = eval($(e).parents(".dobo_l").find(".donumm").val()); var c = 0; if (f == 2) { if (d == undefined || d < 100) { return } else { g += 100; c = d + 100; if (c > 10000) { comTBox(1, 1, 12, null, 1); $(e).parents(".dobo_l").find(".donumm").val(10000); c = 10000 } var b = storage.set("odssbean", c); getYJ(c, a); $(e).parents(".dobo_l").find(".donumm").val(c) } } else { if (f == 1) { if (d == undefined || d <= 100) { return } else { g -= 100; c = d - 100; if (c < 100) { comTBox(1, 1, 2, null, 1) } var b = storage.set("odssbean", c); getYJ(c, a); $(e).parents(".dobo_l").find(".donumm").val(c) } } } } function doBeatUp(e, b) { var a = $(e).val(); var d = eval($(e).val()); if (a == "") { $(".m_" + b).text("0"); return } else { if (a > 10000) { comTBox(1, 1, 12, null, 1); $(e).val(10000); d = 10000 } } var c = storage.set("odssbean", d); getYJ(d, b) } function indexDoBeat(n, d, e, f, a, b, j, o) { var l = Date.parse(o); var m = differ("mi", Date.now(), l); if (m >= 0) { comTBox(1, 1, 6, null, 1); return } var i = eval($("#div_" + b).val()); if (i != "") {} var h = storage.set("odss", j); if (i != undefined && j != null) { getYJ(i, b) } var c = { ID: 0, GuessOrderID: 0, MatchID: b, GuessType: 0, OddsType: 1, Odds1: d, Odds2: e, Odds3: f, GuessResult: a, Result: 0, }; $(".dodo").removeClass("dobeatxhover"); $(n).addClass("dobeatxhover"); storage.set("orrdib", c) } function getYJ(f, c) { var b = eval(storage.get("odss")); var d = storage.set("odssbean", f); if (b == null || d == "undefined") { return } var e = (f + (f * b)).toFixed(2); var a = storage.set("getbean", e); $(".m_" + c).html(e) } function oLastSbmit(n) { var e = storage.get("ologin"); if (e == "false") { comTBox(1, 1, 1, null, 1); return } var f = $(n).parents(".dobotm").find(".donumm").val(); if (f != "") { var i = storage.get("odssbean") } if (i == null) { comTBox(1, 1, 13, null, 1); return } if (i < 100) { comTBox(1, 1, 2, null, 1); return } if (i > 10000) { comTBox(1, 1, 12, null, 1); return } var b = storage.get("getbean"); var m = storage.get("orrdib"); var d = localStorage.orrdib; if (d == null || i == undefined) { return } var c = jQuery.parseJSON(d); c.BetAmount = i; c.WinAmount = b; c.WriteTime = new Date(); var a = []; a.push(c); var j = JSON.stringify(a); var l = { betdetail: j, }; apiCaller.request({ type: "POST", url: "/Games/DoBet", data: l, success: function(h) { if (h.Data.Code == -1) { comTBox(1, 1, 5, h.Data.Msg, 2) } else { var o = eval($(".indexbean").text()); var p = o - i; $(".indexbean").text(p); comTBox(0, 0, 0, null, 1); $(".donumm").val("100"); $(".numcolor").text("0"); $(".dodo").removeClass("dobeatxhover"); oRemove() } } }) } function oRemove() { storage.remove("odss"); storage.remove("orrdib"); storage.remove("odssbean"); storage.remove("getbean") } function differ(d, a, c) { var b = (a - c); switch (d) { case "dd": return parseInt(b / (24 * 60 * 60 * 1000)); case "hh": return parseInt(b / (60 * 60 * 1000)); case "mi": return parseInt(b / (60 * 1000)); case "ss": return parseInt(b / 1000) } } var creatIndex = { indexFpic: function(j) { this.indexClos(); var e; if (j.num == 1) { var c = '
{2}
'.format(j.Fimg1, j.oclass, j.otext, this.web700() == true ? "top:-100px" : ""); e = c } else { if (j.num == 2) { var d = ""; var f = ""; var a = "display:none"; for (var h = 0; h < j.Fimg1.length; h++) { d += '
{2}
'.format(j.Fimg1[h], j.oclass, j.otext, h == 0 ? "display:block" : a, this.web700() == true ? "top:-100px" : ""); if (h == 0) { f = '' } else { f += "" } } e = d } } var b = '
{0}
{1}
'.format(e, f == undefined ? "" : f, j.oclass, j.otext, this.ie8test() == true ? "bgie8" : "", this.web700() == true ? "top:-100px" : "", this.web700() == true ? "bottom:153px" : ""); $("body").append(b) }, cokie: function(b) { var a = localStorage.getItem("indexCokie"); if (a == null) { localStorage.setItem("indexCokie", b); return true } else { return false } }, ie8test: function() { var a = {}; var b = navigator.userAgent.toLowerCase(); if (window.ActiveXObject) { a.ie = b.match(/msie ([\d.]+)/)[1]; if (a.ie == "8.0") { return true } else { return false } } }, web700: function() { var a = $(window).height(); if (a < 768) { return true } else { return false } }, indexClos: function() { $("body").on("click", ".index_newclose", function() { $(".indexUP").remove() }) } }; (function(e) { var d = function(f, h) { localStorage.setItem(f, JSON.stringify(h)) }; var a = function(f) { return JSON.parse(localStorage.getItem(f)) }; var b = function(h, f) { if (f) { if (f(h, a(h))) { localStorage.removeItem(h) } } else { localStorage.removeItem(h) } }; var c = function(f) { for (var h in localStorage) { if (f(h, a(h))) { localStorage.removeItem(h) } } }; e.storage = {}; e.storage.set = d; e.storage.get = a; e.storage.remove = b; e.storage.removeBy = c } )(window); (function(a) { a.DecimalToNormal = function(e) { var b = ""; if (e < 0) { b = "-" } if (e % 0.5 == 0) { if (e % 1 == 0) { return e.toFixed(0) } else { return e.toFixed(1) } return e.toString() } else { var f; var h; var j = 0.5; var c = e < 0; e = Math.abs(e); if ((e * 2 - j) % 2 == 0) { f = (e * 2 - j) / 2; h = f + j } else { f = (e * 2 + j) / 2 - j; h = f + j } var d = Math.min(f, h).toFixed(Math.min(f, h) % 1 == 0 ? 0 : 1); var i = Math.max(f, h).toFixed(Math.max(f, h) % 1 == 0 ? 0 : 1); d = d == "0" ? d : b + d; i = i == "0" ? i : b + i; return "{0}/{1}".format(d, i) } } ; a.DecimalToCN = function(d) { var b = new ArrayEx("平手 平/半 半球 半/一 一球 一/球半 球半 球半/两".split(" ")); var c = new ArrayEx("两 三 四 五 六 七 八 九 十 十一 十二 十三 十四 十五".split(" ")); c.Each(function(h, f) { if (c.length - 1 > f) { b.push(h + "球"); b.push(h + "/" + h + "球半"); b.push(h + "球半"); b.push(h + "球半/" + c[f + 1]) } else { b.push(h + "球") } }); var e = d < 0 ? "受让 " : ""; e = e + b[Math.abs(d) / 0.25]; return e } ; a.changetime = function(h, j) { var d = function(m) { if (m < 10) { m = "0" + m } return m }; if (j == 1) { var l = h.getFullYear(); var f = h.getMonth() + 1; var b = h.getDate(); var c = h.getHours(); var e = h.getMinutes(); var i = h.getSeconds(); return d(f) + "-" + d(b) + " " + d(c) + ":" + d(e) } else { if (j == 2) { var l = h.getFullYear(); var f = h.getMonth() + 1; var b = h.getDate(); var c = h.getHours(); var e = h.getMinutes(); var i = h.getSeconds(); return d(l) + "-" + d(f) + "-" + d(b) + " " + d(c) + ":" + d(e) + ":" + d(i) } } } ; a.changtimenext = function(b, n) { var f = function(d) { if (d < 10) { d = "0" + d } return d }; var l = b.replace("/Date(", "").replace(")/", ""); var j = new Date(parseInt(l)); var o = j.getFullYear(); var i = j.getMonth() + 1; var c = j.getDate(); var e = j.getHours(); var h = j.getMinutes(); var m = j.getSeconds(); if (n == 1) { return f(i) + "-" + f(c) } else { if (n == 2) { return f(o) + "-" + f(i) + "-" + f(c) } else { if (n == 3) { return f(e) + ":" + f(h) } } } } } )(window); /* art-template@4.8.2 for browser | https://github.com/aui/art-template */ !function(a, b) { "object" == typeof exports && "object" == typeof module ? module.exports = b() : "function" == typeof define && define.amd ? define([], b) : "object" == typeof exports ? exports.template = b() : a.template = b() }(this, function() { return function(a) { function c(e) { if (b[e]) { return b[e].exports } var d = b[e] = { i: e, l: !1, exports: {} }; return a[e].call(d.exports, d, d.exports, c), d.l = !0, d.exports } var b = {}; return c.m = a, c.c = b, c.i = function(d) { return d } , c.d = function(d, f, h) { c.o(d, f) || Object.defineProperty(d, f, { configurable: !1, enumerable: !0, get: h }) } , c.n = function(d) { var f = d && d.__esModule ? function() { return d["default"] } : function() { return d } ; return c.d(f, "a", f), f } , c.o = function(d, f) { return Object.prototype.hasOwnProperty.call(d, f) } , c.p = "", c(c.s = 22) }([function(a, c, b) { (function(e) { a.exports = !1; try { a.exports = "[object process]" === Object.prototype.toString.call(e.process) } catch (d) {} } ).call(c, b(4)) } , function(f, q, j) { var m = j(17) , h = j(2) , l = j(18) , p = function(a, i) { i.onerror(a, i); var c = function() { return "{Template Error}" }; return c.mappings = [], c.sourcesContent = [], c } , b = function d(o) { var z = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; "string" != typeof o ? z = o : z.source = o, z = h.$extend(z), o = z.source, z.debug && (z.cache = !1, z.bail = !1, z.minimize = !1, z.compileDebug = !0), z.compileDebug && (z.minimize = !1), z.filename && (z.filename = z.resolveFilename(z.filename, z)); var x = z.filename , c = z.cache , A = z.caches; if (c && x) { var y = A.get(x); if (y) { return y } } if (!o) { try { o = z.loader(x, z), z.source = o } catch (i) { var v = new l({ name: "CompileError", message: "template not found: " + i.message, stack: i.stack }); if (z.bail) { throw v } return p(v, z) } } var r = void 0 , s = new m(z); try { r = s.build() } catch (v) { if (v = new l(v), z.bail) { throw v } return p(v, z) } var w = function(a, u) { try { return r(a, u) } catch (t) { if (!z.compileDebug) { return z.cache = !1, z.compileDebug = !0, d(z)(a, u) } if (t = new l(t), z.bail) { throw t } return p(t, z)() } }; return w.mappings = r.mappings, w.toString = function() { return r.toString() } , c && x && A.set(x, w), w }; b.Compiler = m, f.exports = b } , function(v, G, B) { function E() { this.$extend = function(a) { return a = a || {}, F(a, a instanceof E ? a : this) } } var y = B(0) , C = B(20) , F = B(9) , b = B(11) , j = B(13) , H = B(8) , D = B(12) , z = B(15) , w = B(16) , x = B(10) , A = B(14) , q = { source: null, filename: null, rules: [w, z], escape: !0, debug: !!y && "production" !== process.env.NODE_ENV, bail: !1, cache: !0, minimize: !0, compileDebug: !1, resolveFilename: A, include: b, htmlMinifier: x, htmlMinifierOptions: { collapseWhitespace: !0, minifyCSS: !0, minifyJS: !0, ignoreCustomFragments: [] }, onerror: j, loader: D, caches: H, root: "/", extname: ".art", ignore: [], imports: C }; E.prototype = q, v.exports = new E } , function(a, b) {} , function(a, d) { var b; b = function() { return this }(); try { b = b || Function("return this")() || (0, eval)("this") } catch (c) { "object" == typeof window && (b = window) } a.exports = b } , function(a, b) { Object.defineProperty(b, "__esModule", { value: !0 }), b["default"] = /((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyu]{1,5}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g, b.matchToToken = function(c) { var d = { type: "invalid", value: c[0] }; return c[1] ? (d.type = "string", d.closed = !(!c[3] && !c[4])) : c[5] ? d.type = "comment" : c[6] ? (d.type = "comment", d.closed = !!c[7]) : c[8] ? d.type = "regex" : c[9] ? d.type = "number" : c[10] ? d.type = "name" : c[11] ? d.type = "punctuator" : c[12] && (d.type = "whitespace"), d } } , function(a, c, b) { a.exports = b(2) } , function(a, f, c) { var d = c(1) , b = function(h, j, i) { return d(h, i)(j) }; a.exports = b } , function(a, d, b) { var c = { __data: Object.create(null), set: function(f, h) { this.__data[f] = h }, get: function(f) { return this.__data[f] }, reset: function() { this.__data = {} } }; a.exports = c } , function(a, j, c) { var f = Object.prototype.toString , b = function(i) { return null === i ? "Null" : f.call(i).slice(8, -1) } , d = function h(i, q) { var l = void 0 , p = b(i); if ("Object" === p ? l = Object.create(q || {}) : "Array" === p && (l = [].concat(q || [])), l) { for (var m in i) { i.hasOwnProperty(m) && (l[m] = h(i[m], l[m])) } return l } return i }; a.exports = d } , function(a, f, c) { var d = c(0) , b = function(j, p) { if (d) { var l, m = c(23).minify, n = p.htmlMinifierOptions, h = p.rules.map(function(i) { return i.test }); (l = n.ignoreCustomFragments).push.apply(l, h), j = m(j, n) } return j }; a.exports = b } , function(a, d, b) { var c = function(f, m, l, h) { var j = b(1); return h = h.$extend({ filename: h.resolveFilename(f, h), source: null }), j(h)(m, l) }; a.exports = c } , function(a, f, c) { var d = c(0) , b = function(h) { if (d) { return c(3).readFileSync(h, "utf8") } var i = document.getElementById(h); return i.value || i.innerHTML }; a.exports = b } , function(a, d, b) { var c = function(f) { console.error(f.name, f.message) }; a.exports = c } , function(a, h, c) { var f = c(0) , b = /^\.+\// , d = function(l, r) { if (f) { var m = c(3) , q = r.root , i = r.extname; if (b.test(l)) { var j = r.filename , v = !j || l === j , n = v ? q : m.dirname(j); l = m.resolve(n, l) } else { l = m.resolve(q, l) } m.extname(l) || (l += i) } return l }; a.exports = d } , function(a, d, b) { var c = { test: /{{[ \t]*([@#]?)(\/?)([\w\W]*?)[ \t]*}}/, use: function(z, K, G, D) { var H = this , J = H.options , j = H.getEsTokens(D.trim()) , r = j.map(function(f) { return f.value }) , L = {} , I = void 0 , E = !!K && "raw" , A = G + r.shift() , C = function(f, h) { console.warn("Template upgrade:", "{{" + f + "}}", "->", "{{" + h + "}}", "\n", J.filename || "") }; switch ("#" === K && C("#value", "@value"), A) { case "set": D = "var " + r.join(""); break; case "if": D = "if(" + r.join("") + "){"; break; case "else": var F = r.indexOf("if"); F > -1 ? (r.splice(0, F + 1), D = "}else if(" + r.join("") + "){") : D = "}else{"; break; case "/if": D = "}"; break; case "each": I = c._split(j), I.shift(), "as" === I[1] && (C("each object as value index", "each object value index"), I.splice(1, 1)); var w = I[0] || "$data" , M = I[1] || "$value" , B = I[2] || "$index"; D = "$each(" + w + ",function(" + M + "," + B + "){"; break; case "/each": D = "})"; break; case "echo": A = "print", C("echo value", "value"); case "print": case "include": case "extend": I = c._split(j), I.shift(), D = A + "(" + I.join(",") + ")"; break; case "block": D = "block(" + r.join("") + ",function(){"; break; case "/block": D = "})"; break; default: if (-1 !== r.indexOf("|")) { for (var O = A, q = [], N = r.filter(function(f) { return !/^\s+$/.test(f) }); "|" !== N[0]; ) { O += N.shift() } N.filter(function(f) { return ":" !== f }).forEach(function(f) { "|" === f ? q.push([]) : q[q.length - 1].push(f) }), q.reduce(function(f, i) { var h = i.shift(); return i.unshift(f), D = "$imports." + h + "(" + i.join(",") + ")" }, O) } else { J.imports[A] ? (C("filterName value", "value | filterName"), I = c._split(j), I.shift(), D = A + "(" + I.join(",") + ")", E = "raw") : D = "" + A + r.join("") } E || (E = "escape") } return L.code = D, L.output = E, L }, _split: function(f) { for (var p = 0, j = f.shift(), m = [[j]]; p < f.length; ) { var h = f[p] , l = h.type; "whitespace" !== l && "comment" !== l && ("punctuator" === j.type && "]" !== j.value || "punctuator" === l ? m[m.length - 1].push(h) : m.push([h]), j = h), p++ } return m.map(function(i) { return i.map(function(n) { return n.value }).join("") }) } }; a.exports = c } , function(a, d, b) { var c = { test: /<%(#?)((?:==|=#|[=-])?)([\w\W]*?)(-?)%>/, use: function(f, j, h, i) { return h = { "-": "raw", "=": "escape", "": !1, "==": "raw", "=#": "raw" }[h], j && (i = "/*" + f + "*/", h = !1), { code: i, output: h } } }; a.exports = c } , function(z, L, G) { function J(a, b) { if (!(a instanceof b)) { throw new TypeError("Cannot call a class as a function") } } var D = G(19) , H = G(21) , K = "$data" , j = "$imports" , w = "print" , M = "include" , I = "extend" , E = "block" , A = "$$out" , C = "$$line" , F = "$$blocks" , x = "$$from" , N = "$$options" , B = function(a, b) { return a.hasOwnProperty(b) } , O = JSON.stringify , q = function() { function a(l) { var h, e, d, p = this; J(this, a); var c = l.source , o = l.minimize , f = l.htmlMinifier; if (this.options = l, this.stacks = [], this.context = [], this.scripts = [], this.CONTEXT_MAP = {}, this.external = (h = {}, h[K] = !0, h[j] = !0, h[N] = !0, h), this.internal = (e = {}, e[A] = "''", e[C] = "[0,0,'']", e[F] = "arguments[1]||{}", e[x] = "null", e[w] = "function(){" + A + "+=''.concat.apply('',arguments)}", e[M] = "function(src,data){" + A + "+=" + N + ".include(src,data||" + K + ",arguments[2]||" + F + "," + N + ")}", e[I] = "function(from){" + x + "=from}", e[E] = "function(name,callback){if(" + x + "){" + A + "='';callback();" + F + "[name]=" + A + "}else{if(typeof " + F + "[name]==='string'){" + A + "+=" + F + "[name]}else{callback()}}}", e), this.dependencies = (d = {}, d[w] = [A], d[M] = [A, N, K, F], d[I] = [x, M], d[E] = [x, A, F], d), this.importContext(A), l.compileDebug && this.importContext(C), o) { try { c = f(c, l) } catch (m) {} } this.source = c, this.getTplTokens(c, l.rules, this).forEach(function(b) { b.type === H.TYPE_STRING ? p.parseString(b) : p.parseExpression(b) }) } return a.prototype.getTplTokens = function() { return H.apply(undefined, arguments) } , a.prototype.getEsTokens = function(b) { return D(b) } , a.prototype.getVariables = function(b) { var c = !1; return b.filter(function(d) { return "whitespace" !== d.type && "comment" !== d.type }).filter(function(d) { return "name" === d.type && !c || (c = "punctuator" === d.type && "." === d.value, !1) }).map(function(d) { return d.value }) } , a.prototype.importContext = function(d) { var R = this , v = "" , Q = this.internal , m = this.dependencies , y = this.external , b = this.context , S = this.options , P = S.ignore , s = S.imports , h = this.CONTEXT_MAP; !B(h, d) && !B(y, d) && P.indexOf(d) < 0 && (B(Q, d) ? (v = Q[d], B(m, d) && m[d].forEach(function(c) { return R.importContext(c) })) : v = B(s, d) ? j + "." + d : K + "." + d, h[d] = v, b.push({ name: d, value: v })) } , a.prototype.parseString = function(b) { var d = b.value; if (d) { var c = A + "+=" + O(d); this.scripts.push({ source: d, tplToken: b, code: c }) } } , a.prototype.parseExpression = function(c) { var m = this , f = c.value , h = c.script , d = h.output , l = h.code; d && (l = !1 === escape || d === H.TYPE_RAW ? A + "+=" + h.code : A + "+=$escape(" + h.code + ")"); var b = this.getEsTokens(l); this.getVariables(b).forEach(function(i) { return m.importContext(i) }), this.scripts.push({ source: f, tplToken: c, code: l }) } , a.prototype.checkExpression = function(b) { for (var h = [[/^\s*}[\w\W]*?{?[\s;]*$/, ""], [/(^[\w\W]*?\([\w\W]*?(?:=>|\([\w\W]*?\))\s*{[\s;]*$)/, "$1})"], [/(^[\w\W]*?\([\w\W]*?\)\s*{[\s;]*$)/, "$1}"]], d = 0; d < h.length; ) { if (h[d][0].test(b)) { var f; b = (f = b).replace.apply(f, h[d]); break } d++ } try { return new Function(b), !0 } catch (c) { return !1 } } , a.prototype.build = function() { var p = this.options , X = this.context , R = this.scripts , V = this.stacks , v = this.source , m = p.filename , Q = p.imports , h = [] , aa = B(this.CONTEXT_MAP, I) , P = 0 , Z = function(b, S) { var l = S.line , c = S.start , r = { generated: { line: V.length + P + 1, column: 1 }, original: { line: l + 1, column: c + 1 } }; return P += b.split(/\n/).length - 1, r } , s = function(b) { return b.replace(/^[\t ]+|[\t ]$/g, "") }; V.push("function(" + K + "){"), V.push("'use strict'"), V.push(K + "=" + K + "||{}"), V.push("var " + X.map(function(b) { return b.name + "=" + b.value }).join(",")), p.compileDebug ? (V.push("try{"), R.forEach(function(b) { b.tplToken.type === H.TYPE_EXPRESSION && V.push(C + "=[" + [b.tplToken.line, b.tplToken.start, O(b.source)].join(",") + "]"), h.push(Z(b.code, b.tplToken)), V.push(s(b.code)) }), V.push("}catch(error){"), V.push("throw {" + ["name:'RuntimeError'", "path:" + O(m), "message:error.message", "line:" + C + "[0]+1", "column:" + C + "[1]+1", "source:" + C + "[2]", "stack:error.stack"].join(",") + "}"), V.push("}")) : R.forEach(function(b) { h.push(Z(b.code, b.tplToken)), V.push(s(b.code)) }), aa && (V.push(A + "=''"), V.push(M + "(" + x + "," + K + "," + F + ")")), V.push("return " + A), V.push("}"); var Y = V.join("\n"); try { var U = new Function(j,N,"return " + Y)(Q, p); return U.mappings = h, U.sourcesContent = [v], U } catch (u) { for (var d = 0, y = 0, W = 0, f = v; d < R.length; ) { var o = R[d]; if (!this.checkExpression(o.code)) { f = o.source, y = o.tplToken.line, W = o.tplToken.start; break } d++ } throw { name: "CompileError", path: m, message: u.message, line: y + 1, column: W + 1, source: f, script: Y, stack: u.stack } } } , a }(); q.CONSTS = { DATA: K, IMPORTS: j, PRINT: w, INCLUDE: M, EXTEND: I, BLOCK: E, OPTIONS: N, OUT: A, LINE: C, BLOCKS: F, FROM: x, ESCAPE: "$escape" }, z.exports = q } , function(a, d, b) { function c(f) { var h = f.stack; delete f.stack, this.name = "TemplateError", this.message = JSON.stringify(f, null, 4), this.stack = h } c.prototype = Object.create(Error.prototype), c.prototype.constructor = c, a.exports = c } , function(a, j, c) { var f = c(24) , b = c(5)["default"] , d = c(5).matchToToken , h = function(i) { return i.match(b).map(function(l) { return b.lastIndex = 0, d(b.exec(l)) }).map(function(l) { return "name" === l.type && f(l.value) && (l.type = "keyword"), l }) }; a.exports = h } , function(a, c, b) { (function(n) { /* art-template@runtime | https://github.com/aui/art-template */ var l = b(0) , f = Object.create(l ? n : window) , h = function j(i) { return "string" != typeof i && (i = i === undefined || null === i ? "" : "function" == typeof i ? j(i.call(i)) : JSON.stringify(i)), i } , m = /["&'<>]/ , d = function(s) { var y = "" + s , v = m.exec(y); if (!v) { return s } var x = "" , u = void 0 , w = void 0 , p = void 0; for (u = v.index, w = 0; u < y.length; u++) { switch (y.charCodeAt(u)) { case 34: p = """; break; case 38: p = "&"; break; case 39: p = "'"; break; case 60: p = "<"; break; case 62: p = ">"; break; default: continue } w !== u && (x += y.substring(w, u)), w = u + 1, x += p } return w !== u ? x + y.substring(w, u) : x } , e = function(i) { return d(h(i)) } , q = function(o, v) { if (Array.isArray(o)) { for (var s = 0, u = o.length; s < u; s++) { v(o[s], s, o) } } else { for (var p in o) { v(o[p], p) } } }; f.$each = q, f.$escape = e, a.exports = f } ).call(c, b(4)) } , function(a, d, b) { var c = function(f, m, j) { for (var l = [{ type: "string", value: f, line: 0, start: 0, end: f.length }], h = 0; h < m.length; h++) { !function(z) { for (var J = z.test.ignoreCase ? "ig" : "g", D = z.test.source + "|^$|[\\w\\W]", G = new RegExp(D,J), I = 0; I < l.length; I++) { if ("string" === l[I].type) { for (var n = l[I].line, r = l[I].start, K = l[I].end, H = l[I].value.match(G), E = [], A = 0; A < H.length; A++) { var C = H[A]; z.test.lastIndex = 0; var F = z.test.exec(C) , w = F ? "expression" : "string" , L = E[E.length - 1] , B = L || l[I] , N = B.value; r = B.line === n ? L ? L.end : r : N.length - N.lastIndexOf("\n") - 1, K = r + C.length; var q = { type: w, value: C, line: n, start: r, end: K }; if ("string" === w) { L && "string" === L.type ? (L.value += C, L.end += C.length) : E.push(q) } else { var M = z.use.apply(j, F); q.script = M, E.push(q) } n += C.split(/\n/).length - 1 } l.splice.apply(l, [I, 1].concat(E)), I += E.length - 1 } } }(m[h]) } return l }; c.TYPE_STRING = "string", c.TYPE_EXPRESSION = "expression", c.TYPE_RAW = "raw", c.TYPE_ESCAPE = "escape", a.exports = c } , function(a, j, c) { var f = c(7) , b = c(1) , d = c(6) , h = function(i, l) { return l instanceof Object ? f({ filename: i }, l) : b({ filename: i, source: l }) }; h.render = f, h.compile = b, h.defaults = d, a.exports = h } , function(a, b) { !function(c) { c.noop = function() {} }("object" == typeof a && "object" == typeof a.exports ? a.exports : window) } , function(a, d, b) { var c = { "abstract": !0, await: !0, "boolean": !0, "break": !0, "byte": !0, "case": !0, "catch": !0, "char": !0, "class": !0, "const": !0, "continue": !0, "debugger": !0, "default": !0, "delete": !0, "do": !0, "double": !0, "else": !0, "enum": !0, "export": !0, "extends": !0, "false": !0, "final": !0, "finally": !0, "float": !0, "for": !0, "function": !0, "goto": !0, "if": !0, "implements": !0, "import": !0, "in": !0, "instanceof": !0, "int": !0, "interface": !0, let: !0, "long": !0, "native": !0, "new": !0, "null": !0, "package": !0, "private": !0, "protected": !0, "public": !0, "return": !0, "short": !0, "static": !0, "super": !0, "switch": !0, "synchronized": !0, "this": !0, "throw": !0, "transient": !0, "true": !0, "try": !0, "typeof": !0, "var": !0, "void": !0, "volatile": !0, "while": !0, "with": !0, yield: !0 }; a.exports = function(f) { return c.hasOwnProperty(f) } } ]) }); (function(i) { matchFilter.CookiePrelude = "OddsData_"; var a = "dzmatchodds_{0}_{1}"; var c = "dzmatchoddsTZK_{0}_{1}"; var b = "dzmatchoddsTSS_{0}_{1}"; var d = "dzmatchoddsZKSS_{0}_{1}"; var f = "jqzj_HomeMatchodds_{0}_{1}"; var e = "jqzj_GuestMatchodds_{0}_{1}"; i.page = {}; matchFilter.Init = function() { (function() { var j = $("#div_lang"); if (matchFilter.getCurrentLang() == LANG.Guo) { switchTab.SelectIndex(j, 0) } else { switchTab.SelectIndex(j, 1) } } )(); matchFilter.langSwitch(Cookie.Get(matchFilter.getCKKey(matchFilter.CK.Lang))); matchFilter.getSortObj().init() } ; page.getOddsData = function(j, l, t) { var u; var p = 0; var n = 0; var q = 0; var m = 0; var o = 0; var r = 0; var s = parseInt($("#homeID").attr("team")); if (j == 0) { $("#tb_dzmatch .odds_0").text("-"); $("#tb_dzmatch .asiaresult").text("-").removeClass("bgscoreblue bgscoregreen bgscorered"); $("#tb_dzmatch .sizeresult").text("-").removeClass("bgscoreblue bgscoregreen bgscorered"); u = $("#sel_asia_type").val() } else { $("#tb_dzmatch .odds_1").text("-"); u = $("#sel_europe_type").val() } new ArrayEx(l).Each(function(x) { $("#dzmatchlog_" + x.matchid + " .odds_{0}".format(j)).each(function(A) { var B = j == 0 ? (u == 0 ? x.asiaprimary : x.asianow) : (u == 0 ? x.europeprimary : x.europenow); if (A == 1) { if (j == 0) { var D = "
*
"; var C = u == "0" ? x.primaryshangpan : x.shangpan; if (C == 2) { $(this).empty(); $(this).append(D); $(this).append(DecimalToCN(B[A])) } else { $(this).text(DecimalToCN(B[A])) } } else { if (B != null) { $(this).text(B == null ? "-" : B[A].toFixed(2)) } } } else { if (B != null) { if (A == 0) { if (x.shangpan == 2) { $(this).text(B[0].toFixed(2)) } else { $(this).text(B[0].toFixed(2)) } } else { if (x.shangpan == 2) { $(this).text(B[2].toFixed(2)) } else { $(this).text(B[2].toFixed(2)) } } } } }); var v = { "-1": "输", "0": "走", "1": "赢" }; var w = { "-1": "bgscoregreen", "0": "bgscoreblue", "1": "bgscorered" }; var y = { "-1": "小", "0": "走", "1": "大" }; var z = { "-1": "bgscoregreen", "0": "bgscoreblue", "1": "bgscorered" }; if (x.homeTeamID != $("#dzmatchlog_" + x.matchid + " .homeTeamID").val()) { v = { "1": "输", "0": "走", "-1": "赢" }; w = { "1": "bgscoregreen", "0": "bgscoreblue", "-1": "bgscorered" } } if (!t) { if (x.homeTeamID == s) { if (x.asiaprimaryresult == 1) { p++ } else { if (x.asiaprimaryresult == -1) { n++ } else { if (x.asiaprimaryresult == 0) { q++ } } } } else { if (x.asiaprimaryresult == 1) { n++ } else { if (x.asiaprimaryresult == -1) { p++ } else { if (x.asiaprimaryresult == 0) { q++ } } } } } if (j == 0) { if ($("#sel_asia_type").val() == 0) { if (x.homeTeamID == s) { if (x.asiaprimaryresult == 1) { p++ } else { if (x.asiaprimaryresult == -1) { n++ } else { if (x.asiaprimaryresult == 0) { q++ } } } } else { if (x.asiaprimaryresult == 1) { n++ } else { if (x.asiaprimaryresult == -1) { p++ } else { if (x.asiaprimaryresult == 0) { q++ } } } } if (x.sizeprimaryresult == 1) { m++ } else { if (x.sizeprimaryresult == -1) { o++ } else { if (x.sizeprimaryresult == 0) { r++ } } } $("#dzmatchlog_" + x.matchid + " .asiaresult").text(v[x.asiaprimaryresult.toString()]).removeClass("bgscoreblue bgscoregreen bgscorered").addClass(w[x.asiaprimaryresult.toString()]); $("#dzmatchlog_" + x.matchid + " .sizeresult").text(y[x.sizeprimaryresult == null ? "" : x.sizeprimaryresult.toString()]).removeClass("bgscoreblue bgscoregreen bgscorered").addClass(x.sizeprimaryresult == null ? "" : z[x.sizeprimaryresult.toString()]); $(".dswjDql").html(isNaN((m * 100 / (m + o + r)).toFixed(0)) ? 0 + "%" : (m * 100 / (m + o + r)).toFixed(0) + "%"); $(".dswjYpl").html(isNaN((p * 100 / (p + n + q)).toFixed(0)) ? 0 + "%" : (p * 100 / (p + n + q)).toFixed(0) + "%") } else { if (x.homeTeamID == s) { if (x.asiaresult == 1) { p++ } else { if (x.asiaresult == -1) { n++ } else { if (x.asiaresult == 0) { q++ } } } } else { if (x.asiaresult == 1) { n++ } else { if (x.asiaresult == -1) { p++ } else { if (x.asiaresult == 0) { q++ } } } } if (x.sizeresult == 1) { m++ } else { if (x.sizeresult == -1) { o++ } else { if (x.sizeprimaryresult == 0) { r++ } } } $(".dswjDql").html(isNaN((m * 100 / (m + o + r)).toFixed(0)) ? 0 + "%" : (m * 100 / (m + o + r)).toFixed(0) + "%"); $(".dswjYpl").html(isNaN((p * 100 / (p + n + q)).toFixed(0)) ? 0 + "%" : (p * 100 / (p + n + q)).toFixed(0) + "%"); $("#dzmatchlog_" + x.matchid + " .asiaresult").text(v[x.asiaresult.toString()]).removeClass("bgscoreblue bgscoregreen bgscorered").addClass(w[x.asiaresult.toString()]); $("#dzmatchlog_" + x.matchid + " .sizeresult").text(x.sizeresult == null ? "" : y[x.sizeresult.toString()]).removeClass("bgscoreblue bgscoregreen bgscorered").addClass(x.sizeresult == null ? "" : z[x.sizeresult.toString()]) } } }) } ; page.getjqzjHomeOddsData = function(j, l) { var t; var q = ""; var o = ""; var r = ""; var n = ""; var p = ""; var s = ""; var m = parseInt($("#homeID").attr("team")); if (j == 0) { $("#homedata .odds_0").text("-"); $("#homedata .asiaresult").text("-").removeClass("bgscoreblue bgscoregreen bgscorered"); $("#homedata .sizeresult").text("-").removeClass("bgscoreblue bgscoregreen bgscorered"); t = $("#home_sel_asia_type").val() } else { $("#homedata .odds_1").text("-"); t = $("#home_sel_europe_type").val() } ;new ArrayEx(l).Each(function(w) { $("#jqzjHomematchlog_" + w.matchid + " .odds_{0}".format(j)).each(function(z) { var A = j == 0 ? (t == 0 ? w.asiaprimary : w.asianow) : (t == 0 ? w.europeprimary : w.europenow); if (z == 1) { if (j == 0) { var C = "
*
"; var B = t == "0" ? w.primaryshangpan : w.shangpan; if (B == 2) { $(this).empty(); $(this).append(C); $(this).append(DecimalToCN(A[z])) } else { $(this).text(DecimalToCN(A[z])) } } else { if (A != null) { $(this).text(A == null ? "-" : A[z].toFixed(2)) } } } else { if (A != null) { if (z == 0) { if (w.shangpan == 2) { $(this).text(A[0].toFixed(2)) } else { $(this).text(A[0].toFixed(2)) } } else { if (w.shangpan == 2) { $(this).text(A[2].toFixed(2)) } else { $(this).text(A[2].toFixed(2)) } } } } }); var u = { "-1": "输", "0": "走", "1": "赢" }; var v = { "-1": "bgscoregreen", "0": "bgscoreblue", "1": "bgscorered" }; var x = { "-1": "小", "0": "走", "1": "大" }; var y = { "-1": "bgscoregreen", "0": "bgscoreblue", "1": "bgscorered" }; if (w.homeTeamID != m) { u = { "1": "输", "0": "走", "-1": "赢" }; v = { "1": "bgscoregreen", "0": "bgscoreblue", "-1": "bgscorered" } } if (j == 0) { if ($("#home_sel_asia_type").val() == 0) { if (w.homeTeamID == m) { if (w.asiaprimaryresult == 1) { q++ } else { if (w.asiaprimaryresult == -1) { o++ } else { if (w.asiaprimaryresult == 0) { r++ } } } } else { if (w.asiaprimaryresult == -1) { q++ } else { if (w.asiaprimaryresult == 1) { o++ } else { if (w.asiaprimaryresult == 0) { r++ } } } } if (w.sizeprimaryresult == 1) { n++ } else { if (w.sizeprimaryresult == -1) { p++ } else { if (w.sizeprimaryresult == 0) { s++ } } } $(".jqzjHomeDql").html(isNaN((n * 100 / (n + p + s))) ? 0 + "%" : (n * 100 / (n + p + s)).toFixed(0) + "%"); $(".jqzjHomeYpl").html(isNaN((q * 100 / (q + o + r))) ? 0 + "%" : (q * 100 / (q + o + r)).toFixed(0) + "%"); $("#jqzjHomematchlog_" + w.matchid + " .asiaresult").text(u[w.asiaprimaryresult.toString()]).removeClass("bgscoreblue bgscoregreen bgscorered").addClass(v[w.asiaprimaryresult.toString()]); $("#jqzjHomematchlog_" + w.matchid + " .sizeresult").text(w.sizeprimaryresult == null ? "" : x[w.sizeprimaryresult.toString()]).removeClass("bgscoreblue bgscoregreen bgscorered").addClass(w.sizeprimaryresult == null ? "" : y[w.sizeprimaryresult.toString()]) } else { if (w.homeTeamID == m) { if (w.asiaresult == 1) { q++ } else { if (w.asiaresult == -1) { o++ } } } else { if (w.asiaresult == -1) { q++ } else { if (w.asiaresult == 1) { o++ } } } if (w.sizeresult == 1) { n++ } else { if (w.sizeresult == -1) { p++ } else { if (w.sizeresult == 0) { s++ } } } $(".jqzjHomeDql").html(isNaN((n * 100 / (n + p + s))) ? 0 + "%" : (n * 100 / (n + p + s)).toFixed(0) + "%"); $(".jqzjHomeYpl").html(isNaN((q * 100 / (q + o + r))) ? 0 + "%" : (q * 100 / (q + o + r)).toFixed(0) + "%"); $("#jqzjHomematchlog_" + w.matchid + " .asiaresult").text(u[w.asiaresult.toString()]).removeClass("bgscoreblue bgscoregreen bgscorered").addClass(v[w.asiaresult.toString()]); $("#jqzjHomematchlog_" + w.matchid + " .sizeresult").text(w.sizeresult == null ? "" : x[w.sizeresult.toString()]).removeClass("bgscoreblue bgscoregreen bgscorered").addClass(w.sizeresult == null ? "" : y[w.sizeresult.toString()]) } } }) } ; page.getjqzjGuestOddsData = function(j, l) { var t; var q = ""; var o = ""; var r = ""; var n = ""; var p = ""; var s = ""; var m = parseInt($("#guestID").attr("team")); if (j == 0) { $("#guestdata .odds_0").text("-"); $("#guestdata .asiaresult").text("-"); $("#guestdata .sizeresult").text("-"); $("#guestdata .asiaresult").removeClass("bgscoreblue bgscoregreen bgscorered"); $("#guestdata .sizeresult").removeClass("bgscoreblue bgscoregreen bgscorered"); t = $("#guest_sel_asia_type").val() } else { $("#guestdata .odds_1").text("-"); t = $("#guest_sel_europe_type").val() } new ArrayEx(l).Each(function(w) { $("#jqzjGuestmatchlog_" + w.matchid + " .odds_{0}".format(j)).each(function(z) { var A = j == 0 ? (t == 0 ? w.asiaprimary : w.asianow) : (t == 0 ? w.europeprimary : w.europenow); if (z == 1) { if (j == 0) { var C = "
*
"; var B = t == "0" ? w.primaryshangpan : w.shangpan; if (B == 2) { $(this).empty(); $(this).append(C); $(this).append(DecimalToCN(A[z])) } else { $(this).text(DecimalToCN(A[z])) } } else { if (A != null) { $(this).text(A == null ? "-" : A[z].toFixed(2)) } } } else { if (A != null) { if (z == 0) { if (w.shangpan == 2) { $(this).text(A[0].toFixed(2)) } else { $(this).text(A[0].toFixed(2)) } } else { if (w.shangpan == 2) { $(this).text(A[2].toFixed(2)) } else { $(this).text(A[2].toFixed(2)) } } } } }); var u = { "-1": "输", "0": "走", "1": "赢" }; var v = { "-1": "bgscoregreen", "0": "bgscoreblue", "1": "bgscorered" }; var x = { "-1": "小", "0": "走", "1": "大" }; var y = { "-1": "bgscoregreen", "0": "bgscoreblue", "1": "bgscorered" }; if (w.homeTeamID != m) { u = { "1": "输", "0": "走", "-1": "赢" }; v = { "1": "bgscoregreen", "0": "bgscoreblue", "-1": "bgscorered" } } if (j == 0) { if ($("#guest_sel_asia_type").val() == 0) { if (w.homeTeamID == m) { if (w.asiaprimaryresult == 1) { q++ } else { if (w.asiaprimaryresult == -1) { o++ } else { if (w.asiaprimaryresult == 0) { r++ } } } } else { if (w.asiaprimaryresult == -1) { q++ } else { if (w.asiaprimaryresult == 1) { o++ } else { if (w.asiaprimaryresult == 0) { r++ } } } } if (w.sizeprimaryresult == 1) { n++ } else { if (w.sizeprimaryresult == -1) { p++ } else { if (w.sizeprimaryresult == 0) { s++ } } } $(".jqzjGuestDql").html(isNaN((n * 100 / (n + p + s))) ? 0 + "%" : (n * 100 / (n + p + s)).toFixed(0) + "%"); $(".jqzjGuestYpl").html(isNaN((q * 100 / (q + o + r))) ? 0 + "%" : (q * 100 / (q + o + r)).toFixed(0) + "%"); $("#jqzjGuestmatchlog_" + w.matchid + " .asiaresult").text(u[w.asiaprimaryresult.toString()]).removeClass("bgscoreblue bgscoregreen bgscorered").addClass(v[w.asiaprimaryresult.toString()]); $("#jqzjGuestmatchlog_" + w.matchid + " .sizeresult").text(w.sizeprimaryresult == null ? "" : x[w.sizeprimaryresult.toString()]).removeClass("bgscoreblue bgscoregreen bgscorered").addClass(w.sizeprimaryresult == null ? "" : y[w.sizeprimaryresult.toString()]) } else { if (w.homeTeamID == m) { if (w.asiaresult == 1) { q++ } else { if (w.asiaresult == -1) { o++ } else { if (w.asiaresult == 0) { r++ } } } } else { if (w.asiaresult == -1) { q++ } else { if (w.asiaresult == 1) { o++ } else { if (w.asiaresult == 0) { r++ } } } } if (w.sizeresult == 1) { n++ } else { if (w.sizeresult == -1) { p++ } else { if (w.sizeresult == 0) { s++ } } } $(".jqzjGuestDql").html(isNaN((n * 100 / (n + p + s))) ? 0 + "%" : (n * 100 / (n + p + s)).toFixed(0) + "%" + s); $(".jqzjGuestYpl").html(isNaN((q * 100 / (q + o + r))) ? 0 + "%" : (q * 100 / (q + o + r)).toFixed(0) + "%"); $("#jqzjGuestmatchlog_" + w.matchid + " .asiaresult").text(u[w.asiaresult.toString()]).removeClass("bgscoreblue bgscoregreen bgscorered").addClass(v[w.asiaresult.toString()]); $("#jqzjGuestmatchlog_" + w.matchid + " .sizeresult").text(w.sizeresult == null ? "" : x[w.sizeresult.toString()]).removeClass("bgscoreblue bgscoregreen bgscorered").addClass(w.sizeresult == null ? "" : y[w.sizeresult.toString()]) } } }) } ; page.getOddsTzkData = function(j, l) { var z; var y = ""; var v = ""; var w = ""; var x = ""; var o = ""; var n = ""; var r = ""; var p = ""; var s = ""; var m = ""; var q = ""; var t = ""; var u = parseInt($("#homeID").attr("team")); if (j == 0) { z = $("#sel_asia_type").val(); $("#tb_dzmatchTZK .odds_0").text("-"); $("#tb_dzmatchTZK .asiaresult").removeClass("bgscoreblue bgscoregreen bgscorered"); $("#tb_dzmatchTZK .sizeresult").removeClass("bgscoreblue bgscoregreen bgscorered") } else { $("#tb_dzmatchTZK .odds_1").text("-"); z = $("#sel_europe_type").val() } new ArrayEx(l).Each(function(C) { $("#dzmatchlogTZK_" + C.matchid + " .odds_{0}".format(j)).each(function(F) { var G = j == 0 ? (z == 0 ? C.asiaprimary : C.asianow) : (z == 0 ? C.europeprimary : C.europenow); if (F == 1) { if (j == 0) { var I = "
*
"; var H = z == "0" ? C.primaryshangpan : C.shangpan; if (H == 2) { $(this).empty(); $(this).append(I); $(this).append(DecimalToCN(G[F])) } else { $(this).text(DecimalToCN(G[F])) } } else { $(this).text(G == null ? "-" : G[F].toFixed(2)) } } else { $(this).text(G == null ? "-" : G[F].toFixed(2)) } }); var A = { "-1": "输", "0": "走", "1": "赢" }; var B = { "-1": "bgscoregreen", "0": "bgscoreblue", "1": "bgscorered" }; var D = { "-1": "小", "0": "走", "1": "大" }; var E = { "-1": "bgscoregreen", "0": "bgscoreblue", "1": "bgscorered" }; if (C.homeTeamID != $("#dzmatchlogTZK_" + C.matchid + " .homeTeamID").val()) { A = { "1": "输", "0": "走", "-1": "赢" }; B = { "1": "bgscoregreen", "0": "bgscoreblue", "-1": "bgscorered" } } if (j == 0) { if ($("#sel_asia_type").val() == 0) { $("#dzmatchlogTZK_" + C.matchid + " .asiaresult").text(A[C.asiaprimaryresult.toString()]).removeClass("bgscoreblue bgscoregreen bgscorered").addClass(B[C.asiaprimaryresult.toString()]); $("#dzmatchlogTZK_" + C.matchid + " .sizeresult").text(C.sizeprimaryresult == null ? "" : D[C.sizeprimaryresult.toString()]).removeClass("bgscoreblue bgscoregreen bgscorered").addClass(C.sizeprimaryresult == null ? "" : E[C.sizeprimaryresult.toString()]) } else { $("#dzmatchlogTZK_" + C.matchid + " .asiaresult").text(A[C.asiaresult.toString()]).removeClass("bgscoreblue bgscoregreen bgscorered").addClass(B[C.asiaresult.toString()]); $("#dzmatchlogTZK_" + C.matchid + " .sizeresult").text(C.sizeresult == null ? "" : D[C.sizeresult.toString()]).removeClass("bgscoreblue bgscoregreen bgscorered").addClass(C.sizeresult == null ? "" : E[C.sizeresult.toString()]) } } if (C.homeTeamID == u) { if (C.asiaprimaryresult == 1) { r++ } else { if (C.asiaprimaryresult == -1) { p++ } else { if (C.asiaprimaryresult == 0) { s++ } } } } else { if (C.asiaprimaryresult == 1) { p++ } else { if (C.asiaprimaryresult == -1) { r++ } else { if (C.asiaprimaryresult == 0) { s++ } } } } if (C.sizeresult == 1) { m++ } else { if (C.sizeresult == -1) { q++ } else { if (C.sizeresult == 0) { t++ } } } }); $(".dswjDql").html(isNaN((m * 100 / (m + q + t)).toFixed(0)) ? 0 + "%" : (m * 100 / (m + q + t)).toFixed(0) + "%"); $(".dswjYpl").html(isNaN((r * 100 / (r + p + s)).toFixed(0)) ? 0 + "%" : (r * 100 / (r + p + s)).toFixed(0) + "%") } ; page.getOddsTssData = function(j, l) { var z; var y = ""; var v = ""; var w = ""; var x = ""; var o = ""; var n = ""; var r = ""; var p = ""; var s = ""; var m = ""; var q = ""; var t = ""; var u = parseInt($("#homeID").attr("team")); if (j == 0) { z = $("#sel_asia_type").val(); $("#tb_dzmatchTSS .odds_0").text("-"); $("#tb_dzmatchTSS .asiaresult").removeClass("bgscoreblue bgscoregreen bgscorered"); $("#tb_dzmatchTSS .sizeresult").removeClass("bgscoreblue bgscoregreen bgscorered") } else { $("#tb_dzmatchTSS .odds_1").text("-"); z = $("#sel_europe_type").val() } new ArrayEx(l).Each(function(C) { $("#dzmatchlogTSS_" + C.matchid + " .odds_{0}".format(j)).each(function(F) { var G = j == 0 ? (z == 0 ? C.asiaprimary : C.asianow) : (z == 0 ? C.europeprimary : C.europenow); if (F == 1) { if (j == 0) { var I = "
*
"; var H = z == "0" ? C.primaryshangpan : C.shangpan; if (H == 2) { $(this).empty(); $(this).append(I); $(this).append(DecimalToCN(G[F])) } else { $(this).text(DecimalToCN(G[F])) } } else { $(this).text(G == null ? "-" : G[F].toFixed(2)) } } else { $(this).text(G == null ? "-" : G[F].toFixed(2)) } }); var A = { "-1": "输", "0": "走", "1": "赢" }; var B = { "-1": "bgscoregreen", "0": "bgscoreblue", "1": "bgscorered" }; var D = { "-1": "小", "0": "走", "1": "大" }; var E = { "-1": "bgscoregreen", "0": "bgscoreblue", "1": "bgscorered" }; if (C.homeTeamID != $("#dzmatchlogTSS_" + C.matchid + " .homeTeamID").val()) { A = { "1": "输", "0": "走", "-1": "赢" }; B = { "1": "bgscoregreen", "0": "bgscoreblue", "-1": "bgscorered" } } if (j == 0) { if ($("#sel_asia_type").val() == 0) { $("#dzmatchlogTSS_" + C.matchid + " .asiaresult").text(A[C.asiaprimaryresult.toString()]).removeClass("bgscoreblue bgscoregreen bgscorered").addClass(B[C.asiaprimaryresult.toString()]); $("#dzmatchlogTSS_" + C.matchid + " .sizeresult").text(C.sizeprimaryresult == null ? "" : D[C.sizeprimaryresult.toString()]).removeClass("bgscoreblue bgscoregreen bgscorered").addClass(C.sizeprimaryresult == null ? "" : E[C.sizeprimaryresult.toString()]) } else { $("#dzmatchlogTSS_" + C.matchid + " .asiaresult").text(A[C.asiaresult.toString()]).removeClass("bgscoreblue bgscoregreen bgscorered").addClass(B[C.asiaresult.toString()]); $("#dzmatchlogTSS_" + C.matchid + " .sizeresult").text(C.sizeresult == null ? "" : D[C.sizeresult.toString()]).removeClass("bgscoreblue bgscoregreen bgscorered").addClass(C.sizeresult == null ? "" : E[C.sizeresult.toString()]) } } if (C.homeTeamID == u) { if (C.asiaprimaryresult == 1) { r++ } else { if (C.asiaprimaryresult == -1) { p++ } else { if (C.asiaprimaryresult == 0) { s++ } } } } else { if (C.asiaprimaryresult == 1) { p++ } else { if (C.asiaprimaryresult == -1) { r++ } else { if (C.asiaprimaryresult == 0) { s++ } } } } if (C.sizeresult == 1) { m++ } else { if (C.sizeresult == -1) { q++ } else { if (C.sizeresult == 0) { t++ } } } }); $(".dswjDql").html(isNaN((m * 100 / (m + q + t)).toFixed(0)) ? 0 + "%" : (m * 100 / (m + q + t)).toFixed(0) + "%"); $(".dswjYpl").html(isNaN((r * 100 / (r + p + s)).toFixed(0)) ? 0 + "%" : (r * 100 / (r + p + s)).toFixed(0) + "%") } ; page.getOddsZkssData = function(j, l) { var z; var y = ""; var v = ""; var w = ""; var x = ""; var o = ""; var n = ""; var r = ""; var p = ""; var s = ""; var m = ""; var q = ""; var t = ""; var u = parseInt($("#homeID").attr("team")); if (j == 0) { z = $("#sel_asia_type").val(); $("#tb_dzmatchZKSS .odds_0").text("-"); $("#tb_dzmatchZKSS .asiaresult").removeClass("bgscoreblue bgscoregreen bgscorered"); $("#tb_dzmatchZKSS .sizeresult").removeClass("bgscoreblue bgscoregreen bgscorered") } else { $("#tb_dzmatchZKSS .odds_1").text("-"); z = $("#sel_europe_type").val() } new ArrayEx(l).Each(function(C) { $("#dzmatchlogZKSS_" + C.matchid + " .odds_{0}".format(j)).each(function(F) { var G = j == 0 ? (z == 0 ? C.asiaprimary : C.asianow) : (z == 0 ? C.europeprimary : C.europenow); if (F == 1) { if (j == 0) { var I = "
*
"; var H = z == "0" ? C.primaryshangpan : C.shangpan; if (H == 2) { $(this).empty(); $(this).append(I); $(this).append(DecimalToCN(G[F])) } else { $(this).text(DecimalToCN(G[F])) } } else { $(this).text(G == null ? "-" : G[F].toFixed(2)) } } else { $(this).text(G == null ? "-" : G[F].toFixed(2)) } }); var A = { "-1": "输", "0": "走", "1": "赢" }; var B = { "-1": "bgscoregreen", "0": "bgscoreblue", "1": "bgscorered" }; var D = { "-1": "小", "0": "走", "1": "大" }; var E = { "-1": "bgscoregreen", "0": "bgscoreblue", "1": "bgscorered" }; if (C.homeTeamID != $("#dzmatchlogZKSS_" + C.matchid + " .homeTeamID").val()) { A = { "1": "输", "0": "走", "-1": "赢" }; B = { "1": "bgscoregreen", "0": "bgscoreblue", "-1": "bgscorered" } } if (j == 0) { if ($("#sel_asia_type").val() == 0) { $("#dzmatchlogZKSS_" + C.matchid + " .asiaresult").text(A[C.asiaprimaryresult.toString()]).removeClass("bgscoreblue bgscoregreen bgscorered").addClass(B[C.asiaprimaryresult.toString()]); $("#dzmatchlogZKSS_" + C.matchid + " .sizeresult").text(C.sizeprimaryresult == null ? "" : D[C.sizeprimaryresult.toString()]).removeClass("bgscoreblue bgscoregreen bgscorered").addClass(C.sizeprimaryresult == null ? "" : E[C.sizeprimaryresult.toString()]) } else { $("#dzmatchlogZKSS_" + C.matchid + " .asiaresult").text(A[C.asiaresult.toString()]).removeClass("bgscoreblue bgscoregreen bgscorered").addClass(B[C.asiaresult.toString()]); $("#dzmatchlogZKSS_" + C.matchid + " .sizeresult").text(C.sizeresult == null ? "" : D[C.sizeresult.toString()]).removeClass("bgscoreblue bgscoregreen bgscorered").addClass(C.sizeresult == null ? "" : E[C.sizeresult.toString()]) } } if (C.homeTeamID == u) { if (C.asiaprimaryresult == 1) { r++ } else { if (C.asiaprimaryresult == -1) { p++ } else { if (C.asiaprimaryresult == 0) { s++ } } } } else { if (C.asiaprimaryresult == 1) { p++ } else { if (C.asiaprimaryresult == -1) { r++ } else { if (C.asiaprimaryresult == 0) { s++ } } } } if (C.sizeresult == 1) { m++ } else { if (C.sizeresult == -1) { q++ } else { if (C.sizeresult == 0) { t++ } } } }); $(".dswjDql").html(isNaN((m * 100 / (m + q + t)).toFixed(0)) ? 0 + "%" : (m * 100 / (m + q + t)).toFixed(0) + "%"); $(".dswjYpl").html(isNaN((r * 100 / (r + p + s)).toFixed(0)) ? 0 + "%" : (r * 100 / (r + p + s)).toFixed(0) + "%") } ; page.switchCompany = function(l, n) { var p = ""; var o = ""; Debug.debugIn(); p = document.getElementById("sameTeam"); o = document.getElementById("sameMatch"); if (p.checked && !o.checked) { page.switchCompanyTZK(l) } else { if (!p.checked && o.checked) { page.switchCompanyTSS(l) } else { if (p.checked && o.checked) { page.switchCompanyZKSS(l) } } } var j; if (l == 0) { j = $("#sel_asia").val(); type = $("#sel_asia_type").val() } else { j = $("#sel_europe").val(); type = $("#sel_europe_type").val() } var m = cache.get(a.format(l, j)); Debug.debugIn(); if (IsEmpty(m) || m.length == 0) { h(l, j, dzMatchIds, a, page.getOddsData, n) } else { page.getOddsData(l, m, n) } } ; page.jqzjHomeCompany = function(l) { var o = ""; var n = ""; jqzjArr = []; Debug.debugIn(); var j; if (l == 0) { j = $("#home_sel_asia").val(); type = $("#home_sel_asia_type").val() } else { j = $("#home_sel_europe").val(); type = $("#home_sel_europe_type").val() } $(".jqzjHomeTeam").each(function() { jqzjArr.push(parseInt($(this).attr("matchID"))) }); var m = cache.get(f.format(l, j)); Debug.debugIn(); if (IsEmpty(m) || m.length == 0) { h(l, j, jqzjArr, f, page.getjqzjHomeOddsData) } else { page.getjqzjHomeOddsData(l, m) } } ; page.jqzjGuestCompany = function(l) { var o = ""; var n = ""; jqzjArr = []; Debug.debugIn(); var j; if (l == 0) { j = $("#guest_sel_asia").val(); type = $("#guest_sel_asia_type").val() } else { j = $("#guest_sel_europe").val(); type = $("#guest_sel_europe_type").val() } $(".jqzjGuestTeam").each(function() { jqzjArr.push(parseInt($(this).attr("matchID"))) }); var m = cache.get(e.format(l, j)); Debug.debugIn(); if (IsEmpty(m) || m.length == 0) { h(l, j, jqzjArr, e, page.getjqzjGuestOddsData) } else { page.getjqzjGuestOddsData(l, m) } } ; page.switchCompanyTZK = function(l) { var j; var n; if (l == 0) { j = $("#sel_asia").val(); n = $("#sel_asia_type").val() } else { j = $("#sel_europe").val(); n = $("#sel_europe_type").val() } var m = cache.get(c.format(l, j)); if (IsEmpty(m)) { h(l, j, dzMatchIdsTZK, c, page.getOddsTzkData) } else { page.getOddsTzkData(l, m) } } ; page.switchCompanyTSS = function(l) { var j; var n; if (l == 0) { j = $("#sel_asia").val(); n = $("#sel_asia_type").val() } else { j = $("#sel_europe").val(); n = $("#sel_europe_type").val() } var m = cache.get(b.format(l, j)); if (IsEmpty(m)) { h(l, j, dzMatchIdsTSS, b, page.getOddsTssData) } else { page.getOddsTssData(l, m) } } ; page.switchCompanyZKSS = function(l) { var j; var n; if (l == 0) { j = $("#sel_asia").val(); n = $("#sel_asia_type").val() } else { j = $("#sel_europe").val(); n = $("#sel_europe_type").val() } var m = cache.get(d.format(l, j)); if (IsEmpty(m)) { h(l, j, dzMatchIdsZKSS, d, page.getOddsZkssData) } else { page.getOddsZkssData(l, m) } } ; var h = function(l, j, p, o, m, n) { $.ajax({ type: "POST", url: menu.genReqUrl("./zhishu/GetDZOdds.html"), traditional: false, data: { matchIDs: p, companyid: j, matchID: matchID }, datatype: "json", beforeSend: function() {}, success: function(q) { q = eval("(" + q + ")"); m(l, q, n) } }) } } )(window); var homeTeamID = $("#homeTeamID").attr("team"); var guestTeamID = $("#guestTeamID").attr("team"); var matchId = $("#matchID").attr("team"); var sclassID = $("#SclassID").attr("team"); var jqzjArr = []; $().ready(function() { var i = parseInt($("#homeWin").attr("match")); var e = parseInt($("#homeFlat").attr("match")); var f = parseInt($("#homeNega").attr("match")); var h = i + e + f; var d = parseInt($("#guestWin").attr("match")); var a = parseInt($("#guestFlat").attr("match")); var b = parseInt($("#guestNega").attr("match")); var c = d + a + b; oddsHig(i, e, f, h, "#jqzjHomeWinning"); oddsHig(d, a, b, c, "#jqzjGuestWinning"); checksSelect(); LoadAd(AdPage.LSSJDetail); $("#dswjMatch_4 .checks").change(function() { checksSelect() }); $(".jqzjHomeTeam").each(function() { jqzjArr.push(parseInt($(this).attr("matchID"))) }); $(".taglist a").each(function() { var j = parseInt($(this).attr("href").replace("#match_", "")); if (matchFilter.getSortObj().isHide(j)) { $(this).addClass("fontbggray") } }); $("body").delegate(".btn_top", "click", function() { var l = $(this); var j = parseInt(l.parents("table").attr("id").replace("match_", "")); matchFilter.showTop(j) }); $("body").delegate(".btn_hide", "click", function() { var l = $(this); var j = parseInt(l.parents("table").attr("id").replace("match_", "")); $(".taglist a:eq({0})".format(j - 1)).addClass("fontbggray"); matchFilter.hideMatch(j) }); $(".taglist a").click(function() { $(this).removeClass("fontbggray") }); matchOddsCore.closeLoadGif(); $("#lssj").addClass("tabOnsec"); pieChart(1); pieChart(2); page.switchCompany(0); page.switchCompany(1); recordHomeSelect(1); recordHomeSelect(2) }); function checksSelect() { trackSameTeam = document.getElementById("sameTeam"); trackSameMatch = document.getElementById("sameMatch"); var f = ""; var c = ""; var d = ""; var e = ""; var b = ""; var a = ""; if (trackSameTeam.checked && !trackSameMatch.checked) { $("#tb_dzmatch,#tb_dzmatch_tss,#tb_dzmatch_zkss,#all,#tzk,#tss,#zkss").hide(); $("#tb_dzmatch_tzk,#tzk").show(); $(".dswjShenlv").html($(".dswjTzkSl").attr("result") + "%"); $("#tb_dzmatch_tzk .dswjScoreSun").each(function() { if ($(this).attr("result") % 2 == 0) { b++ } else { a++ } }); page.switchCompanyTZK(0); page.switchCompanyTZK(1); f = $("#tzk .sheng").attr("result"); c = $("#tzk .ping").attr("result"); d = $("#tzk .fu").attr("result"); e = f + c + d } else { if (trackSameMatch.checked && !trackSameTeam.checked) { $("#tb_dzmatch,#tb_dzmatch_zkss,#tb_dzmatch_tzk,#tzk,#zkss,#all").hide(); $("#tb_dzmatch_tss,#tss").show(); $(".dswjShenlv").html($(".dswjTssSl").attr("result") + "%"); $("#tb_dzmatch_tss .dswjScoreSun").each(function() { if ($(this).attr("result") % 2 == 0) { b++ } else { a++ } }); page.switchCompanyTSS(0); page.switchCompanyTSS(1); f = $("#tss .sheng").attr("result"); c = $("#tss .ping").attr("result"); d = $("#tss .fu").attr("result"); e = f + c + d } else { if (trackSameMatch.checked && trackSameTeam.checked) { $("#tb_dzmatch,#tb_dzmatch_tss,#tb_dzmatch_tzk,#tzk,#tss,#all").hide(); $("#tb_dzmatch_zkss,#zkss").show(); $(".dswjShenlv").html($(".dswjZkssSl").attr("result") + "%"); $("#tb_dzmatch_zkss .dswjScoreSun").each(function() { if ($(this).attr("result") % 2 == 0) { b++ } else { a++ } }); page.switchCompanyZKSS(0); page.switchCompanyZKSS(1); f = $("#zkss .sheng").attr("result"); c = $("#zkss .ping").attr("result"); d = $("#zkss .fu").attr("result"); e = f + c + d } else { $("#tb_dzmatch,#all").show(); $("#tzk,#zkss,#tss,#tb_dzmatch_tss,#tb_dzmatch_tzk,#tb_dzmatch_zkss").hide(); $(".dswjShenlv").html($(".dswjDataSl").attr("result") + "%"); $("#tb_dzmatch .dswjScoreSun").each(function() { if ($(this).attr("result") % 2 == 0) { b++ } else { a++ } }); page.switchCompany(0); page.switchCompany(1); f = $("#all .sheng").attr("result"); c = $("#all .ping").attr("result"); d = $("#all .fu").attr("result") } } } $(".dswjDl").html(isNaN((a * 100 / (b + a)).toFixed(0)) ? 0 + "%" : (a * 100 / (b + a)).toFixed(0) + "%"); $(".dswjSl").html(isNaN((b * 100 / (b + a)).toFixed(0)) ? 0 + "%" : (b * 100 / (b + a)).toFixed(0) + "%"); f = parseInt(f); c = parseInt(c); d = parseInt(d); e = f + c + d; $(".dswjTotal").html(e); oddsHig(f, c, d, e, "#dswjWinning") } function recordHomeSelect(y) { var j = ""; var h = ""; var e = ""; var x = 0; var A = 0; var c = 0; var v = 0; var a = 0; var q = 0; var t = 0; var u = 0; var r = -1; var z = 0; var w = 0; var b = 0; var i = false; var s = ""; var o = ""; var n = ""; var p = ""; var l = ""; var m = ""; var f = parseInt($("#homeID").attr("team")); var d = parseInt($("#guestID").attr("team")); if (y == 1) { j = document.getElementById("recordHomeTeam").checked; h = document.getElementById("recordHomeMatch").checked; w = homeTeamID; b = guestTeamID; if (h != null || h != "") { i = true } } else { if (y == 2) { j = document.getElementById("recordGuestTeam").checked; h = document.getElementById("recordGuestMatch").checked; w = guestTeamID; b = homeTeamID } } if (h) { r = sclassID } if (j) { if (y == 1) { z = 1 } else { if (y == 2) { z = 2 } } } $.ajax({ type: "POST", url: menu.genReqUrl("./zhishu/GetGamesByTeamID.html"), traditional: false, data: { TeamID: w, ExceptTeamID: b, MatchGroupID: r, TZK: z }, datatype: "json", success: function(B) { B = eval("(" + B + ")"); if (y == 1) { B.type = 1 } else { B.type = 2 } ;for (var E = 0; E < B.length; E++) { var D = ""; var C = ""; if (y == 1) { D = B[E].hometeamid == homeTeamID ? "color:#008000;" : "color:#333;"; C = B[E].guestteamid == homeTeamID ? "color:#008000;" : "color:#333;" } else { D = B[E].hometeamid == guestTeamID ? "color:#008000;" : "color:#333;"; C = B[E].guestteamid == guestTeamID ? "color:#008000;" : "color:#333;" } var F = template("jqzjHomeTemplate", { jqzjData: B }); x++; if (B[E].matchresult == 1) { A++ } else { if (B[E].matchresult == 0) { c++ } else { if (B[E].matchresult == -1) { v++ } } } if (y == 1) { if (B[E].hometeamid == f) { if (B[E].hometeamid == f) { if (B[E].result == 1) { p++ } else { if (B[E].result == 3) { l++ } else { m++ } } } else { if (B[E].result == 1) { l++ } else { if (B[E].result == 3) { p++ } else { m++ } } } } else { if (B[E].hometeamid == f) { if (B[E].result == 3) { p++ } else { if (B[E].result == 1) { l++ } else { m++ } } } else { if (B[E].result == 3) { l++ } else { if (B[E].result == 1) { p++ } else { m++ } } } } } else { if (B[E].guestteamid == d) { if (B[E].guestteamid == d) { if (B[E].result == 1) { p++ } else { if (B[E].result == 3) { l++ } else { m++ } } } else { if (B[E].result == 1) { l++ } else { if (B[E].result == 3) { p++ } else { m++ } } } } else { if (B[E].guestteamid == d) { if (B[E].result == 3) { p++ } else { if (B[E].result == 1) { l++ } else { m++ } } } else { if (B[E].result == 3) { l++ } else { if (B[E].result == 1) { p++ } else { m++ } } } } } if ((B[E].homescore + B[E].guestscore) % 2 == 0) { o++ } else { n++ } if (y == 1) { if (B[E].hometeamid == homeTeamID) { a += B[E].homescore } else { if (B[E].guestteamid == homeTeamID) { a += B[E].guestscore } } if (B[E].hometeamid == homeTeamID) { q += B[E].guestscore } else { if (B[E].guestteamid == homeTeamID) { q += B[E].homescore } } } else { if (B[E].hometeamid == guestTeamID) { a += B[E].homescore } else { if (B[E].guestteamid == guestTeamID) { a += B[E].guestscore } } if (B[E].hometeamid == guestTeamID) { q += B[E].guestscore } else { if (B[E].guestteamid == guestTeamID) { q += B[E].homescore } } } if (B[E].sizeresult == 1) { t++ } else { if (B[E].sizeresult == -1) { u++ } } } if (y == 1) { $("#homedata").empty(); $("#homedata").append(F); oddsHig(A, c, v, x, "#jqzjHomeWinning") } else { if (y == 2) { $("#guestdata").empty(); $("#guestdata").append(F); oddsHig(A, c, v, x, "#jqzjGuestWinning") } } if (y == 1) { if (B.length > 0) { page.jqzjHomeCompany(0); page.jqzjHomeCompany(1); $(".jqzjHomeDl").html(isNaN((n * 100 / (o + n))) ? 0 + "%" : (n * 100 / (o + n)).toFixed(0) + "%"); $(".jqzjHomeSl").html(isNaN((o * 100 / (o + n))) ? 0 + "%" : (o * 100 / (o + n)).toFixed(0) + "%"); $(".jqzjHomeShenglv").html(isNaN((p * 100 / (p + l + m))) ? 0 + "%" : (p * 100 / (p + l + m)).toFixed(0) + "%") } else { $(".jqzjHomeDl").html("0%"); $(".jqzjHomeSl").html("0%"); $(".jqzjHomeShenglv").html("0%"); $(".jqzjHomeYpl").html("0%"); $(".jqzjHomeDql").html("0%") } } else { if (B.length > 0) { page.jqzjGuestCompany(0); page.jqzjGuestCompany(1); $(".jqzjGuestDl").html(isNaN((n * 100 / (o + n))) ? 0 + "%" : (n * 100 / (o + n)).toFixed(0) + "%"); $(".jqzjGuestSl").html(isNaN((o * 100 / (o + n))) ? 0 + "%" : (o * 100 / (o + n)).toFixed(0) + "%"); $(".jqzjGuestShenglv").html(isNaN((p * 100 / (p + l + m))) ? 0 + "%" : (p * 100 / (p + l + m)).toFixed(0) + "%") } else { $(".jqzjGuestDl").html("0%"); $(".jqzjGuestSl").html("0%"); $(".jqzjGuestShenglv").html("0%"); $(".jqzjGuestYpl").html("0%"); $(".jqzjGuestDql").html("0%") } } } }) } function homeEchart(c, a, b) { require.config({ paths: { echarts: "/Scripts/build/dist" } }); require(["echarts", "echarts/chart/pie"], function(d) { var e = d.init(document.getElementById("echartHome")); option = { legend: { orient: "vertical", x: "left", data: [""] }, color: ["#bf1e2d", "#2078bb", "#17884d"], calculable: false, series: [{ name: "访问来源", type: "pie", radius: "55%", center: ["40%", "50%"], data: [{ value: c, name: "胜" }, { value: a, name: "平" }, { value: b, name: "负" }] }] }; e.setOption(option) }) } function guestEchart(c, a, b) { require.config({ paths: { echarts: "/Scripts/build/dist" } }); require(["echarts", "echarts/chart/pie"], function(d) { var e = d.init(document.getElementById("myChartGuest")); option = { legend: { orient: "vertical", x: "left", data: [""] }, color: ["#bf1e2d", "#2078bb", "#17884d"], calculable: false, series: [{ name: "访问来源", type: "pie", radius: "55%", center: ["40%", "50%"], data: [{ value: c, name: "胜" }, { value: a, name: "平" }, { value: b, name: "负" }] }] }; e.setOption(option) }) } function pieChart(j) { var f = 0; var e = 0; var i = 1; var l = 0; var a = 0; var h = 0; var d = 0; var b = 0; var c = 0; if (j == 1) { f = $("#selectHome").val(); i = homeTeamID } else { if (j == 2) { f = $("#selectGuest").val(); i = guestTeamID } } if (f == 2) { e = 1 } else { if (f == 3) { e = 2 } } $.ajax({ type: "POST", url: menu.genReqUrl("./zhishu/GetGamesAvgInfo.html"), data: { MatchID: matchId, TeamID: i, HOG: e }, datatype: "json", success: function(m) { m = eval("(" + m + ")"); if (j == 1) { $(".winCount").html(m[0]); $(".winHome").html(m[1]); $(".winGuest").html(m[2]); $(".transportCount").html(m[3]); $(".transportHome").html(m[4]); $(".transportGuest").html(m[5]); l = parseInt(m[6]); a = parseInt(m[7]); h = parseInt(m[8]); $(".win").html(m[6]); $(".go").html(m[7]); $(".lose").html(m[8]); $(".jin").html(m[9]); $(".shi").html(m[10]); homeEchart(l, a, h) } else { if (j == 2) { $(".winCount1").html(m[0]); $(".winHome1").html(m[1]); $(".winGuest1").html(m[2]); $(".transportCount1").html(m[3]); $(".transportHome1").html(m[4]); $(".transportGuest1").html(m[5]); $(".guest_win").html(m[6]); $(".guest_go").html(m[7]); $(".guest_lose").html(m[8]); $(".guest_jin").html(m[9]); $(".guest_shi").html(m[10]); d = parseInt(m[6]); b = parseInt(m[7]); c = parseInt(m[8]); guestEchart(d, b, c) } } } }) } var define, require, esl; !function(ak) { function aQ(a) { aC(a, ax) || (aH[a] = 1) } function au(c, h) { function d(a) { 0 === a.indexOf(".") && b.push(a) } var b = []; if ("string" == typeof c ? d(c) : ah(c, function(a) { d(a) }), b.length > 0) { throw new Error("[REQUIRE_FATAL]Relative ID is not allowed in global require: " + b.join(", ")) } var f = aF.waitSeconds; return f && c instanceof Array && (al && clearTimeout(al), al = setTimeout(aE, 1000 * f)), aj(c, h) } function aE() { function c(e, i) { if (!h[e] && !aC(e, ax)) { h[e] = 1, aC(e, ao) || f[e] || (f[e] = 1, l.push(e)); var a = a3[e]; a ? i && (f[e] || (f[e] = 1, l.push(e)), ah(a.depMs, function(m) { c(m.absId, m.hard) })) : b[e] || (b[e] = 1, d.push(e)) } } var l = [] , d = [] , f = {} , b = {} , h = {}; for (var j in aH) { c(j, 1) } if (l.length || d.length) { throw new Error("[MODULE_TIMEOUT]Hang( " + (l.join(", ") || "none") + " ) Miss( " + (d.join(", ") || "none") + " )") } } function ac(a) { ah(af, function(b) { aO(a, b.deps, b.factory) }), af.length = 0 } function aG(c, h, d) { if (null == d && (null == h ? (d = c, c = null) : (d = h, h = null, c instanceof Array && (h = c, c = null))), null != d) { var f = window.opera; if (!c && document.attachEvent && (!f || "[object Opera]" !== f.toString())) { var b = av(); c = b && b.getAttribute("data-require-id") } c ? aO(c, h, d) : af[0] = { deps: h, factory: d } } } function aM() { var a = aF.config[this.id]; return a && "object" == typeof a ? a : {} } function aO(a, c, b) { a3[a] || (a3[a] = { id: a, depsDec: c, deps: c || ["require", "exports", "module"], factoryDeps: [], factory: b, exports: {}, config: aM, state: ad, require: aV(a), depMs: [], depMkv: {}, depRs: [] }) } function aA(c) { var l = a3[c]; if (l && !aC(c, aD)) { var d = l.deps , f = l.factory , b = 0; "function" == typeof f && (b = Math.min(f.length, d.length), !l.depsDec && f.toString().replace(/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm, "").replace(/require\(\s*(['"'])([^'"]+)\1\s*\)/g, function(a, m, i) { d.push(i) })); var h = [] , j = []; ah(d, function(m, p) { var q, o, e = aY(m), a = aB(e.mod, c); a && !aJ[a] ? (e.res && (o = { id: m, mod: a, res: e.res }, j.push(m), l.depRs.push(o)), q = l.depMkv[a], q || (q = { id: e.mod, absId: a, hard: b > p }, l.depMs.push(q), l.depMkv[a] = q, h.push(a))) : q = { absId: a }, b > p && l.factoryDeps.push(o || q) }), l.state = aD, ag(c), ap(h), j.length && l.require(j, function() { ah(l.depRs, function(a) { a.absId || (a.absId = aB(a.id, c)) }), ar() }) } } function ar() { for (var a in aH) { aA(a), ai(a), aI(a) } } function ai(a) { function c(f) { if (aA(f), !aC(f, aD)) { return !1 } if (aC(f, ao) || b[f]) { return !0 } b[f] = 1; var h = a3[f] , d = !0; return ah(h.depMs, function(i) { return d = c(i.absId) }), d && ah(h.depRs, function(i) { return d = !!i.absId }), d && (h.state = ao), d } var b = {}; c(a) } function ag(e) { function c() { if (!d && b.state === ao) { d = 1; var a = 1; if (ah(b.factoryDeps, function(i) { var l = i.absId; return aJ[l] ? void 0 : (aI(l), a = aC(l, ax)) }), a) { try { var h = b.factory , j = "function" == typeof h ? h.apply(ak, aT(b.factoryDeps, { require: b.require, exports: b.exports, module: b })) : h; null != j && (b.exports = j), b.invokeFactory = null } catch (m) { if (/^\[MODULE_MISS\]"([^"]+)/.test(m.message)) { var f = b.depMkv[RegExp.$1]; return f && (f.hard = 1), void (d = 0) } throw m } aU(e) } } } var d, b = a3[e]; b.invokeFactory = c } function aC(a, b) { return a3[a] && a3[a].state >= b } function aI(a) { var b = a3[a]; b && b.invokeFactory && b.invokeFactory() } function aT(a, c) { var b = []; return ah(a, function(d, f) { "object" == typeof d && (d = d.absId), b[f] = c[d] || a3[d].exports }), b } function aW(a, c) { if (aC(a, ax)) { return void c() } var b = at[a]; b || (b = at[a] = []), b.push(c) } function aU(a) { var d = a3[a]; d.state = ax, delete aH[a]; for (var b = at[a] || [], c = b.length; c--; ) { b[c]() } b.length = 0, at[a] = null } function ap(f, c, d) { function b() { if ("function" == typeof c && !e) { var a = 1; ah(f, function(h) { return aJ[h] ? void 0 : a = !!aC(h, ax) }), a && (e = 1, c.apply(ak, aT(f, aJ))) } } var e = 0; ah(f, function(a) { aJ[a] || aC(a, ax) || (aW(a, b), (a.indexOf("!") > 0 ? a1 : an)(a, d)) }), b() } function an(e) { function a() { var f = aL[e]; aP(f || e, b) } function b() { if (c) { var f; "function" == typeof c.init && (f = c.init.apply(ak, aT(d, aJ))), null == f && c.exports && (f = ak, ah(c.exports.split("."), function(h) { return f = f[h], !!f })), aG(e, d, f || {}) } else { ac(e) } ar() } if (!aN[e] && !a3[e]) { aN[e] = 1; var c = aF.shim[e]; c instanceof Array && (aF.shim[e] = c = { deps: c }); var d = c && (c.deps || []); d ? (ah(d, function(f) { aF.shim[f] || (aF.shim[f] = {}) }), aj(d, a)) : a() } } function a1(a, j) { function b(e) { c.exports = e || !0, aU(a) } function d(i) { var e = j ? a3[j].require : aj; i.load(h.res, e, b, aM.call({ id: a })) } if (!a3[a]) { var f = aL[a]; if (f) { return void an(f) } var h = aY(a) , c = { id: a, state: aD }; a3[a] = c, b.fromText = function(i, l) { new Function(l)(), ac(i) } , d(aj(h.mod)) } } function ae(a, c) { var b = a0(a, 1, c); return b.sort(aR), b } function ab() { function a(c) { aL[c] = b } aF.baseUrl = aF.baseUrl.replace(/\/$/, "") + "/", aq = ae(aF.paths), a4 = ae(aF.map, 1), ah(a4, function(c) { c.v = ae(c.v) }), a2 = [], ah(aF.packages, function(c) { var d = c; "string" == typeof c && (d = { name: c.split("/")[0], location: c, main: "main" }), d.location = d.location || d.name, d.main = (d.main || "main").replace(/\.js$/i, ""), d.reg = az(d.name), a2.push(d) }), a2.sort(aR), aK = ae(aF.urlArgs, 1), aL = {}; for (var b in aF.bundles) { ah(aF.bundles[b], a) } } function aZ(a, c, b) { ah(c, function(d) { return d.reg.test(a) ? (b(d.v, d.k, d), !1) : void 0 }) } function ay(c) { var m = /(\.[a-z0-9]+)$/i , d = /(\?[^#]*)$/ , f = "" , b = c , h = ""; d.test(c) && (h = RegExp.$1, c = c.replace(d, "")), m.test(c) && (f = RegExp.$1, b = c.replace(m, "")); var j, l = b; return aZ(b, aq, function(a, i) { l = l.replace(i, a), j = 1 }), j || aZ(b, a2, function(a, o, n) { l = l.replace(n.name, n.location) }), /^([a-z]{2,10}:\/)?\//i.test(l) || (l = aF.baseUrl + l), l += f + h, aZ(b, aK, function(a) { l += (l.indexOf("?") > 0 ? "&" : "?") + a }), l } function aV(a) { function b(e, d) { if ("string" == typeof e) { if (!c[e]) { var f = aB(e, a); if (aI(f), !aC(f, ax)) { throw new Error('[MODULE_MISS]"' + f + '" is not exists!') } c[e] = a3[f].exports } return c[e] } if (e instanceof Array) { var h = [] , j = []; ah(e, function(r, t) { var m = aY(r) , u = aB(m.mod, a) , s = m.res , q = u; if (s) { var p = u + "!" + s; 0 !== s.indexOf(".") && aL[p] ? u = q = p : q = null } j[t] = q, aQ(u), h.push(u) }), ap(h, function() { ah(j, function(l, i) { null == l && (l = j[i] = aB(e[i], a), aQ(l)) }), ap(j, d, a), ar() }, a), ar() } } var c = {}; return b.toUrl = function(d) { return ay(aB(d, a)) } , b } function aB(c, j) { if (!c) { return "" } j = j || ""; var d = aY(c); if (!d) { return c } var f = d.res , b = aX(d.mod, j); if (ah(a2, function(a) { var i = a.name; return i === b ? (b = i + "/" + a.main, !1) : void 0 }), aZ(j, a4, function(a) { aZ(b, a, function(i, l) { b = b.replace(l, i) }) }), f) { var h = aC(b, ax) && aj(b); f = h && h.normalize ? h.normalize(f, function(a) { return aB(a, j) }) : aB(f, j), b += "!" + f } return b } function aX(c, q) { if (0 === c.indexOf(".")) { var d = q.split("/") , h = c.split("/") , b = d.length - 1 , j = h.length , m = 0 , p = 0; c: for (var f = 0; j > f; f++) { switch (h[f]) { case "..": if (!(b > m)) { break c } m++, p++; break; case ".": p++; break; default: break c } } return d.length = b - m, h = h.slice(p), d.concat(h).join("/") } return c } function aY(a) { var b = a.split("!"); return b[0] ? { mod: b[0], res: b[1] } : void 0 } function a0(c, j, d) { var f = []; for (var b in c) { if (c.hasOwnProperty(b)) { var h = { k: b, v: c[b] }; f.push(h), j && (h.reg = "*" === b && d ? /^/ : az(b)) } } return f } function av() { if (aw) { return aw } if (aa && "interactive" === aa.readyState) { return aa } for (var a = document.getElementsByTagName("script"), c = a.length; c--; ) { var b = a[c]; if ("interactive" === b.readyState) { return aa = b, b } } } function aP(a, d) { /* function b() { var f = c.readyState; ("undefined" == typeof f || /^(loaded|complete)$/.test(f)) && (c.onload = c.onreadystatechange = null, c = null, d()) } var c = document.createElement("script"); c.setAttribute("data-require-id", a), c.src = ay(a + ".js"), c.async = !0, c.readyState ? c.onreadystatechange = b : c.onload = b, aw = c, aS ? am.insertBefore(c, aS) : am.appendChild(c), aw = null */ } function az(a) { return new RegExp("^" + a + "(/|$)") } function ah(a, d) { if (a instanceof Array) { for (var b = 0, c = a.length; c > b && d(a[b], b) !== !1; b++) {} } } function aR(a, d) { var b = a.k || a.name , c = d.k || d.name; return "*" === c ? -1 : "*" === b ? 1 : c.length - b.length } var al, a3 = {}, ad = 1, aD = 2, ao = 3, ax = 4, aH = {}, aJ = { require: au, exports: 1, module: 1 }, aj = aV(), aF = { baseUrl: "./", paths: {}, config: {}, map: {}, packages: [], shim: {}, waitSeconds: 0, bundles: {}, urlArgs: {} }; au.version = "2.0.2", au.loader = "esl", au.toUrl = aj.toUrl; var af = []; aG.amd = {}; var at = {} , aN = {}; au.config = function(c) { if (c) { for (var h in aF) { var d = c[h] , f = aF[h]; if (d) { if ("urlArgs" === h && "string" == typeof d) { aF.urlArgs["*"] = d } else { if (f instanceof Array) { f.push.apply(f, d) } else { if ("object" == typeof f) { for (var b in d) { f[b] = d[b] } } else { aF[h] = d } } } } } ab() } } , ab(); var aq, a2, a4, aL, aK, aw, aa, am = document.getElementsByTagName("head")[0], aS = document.getElementsByTagName("base")[0]; aS && (am = aS.parentNode), define || (define = aG, require || (require = au), esl = au) }(this), define("echarts", ["echarts/echarts"], function(a) { return a }), define("echarts/echarts", ["require", "./config", "zrender/tool/util", "zrender/tool/event", "zrender/tool/env", "zrender", "zrender/config", "./chart/island", "./component/toolbox", "./component", "./component/title", "./component/tooltip", "./component/legend", "./util/ecData", "./chart", "zrender/tool/color", "./component/timeline", "zrender/shape/Image", "zrender/loadingEffect/Bar", "zrender/loadingEffect/Bubble", "zrender/loadingEffect/DynamicLine", "zrender/loadingEffect/Ring", "zrender/loadingEffect/Spin", "zrender/loadingEffect/Whirling", "./theme/macarons", "./theme/infographic"], function(q) { function D() { B.Dispatcher.call(this) } function v(a) { a.innerHTML = "", this._themeConfig = {}, this.dom = a, this._connected = !1, this._status = { dragIn: !1, dragOut: !1, needRefresh: !1 }, this._curEventType = !1, this._chartList = [], this._messageCenter = new D, this._messageCenterOutSide = new D, this.resize = this.resize(), this._init() } function y(d, F, h, l, c) { for (var m = d._chartList, p = m.length; p--; ) { var E = m[p]; "function" == typeof E[F] && E[F](h, l, c) } } var b = q("./config") , z = q("zrender/tool/util") , B = q("zrender/tool/event") , C = {} , w = q("zrender/tool/env").canvasSupported , u = new Date - 0 , j = {} , f = "_echarts_instance_"; C.version = "2.2.7", C.dependencies = { zrender: "2.1.1" }, C.init = function(h, d) { var c = q("zrender"); c.version.replace(".", "") - 0 < C.dependencies.zrender.replace(".", "") - 0 && console.error("ZRender " + c.version + " is too old for ECharts " + C.version + ". Current version need ZRender " + C.dependencies.zrender + "+"), h = h instanceof Array ? h[0] : h; var e = h.getAttribute(f); return e || (e = u++, h.setAttribute(f, e)), j[e] && j[e].dispose(), j[e] = new v(h), j[e].id = e, j[e].canvasSupported = w, j[e].setTheme(d), j[e] } , C.getInstanceById = function(a) { return j[a] } , z.merge(D.prototype, B.Dispatcher.prototype, !0); var x = q("zrender/config").EVENT , A = ["CLICK", "DBLCLICK", "MOUSEOVER", "MOUSEOUT", "DRAGSTART", "DRAGEND", "DRAGENTER", "DRAGOVER", "DRAGLEAVE", "DROP"]; return v.prototype = { _init: function() { var J = this , p = q("zrender").init(this.dom); this._zr = p, this._messageCenter.dispatch = function(d, h, l, c) { l = l || {}, l.type = d, l.event = h, J._messageCenter.dispatchWithContext(d, l, c), J._messageCenterOutSide.dispatchWithContext(d, l, c) } , this._onevent = function(c) { return J.__onevent(c) } ; for (var F in b.EVENT) { "CLICK" != F && "DBLCLICK" != F && "HOVER" != F && "MOUSEOUT" != F && "MAP_ROAM" != F && this._messageCenter.bind(b.EVENT[F], this._onevent, this) } var G = {}; this._onzrevent = function(c) { return J[G[c.type]](c) } ; for (var H = 0, I = A.length; I > H; H++) { var E = A[H] , m = x[E]; G[m] = "_on" + E.toLowerCase(), p.on(m, this._onzrevent) } this.chart = {}, this.component = {}; var e = q("./chart/island"); this._island = new e(this._themeConfig,this._messageCenter,p,{},this), this.chart.island = this._island; var a = q("./component/toolbox"); this._toolbox = new a(this._themeConfig,this._messageCenter,p,{},this), this.component.toolbox = this._toolbox; var K = q("./component"); K.define("title", q("./component/title")), K.define("tooltip", q("./component/tooltip")), K.define("legend", q("./component/legend")), (0 === p.getWidth() || 0 === p.getHeight()) && console.error("Dom’s width & height should be ready before init.") }, __onevent: function(a) { a.__echartsId = a.__echartsId || this.id; var m = a.__echartsId === this.id; switch (this._curEventType || (this._curEventType = a.type), a.type) { case b.EVENT.LEGEND_SELECTED: this._onlegendSelected(a); break; case b.EVENT.DATA_ZOOM: if (!m) { var c = this.component.dataZoom; c && (c.silence(!0), c.absoluteZoom(a.zoom), c.silence(!1)) } this._ondataZoom(a); break; case b.EVENT.DATA_RANGE: m && this._ondataRange(a); break; case b.EVENT.MAGIC_TYPE_CHANGED: if (!m) { var d = this.component.toolbox; d && (d.silence(!0), d.setMagicType(a.magicType), d.silence(!1)) } this._onmagicTypeChanged(a); break; case b.EVENT.DATA_VIEW_CHANGED: m && this._ondataViewChanged(a); break; case b.EVENT.TOOLTIP_HOVER: m && this._tooltipHover(a); break; case b.EVENT.RESTORE: this._onrestore(); break; case b.EVENT.REFRESH: m && this._onrefresh(a); break; case b.EVENT.TOOLTIP_IN_GRID: case b.EVENT.TOOLTIP_OUT_GRID: if (m) { if (this._connected) { var h = this.component.grid; h && (a.x = (a.event.zrenderX - h.getX()) / h.getWidth(), a.y = (a.event.zrenderY - h.getY()) / h.getHeight()) } } else { var h = this.component.grid; h && this._zr.trigger("mousemove", { connectTrigger: !0, zrenderX: h.getX() + a.x * h.getWidth(), zrenderY: h.getY() + a.y * h.getHeight() }) } } if (this._connected && m && this._curEventType === a.type) { for (var l in this._connected) { this._connected[l].connectedEventHandler(a) } this._curEventType = null } (!m || !this._connected && m) && (this._curEventType = null) }, _onclick: function(a) { if (y(this, "onclick", a), a.target) { var c = this._eventPackage(a.target); c && null != c.seriesIndex && this._messageCenter.dispatch(b.EVENT.CLICK, a.event, c, this) } }, _ondblclick: function(a) { if (y(this, "ondblclick", a), a.target) { var c = this._eventPackage(a.target); c && null != c.seriesIndex && this._messageCenter.dispatch(b.EVENT.DBLCLICK, a.event, c, this) } }, _onmouseover: function(a) { if (a.target) { var c = this._eventPackage(a.target); c && null != c.seriesIndex && this._messageCenter.dispatch(b.EVENT.HOVER, a.event, c, this) } }, _onmouseout: function(a) { if (a.target) { var c = this._eventPackage(a.target); c && null != c.seriesIndex && this._messageCenter.dispatch(b.EVENT.MOUSEOUT, a.event, c, this) } }, _ondragstart: function(a) { this._status = { dragIn: !1, dragOut: !1, needRefresh: !1 }, y(this, "ondragstart", a) }, _ondragenter: function(a) { y(this, "ondragenter", a) }, _ondragover: function(a) { y(this, "ondragover", a) }, _ondragleave: function(a) { y(this, "ondragleave", a) }, _ondrop: function(a) { y(this, "ondrop", a, this._status), this._island.ondrop(a, this._status) }, _ondragend: function(a) { if (y(this, "ondragend", a, this._status), this._timeline && this._timeline.ondragend(a, this._status), this._island.ondragend(a, this._status), this._status.needRefresh) { this._syncBackupData(this._option); var c = this._messageCenter; c.dispatch(b.EVENT.DATA_CHANGED, a.event, this._eventPackage(a.target), this), c.dispatch(b.EVENT.REFRESH, null, null, this) } }, _onlegendSelected: function(a) { this._status.needRefresh = !1, y(this, "onlegendSelected", a, this._status), this._status.needRefresh && this._messageCenter.dispatch(b.EVENT.REFRESH, null, null, this) }, _ondataZoom: function(a) { this._status.needRefresh = !1, y(this, "ondataZoom", a, this._status), this._status.needRefresh && this._messageCenter.dispatch(b.EVENT.REFRESH, null, null, this) }, _ondataRange: function(a) { this._clearEffect(), this._status.needRefresh = !1, y(this, "ondataRange", a, this._status), this._status.needRefresh && this._zr.refreshNextFrame() }, _onmagicTypeChanged: function() { this._clearEffect(), this._render(this._toolbox.getMagicOption()) }, _ondataViewChanged: function(a) { this._syncBackupData(a.option), this._messageCenter.dispatch(b.EVENT.DATA_CHANGED, null, a, this), this._messageCenter.dispatch(b.EVENT.REFRESH, null, null, this) }, _tooltipHover: function(a) { var c = []; y(this, "ontooltipHover", a, c) }, _onrestore: function() { this.restore() }, _onrefresh: function(a) { this._refreshInside = !0, this.refresh(a), this._refreshInside = !1 }, _syncBackupData: function(a) { this.component.dataZoom && this.component.dataZoom.syncBackupData(a) }, _eventPackage: function(h) { if (h) { var d = q("./util/ecData") , e = d.get(h, "seriesIndex") , c = d.get(h, "dataIndex"); return c = -1 != e && this.component.dataZoom ? this.component.dataZoom.getRealDataIndex(e, c) : c, { seriesIndex: e, seriesName: (d.get(h, "series") || {}).name, dataIndex: c, data: d.get(h, "data"), name: d.get(h, "name"), value: d.get(h, "value"), special: d.get(h, "special") } } }, _noDataCheck: function(a) { for (var l = a.series, c = 0, d = l.length; d > c; c++) { if (l[c].type == b.CHART_TYPE_MAP || l[c].data && l[c].data.length > 0 || l[c].markPoint && l[c].markPoint.data && l[c].markPoint.data.length > 0 || l[c].markLine && l[c].markLine.data && l[c].markLine.data.length > 0 || l[c].nodes && l[c].nodes.length > 0 || l[c].links && l[c].links.length > 0 || l[c].matrix && l[c].matrix.length > 0 || l[c].eventList && l[c].eventList.length > 0) { return !1 } } var h = this._option && this._option.noDataLoadingOption || this._themeConfig.noDataLoadingOption || b.noDataLoadingOption || { text: this._option && this._option.noDataText || this._themeConfig.noDataText || b.noDataText, effect: this._option && this._option.noDataEffect || this._themeConfig.noDataEffect || b.noDataEffect }; return this.clear(), this.showLoading(h), !0 }, _render: function(N) { if (this._mergeGlobalConifg(N), !this._noDataCheck(N)) { var G = N.backgroundColor; if (G) { if (w || -1 == G.indexOf("rgba")) { this.dom.style.backgroundColor = G } else { var I = G.split(","); this.dom.style.filter = "alpha(opacity=" + 100 * I[3].substring(0, I[3].lastIndexOf(")")) + ")", I.length = 3, I[0] = I[0].replace("a", ""), this.dom.style.backgroundColor = I.join(",") + ")" } } this._zr.clearAnimation(), this._chartList = []; var J = q("./chart") , L = q("./component"); (N.xAxis || N.yAxis) && (N.grid = N.grid || {}, N.dataZoom = N.dataZoom || {}); for (var M, F, e, a = ["title", "legend", "tooltip", "dataRange", "roamController", "grid", "dataZoom", "xAxis", "yAxis", "polar"], H = 0, K = a.length; K > H; H++) { F = a[H], e = this.component[F], N[F] ? (e ? e.refresh && e.refresh(N) : (M = L.get(/^[xy]Axis$/.test(F) ? "axis" : F), e = new M(this._themeConfig,this._messageCenter,this._zr,N,this,F), this.component[F] = e), this._chartList.push(e)) : e && (e.dispose(), this.component[F] = null, delete this.component[F]) } for (var O, Q, P, E = {}, H = 0, K = N.series.length; K > H; H++) { Q = N.series[H].type, Q ? E[Q] || (E[Q] = !0, O = J.get(Q), O ? (this.chart[Q] ? (P = this.chart[Q], P.refresh(N)) : P = new O(this._themeConfig,this._messageCenter,this._zr,N,this), this._chartList.push(P), this.chart[Q] = P) : console.error(Q + " has not been required.")) : console.error("series[" + H + "] chart type has not been defined.") } for (Q in this.chart) { Q == b.CHART_TYPE_ISLAND || E[Q] || (this.chart[Q].dispose(), this.chart[Q] = null, delete this.chart[Q]) } this.component.grid && this.component.grid.refixAxisShape(this.component), this._island.refresh(N), this._toolbox.refresh(N), N.animation && !N.renderAsImage ? this._zr.refresh() : this._zr.render(); var l = "IMG" + this.id , R = document.getElementById(l); N.renderAsImage && w ? (R ? R.src = this.getDataURL(N.renderAsImage) : (R = this.getImage(N.renderAsImage), R.id = l, R.style.position = "absolute", R.style.left = 0, R.style.top = 0, this.dom.firstChild.appendChild(R)), this.un(), this._zr.un(), this._disposeChartList(), this._zr.clear()) : R && R.parentNode.removeChild(R), R = null, this._option = N } }, restore: function() { this._clearEffect(), this._option = z.clone(this._optionRestore), this._disposeChartList(), this._island.clear(), this._toolbox.reset(this._option, !0), this._render(this._option) }, refresh: function(a) { this._clearEffect(), a = a || {}; var h = a.option; !this._refreshInside && h && (h = this.getOption(), z.merge(h, a.option, !0), z.merge(this._optionRestore, a.option, !0), this._toolbox.reset(h)), this._island.refresh(h), this._toolbox.refresh(h), this._zr.clearAnimation(); for (var c = 0, d = this._chartList.length; d > c; c++) { this._chartList[c].refresh && this._chartList[c].refresh(h) } this.component.grid && this.component.grid.refixAxisShape(this.component), this._zr.refresh() }, _disposeChartList: function() { this._clearEffect(), this._zr.clearAnimation(); for (var a = this._chartList.length; a--; ) { var d = this._chartList[a]; if (d) { var c = d.type; this.chart[c] && delete this.chart[c], this.component[c] && delete this.component[c], d.dispose && d.dispose() } } this._chartList = [] }, _mergeGlobalConifg: function(h) { for (var a = ["backgroundColor", "calculable", "calculableColor", "calculableHolderColor", "nameConnector", "valueConnector", "animation", "animationThreshold", "animationDuration", "animationDurationUpdate", "animationEasing", "addDataAnimation", "symbolList", "DRAG_ENABLE_TIME"], c = a.length; c--; ) { var d = a[c]; null == h[d] && (h[d] = null != this._themeConfig[d] ? this._themeConfig[d] : b[d]) } var e = h.color; e && e.length || (e = this._themeConfig.color || b.color), this._zr.getColor = function(m) { var l = q("zrender/tool/color"); return l.getColor(m, e) } , w || (h.animation = !1, h.addDataAnimation = !1) }, setOption: function(a, c) { return a.timeline ? this._setTimelineOption(a) : this._setOption(a, c) }, _setOption: function(a, d, c) { return !d && this._option ? this._option = z.merge(this.getOption(), z.clone(a), !0) : (this._option = z.clone(a), !c && this._timeline && this._timeline.dispose()), this._optionRestore = z.clone(this._option), this._option.series && 0 !== this._option.series.length ? (this.component.dataZoom && (this._option.dataZoom || this._option.toolbox && this._option.toolbox.feature && this._option.toolbox.feature.dataZoom && this._option.toolbox.feature.dataZoom.show) && this.component.dataZoom.syncOption(this._option), this._toolbox.reset(this._option), this._render(this._option), this) : void this._zr.clear() }, getOption: function() { function a(i) { var l = c._optionRestore[i]; if (l) { if (l instanceof Array) { for (var h = l.length; h--; ) { d[i][h].data = z.clone(l[h].data) } } else { d[i].data = z.clone(l.data) } } } var d = z.clone(this._option) , c = this; return a("xAxis"), a("yAxis"), a("series"), d }, setSeries: function(a, c) { return c ? (this._option.series = a, this.setOption(this._option, c)) : this.setOption({ series: a }), this }, getSeries: function() { return this.getOption().series }, _setTimelineOption: function(d) { this._timeline && this._timeline.dispose(); var a = q("./component/timeline") , c = new a(this._themeConfig,this._messageCenter,this._zr,d,this); return this._timeline = c, this.component.timeline = this._timeline, this }, addData: function(G, Y, K, Q, S) { function T() { if (E._zr) { E._zr.clearAnimation(); for (var c = 0, d = ad.length; d > c; c++) { ad[c].motionlessOnce = J.addDataAnimation && ad[c].addDataAnimation } E._messageCenter.dispatch(b.EVENT.REFRESH, null, { option: J }, E) } } for (var N = G instanceof Array ? G : [[G, Y, K, Q, S]], J = this.getOption(), F = this._optionRestore, E = this, P = 0, R = N.length; R > P; P++) { G = N[P][0], Y = N[P][1], K = N[P][2], Q = N[P][3], S = N[P][4]; var Z = F.series[G] , ac = K ? "unshift" : "push" , aa = K ? "pop" : "shift"; if (Z) { var I = Z.data , H = J.series[G].data; if (I[ac](Y), H[ac](Y), Q || (I[aa](), Y = H[aa]()), null != S) { var ah, o; if (Z.type === b.CHART_TYPE_PIE && (ah = F.legend) && (o = ah.data)) { var a = J.legend.data; if (o[ac](S), a[ac](S), !Q) { var af = z.indexOf(o, Y.name); -1 != af && o.splice(af, 1), af = z.indexOf(a, Y.name), -1 != af && a.splice(af, 1) } } else { if (null != F.xAxis && null != F.yAxis) { var M, ab, O = Z.xAxisIndex || 0; (null == F.xAxis[O].type || "category" === F.xAxis[O].type) && (M = F.xAxis[O].data, ab = J.xAxis[O].data, M[ac](S), ab[ac](S), Q || (M[aa](), ab[aa]())), O = Z.yAxisIndex || 0, "category" === F.yAxis[O].type && (M = F.yAxis[O].data, ab = J.yAxis[O].data, M[ac](S), ab[ac](S), Q || (M[aa](), ab[aa]())) } } } this._option.series[G].data = J.series[G].data } } this._zr.clearAnimation(); for (var ad = this._chartList, ae = 0, ag = function() { ae--, 0 === ae && T() }, P = 0, R = ad.length; R > P; P++) { J.addDataAnimation && ad[P].addDataAnimation && (ae++, ad[P].addDataAnimation(N, ag)) } return this.component.dataZoom && this.component.dataZoom.syncOption(J), this._option = J, J.addDataAnimation || setTimeout(T, 0), this }, addMarkPoint: function(a, c) { return this._addMark(a, c, "markPoint") }, addMarkLine: function(a, c) { return this._addMark(a, c, "markLine") }, _addMark: function(E, L, G) { var I, m = this._option.series; if (m && (I = m[E])) { var J = this._optionRestore.series , K = J[E] , H = I[G] , F = K[G]; H = I[G] = H || { data: [] }, F = K[G] = F || { data: [] }; for (var p in L) { "data" === p ? (H.data = H.data.concat(L.data), F.data = F.data.concat(L.data)) : "object" != typeof L[p] || null == H[p] ? H[p] = F[p] = L[p] : (z.merge(H[p], L[p], !0), z.merge(F[p], L[p], !0)) } var o = this.chart[I.type]; o && o.addMark(E, L, G) } return this }, delMarkPoint: function(a, c) { return this._delMark(a, c, "markPoint") }, delMarkLine: function(a, c) { return this._delMark(a, c, "markLine") }, _delMark: function(F, N, H) { var J, m, K, L = this._option.series; if (!(L && (J = L[F]) && (m = J[H]) && (K = m.data))) { return this } N = N.split(" > "); for (var M = -1, I = 0, G = K.length; G > I; I++) { var E = K[I]; if (E instanceof Array) { if (E[0].name === N[0] && E[1].name === N[1]) { M = I; break } } else { if (E.name === N[0]) { M = I; break } } } if (M > -1) { K.splice(M, 1), this._optionRestore.series[F][H].data.splice(M, 1); var p = this.chart[J.type]; p && p.delMark(F, N.join(" > "), H) } return this }, getDom: function() { return this.dom }, getZrender: function() { return this._zr }, getDataURL: function(d) { if (!w) { return "" } if (0 === this._chartList.length) { var m = "IMG" + this.id , h = document.getElementById(m); if (h) { return h.src } } var l = this.component.tooltip; switch (l && l.hideTip(), d) { case "jpeg": break; default: d = "png" } var c = this._option.backgroundColor; return c && "rgba(0,0,0,0)" === c.replace(" ", "") && (c = "#fff"), this._zr.toDataURL("image/" + d, c) }, getImage: function(a) { var d = this._optionRestore.title , c = document.createElement("img"); return c.src = this.getDataURL(a), c.title = d && d.text || "ECharts", c }, getConnectedDataURL: function(P) { if (!this.isConnected()) { return this.getDataURL(P) } var H = this.dom , K = { self: { img: this.getDataURL(P), left: H.offsetLeft, top: H.offsetTop, right: H.offsetLeft + H.offsetWidth, bottom: H.offsetTop + H.offsetHeight } } , e = K.self.left , L = K.self.top , N = K.self.right , O = K.self.bottom; for (var I in this._connected) { H = this._connected[I].getDom(), K[I] = { img: this._connected[I].getDataURL(P), left: H.offsetLeft, top: H.offsetTop, right: H.offsetLeft + H.offsetWidth, bottom: H.offsetTop + H.offsetHeight }, e = Math.min(e, K[I].left), L = Math.min(L, K[I].top), N = Math.max(N, K[I].right), O = Math.max(O, K[I].bottom) } var G = document.createElement("div"); G.style.position = "absolute", G.style.left = "-4000px", G.style.width = N - e + "px", G.style.height = O - L + "px", document.body.appendChild(G); var F = q("zrender").init(G) , E = q("zrender/shape/Image"); for (var I in K) { F.addShape(new E({ style: { x: K[I].left - e, y: K[I].top - L, image: K[I].img } })) } F.render(); var J = this._option.backgroundColor; J && "rgba(0,0,0,0)" === J.replace(/ /g, "") && (J = "#fff"); var M = F.toDataURL("image/png", J); return setTimeout(function() { F.dispose(), G.parentNode.removeChild(G), G = null }, 100), M }, getConnectedImage: function(a) { var d = this._optionRestore.title , c = document.createElement("img"); return c.src = this.getConnectedDataURL(a), c.title = d && d.text || "ECharts", c }, on: function(a, c) { return this._messageCenterOutSide.bind(a, c, this), this }, un: function(a, c) { return this._messageCenterOutSide.unbind(a, c), this }, connect: function(a) { if (!a) { return this } if (this._connected || (this._connected = {}), a instanceof Array) { for (var d = 0, c = a.length; c > d; d++) { this._connected[a[d].id] = a[d] } } else { this._connected[a.id] = a } return this }, disConnect: function(a) { if (!a || !this._connected) { return this } if (a instanceof Array) { for (var h = 0, c = a.length; c > h; h++) { delete this._connected[a[h].id] } } else { delete this._connected[a.id] } for (var d in this._connected) { return this } return this._connected = !1, this }, connectedEventHandler: function(a) { a.__echartsId != this.id && this._onevent(a) }, isConnected: function() { return !!this._connected }, showLoading: function(h) { var a = { bar: q("zrender/loadingEffect/Bar"), bubble: q("zrender/loadingEffect/Bubble"), dynamicLine: q("zrender/loadingEffect/DynamicLine"), ring: q("zrender/loadingEffect/Ring"), spin: q("zrender/loadingEffect/Spin"), whirling: q("zrender/loadingEffect/Whirling") }; this._toolbox.hideDataView(), h = h || {}; var c = h.textStyle || {}; h.textStyle = c; var d = z.merge(z.merge(z.clone(c), this._themeConfig.textStyle), b.textStyle); c.textFont = d.fontStyle + " " + d.fontWeight + " " + d.fontSize + "px " + d.fontFamily, c.text = h.text || this._option && this._option.loadingText || this._themeConfig.loadingText || b.loadingText, null != h.x && (c.x = h.x), null != h.y && (c.y = h.y), h.effectOption = h.effectOption || {}, h.effectOption.textStyle = c; var e = h.effect; return ("string" == typeof e || null == e) && (e = a[h.effect || this._option && this._option.loadingEffect || this._themeConfig.loadingEffect || b.loadingEffect] || a.spin), this._zr.showLoading(new e(h.effectOption)), this }, hideLoading: function() { return this._zr.hideLoading(), this }, setTheme: function(c) { if (c) { if ("string" == typeof c) { switch (c) { case "macarons": c = q("./theme/macarons"); break; case "infographic": c = q("./theme/infographic"); break; default: c = {} } } else { c = c || {} } this._themeConfig = c } if (!w) { var a = this._themeConfig.textStyle; a && a.fontFamily && a.fontFamily2 && (a.fontFamily = a.fontFamily2), a = b.textStyle, a.fontFamily = a.fontFamily2 } this._timeline && this._timeline.setTheme(!0), this._optionRestore && this.restore() }, resize: function() { var a = this; return function() { if (a._clearEffect(), a._zr.resize(), a._option && a._option.renderAsImage && w) { return a._render(a._option), a } a._zr.clearAnimation(), a._island.resize(), a._toolbox.resize(), a._timeline && a._timeline.resize(); for (var d = 0, c = a._chartList.length; c > d; d++) { a._chartList[d].resize && a._chartList[d].resize() } return a.component.grid && a.component.grid.refixAxisShape(a.component), a._zr.refresh(), a._messageCenter.dispatch(b.EVENT.RESIZE, null, null, a), a } }, _clearEffect: function() { this._zr.modLayer(b.EFFECT_ZLEVEL, { motionBlur: !1 }), this._zr.painter.clearLayer(b.EFFECT_ZLEVEL) }, clear: function() { return this._disposeChartList(), this._zr.clear(), this._option = {}, this._optionRestore = {}, this.dom.style.backgroundColor = null, this }, dispose: function() { var a = this.dom.getAttribute(f); a && delete j[a], this._island.dispose(), this._toolbox.dispose(), this._timeline && this._timeline.dispose(), this._messageCenter.unbind(), this.clear(), this._zr.dispose(), this._zr = null } }, C }), define("echarts/config", [], function() { var a = { CHART_TYPE_LINE: "line", CHART_TYPE_BAR: "bar", CHART_TYPE_SCATTER: "scatter", CHART_TYPE_PIE: "pie", CHART_TYPE_RADAR: "radar", CHART_TYPE_VENN: "venn", CHART_TYPE_TREEMAP: "treemap", CHART_TYPE_TREE: "tree", CHART_TYPE_MAP: "map", CHART_TYPE_K: "k", CHART_TYPE_ISLAND: "island", CHART_TYPE_FORCE: "force", CHART_TYPE_CHORD: "chord", CHART_TYPE_GAUGE: "gauge", CHART_TYPE_FUNNEL: "funnel", CHART_TYPE_EVENTRIVER: "eventRiver", CHART_TYPE_WORDCLOUD: "wordCloud", CHART_TYPE_HEATMAP: "heatmap", COMPONENT_TYPE_TITLE: "title", COMPONENT_TYPE_LEGEND: "legend", COMPONENT_TYPE_DATARANGE: "dataRange", COMPONENT_TYPE_DATAVIEW: "dataView", COMPONENT_TYPE_DATAZOOM: "dataZoom", COMPONENT_TYPE_TOOLBOX: "toolbox", COMPONENT_TYPE_TOOLTIP: "tooltip", COMPONENT_TYPE_GRID: "grid", COMPONENT_TYPE_AXIS: "axis", COMPONENT_TYPE_POLAR: "polar", COMPONENT_TYPE_X_AXIS: "xAxis", COMPONENT_TYPE_Y_AXIS: "yAxis", COMPONENT_TYPE_AXIS_CATEGORY: "categoryAxis", COMPONENT_TYPE_AXIS_VALUE: "valueAxis", COMPONENT_TYPE_TIMELINE: "timeline", COMPONENT_TYPE_ROAMCONTROLLER: "roamController", backgroundColor: "rgba(0,0,0,0)", color: ["#ff7f50", "#87cefa", "#da70d6", "#32cd32", "#6495ed", "#ff69b4", "#ba55d3", "#cd5c5c", "#ffa500", "#40e0d0", "#1e90ff", "#ff6347", "#7b68ee", "#00fa9a", "#ffd700", "#6699FF", "#ff6666", "#3cb371", "#b8860b", "#30e0e0"], markPoint: { clickable: !0, symbol: "pin", symbolSize: 10, large: !1, effect: { show: !1, loop: !0, period: 15, type: "scale", scaleSize: 2, bounceDistance: 10 }, itemStyle: { normal: { borderWidth: 2, label: { show: !0, position: "inside" } }, emphasis: { label: { show: !0 } } } }, markLine: { clickable: !0, symbol: ["circle", "arrow"], symbolSize: [2, 4], smoothness: 0.2, precision: 2, effect: { show: !1, loop: !0, period: 15, scaleSize: 2 }, bundling: { enable: !1, maxTurningAngle: 45 }, itemStyle: { normal: { borderWidth: 1.5, label: { show: !0, position: "end" }, lineStyle: { type: "dashed" } }, emphasis: { label: { show: !1 }, lineStyle: {} } } }, textStyle: { decoration: "none", fontFamily: "Arial, Verdana, sans-serif", fontFamily2: "微软雅黑", fontSize: 12, fontStyle: "normal", fontWeight: "normal" }, EVENT: { REFRESH: "refresh", RESTORE: "restore", RESIZE: "resize", CLICK: "click", DBLCLICK: "dblclick", HOVER: "hover", MOUSEOUT: "mouseout", DATA_CHANGED: "dataChanged", DATA_ZOOM: "dataZoom", DATA_RANGE: "dataRange", DATA_RANGE_SELECTED: "dataRangeSelected", DATA_RANGE_HOVERLINK: "dataRangeHoverLink", LEGEND_SELECTED: "legendSelected", LEGEND_HOVERLINK: "legendHoverLink", MAP_SELECTED: "mapSelected", PIE_SELECTED: "pieSelected", MAGIC_TYPE_CHANGED: "magicTypeChanged", DATA_VIEW_CHANGED: "dataViewChanged", TIMELINE_CHANGED: "timelineChanged", MAP_ROAM: "mapRoam", FORCE_LAYOUT_END: "forceLayoutEnd", TOOLTIP_HOVER: "tooltipHover", TOOLTIP_IN_GRID: "tooltipInGrid", TOOLTIP_OUT_GRID: "tooltipOutGrid", ROAMCONTROLLER: "roamController" }, DRAG_ENABLE_TIME: 120, EFFECT_ZLEVEL: 10, effectBlendAlpha: 0.95, symbolList: ["circle", "rectangle", "triangle", "diamond", "emptyCircle", "emptyRectangle", "emptyTriangle", "emptyDiamond"], loadingEffect: "spin", loadingText: "数据读取中...", noDataEffect: "bubble", noDataText: "暂无数据", calculable: !1, calculableColor: "rgba(255,165,0,0.6)", calculableHolderColor: "#ccc", nameConnector: " & ", valueConnector: ": ", animation: !0, addDataAnimation: !0, animationThreshold: 2000, animationDuration: 2000, animationDurationUpdate: 500, animationEasing: "ExponentialOut" }; return a }), define("zrender/tool/util", ["require", "../dep/excanvas"], function(v) { function H(a) { return a && 1 === a.nodeType && "string" == typeof a.nodeName } function z(d) { if ("object" == typeof d && null !== d) { var f = d; if (d instanceof Array) { f = []; for (var c = 0, h = d.length; h > c; c++) { f[c] = z(d[c]) } } else { if (!x[w.call(d)] && !H(d)) { f = {}; for (var i in d) { d.hasOwnProperty(i) && (f[i] = z(d[i])) } } } return f } return d } function C(a, c, d, f) { if (c.hasOwnProperty(d)) { var h = a[d]; "object" != typeof h || x[w.call(h)] || H(h) ? !f && d in a || (a[d] = c[d]) : b(a[d], c[d], f) } } function b(d, h, f) { for (var c in h) { C(d, h, c, f) } return d } function D() { if (!B) { if (v("../dep/excanvas"), window.G_vmlCanvasManager) { var a = document.createElement("div"); a.style.position = "absolute", a.style.top = "-1000px", document.body.appendChild(a), B = G_vmlCanvasManager.initElement(a).getContext("2d") } else { B = document.createElement("canvas").getContext("2d") } } return B } function F(a, f) { if (a.indexOf) { return a.indexOf(f) } for (var c = 0, d = a.length; d > c; c++) { if (a[c] === f) { return c } } return -1 } function G(d, l) { function f() {} var h = d.prototype; f.prototype = l.prototype, d.prototype = new f; for (var c in h) { d.prototype[c] = h[c] } d.constructor = d } function A(d, m, f) { if (d && m) { if (d.forEach && d.forEach === I) { d.forEach(m, f) } else { if (d.length === +d.length) { for (var h = 0, c = d.length; c > h; h++) { m.call(f, d[h], h, d) } } else { for (var l in d) { d.hasOwnProperty(l) && m.call(f, d[l], l, d) } } } } } function y(d, m, f) { if (d && m) { if (d.map && d.map === K) { return d.map(m, f) } for (var h = [], c = 0, l = d.length; l > c; c++) { h.push(m.call(f, d[c], c, d)) } return h } } function q(d, m, f) { if (d && m) { if (d.filter && d.filter === J) { return d.filter(m, f) } for (var h = [], c = 0, l = d.length; l > c; c++) { m.call(f, d[c], c, d) && h.push(d[c]) } return h } } function j(a, c) { return function() { a.apply(c, arguments) } } var B, E = Array.prototype, I = E.forEach, K = E.map, J = E.filter, x = { "[object Function]": 1, "[object RegExp]": 1, "[object Date]": 1, "[object Error]": 1, "[object CanvasGradient]": 1 }, w = Object.prototype.toString; return { inherits: G, clone: z, merge: b, getContext: D, indexOf: F, each: A, map: y, filter: q, bind: j } }), define("zrender/tool/event", ["require", "../mixin/Eventful"], function(c) { function j(a) { return "undefined" != typeof a.zrenderX && a.zrenderX || "undefined" != typeof a.offsetX && a.offsetX || "undefined" != typeof a.layerX && a.layerX || "undefined" != typeof a.clientX && a.clientX } function d(a) { return "undefined" != typeof a.zrenderY && a.zrenderY || "undefined" != typeof a.offsetY && a.offsetY || "undefined" != typeof a.layerY && a.layerY || "undefined" != typeof a.clientY && a.clientY } function f(a) { return "undefined" != typeof a.zrenderDelta && a.zrenderDelta || "undefined" != typeof a.wheelDelta && a.wheelDelta || "undefined" != typeof a.detail && -a.detail } var b = c("../mixin/Eventful") , h = "function" == typeof window.addEventListener ? function(a) { a.preventDefault(), a.stopPropagation(), a.cancelBubble = !0 } : function(a) { a.returnValue = !1, a.cancelBubble = !0 } ; return { getX: j, getY: d, getDelta: f, stop: h, Dispatcher: b } }), define("zrender/tool/env", [], function() { function a(x) { var K = this.os = {} , C = this.browser = {} , F = x.match(/Web[kK]it[\/]{0,1}([\d.]+)/) , j = x.match(/(Android);?[\s\/]+([\d.]+)?/) , G = x.match(/(iPad).*OS\s([\d_]+)/) , I = x.match(/(iPod)(.*OS\s([\d_]+))?/) , J = !G && x.match(/(iPhone\sOS)\s([\d_]+)/) , D = x.match(/(webOS|hpwOS)[\s\/]([\d.]+)/) , B = D && x.match(/TouchPad/) , w = x.match(/Kindle\/([\d.]+)/) , v = x.match(/Silk\/([\d._]+)/) , E = x.match(/(BlackBerry).*Version\/([\d.]+)/) , H = x.match(/(BB10).*Version\/([\d.]+)/) , L = x.match(/(RIM\sTablet\sOS)\s([\d.]+)/) , N = x.match(/PlayBook/) , M = x.match(/Chrome\/([\d.]+)/) || x.match(/CriOS\/([\d.]+)/) , A = x.match(/Firefox\/([\d.]+)/) , z = x.match(/MSIE ([\d.]+)/) , O = F && x.match(/Mobile\//) && !M , q = x.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/) && !M , z = x.match(/MSIE\s([\d.]+)/); return (C.webkit = !!F) && (C.version = F[1]), j && (K.android = !0, K.version = j[2]), J && !I && (K.ios = K.iphone = !0, K.version = J[2].replace(/_/g, ".")), G && (K.ios = K.ipad = !0, K.version = G[2].replace(/_/g, ".")), I && (K.ios = K.ipod = !0, K.version = I[3] ? I[3].replace(/_/g, ".") : null), D && (K.webos = !0, K.version = D[2]), B && (K.touchpad = !0), E && (K.blackberry = !0, K.version = E[2]), H && (K.bb10 = !0, K.version = H[2]), L && (K.rimtabletos = !0, K.version = L[2]), N && (C.playbook = !0), w && (K.kindle = !0, K.version = w[1]), v && (C.silk = !0, C.version = v[1]), !v && K.android && x.match(/Kindle Fire/) && (C.silk = !0), M && (C.chrome = !0, C.version = M[1]), A && (C.firefox = !0, C.version = A[1]), z && (C.ie = !0, C.version = z[1]), O && (x.match(/Safari/) || K.ios) && (C.safari = !0), q && (C.webview = !0), z && (C.ie = !0, C.version = z[1]), K.tablet = !!(G || N || j && !x.match(/Mobile/) || A && x.match(/Tablet/) || z && !x.match(/Phone/) && x.match(/Touch/)), K.phone = !(K.tablet || K.ipod || !(j || J || D || E || H || M && x.match(/Android/) || M && x.match(/CriOS\/([\d.]+)/) || A && x.match(/Mobile/) || z && x.match(/Touch/))), { browser: C, os: K, canvasSupported: document.createElement("canvas").getContext ? !0 : !1 } } return a(navigator.userAgent) }), define("zrender", ["zrender/zrender"], function(a) { return a }), define("zrender/zrender", ["require", "./dep/excanvas", "./tool/util", "./tool/log", "./tool/guid", "./Handler", "./Painter", "./Storage", "./animation/Animation", "./tool/env"], function(m) { function z(a) { return function() { a._needsRefreshNextFrame && a.refresh() } } m("./dep/excanvas"); var q = m("./tool/util") , v = m("./tool/log") , b = m("./tool/guid") , w = m("./Handler") , x = m("./Painter") , y = m("./Storage") , u = m("./animation/Animation") , p = {} , j = {}; j.version = "2.1.1", j.init = function(a) { var c = new f(b(),a); return p[c.id] = c, c } , j.dispose = function(a) { if (a) { a.dispose() } else { for (var c in p) { p[c].dispose() } p = {} } return j } , j.getInstance = function(a) { return p[a] } , j.delInstance = function(a) { return delete p[a], j } ; var f = function(o, r) { this.id = o, this.env = m("./tool/env"), this.storage = new y, this.painter = new x(r,this.storage), this.handler = new w(r,this.storage,this.painter), this.animation = new u({ stage: { update: z(this) } }), this.animation.start(); var c = this; this.painter.refreshNextFrame = function() { c.refreshNextFrame() } , this._needsRefreshNextFrame = !1; var c = this , l = this.storage , e = l.delFromMap; l.delFromMap = function(a) { var d = l.get(a); c.stopAnimation(d), e.call(l, a) } }; return f.prototype.getId = function() { return this.id } , f.prototype.addShape = function(a) { return this.addElement(a), this } , f.prototype.addGroup = function(a) { return this.addElement(a), this } , f.prototype.delShape = function(a) { return this.delElement(a), this } , f.prototype.delGroup = function(a) { return this.delElement(a), this } , f.prototype.modShape = function(a, c) { return this.modElement(a, c), this } , f.prototype.modGroup = function(a, c) { return this.modElement(a, c), this } , f.prototype.addElement = function(a) { return this.storage.addRoot(a), this._needsRefreshNextFrame = !0, this } , f.prototype.delElement = function(a) { return this.storage.delRoot(a), this._needsRefreshNextFrame = !0, this } , f.prototype.modElement = function(a, c) { return this.storage.mod(a, c), this._needsRefreshNextFrame = !0, this } , f.prototype.modLayer = function(a, c) { return this.painter.modLayer(a, c), this._needsRefreshNextFrame = !0, this } , f.prototype.addHoverShape = function(a) { return this.storage.addHover(a), this } , f.prototype.render = function(a) { return this.painter.render(a), this._needsRefreshNextFrame = !1, this } , f.prototype.refresh = function(a) { return this.painter.refresh(a), this._needsRefreshNextFrame = !1, this } , f.prototype.refreshNextFrame = function() { return this._needsRefreshNextFrame = !0, this } , f.prototype.refreshHover = function(a) { return this.painter.refreshHover(a), this } , f.prototype.refreshShapes = function(a, c) { return this.painter.refreshShapes(a, c), this } , f.prototype.resize = function() { return this.painter.resize(), this } , f.prototype.animate = function(B, I, i) { var F = this; if ("string" == typeof B && (B = this.storage.get(B)), B) { var G; if (I) { for (var H = I.split("."), D = B, C = 0, A = H.length; A > C; C++) { D && (D = D[H[C]]) } D && (G = D) } else { G = B } if (!G) { return void v('Property "' + I + '" is not existed in element ' + B.id) } null == B.__animators && (B.__animators = []); var n = B.__animators , E = this.animation.animate(G, { loop: i }).during(function() { F.modShape(B) }).done(function() { var a = q.indexOf(B.__animators, E); a >= 0 && n.splice(a, 1) }); return n.push(E), E } v("Element not existed") } , f.prototype.stopAnimation = function(a) { if (a.__animators) { for (var h = a.__animators, c = h.length, d = 0; c > d; d++) { h[d].stop() } h.length = 0 } return this } , f.prototype.clearAnimation = function() { return this.animation.clear(), this } , f.prototype.showLoading = function(a) { return this.painter.showLoading(a), this } , f.prototype.hideLoading = function() { return this.painter.hideLoading(), this } , f.prototype.getWidth = function() { return this.painter.getWidth() } , f.prototype.getHeight = function() { return this.painter.getHeight() } , f.prototype.toDataURL = function(a, d, c) { return this.painter.toDataURL(a, d, c) } , f.prototype.shapeToImage = function(a, h, c) { var d = b(); return this.painter.shapeToImage(d, a, h, c) } , f.prototype.on = function(a, d, c) { return this.handler.on(a, d, c), this } , f.prototype.un = function(a, c) { return this.handler.un(a, c), this } , f.prototype.trigger = function(a, c) { return this.handler.trigger(a, c), this } , f.prototype.clear = function() { return this.storage.delRoot(), this.painter.clear(), this } , f.prototype.dispose = function() { this.animation.stop(), this.clear(), this.storage.dispose(), this.painter.dispose(), this.handler.dispose(), this.animation = this.storage = this.painter = this.handler = null, j.delInstance(this.id) } , j }), define("zrender/config", [], function() { var a = { EVENT: { RESIZE: "resize", CLICK: "click", DBLCLICK: "dblclick", MOUSEWHEEL: "mousewheel", MOUSEMOVE: "mousemove", MOUSEOVER: "mouseover", MOUSEOUT: "mouseout", MOUSEDOWN: "mousedown", MOUSEUP: "mouseup", GLOBALOUT: "globalout", DRAGSTART: "dragstart", DRAGEND: "dragend", DRAGENTER: "dragenter", DRAGOVER: "dragover", DRAGLEAVE: "dragleave", DROP: "drop", touchClickDelay: 300 }, elementClassName: "zr-element", catchBrushException: !1, debugMode: 0, devicePixelRatio: Math.max(window.devicePixelRatio || 1, 1) }; return a }), define("echarts/chart/island", ["require", "./base", "zrender/shape/Circle", "../config", "../util/ecData", "zrender/tool/util", "zrender/tool/event", "zrender/tool/color", "../util/accMath", "../chart"], function(c) { function m(o, u, q, i, s) { d.call(this, o, u, q, i, s), this._nameConnector, this._valueConnector, this._zrHeight = this.zr.getHeight(), this._zrWidth = this.zr.getWidth(); var p = this; p.shapeHandler.onmousewheel = function(w) { var B = w.target , y = w.event , z = l.getDelta(y); z = z > 0 ? -1 : 1, B.style.r -= z, B.style.r = B.style.r < 5 ? 5 : B.style.r; var v = h.get(B, "value") , A = v * p.option.island.calculateStep; v = A > 1 ? Math.round(v - A * z) : +(v - A * z).toFixed(2); var x = h.get(B, "name"); B.style.text = x + ":" + v, h.set(B, "value", v), h.set(B, "name", x), p.zr.modShape(B.id), p.zr.refreshNextFrame(), l.stop(y) } } var d = c("./base") , f = c("zrender/shape/Circle") , b = c("../config"); b.island = { zlevel: 0, z: 5, r: 15, calculateStep: 0.1 }; var h = c("../util/ecData") , j = c("zrender/tool/util") , l = c("zrender/tool/event"); return m.prototype = { type: b.CHART_TYPE_ISLAND, _combine: function(v, o) { var p = c("zrender/tool/color") , e = c("../util/accMath") , q = e.accAdd(h.get(v, "value"), h.get(o, "value")) , u = h.get(v, "name") + this._nameConnector + h.get(o, "name"); v.style.text = u + this._valueConnector + q, h.set(v, "value", q), h.set(v, "name", u), v.style.r = this.option.island.r, v.style.color = p.mix(v.style.color, o.style.color) }, refresh: function(a) { a && (a.island = this.reformOption(a.island), this.option = a, this._nameConnector = this.option.nameConnector, this._valueConnector = this.option.valueConnector) }, getOption: function() { return this.option }, resize: function() { var q = this.zr.getWidth() , v = this.zr.getHeight() , r = q / (this._zrWidth || q) , s = v / (this._zrHeight || v); if (1 !== r || 1 !== s) { this._zrWidth = q, this._zrHeight = v; for (var p = 0, u = this.shapeList.length; u > p; p++) { this.zr.modShape(this.shapeList[p].id, { style: { x: Math.round(this.shapeList[p].style.x * r), y: Math.round(this.shapeList[p].style.y * s) } }) } } }, add: function(o) { var w = h.get(o, "name") , p = h.get(o, "value") , n = null != h.get(o, "series") ? h.get(o, "series").name : "" , u = this.getFont(this.option.island.textStyle) , v = this.option.island , q = { zlevel: v.zlevel, z: v.z, style: { x: o.style.x, y: o.style.y, r: this.option.island.r, color: o.style.color || o.style.strokeColor, text: w + this._valueConnector + p, textFont: u }, draggable: !0, hoverable: !0, onmousewheel: this.shapeHandler.onmousewheel, _type: "island" }; "#fff" === q.style.color && (q.style.color = o.style.strokeColor), this.setCalculable(q), q.dragEnableTime = 0, h.pack(q, { name: n }, -1, p, -1, w), q = new f(q), this.shapeList.push(q), this.zr.addShape(q) }, del: function(a) { this.zr.delShape(a.id); for (var q = [], o = 0, p = this.shapeList.length; p > o; o++) { this.shapeList[o].id != a.id && q.push(this.shapeList[o]) } this.shapeList = q }, ondrop: function(a, q) { if (this.isDrop && a.target) { var o = a.target , p = a.dragged; this._combine(o, p), this.zr.modShape(o.id), q.dragIn = !0, this.isDrop = !1 } }, ondragend: function(a, o) { var n = a.target; this.isDragend ? o.dragIn && (this.del(n), o.needRefresh = !0) : o.dragIn || (n.style.x = l.getX(a.event), n.style.y = l.getY(a.event), this.add(n), o.needRefresh = !0), this.isDragend = !1 } }, j.inherits(m, d), c("../chart").define("island", m), m }), define("echarts/component/toolbox", ["require", "./base", "zrender/shape/Line", "zrender/shape/Image", "zrender/shape/Rectangle", "../util/shape/Icon", "../config", "zrender/tool/util", "zrender/config", "zrender/tool/event", "./dataView", "../component"], function(p) { function B(d, m, h, c, i) { u.call(this, d, m, h, c, i), this.dom = i.dom, this._magicType = {}, this._magicMap = {}, this._isSilence = !1, this._iconList, this._iconShapeMap = {}, this._featureTitle = {}, this._featureIcon = {}, this._featureColor = {}, this._featureOption = {}, this._enableColor = "red", this._disableColor = "#ccc", this._markShapeList = []; var l = this; l._onMark = function(a) { l.__onMark(a) } , l._onMarkUndo = function(a) { l.__onMarkUndo(a) } , l._onMarkClear = function(a) { l.__onMarkClear(a) } , l._onDataZoom = function(a) { l.__onDataZoom(a) } , l._onDataZoomReset = function(a) { l.__onDataZoomReset(a) } , l._onDataView = function(a) { l.__onDataView(a) } , l._onRestore = function(a) { l.__onRestore(a) } , l._onSaveAsImage = function(a) { l.__onSaveAsImage(a) } , l._onMagicType = function(a) { l.__onMagicType(a) } , l._onCustomHandler = function(a) { l.__onCustomHandler(a) } , l._onmousemove = function(a) { return l.__onmousemove(a) } , l._onmousedown = function(a) { return l.__onmousedown(a) } , l._onmouseup = function(a) { return l.__onmouseup(a) } , l._onclick = function(a) { return l.__onclick(a) } } var u = p("./base") , x = p("zrender/shape/Line") , b = p("zrender/shape/Image") , y = p("zrender/shape/Rectangle") , z = p("../util/shape/Icon") , A = p("../config"); A.toolbox = { zlevel: 0, z: 6, show: !1, orient: "horizontal", x: "right", y: "top", color: ["#1e90ff", "#22bb22", "#4b0082", "#d2691e"], disableColor: "#ddd", effectiveColor: "red", backgroundColor: "rgba(0,0,0,0)", borderColor: "#ccc", borderWidth: 0, padding: 5, itemGap: 10, itemSize: 16, showTitle: !0, feature: { mark: { show: !1, title: { mark: "辅助线开关", markUndo: "删除辅助线", markClear: "清空辅助线" }, lineStyle: { width: 1, color: "#1e90ff", type: "dashed" } }, dataZoom: { show: !1, title: { dataZoom: "区域缩放", dataZoomReset: "区域缩放后退" } }, dataView: { show: !1, title: "数据视图", readOnly: !1, lang: ["数据视图", "关闭", "刷新"] }, magicType: { show: !1, title: { line: "折线图切换", bar: "柱形图切换", stack: "堆积", tiled: "平铺", force: "力导向布局图切换", chord: "和弦图切换", pie: "饼图切换", funnel: "漏斗图切换" }, type: [] }, restore: { show: !1, title: "还原" }, saveAsImage: { show: !1, title: "保存为图片", type: "png", lang: ["点击保存"] } } }; var v = p("zrender/tool/util") , q = p("zrender/config") , j = p("zrender/tool/event") , f = "stack" , w = "tiled"; return B.prototype = { type: A.COMPONENT_TYPE_TOOLBOX, _buildShape: function() { this._iconList = []; var d = this.option.toolbox; this._enableColor = d.effectiveColor, this._disableColor = d.disableColor; var C = d.feature , h = []; for (var l in C) { if (C[l].show) { switch (l) { case "mark": h.push({ key: l, name: "mark" }), h.push({ key: l, name: "markUndo" }), h.push({ key: l, name: "markClear" }); break; case "magicType": for (var c = 0, m = C[l].type.length; m > c; c++) { C[l].title[C[l].type[c] + "Chart"] = C[l].title[C[l].type[c]], C[l].option && (C[l].option[C[l].type[c] + "Chart"] = C[l].option[C[l].type[c]]), h.push({ key: l, name: C[l].type[c] + "Chart" }) } break; case "dataZoom": h.push({ key: l, name: "dataZoom" }), h.push({ key: l, name: "dataZoomReset" }); break; case "saveAsImage": this.canvasSupported && h.push({ key: l, name: "saveAsImage" }); break; default: h.push({ key: l, name: l }) } } } if (h.length > 0) { for (var s, l, c = 0, m = h.length; m > c; c++) { s = h[c].name, l = h[c].key, this._iconList.push(s), this._featureTitle[s] = C[l].title[s] || C[l].title, C[l].icon && (this._featureIcon[s] = C[l].icon[s] || C[l].icon), C[l].color && (this._featureColor[s] = C[l].color[s] || C[l].color), C[l].option && (this._featureOption[s] = C[l].option[s] || C[l].option) } this._itemGroupLocation = this._getItemGroupLocation(), this._buildBackground(), this._buildItem(); for (var c = 0, m = this.shapeList.length; m > c; c++) { this.zr.addShape(this.shapeList[c]) } this._iconShapeMap.mark && (this._iconDisable(this._iconShapeMap.markUndo), this._iconDisable(this._iconShapeMap.markClear)), this._iconShapeMap.dataZoomReset && 0 === this._zoomQueue.length && this._iconDisable(this._iconShapeMap.dataZoomReset) } }, _buildItem: function() { var K, D, G, H, J = this.option.toolbox, E = this._iconList.length, C = this._itemGroupLocation.x, e = this._itemGroupLocation.y, a = J.itemSize, F = J.itemGap, I = J.color instanceof Array ? J.color : [J.color], L = this.getFont(J.textStyle); "horizontal" === J.orient ? (D = this._itemGroupLocation.y / this.zr.getHeight() < 0.5 ? "bottom" : "top", G = this._itemGroupLocation.x / this.zr.getWidth() < 0.5 ? "left" : "right", H = this._itemGroupLocation.y / this.zr.getHeight() < 0.5 ? "top" : "bottom") : D = this._itemGroupLocation.x / this.zr.getWidth() < 0.5 ? "right" : "left", this._iconShapeMap = {}; for (var N = this, M = 0; E > M; M++) { switch (K = { type: "icon", zlevel: this.getZlevelBase(), z: this.getZBase(), style: { x: C, y: e, width: a, height: a, iconType: this._iconList[M], lineWidth: 1, strokeColor: this._featureColor[this._iconList[M]] || I[M % I.length], brushType: "stroke" }, highlightStyle: { lineWidth: 1, text: J.showTitle ? this._featureTitle[this._iconList[M]] : void 0, textFont: L, textPosition: D, strokeColor: this._featureColor[this._iconList[M]] || I[M % I.length] }, hoverable: !0, clickable: !0 }, this._featureIcon[this._iconList[M]] && (K.style.image = this._featureIcon[this._iconList[M]].replace(new RegExp("^image:\\/\\/"), ""), K.style.opacity = 0.8, K.highlightStyle.opacity = 1, K.type = "image"), "horizontal" === J.orient && (0 === M && "left" === G && (K.highlightStyle.textPosition = "specific", K.highlightStyle.textAlign = G, K.highlightStyle.textBaseline = H, K.highlightStyle.textX = C, K.highlightStyle.textY = "top" === H ? e + a + 10 : e - 10), M === E - 1 && "right" === G && (K.highlightStyle.textPosition = "specific", K.highlightStyle.textAlign = G, K.highlightStyle.textBaseline = H, K.highlightStyle.textX = C + a, K.highlightStyle.textY = "top" === H ? e + a + 10 : e - 10)), this._iconList[M]) { case "mark": K.onclick = N._onMark; break; case "markUndo": K.onclick = N._onMarkUndo; break; case "markClear": K.onclick = N._onMarkClear; break; case "dataZoom": K.onclick = N._onDataZoom; break; case "dataZoomReset": K.onclick = N._onDataZoomReset; break; case "dataView": if (!this._dataView) { var r = p("./dataView"); this._dataView = new r(this.ecTheme,this.messageCenter,this.zr,this.option,this.myChart) } K.onclick = N._onDataView; break; case "restore": K.onclick = N._onRestore; break; case "saveAsImage": K.onclick = N._onSaveAsImage; break; default: this._iconList[M].match("Chart") ? (K._name = this._iconList[M].replace("Chart", ""), K.onclick = N._onMagicType) : K.onclick = N._onCustomHandler } "icon" === K.type ? K = new z(K) : "image" === K.type && (K = new b(K)), this.shapeList.push(K), this._iconShapeMap[this._iconList[M]] = K, "horizontal" === J.orient ? C += a + F : e += a + F } }, _buildBackground: function() { var a = this.option.toolbox , c = this.reformCssArray(this.option.toolbox.padding); this.shapeList.push(new y({ zlevel: this.getZlevelBase(), z: this.getZBase(), hoverable: !1, style: { x: this._itemGroupLocation.x - c[3], y: this._itemGroupLocation.y - c[0], width: this._itemGroupLocation.width + c[3] + c[1], height: this._itemGroupLocation.height + c[0] + c[2], brushType: 0 === a.borderWidth ? "fill" : "both", color: a.backgroundColor, strokeColor: a.borderColor, lineWidth: a.borderWidth } })) }, _getItemGroupLocation: function() { var C = this.option.toolbox , K = this.reformCssArray(this.option.toolbox.padding) , E = this._iconList.length , G = C.itemGap , c = C.itemSize , H = 0 , I = 0; "horizontal" === C.orient ? (H = (c + G) * E - G, I = c) : (I = (c + G) * E - G, H = c); var J, F = this.zr.getWidth(); switch (C.x) { case "center": J = Math.floor((F - H) / 2); break; case "left": J = K[3] + C.borderWidth; break; case "right": J = F - H - K[1] - C.borderWidth; break; default: J = C.x - 0, J = isNaN(J) ? 0 : J } var D, m = this.zr.getHeight(); switch (C.y) { case "top": D = K[0] + C.borderWidth; break; case "bottom": D = m - I - K[2] - C.borderWidth; break; case "center": D = Math.floor((m - I) / 2); break; default: D = C.y - 0, D = isNaN(D) ? 0 : D } return { x: J, y: D, width: H, height: I } }, __onmousemove: function(a) { this._marking && (this._markShape.style.xEnd = j.getX(a.event), this._markShape.style.yEnd = j.getY(a.event), this.zr.addHoverShape(this._markShape)), this._zooming && (this._zoomShape.style.width = j.getX(a.event) - this._zoomShape.style.x, this._zoomShape.style.height = j.getY(a.event) - this._zoomShape.style.y, this.zr.addHoverShape(this._zoomShape), this.dom.style.cursor = "crosshair", j.stop(a.event)), this._zoomStart && "pointer" != this.dom.style.cursor && "move" != this.dom.style.cursor && (this.dom.style.cursor = "crosshair") }, __onmousedown: function(a) { if (!a.target) { this._zooming = !0; var h = j.getX(a.event) , c = j.getY(a.event) , d = this.option.dataZoom || {}; return this._zoomShape = new y({ zlevel: this.getZlevelBase(), z: this.getZBase(), style: { x: h, y: c, width: 1, height: 1, brushType: "both" }, highlightStyle: { lineWidth: 2, color: d.fillerColor || A.dataZoom.fillerColor, strokeColor: d.handleColor || A.dataZoom.handleColor, brushType: "both" } }), this.zr.addHoverShape(this._zoomShape), !0 } }, __onmouseup: function() { if (!this._zoomShape || Math.abs(this._zoomShape.style.width) < 10 || Math.abs(this._zoomShape.style.height) < 10) { return this._zooming = !1, !0 } if (this._zooming && this.component.dataZoom) { this._zooming = !1; var a = this.component.dataZoom.rectZoom(this._zoomShape.style); a && (this._zoomQueue.push({ start: a.start, end: a.end, start2: a.start2, end2: a.end2 }), this._iconEnable(this._iconShapeMap.dataZoomReset), this.zr.refreshNextFrame()) } return !0 }, __onclick: function(a) { if (!a.target) { if (this._marking) { this._marking = !1, this._markShapeList.push(this._markShape), this._iconEnable(this._iconShapeMap.markUndo), this._iconEnable(this._iconShapeMap.markClear), this.zr.addShape(this._markShape), this.zr.refreshNextFrame() } else { if (this._markStart) { this._marking = !0; var d = j.getX(a.event) , c = j.getY(a.event); this._markShape = new x({ zlevel: this.getZlevelBase(), z: this.getZBase(), style: { xStart: d, yStart: c, xEnd: d, yEnd: c, lineWidth: this.query(this.option, "toolbox.feature.mark.lineStyle.width"), strokeColor: this.query(this.option, "toolbox.feature.mark.lineStyle.color"), lineType: this.query(this.option, "toolbox.feature.mark.lineStyle.type") } }), this.zr.addHoverShape(this._markShape) } } } }, __onMark: function(a) { var d = a.target; if (this._marking || this._markStart) { this._resetMark(), this.zr.refreshNextFrame() } else { this._resetZoom(), this.zr.modShape(d.id, { style: { strokeColor: this._enableColor } }), this.zr.refreshNextFrame(), this._markStart = !0; var c = this; setTimeout(function() { c.zr && c.zr.on(q.EVENT.CLICK, c._onclick) && c.zr.on(q.EVENT.MOUSEMOVE, c._onmousemove) }, 10) } return !0 }, __onMarkUndo: function() { if (this._marking) { this._marking = !1 } else { var a = this._markShapeList.length; if (a >= 1) { var c = this._markShapeList[a - 1]; this.zr.delShape(c.id), this.zr.refreshNextFrame(), this._markShapeList.pop(), 1 === a && (this._iconDisable(this._iconShapeMap.markUndo), this._iconDisable(this._iconShapeMap.markClear)) } } return !0 }, __onMarkClear: function() { this._marking && (this._marking = !1); var a = this._markShapeList.length; if (a > 0) { for (; a--; ) { this.zr.delShape(this._markShapeList.pop().id) } this._iconDisable(this._iconShapeMap.markUndo), this._iconDisable(this._iconShapeMap.markClear), this.zr.refreshNextFrame() } return !0 }, __onDataZoom: function(a) { var d = a.target; if (this._zooming || this._zoomStart) { this._resetZoom(), this.zr.refreshNextFrame(), this.dom.style.cursor = "default" } else { this._resetMark(), this.zr.modShape(d.id, { style: { strokeColor: this._enableColor } }), this.zr.refreshNextFrame(), this._zoomStart = !0; var c = this; setTimeout(function() { c.zr && c.zr.on(q.EVENT.MOUSEDOWN, c._onmousedown) && c.zr.on(q.EVENT.MOUSEUP, c._onmouseup) && c.zr.on(q.EVENT.MOUSEMOVE, c._onmousemove) }, 10), this.dom.style.cursor = "crosshair" } return !0 }, __onDataZoomReset: function() { return this._zooming && (this._zooming = !1), this._zoomQueue.pop(), this._zoomQueue.length > 0 ? this.component.dataZoom.absoluteZoom(this._zoomQueue[this._zoomQueue.length - 1]) : (this.component.dataZoom.rectZoom(), this._iconDisable(this._iconShapeMap.dataZoomReset), this.zr.refreshNextFrame()), !0 }, _resetMark: function() { this._marking = !1, this._markStart && (this._markStart = !1, this._iconShapeMap.mark && this.zr.modShape(this._iconShapeMap.mark.id, { style: { strokeColor: this._iconShapeMap.mark.highlightStyle.strokeColor } }), this.zr.un(q.EVENT.CLICK, this._onclick), this.zr.un(q.EVENT.MOUSEMOVE, this._onmousemove)) }, _resetZoom: function() { this._zooming = !1, this._zoomStart && (this._zoomStart = !1, this._iconShapeMap.dataZoom && this.zr.modShape(this._iconShapeMap.dataZoom.id, { style: { strokeColor: this._iconShapeMap.dataZoom.highlightStyle.strokeColor } }), this.zr.un(q.EVENT.MOUSEDOWN, this._onmousedown), this.zr.un(q.EVENT.MOUSEUP, this._onmouseup), this.zr.un(q.EVENT.MOUSEMOVE, this._onmousemove)) }, _iconDisable: function(a) { "image" != a.type ? this.zr.modShape(a.id, { hoverable: !1, clickable: !1, style: { strokeColor: this._disableColor } }) : this.zr.modShape(a.id, { hoverable: !1, clickable: !1, style: { opacity: 0.3 } }) }, _iconEnable: function(a) { "image" != a.type ? this.zr.modShape(a.id, { hoverable: !0, clickable: !0, style: { strokeColor: a.highlightStyle.strokeColor } }) : this.zr.modShape(a.id, { hoverable: !0, clickable: !0, style: { opacity: 0.8 } }) }, __onDataView: function() { return this._dataView.show(this.option), !0 }, __onRestore: function() { return this._resetMark(), this._resetZoom(), this.messageCenter.dispatch(A.EVENT.RESTORE, null, null, this.myChart), !0 }, __onSaveAsImage: function() { var d = this.option.toolbox.feature.saveAsImage , m = d.type || "png"; "png" != m && "jpeg" != m && (m = "png"); var h; h = this.myChart.isConnected() ? this.myChart.getConnectedDataURL(m) : this.zr.toDataURL("image/" + m, this.option.backgroundColor && "rgba(0,0,0,0)" === this.option.backgroundColor.replace(" ", "") ? "#fff" : this.option.backgroundColor); var l = document.createElement("div"); l.id = "__echarts_download_wrap__", l.style.cssText = "position:fixed;z-index:99999;display:block;top:0;left:0;background-color:rgba(33,33,33,0.5);text-align:center;width:100%;height:100%;line-height:" + document.documentElement.clientHeight + "px;"; var c = document.createElement("a"); c.href = h, c.setAttribute("download", (d.name ? d.name : this.option.title && (this.option.title.text || this.option.title.subtext) ? this.option.title.text || this.option.title.subtext : "ECharts") + "." + m), c.innerHTML = '图片另存为" : d.lang ? d.lang[0] : "点击保存") + '"/>', l.appendChild(c), document.body.appendChild(l), c = null, l = null, setTimeout(function() { var a = document.getElementById("__echarts_download_wrap__"); a && (a.onclick = function() { var i = document.getElementById("__echarts_download_wrap__"); i.onclick = null, i.innerHTML = "", document.body.removeChild(i), i = null } , a = null) }, 500) }, __onMagicType: function(a) { this._resetMark(); var c = a.target._name; return this._magicType[c] || (this._magicType[c] = !0, c === A.CHART_TYPE_LINE ? this._magicType[A.CHART_TYPE_BAR] = !1 : c === A.CHART_TYPE_BAR && (this._magicType[A.CHART_TYPE_LINE] = !1), c === A.CHART_TYPE_PIE ? this._magicType[A.CHART_TYPE_FUNNEL] = !1 : c === A.CHART_TYPE_FUNNEL && (this._magicType[A.CHART_TYPE_PIE] = !1), c === A.CHART_TYPE_FORCE ? this._magicType[A.CHART_TYPE_CHORD] = !1 : c === A.CHART_TYPE_CHORD && (this._magicType[A.CHART_TYPE_FORCE] = !1), c === f ? this._magicType[w] = !1 : c === w && (this._magicType[f] = !1), this.messageCenter.dispatch(A.EVENT.MAGIC_TYPE_CHANGED, a.event, { magicType: this._magicType }, this.myChart)), !0 }, setMagicType: function(a) { this._resetMark(), this._magicType = a, !this._isSilence && this.messageCenter.dispatch(A.EVENT.MAGIC_TYPE_CHANGED, null, { magicType: this._magicType }, this.myChart) }, __onCustomHandler: function(a) { var d = a.target.style.iconType , c = this.option.toolbox.feature[d].onclick; "function" == typeof c && c.call(this, this.option) }, reset: function(m, I) { if (I && this.clear(), this.query(m, "toolbox.show") && this.query(m, "toolbox.feature.magicType.show")) { var D = m.toolbox.feature.magicType.type , E = D.length; for (this._magicMap = {}; E--; ) { this._magicMap[D[E]] = !0 } E = m.series.length; for (var c, F; E--; ) { c = m.series[E].type, this._magicMap[c] && (F = m.xAxis instanceof Array ? m.xAxis[m.series[E].xAxisIndex || 0] : m.xAxis, F && "category" === (F.type || "category") && (F.__boundaryGap = null != F.boundaryGap ? F.boundaryGap : !0), F = m.yAxis instanceof Array ? m.yAxis[m.series[E].yAxisIndex || 0] : m.yAxis, F && "category" === F.type && (F.__boundaryGap = null != F.boundaryGap ? F.boundaryGap : !0), m.series[E].__type = c, m.series[E].__itemStyle = v.clone(m.series[E].itemStyle || {})), (this._magicMap[f] || this._magicMap[w]) && (m.series[E].__stack = m.series[E].stack) } } this._magicType = I ? {} : this._magicType || {}; for (var G in this._magicType) { if (this._magicType[G]) { this.option = m, this.getMagicOption(); break } } var H = m.dataZoom; if (H && H.show) { var C = null != H.start && H.start >= 0 && H.start <= 100 ? H.start : 0 , l = null != H.end && H.end >= 0 && H.end <= 100 ? H.end : 100; C > l && (C += l, l = C - l, C -= l), this._zoomQueue = [{ start: C, end: l, start2: 0, end2: 100 }] } else { this._zoomQueue = [] } }, getMagicOption: function() { var d, m; if (this._magicType[A.CHART_TYPE_LINE] || this._magicType[A.CHART_TYPE_BAR]) { for (var h = this._magicType[A.CHART_TYPE_LINE] ? !1 : !0, l = 0, c = this.option.series.length; c > l; l++) { m = this.option.series[l].type, (m == A.CHART_TYPE_LINE || m == A.CHART_TYPE_BAR) && (d = this.option.xAxis instanceof Array ? this.option.xAxis[this.option.series[l].xAxisIndex || 0] : this.option.xAxis, d && "category" === (d.type || "category") && (d.boundaryGap = h ? !0 : d.__boundaryGap), d = this.option.yAxis instanceof Array ? this.option.yAxis[this.option.series[l].yAxisIndex || 0] : this.option.yAxis, d && "category" === d.type && (d.boundaryGap = h ? !0 : d.__boundaryGap)) } this._defaultMagic(A.CHART_TYPE_LINE, A.CHART_TYPE_BAR) } if (this._defaultMagic(A.CHART_TYPE_CHORD, A.CHART_TYPE_FORCE), this._defaultMagic(A.CHART_TYPE_PIE, A.CHART_TYPE_FUNNEL), this._magicType[f] || this._magicType[w]) { for (var l = 0, c = this.option.series.length; c > l; l++) { this._magicType[f] ? (this.option.series[l].stack = "_ECHARTS_STACK_KENER_2014_", m = f) : this._magicType[w] && (this.option.series[l].stack = null, m = w), this._featureOption[m + "Chart"] && v.merge(this.option.series[l], this._featureOption[m + "Chart"] || {}, !0) } } return this.option }, _defaultMagic: function(d, m) { if (this._magicType[d] || this._magicType[m]) { for (var h = 0, l = this.option.series.length; l > h; h++) { var c = this.option.series[h].type; (c == d || c == m) && (this.option.series[h].type = this._magicType[d] ? d : m, this.option.series[h].itemStyle = v.clone(this.option.series[h].__itemStyle), c = this.option.series[h].type, this._featureOption[c + "Chart"] && v.merge(this.option.series[h], this._featureOption[c + "Chart"] || {}, !0)) } } }, silence: function(a) { this._isSilence = a }, resize: function() { this._resetMark(), this.clear(), this.option && this.option.toolbox && this.option.toolbox.show && this._buildShape(), this._dataView && this._dataView.resize() }, hideDataView: function() { this._dataView && this._dataView.hide() }, clear: function(a) { this.zr && (this.zr.delShape(this.shapeList), this.shapeList = [], a || (this.zr.delShape(this._markShapeList), this._markShapeList = [])) }, onbeforDispose: function() { this._dataView && (this._dataView.dispose(), this._dataView = null), this._markShapeList = null }, refresh: function(a) { a && (this._resetMark(), this._resetZoom(), a.toolbox = this.reformOption(a.toolbox), this.option = a, this.clear(!0), a.toolbox.show && this._buildShape(), this.hideDataView()) } }, v.inherits(B, u), p("../component").define("toolbox", B), B }), define("echarts/component", [], function() { var a = {} , b = {}; return a.define = function(c, d) { return b[c] = d, a } , a.get = function(c) { return b[c] } , a }), define("echarts/component/title", ["require", "./base", "zrender/shape/Text", "zrender/shape/Rectangle", "../config", "zrender/tool/util", "zrender/tool/area", "zrender/tool/color", "../component"], function(c) { function q(l, u, r, i, s) { d.call(this, l, u, r, i, s), this.refresh(i) } var d = c("./base") , h = c("zrender/shape/Text") , b = c("zrender/shape/Rectangle") , j = c("../config"); j.title = { zlevel: 0, z: 6, show: !0, text: "", subtext: "", x: "left", y: "top", backgroundColor: "rgba(0,0,0,0)", borderColor: "#ccc", borderWidth: 0, padding: 5, itemGap: 5, textStyle: { fontSize: 18, fontWeight: "bolder", color: "#333" }, subtextStyle: { color: "#aaa" } }; var m = c("zrender/tool/util") , p = c("zrender/tool/area") , f = c("zrender/tool/color"); return q.prototype = { type: j.COMPONENT_TYPE_TITLE, _buildShape: function() { if (this.titleOption.show) { this._itemGroupLocation = this._getItemGroupLocation(), this._buildBackground(), this._buildItem(); for (var a = 0, i = this.shapeList.length; i > a; a++) { this.zr.addShape(this.shapeList[a]) } } }, _buildItem: function() { var w = this.titleOption.text , E = this.titleOption.link , y = this.titleOption.target , l = this.titleOption.subtext , A = this.titleOption.sublink , C = this.titleOption.subtarget , D = this.getFont(this.titleOption.textStyle) , x = this.getFont(this.titleOption.subtextStyle) , v = this._itemGroupLocation.x , n = this._itemGroupLocation.y , z = this._itemGroupLocation.width , B = this._itemGroupLocation.height , F = { zlevel: this.getZlevelBase(), z: this.getZBase(), style: { y: n, color: this.titleOption.textStyle.color, text: w, textFont: D, textBaseline: "top" }, highlightStyle: { color: f.lift(this.titleOption.textStyle.color, 1), brushType: "fill" }, hoverable: !1 }; E && (F.hoverable = !0, F.clickable = !0, F.onclick = function() { y && "self" == y ? window.location = E : window.open(E) } ); var G = { zlevel: this.getZlevelBase(), z: this.getZBase(), style: { y: n + B, color: this.titleOption.subtextStyle.color, text: l, textFont: x, textBaseline: "bottom" }, highlightStyle: { color: f.lift(this.titleOption.subtextStyle.color, 1), brushType: "fill" }, hoverable: !1 }; switch (A && (G.hoverable = !0, G.clickable = !0, G.onclick = function() { C && "self" == C ? window.location = A : window.open(A) } ), this.titleOption.x) { case "center": F.style.x = G.style.x = v + z / 2, F.style.textAlign = G.style.textAlign = "center"; break; case "left": F.style.x = G.style.x = v, F.style.textAlign = G.style.textAlign = "left"; break; case "right": F.style.x = G.style.x = v + z, F.style.textAlign = G.style.textAlign = "right"; break; default: v = this.titleOption.x - 0, v = isNaN(v) ? 0 : v, F.style.x = G.style.x = v } this.titleOption.textAlign && (F.style.textAlign = G.style.textAlign = this.titleOption.textAlign), this.shapeList.push(new h(F)), "" !== l && this.shapeList.push(new h(G)) }, _buildBackground: function() { var a = this.reformCssArray(this.titleOption.padding); this.shapeList.push(new b({ zlevel: this.getZlevelBase(), z: this.getZBase(), hoverable: !1, style: { x: this._itemGroupLocation.x - a[3], y: this._itemGroupLocation.y - a[0], width: this._itemGroupLocation.width + a[3] + a[1], height: this._itemGroupLocation.height + a[0] + a[2], brushType: 0 === this.titleOption.borderWidth ? "fill" : "both", color: this.titleOption.backgroundColor, strokeColor: this.titleOption.borderColor, lineWidth: this.titleOption.borderWidth } })) }, _getItemGroupLocation: function() { var w, D = this.reformCssArray(this.titleOption.padding), y = this.titleOption.text, A = this.titleOption.subtext, s = this.getFont(this.titleOption.textStyle), B = this.getFont(this.titleOption.subtextStyle), C = Math.max(p.getTextWidth(y, s), p.getTextWidth(A, B)), z = p.getTextHeight(y, s) + ("" === A ? 0 : this.titleOption.itemGap + p.getTextHeight(A, B)), x = this.zr.getWidth(); switch (this.titleOption.x) { case "center": w = Math.floor((x - C) / 2); break; case "left": w = D[3] + this.titleOption.borderWidth; break; case "right": w = x - C - D[1] - this.titleOption.borderWidth; break; default: w = this.titleOption.x - 0, w = isNaN(w) ? 0 : w } var v, u = this.zr.getHeight(); switch (this.titleOption.y) { case "top": v = D[0] + this.titleOption.borderWidth; break; case "bottom": v = u - z - D[2] - this.titleOption.borderWidth; break; case "center": v = Math.floor((u - z) / 2); break; default: v = this.titleOption.y - 0, v = isNaN(v) ? 0 : v } return { x: w, y: v, width: C, height: z } }, refresh: function(a) { a && (this.option = a, this.option.title = this.reformOption(this.option.title), this.titleOption = this.option.title, this.titleOption.textStyle = this.getTextStyle(this.titleOption.textStyle), this.titleOption.subtextStyle = this.getTextStyle(this.titleOption.subtextStyle)), this.clear(), this._buildShape() } }, m.inherits(q, d), c("../component").define("title", q), q }), define("echarts/component/tooltip", ["require", "./base", "../util/shape/Cross", "zrender/shape/Line", "zrender/shape/Rectangle", "../config", "../util/ecData", "zrender/config", "zrender/tool/event", "zrender/tool/area", "zrender/tool/color", "zrender/tool/util", "zrender/shape/Base", "../component"], function(q) { function E(a, m, d, h, i) { w.call(this, a, m, d, h, i), this.dom = i.dom; var c = this; c._onmousemove = function(l) { return c.__onmousemove(l) } , c._onglobalout = function(l) { return c.__onglobalout(l) } , this.zr.on(v.EVENT.MOUSEMOVE, c._onmousemove), this.zr.on(v.EVENT.GLOBALOUT, c._onglobalout), c._hide = function(l) { return c.__hide(l) } , c._tryShow = function(l) { return c.__tryShow(l) } , c._refixed = function(l) { return c.__refixed(l) } , c._setContent = function(l, n) { return c.__setContent(l, n) } , this._tDom = this._tDom || document.createElement("div"), this._tDom.onselectstart = function() { return !1 } , this._tDom.onmouseover = function() { c._mousein = !0 } , this._tDom.onmouseout = function() { c._mousein = !1 } , this._tDom.className = "echarts-tooltip", this._tDom.style.position = "absolute", this.hasAppend = !1, this._axisLineShape && this.zr.delShape(this._axisLineShape.id), this._axisLineShape = new b({ zlevel: this.getZlevelBase(), z: this.getZBase(), invisible: !0, hoverable: !1 }), this.shapeList.push(this._axisLineShape), this.zr.addShape(this._axisLineShape), this._axisShadowShape && this.zr.delShape(this._axisShadowShape.id), this._axisShadowShape = new b({ zlevel: this.getZlevelBase(), z: 1, invisible: !0, hoverable: !1 }), this.shapeList.push(this._axisShadowShape), this.zr.addShape(this._axisShadowShape), this._axisCrossShape && this.zr.delShape(this._axisCrossShape.id), this._axisCrossShape = new z({ zlevel: this.getZlevelBase(), z: this.getZBase(), invisible: !0, hoverable: !1 }), this.shapeList.push(this._axisCrossShape), this.zr.addShape(this._axisCrossShape), this.showing = !1, this.refresh(h) } var w = q("./base") , z = q("../util/shape/Cross") , b = q("zrender/shape/Line") , A = q("zrender/shape/Rectangle") , C = new A({}) , D = q("../config"); D.tooltip = { zlevel: 1, z: 8, show: !0, showContent: !0, trigger: "item", islandFormatter: "{a}
{b} : {c}", showDelay: 20, hideDelay: 100, transitionDuration: 0.4, enterable: !1, backgroundColor: "rgba(0,0,0,0.7)", borderColor: "#333", borderRadius: 4, borderWidth: 0, padding: 5, axisPointer: { type: "line", lineStyle: { color: "#48b", width: 2, type: "solid" }, crossStyle: { color: "#1e90ff", width: 1, type: "dashed" }, shadowStyle: { color: "rgba(150,150,150,0.3)", width: "auto", type: "default" } }, textStyle: { color: "#fff" } }; var x = q("../util/ecData") , v = q("zrender/config") , j = q("zrender/tool/event") , f = q("zrender/tool/area") , y = q("zrender/tool/color") , B = q("zrender/tool/util") , F = q("zrender/shape/Base"); return E.prototype = { type: D.COMPONENT_TYPE_TOOLTIP, _gCssText: "position:absolute;display:block;border-style:solid;white-space:nowrap;", _style: function(d) { if (!d) { return "" } var m = []; if (d.transitionDuration) { var h = "left " + d.transitionDuration + "s,top " + d.transitionDuration + "s"; m.push("transition:" + h), m.push("-moz-transition:" + h), m.push("-webkit-transition:" + h), m.push("-o-transition:" + h) } d.backgroundColor && (m.push("background-Color:" + y.toHex(d.backgroundColor)), m.push("filter:alpha(opacity=70)"), m.push("background-Color:" + d.backgroundColor)), null != d.borderWidth && m.push("border-width:" + d.borderWidth + "px"), null != d.borderColor && m.push("border-color:" + d.borderColor), null != d.borderRadius && (m.push("border-radius:" + d.borderRadius + "px"), m.push("-moz-border-radius:" + d.borderRadius + "px"), m.push("-webkit-border-radius:" + d.borderRadius + "px"), m.push("-o-border-radius:" + d.borderRadius + "px")); var l = d.textStyle; l && (l.color && m.push("color:" + l.color), l.decoration && m.push("text-decoration:" + l.decoration), l.align && m.push("text-align:" + l.align), l.fontFamily && m.push("font-family:" + l.fontFamily), l.fontSize && m.push("font-size:" + l.fontSize + "px"), l.fontSize && m.push("line-height:" + Math.round(3 * l.fontSize / 2) + "px"), l.fontStyle && m.push("font-style:" + l.fontStyle), l.fontWeight && m.push("font-weight:" + l.fontWeight)); var c = d.padding; return null != c && (c = this.reformCssArray(c), m.push("padding:" + c[0] + "px " + c[1] + "px " + c[2] + "px " + c[3] + "px")), m = m.join(";") + ";" }, __hide: function() { this._lastDataIndex = -1, this._lastSeriesIndex = -1, this._lastItemTriggerId = -1, this._tDom && (this._tDom.style.display = "none"); var a = !1; this._axisLineShape.invisible || (this._axisLineShape.invisible = !0, this.zr.modShape(this._axisLineShape.id), a = !0), this._axisShadowShape.invisible || (this._axisShadowShape.invisible = !0, this.zr.modShape(this._axisShadowShape.id), a = !0), this._axisCrossShape.invisible || (this._axisCrossShape.invisible = !0, this.zr.modShape(this._axisCrossShape.id), a = !0), this._lastTipShape && this._lastTipShape.tipShape.length > 0 && (this.zr.delShape(this._lastTipShape.tipShape), this._lastTipShape = !1, this.shapeList.length = 2), a && this.zr.refreshNextFrame(), this.showing = !1 }, _show: function(d, p, h, l) { var c = this._tDom.offsetHeight , m = this._tDom.offsetWidth; d && ("function" == typeof d && (d = d([p, h])), d instanceof Array && (p = d[0], h = d[1])), p + m > this._zrWidth && (p -= m + 40), h + c > this._zrHeight && (h -= c - 20), 20 > h && (h = 0), this._tDom.style.cssText = this._gCssText + this._defaultCssText + (l ? l : "") + "left:" + p + "px;top:" + h + "px;", (10 > c || 10 > m) && setTimeout(this._refixed, 20), this.showing = !0 }, __refixed: function() { if (this._tDom) { var a = "" , d = this._tDom.offsetHeight , c = this._tDom.offsetWidth; this._tDom.offsetLeft + c > this._zrWidth && (a += "left:" + (this._zrWidth - c - 20) + "px;"), this._tDom.offsetTop + d > this._zrHeight && (a += "top:" + (this._zrHeight - d - 10) + "px;"), "" !== a && (this._tDom.style.cssText += a) } }, __tryShow: function() { var a, h; if (this._curTarget) { if ("island" === this._curTarget._type && this.option.tooltip.show) { return void this._showItemTrigger() } var c = x.get(this._curTarget, "series") , d = x.get(this._curTarget, "data"); a = this.deepQuery([d, c, this.option], "tooltip.show"), null != c && null != d && a ? (h = this.deepQuery([d, c, this.option], "tooltip.trigger"), "axis" === h ? this._showAxisTrigger(c.xAxisIndex, c.yAxisIndex, x.get(this._curTarget, "dataIndex")) : this._showItemTrigger()) : (clearTimeout(this._hidingTicket), clearTimeout(this._showingTicket), this._hidingTicket = setTimeout(this._hide, this._hideDelay)) } else { this._findPolarTrigger() || this._findAxisTrigger() } }, _findAxisTrigger: function() { if (!this.component.xAxis || !this.component.yAxis) { return void (this._hidingTicket = setTimeout(this._hide, this._hideDelay)) } for (var d, m, h = this.option.series, l = 0, c = h.length; c > l; l++) { if ("axis" === this.deepQuery([h[l], this.option], "tooltip.trigger")) { return d = h[l].xAxisIndex || 0, m = h[l].yAxisIndex || 0, this.component.xAxis.getAxis(d) && this.component.xAxis.getAxis(d).type === D.COMPONENT_TYPE_AXIS_CATEGORY ? void this._showAxisTrigger(d, m, this._getNearestDataIndex("x", this.component.xAxis.getAxis(d))) : this.component.yAxis.getAxis(m) && this.component.yAxis.getAxis(m).type === D.COMPONENT_TYPE_AXIS_CATEGORY ? void this._showAxisTrigger(d, m, this._getNearestDataIndex("y", this.component.yAxis.getAxis(m))) : void this._showAxisTrigger(d, m, -1) } } "cross" === this.option.tooltip.axisPointer.type && this._showAxisTrigger(-1, -1, -1) }, _findPolarTrigger: function() { if (!this.component.polar) { return !1 } var a, h = j.getX(this._event), c = j.getY(this._event), d = this.component.polar.getNearestIndex([h, c]); return d ? (a = d.valueIndex, d = d.polarIndex) : d = -1, -1 != d ? this._showPolarTrigger(d, a) : !1 }, _getNearestDataIndex: function(u, O) { var H = -1 , K = j.getX(this._event) , d = j.getY(this._event); if ("x" === u) { for (var L, M, N = this.component.grid.getXend(), I = O.getCoordByIndex(H); N > I && (M = I, K >= I); ) { L = I, I = O.getCoordByIndex(++H) } return 0 >= H ? H = 0 : M - K >= K - L ? H -= 1 : null == O.getNameByIndex(H) && (H -= 1), H } for (var G, p, J = this.component.grid.getY(), I = O.getCoordByIndex(H); I > J && (G = I, I >= d); ) { p = I, I = O.getCoordByIndex(++H) } return 0 >= H ? H = 0 : d - G >= p - d ? H -= 1 : null == O.getNameByIndex(H) && (H -= 1), H }, _showAxisTrigger: function(I, T, M) { if (!this._event.connectTrigger && this.messageCenter.dispatch(D.EVENT.TOOLTIP_IN_GRID, this._event, null, this.myChart), null == this.component.xAxis || null == this.component.yAxis || null == I || null == T) { return clearTimeout(this._hidingTicket), clearTimeout(this._showingTicket), void (this._hidingTicket = setTimeout(this._hide, this._hideDelay)) } var P, s, Q, S, N = this.option.series, L = [], H = [], O = ""; if ("axis" === this.option.tooltip.trigger) { if (!this.option.tooltip.show) { return } s = this.option.tooltip.formatter, Q = this.option.tooltip.position } var R, W, Y = -1 != I && this.component.xAxis.getAxis(I).type === D.COMPONENT_TYPE_AXIS_CATEGORY ? "xAxis" : -1 != T && this.component.yAxis.getAxis(T).type === D.COMPONENT_TYPE_AXIS_CATEGORY ? "yAxis" : !1; if (Y) { var X = "xAxis" == Y ? I : T; P = this.component[Y].getAxis(X); for (var K = 0, J = N.length; J > K; K++) { this._isSelected(N[K].name) && N[K][Y + "Index"] === X && "axis" === this.deepQuery([N[K], this.option], "tooltip.trigger") && (S = this.query(N[K], "tooltip.showContent") || S, s = this.query(N[K], "tooltip.formatter") || s, Q = this.query(N[K], "tooltip.position") || Q, O += this._style(this.query(N[K], "tooltip")), null != N[K].stack && "xAxis" == Y ? (L.unshift(N[K]), H.unshift(K)) : (L.push(N[K]), H.push(K))) } this.messageCenter.dispatch(D.EVENT.TOOLTIP_HOVER, this._event, { seriesIndex: H, dataIndex: M }, this.myChart); var aa; "xAxis" == Y ? (R = this.subPixelOptimize(P.getCoordByIndex(M), this._axisLineWidth), W = j.getY(this._event), aa = [R, this.component.grid.getY(), R, this.component.grid.getYend()]) : (R = j.getX(this._event), W = this.subPixelOptimize(P.getCoordByIndex(M), this._axisLineWidth), aa = [this.component.grid.getX(), W, this.component.grid.getXend(), W]), this._styleAxisPointer(L, aa[0], aa[1], aa[2], aa[3], P.getGap(), R, W) } else { R = j.getX(this._event), W = j.getY(this._event), this._styleAxisPointer(N, this.component.grid.getX(), W, this.component.grid.getXend(), W, 0, R, W), M >= 0 ? this._showItemTrigger(!0) : (clearTimeout(this._hidingTicket), clearTimeout(this._showingTicket), this._tDom.style.display = "none") } if (L.length > 0) { if (this._lastItemTriggerId = -1, this._lastDataIndex != M || this._lastSeriesIndex != H[0]) { this._lastDataIndex = M, this._lastSeriesIndex = H[0]; var G, d; if ("function" == typeof s) { for (var Z = [], K = 0, J = L.length; J > K; K++) { G = L[K].data[M], d = this.getDataFromOption(G, "-"), Z.push({ seriesIndex: H[K], seriesName: L[K].name || "", series: L[K], dataIndex: M, data: G, name: P.getNameByIndex(M), value: d, 0: L[K].name || "", 1: P.getNameByIndex(M), 2: d, 3: G }) } this._curTicket = "axis:" + M, this._tDom.innerHTML = s.call(this.myChart, Z, this._curTicket, this._setContent) } else { if ("string" == typeof s) { this._curTicket = 0 / 0, s = s.replace("{a}", "{a0}").replace("{b}", "{b0}").replace("{c}", "{c0}"); for (var K = 0, J = L.length; J > K; K++) { s = s.replace("{a" + K + "}", this._encodeHTML(L[K].name || "")), s = s.replace("{b" + K + "}", this._encodeHTML(P.getNameByIndex(M))), G = L[K].data[M], G = this.getDataFromOption(G, "-"), s = s.replace("{c" + K + "}", G instanceof Array ? G : this.numAddCommas(G)) } this._tDom.innerHTML = s } else { this._curTicket = 0 / 0, s = this._encodeHTML(P.getNameByIndex(M)); for (var K = 0, J = L.length; J > K; K++) { s += "
" + this._encodeHTML(L[K].name || "") + " : ", G = L[K].data[M], G = this.getDataFromOption(G, "-"), s += G instanceof Array ? G : this.numAddCommas(G) } this._tDom.innerHTML = s } } } if (S === !1 || !this.option.tooltip.showContent) { return } this.hasAppend || (this._tDom.style.left = this._zrWidth / 2 + "px", this._tDom.style.top = this._zrHeight / 2 + "px", this.dom.firstChild.appendChild(this._tDom), this.hasAppend = !0), this._show(Q, R + 10, W + 10, O) } }, _showPolarTrigger: function(H, T) { if (null == this.component.polar || null == H || null == T || 0 > T) { return !1 } var L, O, d, P = this.option.series, R = [], S = [], M = ""; if ("axis" === this.option.tooltip.trigger) { if (!this.option.tooltip.show) { return !1 } L = this.option.tooltip.formatter, O = this.option.tooltip.position } for (var K = this.option.polar[H].indicator[T].text, G = 0, N = P.length; N > G; G++) { this._isSelected(P[G].name) && P[G].polarIndex === H && "axis" === this.deepQuery([P[G], this.option], "tooltip.trigger") && (d = this.query(P[G], "tooltip.showContent") || d, L = this.query(P[G], "tooltip.formatter") || L, O = this.query(P[G], "tooltip.position") || O, M += this._style(this.query(P[G], "tooltip")), R.push(P[G]), S.push(G)) } if (R.length > 0) { for (var Q, W, Y, X = [], G = 0, N = R.length; N > G; G++) { Q = R[G].data; for (var J = 0, I = Q.length; I > J; J++) { W = Q[J], this._isSelected(W.name) && (W = null != W ? W : { name: "", value: { dataIndex: "-" } }, Y = this.getDataFromOption(W.value[T]), X.push({ seriesIndex: S[G], seriesName: R[G].name || "", series: R[G], dataIndex: T, data: W, name: W.name, indicator: K, value: Y, 0: R[G].name || "", 1: W.name, 2: Y, 3: K })) } } if (X.length <= 0) { return } if (this._lastItemTriggerId = -1, this._lastDataIndex != T || this._lastSeriesIndex != S[0]) { if (this._lastDataIndex = T, this._lastSeriesIndex = S[0], "function" == typeof L) { this._curTicket = "axis:" + T, this._tDom.innerHTML = L.call(this.myChart, X, this._curTicket, this._setContent) } else { if ("string" == typeof L) { L = L.replace("{a}", "{a0}").replace("{b}", "{b0}").replace("{c}", "{c0}").replace("{d}", "{d0}"); for (var G = 0, N = X.length; N > G; G++) { L = L.replace("{a" + G + "}", this._encodeHTML(X[G].seriesName)), L = L.replace("{b" + G + "}", this._encodeHTML(X[G].name)), L = L.replace("{c" + G + "}", this.numAddCommas(X[G].value)), L = L.replace("{d" + G + "}", this._encodeHTML(X[G].indicator)) } this._tDom.innerHTML = L } else { L = this._encodeHTML(X[0].name) + "
" + this._encodeHTML(X[0].indicator) + " : " + this.numAddCommas(X[0].value); for (var G = 1, N = X.length; N > G; G++) { L += "
" + this._encodeHTML(X[G].name) + "
", L += this._encodeHTML(X[G].indicator) + " : " + this.numAddCommas(X[G].value) } this._tDom.innerHTML = L } } } if (d === !1 || !this.option.tooltip.showContent) { return } return this.hasAppend || (this._tDom.style.left = this._zrWidth / 2 + "px", this._tDom.style.top = this._zrHeight / 2 + "px", this.dom.firstChild.appendChild(this._tDom), this.hasAppend = !0), this._show(O, j.getX(this._event), j.getY(this._event), M), !0 } }, _showItemTrigger: function(s) { if (this._curTarget) { var P, J, L, d = x.get(this._curTarget, "series"), M = x.get(this._curTarget, "seriesIndex"), O = x.get(this._curTarget, "data"), I = x.get(this._curTarget, "dataIndex"), l = x.get(this._curTarget, "name"), K = x.get(this._curTarget, "value"), N = x.get(this._curTarget, "special"), Q = x.get(this._curTarget, "special2"), S = [O, d, this.option], R = ""; if ("island" != this._curTarget._type) { var H = s ? "axis" : "item"; this.option.tooltip.trigger === H && (P = this.option.tooltip.formatter, J = this.option.tooltip.position), this.query(d, "tooltip.trigger") === H && (L = this.query(d, "tooltip.showContent") || L, P = this.query(d, "tooltip.formatter") || P, J = this.query(d, "tooltip.position") || J, R += this._style(this.query(d, "tooltip"))), L = this.query(O, "tooltip.showContent") || L, P = this.query(O, "tooltip.formatter") || P, J = this.query(O, "tooltip.position") || J, R += this._style(this.query(O, "tooltip")) } else { this._lastItemTriggerId = 0 / 0, L = this.deepQuery(S, "tooltip.showContent"), P = this.deepQuery(S, "tooltip.islandFormatter"), J = this.deepQuery(S, "tooltip.islandPosition") } this._lastDataIndex = -1, this._lastSeriesIndex = -1, this._lastItemTriggerId !== this._curTarget.id && (this._lastItemTriggerId = this._curTarget.id, "function" == typeof P ? (this._curTicket = (d.name || "") + ":" + I, this._tDom.innerHTML = P.call(this.myChart, { seriesIndex: M, seriesName: d.name || "", series: d, dataIndex: I, data: O, name: l, value: K, percent: N, indicator: N, value2: Q, indicator2: Q, 0: d.name || "", 1: l, 2: K, 3: N, 4: Q, 5: O, 6: M, 7: I }, this._curTicket, this._setContent)) : "string" == typeof P ? (this._curTicket = 0 / 0, P = P.replace("{a}", "{a0}").replace("{b}", "{b0}").replace("{c}", "{c0}"), P = P.replace("{a0}", this._encodeHTML(d.name || "")).replace("{b0}", this._encodeHTML(l)).replace("{c0}", K instanceof Array ? K : this.numAddCommas(K)), P = P.replace("{d}", "{d0}").replace("{d0}", N || ""), P = P.replace("{e}", "{e0}").replace("{e0}", x.get(this._curTarget, "special2") || ""), this._tDom.innerHTML = P) : (this._curTicket = 0 / 0, this._tDom.innerHTML = d.type === D.CHART_TYPE_RADAR && N ? this._itemFormatter.radar.call(this, d, l, K, N) : d.type === D.CHART_TYPE_EVENTRIVER ? this._itemFormatter.eventRiver.call(this, d, l, K, O) : "" + (null != d.name ? this._encodeHTML(d.name) + "
" : "") + ("" === l ? "" : this._encodeHTML(l) + " : ") + (K instanceof Array ? K : this.numAddCommas(K)))); var G = j.getX(this._event) , T = j.getY(this._event); this.deepQuery(S, "tooltip.axisPointer.show") && this.component.grid ? this._styleAxisPointer([d], this.component.grid.getX(), T, this.component.grid.getXend(), T, 0, G, T) : this._hide(), L !== !1 && this.option.tooltip.showContent && (this.hasAppend || (this._tDom.style.left = this._zrWidth / 2 + "px", this._tDom.style.top = this._zrHeight / 2 + "px", this.dom.firstChild.appendChild(this._tDom), this.hasAppend = !0), this._show(J, G + 20, T - 20, R)) } }, _itemFormatter: { radar: function(d, p, h, l) { var c = ""; c += this._encodeHTML("" === p ? d.name || "" : p), c += "" === c ? "" : "
"; for (var m = 0; m < l.length; m++) { c += this._encodeHTML(l[m].text) + " : " + this.numAddCommas(h[m]) + "
" } return c }, chord: function(d, s, h, l, c) { if (null == c) { return this._encodeHTML(s) + " (" + this.numAddCommas(h) + ")" } var m = this._encodeHTML(s) , p = this._encodeHTML(l); return "" + (null != d.name ? this._encodeHTML(d.name) + "
" : "") + m + " -> " + p + " (" + this.numAddCommas(h) + ")
" + p + " -> " + m + " (" + this.numAddCommas(c) + ")" }, eventRiver: function(d, s, h, l) { var c = ""; c += this._encodeHTML("" === d.name ? "" : d.name + " : "), c += this._encodeHTML(s), c += "" === c ? "" : "
", l = l.evolution; for (var m = 0, p = l.length; p > m; m++) { c += '
', l[m].detail && (l[m].detail.img && (c += ''), c += '
' + l[m].time + "
", c += '', c += l[m].detail.text + "
", c += "
") } return c } }, _styleAxisPointer: function(J, X, N, Q, G, R, T, W) { if (J.length > 0) { var O, M, I = this.option.tooltip.axisPointer, H = I.type, P = { line: {}, cross: {}, shadow: {} }; for (var S in P) { P[S].color = I[S + "Style"].color, P[S].width = I[S + "Style"].width, P[S].type = I[S + "Style"].type } for (var Y = 0, aa = J.length; aa > Y; Y++) { O = J[Y], M = this.query(O, "tooltip.axisPointer.type"), H = M || H, M && (P[M].color = this.query(O, "tooltip.axisPointer." + M + "Style.color") || P[M].color, P[M].width = this.query(O, "tooltip.axisPointer." + M + "Style.width") || P[M].width, P[M].type = this.query(O, "tooltip.axisPointer." + M + "Style.type") || P[M].type) } if ("line" === H) { var Z = P.line.width , L = X == Q; this._axisLineShape.style = { xStart: L ? this.subPixelOptimize(X, Z) : X, yStart: L ? N : this.subPixelOptimize(N, Z), xEnd: L ? this.subPixelOptimize(Q, Z) : Q, yEnd: L ? G : this.subPixelOptimize(G, Z), strokeColor: P.line.color, lineWidth: Z, lineType: P.line.type }, this._axisLineShape.invisible = !1, this.zr.modShape(this._axisLineShape.id) } else { if ("cross" === H) { var K = P.cross.width; this._axisCrossShape.style = { brushType: "stroke", rect: this.component.grid.getArea(), x: this.subPixelOptimize(T, K), y: this.subPixelOptimize(W, K), text: ("( " + this.component.xAxis.getAxis(0).getValueFromCoord(T) + " , " + this.component.yAxis.getAxis(0).getValueFromCoord(W) + " )").replace(" , ", " ").replace(" , ", " "), textPosition: "specific", strokeColor: P.cross.color, lineWidth: K, lineType: P.cross.type }, this.component.grid.getXend() - T > 100 ? (this._axisCrossShape.style.textAlign = "left", this._axisCrossShape.style.textX = T + 10) : (this._axisCrossShape.style.textAlign = "right", this._axisCrossShape.style.textX = T - 10), W - this.component.grid.getY() > 50 ? (this._axisCrossShape.style.textBaseline = "bottom", this._axisCrossShape.style.textY = W - 10) : (this._axisCrossShape.style.textBaseline = "top", this._axisCrossShape.style.textY = W + 10), this._axisCrossShape.invisible = !1, this.zr.modShape(this._axisCrossShape.id) } else { "shadow" === H && ((null == P.shadow.width || "auto" === P.shadow.width || isNaN(P.shadow.width)) && (P.shadow.width = R), X === Q ? Math.abs(this.component.grid.getX() - X) < 2 ? (P.shadow.width /= 2, X = Q += P.shadow.width / 2) : Math.abs(this.component.grid.getXend() - X) < 2 && (P.shadow.width /= 2, X = Q -= P.shadow.width / 2) : N === G && (Math.abs(this.component.grid.getY() - N) < 2 ? (P.shadow.width /= 2, N = G += P.shadow.width / 2) : Math.abs(this.component.grid.getYend() - N) < 2 && (P.shadow.width /= 2, N = G -= P.shadow.width / 2)), this._axisShadowShape.style = { xStart: X, yStart: N, xEnd: Q, yEnd: G, strokeColor: P.shadow.color, lineWidth: P.shadow.width }, this._axisShadowShape.invisible = !1, this.zr.modShape(this._axisShadowShape.id)) } } this.zr.refreshNextFrame() } }, __onmousemove: function(d) { if (clearTimeout(this._hidingTicket), clearTimeout(this._showingTicket), !this._mousein || !this._enterable) { var G = d.target , p = j.getX(d.event) , s = j.getY(d.event); if (G) { this._curTarget = G, this._event = d.event, this._event.zrenderX = p, this._event.zrenderY = s; var c; if (this._needAxisTrigger && this.component.polar && -1 != (c = this.component.polar.isInside([p, s]))) { for (var u = this.option.series, r = 0, m = u.length; m > r; r++) { if (u[r].polarIndex === c && "axis" === this.deepQuery([u[r], this.option], "tooltip.trigger")) { this._curTarget = null; break } } } this._showingTicket = setTimeout(this._tryShow, this._showDelay) } else { this._curTarget = !1, this._event = d.event, this._event.zrenderX = p, this._event.zrenderY = s, this._needAxisTrigger && this.component.grid && f.isInside(C, this.component.grid.getArea(), p, s) ? this._showingTicket = setTimeout(this._tryShow, this._showDelay) : this._needAxisTrigger && this.component.polar && -1 != this.component.polar.isInside([p, s]) ? this._showingTicket = setTimeout(this._tryShow, this._showDelay) : (!this._event.connectTrigger && this.messageCenter.dispatch(D.EVENT.TOOLTIP_OUT_GRID, this._event, null, this.myChart), this._hidingTicket = setTimeout(this._hide, this._hideDelay)) } } }, __onglobalout: function() { clearTimeout(this._hidingTicket), clearTimeout(this._showingTicket), this._hidingTicket = setTimeout(this._hide, this._hideDelay) }, __setContent: function(a, c) { this._tDom && (a === this._curTicket && (this._tDom.innerHTML = c), setTimeout(this._refixed, 20)) }, ontooltipHover: function(a, h) { if (!this._lastTipShape || this._lastTipShape && this._lastTipShape.dataIndex != a.dataIndex) { this._lastTipShape && this._lastTipShape.tipShape.length > 0 && (this.zr.delShape(this._lastTipShape.tipShape), this.shapeList.length = 2); for (var c = 0, d = h.length; d > c; c++) { h[c].zlevel = this.getZlevelBase(), h[c].z = this.getZBase(), h[c].style = F.prototype.getHighlightStyle(h[c].style, h[c].highlightStyle), h[c].draggable = !1, h[c].hoverable = !1, h[c].clickable = !1, h[c].ondragend = null, h[c].ondragover = null, h[c].ondrop = null, this.shapeList.push(h[c]), this.zr.addShape(h[c]) } this._lastTipShape = { dataIndex: a.dataIndex, tipShape: h } } }, ondragend: function() { this._hide() }, onlegendSelected: function(a) { this._selectedMap = a.selected }, _setSelectedMap: function() { this._selectedMap = this.component.legend ? B.clone(this.component.legend.getSelectedMap()) : {} }, _isSelected: function(a) { return null != this._selectedMap[a] ? this._selectedMap[a] : !0 }, showTip: function(I) { if (I) { var R, L = this.option.series; if (null != I.seriesIndex) { R = I.seriesIndex } else { for (var N = I.seriesName, l = 0, O = L.length; O > l; l++) { if (L[l].name === N) { R = l; break } } } var Q = L[R]; if (null != Q) { var H = this.myChart.chart[Q.type] , G = "axis" === this.deepQuery([Q, this.option], "tooltip.trigger"); if (H) { if (G) { var M = I.dataIndex; switch (H.type) { case D.CHART_TYPE_LINE: case D.CHART_TYPE_BAR: case D.CHART_TYPE_K: case D.CHART_TYPE_RADAR: if (null == this.component.polar || Q.data[0].value.length <= M) { return } var P = Q.polarIndex || 0 , S = this.component.polar.getVector(P, M, "max"); this._event = { zrenderX: S[0], zrenderY: S[1] }, this._showPolarTrigger(P, M) } } else { var W, T, K = H.shapeList; switch (H.type) { case D.CHART_TYPE_LINE: case D.CHART_TYPE_BAR: case D.CHART_TYPE_K: case D.CHART_TYPE_TREEMAP: case D.CHART_TYPE_SCATTER: for (var M = I.dataIndex, l = 0, O = K.length; O > l; l++) { if (null == K[l]._mark && x.get(K[l], "seriesIndex") == R && x.get(K[l], "dataIndex") == M) { this._curTarget = K[l], W = K[l].style.x, T = H.type != D.CHART_TYPE_K ? K[l].style.y : K[l].style.y[0]; break } } break; case D.CHART_TYPE_RADAR: for (var M = I.dataIndex, l = 0, O = K.length; O > l; l++) { if ("polygon" === K[l].type && x.get(K[l], "seriesIndex") == R && x.get(K[l], "dataIndex") == M) { this._curTarget = K[l]; var S = this.component.polar.getCenter(Q.polarIndex || 0); W = S[0], T = S[1]; break } } break; case D.CHART_TYPE_PIE: for (var J = I.name, l = 0, O = K.length; O > l; l++) { if ("sector" === K[l].type && x.get(K[l], "seriesIndex") == R && x.get(K[l], "name") == J) { this._curTarget = K[l]; var X = this._curTarget.style , s = (X.startAngle + X.endAngle) / 2 * Math.PI / 180; W = this._curTarget.style.x + Math.cos(s) * X.r / 1.5, T = this._curTarget.style.y - Math.sin(s) * X.r / 1.5; break } } break; case D.CHART_TYPE_MAP: for (var J = I.name, h = Q.mapType, l = 0, O = K.length; O > l; l++) { if ("text" === K[l].type && K[l]._mapType === h && K[l].style._name === J) { this._curTarget = K[l], W = this._curTarget.style.x + this._curTarget.position[0], T = this._curTarget.style.y + this._curTarget.position[1]; break } } break; case D.CHART_TYPE_CHORD: for (var J = I.name, l = 0, O = K.length; O > l; l++) { if ("sector" === K[l].type && x.get(K[l], "name") == J) { this._curTarget = K[l]; var X = this._curTarget.style , s = (X.startAngle + X.endAngle) / 2 * Math.PI / 180; return W = this._curTarget.style.x + Math.cos(s) * (X.r - 2), T = this._curTarget.style.y - Math.sin(s) * (X.r - 2), void this.zr.trigger(v.EVENT.MOUSEMOVE, { zrenderX: W, zrenderY: T }) } } break; case D.CHART_TYPE_FORCE: for (var J = I.name, l = 0, O = K.length; O > l; l++) { if ("circle" === K[l].type && x.get(K[l], "name") == J) { this._curTarget = K[l], W = this._curTarget.position[0], T = this._curTarget.position[1]; break } } } null != W && null != T && (this._event = { zrenderX: W, zrenderY: T }, this.zr.addHoverShape(this._curTarget), this.zr.refreshHover(), this._showItemTrigger()) } } } } }, hideTip: function() { this._hide() }, refresh: function(d) { if (this._zrHeight = this.zr.getHeight(), this._zrWidth = this.zr.getWidth(), this._lastTipShape && this._lastTipShape.tipShape.length > 0 && this.zr.delShape(this._lastTipShape.tipShape), this._lastTipShape = !1, this.shapeList.length = 2, this._lastDataIndex = -1, this._lastSeriesIndex = -1, this._lastItemTriggerId = -1, d) { this.option = d, this.option.tooltip = this.reformOption(this.option.tooltip), this.option.tooltip.textStyle = B.merge(this.option.tooltip.textStyle, this.ecTheme.textStyle), this._needAxisTrigger = !1, "axis" === this.option.tooltip.trigger && (this._needAxisTrigger = !0); for (var m = this.option.series, h = 0, l = m.length; l > h; h++) { if ("axis" === this.query(m[h], "tooltip.trigger")) { this._needAxisTrigger = !0; break } } this._showDelay = this.option.tooltip.showDelay, this._hideDelay = this.option.tooltip.hideDelay, this._defaultCssText = this._style(this.option.tooltip), this._setSelectedMap(), this._axisLineWidth = this.option.tooltip.axisPointer.lineStyle.width, this._enterable = this.option.tooltip.enterable, !this._enterable && this._tDom.className.indexOf(v.elementClassName) < 0 && (this._tDom.className += " " + v.elementClassName) } if (this.showing) { var c = this; setTimeout(function() { c.zr.trigger(v.EVENT.MOUSEMOVE, c.zr.handler._event) }, 50) } }, onbeforDispose: function() { this._lastTipShape && this._lastTipShape.tipShape.length > 0 && this.zr.delShape(this._lastTipShape.tipShape), clearTimeout(this._hidingTicket), clearTimeout(this._showingTicket), this.zr.un(v.EVENT.MOUSEMOVE, this._onmousemove), this.zr.un(v.EVENT.GLOBALOUT, this._onglobalout), this.hasAppend && this.dom.firstChild && this.dom.firstChild.removeChild(this._tDom), this._tDom = null }, _encodeHTML: function(a) { return String(a).replace(/&/g, "&").replace(//g, ">").replace(/"/g, """).replace(/'/g, "'") } }, B.inherits(E, w), q("../component").define("tooltip", E), E }), define("echarts/component/legend", ["require", "./base", "zrender/shape/Text", "zrender/shape/Rectangle", "zrender/shape/Sector", "../util/shape/Icon", "../util/shape/Candle", "../config", "zrender/tool/util", "zrender/tool/area", "../component"], function(p) { function B(d, m, h, c, i) { if (!this.query(c, "legend.data")) { return void console.error("option.legend.data has not been defined.") } u.call(this, d, m, h, c, i); var l = this; l._legendSelected = function(a) { l.__legendSelected(a) } , l._dispatchHoverLink = function(a) { return l.__dispatchHoverLink(a) } , this._colorIndex = 0, this._colorMap = {}, this._selectedMap = {}, this._hasDataMap = {}, this.refresh(c) } var u = p("./base") , x = p("zrender/shape/Text") , b = p("zrender/shape/Rectangle") , y = p("zrender/shape/Sector") , z = p("../util/shape/Icon") , A = p("../util/shape/Candle") , v = p("../config"); v.legend = { zlevel: 0, z: 4, show: !0, orient: "horizontal", x: "center", y: "top", backgroundColor: "rgba(0,0,0,0)", borderColor: "#ccc", borderWidth: 0, padding: 5, itemGap: 10, itemWidth: 20, itemHeight: 14, textStyle: { color: "#333" }, selectedMode: !0 }; var q = p("zrender/tool/util") , j = p("zrender/tool/area"); B.prototype = { type: v.COMPONENT_TYPE_LEGEND, _buildShape: function() { if (this.legendOption.show) { this._itemGroupLocation = this._getItemGroupLocation(), this._buildBackground(), this._buildItem(); for (var a = 0, c = this.shapeList.length; c > a; a++) { this.zr.addShape(this.shapeList[a]) } } }, _buildItem: function() { var C, L, F, h, I, K, G, r, H = this.legendOption.data, J = H.length, M = this.legendOption.textStyle, O = this.zr.getWidth(), N = this.zr.getHeight(), E = this._itemGroupLocation.x, D = this._itemGroupLocation.y, Q = this.legendOption.itemWidth, n = this.legendOption.itemHeight, d = this.legendOption.itemGap; "vertical" === this.legendOption.orient && "right" === this.legendOption.x && (E = this._itemGroupLocation.x + this._itemGroupLocation.width - Q); for (var P = 0; J > P; P++) { I = q.merge(H[P].textStyle || {}, M), K = this.getFont(I), C = this._getName(H[P]), G = this._getFormatterName(C), "" !== C ? (L = H[P].icon || this._getSomethingByName(C).type, r = this.getColor(C), "horizontal" === this.legendOption.orient ? 200 > O - E && Q + 5 + j.getTextWidth(G, K) + (P === J - 1 || "" === H[P + 1] ? 0 : d) >= O - E && (E = this._itemGroupLocation.x, D += n + d) : 200 > N - D && n + (P === J - 1 || "" === H[P + 1] ? 0 : d) >= N - D && ("right" === this.legendOption.x ? E -= this._itemGroupLocation.maxWidth + d : E += this._itemGroupLocation.maxWidth + d, D = this._itemGroupLocation.y), F = this._getItemShapeByType(E, D, Q, n, this._selectedMap[C] && this._hasDataMap[C] ? r : "#ccc", L, r), F._name = C, F = new z(F), h = { zlevel: this.getZlevelBase(), z: this.getZBase(), style: { x: E + Q + 5, y: D + n / 2, color: this._selectedMap[C] ? "auto" === I.color ? r : I.color : "#ccc", text: G, textFont: K, textBaseline: "middle" }, highlightStyle: { color: r, brushType: "fill" }, hoverable: !!this.legendOption.selectedMode, clickable: !!this.legendOption.selectedMode }, "vertical" === this.legendOption.orient && "right" === this.legendOption.x && (h.style.x -= Q + 10, h.style.textAlign = "right"), h._name = C, h = new x(h), this.legendOption.selectedMode && (F.onclick = h.onclick = this._legendSelected, F.onmouseover = h.onmouseover = this._dispatchHoverLink, F.hoverConnect = h.id, h.hoverConnect = F.id), this.shapeList.push(F), this.shapeList.push(h), "horizontal" === this.legendOption.orient ? E += Q + 5 + j.getTextWidth(G, K) + d : D += n + d) : "horizontal" === this.legendOption.orient ? (E = this._itemGroupLocation.x, D += n + d) : ("right" === this.legendOption.x ? E -= this._itemGroupLocation.maxWidth + d : E += this._itemGroupLocation.maxWidth + d, D = this._itemGroupLocation.y) } "horizontal" === this.legendOption.orient && "center" === this.legendOption.x && D != this._itemGroupLocation.y && this._mLineOptimize() }, _getName: function(a) { return "undefined" != typeof a.name ? a.name : a }, _getFormatterName: function(a) { var d, c = this.legendOption.formatter; return d = "function" == typeof c ? c.call(this.myChart, a) : "string" == typeof c ? c.replace("{name}", a) : a }, _getFormatterNameFromData: function(a) { var c = this._getName(a); return this._getFormatterName(c) }, _mLineOptimize: function() { for (var d = [], m = this._itemGroupLocation.x, h = 2, l = this.shapeList.length; l > h; h++) { this.shapeList[h].style.x === m ? d.push((this._itemGroupLocation.width - (this.shapeList[h - 1].style.x + j.getTextWidth(this.shapeList[h - 1].style.text, this.shapeList[h - 1].style.textFont) - m)) / 2) : h === l - 1 && d.push((this._itemGroupLocation.width - (this.shapeList[h].style.x + j.getTextWidth(this.shapeList[h].style.text, this.shapeList[h].style.textFont) - m)) / 2) } for (var c = -1, h = 1, l = this.shapeList.length; l > h; h++) { this.shapeList[h].style.x === m && c++, 0 !== d[c] && (this.shapeList[h].style.x += d[c]) } }, _buildBackground: function() { var a = this.reformCssArray(this.legendOption.padding); this.shapeList.push(new b({ zlevel: this.getZlevelBase(), z: this.getZBase(), hoverable: !1, style: { x: this._itemGroupLocation.x - a[3], y: this._itemGroupLocation.y - a[0], width: this._itemGroupLocation.width + a[3] + a[1], height: this._itemGroupLocation.height + a[0] + a[2], brushType: 0 === this.legendOption.borderWidth ? "fill" : "both", color: this.legendOption.backgroundColor, strokeColor: this.legendOption.borderColor, lineWidth: this.legendOption.borderWidth } })) }, _getItemGroupLocation: function() { var C = this.legendOption.data , N = C.length , F = this.legendOption.itemGap , I = this.legendOption.itemWidth + 5 , d = this.legendOption.itemHeight , J = this.legendOption.textStyle , L = this.getFont(J) , M = 0 , G = 0 , h = this.reformCssArray(this.legendOption.padding) , H = this.zr.getWidth() - h[1] - h[3] , K = this.zr.getHeight() - h[0] - h[2] , O = 0 , Q = 0; if ("horizontal" === this.legendOption.orient) { G = d; for (var P = 0; N > P; P++) { if ("" !== this._getName(C[P])) { var E = j.getTextWidth(this._getFormatterNameFromData(C[P]), C[P].textStyle ? this.getFont(q.merge(C[P].textStyle || {}, J)) : L); O + I + E + F > H ? (O -= F, M = Math.max(M, O), G += d + F, O = 0) : (O += I + E + F, M = Math.max(M, O - F)) } else { O -= F, M = Math.max(M, O), G += d + F, O = 0 } } } else { for (var P = 0; N > P; P++) { Q = Math.max(Q, j.getTextWidth(this._getFormatterNameFromData(C[P]), C[P].textStyle ? this.getFont(q.merge(C[P].textStyle || {}, J)) : L)) } Q += I, M = Q; for (var P = 0; N > P; P++) { "" !== this._getName(C[P]) ? O + d + F > K ? (M += Q + F, O -= F, G = Math.max(G, O), O = 0) : (O += d + F, G = Math.max(G, O - F)) : (M += Q + F, O -= F, G = Math.max(G, O), O = 0) } } H = this.zr.getWidth(), K = this.zr.getHeight(); var D; switch (this.legendOption.x) { case "center": D = Math.floor((H - M) / 2); break; case "left": D = h[3] + this.legendOption.borderWidth; break; case "right": D = H - M - h[1] - h[3] - 2 * this.legendOption.borderWidth; break; default: D = this.parsePercent(this.legendOption.x, H) } var R; switch (this.legendOption.y) { case "top": R = h[0] + this.legendOption.borderWidth; break; case "bottom": R = K - G - h[0] - h[2] - 2 * this.legendOption.borderWidth; break; case "center": R = Math.floor((K - G) / 2); break; default: R = this.parsePercent(this.legendOption.y, K) } return { x: D, y: R, width: M, height: G, maxWidth: Q } }, _getSomethingByName: function(d) { for (var C, h = this.option.series, l = 0, c = h.length; c > l; l++) { if (h[l].name === d) { return { type: h[l].type, series: h[l], seriesIndex: l, data: null, dataIndex: -1 } } if (h[l].type === v.CHART_TYPE_PIE || h[l].type === v.CHART_TYPE_RADAR || h[l].type === v.CHART_TYPE_CHORD || h[l].type === v.CHART_TYPE_FORCE || h[l].type === v.CHART_TYPE_FUNNEL || h[l].type === v.CHART_TYPE_TREEMAP) { C = h[l].categories || h[l].data || h[l].nodes; for (var m = 0, s = C.length; s > m; m++) { if (C[m].name === d) { return { type: h[l].type, series: h[l], seriesIndex: l, data: C[m], dataIndex: m } } } } } return { type: "bar", series: null, seriesIndex: -1, data: null, dataIndex: -1 } }, _getItemShapeByType: function(m, I, D, E, c, F, G) { var H, C = "#ccc" === c ? G : c, l = { zlevel: this.getZlevelBase(), z: this.getZBase(), style: { iconType: "legendicon" + F, x: m, y: I, width: D, height: E, color: c, strokeColor: c, lineWidth: 2 }, highlightStyle: { color: C, strokeColor: C, lineWidth: 1 }, hoverable: this.legendOption.selectedMode, clickable: this.legendOption.selectedMode }; if (F.match("image")) { var H = F.replace(new RegExp("^image:\\/\\/"), ""); F = "image" } switch (F) { case "line": l.style.brushType = "stroke", l.highlightStyle.lineWidth = 3; break; case "radar": case "venn": case "tree": case "treemap": case "scatter": l.highlightStyle.lineWidth = 3; break; case "k": l.style.brushType = "both", l.highlightStyle.lineWidth = 3, l.highlightStyle.color = l.style.color = this.deepQuery([this.ecTheme, v], "k.itemStyle.normal.color") || "#fff", l.style.strokeColor = "#ccc" != c ? this.deepQuery([this.ecTheme, v], "k.itemStyle.normal.lineStyle.color") || "#ff3200" : c; break; case "image": l.style.iconType = "image", l.style.image = H, "#ccc" === c && (l.style.opacity = 0.5) } return l }, __legendSelected: function(a) { var d = a.target._name; if ("single" === this.legendOption.selectedMode) { for (var c in this._selectedMap) { this._selectedMap[c] = !1 } } this._selectedMap[d] = !this._selectedMap[d], this.messageCenter.dispatch(v.EVENT.LEGEND_SELECTED, a.event, { selected: this._selectedMap, target: d }, this.myChart) }, __dispatchHoverLink: function(a) { this.messageCenter.dispatch(v.EVENT.LEGEND_HOVERLINK, a.event, { target: a.target._name }, this.myChart) }, refresh: function(d) { if (d) { this.option = d || this.option, this.option.legend = this.reformOption(this.option.legend), this.legendOption = this.option.legend; var G, m, C, c, D = this.legendOption.data || []; if (this.legendOption.selected) { for (var E in this.legendOption.selected) { this._selectedMap[E] = "undefined" != typeof this._selectedMap[E] ? this._selectedMap[E] : this.legendOption.selected[E] } } for (var F = 0, l = D.length; l > F; F++) { G = this._getName(D[F]), "" !== G && (m = this._getSomethingByName(G), m.series ? (this._hasDataMap[G] = !0, c = !m.data || m.type !== v.CHART_TYPE_PIE && m.type !== v.CHART_TYPE_FORCE && m.type !== v.CHART_TYPE_FUNNEL ? [m.series] : [m.data, m.series], C = this.getItemStyleColor(this.deepQuery(c, "itemStyle.normal.color"), m.seriesIndex, m.dataIndex, m.data), C && m.type != v.CHART_TYPE_K && this.setColor(G, C), this._selectedMap[G] = null != this._selectedMap[G] ? this._selectedMap[G] : !0) : this._hasDataMap[G] = !1) } } this.clear(), this._buildShape() }, getRelatedAmount: function(d) { for (var E, h = 0, l = this.option.series, c = 0, m = l.length; m > c; c++) { if (l[c].name === d && h++, l[c].type === v.CHART_TYPE_PIE || l[c].type === v.CHART_TYPE_RADAR || l[c].type === v.CHART_TYPE_CHORD || l[c].type === v.CHART_TYPE_FORCE || l[c].type === v.CHART_TYPE_FUNNEL) { E = l[c].type != v.CHART_TYPE_FORCE ? l[c].data : l[c].categories; for (var C = 0, D = E.length; D > C; C++) { E[C].name === d && "-" != E[C].value && h++ } } } return h }, setColor: function(a, c) { this._colorMap[a] = c }, getColor: function(a) { return this._colorMap[a] || (this._colorMap[a] = this.zr.getColor(this._colorIndex++)), this._colorMap[a] }, hasColor: function(a) { return this._colorMap[a] ? this._colorMap[a] : !1 }, add: function(d, m) { for (var h = this.legendOption.data, l = 0, c = h.length; c > l; l++) { if (this._getName(h[l]) === d) { return } } this.legendOption.data.push(d), this.setColor(d, m), this._selectedMap[d] = !0, this._hasDataMap[d] = !0 }, del: function(a) { for (var h = this.legendOption.data, c = 0, d = h.length; d > c; c++) { if (this._getName(h[c]) === a) { return this.legendOption.data.splice(c, 1) } } }, getItemShape: function(a) { if (null != a) { for (var h, c = 0, d = this.shapeList.length; d > c; c++) { if (h = this.shapeList[c], h._name === a && "text" != h.type) { return h } } } }, setItemShape: function(d, m) { for (var h, l = 0, c = this.shapeList.length; c > l; l++) { h = this.shapeList[l], h._name === d && "text" != h.type && (this._selectedMap[d] || (m.style.color = "#ccc", m.style.strokeColor = "#ccc"), this.zr.modShape(h.id, m)) } }, isSelected: function(a) { return "undefined" != typeof this._selectedMap[a] ? this._selectedMap[a] : !0 }, getSelectedMap: function() { return this._selectedMap }, setSelected: function(a, d) { if ("single" === this.legendOption.selectedMode) { for (var c in this._selectedMap) { this._selectedMap[c] = !1 } } this._selectedMap[a] = d, this.messageCenter.dispatch(v.EVENT.LEGEND_SELECTED, null, { selected: this._selectedMap, target: a }, this.myChart) }, onlegendSelected: function(a, h) { var c = a.selected; for (var d in c) { this._selectedMap[d] != c[d] && (h.needRefresh = !0), this._selectedMap[d] = c[d] } } }; var f = { line: function(a, d) { var c = d.height / 2; a.moveTo(d.x, d.y + c), a.lineTo(d.x + d.width, d.y + c) }, pie: function(d, o) { var h = o.x , l = o.y , c = o.width , m = o.height; y.prototype.buildPath(d, { x: h + c / 2, y: l + m + 2, r: m, r0: 6, startAngle: 45, endAngle: 135 }) }, eventRiver: function(d, r) { var h = r.x , l = r.y , c = r.width , m = r.height; d.moveTo(h, l + m), d.bezierCurveTo(h + c, l + m, h, l + 4, h + c, l + 4), d.lineTo(h + c, l), d.bezierCurveTo(h, l, h + c, l + m - 4, h, l + m - 4), d.lineTo(h, l + m) }, k: function(d, r) { var h = r.x , l = r.y , c = r.width , m = r.height; A.prototype.buildPath(d, { x: h + c / 2, y: [l + 1, l + 1, l + m - 6, l + m], width: c - 6 }) }, bar: function(d, C) { var h = C.x , l = C.y + 1 , c = C.width , m = C.height - 2 , s = 3; d.moveTo(h + s, l), d.lineTo(h + c - s, l), d.quadraticCurveTo(h + c, l, h + c, l + s), d.lineTo(h + c, l + m - s), d.quadraticCurveTo(h + c, l + m, h + c - s, l + m), d.lineTo(h + s, l + m), d.quadraticCurveTo(h, l + m, h, l + m - s), d.lineTo(h, l + s), d.quadraticCurveTo(h, l, h + s, l) }, force: function(a, c) { z.prototype.iconLibrary.circle(a, c) }, radar: function(E, M) { var G = 6 , I = M.x + M.width / 2 , m = M.y + M.height / 2 , J = M.height / 2 , K = 2 * Math.PI / G , L = -Math.PI / 2 , H = I + J * Math.cos(L) , F = m + J * Math.sin(L); E.moveTo(H, F), L += K; for (var D = 0, C = G - 1; C > D; D++) { E.lineTo(I + J * Math.cos(L), m + J * Math.sin(L)), L += K } E.lineTo(H, F) } }; f.chord = f.pie, f.map = f.bar; for (var w in f) { z.prototype.iconLibrary["legendicon" + w] = f[w] } return q.inherits(B, u), p("../component").define("legend", B), B }), define("echarts/util/ecData", [], function() { function a(h, w, j, p, f, q, u, v) { var m; return "undefined" != typeof p && (m = null == p.value ? p : p.value), h._echartsData = { _series: w, _seriesIndex: j, _data: p, _dataIndex: f, _name: q, _value: m, _special: u, _special2: v }, h._echartsData } function d(f, j) { var h = f._echartsData; if (!j) { return h } switch (j) { case "series": case "seriesIndex": case "data": case "dataIndex": case "name": case "value": case "special": case "special2": return h && h["_" + j] } return null } function b(f, j, h) { switch (f._echartsData = f._echartsData || {}, j) { case "series": case "seriesIndex": case "data": case "dataIndex": case "name": case "value": case "special": case "special2": f._echartsData["_" + j] = h } } function c(f, h) { h._echartsData = { _series: f._echartsData._series, _seriesIndex: f._echartsData._seriesIndex, _data: f._echartsData._data, _dataIndex: f._echartsData._dataIndex, _name: f._echartsData._name, _value: f._echartsData._value, _special: f._echartsData._special, _special2: f._echartsData._special2 } } return { pack: a, set: b, get: d, clone: c } }), define("echarts/chart", [], function() { var a = {} , b = {}; return a.define = function(c, d) { return b[c] = d, a } , a.get = function(c) { return b[c] } , a }), define("zrender/tool/color", ["require", "../tool/util"], function(ae) { function aG(a) { ad = a } function am() { ad = ax } function aw(a, b) { return a = 0 | a, b = b || ad, b[a % b.length] } function q(a) { Z = a } function ay() { al = Z } function aC() { return Z } function aE(c, x, f, p, b, u, v) { az || (az = aB.getContext()); for (var w = az.createRadialGradient(c, x, f, p, b, u), m = 0, d = v.length; d > m; m++) { w.addColorStop(v[m][0], v[m][1]) } return w.__nonRecursion = !0, w } function ar(c, p, d, f, b) { az || (az = aB.getContext()); for (var h = az.createLinearGradient(c, p, d, f), l = 0, m = b.length; m > l; l++) { h.addColorStop(b[l][0], b[l][1]) } return h.__nonRecursion = !0, h } function ak(f, D, v) { f = aI(f), D = aI(D), f = aF(f), D = aF(D); for (var y = [], b = (D[0] - f[0]) / v, z = (D[1] - f[1]) / v, B = (D[2] - f[2]) / v, C = (D[3] - f[3]) / v, w = 0, u = f[0], c = f[1], x = f[2], A = f[3]; v > w; w++) { y[w] = aa([aH(Math.floor(u), [0, 255]), aH(Math.floor(c), [0, 255]), aH(Math.floor(x), [0, 255]), A.toFixed(4) - 0], "rgba"), u += b, c += z, x += B, A += C } return u = D[0], c = D[1], x = D[2], A = D[3], y[w] = aa([u, c, x, A], "rgba"), y } function ac(c, m) { var d = [] , f = c.length; if (void 0 === m && (m = 20), 1 === f) { d = ak(c[0], c[0], m) } else { if (f > 1) { for (var b = 0, h = f - 1; h > b; b++) { var l = ak(c[b], c[b + 1], m); h - 1 > b && l.pop(), d = d.concat(l) } } } return d } function aa(a, c) { if (c = c || "rgb", a && (3 === a.length || 4 === a.length)) { if (a = ab(a, function(d) { return d > 1 ? Math.ceil(d) : d }), c.indexOf("hex") > -1) { return "#" + ((1 << 24) + (a[0] << 16) + (a[1] << 8) + +a[2]).toString(16).slice(1) } if (c.indexOf("hs") > -1) { var b = ab(a.slice(1, 3), function(d) { return d + "%" }); a[1] = b[0], a[2] = b[1] } return c.indexOf("a") > -1 ? (3 === a.length && a.push(1), a[3] = aH(a[3], [0, 1]), c + "(" + a.slice(0, 4).join(",") + ")") : c + "(" + a.slice(0, 3).join(",") + ")" } } function au(a) { a = aK(a), a.indexOf("rgba") < 0 && (a = aI(a)); var c = [] , b = 0; return a.replace(/[\d.]+/g, function(d) { d = 3 > b ? 0 | d : +d, c[b++] = d }), c } function aA(a, d) { if (!af(a)) { return a } var b = aF(a) , c = b[3]; return "undefined" == typeof c && (c = 1), a.indexOf("hsb") > -1 ? b = aR(b) : a.indexOf("hsl") > -1 && (b = Q(b)), d.indexOf("hsb") > -1 || d.indexOf("hsv") > -1 ? b = ah(b) : d.indexOf("hsl") > -1 && (b = ao(b)), b[3] = c, aa(b, d) } function aI(a) { return aA(a, "rgba") } function aL(a) { return aA(a, "rgb") } function aJ(a) { return aA(a, "hex") } function ai(a) { return aA(a, "hsva") } function ag(a) { return aA(a, "hsv") } function aQ(a) { return aA(a, "hsba") } function Y(a) { return aA(a, "hsb") } function j(a) { return aA(a, "hsla") } function aO(a) { return aA(a, "hsl") } function ap(a) { for (var b in aj) { if (aJ(aj[b]) === aJ(a)) { return b } } return null } function aK(a) { return String(a).replace(/\s+/g, "") } function at(a) { if (aj[a] && (a = aj[a]), a = aK(a), a = a.replace(/hsv/i, "hsb"), /^#[\da-f]{3}$/i.test(a)) { a = parseInt(a.slice(1), 16); var d = (3840 & a) << 8 , b = (240 & a) << 4 , c = 15 & a; a = "#" + ((1 << 24) + (d << 4) + d + (b << 4) + b + (c << 4) + c).toString(16).slice(1) } return a } function aM(c, h) { if (!af(c)) { return c } var d = h > 0 ? 1 : -1; "undefined" == typeof h && (h = 0), h = Math.abs(h) > 1 ? 1 : Math.abs(h), c = aL(c); for (var f = aF(c), b = 0; 3 > b; b++) { f[b] = 1 === d ? f[b] * (1 - h) | 0 : (255 - f[b]) * h + f[b] | 0 } return "rgb(" + f.join(",") + ")" } function aN(a) { if (!af(a)) { return a } var b = aF(aI(a)); return b = ab(b, function(c) { return 255 - c }), aa(b, "rgb") } function aP(f, B, u) { if (!af(f) || !af(B)) { return f } "undefined" == typeof u && (u = 0.5), u = 1 - aH(u, [0, 1]); for (var x = 2 * u - 1, b = aF(aI(f)), y = aF(aI(B)), z = b[3] - y[3], A = ((x * z === -1 ? x : (x + z) / (1 + x * z)) + 1) / 2, v = 1 - A, p = [], c = 0; 3 > c; c++) { p[c] = b[c] * A + y[c] * v } var w = b[3] * u + y[3] * (1 - u); return w = Math.max(0, Math.min(1, w)), 1 === b[3] && 1 === y[3] ? aa(p, "rgb") : (p[3] = w, aa(p, "rgba")) } function an() { return "#" + (Math.random().toString(16) + "0000").slice(2, 8) } function aF(f) { f = at(f); var z = f.match(aD); if (null === z) { throw new Error("The color format error") } var p, v, b, w = []; if (z[2]) { p = z[2].replace("#", "").split(""), b = [p[0] + p[1], p[2] + p[3], p[4] + p[5]], w = ab(b, function(a) { return aH(parseInt(a, 16), [0, 255]) }) } else { if (z[4]) { var x = z[4].split(","); v = x[3], b = x.slice(0, 3), w = ab(b, function(a) { return a = Math.floor(a.indexOf("%") > 0 ? 2.55 * parseInt(a, 0) : a), aH(a, [0, 255]) }), "undefined" != typeof v && w.push(aH(parseFloat(v), [0, 1])) } else { if (z[5] || z[6]) { var y = (z[5] || z[6]).split(",") , u = parseInt(y[0], 0) / 360 , m = y[1] , c = y[2]; v = y[3], w = ab([m, c], function(a) { return aH(parseFloat(a) / 100, [0, 1]) }), w.unshift(u), "undefined" != typeof v && w.push(aH(parseFloat(v), [0, 1])) } } } return w } function aq(a, c) { if (!af(a)) { return a } null === c && (c = 1); var b = aF(aI(a)); return b[3] = aH(Number(c).toFixed(4), [0, 1]), aa(b, "rgba") } function ab(a, d) { if ("function" != typeof d) { throw new TypeError } for (var b = a ? a.length : 0, c = 0; b > c; c++) { a[c] = d(a[c]) } return a } function aH(a, b) { return a <= b[0] ? a = b[0] : a >= b[1] && (a = b[1]), a } function af(a) { return a instanceof Array || "string" == typeof a } function aR(w) { var G, y, B, b = w[0], C = w[1], E = w[2]; if (0 === C) { G = 255 * E, y = 255 * E, B = 255 * E } else { var F = 6 * b; 6 === F && (F = 0); var z = 0 | F , x = E * (1 - C) , v = E * (1 - C * (F - z)) , f = E * (1 - C * (1 - (F - z))) , A = 0 , D = 0 , H = 0; 0 === z ? (A = E, D = f, H = x) : 1 === z ? (A = v, D = E, H = x) : 2 === z ? (A = x, D = E, H = f) : 3 === z ? (A = x, D = v, H = E) : 4 === z ? (A = f, D = x, H = E) : (A = E, D = x, H = v), G = 255 * A, y = 255 * D, B = 255 * H } return [G, y, B] } function Q(c) { var v, d, h, b = c[0], m = c[1], p = c[2]; if (0 === m) { v = 255 * p, d = 255 * p, h = 255 * p } else { var u; u = 0.5 > p ? p * (1 + m) : p + m - m * p; var f = 2 * p - u; v = 255 * av(f, u, b + 1 / 3), d = 255 * av(f, u, b), h = 255 * av(f, u, b - 1 / 3) } return [v, d, h] } function av(a, c, b) { return 0 > b && (b += 1), b > 1 && (b -= 1), 1 > 6 * b ? a + 6 * (c - a) * b : 1 > 2 * b ? c : 2 > 3 * b ? a + (c - a) * (2 / 3 - b) * 6 : a } function ah(u) { var D, w, z = u[0] / 255, b = u[1] / 255, A = u[2] / 255, B = Math.min(z, b, A), C = Math.max(z, b, A), x = C - B, v = C; if (0 === x) { D = 0, w = 0 } else { w = x / C; var p = ((C - z) / 6 + x / 2) / x , f = ((C - b) / 6 + x / 2) / x , y = ((C - A) / 6 + x / 2) / x; z === C ? D = y - f : b === C ? D = 1 / 3 + p - y : A === C && (D = 2 / 3 + f - p), 0 > D && (D += 1), D > 1 && (D -= 1) } return D = 360 * D, w = 100 * w, v = 100 * v, [D, w, v] } function ao(u) { var D, w, z = u[0] / 255, b = u[1] / 255, A = u[2] / 255, B = Math.min(z, b, A), C = Math.max(z, b, A), x = C - B, v = (C + B) / 2; if (0 === x) { D = 0, w = 0 } else { w = 0.5 > v ? x / (C + B) : x / (2 - C - B); var p = ((C - z) / 6 + x / 2) / x , f = ((C - b) / 6 + x / 2) / x , y = ((C - A) / 6 + x / 2) / x; z === C ? D = y - f : b === C ? D = 1 / 3 + p - y : A === C && (D = 2 / 3 + f - p), 0 > D && (D += 1), D > 1 && (D -= 1) } return D = 360 * D, w = 100 * w, v = 100 * v, [D, w, v] } var az, aB = ae("../tool/util"), ad = ["#ff9277", " #dddd00", " #ffc877", " #bbe3ff", " #d5ffbb", "#bbbbff", " #ddb000", " #b0dd00", " #e2bbff", " #ffbbe3", "#ff7777", " #ff9900", " #83dd00", " #77e3ff", " #778fff", "#c877ff", " #ff77ab", " #ff6600", " #aa8800", " #77c7ff", "#ad77ff", " #ff77ff", " #dd0083", " #777700", " #00aa00", "#0088aa", " #8400dd", " #aa0088", " #dd0000", " #772e00"], ax = ad, Z = "rgba(255,255,0,0.5)", al = Z, aD = /^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i, aj = { aliceblue: "#f0f8ff", antiquewhite: "#faebd7", aqua: "#0ff", aquamarine: "#7fffd4", azure: "#f0ffff", beige: "#f5f5dc", bisque: "#ffe4c4", black: "#000", blanchedalmond: "#ffebcd", blue: "#00f", blueviolet: "#8a2be2", brown: "#a52a2a", burlywood: "#deb887", cadetblue: "#5f9ea0", chartreuse: "#7fff00", chocolate: "#d2691e", coral: "#ff7f50", cornflowerblue: "#6495ed", cornsilk: "#fff8dc", crimson: "#dc143c", cyan: "#0ff", darkblue: "#00008b", darkcyan: "#008b8b", darkgoldenrod: "#b8860b", darkgray: "#a9a9a9", darkgrey: "#a9a9a9", darkgreen: "#006400", darkkhaki: "#bdb76b", darkmagenta: "#8b008b", darkolivegreen: "#556b2f", darkorange: "#ff8c00", darkorchid: "#9932cc", darkred: "#8b0000", darksalmon: "#e9967a", darkseagreen: "#8fbc8f", darkslateblue: "#483d8b", darkslategray: "#2f4f4f", darkslategrey: "#2f4f4f", darkturquoise: "#00ced1", darkviolet: "#9400d3", deeppink: "#ff1493", deepskyblue: "#00bfff", dimgray: "#696969", dimgrey: "#696969", dodgerblue: "#1e90ff", firebrick: "#b22222", floralwhite: "#fffaf0", forestgreen: "#228b22", fuchsia: "#f0f", gainsboro: "#dcdcdc", ghostwhite: "#f8f8ff", gold: "#ffd700", goldenrod: "#daa520", gray: "#808080", grey: "#808080", green: "#008000", greenyellow: "#adff2f", honeydew: "#f0fff0", hotpink: "#ff69b4", indianred: "#cd5c5c", indigo: "#4b0082", ivory: "#fffff0", khaki: "#f0e68c", lavender: "#e6e6fa", lavenderblush: "#fff0f5", lawngreen: "#7cfc00", lemonchiffon: "#fffacd", lightblue: "#add8e6", lightcoral: "#f08080", lightcyan: "#e0ffff", lightgoldenrodyellow: "#fafad2", lightgray: "#d3d3d3", lightgrey: "#d3d3d3", lightgreen: "#90ee90", lightpink: "#ffb6c1", lightsalmon: "#ffa07a", lightseagreen: "#20b2aa", lightskyblue: "#87cefa", lightslategray: "#789", lightslategrey: "#789", lightsteelblue: "#b0c4de", lightyellow: "#ffffe0", lime: "#0f0", limegreen: "#32cd32", linen: "#faf0e6", magenta: "#f0f", maroon: "#800000", mediumaquamarine: "#66cdaa", mediumblue: "#0000cd", mediumorchid: "#ba55d3", mediumpurple: "#9370d8", mediumseagreen: "#3cb371", mediumslateblue: "#7b68ee", mediumspringgreen: "#00fa9a", mediumturquoise: "#48d1cc", mediumvioletred: "#c71585", midnightblue: "#191970", mintcream: "#f5fffa", mistyrose: "#ffe4e1", moccasin: "#ffe4b5", navajowhite: "#ffdead", navy: "#000080", oldlace: "#fdf5e6", olive: "#808000", olivedrab: "#6b8e23", orange: "#ffa500", orangered: "#ff4500", orchid: "#da70d6", palegoldenrod: "#eee8aa", palegreen: "#98fb98", paleturquoise: "#afeeee", palevioletred: "#d87093", papayawhip: "#ffefd5", peachpuff: "#ffdab9", peru: "#cd853f", pink: "#ffc0cb", plum: "#dda0dd", powderblue: "#b0e0e6", purple: "#800080", red: "#f00", rosybrown: "#bc8f8f", royalblue: "#4169e1", saddlebrown: "#8b4513", salmon: "#fa8072", sandybrown: "#f4a460", seagreen: "#2e8b57", seashell: "#fff5ee", sienna: "#a0522d", silver: "#c0c0c0", skyblue: "#87ceeb", slateblue: "#6a5acd", slategray: "#708090", slategrey: "#708090", snow: "#fffafa", springgreen: "#00ff7f", steelblue: "#4682b4", tan: "#d2b48c", teal: "#008080", thistle: "#d8bfd8", tomato: "#ff6347", turquoise: "#40e0d0", violet: "#ee82ee", wheat: "#f5deb3", white: "#fff", whitesmoke: "#f5f5f5", yellow: "#ff0", yellowgreen: "#9acd32" }; return { customPalette: aG, resetPalette: am, getColor: aw, getHighlightColor: aC, customHighlight: q, resetHighlight: ay, getRadialGradient: aE, getLinearGradient: ar, getGradientColors: ac, getStepColors: ak, reverse: aN, mix: aP, lift: aM, trim: aK, random: an, toRGB: aL, toRGBA: aI, toHex: aJ, toHSL: aO, toHSLA: j, toHSB: Y, toHSBA: aQ, toHSV: ag, toHSVA: ai, toName: ap, toColor: aa, toArray: au, alpha: aq, getData: aF } }), define("echarts/component/timeline", ["require", "./base", "zrender/shape/Rectangle", "../util/shape/Icon", "../util/shape/Chain", "../config", "zrender/tool/util", "zrender/tool/area", "zrender/tool/event", "../component"], function(f) { function x(h, y, l, d, n) { q.call(this, h, y, l, d, n); var s = this; if (s._onclick = function(a) { return s.__onclick(a) } , s._ondrift = function(a, i) { return s.__ondrift(this, a, i) } , s._ondragend = function() { return s.__ondragend() } , s._setCurrentOption = function() { var a = s.timelineOption; s.currentIndex %= a.data.length; var i = s.options[s.currentIndex] || {}; s.myChart._setOption(i, a.notMerge, !0), s.messageCenter.dispatch(w.EVENT.TIMELINE_CHANGED, null, { currentIndex: s.currentIndex, data: null != a.data[s.currentIndex].name ? a.data[s.currentIndex].name : a.data[s.currentIndex] }, s.myChart) } , s._onFrame = function() { s._setCurrentOption(), s._syncHandleShape(), s.timelineOption.autoPlay && (s.playTicket = setTimeout(function() { return s.currentIndex += 1, !s.timelineOption.loop && s.currentIndex >= s.timelineOption.data.length ? (s.currentIndex = s.timelineOption.data.length - 1, void s.stop()) : void s._onFrame() }, s.timelineOption.playInterval)) } , this.setTheme(!1), this.options = this.option.options, this.currentIndex = this.timelineOption.currentIndex % this.timelineOption.data.length, this.timelineOption.notMerge || 0 === this.currentIndex || (this.options[this.currentIndex] = p.merge(this.options[this.currentIndex], this.options[0])), this.timelineOption.show && (this._buildShape(), this._syncHandleShape()), this._setCurrentOption(), this.timelineOption.autoPlay) { var s = this; this.playTicket = setTimeout(function() { s.play() }, null != this.ecTheme.animationDuration ? this.ecTheme.animationDuration : w.animationDuration) } } function m(z, G) { var B = 2 , D = G.x + B , o = G.y + B + 2 , E = G.width - B , F = G.height - B , C = G.symbol; if ("last" === C) { z.moveTo(D + E - 2, o + F / 3), z.lineTo(D + E - 2, o), z.lineTo(D + 2, o + F / 2), z.lineTo(D + E - 2, o + F), z.lineTo(D + E - 2, o + F / 3 * 2), z.moveTo(D, o), z.lineTo(D, o) } else { if ("next" === C) { z.moveTo(D + 2, o + F / 3), z.lineTo(D + 2, o), z.lineTo(D + E - 2, o + F / 2), z.lineTo(D + 2, o + F), z.lineTo(D + 2, o + F / 3 * 2), z.moveTo(D, o), z.lineTo(D, o) } else { if ("play" === C) { if ("stop" === G.status) { z.moveTo(D + 2, o), z.lineTo(D + E - 2, o + F / 2), z.lineTo(D + 2, o + F), z.lineTo(D + 2, o) } else { var A = "both" === G.brushType ? 2 : 3; z.rect(D + 2, o, A, F), z.rect(D + E - A - 2, o, A, F) } } else { if (C.match("image")) { var y = ""; y = C.replace(new RegExp("^image:\\/\\/"), ""), C = u.prototype.iconLibrary.image, C(z, { x: D, y: o, width: E, height: F, image: y }) } } } } } var q = f("./base") , b = f("zrender/shape/Rectangle") , u = f("../util/shape/Icon") , v = f("../util/shape/Chain") , w = f("../config"); w.timeline = { zlevel: 0, z: 4, show: !0, type: "time", notMerge: !1, realtime: !0, x: 80, x2: 80, y2: 0, height: 50, backgroundColor: "rgba(0,0,0,0)", borderColor: "#ccc", borderWidth: 0, padding: 5, controlPosition: "left", autoPlay: !1, loop: !0, playInterval: 2000, lineStyle: { width: 1, color: "#666", type: "dashed" }, label: { show: !0, interval: "auto", rotate: 0, textStyle: { color: "#333" } }, checkpointStyle: { symbol: "auto", symbolSize: "auto", color: "auto", borderColor: "auto", borderWidth: "auto", label: { show: !1, textStyle: { color: "auto" } } }, controlStyle: { itemSize: 15, itemGap: 5, normal: { color: "#333" }, emphasis: { color: "#1e90ff" } }, symbol: "emptyDiamond", symbolSize: 4, currentIndex: 0 }; var p = f("zrender/tool/util") , j = f("zrender/tool/area") , c = f("zrender/tool/event"); return x.prototype = { type: w.COMPONENT_TYPE_TIMELINE, _buildShape: function() { if (this._location = this._getLocation(), this._buildBackground(), this._buildControl(), this._chainPoint = this._getChainPoint(), this.timelineOption.label.show) { for (var a = this._getInterval(), l = 0, d = this._chainPoint.length; d > l; l += a) { this._chainPoint[l].showLabel = !0 } } this._buildChain(), this._buildHandle(); for (var l = 0, h = this.shapeList.length; h > l; l++) { this.zr.addShape(this.shapeList[l]) } }, _getLocation: function() { var y, G = this.timelineOption, A = this.reformCssArray(this.timelineOption.padding), C = this.zr.getWidth(), d = this.parsePercent(G.x, C), D = this.parsePercent(G.x2, C); null == G.width ? (y = C - d - D, D = C - D) : (y = this.parsePercent(G.width, C), D = d + y); var E, F, B = this.zr.getHeight(), z = this.parsePercent(G.height, B); return null != G.y ? (E = this.parsePercent(G.y, B), F = E + z) : (F = B - this.parsePercent(G.y2, B), E = F - z), { x: d + A[3], y: E + A[0], x2: D - A[1], y2: F - A[2], width: y - A[1] - A[3], height: z - A[0] - A[2] } }, _getReformedLabel: function(a) { var l = this.timelineOption , d = null != l.data[a].name ? l.data[a].name : l.data[a] , h = l.data[a].formatter || l.label.formatter; return h && ("function" == typeof h ? d = h.call(this.myChart, d) : "string" == typeof h && (d = h.replace("{value}", d))), d }, _getInterval: function() { var A = this._chainPoint , J = this.timelineOption , B = J.label.interval; if ("auto" === B) { var E = J.label.textStyle.fontSize , h = J.data , F = J.data.length; if (F > 3) { var H, I, C = !1; for (B = 0; !C && F > B; ) { B++, C = !0; for (var z = B; F > z; z += B) { if (H = A[z].x - A[z - B].x, 0 !== J.label.rotate) { I = E } else { if (h[z].textStyle) { I = j.getTextWidth(A[z].name, A[z].textFont) } else { var y = A[z].name + "" , D = (y.match(/\w/g) || "").length , G = y.length - D; I = D * E * 2 / 3 + G * E } } if (I > H) { C = !1; break } } } } else { B = 1 } } else { B = B - 0 + 1 } return B }, _getChainPoint: function() { function D(a) { return null != G[a].name ? G[a].name : G[a] + "" } var O, H = this.timelineOption, J = H.symbol.toLowerCase(), z = H.symbolSize, K = H.label.rotate, M = H.label.textStyle, N = this.getFont(M), G = H.data, C = this._location.x, B = this._location.y + this._location.height / 4 * 3, I = this._location.x2 - this._location.x, L = G.length, P = []; if (L > 1) { var R = I / L; if (R = R > 50 ? 50 : 20 > R ? 5 : R, I -= 2 * R, "number" === H.type) { for (var Q = 0; L > Q; Q++) { P.push(C + R + I / (L - 1) * Q) } } else { P[0] = new Date(D(0).replace(/-/g, "/")), P[L - 1] = new Date(D(L - 1).replace(/-/g, "/")) - P[0]; for (var Q = 1; L > Q; Q++) { P[Q] = C + R + I * (new Date(D(Q).replace(/-/g, "/")) - P[0]) / P[L - 1] } P[0] = C + R } } else { P.push(C + I / 2) } for (var F, E, T, A, l, S = [], Q = 0; L > Q; Q++) { C = P[Q], F = G[Q].symbol && G[Q].symbol.toLowerCase() || J, F.match("empty") ? (F = F.replace("empty", ""), T = !0) : T = !1, F.match("star") && (E = F.replace("star", "") - 0 || 5, F = "star"), O = G[Q].textStyle ? p.merge(G[Q].textStyle || {}, M) : M, A = O.align || "center", K ? (A = K > 0 ? "right" : "left", l = [K * Math.PI / 180, C, B - 5]) : l = !1, S.push({ x: C, n: E, isEmpty: T, symbol: F, symbolSize: G[Q].symbolSize || z, color: G[Q].color, borderColor: G[Q].borderColor, borderWidth: G[Q].borderWidth, name: this._getReformedLabel(Q), textColor: O.color, textAlign: A, textBaseline: O.baseline || "middle", textX: C, textY: B - (K ? 5 : 0), textFont: G[Q].textStyle ? this.getFont(O) : N, rotation: l, showLabel: !1 }) } return S }, _buildBackground: function() { var a = this.timelineOption , l = this.reformCssArray(this.timelineOption.padding) , d = this._location.width , h = this._location.height; (0 !== a.borderWidth || "rgba(0,0,0,0)" != a.backgroundColor.replace(/\s/g, "")) && this.shapeList.push(new b({ zlevel: this.getZlevelBase(), z: this.getZBase(), hoverable: !1, style: { x: this._location.x - l[3], y: this._location.y - l[0], width: d + l[1] + l[3], height: h + l[0] + l[2], brushType: 0 === a.borderWidth ? "fill" : "both", color: a.backgroundColor, strokeColor: a.borderColor, lineWidth: a.borderWidth } })) }, _buildControl: function() { var y = this , E = this.timelineOption , A = E.lineStyle , B = E.controlStyle; if ("none" !== E.controlPosition) { var l, C = B.itemSize, D = B.itemGap; "left" === E.controlPosition ? (l = this._location.x, this._location.x += 3 * (C + D)) : (l = this._location.x2 - (3 * (C + D) - D), this._location.x2 -= 3 * (C + D)); var z = this._location.y , o = { zlevel: this.getZlevelBase(), z: this.getZBase() + 1, style: { iconType: "timelineControl", symbol: "last", x: l, y: z, width: C, height: C, brushType: "stroke", color: B.normal.color, strokeColor: B.normal.color, lineWidth: A.width }, highlightStyle: { color: B.emphasis.color, strokeColor: B.emphasis.color, lineWidth: A.width + 1 }, clickable: !0 }; this._ctrLastShape = new u(o), this._ctrLastShape.onclick = function() { y.last() } , this.shapeList.push(this._ctrLastShape), l += C + D, this._ctrPlayShape = new u(p.clone(o)), this._ctrPlayShape.style.brushType = "fill", this._ctrPlayShape.style.symbol = "play", this._ctrPlayShape.style.status = this.timelineOption.autoPlay ? "playing" : "stop", this._ctrPlayShape.style.x = l, this._ctrPlayShape.onclick = function() { "stop" === y._ctrPlayShape.style.status ? y.play() : y.stop() } , this.shapeList.push(this._ctrPlayShape), l += C + D, this._ctrNextShape = new u(p.clone(o)), this._ctrNextShape.style.symbol = "next", this._ctrNextShape.style.x = l, this._ctrNextShape.onclick = function() { y.next() } , this.shapeList.push(this._ctrNextShape) } }, _buildChain: function() { var a = this.timelineOption , d = a.lineStyle; this._timelineShae = { zlevel: this.getZlevelBase(), z: this.getZBase(), style: { x: this._location.x, y: this.subPixelOptimize(this._location.y, d.width), width: this._location.x2 - this._location.x, height: this._location.height, chainPoint: this._chainPoint, brushType: "both", strokeColor: d.color, lineWidth: d.width, lineType: d.type }, hoverable: !1, clickable: !0, onclick: this._onclick }, this._timelineShae = new v(this._timelineShae), this.shapeList.push(this._timelineShae) }, _buildHandle: function() { var a = this._chainPoint[this.currentIndex] , d = a.symbolSize + 1; d = 5 > d ? 5 : d, this._handleShape = { zlevel: this.getZlevelBase(), z: this.getZBase() + 1, hoverable: !1, draggable: !0, style: { iconType: "diamond", n: a.n, x: a.x - d, y: this._location.y + this._location.height / 4 - d, width: 2 * d, height: 2 * d, brushType: "both", textPosition: "specific", textX: a.x, textY: this._location.y - this._location.height / 4, textAlign: "center", textBaseline: "middle" }, highlightStyle: {}, ondrift: this._ondrift, ondragend: this._ondragend }, this._handleShape = new u(this._handleShape), this.shapeList.push(this._handleShape) }, _syncHandleShape: function() { if (this.timelineOption.show) { var a = this.timelineOption , l = a.checkpointStyle , d = this._chainPoint[this.currentIndex]; this._handleShape.style.text = l.label.show ? d.name : "", this._handleShape.style.textFont = d.textFont, this._handleShape.style.n = d.n, "auto" === l.symbol ? this._handleShape.style.iconType = "none" != d.symbol ? d.symbol : "diamond" : (this._handleShape.style.iconType = l.symbol, l.symbol.match("star") && (this._handleShape.style.n = l.symbol.replace("star", "") - 0 || 5, this._handleShape.style.iconType = "star")); var h; "auto" === l.symbolSize ? (h = d.symbolSize + 2, h = 5 > h ? 5 : h) : h = l.symbolSize - 0, this._handleShape.style.color = "auto" === l.color ? d.color ? d.color : a.controlStyle.emphasis.color : l.color, this._handleShape.style.textColor = "auto" === l.label.textStyle.color ? this._handleShape.style.color : l.label.textStyle.color, this._handleShape.highlightStyle.strokeColor = this._handleShape.style.strokeColor = "auto" === l.borderColor ? d.borderColor ? d.borderColor : "#fff" : l.borderColor, this._handleShape.style.lineWidth = "auto" === l.borderWidth ? d.borderWidth ? d.borderWidth : 0 : l.borderWidth - 0, this._handleShape.highlightStyle.lineWidth = this._handleShape.style.lineWidth + 1, this.zr.animate(this._handleShape.id, "style").when(500, { x: d.x - h, textX: d.x, y: this._location.y + this._location.height / 4 - h, width: 2 * h, height: 2 * h }).start("ExponentialOut") } }, _findChainIndex: function(a) { var l = this._chainPoint , d = l.length; if (a <= l[0].x) { return 0 } if (a >= l[d - 1].x) { return d - 1 } for (var h = 0; d - 1 > h; h++) { if (a >= l[h].x && a <= l[h + 1].x) { return Math.abs(a - l[h].x) < Math.abs(a - l[h + 1].x) ? h : h + 1 } } }, __onclick: function(a) { var h = c.getX(a.event) , d = this._findChainIndex(h); return d === this.currentIndex ? !0 : (this.currentIndex = d, this.timelineOption.autoPlay && this.stop(), clearTimeout(this.playTicket), void this._onFrame()) }, __ondrift: function(h, C) { this.timelineOption.autoPlay && this.stop(); var l, y = this._chainPoint, d = y.length; h.style.x + C <= y[0].x - y[0].symbolSize ? (h.style.x = y[0].x - y[0].symbolSize, l = 0) : h.style.x + C >= y[d - 1].x - y[d - 1].symbolSize ? (h.style.x = y[d - 1].x - y[d - 1].symbolSize, l = d - 1) : (h.style.x += C, l = this._findChainIndex(h.style.x)); var z = y[l] , A = z.symbolSize + 2; if (h.style.iconType = z.symbol, h.style.n = z.n, h.style.textX = h.style.x + A / 2, h.style.y = this._location.y + this._location.height / 4 - A, h.style.width = 2 * A, h.style.height = 2 * A, h.style.text = z.name, l === this.currentIndex) { return !0 } if (this.currentIndex = l, this.timelineOption.realtime) { clearTimeout(this.playTicket); var B = this; this.playTicket = setTimeout(function() { B._setCurrentOption() }, 200) } return !0 }, __ondragend: function() { this.isDragend = !0 }, ondragend: function(a, d) { this.isDragend && a.target && (!this.timelineOption.realtime && this._setCurrentOption(), d.dragOut = !0, d.dragIn = !0, d.needRefresh = !1, this.isDragend = !1, this._syncHandleShape()) }, last: function() { return this.timelineOption.autoPlay && this.stop(), this.currentIndex -= 1, this.currentIndex < 0 && (this.currentIndex = this.timelineOption.data.length - 1), this._onFrame(), this.currentIndex }, next: function() { return this.timelineOption.autoPlay && this.stop(), this.currentIndex += 1, this.currentIndex >= this.timelineOption.data.length && (this.currentIndex = 0), this._onFrame(), this.currentIndex }, play: function(a, d) { return this._ctrPlayShape && "playing" != this._ctrPlayShape.style.status && (this._ctrPlayShape.style.status = "playing", this.zr.modShape(this._ctrPlayShape.id), this.zr.refreshNextFrame()), this.timelineOption.autoPlay = null != d ? d : !0, this.timelineOption.autoPlay || clearTimeout(this.playTicket), this.currentIndex = null != a ? a : this.currentIndex + 1, this.currentIndex >= this.timelineOption.data.length && (this.currentIndex = 0), this._onFrame(), this.currentIndex }, stop: function() { return this._ctrPlayShape && "stop" != this._ctrPlayShape.style.status && (this._ctrPlayShape.style.status = "stop", this.zr.modShape(this._ctrPlayShape.id), this.zr.refreshNextFrame()), this.timelineOption.autoPlay = !1, clearTimeout(this.playTicket), this.currentIndex }, resize: function() { this.timelineOption.show && (this.clear(), this._buildShape(), this._syncHandleShape()) }, setTheme: function(a) { this.timelineOption = this.reformOption(p.clone(this.option.timeline)), this.timelineOption.label.textStyle = this.getTextStyle(this.timelineOption.label.textStyle), this.timelineOption.checkpointStyle.label.textStyle = this.getTextStyle(this.timelineOption.checkpointStyle.label.textStyle), this.myChart.canvasSupported || (this.timelineOption.realtime = !1), this.timelineOption.show && a && (this.clear(), this._buildShape(), this._syncHandleShape()) }, onbeforDispose: function() { clearTimeout(this.playTicket) } }, u.prototype.iconLibrary.timelineControl = m, p.inherits(x, q), f("../component").define("timeline", x), x }), define("zrender/shape/Image", ["require", "./Base", "../tool/util"], function(a) { var c = a("./Base") , b = function(d) { c.call(this, d) }; return b.prototype = { type: "image", brush: function(v, F, x) { var A = this.style || {}; F && (A = this.getHighlightStyle(A, this.highlightStyle || {})); var f = A.image , B = this; if (this._imageCache || (this._imageCache = {}), "string" == typeof f) { var D = f; this._imageCache[D] ? f = this._imageCache[D] : (f = new Image, f.onload = function() { f.onload = null, B.modSelf(), x() } , f.src = D, this._imageCache[D] = f) } if (f) { if ("IMG" == f.nodeName.toUpperCase()) { if (window.ActiveXObject) { if ("complete" != f.readyState) { return } } else { if (!f.complete) { return } } } var E = A.width || f.width , y = A.height || f.height , w = A.x , q = A.y; if (!f.width || !f.height) { return } if (v.save(), this.doClip(v), this.setContext(v, A), this.setTransform(v), A.sWidth && A.sHeight) { var j = A.sx || 0 , z = A.sy || 0; v.drawImage(f, j, z, A.sWidth, A.sHeight, w, q, E, y) } else { if (A.sx && A.sy) { var j = A.sx , z = A.sy , C = E - j , G = y - z; v.drawImage(f, j, z, C, G, w, q, E, y) } else { v.drawImage(f, w, q, E, y) } } A.width || (A.width = E), A.height || (A.height = y), this.style.width || (this.style.width = E), this.style.height || (this.style.height = y), this.drawText(v, A, this.style), v.restore() } }, getRect: function(d) { return { x: d.x, y: d.y, width: d.width, height: d.height } }, clearCache: function() { this._imageCache = {} } }, a("../tool/util").inherits(b, c), b }), define("zrender/loadingEffect/Bar", ["require", "./Base", "../tool/util", "../tool/color", "../shape/Rectangle"], function(c) { function j(a) { d.call(this, a) } var d = c("./Base") , f = c("../tool/util") , b = c("../tool/color") , h = c("../shape/Rectangle"); return f.inherits(j, d), j.prototype._start = function(a, u) { var n = f.merge(this.options, { textStyle: { color: "#888" }, backgroundColor: "rgba(250, 250, 250, 0.8)", effectOption: { x: 0, y: this.canvasHeight / 2 - 30, width: this.canvasWidth, height: 5, brushType: "fill", timeInterval: 100 } }) , p = this.createTextShape(n.textStyle) , q = this.createBackgroundShape(n.backgroundColor) , o = n.effectOption , m = new h({ highlightStyle: f.clone(o) }); return m.highlightStyle.color = o.color || b.getLinearGradient(o.x, o.y, o.x + o.width, o.y + o.height, [[0, "#ff6400"], [0.5, "#ffe100"], [1, "#b1ff00"]]), null != n.progress ? (a(q), m.highlightStyle.width = this.adjust(n.progress, [0, 1]) * n.effectOption.width, a(m), a(p), void u()) : (m.highlightStyle.width = 0, setInterval(function() { a(q), m.highlightStyle.width < o.width ? m.highlightStyle.width += 8 : m.highlightStyle.width = 0, a(m), a(p), u() }, o.timeInterval)) } , j }), define("zrender/loadingEffect/Bubble", ["require", "./Base", "../tool/util", "../tool/color", "../shape/Circle"], function(c) { function j(a) { d.call(this, a) } var d = c("./Base") , f = c("../tool/util") , b = c("../tool/color") , h = c("../shape/Circle"); return f.inherits(j, d), j.prototype._start = function(o, B) { for (var v = f.merge(this.options, { textStyle: { color: "#888" }, backgroundColor: "rgba(250, 250, 250, 0.8)", effect: { n: 50, lineWidth: 2, brushType: "stroke", color: "random", timeInterval: 100 } }), z = this.createTextShape(v.textStyle), A = this.createBackgroundShape(v.backgroundColor), w = v.effect, q = w.n, n = w.brushType, a = w.lineWidth, x = [], y = this.canvasWidth, C = this.canvasHeight, E = 0; q > E; E++) { var D = "random" == w.color ? b.alpha(b.random(), 0.3) : w.color; x[E] = new h({ highlightStyle: { x: Math.ceil(Math.random() * y), y: Math.ceil(Math.random() * C), r: Math.ceil(40 * Math.random()), brushType: n, color: D, strokeColor: D, lineWidth: a }, animationY: Math.ceil(20 * Math.random()) }) } return setInterval(function() { o(A); for (var e = 0; q > e; e++) { var l = x[e].highlightStyle; l.y - x[e].animationY + l.r <= 0 && (x[e].highlightStyle.y = C + l.r, x[e].highlightStyle.x = Math.ceil(Math.random() * y)), x[e].highlightStyle.y -= x[e].animationY, o(x[e]) } o(z), B() }, w.timeInterval) } , j }), define("zrender/loadingEffect/DynamicLine", ["require", "./Base", "../tool/util", "../tool/color", "../shape/Line"], function(c) { function j(a) { d.call(this, a) } var d = c("./Base") , f = c("../tool/util") , b = c("../tool/color") , h = c("../shape/Line"); return f.inherits(j, d), j.prototype._start = function(o, D) { for (var x = f.merge(this.options, { textStyle: { color: "#fff" }, backgroundColor: "rgba(0, 0, 0, 0.8)", effectOption: { n: 30, lineWidth: 1, color: "random", timeInterval: 100 } }), B = this.createTextShape(x.textStyle), C = this.createBackgroundShape(x.backgroundColor), y = x.effectOption, w = y.n, n = y.lineWidth, a = [], z = this.canvasWidth, A = this.canvasHeight, E = 0; w > E; E++) { var G = -Math.ceil(1000 * Math.random()) , F = Math.ceil(400 * Math.random()) , v = Math.ceil(Math.random() * A) , q = "random" == y.color ? b.random() : y.color; a[E] = new h({ highlightStyle: { xStart: G, yStart: v, xEnd: G + F, yEnd: v, strokeColor: q, lineWidth: n }, animationX: Math.ceil(100 * Math.random()), len: F }) } return setInterval(function() { o(C); for (var e = 0; w > e; e++) { var l = a[e].highlightStyle; l.xStart >= z && (a[e].len = Math.ceil(400 * Math.random()), l.xStart = -400, l.xEnd = -400 + a[e].len, l.yStart = Math.ceil(Math.random() * A), l.yEnd = l.yStart), l.xStart += a[e].animationX, l.xEnd += a[e].animationX, o(a[e]) } o(B), D() }, y.timeInterval) } , j }), define("zrender/loadingEffect/Ring", ["require", "./Base", "../tool/util", "../tool/color", "../shape/Ring", "../shape/Sector"], function(c) { function l(a) { d.call(this, a) } var d = c("./Base") , f = c("../tool/util") , b = c("../tool/color") , h = c("../shape/Ring") , j = c("../shape/Sector"); return f.inherits(l, d), l.prototype._start = function(r, G) { var A = f.merge(this.options, { textStyle: { color: "#07a" }, backgroundColor: "rgba(250, 250, 250, 0.8)", effect: { x: this.canvasWidth / 2, y: this.canvasHeight / 2, r0: 60, r: 100, color: "#bbdcff", brushType: "fill", textPosition: "inside", textFont: "normal 30px verdana", textColor: "rgba(30, 144, 255, 0.6)", timeInterval: 100 } }) , F = A.effect , C = A.textStyle; null == C.x && (C.x = F.x), null == C.y && (C.y = F.y + (F.r0 + F.r) / 2 - 5); for (var z = this.createTextShape(A.textStyle), q = this.createBackgroundShape(A.backgroundColor), o = F.x, D = F.y, E = F.r0 + 6, H = F.r - 6, J = F.color, I = b.lift(J, 0.1), w = new h({ highlightStyle: f.clone(F) }), v = [], L = b.getGradientColors(["#ff6400", "#ffe100", "#97ff00"], 25), n = 15, a = 240, K = 0; 16 > K; K++) { v.push(new j({ highlightStyle: { x: o, y: D, r0: E, r: H, startAngle: a - n, endAngle: a, brushType: "fill", color: I }, _color: b.getLinearGradient(o + E * Math.cos(a, !0), D - E * Math.sin(a, !0), o + E * Math.cos(a - n, !0), D - E * Math.sin(a - n, !0), [[0, L[2 * K]], [1, L[2 * K + 1]]]) })), a -= n } a = 360; for (var K = 0; 4 > K; K++) { v.push(new j({ highlightStyle: { x: o, y: D, r0: E, r: H, startAngle: a - n, endAngle: a, brushType: "fill", color: I }, _color: b.getLinearGradient(o + E * Math.cos(a, !0), D - E * Math.sin(a, !0), o + E * Math.cos(a - n, !0), D - E * Math.sin(a - n, !0), [[0, L[2 * K + 32]], [1, L[2 * K + 33]]]) })), a -= n } var B = 0; if (null != A.progress) { r(q), B = 100 * this.adjust(A.progress, [0, 1]).toFixed(2) / 5, w.highlightStyle.text = 5 * B + "%", r(w); for (var K = 0; 20 > K; K++) { v[K].highlightStyle.color = B > K ? v[K]._color : I, r(v[K]) } return r(z), void G() } return setInterval(function() { r(q), B += B >= 20 ? -20 : 1, r(w); for (var e = 0; 20 > e; e++) { v[e].highlightStyle.color = B > e ? v[e]._color : I, r(v[e]) } r(z), G() }, F.timeInterval) } , l }), define("zrender/loadingEffect/Spin", ["require", "./Base", "../tool/util", "../tool/color", "../tool/area", "../shape/Sector"], function(c) { function l(a) { d.call(this, a) } var d = c("./Base") , f = c("../tool/util") , b = c("../tool/color") , h = c("../tool/area") , j = c("../shape/Sector"); return f.inherits(l, d), l.prototype._start = function(r, G) { var A = f.merge(this.options, { textStyle: { color: "#fff", textAlign: "start" }, backgroundColor: "rgba(0, 0, 0, 0.8)" }) , F = this.createTextShape(A.textStyle) , C = 10 , z = h.getTextWidth(F.highlightStyle.text, F.highlightStyle.textFont) , q = h.getTextHeight(F.highlightStyle.text, F.highlightStyle.textFont) , o = f.merge(this.options.effect || {}, { r0: 9, r: 15, n: 18, color: "#fff", timeInterval: 100 }) , D = this.getLocation(this.options.textStyle, z + C + 2 * o.r, Math.max(2 * o.r, q)); o.x = D.x + o.r, o.y = F.highlightStyle.y = D.y + D.height / 2, F.highlightStyle.x = o.x + o.r + C; for (var E = this.createBackgroundShape(A.backgroundColor), H = o.n, J = o.x, I = o.y, w = o.r0, v = o.r, L = o.color, n = [], a = Math.round(180 / H), K = 0; H > K; K++) { n[K] = new j({ highlightStyle: { x: J, y: I, r0: w, r: v, startAngle: a * K * 2, endAngle: a * K * 2 + a, color: b.alpha(L, (K + 1) / H), brushType: "fill" } }) } var B = [0, J, I]; return setInterval(function() { r(E), B[0] -= 0.3; for (var e = 0; H > e; e++) { n[e].rotation = B, r(n[e]) } r(F), G() }, o.timeInterval) } , l }), define("zrender/loadingEffect/Whirling", ["require", "./Base", "../tool/util", "../tool/area", "../shape/Ring", "../shape/Droplet", "../shape/Circle"], function(c) { function m(a) { d.call(this, a) } var d = c("./Base") , f = c("../tool/util") , b = c("../tool/area") , h = c("../shape/Ring") , j = c("../shape/Droplet") , l = c("../shape/Circle"); return f.inherits(m, d), m.prototype._start = function(o, z) { var v = f.merge(this.options, { textStyle: { color: "#888", textAlign: "start" }, backgroundColor: "rgba(250, 250, 250, 0.8)" }) , w = this.createTextShape(v.textStyle) , s = 10 , n = b.getTextWidth(w.highlightStyle.text, w.highlightStyle.textFont) , a = b.getTextHeight(w.highlightStyle.text, w.highlightStyle.textFont) , x = f.merge(this.options.effect || {}, { r: 18, colorIn: "#fff", colorOut: "#555", colorWhirl: "#6cf", timeInterval: 50 }) , y = this.getLocation(this.options.textStyle, n + s + 2 * x.r, Math.max(2 * x.r, a)); x.x = y.x + x.r, x.y = w.highlightStyle.y = y.y + y.height / 2, w.highlightStyle.x = x.x + x.r + s; var A = this.createBackgroundShape(v.backgroundColor) , C = new j({ highlightStyle: { a: Math.round(x.r / 2), b: Math.round(x.r - x.r / 6), brushType: "fill", color: x.colorWhirl } }) , B = new l({ highlightStyle: { r: Math.round(x.r / 6), brushType: "fill", color: x.colorIn } }) , r = new h({ highlightStyle: { r0: Math.round(x.r - x.r / 3), r: x.r, brushType: "fill", color: x.colorOut } }) , q = [0, x.x, x.y]; return C.highlightStyle.x = B.highlightStyle.x = r.highlightStyle.x = q[1], C.highlightStyle.y = B.highlightStyle.y = r.highlightStyle.y = q[2], setInterval(function() { o(A), o(r), q[0] -= 0.3, C.rotation = q, o(C), o(B), o(w), z() }, x.timeInterval) } , m }), define("echarts/theme/macarons", [], function() { var a = { color: ["#2ec7c9", "#b6a2de", "#5ab1ef", "#ffb980", "#d87a80", "#8d98b3", "#e5cf0d", "#97b552", "#95706d", "#dc69aa", "#07a2a4", "#9a7fd1", "#588dd5", "#f5994e", "#c05050", "#59678c", "#c9ab00", "#7eb00a", "#6f5553", "#c14089"], title: { textStyle: { fontWeight: "normal", color: "#008acd" } }, dataRange: { itemWidth: 15, color: ["#5ab1ef", "#e0ffff"] }, toolbox: { color: ["#1e90ff", "#1e90ff", "#1e90ff", "#1e90ff"], effectiveColor: "#ff4500" }, tooltip: { backgroundColor: "rgba(50,50,50,0.5)", axisPointer: { type: "line", lineStyle: { color: "#008acd" }, crossStyle: { color: "#008acd" }, shadowStyle: { color: "rgba(200,200,200,0.2)" } } }, dataZoom: { dataBackgroundColor: "#efefff", fillerColor: "rgba(182,162,222,0.2)", handleColor: "#008acd" }, grid: { borderColor: "#eee" }, categoryAxis: { axisLine: { lineStyle: { color: "#008acd" } }, splitLine: { lineStyle: { color: ["#eee"] } } }, valueAxis: { axisLine: { lineStyle: { color: "#008acd" } }, splitArea: { show: !0, areaStyle: { color: ["rgba(250,250,250,0.1)", "rgba(200,200,200,0.1)"] } }, splitLine: { lineStyle: { color: ["#eee"] } } }, polar: { axisLine: { lineStyle: { color: "#ddd" } }, splitArea: { show: !0, areaStyle: { color: ["rgba(250,250,250,0.2)", "rgba(200,200,200,0.2)"] } }, splitLine: { lineStyle: { color: "#ddd" } } }, timeline: { lineStyle: { color: "#008acd" }, controlStyle: { normal: { color: "#008acd" }, emphasis: { color: "#008acd" } }, symbol: "emptyCircle", symbolSize: 3 }, bar: { itemStyle: { normal: { barBorderRadius: 5 }, emphasis: { barBorderRadius: 5 } } }, line: { smooth: !0, symbol: "emptyCircle", symbolSize: 3 }, k: { itemStyle: { normal: { color: "#d87a80", color0: "#2ec7c9", lineStyle: { color: "#d87a80", color0: "#2ec7c9" } } } }, scatter: { symbol: "circle", symbolSize: 4 }, radar: { symbol: "emptyCircle", symbolSize: 3 }, map: { itemStyle: { normal: { areaStyle: { color: "#ddd" }, label: { textStyle: { color: "#d87a80" } } }, emphasis: { areaStyle: { color: "#fe994e" } } } }, force: { itemStyle: { normal: { linkStyle: { color: "#1e90ff" } } } }, chord: { itemStyle: { normal: { borderWidth: 1, borderColor: "rgba(128, 128, 128, 0.5)", chordStyle: { lineStyle: { color: "rgba(128, 128, 128, 0.5)" } } }, emphasis: { borderWidth: 1, borderColor: "rgba(128, 128, 128, 0.5)", chordStyle: { lineStyle: { color: "rgba(128, 128, 128, 0.5)" } } } } }, gauge: { axisLine: { lineStyle: { color: [[0.2, "#2ec7c9"], [0.8, "#5ab1ef"], [1, "#d87a80"]], width: 10 } }, axisTick: { splitNumber: 10, length: 15, lineStyle: { color: "auto" } }, splitLine: { length: 22, lineStyle: { color: "auto" } }, pointer: { width: 5 } }, textStyle: { fontFamily: "微软雅黑, Arial, Verdana, sans-serif" } }; return a }), define("echarts/theme/infographic", [], function() { var a = { color: ["#C1232B", "#B5C334", "#FCCE10", "#E87C25", "#27727B", "#FE8463", "#9BCA63", "#FAD860", "#F3A43B", "#60C0DD", "#D7504B", "#C6E579", "#F4E001", "#F0805A", "#26C0C0"], title: { textStyle: { fontWeight: "normal", color: "#27727B" } }, dataRange: { x: "right", y: "center", itemWidth: 5, itemHeight: 25, color: ["#C1232B", "#FCCE10"] }, toolbox: { color: ["#C1232B", "#B5C334", "#FCCE10", "#E87C25", "#27727B", "#FE8463", "#9BCA63", "#FAD860", "#F3A43B", "#60C0DD"], effectiveColor: "#ff4500" }, tooltip: { backgroundColor: "rgba(50,50,50,0.5)", axisPointer: { type: "line", lineStyle: { color: "#27727B", type: "dashed" }, crossStyle: { color: "#27727B" }, shadowStyle: { color: "rgba(200,200,200,0.3)" } } }, dataZoom: { dataBackgroundColor: "rgba(181,195,52,0.3)", fillerColor: "rgba(181,195,52,0.2)", handleColor: "#27727B" }, grid: { borderWidth: 0 }, categoryAxis: { axisLine: { lineStyle: { color: "#27727B" } }, splitLine: { show: !1 } }, valueAxis: { axisLine: { show: !1 }, splitArea: { show: !1 }, splitLine: { lineStyle: { color: ["#ccc"], type: "dashed" } } }, polar: { axisLine: { lineStyle: { color: "#ddd" } }, splitArea: { show: !0, areaStyle: { color: ["rgba(250,250,250,0.2)", "rgba(200,200,200,0.2)"] } }, splitLine: { lineStyle: { color: "#ddd" } } }, timeline: { lineStyle: { color: "#27727B" }, controlStyle: { normal: { color: "#27727B" }, emphasis: { color: "#27727B" } }, symbol: "emptyCircle", symbolSize: 3 }, line: { itemStyle: { normal: { borderWidth: 2, borderColor: "#fff", lineStyle: { width: 3 } }, emphasis: { borderWidth: 0 } }, symbol: "circle", symbolSize: 3.5 }, k: { itemStyle: { normal: { color: "#C1232B", color0: "#B5C334", lineStyle: { width: 1, color: "#C1232B", color0: "#B5C334" } } } }, scatter: { itemStyle: { normal: { borderWidth: 1, borderColor: "rgba(200,200,200,0.5)" }, emphasis: { borderWidth: 0 } }, symbol: "star4", symbolSize: 4 }, radar: { symbol: "emptyCircle", symbolSize: 3 }, map: { itemStyle: { normal: { areaStyle: { color: "#ddd" }, label: { textStyle: { color: "#C1232B" } } }, emphasis: { areaStyle: { color: "#fe994e" }, label: { textStyle: { color: "rgb(100,0,0)" } } } } }, force: { itemStyle: { normal: { linkStyle: { color: "#27727B" } } } }, chord: { itemStyle: { normal: { borderWidth: 1, borderColor: "rgba(128, 128, 128, 0.5)", chordStyle: { lineStyle: { color: "rgba(128, 128, 128, 0.5)" } } }, emphasis: { borderWidth: 1, borderColor: "rgba(128, 128, 128, 0.5)", chordStyle: { lineStyle: { color: "rgba(128, 128, 128, 0.5)" } } } } }, gauge: { center: ["50%", "80%"], radius: "100%", startAngle: 180, endAngle: 0, axisLine: { show: !0, lineStyle: { color: [[0.2, "#B5C334"], [0.8, "#27727B"], [1, "#C1232B"]], width: "40%" } }, axisTick: { splitNumber: 2, length: 5, lineStyle: { color: "#fff" } }, axisLabel: { textStyle: { color: "#fff", fontWeight: "bolder" } }, splitLine: { length: "5%", lineStyle: { color: "#fff" } }, pointer: { width: "40%", length: "80%", color: "#fff" }, title: { offsetCenter: [0, -20], textStyle: { color: "auto", fontSize: 20 } }, detail: { offsetCenter: [0, 0], textStyle: { color: "auto", fontSize: 40 } } }, textStyle: { fontFamily: "微软雅黑, Arial, Verdana, sans-serif" } }; return a }), define("zrender/dep/excanvas", ["require"], function() { return document.createElement("canvas").getContext ? G_vmlCanvasManager = !1 : !function() { function ai() { return this.context_ || (this.context_ = new ac(this)) } function aM(a, c) { var b = aD.call(arguments, 2); return function() { return a.apply(c, b.concat(aD.call(arguments))) } } function aq(a) { return String(a).replace(/&/g, "&").replace(/"/g, """) } function aA(a, c, b) { a.namespaces[c] || a.namespaces.add(c, b, "#default#VML") } function aa(a) { if (aA(a, "g_vml_", "urn:schemas-microsoft-com:vml"), aA(a, "g_o_", "urn:schemas-microsoft-com:office:office"), !a.styleSheets.ex_canvas_) { var b = a.createStyleSheet(); b.owningElement.id = "ex_canvas_", b.cssText = "canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}" } } function aC(a) { var b = a.srcElement; switch (a.propertyName) { case "width": b.getContext().clearRect(), b.style.width = b.attributes.width.nodeValue + "px", b.firstChild.style.width = b.clientWidth + "px"; break; case "height": b.getContext().clearRect(), b.style.height = b.attributes.height.nodeValue + "px", b.firstChild.style.height = b.clientHeight + "px" } } function aI(a) { var b = a.srcElement; b.firstChild && (b.firstChild.style.width = b.clientWidth + "px", b.firstChild.style.height = b.clientHeight + "px") } function aK() { return [[1, 0, 0], [0, 1, 0], [0, 0, 1]] } function aw(c, m) { for (var d = aK(), f = 0; 3 > f; f++) { for (var b = 0; 3 > b; b++) { for (var h = 0, l = 0; 3 > l; l++) { h += c[f][l] * m[l][b] } d[f][b] = h } } return d } function ao(a, b) { b.fillStyle = a.fillStyle, b.lineCap = a.lineCap, b.lineJoin = a.lineJoin, b.lineWidth = a.lineWidth, b.miterLimit = a.miterLimit, b.shadowBlur = a.shadowBlur, b.shadowColor = a.shadowColor, b.shadowOffsetX = a.shadowOffsetX, b.shadowOffsetY = a.shadowOffsetY, b.strokeStyle = a.strokeStyle, b.globalAlpha = a.globalAlpha, b.font = a.font, b.textAlign = a.textAlign, b.textBaseline = a.textBaseline, b.scaleX_ = a.scaleX_, b.scaleY_ = a.scaleY_, b.lineScale_ = a.lineScale_ } function ag(a) { var d = a.indexOf("(", 3) , b = a.indexOf(")", d + 1) , c = a.substring(d + 1, b).split(","); return (4 != c.length || "a" != a.charAt(3)) && (c[3] = 1), c } function ae(a) { return parseFloat(a) / 100 } function ay(a, c, b) { return Math.min(b, Math.max(c, a)) } function aE(c) { var u, d, h, b, m, p; if (b = parseFloat(c[0]) / 360 % 360, 0 > b && b++, m = ay(ae(c[1]), 0, 1), p = ay(ae(c[2]), 0, 1), 0 == m) { u = d = h = p } else { var q = 0.5 > p ? p * (1 + m) : p + m - p * m , f = 2 * p - q; u = aO(f, q, b + 1 / 3), d = aO(f, q, b), h = aO(f, q, b - 1 / 3) } return "#" + ah[Math.floor(255 * u)] + ah[Math.floor(255 * d)] + ah[Math.floor(255 * h)] } function aO(a, c, b) { return 0 > b && b++, b > 1 && b--, 1 > 6 * b ? a + 6 * (c - a) * b : 1 > 2 * b ? c : 2 > 3 * b ? a + (c - a) * (2 / 3 - b) * 6 : a } function aR(c) { if (c in aJ) { return aJ[c] } var l, d = 1; if (c = String(c), "#" == c.charAt(0)) { l = c } else { if (/^rgb/.test(c)) { for (var f, b = ag(c), l = "#", h = 0; 3 > h; h++) { f = -1 != b[h].indexOf("%") ? Math.floor(255 * ae(b[h])) : +b[h], l += ah[ay(f, 0, 255)] } d = +b[3] } else { if (/^hsl/.test(c)) { var b = ag(c); l = aE(b), d = b[3] } else { l = ap[c] || c } } } return aJ[c] = { color: l, alpha: d } } function aP(c) { if (aX[c]) { return aX[c] } var h, d = document.createElement("div"), f = d.style; try { f.font = c, h = f.fontFamily.split(",")[0] } catch (b) {} return aX[c] = { style: f.fontStyle || an.style, variant: f.fontVariant || an.variant, weight: f.fontWeight || an.weight, size: f.fontSize || an.size, family: h || an.family } } function am(c, l) { var d = {}; for (var f in c) { d[f] = c[f] } var b = parseFloat(l.currentStyle.fontSize) , h = parseFloat(c.size); return d.size = "number" == typeof c.size ? c.size : -1 != c.size.indexOf("px") ? h : -1 != c.size.indexOf("em") ? b * h : -1 != c.size.indexOf("%") ? b / 100 * h : -1 != c.size.indexOf("pt") ? h / 0.75 : b, d } function ak(a) { return a.style + " " + a.variant + " " + a.weight + " " + a.size + "px '" + a.family + "'" } function aW(a) { return aZ[a] || "square" } function ac(a) { this.m_ = aK(), this.mStack_ = [], this.aStack_ = [], this.currentPath_ = [], this.strokeStyle = "#000", this.fillStyle = "#000", this.lineWidth = 1, this.lineJoin = "miter", this.lineCap = "butt", this.miterLimit = 1 * al, this.globalAlpha = 1, this.font = "12px 微软雅黑", this.textAlign = "left", this.textBaseline = "alphabetic", this.canvas = a; var d = "width:" + a.clientWidth + "px;height:" + a.clientHeight + "px;overflow:hidden;position:absolute" , b = a.ownerDocument.createElement("div"); b.style.cssText = d, a.appendChild(b); var c = b.cloneNode(!1); c.style.backgroundColor = "#fff", c.style.filter = "alpha(opacity=0)", a.appendChild(c), this.element_ = b, this.scaleX_ = 1, this.scaleY_ = 1, this.lineScale_ = 1 } function j(a, d, b, c) { a.currentPath_.push({ type: "bezierCurveTo", cp1x: d.x, cp1y: d.y, cp2x: b.x, cp2y: b.y, x: c.x, y: c.y }), a.currentX_ = c.x, a.currentY_ = c.y } function aU(c, l) { var d = aR(c.strokeStyle) , f = d.color , b = d.alpha * c.globalAlpha , h = c.lineScale_ * c.lineWidth; 1 > h && (b *= h), l.push("') } function au(G, bc, V, a4) { var v = G.fillStyle , a5 = G.scaleX_ , a9 = G.scaleY_ , ba = a4.x - V.x , a0 = a4.y - V.y; if (v instanceof aT) { var R = 0 , F = { x: 0, y: 0 } , D = 0 , a2 = 1; if ("gradient" == v.type_) { var a7 = v.x0_ / a5 , be = v.y0_ / a9 , bf = v.x1_ / a5 , Q = v.y1_ / a9 , N = aQ(G, a7, be) , bi = aQ(G, bf, Q) , C = bi.x - N.x , q = bi.y - N.y; R = 180 * Math.atan2(C, q) / Math.PI, 0 > R && (R += 360), 1e-06 > R && (R = 0) } else { var N = aQ(G, v.x0_, v.y0_); F = { x: (N.x - V.x) / ba, y: (N.y - V.y) / a0 }, ba /= a5 * al, a0 /= a9 * al; var bh = af.max(ba, a0); D = 2 * v.r0_ / bh, a2 = 2 * v.r1_ / bh - D } var Y = v.colors_; Y.sort(function(a, b) { return a.offset - b.offset }); for (var a1 = Y.length, bg = Y[0].color, W = Y[a1 - 1].color, bb = Y[0].alpha * G.globalAlpha, Z = Y[a1 - 1].alpha * G.globalAlpha, bd = [], H = 0; a1 > H; H++) { var bj = Y[H]; bd.push(bj.offset * a2 + D + " " + bj.color) } bc.push('') } else { if (v instanceof aV) { if (ba && a0) { var B = -V.x , a3 = -V.y; bc.push("') } } else { var X = aR(G.fillStyle) , a6 = X.color , a8 = X.alpha * G.globalAlpha; bc.push('') } } } function aQ(a, d, b) { var c = a.m_; return { x: al * (d * c[0][0] + b * c[1][0] + c[2][0]) - at, y: al * (d * c[0][1] + b * c[1][1] + c[2][1]) - at } } function ax(a) { return isFinite(a[0][0]) && isFinite(a[0][1]) && isFinite(a[1][0]) && isFinite(a[1][1]) && isFinite(a[2][0]) && isFinite(a[2][1]) } function aS(a, d, b) { if (ax(d) && (a.m_ = d, a.scaleX_ = Math.sqrt(d[0][0] * d[0][0] + d[0][1] * d[0][1]), a.scaleY_ = Math.sqrt(d[1][0] * d[1][0] + d[1][1] * d[1][1]), b)) { var c = d[0][0] * d[1][1] - d[0][1] * d[1][0]; a.lineScale_ = az(ab(c)) } } function aT(a) { this.type_ = a, this.x0_ = 0, this.y0_ = 0, this.r0_ = 0, this.x1_ = 0, this.y1_ = 0, this.r1_ = 0, this.colors_ = [] } function aV(a, b) { switch (aL(a), b) { case "repeat": case null: case "": this.repetition_ = "repeat"; break; case "repeat-x": case "repeat-y": case "no-repeat": this.repetition_ = b; break; default: ar("SYNTAX_ERR") } this.src_ = a.src, this.width_ = a.width, this.height_ = a.height } function ar(a) { throw new av(a) } function aL(a) { a && 1 == a.nodeType && "IMG" == a.tagName || ar("TYPE_MISMATCH_ERR"), "complete" != a.readyState && ar("INVALID_STATE_ERR") } function av(a) { this.code = this[a], this.message = a + ": DOM Exception " + this.code } var af = Math , aN = af.round , aj = af.sin , aY = af.cos , ab = af.abs , az = af.sqrt , al = 10 , at = al / 2 , aD = (+navigator.userAgent.match(/MSIE ([\d.]+)?/)[1], Array.prototype.slice); aa(document); var aF = { init: function(a) { var b = a || document; b.createElement("canvas"), b.attachEvent("onreadystatechange", aM(this.init_, this, b)) }, init_: function(a) { for (var c = a.getElementsByTagName("canvas"), b = 0; b < c.length; b++) { this.initElement(c[b]) } }, initElement: function(b) { if (!b.getContext) { b.getContext = ai, aa(b.ownerDocument), b.innerHTML = "", b.attachEvent("onpropertychange", aC), b.attachEvent("onresize", aI); var a = b.attributes; a.width && a.width.specified ? b.style.width = a.width.nodeValue + "px" : b.width = b.clientWidth, a.height && a.height.specified ? b.style.height = a.height.nodeValue + "px" : b.height = b.clientHeight } return b } }; aF.init(); for (var ah = [], aB = 0; 16 > aB; aB++) { for (var ad = 0; 16 > ad; ad++) { ah[16 * aB + ad] = aB.toString(16) + ad.toString(16) } } var ap = { aliceblue: "#F0F8FF", antiquewhite: "#FAEBD7", aquamarine: "#7FFFD4", azure: "#F0FFFF", beige: "#F5F5DC", bisque: "#FFE4C4", black: "#000000", blanchedalmond: "#FFEBCD", blueviolet: "#8A2BE2", brown: "#A52A2A", burlywood: "#DEB887", cadetblue: "#5F9EA0", chartreuse: "#7FFF00", chocolate: "#D2691E", coral: "#FF7F50", cornflowerblue: "#6495ED", cornsilk: "#FFF8DC", crimson: "#DC143C", cyan: "#00FFFF", darkblue: "#00008B", darkcyan: "#008B8B", darkgoldenrod: "#B8860B", darkgray: "#A9A9A9", darkgreen: "#006400", darkgrey: "#A9A9A9", darkkhaki: "#BDB76B", darkmagenta: "#8B008B", darkolivegreen: "#556B2F", darkorange: "#FF8C00", darkorchid: "#9932CC", darkred: "#8B0000", darksalmon: "#E9967A", darkseagreen: "#8FBC8F", darkslateblue: "#483D8B", darkslategray: "#2F4F4F", darkslategrey: "#2F4F4F", darkturquoise: "#00CED1", darkviolet: "#9400D3", deeppink: "#FF1493", deepskyblue: "#00BFFF", dimgray: "#696969", dimgrey: "#696969", dodgerblue: "#1E90FF", firebrick: "#B22222", floralwhite: "#FFFAF0", forestgreen: "#228B22", gainsboro: "#DCDCDC", ghostwhite: "#F8F8FF", gold: "#FFD700", goldenrod: "#DAA520", grey: "#808080", greenyellow: "#ADFF2F", honeydew: "#F0FFF0", hotpink: "#FF69B4", indianred: "#CD5C5C", indigo: "#4B0082", ivory: "#FFFFF0", khaki: "#F0E68C", lavender: "#E6E6FA", lavenderblush: "#FFF0F5", lawngreen: "#7CFC00", lemonchiffon: "#FFFACD", lightblue: "#ADD8E6", lightcoral: "#F08080", lightcyan: "#E0FFFF", lightgoldenrodyellow: "#FAFAD2", lightgreen: "#90EE90", lightgrey: "#D3D3D3", lightpink: "#FFB6C1", lightsalmon: "#FFA07A", lightseagreen: "#20B2AA", lightskyblue: "#87CEFA", lightslategray: "#778899", lightslategrey: "#778899", lightsteelblue: "#B0C4DE", lightyellow: "#FFFFE0", limegreen: "#32CD32", linen: "#FAF0E6", magenta: "#FF00FF", mediumaquamarine: "#66CDAA", mediumblue: "#0000CD", mediumorchid: "#BA55D3", mediumpurple: "#9370DB", mediumseagreen: "#3CB371", mediumslateblue: "#7B68EE", mediumspringgreen: "#00FA9A", mediumturquoise: "#48D1CC", mediumvioletred: "#C71585", midnightblue: "#191970", mintcream: "#F5FFFA", mistyrose: "#FFE4E1", moccasin: "#FFE4B5", navajowhite: "#FFDEAD", oldlace: "#FDF5E6", olivedrab: "#6B8E23", orange: "#FFA500", orangered: "#FF4500", orchid: "#DA70D6", palegoldenrod: "#EEE8AA", palegreen: "#98FB98", paleturquoise: "#AFEEEE", palevioletred: "#DB7093", papayawhip: "#FFEFD5", peachpuff: "#FFDAB9", peru: "#CD853F", pink: "#FFC0CB", plum: "#DDA0DD", powderblue: "#B0E0E6", rosybrown: "#BC8F8F", royalblue: "#4169E1", saddlebrown: "#8B4513", salmon: "#FA8072", sandybrown: "#F4A460", seagreen: "#2E8B57", seashell: "#FFF5EE", sienna: "#A0522D", skyblue: "#87CEEB", slateblue: "#6A5ACD", slategray: "#708090", slategrey: "#708090", snow: "#FFFAFA", springgreen: "#00FF7F", steelblue: "#4682B4", tan: "#D2B48C", thistle: "#D8BFD8", tomato: "#FF6347", turquoise: "#40E0D0", violet: "#EE82EE", wheat: "#F5DEB3", whitesmoke: "#F5F5F5", yellowgreen: "#9ACD32" } , aJ = {} , an = { style: "normal", variant: "normal", weight: "normal", size: 12, family: "微软雅黑" } , aX = {} , aZ = { butt: "flat", round: "round" } , aH = ac.prototype; aH.clearRect = function() { this.textMeasureEl_ && (this.textMeasureEl_.removeNode(!0), this.textMeasureEl_ = null), this.element_.innerHTML = "" } , aH.beginPath = function() { this.currentPath_ = [] } , aH.moveTo = function(a, c) { var b = aQ(this, a, c); this.currentPath_.push({ type: "moveTo", x: b.x, y: b.y }), this.currentX_ = b.x, this.currentY_ = b.y } , aH.lineTo = function(a, c) { var b = aQ(this, a, c); this.currentPath_.push({ type: "lineTo", x: b.x, y: b.y }), this.currentX_ = b.x, this.currentY_ = b.y } , aH.bezierCurveTo = function(c, u, d, h, b, m) { var p = aQ(this, b, m) , q = aQ(this, c, u) , f = aQ(this, d, h); j(this, q, f, p) } , aH.quadraticCurveTo = function(c, p, d, f) { var b = aQ(this, c, p) , h = aQ(this, d, f) , l = { x: this.currentX_ + 2 / 3 * (b.x - this.currentX_), y: this.currentY_ + 2 / 3 * (b.y - this.currentY_) } , m = { x: l.x + (h.x - this.currentX_) / 3, y: l.y + (h.y - this.currentY_) / 3 }; j(this, l, m, h) } , aH.arc = function(u, E, w, z, b, A) { w *= al; var C = A ? "at" : "wa" , D = u + aY(z) * w - at , x = E + aj(z) * w - at , v = u + aY(b) * w - at , q = E + aj(b) * w - at; D != v || A || (D += 0.125); var f = aQ(this, u, E) , y = aQ(this, D, x) , B = aQ(this, v, q); this.currentPath_.push({ type: C, x: f.x, y: f.y, radius: w, xStart: y.x, yStart: y.y, xEnd: B.x, yEnd: B.y }) } , aH.rect = function(a, d, b, c) { this.moveTo(a, d), this.lineTo(a + b, d), this.lineTo(a + b, d + c), this.lineTo(a, d + c), this.closePath() } , aH.strokeRect = function(c, h, d, f) { var b = this.currentPath_; this.beginPath(), this.moveTo(c, h), this.lineTo(c + d, h), this.lineTo(c + d, h + f), this.lineTo(c, h + f), this.closePath(), this.stroke(), this.currentPath_ = b } , aH.fillRect = function(c, h, d, f) { var b = this.currentPath_; this.beginPath(), this.moveTo(c, h), this.lineTo(c + d, h), this.lineTo(c + d, h + f), this.lineTo(c, h + f), this.closePath(), this.fill(), this.currentPath_ = b } , aH.createLinearGradient = function(c, h, d, f) { var b = new aT("gradient"); return b.x0_ = c, b.y0_ = h, b.x1_ = d, b.y1_ = f, b } , aH.createRadialGradient = function(c, m, d, f, b, h) { var l = new aT("gradientradial"); return l.x0_ = c, l.y0_ = m, l.r0_ = d, l.x1_ = f, l.y1_ = b, l.r1_ = h, l } , aH.drawImage = function(B) { var O, F, J, v, K, M, N, H, E = B.runtimeStyle.width, A = B.runtimeStyle.height; B.runtimeStyle.width = "auto", B.runtimeStyle.height = "auto"; var z = B.width , I = B.height; if (B.runtimeStyle.width = E, B.runtimeStyle.height = A, 3 == arguments.length) { O = arguments[1], F = arguments[2], K = M = 0, N = J = z, H = v = I } else { if (5 == arguments.length) { O = arguments[1], F = arguments[2], J = arguments[3], v = arguments[4], K = M = 0, N = z, H = I } else { if (9 != arguments.length) { throw Error("Invalid number of arguments") } K = arguments[1], M = arguments[2], N = arguments[3], H = arguments[4], O = arguments[5], F = arguments[6], J = arguments[7], v = arguments[8] } } var L = aQ(this, O, F) , P = [] , R = 10 , Q = 10 , D = T = 1; if (P.push(" '), (K || M) && P.push('
'), P.push('
'), (K || M) && P.push("
"), P.push("
"), this.element_.insertAdjacentHTML("BeforeEnd", P.join("")) } , aH.stroke = function(c) { var u = [] , d = 10 , h = 10; u.push(" m.x) && (m.x = f.x), (null == b.y || f.y < b.y) && (b.y = f.y), (null == m.y || f.y > m.y) && (m.y = f.y)) } u.push(' ">'), c ? au(this, u, b, m) : aU(this, u), u.push(""), this.element_.insertAdjacentHTML("beforeEnd", u.join("")) } , aH.fill = function() { this.stroke(!0) } , aH.closePath = function() { this.currentPath_.push({ type: "close" }) } , aH.save = function() { var a = {}; ao(this, a), this.aStack_.push(a), this.mStack_.push(this.m_), this.m_ = aw(aK(), this.m_) } , aH.restore = function() { this.aStack_.length && (ao(this.aStack_.pop(), this), this.m_ = this.mStack_.pop()) } , aH.translate = function(a, c) { var b = [[1, 0, 0], [0, 1, 0], [a, c, 1]]; aS(this, aw(b, this.m_), !1) } , aH.rotate = function(a) { var d = aY(a) , b = aj(a) , c = [[d, b, 0], [-b, d, 0], [0, 0, 1]]; aS(this, aw(c, this.m_), !1) } , aH.scale = function(a, c) { var b = [[a, 0, 0], [0, c, 0], [0, 0, 1]]; aS(this, aw(b, this.m_), !0) } , aH.transform = function(c, m, d, f, b, h) { var l = [[c, m, 0], [d, f, 0], [b, h, 1]]; aS(this, aw(l, this.m_), !0) } , aH.setTransform = function(c, m, d, f, b, h) { var l = [[c, m, 0], [d, f, 0], [b, h, 1]]; aS(this, l, !0) } , aH.drawText_ = function(x, H, C, i, D) { var F = this.m_ , G = 1000 , A = 0 , z = G , w = { x: 0, y: 0 } , v = [] , B = am(aP(this.font), this.element_) , E = ak(B) , I = this.element_.currentStyle , J = this.textAlign.toLowerCase(); switch (J) { case "left": case "center": case "right": break; case "end": J = "ltr" == I.direction ? "right" : "left"; break; case "start": J = "rtl" == I.direction ? "right" : "left"; break; default: J = "left" } switch (this.textBaseline) { case "hanging": case "top": w.y = B.size / 1.75; break; case "middle": break; default: case null: case "alphabetic": case "ideographic": case "bottom": w.y = -B.size / 2.25 } switch (J) { case "right": A = G, z = 0.05; break; case "center": A = z = G / 2 } var K = aQ(this, H + w.x, C + w.y); v.push(''), D ? aU(this, v) : au(this, v, { x: -A, y: 0 }, { x: z, y: B.size }); var q = F[0][0].toFixed(3) + "," + F[1][0].toFixed(3) + "," + F[0][1].toFixed(3) + "," + F[1][1].toFixed(3) + ",0,0" , f = aN(K.x / al) + "," + aN(K.y / al); v.push('', '', ''), this.element_.insertAdjacentHTML("beforeEnd", v.join("")) } , aH.fillText = function(a, d, b, c) { this.drawText_(a, d, b, c, !1) } , aH.strokeText = function(a, d, b, c) { this.drawText_(a, d, b, c, !0) } , aH.measureText = function(a) { if (!this.textMeasureEl_) { var d = ''; this.element_.insertAdjacentHTML("beforeEnd", d), this.textMeasureEl_ = this.element_.lastChild } var b = this.element_.ownerDocument; this.textMeasureEl_.innerHTML = ""; try { this.textMeasureEl_.style.font = this.font } catch (c) {} return this.textMeasureEl_.appendChild(b.createTextNode(a)), { width: this.textMeasureEl_.offsetWidth } } , aH.clip = function() {} , aH.arcTo = function() {} , aH.createPattern = function(a, b) { return new aV(a,b) } , aT.prototype.addColorStop = function(a, b) { b = aR(b), this.colors_.push({ offset: a, color: b.color, alpha: b.alpha }) } ; var aG = av.prototype = new Error; aG.INDEX_SIZE_ERR = 1, aG.DOMSTRING_SIZE_ERR = 2, aG.HIERARCHY_REQUEST_ERR = 3, aG.WRONG_DOCUMENT_ERR = 4, aG.INVALID_CHARACTER_ERR = 5, aG.NO_DATA_ALLOWED_ERR = 6, aG.NO_MODIFICATION_ALLOWED_ERR = 7, aG.NOT_FOUND_ERR = 8, aG.NOT_SUPPORTED_ERR = 9, aG.INUSE_ATTRIBUTE_ERR = 10, aG.INVALID_STATE_ERR = 11, aG.SYNTAX_ERR = 12, aG.INVALID_MODIFICATION_ERR = 13, aG.NAMESPACE_ERR = 14, aG.INVALID_ACCESS_ERR = 15, aG.VALIDATION_ERR = 16, aG.TYPE_MISMATCH_ERR = 17, G_vmlCanvasManager = aF, CanvasRenderingContext2D = ac, CanvasGradient = aT, CanvasPattern = aV, DOMException = av }(), G_vmlCanvasManager }), define("zrender/mixin/Eventful", ["require"], function() { var a = function() { this._handlers = {} }; return a.prototype.one = function(b, f, c) { var d = this._handlers; return f && b ? (d[b] || (d[b] = []), d[b].push({ h: f, one: !0, ctx: c || this }), this) : this } , a.prototype.bind = function(b, f, c) { var d = this._handlers; return f && b ? (d[b] || (d[b] = []), d[b].push({ h: f, one: !1, ctx: c || this }), this) : this } , a.prototype.unbind = function(c, j) { var d = this._handlers; if (!c) { return this._handlers = {}, this } if (j) { if (d[c]) { for (var f = [], b = 0, h = d[c].length; h > b; b++) { d[c][b].h != j && f.push(d[c][b]) } d[c] = f } d[c] && 0 === d[c].length && delete d[c] } else { delete d[c] } return this } , a.prototype.dispatch = function(c) { if (this._handlers[c]) { var j = arguments , d = j.length; d > 3 && (j = Array.prototype.slice.call(j, 1)); for (var f = this._handlers[c], b = f.length, h = 0; b > h; ) { switch (d) { case 1: f[h].h.call(f[h].ctx); break; case 2: f[h].h.call(f[h].ctx, j[1]); break; case 3: f[h].h.call(f[h].ctx, j[1], j[2]); break; default: f[h].h.apply(f[h].ctx, j) } f[h].one ? (f.splice(h, 1), b--) : h++ } } return this } , a.prototype.dispatchWithContext = function(c) { if (this._handlers[c]) { var l = arguments , d = l.length; d > 4 && (l = Array.prototype.slice.call(l, 1, l.length - 1)); for (var f = l[l.length - 1], b = this._handlers[c], h = b.length, j = 0; h > j; ) { switch (d) { case 1: b[j].h.call(f); break; case 2: b[j].h.call(f, l[1]); break; case 3: b[j].h.call(f, l[1], l[2]); break; default: b[j].h.apply(f, l) } b[j].one ? (b.splice(j, 1), h--) : j++ } } return this } , a }), define("zrender/tool/log", ["require", "../config"], function(a) { var b = a("../config"); return function() { if (0 !== b.debugMode) { if (1 == b.debugMode) { for (var c in arguments) { throw new Error(arguments[c]) } } else { if (b.debugMode > 1) { for (var c in arguments) { console.log(arguments[c]) } } } } } }), define("zrender/tool/guid", [], function() { var a = 2311; return function() { return "zrender__" + a++ } }), define("zrender/Handler", ["require", "./config", "./tool/env", "./tool/event", "./tool/util", "./tool/vector", "./tool/matrix", "./mixin/Eventful"], function(q) { function F(a, c) { return function(d, e) { return a.call(c, d, e) } } function x(a, c) { return function(e, h, d) { return a.call(c, e, h, d) } } function A(a) { for (var c = C.length; c--; ) { var d = C[c]; a["_" + d + "Handler"] = F(I[d], a) } } function b(d, m, h) { if (this._draggingTarget && this._draggingTarget.id == d.id || d.isSilent()) { return !1 } var l = this._event; if (d.isCover(m, h)) { d.hoverable && this.storage.addHover(d); for (var c = d.parent; c; ) { if (c.clipShape && !c.clipShape.isCover(this._mouseX, this._mouseY)) { return !1 } c = c.parent } return this._lastHover != d && (this._processOutShape(l), this._processDragLeave(l), this._lastHover = d, this._processDragEnter(l)), this._processOverShape(l), this._processDragOver(l), this._hasfound = 1, !0 } return !1 } var B = q("./config") , D = q("./tool/env") , E = q("./tool/event") , y = q("./tool/util") , w = q("./tool/vector") , j = q("./tool/matrix") , f = B.EVENT , z = q("./mixin/Eventful") , C = ["resize", "click", "dblclick", "mousewheel", "mousemove", "mouseout", "mouseup", "mousedown", "touchstart", "touchend", "touchmove"] , G = function(a) { if (window.G_vmlCanvasManager) { return !0 } a = a || window.event; var c = a.toElement || a.relatedTarget || a.srcElement || a.target; return c && c.className.match(B.elementClassName) } , I = { resize: function(a) { a = a || window.event, this._lastHover = null, this._isMouseDown = 0, this.dispatch(f.RESIZE, a) }, click: function(a, d) { if (G(a) || d) { a = this._zrenderEventFixed(a); var c = this._lastHover; (c && c.clickable || !c) && this._clickThreshold < 5 && this._dispatchAgency(c, f.CLICK, a), this._mousemoveHandler(a) } }, dblclick: function(a, d) { if (G(a) || d) { a = a || window.event, a = this._zrenderEventFixed(a); var c = this._lastHover; (c && c.clickable || !c) && this._clickThreshold < 5 && this._dispatchAgency(c, f.DBLCLICK, a), this._mousemoveHandler(a) } }, mousewheel: function(d, s) { if (G(d) || s) { d = this._zrenderEventFixed(d); var h = d.wheelDelta || -d.detail , l = h > 0 ? 1.1 : 1 / 1.1 , c = !1 , m = this._mouseX , p = this._mouseY; this.painter.eachBuildinLayer(function(n) { var a = n.position; if (n.zoomable) { n.__zoom = n.__zoom || 1; var e = n.__zoom; e *= l, e = Math.max(Math.min(n.maxZoom, e), n.minZoom), l = e / n.__zoom, n.__zoom = e, a[0] -= (m - a[0]) * (l - 1), a[1] -= (p - a[1]) * (l - 1), n.scale[0] *= l, n.scale[1] *= l, n.dirty = !0, c = !0, E.stop(d) } }), c && this.painter.refresh(), this._dispatchAgency(this._lastHover, f.MOUSEWHEEL, d), this._mousemoveHandler(d) } }, mousemove: function(d, p) { if ((G(d) || p) && !this.painter.isLoading()) { d = this._zrenderEventFixed(d), this._lastX = this._mouseX, this._lastY = this._mouseY, this._mouseX = E.getX(d), this._mouseY = E.getY(d); var h = this._mouseX - this._lastX , l = this._mouseY - this._lastY; this._processDragStart(d), this._hasfound = 0, this._event = d, this._iterateAndFindHover(), this._hasfound || ((!this._draggingTarget || this._lastHover && this._lastHover != this._draggingTarget) && (this._processOutShape(d), this._processDragLeave(d)), this._lastHover = null, this.storage.delHover(), this.painter.clearHover()); var c = "default"; if (this._draggingTarget) { this.storage.drift(this._draggingTarget.id, h, l), this._draggingTarget.modSelf(), this.storage.addHover(this._draggingTarget), this._clickThreshold++ } else { if (this._isMouseDown) { var m = !1; this.painter.eachBuildinLayer(function(a) { a.panable && (c = "move", a.position[0] += h, a.position[1] += l, m = !0, a.dirty = !0) }), m && this.painter.refresh() } } this._draggingTarget || this._hasfound && this._lastHover.draggable ? c = "move" : this._hasfound && this._lastHover.clickable && (c = "pointer"), this.root.style.cursor = c, this._dispatchAgency(this._lastHover, f.MOUSEMOVE, d), (this._draggingTarget || this._hasfound || this.storage.hasHoverShape()) && this.painter.refreshHover() } }, mouseout: function(a, d) { if (G(a) || d) { a = this._zrenderEventFixed(a); var c = a.toElement || a.relatedTarget; if (c != this.root) { for (; c && 9 != c.nodeType; ) { if (c == this.root) { return void this._mousemoveHandler(a) } c = c.parentNode } } a.zrenderX = this._lastX, a.zrenderY = this._lastY, this.root.style.cursor = "default", this._isMouseDown = 0, this._processOutShape(a), this._processDrop(a), this._processDragEnd(a), this.painter.isLoading() || this.painter.refreshHover(), this.dispatch(f.GLOBALOUT, a) } }, mousedown: function(a, c) { if (G(a) || c) { if (this._clickThreshold = 0, 2 == this._lastDownButton) { return this._lastDownButton = a.button, void (this._mouseDownTarget = null) } this._lastMouseDownMoment = new Date, a = this._zrenderEventFixed(a), this._isMouseDown = 1, this._mouseDownTarget = this._lastHover, this._dispatchAgency(this._lastHover, f.MOUSEDOWN, a), this._lastDownButton = a.button } }, mouseup: function(a, c) { (G(a) || c) && (a = this._zrenderEventFixed(a), this.root.style.cursor = "default", this._isMouseDown = 0, this._mouseDownTarget = null, this._dispatchAgency(this._lastHover, f.MOUSEUP, a), this._processDrop(a), this._processDragEnd(a)) }, touchstart: function(a, c) { (G(a) || c) && (a = this._zrenderEventFixed(a, !0), this._lastTouchMoment = new Date, this._mobileFindFixed(a), this._mousedownHandler(a)) }, touchmove: function(a, c) { (G(a) || c) && (a = this._zrenderEventFixed(a, !0), this._mousemoveHandler(a), this._isDragging && E.stop(a)) }, touchend: function(a, d) { if (G(a) || d) { a = this._zrenderEventFixed(a, !0), this._mouseupHandler(a); var c = new Date; c - this._lastTouchMoment < f.touchClickDelay && (this._mobileFindFixed(a), this._clickHandler(a), c - this._lastClickMoment < f.touchClickDelay / 2 && (this._dblclickHandler(a), this._lastHover && this._lastHover.clickable && E.stop(a)), this._lastClickMoment = c), this.painter.clearHover() } } } , H = function(a, d, c) { z.call(this), this.root = a, this.storage = d, this.painter = c, this._lastX = this._lastY = this._mouseX = this._mouseY = 0, this._findHover = x(b, this), this._domHover = c.getDomHover(), A(this), window.addEventListener ? (window.addEventListener("resize", this._resizeHandler), D.os.tablet || D.os.phone ? (a.addEventListener("touchstart", this._touchstartHandler), a.addEventListener("touchmove", this._touchmoveHandler), a.addEventListener("touchend", this._touchendHandler)) : (a.addEventListener("click", this._clickHandler), a.addEventListener("dblclick", this._dblclickHandler), a.addEventListener("mousewheel", this._mousewheelHandler), a.addEventListener("mousemove", this._mousemoveHandler), a.addEventListener("mousedown", this._mousedownHandler), a.addEventListener("mouseup", this._mouseupHandler)), a.addEventListener("DOMMouseScroll", this._mousewheelHandler), a.addEventListener("mouseout", this._mouseoutHandler)) : (window.attachEvent("onresize", this._resizeHandler), a.attachEvent("onclick", this._clickHandler), a.ondblclick = this._dblclickHandler, a.attachEvent("onmousewheel", this._mousewheelHandler), a.attachEvent("onmousemove", this._mousemoveHandler), a.attachEvent("onmouseout", this._mouseoutHandler), a.attachEvent("onmousedown", this._mousedownHandler), a.attachEvent("onmouseup", this._mouseupHandler)) }; H.prototype.on = function(a, d, c) { return this.bind(a, d, c), this } , H.prototype.un = function(a, c) { return this.unbind(a, c), this } , H.prototype.trigger = function(a, c) { switch (a) { case f.RESIZE: case f.CLICK: case f.DBLCLICK: case f.MOUSEWHEEL: case f.MOUSEMOVE: case f.MOUSEDOWN: case f.MOUSEUP: case f.MOUSEOUT: this["_" + a + "Handler"](c, !0) } } , H.prototype.dispose = function() { var a = this.root; window.removeEventListener ? (window.removeEventListener("resize", this._resizeHandler), D.os.tablet || D.os.phone ? (a.removeEventListener("touchstart", this._touchstartHandler), a.removeEventListener("touchmove", this._touchmoveHandler), a.removeEventListener("touchend", this._touchendHandler)) : (a.removeEventListener("click", this._clickHandler), a.removeEventListener("dblclick", this._dblclickHandler), a.removeEventListener("mousewheel", this._mousewheelHandler), a.removeEventListener("mousemove", this._mousemoveHandler), a.removeEventListener("mousedown", this._mousedownHandler), a.removeEventListener("mouseup", this._mouseupHandler)), a.removeEventListener("DOMMouseScroll", this._mousewheelHandler), a.removeEventListener("mouseout", this._mouseoutHandler)) : (window.detachEvent("onresize", this._resizeHandler), a.detachEvent("onclick", this._clickHandler), a.detachEvent("dblclick", this._dblclickHandler), a.detachEvent("onmousewheel", this._mousewheelHandler), a.detachEvent("onmousemove", this._mousemoveHandler), a.detachEvent("onmouseout", this._mouseoutHandler), a.detachEvent("onmousedown", this._mousedownHandler), a.detachEvent("onmouseup", this._mouseupHandler)), this.root = this._domHover = this.storage = this.painter = null, this.un() } , H.prototype._processDragStart = function(a) { var d = this._lastHover; if (this._isMouseDown && d && d.draggable && !this._draggingTarget && this._mouseDownTarget == d) { if (d.dragEnableTime && new Date - this._lastMouseDownMoment < d.dragEnableTime) { return } var c = d; this._draggingTarget = c, this._isDragging = 1, c.invisible = !0, this.storage.mod(c.id), this._dispatchAgency(c, f.DRAGSTART, a), this.painter.refresh() } } , H.prototype._processDragEnter = function(a) { this._draggingTarget && this._dispatchAgency(this._lastHover, f.DRAGENTER, a, this._draggingTarget) } , H.prototype._processDragOver = function(a) { this._draggingTarget && this._dispatchAgency(this._lastHover, f.DRAGOVER, a, this._draggingTarget) } , H.prototype._processDragLeave = function(a) { this._draggingTarget && this._dispatchAgency(this._lastHover, f.DRAGLEAVE, a, this._draggingTarget) } , H.prototype._processDrop = function(a) { this._draggingTarget && (this._draggingTarget.invisible = !1, this.storage.mod(this._draggingTarget.id), this.painter.refresh(), this._dispatchAgency(this._lastHover, f.DROP, a, this._draggingTarget)) } , H.prototype._processDragEnd = function(a) { this._draggingTarget && (this._dispatchAgency(this._draggingTarget, f.DRAGEND, a), this._lastHover = null), this._isDragging = 0, this._draggingTarget = null } , H.prototype._processOverShape = function(a) { this._dispatchAgency(this._lastHover, f.MOUSEOVER, a) } , H.prototype._processOutShape = function(a) { this._dispatchAgency(this._lastHover, f.MOUSEOUT, a) } , H.prototype._dispatchAgency = function(d, J, h, l) { var c = "on" + J , m = { type: J, event: h, target: d, cancelBubble: !1 } , p = d; for (l && (m.dragged = l); p && (p[c] && (m.cancelBubble = p[c](m)), p.dispatch(J, m), p = p.parent, !m.cancelBubble); ) {} if (d) { m.cancelBubble || this.dispatch(J, m) } else { if (!l) { var u = { type: J, event: h }; this.dispatch(J, u), this.painter.eachOtherLayer(function(a) { "function" == typeof a[c] && a[c](u), a.dispatch && a.dispatch(J, u) }) } } } , H.prototype._iterateAndFindHover = function() { var a = j.create(); return function() { for (var m, d, e = this.storage.getShapeList(), c = [0, 0], h = e.length - 1; h >= 0; h--) { var l = e[h]; if (m !== l.zlevel && (d = this.painter.getLayer(l.zlevel, d), c[0] = this._mouseX, c[1] = this._mouseY, d.needTransform && (j.invert(a, d.transform), w.applyTransform(c, c, a))), this._findHover(l, c[0], c[1])) { break } } } }(); var v = [{ x: 10 }, { x: -20 }, { x: 10, y: 10 }, { y: -20 }]; return H.prototype._mobileFindFixed = function(a) { this._lastHover = null, this._mouseX = a.zrenderX, this._mouseY = a.zrenderY, this._event = a, this._iterateAndFindHover(); for (var d = 0; !this._lastHover && d < v.length; d++) { var c = v[d]; c.x && (this._mouseX += c.x), c.y && (this._mouseY += c.y), this._iterateAndFindHover() } this._lastHover && (a.zrenderX = this._mouseX, a.zrenderY = this._mouseY) } , H.prototype._zrenderEventFixed = function(d, m) { if (d.zrenderFixed) { return d } if (m) { var h = "touchend" != d.type ? d.targetTouches[0] : d.changedTouches[0]; if (h) { var l = this.painter._domRoot.getBoundingClientRect(); d.zrenderX = h.clientX - l.left, d.zrenderY = h.clientY - l.top } } else { d = d || window.event; var c = d.toElement || d.relatedTarget || d.srcElement || d.target; c && c != this._domHover && (d.zrenderX = ("undefined" != typeof d.offsetX ? d.offsetX : d.layerX) + c.offsetLeft, d.zrenderY = ("undefined" != typeof d.offsetY ? d.offsetY : d.layerY) + c.offsetTop) } return d.zrenderFixed = 1, d } , y.merge(H.prototype, z.prototype, !0), H }), define("zrender/Painter", ["require", "./config", "./tool/util", "./tool/log", "./loadingEffect/Base", "./Layer", "./shape/Image"], function(c) { function v() { return !1 } function f() {} function m(a) { return a ? a.isBuildin ? !0 : "function" != typeof a.resize || "function" != typeof a.refresh ? !1 : !0 : !1 } var b = c("./config") , p = c("./tool/util") , q = c("./tool/log") , u = c("./loadingEffect/Base") , j = c("./Layer") , d = function(a, h) { this.root = a, a.style["-webkit-tap-highlight-color"] = "transparent", a.style["-webkit-user-select"] = "none", a.style["user-select"] = "none", a.style["-webkit-touch-callout"] = "none", this.storage = h, a.innerHTML = "", this._width = this._getWidth(), this._height = this._getHeight(); var l = document.createElement("div"); this._domRoot = l, l.style.position = "relative", l.style.overflow = "hidden", l.style.width = this._width + "px", l.style.height = this._height + "px", a.appendChild(l), this._layers = {}, this._zlevelList = [], this._layerConfig = {}, this._loadingEffect = new u({}), this.shapeToImage = this._createShapeToImageProcessor(), this._bgDom = document.createElement("div"), this._bgDom.style.cssText = ["position:absolute;left:0px;top:0px;width:", this._width, "px;height:", this._height + "px;", "-webkit-user-select:none;user-select;none;", "-webkit-touch-callout:none;"].join(""), this._bgDom.setAttribute("data-zr-dom-id", "bg"), this._bgDom.className = b.elementClassName, l.appendChild(this._bgDom), this._bgDom.onselectstart = v; var r = new j("_zrender_hover_",this); this._layers.hover = r, l.appendChild(r.dom), r.initContext(), r.dom.onselectstart = v, r.dom.style["-webkit-user-select"] = "none", r.dom.style["user-select"] = "none", r.dom.style["-webkit-touch-callout"] = "none", this.refreshNextFrame = null }; return d.prototype.render = function(a) { return this.isLoading() && this.hideLoading(), this.refresh(a, !0), this } , d.prototype.refresh = function(l, x) { var r = this.storage.getShapeList(!0); this._paintList(r, x); for (var s = 0; s < this._zlevelList.length; s++) { var h = this._zlevelList[s] , w = this._layers[h]; !w.isBuildin && w.refresh && w.refresh() } return "function" == typeof l && l(), this } , d.prototype._preProcessLayer = function(a) { a.unusedCount++, a.updateTransform() } , d.prototype._postProcessLayer = function(a) { a.dirty = !1, 1 == a.unusedCount && a.clear() } , d.prototype._paintList = function(r, C) { "undefined" == typeof C && (C = !1), this._updateLayerStatus(r); var x, z, A; this.eachBuildinLayer(this._preProcessLayer); for (var B = 0, y = r.length; y > B; B++) { var w = r[B]; if (z !== w.zlevel && (x && (x.needTransform && A.restore(), A.flush && A.flush()), z = w.zlevel, x = this.getLayer(z), x.isBuildin || q("ZLevel " + z + " has been used by unkown layer " + x.id), A = x.ctx, x.unusedCount = 0, (x.dirty || C) && x.clear(), x.needTransform && (A.save(), x.setTransform(A))), (x.dirty || C) && !w.invisible && (!w.onbrush || w.onbrush && !w.onbrush(A, !1))) { if (b.catchBrushException) { try { w.brush(A, !1, this.refreshNextFrame) } catch (a) { q(a, "brush error of " + w.type, w) } } else { w.brush(A, !1, this.refreshNextFrame) } } w.__dirty = !1 } x && (x.needTransform && A.restore(), A.flush && A.flush()), this.eachBuildinLayer(this._postProcessLayer) } , d.prototype.getLayer = function(a) { var h = this._layers[a]; return h || (h = new j(a,this), h.isBuildin = !0, this._layerConfig[a] && p.merge(h, this._layerConfig[a], !0), h.updateTransform(), this.insertLayer(a, h), h.initContext()), h } , d.prototype.insertLayer = function(l, x) { if (this._layers[l]) { return void q("ZLevel " + l + " has been used already") } if (!m(x)) { return void q("Layer of zlevel " + l + " is not valid") } var n = this._zlevelList.length , h = null , r = -1; if (n > 0 && l > this._zlevelList[0]) { for (r = 0; n - 1 > r && !(this._zlevelList[r] < l && this._zlevelList[r + 1] > l); r++) {} h = this._layers[this._zlevelList[r]] } this._zlevelList.splice(r + 1, 0, l); var w = h ? h.dom : this._bgDom; w.nextSibling ? w.parentNode.insertBefore(x.dom, w.nextSibling) : w.parentNode.appendChild(x.dom), this._layers[l] = x } , d.prototype.eachLayer = function(a, o) { for (var h = 0; h < this._zlevelList.length; h++) { var l = this._zlevelList[h]; a.call(o, this._layers[l], l) } } , d.prototype.eachBuildinLayer = function(l, s) { for (var o = 0; o < this._zlevelList.length; o++) { var r = this._zlevelList[o] , h = this._layers[r]; h.isBuildin && l.call(s, h, r) } } , d.prototype.eachOtherLayer = function(l, s) { for (var o = 0; o < this._zlevelList.length; o++) { var r = this._zlevelList[o] , h = this._layers[r]; h.isBuildin || l.call(s, h, r) } } , d.prototype.getLayers = function() { return this._layers } , d.prototype._updateLayerStatus = function(l) { var B = this._layers , w = {}; this.eachBuildinLayer(function(a, i) { w[i] = a.elCount, a.elCount = 0 }); for (var x = 0, h = l.length; h > x; x++) { var y = l[x] , z = y.zlevel , A = B[z]; if (A) { if (A.elCount++, A.dirty) { continue } A.dirty = y.__dirty } } this.eachBuildinLayer(function(a, i) { w[i] !== a.elCount && (a.dirty = !0) }) } , d.prototype.refreshShapes = function(l, s) { for (var o = 0, r = l.length; r > o; o++) { var h = l[o]; h.modSelf() } return this.refresh(s), this } , d.prototype.setLoadingEffect = function(a) { return this._loadingEffect = a, this } , d.prototype.clear = function() { return this.eachBuildinLayer(this._clearLayer), this } , d.prototype._clearLayer = function(a) { a.clear() } , d.prototype.modLayer = function(a, l) { if (l) { this._layerConfig[a] ? p.merge(this._layerConfig[a], l, !0) : this._layerConfig[a] = l; var h = this._layers[a]; h && p.merge(h, this._layerConfig[a], !0) } } , d.prototype.delLayer = function(a) { var h = this._layers[a]; h && (this.modLayer(a, { position: h.position, rotation: h.rotation, scale: h.scale }), h.dom.parentNode.removeChild(h.dom), delete this._layers[a], this._zlevelList.splice(p.indexOf(this._zlevelList, a), 1)) } , d.prototype.refreshHover = function() { this.clearHover(); for (var a = this.storage.getHoverShapes(!0), o = 0, h = a.length; h > o; o++) { this._brushHover(a[o]) } var l = this._layers.hover.ctx; return l.flush && l.flush(), this.storage.delHover(), this } , d.prototype.clearHover = function() { var a = this._layers.hover; return a && a.clear(), this } , d.prototype.showLoading = function(a) { return this._loadingEffect && this._loadingEffect.stop(), a && this.setLoadingEffect(a), this._loadingEffect.start(this), this.loading = !0, this } , d.prototype.hideLoading = function() { return this._loadingEffect.stop(), this.clearHover(), this.loading = !1, this } , d.prototype.isLoading = function() { return this.loading } , d.prototype.resize = function() { var a = this._domRoot; a.style.display = "none"; var o = this._getWidth() , h = this._getHeight(); if (a.style.display = "", this._width != o || h != this._height) { this._width = o, this._height = h, a.style.width = o + "px", a.style.height = h + "px"; for (var l in this._layers) { this._layers[l].resize(o, h) } this.refresh(null, !0) } return this } , d.prototype.clearLayer = function(a) { var h = this._layers[a]; h && h.clear() } , d.prototype.dispose = function() { this.isLoading() && this.hideLoading(), this.root.innerHTML = "", this.root = this.storage = this._domRoot = this._layers = null } , d.prototype.getDomHover = function() { return this._layers.hover.dom } , d.prototype.toDataURL = function(a, z, r) { if (window.G_vmlCanvasManager) { return null } var w = new j("image",this); this._bgDom.appendChild(w.dom), w.initContext(); var x = w.ctx; w.clearColor = z || "#fff", w.clear(); var y = this; this.storage.iterShape(function(h) { if (!h.invisible && (!h.onbrush || h.onbrush && !h.onbrush(x, !1))) { if (b.catchBrushException) { try { h.brush(x, !1, y.refreshNextFrame) } catch (i) { q(i, "brush error of " + h.type, h) } } else { h.brush(x, !1, y.refreshNextFrame) } } }, { normal: "up", update: !0 }); var l = w.dom.toDataURL(a, r); return x = null, this._bgDom.removeChild(w.dom), l } , d.prototype.getWidth = function() { return this._width } , d.prototype.getHeight = function() { return this._height } , d.prototype._getWidth = function() { var a = this.root , h = a.currentStyle || document.defaultView.getComputedStyle(a); return ((a.clientWidth || parseInt(h.width, 10)) - parseInt(h.paddingLeft, 10) - parseInt(h.paddingRight, 10)).toFixed(0) - 0 } , d.prototype._getHeight = function() { var a = this.root , h = a.currentStyle || document.defaultView.getComputedStyle(a); return ((a.clientHeight || parseInt(h.height, 10)) - parseInt(h.paddingTop, 10) - parseInt(h.paddingBottom, 10)).toFixed(0) - 0 } , d.prototype._brushHover = function(a) { var o = this._layers.hover.ctx; if (!a.onbrush || a.onbrush && !a.onbrush(o, !0)) { var h = this.getLayer(a.zlevel); if (h.needTransform && (o.save(), h.setTransform(o)), b.catchBrushException) { try { a.brush(o, !0, this.refreshNextFrame) } catch (l) { q(l, "hoverBrush error of " + a.type, a) } } else { a.brush(o, !0, this.refreshNextFrame) } h.needTransform && o.restore() } } , d.prototype._shapeToImage = function(E, y, A, e, B) { var C = document.createElement("canvas") , D = C.getContext("2d"); C.style.width = A + "px", C.style.height = e + "px", C.setAttribute("width", A * B), C.setAttribute("height", e * B), D.clearRect(0, 0, A * B, e * B); var z = { position: y.position, rotation: y.rotation, scale: y.scale }; y.position = [0, 0, 0], y.rotation = 0, y.scale = [1, 1], y && y.brush(D, !1); var x = c("./shape/Image") , w = new x({ id: E, style: { x: 0, y: 0, image: C } }); return null != z.position && (w.position = y.position = z.position), null != z.rotation && (w.rotation = y.rotation = z.rotation), null != z.scale && (w.scale = y.scale = z.scale), w } , d.prototype._createShapeToImageProcessor = function() { if (window.G_vmlCanvasManager) { return f } var a = this; return function(r, e, h, l) { return a._shapeToImage(r, e, h, l, b.devicePixelRatio) } } , d }), define("zrender/Storage", ["require", "./tool/util", "./Group"], function(c) { function j(a, i) { return a.zlevel == i.zlevel ? a.z == i.z ? a.__renderidx - i.__renderidx : a.z - i.z : a.zlevel - i.zlevel } var d = c("./tool/util") , f = c("./Group") , b = { hover: !1, normal: "down", update: !1 } , h = function() { this._elements = {}, this._hoverElements = [], this._roots = [], this._shapeList = [], this._shapeListOffset = 0 }; return h.prototype.iterShape = function(a, q) { if (q || (q = b), q.hover) { for (var l = 0, m = this._hoverElements.length; m > l; l++) { var p = this._hoverElements[l]; if (p.updateTransform(), a(p)) { return this } } } switch (q.update && this.updateShapeList(), q.normal) { case "down": for (var m = this._shapeList.length; m--; ) { if (a(this._shapeList[m])) { return this } } break; default: for (var l = 0, m = this._shapeList.length; m > l; l++) { if (a(this._shapeList[l])) { return this } } } return this } , h.prototype.getHoverShapes = function(p) { for (var q = [], u = 0, m = this._hoverElements.length; m > u; u++) { q.push(this._hoverElements[u]); var v = this._hoverElements[u].hoverConnect; if (v) { var w; v = v instanceof Array ? v : [v]; for (var x = 0, t = v.length; t > x; x++) { w = v[x].id ? v[x] : this.get(v[x]), w && q.push(w) } } } if (q.sort(j), p) { for (var u = 0, m = q.length; m > u; u++) { q[u].updateTransform() } } return q } , h.prototype.getShapeList = function(a) { return a && this.updateShapeList(), this._shapeList } , h.prototype.updateShapeList = function() { this._shapeListOffset = 0; for (var a = 0, l = this._roots.length; l > a; a++) { var m = this._roots[a]; this._updateAndAddShape(m) } this._shapeList.length = this._shapeListOffset; for (var a = 0, l = this._shapeList.length; l > a; a++) { this._shapeList[a].__renderidx = a } this._shapeList.sort(j) } , h.prototype._updateAndAddShape = function(a, o) { if (!a.ignore) { if (a.updateTransform(), a.clipShape && (a.clipShape.parent = a, a.clipShape.updateTransform(), o ? (o = o.slice(), o.push(a.clipShape)) : o = [a.clipShape]), "group" == a.type) { for (var l = 0; l < a._children.length; l++) { var m = a._children[l]; m.__dirty = a.__dirty || m.__dirty, this._updateAndAddShape(m, o) } a.__dirty = !1 } else { a.__clipShapes = o, this._shapeList[this._shapeListOffset++] = a } } } , h.prototype.mod = function(l, o) { if ("string" == typeof l && (l = this._elements[l]), l && (l.modSelf(), o)) { if (o.parent || o._storage || o.__clipShapes) { var m = {}; for (var i in o) { "parent" !== i && "_storage" !== i && "__clipShapes" !== i && o.hasOwnProperty(i) && (m[i] = o[i]) } d.merge(l, m, !0) } else { d.merge(l, o, !0) } } return this } , h.prototype.drift = function(a, o, l) { var m = this._elements[a]; return m && (m.needTransform = !0, "horizontal" === m.draggable ? l = 0 : "vertical" === m.draggable && (o = 0), (!m.ondrift || m.ondrift && !m.ondrift(o, l)) && m.drift(o, l)), this } , h.prototype.addHover = function(a) { return a.updateNeedTransform(), this._hoverElements.push(a), this } , h.prototype.delHover = function() { return this._hoverElements = [], this } , h.prototype.hasHoverShape = function() { return this._hoverElements.length > 0 } , h.prototype.addRoot = function(a) { this._elements[a.id] || (a instanceof f && a.addChildrenToStorage(this), this.addToMap(a), this._roots.push(a)) } , h.prototype.delRoot = function(l) { if ("undefined" == typeof l) { for (var q = 0; q < this._roots.length; q++) { var i = this._roots[q]; i instanceof f && i.delChildrenFromStorage(this) } return this._elements = {}, this._hoverElements = [], this._roots = [], this._shapeList = [], void (this._shapeListOffset = 0) } if (l instanceof Array) { for (var q = 0, m = l.length; m > q; q++) { this.delRoot(l[q]) } } else { var n; n = "string" == typeof l ? this._elements[l] : l; var p = d.indexOf(this._roots, n); p >= 0 && (this.delFromMap(n.id), this._roots.splice(p, 1), n instanceof f && n.delChildrenFromStorage(this)) } } , h.prototype.addToMap = function(a) { return a instanceof f && (a._storage = this), a.modSelf(), this._elements[a.id] = a, this } , h.prototype.get = function(a) { return this._elements[a] } , h.prototype.delFromMap = function(a) { var i = this._elements[a]; return i && (delete this._elements[a], i instanceof f && (i._storage = null)), this } , h.prototype.dispose = function() { this._elements = this._renderList = this._roots = this._hoverElements = null } , h }), define("zrender/animation/Animation", ["require", "./Clip", "../tool/color", "../tool/util", "../tool/event"], function(q) { function F(a, c) { return a[c] } function x(a, d, c) { a[d] = c } function A(a, d, c) { return (d - a) * c + a } function b(d, L, n, c, u) { var J = d.length; if (1 == u) { for (var K = 0; J > K; K++) { c[K] = A(d[K], L[K], n) } } else { for (var p = d[0].length, K = 0; J > K; K++) { for (var m = 0; p > m; m++) { c[K][m] = A(d[K][m], L[K][m], n) } } } } function B(a) { switch (typeof a) { case "undefined": case "string": return !1 } return "undefined" != typeof a.length } function D(K, T, M, P, s, Q, S, N, L) { var J = K.length; if (1 == L) { for (var u = 0; J > u; u++) { N[u] = E(K[u], T[u], M[u], P[u], s, Q, S) } } else { for (var O = K[0].length, u = 0; J > u; u++) { for (var R = 0; O > R; R++) { N[u][R] = E(K[u][R], T[u][R], M[u][R], P[u][R], s, Q, S) } } } } function E(d, L, h, p, c, u, J) { var K = 0.5 * (h - d) , m = 0.5 * (p - L); return (2 * (L - h) + K + m) * J + (-3 * (L - h) - 2 * K - m) * u + K * c + L } function y(a) { if (B(a)) { var h = a.length; if (B(a[0])) { for (var c = [], d = 0; h > d; d++) { c.push(I.call(a[d])) } return c } return I.call(a) } return a } function w(a) { return a[0] = Math.floor(a[0]), a[1] = Math.floor(a[1]), a[2] = Math.floor(a[2]), "rgba(" + a.join(",") + ")" } var j = q("./Clip") , f = q("../tool/color") , z = q("../tool/util") , C = q("../tool/event").Dispatcher , G = window.requestAnimationFrame || window.msRequestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || function(a) { setTimeout(a, 16) } , I = Array.prototype.slice , H = function(a) { a = a || {}, this.stage = a.stage || {}, this.onframe = a.onframe || function() {} , this._clips = [], this._running = !1, this._time = 0, C.call(this) }; H.prototype = { add: function(a) { this._clips.push(a) }, remove: function(a) { if (a.__inStep) { a.__needsRemove = !0 } else { var c = z.indexOf(this._clips, a); c >= 0 && this._clips.splice(c, 1) } }, _update: function() { for (var d = (new Date).getTime(), L = d - this._time, h = this._clips, p = h.length, c = [], u = [], J = 0; p > J; J++) { var K = h[J]; K.__inStep = !0; var m = K.step(d); K.__inStep = !1, m && (c.push(m), u.push(K)) } for (var J = 0; p > J; ) { h[J].__needsRemove ? (h[J] = h[p - 1], h.pop(), p--) : J++ } p = c.length; for (var J = 0; p > J; J++) { u[J].fire(c[J]) } this._time = d, this.onframe(L), this.dispatch("frame", L), this.stage.update && this.stage.update() }, start: function() { function a() { c._running && (G(a), c._update()) } var c = this; this._running = !0, this._time = (new Date).getTime(), G(a) }, stop: function() { this._running = !1 }, clear: function() { this._clips = [] }, animate: function(a, d) { d = d || {}; var c = new v(a,d.loop,d.getter,d.setter); return c.animation = this, c }, constructor: H }, z.merge(H.prototype, C.prototype, !0); var v = function(d, h, c, i) { this._tracks = {}, this._target = d, this._loop = h || !1, this._getter = c || F, this._setter = i || x, this._clipCount = 0, this._delay = 0, this._doneList = [], this._onframeList = [], this._clipList = [] }; return v.prototype = { when: function(a, d) { for (var c in d) { this._tracks[c] || (this._tracks[c] = [], 0 !== a && this._tracks[c].push({ time: 0, value: y(this._getter(this._target, c)) })), this._tracks[c].push({ time: parseInt(a, 10), value: d[c] }) } return this }, during: function(a) { return this._onframeList.push(a), this }, start: function(a) { var o = this , c = this._setter , d = this._getter , h = "spline" === a , n = function() { if (o._clipCount--, 0 === o._clipCount) { o._tracks = {}; for (var l = o._doneList.length, m = 0; l > m; m++) { o._doneList[m].call(o) } } } , r = function(Y, ab) { var Z = Y.length; if (Z) { var J = Y[0].value , t = B(J) , ag = !1 , l = t && B(J[0]) ? 2 : 1; Y.sort(function(u, K) { return u.time - K.time }); var e; if (Z) { e = Y[Z - 1].time; for (var ae = [], N = [], aa = 0; Z > aa; aa++) { ae.push(Y[aa].time / e); var P = Y[aa].value; "string" == typeof P && (P = f.toArray(P), 0 === P.length && (P[0] = P[1] = P[2] = 0, P[3] = 1), ag = !0), N.push(P) } var ac, aa, ad, af, M, Q, O, m = 0, R = 0; if (ag) { var p = [0, 0, 0, 0] } var ah = function(L, S) { if (R > S) { for (ac = Math.min(m + 1, Z - 1), aa = ac; aa >= 0 && !(ae[aa] <= S); aa--) {} aa = Math.min(aa, Z - 2) } else { for (aa = m; Z > aa && !(ae[aa] > S); aa++) {} aa = Math.min(aa - 1, Z - 2) } m = aa, R = S; var K = ae[aa + 1] - ae[aa]; if (0 !== K) { if (ad = (S - ae[aa]) / K, h) { if (M = N[aa], af = N[0 === aa ? aa : aa - 1], Q = N[aa > Z - 2 ? Z - 1 : aa + 1], O = N[aa > Z - 3 ? Z - 1 : aa + 2], t) { D(af, M, Q, O, ad, ad * ad, ad * ad * ad, d(L, ab), l) } else { var u; ag ? (u = D(af, M, Q, O, ad, ad * ad, ad * ad * ad, p, 1), u = w(p)) : u = E(af, M, Q, O, ad, ad * ad, ad * ad * ad), c(L, ab, u) } } else { if (t) { b(N[aa], N[aa + 1], ad, d(L, ab), l) } else { var u; ag ? (b(N[aa], N[aa + 1], ad, p, 1), u = w(p)) : u = A(N[aa], N[aa + 1], ad), c(L, ab, u) } } for (aa = 0; aa < o._onframeList.length; aa++) { o._onframeList[aa](L, S) } } } , i = new j({ target: o._target, life: e, loop: o._loop, delay: o._delay, onframe: ah, ondestroy: n }); a && "spline" !== a && (i.easing = a), o._clipList.push(i), o._clipCount++, o.animation.add(i) } } }; for (var s in this._tracks) { r(this._tracks[s], s) } return this }, stop: function() { for (var a = 0; a < this._clipList.length; a++) { var c = this._clipList[a]; this.animation.remove(c) } this._clipList = [] }, delay: function(a) { return this._delay = a, this }, done: function(a) { return a && this._doneList.push(a), this } }, H }), define("zrender/tool/vector", [], function() { var a = "undefined" == typeof Float32Array ? Array : Float32Array , b = { create: function(e, c) { var d = new a(2); return d[0] = e || 0, d[1] = c || 0, d }, copy: function(c, d) { return c[0] = d[0], c[1] = d[1], c }, clone: function(d) { var c = new a(2); return c[0] = d[0], c[1] = d[1], c }, set: function(c, f, d) { return c[0] = f, c[1] = d, c }, add: function(c, f, d) { return c[0] = f[0] + d[0], c[1] = f[1] + d[1], c }, scaleAndAdd: function(c, h, d, f) { return c[0] = h[0] + d[0] * f, c[1] = h[1] + d[1] * f, c }, sub: function(c, f, d) { return c[0] = f[0] - d[0], c[1] = f[1] - d[1], c }, len: function(c) { return Math.sqrt(this.lenSquare(c)) }, lenSquare: function(c) { return c[0] * c[0] + c[1] * c[1] }, mul: function(c, f, d) { return c[0] = f[0] * d[0], c[1] = f[1] * d[1], c }, div: function(c, f, d) { return c[0] = f[0] / d[0], c[1] = f[1] / d[1], c }, dot: function(c, d) { return c[0] * d[0] + c[1] * d[1] }, scale: function(c, f, d) { return c[0] = f[0] * d, c[1] = f[1] * d, c }, normalize: function(c, d) { var f = b.len(d); return 0 === f ? (c[0] = 0, c[1] = 0) : (c[0] = d[0] / f, c[1] = d[1] / f), c }, distance: function(c, d) { return Math.sqrt((c[0] - d[0]) * (c[0] - d[0]) + (c[1] - d[1]) * (c[1] - d[1])) }, distanceSquare: function(c, d) { return (c[0] - d[0]) * (c[0] - d[0]) + (c[1] - d[1]) * (c[1] - d[1]) }, negate: function(c, d) { return c[0] = -d[0], c[1] = -d[1], c }, lerp: function(c, h, d, f) { return c[0] = h[0] + f * (d[0] - h[0]), c[1] = h[1] + f * (d[1] - h[1]), c }, applyTransform: function(d, j, f) { var h = j[0] , c = j[1]; return d[0] = f[0] * h + f[2] * c + f[4], d[1] = f[1] * h + f[3] * c + f[5], d }, min: function(c, f, d) { return c[0] = Math.min(f[0], d[0]), c[1] = Math.min(f[1], d[1]), c }, max: function(c, f, d) { return c[0] = Math.max(f[0], d[0]), c[1] = Math.max(f[1], d[1]), c } }; return b.length = b.len, b.lengthSquare = b.lenSquare, b.dist = b.distance, b.distSquare = b.distanceSquare, b }), define("zrender/tool/matrix", [], function() { var a = "undefined" == typeof Float32Array ? Array : Float32Array , b = { create: function() { var c = new a(6); return b.identity(c), c }, identity: function(c) { return c[0] = 1, c[1] = 0, c[2] = 0, c[3] = 1, c[4] = 0, c[5] = 0, c }, copy: function(c, d) { return c[0] = d[0], c[1] = d[1], c[2] = d[2], c[3] = d[3], c[4] = d[4], c[5] = d[5], c }, mul: function(c, f, d) { return c[0] = f[0] * d[0] + f[2] * d[1], c[1] = f[1] * d[0] + f[3] * d[1], c[2] = f[0] * d[2] + f[2] * d[3], c[3] = f[1] * d[2] + f[3] * d[3], c[4] = f[0] * d[4] + f[2] * d[5] + f[4], c[5] = f[1] * d[4] + f[3] * d[5] + f[5], c }, translate: function(c, f, d) { return c[0] = f[0], c[1] = f[1], c[2] = f[2], c[3] = f[3], c[4] = f[4] + d[0], c[5] = f[5] + d[1], c }, rotate: function(j, y, p) { var u = y[0] , c = y[2] , v = y[4] , w = y[1] , x = y[3] , q = y[5] , m = Math.sin(p) , f = Math.cos(p); return j[0] = u * f + w * m, j[1] = -u * m + w * f, j[2] = c * f + x * m, j[3] = -c * m + f * x, j[4] = f * v + m * q, j[5] = f * q - m * v, j }, scale: function(d, j, f) { var h = f[0] , c = f[1]; return d[0] = j[0] * h, d[1] = j[1] * c, d[2] = j[2] * h, d[3] = j[3] * c, d[4] = j[4] * h, d[5] = j[5] * c, d }, invert: function(d, u) { var f = u[0] , j = u[2] , c = u[4] , m = u[1] , p = u[3] , q = u[5] , h = f * p - m * j; return h ? (h = 1 / h, d[0] = p * h, d[1] = -m * h, d[2] = -j * h, d[3] = f * h, d[4] = (j * q - p * c) * h, d[5] = (m * c - f * q) * h, d) : null } }; return b }), define("zrender/loadingEffect/Base", ["require", "../tool/util", "../shape/Text", "../shape/Rectangle"], function(c) { function l(a) { this.setOptions(a) } var d = c("../tool/util") , f = c("../shape/Text") , b = c("../shape/Rectangle") , h = "Loading..." , j = "normal 16px Arial"; return l.prototype.createTextShape = function(a) { return new f({ highlightStyle: d.merge({ x: this.canvasWidth / 2, y: this.canvasHeight / 2, text: h, textAlign: "center", textBaseline: "middle", textFont: j, color: "#333", brushType: "fill" }, a, !0) }) } , l.prototype.createBackgroundShape = function(a) { return new b({ highlightStyle: { x: 0, y: 0, width: this.canvasWidth, height: this.canvasHeight, brushType: "fill", color: a } }) } , l.prototype.start = function(a) { function n(e) { a.storage.addHover(e) } function m() { a.refreshHover() } this.canvasWidth = a._width, this.canvasHeight = a._height, this.loadingTimer = this._start(n, m) } , l.prototype._start = function() { return setInterval(function() {}, 10000) } , l.prototype.stop = function() { clearInterval(this.loadingTimer) } , l.prototype.setOptions = function(a) { this.options = a || {} } , l.prototype.adjust = function(a, i) { return a <= i[0] ? a = i[0] : a >= i[1] && (a = i[1]), a } , l.prototype.getLocation = function(o, r, p) { var q = null != o.x ? o.x : "center"; switch (q) { case "center": q = Math.floor((this.canvasWidth - r) / 2); break; case "left": q = 0; break; case "right": q = this.canvasWidth - r } var m = null != o.y ? o.y : "center"; switch (m) { case "center": m = Math.floor((this.canvasHeight - p) / 2); break; case "top": m = 0; break; case "bottom": m = this.canvasHeight - p } return { x: q, y: m, width: r, height: p } } , l }), define("zrender/Layer", ["require", "./mixin/Transformable", "./tool/util", "./config"], function(c) { function m() { return !1 } function d(q, v, r) { var s = document.createElement(v) , p = r.getWidth() , u = r.getHeight(); return s.style.position = "absolute", s.style.left = 0, s.style.top = 0, s.style.width = p + "px", s.style.height = u + "px", s.width = p * j.devicePixelRatio, s.height = u * j.devicePixelRatio, s.setAttribute("data-zr-dom-id", q), s } var f = c("./mixin/Transformable") , b = c("./tool/util") , h = window.G_vmlCanvasManager , j = c("./config") , l = function(n, i) { this.id = n, this.dom = d(n, "canvas", i), this.dom.onselectstart = m, this.dom.style["-webkit-user-select"] = "none", this.dom.style["user-select"] = "none", this.dom.style["-webkit-touch-callout"] = "none", this.dom.style["-webkit-tap-highlight-color"] = "rgba(0,0,0,0)", this.dom.className = j.elementClassName, h && h.initElement(this.dom), this.domBack = null, this.ctxBack = null, this.painter = i, this.unusedCount = 0, this.config = null, this.dirty = !0, this.elCount = 0, this.clearColor = 0, this.motionBlur = !1, this.lastFrameAlpha = 0.7, this.zoomable = !1, this.panable = !1, this.maxZoom = 1 / 0, this.minZoom = 0, f.call(this) }; return l.prototype.initContext = function() { this.ctx = this.dom.getContext("2d"); var a = j.devicePixelRatio; 1 != a && this.ctx.scale(a, a) } , l.prototype.createBackBuffer = function() { if (!h) { this.domBack = d("back-" + this.id, "canvas", this.painter), this.ctxBack = this.domBack.getContext("2d"); var a = j.devicePixelRatio; 1 != a && this.ctxBack.scale(a, a) } } , l.prototype.resize = function(a, o) { var n = j.devicePixelRatio; this.dom.style.width = a + "px", this.dom.style.height = o + "px", this.dom.setAttribute("width", a * n), this.dom.setAttribute("height", o * n), 1 != n && this.ctx.scale(n, n), this.domBack && (this.domBack.setAttribute("width", a * n), this.domBack.setAttribute("height", o * n), 1 != n && this.ctxBack.scale(n, n)) } , l.prototype.clear = function() { var q = this.dom , y = this.ctx , u = q.width , w = q.height , o = this.clearColor && !h , x = this.motionBlur && !h , v = this.lastFrameAlpha , r = j.devicePixelRatio; if (x && (this.domBack || this.createBackBuffer(), this.ctxBack.globalCompositeOperation = "copy", this.ctxBack.drawImage(q, 0, 0, u / r, w / r)), y.clearRect(0, 0, u / r, w / r), o && (y.save(), y.fillStyle = this.clearColor, y.fillRect(0, 0, u / r, w / r), y.restore()), x) { var p = this.domBack; y.save(), y.globalAlpha = v, y.drawImage(p, 0, 0, u / r, w / r), y.restore() } } , b.merge(l.prototype, f.prototype), l }), define("zrender/shape/Text", ["require", "../tool/area", "./Base", "../tool/util"], function(a) { var d = a("../tool/area") , b = a("./Base") , c = function(f) { b.call(this, f) }; return c.prototype = { type: "text", brush: function(m, q) { var u = this.style; if (q && (u = this.getHighlightStyle(u, this.highlightStyle || {})), "undefined" != typeof u.text && u.text !== !1) { m.save(), this.doClip(m), this.setContext(m, u), this.setTransform(m), u.textFont && (m.font = u.textFont), m.textAlign = u.textAlign || "start", m.textBaseline = u.textBaseline || "middle"; var f, v = (u.text + "").split("\n"), w = d.getTextHeight("国", u.textFont), x = this.getRect(u), t = u.x; f = "top" == u.textBaseline ? x.y : "bottom" == u.textBaseline ? x.y + w : x.y + w / 2; for (var p = 0, j = v.length; j > p; p++) { if (u.maxWidth) { switch (u.brushType) { case "fill": m.fillText(v[p], t, f, u.maxWidth); break; case "stroke": m.strokeText(v[p], t, f, u.maxWidth); break; case "both": m.fillText(v[p], t, f, u.maxWidth), m.strokeText(v[p], t, f, u.maxWidth); break; default: m.fillText(v[p], t, f, u.maxWidth) } } else { switch (u.brushType) { case "fill": m.fillText(v[p], t, f); break; case "stroke": m.strokeText(v[p], t, f); break; case "both": m.fillText(v[p], t, f), m.strokeText(v[p], t, f); break; default: m.fillText(v[p], t, f) } } f += w } m.restore() } }, getRect: function(h) { if (h.__rect) { return h.__rect } var j = d.getTextWidth(h.text, h.textFont) , l = d.getTextHeight(h.text, h.textFont) , f = h.x; "end" == h.textAlign || "right" == h.textAlign ? f -= j : "center" == h.textAlign && (f -= j / 2); var m; return m = "top" == h.textBaseline ? h.y : "bottom" == h.textBaseline ? h.y - l : h.y - l / 2, h.__rect = { x: f, y: m, width: j, height: l }, h.__rect } }, a("../tool/util").inherits(c, b), c }), define("zrender/shape/Rectangle", ["require", "./Base", "../tool/util"], function(a) { var c = a("./Base") , b = function(d) { c.call(this, d) }; return b.prototype = { type: "rectangle", _buildRadiusPath: function(p, A) { var u, w, f, x, y = A.x, z = A.y, v = A.width, q = A.height, m = A.radius; "number" == typeof m ? u = w = f = x = m : m instanceof Array ? 1 === m.length ? u = w = f = x = m[0] : 2 === m.length ? (u = f = m[0], w = x = m[1]) : 3 === m.length ? (u = m[0], w = x = m[1], f = m[2]) : (u = m[0], w = m[1], f = m[2], x = m[3]) : u = w = f = x = 0; var j; u + w > v && (j = u + w, u *= v / j, w *= v / j), f + x > v && (j = f + x, f *= v / j, x *= v / j), w + f > q && (j = w + f, w *= q / j, f *= q / j), u + x > q && (j = u + x, u *= q / j, x *= q / j), p.moveTo(y + u, z), p.lineTo(y + v - w, z), 0 !== w && p.quadraticCurveTo(y + v, z, y + v, z + w), p.lineTo(y + v, z + q - f), 0 !== f && p.quadraticCurveTo(y + v, z + q, y + v - f, z + q), p.lineTo(y + x, z + q), 0 !== x && p.quadraticCurveTo(y, z + q, y, z + q - x), p.lineTo(y, z + u), 0 !== u && p.quadraticCurveTo(y, z, y + u, z) }, buildPath: function(d, f) { f.radius ? this._buildRadiusPath(d, f) : (d.moveTo(f.x, f.y), d.lineTo(f.x + f.width, f.y), d.lineTo(f.x + f.width, f.y + f.height), d.lineTo(f.x, f.y + f.height), d.lineTo(f.x, f.y)), d.closePath() }, getRect: function(d) { if (d.__rect) { return d.__rect } var f; return f = "stroke" == d.brushType || "fill" == d.brushType ? d.lineWidth || 1 : 0, d.__rect = { x: Math.round(d.x - f / 2), y: Math.round(d.y - f / 2), width: d.width + f, height: d.height + f }, d.__rect } }, a("../tool/util").inherits(b, c), b }), define("zrender/tool/area", ["require", "./util", "./curve"], function(F) { function ag(a) { return a %= B, 0 > a && (a += B), a } function N(a, m, b, d) { if (!m || !a) { return !1 } var f = a.type; ak = ak || Y.getContext(); var h = aa(a, m, b, d); if ("undefined" != typeof h) { return h } if (a.buildPath && ak.isPointInPath) { return q(a, ak, m, b, d) } switch (f) { case "ellipse": return !0; case "trochoid": var c = "out" == m.location ? m.r1 + m.r2 + m.d : m.r1 - m.r2 + m.d; return ac(m, b, d, c); case "rose": return ac(m, b, d, m.maxr); default: return !1 } } function aa(c, p, f, l) { var b = c.type; switch (b) { case "bezier-curve": return "undefined" == typeof p.cpX2 ? R(p.xStart, p.yStart, p.cpX1, p.cpY1, p.xEnd, p.yEnd, p.lineWidth, f, l) : ae(p.xStart, p.yStart, p.cpX1, p.cpY1, p.cpX2, p.cpY2, p.xEnd, p.yEnd, p.lineWidth, f, l); case "line": return ad(p.xStart, p.yStart, p.xEnd, p.yEnd, p.lineWidth, f, l); case "polyline": return D(p.pointList, p.lineWidth, f, l); case "ring": return A(p.x, p.y, p.r0, p.r, f, l); case "circle": return ac(p.x, p.y, p.r, f, l); case "sector": var m = p.startAngle * Math.PI / 180 , d = p.endAngle * Math.PI / 180; return p.clockWise || (m = -m, d = -d), ai(p.x, p.y, p.r0, p.r, m, d, !p.clockWise, f, l); case "path": return p.pathArray && j(p.pathArray, Math.max(p.lineWidth, 5), p.brushType, f, l); case "polygon": case "star": case "isogon": return al(p.pointList, f, l); case "text": var r = p.__rect || c.getRect(p); return Z(r.x, r.y, r.width, r.height, f, l); case "rectangle": case "image": return Z(p.x, p.y, p.width, p.height, f, l) } } function q(c, h, d, f, b) { return h.beginPath(), c.buildPath(h, d), h.closePath(), h.isPointInPath(f, b) } function ab(c, f, d, b) { return !N(c, f, d, b) } function ad(p, I, v, x, b, y, C) { if (0 === b) { return !1 } var E = Math.max(b, 5) , w = 0 , u = p; if (C > I + E && C > x + E || I - E > C && x - E > C || y > p + E && y > v + E || p - E > y && v - E > y) { return !1 } if (p === v) { return Math.abs(y - p) <= E / 2 } w = (I - x) / (p - v), u = (p * x - v * I) / (p - v); var m = w * y - C + u , f = m * m / (w * w + 1); return E / 2 * E / 2 >= f } function ae(u, L, w, C, b, E, I, K, x, v, p) { if (0 === x) { return !1 } var f = Math.max(x, 5); if (p > L + f && p > C + f && p > E + f && p > K + f || L - f > p && C - f > p && E - f > p && K - f > p || v > u + f && v > w + f && v > b + f && v > I + f || u - f > v && w - f > v && b - f > v && I - f > v) { return !1 } var y = am.cubicProjectPoint(u, L, w, C, b, E, I, K, v, p, null); return f / 2 >= y } function R(f, C, p, v, b, w, x, y, u) { if (0 === x) { return !1 } var m = Math.max(x, 5); if (u > C + m && u > v + m && u > w + m || C - m > u && v - m > u && w - m > u || y > f + m && y > p + m && y > b + m || f - m > y && p - m > y && b - m > y) { return !1 } var c = am.quadraticProjectPoint(f, C, p, v, b, w, y, u, null); return m / 2 >= c } function M(u, w, C, b, E, K, L, x, v) { if (0 === L) { return !1 } var t = Math.max(L, 5); x -= u, v -= w; var f = Math.sqrt(x * x + v * v); if (f - t > C || C > f + t) { return !1 } if (Math.abs(b - E) >= B) { return !0 } if (K) { var y = b; b = ag(E), E = ag(y) } else { b = ag(b), E = ag(E) } b > E && (E += B); var I = Math.atan2(v, x); return 0 > I && (I += B), I >= b && E >= I || I + B >= b && E >= I + B } function D(f, x, p, u) { for (var x = Math.max(x, 10), b = 0, v = f.length - 1; v > b; b++) { var w = f[b][0] , r = f[b][1] , m = f[b + 1][0] , c = f[b + 1][1]; if (ad(w, r, m, c, x, p, u)) { return !0 } } return !1 } function A(c, m, d, f, b, h) { var l = (b - c) * (b - c) + (h - m) * (h - m); return f * f > l && l > d * d } function Z(c, l, d, f, b, h) { return b >= c && c + d >= b && h >= l && l + f >= h } function ac(c, h, d, f, b) { return d * d > (f - c) * (f - c) + (b - h) * (b - h) } function ai(c, v, d, h, b, m, p, u, f) { return M(c, v, (d + h) / 2, b, m, p, h - d, u, f) } function al(f, C, p) { for (var v = f.length, b = 0, w = 0, x = v - 1; v > w; w++) { var y = f[x][0] , u = f[x][1] , m = f[w][0] , c = f[w][1]; b += aj(y, u, m, c, C, p), x = w } return 0 !== b } function aj(c, v, d, h, b, m) { if (m > v && m > h || v > m && h > m) { return 0 } if (h == v) { return 0 } var p = v > h ? 1 : -1 , u = (m - v) / (h - v) , f = u * (d - c) + c; return f > b ? p : 0 } function J() { var a = G[0]; G[0] = G[1], G[1] = a } function H(x, ar, E, L, b, S, W, X, I, C) { if (C > ar && C > L && C > S && C > X || ar > C && L > C && S > C && X > C) { return 0 } var w = am.cubicRootAt(ar, L, S, X, C, ah); if (0 === w) { return 0 } for (var v, K, T = 0, at = -1, av = 0; w > av; av++) { var au = ah[av] , y = am.cubicAt(x, E, b, W, au); I > y || (0 > at && (at = am.cubicExtrema(ar, L, S, X, G), G[1] < G[0] && at > 1 && J(), v = am.cubicAt(ar, L, S, X, G[0]), at > 1 && (K = am.cubicAt(ar, L, S, X, G[1]))), T += 2 == at ? au < G[0] ? ar > v ? 1 : -1 : au < G[1] ? v > K ? 1 : -1 : K > X ? 1 : -1 : au < G[0] ? ar > v ? 1 : -1 : v > X ? 1 : -1) } return T } function aq(v, T, x, E, b, I, L, S) { if (S > T && S > E && S > I || T > S && E > S && I > S) { return 0 } var y = am.quadraticRootAt(T, E, I, S, ah); if (0 === y) { return 0 } var w = am.quadraticExtremum(T, E, I); if (w >= 0 && 1 >= w) { for (var u = 0, f = am.quadraticAt(T, E, I, w), C = 0; y > C; C++) { var K = am.quadraticAt(v, x, b, ah[C]); L > K || (u += ah[C] < w ? T > f ? 1 : -1 : f > I ? 1 : -1) } return u } var K = am.quadraticAt(v, x, b, ah[0]); return L > K ? 0 : T > I ? 1 : -1 } function z(v, x, E, b, I, L, S, y) { if (y -= x, y > E || -E > y) { return 0 } var w = Math.sqrt(E * E - y * y); if (ah[0] = -w, ah[1] = w, Math.abs(b - I) >= B) { b = 0, I = B; var t = L ? 1 : -1; return S >= ah[0] + v && S <= ah[1] + v ? t : 0 } if (L) { var w = b; b = ag(I), I = ag(w) } else { b = ag(b), I = ag(I) } b > I && (I += B); for (var f = 0, C = 0; 2 > C; C++) { var K = ah[C]; if (K + v > S) { var T = Math.atan2(y, K) , t = L ? 1 : -1; 0 > T && (T = B + T), (T >= b && I >= T || T + B >= b && I >= T + B) && (T > Math.PI / 2 && T < 1.5 * Math.PI && (t = -t), f += t) } } return f } function j(s, aA, E, aw, f) { var ax = 0 , r = 0 , h = 0 , av = 0 , ay = 0 , aC = !0 , aE = !0; E = E || "fill"; for (var y = "stroke" === E || "both" === E, b = "fill" === E || "both" === E, aH = 0; aH < s.length; aH++) { var ar = s[aH] , aD = ar.points; if (aC || "M" === ar.command) { if (aH > 0 && (b && (ax += aj(r, h, av, ay, aw, f)), 0 !== ax)) { return !0 } av = aD[aD.length - 2], ay = aD[aD.length - 1], aC = !1, aE && "A" !== ar.command && (aE = !1, r = av, h = ay) } switch (ar.command) { case "M": r = aD[0], h = aD[1]; break; case "L": if (y && ad(r, h, aD[0], aD[1], aA, aw, f)) { return !0 } b && (ax += aj(r, h, aD[0], aD[1], aw, f)), r = aD[0], h = aD[1]; break; case "C": if (y && ae(r, h, aD[0], aD[1], aD[2], aD[3], aD[4], aD[5], aA, aw, f)) { return !0 } b && (ax += H(r, h, aD[0], aD[1], aD[2], aD[3], aD[4], aD[5], aw, f)), r = aD[4], h = aD[5]; break; case "Q": if (y && R(r, h, aD[0], aD[1], aD[2], aD[3], aA, aw, f)) { return !0 } b && (ax += aq(r, h, aD[0], aD[1], aD[2], aD[3], aw, f)), r = aD[2], h = aD[3]; break; case "A": var au = aD[0] , aF = aD[1] , aG = aD[2] , aI = aD[3] , U = aD[4] , az = aD[5] , at = Math.cos(U) * aG + au , l = Math.sin(U) * aI + aF; aE ? (aE = !1, av = at, ay = l) : ax += aj(r, h, at, l); var aB = (aw - au) * aI / aG + au; if (y && M(au, aF, aI, U, U + az, 1 - aD[7], aA, aB, f)) { return !0 } b && (ax += z(au, aF, aI, U, U + az, 1 - aD[7], aB, f)), r = Math.cos(U + az) * aG + au, h = Math.sin(U + az) * aI + aF; break; case "z": if (y && ad(r, h, av, ay, aA, aw, f)) { return !0 } aC = !0 } } return b && (ax += aj(r, h, av, ay, aw, f)), 0 !== ax } function ao(c, l) { var d = c + ":" + l; if (an[d]) { return an[d] } ak = ak || Y.getContext(), ak.save(), l && (ak.font = l), c = (c + "").split("\n"); for (var f = 0, b = 0, h = c.length; h > b; b++) { f = Math.max(ak.measureText(c[b]).width, f) } return ak.restore(), an[d] = f, ++O > Q && (O = 0, an = {}), f } function P(a, d) { var b = a + ":" + d; if (ap[b]) { return ap[b] } ak = ak || Y.getContext(), ak.save(), d && (ak.font = d), a = (a + "").split("\n"); var c = (ak.measureText("国").width + 2) * a.length; return ak.restore(), ap[b] = c, ++af > Q && (af = 0, ap = {}), c } var ak, Y = F("./util"), am = F("./curve"), an = {}, ap = {}, O = 0, af = 0, Q = 5000, B = 2 * Math.PI, ah = [-1, -1, -1], G = [-1, -1]; return { isInside: N, isOutside: ab, getTextWidth: ao, getTextHeight: P, isInsidePath: j, isInsidePolygon: al, isInsideSector: ai, isInsideCircle: ac, isInsideLine: ad, isInsideRect: Z, isInsidePolyline: D, isInsideCubicStroke: ae, isInsideQuadraticStroke: R } }), define("zrender/shape/Base", ["require", "../tool/matrix", "../tool/guid", "../tool/util", "../tool/log", "../mixin/Transformable", "../mixin/Eventful", "../tool/area", "../tool/color"], function(p) { function B(K, G, e, H, I, J, E) { I && (K.font = I), K.textAlign = J, K.textBaseline = E; var D = u(G, e, H, I, J, E); G = (G + "").split("\n"); var C = p("../tool/area").getTextHeight("国", I); switch (E) { case "top": H = D.y; break; case "bottom": H = D.y + C; break; default: H = D.y + C / 2 } for (var i = 0, F = G.length; F > i; i++) { K.fillText(G[i], e, H), H += C } } function u(G, e, C, c, D, E) { var F = p("../tool/area") , m = F.getTextWidth(G, c) , d = F.getTextHeight("国", c); switch (G = (G + "").split("\n"), D) { case "end": case "right": e -= m; break; case "center": e -= m / 2 } switch (E) { case "top": break; case "bottom": C -= d * G.length; break; default: C -= d * G.length / 2 } return { x: e, y: C, width: m, height: d * G.length } } var x = window.G_vmlCanvasManager , b = p("../tool/matrix") , y = p("../tool/guid") , z = p("../tool/util") , A = p("../tool/log") , v = p("../mixin/Transformable") , q = p("../mixin/Eventful") , j = function(a) { a = a || {}, this.id = a.id || y(); for (var c in a) { this[c] = a[c] } this.style = this.style || {}, this.highlightStyle = this.highlightStyle || null, this.parent = null, this.__dirty = !0, this.__clipShapes = [], v.call(this), q.call(this) }; j.prototype.invisible = !1, j.prototype.ignore = !1, j.prototype.zlevel = 0, j.prototype.draggable = !1, j.prototype.clickable = !1, j.prototype.hoverable = !0, j.prototype.z = 0, j.prototype.brush = function(a, d) { var c = this.beforeBrush(a, d); switch (a.beginPath(), this.buildPath(a, c), c.brushType) { case "both": a.fill(); case "stroke": c.lineWidth > 0 && a.stroke(); break; default: a.fill() } this.drawText(a, c, this.style), this.afterBrush(a) } , j.prototype.beforeBrush = function(a, d) { var c = this.style; return this.brushTypeOnly && (c.brushType = this.brushTypeOnly), d && (c = this.getHighlightStyle(c, this.highlightStyle || {}, this.brushTypeOnly)), "stroke" == this.brushTypeOnly && (c.strokeColor = c.strokeColor || c.color), a.save(), this.doClip(a), this.setContext(a, c), this.setTransform(a), c } , j.prototype.afterBrush = function(a) { a.restore() } ; var f = [["color", "fillStyle"], ["strokeColor", "strokeStyle"], ["opacity", "globalAlpha"], ["lineCap", "lineCap"], ["lineJoin", "lineJoin"], ["miterLimit", "miterLimit"], ["lineWidth", "lineWidth"], ["shadowBlur", "shadowBlur"], ["shadowColor", "shadowColor"], ["shadowOffsetX", "shadowOffsetX"], ["shadowOffsetY", "shadowOffsetY"]]; j.prototype.setContext = function(d, C) { for (var h = 0, l = f.length; l > h; h++) { var c = f[h][0] , m = C[c] , s = f[h][1]; "undefined" != typeof m && (d[s] = m) } } ; var w = b.create(); return j.prototype.doClip = function(a) { if (this.__clipShapes && !x) { for (var h = 0; h < this.__clipShapes.length; h++) { var c = this.__clipShapes[h]; if (c.needTransform) { var d = c.transform; b.invert(w, d), a.transform(d[0], d[1], d[2], d[3], d[4], d[5]) } if (a.beginPath(), c.buildPath(a, c.style), a.clip(), c.needTransform) { var d = w; a.transform(d[0], d[1], d[2], d[3], d[4], d[5]) } } } } , j.prototype.getHighlightStyle = function(C, d, e) { var c = {}; for (var h in C) { c[h] = C[h] } var l = p("../tool/color") , m = l.getHighlightColor(); "stroke" != C.brushType ? (c.strokeColor = m, c.lineWidth = (C.lineWidth || 1) + this.getHighlightZoom(), c.brushType = "both") : "stroke" != e ? (c.strokeColor = m, c.lineWidth = (C.lineWidth || 1) + this.getHighlightZoom()) : c.strokeColor = d.strokeColor || l.mix(C.strokeColor, l.toRGB(m)); for (var h in d) { "undefined" != typeof d[h] && (c[h] = d[h]) } return c } , j.prototype.getHighlightZoom = function() { return "text" != this.type ? 6 : 2 } , j.prototype.drift = function(a, c) { this.position[0] += a, this.position[1] += c } , j.prototype.buildPath = function() { A("buildPath not implemented in " + this.type) } , j.prototype.getRect = function() { A("getRect not implemented in " + this.type) } , j.prototype.isCover = function(d, a) { var c = this.transformCoordToLocal(d, a); return d = c[0], a = c[1], this.isCoverRect(d, a) ? p("../tool/area").isInside(this, this.style, d, a) : !1 } , j.prototype.isCoverRect = function(a, d) { var c = this.style.__rect; return c || (c = this.style.__rect = this.getRect(this.style)), a >= c.x && a <= c.x + c.width && d >= c.y && d <= c.y + c.height } , j.prototype.drawText = function(E, I, L) { if ("undefined" != typeof I.text && I.text !== !1) { var t = I.textColor || I.color || I.strokeColor; E.fillStyle = t; var M, O, P, J, H = 10, D = I.textPosition || this.textPosition || "top"; switch (D) { case "inside": case "top": case "bottom": case "left": case "right": if (this.getRect) { var C = (L || I).__rect || this.getRect(L || I); switch (D) { case "inside": P = C.x + C.width / 2, J = C.y + C.height / 2, M = "center", O = "middle", "stroke" != I.brushType && t == I.color && (E.fillStyle = "#fff"); break; case "left": P = C.x - H, J = C.y + C.height / 2, M = "end", O = "middle"; break; case "right": P = C.x + C.width + H, J = C.y + C.height / 2, M = "start", O = "middle"; break; case "top": P = C.x + C.width / 2, J = C.y - H, M = "center", O = "bottom"; break; case "bottom": P = C.x + C.width / 2, J = C.y + C.height + H, M = "center", O = "top" } } break; case "start": case "end": var K = I.pointList || [[I.xStart || 0, I.yStart || 0], [I.xEnd || 0, I.yEnd || 0]] , N = K.length; if (2 > N) { return } var Q, S, R, G; switch (D) { case "start": Q = K[1][0], S = K[0][0], R = K[1][1], G = K[0][1]; break; case "end": Q = K[N - 2][0], S = K[N - 1][0], R = K[N - 2][1], G = K[N - 1][1] } P = S, J = G; var F = Math.atan((R - G) / (S - Q)) / Math.PI * 180; 0 > S - Q ? F += 180 : 0 > R - G && (F += 360), H = 5, F >= 30 && 150 >= F ? (M = "center", O = "bottom", J -= H) : F > 150 && 210 > F ? (M = "right", O = "middle", P -= H) : F >= 210 && 330 >= F ? (M = "center", O = "top", J += H) : (M = "left", O = "middle", P += H); break; case "specific": P = I.textX || 0, J = I.textY || 0, M = "start", O = "middle" } null != P && null != J && B(E, I.text, P, J, I.textFont, I.textAlign || M, I.textBaseline || O) } } , j.prototype.modSelf = function() { this.__dirty = !0, this.style && (this.style.__rect = null), this.highlightStyle && (this.highlightStyle.__rect = null) } , j.prototype.isSilent = function() { return !(this.hoverable || this.draggable || this.clickable || this.onmousemove || this.onmouseover || this.onmouseout || this.onmousedown || this.onmouseup || this.onclick || this.ondragenter || this.ondragover || this.ondragleave || this.ondrop) } , z.merge(j.prototype, v.prototype, !0), z.merge(j.prototype, q.prototype, !0), j }), define("zrender/tool/curve", ["require", "./vector"], function(z) { function L(a) { return a > -N && N > a } function D(a) { return a > N || -N > a } function G(c, l, d, f, b) { var h = 1 - b; return h * h * (h * c + 3 * b * l) + b * b * (b * f + 3 * h * d) } function q(c, l, d, f, b) { var h = 1 - b; return 3 * (((l - c) * h + 2 * (d - l) * b) * h + (f - d) * b * b) } function H(T, Z, ae, t, af, ah) { var ai = t + 3 * (Z - ae) - T , ab = 3 * (ae - 2 * Z + T) , Y = 3 * (Z - T) , S = T - af , R = ab * ab - 3 * ai * Y , ad = ab * Y - 9 * ai * S , ag = Y * Y - 3 * ab * S , aj = 0; if (L(R) && L(ad)) { if (L(ab)) { ah[0] = 0 } else { var am = -Y / ab; am >= 0 && 1 >= am && (ah[aj++] = am) } } else { var ak = ad * ad - 4 * R * ag; if (L(ak)) { var ar = ad / R , am = -ab / ai + ar , Q = -ar / 2; am >= 0 && 1 >= am && (ah[aj++] = am), Q >= 0 && 1 >= Q && (ah[aj++] = Q) } else { if (ak > 0) { var f = Math.sqrt(ak) , ap = R * ab + 1.5 * ai * (-ad + f) , aa = R * ab + 1.5 * ai * (-ad - f); ap = 0 > ap ? -Math.pow(-ap, A) : Math.pow(ap, A), aa = 0 > aa ? -Math.pow(-aa, A) : Math.pow(aa, A); var am = (-ab - (ap + aa)) / (3 * ai); am >= 0 && 1 >= am && (ah[aj++] = am) } else { var al = (2 * R * ab - 3 * ai * ad) / (2 * Math.sqrt(R * R * R)) , ac = Math.acos(al) / 3 , an = Math.sqrt(R) , ao = Math.cos(ac) , am = (-ab - 2 * an * ao) / (3 * ai) , Q = (-ab + an * (ao + B * Math.sin(ac))) / (3 * ai) , aq = (-ab + an * (ao - B * Math.sin(ac))) / (3 * ai); am >= 0 && 1 >= am && (ah[aj++] = am), Q >= 0 && 1 >= Q && (ah[aj++] = Q), aq >= 0 && 1 >= aq && (ah[aj++] = aq) } } } return aj } function J(t, S, b, T, V) { var W = 6 * b - 12 * S + 6 * t , Q = 9 * S + 3 * T - 3 * t - 9 * b , y = 3 * S - 3 * t , i = 0; if (L(Q)) { if (D(W)) { var f = -y / W; f >= 0 && 1 >= f && (V[i++] = f) } } else { var R = W * W - 4 * Q * y; if (L(R)) { V[0] = -W / (2 * Q) } else { if (R > 0) { var U = Math.sqrt(R) , f = (-W + U) / (2 * Q) , X = (-W - U) / (2 * Q); f >= 0 && 1 >= f && (V[i++] = f), X >= 0 && 1 >= X && (V[i++] = X) } } } return i } function K(p, V, y, R, b, S) { var T = (V - p) * b + p , U = (y - V) * b + V , Q = (R - y) * b + y , u = (U - T) * b + T , m = (Q - U) * b + U , f = (m - u) * b + u; S[0] = p, S[1] = T, S[2] = u, S[3] = f, S[4] = f, S[5] = m, S[6] = Q, S[7] = R } function E(Q, ad, U, b, Z, ab, ac, W, T, y, n) { var Y, aa = 0.005, ae = 1 / 0; P[0] = T, P[1] = y; for (var S = 0; 1 > S; S += 0.05) { v[0] = G(Q, U, Z, ac, S), v[1] = G(ad, b, ab, W, S); var R = O.distSquare(P, v); ae > R && (Y = S, ae = R) } ae = 1 / 0; for (var ag = 0; 32 > ag && !(N > aa); ag++) { var V = Y - aa , af = Y + aa; v[0] = G(Q, U, Z, ac, V), v[1] = G(ad, b, ab, W, V); var R = O.distSquare(v, P); if (V >= 0 && ae > R) { Y = V, ae = R } else { j[0] = G(Q, U, Z, ac, af), j[1] = G(ad, b, ab, W, af); var X = O.distSquare(j, P); 1 >= af && ae > X ? (Y = af, ae = X) : aa *= 0.5 } } return n && (n[0] = G(Q, U, Z, ac, Y), n[1] = G(ad, b, ab, W, Y)), Math.sqrt(ae) } function C(c, h, d, f) { var b = 1 - f; return b * (b * c + 2 * f * h) + f * f * d } function x(a, d, b, c) { return 2 * ((1 - c) * (d - a) + c * (b - d)) } function w(t, S, b, T, V) { var W = t - 2 * S + b , Q = 2 * (S - t) , y = t - T , i = 0; if (L(W)) { if (D(Q)) { var f = -y / Q; f >= 0 && 1 >= f && (V[i++] = f) } } else { var R = Q * Q - 4 * W * y; if (L(R)) { var f = -Q / (2 * W); f >= 0 && 1 >= f && (V[i++] = f) } else { if (R > 0) { var U = Math.sqrt(R) , f = (-Q + U) / (2 * W) , X = (-Q - U) / (2 * W); f >= 0 && 1 >= f && (V[i++] = f), X >= 0 && 1 >= X && (V[i++] = X) } } } return i } function F(a, d, b) { var c = a + b - 2 * d; return 0 === c ? 0.5 : (a - d) / c } function I(c, p, d, f, b) { var h = (p - c) * f + c , l = (d - p) * f + p , m = (l - h) * f + h; b[0] = c, b[1] = h, b[2] = m, b[3] = m, b[4] = l, b[5] = d } function M(Q, ac, T, X, b, Y, aa, ab, V) { var y, h = 0.005, W = 1 / 0; P[0] = aa, P[1] = ab; for (var Z = 0; 1 > Z; Z += 0.05) { v[0] = C(Q, T, b, Z), v[1] = C(ac, X, Y, Z); var ad = O.distSquare(P, v); W > ad && (y = Z, W = ad) } W = 1 / 0; for (var S = 0; 32 > S && !(N > h); S++) { var R = y - h , ae = y + h; v[0] = C(Q, T, b, R), v[1] = C(ac, X, Y, R); var ad = O.distSquare(v, P); if (R >= 0 && W > ad) { y = R, W = ad } else { j[0] = C(Q, T, b, ae), j[1] = C(ac, X, Y, ae); var U = O.distSquare(j, P); 1 >= ae && W > U ? (y = ae, W = U) : h *= 0.5 } } return V && (V[0] = C(Q, T, b, y), V[1] = C(ac, X, Y, y)), Math.sqrt(W) } var O = z("./vector") , N = 0.0001 , B = Math.sqrt(3) , A = 1 / 3 , P = O.create() , v = O.create() , j = O.create(); return { cubicAt: G, cubicDerivativeAt: q, cubicRootAt: H, cubicExtrema: J, cubicSubdivide: K, cubicProjectPoint: E, quadraticAt: C, quadraticDerivativeAt: x, quadraticRootAt: w, quadraticExtremum: F, quadraticSubdivide: I, quadraticProjectPoint: M } }), define("zrender/mixin/Transformable", ["require", "../tool/matrix", "../tool/vector"], function(c) { function q(a) { return a > -p && p > a } function d(a) { return a > p || -p > a } var h = c("../tool/matrix") , b = c("../tool/vector") , j = [0, 0] , m = h.translate , p = 5e-05 , f = function() { this.position || (this.position = [0, 0]), "undefined" == typeof this.rotation && (this.rotation = [0, 0, 0]), this.scale || (this.scale = [1, 1, 0, 0]), this.needLocalTransform = !1, this.needTransform = !1 }; return f.prototype = { constructor: f, updateNeedTransform: function() { this.needLocalTransform = d(this.rotation[0]) || d(this.position[0]) || d(this.position[1]) || d(this.scale[0] - 1) || d(this.scale[1] - 1) }, updateTransform: function() { this.updateNeedTransform(); var l = this.parent && this.parent.needTransform; if (this.needTransform = this.needLocalTransform || l, this.needTransform) { var o = this.transform || h.create(); if (h.identity(o), this.needLocalTransform) { var i = this.scale; if (d(i[0]) || d(i[1])) { j[0] = -i[2] || 0, j[1] = -i[3] || 0; var n = d(j[0]) || d(j[1]); n && m(o, o, j), h.scale(o, o, i), n && (j[0] = -j[0], j[1] = -j[1], m(o, o, j)) } if (this.rotation instanceof Array) { if (0 !== this.rotation[0]) { j[0] = -this.rotation[1] || 0, j[1] = -this.rotation[2] || 0; var n = d(j[0]) || d(j[1]); n && m(o, o, j), h.rotate(o, o, this.rotation[0]), n && (j[0] = -j[0], j[1] = -j[1], m(o, o, j)) } } else { 0 !== this.rotation && h.rotate(o, o, this.rotation) } (d(this.position[0]) || d(this.position[1])) && m(o, o, this.position) } l && (this.needLocalTransform ? h.mul(o, this.parent.transform, o) : h.copy(o, this.parent.transform)), this.transform = o, this.invTransform = this.invTransform || h.create(), h.invert(this.invTransform, o) } }, setTransform: function(a) { if (this.needTransform) { var i = this.transform; a.transform(i[0], i[1], i[2], i[3], i[4], i[5]) } }, lookAt: function() { var a = b.create(); return function(e) { this.transform || (this.transform = h.create()); var l = this.transform; if (b.sub(a, e, this.position), !q(a[0]) || !q(a[1])) { b.normalize(a, a); var n = this.scale; l[2] = a[0] * n[1], l[3] = a[1] * n[1], l[0] = a[1] * n[0], l[1] = -a[0] * n[0], l[4] = this.position[0], l[5] = this.position[1], this.decomposeTransform() } } }(), decomposeTransform: function() { if (this.transform) { var l = this.transform , w = l[0] * l[0] + l[1] * l[1] , s = this.position , i = this.scale , u = this.rotation; d(w - 1) && (w = Math.sqrt(w)); var v = l[2] * l[2] + l[3] * l[3]; d(v - 1) && (v = Math.sqrt(v)), s[0] = l[4], s[1] = l[5], i[0] = w, i[1] = v, i[2] = i[3] = 0, u[0] = Math.atan2(-l[1] / v, l[0] / w), u[1] = u[2] = 0 } }, transformCoordToLocal: function(a, n) { var l = [a, n]; return this.needTransform && this.invTransform && b.applyTransform(l, l, this.invTransform), l } }, f }), define("zrender/Group", ["require", "./tool/guid", "./tool/util", "./mixin/Transformable", "./mixin/Eventful"], function(c) { var j = c("./tool/guid") , d = c("./tool/util") , f = c("./mixin/Transformable") , b = c("./mixin/Eventful") , h = function(a) { a = a || {}, this.id = a.id || j(); for (var l in a) { this[l] = a[l] } this.type = "group", this.clipShape = null, this._children = [], this._storage = null, this.__dirty = !0, f.call(this), b.call(this) }; return h.prototype.ignore = !1, h.prototype.children = function() { return this._children.slice() } , h.prototype.childAt = function(a) { return this._children[a] } , h.prototype.addChild = function(a) { a != this && a.parent != this && (a.parent && a.parent.removeChild(a), this._children.push(a), a.parent = this, this._storage && this._storage !== a._storage && (this._storage.addToMap(a), a instanceof h && a.addChildrenToStorage(this._storage))) } , h.prototype.removeChild = function(a) { var i = d.indexOf(this._children, a); i >= 0 && this._children.splice(i, 1), a.parent = null, this._storage && (this._storage.delFromMap(a.id), a instanceof h && a.delChildrenFromStorage(this._storage)) } , h.prototype.clearChildren = function() { for (var a = 0; a < this._children.length; a++) { var i = this._children[a]; this._storage && (this._storage.delFromMap(i.id), i instanceof h && i.delChildrenFromStorage(this._storage)) } this._children.length = 0 } , h.prototype.eachChild = function(m, q) { for (var o = !!q, p = 0; p < this._children.length; p++) { var l = this._children[p]; o ? m.call(q, l) : m(l) } } , h.prototype.traverse = function(m, q) { for (var o = !!q, p = 0; p < this._children.length; p++) { var l = this._children[p]; o ? m.call(q, l) : m(l), "group" === l.type && l.traverse(m, q) } } , h.prototype.addChildrenToStorage = function(a) { for (var m = 0; m < this._children.length; m++) { var l = this._children[m]; a.addToMap(l), l instanceof h && l.addChildrenToStorage(a) } } , h.prototype.delChildrenFromStorage = function(a) { for (var m = 0; m < this._children.length; m++) { var l = this._children[m]; a.delFromMap(l.id), l instanceof h && l.delChildrenFromStorage(a) } } , h.prototype.modSelf = function() { this.__dirty = !0 } , d.merge(h.prototype, f.prototype, !0), d.merge(h.prototype, b.prototype, !0), h }), define("zrender/animation/Clip", ["require", "./easing"], function(a) { function c(d) { this._targetPool = d.target || {}, this._targetPool instanceof Array || (this._targetPool = [this._targetPool]), this._life = d.life || 1000, this._delay = d.delay || 0, this._startTime = (new Date).getTime() + this._delay, this._endTime = this._startTime + 1000 * this._life, this.loop = "undefined" == typeof d.loop ? !1 : d.loop, this.gap = d.gap || 0, this.easing = d.easing || "Linear", this.onframe = d.onframe, this.ondestroy = d.ondestroy, this.onrestart = d.onrestart } var b = a("./easing"); return c.prototype = { step: function(f) { var i = (f - this._startTime) / this._life; if (!(0 > i)) { i = Math.min(i, 1); var h = "string" == typeof this.easing ? b[this.easing] : this.easing , d = "function" == typeof h ? h(i) : i; return this.fire("frame", d), 1 == i ? this.loop ? (this.restart(), "restart") : (this.__needsRemove = !0, "destroy") : null } }, restart: function() { var d = (new Date).getTime() , f = (d - this._startTime) % this._life; this._startTime = (new Date).getTime() - f + this.gap, this.__needsRemove = !1 }, fire: function(d, j) { for (var f = 0, h = this._targetPool.length; h > f; f++) { this["on" + d] && this["on" + d](this._targetPool[f], j) } }, constructor: c }, c }), define("zrender/animation/easing", [], function() { var a = { Linear: function(b) { return b }, QuadraticIn: function(b) { return b * b }, QuadraticOut: function(b) { return b * (2 - b) }, QuadraticInOut: function(b) { return (b *= 2) < 1 ? 0.5 * b * b : -0.5 * (--b * (b - 2) - 1) }, CubicIn: function(b) { return b * b * b }, CubicOut: function(b) { return --b * b * b + 1 }, CubicInOut: function(b) { return (b *= 2) < 1 ? 0.5 * b * b * b : 0.5 * ((b -= 2) * b * b + 2) }, QuarticIn: function(b) { return b * b * b * b }, QuarticOut: function(b) { return 1 - --b * b * b * b }, QuarticInOut: function(b) { return (b *= 2) < 1 ? 0.5 * b * b * b * b : -0.5 * ((b -= 2) * b * b * b - 2) }, QuinticIn: function(b) { return b * b * b * b * b }, QuinticOut: function(b) { return --b * b * b * b * b + 1 }, QuinticInOut: function(b) { return (b *= 2) < 1 ? 0.5 * b * b * b * b * b : 0.5 * ((b -= 2) * b * b * b * b + 2) }, SinusoidalIn: function(b) { return 1 - Math.cos(b * Math.PI / 2) }, SinusoidalOut: function(b) { return Math.sin(b * Math.PI / 2) }, SinusoidalInOut: function(b) { return 0.5 * (1 - Math.cos(Math.PI * b)) }, ExponentialIn: function(b) { return 0 === b ? 0 : Math.pow(1024, b - 1) }, ExponentialOut: function(b) { return 1 === b ? 1 : 1 - Math.pow(2, -10 * b) }, ExponentialInOut: function(b) { return 0 === b ? 0 : 1 === b ? 1 : (b *= 2) < 1 ? 0.5 * Math.pow(1024, b - 1) : 0.5 * (-Math.pow(2, -10 * (b - 1)) + 2) }, CircularIn: function(b) { return 1 - Math.sqrt(1 - b * b) }, CircularOut: function(b) { return Math.sqrt(1 - --b * b) }, CircularInOut: function(b) { return (b *= 2) < 1 ? -0.5 * (Math.sqrt(1 - b * b) - 1) : 0.5 * (Math.sqrt(1 - (b -= 2) * b) + 1) }, ElasticIn: function(b) { var f, c = 0.1, d = 0.4; return 0 === b ? 0 : 1 === b ? 1 : (!c || 1 > c ? (c = 1, f = d / 4) : f = d * Math.asin(1 / c) / (2 * Math.PI), -(c * Math.pow(2, 10 * (b -= 1)) * Math.sin(2 * (b - f) * Math.PI / d))) }, ElasticOut: function(b) { var f, c = 0.1, d = 0.4; return 0 === b ? 0 : 1 === b ? 1 : (!c || 1 > c ? (c = 1, f = d / 4) : f = d * Math.asin(1 / c) / (2 * Math.PI), c * Math.pow(2, -10 * b) * Math.sin(2 * (b - f) * Math.PI / d) + 1) }, ElasticInOut: function(b) { var f, c = 0.1, d = 0.4; return 0 === b ? 0 : 1 === b ? 1 : (!c || 1 > c ? (c = 1, f = d / 4) : f = d * Math.asin(1 / c) / (2 * Math.PI), (b *= 2) < 1 ? -0.5 * c * Math.pow(2, 10 * (b -= 1)) * Math.sin(2 * (b - f) * Math.PI / d) : c * Math.pow(2, -10 * (b -= 1)) * Math.sin(2 * (b - f) * Math.PI / d) * 0.5 + 1) }, BackIn: function(b) { var c = 1.70158; return b * b * ((c + 1) * b - c) }, BackOut: function(b) { var c = 1.70158; return --b * b * ((c + 1) * b + c) + 1 }, BackInOut: function(b) { var c = 2.5949095; return (b *= 2) < 1 ? 0.5 * b * b * ((c + 1) * b - c) : 0.5 * ((b -= 2) * b * ((c + 1) * b + c) + 2) }, BounceIn: function(b) { return 1 - a.BounceOut(1 - b) }, BounceOut: function(b) { return 1 / 2.75 > b ? 7.5625 * b * b : 2 / 2.75 > b ? 7.5625 * (b -= 1.5 / 2.75) * b + 0.75 : 2.5 / 2.75 > b ? 7.5625 * (b -= 2.25 / 2.75) * b + 0.9375 : 7.5625 * (b -= 2.625 / 2.75) * b + 0.984375 }, BounceInOut: function(b) { return 0.5 > b ? 0.5 * a.BounceIn(2 * b) : 0.5 * a.BounceOut(2 * b - 1) + 0.5 } }; return a }), define("echarts/chart/base", ["require", "zrender/shape/Image", "../util/shape/Icon", "../util/shape/MarkLine", "../util/shape/Symbol", "zrender/shape/Polyline", "zrender/shape/ShapeBundle", "../config", "../util/ecData", "../util/ecAnimation", "../util/ecEffect", "../util/accMath", "../component/base", "../layout/EdgeBundling", "zrender/tool/util", "zrender/tool/area"], function(q) { function F(a) { return null != a.x && null != a.y } function x(d, p, h, l, c) { G.call(this, d, p, h, l, c); var m = this; this.selectedMap = {}, this.lastShapeList = [], this.shapeHandler = { onclick: function() { m.isClick = !0 }, ondragover: function(s) { var L = s.target; L.highlightStyle = L.highlightStyle || {}; var u = L.highlightStyle , J = u.brushTyep , o = u.strokeColor , K = u.lineWidth; u.brushType = "stroke", u.strokeColor = m.ecTheme.calculableColor || w.calculableColor, u.lineWidth = "icon" === L.type ? 30 : 10, m.zr.addHoverShape(L), setTimeout(function() { u && (u.brushType = J, u.strokeColor = o, u.lineWidth = K) }, 20) }, ondrop: function(a) { null != j.get(a.dragged, "data") && (m.isDrop = !0) }, ondragend: function() { m.isDragend = !0 } } } var A = q("zrender/shape/Image") , b = q("../util/shape/Icon") , B = q("../util/shape/MarkLine") , D = q("../util/shape/Symbol") , E = q("zrender/shape/Polyline") , y = q("zrender/shape/ShapeBundle") , w = q("../config") , j = q("../util/ecData") , f = q("../util/ecAnimation") , z = q("../util/ecEffect") , C = q("../util/accMath") , G = q("../component/base") , I = q("../layout/EdgeBundling") , H = q("zrender/tool/util") , v = q("zrender/tool/area"); return x.prototype = { setCalculable: function(a) { return a.dragEnableTime = this.ecTheme.DRAG_ENABLE_TIME || w.DRAG_ENABLE_TIME, a.ondragover = this.shapeHandler.ondragover, a.ondragend = this.shapeHandler.ondragend, a.ondrop = this.shapeHandler.ondrop, a }, ondrop: function(p, Q) { if (this.isDrop && p.target && !Q.dragIn) { var J, M = p.target, d = p.dragged, N = j.get(M, "seriesIndex"), O = j.get(M, "dataIndex"), P = this.series, K = this.component.legend; if (-1 === O) { if (j.get(d, "seriesIndex") == N) { return Q.dragOut = Q.dragIn = Q.needRefresh = !0, void (this.isDrop = !1) } J = { value: j.get(d, "value"), name: j.get(d, "name") }, this.type === w.CHART_TYPE_PIE && J.value < 0 && (J.value = 0); for (var h = !1, L = P[N].data, R = 0, T = L.length; T > R; R++) { L[R].name === J.name && "-" === L[R].value && (P[N].data[R].value = J.value, h = !0) } !h && P[N].data.push(J), K && K.add(J.name, d.style.color || d.style.strokeColor) } else { J = P[N].data[O] || "-", null != J.value ? (P[N].data[O].value = "-" != J.value ? C.accAdd(P[N].data[O].value, j.get(d, "value")) : j.get(d, "value"), (this.type === w.CHART_TYPE_FUNNEL || this.type === w.CHART_TYPE_PIE) && (K && 1 === K.getRelatedAmount(J.name) && this.component.legend.del(J.name), J.name += this.option.nameConnector + j.get(d, "name"), K && K.add(J.name, d.style.color || d.style.strokeColor))) : P[N].data[O] = "-" != J ? C.accAdd(P[N].data[O], j.get(d, "value")) : j.get(d, "value") } Q.dragIn = Q.dragIn || !0, this.isDrop = !1; var S = this; setTimeout(function() { S.zr.trigger("mousemove", p.event) }, 300) } }, ondragend: function(d, J) { if (this.isDragend && d.target && !J.dragOut) { var h = d.target , l = j.get(h, "seriesIndex") , c = j.get(h, "dataIndex") , m = this.series; if (null != m[l].data[c].value) { m[l].data[c].value = "-"; var p = m[l].data[c].name , u = this.component.legend; u && 0 === u.getRelatedAmount(p) && u.del(p) } else { m[l].data[c] = "-" } J.dragOut = !0, J.needRefresh = !0, this.isDragend = !1 } }, onlegendSelected: function(a, h) { var c = a.selected; for (var d in this.selectedMap) { this.selectedMap[d] != c[d] && (h.needRefresh = !0), this.selectedMap[d] = c[d] } }, _buildPosition: function() { this._symbol = this.option.symbolList, this._sIndex2ShapeMap = {}, this._sIndex2ColorMap = {}, this.selectedMap = {}, this.xMarkMap = {}; for (var d, L, h, p, c = this.series, u = { top: [], bottom: [], left: [], right: [], other: [] }, J = 0, K = c.length; K > J; J++) { c[J].type === this.type && (c[J] = this.reformOption(c[J]), this.legendHoverLink = c[J].legendHoverLink || this.legendHoverLink, d = c[J].xAxisIndex, L = c[J].yAxisIndex, h = this.component.xAxis.getAxis(d), p = this.component.yAxis.getAxis(L), h.type === w.COMPONENT_TYPE_AXIS_CATEGORY ? u[h.getPosition()].push(J) : p.type === w.COMPONENT_TYPE_AXIS_CATEGORY ? u[p.getPosition()].push(J) : u.other.push(J)) } for (var m in u) { u[m].length > 0 && this._buildSinglePosition(m, u[m]) } this.addShapeList() }, _buildSinglePosition: function(d, s) { var h = this._mapData(s) , l = h.locationMap , c = h.maxDataLength; if (0 !== c && 0 !== l.length) { switch (d) { case "bottom": case "top": this._buildHorizontal(s, c, l, this.xMarkMap); break; case "left": case "right": this._buildVertical(s, c, l, this.xMarkMap); break; case "other": this._buildOther(s, c, l, this.xMarkMap) } for (var m = 0, p = s.length; p > m; m++) { this.buildMark(s[m]) } } }, _mapData: function(L) { for (var W, M, P, h, Q = this.series, S = 0, T = {}, N = "__kener__stack__", K = this.component.legend, J = [], O = 0, R = 0, X = L.length; X > R; R++) { if (W = Q[L[R]], P = W.name, this._sIndex2ShapeMap[L[R]] = this._sIndex2ShapeMap[L[R]] || this.query(W, "symbol") || this._symbol[R % this._symbol.length], K) { if (this.selectedMap[P] = K.isSelected(P), this._sIndex2ColorMap[L[R]] = K.getColor(P), h = K.getItemShape(P)) { var Z = h.style; if (this.type == w.CHART_TYPE_LINE) { Z.iconType = "legendLineIcon", Z.symbol = this._sIndex2ShapeMap[L[R]] } else { if (W.itemStyle.normal.barBorderWidth > 0) { var Y = h.highlightStyle; Z.brushType = "both", Z.x += 1, Z.y += 1, Z.width -= 2, Z.height -= 2, Z.strokeColor = Y.strokeColor = W.itemStyle.normal.barBorderColor, Y.lineWidth = 3 } } K.setItemShape(P, h) } } else { this.selectedMap[P] = !0, this._sIndex2ColorMap[L[R]] = this.zr.getColor(L[R]) } this.selectedMap[P] && (M = W.stack || N + L[R], null == T[M] ? (T[M] = S, J[S] = [L[R]], S++) : J[T[M]].push(L[R])), O = Math.max(O, W.data.length) } return { locationMap: J, maxDataLength: O } }, _calculMarkMapXY: function(L, V, N) { for (var Q = this.series, u = 0, R = V.length; R > u; u++) { for (var T = 0, U = V[u].length; U > T; T++) { var O = V[u][T] , M = "xy" == N ? 0 : "" , K = this.component.grid , J = L[O]; if ("-1" != N.indexOf("x")) { J["counter" + M] > 0 && (J["average" + M] = J["sum" + M] / J["counter" + M]); var P = this.component.xAxis.getAxis(Q[O].xAxisIndex || 0).getCoord(J["average" + M]); J["averageLine" + M] = [[P, K.getYend()], [P, K.getY()]], J["minLine" + M] = [[J["minX" + M], K.getYend()], [J["minX" + M], K.getY()]], J["maxLine" + M] = [[J["maxX" + M], K.getYend()], [J["maxX" + M], K.getY()]], J.isHorizontal = !1 } if (M = "xy" == N ? 1 : "", "-1" != N.indexOf("y")) { J["counter" + M] > 0 && (J["average" + M] = J["sum" + M] / J["counter" + M]); var S = this.component.yAxis.getAxis(Q[O].yAxisIndex || 0).getCoord(J["average" + M]); J["averageLine" + M] = [[K.getX(), S], [K.getXend(), S]], J["minLine" + M] = [[K.getX(), J["minY" + M]], [K.getXend(), J["minY" + M]]], J["maxLine" + M] = [[K.getX(), J["maxY" + M]], [K.getXend(), J["maxY" + M]]], J.isHorizontal = !0 } } } }, addLabel: function(J, R, L, N, m) { var O = [L, R] , P = this.deepMerge(O, "itemStyle.normal.label") , Q = this.deepMerge(O, "itemStyle.emphasis.label") , M = P.textStyle || {} , K = Q.textStyle || {}; if (P.show) { var u = J.style; u.text = this._getLabelText(R, L, N, "normal"), u.textPosition = null == P.position ? "horizontal" === m ? "right" : "top" : P.position, u.textColor = M.color, u.textFont = this.getFont(M), u.textAlign = M.align, u.textBaseline = M.baseline } if (Q.show) { var p = J.highlightStyle; p.text = this._getLabelText(R, L, N, "emphasis"), p.textPosition = P.show ? J.style.textPosition : null == Q.position ? "horizontal" === m ? "right" : "top" : Q.position, p.textColor = K.color, p.textFont = this.getFont(K), p.textAlign = K.align, p.textBaseline = K.baseline } return J }, _getLabelText: function(d, p, h, l) { var c = this.deepQuery([p, d], "itemStyle." + l + ".label.formatter"); c || "emphasis" !== l || (c = this.deepQuery([p, d], "itemStyle.normal.label.formatter")); var m = this.getDataFromOption(p, "-"); return c ? "function" == typeof c ? c.call(this.myChart, { seriesName: d.name, series: d, name: h, value: m, data: p, status: l }) : "string" == typeof c ? c = c.replace("{a}", "{a0}").replace("{b}", "{b0}").replace("{c}", "{c0}").replace("{a0}", d.name).replace("{b0}", h).replace("{c0}", this.numAddCommas(m)) : void 0 : m instanceof Array ? null != m[2] ? this.numAddCommas(m[2]) : m[0] + " , " + m[1] : this.numAddCommas(m) }, buildMark: function(a) { var c = this.series[a]; this.selectedMap[c.name] && (c.markLine && this._buildMarkLine(a), c.markPoint && this._buildMarkPoint(a)) }, _buildMarkPoint: function(u) { for (var P, J, L = (this.markAttachStyle || {})[u], h = this.series[u], M = H.clone(h.markPoint), N = 0, O = M.data.length; O > N; N++) { P = M.data[N], J = this.getMarkCoord(u, P), P.x = null != P.x ? P.x : J[0], P.y = null != P.y ? P.y : J[1], !P.type || "max" !== P.type && "min" !== P.type || (P.value = J[3], P.name = P.name || P.type, P.symbolSize = P.symbolSize || v.getTextWidth(J[3], this.getFont()) / 2 + 5) } for (var K = this._markPoint(u, M), N = 0, O = K.length; O > N; N++) { var p = K[N]; p.zlevel = h.zlevel, p.z = h.z + 1; for (var m in L) { p[m] = H.clone(L[m]) } this.shapeList.push(p) } if (this.type === w.CHART_TYPE_FORCE || this.type === w.CHART_TYPE_CHORD) { for (var N = 0, O = K.length; O > N; N++) { this.zr.addShape(K[N]) } } }, _buildMarkLine: function(K) { for (var T, M = (this.markAttachStyle || {})[K], O = this.series[K], h = H.clone(O.markLine), P = 0, R = h.data.length; R > P; P++) { var S = h.data[P]; !S.type || "max" !== S.type && "min" !== S.type && "average" !== S.type ? T = [this.getMarkCoord(K, S[0]), this.getMarkCoord(K, S[1])] : (T = this.getMarkCoord(K, S), h.data[P] = [H.clone(S), {}], h.data[P][0].name = S.name || S.type, h.data[P][0].value = "average" !== S.type ? T[3] : +T[3].toFixed(null != h.precision ? h.precision : this.deepQuery([this.ecTheme, w], "markLine.precision")), T = T[2], S = [{}, {}]), null != T && null != T[0] && null != T[1] && (h.data[P][0].x = null != S[0].x ? S[0].x : T[0][0], h.data[P][0].y = null != S[0].y ? S[0].y : T[0][1], h.data[P][1].x = null != S[1].x ? S[1].x : T[1][0], h.data[P][1].y = null != S[1].y ? S[1].y : T[1][1]) } var J = this._markLine(K, h) , l = h.large; if (l) { var N = new y({ style: { shapeList: J } }) , Q = J[0]; if (Q) { H.merge(N.style, Q.style), H.merge(N.highlightStyle = {}, Q.highlightStyle), N.style.brushType = "stroke", N.zlevel = O.zlevel, N.z = O.z + 1, N.hoverable = !1; for (var U in M) { N[U] = H.clone(M[U]) } } this.shapeList.push(N), this.zr.addShape(N), N._mark = "largeLine"; var W = h.effect; W.show && (N.effect = W) } else { for (var P = 0, R = J.length; R > P; P++) { var L = J[P]; L.zlevel = O.zlevel, L.z = O.z + 1; for (var U in M) { L[U] = H.clone(M[U]) } this.shapeList.push(L) } if (this.type === w.CHART_TYPE_FORCE || this.type === w.CHART_TYPE_CHORD) { for (var P = 0, R = J.length; R > P; P++) { this.zr.addShape(J[P]) } } } }, _markPoint: function(L, X) { var O = this.series[L] , R = this.component; H.merge(H.merge(X, H.clone(this.ecTheme.markPoint || {})), H.clone(w.markPoint)), X.name = O.name; var h, S, U, W, P, K, Q, T = [], Y = X.data, Z = R.dataRange, N = R.legend, M = this.zr.getWidth(), aa = this.zr.getHeight(); if (X.large) { h = this.getLargeMarkPointShape(L, X), h._mark = "largePoint", h && T.push(h) } else { for (var J = 0, d = Y.length; d > J; J++) { null != Y[J].x && null != Y[J].y && (U = null != Y[J].value ? Y[J].value : "", N && (S = N.getColor(O.name)), Z && (S = isNaN(U) ? S : Z.getColor(U), W = [Y[J], X], P = this.deepQuery(W, "itemStyle.normal.color") || S, K = this.deepQuery(W, "itemStyle.emphasis.color") || P, null == P && null == K) || (S = null == S ? this.zr.getColor(L) : S, Y[J].tooltip = Y[J].tooltip || X.tooltip || { trigger: "item" }, Y[J].name = null != Y[J].name ? Y[J].name : "", Y[J].value = U, h = this.getSymbolShape(X, L, Y[J], J, Y[J].name, this.parsePercent(Y[J].x, M), this.parsePercent(Y[J].y, aa), "pin", S, "rgba(0,0,0,0)", "horizontal"), h._mark = "point", Q = this.deepMerge([Y[J], X], "effect"), Q.show && (h.effect = Q), O.type === w.CHART_TYPE_MAP && (h._geo = this.getMarkGeo(Y[J])), j.pack(h, O, L, Y[J], J, Y[J].name, U), T.push(h))) } } return T }, _markLine: function() { function a(c, d) { c[d] = c[d]instanceof Array ? c[d].length > 1 ? c[d] : [c[d][0], c[d][0]] : [c[d], c[d]] } return function(O, Y) { var e = this.series[O] , Z = this.component , ab = Z.dataRange , ac = Z.legend; H.merge(H.merge(Y, H.clone(this.ecTheme.markLine || {})), H.clone(w.markLine)); var T = ac ? ac.getColor(e.name) : this.zr.getColor(O); a(Y, "symbol"), a(Y, "symbolSize"), a(Y, "symbolRotate"); for (var t = Y.data, V = [], aa = this.zr.getWidth(), ae = this.zr.getHeight(), N = 0; N < t.length; N++) { var M = t[N]; if (F(M[0]) && F(M[1])) { var ak = this.deepMerge(M) , h = [ak, Y] , d = T , ai = null != ak.value ? ak.value : ""; if (ab) { d = isNaN(ai) ? d : ab.getColor(ai); var Q = this.deepQuery(h, "itemStyle.normal.color") || d , af = this.deepQuery(h, "itemStyle.emphasis.color") || Q; if (null == Q && null == af) { continue } } M[0].tooltip = ak.tooltip || Y.tooltip || { trigger: "item" }, M[0].name = M[0].name || "", M[1].name = M[1].name || "", M[0].value = ai, V.push({ points: [[this.parsePercent(M[0].x, aa), this.parsePercent(M[0].y, ae)], [this.parsePercent(M[1].x, aa), this.parsePercent(M[1].y, ae)]], rawData: M, color: d }) } } var U = this.query(Y, "bundling.enable"); if (U) { var ag = new I; ag.maxTurningAngle = this.query(Y, "bundling.maxTurningAngle") / 180 * Math.PI, V = ag.run(V) } Y.name = e.name; for (var ah = [], N = 0, aj = V.length; aj > N; N++) { var P = V[N] , ad = P.rawEdge || P , M = ad.rawData , ai = null != M.value ? M.value : "" , R = this.getMarkLineShape(Y, O, M, N, P.points, U, ad.color); R._mark = "line"; var J = this.deepMerge([M[0], M[1], Y], "effect"); J.show && (R.effect = J, R.effect.large = Y.large), e.type === w.CHART_TYPE_MAP && (R._geo = [this.getMarkGeo(M[0]), this.getMarkGeo(M[1])]), j.pack(R, e, O, M[0], N, M[0].name + ("" !== M[1].name ? " > " + M[1].name : ""), ai), ah.push(R) } return ah } }(), getMarkCoord: function() { return [0, 0] }, getSymbolShape: function(J, Z, O, T, X, Y, Q, N, n, S, W) { var aa = [O, J] , ad = this.getDataFromOption(O, "-"); N = this.deepQuery(aa, "symbol") || N; var ab = this.deepQuery(aa, "symbolSize"); ab = "function" == typeof ab ? ab(ad) : ab, "number" == typeof ab && (ab = [ab, ab]); var M = this.deepQuery(aa, "symbolRotate") , K = this.deepMerge(aa, "itemStyle.normal") , ag = this.deepMerge(aa, "itemStyle.emphasis") , d = null != K.borderWidth ? K.borderWidth : K.lineStyle && K.lineStyle.width; null == d && (d = N.match("empty") ? 2 : 0); var a = null != ag.borderWidth ? ag.borderWidth : ag.lineStyle && ag.lineStyle.width; null == a && (a = d + 2); var af = this.getItemStyleColor(K.color, Z, T, O) , P = this.getItemStyleColor(ag.color, Z, T, O) , ac = ab[0] , R = ab[1] , ae = new b({ style: { iconType: N.replace("empty", "").toLowerCase(), x: Y - ac, y: Q - R, width: 2 * ac, height: 2 * R, brushType: "both", color: N.match("empty") ? S : af || n, strokeColor: K.borderColor || af || n, lineWidth: d }, highlightStyle: { color: N.match("empty") ? S : P || af || n, strokeColor: ag.borderColor || K.borderColor || P || af || n, lineWidth: a }, clickable: this.deepQuery(aa, "clickable") }); return N.match("image") && (ae.style.image = N.replace(new RegExp("^image:\\/\\/"), ""), ae = new A({ style: ae.style, highlightStyle: ae.highlightStyle, clickable: this.deepQuery(aa, "clickable") })), null != M && (ae.rotation = [M * Math.PI / 180, Y, Q]), N.match("star") && (ae.style.iconType = "star", ae.style.n = N.replace("empty", "").replace("star", "") - 0 || 5), "none" === N && (ae.invisible = !0, ae.hoverable = !1), ae = this.addLabel(ae, J, O, X, W), N.match("empty") && (null == ae.style.textColor && (ae.style.textColor = ae.style.strokeColor), null == ae.highlightStyle.textColor && (ae.highlightStyle.textColor = ae.highlightStyle.strokeColor)), j.pack(ae, J, Z, O, T, X), ae._x = Y, ae._y = Q, ae._dataIndex = T, ae._seriesIndex = Z, ae }, getMarkLineShape: function(M, Z, Q, W, s, Y, S) { var P = null != Q[0].value ? Q[0].value : "-" , L = null != Q[1].value ? Q[1].value : "-" , K = [Q[0].symbol || M.symbol[0], Q[1].symbol || M.symbol[1]] , T = [Q[0].symbolSize || M.symbolSize[0], Q[1].symbolSize || M.symbolSize[1]]; T[0] = "function" == typeof T[0] ? T[0](P) : T[0], T[1] = "function" == typeof T[1] ? T[1](L) : T[1]; var X = [this.query(Q[0], "symbolRotate") || M.symbolRotate[0], this.query(Q[1], "symbolRotate") || M.symbolRotate[1]] , aa = [Q[0], Q[1], M] , ad = this.deepMerge(aa, "itemStyle.normal"); ad.color = this.getItemStyleColor(ad.color, Z, W, Q); var ab = this.deepMerge(aa, "itemStyle.emphasis"); ab.color = this.getItemStyleColor(ab.color, Z, W, Q); var O = ad.lineStyle , N = ab.lineStyle , af = O.width; null == af && (af = ad.borderWidth); var J = N.width; null == J && (J = null != ab.borderWidth ? ab.borderWidth : af + 2); var o = this.deepQuery(aa, "smoothness"); this.deepQuery(aa, "smooth") || (o = 0); var ae = Y ? E : B , R = new ae({ style: { symbol: K, symbolSize: T, symbolRotate: X, brushType: "both", lineType: O.type, shadowColor: O.shadowColor || O.color || ad.borderColor || ad.color || S, shadowBlur: O.shadowBlur, shadowOffsetX: O.shadowOffsetX, shadowOffsetY: O.shadowOffsetY, color: ad.color || S, strokeColor: O.color || ad.borderColor || ad.color || S, lineWidth: af, symbolBorderColor: ad.borderColor || ad.color || S, symbolBorder: ad.borderWidth }, highlightStyle: { shadowColor: N.shadowColor, shadowBlur: N.shadowBlur, shadowOffsetX: N.shadowOffsetX, shadowOffsetY: N.shadowOffsetY, color: ab.color || ad.color || S, strokeColor: N.color || O.color || ab.borderColor || ad.borderColor || ab.color || ad.color || S, lineWidth: J, symbolBorderColor: ab.borderColor || ad.borderColor || ab.color || ad.color || S, symbolBorder: null == ab.borderWidth ? ad.borderWidth + 2 : ab.borderWidth }, clickable: this.deepQuery(aa, "clickable") }) , ac = R.style; return Y ? (ac.pointList = s, ac.smooth = o) : (ac.xStart = s[0][0], ac.yStart = s[0][1], ac.xEnd = s[1][0], ac.yEnd = s[1][1], ac.curveness = o, R.updatePoints(R.style)), R = this.addLabel(R, M, Q[0], Q[0].name + " : " + Q[1].name) }, getLargeMarkPointShape: function(L, W) { var N, Q, r, R, T, O, M = this.series[L], K = this.component, J = W.data, P = K.dataRange, S = K.legend, X = [J[0], W]; if (S && (Q = S.getColor(M.name)), !P || (r = null != J[0].value ? J[0].value : "", Q = isNaN(r) ? Q : P.getColor(r), R = this.deepQuery(X, "itemStyle.normal.color") || Q, T = this.deepQuery(X, "itemStyle.emphasis.color") || R, null != R || null != T)) { Q = this.deepMerge(X, "itemStyle.normal").color || Q; var Z = this.deepQuery(X, "symbol") || "circle"; Z = Z.replace("empty", "").replace(/\d/g, ""), O = this.deepMerge([J[0], W], "effect"); var Y = window.devicePixelRatio || 1; return N = new D({ style: { pointList: J, color: Q, strokeColor: Q, shadowColor: O.shadowColor || Q, shadowBlur: (null != O.shadowBlur ? O.shadowBlur : 8) * Y, size: this.deepQuery(X, "symbolSize"), iconType: Z, brushType: "fill", lineWidth: 1 }, draggable: !1, hoverable: !1 }), O.show && (N.effect = O), N } }, backupShapeList: function() { this.shapeList && this.shapeList.length > 0 ? (this.lastShapeList = this.shapeList, this.shapeList = []) : this.lastShapeList = [] }, addShapeList: function() { var J, R, K = this.option.animationThreshold / (this.canvasSupported ? 2 : 4), N = this.lastShapeList, h = this.shapeList, O = N.length > 0, P = O ? this.query(this.option, "animationDurationUpdate") : this.query(this.option, "animationDuration"), Q = this.query(this.option, "animationEasing"), L = {}, u = {}; if (this.option.animation && !this.option.renderAsImage && h.length < K && !this.motionlessOnce) { for (var p = 0, M = N.length; M > p; p++) { R = this._getAnimationKey(N[p]), R.match("undefined") ? this.zr.delShape(N[p].id) : (R += N[p].type, L[R] ? this.zr.delShape(N[p].id) : L[R] = N[p]) } for (var p = 0, M = h.length; M > p; p++) { R = this._getAnimationKey(h[p]), R.match("undefined") ? this.zr.addShape(h[p]) : (R += h[p].type, u[R] = h[p]) } for (R in L) { u[R] || this.zr.delShape(L[R].id) } for (R in u) { L[R] ? (this.zr.delShape(L[R].id), this._animateMod(L[R], u[R], P, Q, 0, O)) : (J = this.type != w.CHART_TYPE_LINE && this.type != w.CHART_TYPE_RADAR || 0 === R.indexOf("icon") ? 0 : P / 2, this._animateMod(!1, u[R], P, Q, J, O)) } this.zr.refresh(), this.animationEffect() } else { this.motionlessOnce = !1, this.zr.delShape(N); for (var p = 0, M = h.length; M > p; p++) { this.zr.addShape(h[p]) } } }, _getAnimationKey: function(a) { return this.type != w.CHART_TYPE_MAP && this.type != w.CHART_TYPE_TREEMAP && this.type != w.CHART_TYPE_VENN && this.type != w.CHART_TYPE_TREE ? j.get(a, "seriesIndex") + "_" + j.get(a, "dataIndex") + (a._mark ? a._mark : "") + (this.type === w.CHART_TYPE_RADAR ? j.get(a, "special") : "") : j.get(a, "seriesIndex") + "_" + j.get(a, "dataIndex") + (a._mark ? a._mark : "undefined") }, _animateMod: function(d, p, h, l, c, m) { switch (p.type) { case "polyline": case "half-smooth-polygon": f.pointList(this.zr, d, p, h, l); break; case "rectangle": f.rectangle(this.zr, d, p, h, l); break; case "image": case "icon": f.icon(this.zr, d, p, h, l, c); break; case "candle": m ? this.zr.addShape(p) : f.candle(this.zr, d, p, h, l); break; case "ring": case "sector": case "circle": m ? "sector" === p.type ? f.sector(this.zr, d, p, h, l) : this.zr.addShape(p) : f.ring(this.zr, d, p, h + (j.get(p, "dataIndex") || 0) % 20 * 100, l); break; case "text": f.text(this.zr, d, p, h, l); break; case "polygon": m ? f.pointList(this.zr, d, p, h, l) : f.polygon(this.zr, d, p, h, l); break; case "ribbon": f.ribbon(this.zr, d, p, h, l); break; case "gauge-pointer": f.gaugePointer(this.zr, d, p, h, l); break; case "mark-line": f.markline(this.zr, d, p, h, l); break; case "bezier-curve": case "line": f.line(this.zr, d, p, h, l); break; default: this.zr.addShape(p) } }, animationMark: function(d, m, h) { for (var h = h || this.shapeList, l = 0, c = h.length; c > l; l++) { h[l]._mark && this._animateMod(!1, h[l], d, m, 0, !0) } this.animationEffect(h) }, animationEffect: function(d) { if (!d && this.clearEffectShape(), d = d || this.shapeList, null != d) { var m = w.EFFECT_ZLEVEL; this.canvasSupported && this.zr.modLayer(m, { motionBlur: !0, lastFrameAlpha: this.option.effectBlendAlpha || w.effectBlendAlpha }); for (var h, l = 0, c = d.length; c > l; l++) { h = d[l], h._mark && h.effect && h.effect.show && z[h._mark] && (z[h._mark](this.zr, this.effectList, h, m), this.effectList[this.effectList.length - 1]._mark = h._mark) } } }, clearEffectShape: function(a) { var d = this.effectList; if (this.zr && d && d.length > 0) { a && this.zr.modLayer(w.EFFECT_ZLEVEL, { motionBlur: !1 }), this.zr.delShape(d); for (var c = 0; c < d.length; c++) { d[c].effectAnimator && d[c].effectAnimator.stop() } } this.effectList = [] }, addMark: function(d, N, p) { var J = this.series[d]; if (this.selectedMap[J.name]) { var c = this.query(this.option, "animationDurationUpdate") , K = this.query(this.option, "animationEasing") , L = J[p].data , M = this.shapeList.length; if (J[p].data = N.data, this["_build" + p.replace("m", "M")](d), this.option.animation && !this.option.renderAsImage) { this.animationMark(c, K, this.shapeList.slice(M)) } else { for (var u = M, m = this.shapeList.length; m > u; u++) { this.zr.addShape(this.shapeList[u]) } this.zr.refreshNextFrame() } J[p].data = L } }, delMark: function(d, L, h) { h = h.replace("mark", "").replace("large", "").toLowerCase(); var p = this.series[d]; if (this.selectedMap[p.name]) { for (var c = !1, u = [this.shapeList, this.effectList], J = 2; J--; ) { for (var K = 0, m = u[J].length; m > K; K++) { if (u[J][K]._mark == h && j.get(u[J][K], "seriesIndex") == d && j.get(u[J][K], "name") == L) { this.zr.delShape(u[J][K].id), u[J].splice(K, 1), c = !0; break } } } c && this.zr.refreshNextFrame() } } }, H.inherits(x, G), x }), define("zrender/shape/Circle", ["require", "./Base", "../tool/util"], function(a) { var c = a("./Base") , b = function(d) { c.call(this, d) }; return b.prototype = { type: "circle", buildPath: function(d, f) { d.moveTo(f.x + f.r, f.y), d.arc(f.x, f.y, f.r, 0, 2 * Math.PI, !0) }, getRect: function(d) { if (d.__rect) { return d.__rect } var f; return f = "stroke" == d.brushType || "fill" == d.brushType ? d.lineWidth || 1 : 0, d.__rect = { x: Math.round(d.x - d.r - f / 2), y: Math.round(d.y - d.r - f / 2), width: 2 * d.r + f, height: 2 * d.r + f }, d.__rect } }, a("../tool/util").inherits(b, c), b }), define("echarts/util/accMath", [], function() { function a(h, p) { var j = h.toString() , l = p.toString() , f = 0; try { f = l.split(".")[1].length } catch (m) {} try { f -= j.split(".")[1].length } catch (m) {} return (j.replace(".", "") - 0) / (l.replace(".", "") - 0) * Math.pow(10, f) } function d(h, p) { var j = h.toString() , l = p.toString() , f = 0; try { f += j.split(".")[1].length } catch (m) {} try { f += l.split(".")[1].length } catch (m) {} return (j.replace(".", "") - 0) * (l.replace(".", "") - 0) / Math.pow(10, f) } function b(h, p) { var j = 0 , l = 0; try { j = h.toString().split(".")[1].length } catch (f) {} try { l = p.toString().split(".")[1].length } catch (f) {} var m = Math.pow(10, Math.max(j, l)); return (Math.round(h * m) + Math.round(p * m)) / m } function c(f, h) { return b(f, -h) } return { accDiv: a, accMul: d, accAdd: b, accSub: c } }), define("echarts/util/shape/Icon", ["require", "zrender/tool/util", "zrender/shape/Star", "zrender/shape/Heart", "zrender/shape/Droplet", "zrender/shape/Image", "zrender/shape/Base"], function(C) { function Z(c, l) { var d = l.x , f = l.y , b = l.width / 16 , h = l.height / 16; c.moveTo(d, f + l.height), c.lineTo(d + 5 * b, f + 14 * h), c.lineTo(d + l.width, f + 3 * h), c.lineTo(d + 13 * b, f), c.lineTo(d + 2 * b, f + 11 * h), c.lineTo(d, f + l.height), c.moveTo(d + 6 * b, f + 10 * h), c.lineTo(d + 14 * b, f + 2 * h), c.moveTo(d + 10 * b, f + 13 * h), c.lineTo(d + l.width, f + 13 * h), c.moveTo(d + 13 * b, f + 10 * h), c.lineTo(d + 13 * b, f + l.height) } function G(c, l) { var d = l.x , f = l.y , b = l.width / 16 , h = l.height / 16; c.moveTo(d, f + l.height), c.lineTo(d + 5 * b, f + 14 * h), c.lineTo(d + l.width, f + 3 * h), c.lineTo(d + 13 * b, f), c.lineTo(d + 2 * b, f + 11 * h), c.lineTo(d, f + l.height), c.moveTo(d + 6 * b, f + 10 * h), c.lineTo(d + 14 * b, f + 2 * h), c.moveTo(d + 10 * b, f + 13 * h), c.lineTo(d + l.width, f + 13 * h) } function O(c, l) { var d = l.x , f = l.y , b = l.width / 16 , h = l.height / 16; c.moveTo(d + 4 * b, f + 15 * h), c.lineTo(d + 9 * b, f + 13 * h), c.lineTo(d + 14 * b, f + 8 * h), c.lineTo(d + 11 * b, f + 5 * h), c.lineTo(d + 6 * b, f + 10 * h), c.lineTo(d + 4 * b, f + 15 * h), c.moveTo(d + 5 * b, f), c.lineTo(d + 11 * b, f), c.moveTo(d + 5 * b, f + h), c.lineTo(d + 11 * b, f + h), c.moveTo(d, f + 2 * h), c.lineTo(d + l.width, f + 2 * h), c.moveTo(d, f + 5 * h), c.lineTo(d + 3 * b, f + l.height), c.lineTo(d + 13 * b, f + l.height), c.lineTo(d + l.width, f + 5 * h) } function q(c, l) { var d = l.x , f = l.y , b = l.width / 16 , h = l.height / 16; c.moveTo(d, f + 3 * h), c.lineTo(d + 6 * b, f + 3 * h), c.moveTo(d + 3 * b, f), c.lineTo(d + 3 * b, f + 6 * h), c.moveTo(d + 3 * b, f + 8 * h), c.lineTo(d + 3 * b, f + l.height), c.lineTo(d + l.width, f + l.height), c.lineTo(d + l.width, f + 3 * h), c.lineTo(d + 8 * b, f + 3 * h) } function P(c, l) { var d = l.x , f = l.y , b = l.width / 16 , h = l.height / 16; c.moveTo(d + 6 * b, f), c.lineTo(d + 2 * b, f + 3 * h), c.lineTo(d + 6 * b, f + 6 * h), c.moveTo(d + 2 * b, f + 3 * h), c.lineTo(d + 14 * b, f + 3 * h), c.lineTo(d + 14 * b, f + 11 * h), c.moveTo(d + 2 * b, f + 5 * h), c.lineTo(d + 2 * b, f + 13 * h), c.lineTo(d + 14 * b, f + 13 * h), c.moveTo(d + 10 * b, f + 10 * h), c.lineTo(d + 14 * b, f + 13 * h), c.lineTo(d + 10 * b, f + l.height) } function R(c, m) { var d = m.x , f = m.y , b = m.width / 16 , h = m.height / 16 , l = m.width / 2; c.lineWidth = 1.5, c.arc(d + l, f + l, l - b, 0, 2 * Math.PI / 3), c.moveTo(d + 3 * b, f + m.height), c.lineTo(d + 0 * b, f + 12 * h), c.lineTo(d + 5 * b, f + 11 * h), c.moveTo(d, f + 8 * h), c.arc(d + l, f + l, l - b, Math.PI, 5 * Math.PI / 3), c.moveTo(d + 13 * b, f), c.lineTo(d + m.width, f + 4 * h), c.lineTo(d + 11 * b, f + 5 * h) } function T(c, l) { var d = l.x , f = l.y , b = l.width / 16 , h = l.height / 16; c.moveTo(d, f), c.lineTo(d, f + l.height), c.lineTo(d + l.width, f + l.height), c.moveTo(d + 2 * b, f + 14 * h), c.lineTo(d + 7 * b, f + 6 * h), c.lineTo(d + 11 * b, f + 11 * h), c.lineTo(d + 15 * b, f + 2 * h) } function K(c, l) { var d = l.x , f = l.y , b = l.width / 16 , h = l.height / 16; c.moveTo(d, f), c.lineTo(d, f + l.height), c.lineTo(d + l.width, f + l.height), c.moveTo(d + 3 * b, f + 14 * h), c.lineTo(d + 3 * b, f + 6 * h), c.lineTo(d + 4 * b, f + 6 * h), c.lineTo(d + 4 * b, f + 14 * h), c.moveTo(d + 7 * b, f + 14 * h), c.lineTo(d + 7 * b, f + 2 * h), c.lineTo(d + 8 * b, f + 2 * h), c.lineTo(d + 8 * b, f + 14 * h), c.moveTo(d + 11 * b, f + 14 * h), c.lineTo(d + 11 * b, f + 9 * h), c.lineTo(d + 12 * b, f + 9 * h), c.lineTo(d + 12 * b, f + 14 * h) } function F(c, m) { var d = m.x , f = m.y , b = m.width - 2 , h = m.height - 2 , l = Math.min(b, h) / 2; f += 2, c.moveTo(d + l + 3, f + l - 3), c.arc(d + l + 3, f + l - 3, l - 1, 0, -Math.PI / 2, !0), c.lineTo(d + l + 3, f + l - 3), c.moveTo(d + l, f), c.lineTo(d + l, f + l), c.arc(d + l, f + l, l, -Math.PI / 2, 2 * Math.PI, !0), c.lineTo(d + l, f + l), c.lineWidth = 1.5 } function B(c, l) { var d = l.x , f = l.y , b = l.width / 16 , h = l.height / 16; f -= h, c.moveTo(d + 1 * b, f + 2 * h), c.lineTo(d + 15 * b, f + 2 * h), c.lineTo(d + 14 * b, f + 3 * h), c.lineTo(d + 2 * b, f + 3 * h), c.moveTo(d + 3 * b, f + 6 * h), c.lineTo(d + 13 * b, f + 6 * h), c.lineTo(d + 12 * b, f + 7 * h), c.lineTo(d + 4 * b, f + 7 * h), c.moveTo(d + 5 * b, f + 10 * h), c.lineTo(d + 11 * b, f + 10 * h), c.lineTo(d + 10 * b, f + 11 * h), c.lineTo(d + 6 * b, f + 11 * h), c.moveTo(d + 7 * b, f + 14 * h), c.lineTo(d + 9 * b, f + 14 * h), c.lineTo(d + 8 * b, f + 15 * h), c.lineTo(d + 7 * b, f + 15 * h) } function A(c, v) { var d = v.x , h = v.y , b = v.width , m = v.height , p = b / 16 , u = m / 16 , f = 2 * Math.min(p, u); c.moveTo(d + p + f, h + u + f), c.arc(d + p, h + u, f, Math.PI / 4, 3 * Math.PI), c.lineTo(d + 7 * p - f, h + 6 * u - f), c.arc(d + 7 * p, h + 6 * u, f, Math.PI / 4 * 5, 4 * Math.PI), c.arc(d + 7 * p, h + 6 * u, f / 2, Math.PI / 4 * 5, 4 * Math.PI), c.moveTo(d + 7 * p - f / 2, h + 6 * u + f), c.lineTo(d + p + f, h + 14 * u - f), c.arc(d + p, h + 14 * u, f, -Math.PI / 4, 2 * Math.PI), c.moveTo(d + 7 * p + f / 2, h + 6 * u), c.lineTo(d + 14 * p - f, h + 10 * u - f / 2), c.moveTo(d + 16 * p, h + 10 * u), c.arc(d + 14 * p, h + 10 * u, f, 0, 3 * Math.PI), c.lineWidth = 1.5 } function N(c, m) { var d = m.x , f = m.y , b = m.width , h = m.height , l = Math.min(b, h) / 2; c.moveTo(d + b, f + h / 2), c.arc(d + l, f + l, l, 0, 2 * Math.PI), c.arc(d + l, f, l, Math.PI / 4, Math.PI / 5 * 4), c.arc(d, f + l, l, -Math.PI / 3, Math.PI / 3), c.arc(d + b, f + h, l, Math.PI, Math.PI / 2 * 3), c.lineWidth = 1.5 } function Q(c, v) { for (var d = v.x, h = v.y, b = v.width, m = v.height, p = Math.round(m / 3), u = Math.round((p - 2) / 2), f = 3; f--; ) { c.rect(d, h + p * f + u, b, 2) } } function aa(c, v) { for (var d = v.x, h = v.y, b = v.width, m = v.height, p = Math.round(b / 3), u = Math.round((p - 2) / 2), f = 3; f--; ) { c.rect(d + p * f + u, h, 2, m) } } function ad(c, h) { var d = h.x , f = h.y , b = h.width / 16; c.moveTo(d + b, f), c.lineTo(d + b, f + h.height), c.lineTo(d + 15 * b, f + h.height), c.lineTo(d + 15 * b, f), c.lineTo(d + b, f), c.moveTo(d + 3 * b, f + 3 * b), c.lineTo(d + 13 * b, f + 3 * b), c.moveTo(d + 3 * b, f + 6 * b), c.lineTo(d + 13 * b, f + 6 * b), c.moveTo(d + 3 * b, f + 9 * b), c.lineTo(d + 13 * b, f + 9 * b), c.moveTo(d + 3 * b, f + 12 * b), c.lineTo(d + 9 * b, f + 12 * b) } function ab(c, l) { var d = l.x , f = l.y , b = l.width / 16 , h = l.height / 16; c.moveTo(d, f), c.lineTo(d, f + l.height), c.lineTo(d + l.width, f + l.height), c.lineTo(d + l.width, f), c.lineTo(d, f), c.moveTo(d + 4 * b, f), c.lineTo(d + 4 * b, f + 8 * h), c.lineTo(d + 12 * b, f + 8 * h), c.lineTo(d + 12 * b, f), c.moveTo(d + 6 * b, f + 11 * h), c.lineTo(d + 6 * b, f + 13 * h), c.lineTo(d + 10 * b, f + 13 * h), c.lineTo(d + 10 * b, f + 11 * h), c.lineTo(d + 6 * b, f + 11 * h) } function E(c, l) { var d = l.x , f = l.y , b = l.width , h = l.height; c.moveTo(d, f + h / 2), c.lineTo(d + b, f + h / 2), c.moveTo(d + b / 2, f), c.lineTo(d + b / 2, f + h) } function D(c, h) { var d = h.width / 2 , f = h.height / 2 , b = Math.min(d, f); c.moveTo(h.x + d + b, h.y + f), c.arc(h.x + d, h.y + f, b, 0, 2 * Math.PI), c.closePath() } function ai(a, b) { a.rect(b.x, b.y, b.width, b.height), a.closePath() } function z(c, m) { var d = m.width / 2 , f = m.height / 2 , b = m.x + d , h = m.y + f , l = Math.min(d, f); c.moveTo(b, h - l), c.lineTo(b + l, h + l), c.lineTo(b - l, h + l), c.lineTo(b, h - l), c.closePath() } function j(c, m) { var d = m.width / 2 , f = m.height / 2 , b = m.x + d , h = m.y + f , l = Math.min(d, f); c.moveTo(b, h - l), c.lineTo(b + l, h), c.lineTo(b, h + l), c.lineTo(b - l, h), c.lineTo(b, h - l), c.closePath() } function ag(c, h) { var d = h.x , f = h.y , b = h.width / 16; c.moveTo(d + 8 * b, f), c.lineTo(d + b, f + h.height), c.lineTo(d + 8 * b, f + h.height / 4 * 3), c.lineTo(d + 15 * b, f + h.height), c.lineTo(d + 8 * b, f), c.closePath() } function J(f, c) { var d = C("zrender/shape/Star") , b = c.width / 2 , e = c.height / 2; d.prototype.buildPath(f, { x: c.x + b, y: c.y + e, r: Math.min(b, e), n: c.n || 5 }) } function ac(c, a) { var b = C("zrender/shape/Heart"); b.prototype.buildPath(c, { x: a.x + a.width / 2, y: a.y + 0.2 * a.height, a: a.width / 2, b: 0.8 * a.height }) } function M(c, a) { var b = C("zrender/shape/Droplet"); b.prototype.buildPath(c, { x: a.x + 0.5 * a.width, y: a.y + 0.5 * a.height, a: 0.5 * a.width, b: 0.8 * a.height }) } function ae(c, m) { var d = m.x , f = m.y - m.height / 2 * 1.5 , b = m.width / 2 , h = m.height / 2 , l = Math.min(b, h); c.arc(d + b, f + h, l, Math.PI / 5 * 4, Math.PI / 5), c.lineTo(d + b, f + h + 1.5 * l), c.closePath() } function af(f, c, d) { var b = C("zrender/shape/Image"); this._imageShape = this._imageShape || new b({ style: {} }); for (var e in c) { this._imageShape.style[e] = c[e] } this._imageShape.brush(f, !1, d) } function ah(a) { Y.call(this, a) } var H = C("zrender/tool/util") , Y = C("zrender/shape/Base"); return ah.prototype = { type: "icon", iconLibrary: { mark: Z, markUndo: G, markClear: O, dataZoom: q, dataZoomReset: P, restore: R, lineChart: T, barChart: K, pieChart: F, funnelChart: B, forceChart: A, chordChart: N, stackChart: Q, tiledChart: aa, dataView: ad, saveAsImage: ab, cross: E, circle: D, rectangle: ai, triangle: z, diamond: j, arrow: ag, star: J, heart: ac, droplet: M, pin: ae, image: af }, brush: function(h, c, d) { var b = c ? this.highlightStyle : this.style; b = b || {}; var e = b.iconType || this.style.iconType; if ("image" === e) { var f = C("zrender/shape/Image"); f.prototype.brush.call(this, h, c, d) } else { var b = this.beforeBrush(h, c); switch (h.beginPath(), this.buildPath(h, b, d), b.brushType) { case "both": h.fill(); case "stroke": b.lineWidth > 0 && h.stroke(); break; default: h.fill() } this.drawText(h, b, this.style), this.afterBrush(h) } }, buildPath: function(a, c, b) { this.iconLibrary[c.iconType] ? this.iconLibrary[c.iconType].call(this, a, c, b) : (a.moveTo(c.x, c.y), a.lineTo(c.x + c.width, c.y), a.lineTo(c.x + c.width, c.y + c.height), a.lineTo(c.x, c.y + c.height), a.lineTo(c.x, c.y), a.closePath()) }, getRect: function(a) { return a.__rect ? a.__rect : (a.__rect = { x: Math.round(a.x), y: Math.round(a.y - ("pin" == a.iconType ? a.height / 2 * 1.5 : 0)), width: a.width, height: a.height * ("pin" === a.iconType ? 1.25 : 1) }, a.__rect) }, isCover: function(c, h) { var d = this.transformCoordToLocal(c, h); c = d[0], h = d[1]; var f = this.style.__rect; f || (f = this.style.__rect = this.getRect(this.style)); var b = f.height < 8 || f.width < 8 ? 4 : 0; return c >= f.x - b && c <= f.x + f.width + b && h >= f.y - b && h <= f.y + f.height + b } }, H.inherits(ah, Y), ah }), define("echarts/util/shape/MarkLine", ["require", "zrender/shape/Base", "./Icon", "zrender/shape/Line", "zrender/shape/BezierCurve", "zrender/tool/area", "zrender/shape/util/dashedLineTo", "zrender/tool/util", "zrender/tool/curve"], function(m) { function z(a) { q.call(this, a), this.style.curveness > 0 && this.updatePoints(this.style), this.highlightStyle.curveness > 0 && this.updatePoints(this.highlightStyle) } var q = m("zrender/shape/Base") , v = m("./Icon") , b = m("zrender/shape/Line") , w = new b({}) , x = m("zrender/shape/BezierCurve") , y = new x({}) , u = m("zrender/tool/area") , p = m("zrender/shape/util/dashedLineTo") , j = m("zrender/tool/util") , f = m("zrender/tool/curve"); return z.prototype = { type: "mark-line", brush: function(a, d) { var c = this.style; d && (c = this.getHighlightStyle(c, this.highlightStyle || {})), a.save(), this.setContext(a, c), this.setTransform(a), a.save(), a.beginPath(), this.buildPath(a, c), a.stroke(), a.restore(), this.brushSymbol(a, c, 0), this.brushSymbol(a, c, 1), this.drawText(a, c, this.style), a.restore() }, buildPath: function(d, o) { var h = o.lineType || "solid"; if (d.moveTo(o.xStart, o.yStart), o.curveness > 0) { var l = null; switch (h) { case "dashed": l = [5, 5]; break; case "dotted": l = [1, 1] } l && d.setLineDash && d.setLineDash(l), d.quadraticCurveTo(o.cpX1, o.cpY1, o.xEnd, o.yEnd) } else { if ("solid" == h) { d.lineTo(o.xEnd, o.yEnd) } else { var c = (o.lineWidth || 1) * ("dashed" == o.lineType ? 5 : 1); p(d, o.xStart, o.yStart, o.xEnd, o.yEnd, c) } } }, updatePoints: function(d) { var F = d.curveness || 0 , h = 1 , B = d.xStart , c = d.yStart , C = d.xEnd , D = d.yEnd , E = (B + C) / 2 - h * (c - D) * F , A = (c + D) / 2 - h * (C - B) * F; d.cpX1 = E, d.cpY1 = A }, brushSymbol: function(B, M, F) { if ("none" != M.symbol[F]) { B.save(), B.beginPath(), B.lineWidth = M.symbolBorder, B.strokeStyle = M.symbolBorderColor; var c = M.symbol[F].replace("empty", "").toLowerCase(); M.symbol[F].match("empty") && (B.fillStyle = "#fff"); var I = M.xStart , K = M.yStart , L = M.xEnd , G = M.yEnd , E = 0 === F ? I : L , A = 0 === F ? K : G , H = M.curveness || 0 , J = null != M.symbolRotate[F] ? M.symbolRotate[F] - 0 : 0; if (J = J / 180 * Math.PI, "arrow" == c && 0 === J) { if (0 === H) { var N = 0 === F ? -1 : 1; J = Math.PI / 2 + Math.atan2(N * (G - K), N * (L - I)) } else { var P = M.cpX1 , O = M.cpY1 , D = f.quadraticDerivativeAt , C = D(I, P, L, F) , Q = D(K, O, G, F); J = Math.PI / 2 + Math.atan2(Q, C) } } B.translate(E, A), 0 !== J && B.rotate(J); var n = M.symbolSize[F]; v.prototype.buildPath(B, { x: -n, y: -n, width: 2 * n, height: 2 * n, iconType: c }), B.closePath(), B.fill(), B.stroke(), B.restore() } }, getRect: function(a) { return a.curveness > 0 ? y.getRect(a) : w.getRect(a), a.__rect }, isCover: function(a, d) { var c = this.transformCoordToLocal(a, d); return a = c[0], d = c[1], this.isCoverRect(a, d) ? this.style.curveness > 0 ? u.isInside(y, this.style, a, d) : u.isInside(w, this.style, a, d) : !1 } }, j.inherits(z, q), z }), define("echarts/util/shape/Symbol", ["require", "zrender/shape/Base", "zrender/shape/Polygon", "zrender/tool/util", "./normalIsCover"], function(c) { function j(a) { d.call(this, a) } var d = c("zrender/shape/Base") , f = c("zrender/shape/Polygon") , b = new f({}) , h = c("zrender/tool/util"); return j.prototype = { type: "symbol", buildPath: function(x, I) { var A = I.pointList , D = A.length; if (0 !== D) { for (var q, E, G, H, B, z = 10000, w = Math.ceil(D / z), v = A[0]instanceof Array, C = I.size ? I.size : 2, F = C, J = C / 2, L = 2 * Math.PI, K = 0; w > K; K++) { x.beginPath(), q = K * z, E = q + z, E = E > D ? D : E; for (var y = q; E > y; y++) { if (I.random && (G = I["randomMap" + y % 20] / 100, F = C * G * G, J = F / 2), v ? (H = A[y][0], B = A[y][1]) : (H = A[y].x, B = A[y].y), 3 > F) { x.rect(H - J, B - J, F, F) } else { switch (I.iconType) { case "circle": x.moveTo(H, B), x.arc(H, B, J, 0, L, !0); break; case "diamond": x.moveTo(H, B - J), x.lineTo(H + J / 3, B - J / 3), x.lineTo(H + J, B), x.lineTo(H + J / 3, B + J / 3), x.lineTo(H, B + J), x.lineTo(H - J / 3, B + J / 3), x.lineTo(H - J, B), x.lineTo(H - J / 3, B - J / 3), x.lineTo(H, B - J); break; default: x.rect(H - J, B - J, F, F) } } } if (x.closePath(), w - 1 > K) { switch (I.brushType) { case "both": x.fill(), I.lineWidth > 0 && x.stroke(); break; case "stroke": I.lineWidth > 0 && x.stroke(); break; default: x.fill() } } } } }, getRect: function(a) { return a.__rect || b.getRect(a) }, isCover: c("./normalIsCover") }, h.inherits(j, d), j }), define("zrender/shape/Polyline", ["require", "./Base", "./util/smoothSpline", "./util/smoothBezier", "./util/dashedLineTo", "./Polygon", "../tool/util"], function(c) { var j = c("./Base") , d = c("./util/smoothSpline") , f = c("./util/smoothBezier") , b = c("./util/dashedLineTo") , h = function(a) { this.brushTypeOnly = "stroke", this.textPosition = "end", j.call(this, a) }; return h.prototype = { type: "polyline", buildPath: function(m, y) { var u = y.pointList; if (!(u.length < 2)) { var v = Math.min(y.pointList.length, Math.round(y.pointListLength || y.pointList.length)); if (y.smooth && "spline" !== y.smooth) { y.controlPointList || this.updateControlPoints(y); var w = y.controlPointList; m.moveTo(u[0][0], u[0][1]); for (var x, q, p, i = 0; v - 1 > i; i++) { x = w[2 * i], q = w[2 * i + 1], p = u[i + 1], m.bezierCurveTo(x[0], x[1], q[0], q[1], p[0], p[1]) } } else { if ("spline" === y.smooth && (u = d(u), v = u.length), y.lineType && "solid" != y.lineType) { if ("dashed" == y.lineType || "dotted" == y.lineType) { var a = (y.lineWidth || 1) * ("dashed" == y.lineType ? 5 : 1); m.moveTo(u[0][0], u[0][1]); for (var i = 1; v > i; i++) { b(m, u[i - 1][0], u[i - 1][1], u[i][0], u[i][1], a) } } } else { m.moveTo(u[0][0], u[0][1]); for (var i = 1; v > i; i++) { m.lineTo(u[i][0], u[i][1]) } } } } }, updateControlPoints: function(a) { a.controlPointList = f(a.pointList, a.smooth, !1, a.smoothConstraint) }, getRect: function(a) { return c("./Polygon").prototype.getRect(a) } }, c("../tool/util").inherits(h, j), h }), define("zrender/shape/ShapeBundle", ["require", "./Base", "../tool/util"], function(a) { var c = a("./Base") , b = function(d) { c.call(this, d) }; return b.prototype = { constructor: b, type: "shape-bundle", brush: function(f, m) { var h = this.beforeBrush(f, m); f.beginPath(); for (var j = 0; j < h.shapeList.length; j++) { var d = h.shapeList[j] , l = d.style; m && (l = d.getHighlightStyle(l, d.highlightStyle || {}, d.brushTypeOnly)), d.buildPath(f, l) } switch (h.brushType) { case "both": f.fill(); case "stroke": h.lineWidth > 0 && f.stroke(); break; default: f.fill() } this.drawText(f, h, this.style), this.afterBrush(f) }, getRect: function(f) { if (f.__rect) { return f.__rect } for (var q = 1 / 0, h = -(1 / 0), j = 1 / 0, d = -(1 / 0), l = 0; l < f.shapeList.length; l++) { var m = f.shapeList[l] , p = m.getRect(m.style) , q = Math.min(p.x, q) , j = Math.min(p.y, j) , h = Math.max(p.x + p.width, h) , d = Math.max(p.y + p.height, d) } return f.__rect = { x: q, y: j, width: h - q, height: d - j }, f.__rect }, isCover: function(f, l) { var h = this.transformCoordToLocal(f, l); if (f = h[0], l = h[1], this.isCoverRect(f, l)) { for (var j = 0; j < this.style.shapeList.length; j++) { var d = this.style.shapeList[j]; if (d.isCover(f, l)) { return !0 } } } return !1 } }, a("../tool/util").inherits(b, c), b }), define("echarts/util/ecAnimation", ["require", "zrender/tool/util", "zrender/tool/curve", "zrender/shape/Polygon"], function(q) { function E(H, P, J, L, m) { var M, N = J.style.pointList, O = N.length; if (!P) { if (M = [], "vertical" != J._orient) { for (var K = N[0][1], I = 0; O > I; I++) { M[I] = [N[I][0], K] } } else { for (var u = N[0][0], I = 0; O > I; I++) { M[I] = [u, N[I][1]] } } "half-smooth-polygon" == J.type && (M[O - 1] = F.clone(N[O - 1]), M[O - 2] = F.clone(N[O - 2])), P = { style: { pointList: M } } } M = P.style.pointList; var p = M.length; J.style.pointList = p == O ? M : O > p ? M.concat(N.slice(p)) : M.slice(0, O), H.addShape(J), J.__animating = !0, H.animate(J.id, "style").when(L, { pointList: N }).during(function() { J.updateControlPoints && J.updateControlPoints(J.style) }).done(function() { J.__animating = !1 }).start(m) } function w(d, m) { for (var h = arguments.length, l = 2; h > l; l++) { var c = arguments[l]; d.style[c] = m.style[c] } } function z(u, N, J, i, K) { var L = J.style; N || (N = { position: J.position, style: { x: L.x, y: "vertical" == J._orient ? L.y + L.height : L.y, width: "vertical" == J._orient ? L.width : 0, height: "vertical" != J._orient ? L.height : 0 } }); var M = L.x , I = L.y , H = L.width , p = L.height , m = [J.position[0], J.position[1]]; w(J, N, "x", "y", "width", "height"), J.position = N.position, u.addShape(J), (m[0] != N.position[0] || m[1] != N.position[1]) && u.animate(J.id, "").when(i, { position: m }).start(K), J.__animating = !0, u.animate(J.id, "style").when(i, { x: M, y: I, width: H, height: p }).done(function() { J.__animating = !1 }).start(K) } function b(d, s, h, l, c) { if (!s) { var m = h.style.y; s = { style: { y: [m[0], m[0], m[0], m[0]] } } } var p = h.style.y; h.style.y = s.style.y, d.addShape(h), h.__animating = !0, d.animate(h.id, "style").when(l, { y: p }).done(function() { h.__animating = !1 }).start(c) } function A(d, J, h, p, c) { var u = h.style.x , H = h.style.y , I = h.style.r0 , m = h.style.r; h.__animating = !0, "r" != h._animationAdd ? (h.style.r0 = 0, h.style.r = 0, h.rotation = [2 * Math.PI, u, H], d.addShape(h), d.animate(h.id, "style").when(p, { r0: I, r: m }).done(function() { h.__animating = !1 }).start(c), d.animate(h.id, "").when(p, { rotation: [0, u, H] }).start(c)) : (h.style.r0 = h.style.r, d.addShape(h), d.animate(h.id, "style").when(p, { r0: I }).done(function() { h.__animating = !1 }).start(c)) } function C(d, p, h, c, i) { p || (p = "r" != h._animationAdd ? { style: { startAngle: h.style.startAngle, endAngle: h.style.startAngle } } : { style: { r0: h.style.r } }); var l = h.style.startAngle , m = h.style.endAngle; w(h, p, "startAngle", "endAngle"), d.addShape(h), h.__animating = !0, d.animate(h.id, "style").when(c, { startAngle: l, endAngle: m }).done(function() { h.__animating = !1 }).start(i) } function D(d, p, h, c, i) { p || (p = { style: { x: "left" == h.style.textAlign ? h.style.x + 100 : h.style.x - 100, y: h.style.y } }); var l = h.style.x , m = h.style.y; w(h, p, "x", "y"), d.addShape(h), h.__animating = !0, d.animate(h.id, "style").when(c, { x: l, y: m }).done(function() { h.__animating = !1 }).start(i) } function x(H, d, h, c, m) { var p = q("zrender/shape/Polygon").prototype.getRect(h.style) , u = p.x + p.width / 2 , e = p.y + p.height / 2; h.scale = [0.1, 0.1, u, e], H.addShape(h), h.__animating = !0, H.animate(h.id, "").when(c, { scale: [1, 1, u, e] }).done(function() { h.__animating = !1 }).start(m) } function v(d, J, p, c, u) { J || (J = { style: { source0: 0, source1: p.style.source1 > 0 ? 360 : -360, target0: 0, target1: p.style.target1 > 0 ? 360 : -360 } }); var H = p.style.source0 , I = p.style.source1 , m = p.style.target0 , i = p.style.target1; J.style && w(p, J, "source0", "source1", "target0", "target1"), d.addShape(p), p.__animating = !0, d.animate(p.id, "style").when(c, { source0: H, source1: I, target0: m, target1: i }).done(function() { p.__animating = !1 }).start(u) } function j(d, p, h, l, c) { p || (p = { style: { angle: h.style.startAngle } }); var m = h.style.angle; h.style.angle = p.style.angle, d.addShape(h), h.__animating = !0, d.animate(h.id, "style").when(l, { angle: m }).done(function() { h.__animating = !1 }).start(c) } function f(d, H, h, c, n, p) { if (h.style._x = h.style.x, h.style._y = h.style.y, h.style._width = h.style.width, h.style._height = h.style.height, H) { z(d, H, h, c, n) } else { var u = h._x || 0 , m = h._y || 0; h.scale = [0.01, 0.01, u, m], d.addShape(h), h.__animating = !0, d.animate(h.id, "").delay(p).when(c, { scale: [1, 1, u, m] }).done(function() { h.__animating = !1 }).start(n || "QuinticOut") } } function y(d, J, p, c, u) { J || (J = { style: { xStart: p.style.xStart, yStart: p.style.yStart, xEnd: p.style.xStart, yEnd: p.style.yStart } }); var H = p.style.xStart , I = p.style.xEnd , m = p.style.yStart , i = p.style.yEnd; w(p, J, "xStart", "xEnd", "yStart", "yEnd"), d.addShape(p), p.__animating = !0, d.animate(p.id, "style").when(c, { xStart: H, xEnd: I, yStart: m, yEnd: i }).done(function() { p.__animating = !1 }).start(u) } function B(K, W, N, Q, H) { H = H || "QuinticOut", N.__animating = !0, K.addShape(N); var R = N.style , T = function() { N.__animating = !1 } , V = R.xStart , O = R.yStart , M = R.xEnd , J = R.yEnd; if (R.curveness > 0) { N.updatePoints(R); var I = { p: 0 } , P = R.cpX1 , S = R.cpY1 , X = [] , Y = [] , L = G.quadraticSubdivide; K.animation.animate(I).when(Q, { p: 1 }).during(function() { L(V, P, M, I.p, X), L(O, S, J, I.p, Y), R.cpX1 = X[1], R.cpY1 = Y[1], R.xEnd = X[2], R.yEnd = Y[2], K.modShape(N) }).done(T).start(H) } else { K.animate(N.id, "style").when(0, { xEnd: V, yEnd: O }).when(Q, { xEnd: M, yEnd: J }).done(T).start(H) } } var F = q("zrender/tool/util") , G = q("zrender/tool/curve"); return { pointList: E, rectangle: z, candle: b, ring: A, sector: C, text: D, polygon: x, ribbon: v, gaugePointer: j, icon: f, line: y, markline: B } }), define("echarts/util/ecEffect", ["require", "../util/ecData", "zrender/shape/Circle", "zrender/shape/Image", "zrender/tool/curve", "../util/shape/Icon", "../util/shape/Symbol", "zrender/shape/ShapeBundle", "zrender/shape/Polyline", "zrender/tool/vector", "zrender/tool/env"], function(q) { function E(u, O, I, L) { var h, N = I.effect, J = N.color || I.style.strokeColor || I.style.color, s = N.shadowColor || J, o = N.scaleSize, K = N.bounceDistance, M = "undefined" != typeof N.shadowBlur ? N.shadowBlur : o; "image" !== I.type ? (h = new v({ zlevel: L, style: { brushType: "stroke", iconType: "droplet" != I.style.iconType ? I.style.iconType : "circle", x: M + 1, y: M + 1, n: I.style.n, width: I.style._width * o, height: I.style._height * o, lineWidth: 1, strokeColor: J, shadowColor: s, shadowBlur: M }, draggable: !1, hoverable: !1 }), "pin" == I.style.iconType && (h.style.y += h.style.height / 2 * 1.5), F && (h.style.image = u.shapeToImage(h, h.style.width + 2 * M + 2, h.style.height + 2 * M + 2).style.image, h = new D({ zlevel: h.zlevel, style: h.style, draggable: !1, hoverable: !1 }))) : h = new D({ zlevel: L, style: I.style, draggable: !1, hoverable: !1 }), A.clone(I, h), h.position = I.position, O.push(h), u.addShape(h); var Q = "image" !== I.type ? window.devicePixelRatio || 1 : 1 , P = (h.style.width / Q - I.style._width) / 2; h.style.x = I.style._x - P, h.style.y = I.style._y - P, "pin" == I.style.iconType && (h.style.y -= I.style.height / 2 * 1.5); var H = 100 * (N.period + 10 * Math.random()); u.modShape(I.id, { invisible: !0 }); var G = h.style.x + h.style.width / 2 / Q , R = h.style.y + h.style.height / 2 / Q; "scale" === N.type ? (u.modShape(h.id, { scale: [0.1, 0.1, G, R] }), u.animate(h.id, "", N.loop).when(H, { scale: [1, 1, G, R] }).done(function() { I.effect.show = !1, u.delShape(h.id) }).start()) : u.animate(h.id, "style", N.loop).when(H, { y: h.style.y - K }).when(2 * H, { y: h.style.y }).done(function() { I.effect.show = !1, u.delShape(h.id) }).start() } function w(H, R, J, M) { var d = J.effect , N = d.color || J.style.strokeColor || J.style.color , P = d.scaleSize , Q = d.shadowColor || N , K = "undefined" != typeof d.shadowBlur ? d.shadowBlur : 2 * P , I = window.devicePixelRatio || 1 , G = new j({ zlevel: M, position: J.position, scale: J.scale, style: { pointList: J.style.pointList, iconType: J.style.iconType, color: N, strokeColor: N, shadowColor: Q, shadowBlur: K * I, random: !0, brushType: "fill", lineWidth: 1, size: J.style.size }, draggable: !1, hoverable: !1 }); R.push(G), H.addShape(G), H.modShape(J.id, { invisible: !0 }); for (var L = Math.round(100 * d.period), O = {}, S = {}, T = 0; 20 > T; T++) { G.style["randomMap" + T] = 0, O = {}, O["randomMap" + T] = 100, S = {}, S["randomMap" + T] = 0, G.style["randomMap" + T] = 100 * Math.random(), H.animate(G.id, "style", !0).when(L, O).when(2 * L, S).when(3 * L, O).when(4 * L, O).delay(Math.random() * L * T).start() } } function z(H, ad, P, aa, m) { var ab = P.effect , O = P.style , G = ab.color || O.strokeColor || O.color , r = ab.shadowColor || O.strokeColor || G , ah = O.lineWidth * ab.scaleSize , af = "undefined" != typeof ab.shadowBlur ? ab.shadowBlur : ah , N = new C({ zlevel: aa, style: { x: af, y: af, r: ah, color: G, shadowColor: r, shadowBlur: af }, hoverable: !1 }) , M = 0; if (F && !m) { var aa = N.zlevel; N = H.shapeToImage(N, 2 * (ah + af), 2 * (ah + af)), N.zlevel = aa, N.hoverable = !1, M = af } m || (A.clone(P, N), N.position = P.position, ad.push(N), H.addShape(N)); var am = function() { m || (P.effect.show = !1, H.delShape(N.id)), N.effectAnimator = null }; if (P instanceof y) { for (var p = [0], l = 0, ak = O.pointList, R = O.controlPointList, ag = 1; ag < ak.length; ag++) { if (R) { var Z = R[2 * (ag - 1)] , ai = R[2 * (ag - 1) + 1]; l += B.dist(ak[ag - 1], Z) + B.dist(Z, ai) + B.dist(ai, ak[ag]) } else { l += B.dist(ak[ag - 1], ak[ag]) } p.push(l) } for (var aj = { p: 0 }, al = H.animation.animate(aj, { loop: ab.loop }), ag = 0; ag < p.length; ag++) { al.when(p[ag] * ab.period, { p: ag }) } al.during(function() { var T, e, I = Math.floor(aj.p); if (I == ak.length - 1) { T = ak[I][0], e = ak[I][1] } else { var K = aj.p - I , L = ak[I] , S = ak[I + 1]; if (R) { var c = R[2 * I] , a = R[2 * I + 1]; T = x.cubicAt(L[0], c[0], a[0], S[0], K), e = x.cubicAt(L[1], c[1], a[1], S[1], K) } else { T = (S[0] - L[0]) * K + L[0], e = (S[1] - L[1]) * K + L[1] } } N.style.x = T, N.style.y = e, m || H.modShape(N) }).done(am).start(), al.duration = l * ab.period, N.effectAnimator = al } else { var Q = O.xStart - M , ac = O.yStart - M , Y = O.xEnd - M , u = O.yEnd - M; N.style.x = Q, N.style.y = ac; var ae = (Y - Q) * (Y - Q) + (u - ac) * (u - ac) , J = Math.round(Math.sqrt(Math.round(ae * ab.period * ab.period))); if (P.style.curveness > 0) { var an = O.cpX1 - M , o = O.cpY1 - M; N.effectAnimator = H.animation.animate(N, { loop: ab.loop }).when(J, { p: 1 }).during(function(c, a) { N.style.x = x.quadraticAt(Q, an, Y, a), N.style.y = x.quadraticAt(ac, o, u, a), m || H.modShape(N) }).done(am).start() } else { N.effectAnimator = H.animation.animate(N.style, { loop: ab.loop }).when(J, { x: Y, y: u }).during(function() { m || H.modShape(N) }).done(am).start() } N.effectAnimator.duration = J } return N } function b(G, P, I, c) { var L = new f({ style: { shapeList: [] }, zlevel: c, hoverable: !1 }) , N = I.style.shapeList , O = I.effect; L.position = I.position; for (var J = 0, H = [], n = 0; n < N.length; n++) { N[n].effect = O; var K = z(G, null, N[n], c, !0) , M = K.effectAnimator; L.style.shapeList.push(K), M.duration > J && (J = M.duration), 0 === n && (L.style.color = K.style.color, L.style.shadowBlur = K.style.shadowBlur, L.style.shadowColor = K.style.shadowColor), H.push(M) } P.push(L), G.addShape(L); var Q = function() { for (var a = 0; a < H.length; a++) { H[a].stop() } }; if (J) { L.__dummy = 0; var S = G.animate(L.id, "", O.loop).when(J, { __dummy: 1 }).during(function() { G.modShape(L) }).done(function() { I.effect.show = !1, G.delShape(L.id) }).start() , R = S.stop; S.stop = function() { Q(), R.call(this) } } } var A = q("../util/ecData") , C = q("zrender/shape/Circle") , D = q("zrender/shape/Image") , x = q("zrender/tool/curve") , v = q("../util/shape/Icon") , j = q("../util/shape/Symbol") , f = q("zrender/shape/ShapeBundle") , y = q("zrender/shape/Polyline") , B = q("zrender/tool/vector") , F = q("zrender/tool/env").canvasSupported; return { point: E, largePoint: w, line: z, largeLine: b } }), define("echarts/component/base", ["require", "../config", "../util/ecData", "../util/ecQuery", "../util/number", "zrender/tool/util", "zrender/tool/env"], function(c) { function l(m, u, i, n, p) { this.ecTheme = m, this.messageCenter = u, this.zr = i, this.option = n, this.series = n.series, this.myChart = p, this.component = p.component, this.shapeList = [], this.effectList = []; var q = this; q._onlegendhoverlink = function(s) { if (q.legendHoverLink) { for (var w, r = s.target, v = q.shapeList.length - 1; v >= 0; v--) { w = q.type == d.CHART_TYPE_PIE || q.type == d.CHART_TYPE_FUNNEL ? f.get(q.shapeList[v], "name") : (f.get(q.shapeList[v], "series") || {}).name, w != r || q.shapeList[v].invisible || q.shapeList[v].__animating || q.zr.addHoverShape(q.shapeList[v]) } } } , u && u.bind(d.EVENT.LEGEND_HOVERLINK, this._onlegendhoverlink) } var d = c("../config") , f = c("../util/ecData") , b = c("../util/ecQuery") , h = c("../util/number") , j = c("zrender/tool/util"); return l.prototype = { canvasSupported: c("zrender/tool/env").canvasSupported, _getZ: function(a) { if (null != this[a]) { return this[a] } var i = this.ecTheme[this.type]; return i && null != i[a] ? i[a] : (i = d[this.type], i && null != i[a] ? i[a] : 0) }, getZlevelBase: function() { return this._getZ("zlevel") }, getZBase: function() { return this._getZ("z") }, reformOption: function(a) { return a = j.merge(j.merge(a || {}, j.clone(this.ecTheme[this.type] || {})), j.clone(d[this.type] || {})), this.z = a.z, this.zlevel = a.zlevel, a }, reformCssArray: function(a) { if (!(a instanceof Array)) { return [a, a, a, a] } switch (a.length + "") { case "4": return a; case "3": return [a[0], a[1], a[2], a[1]]; case "2": return [a[0], a[1], a[0], a[1]]; case "1": return [a[0], a[0], a[0], a[0]]; case "0": return [0, 0, 0, 0] } }, getShapeById: function(a) { for (var n = 0, m = this.shapeList.length; m > n; n++) { if (this.shapeList[n].id === a) { return this.shapeList[n] } } return null }, getFont: function(a) { var i = this.getTextStyle(j.clone(a)); return i.fontStyle + " " + i.fontWeight + " " + i.fontSize + "px " + i.fontFamily }, getTextStyle: function(a) { return j.merge(j.merge(a || {}, this.ecTheme.textStyle), d.textStyle) }, getItemStyleColor: function(a, p, m, o) { return "function" == typeof a ? a.call(this.myChart, { seriesIndex: p, series: this.series[p], dataIndex: m, data: o }) : a }, getDataFromOption: function(a, i) { return null != a ? null != a.value ? a.value : a : i }, subPixelOptimize: function(a, i) { return a = i % 2 === 1 ? Math.floor(a) + 0.5 : Math.round(a) }, resize: function() { this.refresh && this.refresh(), this.clearEffectShape && this.clearEffectShape(!0); var a = this; setTimeout(function() { a.animationEffect && a.animationEffect() }, 200) }, clear: function() { this.clearEffectShape && this.clearEffectShape(), this.zr && this.zr.delShape(this.shapeList), this.shapeList = [] }, dispose: function() { this.onbeforDispose && this.onbeforDispose(), this.clear(), this.shapeList = null, this.effectList = null, this.messageCenter && this.messageCenter.unbind(d.EVENT.LEGEND_HOVERLINK, this._onlegendhoverlink), this.onafterDispose && this.onafterDispose() }, query: b.query, deepQuery: b.deepQuery, deepMerge: b.deepMerge, parsePercent: h.parsePercent, parseCenter: h.parseCenter, parseRadius: h.parseRadius, numAddCommas: h.addCommas, getPrecision: h.getPrecision }, l }), define("echarts/layout/EdgeBundling", ["require", "../data/KDTree", "zrender/tool/vector"], function(p) { function B(d, r) { d = d.array, r = r.array; var h = r[0] - d[0] , l = r[1] - d[1] , c = r[2] - d[2] , m = r[3] - d[3]; return h * h + l * l + c * c + m * m } function u(a) { this.points = [a.mp0, a.mp1], this.group = a } function x(a) { var c = a.points; c[0][1] < c[1][1] || a instanceof u ? (this.array = [c[0][0], c[0][1], c[1][0], c[1][1]], this._startPoint = c[0], this._endPoint = c[1]) : (this.array = [c[1][0], c[1][1], c[0][0], c[0][1]], this._startPoint = c[1], this._endPoint = c[0]), this.ink = j(c[0], c[1]), this.edge = a, this.group = null } function b() { this.edgeList = [], this.mp0 = v(), this.mp1 = v(), this.ink = 0 } function y() { this.maxNearestEdge = 6, this.maxTurningAngle = Math.PI / 4, this.maxIteration = 20 } var z = p("../data/KDTree") , A = p("zrender/tool/vector") , v = A.create , q = A.distSquare , j = A.dist , f = A.copy , w = A.clone; return x.prototype.getStartPoint = function() { return this._startPoint } , x.prototype.getEndPoint = function() { return this._endPoint } , b.prototype.addEdge = function(a) { a.group = this, this.edgeList.push(a) } , b.prototype.removeEdge = function(a) { a.group = null, this.edgeList.splice(this.edgeList.indexOf(a), 1) } , y.prototype = { constructor: y, run: function(C) { function I(a, c) { return q(a, c) < 1e-10 } function E(d, l) { for (var r = [], c = 0, s = 0; s < d.length; s++) { c > 0 && I(d[s], r[c - 1]) || (r[c++] = w(d[s])) } return l[0] && !I(r[0], l[0]) && (r = r.reverse()), r } for (var h = this._iterate(C), F = 0; F++ < this.maxIteration; ) { for (var G = [], H = 0; H < h.groups.length; H++) { G.push(new u(h.groups[H])) } var D = this._iterate(G); if (D.savedInk <= 0) { break } h = D } var m = [] , i = function(d, N) { for (var c, K = 0; K < d.length; K++) { var L = d[K]; if (L.edgeList[0] && L.edgeList[0].edge instanceof u) { for (var M = [], J = 0; J < L.edgeList.length; J++) { M.push(L.edgeList[J].edge.group) } c = N ? N.slice() : [], c.unshift(L.mp0), c.push(L.mp1), i(M, c) } else { for (var J = 0; J < L.edgeList.length; J++) { var n = L.edgeList[J]; c = N ? N.slice() : [], c.unshift(L.mp0), c.push(L.mp1), c.unshift(n.getStartPoint()), c.push(n.getEndPoint()), m.push({ points: E(c, n.edge.points), rawEdge: n.edge }) } } } }; return i(h.groups), m }, _iterate: function(n) { for (var D = [], H = [], J = 0, C = 0; C < n.length; C++) { var l = new x(n[C]); D.push(l) } for (var G = new z(D,4), I = [], K = v(), O = v(), M = 0, t = v(), r = v(), R = 0, C = 0; C < D.length; C++) { var l = D[C]; if (!l.group) { G.nearestN(l, this.maxNearestEdge, B, I); for (var c = 0, a = null, Q = null, E = 0; E < I.length; E++) { var N = I[E] , F = 0; N.group ? N.group !== Q && (Q = N.group, M = this._calculateGroupEdgeInk(N.group, l, K, O), F = N.group.ink + l.ink - M) : (M = this._calculateEdgeEdgeInk(l, N, K, O), F = N.ink + l.ink - M), F > c && (c = F, a = N, f(r, O), f(t, K), R = M) } if (a) { J += c; var P; a.group || (P = new b, H.push(P), P.addEdge(a)), P = a.group, f(P.mp0, t), f(P.mp1, r), P.ink = R, a.group.addEdge(l) } else { var P = new b; H.push(P), f(P.mp0, l.getStartPoint()), f(P.mp1, l.getEndPoint()), P.ink = l.ink, P.addEdge(l) } } } return { groups: H, edges: D, savedInk: J } }, _calculateEdgeEdgeInk: function() { var a = [] , c = []; return function(e, h, d, l) { a[0] = e.getStartPoint(), a[1] = h.getStartPoint(), c[0] = e.getEndPoint(), c[1] = h.getEndPoint(), this._calculateMeetPoints(a, c, d, l); var m = j(a[0], d) + j(d, l) + j(l, c[0]) + j(a[1], d) + j(l, c[1]); return m } }(), _calculateGroupEdgeInk: function(d, G, h, C) { for (var c = [], D = [], E = 0; E < d.edgeList.length; E++) { var F = d.edgeList[E]; c.push(F.getStartPoint()), D.push(F.getEndPoint()) } c.push(G.getStartPoint()), D.push(G.getEndPoint()), this._calculateMeetPoints(c, D, h, C); for (var m = j(h, C), E = 0; E < c.length; E++) { m += j(c[E], h) + j(D[E], C) } return m }, _calculateMeetPoints: function() { var a = v() , c = v(); return function(e, m, d, s) { A.set(a, 0, 0), A.set(c, 0, 0); for (var t = e.length, h = 0; t > h; h++) { A.add(a, a, e[h]) } A.scale(a, a, 1 / t), t = m.length; for (var h = 0; t > h; h++) { A.add(c, c, m[h]) } A.scale(c, c, 1 / t), this._limitTurningAngle(e, a, c, d), this._limitTurningAngle(m, c, a, s) } }(), _limitTurningAngle: function() { var a = v() , h = v() , c = v() , d = v(); return function(e, E, G, C) { var n = Math.cos(this.maxTurningAngle) , D = Math.tan(this.maxTurningAngle); A.sub(a, E, G), A.normalize(a, a), A.copy(C, E); for (var F = 0, H = 0; H < e.length; H++) { var J = e[H]; A.sub(h, J, E); var I = A.len(h); A.scale(h, h, 1 / I); var t = A.dot(h, a); if (n > t) { A.scaleAndAdd(c, E, a, I * t); var s = j(c, J) , K = s / D; A.scaleAndAdd(d, c, a, -K); var i = q(d, E); i > F && (F = i, A.copy(C, d)) } } } }() }, y }), define("zrender/shape/Star", ["require", "../tool/math", "./Base", "../tool/util"], function(c) { var l = c("../tool/math") , d = l.sin , f = l.cos , b = Math.PI , h = c("./Base") , j = function(a) { h.call(this, a) }; return j.prototype = { type: "star", buildPath: function(n, C) { var y = C.n; if (y && !(2 > y)) { var A = C.x , B = C.y , w = C.r , v = C.r0; null == v && (v = y > 4 ? w * f(2 * b / y) / f(b / y) : w / 3); var i = b / y , a = -b / 2 , x = A + w * f(a) , z = B + w * d(a); a += i; var D = C.pointList = []; D.push([x, z]); for (var F, E = 0, q = 2 * y - 1; q > E; E++) { F = E % 2 === 0 ? v : w, D.push([A + F * f(a), B + F * d(a)]), a += i } D.push([x, z]), n.moveTo(D[0][0], D[0][1]); for (var E = 0; E < D.length; E++) { n.lineTo(D[E][0], D[E][1]) } n.closePath() } }, getRect: function(a) { if (a.__rect) { return a.__rect } var i; return i = "stroke" == a.brushType || "fill" == a.brushType ? a.lineWidth || 1 : 0, a.__rect = { x: Math.round(a.x - a.r - i / 2), y: Math.round(a.y - a.r - i / 2), width: 2 * a.r + i, height: 2 * a.r + i }, a.__rect } }, c("../tool/util").inherits(j, h), j }), define("zrender/shape/Heart", ["require", "./Base", "./util/PathProxy", "../tool/area", "../tool/util"], function(c) { var h = c("./Base") , d = c("./util/PathProxy") , f = c("../tool/area") , b = function(a) { h.call(this, a), this._pathProxy = new d }; return b.prototype = { type: "heart", buildPath: function(a, j) { var i = this._pathProxy || new d; i.begin(a), i.moveTo(j.x, j.y), i.bezierCurveTo(j.x + j.a / 2, j.y - 2 * j.b / 3, j.x + 2 * j.a, j.y + j.b / 3, j.x, j.y + j.b), i.bezierCurveTo(j.x - 2 * j.a, j.y + j.b / 3, j.x - j.a / 2, j.y - 2 * j.b / 3, j.x, j.y), i.closePath() }, getRect: function(a) { return a.__rect ? a.__rect : (this._pathProxy.isEmpty() || this.buildPath(null, a), this._pathProxy.fastBoundingRect()) }, isCover: function(a, l) { var j = this.transformCoordToLocal(a, l); return a = j[0], l = j[1], this.isCoverRect(a, l) ? f.isInsidePath(this._pathProxy.pathCommands, this.style.lineWidth, this.style.brushType, a, l) : void 0 } }, c("../tool/util").inherits(b, h), b }), define("zrender/shape/Droplet", ["require", "./Base", "./util/PathProxy", "../tool/area", "../tool/util"], function(c) { var h = c("./Base") , d = c("./util/PathProxy") , f = c("../tool/area") , b = function(a) { h.call(this, a), this._pathProxy = new d }; return b.prototype = { type: "droplet", buildPath: function(a, j) { var i = this._pathProxy || new d; i.begin(a), i.moveTo(j.x, j.y + j.a), i.bezierCurveTo(j.x + j.a, j.y + j.a, j.x + 3 * j.a / 2, j.y - j.a / 3, j.x, j.y - j.b), i.bezierCurveTo(j.x - 3 * j.a / 2, j.y - j.a / 3, j.x - j.a, j.y + j.a, j.x, j.y + j.a), i.closePath() }, getRect: function(a) { return a.__rect ? a.__rect : (this._pathProxy.isEmpty() || this.buildPath(null, a), this._pathProxy.fastBoundingRect()) }, isCover: function(a, l) { var j = this.transformCoordToLocal(a, l); return a = j[0], l = j[1], this.isCoverRect(a, l) ? f.isInsidePath(this._pathProxy.pathCommands, this.style.lineWidth, this.style.brushType, a, l) : void 0 } }, c("../tool/util").inherits(b, h), b }), define("zrender/tool/math", [], function() { function c(a, i) { return Math.sin(i ? a * b : a) } function h(a, i) { return Math.cos(i ? a * b : a) } function d(a) { return a * b } function f(a) { return a / b } var b = Math.PI / 180; return { sin: c, cos: h, degreeToRadian: d, radianToDegree: f } }), define("zrender/shape/util/PathProxy", ["require", "../../tool/vector"], function(a) { var d = a("../../tool/vector") , b = function(f, h) { this.command = f, this.points = h || null } , c = function() { this.pathCommands = [], this._ctx = null, this._min = [], this._max = [] }; return c.prototype.fastBoundingRect = function() { var m = this._min , q = this._max; m[0] = m[1] = 1 / 0, q[0] = q[1] = -(1 / 0); for (var u = 0; u < this.pathCommands.length; u++) { var f = this.pathCommands[u] , v = f.points; switch (f.command) { case "M": d.min(m, m, v), d.max(q, q, v); break; case "L": d.min(m, m, v), d.max(q, q, v); break; case "C": for (var w = 0; 6 > w; w += 2) { m[0] = Math.min(m[0], m[0], v[w]), m[1] = Math.min(m[1], m[1], v[w + 1]), q[0] = Math.max(q[0], q[0], v[w]), q[1] = Math.max(q[1], q[1], v[w + 1]) } break; case "Q": for (var w = 0; 4 > w; w += 2) { m[0] = Math.min(m[0], m[0], v[w]), m[1] = Math.min(m[1], m[1], v[w + 1]), q[0] = Math.max(q[0], q[0], v[w]), q[1] = Math.max(q[1], q[1], v[w + 1]) } break; case "A": var x = v[0] , t = v[1] , p = v[2] , j = v[3]; m[0] = Math.min(m[0], m[0], x - p), m[1] = Math.min(m[1], m[1], t - j), q[0] = Math.max(q[0], q[0], x + p), q[1] = Math.max(q[1], q[1], t + j) } } return { x: m[0], y: m[1], width: q[0] - m[0], height: q[1] - m[1] } } , c.prototype.begin = function(f) { return this._ctx = f || null, this.pathCommands.length = 0, this } , c.prototype.moveTo = function(f, h) { return this.pathCommands.push(new b("M",[f, h])), this._ctx && this._ctx.moveTo(f, h), this } , c.prototype.lineTo = function(f, h) { return this.pathCommands.push(new b("L",[f, h])), this._ctx && this._ctx.lineTo(f, h), this } , c.prototype.bezierCurveTo = function(h, m, i, f, j, l) { return this.pathCommands.push(new b("C",[h, m, i, f, j, l])), this._ctx && this._ctx.bezierCurveTo(h, m, i, f, j, l), this } , c.prototype.quadraticCurveTo = function(h, j, i, f) { return this.pathCommands.push(new b("Q",[h, j, i, f])), this._ctx && this._ctx.quadraticCurveTo(h, j, i, f), this } , c.prototype.arc = function(h, m, i, f, j, l) { return this.pathCommands.push(new b("A",[h, m, i, i, f, j - f, 0, l ? 0 : 1])), this._ctx && this._ctx.arc(h, m, i, f, j, l), this } , c.prototype.arcTo = function(h, m, j, l, f) { return this._ctx && this._ctx.arcTo(h, m, j, l, f), this } , c.prototype.rect = function(f, l, h, j) { return this._ctx && this._ctx.rect(f, l, h, j), this } , c.prototype.closePath = function() { return this.pathCommands.push(new b("z")), this._ctx && this._ctx.closePath(), this } , c.prototype.isEmpty = function() { return 0 === this.pathCommands.length } , c.PathSegment = b, c }), define("zrender/shape/Line", ["require", "./Base", "./util/dashedLineTo", "../tool/util"], function(a) { var d = a("./Base") , b = a("./util/dashedLineTo") , c = function(f) { this.brushTypeOnly = "stroke", this.textPosition = "end", d.call(this, f) }; return c.prototype = { type: "line", buildPath: function(f, i) { if (i.lineType && "solid" != i.lineType) { if ("dashed" == i.lineType || "dotted" == i.lineType) { var h = (i.lineWidth || 1) * ("dashed" == i.lineType ? 5 : 1); b(f, i.xStart, i.yStart, i.xEnd, i.yEnd, h) } } else { f.moveTo(i.xStart, i.yStart), f.lineTo(i.xEnd, i.yEnd) } }, getRect: function(f) { if (f.__rect) { return f.__rect } var h = f.lineWidth || 1; return f.__rect = { x: Math.min(f.xStart, f.xEnd) - h, y: Math.min(f.yStart, f.yEnd) - h, width: Math.abs(f.xStart - f.xEnd) + h, height: Math.abs(f.yStart - f.yEnd) + h }, f.__rect } }, a("../tool/util").inherits(c, d), c }), define("zrender/shape/BezierCurve", ["require", "./Base", "../tool/util"], function(a) { var c = a("./Base") , b = function(d) { this.brushTypeOnly = "stroke", this.textPosition = "end", c.call(this, d) }; return b.prototype = { type: "bezier-curve", buildPath: function(d, f) { d.moveTo(f.xStart, f.yStart), "undefined" != typeof f.cpX2 && "undefined" != typeof f.cpY2 ? d.bezierCurveTo(f.cpX1, f.cpY1, f.cpX2, f.cpY2, f.xEnd, f.yEnd) : d.quadraticCurveTo(f.cpX1, f.cpY1, f.xEnd, f.yEnd) }, getRect: function(f) { if (f.__rect) { return f.__rect } var q = Math.min(f.xStart, f.xEnd, f.cpX1) , h = Math.min(f.yStart, f.yEnd, f.cpY1) , j = Math.max(f.xStart, f.xEnd, f.cpX1) , d = Math.max(f.yStart, f.yEnd, f.cpY1) , l = f.cpX2 , m = f.cpY2; "undefined" != typeof l && "undefined" != typeof m && (q = Math.min(q, l), h = Math.min(h, m), j = Math.max(j, l), d = Math.max(d, m)); var p = f.lineWidth || 1; return f.__rect = { x: q - p, y: h - p, width: j - q + p, height: d - h + p }, f.__rect } }, a("../tool/util").inherits(b, c), b }), define("zrender/shape/util/dashedLineTo", [], function() { var a = [5, 5]; return function(x, m, q, b, u, v) { if (x.setLineDash) { return a[0] = a[1] = v, x.setLineDash(a), x.moveTo(m, q), void x.lineTo(b, u) } v = "number" != typeof v ? 5 : v; var w = b - m , p = u - q , j = Math.floor(Math.sqrt(w * w + p * p) / v); w /= j, p /= j; for (var f = !0, e = 0; j > e; ++e) { f ? x.moveTo(m, q) : x.lineTo(m, q), f = !f, m += w, q += p } x.lineTo(b, u) } }), define("zrender/shape/Polygon", ["require", "./Base", "./util/smoothSpline", "./util/smoothBezier", "./util/dashedLineTo", "../tool/util"], function(c) { var j = c("./Base") , d = c("./util/smoothSpline") , f = c("./util/smoothBezier") , b = c("./util/dashedLineTo") , h = function(a) { j.call(this, a) }; return h.prototype = { type: "polygon", buildPath: function(n, A) { var w = A.pointList; if (!(w.length < 2)) { if (A.smooth && "spline" !== A.smooth) { var y = f(w, A.smooth, !0, A.smoothConstraint); n.moveTo(w[0][0], w[0][1]); for (var z, u, q, i = w.length, a = 0; i > a; a++) { z = y[2 * a], u = y[2 * a + 1], q = w[(a + 1) % i], n.bezierCurveTo(z[0], z[1], u[0], u[1], q[0], q[1]) } } else { if ("spline" === A.smooth && (w = d(w, !0)), A.lineType && "solid" != A.lineType) { if ("dashed" == A.lineType || "dotted" == A.lineType) { var v = A._dashLength || (A.lineWidth || 1) * ("dashed" == A.lineType ? 5 : 1); A._dashLength = v, n.moveTo(w[0][0], w[0][1]); for (var a = 1, x = w.length; x > a; a++) { b(n, w[a - 1][0], w[a - 1][1], w[a][0], w[a][1], v) } b(n, w[w.length - 1][0], w[w.length - 1][1], w[0][0], w[0][1], v) } } else { n.moveTo(w[0][0], w[0][1]); for (var a = 1, x = w.length; x > a; a++) { n.lineTo(w[a][0], w[a][1]) } n.lineTo(w[0][0], w[0][1]) } } n.closePath() } }, getRect: function(p) { if (p.__rect) { return p.__rect } for (var z = Number.MAX_VALUE, q = Number.MIN_VALUE, v = Number.MAX_VALUE, m = Number.MIN_VALUE, w = p.pointList, x = 0, y = w.length; y > x; x++) { w[x][0] < z && (z = w[x][0]), w[x][0] > q && (q = w[x][0]), w[x][1] < v && (v = w[x][1]), w[x][1] > m && (m = w[x][1]) } var u; return u = "stroke" == p.brushType || "fill" == p.brushType ? p.lineWidth || 1 : 0, p.__rect = { x: Math.round(z - u / 2), y: Math.round(v - u / 2), width: q - z + u, height: m - v + u }, p.__rect } }, c("../tool/util").inherits(h, j), h }), define("echarts/util/shape/normalIsCover", [], function() { return function(a, c) { var b = this.transformCoordToLocal(a, c); return a = b[0], c = b[1], this.isCoverRect(a, c) } }), define("zrender/shape/util/smoothSpline", ["require", "../../tool/vector"], function(a) { function c(f, v, h, m, d, p, q) { var u = 0.5 * (h - f) , j = 0.5 * (m - v); return (2 * (v - h) + u + j) * q + (-3 * (v - h) - 2 * u - j) * p + u * d + v } var b = a("../../tool/vector"); return function(q, y) { for (var f = q.length, z = [], B = 0, C = 1; f > C; C++) { B += b.distance(q[C - 1], q[C]) } var w = B / 5; w = f > w ? f : w; for (var C = 0; w > C; C++) { var v, j, i, x = C / (w - 1) * (y ? f : f - 1), A = Math.floor(x), D = x - A, F = q[A % f]; y ? (v = q[(A - 1 + f) % f], j = q[(A + 1) % f], i = q[(A + 2) % f]) : (v = q[0 === A ? A : A - 1], j = q[A > f - 2 ? f - 1 : A + 1], i = q[A > f - 3 ? f - 1 : A + 2]); var E = D * D , t = D * E; z.push([c(v[0], F[0], j[0], i[0], D, E, t), c(v[1], F[1], j[1], i[1], D, E, t)]) } return z } }), define("zrender/shape/util/smoothBezier", ["require", "../../tool/vector"], function(a) { var b = a("../../tool/vector"); return function(x, C, F, q) { var G, I, J, D, B = [], w = [], v = [], E = [], H = !!q; if (H) { J = [1 / 0, 1 / 0], D = [-(1 / 0), -(1 / 0)]; for (var K = 0, M = x.length; M > K; K++) { b.min(J, J, x[K]), b.max(D, D, x[K]) } b.min(J, J, q[0]), b.max(D, D, q[1]) } for (var K = 0, M = x.length; M > K; K++) { var G, I, L = x[K]; if (F) { G = x[K ? K - 1 : M - 1], I = x[(K + 1) % M] } else { if (0 === K || K === M - 1) { B.push(b.clone(x[K])); continue } G = x[K - 1], I = x[K + 1] } b.sub(w, I, G), b.scale(w, w, C); var A = b.distance(L, G) , z = b.distance(L, I) , N = A + z; 0 !== N && (A /= N, z /= N), b.scale(v, w, -A), b.scale(E, w, z); var t = b.add([], L, v) , j = b.add([], L, E); H && (b.max(t, t, J), b.min(t, t, D), b.max(j, j, J), b.min(j, j, D)), B.push(t), B.push(j) } return F && B.push(b.clone(B.shift())), B } }), define("echarts/util/ecQuery", ["require", "zrender/tool/util"], function(c) { function h(a, m) { if ("undefined" != typeof a) { if (!m) { return a } m = m.split("."); for (var j = m.length, l = 0; j > l; ) { if (a = a[m[l]], "undefined" == typeof a) { return } l++ } return a } } function d(l, m) { for (var p, j = 0, q = l.length; q > j; j++) { if (p = h(l[j], m), "undefined" != typeof p) { return p } } } function f(a, j) { for (var l, m = a.length; m--; ) { var p = h(a[m], j); "undefined" != typeof p && ("undefined" == typeof l ? l = b.clone(p) : b.merge(l, p, !0)) } return l } var b = c("zrender/tool/util"); return { query: h, deepQuery: d, deepMerge: f } }), define("echarts/util/number", [], function() { function c(a) { return a.replace(/^\s+/, "").replace(/\s+$/, "") } function j(e, a) { return "string" == typeof e ? c(e).match(/%$/) ? parseFloat(e) / 100 * a : parseFloat(e) : e } function d(a, l) { return [j(l[0], a.getWidth()), j(l[1], a.getHeight())] } function f(a, l) { l instanceof Array || (l = [0, l]); var m = Math.min(a.getWidth(), a.getHeight()) / 2; return [j(l[0], m), j(l[1], m)] } function b(a) { return isNaN(a) ? "-" : (a = (a + "").split("."), a[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g, "$1,") + (a.length > 1 ? "." + a[1] : "")) } function h(a) { for (var m = 1, l = 0; Math.round(a * m) / m !== a; ) { m *= 10, l++ } return l } return { parsePercent: j, parseCenter: d, parseRadius: f, addCommas: b, getPrecision: h } }), define("echarts/data/KDTree", ["require", "./quickSelect"], function(a) { function d(f, h) { this.left = null, this.right = null, this.axis = f, this.data = h } var b = a("./quickSelect") , c = function(f, h) { f.length && (h || (h = f[0].array.length), this.dimension = h, this.root = this._buildTree(f, 0, f.length - 1, 0), this._stack = [], this._nearstNList = []) }; return c.prototype._buildTree = function(h, j, f, m) { if (j > f) { return null } var p = Math.floor((j + f) / 2); p = b(h, j, f, p, function(l, n) { return l.array[m] - n.array[m] }); var q = h[p] , i = new d(m,q); return m = (m + 1) % this.dimension, f > j && (i.left = this._buildTree(h, j, p - 1, m), i.right = this._buildTree(h, p + 1, f, m)), i } , c.prototype.nearest = function(j, y) { var p = this.root , u = this._stack , f = 0 , v = 1 / 0 , w = null; for (p.data !== j && (v = y(p.data, j), w = p), j.array[p.axis] < p.data.array[p.axis] ? (p.right && (u[f++] = p.right), p.left && (u[f++] = p.left)) : (p.left && (u[f++] = p.left), p.right && (u[f++] = p.right)); f--; ) { p = u[f]; var x = j.array[p.axis] - p.data.array[p.axis] , q = 0 > x , m = !1; x *= x, v > x && (x = y(p.data, j), v > x && p.data !== j && (v = x, w = p), m = !0), q ? (m && p.right && (u[f++] = p.right), p.left && (u[f++] = p.left)) : (m && p.left && (u[f++] = p.left), p.right && (u[f++] = p.right)) } return w.data } , c.prototype._addNearest = function(h, m, j) { for (var l = this._nearstNList, f = h - 1; f > 0 && !(m >= l[f - 1].dist); f--) { l[f].dist = l[f - 1].dist, l[f].node = l[f - 1].node } l[f].dist = m, l[f].node = j } , c.prototype.nearestN = function(q, C, v, y) { if (0 >= C) { return y.length = 0, y } for (var f = this.root, z = this._stack, A = 0, B = this._nearstNList, w = 0; C > w; w++) { B[w] || (B[w] = {}), B[w].dist = 0, B[w].node = null } var u = v(f.data, q) , p = 0; for (f.data !== q && (p++, this._addNearest(p, u, f)), q.array[f.axis] < f.data.array[f.axis] ? (f.right && (z[A++] = f.right), f.left && (z[A++] = f.left)) : (f.left && (z[A++] = f.left), f.right && (z[A++] = f.right)); A--; ) { f = z[A]; var u = q.array[f.axis] - f.data.array[f.axis] , j = 0 > u , x = !1; u *= u, (C > p || u < B[p - 1].dist) && (u = v(f.data, q), (C > p || u < B[p - 1].dist) && f.data !== q && (C > p && p++, this._addNearest(p, u, f)), x = !0), j ? (x && f.right && (z[A++] = f.right), f.left && (z[A++] = f.left)) : (x && f.left && (z[A++] = f.left), f.right && (z[A++] = f.right)) } for (var w = 0; p > w; w++) { y[w] = B[w].node.data } return y.length = p, y } , c }), define("echarts/data/quickSelect", ["require"], function() { function a(f, h) { return f - h } function d(f, l, h) { var j = f[l]; f[l] = f[h], f[h] = j } function b(h, j, p, f, q) { for (var t = j; p > j; ) { var t = Math.round((p + j) / 2) , u = h[t]; d(h, t, p), t = j; for (var m = j; p - 1 >= m; m++) { q(u, h[m]) >= 0 && (d(h, m, t), t++) } if (d(h, p, t), t === f) { return t } f > t ? j = t + 1 : p = t - 1 } return j } function c(j, f, e, h, i) { return arguments.length <= 3 && (h = f, i = 2 == arguments.length ? a : e, f = 0, e = j.length - 1), b(j, f, e, h, i) } return c }), define("echarts/component/dataView", ["require", "./base", "../config", "zrender/tool/util", "../component"], function(c) { function h(j, p, l, i, m) { d.call(this, j, p, l, i, m), this.dom = m.dom, this._tDom = document.createElement("div"), this._textArea = document.createElement("textArea"), this._buttonRefresh = document.createElement("button"), this._buttonRefresh.setAttribute("type", "button"), this._buttonClose = document.createElement("button"), this._buttonClose.setAttribute("type", "button"), this._hasShow = !1, this._zrHeight = l.getHeight(), this._zrWidth = l.getWidth(), this._tDom.className = "echarts-dataview", this.hide(), this.dom.firstChild.appendChild(this._tDom), window.addEventListener ? (this._tDom.addEventListener("click", this._stop), this._tDom.addEventListener("mousewheel", this._stop), this._tDom.addEventListener("mousemove", this._stop), this._tDom.addEventListener("mousedown", this._stop), this._tDom.addEventListener("mouseup", this._stop), this._tDom.addEventListener("touchstart", this._stop), this._tDom.addEventListener("touchmove", this._stop), this._tDom.addEventListener("touchend", this._stop)) : (this._tDom.attachEvent("onclick", this._stop), this._tDom.attachEvent("onmousewheel", this._stop), this._tDom.attachEvent("onmousemove", this._stop), this._tDom.attachEvent("onmousedown", this._stop), this._tDom.attachEvent("onmouseup", this._stop)) } var d = c("./base") , f = c("../config") , b = c("zrender/tool/util"); return h.prototype = { type: f.COMPONENT_TYPE_DATAVIEW, _lang: ["Data View", "close", "refresh"], _gCssText: "position:absolute;display:block;overflow:hidden;transition:height 0.8s,background-color 1s;-moz-transition:height 0.8s,background-color 1s;-webkit-transition:height 0.8s,background-color 1s;-o-transition:height 0.8s,background-color 1s;z-index:1;left:0;top:0;", hide: function() { this._sizeCssText = "width:" + this._zrWidth + "px;height:0px;background-color:#f0ffff;", this._tDom.style.cssText = this._gCssText + this._sizeCssText }, show: function(a) { this._hasShow = !0; var m = this.query(this.option, "toolbox.feature.dataView.lang") || this._lang; this.option = a, this._tDom.innerHTML = '

' + (m[0] || this._lang[0]) + "

"; var j = this.query(this.option, "toolbox.feature.dataView.optionToContent"); "function" != typeof j ? this._textArea.value = this._optionToContent() : (this._textArea = document.createElement("div"), this._textArea.innerHTML = j(this.option)), this._textArea.style.cssText = "display:block;margin:0 0 8px 0;padding:4px 6px;overflow:auto;width:100%;height:" + (this._zrHeight - 100) + "px;", this._tDom.appendChild(this._textArea), this._buttonClose.style.cssText = "float:right;padding:1px 6px;", this._buttonClose.innerHTML = m[1] || this._lang[1]; var l = this; this._buttonClose.onclick = function() { l.hide() } , this._tDom.appendChild(this._buttonClose), this.query(this.option, "toolbox.feature.dataView.readOnly") === !1 ? (this._buttonRefresh.style.cssText = "float:right;margin-right:10px;padding:1px 6px;", this._buttonRefresh.innerHTML = m[2] || this._lang[2], this._buttonRefresh.onclick = function() { l._save() } , this._textArea.readOnly = !1, this._textArea.style.cursor = "default") : (this._buttonRefresh.style.cssText = "display:none", this._textArea.readOnly = !0, this._textArea.style.cursor = "text"), this._tDom.appendChild(this._buttonRefresh), this._sizeCssText = "width:" + this._zrWidth + "px;height:" + this._zrHeight + "px;background-color:#fff;", this._tDom.style.cssText = this._gCssText + this._sizeCssText }, _optionToContent: function() { var n, y, q, j, v, w, x = [], u = ""; if (this.option.xAxis) { for (x = this.option.xAxis instanceof Array ? this.option.xAxis : [this.option.xAxis], n = 0, j = x.length; j > n; n++) { if ("category" == (x[n].type || "category")) { for (w = [], y = 0, q = x[n].data.length; q > y; y++) { w.push(this.getDataFromOption(x[n].data[y])) } u += w.join(", ") + "\n\n" } } } if (this.option.yAxis) { for (x = this.option.yAxis instanceof Array ? this.option.yAxis : [this.option.yAxis], n = 0, j = x.length; j > n; n++) { if ("category" == x[n].type) { for (w = [], y = 0, q = x[n].data.length; q > y; y++) { w.push(this.getDataFromOption(x[n].data[y])) } u += w.join(", ") + "\n\n" } } } var p, m = this.option.series; for (n = 0, j = m.length; j > n; n++) { for (w = [], y = 0, q = m[n].data.length; q > y; y++) { v = m[n].data[y], p = m[n].type == f.CHART_TYPE_PIE || m[n].type == f.CHART_TYPE_MAP ? (v.name || "-") + ":" : "", m[n].type == f.CHART_TYPE_SCATTER && (v = this.getDataFromOption(v).join(", ")), w.push(p + this.getDataFromOption(v)) } u += (m[n].name || "-") + " : \n", u += w.join(m[n].type == f.CHART_TYPE_SCATTER ? "\n" : ", "), u += "\n\n" } return u }, _save: function() { var l = this.query(this.option, "toolbox.feature.dataView.contentToOption"); if ("function" != typeof l) { for (var q = this._textArea.value.split("\n"), m = [], j = 0, n = q.length; n > j; j++) { q[j] = this._trim(q[j]), "" !== q[j] && m.push(q[j]) } this._contentToOption(m) } else { l(this._textArea, this.option) } this.hide(); var p = this; setTimeout(function() { p.messageCenter && p.messageCenter.dispatch(f.EVENT.DATA_VIEW_CHANGED, null, { option: p.option }, p.myChart) }, p.canvasSupported ? 800 : 100) }, _contentToOption: function(p) { var z, u, j, w, x, y, v, q = [], n = 0; if (this.option.xAxis) { for (q = this.option.xAxis instanceof Array ? this.option.xAxis : [this.option.xAxis], z = 0, w = q.length; w > z; z++) { if ("category" == (q[z].type || "category")) { for (y = p[n].split(","), u = 0, j = q[z].data.length; j > u; u++) { v = this._trim(y[u] || ""), x = q[z].data[u], "undefined" != typeof q[z].data[u].value ? q[z].data[u].value = v : q[z].data[u] = v } n++ } } } if (this.option.yAxis) { for (q = this.option.yAxis instanceof Array ? this.option.yAxis : [this.option.yAxis], z = 0, w = q.length; w > z; z++) { if ("category" == q[z].type) { for (y = p[n].split(","), u = 0, j = q[z].data.length; j > u; u++) { v = this._trim(y[u] || ""), x = q[z].data[u], "undefined" != typeof q[z].data[u].value ? q[z].data[u].value = v : q[z].data[u] = v } n++ } } } var m = this.option.series; for (z = 0, w = m.length; w > z; z++) { if (n++, m[z].type == f.CHART_TYPE_SCATTER) { for (var u = 0, j = m[z].data.length; j > u; u++) { y = p[n], v = y.replace(" ", "").split(","), "undefined" != typeof m[z].data[u].value ? m[z].data[u].value = v : m[z].data[u] = v, n++ } } else { y = p[n].split(","); for (var u = 0, j = m[z].data.length; j > u; u++) { v = (y[u] || "").replace(/.*:/, ""), v = this._trim(v), v = "-" != v && "" !== v ? v - 0 : "-", "undefined" != typeof m[z].data[u].value ? m[z].data[u].value = v : m[z].data[u] = v } n++ } } }, _trim: function(a) { var i = new RegExp("(^[\\s\\t\\xa0\\u3000]+)|([\\u3000\\xa0\\s\\t]+$)","g"); return a.replace(i, "") }, _stop: function(a) { a = a || window.event, a.stopPropagation ? a.stopPropagation() : a.cancelBubble = !0 }, resize: function() { this._zrHeight = this.zr.getHeight(), this._zrWidth = this.zr.getWidth(), this._tDom.offsetHeight > 10 && (this._sizeCssText = "width:" + this._zrWidth + "px;height:" + this._zrHeight + "px;background-color:#fff;", this._tDom.style.cssText = this._gCssText + this._sizeCssText, this._textArea.style.cssText = "display:block;margin:0 0 8px 0;padding:4px 6px;overflow:auto;width:100%;height:" + (this._zrHeight - 100) + "px;") }, dispose: function() { window.removeEventListener ? (this._tDom.removeEventListener("click", this._stop), this._tDom.removeEventListener("mousewheel", this._stop), this._tDom.removeEventListener("mousemove", this._stop), this._tDom.removeEventListener("mousedown", this._stop), this._tDom.removeEventListener("mouseup", this._stop), this._tDom.removeEventListener("touchstart", this._stop), this._tDom.removeEventListener("touchmove", this._stop), this._tDom.removeEventListener("touchend", this._stop)) : (this._tDom.detachEvent("onclick", this._stop), this._tDom.detachEvent("onmousewheel", this._stop), this._tDom.detachEvent("onmousemove", this._stop), this._tDom.detachEvent("onmousedown", this._stop), this._tDom.detachEvent("onmouseup", this._stop)), this._buttonRefresh.onclick = null, this._buttonClose.onclick = null, this._hasShow && (this._tDom.removeChild(this._textArea), this._tDom.removeChild(this._buttonRefresh), this._tDom.removeChild(this._buttonClose)), this._textArea = null, this._buttonRefresh = null, this._buttonClose = null, this.dom.firstChild.removeChild(this._tDom), this._tDom = null } }, b.inherits(h, d), c("../component").define("dataView", h), h }), define("echarts/util/shape/Cross", ["require", "zrender/shape/Base", "zrender/shape/Line", "zrender/tool/util", "./normalIsCover"], function(c) { function h(a) { d.call(this, a) } var d = c("zrender/shape/Base") , f = c("zrender/shape/Line") , b = c("zrender/tool/util"); return h.prototype = { type: "cross", buildPath: function(a, l) { var j = l.rect; l.xStart = j.x, l.xEnd = j.x + j.width, l.yStart = l.yEnd = l.y, f.prototype.buildPath(a, l), l.xStart = l.xEnd = l.x, l.yStart = j.y, l.yEnd = j.y + j.height, f.prototype.buildPath(a, l) }, getRect: function(a) { return a.rect }, isCover: c("./normalIsCover") }, b.inherits(h, d), h }), define("zrender/shape/Sector", ["require", "../tool/math", "../tool/computeBoundingBox", "../tool/vector", "./Base", "../tool/util"], function(c) { var v = c("../tool/math") , f = c("../tool/computeBoundingBox") , m = c("../tool/vector") , b = c("./Base") , p = m.create() , q = m.create() , u = m.create() , j = m.create() , d = function(a) { b.call(this, a) }; return d.prototype = { type: "sector", buildPath: function(y, A) { var C = A.x , t = A.y , D = A.r0 || 0 , E = A.r , F = A.startAngle , B = A.endAngle , z = A.clockWise || !1; F = v.degreeToRadian(F), B = v.degreeToRadian(B), z || (F = -F, B = -B); var x = v.cos(F) , w = v.sin(F); y.moveTo(x * D + C, w * D + t), y.lineTo(x * E + C, w * E + t), y.arc(C, t, E, F, B, !z), y.lineTo(v.cos(B) * D + C, v.sin(B) * D + t), 0 !== D && y.arc(C, t, D, B, F, z), y.closePath() }, getRect: function(o) { if (o.__rect) { return o.__rect } var i = o.x , r = o.y , n = o.r0 || 0 , l = o.r , s = v.degreeToRadian(o.startAngle) , t = v.degreeToRadian(o.endAngle) , w = o.clockWise; return w || (s = -s, t = -t), n > 1 ? f.arc(i, r, n, s, t, !w, p, u) : (p[0] = u[0] = i, p[1] = u[1] = r), f.arc(i, r, l, s, t, !w, q, j), m.min(p, p, q), m.max(u, u, j), o.__rect = { x: p[0], y: p[1], width: u[0] - p[0], height: u[1] - p[1] }, o.__rect } }, c("../tool/util").inherits(d, b), d }), define("echarts/util/shape/Candle", ["require", "zrender/shape/Base", "zrender/tool/util", "./normalIsCover"], function(a) { function d(f) { b.call(this, f) } var b = a("zrender/shape/Base") , c = a("zrender/tool/util"); return d.prototype = { type: "candle", _numberOrder: function(f, h) { return h - f }, buildPath: function(f, j) { var h = c.clone(j.y).sort(this._numberOrder); f.moveTo(j.x, h[3]), f.lineTo(j.x, h[2]), f.moveTo(j.x - j.width / 2, h[2]), f.rect(j.x - j.width / 2, h[2], j.width, h[1] - h[2]), f.moveTo(j.x, h[1]), f.lineTo(j.x, h[0]) }, getRect: function(f) { if (!f.__rect) { var j = 0; ("stroke" == f.brushType || "fill" == f.brushType) && (j = f.lineWidth || 1); var h = c.clone(f.y).sort(this._numberOrder); f.__rect = { x: Math.round(f.x - f.width / 2 - j / 2), y: Math.round(h[3] - j / 2), width: f.width + j, height: h[0] - h[3] + j } } return f.__rect }, isCover: a("./normalIsCover") }, c.inherits(d, b), d }), define("zrender/tool/computeBoundingBox", ["require", "./vector", "./curve"], function(c) { function v(w, D, x) { if (0 !== w.length) { for (var z = w[0][0], h = w[0][0], A = w[0][1], B = w[0][1], C = 1; C < w.length; C++) { var y = w[C]; y[0] < z && (z = y[0]), y[0] > h && (h = y[0]), y[1] < A && (A = y[1]), y[1] > B && (B = y[1]) } D[0] = z, D[1] = A, x[0] = h, x[1] = B } } function f(y, H, A, D, o, F) { var G = []; p.cubicExtrema(y[0], H[0], A[0], D[0], G); for (var B = 0; B < G.length; B++) { G[B] = p.cubicAt(y[0], H[0], A[0], D[0], G[B]) } var z = []; p.cubicExtrema(y[1], H[1], A[1], D[1], z); for (var B = 0; B < z.length; B++) { z[B] = p.cubicAt(y[1], H[1], A[1], D[1], z[B]) } G.push(y[0], D[0]), z.push(y[1], D[1]); var x = Math.min.apply(null, G) , w = Math.max.apply(null, G) , C = Math.min.apply(null, z) , E = Math.max.apply(null, z); o[0] = x, o[1] = C, F[0] = w, F[1] = E } function m(y, H, A, D, o) { var F = p.quadraticExtremum(y[0], H[0], A[0]) , G = p.quadraticExtremum(y[1], H[1], A[1]); F = Math.max(Math.min(F, 1), 0), G = Math.max(Math.min(G, 1), 0); var B = 1 - F , z = 1 - G , x = B * B * y[0] + 2 * B * F * H[0] + F * F * A[0] , w = B * B * y[1] + 2 * B * F * H[1] + F * F * A[1] , C = z * z * y[0] + 2 * z * G * H[0] + G * G * A[0] , E = z * z * y[1] + 2 * z * G * H[1] + G * G * A[1]; D[0] = Math.min(y[0], A[0], x, C), D[1] = Math.min(y[1], A[1], w, E), o[0] = Math.max(y[0], A[0], x, C), o[1] = Math.max(y[1], A[1], w, E) } var b = c("./vector") , p = c("./curve") , q = b.create() , u = b.create() , j = b.create() , d = function(r, B, w, y, z, s, l, a) { if (Math.abs(y - z) >= 2 * Math.PI) { return l[0] = r - w, l[1] = B - w, a[0] = r + w, void (a[1] = B + w) } if (q[0] = Math.cos(y) * w + r, q[1] = Math.sin(y) * w + B, u[0] = Math.cos(z) * w + r, u[1] = Math.sin(z) * w + B, b.min(l, q, u), b.max(a, q, u), y %= 2 * Math.PI, 0 > y && (y += 2 * Math.PI), z %= 2 * Math.PI, 0 > z && (z += 2 * Math.PI), y > z && !s ? z += 2 * Math.PI : z > y && s && (y += 2 * Math.PI), s) { var x = z; z = y, y = x } for (var A = 0; z > A; A += Math.PI / 2) { A > y && (j[0] = Math.cos(A) * w + r, j[1] = Math.sin(A) * w + B, b.min(l, j, l), b.max(a, j, a)) } }; return v.cubeBezier = f, v.quadraticBezier = m, v.arc = d, v }), define("echarts/util/shape/Chain", ["require", "zrender/shape/Base", "./Icon", "zrender/shape/util/dashedLineTo", "zrender/tool/util", "zrender/tool/matrix"], function(c) { function l(a) { d.call(this, a) } var d = c("zrender/shape/Base") , f = c("./Icon") , b = c("zrender/shape/util/dashedLineTo") , h = c("zrender/tool/util") , j = c("zrender/tool/matrix"); return l.prototype = { type: "chain", brush: function(a, n) { var m = this.style; n && (m = this.getHighlightStyle(m, this.highlightStyle || {})), a.save(), this.setContext(a, m), this.setTransform(a), a.save(), a.beginPath(), this.buildLinePath(a, m), a.stroke(), a.restore(), this.brushSymbol(a, m), a.restore() }, buildLinePath: function(a, w) { var m = w.x , p = w.y + 5 , q = w.width , u = w.height / 2 - 10; if (a.moveTo(m, p), a.lineTo(m, p + u), a.moveTo(m + q, p), a.lineTo(m + q, p + u), a.moveTo(m, p + u / 2), w.lineType && "solid" != w.lineType) { if ("dashed" == w.lineType || "dotted" == w.lineType) { var v = (w.lineWidth || 1) * ("dashed" == w.lineType ? 5 : 1); b(a, m, p + u / 2, m + q, p + u / 2, v) } } else { a.lineTo(m + q, p + u / 2) } }, brushSymbol: function(n, x) { var p = x.y + x.height / 4; n.save(); for (var m, u = x.chainPoint, v = 0, w = u.length; w > v; v++) { if (m = u[v], "none" != m.symbol) { n.beginPath(); var q = m.symbolSize; f.prototype.buildPath(n, { iconType: m.symbol, x: m.x - q, y: p - q, width: 2 * q, height: 2 * q, n: m.n }), n.fillStyle = m.isEmpty ? "#fff" : x.strokeColor, n.closePath(), n.fill(), n.stroke() } m.showLabel && (n.font = m.textFont, n.fillStyle = m.textColor, n.textAlign = m.textAlign, n.textBaseline = m.textBaseline, m.rotation ? (n.save(), this._updateTextTransform(n, m.rotation), n.fillText(m.name, m.textX, m.textY), n.restore()) : n.fillText(m.name, m.textX, m.textY)) } n.restore() }, _updateTextTransform: function(o, r) { var p = j.create(); if (j.identity(p), 0 !== r[0]) { var q = r[1] || 0 , m = r[2] || 0; (q || m) && j.translate(p, p, [-q, -m]), j.rotate(p, p, r[0]), (q || m) && j.translate(p, p, [q, m]) } o.transform.apply(o, p) }, isCover: function(a, n) { var m = this.style; return a >= m.x && a <= m.x + m.width && n >= m.y && n <= m.y + m.height ? !0 : !1 } }, h.inherits(l, d), l }), define("zrender/shape/Ring", ["require", "./Base", "../tool/util"], function(a) { var c = a("./Base") , b = function(d) { c.call(this, d) }; return b.prototype = { type: "ring", buildPath: function(d, f) { d.arc(f.x, f.y, f.r, 0, 2 * Math.PI, !1), d.moveTo(f.x + f.r0, f.y), d.arc(f.x, f.y, f.r0, 0, 2 * Math.PI, !0) }, getRect: function(d) { if (d.__rect) { return d.__rect } var f; return f = "stroke" == d.brushType || "fill" == d.brushType ? d.lineWidth || 1 : 0, d.__rect = { x: Math.round(d.x - d.r - f / 2), y: Math.round(d.y - d.r - f / 2), width: 2 * d.r + f, height: 2 * d.r + f }, d.__rect } }, a("../tool/util").inherits(b, c), b }), define("echarts/component/axis", ["require", "./base", "zrender/shape/Line", "../config", "../util/ecData", "zrender/tool/util", "zrender/tool/color", "./categoryAxis", "./valueAxis", "../component"], function(c) { function m(p, v, q, i, s, u) { d.call(this, p, v, q, i, s), this.axisType = u, this._axisList = [], this.refresh(i) } var d = c("./base") , f = c("zrender/shape/Line") , b = c("../config") , h = c("../util/ecData") , j = c("zrender/tool/util") , l = c("zrender/tool/color"); return m.prototype = { type: b.COMPONENT_TYPE_AXIS, axisBase: { _buildAxisLine: function() { var p = this.option.axisLine.lineStyle.width , s = p / 2 , q = { _axisShape: "axisLine", zlevel: this.getZlevelBase(), z: this.getZBase() + 3, hoverable: !1 } , n = this.grid; switch (this.option.position) { case "left": q.style = { xStart: n.getX() - s, yStart: n.getYend(), xEnd: n.getX() - s, yEnd: n.getY(), lineCap: "round" }; break; case "right": q.style = { xStart: n.getXend() + s, yStart: n.getYend(), xEnd: n.getXend() + s, yEnd: n.getY(), lineCap: "round" }; break; case "bottom": q.style = { xStart: n.getX(), yStart: n.getYend() + s, xEnd: n.getXend(), yEnd: n.getYend() + s, lineCap: "round" }; break; case "top": q.style = { xStart: n.getX(), yStart: n.getY() - s, xEnd: n.getXend(), yEnd: n.getY() - s, lineCap: "round" } } var r = q.style; "" !== this.option.name && (r.text = this.option.name, r.textPosition = this.option.nameLocation, r.textFont = this.getFont(this.option.nameTextStyle), this.option.nameTextStyle.align && (r.textAlign = this.option.nameTextStyle.align), this.option.nameTextStyle.baseline && (r.textBaseline = this.option.nameTextStyle.baseline), this.option.nameTextStyle.color && (r.textColor = this.option.nameTextStyle.color)), r.strokeColor = this.option.axisLine.lineStyle.color, r.lineWidth = p, this.isHorizontal() ? r.yStart = r.yEnd = this.subPixelOptimize(r.yEnd, p) : r.xStart = r.xEnd = this.subPixelOptimize(r.xEnd, p), r.lineType = this.option.axisLine.lineStyle.type, q = new f(q), this.shapeList.push(q) }, _axisLabelClickable: function(a, i) { return a ? (h.pack(i, void 0, -1, void 0, -1, i.style.text), i.hoverable = !0, i.clickable = !0, i.highlightStyle = { color: l.lift(i.style.color, 1), brushType: "fill" }, i) : i }, refixAxisShape: function(p, s) { if (this.option.axisLine.onZero) { var q; if (this.isHorizontal() && null != s) { for (var r = 0, o = this.shapeList.length; o > r; r++) { "axisLine" === this.shapeList[r]._axisShape ? (this.shapeList[r].style.yStart = this.shapeList[r].style.yEnd = this.subPixelOptimize(s, this.shapeList[r].stylelineWidth), this.zr.modShape(this.shapeList[r].id)) : "axisTick" === this.shapeList[r]._axisShape && (q = this.shapeList[r].style.yEnd - this.shapeList[r].style.yStart, this.shapeList[r].style.yStart = s - q, this.shapeList[r].style.yEnd = s, this.zr.modShape(this.shapeList[r].id)) } } if (!this.isHorizontal() && null != p) { for (var r = 0, o = this.shapeList.length; o > r; r++) { "axisLine" === this.shapeList[r]._axisShape ? (this.shapeList[r].style.xStart = this.shapeList[r].style.xEnd = this.subPixelOptimize(p, this.shapeList[r].stylelineWidth), this.zr.modShape(this.shapeList[r].id)) : "axisTick" === this.shapeList[r]._axisShape && (q = this.shapeList[r].style.xEnd - this.shapeList[r].style.xStart, this.shapeList[r].style.xStart = p, this.shapeList[r].style.xEnd = p + q, this.zr.modShape(this.shapeList[r].id)) } } } }, getPosition: function() { return this.option.position }, isHorizontal: function() { return "bottom" === this.option.position || "top" === this.option.position } }, reformOption: function(a) { if (!a || a instanceof Array && 0 === a.length ? a = [{ type: b.COMPONENT_TYPE_AXIS_VALUE }] : a instanceof Array || (a = [a]), a.length > 2 && (a = [a[0], a[1]]), "xAxis" === this.axisType) { (!a[0].position || "bottom" != a[0].position && "top" != a[0].position) && (a[0].position = "bottom"), a.length > 1 && (a[1].position = "bottom" === a[0].position ? "top" : "bottom"); for (var o = 0, n = a.length; n > o; o++) { a[o].type = a[o].type || "category", a[o].xAxisIndex = o, a[o].yAxisIndex = -1 } } else { (!a[0].position || "left" != a[0].position && "right" != a[0].position) && (a[0].position = "left"), a.length > 1 && (a[1].position = "left" === a[0].position ? "right" : "left"); for (var o = 0, n = a.length; n > o; o++) { a[o].type = a[o].type || "value", a[o].xAxisIndex = -1, a[o].yAxisIndex = o } } return a }, refresh: function(v) { var p; v && (this.option = v, "xAxis" === this.axisType ? (this.option.xAxis = this.reformOption(v.xAxis), p = this.option.xAxis) : (this.option.yAxis = this.reformOption(v.yAxis), p = this.option.yAxis), this.series = v.series); for (var q = c("./categoryAxis"), e = c("./valueAxis"), s = Math.max(p && p.length || 0, this._axisList.length), u = 0; s > u; u++) { !this._axisList[u] || !v || p[u] && this._axisList[u].type == p[u].type || (this._axisList[u].dispose && this._axisList[u].dispose(), this._axisList[u] = !1), this._axisList[u] ? this._axisList[u].refresh && this._axisList[u].refresh(p ? p[u] : !1, this.series) : p && p[u] && (this._axisList[u] = "category" === p[u].type ? new q(this.ecTheme,this.messageCenter,this.zr,p[u],this.myChart,this.axisBase) : new e(this.ecTheme,this.messageCenter,this.zr,p[u],this.myChart,this.axisBase,this.series)) } }, getAxis: function(a) { return this._axisList[a] }, getAxisCount: function() { return this._axisList.length }, clear: function() { for (var a = 0, i = this._axisList.length; i > a; a++) { this._axisList[a].dispose && this._axisList[a].dispose() } this._axisList = [] } }, j.inherits(m, d), c("../component").define("axis", m), m }), define("echarts/component/grid", ["require", "./base", "zrender/shape/Rectangle", "../config", "zrender/tool/util", "../component"], function(c) { function j(l, q, m, i, p) { d.call(this, l, q, m, i, p), this.refresh(i) } var d = c("./base") , f = c("zrender/shape/Rectangle") , b = c("../config"); b.grid = { zlevel: 0, z: 0, x: 80, y: 60, x2: 80, y2: 60, backgroundColor: "rgba(0,0,0,0)", borderWidth: 1, borderColor: "#ccc" }; var h = c("zrender/tool/util"); return j.prototype = { type: b.COMPONENT_TYPE_GRID, getX: function() { return this._x }, getY: function() { return this._y }, getWidth: function() { return this._width }, getHeight: function() { return this._height }, getXend: function() { return this._x + this._width }, getYend: function() { return this._y + this._height }, getArea: function() { return { x: this._x, y: this._y, width: this._width, height: this._height } }, getBbox: function() { return [[this._x, this._y], [this.getXend(), this.getYend()]] }, refixAxisShape: function(a) { for (var s, l, m, p = a.xAxis._axisList.concat(a.yAxis ? a.yAxis._axisList : []), q = p.length; q--; ) { m = p[q], m.type == b.COMPONENT_TYPE_AXIS_VALUE && m._min < 0 && m._max >= 0 && (m.isHorizontal() ? s = m.getCoord(0) : l = m.getCoord(0)) } if ("undefined" != typeof s || "undefined" != typeof l) { for (q = p.length; q--; ) { p[q].refixAxisShape(s, l) } } }, refresh: function(m) { if (m || this._zrWidth != this.zr.getWidth() || this._zrHeight != this.zr.getHeight()) { this.clear(), this.option = m || this.option, this.option.grid = this.reformOption(this.option.grid); var o = this.option.grid; this._zrWidth = this.zr.getWidth(), this._zrHeight = this.zr.getHeight(), this._x = this.parsePercent(o.x, this._zrWidth), this._y = this.parsePercent(o.y, this._zrHeight); var n = this.parsePercent(o.x2, this._zrWidth) , l = this.parsePercent(o.y2, this._zrHeight); this._width = "undefined" == typeof o.width ? this._zrWidth - this._x - n : this.parsePercent(o.width, this._zrWidth), this._width = this._width <= 0 ? 10 : this._width, this._height = "undefined" == typeof o.height ? this._zrHeight - this._y - l : this.parsePercent(o.height, this._zrHeight), this._height = this._height <= 0 ? 10 : this._height, this._x = this.subPixelOptimize(this._x, o.borderWidth), this._y = this.subPixelOptimize(this._y, o.borderWidth), this.shapeList.push(new f({ zlevel: this.getZlevelBase(), z: this.getZBase(), hoverable: !1, style: { x: this._x, y: this._y, width: this._width, height: this._height, brushType: o.borderWidth > 0 ? "both" : "fill", color: o.backgroundColor, strokeColor: o.borderColor, lineWidth: o.borderWidth } })), this.zr.addShape(this.shapeList[0]) } } }, h.inherits(j, d), c("../component").define("grid", j), j }), define("echarts/component/dataZoom", ["require", "./base", "zrender/shape/Rectangle", "zrender/shape/Polygon", "../util/shape/Icon", "../config", "../util/date", "zrender/tool/util", "../component"], function(c) { function q(l, w, s, i, u) { d.call(this, l, w, s, i, u); var v = this; v._ondrift = function(a, n) { return v.__ondrift(this, a, n) } , v._ondragend = function() { return v.__ondragend() } , this._fillerSize = 30, this._isSilence = !1, this._zoom = {}, this.option.dataZoom = this.reformOption(this.option.dataZoom), this.zoomOption = this.option.dataZoom, this._handleSize = this.zoomOption.handleSize, this.myChart.canvasSupported || (this.zoomOption.realtime = !1), this._location = this._getLocation(), this._zoom = this._getZoom(), this._backupData(), this.option.dataZoom.show && this._buildShape(), this._syncData() } var d = c("./base") , h = c("zrender/shape/Rectangle") , b = c("zrender/shape/Polygon") , j = c("../util/shape/Icon") , m = c("../config"); m.dataZoom = { zlevel: 0, z: 4, show: !1, orient: "horizontal", backgroundColor: "rgba(0,0,0,0)", dataBackgroundColor: "#eee", fillerColor: "rgba(144,197,237,0.2)", handleColor: "rgba(70,130,180,0.8)", handleSize: 8, showDetail: !0, realtime: !0 }; var p = c("../util/date") , f = c("zrender/tool/util"); return q.prototype = { type: m.COMPONENT_TYPE_DATAZOOM, _buildShape: function() { this._buildBackground(), this._buildFiller(), this._buildHandle(), this._buildFrame(); for (var a = 0, i = this.shapeList.length; i > a; a++) { this.zr.addShape(this.shapeList[a]) } this._syncFrameShape() }, _getLocation: function() { var o, u, r, s, l = this.component.grid; return "horizontal" == this.zoomOption.orient ? (r = this.zoomOption.width || l.getWidth(), s = this.zoomOption.height || this._fillerSize, o = null != this.zoomOption.x ? this.zoomOption.x : l.getX(), u = null != this.zoomOption.y ? this.zoomOption.y : this.zr.getHeight() - s - 2) : (r = this.zoomOption.width || this._fillerSize, s = this.zoomOption.height || l.getHeight(), o = null != this.zoomOption.x ? this.zoomOption.x : 2, u = null != this.zoomOption.y ? this.zoomOption.y : l.getY()), { x: o, y: u, width: r, height: s } }, _getZoom: function() { var x = this.option.series , G = this.option.xAxis; !G || G instanceof Array || (G = [G], this.option.xAxis = G); var z = this.option.yAxis; !z || z instanceof Array || (z = [z], this.option.yAxis = z); var C, r, D = [], F = this.zoomOption.xAxisIndex; if (G && null == F) { C = []; for (var A = 0, y = G.length; y > A; A++) { ("category" == G[A].type || null == G[A].type) && C.push(A) } } else { C = F instanceof Array ? F : null != F ? [F] : [] } if (F = this.zoomOption.yAxisIndex, z && null == F) { r = []; for (var A = 0, y = z.length; y > A; A++) { "category" == z[A].type && r.push(A) } } else { r = F instanceof Array ? F : null != F ? [F] : [] } for (var w, A = 0, y = x.length; y > A; A++) { if (w = x[A], w.type == m.CHART_TYPE_LINE || w.type == m.CHART_TYPE_BAR || w.type == m.CHART_TYPE_SCATTER || w.type == m.CHART_TYPE_K) { for (var v = 0, B = C.length; B > v; v++) { if (C[v] == (w.xAxisIndex || 0)) { D.push(A); break } } for (var v = 0, B = r.length; B > v; v++) { if (r[v] == (w.yAxisIndex || 0)) { D.push(A); break } } null == this.zoomOption.xAxisIndex && null == this.zoomOption.yAxisIndex && w.data && this.getDataFromOption(w.data[0])instanceof Array && (w.type == m.CHART_TYPE_SCATTER || w.type == m.CHART_TYPE_LINE || w.type == m.CHART_TYPE_BAR) && D.push(A) } } var E = null != this._zoom.start ? this._zoom.start : null != this.zoomOption.start ? this.zoomOption.start : 0 , H = null != this._zoom.end ? this._zoom.end : null != this.zoomOption.end ? this.zoomOption.end : 100; E > H && (E += H, H = E - H, E -= H); var I = Math.round((H - E) / 100 * ("horizontal" == this.zoomOption.orient ? this._location.width : this._location.height)); return { start: E, end: H, start2: 0, end2: 100, size: I, xAxisIndex: C, yAxisIndex: r, seriesIndex: D, scatterMap: this._zoom.scatterMap || {} } }, _backupData: function() { this._originalData = { xAxis: {}, yAxis: {}, series: {} }; for (var u = this.option.xAxis, B = this._zoom.xAxisIndex, w = 0, y = B.length; y > w; w++) { this._originalData.xAxis[B[w]] = u[B[w]].data } for (var r = this.option.yAxis, z = this._zoom.yAxisIndex, w = 0, y = z.length; y > w; w++) { this._originalData.yAxis[z[w]] = r[z[w]].data } for (var A, x = this.option.series, v = this._zoom.seriesIndex, w = 0, y = v.length; y > w; w++) { A = x[v[w]], this._originalData.series[v[w]] = A.data, A.data && this.getDataFromOption(A.data[0])instanceof Array && (A.type == m.CHART_TYPE_SCATTER || A.type == m.CHART_TYPE_LINE || A.type == m.CHART_TYPE_BAR) && (this._backupScale(), this._calculScatterMap(v[w])) } }, _calculScatterMap: function(w) { this._zoom.scatterMap = this._zoom.scatterMap || {}, this._zoom.scatterMap[w] = this._zoom.scatterMap[w] || {}; var l = c("../component") , s = l.get("axis") , e = f.clone(this.option.xAxis); "category" == e[0].type && (e[0].type = "value"), e[1] && "category" == e[1].type && (e[1].type = "value"); var u = new s(this.ecTheme,null,!1,{ xAxis: e, series: this.option.series },this,"xAxis") , v = this.option.series[w].xAxisIndex || 0; this._zoom.scatterMap[w].x = u.getAxis(v).getExtremum(), u.dispose(), e = f.clone(this.option.yAxis), "category" == e[0].type && (e[0].type = "value"), e[1] && "category" == e[1].type && (e[1].type = "value"), u = new s(this.ecTheme,null,!1,{ yAxis: e, series: this.option.series },this,"yAxis"), v = this.option.series[w].yAxisIndex || 0, this._zoom.scatterMap[w].y = u.getAxis(v).getExtremum(), u.dispose() }, _buildBackground: function() { var w = this._location.width , H = this._location.height; this.shapeList.push(new h({ zlevel: this.getZlevelBase(), z: this.getZBase(), hoverable: !1, style: { x: this._location.x, y: this._location.y, width: w, height: H, color: this.zoomOption.backgroundColor } })); for (var B = 0, E = this._originalData.xAxis, G = this._zoom.xAxisIndex, C = 0, A = G.length; A > C; C++) { B = Math.max(B, E[G[C]].length) } for (var v = this._originalData.yAxis, r = this._zoom.yAxisIndex, C = 0, A = r.length; A > C; C++) { B = Math.max(B, v[r[C]].length) } for (var D, F = this._zoom.seriesIndex[0], I = this._originalData.series[F], K = Number.MIN_VALUE, J = Number.MAX_VALUE, C = 0, A = I.length; A > C; C++) { D = this.getDataFromOption(I[C], 0), this.option.series[F].type == m.CHART_TYPE_K && (D = D[1]), isNaN(D) && (D = 0), K = Math.max(K, D), J = Math.min(J, D) } var z = K - J , x = [] , L = w / (B - (B > 1 ? 1 : 0)) , n = H / (B - (B > 1 ? 1 : 0)) , a = 1; "horizontal" == this.zoomOption.orient && 1 > L ? a = Math.floor(3 * B / w) : "vertical" == this.zoomOption.orient && 1 > n && (a = Math.floor(3 * B / H)); for (var C = 0, A = B; A > C; C += a) { D = this.getDataFromOption(I[C], 0), this.option.series[F].type == m.CHART_TYPE_K && (D = D[1]), isNaN(D) && (D = 0), x.push("horizontal" == this.zoomOption.orient ? [this._location.x + L * C, this._location.y + H - 1 - Math.round((D - J) / z * (H - 10))] : [this._location.x + 1 + Math.round((D - J) / z * (w - 10)), this._location.y + n * (A - C - 1)]) } "horizontal" == this.zoomOption.orient ? (x.push([this._location.x + w, this._location.y + H]), x.push([this._location.x, this._location.y + H])) : (x.push([this._location.x, this._location.y]), x.push([this._location.x, this._location.y + H])), this.shapeList.push(new b({ zlevel: this.getZlevelBase(), z: this.getZBase(), style: { pointList: x, color: this.zoomOption.dataBackgroundColor }, hoverable: !1 })) }, _buildFiller: function() { this._fillerShae = { zlevel: this.getZlevelBase(), z: this.getZBase(), draggable: !0, ondrift: this._ondrift, ondragend: this._ondragend, _type: "filler" }, this._fillerShae.style = "horizontal" == this.zoomOption.orient ? { x: this._location.x + Math.round(this._zoom.start / 100 * this._location.width) + this._handleSize, y: this._location.y, width: this._zoom.size - 2 * this._handleSize, height: this._location.height, color: this.zoomOption.fillerColor, text: ":::", textPosition: "inside" } : { x: this._location.x, y: this._location.y + Math.round(this._zoom.start / 100 * this._location.height) + this._handleSize, width: this._location.width, height: this._zoom.size - 2 * this._handleSize, color: this.zoomOption.fillerColor, text: "::", textPosition: "inside" }, this._fillerShae.highlightStyle = { brushType: "fill", color: "rgba(0,0,0,0)" }, this._fillerShae = new h(this._fillerShae), this.shapeList.push(this._fillerShae) }, _buildHandle: function() { var a = this.zoomOption.showDetail ? this._getDetail() : { start: "", end: "" }; this._startShape = { zlevel: this.getZlevelBase(), z: this.getZBase(), draggable: !0, style: { iconType: "rectangle", x: this._location.x, y: this._location.y, width: this._handleSize, height: this._handleSize, color: this.zoomOption.handleColor, text: "=", textPosition: "inside" }, highlightStyle: { text: a.start, brushType: "fill", textPosition: "left" }, ondrift: this._ondrift, ondragend: this._ondragend }, "horizontal" == this.zoomOption.orient ? (this._startShape.style.height = this._location.height, this._endShape = f.clone(this._startShape), this._startShape.style.x = this._fillerShae.style.x - this._handleSize, this._endShape.style.x = this._fillerShae.style.x + this._fillerShae.style.width, this._endShape.highlightStyle.text = a.end, this._endShape.highlightStyle.textPosition = "right") : (this._startShape.style.width = this._location.width, this._endShape = f.clone(this._startShape), this._startShape.style.y = this._fillerShae.style.y + this._fillerShae.style.height, this._startShape.highlightStyle.textPosition = "bottom", this._endShape.style.y = this._fillerShae.style.y - this._handleSize, this._endShape.highlightStyle.text = a.end, this._endShape.highlightStyle.textPosition = "top"), this._startShape = new j(this._startShape), this._endShape = new j(this._endShape), this.shapeList.push(this._startShape), this.shapeList.push(this._endShape) }, _buildFrame: function() { var a = this.subPixelOptimize(this._location.x, 1) , i = this.subPixelOptimize(this._location.y, 1); this._startFrameShape = { zlevel: this.getZlevelBase(), z: this.getZBase(), hoverable: !1, style: { x: a, y: i, width: this._location.width - (a > this._location.x ? 1 : 0), height: this._location.height - (i > this._location.y ? 1 : 0), lineWidth: 1, brushType: "stroke", strokeColor: this.zoomOption.handleColor } }, this._endFrameShape = f.clone(this._startFrameShape), this._startFrameShape = new h(this._startFrameShape), this._endFrameShape = new h(this._endFrameShape), this.shapeList.push(this._startFrameShape), this.shapeList.push(this._endFrameShape) }, _syncHandleShape: function() { "horizontal" == this.zoomOption.orient ? (this._startShape.style.x = this._fillerShae.style.x - this._handleSize, this._endShape.style.x = this._fillerShae.style.x + this._fillerShae.style.width, this._zoom.start = (this._startShape.style.x - this._location.x) / this._location.width * 100, this._zoom.end = (this._endShape.style.x + this._handleSize - this._location.x) / this._location.width * 100) : (this._startShape.style.y = this._fillerShae.style.y + this._fillerShae.style.height, this._endShape.style.y = this._fillerShae.style.y - this._handleSize, this._zoom.start = (this._location.y + this._location.height - this._startShape.style.y) / this._location.height * 100, this._zoom.end = (this._location.y + this._location.height - this._endShape.style.y - this._handleSize) / this._location.height * 100), this.zr.modShape(this._startShape.id), this.zr.modShape(this._endShape.id), this._syncFrameShape(), this.zr.refreshNextFrame() }, _syncFillerShape: function() { var a, i; "horizontal" == this.zoomOption.orient ? (a = this._startShape.style.x, i = this._endShape.style.x, this._fillerShae.style.x = Math.min(a, i) + this._handleSize, this._fillerShae.style.width = Math.abs(a - i) - this._handleSize, this._zoom.start = (Math.min(a, i) - this._location.x) / this._location.width * 100, this._zoom.end = (Math.max(a, i) + this._handleSize - this._location.x) / this._location.width * 100) : (a = this._startShape.style.y, i = this._endShape.style.y, this._fillerShae.style.y = Math.min(a, i) + this._handleSize, this._fillerShae.style.height = Math.abs(a - i) - this._handleSize, this._zoom.start = (this._location.y + this._location.height - Math.max(a, i)) / this._location.height * 100, this._zoom.end = (this._location.y + this._location.height - Math.min(a, i) - this._handleSize) / this._location.height * 100), this.zr.modShape(this._fillerShae.id), this._syncFrameShape(), this.zr.refreshNextFrame() }, _syncFrameShape: function() { "horizontal" == this.zoomOption.orient ? (this._startFrameShape.style.width = this._fillerShae.style.x - this._location.x, this._endFrameShape.style.x = this._fillerShae.style.x + this._fillerShae.style.width, this._endFrameShape.style.width = this._location.x + this._location.width - this._endFrameShape.style.x) : (this._startFrameShape.style.y = this._fillerShae.style.y + this._fillerShae.style.height, this._startFrameShape.style.height = this._location.y + this._location.height - this._startFrameShape.style.y, this._endFrameShape.style.height = this._fillerShae.style.y - this._location.y), this.zr.modShape(this._startFrameShape.id), this.zr.modShape(this._endFrameShape.id) }, _syncShape: function() { this.zoomOption.show && ("horizontal" == this.zoomOption.orient ? (this._startShape.style.x = this._location.x + this._zoom.start / 100 * this._location.width, this._endShape.style.x = this._location.x + this._zoom.end / 100 * this._location.width - this._handleSize, this._fillerShae.style.x = this._startShape.style.x + this._handleSize, this._fillerShae.style.width = this._endShape.style.x - this._startShape.style.x - this._handleSize) : (this._startShape.style.y = this._location.y + this._location.height - this._zoom.start / 100 * this._location.height, this._endShape.style.y = this._location.y + this._location.height - this._zoom.end / 100 * this._location.height - this._handleSize, this._fillerShae.style.y = this._endShape.style.y + this._handleSize, this._fillerShae.style.height = this._startShape.style.y - this._endShape.style.y - this._handleSize), this.zr.modShape(this._startShape.id), this.zr.modShape(this._endShape.id), this.zr.modShape(this._fillerShae.id), this._syncFrameShape(), this.zr.refresh()) }, _syncData: function(u) { var A, v, x, r, y; for (var z in this._originalData) { A = this._originalData[z]; for (var w in A) { y = A[w], null != y && (r = y.length, v = Math.floor(this._zoom.start / 100 * r), x = Math.ceil(this._zoom.end / 100 * r), this.getDataFromOption(y[0])instanceof Array && this.option[z][w].type != m.CHART_TYPE_K ? (this._setScale(), this.option[z][w].data = this._synScatterData(w, y)) : this.option[z][w].data = y.slice(v, x)) } } this._isSilence || !this.zoomOption.realtime && !u || this.messageCenter.dispatch(m.EVENT.DATA_ZOOM, null, { zoom: this._zoom }, this.myChart) }, _synScatterData: function(x, G) { if (0 === this._zoom.start && 100 == this._zoom.end && 0 === this._zoom.start2 && 100 == this._zoom.end2) { return G } var z, C, u, D, E, F = [], A = this._zoom.scatterMap[x]; "horizontal" == this.zoomOption.orient ? (z = A.x.max - A.x.min, C = this._zoom.start / 100 * z + A.x.min, u = this._zoom.end / 100 * z + A.x.min, z = A.y.max - A.y.min, D = this._zoom.start2 / 100 * z + A.y.min, E = this._zoom.end2 / 100 * z + A.y.min) : (z = A.x.max - A.x.min, C = this._zoom.start2 / 100 * z + A.x.min, u = this._zoom.end2 / 100 * z + A.x.min, z = A.y.max - A.y.min, D = this._zoom.start / 100 * z + A.y.min, E = this._zoom.end / 100 * z + A.y.min); var y; (y = A.x.dataMappingMethods) && (C = y.coord2Value(C), u = y.coord2Value(u)), (y = A.y.dataMappingMethods) && (D = y.coord2Value(D), E = y.coord2Value(E)); for (var w, v = 0, B = G.length; B > v; v++) { w = G[v].value || G[v], w[0] >= C && w[0] <= u && w[1] >= D && w[1] <= E && F.push(G[v]) } return F }, _setScale: function() { var o = 0 !== this._zoom.start || 100 !== this._zoom.end || 0 !== this._zoom.start2 || 100 !== this._zoom.end2 , u = { xAxis: this.option.xAxis, yAxis: this.option.yAxis }; for (var r in u) { for (var s = 0, l = u[r].length; l > s; s++) { u[r][s].scale = o || u[r][s]._scale } } }, _backupScale: function() { var a = { xAxis: this.option.xAxis, yAxis: this.option.yAxis }; for (var r in a) { for (var l = 0, o = a[r].length; o > l; l++) { a[r][l]._scale = a[r][l].scale } } }, _getDetail: function() { for (var x = ["xAxis", "yAxis"], G = 0, z = x.length; z > G; G++) { var C = this._originalData[x[G]]; for (var s in C) { var D = C[s]; if (null != D) { var F = D.length , A = Math.floor(this._zoom.start / 100 * F) , y = Math.ceil(this._zoom.end / 100 * F); return y -= y > 0 ? 1 : 0, { start: this.getDataFromOption(D[A]), end: this.getDataFromOption(D[y]) } } } } x = "horizontal" == this.zoomOption.orient ? "xAxis" : "yAxis"; var w = this._zoom.seriesIndex[0] , v = this.option.series[w][x + "Index"] || 0 , B = this.option[x][v].type , E = this._zoom.scatterMap[w][x.charAt(0)].min , H = this._zoom.scatterMap[w][x.charAt(0)].max , J = H - E; if ("value" == B) { return { start: E + J * this._zoom.start / 100, end: E + J * this._zoom.end / 100 } } if ("time" == B) { H = E + J * this._zoom.end / 100, E += J * this._zoom.start / 100; var I = p.getAutoFormatter(E, H).formatter; return { start: p.format(I, E), end: p.format(I, H) } } return { start: "", end: "" } }, __ondrift: function(o, u, r) { this.zoomOption.zoomLock && (o = this._fillerShae); var s = "filler" == o._type ? this._handleSize : 0; if ("horizontal" == this.zoomOption.orient ? o.style.x + u - s <= this._location.x ? o.style.x = this._location.x + s : o.style.x + u + o.style.width + s >= this._location.x + this._location.width ? o.style.x = this._location.x + this._location.width - o.style.width - s : o.style.x += u : o.style.y + r - s <= this._location.y ? o.style.y = this._location.y + s : o.style.y + r + o.style.height + s >= this._location.y + this._location.height ? o.style.y = this._location.y + this._location.height - o.style.height - s : o.style.y += r, "filler" == o._type ? this._syncHandleShape() : this._syncFillerShape(), this.zoomOption.realtime && this._syncData(), this.zoomOption.showDetail) { var l = this._getDetail(); this._startShape.style.text = this._startShape.highlightStyle.text = l.start, this._endShape.style.text = this._endShape.highlightStyle.text = l.end, this._startShape.style.textPosition = this._startShape.highlightStyle.textPosition, this._endShape.style.textPosition = this._endShape.highlightStyle.textPosition } return !0 }, __ondragend: function() { this.zoomOption.showDetail && (this._startShape.style.text = this._endShape.style.text = "=", this._startShape.style.textPosition = this._endShape.style.textPosition = "inside", this.zr.modShape(this._startShape.id), this.zr.modShape(this._endShape.id), this.zr.refreshNextFrame()), this.isDragend = !0 }, ondragend: function(a, i) { this.isDragend && a.target && (!this.zoomOption.realtime && this._syncData(), i.dragOut = !0, i.dragIn = !0, this._isSilence || this.zoomOption.realtime || this.messageCenter.dispatch(m.EVENT.DATA_ZOOM, null, { zoom: this._zoom }, this.myChart), i.needRefresh = !1, this.isDragend = !1) }, ondataZoom: function(a, i) { i.needRefresh = !0 }, absoluteZoom: function(a) { this._zoom.start = a.start, this._zoom.end = a.end, this._zoom.start2 = a.start2, this._zoom.end2 = a.end2, this._syncShape(), this._syncData(!0) }, rectZoom: function(u) { if (!u) { return this._zoom.start = this._zoom.start2 = 0, this._zoom.end = this._zoom.end2 = 100, this._syncShape(), this._syncData(!0), this._zoom } var A = this.component.grid.getArea() , v = { x: u.x, y: u.y, width: u.width, height: u.height }; if (v.width < 0 && (v.x += v.width, v.width = -v.width), v.height < 0 && (v.y += v.height, v.height = -v.height), v.x > A.x + A.width || v.y > A.y + A.height) { return !1 } v.x < A.x && (v.x = A.x), v.x + v.width > A.x + A.width && (v.width = A.x + A.width - v.x), v.y + v.height > A.y + A.height && (v.height = A.y + A.height - v.y); var w, l = (v.x - A.x) / A.width, x = 1 - (v.x + v.width - A.x) / A.width, y = 1 - (v.y + v.height - A.y) / A.height, z = (v.y - A.y) / A.height; return "horizontal" == this.zoomOption.orient ? (w = this._zoom.end - this._zoom.start, this._zoom.start += w * l, this._zoom.end -= w * x, w = this._zoom.end2 - this._zoom.start2, this._zoom.start2 += w * y, this._zoom.end2 -= w * z) : (w = this._zoom.end - this._zoom.start, this._zoom.start += w * y, this._zoom.end -= w * z, w = this._zoom.end2 - this._zoom.start2, this._zoom.start2 += w * l, this._zoom.end2 -= w * x), this._syncShape(), this._syncData(!0), this._zoom }, syncBackupData: function(v) { for (var C, w, y = this._originalData.series, u = v.series, z = 0, A = u.length; A > z; z++) { w = u[z].data || u[z].eventList, C = y[z] ? Math.floor(this._zoom.start / 100 * y[z].length) : 0; for (var B = 0, x = w.length; x > B; B++) { y[z] && (y[z][B + C] = w[B]) } } }, syncOption: function(a) { this.silence(!0), this.option = a, this.option.dataZoom = this.reformOption(this.option.dataZoom), this.zoomOption = this.option.dataZoom, this.myChart.canvasSupported || (this.zoomOption.realtime = !1), this.clear(), this._location = this._getLocation(), this._zoom = this._getZoom(), this._backupData(), this.option.dataZoom && this.option.dataZoom.show && this._buildShape(), this._syncData(), this.silence(!1) }, silence: function(a) { this._isSilence = a }, getRealDataIndex: function(a, n) { if (!this._originalData || 0 === this._zoom.start && 100 == this._zoom.end) { return n } var l = this._originalData.series; return l[a] ? Math.floor(this._zoom.start / 100 * l[a].length) + n : -1 }, resize: function() { this.clear(), this._location = this._getLocation(), this._zoom = this._getZoom(), this.option.dataZoom.show && this._buildShape() } }, f.inherits(q, d), c("../component").define("dataZoom", q), q }), define("echarts/component/categoryAxis", ["require", "./base", "zrender/shape/Text", "zrender/shape/Line", "zrender/shape/Rectangle", "../config", "zrender/tool/util", "zrender/tool/area", "../component"], function(c) { function q(l, y, u, i, v, w) { if (i.data.length < 1) { return void console.error("option.data.length < 1.") } d.call(this, l, y, u, i, v), this.grid = this.component.grid; for (var x in w) { this[x] = w[x] } this.refresh(i) } var d = c("./base") , h = c("zrender/shape/Text") , b = c("zrender/shape/Line") , j = c("zrender/shape/Rectangle") , m = c("../config"); m.categoryAxis = { zlevel: 0, z: 0, show: !0, position: "bottom", name: "", nameLocation: "end", nameTextStyle: {}, boundaryGap: !0, axisLine: { show: !0, onZero: !0, lineStyle: { color: "#48b", width: 2, type: "solid" } }, axisTick: { show: !0, interval: "auto", inside: !1, length: 5, lineStyle: { color: "#333", width: 1 } }, axisLabel: { show: !0, interval: "auto", rotate: 0, margin: 8, textStyle: { color: "#333" } }, splitLine: { show: !0, lineStyle: { color: ["#ccc"], width: 1, type: "solid" } }, splitArea: { show: !1, areaStyle: { color: ["rgba(250,250,250,0.3)", "rgba(200,200,200,0.3)"] } } }; var p = c("zrender/tool/util") , f = c("zrender/tool/area"); return q.prototype = { type: m.COMPONENT_TYPE_AXIS_CATEGORY, _getReformedLabel: function(a) { var n = this.getDataFromOption(this.option.data[a]) , l = this.option.data[a].formatter || this.option.axisLabel.formatter; return l && ("function" == typeof l ? n = l.call(this.myChart, n) : "string" == typeof l && (n = l.replace("{value}", n))), n }, _getInterval: function() { var w = this.option.axisLabel.interval; if ("auto" == w) { var E = this.option.axisLabel.textStyle.fontSize , y = this.option.data , A = this.option.data.length; if (this.isHorizontal()) { if (A > 3) { var l, B, D = this.getGap(), x = !1, v = Math.floor(0.5 / D); for (v = 1 > v ? 1 : v, w = Math.floor(15 / D); !x && A > w; ) { w += v, x = !0, l = Math.floor(D * w); for (var s = Math.floor((A - 1) / w) * w; s >= 0; s -= w) { if (0 !== this.option.axisLabel.rotate) { B = E } else { if (y[s].textStyle) { B = f.getTextWidth(this._getReformedLabel(s), this.getFont(p.merge(y[s].textStyle, this.option.axisLabel.textStyle))) } else { var z = this._getReformedLabel(s) + "" , C = (z.match(/\w/g) || "").length , F = z.length - C; B = C * E * 2 / 3 + F * E } } if (B > l) { x = !1; break } } } } else { w = 1 } } else { if (A > 3) { var D = this.getGap(); for (w = Math.floor(11 / D); E > D * w - 6 && A > w; ) { w++ } } else { w = 1 } } } else { w = "function" == typeof w ? 1 : w - 0 + 1 } return w }, _buildShape: function() { if (this._interval = this._getInterval(), this.option.show) { this.option.splitArea.show && this._buildSplitArea(), this.option.splitLine.show && this._buildSplitLine(), this.option.axisLine.show && this._buildAxisLine(), this.option.axisTick.show && this._buildAxisTick(), this.option.axisLabel.show && this._buildAxisLabel(); for (var a = 0, i = this.shapeList.length; i > a; a++) { this.zr.addShape(this.shapeList[a]) } } }, _buildAxisTick: function() { var w, H = this.option.data, z = this.option.data.length, C = this.option.axisTick, D = C.length, F = C.lineStyle.color, G = C.lineStyle.width, A = "function" == typeof C.interval ? C.interval : "auto" == C.interval && "function" == typeof this.option.axisLabel.interval ? this.option.axisLabel.interval : !1, y = A ? 1 : "auto" == C.interval ? this._interval : C.interval - 0 + 1, v = C.onGap, a = v ? this.getGap() / 2 : "undefined" == typeof v && this.option.boundaryGap ? this.getGap() / 2 : 0, B = a > 0 ? -y : 0; if (this.isHorizontal()) { for (var E, I = "bottom" == this.option.position ? C.inside ? this.grid.getYend() - D - 1 : this.grid.getYend() + 1 : C.inside ? this.grid.getY() + 1 : this.grid.getY() - D - 1, K = B; z > K; K += y) { (!A || A(K, H[K])) && (E = this.subPixelOptimize(this.getCoordByIndex(K) + (K >= 0 ? a : 0), G), w = { _axisShape: "axisTick", zlevel: this.getZlevelBase(), z: this.getZBase(), hoverable: !1, style: { xStart: E, yStart: I, xEnd: E, yEnd: I + D, strokeColor: F, lineWidth: G } }, this.shapeList.push(new b(w))) } } else { for (var J, x = "left" == this.option.position ? C.inside ? this.grid.getX() + 1 : this.grid.getX() - D - 1 : C.inside ? this.grid.getXend() - D - 1 : this.grid.getXend() + 1, K = B; z > K; K += y) { (!A || A(K, H[K])) && (J = this.subPixelOptimize(this.getCoordByIndex(K) - (K >= 0 ? a : 0), G), w = { _axisShape: "axisTick", zlevel: this.getZlevelBase(), z: this.getZBase(), hoverable: !1, style: { xStart: x, yStart: J, xEnd: x + D, yEnd: J, strokeColor: F, lineWidth: G } }, this.shapeList.push(new b(w))) } } }, _buildAxisLabel: function() { var w, E, y = this.option.data, n = this.option.data.length, B = this.option.axisLabel, D = B.rotate, z = B.margin, x = B.clickable, v = B.textStyle, s = "function" == typeof B.interval ? B.interval : !1; if (this.isHorizontal()) { var A, C; "bottom" == this.option.position ? (A = this.grid.getYend() + z, C = "top") : (A = this.grid.getY() - z, C = "bottom"); for (var F = 0; n > F; F += this._interval) { s && !s(F, y[F]) || "" === this._getReformedLabel(F) || (E = p.merge(y[F].textStyle || {}, v), w = { zlevel: this.getZlevelBase(), z: this.getZBase() + 3, hoverable: !1, style: { x: this.getCoordByIndex(F), y: A, color: E.color, text: this._getReformedLabel(F), textFont: this.getFont(E), textAlign: E.align || "center", textBaseline: E.baseline || C } }, D && (w.style.textAlign = D > 0 ? "bottom" == this.option.position ? "right" : "left" : "bottom" == this.option.position ? "left" : "right", w.rotation = [D * Math.PI / 180, w.style.x, w.style.y]), this.shapeList.push(new h(this._axisLabelClickable(x, w)))) } } else { var H, G; "left" == this.option.position ? (H = this.grid.getX() - z, G = "right") : (H = this.grid.getXend() + z, G = "left"); for (var F = 0; n > F; F += this._interval) { s && !s(F, y[F]) || "" === this._getReformedLabel(F) || (E = p.merge(y[F].textStyle || {}, v), w = { zlevel: this.getZlevelBase(), z: this.getZBase() + 3, hoverable: !1, style: { x: H, y: this.getCoordByIndex(F), color: E.color, text: this._getReformedLabel(F), textFont: this.getFont(E), textAlign: E.align || G, textBaseline: E.baseline || 0 === F && "" !== this.option.name ? "bottom" : F == n - 1 && "" !== this.option.name ? "top" : "middle" } }, D && (w.rotation = [D * Math.PI / 180, w.style.x, w.style.y]), this.shapeList.push(new h(this._axisLabelClickable(x, w)))) } } }, _buildSplitLine: function() { var w, I = this.option.data, A = this.option.data.length, D = this.option.splitLine, E = D.lineStyle.type, G = D.lineStyle.width, H = D.lineStyle.color; H = H instanceof Array ? H : [H]; var B = H.length , z = "function" == typeof this.option.axisLabel.interval ? this.option.axisLabel.interval : !1 , v = D.onGap , a = v ? this.getGap() / 2 : "undefined" == typeof v && this.option.boundaryGap ? this.getGap() / 2 : 0; if (A -= v || "undefined" == typeof v && this.option.boundaryGap ? 1 : 0, this.isHorizontal()) { for (var C, F = this.grid.getY(), J = this.grid.getYend(), L = 0; A > L; L += this._interval) { (!z || z(L, I[L])) && (C = this.subPixelOptimize(this.getCoordByIndex(L) + a, G), w = { zlevel: this.getZlevelBase(), z: this.getZBase(), hoverable: !1, style: { xStart: C, yStart: F, xEnd: C, yEnd: J, strokeColor: H[L / this._interval % B], lineType: E, lineWidth: G } }, this.shapeList.push(new b(w))) } } else { for (var K, y = this.grid.getX(), x = this.grid.getXend(), L = 0; A > L; L += this._interval) { (!z || z(L, I[L])) && (K = this.subPixelOptimize(this.getCoordByIndex(L) - a, G), w = { zlevel: this.getZlevelBase(), z: this.getZBase(), hoverable: !1, style: { xStart: y, yStart: K, xEnd: x, yEnd: K, strokeColor: H[L / this._interval % B], lineType: E, lineWidth: G } }, this.shapeList.push(new b(w))) } } }, _buildSplitArea: function() { var x, I = this.option.data, B = this.option.splitArea, E = B.areaStyle.color; if (E instanceof Array) { var o = E.length , G = this.option.data.length , H = "function" == typeof this.option.axisLabel.interval ? this.option.axisLabel.interval : !1 , C = B.onGap , A = C ? this.getGap() / 2 : "undefined" == typeof C && this.option.boundaryGap ? this.getGap() / 2 : 0; if (this.isHorizontal()) { for (var w, v = this.grid.getY(), D = this.grid.getHeight(), F = this.grid.getX(), J = 0; G >= J; J += this._interval) { H && !H(J, I[J]) && G > J || (w = G > J ? this.getCoordByIndex(J) + A : this.grid.getXend(), x = { zlevel: this.getZlevelBase(), z: this.getZBase(), hoverable: !1, style: { x: F, y: v, width: w - F, height: D, color: E[J / this._interval % o] } }, this.shapeList.push(new j(x)), F = w) } } else { for (var L, K = this.grid.getX(), z = this.grid.getWidth(), y = this.grid.getYend(), J = 0; G >= J; J += this._interval) { H && !H(J, I[J]) && G > J || (L = G > J ? this.getCoordByIndex(J) - A : this.grid.getY(), x = { zlevel: this.getZlevelBase(), z: this.getZBase(), hoverable: !1, style: { x: K, y: L, width: z, height: y - L, color: E[J / this._interval % o] } }, this.shapeList.push(new j(x)), y = L) } } } else { x = { zlevel: this.getZlevelBase(), z: this.getZBase(), hoverable: !1, style: { x: this.grid.getX(), y: this.grid.getY(), width: this.grid.getWidth(), height: this.grid.getHeight(), color: E } }, this.shapeList.push(new j(x)) } }, refresh: function(a) { a && (this.option = this.reformOption(a), this.option.axisLabel.textStyle = this.getTextStyle(this.option.axisLabel.textStyle)), this.clear(), this._buildShape() }, getGap: function() { var a = this.option.data.length , i = this.isHorizontal() ? this.grid.getWidth() : this.grid.getHeight(); return this.option.boundaryGap ? i / a : i / (a > 1 ? a - 1 : 1) }, getCoord: function(r) { for (var w = this.option.data, s = w.length, u = this.getGap(), l = this.option.boundaryGap ? u / 2 : 0, v = 0; s > v; v++) { if (this.getDataFromOption(w[v]) == r) { return l = this.isHorizontal() ? this.grid.getX() + l : this.grid.getYend() - l } l += u } }, getCoordByIndex: function(a) { if (0 > a) { return this.isHorizontal() ? this.grid.getX() : this.grid.getYend() } if (a > this.option.data.length - 1) { return this.isHorizontal() ? this.grid.getXend() : this.grid.getY() } var n = this.getGap() , l = this.option.boundaryGap ? n / 2 : 0; return l += a * n, l = this.isHorizontal() ? this.grid.getX() + l : this.grid.getYend() - l }, getNameByIndex: function(a) { return this.getDataFromOption(this.option.data[a]) }, getIndexByName: function(a) { for (var r = this.option.data, l = r.length, o = 0; l > o; o++) { if (this.getDataFromOption(r[o]) == a) { return o } } return -1 }, getValueFromCoord: function() { return "" }, isMainAxis: function(a) { return a % this._interval === 0 } }, p.inherits(q, d), c("../component").define("categoryAxis", q), q }), define("echarts/component/valueAxis", ["require", "./base", "zrender/shape/Text", "zrender/shape/Line", "zrender/shape/Rectangle", "../config", "../util/date", "zrender/tool/util", "../util/smartSteps", "../util/accMath", "../util/smartLogSteps", "../component"], function(c) { function q(u, A, w, i, x, y, z) { if (!z || 0 === z.length) { return void console.err("option.series.length == 0.") } d.call(this, u, A, w, i, x), this.series = z, this.grid = this.component.grid; for (var v in y) { this[v] = y[v] } this.refresh(i, z) } var d = c("./base") , h = c("zrender/shape/Text") , b = c("zrender/shape/Line") , j = c("zrender/shape/Rectangle") , m = c("../config"); m.valueAxis = { zlevel: 0, z: 0, show: !0, position: "left", name: "", nameLocation: "end", nameTextStyle: {}, boundaryGap: [0, 0], axisLine: { show: !0, onZero: !0, lineStyle: { color: "#48b", width: 2, type: "solid" } }, axisTick: { show: !1, inside: !1, length: 5, lineStyle: { color: "#333", width: 1 } }, axisLabel: { show: !0, rotate: 0, margin: 8, textStyle: { color: "#333" } }, splitLine: { show: !0, lineStyle: { color: ["#ccc"], width: 1, type: "solid" } }, splitArea: { show: !1, areaStyle: { color: ["rgba(250,250,250,0.3)", "rgba(200,200,200,0.3)"] } } }; var p = c("../util/date") , f = c("zrender/tool/util"); return q.prototype = { type: m.COMPONENT_TYPE_AXIS_VALUE, _buildShape: function() { if (this._hasData = !1, this._calculateValue(), this._hasData && this.option.show) { this.option.splitArea.show && this._buildSplitArea(), this.option.splitLine.show && this._buildSplitLine(), this.option.axisLine.show && this._buildAxisLine(), this.option.axisTick.show && this._buildAxisTick(), this.option.axisLabel.show && this._buildAxisLabel(); for (var a = 0, i = this.shapeList.length; i > a; a++) { this.zr.addShape(this.shapeList[a]) } } }, _buildAxisTick: function() { var v, E = this._valueList, x = this._valueList.length, A = this.option.axisTick, B = A.length, C = A.lineStyle.color, D = A.lineStyle.width; if (this.isHorizontal()) { for (var y, w = "bottom" === this.option.position ? A.inside ? this.grid.getYend() - B - 1 : this.grid.getYend() + 1 : A.inside ? this.grid.getY() + 1 : this.grid.getY() - B - 1, u = 0; x > u; u++) { y = this.subPixelOptimize(this.getCoord(E[u]), D), v = { _axisShape: "axisTick", zlevel: this.getZlevelBase(), z: this.getZBase(), hoverable: !1, style: { xStart: y, yStart: w, xEnd: y, yEnd: w + B, strokeColor: C, lineWidth: D } }, this.shapeList.push(new b(v)) } } else { for (var a, z = "left" === this.option.position ? A.inside ? this.grid.getX() + 1 : this.grid.getX() - B - 1 : A.inside ? this.grid.getXend() - B - 1 : this.grid.getXend() + 1, u = 0; x > u; u++) { a = this.subPixelOptimize(this.getCoord(E[u]), D), v = { _axisShape: "axisTick", zlevel: this.getZlevelBase(), z: this.getZBase(), hoverable: !1, style: { xStart: z, yStart: a, xEnd: z + B, yEnd: a, strokeColor: C, lineWidth: D } }, this.shapeList.push(new b(v)) } } }, _buildAxisLabel: function() { var w, E = this._valueList, y = this._valueList.length, n = this.option.axisLabel.rotate, B = this.option.axisLabel.margin, C = this.option.axisLabel.clickable, D = this.option.axisLabel.textStyle; if (this.isHorizontal()) { var z, x; "bottom" === this.option.position ? (z = this.grid.getYend() + B, x = "top") : (z = this.grid.getY() - B, x = "bottom"); for (var v = 0; y > v; v++) { w = { zlevel: this.getZlevelBase(), z: this.getZBase() + 3, hoverable: !1, style: { x: this.getCoord(E[v]), y: z, color: "function" == typeof D.color ? D.color(E[v]) : D.color, text: this._valueLabel[v], textFont: this.getFont(D), textAlign: D.align || "center", textBaseline: D.baseline || x } }, n && (w.style.textAlign = n > 0 ? "bottom" === this.option.position ? "right" : "left" : "bottom" === this.option.position ? "left" : "right", w.rotation = [n * Math.PI / 180, w.style.x, w.style.y]), this.shapeList.push(new h(this._axisLabelClickable(C, w))) } } else { var u, A; "left" === this.option.position ? (u = this.grid.getX() - B, A = "right") : (u = this.grid.getXend() + B, A = "left"); for (var v = 0; y > v; v++) { w = { zlevel: this.getZlevelBase(), z: this.getZBase() + 3, hoverable: !1, style: { x: u, y: this.getCoord(E[v]), color: "function" == typeof D.color ? D.color(E[v]) : D.color, text: this._valueLabel[v], textFont: this.getFont(D), textAlign: D.align || A, textBaseline: D.baseline || (0 === v && "" !== this.option.name ? "bottom" : v === y - 1 && "" !== this.option.name ? "top" : "middle") } }, n && (w.rotation = [n * Math.PI / 180, w.style.x, w.style.y]), this.shapeList.push(new h(this._axisLabelClickable(C, w))) } } }, _buildSplitLine: function() { var w, G = this._valueList, y = this._valueList.length, B = this.option.splitLine, C = B.lineStyle.type, E = B.lineStyle.width, F = B.lineStyle.color; F = F instanceof Array ? F : [F]; var z = F.length; if (this.isHorizontal()) { for (var x, v = this.grid.getY(), a = this.grid.getYend(), A = 0; y > A; A++) { x = this.subPixelOptimize(this.getCoord(G[A]), E), w = { zlevel: this.getZlevelBase(), z: this.getZBase(), hoverable: !1, style: { xStart: x, yStart: v, xEnd: x, yEnd: a, strokeColor: F[A % z], lineType: C, lineWidth: E } }, this.shapeList.push(new b(w)) } } else { for (var D, H = this.grid.getX(), I = this.grid.getXend(), A = 0; y > A; A++) { D = this.subPixelOptimize(this.getCoord(G[A]), E), w = { zlevel: this.getZlevelBase(), z: this.getZBase(), hoverable: !1, style: { xStart: H, yStart: D, xEnd: I, yEnd: D, strokeColor: F[A % z], lineType: C, lineWidth: E } }, this.shapeList.push(new b(w)) } } }, _buildSplitArea: function() { var x, G = this.option.splitArea.areaStyle.color; if (G instanceof Array) { var z = G.length , C = this._valueList , o = this._valueList.length; if (this.isHorizontal()) { for (var E, F = this.grid.getY(), A = this.grid.getHeight(), y = this.grid.getX(), w = 0; o >= w; w++) { E = o > w ? this.getCoord(C[w]) : this.grid.getXend(), x = { zlevel: this.getZlevelBase(), z: this.getZBase(), hoverable: !1, style: { x: y, y: F, width: E - y, height: A, color: G[w % z] } }, this.shapeList.push(new j(x)), y = E } } else { for (var v, B = this.grid.getX(), D = this.grid.getWidth(), H = this.grid.getYend(), w = 0; o >= w; w++) { v = o > w ? this.getCoord(C[w]) : this.grid.getY(), x = { zlevel: this.getZlevelBase(), z: this.getZBase(), hoverable: !1, style: { x: B, y: v, width: D, height: H - v, color: G[w % z] } }, this.shapeList.push(new j(x)), H = v } } } else { x = { zlevel: this.getZlevelBase(), z: this.getZBase(), hoverable: !1, style: { x: this.grid.getX(), y: this.grid.getY(), width: this.grid.getWidth(), height: this.grid.getHeight(), color: G } }, this.shapeList.push(new j(x)) } }, _calculateValue: function() { if (isNaN(this.option.min - 0) || isNaN(this.option.max - 0)) { for (var w, D, y = {}, A = this.component.legend, r = 0, B = this.series.length; B > r; r++) { !(this.series[r].type != m.CHART_TYPE_LINE && this.series[r].type != m.CHART_TYPE_BAR && this.series[r].type != m.CHART_TYPE_SCATTER && this.series[r].type != m.CHART_TYPE_K && this.series[r].type != m.CHART_TYPE_EVENTRIVER || A && !A.isSelected(this.series[r].name) || (w = this.series[r].xAxisIndex || 0, D = this.series[r].yAxisIndex || 0, this.option.xAxisIndex != w && this.option.yAxisIndex != D || !this._calculSum(y, r))) } var C; for (var r in y) { C = y[r]; for (var z = 0, x = C.length; x > z; z++) { if (!isNaN(C[z])) { this._hasData = !0, this._min = C[z], this._max = C[z]; break } } if (this._hasData) { break } } for (var r in y) { C = y[r]; for (var z = 0, x = C.length; x > z; z++) { isNaN(C[z]) || (this._min = Math.min(this._min, C[z]), this._max = Math.max(this._max, C[z])) } } var v = "log" !== this.option.type ? this.option.boundaryGap : [0, 0] , u = Math.abs(this._max - this._min); this._min = isNaN(this.option.min - 0) ? this._min - Math.abs(u * v[0]) : this.option.min - 0, this._max = isNaN(this.option.max - 0) ? this._max + Math.abs(u * v[1]) : this.option.max - 0, this._min === this._max && (0 === this._max ? this._max = 1 : this._max > 0 ? this._min = this._max / this.option.splitNumber != null ? this.option.splitNumber : 5 : this._max = this._max / this.option.splitNumber != null ? this.option.splitNumber : 5), "time" === this.option.type ? this._reformTimeValue() : "log" === this.option.type ? this._reformLogValue() : this._reformValue(this.option.scale) } else { this._hasData = !0, this._min = this.option.min - 0, this._max = this.option.max - 0, "time" === this.option.type ? this._reformTimeValue() : "log" === this.option.type ? this._reformLogValue() : this._customerValue() } }, _calculSum: function(v, D) { var x, A, r = this.series[D].name || "kener"; if (this.series[D].stack) { var B = "__Magic_Key_Positive__" + this.series[D].stack , y = "__Magic_Key_Negative__" + this.series[D].stack; v[B] = v[B] || [], v[y] = v[y] || [], v[r] = v[r] || [], A = this.series[D].data; for (var w = 0, u = A.length; u > w; w++) { x = this.getDataFromOption(A[w]), "-" !== x && (x -= 0, x >= 0 ? null != v[B][w] ? v[B][w] += x : v[B][w] = x : null != v[y][w] ? v[y][w] += x : v[y][w] = x, this.option.scale && v[r].push(x)) } } else { if (v[r] = v[r] || [], this.series[D].type != m.CHART_TYPE_EVENTRIVER) { A = this.series[D].data; for (var w = 0, u = A.length; u > w; w++) { x = this.getDataFromOption(A[w]), this.series[D].type === m.CHART_TYPE_K ? (v[r].push(x[0]), v[r].push(x[1]), v[r].push(x[2]), v[r].push(x[3])) : x instanceof Array ? (-1 != this.option.xAxisIndex && v[r].push("time" != this.option.type ? x[0] : p.getNewDate(x[0])), -1 != this.option.yAxisIndex && v[r].push("time" != this.option.type ? x[1] : p.getNewDate(x[1]))) : v[r].push(x) } } else { A = this.series[D].data; for (var w = 0, u = A.length; u > w; w++) { for (var s = A[w].evolution, z = 0, C = s.length; C > z; z++) { v[r].push(p.getNewDate(s[z].time)) } } } } }, _reformValue: function(r) { var l = c("../util/smartSteps") , o = this.option.splitNumber; !r && this._min >= 0 && this._max >= 0 && (this._min = 0), !r && this._min <= 0 && this._max <= 0 && (this._max = 0); var e = l(this._min, this._max, o); o = null != o ? o : e.secs, this._min = e.min, this._max = e.max, this._valueList = e.pnts, this._reformLabelData() }, _reformTimeValue: function() { var o = null != this.option.splitNumber ? this.option.splitNumber : 5 , u = p.getAutoFormatter(this._min, this._max, o) , r = u.formatter , s = u.gapValue; this._valueList = [p.getNewDate(this._min)]; var l; switch (r) { case "week": l = p.nextMonday(this._min); break; case "month": l = p.nextNthOnMonth(this._min, 1); break; case "quarter": l = p.nextNthOnQuarterYear(this._min, 1); break; case "half-year": l = p.nextNthOnHalfYear(this._min, 1); break; case "year": l = p.nextNthOnYear(this._min, 1); break; default: 7200000 >= s ? l = (Math.floor(this._min / s) + 1) * s : (l = p.getNewDate(this._min - -s), l.setHours(6 * Math.round(l.getHours() / 6)), l.setMinutes(0), l.setSeconds(0)) } for (l - this._min < s / 2 && (l -= -s), u = p.getNewDate(l), o *= 1.5; o-- >= 0 && (("month" == r || "quarter" == r || "half-year" == r || "year" == r) && u.setDate(1), !(this._max - u < s / 2)); ) { this._valueList.push(u), u = p.getNewDate(u - -s) } this._valueList.push(p.getNewDate(this._max)), this._reformLabelData(function(a) { return function(e) { return p.format(a, e) } }(r)) }, _customerValue: function() { var r = c("../util/accMath") , l = null != this.option.splitNumber ? this.option.splitNumber : 5 , o = (this._max - this._min) / l; this._valueList = []; for (var e = 0; l >= e; e++) { this._valueList.push(r.accAdd(this._min, r.accMul(o, e))) } this._reformLabelData() }, _reformLogValue: function() { var e = this.option , a = c("../util/smartLogSteps")({ dataMin: this._min, dataMax: this._max, logPositive: e.logPositive, logLabelBase: e.logLabelBase, splitNumber: e.splitNumber }); this._min = a.dataMin, this._max = a.dataMax, this._valueList = a.tickList, this._dataMappingMethods = a.dataMappingMethods, this._reformLabelData(a.labelFormatter) }, _reformLabelData: function(a) { this._valueLabel = []; var r = this.option.axisLabel.formatter; if (r) { for (var l = 0, o = this._valueList.length; o > l; l++) { "function" == typeof r ? this._valueLabel.push(a ? r.call(this.myChart, this._valueList[l], a) : r.call(this.myChart, this._valueList[l])) : "string" == typeof r && this._valueLabel.push(a ? p.format(r, this._valueList[l]) : r.replace("{value}", this._valueList[l])) } } else { for (var l = 0, o = this._valueList.length; o > l; l++) { this._valueLabel.push(a ? a(this._valueList[l]) : this.numAddCommas(this._valueList[l])) } } }, getExtremum: function() { this._calculateValue(); var a = this._dataMappingMethods; return { min: this._min, max: this._max, dataMappingMethods: a ? f.merge({}, a) : null } }, refresh: function(a, i) { a && (this.option = this.reformOption(a), this.option.axisLabel.textStyle = f.merge(this.option.axisLabel.textStyle || {}, this.ecTheme.textStyle), this.series = i), this.zr && (this.clear(), this._buildShape()) }, getCoord: function(a) { this._dataMappingMethods && (a = this._dataMappingMethods.value2Coord(a)), a = a < this._min ? this._min : a, a = a > this._max ? this._max : a; var i; return i = this.isHorizontal() ? this.grid.getX() + (a - this._min) / (this._max - this._min) * this.grid.getWidth() : this.grid.getYend() - (a - this._min) / (this._max - this._min) * this.grid.getHeight() }, getCoordSize: function(a) { return Math.abs(this.isHorizontal() ? a / (this._max - this._min) * this.grid.getWidth() : a / (this._max - this._min) * this.grid.getHeight()) }, getValueFromCoord: function(a) { var i; return this.isHorizontal() ? (a = a < this.grid.getX() ? this.grid.getX() : a, a = a > this.grid.getXend() ? this.grid.getXend() : a, i = this._min + (a - this.grid.getX()) / this.grid.getWidth() * (this._max - this._min)) : (a = a < this.grid.getY() ? this.grid.getY() : a, a = a > this.grid.getYend() ? this.grid.getYend() : a, i = this._max - (a - this.grid.getY()) / this.grid.getHeight() * (this._max - this._min)), this._dataMappingMethods && (i = this._dataMappingMethods.coord2Value(i)), i.toFixed(2) - 0 }, isMaindAxis: function(a) { for (var n = 0, l = this._valueList.length; l > n; n++) { if (this._valueList[n] === a) { return !0 } } return !1 } }, f.inherits(q, d), c("../component").define("valueAxis", q), q }), define("echarts/util/date", [], function() { function f(h, E, y) { y = y > 1 ? y : 2; for (var A, d, B, C, D = 0, z = c.length; z > D; D++) { if (A = c[D].value, d = Math.ceil(E / A) * A - Math.floor(h / A) * A, Math.round(d / A) <= 1.2 * y) { B = c[D].formatter, C = c[D].value; break } } return null == B && (B = "year", A = 31708800000, d = Math.ceil(E / A) * A - Math.floor(h / A) * A, C = Math.round(d / (y - 1) / A) * A), { formatter: B, gapValue: C } } function x(a) { return 10 > a ? "0" + a : a } function m(y, z) { ("week" == y || "month" == y || "quarter" == y || "half-year" == y || "year" == y) && (y = "MM - dd\nyyyy"); var B = j(z) , h = B.getFullYear() , C = B.getMonth() + 1 , D = B.getDate() , E = B.getHours() , A = B.getMinutes() , t = B.getSeconds(); return y = y.replace("MM", x(C)), y = y.toLowerCase(), y = y.replace("yyyy", h), y = y.replace("yy", h % 100), y = y.replace("dd", x(D)), y = y.replace("d", D), y = y.replace("hh", x(E)), y = y.replace("h", E), y = y.replace("mm", x(A)), y = y.replace("m", A), y = y.replace("ss", x(t)), y = y.replace("s", t) } function q(a) { return a = j(a), a.setDate(a.getDate() + 8 - a.getDay()), a } function b(a, h, d) { return a = j(a), a.setMonth(Math.ceil((a.getMonth() + 1) / d) * d), a.setDate(h), a } function u(a, d) { return b(a, d, 1) } function v(a, d) { return b(a, d, 3) } function w(a, d) { return b(a, d, 6) } function p(a, d) { return b(a, d, 12) } function j(a) { return a instanceof Date ? a : new Date("string" == typeof a ? a.replace(/-/g, "/") : a) } var c = [{ formatter: "hh : mm : ss", value: 1000 }, { formatter: "hh : mm : ss", value: 5000 }, { formatter: "hh : mm : ss", value: 10000 }, { formatter: "hh : mm : ss", value: 15000 }, { formatter: "hh : mm : ss", value: 30000 }, { formatter: "hh : mm\nMM - dd", value: 60000 }, { formatter: "hh : mm\nMM - dd", value: 300000 }, { formatter: "hh : mm\nMM - dd", value: 600000 }, { formatter: "hh : mm\nMM - dd", value: 900000 }, { formatter: "hh : mm\nMM - dd", value: 1800000 }, { formatter: "hh : mm\nMM - dd", value: 3600000 }, { formatter: "hh : mm\nMM - dd", value: 7200000 }, { formatter: "hh : mm\nMM - dd", value: 21600000 }, { formatter: "hh : mm\nMM - dd", value: 43200000 }, { formatter: "MM - dd\nyyyy", value: 86400000 }, { formatter: "week", value: 604800000 }, { formatter: "month", value: 2678400000 }, { formatter: "quarter", value: 8208000000 }, { formatter: "half-year", value: 16416000000 }, { formatter: "year", value: 32832000000 }]; return { getAutoFormatter: f, getNewDate: j, format: m, nextMonday: q, nextNthPerNmonth: b, nextNthOnMonth: u, nextNthOnQuarterYear: v, nextNthOnHalfYear: w, nextNthOnYear: p } }), define("echarts/util/smartSteps", [], function() { function C(a) { return ae.log(Y(a)) / ae.LN10 } function Z(a) { return ae.pow(10, a) } function G(a) { return a === ah(a) } function O(c, h, d, b) { ai = b || {}, z = ai.steps || ac, j = ai.secs || M, d = af(+d || 0) % 99, c = +c || 0, h = +h || 0, ag = J = 0, "min"in ai && (c = +ai.min || 0, ag = 1), "max"in ai && (h = +ai.max || 0, J = 1), c > h && (h = [c, c = h][0]); var f = h - c; if (ag && J) { return D(c, h, d) } if ((d || 5) > f) { if (G(c) && G(h)) { return Q(c, h, d) } if (0 === f) { return aa(c, h, d) } } return F(c, h, d) } function q(r, v, y, b) { b = b || 0; var L = P((v - r) / y, -1) , w = P(r, -1, 1) , t = P(v, -1) , o = ae.min(L.e, w.e, t.e); 0 === w.c ? o = ae.min(L.e, t.e) : 0 === t.c && (o = ae.min(L.e, w.e)), R(L, { c: 0, e: o }), R(w, L, 1), R(t, L), b += o, r = w.c, v = t.c; for (var f = (v - r) / y, x = Z(b), I = 0, S = [], U = y + 1; U--; ) { S[U] = (r + f * U) * x } if (0 > b) { I = ab(x), f = +(f * x).toFixed(I), r = +(r * x).toFixed(I), v = +(v * x).toFixed(I); for (var U = S.length; U--; ) { S[U] = S[U].toFixed(I), 0 === +S[U] && (S[U] = "0") } } else { r *= x, v *= x, f *= x } return j = 0, z = 0, ai = 0, { min: r, max: v, secs: y, step: f, fix: I, exp: b, pnts: S } } function P(c, b, d) { b = af(b % 10) || 2, 0 > b && (G(c) ? b = ("" + Y(c)).replace(/0+$/, "").length || 1 : (c = c.toFixed(15).replace(/0+$/, ""), b = c.replace(".", "").replace(/^[-0]+/, "").length, c = +c)); var e = ah(C(c)) - b + 1 , f = +(c * Z(-e)).toFixed(15) || 0; return f = d ? ah(f) : H(f), !f && (e = 0), ("" + Y(f)).length > b && (e += 1, f /= 10), { c: f, e: e } } function R(c, d, f) { var b = d.e - c.e; b && (c.e += b, c.c *= Z(-b), c.c = f ? ah(c.c) : H(c.c)) } function T(a, c, b) { a.e < c.e ? R(c, a, b) : R(a, c, b) } function K(a, d) { d = d || ac, a = P(a); for (var b = a.c, c = 0; b > d[c]; ) { c++ } if (!d[c]) { for (b /= 10, a.e += 1, c = 0; b > d[c]; ) { c++ } } return a.c = d[c], a } function F(a, l, d) { var i, c = d || +j.slice(-1), m = K((l - a) / c, z), o = P(l - a), b = P(a, -1, 1), r = P(l, -1); if (R(o, m), R(b, m, 1), R(r, m), d ? i = A(b, r, c) : c = B(b, r), G(a) && G(l) && a * l >= 0) { if (c > l - a) { return Q(a, l, c) } c = N(a, l, d, b, r, c) } var p = ad(a, l, b.c, r.c); return b.c = p[0], r.c = p[1], (ag || J) && E(a, l, b, r), q(b.c, r.c, c, r.e) } function B(c, f) { for (var l, b, m, p, t = [], d = j.length; d--; ) { l = j[d], b = K((f.c - c.c) / l, z), b = b.c * Z(b.e), m = ah(c.c / b) * b, p = H(f.c / b) * b, t[d] = { min: m, max: p, step: b, span: p - m } } return t.sort(function(a, n) { var h = a.span - n.span; return 0 === h && (h = a.step - n.step), h }), t = t[0], l = t.span / t.step, c.c = t.min, f.c = t.max, 3 > l ? 2 * l : l } function A(m, t, u) { for (var b, v, w = t.c, x = (t.c - m.c) / u - 1; w > m.c; ) { x = K(x + 1, z), x = x.c * Z(x.e), b = x * u, v = H(t.c / x) * x, w = v - b } var p = m.c - w , l = v - t.c , f = p - l; return f > 1.1 * x && (f = af(f / x / 2) * x, w += f, v += f), m.c = w, t.c = v, x } function N(f, p, b, t, u, v) { var m = u.c - t.c , i = m / v * Z(u.e); if (!G(i) && (i = ah(i), m = i * v, p - f > m && (i += 1, m = i * v, !b && i * (v - 1) >= p - f && (v -= 1, m = i * v)), m >= p - f)) { var c = m - (p - f); t.c = af(f - c / 2), u.c = af(p + c / 2), t.e = 0, u.e = 0 } return v } function Q(a, l, b) { if (b = b || 5, ag) { l = a + b } else { if (J) { a = l - b } else { var c = b - (l - a) , d = af(a - c / 2) , f = af(l + c / 2) , h = ad(a, l, d, f); a = h[0], l = h[1] } } return q(a, l, b) } function aa(a, d, b) { b = b || 5; var c = ae.min(Y(d / b), b) / 2.1; return ag ? d = a + c : J ? a = d - c : (a -= c, d += c), F(a, d, b) } function ad(a, d, b, c) { return a >= 0 && 0 > b ? (c -= b, b = 0) : 0 >= d && c > 0 && (b -= c, c = 0), [b, c] } function ab(a) { return a = (+a).toFixed(15).split("."), a.pop().replace(/0+$/, "").length } function E(c, l, d, f) { if (ag) { var b = P(c, 4, 1); d.e - b.e > 6 && (b = { c: 0, e: d.e }), T(d, b), T(f, b), f.c += b.c - d.c, d.c = b.c } else { if (J) { var h = P(l, 4); f.e - h.e > 6 && (h = { c: 0, e: f.e }), T(d, h), T(f, h), d.c += h.c - f.c, f.c = h.c } } } function D(o, X, x) { var L = x ? [x] : j , W = X - o; if (0 === W) { return X = P(X, 3), x = L[0], X.c = af(X.c + x / 2), q(X.c - x, X.c, x, X.e) } Y(X / W) < 1e-06 && (X = 0), Y(o / W) < 1e-06 && (o = 0); var y, w, b, a = [[5, 10], [10, 2], [50, 10], [100, 2]], I = [], S = [], aj = P(X - o, 3), al = P(o, -1, 1), ak = P(X, -1); R(al, aj, 1), R(ak, aj), W = ak.c - al.c, aj.c = W; for (var v = L.length; v--; ) { x = L[v], y = H(W / x), w = y * x - W, b = 3 * (w + 3), b += 2 * (x - L[0] + 2), x % 5 === 0 && (b -= 10); for (var r = a.length; r--; ) { y % a[r][0] === 0 && (b /= a[r][1]) } S[v] = [x, y, w, b].join(), I[v] = { secs: x, step: y, delta: w, score: b } } return I.sort(function(c, d) { return c.score - d.score }), I = I[0], al.c = af(al.c - I.delta / 2), ak.c = af(ak.c + I.delta / 2), q(al.c, ak.c, I.secs, aj.e) } var ai, z, j, ag, J, ac = [10, 20, 25, 50], M = [4, 5, 6], ae = Math, af = ae.round, ah = ae.floor, H = ae.ceil, Y = ae.abs; return O }), define("echarts/util/smartLogSteps", ["require", "./number"], function(J) { function aj(a) { return Q(), am = a || {}, ad(), q(), [ae(), Q()][0] } function Q() { ac = am = N = ao = au = D = O = j = af = al = null } function ad() { af = am.logLabelBase, null == af ? (al = "plain", af = 10, ao = ai) : (af = +af, 1 > af && (af = 10), al = "exponent", ao = an(af)), O = am.splitNumber, null == O && (O = M); var a = parseFloat(am.dataMin) , b = parseFloat(am.dataMax); isFinite(a) || isFinite(b) ? isFinite(a) ? isFinite(b) ? a > b && (b = [a, a = b][0]) : b = a : a = b : a = b = 1, ac = am.logPositive, null == ac && (ac = b > 0 || 0 === a), au = ac ? a : -b, D = ac ? b : -a, ak > au && (au = ak), ak > D && (D = ak) } function q() { function f() { O > c && (O = c); var h = at(aa(c / O)) , A = aq(aa(c / h)) , m = h * A , o = (m - u) / 2 , d = at(aa(x - o)); F(d - x) && (d -= 1), N = -d * ao; for (var r = d; w >= r - h; r += h) { j.push(ab(af, r)) } } function z() { for (var i = p(l, 0), r = i + 2; r > i && b(i + 1) + v(i + 1) * G < x; ) { i++ } for (var n = p(y, 0), r = n - 2; n > r && b(n - 1) + v(n - 1) * G > w; ) { n-- } N = -(b(i) * ai + v(i) * Z); for (var h = i; n >= h; h++) { var a = b(h) , o = v(h); j.push(ab(10, a) * ab(2, o)) } } function p(a, d) { return 3 * a + d } function v(a) { return a - 3 * b(a) } function b(a) { return at(aa(a / 3)) } j = []; var w = aa(an(D) / ao) , x = aa(an(au) / ao) , y = aq(w) , l = at(x) , c = y - l , u = w - x; "exponent" === al ? f() : av >= c && O > av ? z() : f() } function ae() { for (var c = [], p = 0, d = j.length; d > p; p++) { c[p] = (ac ? 1 : -1) * j[p] } !ac && c.reverse(); var h = ah() , b = h.value2Coord , m = b(c[0]) , f = b(c[c.length - 1]); return m === f && (m -= 1, f += 1), { dataMin: m, dataMax: f, tickList: c, logPositive: ac, labelFormatter: ag(), dataMappingMethods: h } } function ag() { if ("exponent" === al) { var a = af , b = ao; return function(c) { if (!isFinite(parseFloat(c))) { return "" } var d = ""; return 0 > c && (c = -c, d = "-"), d + a + H(an(c) / b) } } return function(c) { return isFinite(parseFloat(c)) ? ar.addCommas(P(c)) : "" } } function ah() { var a = ac , b = N; return { value2Coord: function(c) { return null == c || isNaN(c) || !isFinite(c) ? c : (c = parseFloat(c), isFinite(c) ? a && ak > c ? c = ak : !a && c > -ak && (c = -ak) : c = ak, c = ap(c), (a ? 1 : -1) * (an(c) + b)) }, coord2Value: function(c) { return null == c || isNaN(c) || !isFinite(c) ? c : (c = parseFloat(c), isFinite(c) || (c = ak), a ? ab(R, c - b) : -ab(R, -c + b)) } } } function aa(a) { return +Number(+a).toFixed(14) } function P(a) { return Number(a).toFixed(15).replace(/\.?0*$/, "") } function H(c) { c = P(Math.round(c)); for (var h = [], d = 0, f = c.length; f > d; d++) { var b = c.charAt(d); h.push(B[b] || "") } return h.join("") } function F(a) { return a > -ak && ak > a } var ac, af, al, ao, am, O, N, au, D, j, ar = J("./number"), Y = Math, an = Y.log, ab = Y.pow, ap = Y.abs, aq = Y.ceil, at = Y.floor, R = Y.E, ai = Y.LN10, Z = Y.LN2, G = Z / ai, ak = 1e-09, M = 5, av = 2, B = { 0: "⁰", 1: "¹", 2: "²", 3: "³", 4: "⁴", 5: "⁵", 6: "⁶", 7: "⁷", 8: "⁸", 9: "⁹", "-": "⁻" }; return aj }); var chart = null; var arr = []; var dataArr = {}; var subTitles = ""; var teamName = ""; var arrValue = ""; function oddsHig(f, b, d, e, a) { var c = f / (f + d); c = isNaN(c) ? 0 : c; $("" + a + "").highcharts({ chart: { plotBackgroundColor: null, plotBorderWidth: null, plotShadow: false, spacing: [80, 0, 40, 0] }, title: { floating: true, text: "近" + e + "场", style: { color: "#333", fontSize: "22px", font: "22px 微软雅黑" } }, credits: { enabled: false }, subtitle: { text: "历史交锋", style: { color: "#999", fontSize: "14px", }, floating: true, align: "center", x: 0, verticalAlign: "bottom", y: -35 }, colors: ["#4b80c2", "#27a81a", "#d55662", ], tooltip: { pointFormat: "{series.name}: {point.y}场" }, plotOptions: { pie: { allowPointSelect: true, cursor: "pointer", dataLabels: { enabled: true, format: '{point.y}', style: { color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || "black" } }, } }, series: [{ size: 130, type: "pie", innerSize: "90%", name: "近" + e + "场", data: [{ name: "平", y: b, color: "#f1b000" }, { name: "负", y: d, color: "#27a81a" }, { name: "胜", y: f, color: "#d55662" }, ] }] }, function(h) { var i = h.series[0].center[1] , j = parseInt(h.title.styles.fontSize); h.setTitle({ y: i + j / 2 - 8 }); chart = h }) } (function() { function bY() { var m, p = arguments, r, s = {}, t = function(u, w) { var x, z; typeof u !== "object" && (u = {}); for (z in w) { w.hasOwnProperty(z) && (x = w[z], u[z] = x && typeof x === "object" && Object.prototype.toString.call(x) !== "[object Array]" && z !== "renderTo" && typeof x.nodeType !== "number" ? t(u[z] || {}, x) : w[z]) } return u }; p[0] === !0 && (s = p[1], p = Array.prototype.slice.call(p, 2)); r = p.length; for (m = 0; m < r; m++) { s = t(s, p[m]) } return s } function i(m, p) { return parseInt(m, p || 10) } function aa(m) { return typeof m === "string" } function q(m) { return m && typeof m === "object" } function at(m) { return Object.prototype.toString.call(m) === "[object Array]" } function bd(m) { return typeof m === "number" } function ae(m) { return bD.log(m) / bD.LN10 } function ar(m) { return bD.pow(10, m) } function ax(m, p) { for (var r = m.length; r--; ) { if (m[r] === p) { m.splice(r, 1); break } } } function bn(m) { return m !== by && m !== null } function aL(m, p, r) { var s, t; if (aa(p)) { bn(r) ? m.setAttribute(p, r) : m && m.getAttribute && (t = m.getAttribute(p)) } else { if (bn(p) && q(p)) { for (s in p) { m.setAttribute(s, p[s]) } } } return t } function bj(m) { return at(m) ? m : [m] } function ah(m, p) { if (bV && !j && p && p.opacity !== by) { p.filter = "alpha(opacity=" + p.opacity * 100 + ")" } bh(m.style, p) } function bZ(m, p, r, s, t) { m = c.createElement(m); p && bh(m, p); t && ah(m, { padding: 0, border: bi, margin: 0 }); r && ah(m, r); s && s.appendChild(m); return m } function aC(m, p) { var r = function() { return by }; r.prototype = new m; bh(r.prototype, p); return r } function ay(m, p) { return Array((p || 2) + 1 - String(m).length).join(0) + m } function bL(m) { return (af && af(m) || aZ || 0) * 60000 } function aD(m, p) { for (var r = "{", s = !1, t, u, w, x, z, A = []; (r = m.indexOf(r)) !== -1; ) { t = m.slice(0, r); if (s) { u = t.split(":"); w = u.shift().split("."); z = w.length; t = p; for (x = 0; x < z; x++) { t = t[w[x]] } if (u.length) { u = u.join(":"), w = /\.([0-9])/, x = a7.lang, z = void 0, /f$/.test(u) ? (z = (z = u.match(w)) ? z[1] : -1, t !== null && (t = bI.numberFormat(t, z, x.decimalPoint, u.indexOf(",") > -1 ? x.thousandsSep : ""))) : t = a3(u, t) } } A.push(t); m = m.slice(r + 1); r = (s = !s) ? "}" : "{" } A.push(m); return A.join("") } function a4(m) { return bD.pow(10, bz(bD.log(m) / bD.LN10)) } function ba(m, p, r, s, t) { var u, w = m, r = a6(r, 1); u = m / r; p || (p = [1, 2, 2.5, 5, 10], s === !1 && (r === 1 ? p = [1, 2, 5, 10] : r <= 0.1 && (p = [1 / r]))); for (s = 0; s < p.length; s++) { if (w = p[s], t && w * r >= m || !t && u <= (p[s] + (p[s + 1] || p[s])) / 2) { break } } w *= r; return w } function bf(m, p) { var r = m.length, s, t; for (t = 0; t < r; t++) { m[t].ss_i = t } m.sort(function(u, w) { s = p(u, w); return s === 0 ? u.ss_i - w.ss_i : s }); for (t = 0; t < r; t++) { delete m[t].ss_i } } function a9(m) { for (var p = m.length, r = m[0]; p--; ) { m[p] < r && (r = m[p]) } return r } function ai(m) { for (var p = m.length, r = m[0]; p--; ) { m[p] > r && (r = m[p]) } return r } function be(m, p) { for (var r in m) { m[r] && m[r] !== p && m[r].destroy && m[r].destroy(), delete m[r] } } function bk(m) { aj || (aj = bZ(aI)); m && aj.appendChild(m); aj.innerHTML = "" } function aH(m, p) { var r = "Highcharts error #" + m + ": www.highcharts.com/errors/" + m; if (p) { throw r } aq.console && console.log(r) } function S(m) { return parseFloat(m.toPrecision(14)) } function bp(m, p) { b0 = a6(m, p.animation) } function C() { var m = a7.global , p = m.useUTC , r = p ? "getUTC" : "get" , s = p ? "setUTC" : "set"; e = m.Date || window.Date; aZ = p && m.timezoneOffset; af = p && m.getTimezoneOffset; ao = function(t, u, w, x, z, A) { var B; p ? (B = e.UTC.apply(0, arguments), B += bL(B)) : B = (new e(t,u,a6(w, 1),a6(x, 0),a6(z, 0),a6(A, 0))).getTime(); return B } ; bl = r + "Minutes"; bq = r + "Hours"; bw = r + "Day"; bR = r + "Date"; bW = r + "Month"; b1 = r + "FullYear"; ac = s + "Milliseconds"; ag = s + "Seconds"; ak = s + "Minutes"; ap = s + "Hours"; bB = s + "Date"; bG = s + "Month"; bM = s + "FullYear" } function aG() {} function bv(m, p, r, s) { this.axis = m; this.pos = p; this.type = r || ""; this.isNew = !0; !r && !s && this.addLabel() } function av(m, p, r, s, t) { var u = m.chart.inverted; this.axis = m; this.isNegative = r; this.options = p; this.x = s; this.total = null; this.points = {}; this.stack = t; this.alignOptions = { align: p.align || (u ? r ? "left" : "right" : "center"), verticalAlign: p.verticalAlign || (u ? "middle" : r ? "bottom" : "top"), y: a6(p.y, u ? 4 : r ? 14 : -6), x: a6(p.x, u ? r ? -6 : 6 : 0) }; this.textAlign = p.textAlign || (u ? r ? "right" : "left" : "center") } var by, c = document, aq = window, bD = Math, bO = bD.round, bz = bD.floor, bo = bD.ceil, bs = bD.max, aw = bD.min, a1 = bD.abs, bJ = bD.cos, a = bD.sin, aM = bD.PI, am = aM * 2 / 360, l = navigator.userAgent, aA = aq.opera, bV = /(msie|trident)/i.test(l) && !aA, au = c.documentMode === 8, bS = /AppleWebKit/.test(l), aN = /Firefox/.test(l), aF = /(Mobile|Android|Windows Phone)/.test(l), v = "http://www.w3.org/2000/svg", j = !!c.createElementNS && !!c.createElementNS(v, "svg").createSVGRect, a0 = aN && parseInt(l.split("Firefox/")[1], 10) < 4, ad = !j && !bV && !!c.createElement("canvas").getContext, b, f, aK = {}, bX = 0, aj, a7, a3, b0, b2, al, aS = function() { return by }, bP = [], n = 0, aI = "div", bi = "none", a5 = /^[0-9]+$/, az = ["plotTop", "marginRight", "marginBottom", "plotLeft"], bb = "stroke-width", e, ao, aZ, af, bl, bq, bw, bR, bW, b1, ac, ag, ak, ap, bB, bG, bM, aB = {}, bI; bI = aq.Highcharts = aq.Highcharts ? aH(16, !0) : {}; bI.seriesTypes = aB; var bh = bI.extend = function(m, p) { var r; m || (m = {}); for (r in p) { m[r] = p[r] } return m } , a6 = bI.pick = function() { var m = arguments, p, r, s = m.length; for (p = 0; p < s; p++) { if (r = m[p], r !== by && r !== null) { return r } } } , y = bI.wrap = function(m, p, r) { var s = m[p]; m[p] = function() { var t = Array.prototype.slice.call(arguments); t.unshift(s); return r.apply(this, t) } } ; a3 = function(m, p, r) { if (!bn(p) || isNaN(p)) { return "Invalid date" } var m = a6(m, "%Y-%m-%d %H:%M:%S"), s = new e(p - bL(p)), t, u = s[bq](), w = s[bw](), x = s[bR](), z = s[bW](), A = s[b1](), B = a7.lang, D = B.weekdays, s = bh({ a: D[w].substr(0, 3), A: D[w], d: ay(x), e: x, w: w, b: B.shortMonths[z], B: B.months[z], m: ay(z + 1), y: A.toString().substr(2, 2), Y: A, H: ay(u), I: ay(u % 12 || 12), l: u % 12 || 12, M: ay(s[bl]()), p: u < 12 ? "AM" : "PM", P: u < 12 ? "am" : "pm", S: ay(s.getSeconds()), L: ay(bO(p % 1000), 3) }, bI.dateFormats); for (t in s) { for (; m.indexOf("%" + t) !== -1; ) { m = m.replace("%" + t, typeof s[t] === "function" ? s[t](p) : s[t]) } } return r ? m.substr(0, 1).toUpperCase() + m.substr(1) : m } ; al = { millisecond: 1, second: 1000, minute: 60000, hour: 3600000, day: 86400000, week: 604800000, month: 2419200000, year: 31449600000 }; bI.numberFormat = function(m, p, r, s) { var t = a7.lang , m = +m || 0 , u = p === -1 ? aw((m.toString().split(".")[1] || "").length, 20) : isNaN(p = a1(p)) ? 2 : p , p = r === void 0 ? t.decimalPoint : r , s = s === void 0 ? t.thousandsSep : s , t = m < 0 ? "-" : "" , r = String(i(m = a1(m).toFixed(u))) , w = r.length > 3 ? r.length % 3 : 0; return t + (w ? r.substr(0, w) + s : "") + r.substr(w).replace(/(\d{3})(?=\d)/g, "$1" + s) + (u ? p + a1(m - r).toFixed(u).slice(2) : "") } ; b2 = { init: function(m, p, r) { var p = p || "", s = m.shift, t = p.indexOf("C") > -1, u = t ? 7 : 3, w, p = p.split(" "), r = [].concat(r), x, z, A = function(B) { for (w = B.length; w--; ) { B[w] === "M" && B.splice(w + 1, 0, B[w + 1], B[w + 2], B[w + 1], B[w + 2]) } }; t && (A(p), A(r)); m.isArea && (x = p.splice(p.length - 6, 6), z = r.splice(r.length - 6, 6)); if (s <= r.length / u && p.length === r.length) { for (; s--; ) { r = [].concat(r).splice(0, u).concat(r) } } m.shift = 0; if (p.length) { for (m = r.length; p.length < m; ) { s = [].concat(p).splice(p.length - u, u), t && (s[u - 6] = s[u - 2], s[u - 5] = s[u - 1]), p = p.concat(s) } } x && (p = p.concat(x), r = r.concat(z)); return [p, r] }, step: function(m, p, r, s) { var t = [] , u = m.length; if (r === 1) { t = s } else { if (u === p.length && r < 1) { for (; u--; ) { s = parseFloat(m[u]), t[u] = isNaN(s) ? m[u] : r * parseFloat(p[u] - s) + s } } else { t = p } } return t } }; (function(m) { aq.HighchartsAdapter = aq.HighchartsAdapter || m && { init: function(p) { var r = m.fx; m.extend(m.easing, { easeOutQuad: function(s, t, u, w, x) { return -w * (t /= x) * (t - 2) + u } }); m.each(["cur", "_default", "width", "height", "opacity"], function(s, t) { var u = r.step, w; t === "cur" ? u = r.prototype : t === "_default" && m.Tween && (u = m.Tween.propHooks[t], t = "set"); (w = u[t]) && (u[t] = function(x) { var z, x = s ? x : this; if (x.prop !== "align") { return z = x.elem, z.attr ? z.attr(x.prop, t === "cur" ? by : x.now) : w.apply(this, arguments) } } ) }); y(m.cssHooks.opacity, "get", function(s, t, u) { return t.attr ? t.opacity || 0 : s.call(this, t, u) }); this.addAnimSetter("d", function(s) { var t = s.elem, u; if (!s.started) { u = p.init(t, t.d, t.toD), s.start = u[0], s.end = u[1], s.started = !0 } t.attr("d", p.step(s.start, s.end, s.pos, t.toD)) }); this.each = Array.prototype.forEach ? function(s, t) { return Array.prototype.forEach.call(s, t) } : function(s, t) { var u, w = s.length; for (u = 0; u < w; u++) { if (t.call(s[u], s[u], u, s) === !1) { return u } } } ; m.fn.highcharts = function() { var s = "Chart", t = arguments, u, w; if (this[0]) { aa(t[0]) && (s = t[0], t = Array.prototype.slice.call(t, 1)); u = t[0]; if (u !== by) { u.chart = u.chart || {}, u.chart.renderTo = this[0], new bI[s](u,t[1]), w = this } u === by && (w = bP[aL(this[0], "data-highcharts-chart")]) } return w } }, addAnimSetter: function(p, r) { m.Tween ? m.Tween.propHooks[p] = { set: r } : m.fx.step[p] = r }, getScript: m.getScript, inArray: m.inArray, adapterRun: function(p, r) { return m(p)[r]() }, grep: m.grep, map: function(p, r) { for (var s = [], t = 0, u = p.length; t < u; t++) { s[t] = r.call(p[t], p[t], t, p) } return s }, offset: function(p) { return m(p).offset() }, addEvent: function(p, r, s) { m(p).bind(r, s) }, removeEvent: function(p, r, s) { var t = c.removeEventListener ? "removeEventListener" : "detachEvent"; c[t] && p && !p[t] && (p[t] = function() {} ); m(p).unbind(r, s) }, fireEvent: function(p, r, s, t) { var u = m.Event(r), w = "detached" + r, x; !bV && s && (delete s.layerX, delete s.layerY, delete s.returnValue); bh(u, s); p[r] && (p[w] = p[r], p[r] = null); m.each(["preventDefault", "stopPropagation"], function(z, A) { var B = u[A]; u[A] = function() { try { B.call(u) } catch (D) { A === "preventDefault" && (x = !0) } } }); m(p).trigger(u); p[w] && (p[r] = p[w], p[w] = null); t && !u.isDefaultPrevented() && !x && t(u) }, washMouseEvent: function(p) { var r = p.originalEvent || p; if (r.pageX === by) { r.pageX = p.pageX, r.pageY = p.pageY } return r }, animate: function(p, r, s) { var t = m(p); if (!p.style) { p.style = {} } if (r.d) { p.toD = r.d, r.d = 1 } t.stop(); r.opacity !== by && p.attr && (r.opacity += "px"); p.hasAnim = 1; t.animate(r, s) }, stop: function(p) { p.hasAnim && m(p).stop() } } } )(aq.jQuery); var bt = aq.HighchartsAdapter , E = bt || {}; bt && bt.init.call(bt, b2); var aE = E.adapterRun , bg = E.getScript , aT = E.inArray , aQ = bI.each = E.each , aJ = E.grep , bm = E.offset , bA = E.map , aW = E.addEvent , bU = E.removeEvent , aR = E.fireEvent , br = E.washMouseEvent , aO = E.animate , ab = E.stop; a7 = { colors: "#7cb5ec,#434348,#90ed7d,#f7a35c,#8085e9,#f15c80,#e4d354,#2b908f,#f45b5b,#91e8e1".split(","), symbols: ["circle", "diamond", "square", "triangle", "triangle-down"], lang: { loading: "Loading...", months: "January,February,March,April,May,June,July,August,September,October,November,December".split(","), shortMonths: "Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","), weekdays: "Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","), decimalPoint: ".", numericSymbols: "k,M,G,T,P,E".split(","), resetZoom: "Reset zoom", resetZoomTitle: "Reset zoom level 1:1", thousandsSep: " " }, global: { useUTC: !0, canvasToolsURL: "http://code.highcharts.com/4.1.5/modules/canvas-tools.js", VMLRadialGradientURL: "http://code.highcharts.com/4.1.5/gfx/vml-radial-gradient.png" }, chart: { borderColor: "#4572A7", borderRadius: 0, defaultSeriesType: "line", ignoreHiddenSeries: !0, spacing: [10, 10, 15, 10], backgroundColor: "#FFFFFF", plotBorderColor: "#C0C0C0", resetZoomButton: { theme: { zIndex: 20 }, position: { align: "right", x: -10, y: 10 } } }, title: { text: "Chart title", align: "center", margin: 15, style: { color: "#333333", fontSize: "18px" } }, subtitle: { text: "", align: "center", style: { color: "#555555" } }, plotOptions: { line: { allowPointSelect: !1, showCheckbox: !1, animation: { duration: 1000 }, events: {}, lineWidth: 2, marker: { lineWidth: 0, radius: 4, lineColor: "#FFFFFF", states: { hover: { enabled: !0, lineWidthPlus: 1, radiusPlus: 2 }, select: { fillColor: "#FFFFFF", lineColor: "#000000", lineWidth: 2 } } }, point: { events: {} }, dataLabels: { align: "center", formatter: function() { return this.y === null ? "" : bI.numberFormat(this.y, -1) }, style: { color: "contrast", fontSize: "11px", fontWeight: "bold", textShadow: "0 0 6px contrast, 0 0 3px contrast" }, verticalAlign: "bottom", x: 0, y: 0, padding: 5 }, cropThreshold: 300, pointRange: 0, states: { hover: { lineWidthPlus: 1, marker: {}, halo: { size: 10, opacity: 0.25 } }, select: { marker: {} } }, stickyTracking: !0, turboThreshold: 1000 } }, labels: { style: { position: "absolute", color: "#3E576F" } }, legend: { enabled: !0, align: "center", layout: "horizontal", labelFormatter: function() { return this.name }, borderColor: "#909090", borderRadius: 0, navigation: { activeColor: "#274b6d", inactiveColor: "#CCC" }, shadow: !1, itemStyle: { color: "#333333", fontSize: "12px", fontWeight: "bold" }, itemHoverStyle: { color: "#000" }, itemHiddenStyle: { color: "#CCC" }, itemCheckboxStyle: { position: "absolute", width: "13px", height: "13px" }, symbolPadding: 5, verticalAlign: "bottom", x: 0, y: 0, title: { style: { fontWeight: "bold" } } }, loading: { labelStyle: { fontWeight: "bold", position: "relative", top: "45%" }, style: { position: "absolute", backgroundColor: "white", opacity: 0.5, textAlign: "center" } }, tooltip: { enabled: !0, animation: j, backgroundColor: "rgba(249, 249, 249, .85)", borderWidth: 1, borderRadius: 3, dateTimeLabelFormats: { millisecond: "%A, %b %e, %H:%M:%S.%L", second: "%A, %b %e, %H:%M:%S", minute: "%A, %b %e, %H:%M", hour: "%A, %b %e, %H:%M", day: "%A, %b %e, %Y", week: "Week from %A, %b %e, %Y", month: "%B %Y", year: "%Y" }, footerFormat: "", headerFormat: '{point.key}
', pointFormat: '\u25CF {series.name}: {point.y}
', shadow: !0, snap: aF ? 25 : 10, style: { color: "#333333", cursor: "default", fontSize: "12px", padding: "8px", whiteSpace: "nowrap" } }, credits: { enabled: !0, text: "Highcharts.com", href: "http://www.highcharts.com", position: { align: "right", x: -10, verticalAlign: "bottom", y: -5 }, style: { cursor: "pointer", color: "#909090", fontSize: "9px" } } }; var d = a7.plotOptions , bt = d.line; C(); var bx = /rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/ , bC = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/ , bH = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/ , aX = function(m) { var p = [], r, s; (function(t) { t && t.stops ? s = bA(t.stops, function(u) { return aX(u[1]) }) : (r = bx.exec(t)) ? p = [i(r[1]), i(r[2]), i(r[3]), parseFloat(r[4], 10)] : (r = bC.exec(t)) ? p = [i(r[1], 16), i(r[2], 16), i(r[3], 16), 1] : (r = bH.exec(t)) && (p = [i(r[1]), i(r[2]), i(r[3]), 1]) } )(m); return { get: function(t) { var u; s ? (u = bY(m), u.stops = [].concat(u.stops), aQ(s, function(w, x) { u.stops[x] = [u.stops[x][0], w.get(t)] })) : u = p && !isNaN(p[0]) ? t === "rgb" ? "rgb(" + p[0] + "," + p[1] + "," + p[2] + ")" : t === "a" ? p[3] : "rgba(" + p.join(",") + ")" : m; return u }, brighten: function(t) { if (s) { aQ(s, function(w) { w.brighten(t) }) } else { if (bd(t) && t !== 0) { var u; for (u = 0; u < 3; u++) { p[u] += i(t * 255), p[u] < 0 && (p[u] = 0), p[u] > 255 && (p[u] = 255) } } } return this }, rgba: p, setOpacity: function(t) { p[3] = t; return this }, raw: m } }; aG.prototype = { opacity: 1, textProps: "fontSize,fontWeight,fontFamily,fontStyle,color,lineHeight,width,textDecoration,textShadow".split(","), init: function(m, p) { this.element = p === "span" ? bZ(p) : c.createElementNS(v, p); this.renderer = m }, animate: function(m, p, r) { p = a6(p, b0, !0); ab(this); if (p) { p = bY(p, {}); if (r) { p.complete = r } aO(this, m, p) } else { this.attr(m), r && r() } return this }, colorGradient: function(m, p, r) { var s = this.renderer, t, u, w, x, z, A, B, D, F, G, H = []; m.linearGradient ? u = "linearGradient" : m.radialGradient && (u = "radialGradient"); if (u) { w = m[u]; x = s.gradients; A = m.stops; F = r.radialReference; at(w) && (m[u] = w = { x1: w[0], y1: w[1], x2: w[2], y2: w[3], gradientUnits: "userSpaceOnUse" }); u === "radialGradient" && F && !bn(w.gradientUnits) && (w = bY(w, { cx: F[0] - F[2] / 2 + w.cx * F[2], cy: F[1] - F[2] / 2 + w.cy * F[2], r: w.r * F[2], gradientUnits: "userSpaceOnUse" })); for (G in w) { G !== "id" && H.push(G, w[G]) } for (G in A) { H.push(A[G]) } H = H.join(","); x[H] ? m = x[H].attr("id") : (w.id = m = "highcharts-" + bX++, x[H] = z = s.createElement(u).attr(w).add(s.defs), z.stops = [], aQ(A, function(I) { I[1].indexOf("rgba") === 0 ? (t = aX(I[1]), B = t.get("rgb"), D = t.get("a")) : (B = I[1], D = 1); I = s.createElement("stop").attr({ offset: I[0], "stop-color": B, "stop-opacity": D }).add(z); z.stops.push(I) })); r.setAttribute(p, "url(" + s.url + "#" + m + ")") } }, applyTextShadow: function(m) { var p = this.element, r, s = m.indexOf("contrast") !== -1, t = this.renderer.forExport || p.style.textShadow !== by && !bV; s && (m = m.replace(/contrast/g, this.renderer.getContrast(p.style.fill))); t ? s && ah(p, { textShadow: m }) : (this.fakeTS = !0, this.ySetter = this.xSetter, r = [].slice.call(p.getElementsByTagName("tspan")), aQ(m.split(/\s?,\s?/g), function(u) { var w = p.firstChild, x, z, u = u.split(" "); x = u[u.length - 1]; (z = u[u.length - 2]) && aQ(r, function(A, B) { var D; B === 0 && (A.setAttribute("x", p.getAttribute("x")), B = p.getAttribute("y"), A.setAttribute("y", B || 0), B === null && p.setAttribute("y", 0)); D = A.cloneNode(1); aL(D, { "class": "highcharts-text-shadow", fill: x, stroke: x, "stroke-opacity": 1 / bs(i(z), 3), "stroke-width": z, "stroke-linejoin": "round" }); p.insertBefore(D, w) }) })) }, attr: function(m, p) { var r, s, t = this.element, u, w = this, x; typeof m === "string" && p !== by && (r = m, m = {}, m[r] = p); if (typeof m === "string") { w = (this[m + "Getter"] || this._defaultGetter).call(this, m, t) } else { for (r in m) { s = m[r]; x = !1; this.symbolName && /^(x|y|width|height|r|start|end|innerR|anchorX|anchorY)/.test(r) && (u || (this.symbolAttr(m), u = !0), x = !0); if (this.rotation && (r === "x" || r === "y")) { this.doTransform = !0 } x || (this[r + "Setter"] || this._defaultSetter).call(this, s, r, t); this.shadows && /^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(r) && this.updateShadows(r, s) } if (this.doTransform) { this.updateTransform(), this.doTransform = !1 } } return w }, updateShadows: function(m, p) { for (var r = this.shadows, s = r.length; s--; ) { r[s].setAttribute(m, m === "height" ? bs(p - (r[s].cutHeight || 0), 0) : m === "d" ? this.d : p) } }, addClass: function(m) { var p = this.element , r = aL(p, "class") || ""; r.indexOf(m) === -1 && aL(p, "class", r + " " + m); return this }, symbolAttr: function(m) { var p = this; aQ("x,y,r,start,end,width,height,innerR,anchorX,anchorY".split(","), function(r) { p[r] = a6(m[r], p[r]) }); p.attr({ d: p.renderer.symbols[p.symbolName](p.x, p.y, p.width, p.height, p) }) }, clip: function(m) { return this.attr("clip-path", m ? "url(" + this.renderer.url + "#" + m.id + ")" : bi) }, crisp: function(m) { var p, r = {}, s, t = m.strokeWidth || this.strokeWidth || 0; s = bO(t) % 2 / 2; m.x = bz(m.x || this.x || 0) + s; m.y = bz(m.y || this.y || 0) + s; m.width = bz((m.width || this.width || 0) - 2 * s); m.height = bz((m.height || this.height || 0) - 2 * s); m.strokeWidth = t; for (p in m) { this[p] !== m[p] && (this[p] = r[p] = m[p]) } return r }, css: function(m) { var p = this.styles, r = {}, s = this.element, t, u, w = ""; t = !p; if (m && m.color) { m.fill = m.color } if (p) { for (u in m) { m[u] !== p[u] && (r[u] = m[u], t = !0) } } if (t) { t = this.textWidth = m && m.width && s.nodeName.toLowerCase() === "text" && i(m.width) || this.textWidth; p && (m = bh(p, r)); this.styles = m; t && (ad || !j && this.renderer.forExport) && delete m.width; if (bV && !j) { ah(this.element, m) } else { p = function(x, z) { return "-" + z.toLowerCase() } ; for (u in m) { w += u.replace(/([A-Z])/g, p) + ":" + m[u] + ";" } aL(s, "style", w) } t && this.added && this.renderer.buildText(this) } return this }, on: function(m, p) { var r = this , s = r.element; f && m === "click" ? (s.ontouchstart = function(t) { r.touchEventFired = e.now(); t.preventDefault(); p.call(s, t) } , s.onclick = function(t) { (l.indexOf("Android") === -1 || e.now() - (r.touchEventFired || 0) > 1100) && p.call(s, t) } ) : s["on" + m] = p; return this }, setRadialReference: function(m) { this.element.radialReference = m; return this }, translate: function(m, p) { return this.attr({ translateX: m, translateY: p }) }, invert: function() { this.inverted = !0; this.updateTransform(); return this }, updateTransform: function() { var m = this.translateX || 0 , p = this.translateY || 0 , r = this.scaleX , s = this.scaleY , t = this.inverted , u = this.rotation , w = this.element; t && (m += this.attr("width"), p += this.attr("height")); m = ["translate(" + m + "," + p + ")"]; t ? m.push("rotate(90) scale(-1,1)") : u && m.push("rotate(" + u + " " + (w.getAttribute("x") || 0) + " " + (w.getAttribute("y") || 0) + ")"); (bn(r) || bn(s)) && m.push("scale(" + a6(r, 1) + " " + a6(s, 1) + ")"); m.length && w.setAttribute("transform", m.join(" ")) }, toFront: function() { var m = this.element; m.parentNode.appendChild(m); return this }, align: function(m, p, r) { var s, t, u, w, x = {}; t = this.renderer; u = t.alignedObjects; if (m) { if (this.alignOptions = m, this.alignByTranslate = p, !r || aa(r)) { this.alignTo = s = r || "renderer", ax(u, this), u.push(this), r = null } } else { m = this.alignOptions, p = this.alignByTranslate, s = this.alignTo } r = a6(r, t[s], t); s = m.align; t = m.verticalAlign; u = (r.x || 0) + (m.x || 0); w = (r.y || 0) + (m.y || 0); if (s === "right" || s === "center") { u += (r.width - (m.width || 0)) / { right: 1, center: 2 }[s] } x[p ? "translateX" : "x"] = bO(u); if (t === "bottom" || t === "middle") { w += (r.height - (m.height || 0)) / ({ bottom: 1, middle: 2 }[t] || 1) } x[p ? "translateY" : "y"] = bO(w); this[this.placed ? "animate" : "attr"](x); this.placed = !0; this.alignAttr = x; return this }, getBBox: function(m) { var p, r = this.renderer, s, t = this.rotation, u = this.element, w = this.styles, x = t * am; s = this.textStr; var z, A = u.style, B, D; s !== by && (D = ["", t || 0, w && w.fontSize, u.style.width].join(","), D = s === "" || a5.test(s) ? "num:" + s.toString().length + D : s + D); D && !m && (p = r.cache[D]); if (!p) { if (u.namespaceURI === v || r.forExport) { try { B = this.fakeTS && function(G) { aQ(u.querySelectorAll(".highcharts-text-shadow"), function(H) { H.style.display = G }) } , aN && A.textShadow ? (z = A.textShadow, A.textShadow = "") : B && B(bi), p = u.getBBox ? bh({}, u.getBBox()) : { width: u.offsetWidth, height: u.offsetHeight }, z ? A.textShadow = z : B && B("") } catch (F) {} if (!p || p.width < 0) { p = { width: 0, height: 0 } } } else { p = this.htmlGetBBox() } if (r.isSVG) { m = p.width; s = p.height; if (bV && w && w.fontSize === "11px" && s.toPrecision(3) === "16.9") { p.height = s = 14 } if (t) { p.width = a1(s * a(x)) + a1(m * bJ(x)), p.height = a1(s * bJ(x)) + a1(m * a(x)) } } r.cache[D] = p } return p }, show: function(m) { m && this.element.namespaceURI === v ? this.element.removeAttribute("visibility") : this.attr({ visibility: m ? "inherit" : "visible" }); return this }, hide: function() { return this.attr({ visibility: "hidden" }) }, fadeOut: function(m) { var p = this; p.animate({ opacity: 0 }, { duration: m || 150, complete: function() { p.attr({ y: -9999 }) } }) }, add: function(m) { var p = this.renderer, r = this.element, s; if (m) { this.parentGroup = m } this.parentInverted = m && m.inverted; this.textStr !== void 0 && p.buildText(this); this.added = !0; if (!m || m.handleZ || this.zIndex) { s = this.zIndexSetter() } s || (m ? m.element : p.box).appendChild(r); if (this.onAdd) { this.onAdd() } return this }, safeRemoveChild: function(m) { var p = m.parentNode; p && p.removeChild(m) }, destroy: function() { var m = this, p = m.element || {}, r = m.shadows, s = m.renderer.isSVG && p.nodeName === "SPAN" && m.parentGroup, t, u; p.onclick = p.onmouseout = p.onmouseover = p.onmousemove = p.point = null; ab(m); if (m.clipPath) { m.clipPath = m.clipPath.destroy() } if (m.stops) { for (u = 0; u < m.stops.length; u++) { m.stops[u] = m.stops[u].destroy() } m.stops = null } m.safeRemoveChild(p); for (r && aQ(r, function(w) { m.safeRemoveChild(w) }); s && s.div && s.div.childNodes.length === 0; ) { p = s.parentGroup, m.safeRemoveChild(s.div), delete s.div, s = p } m.alignTo && ax(m.renderer.alignedObjects, m); for (t in m) { delete m[t] } return null }, shadow: function(m, p, r) { var s = [], t, u, w = this.element, x, z, A, B; if (m) { z = a6(m.width, 3); A = (m.opacity || 0.15) / z; B = this.parentInverted ? "(-1,-1)" : "(" + a6(m.offsetX, 1) + ", " + a6(m.offsetY, 1) + ")"; for (t = 1; t <= z; t++) { u = w.cloneNode(0); x = z * 2 + 1 - 2 * t; aL(u, { isShadow: "true", stroke: m.color || "black", "stroke-opacity": A * t, "stroke-width": x, transform: "translate" + B, fill: bi }); if (r) { aL(u, "height", bs(aL(u, "height") - x, 0)), u.cutHeight = x } p ? p.element.appendChild(u) : w.parentNode.insertBefore(u, w); s.push(u) } this.shadows = s } return this }, xGetter: function(m) { this.element.nodeName === "circle" && (m = { x: "cx", y: "cy" }[m] || m); return this._defaultGetter(m) }, _defaultGetter: function(m) { m = a6(this[m], this.element ? this.element.getAttribute(m) : null, 0); /^[\-0-9\.]+$/.test(m) && (m = parseFloat(m)); return m }, dSetter: function(m, p, r) { m && m.join && (m = m.join(" ")); /(NaN| {2}|^$)/.test(m) && (m = "M 0 0"); r.setAttribute(p, m); this[p] = m }, dashstyleSetter: function(m) { var p; if (m = m && m.toLowerCase()) { m = m.replace("shortdashdotdot", "3,1,1,1,1,1,").replace("shortdashdot", "3,1,1,1").replace("shortdot", "1,1,").replace("shortdash", "3,1,").replace("longdash", "8,3,").replace(/dot/g, "1,3,").replace("dash", "4,3,").replace(/,$/, "").split(","); for (p = m.length; p--; ) { m[p] = i(m[p]) * this["stroke-width"] } m = m.join(",").replace("NaN", "none"); this.element.setAttribute("stroke-dasharray", m) } }, alignSetter: function(m) { this.element.setAttribute("text-anchor", { left: "start", center: "middle", right: "end" }[m]) }, opacitySetter: function(m, p, r) { this[p] = m; r.setAttribute(p, m) }, titleSetter: function(m) { var p = this.element.getElementsByTagName("title")[0]; p || (p = c.createElementNS(v, "title"), this.element.appendChild(p)); p.textContent = String(a6(m), "").replace(/<[^>]*>/g, "") }, textSetter: function(m) { if (m !== this.textStr) { delete this.bBox, this.textStr = m, this.added && this.renderer.buildText(this) } }, fillSetter: function(m, p, r) { typeof m === "string" ? r.setAttribute(p, m) : m && this.colorGradient(m, p, r) }, zIndexSetter: function(m, p) { var r = this.renderer, s = this.parentGroup, r = (s || r).element || r.box, t, u, w = this.element, x; t = this.added; var z; bn(m) && (w.setAttribute(p, m), m = +m, this[p] === m && (t = !1), this[p] = m); if (t) { if ((m = this.zIndex) && s) { s.handleZ = !0 } s = r.childNodes; for (z = 0; z < s.length && !x; z++) { if (t = s[z], u = aL(t, "zIndex"), t !== w && (i(u) > m || !bn(m) && bn(u))) { r.insertBefore(w, t), x = !0 } } x || r.appendChild(w) } return x }, _defaultSetter: function(m, p, r) { r.setAttribute(p, m) } }; aG.prototype.yGetter = aG.prototype.xGetter; aG.prototype.translateXSetter = aG.prototype.translateYSetter = aG.prototype.rotationSetter = aG.prototype.verticalAlignSetter = aG.prototype.scaleXSetter = aG.prototype.scaleYSetter = function(m, p) { this[p] = m; this.doTransform = !0 } ; aG.prototype["stroke-widthSetter"] = aG.prototype.strokeSetter = function(m, p, r) { this[p] = m; if (this.stroke && this["stroke-width"]) { this.strokeWidth = this["stroke-width"], aG.prototype.fillSetter.call(this, this.stroke, "stroke", r), r.setAttribute("stroke-width", this["stroke-width"]), this.hasStroke = !0 } else { if (p === "stroke-width" && m === 0 && this.hasStroke) { r.removeAttribute("stroke"), this.hasStroke = !1 } } } ; var bu = function() { this.init.apply(this, arguments) }; bu.prototype = { Element: aG, init: function(m, p, r, s, t) { var u = location, w, s = this.createElement("svg").attr({ version: "1.1" }).css(this.getStyle(s)); w = s.element; m.appendChild(w); m.innerHTML.indexOf("xmlns") === -1 && aL(w, "xmlns", v); this.isSVG = !0; this.box = w; this.boxWrapper = s; this.alignedObjects = []; this.url = (aN || bS) && c.getElementsByTagName("base").length ? u.href.replace(/#.*?$/, "").replace(/([\('\)])/g, "\\$1").replace(/ /g, "%20") : ""; this.createElement("desc").add().element.appendChild(c.createTextNode("Created with Highcharts 4.1.5")); this.defs = this.createElement("defs").add(); this.forExport = t; this.gradients = {}; this.cache = {}; this.setSize(p, r, !1); var x; if (aN && m.getBoundingClientRect) { this.subPixelFix = p = function() { ah(m, { left: 0, top: 0 }); x = m.getBoundingClientRect(); ah(m, { left: bo(x.left) - x.left + "px", top: bo(x.top) - x.top + "px" }) } , p(), aW(aq, "resize", p) } }, getStyle: function(m) { return this.style = bh({ fontFamily: '"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif', fontSize: "12px" }, m) }, isHidden: function() { return !this.boxWrapper.getBBox().width }, destroy: function() { var m = this.defs; this.box = null; this.boxWrapper = this.boxWrapper.destroy(); be(this.gradients || {}); this.gradients = null; if (m) { this.defs = m.destroy() } this.subPixelFix && bU(aq, "resize", this.subPixelFix); return this.alignedObjects = null }, createElement: function(m) { var p = new this.Element; p.init(this, m); return p }, draw: function() {}, buildText: function(m) { for (var p = m.element, r = this, t = r.forExport, u = a6(m.textStr, "").toString(), w = u.indexOf("<") !== -1, x = p.childNodes, z, A, B = aL(p, "x"), D = m.styles, F = m.textWidth, G = D && D.lineHeight, H = D && D.textShadow, I = D && D.textOverflow === "ellipsis", L = x.length, J = F && !m.added && this.box, s = function(M) { return G ? i(G) : r.fontMetrics(/(px|em)$/.test(M && M.style.fontSize) ? M.style.fontSize : D && D.fontSize || r.style.fontSize || 12, M).h }, K = function(M) { return M.replace(/</g, "<").replace(/>/g, ">") }; L--; ) { p.removeChild(x[L]) } !w && !H && !I && u.indexOf(" ") === -1 ? p.appendChild(c.createTextNode(K(u))) : (z = /<.*style="([^"]+)".*>/, A = /<.*href="(http[^"]+)".*>/, J && J.appendChild(p), u = w ? u.replace(/<(b|strong)>/g, '').replace(/<(i|em)>/g, '').replace(//g, "").split(//g) : [u], u[u.length - 1] === "" && u.pop(), aQ(u, function(M, N) { var O, P = 0, M = M.replace(//g, "|||"); O = M.split("|||"); aQ(O, function(Q) { if (Q !== "" || O.length === 1) { var T = {}, b6 = c.createElementNS(v, "tspan"), U; z.test(Q) && (U = Q.match(z)[1].replace(/(;| |^)color([ :])/, "$1fill$2"), aL(b6, "style", U)); A.test(Q) && !t && (aL(b6, "onclick", 'location.href="' + Q.match(A)[1] + '"'), ah(b6, { cursor: "pointer" })); Q = K(Q.replace(/<(.|\n)*?>/g, "") || " "); if (Q !== " ") { b6.appendChild(c.createTextNode(Q)); if (P) { T.dx = 0 } else { if (N && B !== null) { T.x = B } } aL(b6, T); p.appendChild(b6); !P && N && (!j && t && ah(b6, { display: "block" }), aL(b6, "dy", s(b6))); if (F) { for (var T = Q.replace(/([^\^])-/g, "$1- ").split(" "), R = O.length > 1 || N || T.length > 1 && D.whiteSpace !== "nowrap", X, W, b3, Z = [], Y = s(b6), b5 = 1, V = m.rotation, b7 = Q, b4 = b7.length; (R || I) && (T.length || Z.length); ) { m.rotation = 0, X = m.getBBox(!0), b3 = X.width, !j && r.forExport && (b3 = r.measureSpanWidth(b6.firstChild.data, m.styles)), X = b3 > F, W === void 0 && (W = X), I && W ? (b4 /= 2, b7 === "" || !X && b4 < 0.5 ? T = [] : (X && (W = !0), b7 = Q.substring(0, b7.length + (X ? -1 : 1) * bo(b4)), T = [b7 + "…"], b6.removeChild(b6.firstChild))) : !X || T.length === 1 ? (T = Z, Z = [], T.length && (b5++, b6 = c.createElementNS(v, "tspan"), aL(b6, { dy: Y, x: B }), U && aL(b6, "style", U), p.appendChild(b6)), b3 > F && (F = b3)) : (b6.removeChild(b6.firstChild), Z.unshift(T.pop())), T.length && b6.appendChild(c.createTextNode(T.join(" ").replace(/- /g, "-"))) } W && m.attr("title", m.textStr); m.rotation = V } P++ } } }) }), J && J.removeChild(p), H && m.applyTextShadow && m.applyTextShadow(H)) }, getContrast: function(m) { m = aX(m).rgba; return m[0] + m[1] + m[2] > 384 ? "#000" : "#FFF" }, button: function(m, r, s, t, u, w, x, z, A) { var B = this.label(m, r, s, A, null, null, null, null, "button"), D = 0, F, G, H, J, K, I, m = { x1: 0, y1: 0, x2: 0, y2: 1 }, u = bY({ "stroke-width": 1, stroke: "#CCCCCC", fill: { linearGradient: m, stops: [[0, "#FEFEFE"], [1, "#F6F6F6"]] }, r: 2, padding: 5, style: { color: "black" } }, u); H = u.style; delete u.style; w = bY(u, { stroke: "#68A", fill: { linearGradient: m, stops: [[0, "#FFF"], [1, "#ACF"]] } }, w); J = w.style; delete w.style; x = bY(u, { stroke: "#68A", fill: { linearGradient: m, stops: [[0, "#9BD"], [1, "#CDF"]] } }, x); K = x.style; delete x.style; z = bY(u, { style: { color: "#CCC" } }, z); I = z.style; delete z.style; aW(B.element, bV ? "mouseover" : "mouseenter", function() { D !== 3 && B.attr(w).css(J) }); aW(B.element, bV ? "mouseout" : "mouseleave", function() { D !== 3 && (F = [u, w, x][D], G = [H, J, K][D], B.attr(F).css(G)) }); B.setState = function(p) { (B.state = D = p) ? p === 2 ? B.attr(x).css(K) : p === 3 && B.attr(z).css(I) : B.attr(u).css(H) } ; return B.on("click", function() { D !== 3 && t.call(B) }).attr(u).css(bh({ cursor: "default" }, H)) }, crispLine: function(m, p) { m[1] === m[4] && (m[1] = m[4] = bO(m[1]) - p % 2 / 2); m[2] === m[5] && (m[2] = m[5] = bO(m[2]) + p % 2 / 2); return m }, path: function(m) { var p = { fill: bi }; at(m) ? p.d = m : q(m) && bh(p, m); return this.createElement("path").attr(p) }, circle: function(m, p, r) { m = q(m) ? m : { x: m, y: p, r: r }; p = this.createElement("circle"); p.xSetter = function(s) { this.element.setAttribute("cx", s) } ; p.ySetter = function(s) { this.element.setAttribute("cy", s) } ; return p.attr(m) }, arc: function(m, p, r, s, t, u) { if (q(m)) { p = m.y, r = m.r, s = m.innerR, t = m.start, u = m.end, m = m.x } m = this.symbol("arc", m || 0, p || 0, r || 0, r || 0, { innerR: s || 0, start: t || 0, end: u || 0 }); m.r = r; return m }, rect: function(m, p, r, s, t, u) { var t = q(m) ? m.r : t , w = this.createElement("rect") , m = q(m) ? m : m === by ? {} : { x: m, y: p, width: bs(r, 0), height: bs(s, 0) }; if (u !== by) { m.strokeWidth = u, m = w.crisp(m) } if (t) { m.r = t } w.rSetter = function(x) { aL(this.element, { rx: x, ry: x }) } ; return w.attr(m) }, setSize: function(m, p, r) { var s = this.alignedObjects , t = s.length; this.width = m; this.height = p; for (this.boxWrapper[a6(r, !0) ? "animate" : "attr"]({ width: m, height: p }); t--; ) { s[t].align() } }, g: function(m) { var p = this.createElement("g"); return bn(m) ? p.attr({ "class": "highcharts-" + m }) : p }, image: function(m, p, r, s, t) { var u = { preserveAspectRatio: bi }; arguments.length > 1 && bh(u, { x: p, y: r, width: s, height: t }); u = this.createElement("image").attr(u); u.element.setAttributeNS ? u.element.setAttributeNS("http://www.w3.org/1999/xlink", "href", m) : u.element.setAttribute("hc-svg-href", m); return u }, symbol: function(m, p, r, s, t, u) { var w, x = this.symbols[m], x = x && x(bO(p), bO(r), s, t, u), z = /^url\((.*?)\)$/, A, B; if (x) { w = this.path(x), bh(w, { symbolName: m, x: p, y: r, width: s, height: t }), u && bh(w, u) } else { if (z.test(m)) { B = function(D, F) { D.element && (D.attr({ width: F[0], height: F[1] }), D.alignByTranslate || D.translate(bO((s - F[0]) / 2), bO((t - F[1]) / 2))) } , A = m.match(z)[1], m = aK[A] || u && u.width && u.height && [u.width, u.height], w = this.image(A).attr({ x: p, y: r }), w.isImg = !0, m ? B(w, m) : (w.attr({ width: 0, height: 0 }), bZ("img", { onload: function() { B(w, aK[A] = [this.width, this.height]) }, src: A })) } } return w }, symbols: { circle: function(m, p, r, s) { var t = 0.166 * r; return ["M", m + r / 2, p, "C", m + r + t, p, m + r + t, p + s, m + r / 2, p + s, "C", m - t, p + s, m - t, p, m + r / 2, p, "Z"] }, square: function(m, p, r, s) { return ["M", m, p, "L", m + r, p, m + r, p + s, m, p + s, "Z"] }, triangle: function(m, p, r, s) { return ["M", m + r / 2, p, "L", m + r, p + s, m, p + s, "Z"] }, "triangle-down": function(m, p, r, s) { return ["M", m, p, "L", m + r, p, m + r / 2, p + s, "Z"] }, diamond: function(m, p, r, s) { return ["M", m + r / 2, p, "L", m + r, p + s / 2, m + r / 2, p + s, m, p + s / 2, "Z"] }, arc: function(m, p, r, s, t) { var u = t.start , r = t.r || r || s , w = t.end - 0.001 , s = t.innerR , x = t.open , z = bJ(u) , A = a(u) , B = bJ(w) , w = a(w) , t = t.end - u < aM ? 0 : 1; return ["M", m + r * z, p + r * A, "A", r, r, 0, t, 1, m + r * B, p + r * w, x ? "M" : "L", m + s * B, p + s * w, "A", s, s, 0, t, 0, m + s * z, p + s * A, x ? "" : "Z"] }, callout: function(m, p, r, s, t) { var u = aw(t && t.r || 0, r, s) , w = u + 6 , x = t && t.anchorX , z = t && t.anchorY , t = bO(t.strokeWidth || 0) % 2 / 2; m += t; p += t; t = ["M", m + u, p, "L", m + r - u, p, "C", m + r, p, m + r, p, m + r, p + u, "L", m + r, p + s - u, "C", m + r, p + s, m + r, p + s, m + r - u, p + s, "L", m + u, p + s, "C", m, p + s, m, p + s, m, p + s - u, "L", m, p + u, "C", m, p, m, p, m + u, p]; x && x > r && z > p + w && z < p + s - w ? t.splice(13, 3, "L", m + r, z - 6, m + r + 6, z, m + r, z + 6, m + r, p + s - u) : x && x < 0 && z > p + w && z < p + s - w ? t.splice(33, 3, "L", m, z + 6, m - 6, z, m, z - 6, m, p + u) : z && z > s && x > m + w && x < m + r - w ? t.splice(23, 3, "L", x + 6, p + s, x, p + s + 6, x - 6, p + s, m + u, p + s) : z && z < 0 && x > m + w && x < m + r - w && t.splice(3, 3, "L", x - 6, p, x, p - 6, x + 6, p, r - u, p); return t } }, clipRect: function(m, p, r, s) { var t = "highcharts-" + bX++ , u = this.createElement("clipPath").attr({ id: t }).add(this.defs) , m = this.rect(m, p, r, s, 0).add(u); m.id = t; m.clipPath = u; m.count = 0; return m }, text: function(m, p, r, s) { var t = ad || !j && this.forExport , u = {}; if (s && !this.forExport) { return this.html(m, p, r) } u.x = Math.round(p || 0); if (r) { u.y = Math.round(r) } if (m || m === 0) { u.text = m } m = this.createElement("text").attr(u); t && m.css({ position: "absolute" }); if (!s) { m.xSetter = function(w, x, z) { var A = z.getElementsByTagName("tspan"), B, D = z.getAttribute(x), F; for (F = 0; F < A.length; F++) { B = A[F], B.getAttribute(x) === D && B.setAttribute(x, w) } z.setAttribute(x, w) } } return m }, fontMetrics: function(m, p) { m = m || this.style.fontSize; if (p && aq.getComputedStyle) { p = p.element || p, m = aq.getComputedStyle(p, "").fontSize } var m = /px/.test(m) ? i(m) : /em/.test(m) ? parseFloat(m) * 12 : 12 , r = m < 24 ? m + 3 : bO(m * 1.2) , s = bO(r * 0.8); return { h: r, b: s, f: m } }, rotCorr: function(m, p, r) { var s = m; p && r && (s = bs(s * bJ(p * am), 4)); return { x: -m / 3 * a(p * am), y: s } }, label: function(m, s, x, F, J, L, N, P, Q) { function T() { var p, t; p = Z.element.style; Y = (M === void 0 || b3 === void 0 || X.styles.textAlign) && bn(Z.textStr) && Z.getBBox(); X.width = (M || Y.width || 0) + 2 * b5 + b4; X.height = (b3 || Y.height || 0) + 2 * b5; R = b5 + W.fontMetrics(p && p.fontSize, Z).b; if (H) { if (!b7) { p = bO(-z * b5), t = P ? -R : 0, X.box = b7 = F ? W.symbol(F, p, t, X.width, X.height, K) : W.rect(p, t, X.width, X.height, 0, K[bb]), b7.attr("fill", bi).add(X) } b7.isImg || b7.attr(bh({ width: bO(X.width), height: bO(X.height) }, K)); K = null } } function U() { var p = X.styles, p = p && p.textAlign, t = b4 + b5 * (1 - z), w; w = P ? 0 : R; if (bn(M) && Y && (p === "center" || p === "right")) { t += { center: 0.5, right: 1 }[p] * (M - Y.width) } if (t !== Z.x || w !== Z.y) { Z.attr("x", t), w !== by && Z.attr(Z.element.nodeName === "SPAN" ? "y" : "translateY", w) } Z.x = t; Z.y = w } function V(p, t) { b7 ? b7.attr(p, t) : K[p] = t } var W = this, X = W.g(Q), Z = W.text("", 0, 0, N).attr({ zIndex: 1 }), b7, Y, z = 0, b5 = 3, b4 = 0, M, b3, b6, r, u = 0, K = {}, R, H; X.onAdd = function() { Z.add(X); X.attr({ text: m || m === 0 ? m : "", x: s, y: x }); b7 && bn(J) && X.attr({ anchorX: J, anchorY: L }) } ; X.widthSetter = function(p) { M = p } ; X.heightSetter = function(p) { b3 = p } ; X.paddingSetter = function(p) { if (bn(p) && p !== b5) { b5 = X.padding = p, U() } } ; X.paddingLeftSetter = function(p) { bn(p) && p !== b4 && (b4 = p, U()) } ; X.alignSetter = function(p) { z = { left: 0, center: 0.5, right: 1 }[p] } ; X.textSetter = function(p) { p !== by && Z.textSetter(p); T(); U() } ; X["stroke-widthSetter"] = function(p, t) { p && (H = !0); u = p % 2 / 2; V(t, p) } ; X.strokeSetter = X.fillSetter = X.rSetter = function(p, t) { t === "fill" && p && (H = !0); V(t, p) } ; X.anchorXSetter = function(p, t) { J = p; V(t, p + u - b6) } ; X.anchorYSetter = function(p, t) { L = p; V(t, p - r) } ; X.xSetter = function(p) { X.x = p; z && (p -= z * ((M || Y.width) + b5)); b6 = bO(p); X.attr("translateX", b6) } ; X.ySetter = function(p) { r = X.y = bO(p); X.attr("translateY", r) } ; var O = X.css; return bh(X, { css: function(p) { if (p) { var t = {} , p = bY(p); aQ(X.textProps, function(w) { p[w] !== by && (t[w] = p[w], delete p[w]) }); Z.css(t) } return O.call(X, p) }, getBBox: function() { return { width: Y.width + 2 * b5, height: Y.height + 2 * b5, x: Y.x - b5, y: Y.y - b5 } }, shadow: function(p) { b7 && b7.shadow(p); return X }, destroy: function() { bU(X.element, "mouseenter"); bU(X.element, "mouseleave"); Z && (Z = Z.destroy()); b7 && (b7 = b7.destroy()); aG.prototype.destroy.call(X); X = W = T = U = V = null } }) } }; b = bu; bh(aG.prototype, { htmlCss: function(m) { var p = this.element; if (p = m && p.tagName === "SPAN" && m.width) { delete m.width, this.textWidth = p, this.updateTransform() } if (m && m.textOverflow === "ellipsis") { m.whiteSpace = "nowrap", m.overflow = "hidden" } this.styles = bh(this.styles, m); ah(this.element, m); return this }, htmlGetBBox: function() { var m = this.element; if (m.nodeName === "text") { m.style.position = "absolute" } return { x: m.offsetLeft, y: m.offsetTop, width: m.offsetWidth, height: m.offsetHeight } }, htmlUpdateTransform: function() { if (this.added) { var m = this.renderer , p = this.element , r = this.translateX || 0 , s = this.translateY || 0 , t = this.x || 0 , u = this.y || 0 , w = this.textAlign || "left" , x = { left: 0, center: 0.5, right: 1 }[w] , z = this.shadows , A = this.styles; ah(p, { marginLeft: r, marginTop: s }); z && aQ(z, function(H) { ah(H, { marginLeft: r + 1, marginTop: s + 1 }) }); this.inverted && aQ(p.childNodes, function(H) { m.invertChild(H, p) }); if (p.tagName === "SPAN") { var B = this.rotation, D, F = i(this.textWidth), G = [B, w, p.innerHTML, this.textWidth].join(","); if (G !== this.cTT) { D = m.fontMetrics(p.style.fontSize).b; bn(B) && this.setSpanRotation(B, x, D); z = a6(this.elemWidth, p.offsetWidth); if (z > F && /[ \-]/.test(p.textContent || p.innerText)) { ah(p, { width: F + "px", display: "block", whiteSpace: A && A.whiteSpace || "normal" }), z = F } this.getSpanCorrection(z, D, x, B, w) } ah(p, { left: t + (this.xCorr || 0) + "px", top: u + (this.yCorr || 0) + "px" }); if (bS) { D = p.offsetHeight } this.cTT = G } } else { this.alignOnAdd = !0 } }, setSpanRotation: function(m, p, r) { var s = {} , t = bV ? "-ms-transform" : bS ? "-webkit-transform" : aN ? "MozTransform" : aA ? "-o-transform" : ""; s[t] = s.transform = "rotate(" + m + "deg)"; s[t + (aN ? "Origin" : "-origin")] = s.transformOrigin = p * 100 + "% " + r + "px"; ah(this.element, s) }, getSpanCorrection: function(m, p, r) { this.xCorr = -m * r; this.yCorr = -p } }); bh(bu.prototype, { html: function(m, p, r) { var s = this.createElement("span") , t = s.element , u = s.renderer; s.textSetter = function(w) { w !== t.innerHTML && delete this.bBox; t.innerHTML = this.textStr = w } ; s.xSetter = s.ySetter = s.alignSetter = s.rotationSetter = function(w, x) { x === "align" && (x = "textAlign"); s[x] = w; s.htmlUpdateTransform() } ; s.attr({ text: m, x: bO(p), y: bO(r) }).css({ position: "absolute", fontFamily: this.style.fontFamily, fontSize: this.style.fontSize }); t.style.whiteSpace = "nowrap"; s.css = s.htmlCss; if (u.isSVG) { s.add = function(w) { var x, z = u.box.parentNode, A = []; if (this.parentGroup = w) { if (x = w.div, !x) { for (; w; ) { A.push(w), w = w.parentGroup } aQ(A.reverse(), function(B) { var D; x = B.div = B.div || bZ(aI, { className: aL(B.element, "class") }, { position: "absolute", left: (B.translateX || 0) + "px", top: (B.translateY || 0) + "px" }, x || z); D = x.style; bh(B, { translateXSetter: function(F, G) { D.left = F + "px"; B[G] = F; B.doTransform = !0 }, translateYSetter: function(F, G) { D.top = F + "px"; B[G] = F; B.doTransform = !0 }, visibilitySetter: function(F, G) { D[G] = F } }) }) } } else { x = z } x.appendChild(t); s.added = !0; s.alignOnAdd && s.htmlUpdateTransform(); return s } } return s } }); if (!j && !ad) { E = { init: function(m, p) { var r = ["<", p, ' filled="f" stroked="f"'] , s = ["position: ", "absolute", ";"] , t = p === aI; (p === "shape" || t) && s.push("left:0;top:0;width:1px;height:1px;"); s.push("visibility: ", t ? "hidden" : "visible"); r.push(' style="', s.join(""), '"/>'); if (p) { r = t || p === "span" || p === "img" ? r.join("") : m.prepVML(r), this.element = bZ(r) } this.renderer = m }, add: function(m) { var p = this.renderer , r = this.element , s = p.box , s = m ? m.element || m : s; m && m.inverted && p.invertChild(r, s); s.appendChild(r); this.added = !0; this.alignOnAdd && !this.deferUpdateTransform && this.updateTransform(); if (this.onAdd) { this.onAdd() } return this }, updateTransform: aG.prototype.htmlUpdateTransform, setSpanRotation: function() { var m = this.rotation , p = bJ(m * am) , r = a(m * am); ah(this.element, { filter: m ? ["progid:DXImageTransform.Microsoft.Matrix(M11=", p, ", M12=", -r, ", M21=", r, ", M22=", p, ", sizingMethod='auto expand')"].join("") : bi }) }, getSpanCorrection: function(m, p, r, s, t) { var u = s ? bJ(s * am) : 1, w = s ? a(s * am) : 0, x = a6(this.elemHeight, this.element.offsetHeight), z; this.xCorr = u < 0 && -m; this.yCorr = w < 0 && -x; z = u * w < 0; this.xCorr += w * p * (z ? 1 - r : r); this.yCorr -= u * p * (s ? z ? r : 1 - r : 1); t && t !== "left" && (this.xCorr -= m * r * (u < 0 ? -1 : 1), s && (this.yCorr -= x * r * (w < 0 ? -1 : 1)), ah(this.element, { textAlign: t })) }, pathToVML: function(m) { for (var p = m.length, r = []; p--; ) { if (bd(m[p])) { r[p] = bO(m[p] * 10) - 5 } else { if (m[p] === "Z") { r[p] = "x" } else { if (r[p] = m[p], m.isArc && (m[p] === "wa" || m[p] === "at")) { r[p + 5] === r[p + 7] && (r[p + 7] += m[p + 7] > m[p + 5] ? 1 : -1), r[p + 6] === r[p + 8] && (r[p + 8] += m[p + 8] > m[p + 6] ? 1 : -1) } } } } return r.join(" ") || "x" }, clip: function(m) { var p = this, r; m ? (r = m.members, ax(r, p), r.push(p), p.destroyClip = function() { ax(r, p) } , m = m.getCSS(p)) : (p.destroyClip && p.destroyClip(), m = { clip: au ? "inherit" : "rect(auto)" }); return p.css(m) }, css: aG.prototype.htmlCss, safeRemoveChild: function(m) { m.parentNode && bk(m) }, destroy: function() { this.destroyClip && this.destroyClip(); return aG.prototype.destroy.apply(this) }, on: function(m, p) { this.element["on" + m] = function() { var r = aq.event; r.target = r.srcElement; p(r) } ; return this }, cutOffPath: function(m, p) { var r, m = m.split(/[ ,]/); r = m.length; if (r === 9 || r === 11) { m[r - 4] = m[r - 2] = i(m[r - 2]) - 10 * p } return m.join(" ") }, shadow: function(m, p, r) { var s = [], t, u = this.element, w = this.renderer, x, z = u.style, A, B = u.path, D, F, G, H; B && typeof B.value !== "string" && (B = "x"); F = B; if (m) { G = a6(m.width, 3); H = (m.opacity || 0.15) / G; for (t = 1; t <= 3; t++) { D = G * 2 + 1 - 2 * t; r && (F = this.cutOffPath(B.value, D + 0.5)); A = ['']; x = bZ(w.prepVML(A), null, { left: i(z.left) + a6(m.offsetX, 1), top: i(z.top) + a6(m.offsetY, 1) }); if (r) { x.cutOff = D + 1 } A = ['']; bZ(w.prepVML(A), null, null, x); p ? p.element.appendChild(x) : u.parentNode.insertBefore(x, u); s.push(x) } this.shadows = s } return this }, updateShadows: aS, setAttr: function(m, p) { au ? this.element[m] = p : this.element.setAttribute(m, p) }, classSetter: function(m) { this.element.className = m }, dashstyleSetter: function(m, p, r) { (r.getElementsByTagName("stroke")[0] || bZ(this.renderer.prepVML([""]), null, null, r))[p] = m || "solid"; this[p] = m }, dSetter: function(m, p, r) { var s = this.shadows , m = m || []; this.d = m.join && m.join(" "); r.path = m = this.pathToVML(m); if (s) { for (r = s.length; r--; ) { s[r].path = s[r].cutOff ? this.cutOffPath(m, s[r].cutOff) : m } } this.setAttr(p, m) }, fillSetter: function(m, p, r) { var s = r.nodeName; if (s === "SPAN") { r.style.color = m } else { if (s !== "IMG") { r.filled = m !== bi, this.setAttr("fillcolor", this.renderer.color(m, r, p, this)) } } }, opacitySetter: aS, rotationSetter: function(m, p, r) { r = r.style; this[p] = r[p] = m; r.left = -bO(a(m * am) + 1) + "px"; r.top = bO(bJ(m * am)) + "px" }, strokeSetter: function(m, p, r) { this.setAttr("strokecolor", this.renderer.color(m, r, p)) }, "stroke-widthSetter": function(m, p, r) { r.stroked = !!m; this[p] = m; bd(m) && (m += "px"); this.setAttr("strokeweight", m) }, titleSetter: function(m, p) { this.setAttr(p, m) }, visibilitySetter: function(m, p, r) { m === "inherit" && (m = "visible"); this.shadows && aQ(this.shadows, function(s) { s.style[p] = m }); r.nodeName === "DIV" && (m = m === "hidden" ? "-999em" : 0, au || (r.style[p] = m ? "visible" : "hidden"), p = "top"); r.style[p] = m }, xSetter: function(m, p, r) { this[p] = m; p === "x" ? p = "left" : p === "y" && (p = "top"); this.updateClipping ? (this[p] = m, this.updateClipping()) : r.style[p] = m }, zIndexSetter: function(m, p, r) { r.style[p] = m } }; bI.VMLElement = E = aC(aG, E); E.prototype.ySetter = E.prototype.widthSetter = E.prototype.heightSetter = E.prototype.xSetter; var aY = { Element: E, isIE8: l.indexOf("MSIE 8.0") > -1, init: function(m, p, r, s) { var t; this.alignedObjects = []; s = this.createElement(aI).css(bh(this.getStyle(s), { position: "relative" })); t = s.element; m.appendChild(s.element); this.isVML = !0; this.box = t; this.boxWrapper = s; this.cache = {}; this.setSize(p, r, !1); if (!c.namespaces.hcv) { c.namespaces.add("hcv", "urn:schemas-microsoft-com:vml"); try { c.createStyleSheet().cssText = "hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } " } catch (u) { c.styleSheets[0].cssText += "hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } " } } }, isHidden: function() { return !this.box.offsetWidth }, clipRect: function(m, p, r, s) { var t = this.createElement() , u = q(m); return bh(t, { members: [], count: 0, left: (u ? m.x : m) + 1, top: (u ? m.y : p) + 1, width: (u ? m.width : r) - 1, height: (u ? m.height : s) - 1, getCSS: function(w) { var x = w.element , z = x.nodeName , w = w.inverted , A = this.top - (z === "shape" ? x.offsetTop : 0) , B = this.left , x = B + this.width , D = A + this.height , A = { clip: "rect(" + bO(w ? B : A) + "px," + bO(w ? D : x) + "px," + bO(w ? x : D) + "px," + bO(w ? A : B) + "px)" }; !w && au && z === "DIV" && bh(A, { width: x + "px", height: D + "px" }); return A }, updateClipping: function() { aQ(t.members, function(w) { w.element && w.css(t.getCSS(w)) }) } }) }, color: function(m, A, B, F) { var G = this, I, K = /^rgba/, L, M, N = bi; m && m.linearGradient ? M = "gradient" : m && m.radialGradient && (M = "pattern"); if (M) { var O, P, Q = m.linearGradient || m.radialGradient, R, U, b5, T, D, Z = "", m = m.stops, W, J = [], X = function() { L = ['']; bZ(G.prepVML(L), null, null, A) }; R = m[0]; W = m[m.length - 1]; R[0] > 0 && m.unshift([0, R[1]]); W[0] < 1 && m.push([1, W[1]]); aQ(m, function(p, r) { K.test(p[1]) ? (I = aX(p[1]), O = I.get("rgb"), P = I.get("a")) : (O = p[1], P = 1); J.push(p[0] * 100 + "% " + O); r ? (b5 = P, T = O) : (U = P, D = O) }); if (B === "fill") { if (M === "gradient") { B = Q.x1 || Q[0] || 0, m = Q.y1 || Q[1] || 0, R = Q.x2 || Q[2] || 0, Q = Q.y2 || Q[3] || 0, Z = 'angle="' + (90 - bD.atan((Q - m) / (R - B)) * 180 / aM) + '"', X() } else { var N = Q.r, Y = N * 2, b4 = N * 2, V = Q.cx, H = Q.cy, b6 = A.radialReference, b3, N = function() { b6 && (b3 = F.getBBox(), V += (b6[0] - b3.x) / b3.width - 0.5, H += (b6[1] - b3.y) / b3.height - 0.5, Y *= b6[2] / b3.width, b4 *= b6[2] / b3.height); Z = 'src="' + a7.global.VMLRadialGradientURL + '" size="' + Y + "," + b4 + '" origin="0.5,0.5" position="' + V + "," + H + '" color2="' + D + '" '; X() }; F.added ? N() : F.onAdd = N; N = T } } else { N = O } } else { if (K.test(m) && A.tagName !== "IMG") { I = aX(m), L = ["<", B, ' opacity="', I.get("a"), '"/>'], bZ(this.prepVML(L), null, null, A), N = I.get("rgb") } else { N = A.getElementsByTagName(B); if (N.length) { N[0].opacity = 1, N[0].type = "solid" } N = m } } return N }, prepVML: function(m) { var p = this.isIE8 , m = m.join(""); p ? (m = m.replace("/>", ' xmlns="urn:schemas-microsoft-com:vml" />'), m = m.indexOf('style="') === -1 ? m.replace("/>", ' style="display:inline-block;behavior:url(#default#VML);" />') : m.replace('style="', 'style="display:inline-block;behavior:url(#default#VML);')) : m = m.replace("<", " 1 && u.attr({ x: p, y: r, width: s, height: t }); return u }, createElement: function(m) { return m === "rect" ? this.symbol(m) : bu.prototype.createElement.call(this, m) }, invertChild: function(m, p) { var r = this , s = p.style , t = m.tagName === "IMG" && m.style; ah(m, { flip: "x", left: i(s.width) - (t ? i(t.top) : 1), top: i(s.height) - (t ? i(t.left) : 1), rotation: -90 }); aQ(m.childNodes, function(u) { r.invertChild(u, m) }) }, symbols: { arc: function(m, p, r, s, t) { var u = t.start , w = t.end , x = t.r || r || s , r = t.innerR , s = bJ(u) , z = a(u) , A = bJ(w) , B = a(w); if (w - u === 0) { return ["x"] } u = ["wa", m - x, p - x, m + x, p + x, m + x * s, p + x * z, m + x * A, p + x * B]; t.open && !r && u.push("e", "M", m, p); u.push("at", m - r, p - r, m + r, p + r, m + r * A, p + r * B, m + r * s, p + r * z, "x", "e"); u.isArc = !0; return u }, circle: function(m, p, r, s, t) { t && (r = s = 2 * t.r); t && t.isCircle && (m -= r / 2, p -= s / 2); return ["wa", m, p, m + r, p + s, m + r, p + s / 2, m + r, p + s / 2, "e"] }, rect: function(m, p, r, s, t) { return bu.prototype.symbols[!bn(t) || !t.r ? "square" : "callout"].call(0, m, p, r, s, t) } } }; bI.VMLRenderer = E = function() { this.init.apply(this, arguments) } ; E.prototype = bY(bu.prototype, aY); b = E } bu.prototype.measureSpanWidth = function(m, p) { var r = c.createElement("span"), s; s = c.createTextNode(m); r.appendChild(s); ah(r, p); this.box.appendChild(r); s = r.offsetWidth; bk(r); return s } ; var aP; if (ad) { bI.CanVGRenderer = E = function() { v = "http://www.w3.org/1999/xhtml" } , E.prototype.symbols = {}, aP = function() { function m() { var r = p.length, s; for (s = 0; s < r; s++) { p[s]() } p = [] } var p = []; return { push: function(r, s) { p.length === 0 && bg(s, m); p.push(r) } } }(), b = E } bv.prototype = { addLabel: function() { var m = this.axis, p = m.options, r = m.chart, s = m.categories, t = m.names, u = this.pos, w = p.labels, x = m.tickPositions, z = u === x[0], A = u === x[x.length - 1], t = s ? a6(s[u], t[u], u) : u, s = this.label, x = x.info, B; m.isDatetimeAxis && x && (B = p.dateTimeLabelFormats[x.higherRanks[u] || x.unitName]); this.isFirst = z; this.isLast = A; p = m.labelFormatter.call({ axis: m, chart: r, isFirst: z, isLast: A, dateTimeLabelFormat: B, value: m.isLog ? S(ar(t)) : t }); bn(s) ? s && s.attr({ text: p }) : (this.labelLength = (this.label = s = bn(p) && w.enabled ? r.renderer.text(p, 0, 0, w.useHTML).css(bY(w.style)).add(m.labelGroup) : null) && s.getBBox().width, this.rotation = 0) }, getLabelSize: function() { return this.label ? this.label.getBBox()[this.axis.horiz ? "height" : "width"] : 0 }, handleOverflow: function(m) { var p = this.axis, r = m.x, s = p.chart.chartWidth, t = p.chart.spacing, u = a6(p.labelLeft, t[3]), t = a6(p.labelRight, s - t[1]), w = this.label, x = this.rotation, z = { left: 0, center: 0.5, right: 1 }[p.labelAlign], A = w.getBBox().width, B = p.slotWidth, D; if (x) { x < 0 && r - z * A < u ? D = bO(r / bJ(x * am) - u) : x > 0 && r + z * A > t && (D = bO((s - r) / bJ(x * am))) } else { s = r - z * A; r += z * A; if (s < u) { B -= u - s, m.x = u, w.attr({ align: "left" }) } else { if (r > t) { B -= r - t, m.x = t, w.attr({ align: "right" }) } } if (A > B || p.autoRotation && w.styles.width) { D = B } } D && w.css({ width: D, textOverflow: "ellipsis" }) }, getPosition: function(m, p, r, s) { var t = this.axis , u = t.chart , w = s && u.oldChartHeight || u.chartHeight; return { x: m ? t.translate(p + r, null, null, s) + t.transB : t.left + t.offset + (t.opposite ? (s && u.oldChartWidth || u.chartWidth) - t.right - t.left : 0), y: m ? w - t.bottom + t.offset - (t.opposite ? t.height : 0) : w - t.translate(p + r, null, null, s) - t.transB } }, getLabelPosition: function(m, p, r, s, t, u, w, x) { var z = this.axis , A = z.transA , B = z.reversed , D = z.staggerLines , F = z.tickRotCorr || { x: 0, y: 0 } , r = a6(t.y, F.y + (z.side === 2 ? 8 : -(r.getBBox().height / 2))) , m = m + t.x + F.x - (u && s ? u * A * (B ? -1 : 1) : 0) , p = p + r - (u && !s ? u * A * (B ? 1 : -1) : 0); D && (p += w / (x || 1) % D * (z.labelOffset / D)); return { x: m, y: bO(p) } }, getMarkPath: function(m, p, r, s, t, u) { return u.crispLine(["M", m, p, "L", m + (t ? 0 : -r), p + (t ? r : 0)], s) }, render: function(p, u, A) { var D = this.axis , F = D.options , G = D.chart.renderer , I = D.horiz , J = this.type , K = this.label , L = this.pos , M = F.labels , N = this.gridLine , P = J ? J + "Grid" : "grid" , Q = J ? J + "Tick" : "tick" , R = F[P + "LineWidth"] , Z = F[P + "LineColor"] , O = F[P + "LineDashStyle"] , B = F[Q + "Length"] , P = F[Q + "Width"] || 0 , W = F[Q + "Color"] , U = F[Q + "Position"] , Q = this.mark , H = M.step , V = !0 , Y = D.tickmarkOffset , T = this.getPosition(I, L, Y, u) , X = T.x , T = T.y , b3 = I && X === D.pos + D.len || !I && T === D.pos ? -1 : 1 , A = a6(A, 1); this.isActive = !0; if (R) { L = D.getPlotLinePath(L + Y, R * b3, u, !0); if (N === by) { N = { stroke: Z, "stroke-width": R }; if (O) { N.dashstyle = O } if (!J) { N.zIndex = 1 } if (u) { N.opacity = 0 } this.gridLine = N = R ? G.path(L).attr(N).add(D.gridGroup) : null } if (!u && N && L) { N[this.isNew ? "attr" : "animate"]({ d: L, opacity: A }) } } if (P && B) { U === "inside" && (B = -B), D.opposite && (B = -B), J = this.getMarkPath(X, T, B, P * b3, I, G), Q ? Q.animate({ d: J, opacity: A }) : this.mark = G.path(J).attr({ stroke: W, "stroke-width": P, opacity: A }).add(D.axisGroup) } if (K && !isNaN(X)) { K.xy = T = this.getLabelPosition(X, T, K, I, M, Y, p, H), this.isFirst && !this.isLast && !a6(F.showFirstLabel, 1) || this.isLast && !this.isFirst && !a6(F.showLastLabel, 1) ? V = !1 : I && !D.isRadial && !M.step && !M.rotation && !u && A !== 0 && this.handleOverflow(T), H && p % H && (V = !1), V && !isNaN(T.y) ? (T.opacity = A, K[this.isNew ? "attr" : "animate"](T), this.isNew = !1) : K.attr("y", -9999) } }, destroy: function() { be(this, this.axis) } }; bI.PlotLineOrBand = function(m, p) { this.axis = m; if (p) { this.options = p, this.id = p.id } } ; bI.PlotLineOrBand.prototype = { render: function() { var r = this, s = r.axis, u = s.horiz, w = r.options, x = w.label, z = r.label, A = w.width, B = w.to, D = w.from, F = bn(D) && bn(B), G = w.value, H = w.dashStyle, J = r.svgElem, K = [], M, P = w.color, L = w.zIndex, I = w.events, O = {}, N = s.chart.renderer; s.isLog && (D = ae(D), B = ae(B), G = ae(G)); if (A) { if (K = s.getPlotLinePath(G, A), O = { stroke: P, "stroke-width": A }, H) { O.dashstyle = H } } else { if (F) { K = s.getPlotBandPath(D, B, w); if (P) { O.fill = P } if (w.borderWidth) { O.stroke = w.borderColor, O["stroke-width"] = w.borderWidth } } else { return } } if (bn(L)) { O.zIndex = L } if (J) { if (K) { J.animate({ d: K }, null, J.onGetPath) } else { if (J.hide(), J.onGetPath = function() { J.show() } , z) { r.label = z = z.destroy() } } } else { if (K && K.length && (r.svgElem = J = N.path(K).attr(O).add(), I)) { for (M in w = function(m) { J.on(m, function(p) { I[m].apply(r, [p]) }) } , I) { w(M) } } } if (x && bn(x.text) && K && K.length && s.width > 0 && s.height > 0) { x = bY({ align: u && F && "center", x: u ? !F && 4 : 10, verticalAlign: !u && F && "middle", y: u ? F ? 16 : 10 : F ? 6 : -4, rotation: u && !F && 90 }, x); if (!z) { O = { align: x.textAlign || x.align, rotation: x.rotation }; if (bn(L)) { O.zIndex = L } r.label = z = N.text(x.text, 0, 0, x.useHTML).attr(O).css(x.style).add() } s = [K[1], K[4], F ? K[6] : K[1]]; F = [K[2], K[5], F ? K[7] : K[2]]; K = a9(s); u = a9(F); z.align(x, !1, { x: K, y: u, width: ai(s) - K, height: ai(F) - u }); z.show() } else { z && z.hide() } return r }, destroy: function() { ax(this.axis.plotLinesAndBands, this); delete this.axis; be(this) } }; var bE = bI.Axis = function() { this.init.apply(this, arguments) } ; bE.prototype = { defaultOptions: { dateTimeLabelFormats: { millisecond: "%H:%M:%S.%L", second: "%H:%M:%S", minute: "%H:%M", hour: "%H:%M", day: "%e. %b", week: "%e. %b", month: "%b '%y", year: "%Y" }, endOnTick: !1, gridLineColor: "#D8D8D8", labels: { enabled: !0, style: { color: "#606060", cursor: "default", fontSize: "11px" }, x: 0, y: 15 }, lineColor: "#C0D0E0", lineWidth: 1, minPadding: 0.01, maxPadding: 0.01, minorGridLineColor: "#E0E0E0", minorGridLineWidth: 1, minorTickColor: "#A0A0A0", minorTickLength: 2, minorTickPosition: "outside", startOfWeek: 1, startOnTick: !1, tickColor: "#C0D0E0", tickLength: 10, tickmarkPlacement: "between", tickPixelInterval: 100, tickPosition: "outside", tickWidth: 1, title: { align: "middle", style: { color: "#707070" } }, type: "linear" }, defaultYAxisOptions: { endOnTick: !0, gridLineWidth: 1, tickPixelInterval: 72, showLastLabel: !0, labels: { x: -8, y: 3 }, lineWidth: 0, maxPadding: 0.05, minPadding: 0.05, startOnTick: !0, tickWidth: 0, title: { rotation: 270, text: "Values" }, stackLabels: { enabled: !1, formatter: function() { return bI.numberFormat(this.total, -1) }, style: bY(d.line.dataLabels.style, { color: "#000000" }) } }, defaultLeftAxisOptions: { labels: { x: -15, y: null }, title: { rotation: 270 } }, defaultRightAxisOptions: { labels: { x: 15, y: null }, title: { rotation: 90 } }, defaultBottomAxisOptions: { labels: { autoRotation: [-45], x: 0, y: null }, title: { rotation: 0 } }, defaultTopAxisOptions: { labels: { autoRotation: [-45], x: 0, y: -15 }, title: { rotation: 0 } }, init: function(m, p) { var r = p.isX; this.horiz = m.inverted ? !r : r; this.coll = (this.isXAxis = r) ? "xAxis" : "yAxis"; this.opposite = p.opposite; this.side = p.side || (this.horiz ? this.opposite ? 0 : 2 : this.opposite ? 1 : 3); this.setOptions(p); var s = this.options , t = s.type; this.labelFormatter = s.labels.formatter || this.defaultLabelFormatter; this.userOptions = p; this.minPixelPadding = 0; this.chart = m; this.reversed = s.reversed; this.zoomEnabled = s.zoomEnabled !== !1; this.categories = s.categories || t === "category"; this.names = this.names || []; this.isLog = t === "logarithmic"; this.isDatetimeAxis = t === "datetime"; this.isLinked = bn(s.linkedTo); this.ticks = {}; this.labelEdge = []; this.minorTicks = {}; this.plotLinesAndBands = []; this.alternateBands = {}; this.len = 0; this.minRange = this.userMinRange = s.minRange || s.maxZoom; this.range = s.range; this.offset = s.offset || 0; this.stacks = {}; this.oldStacks = {}; this.min = this.max = null; this.crosshair = a6(s.crosshair, bj(m.options.tooltip.crosshairs)[r ? 0 : 1], !1); var u, s = this.options.events; aT(this, m.axes) === -1 && (r && !this.isColorAxis ? m.axes.splice(m.xAxis.length, 0, this) : m.axes.push(this), m[this.coll].push(this)); this.series = this.series || []; if (m.inverted && r && this.reversed === by) { this.reversed = !0 } this.removePlotLine = this.removePlotBand = this.removePlotBandOrLine; for (u in s) { aW(this, u, s[u]) } if (this.isLog) { this.val2lin = ae, this.lin2val = ar } }, setOptions: function(m) { this.options = bY(this.defaultOptions, this.isXAxis ? {} : this.defaultYAxisOptions, [this.defaultTopAxisOptions, this.defaultRightAxisOptions, this.defaultBottomAxisOptions, this.defaultLeftAxisOptions][this.side], bY(a7[this.coll], m)) }, defaultLabelFormatter: function() { var m = this.axis, p = this.value, r = m.categories, s = this.dateTimeLabelFormat, t = a7.lang.numericSymbols, u = t && t.length, w, x = m.options.labels.format, m = m.isLog ? p : m.tickInterval; if (x) { w = aD(x, this) } else { if (r) { w = p } else { if (s) { w = a3(s, p) } else { if (u && m >= 1000) { for (; u-- && w === by; ) { r = Math.pow(1000, u + 1), m >= r && t[u] !== null && (w = bI.numberFormat(p / r, -1) + t[u]) } } } } } w === by && (w = a1(p) >= 10000 ? bI.numberFormat(p, 0) : bI.numberFormat(p, -1, by, "")); return w }, getSeriesExtremes: function() { var m = this , p = m.chart; m.hasVisibleSeries = !1; m.dataMin = m.dataMax = m.ignoreMinPadding = m.ignoreMaxPadding = null; m.buildStacks && m.buildStacks(); aQ(m.series, function(r) { if (r.visible || !p.options.chart.ignoreHiddenSeries) { var s; s = r.options.threshold; var t; m.hasVisibleSeries = !0; m.isLog && s <= 0 && (s = null); if (m.isXAxis) { if (s = r.xData, s.length) { m.dataMin = aw(a6(m.dataMin, s[0]), a9(s)), m.dataMax = bs(a6(m.dataMax, s[0]), ai(s)) } } else { r.getExtremes(); t = r.dataMax; r = r.dataMin; if (bn(r) && bn(t)) { m.dataMin = aw(a6(m.dataMin, r), r), m.dataMax = bs(a6(m.dataMax, t), t) } if (bn(s)) { if (m.dataMin >= s) { m.dataMin = s, m.ignoreMinPadding = !0 } else { if (m.dataMax < s) { m.dataMax = s, m.ignoreMaxPadding = !0 } } } } } }) }, translate: function(m, p, r, s, t, u) { var w = 1 , x = 0 , z = s ? this.oldTransA : this.transA , s = s ? this.oldMin : this.min , A = this.minPixelPadding , t = (this.doPostTranslate || this.isLog && t) && this.lin2val; if (!z) { z = this.transA } if (r) { w *= -1, x = this.len } this.reversed && (w *= -1, x -= w * (this.sector || this.len)); p ? (m = m * w + x, m -= A, m = m / z + s, t && (m = this.lin2val(m))) : (t && (m = this.val2lin(m)), u === "between" && (u = 0.5), m = w * (m - s) * z + x + w * A + (bd(u) ? z * u * this.pointRange : 0)); return m }, toPixels: function(m, p) { return this.translate(m, !1, !this.horiz, null, !0) + (p ? 0 : this.pos) }, toValue: function(m, p) { return this.translate(m - (p ? 0 : this.pos), !0, !this.horiz, null, !0) }, getPlotLinePath: function(m, p, r, s, t) { var u = this.chart, w = this.left, x = this.top, z, A, B = r && u.oldChartHeight || u.chartHeight, D = r && u.oldChartWidth || u.chartWidth, F; z = this.transB; var G = function(H, I, J) { if (H < I || H > J) { s ? H = aw(bs(I, H), J) : F = !0 } return H } , t = a6(t, this.translate(m, null, null, r)) , m = r = bO(t + z); z = A = bO(B - t - z); isNaN(t) ? F = !0 : this.horiz ? (z = x, A = B - this.bottom, m = r = G(m, w, w + this.width)) : (m = w, r = D - this.right, z = A = G(z, x, x + this.height)); return F && !s ? null : u.renderer.crispLine(["M", m, z, "L", r, A], p || 1) }, getLinearTickPositions: function(m, p, r) { var s, t = S(bz(p / m) * m), u = S(bo(r / m) * m), w = []; if (p === r && bd(p)) { return [p] } for (p = t; p <= u; ) { w.push(p); p = S(p + m); if (p === s) { break } s = p } return w }, getMinorTickPositions: function() { var m = this.options, p = this.tickPositions, r = this.minorTickInterval, s = [], t, u = this.min; t = this.max; var w = t - u; if (w && w / r < this.len / 3) { if (this.isLog) { m = p.length; for (t = 1; t < m; t++) { s = s.concat(this.getLogTickPositions(r, p[t - 1], p[t], !0)) } } else { if (this.isDatetimeAxis && m.minorTickInterval === "auto") { s = s.concat(this.getTimeTicks(this.normalizeTimeTickInterval(r), u, t, m.startOfWeek)) } else { for (p = u + (p[0] - u) % r; p <= t; p += r) { s.push(p) } } } } this.trimTicks(s); return s }, adjustForMinRange: function() { var m = this.options, p = this.min, r = this.max, s, t = this.dataMax - this.dataMin >= this.minRange, u, w, x, z, A; if (this.isXAxis && this.minRange === by && !this.isLog) { bn(m.min) || bn(m.max) ? this.minRange = null : (aQ(this.series, function(D) { z = D.xData; for (w = A = D.xIncrement ? 1 : z.length - 1; w > 0; w--) { if (x = z[w] - z[w - 1], u === by || x < u) { u = x } } }), this.minRange = aw(u * 5, this.dataMax - this.dataMin)) } if (r - p < this.minRange) { var B = this.minRange; s = (B - r + p) / 2; s = [p - s, a6(m.min, p - s)]; if (t) { s[2] = this.dataMin } p = ai(s); r = [p + B, a6(m.max, p + B)]; if (t) { r[2] = this.dataMax } r = a9(r); r - p < B && (s[0] = r - B, s[1] = a6(m.min, r - B), p = ai(s)) } this.min = p; this.max = r }, setAxisTranslation: function(m) { var p = this, r = p.max - p.min, s = p.axisPointRange || 0, t, u = 0, w = 0, x = p.linkedParent, z = !!p.categories, A = p.transA, B = p.isXAxis; if (B || z || s) { if (x ? (u = x.minPointOffset, w = x.pointRangePadding) : aQ(p.series, function(D) { var F = z ? 1 : B ? D.pointRange : p.axisPointRange || 0 , G = D.options.pointPlacement , H = D.closestPointRange; F > r && (F = 0); s = bs(s, F); p.single || (u = bs(u, aa(G) ? 0 : F / 2), w = bs(w, G === "on" ? 0 : F)); !D.noSharedTooltip && bn(H) && (t = bn(t) ? aw(t, H) : H) }), x = p.ordinalSlope && t ? p.ordinalSlope / t : 1, p.minPointOffset = u *= x, p.pointRangePadding = w *= x, p.pointRange = aw(s, r), B) { p.closestPointRange = t } } if (m) { p.oldTransA = A } p.translationSlope = p.transA = A = p.len / (r + w || 1); p.transB = p.horiz ? p.left : p.bottom; p.minPixelPadding = A * u }, setTickInterval: function(m) { var p = this , r = p.chart , s = p.options , t = p.isLog , u = p.isDatetimeAxis , w = p.isXAxis , x = p.isLinked , z = s.maxPadding , A = s.minPadding , B = s.tickInterval , D = s.tickPixelInterval , F = p.categories; !u && !F && !x && this.getTickAmount(); x ? (p.linkedParent = r[p.coll][s.linkedTo], r = p.linkedParent.getExtremes(), p.min = a6(r.min, r.dataMin), p.max = a6(r.max, r.dataMax), s.type !== p.linkedParent.options.type && aH(11, 1)) : (p.min = a6(p.userMin, s.min, p.dataMin), p.max = a6(p.userMax, s.max, p.dataMax)); if (t) { !m && aw(p.min, a6(p.dataMin, p.min)) <= 0 && aH(10, 1), p.min = S(ae(p.min)), p.max = S(ae(p.max)) } if (p.range && bn(p.max)) { p.userMin = p.min = bs(p.min, p.max - p.range), p.userMax = p.max, p.range = null } p.beforePadding && p.beforePadding(); p.adjustForMinRange(); if (!F && !p.axisPointRange && !p.usePercentage && !x && bn(p.min) && bn(p.max) && (r = p.max - p.min)) { if (!bn(s.min) && !bn(p.userMin) && A && (p.dataMin < 0 || !p.ignoreMinPadding)) { p.min -= r * A } if (!bn(s.max) && !bn(p.userMax) && z && (p.dataMax > 0 || !p.ignoreMaxPadding)) { p.max += r * z } } if (bd(s.floor)) { p.min = bs(p.min, s.floor) } if (bd(s.ceiling)) { p.max = aw(p.max, s.ceiling) } p.tickInterval = p.min === p.max || p.min === void 0 || p.max === void 0 ? 1 : x && !B && D === p.linkedParent.options.tickPixelInterval ? p.linkedParent.tickInterval : a6(B, this.tickAmount ? (p.max - p.min) / bs(this.tickAmount - 1, 1) : void 0, F ? 1 : (p.max - p.min) * D / bs(p.len, D)); w && !m && aQ(p.series, function(G) { G.processData(p.min !== p.oldMin || p.max !== p.oldMax) }); p.setAxisTranslation(!0); p.beforeSetTickPositions && p.beforeSetTickPositions(); if (p.postProcessTickInterval) { p.tickInterval = p.postProcessTickInterval(p.tickInterval) } if (p.pointRange) { p.tickInterval = bs(p.pointRange, p.tickInterval) } m = a6(s.minTickInterval, p.isDatetimeAxis && p.closestPointRange); if (!B && p.tickInterval < m) { p.tickInterval = m } if (!u && !t && !B) { p.tickInterval = ba(p.tickInterval, null, a4(p.tickInterval), a6(s.allowDecimals, !(p.tickInterval > 0.5 && p.tickInterval < 5 && p.max > 1000 && p.max < 9999)), !!this.tickAmount) } if (!this.tickAmount && this.len) { p.tickInterval = p.unsquish() } this.setTickPositions() }, setTickPositions: function() { var m = this.options, p, r = m.tickPositions, s = m.tickPositioner, t = m.startOnTick, u = m.endOnTick, w; this.tickmarkOffset = this.categories && m.tickmarkPlacement === "between" && this.tickInterval === 1 ? 0.5 : 0; this.minorTickInterval = m.minorTickInterval === "auto" && this.tickInterval ? this.tickInterval / 5 : m.minorTickInterval; this.tickPositions = p = m.tickPositions && m.tickPositions.slice(); if (!p && (this.tickPositions = p = this.isDatetimeAxis ? this.getTimeTicks(this.normalizeTimeTickInterval(this.tickInterval, m.units), this.min, this.max, m.startOfWeek, this.ordinalPositions, this.closestPointRange, !0) : this.isLog ? this.getLogTickPositions(this.tickInterval, this.min, this.max) : this.getLinearTickPositions(this.tickInterval, this.min, this.max), s && (s = s.apply(this, [this.min, this.max])))) { this.tickPositions = p = s } if (!this.isLinked) { this.trimTicks(p, t, u), this.min === this.max && bn(this.min) && !this.tickAmount && (w = !0, this.min -= 0.5, this.max += 0.5), this.single = w, !r && !s && this.adjustTickAmount() } }, trimTicks: function(m, p, r) { var s = m[0] , t = m[m.length - 1] , u = this.minPointOffset || 0; p ? this.min = s : this.min - u > s && m.shift(); r ? this.max = t : this.max + u < t && m.pop(); m.length === 0 && bn(s) && m.push((t + s) / 2) }, getTickAmount: function() { var m = {}, p, r = this.options, s = r.tickAmount, t = r.tickPixelInterval; !bn(r.tickInterval) && this.len < t && !this.isRadial && !this.isLog && r.startOnTick && r.endOnTick && (s = 2); !s && this.chart.options.chart.alignTicks !== !1 && r.alignTicks !== !1 && (aQ(this.chart[this.coll], function(u) { var w = u.options , u = u.horiz , w = [u ? w.left : w.top, u ? w.width : w.height, w.pane].join(","); m[w] ? p = !0 : m[w] = 1 }), p && (s = bo(this.len / t) + 1)); if (s < 4) { this.finalTickAmt = s, s = 5 } this.tickAmount = s }, adjustTickAmount: function() { var m = this.tickInterval , p = this.tickPositions , r = this.tickAmount , s = this.finalTickAmt , t = p && p.length; if (t < r) { for (; p.length < r; ) { p.push(S(p[p.length - 1] + m)) } this.transA *= (t - 1) / (r - 1); this.max = p[p.length - 1] } else { t > r && (this.tickInterval *= 2, this.setTickPositions()) } if (bn(s)) { for (m = r = p.length; m--; ) { (s === 3 && m % 2 === 1 || s <= 2 && m > 0 && m < r - 1) && p.splice(m, 1) } this.finalTickAmt = by } }, setScale: function() { var m = this.stacks, p, r, s, t; this.oldMin = this.min; this.oldMax = this.max; this.oldAxisLength = this.len; this.setAxisSize(); t = this.len !== this.oldAxisLength; aQ(this.series, function(u) { if (u.isDirtyData || u.isDirty || u.xAxis.isDirty) { s = !0 } }); if (t || s || this.isLinked || this.forceRedraw || this.userMin !== this.oldUserMin || this.userMax !== this.oldUserMax) { if (!this.isXAxis) { for (p in m) { for (r in m[p]) { m[p][r].total = null, m[p][r].cum = 0 } } } this.forceRedraw = !1; this.getSeriesExtremes(); this.setTickInterval(); this.oldUserMin = this.userMin; this.oldUserMax = this.userMax; if (!this.isDirty) { this.isDirty = t || this.min !== this.oldMin || this.max !== this.oldMax } } else { if (!this.isXAxis) { if (this.oldStacks) { m = this.stacks = this.oldStacks } for (p in m) { for (r in m[p]) { m[p][r].cum = m[p][r].total } } } } }, setExtremes: function(m, p, r, s, t) { var u = this , w = u.chart , r = a6(r, !0); aQ(u.series, function(x) { delete x.kdTree }); t = bh(t, { min: m, max: p }); aR(u, "setExtremes", t, function() { u.userMin = m; u.userMax = p; u.eventArgs = t; u.isDirtyExtremes = !0; r && w.redraw(s) }) }, zoom: function(m, p) { var r = this.dataMin , s = this.dataMax , t = this.options; this.allowZoomOutside || (bn(r) && m <= aw(r, a6(t.min, r)) && (m = by), bn(s) && p >= bs(s, a6(t.max, s)) && (p = by)); this.displayBtn = m !== by || p !== by; this.setExtremes(m, p, !1, by, { trigger: "zoom" }); return !0 }, setAxisSize: function() { var m = this.chart , p = this.options , r = p.offsetLeft || 0 , s = this.horiz , t = a6(p.width, m.plotWidth - r + (p.offsetRight || 0)) , u = a6(p.height, m.plotHeight) , w = a6(p.top, m.plotTop) , p = a6(p.left, m.plotLeft + r) , r = /%$/; r.test(u) && (u = parseFloat(u) / 100 * m.plotHeight); r.test(w) && (w = parseFloat(w) / 100 * m.plotHeight + m.plotTop); this.left = p; this.top = w; this.width = t; this.height = u; this.bottom = m.chartHeight - u - w; this.right = m.chartWidth - t - p; this.len = bs(s ? t : u, 0); this.pos = s ? p : w }, getExtremes: function() { var m = this.isLog; return { min: m ? S(ar(this.min)) : this.min, max: m ? S(ar(this.max)) : this.max, dataMin: this.dataMin, dataMax: this.dataMax, userMin: this.userMin, userMax: this.userMax } }, getThreshold: function(m) { var p = this.isLog , r = p ? ar(this.min) : this.min , p = p ? ar(this.max) : this.max; r > m || m === null ? m = r : p < m && (m = p); return this.translate(m, 0, 1, 0, 1) }, autoLabelAlign: function(m) { m = (a6(m, 0) - this.side * 90 + 720) % 360; return m > 15 && m < 165 ? "right" : m > 195 && m < 345 ? "left" : "center" }, unsquish: function() { var m = this.ticks, p = this.options.labels, r = this.horiz, s = this.tickInterval, t = s, u = this.len / (((this.categories ? 1 : 0) + this.max - this.min) / s), w, x = p.rotation, z = this.chart.renderer.fontMetrics(p.style.fontSize, m[0] && m[0].label), A, B = Number.MAX_VALUE, D, F = function(G) { G /= u || 1; G = G > 1 ? bo(G) : 1; return G * s }; r ? (D = bn(x) ? [x] : u < a6(p.autoRotationLimit, 80) && !p.staggerLines && !p.step && p.autoRotation) && aQ(D, function(G) { var H; if (G === x || G && G >= -90 && G <= 90) { A = F(a1(z.h / a(am * G))), H = A + a1(G / 360), H < B && (B = H, w = G, t = A) } }) : t = F(z.h); this.autoRotation = D; this.labelRotation = w; return t }, renderUnsquish: function() { var m = this.chart, p = m.renderer, r = this.tickPositions, s = this.ticks, t = this.options.labels, u = this.horiz, w = m.margin, x = this.slotWidth = u && !t.step && !t.rotation && (this.staggerLines || 1) * m.plotWidth / r.length || !u && (w[3] && w[3] - m.spacing[3] || m.chartWidth * 0.33), z = bs(1, bO(x - 2 * (t.padding || 5))), A = {}, w = p.fontMetrics(t.style.fontSize, s[0] && s[0].label), B, D = 0; if (!aa(t.rotation)) { A.rotation = t.rotation } if (this.autoRotation) { aQ(r, function(F) { if ((F = s[F]) && F.labelLength > D) { D = F.labelLength } }), D > z && D > w.h ? A.rotation = this.labelRotation : this.labelRotation = 0 } else { if (x) { B = { width: z + "px", textOverflow: "clip" }; for (x = r.length; !u && x--; ) { if (z = r[x], z = s[z].label) { if (z.styles.textOverflow === "ellipsis" && z.css({ textOverflow: "clip" }), z.getBBox().height > this.len / r.length - (w.h - w.f)) { z.specCss = { textOverflow: "ellipsis" } } } } } } A.rotation && (B = { width: (D > m.chartHeight * 0.5 ? m.chartHeight * 0.33 : m.chartHeight) + "px", textOverflow: "ellipsis" }); this.labelAlign = A.align = t.align || this.autoLabelAlign(this.labelRotation); aQ(r, function(F) { var G = (F = s[F]) && F.label; if (G) { B && G.css(bY(B, G.specCss)), delete G.specCss, G.attr(A), F.rotation = A.rotation } }); this.tickRotCorr = p.rotCorr(w.b, this.labelRotation || 0, this.side === 2) }, getOffset: function() { var m = this, p = m.chart, s = p.renderer, u = m.options, w = m.tickPositions, x = m.ticks, z = m.horiz, A = m.side, B = p.inverted ? [1, 0, 3, 2][A] : A, D, F, G = 0, H, I = 0, J = u.title, N = u.labels, L = 0, t = p.axisOffset, p = p.clipOffset, M = [-1, 1, 1, -1][A], K; m.hasData = D = m.hasVisibleSeries || bn(m.min) && bn(m.max) && !!w; m.showAxis = F = D || a6(u.showEmpty, !0); m.staggerLines = m.horiz && N.staggerLines; if (!m.axisGroup) { m.gridGroup = s.g("grid").attr({ zIndex: u.gridZIndex || 1 }).add(), m.axisGroup = s.g("axis").attr({ zIndex: u.zIndex || 2 }).add(), m.labelGroup = s.g("axis-labels").attr({ zIndex: N.zIndex || 7 }).addClass("highcharts-" + m.coll.toLowerCase() + "-labels").add() } if (D || m.isLinked) { if (aQ(w, function(r) { x[r] ? x[r].addLabel() : x[r] = new bv(m,r) }), m.renderUnsquish(), aQ(w, function(r) { if (A === 0 || A === 2 || { 1: "left", 3: "right" }[A] === m.labelAlign) { L = bs(x[r].getLabelSize(), L) } }), m.staggerLines) { L *= m.staggerLines, m.labelOffset = L } } else { for (K in x) { x[K].destroy(), delete x[K] } } if (J && J.text && J.enabled !== !1) { if (!m.axisTitle) { m.axisTitle = s.text(J.text, 0, 0, J.useHTML).attr({ zIndex: 7, rotation: J.rotation || 0, align: J.textAlign || { low: "left", middle: "center", high: "right" }[J.align] }).addClass("highcharts-" + this.coll.toLowerCase() + "-title").css(J.style).add(m.axisGroup), m.axisTitle.isNew = !0 } if (F) { G = m.axisTitle.getBBox()[z ? "height" : "width"], H = J.offset, I = bn(H) ? 0 : a6(J.margin, z ? 5 : 10) } m.axisTitle[F ? "show" : "hide"]() } m.offset = M * a6(u.offset, t[A]); m.tickRotCorr = m.tickRotCorr || { x: 0, y: 0 }; s = A === 2 ? m.tickRotCorr.y : 0; z = L + I + (L && M * (z ? a6(N.y, m.tickRotCorr.y + 8) : N.x) - s); m.axisTitleMargin = a6(H, z); t[A] = bs(t[A], m.axisTitleMargin + G + M * m.offset, z); p[B] = bs(p[B], bz(u.lineWidth / 2) * 2) }, getLinePath: function(m) { var p = this.chart , r = this.opposite , s = this.offset , t = this.horiz , u = this.left + (r ? this.width : 0) + s , s = p.chartHeight - this.bottom - (r ? this.height : 0) + s; r && (m *= -1); return p.renderer.crispLine(["M", t ? this.left : u, t ? s : this.top, "L", t ? p.chartWidth - this.right : u, t ? s : p.chartHeight - this.bottom], m) }, getTitlePosition: function() { var m = this.horiz , p = this.left , r = this.top , s = this.len , t = this.options.title , u = m ? p : r , w = this.opposite , x = this.offset , z = i(t.style.fontSize || 12) , s = { low: u + (m ? 0 : s), middle: u + s / 2, high: u + (m ? s : 0) }[t.align] , p = (m ? r + this.height : p) + (m ? 1 : -1) * (w ? -1 : 1) * this.axisTitleMargin + (this.side === 2 ? z : 0); return { x: m ? s : p + (w ? this.width : 0) + x + (t.x || 0), y: m ? p - (w ? this.height : 0) + x : s + (t.y || 0) } }, render: function() { var m = this, s = m.chart, t = s.renderer, w = m.options, x = m.isLog, z = m.isLinked, A = m.tickPositions, B = m.axisTitle, D = m.ticks, F = m.minorTicks, G = m.alternateBands, H = w.stackLabels, I = w.alternateGridColor, J = m.tickmarkOffset, L = w.lineWidth, O, K = s.hasRendered && bn(m.oldMin) && !isNaN(m.oldMin); O = m.hasData; var u = m.showAxis, N, M; m.labelEdge.length = 0; m.overlap = !1; aQ([D, F, G], function(p) { for (var r in p) { p[r].isActive = !1 } }); if (O || z) { m.minorTickInterval && !m.categories && aQ(m.getMinorTickPositions(), function(p) { F[p] || (F[p] = new bv(m,p,"minor")); K && F[p].isNew && F[p].render(null, !0); F[p].render(null, !1, 1) }); if (A.length && (aQ(A, function(p, r) { if (!z || p >= m.min && p <= m.max) { D[p] || (D[p] = new bv(m,p)), K && D[p].isNew && D[p].render(r, !0, 0.1), D[p].render(r) } }), J && (m.min === 0 || m.single))) { D[-1] || (D[-1] = new bv(m,-1,null,!0)), D[-1].render(-1) } I && aQ(A, function(p, r) { if (r % 2 === 0 && p < m.max) { G[p] || (G[p] = new bI.PlotLineOrBand(m)), N = p + J, M = A[r + 1] !== by ? A[r + 1] + J : m.max, G[p].options = { from: x ? ar(N) : N, to: x ? ar(M) : M, color: I }, G[p].render(), G[p].isActive = !0 } }); if (!m._addedPlotLB) { aQ((w.plotLines || []).concat(w.plotBands || []), function(p) { m.addPlotBandOrLine(p) }), m._addedPlotLB = !0 } } aQ([D, F, G], function(p) { var r, P, Q = [], R = b0 ? b0.duration || 500 : 0, T = function() { for (P = Q.length; P--; ) { p[Q[P]] && !p[Q[P]].isActive && (p[Q[P]].destroy(), delete p[Q[P]]) } }; for (r in p) { if (!p[r].isActive) { p[r].render(r, !1, 0), p[r].isActive = !1, Q.push(r) } } p === G || !s.hasRendered || !R ? T() : R && setTimeout(T, R) }); if (L) { O = m.getLinePath(L), m.axisLine ? m.axisLine.animate({ d: O }) : m.axisLine = t.path(O).attr({ stroke: w.lineColor, "stroke-width": L, zIndex: 7 }).add(m.axisGroup), m.axisLine[u ? "show" : "hide"]() } if (B && u) { B[B.isNew ? "attr" : "animate"](m.getTitlePosition()), B.isNew = !1 } H && H.enabled && m.renderStackTotals(); m.isDirty = !1 }, redraw: function() { this.render(); aQ(this.plotLinesAndBands, function(m) { m.render() }); aQ(this.series, function(m) { m.isDirty = !0 }) }, destroy: function(m) { var p = this, r = p.stacks, s, t = p.plotLinesAndBands; m || bU(p); for (s in r) { be(r[s]), r[s] = null } aQ([p.ticks, p.minorTicks, p.alternateBands], function(u) { be(u) }); for (m = t.length; m--; ) { t[m].destroy() } aQ("stackTotalGroup,axisLine,axisTitle,axisGroup,cross,gridGroup,labelGroup".split(","), function(u) { p[u] && (p[u] = p[u].destroy()) }); this.cross && this.cross.destroy() }, drawCrosshair: function(m, p) { var r, s = this.crosshair, t = s.animation; if (!this.crosshair || (bn(p) || !a6(this.crosshair.snap, !0)) === !1) { this.hideCrosshair() } else { if (a6(s.snap, !0) ? bn(p) && (r = this.isXAxis ? p.plotX : this.len - p.plotY) : r = this.horiz ? m.chartX - this.pos : this.len - m.chartY + this.pos, r = this.isRadial ? this.getPlotLinePath(this.isXAxis ? p.x : a6(p.stackY, p.y)) || null : this.getPlotLinePath(null, null, null, null, r) || null, r === null) { this.hideCrosshair() } else { if (this.cross) { this.cross.attr({ visibility: "visible" })[t ? "animate" : "attr"]({ d: r }, t) } else { t = this.categories && !this.isRadial; t = { "stroke-width": s.width || (t ? this.transA : 1), stroke: s.color || (t ? "rgba(155,200,255,0.2)" : "#C0C0C0"), zIndex: s.zIndex || 2 }; if (s.dashStyle) { t.dashstyle = s.dashStyle } this.cross = this.chart.renderer.path(r).attr(t).add() } } } }, hideCrosshair: function() { this.cross && this.cross.hide() } }; bh(bE.prototype, { getPlotBandPath: function(m, p) { var r = this.getPlotLinePath(p, null, null, !0) , s = this.getPlotLinePath(m, null, null, !0); s && r && s.toString() !== r.toString() ? s.push(r[4], r[5], r[1], r[2]) : s = null; return s }, addPlotBand: function(m) { return this.addPlotBandOrLine(m, "plotBands") }, addPlotLine: function(m) { return this.addPlotBandOrLine(m, "plotLines") }, addPlotBandOrLine: function(m, p) { var r = (new bI.PlotLineOrBand(this,m)).render() , s = this.userOptions; r && (p && (s[p] = s[p] || [], s[p].push(m)), this.plotLinesAndBands.push(r)); return r }, removePlotBandOrLine: function(m) { for (var p = this.plotLinesAndBands, r = this.options, s = this.userOptions, t = p.length; t--; ) { p[t].id === m && p[t].destroy() } aQ([r.plotLines || [], s.plotLines || [], r.plotBands || [], s.plotBands || []], function(u) { for (t = u.length; t--; ) { u[t].id === m && ax(u, u[t]) } }) } }); bE.prototype.getTimeTicks = function(m, p, r, s) { var t = [], u = {}, w = a7.global.useUTC, x, z = new e(p - bL(p)), A = m.unitRange, B = m.count; if (bn(p)) { z[ac](A >= al.second ? 0 : B * bz(z.getMilliseconds() / B)); if (A >= al.second) { z[ag](A >= al.minute ? 0 : B * bz(z.getSeconds() / B)) } if (A >= al.minute) { z[ak](A >= al.hour ? 0 : B * bz(z[bl]() / B)) } if (A >= al.hour) { z[ap](A >= al.day ? 0 : B * bz(z[bq]() / B)) } if (A >= al.day) { z[bB](A >= al.month ? 1 : B * bz(z[bR]() / B)) } A >= al.month && (z[bG](A >= al.year ? 0 : B * bz(z[bW]() / B)), x = z[b1]()); A >= al.year && (x -= x % B, z[bM](x)); if (A === al.week) { z[bB](z[bR]() - z[bw]() + a6(s, 1)) } p = 1; if (aZ || af) { z = z.getTime(), z = new e(z + bL(z)) } x = z[b1](); for (var s = z.getTime(), D = z[bW](), F = z[bR](), G = (al.day + (w ? bL(z) : z.getTimezoneOffset() * 60000)) % al.day; s < r; ) { t.push(s), A === al.year ? s = ao(x + p * B, 0) : A === al.month ? s = ao(x, D + p * B) : !w && (A === al.day || A === al.week) ? s = ao(x, D, F + p * B * (A === al.day ? 1 : 7)) : s += A * B, p++ } t.push(s); aQ(aJ(t, function(H) { return A <= al.hour && H % al.day === G }), function(H) { u[H] = "day" }) } t.info = bh(m, { higherRanks: u, totalRange: A * B }); return t } ; bE.prototype.normalizeTimeTickInterval = function(m, p) { var r = p || [["millisecond", [1, 2, 5, 10, 20, 25, 50, 100, 200, 500]], ["second", [1, 2, 5, 10, 15, 30]], ["minute", [1, 2, 5, 10, 15, 30]], ["hour", [1, 2, 3, 4, 6, 8, 12]], ["day", [1, 2]], ["week", [1, 2]], ["month", [1, 2, 3, 4, 6]], ["year", null]], s = r[r.length - 1], t = al[s[0]], u = s[1], w; for (w = 0; w < r.length; w++) { if (s = r[w], t = al[s[0]], u = s[1], r[w + 1] && m <= (t * u[u.length - 1] + al[r[w + 1][0]]) / 2) { break } } t === al.year && m < 5 * t && (u = [1, 2, 5]); r = ba(m / t, u, s[0] === "year" ? bs(a4(m / t), 1) : 1); return { unitRange: t, count: r, unitName: s[0] } } ; bE.prototype.getLogTickPositions = function(m, p, r, s) { var t = this.options , u = this.len , w = []; if (!s) { this._minorAutoInterval = null } if (m >= 0.5) { m = bO(m), w = this.getLinearTickPositions(m, p, r) } else { if (m >= 0.08) { for (var u = bz(p), x, z, A, B, D, t = m > 0.3 ? [1, 2, 4] : m > 0.15 ? [1, 2, 4, 6, 8] : [1, 2, 3, 4, 5, 6, 7, 8, 9]; u < r + 1 && !D; u++) { z = t.length; for (x = 0; x < z && !D; x++) { A = ae(ar(u) * t[x]), A > p && (!s || B <= r) && B !== by && w.push(B), B > r && (D = !0), B = A } } } else { if (p = ar(p), r = ar(r), m = t[s ? "minorTickInterval" : "tickInterval"], m = a6(m === "auto" ? null : m, this._minorAutoInterval, (r - p) * (t.tickPixelInterval / (s ? 5 : 1)) / ((s ? u / this.tickPositions.length : u) || 1)), m = ba(m, null, a4(m)), w = bA(this.getLinearTickPositions(m, p, r), ae), !s) { this._minorAutoInterval = m / 5 } } } if (!s) { this.tickInterval = m } return w } ; var aV = bI.Tooltip = function() { this.init.apply(this, arguments) } ; aV.prototype = { init: function(m, p) { var r = p.borderWidth , s = p.style , t = i(s.padding); this.chart = m; this.options = p; this.crosshairs = []; this.now = { x: 0, y: 0 }; this.isHidden = !0; this.label = m.renderer.label("", 0, 0, p.shape || "callout", null, null, p.useHTML, null, "tooltip").attr({ padding: t, fill: p.backgroundColor, "stroke-width": r, r: p.borderRadius, zIndex: 8 }).css(s).css({ padding: 0 }).add().attr({ y: -9999 }); ad || this.label.shadow(p.shadow); this.shared = p.shared }, destroy: function() { if (this.label) { this.label = this.label.destroy() } clearTimeout(this.hideTimer); clearTimeout(this.tooltipTimeout) }, move: function(m, p, r, s) { var t = this , u = t.now , w = t.options.animation !== !1 && !t.isHidden && (a1(m - u.x) > 1 || a1(p - u.y) > 1) , x = t.followPointer || t.len > 1; bh(u, { x: w ? (2 * u.x + m) / 3 : m, y: w ? (u.y + p) / 2 : p, anchorX: x ? by : w ? (2 * u.anchorX + r) / 3 : r, anchorY: x ? by : w ? (u.anchorY + s) / 2 : s }); t.label.attr(u); if (w) { clearTimeout(this.tooltipTimeout), this.tooltipTimeout = setTimeout(function() { t && t.move(m, p, r, s) }, 32) } }, hide: function(m) { var p = this, r; clearTimeout(this.hideTimer); if (!this.isHidden) { r = this.chart.hoverPoints, this.hideTimer = setTimeout(function() { p.label.fadeOut(); p.isHidden = !0 }, a6(m, this.options.hideDelay, 500)), r && aQ(r, function(s) { s.setState() }), this.chart.hoverPoints = null, this.chart.hoverSeries = null } }, getAnchor: function(m, p) { var r, s = this.chart, t = s.inverted, u = s.plotTop, w = s.plotLeft, x = 0, z = 0, A, B, m = bj(m); r = m[0].tooltipPos; this.followPointer && p && (p.chartX === by && (p = s.pointer.normalize(p)), r = [p.chartX - s.plotLeft, p.chartY - u]); r || (aQ(m, function(D) { A = D.series.yAxis; B = D.series.xAxis; x += D.plotX + (!t && B ? B.left - w : 0); z += (D.plotLow ? (D.plotLow + D.plotHigh) / 2 : D.plotY) + (!t && A ? A.top - u : 0) }), x /= m.length, z /= m.length, r = [t ? s.plotWidth - z : x, this.shared && !t && m.length > 1 && p ? p.chartY - u : t ? s.plotHeight - x : z]); return bA(r, bO) }, getPosition: function(m, p, r) { var s = this.chart, t = this.distance, u = {}, w = r.h, x, z = ["y", s.chartHeight, p, r.plotY + s.plotTop], A = ["x", s.chartWidth, m, r.plotX + s.plotLeft], B = a6(r.ttBelow, s.inverted && !r.negative || !s.inverted && r.negative), D = function(I, J, K, L) { var M = K < L - t , N = L + t + K < J , O = L - t - K; L += t; if (B && N) { u[I] = L } else { if (!B && M) { u[I] = O } else { if (M) { u[I] = O - w < 0 ? O : O - w } else { if (N) { u[I] = L + w + K > J ? L : L + w } else { return !1 } } } } }, F = function(I, J, K, L) { if (L < t || L > J - t) { return !1 } else { u[I] = L < K / 2 ? 1 : L > J - K / 2 ? J - K - 2 : L - K / 2 } }, G = function(I) { var J = z; z = A; A = J; x = I }, H = function() { D.apply(0, z) !== !1 ? F.apply(0, A) === !1 && !x && (G(!0), H()) : x ? u.x = u.y = 0 : (G(!0), H()) }; (s.inverted || this.len > 1) && G(); H(); return u }, defaultFormatter: function(m) { var p = this.points || bj(this), r; r = [m.tooltipFooterHeaderFormatter(p[0])]; r = r.concat(m.bodyFormatter(p)); r.push(m.tooltipFooterHeaderFormatter(p[0], !0)); return r.join("") }, refresh: function(m, p) { var r = this.chart, s = this.label, t = this.options, u, w, x = {}, z, A = []; z = t.formatter || this.defaultFormatter; var x = r.hoverPoints, B, D = this.shared; clearTimeout(this.hideTimer); this.followPointer = bj(m)[0].series.tooltipOptions.followPointer; w = this.getAnchor(m, p); u = w[0]; w = w[1]; D && (!m.series || !m.series.noSharedTooltip) ? (r.hoverPoints = m, x && aQ(x, function(F) { F.setState() }), aQ(m, function(F) { F.setState("hover"); A.push(F.getLabelConfig()) }), x = { x: m[0].category, y: m[0].y }, x.points = A, this.len = A.length, m = m[0]) : x = m.getLabelConfig(); z = z.call(x, this); x = m.series; this.distance = a6(x.tooltipOptions.distance, 16); z === !1 ? this.hide() : (this.isHidden && (ab(s), s.attr("opacity", 1).show()), s.attr({ text: z }), B = t.borderColor || m.color || x.color || "#606060", s.attr({ stroke: B }), this.updatePosition({ plotX: u, plotY: w, negative: m.negative, ttBelow: m.ttBelow, h: m.shapeArgs && m.shapeArgs.height || 0 }), this.isHidden = !1); aR(r, "tooltipRefresh", { text: z, x: u + r.plotLeft, y: w + r.plotTop, borderColor: B }) }, updatePosition: function(m) { var p = this.chart , r = this.label , r = (this.options.positioner || this.getPosition).call(this, r.width, r.height, m); this.move(bO(r.x), bO(r.y), m.plotX + p.plotLeft, m.plotY + p.plotTop) }, getXDateFormat: function(m, p, r) { var s, p = p.dateTimeLabelFormats, t = r && r.closestPointRange, u, w = { millisecond: 15, second: 12, minute: 9, hour: 6, day: 3 }, x, z; if (t) { x = a3("%m-%d %H:%M:%S.%L", m.x); for (u in al) { if (t === al.week && +a3("%w", m.x) === r.options.startOfWeek && x.substr(6) === "00:00:00.000") { u = "week"; break } else { if (al[u] > t) { u = z; break } else { if (w[u] && x.substr(w[u]) !== "01-01 00:00:00.000".substr(w[u])) { break } } } u !== "week" && (z = u) } u && (s = p[u]) } else { s = p.day } return s || p.year }, tooltipFooterHeaderFormatter: function(m, p) { var r = p ? "footer" : "header" , s = m.series , t = s.tooltipOptions , u = t.xDateFormat , w = s.xAxis , x = w && w.options.type === "datetime" && bd(m.key) , r = t[r + "Format"]; x && !u && (u = this.getXDateFormat(m, t, w)); x && u && (r = r.replace("{point.key}", "{point.key:" + u + "}")); return aD(r, { point: m, series: s }) }, bodyFormatter: function(m) { return bA(m, function(p) { var r = p.series.tooltipOptions; return (r.pointFormatter || p.point.tooltipFormatter).call(p.point, r.pointFormat) }) } }; var a2; f = c.documentElement.ontouchstart !== by; var bF = bI.Pointer = function(m, p) { this.init(m, p) } ; bF.prototype = { init: function(m, p) { var r = p.chart, s = r.events, t = ad ? "" : r.zoomType, r = m.inverted, u; this.options = p; this.chart = m; this.zoomX = u = /x/.test(t); this.zoomY = t = /y/.test(t); this.zoomHor = u && !r || t && r; this.zoomVert = t && !r || u && r; this.hasZoom = u || t; this.runChartClick = s && !!s.click; this.pinchDown = []; this.lastValidTouch = {}; if (bI.Tooltip && p.tooltip.enabled) { m.tooltip = new aV(m,p.tooltip), this.followTouchMove = a6(p.tooltip.followTouchMove, !0) } this.setDOMEvents() }, normalize: function(m, p) { var r, s, m = m || window.event, m = br(m); if (!m.target) { m.target = m.srcElement } s = m.touches ? m.touches.length ? m.touches.item(0) : m.changedTouches[0] : m; if (!p) { this.chartPosition = p = bm(this.chart.container) } s.pageX === by ? (r = bs(m.x, m.clientX - p.left), s = m.y) : (r = s.pageX - p.left, s = s.pageY - p.top); return bh(m, { chartX: bO(r), chartY: bO(s) }) }, getCoordinates: function(m) { var p = { xAxis: [], yAxis: [] }; aQ(this.chart.axes, function(r) { p[r.isXAxis ? "xAxis" : "yAxis"].push({ axis: r, value: r.toValue(m[r.horiz ? "chartX" : "chartY"]) }) }); return p }, runPointActions: function(m) { var p = this.chart, r = p.series, s = p.tooltip, t = s ? s.shared : !1, u = p.hoverPoint, w = p.hoverSeries, x, z = p.chartWidth, A = p.chartWidth, B, D = [], F, G; if (!t && !w) { for (x = 0; x < r.length; x++) { if (r[x].directTouch || !r[x].options.stickyTracking) { r = [] } } } !t && w && w.directTouch && u ? F = u : (aQ(r, function(H) { B = H.noSharedTooltip && t; H.visible && !B && a6(H.options.enableMouseTracking, !0) && (G = H.searchPoint(m)) && D.push(G) }), aQ(D, function(H) { if (H && bn(H.plotX) && bn(H.plotY) && (H.dist.distX < z || (H.dist.distX === z || H.series.kdDimensions > 1) && H.dist.distR < A)) { z = H.dist.distX, A = H.dist.distR, F = H } })); if (F && (F !== u || s && s.isHidden)) { if (t && !F.series.noSharedTooltip) { for (x = D.length; x--; ) { (D[x].clientX !== F.clientX || D[x].series.noSharedTooltip) && D.splice(x, 1) } D.length && s && s.refresh(D, m); aQ(D, function(H) { if (H !== F) { H.onMouseOver(m) } }); (w && w.directTouch && u || F).onMouseOver(m) } else { s && s.refresh(F, m), F.onMouseOver(m) } } else { r = w && w.tooltipOptions.followPointer, s && r && !s.isHidden && (r = s.getAnchor([{}], m), s.updatePosition({ plotX: r[0], plotY: r[1] })) } if (s && !this._onDocumentMouseMove) { this._onDocumentMouseMove = function(H) { if (bP[a2]) { bP[a2].pointer.onDocumentMouseMove(H) } } , aW(c, "mousemove", this._onDocumentMouseMove) } aQ(p.axes, function(H) { H.drawCrosshair(m, a6(F, u)) }) }, reset: function(m, p) { var r = this.chart , s = r.hoverSeries , t = r.hoverPoint , u = r.tooltip , w = u && u.shared ? r.hoverPoints : t; (m = m && u && w) && bj(w)[0].plotX === by && (m = !1); if (m) { u.refresh(w), t && (t.setState(t.state, !0), aQ(r.axes, function(x) { a6(x.options.crosshair && x.options.crosshair.snap, !0) ? x.drawCrosshair(null, m) : x.hideCrosshair() })) } else { if (t) { t.onMouseOut() } if (s) { s.onMouseOut() } u && u.hide(p); if (this._onDocumentMouseMove) { bU(c, "mousemove", this._onDocumentMouseMove), this._onDocumentMouseMove = null } aQ(r.axes, function(x) { x.hideCrosshair() }); this.hoverX = null } }, scaleGroups: function(m, p) { var r = this.chart, s; aQ(r.series, function(t) { s = m || t.getPlotBox(); t.xAxis && t.xAxis.zoomEnabled && (t.group.attr(s), t.markerGroup && (t.markerGroup.attr(s), t.markerGroup.clip(p ? r.clipRect : null)), t.dataLabelsGroup && t.dataLabelsGroup.attr(s)) }); r.clipRect.attr(p || r.clipBox) }, dragStart: function(m) { var p = this.chart; p.mouseIsDown = m.type; p.cancelClick = !1; p.mouseDownX = this.mouseDownX = m.chartX; p.mouseDownY = this.mouseDownY = m.chartY }, drag: function(m) { var p = this.chart, r = p.options.chart, s = m.chartX, t = m.chartY, u = this.zoomHor, w = this.zoomVert, x = p.plotLeft, z = p.plotTop, A = p.plotWidth, B = p.plotHeight, D, F = this.mouseDownX, G = this.mouseDownY, H = r.panKey && m[r.panKey + "Key"]; s < x ? s = x : s > x + A && (s = x + A); t < z ? t = z : t > z + B && (t = z + B); this.hasDragged = Math.sqrt(Math.pow(F - s, 2) + Math.pow(G - t, 2)); if (this.hasDragged > 10) { D = p.isInsidePlot(F - x, G - z); if (p.hasCartesianSeries && (this.zoomX || this.zoomY) && D && !H && !this.selectionMarker) { this.selectionMarker = p.renderer.rect(x, z, u ? 1 : A, w ? 1 : B, 0).attr({ fill: r.selectionMarkerFill || "rgba(69,114,167,0.25)", zIndex: 7 }).add() } this.selectionMarker && u && (s -= F, this.selectionMarker.attr({ width: a1(s), x: (s > 0 ? 0 : s) + F })); this.selectionMarker && w && (s = t - G, this.selectionMarker.attr({ height: a1(s), y: (s > 0 ? 0 : s) + G })); D && !this.selectionMarker && r.panning && p.pan(m, r.panning) } }, drop: function(m) { var p = this , r = this.chart , s = this.hasPinched; if (this.selectionMarker) { var t = { xAxis: [], yAxis: [], originalEvent: m.originalEvent || m }, u = this.selectionMarker, w = u.attr ? u.attr("x") : u.x, x = u.attr ? u.attr("y") : u.y, z = u.attr ? u.attr("width") : u.width, A = u.attr ? u.attr("height") : u.height, B; if (this.hasDragged || s) { aQ(r.axes, function(D) { if (D.zoomEnabled && bn(D.min) && (s || p[{ xAxis: "zoomX", yAxis: "zoomY" }[D.coll]])) { var F = D.horiz , G = m.type === "touchend" ? D.minPixelPadding : 0 , H = D.toValue((F ? w : x) + G) , F = D.toValue((F ? w + z : x + A) - G); t[D.coll].push({ axis: D, min: aw(H, F), max: bs(H, F) }); B = !0 } }), B && aR(r, "selection", t, function(D) { r.zoom(bh(D, s ? { animation: !1 } : null)) }) } this.selectionMarker = this.selectionMarker.destroy(); s && this.scaleGroups() } if (r) { ah(r.container, { cursor: r._cursor }), r.cancelClick = this.hasDragged > 10, r.mouseIsDown = this.hasDragged = this.hasPinched = !1, this.pinchDown = [] } }, onContainerMouseDown: function(m) { m = this.normalize(m); m.preventDefault && m.preventDefault(); this.dragStart(m) }, onDocumentMouseUp: function(m) { bP[a2] && bP[a2].pointer.drop(m) }, onDocumentMouseMove: function(m) { var p = this.chart , r = this.chartPosition , m = this.normalize(m, r); r && !this.inClass(m.target, "highcharts-tracker") && !p.isInsidePlot(m.chartX - p.plotLeft, m.chartY - p.plotTop) && this.reset() }, onContainerMouseLeave: function() { var m = bP[a2]; if (m) { m.pointer.reset(), m.pointer.chartPosition = null } }, onContainerMouseMove: function(m) { var p = this.chart; a2 = p.index; m = this.normalize(m); m.returnValue = !1; p.mouseIsDown === "mousedown" && this.drag(m); (this.inClass(m.target, "highcharts-tracker") || p.isInsidePlot(m.chartX - p.plotLeft, m.chartY - p.plotTop)) && !p.openMenu && this.runPointActions(m) }, inClass: function(m, p) { for (var r; m; ) { if (r = aL(m, "class")) { if (r.indexOf(p) !== -1) { return !0 } else { if (r.indexOf("highcharts-container") !== -1) { return !1 } } } m = m.parentNode } }, onTrackerMouseOut: function(m) { var p = this.chart.hoverSeries , r = (m = m.relatedTarget || m.toElement) && m.point && m.point.series; if (p && !p.options.stickyTracking && !this.inClass(m, "highcharts-tooltip") && r !== p) { p.onMouseOut() } }, onContainerClick: function(m) { var p = this.chart , r = p.hoverPoint , s = p.plotLeft , t = p.plotTop , m = this.normalize(m); m.originalEvent = m; m.cancelBubble = !0; p.cancelClick || (r && this.inClass(m.target, "highcharts-tracker") ? (aR(r.series, "click", bh(m, { point: r })), p.hoverPoint && r.firePointEvent("click", m)) : (bh(m, this.getCoordinates(m)), p.isInsidePlot(m.chartX - s, m.chartY - t) && aR(p, "click", m))) }, setDOMEvents: function() { var m = this , p = m.chart.container; p.onmousedown = function(r) { m.onContainerMouseDown(r) } ; p.onmousemove = function(r) { m.onContainerMouseMove(r) } ; p.onclick = function(r) { m.onContainerClick(r) } ; aW(p, "mouseleave", m.onContainerMouseLeave); n === 1 && aW(c, "mouseup", m.onDocumentMouseUp); if (f) { p.ontouchstart = function(r) { m.onContainerTouchStart(r) } , p.ontouchmove = function(r) { m.onContainerTouchMove(r) } , n === 1 && aW(c, "touchend", m.onDocumentTouchEnd) } }, destroy: function() { var m; bU(this.chart.container, "mouseleave", this.onContainerMouseLeave); n || (bU(c, "mouseup", this.onDocumentMouseUp), bU(c, "touchend", this.onDocumentTouchEnd)); clearInterval(this.tooltipTimeout); for (m in this) { this[m] = null } } }; bh(bI.Pointer.prototype, { pinchTranslate: function(m, p, r, s, t, u) { (this.zoomHor || this.pinchHor) && this.pinchTranslateDirection(!0, m, p, r, s, t, u); (this.zoomVert || this.pinchVert) && this.pinchTranslateDirection(!1, m, p, r, s, t, u) }, pinchTranslateDirection: function(z, A, B, F, G, H, I, J) { var K = this.chart, L = z ? "x" : "y", M = z ? "X" : "Y", N = "chart" + M, P = z ? "width" : "height", Q = K["plot" + (z ? "Left" : "Top")], T, R, O = J || 1, D = K.inverted, Y = K.bounds[z ? "h" : "v"], V = A.length === 1, U = A[0][N], W = B[0][N], X = !V && A[1][N], b3 = !V && B[1][N], Z, B = function() { !V && a1(U - X) > 20 && (O = J || a1(W - b3) / a1(U - X)); R = (Q - W) / O + U; T = K["plot" + (z ? "Width" : "Height")] / O }; B(); A = R; A < Y.min ? (A = Y.min, Z = !0) : A + T > Y.max && (A = Y.max - T, Z = !0); Z ? (W -= 0.8 * (W - I[L][0]), V || (b3 -= 0.8 * (b3 - I[L][1])), B()) : I[L] = [W, b3]; D || (H[L] = R - Q, H[P] = T); H = D ? 1 / O : O; G[P] = T; G[L] = A; F[D ? z ? "scaleY" : "scaleX" : "scale" + M] = O; F["translate" + M] = H * Q + (W - H * U) }, pinch: function(m) { var p = this , r = p.chart , s = p.pinchDown , t = m.touches , u = t.length , w = p.lastValidTouch , x = p.hasZoom , z = p.selectionMarker , A = {} , B = u === 1 && (p.inClass(m.target, "highcharts-tracker") && r.runTrackerClick || p.runChartClick) , D = {}; x && !B && m.preventDefault(); bA(t, function(F) { return p.normalize(F) }); if (m.type === "touchstart") { aQ(t, function(F, G) { s[G] = { chartX: F.chartX, chartY: F.chartY } }), w.x = [s[0].chartX, s[1] && s[1].chartX], w.y = [s[0].chartY, s[1] && s[1].chartY], aQ(r.axes, function(F) { if (F.zoomEnabled) { var G = r.bounds[F.horiz ? "h" : "v"] , H = F.minPixelPadding , I = F.toPixels(a6(F.options.min, F.dataMin)) , J = F.toPixels(a6(F.options.max, F.dataMax)) , K = aw(I, J) , I = bs(I, J); G.min = aw(F.pos, K - H); G.max = bs(F.pos + F.len, I + H) } }), p.res = !0 } else { if (s.length) { if (!z) { p.selectionMarker = z = bh({ destroy: aS }, r.plotBox) } p.pinchTranslate(s, t, A, z, D, w); p.hasPinched = x; p.scaleGroups(A, D); if (!x && p.followTouchMove && u === 1) { this.runPointActions(p.normalize(m)) } else { if (p.res) { p.res = !1, this.reset(!1, 0) } } } } }, onContainerTouchStart: function(m) { var p = this.chart; a2 = p.index; m.touches.length === 1 ? (m = this.normalize(m), p.isInsidePlot(m.chartX - p.plotLeft, m.chartY - p.plotTop) && !p.openMenu ? (this.runPointActions(m), this.pinch(m)) : this.reset()) : m.touches.length === 2 && this.pinch(m) }, onContainerTouchMove: function(m) { (m.touches.length === 1 || m.touches.length === 2) && this.pinch(m) }, onDocumentTouchEnd: function(m) { bP[a2] && bP[a2].pointer.drop(m) } }); if (aq.PointerEvent || aq.MSPointerEvent) { var bK = {} , h = !!aq.PointerEvent , bN = function() { var m, p = []; p.item = function(r) { return this[r] } ; for (m in bK) { bK.hasOwnProperty(m) && p.push({ pageX: bK[m].pageX, pageY: bK[m].pageY, target: bK[m].target }) } return p } , o = function(m, p, r, s) { m = m.originalEvent || m; if ((m.pointerType === "touch" || m.pointerType === m.MSPOINTER_TYPE_TOUCH) && bP[a2]) { s(m), s = bP[a2].pointer, s[p]({ type: r, target: m.currentTarget, preventDefault: aS, touches: bN() }) } }; bh(bF.prototype, { onContainerPointerDown: function(m) { o(m, "onContainerTouchStart", "touchstart", function(p) { bK[p.pointerId] = { pageX: p.pageX, pageY: p.pageY, target: p.currentTarget } }) }, onContainerPointerMove: function(m) { o(m, "onContainerTouchMove", "touchmove", function(p) { bK[p.pointerId] = { pageX: p.pageX, pageY: p.pageY }; if (!bK[p.pointerId].target) { bK[p.pointerId].target = p.currentTarget } }) }, onDocumentPointerUp: function(m) { o(m, "onDocumentTouchEnd", "touchend", function(p) { delete bK[p.pointerId] }) }, batchMSEvents: function(m) { m(this.chart.container, h ? "pointerdown" : "MSPointerDown", this.onContainerPointerDown); m(this.chart.container, h ? "pointermove" : "MSPointerMove", this.onContainerPointerMove); m(c, h ? "pointerup" : "MSPointerUp", this.onDocumentPointerUp) } }); y(bF.prototype, "init", function(m, p, r) { m.call(this, p, r); this.hasZoom && ah(p.container, { "-ms-touch-action": bi, "touch-action": bi }) }); y(bF.prototype, "setDOMEvents", function(m) { m.apply(this); (this.hasZoom || this.followTouchMove) && this.batchMSEvents(aW) }); y(bF.prototype, "destroy", function(m) { this.batchMSEvents(bU); m.call(this) }) } var aU = bI.Legend = function(m, p) { this.init(m, p) } ; aU.prototype = { init: function(m, p) { var r = this , s = p.itemStyle , t = p.itemMarginTop || 0; this.options = p; if (p.enabled) { r.itemStyle = s, r.itemHiddenStyle = bY(s, p.itemHiddenStyle), r.itemMarginTop = t, r.padding = s = a6(p.padding, 8), r.initialItemX = s, r.initialItemY = s - 5, r.maxItemWidth = 0, r.chart = m, r.itemHeight = 0, r.symbolWidth = a6(p.symbolWidth, 16), r.pages = [], r.render(), aW(r.chart, "endResize", function() { r.positionCheckboxes() }) } }, colorizeItem: function(m, p) { var r = this.options, s = m.legendItem, t = m.legendLine, u = m.legendSymbol, w = this.itemHiddenStyle.color, r = p ? r.itemStyle.color : w, x = p ? m.legendColor || m.color || "#CCC" : w, w = m.options && m.options.marker, z = { fill: x }, A; s && s.css({ fill: r, color: r }); t && t.attr({ stroke: x }); if (u) { if (w && u.isMarker) { for (A in z.stroke = x, w = m.convertAttribs(w), w) { s = w[A], s !== by && (z[A] = s) } } u.attr(z) } }, positionItem: function(m) { var p = this.options , r = p.symbolPadding , p = !p.rtl , s = m._legendItemPos , t = s[0] , s = s[1] , u = m.checkbox; m.legendGroup && m.legendGroup.translate(p ? t : this.legendWidth - t - 2 * r - 4, s); if (u) { u.x = t, u.y = s } }, destroyItem: function(m) { var p = m.checkbox; aQ(["legendItem", "legendLine", "legendSymbol", "legendGroup"], function(r) { m[r] && (m[r] = m[r].destroy()) }); p && bk(m.checkbox) }, clearItems: function() { var m = this; aQ(m.getAllItems(), function(p) { m.destroyItem(p) }) }, destroy: function() { var m = this.group , p = this.box; if (p) { this.box = p.destroy() } if (m) { this.group = m.destroy() } }, positionCheckboxes: function(m) { var p = this.group.alignAttr, r, s = this.clipHeight || this.legendHeight; if (p) { r = p.translateY, aQ(this.allItems, function(t) { var u = t.checkbox, w; u && (w = r + u.y + (m || 0) + 3, ah(u, { left: p.translateX + t.checkboxOffset + u.x - 20 + "px", top: w + "px", display: w > r - 6 && w < r + s - 6 ? "" : bi })) }) } }, renderTitle: function() { var m = this.padding , p = this.options.title , r = 0; if (p.text) { if (!this.title) { this.title = this.chart.renderer.label(p.text, m - 3, m - 4, null, null, null, null, null, "legend-title").attr({ zIndex: 1 }).css(p.style).add(this.group) } m = this.title.getBBox(); r = m.height; this.offsetWidth = m.width; this.contentGroup.attr({ translateY: r }) } this.titleHeight = r }, renderItem: function(p) { var t = this.chart , u = t.renderer , w = this.options , x = w.layout === "horizontal" , z = this.symbolWidth , A = w.symbolPadding , B = this.itemStyle , D = this.itemHiddenStyle , F = this.padding , G = x ? a6(w.itemDistance, 20) : 0 , H = !w.rtl , J = w.width , K = w.itemMarginBottom || 0 , L = this.itemMarginTop , P = this.initialItemX , I = p.legendItem , N = p.series && p.series.drawLegendSymbol ? p.series : p , O = N.options , O = this.createCheckboxForItem && O && O.showCheckbox , M = w.useHTML; if (!I) { p.legendGroup = u.g("legend-item").attr({ zIndex: 1 }).add(this.scrollGroup); p.legendItem = I = u.text(w.labelFormat ? aD(w.labelFormat, p) : w.labelFormatter.call(p), H ? z + A : -A, this.baseline || 0, M).css(bY(p.visible ? B : D)).attr({ align: H ? "left" : "right", zIndex: 2 }).add(p.legendGroup); if (!this.baseline) { this.fontMetrics = u.fontMetrics(B.fontSize, I), this.baseline = this.fontMetrics.f + 3 + L, I.attr("y", this.baseline) } N.drawLegendSymbol(this, p); this.setItemEvents && this.setItemEvents(p, I, M, B, D); this.colorizeItem(p, p.visible); O && this.createCheckboxForItem(p) } u = I.getBBox(); z = p.checkboxOffset = w.itemWidth || p.legendItemWidth || z + A + u.width + G + (O ? 20 : 0); this.itemHeight = A = bO(p.legendItemHeight || u.height); if (x && this.itemX - P + z > (J || t.chartWidth - 2 * F - P - w.x)) { this.itemX = P, this.itemY += L + this.lastLineHeight + K, this.lastLineHeight = 0 } this.maxItemWidth = bs(this.maxItemWidth, z); this.lastItemY = L + this.itemY + K; this.lastLineHeight = bs(A, this.lastLineHeight); p._legendItemPos = [this.itemX, this.itemY]; x ? this.itemX += z : (this.itemY += L + A + K, this.lastLineHeight = A); this.offsetWidth = J || bs((x ? this.itemX - P - G : z) + F, this.offsetWidth) }, getAllItems: function() { var m = []; aQ(this.chart.series, function(p) { var r = p.options; if (a6(r.showInLegend, !bn(r.linkedTo) ? by : !1, !0)) { m = m.concat(p.legendItems || (r.legendType === "point" ? p.data : p)) } }); return m }, adjustMargins: function(m, p) { var r = this.chart , s = this.options , t = s.align[0] + s.verticalAlign[0] + s.layout[0]; this.display && !s.floating && aQ([/(lth|ct|rth)/, /(rtv|rm|rbv)/, /(rbh|cb|lbh)/, /(lbv|lm|ltv)/], function(u, w) { u.test(t) && !bn(m[w]) && (r[az[w]] = bs(r[az[w]], r.legend[(w + 1) % 2 ? "legendHeight" : "legendWidth"] + [1, -1, -1, 1][w] * s[w % 2 ? "x" : "y"] + a6(s.margin, 12) + p[w])) }) }, render: function() { var m = this, p = m.chart, r = p.renderer, s = m.group, t, u, w, x, z = m.box, A = m.options, B = m.padding, D = A.borderWidth, F = A.backgroundColor; m.itemX = m.initialItemX; m.itemY = m.initialItemY; m.offsetWidth = 0; m.lastItemY = 0; if (!s) { m.group = s = r.g("legend").attr({ zIndex: 7 }).add(), m.contentGroup = r.g().attr({ zIndex: 1 }).add(s), m.scrollGroup = r.g().add(m.contentGroup) } m.renderTitle(); t = m.getAllItems(); bf(t, function(G, H) { return (G.options && G.options.legendIndex || 0) - (H.options && H.options.legendIndex || 0) }); A.reversed && t.reverse(); m.allItems = t; m.display = u = !!t.length; m.lastLineHeight = 0; aQ(t, function(G) { m.renderItem(G) }); w = (A.width || m.offsetWidth) + B; x = m.lastItemY + m.lastLineHeight + m.titleHeight; x = m.handleOverflow(x); x += B; if (D || F) { if (z) { if (w > 0 && x > 0) { z[z.isNew ? "attr" : "animate"](z.crisp({ width: w, height: x })), z.isNew = !1 } } else { m.box = z = r.rect(0, 0, w, x, A.borderRadius, D || 0).attr({ stroke: A.borderColor, "stroke-width": D || 0, fill: F || bi }).add(s).shadow(A.shadow), z.isNew = !0 } z[u ? "show" : "hide"]() } m.legendWidth = w; m.legendHeight = x; aQ(t, function(G) { m.positionItem(G) }); u && s.align(bh({ width: w, height: x }, A), !0, "spacingBox"); p.isResizing || this.positionCheckboxes() }, handleOverflow: function(m) { var p = this, r = this.chart, s = r.renderer, t = this.options, u = t.y, u = r.spacingBox.height + (t.verticalAlign === "top" ? -u : u) - this.padding, w = t.maxHeight, x, z = this.clipRect, A = t.navigation, B = a6(A.animation, !0), D = A.arrowSize || 12, F = this.nav, G = this.pages, H, I = this.allItems; t.layout === "horizontal" && (u /= 2); w && (u = aw(u, w)); G.length = 0; if (m > u && !t.useHTML) { this.clipHeight = x = bs(u - 20 - this.titleHeight - this.padding, 0); this.currentPage = a6(this.currentPage, 1); this.fullHeight = m; aQ(I, function(J, K) { var L = J._legendItemPos[1] , M = bO(J.legendItem.getBBox().height) , N = G.length; if (!N || L - G[N - 1] > x && (H || L) !== G[N - 1]) { G.push(H || L), N++ } K === I.length - 1 && L + M - G[N - 1] > x && G.push(L); L !== H && (H = L) }); if (!z) { z = p.clipRect = s.clipRect(0, this.padding, 9999, 0), p.contentGroup.clip(z) } z.attr({ height: x }); if (!F) { this.nav = F = s.g().attr({ zIndex: 1 }).add(this.group), this.up = s.symbol("triangle", 0, 0, D, D).on("click", function() { p.scroll(-1, B) }).add(F), this.pager = s.text("", 15, 10).css(A.style).add(F), this.down = s.symbol("triangle-down", 0, 0, D, D).on("click", function() { p.scroll(1, B) }).add(F) } p.scroll(0); m = u } else { if (F) { z.attr({ height: r.chartHeight }), F.hide(), this.scrollGroup.attr({ translateY: 1 }), this.clipHeight = 0 } } return m }, scroll: function(m, p) { var r = this.pages , s = r.length , t = this.currentPage + m , u = this.clipHeight , w = this.options.navigation , x = w.activeColor , w = w.inactiveColor , z = this.pager , A = this.padding; t > s && (t = s); if (t > 0) { p !== by && bp(p, this.chart), this.nav.attr({ translateX: A, translateY: u + this.padding + 7 + this.titleHeight, visibility: "visible" }), this.up.attr({ fill: t === 1 ? w : x }).css({ cursor: t === 1 ? "default" : "pointer" }), z.attr({ text: t + "/" + s }), this.down.attr({ x: 18 + this.pager.getBBox().width, fill: t === s ? w : x }).css({ cursor: t === s ? "default" : "pointer" }), r = -r[t - 1] + this.initialItemY, this.scrollGroup.animate({ translateY: r }), this.currentPage = t, this.positionCheckboxes(r) } } }; aY = bI.LegendSymbolMixin = { drawRectangle: function(m, p) { var r = m.options.symbolHeight || m.fontMetrics.f; p.legendSymbol = this.chart.renderer.rect(0, m.baseline - r + 1, m.symbolWidth, r, m.options.symbolRadius || 0).attr({ zIndex: 3 }).add(p.legendGroup) }, drawLineMarker: function(m) { var p = this.options, r = p.marker, s; s = m.symbolWidth; var t = this.chart.renderer, u = this.legendGroup, m = m.baseline - bO(m.fontMetrics.b * 0.3), w; if (p.lineWidth) { w = { "stroke-width": p.lineWidth }; if (p.dashStyle) { w.dashstyle = p.dashStyle } this.legendLine = t.path(["M", 0, m, "L", s, m]).attr(w).add(u) } if (r && r.enabled !== !1) { p = r.radius, this.legendSymbol = s = t.symbol(this.symbol, s / 2 - p, m - p, 2 * p, 2 * p).add(u), s.isMarker = !0 } } }; (/Trident\/7\.0/.test(l) || aN) && y(aU.prototype, "positionItem", function(m, p) { var r = this , s = function() { p._legendItemPos && m.call(r, p) }; s(); setTimeout(s) }); E = bI.Chart = function() { this.init.apply(this, arguments) } ; E.prototype = { callbacks: [], init: function(m, p) { var r, s = m.series; m.series = null; r = bY(a7, m); r.series = m.series = s; this.userOptions = m; s = r.chart; this.margin = this.splashArray("margin", s); this.spacing = this.splashArray("spacing", s); var t = s.events; this.bounds = { h: {}, v: {} }; this.callback = p; this.isResizing = 0; this.options = r; this.axes = []; this.series = []; this.hasCartesianSeries = s.showAxes; var u = this, w; u.index = bP.length; bP.push(u); n++; s.reflow !== !1 && aW(u, "load", function() { u.initReflow() }); if (t) { for (w in t) { aW(u, w, t[w]) } } u.xAxis = []; u.yAxis = []; u.animation = ad ? !1 : a6(s.animation, !0); u.pointCount = u.colorCounter = u.symbolCounter = 0; u.firstRender() }, initSeries: function(m) { var p = this.options.chart; (p = aB[m.type || p.type || p.defaultSeriesType]) || aH(17, !0); p = new p; p.init(this, m); return p }, isInsidePlot: function(m, p, r) { var s = r ? p : m , m = r ? m : p; return s >= 0 && s <= this.plotWidth && m >= 0 && m <= this.plotHeight }, redraw: function(m) { var p = this.axes, r = this.series, s = this.pointer, t = this.legend, u = this.isDirtyLegend, w, x, z = this.hasCartesianSeries, A = this.isDirtyBox, B = r.length, D = B, F = this.renderer, G = F.isHidden(), H = []; bp(m, this); G && this.cloneRenderTo(); for (this.layOutTitles(); D--; ) { if (m = r[D], m.options.stacking && (w = !0, m.isDirty)) { x = !0; break } } if (x) { for (D = B; D--; ) { if (m = r[D], m.options.stacking) { m.isDirty = !0 } } } aQ(r, function(I) { I.isDirty && I.options.legendType === "point" && (u = !0) }); if (u && t.options.enabled) { t.render(), this.isDirtyLegend = !1 } w && this.getStacks(); if (z && !this.isResizing) { this.maxTicks = null, aQ(p, function(I) { I.setScale() }) } this.getMargins(); z && (aQ(p, function(I) { I.isDirty && (A = !0) }), aQ(p, function(I) { if (I.isDirtyExtremes) { I.isDirtyExtremes = !1, H.push(function() { aR(I, "afterSetExtremes", bh(I.eventArgs, I.getExtremes())); delete I.eventArgs }) } (A || w) && I.redraw() })); A && this.drawChartBox(); aQ(r, function(I) { I.isDirty && I.visible && (!I.isCartesian || I.xAxis) && I.redraw() }); s && s.reset(!0); F.draw(); aR(this, "redraw"); G && this.cloneRenderTo(!0); aQ(H, function(I) { I.call() }) }, get: function(m) { var p = this.axes, r = this.series, s, t; for (s = 0; s < p.length; s++) { if (p[s].options.id === m) { return p[s] } } for (s = 0; s < r.length; s++) { if (r[s].options.id === m) { return r[s] } } for (s = 0; s < r.length; s++) { t = r[s].points || []; for (p = 0; p < t.length; p++) { if (t[p].id === m) { return t[p] } } } return null }, getAxes: function() { var m = this , p = this.options , r = p.xAxis = bj(p.xAxis || {}) , p = p.yAxis = bj(p.yAxis || {}); aQ(r, function(s, t) { s.index = t; s.isX = !0 }); aQ(p, function(s, t) { s.index = t }); r = r.concat(p); aQ(r, function(s) { new bE(m,s) }) }, getSelectedPoints: function() { var m = []; aQ(this.series, function(p) { m = m.concat(aJ(p.points || [], function(r) { return r.selected })) }); return m }, getSelectedSeries: function() { return aJ(this.series, function(m) { return m.selected }) }, getStacks: function() { var m = this; aQ(m.yAxis, function(p) { if (p.stacks && p.hasVisibleSeries) { p.oldStacks = p.stacks } }); aQ(m.series, function(p) { if (p.options.stacking && (p.visible === !0 || m.options.chart.ignoreHiddenSeries === !1)) { p.stackKey = p.type + a6(p.options.stack, "") } }) }, setTitle: function(m, p, r) { var w; var s = this, t = s.options, u; u = t.title = bY(t.title, m); w = t.subtitle = bY(t.subtitle, p), t = w; aQ([["title", m, u], ["subtitle", p, t]], function(x) { var z = x[0] , A = s[z] , B = x[1] , x = x[2]; A && B && (s[z] = A = A.destroy()); x && x.text && !A && (s[z] = s.renderer.text(x.text, 0, 0, x.useHTML).attr({ align: x.align, "class": "highcharts-" + z, zIndex: x.zIndex || 4 }).css(x.style).add()) }); s.layOutTitles(r) }, layOutTitles: function(m) { var p = 0 , r = this.title , s = this.subtitle , t = this.options , u = t.title , t = t.subtitle , w = this.renderer , x = this.spacingBox.width - 44; if (r && (r.css({ width: (u.width || x) + "px" }).align(bh({ y: w.fontMetrics(u.style.fontSize, r).b - 3 }, u), !1, "spacingBox"), !u.floating && !u.verticalAlign)) { p = r.getBBox().height } s && (s.css({ width: (t.width || x) + "px" }).align(bh({ y: p + (u.margin - 13) + w.fontMetrics(u.style.fontSize, s).b }, t), !1, "spacingBox"), !t.floating && !t.verticalAlign && (p = bo(p + s.getBBox().height))); r = this.titleOffset !== p; this.titleOffset = p; if (!this.isDirtyBox && r) { this.isDirtyBox = r, this.hasRendered && a6(m, !0) && this.isDirtyBox && this.redraw() } }, getChartSize: function() { var m = this.options.chart , p = m.width , m = m.height , r = this.renderToClone || this.renderTo; if (!bn(p)) { this.containerWidth = aE(r, "width") } if (!bn(m)) { this.containerHeight = aE(r, "height") } this.chartWidth = bs(0, p || this.containerWidth || 600); this.chartHeight = bs(0, a6(m, this.containerHeight > 19 ? this.containerHeight : 400)) }, cloneRenderTo: function(m) { var p = this.renderToClone , r = this.container; m ? p && (this.renderTo.appendChild(r), bk(p), delete this.renderToClone) : (r && r.parentNode === this.renderTo && this.renderTo.removeChild(r), this.renderToClone = p = this.renderTo.cloneNode(0), ah(p, { position: "absolute", top: "-9999px", display: "block" }), p.style.setProperty && p.style.setProperty("display", "block", "important"), c.body.appendChild(p), r && p.appendChild(r)) }, getContainer: function() { var m, p = this.options.chart, r, s, t; this.renderTo = m = p.renderTo; t = "highcharts-" + bX++; if (aa(m)) { this.renderTo = m = c.getElementById(m) } m || aH(13, !0); r = i(aL(m, "data-highcharts-chart")); !isNaN(r) && bP[r] && bP[r].hasRendered && bP[r].destroy(); aL(m, "data-highcharts-chart", this.index); m.innerHTML = ""; !p.skipClone && !m.offsetWidth && this.cloneRenderTo(); this.getChartSize(); r = this.chartWidth; s = this.chartHeight; this.container = m = bZ(aI, { className: "highcharts-container" + (p.className ? " " + p.className : ""), id: t }, bh({ position: "relative", overflow: "hidden", width: r + "px", height: s + "px", textAlign: "left", lineHeight: "normal", zIndex: 0, "-webkit-tap-highlight-color": "rgba(0,0,0,0)" }, p.style), this.renderToClone || m); this._cursor = m.style.cursor; this.renderer = p.forExport ? new bu(m,r,s,p.style,!0) : new b(m,r,s,p.style); ad && this.renderer.create(this, m, r, s); this.renderer.chartIndex = this.index }, getMargins: function(m) { var p = this.spacing , r = this.margin , s = this.titleOffset; this.resetMargins(); if (s && !bn(r[0])) { this.plotTop = bs(this.plotTop, s + this.options.title.margin + p[0]) } this.legend.adjustMargins(r, p); this.extraBottomMargin && (this.marginBottom += this.extraBottomMargin); this.extraTopMargin && (this.plotTop += this.extraTopMargin); m || this.getAxisMargins() }, getAxisMargins: function() { var m = this , p = m.axisOffset = [0, 0, 0, 0] , r = m.margin; m.hasCartesianSeries && aQ(m.axes, function(s) { s.getOffset() }); aQ(az, function(s, t) { bn(r[t]) || (m[s] += p[t]) }); m.setChartSize() }, reflow: function(m) { var p = this , r = p.options.chart , s = p.renderTo , t = r.width || aE(s, "width") , u = r.height || aE(s, "height") , r = m ? m.target : aq , s = function() { if (p.container) { p.setSize(t, u, !1), p.hasUserSize = null } }; if (!p.hasUserSize && !p.isPrinting && t && u && (r === aq || r === c)) { if (t !== p.containerWidth || u !== p.containerHeight) { clearTimeout(p.reflowTimeout), m ? p.reflowTimeout = setTimeout(s, 100) : s() } p.containerWidth = t; p.containerHeight = u } }, initReflow: function() { var m = this , p = function(r) { m.reflow(r) }; aW(aq, "resize", p); aW(m, "destroy", function() { bU(aq, "resize", p) }) }, setSize: function(m, p, r) { var s = this, t, u, w; s.isResizing += 1; w = function() { s && aR(s, "endResize", null, function() { s.isResizing -= 1 }) } ; bp(r, s); s.oldChartHeight = s.chartHeight; s.oldChartWidth = s.chartWidth; if (bn(m)) { s.chartWidth = t = bs(0, bO(m)), s.hasUserSize = !!t } if (bn(p)) { s.chartHeight = u = bs(0, bO(p)) } (b0 ? aO : ah)(s.container, { width: t + "px", height: u + "px" }, b0); s.setChartSize(!0); s.renderer.setSize(t, u, r); s.maxTicks = null; aQ(s.axes, function(x) { x.isDirty = !0; x.setScale() }); aQ(s.series, function(x) { x.isDirty = !0 }); s.isDirtyLegend = !0; s.isDirtyBox = !0; s.layOutTitles(); s.getMargins(); s.redraw(r); s.oldChartHeight = null; aR(s, "resize"); b0 === !1 ? w() : setTimeout(w, b0 && b0.duration || 500) }, setChartSize: function(m) { var p = this.inverted, r = this.renderer, s = this.chartWidth, t = this.chartHeight, u = this.options.chart, w = this.spacing, x = this.clipOffset, z, A, B, D; this.plotLeft = z = bO(this.plotLeft); this.plotTop = A = bO(this.plotTop); this.plotWidth = B = bs(0, bO(s - z - this.marginRight)); this.plotHeight = D = bs(0, bO(t - A - this.marginBottom)); this.plotSizeX = p ? D : B; this.plotSizeY = p ? B : D; this.plotBorderWidth = u.plotBorderWidth || 0; this.spacingBox = r.spacingBox = { x: w[3], y: w[0], width: s - w[3] - w[1], height: t - w[0] - w[2] }; this.plotBox = r.plotBox = { x: z, y: A, width: B, height: D }; s = 2 * bz(this.plotBorderWidth / 2); p = bo(bs(s, x[3]) / 2); r = bo(bs(s, x[0]) / 2); this.clipBox = { x: p, y: r, width: bz(this.plotSizeX - bs(s, x[1]) / 2 - p), height: bs(0, bz(this.plotSizeY - bs(s, x[2]) / 2 - r)) }; m || aQ(this.axes, function(F) { F.setAxisSize(); F.setAxisTranslation() }) }, resetMargins: function() { var m = this; aQ(az, function(p, r) { m[p] = a6(m.margin[r], m.spacing[r]) }); m.axisOffset = [0, 0, 0, 0]; m.clipOffset = [0, 0, 0, 0] }, drawChartBox: function() { var u = this.options.chart, w = this.renderer, x = this.chartWidth, z = this.chartHeight, A = this.chartBackground, B = this.plotBackground, D = this.plotBorder, F = this.plotBGImage, G = u.borderWidth || 0, H = u.backgroundColor, I = u.plotBackgroundColor, J = u.plotBackgroundImage, L = u.plotBorderWidth || 0, M, O = this.plotLeft, N = this.plotTop, K = this.plotWidth, Q = this.plotHeight, T = this.plotBox, P = this.clipRect, R = this.clipBox; M = G + (u.shadow ? 8 : 0); if (G || H) { if (A) { A.animate(A.crisp({ width: x - M, height: z - M })) } else { A = { fill: H || bi }; if (G) { A.stroke = u.borderColor, A["stroke-width"] = G } this.chartBackground = w.rect(M / 2, M / 2, x - M, z - M, u.borderRadius, G).attr(A).addClass("highcharts-background").add().shadow(u.shadow) } } if (I) { B ? B.animate(T) : this.plotBackground = w.rect(O, N, K, Q, 0).attr({ fill: I }).add().shadow(u.plotShadow) } if (J) { F ? F.animate(T) : this.plotBGImage = w.image(J, O, N, K, Q).add() } P ? P.animate({ width: R.width, height: R.height }) : this.clipRect = w.clipRect(R); if (L) { D ? D.animate(D.crisp({ x: O, y: N, width: K, height: Q, strokeWidth: -L })) : this.plotBorder = w.rect(O, N, K, Q, 0, -L).attr({ stroke: u.plotBorderColor, "stroke-width": L, fill: bi, zIndex: 1 }).add() } this.isDirtyBox = !1 }, propFromSeries: function() { var m = this, p = m.options.chart, r, s = m.options.series, t, u; aQ(["inverted", "angular", "polar"], function(w) { r = aB[p.type || p.defaultSeriesType]; u = m[w] || p[w] || r && r.prototype[w]; for (t = s && s.length; !u && t--; ) { (r = aB[s[t].type]) && r.prototype[w] && (u = !0) } m[w] = u }) }, linkSeries: function() { var m = this , p = m.series; aQ(p, function(r) { r.linkedSeries.length = 0 }); aQ(p, function(r) { var s = r.options.linkedTo; if (aa(s) && (s = s === ":previous" ? m.series[r.index - 1] : m.get(s))) { s.linkedSeries.push(r), r.linkedParent = s } }) }, renderSeries: function() { aQ(this.series, function(m) { m.translate(); m.render() }) }, renderLabels: function() { var m = this , p = m.options.labels; p.items && aQ(p.items, function(r) { var s = bh(p.style, r.style) , t = i(s.left) + m.plotLeft , u = i(s.top) + m.plotTop + 12; delete s.left; delete s.top; m.renderer.text(r.html, t, u).attr({ zIndex: 2 }).css(s).add() }) }, render: function() { var m = this.axes, p = this.renderer, r = this.options, s, t, u, w; this.setTitle(); this.legend = new aU(this,r.legend); this.getStacks(); this.getMargins(!0); this.setChartSize(); s = this.plotWidth; t = this.plotHeight -= 13; aQ(m, function(x) { x.setScale() }); this.getAxisMargins(); u = s / this.plotWidth > 1.1; w = t / this.plotHeight > 1.1; if (u || w) { this.maxTicks = null, aQ(m, function(x) { (x.horiz && u || !x.horiz && w) && x.setTickInterval(!0) }), this.getMargins() } this.drawChartBox(); this.hasCartesianSeries && aQ(m, function(x) { x.render() }); if (!this.seriesGroup) { this.seriesGroup = p.g("series-group").attr({ zIndex: 3 }).add() } this.renderSeries(); this.renderLabels(); this.showCredits(r.credits); this.hasRendered = !0 }, showCredits: function(m) { if (m.enabled && !this.credits) { this.credits = this.renderer.text(m.text, 0, 0).on("click", function() { if (m.href) { location.href = m.href } }).attr({ align: m.position.align, zIndex: 8 }).css(m.style).add().align(m.position) } }, destroy: function() { var m = this, p = m.axes, r = m.series, s = m.container, t, u = s && s.parentNode; aR(m, "destroy"); bP[m.index] = by; n--; m.renderTo.removeAttribute("data-highcharts-chart"); bU(m); for (t = p.length; t--; ) { p[t] = p[t].destroy() } for (t = r.length; t--; ) { r[t] = r[t].destroy() } aQ("title,subtitle,chartBackground,plotBackground,plotBGImage,plotBorder,seriesGroup,clipRect,credits,pointer,scroller,rangeSelector,legend,resetZoomButton,tooltip,renderer".split(","), function(w) { var x = m[w]; x && x.destroy && (m[w] = x.destroy()) }); if (s) { s.innerHTML = "", bU(s), u && bk(s) } for (t in m) { delete m[t] } }, isReadyToRender: function() { var m = this; return !j && aq == aq.top && c.readyState !== "complete" || ad && !aq.canvg ? (ad ? aP.push(function() { m.firstRender() }, m.options.global.canvasToolsURL) : c.attachEvent("onreadystatechange", function() { c.detachEvent("onreadystatechange", m.firstRender); c.readyState === "complete" && m.firstRender() }), !1) : !0 }, firstRender: function() { var m = this , p = m.options , r = m.callback; if (m.isReadyToRender()) { m.getContainer(); aR(m, "init"); m.resetMargins(); m.setChartSize(); m.propFromSeries(); m.getAxes(); aQ(p.series || [], function(s) { m.initSeries(s) }); m.linkSeries(); aR(m, "beforeRender"); if (bI.Pointer) { m.pointer = new bF(m,p) } m.render(); m.renderer.draw(); r && r.apply(m, [m]); aQ(m.callbacks, function(s) { m.index !== by && s.apply(m, [m]) }); aR(m, "load"); m.cloneRenderTo(!0) } }, splashArray: function(m, p) { var r = p[m] , r = q(r) ? r : [r, r, r, r]; return [a6(p[m + "Top"], r[0]), a6(p[m + "Right"], r[1]), a6(p[m + "Bottom"], r[2]), a6(p[m + "Left"], r[3])] } }; var bT = bI.CenteredSeriesMixin = { getCenter: function() { var m = this.options, p = this.chart, r = 2 * (m.slicedOffset || 0), s = p.plotWidth - 2 * r, p = p.plotHeight - 2 * r, t = m.center, t = [a6(t[0], "50%"), a6(t[1], "50%"), m.size || "100%", m.innerSize || 0], u = aw(s, p), w, x, z; for (x = 0; x < 4; ++x) { z = t[x], w = /%$/.test(z), m = x < 2 || x === 2 && w, t[x] = (w ? [s, p, u, t[2]][x] * i(z) / 100 : i(z)) + (m ? r : 0) } return t } } , an = function() {}; an.prototype = { init: function(m, p, r) { this.series = m; this.color = m.color; this.applyOptions(p, r); this.pointAttr = {}; if (m.options.colorByPoint && (p = m.options.colors || m.chart.options.colors, this.color = this.color || p[m.colorCounter++], m.colorCounter === p.length)) { m.colorCounter = 0 } m.chart.pointCount++; return this }, applyOptions: function(m, p) { var r = this.series , s = r.options.pointValKey || r.pointValKey , m = an.prototype.optionsToObject.call(this, m); bh(this, m); this.options = this.options ? bh(this.options, m) : m; if (s) { this.y = this[s] } if (this.x === by && r) { this.x = p === by ? r.autoIncrement() : p } return this }, optionsToObject: function(m) { var p = {} , r = this.series , s = r.options.keys , t = s || r.pointArrayMap || ["y"] , u = t.length , w = 0 , x = 0; if (typeof m === "number" || m === null) { p[t[0]] = m } else { if (at(m)) { if (!s && m.length > u) { r = typeof m[0]; if (r === "string") { p.name = m[0] } else { if (r === "number") { p.x = m[0] } } w++ } for (; x < u; ) { p[t[x++]] = m[w++] } } else { if (typeof m === "object") { p = m; if (m.dataLabels) { r._hasPointLabels = !0 } if (m.marker) { r._hasPointMarkers = !0 } } } } return p }, destroy: function() { var m = this.series.chart, p = m.hoverPoints, r; m.pointCount--; if (p && (this.setState(), ax(p, this), !p.length)) { m.hoverPoints = null } if (this === m.hoverPoint) { this.onMouseOut() } if (this.graphic || this.dataLabel) { bU(this), this.destroyElements() } this.legendItem && m.legend.destroyItem(this); for (r in this) { this[r] = null } }, destroyElements: function() { for (var m = "graphic,dataLabel,dataLabelUpper,group,connector,shadowGroup".split(","), p, r = 6; r--; ) { p = m[r], this[p] && (this[p] = this[p].destroy()) } }, getLabelConfig: function() { return { x: this.category, y: this.y, key: this.name || this.category, series: this.series, point: this, percentage: this.percentage, total: this.total || this.stackTotal } }, tooltipFormatter: function(m) { var p = this.series , r = p.tooltipOptions , s = a6(r.valueDecimals, "") , t = r.valuePrefix || "" , u = r.valueSuffix || ""; aQ(p.pointArrayMap || ["y"], function(w) { w = "{point." + w; if (t || u) { m = m.replace(w + "}", t + w + "}" + u) } m = m.replace(w + "}", w + ":,." + s + "f}") }); return aD(m, { point: this, series: this.series }) }, firePointEvent: function(m, p, r) { var s = this , t = this.series.options; (t.point.events[m] || s.options && s.options.events && s.options.events[m]) && this.importEvents(); m === "click" && t.allowPointSelect && (r = function(u) { s.select(null, u.ctrlKey || u.metaKey || u.shiftKey) } ); aR(this, m, p, r) } }; var bc = bI.Series = function() {} ; bc.prototype = { isCartesian: !0, type: "line", pointClass: an, sorted: !0, requireSorting: !0, pointAttrToOptions: { stroke: "lineColor", "stroke-width": "lineWidth", fill: "fillColor", r: "radius" }, axisTypes: ["xAxis", "yAxis"], colorCounter: 0, parallelArrays: ["x", "y"], init: function(m, p) { var r = this, s, t, u = m.series, w = function(x, z) { return a6(x.options.index, x._i) - a6(z.options.index, z._i) }; r.chart = m; r.options = p = r.setOptions(p); r.linkedSeries = []; r.bindAxes(); bh(r, { name: p.name, state: "", pointAttr: {}, visible: p.visible !== !1, selected: p.selected === !0 }); if (ad) { p.animation = !1 } t = p.events; for (s in t) { aW(r, s, t[s]) } if (t && t.click || p.point && p.point.events && p.point.events.click || p.allowPointSelect) { m.runTrackerClick = !0 } r.getColor(); r.getSymbol(); aQ(r.parallelArrays, function(x) { r[x + "Data"] = [] }); r.setData(p.data, !1); if (r.isCartesian) { m.hasCartesianSeries = !0 } u.push(r); r._i = u.length - 1; bf(u, w); this.yAxis && bf(this.yAxis.series, w); aQ(u, function(x, z) { x.index = z; x.name = x.name || "Series " + (z + 1) }) }, bindAxes: function() { var m = this, p = m.options, r = m.chart, s; aQ(m.axisTypes || [], function(t) { aQ(r[t], function(u) { s = u.options; if (p[t] === s.index || p[t] !== by && p[t] === s.id || p[t] === by && s.index === 0) { u.series.push(m), m[t] = u, u.isDirty = !0 } }); !m[t] && m.optionalAxis !== t && aH(18, !0) }) }, updateParallelArrays: function(m, p) { var r = m.series , s = arguments; aQ(r.parallelArrays, typeof p === "number" ? function(t) { var u = t === "y" && r.toYData ? r.toYData(m) : m[t]; r[t + "Data"][p] = u } : function(t) { Array.prototype[p].apply(r[t + "Data"], Array.prototype.slice.call(s, 2)) } ) }, autoIncrement: function() { var m = this.options, p = this.xIncrement, r, s = m.pointIntervalUnit, p = a6(p, m.pointStart, 0); this.pointInterval = r = a6(this.pointInterval, m.pointInterval, 1); if (s === "month" || s === "year") { m = new e(p), m = s === "month" ? +m[bG](m[bW]() + r) : +m[bM](m[b1]() + r), r = m - p } this.xIncrement = p + r; return p }, getSegments: function() { var m = -1, p = [], r, s = this.points, t = s.length; if (t) { if (this.options.connectNulls) { for (r = t; r--; ) { s[r].y === null && s.splice(r, 1) } s.length && (p = [s]) } else { aQ(s, function(u, w) { u.y === null ? (w > m + 1 && p.push(s.slice(m + 1, w)), m = w) : w === t - 1 && p.push(s.slice(m + 1, w + 1)) }) } } this.segments = p }, setOptions: function(m) { var p = this.chart , r = p.options.plotOptions , p = p.userOptions || {} , s = p.plotOptions || {} , t = r[this.type]; this.userOptions = m; r = bY(t, r.series, m); this.tooltipOptions = bY(a7.tooltip, a7.plotOptions[this.type].tooltip, p.tooltip, s.series && s.series.tooltip, s[this.type] && s[this.type].tooltip, m.tooltip); t.marker === null && delete r.marker; this.zoneAxis = r.zoneAxis; m = this.zones = (r.zones || []).slice(); if ((r.negativeColor || r.negativeFillColor) && !r.zones) { m.push({ value: r[this.zoneAxis + "Threshold"] || r.threshold || 0, color: r.negativeColor, fillColor: r.negativeFillColor }) } m.length && bn(m[m.length - 1].value) && m.push({ color: this.color, fillColor: this.fillColor }); return r }, getCyclic: function(m, p, r) { var s = this.userOptions , t = "_" + m + "Index" , u = m + "Counter"; p || (bn(s[t]) ? p = s[t] : (s[t] = p = this.chart[u] % r.length, this.chart[u] += 1), p = r[p]); this[m] = p }, getColor: function() { this.options.colorByPoint || this.getCyclic("color", this.options.color || d[this.type].color, this.chart.options.colors) }, getSymbol: function() { var m = this.options.marker; this.getCyclic("symbol", m.symbol, this.chart.options.symbols); if (/^url/.test(this.symbol)) { m.radius = 0 } }, drawLegendSymbol: aY.drawLineMarker, setData: function(m, p, r, t) { var u = this, w = u.points, x = w && w.length || 0, z, A = u.options, B = u.chart, D = null, F = u.xAxis, G = F && !!F.categories, H = A.turboThreshold, I = this.xData, K = this.yData, J = (z = u.pointArrayMap) && z.length, m = m || []; z = m.length; p = a6(p, !0); if (t !== !1 && z && x === z && !u.cropped && !u.hasGroupedData && u.visible) { aQ(m, function(s, L) { w[L].update(s, !1, null, !1) }) } else { u.xIncrement = null; u.pointRange = G ? 1 : A.pointRange; u.colorCounter = 0; aQ(this.parallelArrays, function(s) { u[s + "Data"].length = 0 }); if (H && z > H) { for (r = 0; D === null && r < z; ) { D = m[r], r++ } if (bd(D)) { G = a6(A.pointStart, 0); A = a6(A.pointInterval, 1); for (r = 0; r < z; r++) { I[r] = G, K[r] = m[r], G += A } u.xIncrement = G } else { if (at(D)) { if (J) { for (r = 0; r < z; r++) { A = m[r], I[r] = A[0], K[r] = A.slice(1, J + 1) } } else { for (r = 0; r < z; r++) { A = m[r], I[r] = A[0], K[r] = A[1] } } } else { aH(12) } } } else { for (r = 0; r < z; r++) { if (m[r] !== by && (A = { series: u }, u.pointClass.prototype.applyOptions.apply(A, [m[r]]), u.updateParallelArrays(A, r), G && A.name)) { F.names[A.x] = A.name } } } aa(K[0]) && aH(14, !0); u.data = []; u.options.data = m; for (r = x; r--; ) { w[r] && w[r].destroy && w[r].destroy() } if (F) { F.minRange = F.userMinRange } u.isDirty = u.isDirtyData = B.isDirtyBox = !0; r = !1 } p && B.redraw(r) }, processData: function(m) { var p = this.xData, r = this.yData, s = p.length, t; t = 0; var u, w, x = this.xAxis, z, A = this.options; z = A.cropThreshold; var B = this.isCartesian, D, F; if (B && !this.isDirty && !x.isDirty && !this.yAxis.isDirty && !m) { return !1 } if (x) { m = x.getExtremes(), D = m.min, F = m.max } if (B && this.sorted && (!z || s > z || this.forceCrop)) { if (p[s - 1] < D || p[0] > F) { p = [], r = [] } else { if (p[0] < D || p[s - 1] > F) { t = this.cropData(this.xData, this.yData, D, F), p = t.xData, r = t.yData, t = t.start, u = !0 } } } for (z = p.length - 1; z >= 0; z--) { s = p[z] - p[z - 1], s > 0 && (w === by || s < w) ? w = s : s < 0 && this.requireSorting && aH(15) } this.cropped = u; this.cropStart = t; this.processedXData = p; this.processedYData = r; if (A.pointRange === null) { this.pointRange = w || 1 } this.closestPointRange = w }, cropData: function(m, p, r, s) { var t = m.length, u = 0, w = t, x = a6(this.cropShoulder, 1), z; for (z = 0; z < t; z++) { if (m[z] >= r) { u = bs(0, z - x); break } } for (; z < t; z++) { if (m[z] > s) { w = z + x; break } } return { xData: m.slice(u, w), yData: p.slice(u, w), start: u, end: w } }, generatePoints: function() { var m = this.options.data, p = this.data, r, s = this.processedXData, t = this.processedYData, u = this.pointClass, w = s.length, x = this.cropStart || 0, z, A = this.hasGroupedData, B, D = [], F; if (!p && !A) { p = [], p.length = m.length, p = this.data = p } for (F = 0; F < w; F++) { z = x + F, A ? D[F] = (new u).init(this, [s[F]].concat(bj(t[F]))) : (p[z] ? B = p[z] : m[z] !== by && (p[z] = B = (new u).init(this, m[z], s[F])), D[F] = B), D[F].index = z } if (p && (w !== (r = p.length) || A)) { for (F = 0; F < r; F++) { if (F === x && !A && (F += w), p[F]) { p[F].destroyElements(), p[F].plotX = by } } } this.data = p; this.points = D }, getExtremes: function(m) { var p = this.yAxis, r = this.processedXData, s, t = [], u = 0; s = this.xAxis.getExtremes(); var w = s.min, x = s.max, z, A, B, D, m = m || this.stackedYData || this.processedYData; s = m.length; for (D = 0; D < s; D++) { if (A = r[D], B = m[D], z = B !== null && B !== by && (!p.isLog || B.length || B > 0), A = this.getExtremesFromAll || this.cropped || (r[D + 1] || A) >= w && (r[D - 1] || A) <= x, z && A) { if (z = B.length) { for (; z--; ) { B[z] !== null && (t[u++] = B[z]) } } else { t[u++] = B } } } this.dataMin = a9(t); this.dataMax = ai(t) }, translate: function() { this.processedXData || this.processData(); this.generatePoints(); for (var p = this.options, s = p.stacking, t = this.xAxis, w = t.categories, x = this.yAxis, z = this.points, A = z.length, B = !!this.modifyValue, D = p.pointPlacement, F = D === "between" || bd(D), G = p.threshold, H, J, K, L = Number.MAX_VALUE, p = 0; p < A; p++) { var I = z[p] , M = I.x , u = I.y; J = I.low; var N = s && x.stacks[(this.negStacks && u < G ? "-" : "") + this.stackKey]; if (x.isLog && u !== null && u <= 0) { I.y = u = null, aH(10) } I.plotX = H = t.translate(M, 0, 0, 0, 1, D, this.type === "flags"); if (s && this.visible && N && N[M]) { N = N[M], u = N.points[this.index + "," + p], J = u[0], u = u[1], J === 0 && (J = a6(G, x.min)), x.isLog && J <= 0 && (J = null), I.total = I.stackTotal = N.total, I.percentage = N.total && I.y / N.total * 100, I.stackY = u, N.setOffset(this.pointXOffset || 0, this.barW || 0) } I.yBottom = bn(J) ? x.translate(J, 0, 1, 0, 1) : null; B && (u = this.modifyValue(u, I)); I.plotY = J = typeof u === "number" && u !== Infinity ? aw(bs(-100000, x.translate(u, 0, 1, 0, 1)), 100000) : by; I.isInside = J !== by && J >= 0 && J <= x.len && H >= 0 && H <= t.len; I.clientX = F ? t.translate(M, 0, 0, 0, 1) : H; I.negative = I.y < (G || 0); I.category = w && w[I.x] !== by ? w[I.x] : I.x; p && (L = aw(L, a1(H - K))); K = H } this.closestPointRangePx = L; this.getSegments() }, setClip: function(m) { var p = this.chart , r = p.renderer , s = p.inverted , t = this.clipBox , u = t || p.clipBox , w = this.sharedClipKey || ["_sharedClip", m && m.duration, m && m.easing, u.height].join(",") , x = p[w] , z = p[w + "m"]; if (!x) { if (m) { u.width = 0, p[w + "m"] = z = r.clipRect(-99, s ? -p.plotLeft : -p.plotTop, 99, s ? p.chartWidth : p.chartHeight) } p[w] = x = r.clipRect(u) } m && (x.count += 1); if (this.options.clip !== !1) { this.group.clip(m || t ? x : p.clipRect), this.markerGroup.clip(z), this.sharedClipKey = w } m || (x.count -= 1, x.count <= 0 && w && p[w] && (t || (p[w] = p[w].destroy()), p[w + "m"] && (p[w + "m"] = p[w + "m"].destroy()))) }, animate: function(m) { var p = this.chart, r = this.options.animation, s; if (r && !q(r)) { r = d[this.type].animation } m ? this.setClip(r) : (s = this.sharedClipKey, (m = p[s]) && m.animate({ width: p.plotSizeX }, r), p[s + "m"] && p[s + "m"].animate({ width: p.plotSizeX + 99 }, r), this.animate = null) }, afterAnimate: function() { this.setClip(); aR(this, "afterAnimate") }, drawPoints: function() { var p, r = this.points, u = this.chart, w, x, z, A, B, D, F, G, H = this.options.marker, J = this.pointAttr[""], K, L, I, M = this.markerGroup, N = a6(H.enabled, this.xAxis.isRadial, this.closestPointRangePx > 2 * H.radius); if (H.enabled !== !1 || this._hasPointMarkers) { for (z = r.length; z--; ) { if (A = r[z], w = bz(A.plotX), x = A.plotY, G = A.graphic, K = A.marker || {}, L = !!A.marker, p = N && K.enabled === by || K.enabled, I = A.isInside, p && x !== by && !isNaN(x) && A.y !== null) { if (p = A.pointAttr[A.selected ? "select" : ""] || J, B = p.r, D = a6(K.symbol, this.symbol), F = D.indexOf("url") === 0, G) { G[I ? "show" : "hide"](!0).animate(bh({ x: w - B, y: x - B }, G.symbolName ? { width: 2 * B, height: 2 * B } : {})) } else { if (I && (B > 0 || F)) { A.graphic = u.renderer.symbol(D, w - B, x - B, 2 * B, 2 * B, L ? K : H).attr(p).add(M) } } } else { if (G) { A.graphic = G.destroy() } } } } }, convertAttribs: function(m, p, r, s) { var t = this.pointAttrToOptions, u, w, x = {}, m = m || {}, p = p || {}, r = r || {}, s = s || {}; for (u in t) { w = t[u], x[u] = a6(m[w], p[u], r[u], s[u]) } return x }, getAttribs: function() { var m = this, r = m.options, s = d[m.type].marker ? r.marker : r, w = s.states, x = w.hover, z, A = m.color, B = m.options.negativeColor; z = { stroke: A, fill: A }; var D = m.points || [], F, G = [], H, I = m.pointAttrToOptions; H = m.hasPointSpecificOptions; var J = s.lineColor , L = s.fillColor; F = r.turboThreshold; var K = m.zones, M = m.zoneAxis || "y", u; r.marker ? (x.radius = x.radius || s.radius + x.radiusPlus, x.lineWidth = x.lineWidth || s.lineWidth + x.lineWidthPlus) : (x.color = x.color || aX(x.color || A).brighten(x.brightness).get(), x.negativeColor = x.negativeColor || aX(x.negativeColor || B).brighten(x.brightness).get()); G[""] = m.convertAttribs(s, z); aQ(["hover", "select"], function(p) { G[p] = m.convertAttribs(w[p], G[""]) }); m.pointAttr = G; A = D.length; if (!F || A < F || H) { for (; A--; ) { F = D[A]; if ((s = F.options && F.options.marker || F.options) && s.enabled === !1) { s.radius = 0 } if (K.length) { H = 0; for (z = K[H]; F[M] >= z.value; ) { z = K[++H] } F.color = F.fillColor = z.color } H = r.colorByPoint || F.color; if (F.options) { for (u in I) { bn(s[I[u]]) && (H = !0) } } if (H) { s = s || {}; H = []; w = s.states || {}; z = w.hover = w.hover || {}; if (!r.marker) { z.color = z.color || !F.options.color && x[F.negative && B ? "negativeColor" : "color"] || aX(F.color).brighten(z.brightness || x.brightness).get() } z = { color: F.color }; if (!L) { z.fillColor = F.color } if (!J) { z.lineColor = F.color } s.hasOwnProperty("color") && !s.color && delete s.color; H[""] = m.convertAttribs(bh(z, s), G[""]); H.hover = m.convertAttribs(w.hover, G.hover, H[""]); H.select = m.convertAttribs(w.select, G.select, H[""]) } else { H = G } F.pointAttr = H } } }, destroy: function() { var m = this, p = m.chart, r = /AppleWebKit\/533/.test(l), s, t = m.data || [], u, w, x; aR(m, "destroy"); bU(m); aQ(m.axisTypes || [], function(z) { if (x = m[z]) { ax(x.series, m), x.isDirty = x.forceRedraw = !0 } }); m.legendItem && m.chart.legend.destroyItem(m); for (s = t.length; s--; ) { (u = t[s]) && u.destroy && u.destroy() } m.points = null; clearTimeout(m.animationTimeout); for (w in m) { m[w]instanceof aG && !m[w].survive && (s = r && w === "group" ? "hide" : "destroy", m[w][s]()) } if (p.hoverSeries === m) { p.hoverSeries = null } ax(p.series, m); for (w in m) { delete m[w] } }, getSegmentPath: function(m) { var p = this , r = [] , s = p.options.step; aQ(m, function(t, u) { var w = t.plotX, x = t.plotY, z; p.getPointSpline ? r.push.apply(r, p.getPointSpline(m, t, u)) : (r.push(u ? "L" : "M"), s && u && (z = m[u - 1], s === "right" ? r.push(z.plotX, x) : s === "center" ? r.push((z.plotX + w) / 2, z.plotY, (z.plotX + w) / 2, x) : r.push(w, z.plotY)), r.push(t.plotX, t.plotY)) }); return r }, getGraphPath: function() { var m = this, p = [], r, s = []; aQ(m.segments, function(t) { r = m.getSegmentPath(t); t.length > 1 ? p = p.concat(r) : s.push(t[0]) }); m.singlePoints = s; return m.graphPath = p }, drawGraph: function() { var m = this , p = this.options , r = [["graph", p.lineColor || this.color, p.dashStyle]] , s = p.lineWidth , t = p.linecap !== "square" , u = this.getGraphPath() , w = this.fillGraph && this.color || bi; aQ(this.zones, function(x, z) { r.push(["zoneGraph" + z, x.color || m.color, x.dashStyle || p.dashStyle]) }); aQ(r, function(x, z) { var A = x[0] , B = m[A]; if (B) { ab(B), B.animate({ d: u }) } else { if ((s || w) && u.length) { B = { stroke: x[1], "stroke-width": s, fill: w, zIndex: 1 }, x[2] ? B.dashstyle = x[2] : t && (B["stroke-linecap"] = B["stroke-linejoin"] = "round"), m[A] = m.chart.renderer.path(u).attr(B).add(m.group).shadow(z < 2 && p.shadow) } } }) }, applyZones: function() { var m = this, p = this.chart, r = p.renderer, s = this.zones, t, u, w = this.clips || [], x, z = this.graph, A = this.area, B = bs(p.chartWidth, p.chartHeight), D = this[(this.zoneAxis || "y") + "Axis"], F = D.reversed, G = D.horiz, H = !1; if (s.length && (z || A)) { z && z.hide(), A && A.hide(), aQ(s, function(I, J) { t = a6(u, F ? G ? p.plotWidth : 0 : G ? 0 : D.toPixels(D.min)); u = bO(D.toPixels(a6(I.value, D.max), !0)); t = D.isXAxis ? t > u ? u : t : t < u ? u : t; H && (t = u = D.toPixels(D.max)); if (D.isXAxis) { if (x = { x: F ? u : t, y: 0, width: Math.abs(t - u), height: B }, !G) { x.x = p.plotHeight - x.x } } else { if (x = { x: 0, y: F ? t : u, width: B, height: Math.abs(t - u) }, G) { x.y = p.plotWidth - x.y } } p.inverted && r.isVML && (x = D.isXAxis ? { x: 0, y: F ? t : u, height: x.width, width: p.chartWidth } : { x: x.y - p.plotLeft - p.spacingBox.x, y: 0, width: x.height, height: p.chartHeight }); w[J] ? w[J].animate(x) : (w[J] = r.clipRect(x), z && m["zoneGraph" + J].clip(w[J]), A && m["zoneArea" + J].clip(w[J])); H = I.value > D.max }), this.clips = w } }, invertGroups: function() { function m() { var s = { width: p.yAxis.len, height: p.xAxis.len }; aQ(["group", "markerGroup"], function(t) { p[t] && p[t].attr(s).invert() }) } var p = this , r = p.chart; if (p.xAxis) { aW(r, "resize", m), aW(p, "destroy", function() { bU(r, "resize", m) }), m(), p.invertGroups = m } }, plotGroup: function(m, p, r, s, t) { var u = this[m] , w = !u; w && (this[m] = u = this.chart.renderer.g(p).attr({ visibility: r, zIndex: s || 0.1 }).add(t)); u[w ? "attr" : "animate"](this.getPlotBox()); return u }, getPlotBox: function() { var m = this.chart , p = this.xAxis , r = this.yAxis; if (m.inverted) { p = r, r = this.xAxis } return { translateX: p ? p.left : m.plotLeft, translateY: r ? r.top : m.plotTop, scaleX: 1, scaleY: 1 } }, render: function() { var m = this, p = m.chart, r, s = m.options, t = (r = s.animation) && !!m.animate && p.renderer.isSVG && a6(r.duration, 500) || 0, u = m.visible ? "visible" : "hidden", w = s.zIndex, x = m.hasRendered, z = p.seriesGroup; r = m.plotGroup("group", "series", u, w, z); m.markerGroup = m.plotGroup("markerGroup", "markers", u, w, z); t && m.animate(!0); m.getAttribs(); r.inverted = m.isCartesian ? p.inverted : !1; m.drawGraph && (m.drawGraph(), m.applyZones()); aQ(m.points, function(A) { A.redraw && A.redraw() }); m.drawDataLabels && m.drawDataLabels(); m.visible && m.drawPoints(); m.drawTracker && m.options.enableMouseTracking !== !1 && m.drawTracker(); p.inverted && m.invertGroups(); s.clip !== !1 && !m.sharedClipKey && !x && r.clip(p.clipRect); t && m.animate(); if (!x) { t ? m.animationTimeout = setTimeout(function() { m.afterAnimate() }, t) : m.afterAnimate() } m.isDirty = m.isDirtyData = !1; m.hasRendered = !0 }, redraw: function() { var m = this.chart , p = this.isDirtyData , r = this.isDirty , s = this.group , t = this.xAxis , u = this.yAxis; s && (m.inverted && s.attr({ width: m.plotWidth, height: m.plotHeight }), s.animate({ translateX: a6(t && t.left, m.plotLeft), translateY: a6(u && u.top, m.plotTop) })); this.translate(); this.render(); p && aR(this, "updatedData"); (r || p) && delete this.kdTree }, kdDimensions: 1, kdTree: null, kdAxisArray: ["clientX", "plotY"], kdComparer: "distX", searchPoint: function(m) { var p = this.xAxis , r = this.yAxis , s = this.chart.inverted; return this.searchKDTree({ clientX: s ? p.len - m.chartY + p.pos : m.chartX - p.pos, plotY: s ? r.len - m.chartX + r.pos : m.chartY - r.pos }) }, buildKDTree: function() { function m(t, u, w) { var x, z; if (z = t && t.length) { return x = r.kdAxisArray[u % w], t.sort(function(A, B) { return A[x] - B[x] }), z = Math.floor(z / 2), { point: t[z], left: m(t.slice(0, z), u + 1, w), right: m(t.slice(z + 1), u + 1, w) } } } function p() { var t = aJ(r.points, function(u) { return u.y !== null }); r.kdTree = m(t, s, s) } var r = this , s = r.kdDimensions; delete r.kdTree; r.options.kdSync ? p() : setTimeout(p) }, searchKDTree: function(m) { function p(w, x, z, A) { var B = x.point, D = r.kdAxisArray[z % A], G, H = B; G = bn(w[t]) && bn(B[t]) ? Math.pow(w[t] - B[t], 2) : null; var F = bn(w[u]) && bn(B[u]) ? Math.pow(w[u] - B[u], 2) : null , I = (G || 0) + (F || 0); G = { distX: bn(G) ? Math.sqrt(G) : Number.MAX_VALUE, distY: bn(F) ? Math.sqrt(F) : Number.MAX_VALUE, distR: bn(I) ? Math.sqrt(I) : Number.MAX_VALUE }; B.dist = G; D = w[D] - B[D]; G = D < 0 ? "left" : "right"; x[G] && (G = p(w, x[G], z + 1, A), H = G.dist[s] < H.dist[s] ? G : B, B = D < 0 ? "right" : "left", x[B] && Math.sqrt(D * D) < H.dist[s] && (w = p(w, x[B], z + 1, A), H = w.dist[s] < H.dist[s] ? w : H)); return H } var r = this , s = this.kdComparer , t = this.kdAxisArray[0] , u = this.kdAxisArray[1]; this.kdTree || this.buildKDTree(); if (this.kdTree) { return p(m, this.kdTree, this.kdDimensions, this.kdDimensions) } } }; av.prototype = { destroy: function() { be(this, this.axis) }, render: function(m) { var p = this.options , r = p.format , r = r ? aD(r, this) : p.formatter.call(this); this.label ? this.label.attr({ text: r, visibility: "hidden" }) : this.label = this.axis.chart.renderer.text(r, null, null, p.useHTML).css(p.style).attr({ align: this.textAlign, rotation: p.rotation, visibility: "hidden" }).add(m) }, setOffset: function(m, p) { var r = this.axis , s = r.chart , t = s.inverted , u = r.reversed , u = this.isNegative && !u || !this.isNegative && u , w = r.translate(r.usePercentage ? 100 : this.total, 0, 0, 0, 1) , r = r.translate(0) , r = a1(w - r) , x = s.xAxis[0].translate(this.x) + m , z = s.plotHeight , u = { x: t ? u ? w : w - r : x, y: t ? z - x - p : u ? z - w - r : z - w, width: t ? r : p, height: t ? p : r }; if (t = this.label) { t.align(this.alignOptions, null, u), u = t.alignAttr, t[this.options.crop === !1 || s.isInsidePlot(u.x, u.y) ? "show" : "hide"](!0) } } }; bE.prototype.buildStacks = function() { var m = this.series , p = a6(this.options.reversedStacks, !0) , r = m.length; if (!this.isXAxis) { for (this.usePercentage = !1; r--; ) { m[p ? r : m.length - r - 1].setStackedPoints() } if (this.usePercentage) { for (r = 0; r < m.length; r++) { m[r].setPercentStacks() } } } } ; bE.prototype.renderStackTotals = function() { var m = this.chart, p = m.renderer, r = this.stacks, s, t, u = this.stackTotalGroup; if (!u) { this.stackTotalGroup = u = p.g("stack-labels").attr({ visibility: "visible", zIndex: 6 }).add() } u.translate(m.plotLeft, m.plotTop); for (s in r) { for (t in m = r[s], m) { m[t].render(u) } } } ; bc.prototype.setStackedPoints = function() { if (this.options.stacking && !(this.visible !== !0 && this.chart.options.chart.ignoreHiddenSeries !== !1)) { var t = this.processedXData, u = this.processedYData, w = [], x = u.length, z = this.options, A = z.threshold, B = z.stack, z = z.stacking, D = this.stackKey, F = "-" + D, G = this.negStacks, H = this.yAxis, I = H.stacks, K = H.oldStacks, L, J, M, O, N, P; for (O = 0; O < x; O++) { N = t[O]; P = u[O]; M = this.index + "," + O; J = (L = G && P < A) ? F : D; I[J] || (I[J] = {}); if (!I[J][N]) { K[J] && K[J][N] ? (I[J][N] = K[J][N], I[J][N].total = null) : I[J][N] = new av(H,H.options.stackLabels,L,N,B) } J = I[J][N]; J.points[M] = [J.cum || 0]; z === "percent" ? (L = L ? D : F, G && I[L] && I[L][N] ? (L = I[L][N], J.total = L.total = bs(L.total, J.total) + a1(P) || 0) : J.total = S(J.total + (a1(P) || 0))) : J.total = S(J.total + (P || 0)); J.cum = (J.cum || 0) + (P || 0); J.points[M].push(J.cum); w[O] = J.cum } if (z === "percent") { H.usePercentage = !0 } this.stackedYData = w; H.oldStacks = {} } } ; bc.prototype.setPercentStacks = function() { var m = this , p = m.stackKey , r = m.yAxis.stacks , s = m.processedXData; aQ([p, "-" + p], function(t) { var u; for (var w = s.length, x, z; w--; ) { if (x = s[w], u = (z = r[t] && r[t][x]) && z.points[m.index + "," + w], x = u) { z = z.total ? 100 / z.total : 0, x[0] = S(x[0] * z), x[1] = S(x[1] * z), m.stackedYData[w] = x[1] } } }) } ; bh(E.prototype, { addSeries: function(m, p, r) { var s, t = this; m && (p = a6(p, !0), aR(t, "addSeries", { options: m }, function() { s = t.initSeries(m); t.isDirtyLegend = !0; t.linkSeries(); p && t.redraw(r) })); return s }, addAxis: function(m, p, r, s) { var t = p ? "xAxis" : "yAxis" , u = this.options; new bE(this,bY(m, { index: this[t].length, isX: p })); u[t] = bj(u[t] || {}); u[t].push(m); a6(r, !0) && this.redraw(s) }, showLoading: function(m) { var p = this , r = p.options , s = p.loadingDiv , t = r.loading , u = function() { s && ah(s, { left: p.plotLeft + "px", top: p.plotTop + "px", width: p.plotWidth + "px", height: p.plotHeight + "px" }) }; if (!s) { p.loadingDiv = s = bZ(aI, { className: "highcharts-loading" }, bh(t.style, { zIndex: 10, display: bi }), p.container), p.loadingSpan = bZ("span", null, t.labelStyle, s), aW(p, "redraw", u) } p.loadingSpan.innerHTML = m || r.lang.loading; if (!p.loadingShown) { ah(s, { opacity: 0, display: "" }), aO(s, { opacity: t.style.opacity }, { duration: t.showDuration || 0 }), p.loadingShown = !0 } u() }, hideLoading: function() { var m = this.options , p = this.loadingDiv; p && aO(p, { opacity: 0 }, { duration: m.loading.hideDuration || 100, complete: function() { ah(p, { display: bi }) } }); this.loadingShown = !1 } }); bh(an.prototype, { update: function(m, p, r, s) { function t() { u.applyOptions(m); if (q(m) && !at(m)) { u.redraw = function() { if (x) { m && m.marker && m.marker.symbol ? u.graphic = x.destroy() : x.attr(u.pointAttr[u.state || ""]) } if (m && m.dataLabels && u.dataLabel) { u.dataLabel = u.dataLabel.destroy() } u.redraw = null } } z = u.index; w.updateParallelArrays(u, z); if (D && u.name) { D[u.x] = u.name } B.data[z] = u.options; w.isDirty = w.isDirtyData = !0; if (!w.fixedBox && w.hasCartesianSeries) { A.isDirtyBox = !0 } A.legend.display && B.legendType === "point" && (w.updateTotals(), A.legend.clearItems()); p && A.redraw(r) } var u = this, w = u.series, x = u.graphic, z, A = w.chart, B = w.options, D = w.xAxis && w.xAxis.names, p = a6(p, !0); s === !1 ? t() : u.firePointEvent("update", { options: m }, t) }, remove: function(m, p) { this.series.removePoint(aT(this, this.series.data), m, p) } }); bh(bc.prototype, { addPoint: function(m, p, r, s) { var t = this, u = t.options, w = t.data, x = t.graph, z = t.area, A = t.chart, B = t.xAxis && t.xAxis.names, D = x && x.shift || 0, F = ["graph", "area"], x = u.data, G, H = t.xData; bp(s, A); if (r) { for (s = t.zones.length; s--; ) { F.push("zoneGraph" + s, "zoneArea" + s) } aQ(F, function(I) { if (t[I]) { t[I].shift = D + 1 } }) } if (z) { z.isArea = !0 } p = a6(p, !0); z = { series: t }; t.pointClass.prototype.applyOptions.apply(z, [m]); F = z.x; s = H.length; if (t.requireSorting && F < H[s - 1]) { for (G = !0; s && H[s - 1] > F; ) { s-- } } t.updateParallelArrays(z, "splice", s, 0, 0); t.updateParallelArrays(z, s); if (B && z.name) { B[F] = z.name } x.splice(s, 0, m); G && (t.data.splice(s, 0, null), t.processData()); u.legendType === "point" && t.generatePoints(); r && (w[0] && w[0].remove ? w[0].remove(!1) : (w.shift(), t.updateParallelArrays(z, "shift"), x.shift())); t.isDirty = !0; t.isDirtyData = !0; p && (t.getAttribs(), A.redraw()) }, removePoint: function(m, p, r) { var s = this , t = s.data , u = t[m] , w = s.points , x = s.chart , z = function() { t.length === w.length && w.splice(m, 1); t.splice(m, 1); s.options.data.splice(m, 1); s.updateParallelArrays(u || { series: s }, "splice", m, 1); u && u.destroy(); s.isDirty = !0; s.isDirtyData = !0; p && x.redraw() }; bp(r, x); p = a6(p, !0); u ? u.firePointEvent("remove", null, z) : z() }, remove: function(m, p) { var r = this , s = r.chart , m = a6(m, !0); if (!r.isRemoving) { r.isRemoving = !0, aR(r, "remove", null, function() { r.destroy(); s.isDirtyLegend = s.isDirtyBox = !0; s.linkSeries(); m && s.redraw(p) }) } r.isRemoving = !1 }, update: function(m, p) { var r = this, s = this.chart, t = this.userOptions, u = this.type, w = aB[u].prototype, x = ["group", "markerGroup", "dataLabelsGroup"], z; if (m.type && m.type !== u || m.zIndex !== void 0) { x.length = 0 } aQ(x, function(A) { x[A] = r[A]; delete r[A] }); m = bY(t, { animation: !1, index: this.index, pointStart: this.xData[0] }, { data: this.options.data }, m); this.remove(!1); for (z in w) { this[z] = by } bh(this, aB[m.type || u].prototype); aQ(x, function(A) { r[A] = x[A] }); this.init(s, m); s.linkSeries(); a6(p, !0) && s.redraw(!1) } }); bh(bE.prototype, { update: function(m, p) { var r = this.chart , m = r.options[this.coll][this.options.index] = bY(this.userOptions, m); this.destroy(!0); this._addedPlotLB = by; this.init(r, bh(m, { events: by })); r.isDirtyBox = !0; a6(p, !0) && r.redraw() }, remove: function(m) { for (var p = this.chart, r = this.coll, s = this.series, t = s.length; t--; ) { s[t] && s[t].remove(!1) } ax(p.axes, this); ax(p[r], this); p.options[r].splice(this.options.index, 1); aQ(p[r], function(u, w) { u.options.index = w }); this.destroy(); p.isDirtyBox = !0; a6(m, !0) && p.redraw() }, setTitle: function(m, p) { this.update({ title: m }, p) }, setCategories: function(m, p) { this.update({ categories: m }, p) } }); var bQ = aC(bc); aB.line = bQ; d.area = bY(bt, { threshold: 0 }); var a8 = aC(bc, { type: "area", getSegments: function() { var m = this, p = [], r = [], s = [], t = this.xAxis, u = this.yAxis, w = u.stacks[this.stackKey], x = {}, z, A, B = this.points, D = this.options.connectNulls, F, G; if (this.options.stacking && !this.cropped) { for (F = 0; F < B.length; F++) { x[B[F].x] = B[F] } for (G in w) { w[G].total !== null && s.push(+G) } s.sort(function(H, I) { return H - I }); aQ(s, function(H) { var I = 0, J; if (!D || x[H] && x[H].y !== null) { if (x[H]) { r.push(x[H]) } else { for (F = m.index; F <= u.series.length; F++) { if (J = w[H].points[F + "," + H]) { I = J[1]; break } } z = t.translate(H); A = u.toPixels(I, !0); r.push({ y: null, plotX: z, clientX: z, plotY: A, yBottom: A, onMouseOver: aS }) } } }); r.length && p.push(r) } else { bc.prototype.getSegments.call(this), p = this.segments } this.segments = p }, getSegmentPath: function(m) { var p = bc.prototype.getSegmentPath.call(this, m), r = [].concat(p), s, t = this.options; s = p.length; var u = this.yAxis.getThreshold(t.threshold), w; s === 3 && r.push("L", p[1], p[2]); if (t.stacking && !this.closedStacks) { for (s = m.length - 1; s >= 0; s--) { w = a6(m[s].yBottom, u), s < m.length - 1 && t.step && r.push(m[s + 1].plotX, w), r.push(m[s].plotX, w) } } else { this.closeSegment(r, m, u) } this.areaPath = this.areaPath.concat(r); return p }, closeSegment: function(m, p, r) { m.push("L", p[p.length - 1].plotX, r, "L", p[0].plotX, r) }, drawGraph: function() { this.areaPath = []; bc.prototype.drawGraph.apply(this); var m = this , p = this.areaPath , r = this.options , s = [["area", this.color, r.fillColor]]; aQ(this.zones, function(t, u) { s.push(["zoneArea" + u, t.color || m.color, t.fillColor || r.fillColor]) }); aQ(s, function(t) { var u = t[0] , w = m[u]; w ? w.animate({ d: p }) : m[u] = m.chart.renderer.path(p).attr({ fill: a6(t[2], aX(t[1]).setOpacity(a6(r.fillOpacity, 0.75)).get()), zIndex: 0 }).add(m.group) }) }, drawLegendSymbol: aY.drawRectangle }); aB.area = a8; d.spline = bY(bt); bQ = aC(bc, { type: "spline", getPointSpline: function(m, p, r) { var s = p.plotX, t = p.plotY, u = m[r - 1], w = m[r + 1], x, z, A, B; if (u && w) { m = u.plotY; A = w.plotX; var w = w.plotY, D; x = (1.5 * s + u.plotX) / 2.5; z = (1.5 * t + m) / 2.5; A = (1.5 * s + A) / 2.5; B = (1.5 * t + w) / 2.5; D = (B - z) * (A - s) / (A - x) + t - B; z += D; B += D; z > m && z > t ? (z = bs(m, t), B = 2 * t - z) : z < m && z < t && (z = aw(m, t), B = 2 * t - z); B > w && B > t ? (B = bs(w, t), z = 2 * t - B) : B < w && B < t && (B = aw(w, t), z = 2 * t - B); p.rightContX = A; p.rightContY = B } r ? (p = ["C", u.rightContX || u.plotX, u.rightContY || u.plotY, x || s, z || t, s, t], u.rightContX = u.rightContY = null) : p = ["M", s, t]; return p } }); aB.spline = bQ; d.areaspline = bY(d.area); a8 = a8.prototype; bQ = aC(bQ, { type: "areaspline", closedStacks: !0, getSegmentPath: a8.getSegmentPath, closeSegment: a8.closeSegment, drawGraph: a8.drawGraph, drawLegendSymbol: aY.drawRectangle }); aB.areaspline = bQ; d.column = bY(bt, { borderColor: "#FFFFFF", borderRadius: 0, groupPadding: 0.2, marker: null, pointPadding: 0.1, minPointLength: 0, cropThreshold: 50, pointRange: null, states: { hover: { brightness: 0.1, shadow: !1, halo: !1 }, select: { color: "#C0C0C0", borderColor: "#000000", shadow: !1 } }, dataLabels: { align: null, verticalAlign: null, y: null }, stickyTracking: !1, tooltip: { distance: 6 }, threshold: 0 }); bQ = aC(bc, { type: "column", pointAttrToOptions: { stroke: "borderColor", fill: "color", r: "borderRadius" }, cropShoulder: 0, directTouch: !0, trackerGroups: ["group", "dataLabelsGroup"], negStacks: !0, init: function() { bc.prototype.init.apply(this, arguments); var m = this , p = m.chart; p.hasRendered && aQ(p.series, function(r) { if (r.type === m.type) { r.isDirty = !0 } }) }, getColumnMetrics: function() { var m = this, p = m.options, r = m.xAxis, s = m.yAxis, t = r.reversed, u, w = {}, x, z = 0; p.grouping === !1 ? z = 1 : aQ(m.chart.series, function(F) { var G = F.options , H = F.yAxis; if (F.type === m.type && F.visible && s.len === H.len && s.pos === H.pos) { G.stacking ? (u = F.stackKey, w[u] === by && (w[u] = z++), x = w[u]) : G.grouping !== !1 && (x = z++), F.columnIndex = x } }); var r = aw(a1(r.transA) * (r.ordinalSlope || p.pointRange || r.closestPointRange || r.tickInterval || 1), r.len) , A = r * p.groupPadding , B = (r - 2 * A) / z , D = p.pointWidth , p = bn(D) ? (B - D) / 2 : B * p.pointPadding , D = a6(D, B - 2 * p); return m.columnMetrics = { width: D, offset: p + (A + ((t ? z - (m.columnIndex || 0) : m.columnIndex) || 0) * B - r / 2) * (t ? -1 : 1) } }, translate: function() { var m = this , p = m.chart , r = m.options , s = m.borderWidth = a6(r.borderWidth, m.closestPointRange * m.xAxis.transA < 2 ? 0 : 1) , t = m.yAxis , u = m.translatedThreshold = t.getThreshold(r.threshold) , w = a6(r.minPointLength, 5) , x = m.getColumnMetrics() , z = x.width , A = m.barW = bs(z, 1 + 2 * s) , B = m.pointXOffset = x.offset , D = -(s % 2 ? 0.5 : 0) , F = s % 2 ? 0.5 : 1; p.inverted && (u -= 0.5, p.renderer.isVML && (F += 1)); r.pointPadding && (A = bo(A)); bc.prototype.translate.apply(m); aQ(m.points, function(G) { var H = a6(G.yBottom, u), I = aw(bs(-999 - H, G.plotY), t.len + 999 + H), J = G.plotX + B, L = A, K = aw(I, H), M, N; M = bs(I, H) - K; a1(M) < w && w && (M = w, N = !t.reversed && !G.negative || t.reversed && G.negative, K = bO(a1(K - u) > w ? H - w : u - (N ? w : 0))); G.barX = J; G.pointWidth = z; G.tooltipPos = p.inverted ? [t.len + t.pos - p.plotLeft - I, m.xAxis.len - J - L / 2] : [J + L / 2, I + t.pos - p.plotTop]; L = bO(J + L) + D; J = bO(J) + D; L -= J; H = a1(K) < 0.5; M = aw(bO(K + M) + F, 90000); K = bO(K) + F; M -= K; H && (K -= 1, M += 1); G.shapeType = "rect"; G.shapeArgs = { x: J, y: K, width: L, height: M } }) }, getSymbol: aS, drawLegendSymbol: aY.drawRectangle, drawGraph: aS, drawPoints: function() { var m = this, p = this.chart, r = m.options, s = p.renderer, t = r.animationLimit || 250, u, w; aQ(m.points, function(x) { var z = x.plotY , A = x.graphic; if (z !== by && !isNaN(z) && x.y !== null) { u = x.shapeArgs, z = bn(m.borderWidth) ? { "stroke-width": m.borderWidth } : {}, w = x.pointAttr[x.selected ? "select" : ""] || m.pointAttr[""], A ? (ab(A), A.attr(z)[p.pointCount < t ? "animate" : "attr"](bY(u))) : x.graphic = s[x.shapeType](u).attr(z).attr(w).add(m.group).shadow(r.shadow, null, r.stacking && !r.borderRadius) } else { if (A) { x.graphic = A.destroy() } } }) }, animate: function(m) { var p = this.yAxis , r = this.options , s = this.chart.inverted , t = {}; if (j) { m ? (t.scaleY = 0.001, m = aw(p.pos + p.len, bs(p.pos, p.toPixels(r.threshold))), s ? t.translateX = m - p.len : t.translateY = m, this.group.attr(t)) : (t.scaleY = 1, t[s ? "translateX" : "translateY"] = p.pos, this.group.animate(t, this.options.animation), this.animate = null) } }, remove: function() { var m = this , p = m.chart; p.hasRendered && aQ(p.series, function(r) { if (r.type === m.type) { r.isDirty = !0 } }); bc.prototype.remove.apply(m, arguments) } }); aB.column = bQ; d.bar = bY(d.column); a8 = aC(bQ, { type: "bar", inverted: !0 }); aB.bar = a8; d.scatter = bY(bt, { lineWidth: 0, marker: { enabled: !0 }, tooltip: { headerFormat: '\u25CF {series.name}
', pointFormat: "x: {point.x}
y: {point.y}
" } }); a8 = aC(bc, { type: "scatter", sorted: !1, requireSorting: !1, noSharedTooltip: !0, trackerGroups: ["group", "markerGroup", "dataLabelsGroup"], takeOrdinalPosition: !1, kdDimensions: 2, kdComparer: "distR", drawGraph: function() { this.options.lineWidth && bc.prototype.drawGraph.call(this) } }); aB.scatter = a8; d.pie = bY(bt, { borderColor: "#FFFFFF", borderWidth: 1, center: [null, null], clip: !1, colorByPoint: !0, dataLabels: { distance: 30, enabled: !0, formatter: function() { return this.point.name }, x: 0 }, ignoreHiddenPoint: !0, legendType: "point", marker: null, size: null, showInLegend: !1, slicedOffset: 10, states: { hover: { brightness: 0.1, shadow: !1 } }, stickyTracking: !1, tooltip: { followPointer: !0 } }); bt = { type: "pie", isCartesian: !1, pointClass: aC(an, { init: function() { an.prototype.init.apply(this, arguments); var m = this, p; bh(m, { visible: m.visible !== !1, name: a6(m.name, "Slice") }); p = function(r) { m.slice(r.type === "select") } ; aW(m, "select", p); aW(m, "unselect", p); return m }, setVisible: function(m, p) { var r = this , s = r.series , t = s.chart , u = !s.isDirty && s.options.ignoreHiddenPoint; if (m !== r.visible || p) { if (r.visible = r.options.visible = m = m === by ? !r.visible : m, s.options.data[aT(r, s.data)] = r.options, aQ(["graphic", "dataLabel", "connector", "shadowGroup"], function(w) { if (r[w]) { r[w][m ? "show" : "hide"](!0) } }), r.legendItem && (t.hasRendered && (s.updateTotals(), t.legend.clearItems(), u || t.legend.render()), t.legend.colorizeItem(r, m)), u) { s.isDirty = !0, t.redraw() } } }, slice: function(m, p, r) { var s = this.series; bp(r, s.chart); a6(p, !0); this.sliced = this.options.sliced = m = bn(m) ? m : !this.sliced; s.options.data[aT(this, s.data)] = this.options; m = m ? this.slicedTranslation : { translateX: 0, translateY: 0 }; this.graphic.animate(m); this.shadowGroup && this.shadowGroup.animate(m) }, haloPath: function(m) { var p = this.shapeArgs , r = this.series.chart; return this.sliced || !this.visible ? [] : this.series.chart.renderer.symbols.arc(r.plotLeft + p.x, r.plotTop + p.y, p.r + m, p.r + m, { innerR: this.shapeArgs.r, start: p.start, end: p.end }) } }), requireSorting: !1, noSharedTooltip: !0, trackerGroups: ["group", "dataLabelsGroup"], axisTypes: [], pointAttrToOptions: { stroke: "borderColor", "stroke-width": "borderWidth", fill: "color" }, getColor: aS, animate: function(m) { var p = this , r = p.points , s = p.startAngleRad; if (!m) { aQ(r, function(t) { var u = t.graphic , w = t.shapeArgs; u && (u.attr({ r: t.startR || p.center[3] / 2, start: s, end: s }), u.animate({ r: w.r, start: w.start, end: w.end }, p.options.animation)) }), p.animate = null } }, setData: function(m, p, r, s) { bc.prototype.setData.call(this, m, !1, r, s); this.processData(); this.generatePoints(); a6(p, !0) && this.chart.redraw(r) }, updateTotals: function() { var m, p = 0, r, s, t, u = this.options.ignoreHiddenPoint; r = this.points; s = r.length; for (m = 0; m < s; m++) { t = r[m]; if (t.y < 0) { t.y = null } p += u && !t.visible ? 0 : t.y } this.total = p; for (m = 0; m < s; m++) { t = r[m], t.percentage = p > 0 && (t.visible || !u) ? t.y / p * 100 : 0, t.total = p } }, generatePoints: function() { bc.prototype.generatePoints.call(this); this.updateTotals() }, translate: function(p) { this.generatePoints(); var r = 0, s = this.options, t = s.slicedOffset, u = t + s.borderWidth, w, x, z, A = s.startAngle || 0, B = this.startAngleRad = aM / 180 * (A - 90), A = (this.endAngleRad = aM / 180 * (a6(s.endAngle, A + 360) - 90)) - B, D = this.points, F = s.dataLabels.distance, s = s.ignoreHiddenPoint, H, G = D.length, I; if (!p) { this.center = p = this.getCenter() } this.getX = function(m, J) { z = bD.asin(aw((m - p[1]) / (p[2] / 2 + F), 1)); return p[0] + (J ? -1 : 1) * bJ(z) * (p[2] / 2 + F) } ; for (H = 0; H < G; H++) { I = D[H]; w = B + r * A; if (!s || I.visible) { r += I.percentage / 100 } x = B + r * A; I.shapeType = "arc"; I.shapeArgs = { x: p[0], y: p[1], r: p[2] / 2, innerR: p[3] / 2, start: bO(w * 1000) / 1000, end: bO(x * 1000) / 1000 }; z = (x + w) / 2; z > 1.5 * aM ? z -= 2 * aM : z < -aM / 2 && (z += 2 * aM); I.slicedTranslation = { translateX: bO(bJ(z) * t), translateY: bO(a(z) * t) }; w = bJ(z) * p[2] / 2; x = a(z) * p[2] / 2; I.tooltipPos = [p[0] + w * 0.7, p[1] + x * 0.7]; I.half = z < -aM / 2 || z > aM / 2 ? 1 : 0; I.angle = z; u = aw(u, F / 2); I.labelPos = [p[0] + w + bJ(z) * F, p[1] + x + a(z) * F, p[0] + w + bJ(z) * u, p[1] + x + a(z) * u, p[0] + w, p[1] + x, F < 0 ? "center" : I.half ? "right" : "left", z] } }, drawGraph: null, drawPoints: function() { var m = this, p = m.chart.renderer, r, s, t = m.options.shadow, u, w; if (t && !m.shadowGroup) { m.shadowGroup = p.g("shadow").add(m.group) } aQ(m.points, function(x) { var z = x.options.visible; s = x.graphic; w = x.shapeArgs; u = x.shadowGroup; if (t && !u) { u = x.shadowGroup = p.g("shadow").add(m.shadowGroup) } r = x.sliced ? x.slicedTranslation : { translateX: 0, translateY: 0 }; u && u.attr(r); s ? s.animate(bh(w, r)) : x.graphic = s = p[x.shapeType](w).setRadialReference(m.center).attr(x.pointAttr[x.selected ? "select" : ""]).attr({ "stroke-linejoin": "round" }).attr(r).add(m.group).shadow(t, u); z !== void 0 && x.setVisible(z, !0) }) }, searchPoint: aS, sortByAngle: function(m, p) { m.sort(function(r, s) { return r.angle !== void 0 && (s.angle - r.angle) * p }) }, drawLegendSymbol: aY.drawRectangle, getCenter: bT.getCenter, getSymbol: aS }; bt = aC(bc, bt); aB.pie = bt; bc.prototype.drawDataLabels = function() { var m = this, p = m.options, r = p.cursor, s = p.dataLabels, t = m.points, u, w, x = m.hasRendered || 0, z, A, B = m.chart.renderer; if (s.enabled || m._hasPointLabels) { m.dlProcessOptions && m.dlProcessOptions(s), A = m.plotGroup("dataLabelsGroup", "data-labels", s.defer ? "hidden" : "visible", s.zIndex || 6), a6(s.defer, !0) && (A.attr({ opacity: +x }), x || aW(m, "afterAnimate", function() { m.visible && A.show(); A[p.animation ? "animate" : "attr"]({ opacity: 1 }, { duration: 200 }) })), w = s, aQ(t, function(F) { var G, H = F.dataLabel, I, J, M = F.connector, L = !0, K, D = {}; u = F.dlOptions || F.options && F.options.dataLabels; G = a6(u && u.enabled, w.enabled); if (H && !G) { F.dataLabel = H.destroy() } else { if (G) { s = bY(w, u); K = s.style; G = s.rotation; I = F.getLabelConfig(); z = s.format ? aD(s.format, I) : s.formatter.call(I, s); K.color = a6(s.color, K.color, m.color, "black"); if (H) { if (bn(z)) { H.attr({ text: z }), L = !1 } else { if (F.dataLabel = H = H.destroy(), M) { F.connector = M.destroy() } } } else { if (bn(z)) { H = { fill: s.backgroundColor, stroke: s.borderColor, "stroke-width": s.borderWidth, r: s.borderRadius || 0, rotation: G, padding: s.padding, zIndex: 1 }; if (K.color === "contrast") { D.color = s.inside || s.distance < 0 || p.stacking ? B.getContrast(F.color || m.color) : "#000000" } if (r) { D.cursor = r } for (J in H) { H[J] === by && delete H[J] } H = F.dataLabel = B[G ? "text" : "label"](z, 0, -999, s.shape, null, null, s.useHTML).attr(H).css(bh(K, D)).add(A).shadow(s.shadow) } } H && m.alignDataLabel(F, H, s, null, L) } } }) } } ; bc.prototype.alignDataLabel = function(m, p, r, s, t) { var u = this.chart , w = u.inverted , x = a6(m.plotX, -999) , z = a6(m.plotY, -999) , A = p.getBBox() , B = u.renderer.fontMetrics(r.style.fontSize).b , D = this.visible && (m.series.forceDL || u.isInsidePlot(x, bO(z), w) || s && u.isInsidePlot(x, w ? s.x + 1 : s.y + s.height - 1, w)); if (D) { s = bh({ x: w ? u.plotWidth - z : x, y: bO(w ? u.plotHeight - x : z), width: 0, height: 0 }, s), bh(r, { width: A.width, height: A.height }), r.rotation ? (m = u.renderer.rotCorr(B, r.rotation), p[t ? "attr" : "animate"]({ x: s.x + r.x + s.width / 2 + m.x, y: s.y + r.y + s.height / 2 }).attr({ align: r.align })) : (p.align(r, null, s), w = p.alignAttr, a6(r.overflow, "justify") === "justify" ? this.justifyDataLabel(p, r, w, A, s, t) : a6(r.crop, !0) && (D = u.isInsidePlot(w.x, w.y) && u.isInsidePlot(w.x + A.width, w.y + A.height)), r.shape && p.attr({ anchorX: m.plotX, anchorY: m.plotY })) } if (!D) { p.attr({ y: -999 }), p.placed = !1 } } ; bc.prototype.justifyDataLabel = function(m, p, r, s, t, u) { var w = this.chart, x = p.align, z = p.verticalAlign, A, B, D = m.box ? 0 : m.padding || 0; A = r.x + D; if (A < 0) { x === "right" ? p.align = "left" : p.x = -A, B = !0 } A = r.x + s.width - D; if (A > w.plotWidth) { x === "left" ? p.align = "right" : p.x = w.plotWidth - A, B = !0 } A = r.y + D; if (A < 0) { z === "bottom" ? p.verticalAlign = "top" : p.y = -A, B = !0 } A = r.y + s.height - D; if (A > w.plotHeight) { z === "top" ? p.verticalAlign = "bottom" : p.y = w.plotHeight - A, B = !0 } if (B) { m.placed = !u, m.align(p, null, t) } } ; if (aB.pie) { aB.pie.prototype.drawDataLabels = function() { var m = this, t = m.data, I, O = m.chart, T = m.options.dataLabels, V = a6(T.connectorPadding, 10), X = a6(T.connectorWidth, 1), Z = O.plotWidth, b4 = O.plotHeight, b5, b7, b9 = a6(T.softConnector, !0), cc = T.distance, ce = m.center, cg = ce[2] / 2, ch = ce[1], cj = cc > 0, ck, cl, cm, cn = [[], []], p, x, Q, Y, U, W = [0, 0, 0, 0], cb = function(r, s) { return s.y - r.y }; if (m.visible && (T.enabled || m._hasPointLabels)) { bc.prototype.drawDataLabels.apply(m); aQ(t, function(r) { r.dataLabel && r.visible && cn[r.half].push(r) }); for (Y = 2; Y--; ) { var b6 = [], cd = [], b3 = cn[Y], ca = b3.length, b8; if (ca) { m.sortByAngle(b3, Y - 0.5); for (U = t = 0; !t && b3[U]; ) { t = b3[U] && b3[U].dataLabel && (b3[U].dataLabel.getBBox().height || 21), U++ } if (cc > 0) { cl = aw(ch + cg + cc, O.plotHeight); for (U = bs(0, ch - cg - cc); U <= cl; U += t) { b6.push(U) } cl = b6.length; if (ca > cl) { I = [].concat(b3); I.sort(cb); for (U = ca; U--; ) { I[U].rank = U } for (U = ca; U--; ) { b3[U].rank >= cl && b3.splice(U, 1) } ca = b3.length } for (U = 0; U < ca; U++) { I = b3[U]; cm = I.labelPos; I = 9999; var ci, cf; for (cf = 0; cf < cl; cf++) { ci = a1(b6[cf] - cm[1]), ci < I && (I = ci, b8 = cf) } if (b8 < U && b6[U] !== null) { b8 = U } else { for (cl < ca - U + b8 && b6[U] !== null && (b8 = cl - ca + U); b6[b8] === null; ) { b8++ } } cd.push({ i: b8, y: b6[b8] }); b6[b8] = null } cd.sort(cb) } for (U = 0; U < ca; U++) { I = b3[U]; cm = I.labelPos; ck = I.dataLabel; Q = I.visible === !1 ? "hidden" : "inherit"; I = cm[1]; if (cc > 0) { if (cl = cd.pop(), b8 = cl.i, x = cl.y, I > x && b6[b8 + 1] !== null || I < x && b6[b8 - 1] !== null) { x = aw(bs(0, I), O.plotHeight) } } else { x = I } p = T.justify ? ce[0] + (Y ? -1 : 1) * (cg + cc) : m.getX(x === ch - cg - cc || x === ch + cg + cc ? I : x, Y); ck._attr = { visibility: Q, align: cm[6] }; ck._pos = { x: p + T.x + ({ left: V, right: -V }[cm[6]] || 0), y: x + T.y - 10 }; ck.connX = p; ck.connY = x; if (this.options.size === null) { cl = ck.width, p - cl < V ? W[3] = bs(bO(cl - p + V), W[3]) : p + cl > Z - V && (W[1] = bs(bO(p + cl - Z + V), W[1])), x - t / 2 < 0 ? W[0] = bs(bO(-x + t / 2), W[0]) : x + t / 2 > b4 && (W[2] = bs(bO(x + t / 2 - b4), W[2])) } } } } if (ai(W) === 0 || this.verifyDataLabelOverflow(W)) { this.placeDataLabels(), cj && X && aQ(this.points, function(r) { b5 = r.connector; cm = r.labelPos; if ((ck = r.dataLabel) && ck._pos) { Q = ck._attr.visibility, p = ck.connX, x = ck.connY, b7 = b9 ? ["M", p + (cm[6] === "left" ? 5 : -5), x, "C", p, x, 2 * cm[2] - cm[4], 2 * cm[3] - cm[5], cm[2], cm[3], "L", cm[4], cm[5]] : ["M", p + (cm[6] === "left" ? 5 : -5), x, "L", cm[2], cm[3], "L", cm[4], cm[5]], b5 ? (b5.animate({ d: b7 }), b5.attr("visibility", Q)) : r.connector = b5 = m.chart.renderer.path(b7).attr({ "stroke-width": X, stroke: T.connectorColor || r.color || "#606060", visibility: Q }).add(m.dataLabelsGroup) } else { if (b5) { r.connector = b5.destroy() } } }) } } } , aB.pie.prototype.placeDataLabels = function() { aQ(this.points, function(m) { var m = m.dataLabel, p; if (m) { (p = m._pos) ? (m.attr(m._attr), m[m.moved ? "animate" : "attr"](p), m.moved = !0) : m && m.attr({ y: -999 }) } }) } , aB.pie.prototype.alignDataLabel = aS, aB.pie.prototype.verifyDataLabelOverflow = function(m) { var p = this.center, r = this.options, s = r.center, t = r = r.minSize || 80, u; s[0] !== null ? t = bs(p[2] - bs(m[1], m[3]), r) : (t = bs(p[2] - m[1] - m[3], r), p[0] += (m[3] - m[1]) / 2); s[1] !== null ? t = bs(aw(t, p[2] - bs(m[0], m[2])), r) : (t = bs(aw(t, p[2] - m[0] - m[2]), r), p[1] += (m[0] - m[2]) / 2); t < p[2] ? (p[2] = t, this.translate(p), aQ(this.points, function(w) { if (w.dataLabel) { w.dataLabel._pos = null } }), this.drawDataLabels && this.drawDataLabels()) : u = !0; return u } } if (aB.column) { aB.column.prototype.alignDataLabel = function(m, p, r, s, t) { var u = this.chart.inverted , w = m.series , x = m.dlBox || m.shapeArgs , z = m.below || m.plotY > a6(this.translatedThreshold, w.yAxis.len) , A = a6(r.inside, !!this.options.stacking); if (x && (s = bY(x), u && (s = { x: w.yAxis.len - s.y - s.height, y: w.xAxis.len - s.x - s.width, width: s.height, height: s.width }), !A)) { u ? (s.x += z ? 0 : s.width, s.width = 0) : (s.y += z ? s.height : 0, s.height = 0) } r.align = a6(r.align, !u || A ? "center" : z ? "right" : "left"); r.verticalAlign = a6(r.verticalAlign, u || A ? "middle" : z ? "top" : "bottom"); bc.prototype.alignDataLabel.call(this, m, p, r, s, t) } } (function(m) { var p = m.Chart , r = m.each , s = HighchartsAdapter.addEvent; p.prototype.callbacks.push(function(t) { function u() { var w = []; r(t.series, function(x) { var z = x.options.dataLabels; (z.enabled || x._hasPointLabels) && !z.allowOverlap && x.visible && r(x.points, function(A) { if (A.dataLabel) { A.dataLabel.labelrank = A.labelrank, w.push(A.dataLabel) } }) }); t.hideOverlappingLabels(w) } u(); s(t, "redraw", u) }); p.prototype.hideOverlappingLabels = function(t) { var u = t.length, w, x, z, A; for (x = 0; x < u; x++) { if (w = t[x]) { w.oldOpacity = w.opacity, w.newOpacity = 1 } } for (x = 0; x < u; x++) { z = t[x]; for (w = x + 1; w < u; ++w) { if (A = t[w], z && A && z.placed && A.placed && z.newOpacity !== 0 && A.newOpacity !== 0 && !(A.alignAttr.x > z.alignAttr.x + z.width || A.alignAttr.x + A.width < z.alignAttr.x || A.alignAttr.y > z.alignAttr.y + z.height || A.alignAttr.y + A.height < z.alignAttr.y)) { (z.labelrank < A.labelrank ? z : A).newOpacity = 0 } } } for (x = 0; x < u; x++) { if (w = t[x]) { if (w.oldOpacity !== w.newOpacity && w.placed) { w.alignAttr.opacity = w.newOpacity, w[w.isOld && w.newOpacity ? "animate" : "attr"](w.alignAttr) } w.isOld = !0 } } } } )(bI); bt = bI.TrackerMixin = { drawTrackerPoint: function() { var m = this , p = m.chart , r = p.pointer , s = m.options.cursor , t = s && { cursor: s } , u = function(w) { for (var x = w.target, z; x && !z; ) { z = x.point, x = x.parentNode } if (z !== by && z !== p.hoverPoint) { z.onMouseOver(w) } }; aQ(m.points, function(w) { if (w.graphic) { w.graphic.element.point = w } if (w.dataLabel) { w.dataLabel.element.point = w } }); if (!m._hasTracking) { aQ(m.trackerGroups, function(w) { if (m[w] && (m[w].addClass("highcharts-tracker").on("mouseover", u).on("mouseout", function(x) { r.onTrackerMouseOut(x) }).css(t), f)) { m[w].on("touchstart", u) } }), m._hasTracking = !0 } }, drawTrackerGraph: function() { var m = this, r = m.options, s = r.trackByArea, t = [].concat(s ? m.areaPath : m.graphPath), u = t.length, w = m.chart, x = w.pointer, z = w.renderer, A = w.options.tooltip.snap, B = m.tracker, D = r.cursor, F = D && { cursor: D }, D = m.singlePoints, G, H = function() { if (w.hoverSeries !== m) { m.onMouseOver() } }, I = "rgba(192,192,192," + (j ? 0.0001 : 0.002) + ")"; if (u && !s) { for (G = u + 1; G--; ) { t[G] === "M" && t.splice(G + 1, 0, t[G + 1] - A, t[G + 2], "L"), (G && t[G] === "M" || G === u) && t.splice(G, 0, "L", t[G - 2] + A, t[G - 1]) } } for (G = 0; G < D.length; G++) { u = D[G], t.push("M", u.plotX - A, u.plotY, "L", u.plotX + A, u.plotY) } B ? B.attr({ d: t }) : (m.tracker = z.path(t).attr({ "stroke-linejoin": "round", visibility: m.visible ? "visible" : "hidden", stroke: I, fill: s ? I : bi, "stroke-width": r.lineWidth + (s ? 0 : 2 * A), zIndex: 2 }).add(m.group), aQ([m.tracker, m.markerGroup], function(p) { p.addClass("highcharts-tracker").on("mouseover", H).on("mouseout", function(J) { x.onTrackerMouseOut(J) }).css(F); if (f) { p.on("touchstart", H) } })) } }; if (aB.column) { bQ.prototype.drawTracker = bt.drawTrackerPoint } if (aB.pie) { aB.pie.prototype.drawTracker = bt.drawTrackerPoint } if (aB.scatter) { a8.prototype.drawTracker = bt.drawTrackerPoint } bh(aU.prototype, { setItemEvents: function(m, p, r, s, t) { var u = this; (r ? p : m.legendGroup).on("mouseover", function() { m.setState("hover"); p.css(u.options.itemHoverStyle) }).on("mouseout", function() { p.css(m.visible ? s : t); m.setState() }).on("click", function(w) { var x = function() { m.setVisible() } , w = { browserEvent: w }; m.firePointEvent ? m.firePointEvent("legendItemClick", w, x) : aR(m, "legendItemClick", w, x) }) }, createCheckboxForItem: function(m) { m.checkbox = bZ("input", { type: "checkbox", checked: m.selected, defaultChecked: m.selected }, this.options.itemCheckboxStyle, this.chart.container); aW(m.checkbox, "click", function(p) { aR(m.series || m, "checkboxClick", { checked: p.target.checked, item: m }, function() { m.select() }) }) } }); a7.legend.itemStyle.cursor = "pointer"; bh(E.prototype, { showResetZoom: function() { var m = this , p = a7.lang , r = m.options.chart.resetZoomButton , s = r.theme , t = s.states , u = r.relativeTo === "chart" ? null : "plotBox"; this.resetZoomButton = m.renderer.button(p.resetZoom, null, null, function() { m.zoomOut() }, s, t && t.hover).attr({ align: r.position.align, title: p.resetZoomTitle }).add().align(r.position, !1, u) }, zoomOut: function() { var m = this; aR(m, "selection", { resetSelection: !0 }, function() { m.zoom() }) }, zoom: function(m) { var p, r = this.pointer, s = !1, t; !m || m.resetSelection ? aQ(this.axes, function(u) { p = u.zoom() }) : aQ(m.xAxis.concat(m.yAxis), function(u) { var w = u.axis , x = w.isXAxis; if (r[x ? "zoomX" : "zoomY"] || r[x ? "pinchX" : "pinchY"]) { p = w.zoom(u.min, u.max), w.displayBtn && (s = !0) } }); t = this.resetZoomButton; if (s && !t) { this.showResetZoom() } else { if (!s && q(t)) { this.resetZoomButton = t.destroy() } } p && this.redraw(a6(this.options.chart.animation, m && m.animation, this.pointCount < 100)) }, pan: function(m, p) { var r = this, s = r.hoverPoints, t; s && aQ(s, function(u) { u.setState() }); aQ(p === "xy" ? [1, 0] : [1], function(u) { var w = m[u ? "chartX" : "chartY"] , x = r[u ? "xAxis" : "yAxis"][0] , z = r[u ? "mouseDownX" : "mouseDownY"] , A = (x.pointRange || 0) / 2 , B = x.getExtremes() , D = x.toValue(z - w, !0) + A , A = x.toValue(z + r[u ? "plotWidth" : "plotHeight"] - w, !0) - A , z = z > w; if (x.series.length && (z || D > aw(B.dataMin, B.min)) && (!z || A < bs(B.dataMax, B.max))) { x.setExtremes(D, A, !1, !1, { trigger: "pan" }), t = !0 } r[u ? "mouseDownX" : "mouseDownY"] = w }); t && r.redraw(!1); ah(r.container, { cursor: "move" }) } }); bh(an.prototype, { select: function(m, p) { var r = this , s = r.series , t = s.chart , m = a6(m, !r.selected); r.firePointEvent(m ? "select" : "unselect", { accumulate: p }, function() { r.selected = r.options.selected = m; s.options.data[aT(r, s.data)] = r.options; r.setState(m && "select"); p || aQ(t.getSelectedPoints(), function(u) { if (u.selected && u !== r) { u.selected = u.options.selected = !1, s.options.data[aT(u, s.data)] = u.options, u.setState(""), u.firePointEvent("unselect") } }) }) }, onMouseOver: function(m) { var p = this.series , r = p.chart , s = r.tooltip , t = r.hoverPoint; if (r.hoverSeries !== p) { p.onMouseOver() } if (t && t !== this) { t.onMouseOut() } this.firePointEvent("mouseOver"); s && (!s.shared || p.noSharedTooltip) && s.refresh(this, m); this.setState("hover"); r.hoverPoint = this }, onMouseOut: function() { var m = this.series.chart , p = m.hoverPoints; this.firePointEvent("mouseOut"); if (!p || aT(this, p) === -1) { this.setState(), m.hoverPoint = null } }, importEvents: function() { if (!this.hasImportedEvents) { var m = bY(this.series.options.point, this.options).events, p; this.events = m; for (p in m) { aW(this, p, m[p]) } this.hasImportedEvents = !0 } }, setState: function(r, s) { var t = this.plotX, u = this.plotY, w = this.series, x = w.options.states, z = d[w.type].marker && w.options.marker, A = z && !z.enabled, B = z && z.states[r], D = B && B.enabled === !1, F = w.stateMarkerGraphic, G = this.marker || {}, I = w.chart, H = w.halo, J, r = r || ""; J = this.pointAttr[r] || w.pointAttr[r]; if (!(r === this.state && !s || this.selected && r !== "select" || x[r] && x[r].enabled === !1 || r && (D || A && B.enabled === !1) || r && G.states && G.states[r] && G.states[r].enabled === !1)) { if (this.graphic) { z = z && this.graphic.symbolName && J.r, this.graphic.attr(bY(J, z ? { x: t - z, y: u - z, width: 2 * z, height: 2 * z } : {})), F && F.hide() } else { if (r && B) { if (z = B.radius, G = G.symbol || w.symbol, F && F.currentSymbol !== G && (F = F.destroy()), F) { F[s ? "animate" : "attr"]({ x: t - z, y: u - z }) } else { if (G) { w.stateMarkerGraphic = F = I.renderer.symbol(G, t - z, u - z, 2 * z, 2 * z).attr(J).add(w.markerGroup), F.currentSymbol = G } } } if (F) { F[r && I.isInsidePlot(t, u, I.inverted) ? "show" : "hide"]() } } if ((t = x[r] && x[r].halo) && t.size) { if (!H) { w.halo = H = I.renderer.path().add(I.seriesGroup) } H.attr(bh({ fill: aX(this.color || w.color).setOpacity(t.opacity).get() }, t.attributes))[s ? "animate" : "attr"]({ d: this.haloPath(t.size) }) } else { H && H.attr({ d: [] }) } this.state = r } }, haloPath: function(m) { var p = this.series , r = p.chart , s = p.getPlotBox() , t = r.inverted; return r.renderer.symbols.circle(s.translateX + (t ? p.yAxis.len - this.plotY : this.plotX) - m, s.translateY + (t ? p.xAxis.len - this.plotX : this.plotY) - m, m * 2, m * 2) } }); bh(bc.prototype, { onMouseOver: function() { var m = this.chart , p = m.hoverSeries; if (p && p !== this) { p.onMouseOut() } this.options.events.mouseOver && aR(this, "mouseOver"); this.setState("hover"); m.hoverSeries = this }, onMouseOut: function() { var m = this.options , p = this.chart , r = p.tooltip , s = p.hoverPoint; if (s) { s.onMouseOut() } this && m.events.mouseOut && aR(this, "mouseOut"); r && !m.stickyTracking && (!r.shared || this.noSharedTooltip) && r.hide(); this.setState(); p.hoverSeries = null }, setState: function(m) { var p = this.options , r = this.graph , s = p.states , t = p.lineWidth , p = 0 , m = m || ""; if (this.state !== m && (this.state = m, !(s[m] && s[m].enabled === !1) && (m && (t = s[m].lineWidth || t + (s[m].lineWidthPlus || 0)), r && !r.dashstyle))) { m = { "stroke-width": t }; for (r.attr(m); this["zoneGraph" + p]; ) { this["zoneGraph" + p].attr(m), p += 1 } } }, setVisible: function(m, p) { var r = this, s = r.chart, t = r.legendItem, u, w = s.options.chart.ignoreHiddenSeries, x = r.visible; u = (r.visible = m = r.userOptions.visible = m === by ? !x : m) ? "show" : "hide"; aQ(["group", "dataLabelsGroup", "markerGroup", "tracker"], function(z) { if (r[z]) { r[z][u]() } }); if (s.hoverSeries === r || (s.hoverPoint && s.hoverPoint.series) === r) { r.onMouseOut() } t && s.legend.colorizeItem(r, m); r.isDirty = !0; r.options.stacking && aQ(s.series, function(z) { if (z.options.stacking && z.visible) { z.isDirty = !0 } }); aQ(r.linkedSeries, function(z) { z.setVisible(m, !1) }); if (w) { s.isDirtyBox = !0 } p !== !1 && s.redraw(); aR(r, u) }, show: function() { this.setVisible(!0) }, hide: function() { this.setVisible(!1) }, select: function(m) { this.selected = m = m === by ? !this.selected : m; if (this.checkbox) { this.checkbox.checked = m } aR(this, m ? "select" : "unselect") }, drawTracker: bt.drawTrackerGraph }); bh(bI, { Color: aX, Point: an, Tick: bv, Renderer: b, SVGElement: aG, SVGRenderer: bu, arrayMin: a9, arrayMax: ai, charts: bP, dateFormat: a3, error: aH, format: aD, pathAnim: b2, getOptions: function() { return a7 }, hasBidiBug: a0, isTouchDevice: aF, setOptions: function(m) { a7 = bY(!0, a7, m); C(); return a7 }, addEvent: aW, removeEvent: bU, createElement: bZ, discardElement: bk, css: ah, each: aQ, map: bA, merge: bY, splat: bj, extendClass: aC, pInt: i, svg: j, canvas: ad, vml: !j && !ad, product: "Highcharts", version: "4.1.5" }) } )();