(window.webpackJsonp = window.webpackJsonp || [ ]).push([[2], Array(25).concat([function (e, t, n) { 'use strict'; e.exports = n(199) }, function (e, t, n) { e.exports = n(263) () }, function (e, t, n) { 'use strict'; t.__esModule = !0, t.connect = t.connectAdvanced = t.Provider = void 0; var i = a(n(211)), r = a(n(124)), n = a(n(215)); function a(e) { return e && e.__esModule ? e : { default: e } } t.Provider = i.default, t.connectAdvanced = r.default, t.connect = n.default }, , , function (e, t, n) { var Ur; (Ur = n(129) (e)).exports = function () { 'use strict'; var t; function c() { return t.apply(null, arguments) } function e(e) { t = e } function r(e) { return Object.prototype.toString.call(e) === '[object Array]' } function a(e) { return e instanceof Date || Object.prototype.toString.call(e) === '[object Date]' } function n(e, t) { var n = [ ], i; for (i = 0; i < e.length; ++i) n.push(t(e[i], i)); return n } function s(e, t) { return Object.prototype.hasOwnProperty.call(e, t) } function o(e, t) { for (var n in t) if (s(t, n)) e[n] = t[n]; if (s(t, 'toString')) e.toString = t.toString; if (s(t, 'valueOf')) e.valueOf = t.valueOf; return e } function l(e, t, n, i) { return Tt(e, t, n, i, true).utc() } function i() { return { empty: false, unusedTokens: [ ], unusedInput: [ ], overflow: - 2, charsLeftOver: 0, nullInput: false, invalidMonth: null, invalidFormat: false, userInvalidated: false, iso: false } } function u(e) { if (e._pf == null) e._pf = i(); return e._pf } function d(e) { if (e._isValid == null) { var t = u(e); e._isValid = !isNaN(e._d.getTime()) && t.overflow < 0 && !t.empty && !t.invalidMonth && !t.invalidWeekday && !t.nullInput && !t.invalidFormat && !t.userInvalidated; if (e._strict) e._isValid = e._isValid && t.charsLeftOver === 0 && t.unusedTokens.length === 0 && t.bigHour === undefined } return e._isValid } function p(e) { var t = l(NaN); if (e != null) o(u(t), e); else u(t).userInvalidated = true; return t } function m(e) { return e === void 0 } var f = c.momentProperties = [ ]; function h(e, t) { var n, i, r; if (!m(t._isAMomentObject)) e._isAMomentObject = t._isAMomentObject; if (!m(t._i)) e._i = t._i; if (!m(t._f)) e._f = t._f; if (!m(t._l)) e._l = t._l; if (!m(t._strict)) e._strict = t._strict; if (!m(t._tzm)) e._tzm = t._tzm; if (!m(t._isUTC)) e._isUTC = t._isUTC; if (!m(t._offset)) e._offset = t._offset; if (!m(t._pf)) e._pf = u(t); if (!m(t._locale)) e._locale = t._locale; if (f.length > 0) for (n in f) { i = f[n]; r = t[i]; if (!m(r)) e[i] = r } return e } var g = false; function _(e) { h(this, e); this._d = new Date(e._d != null ? e._d.getTime() : NaN); if (g === false) { g = true; c.updateOffset(this); g = false } } function y(e) { return e instanceof _ || e != null && e._isAMomentObject != null } function b(e) { if (e < 0) return Math.ceil(e); else return Math.floor(e) } function v(e) { var t = + e, n = 0; if (t !== 0 && isFinite(t)) n = b(t); return n } function S(e, t, n) { var i = Math.min(e.length, t.length), r = Math.abs(e.length - t.length), a = 0, o; for (o = 0; o < i; o++) if (n && e[o] !== t[o] || !n && v(e[o]) !== v(t[o])) a++; return a + r } function x() { } var E = { }, C; function w(e) { return e ? e.toLowerCase().replace('_', '-') : e } function T(e) { var t = 0, n, i, r, a; while (t < e.length) { a = w(e[t]).split('-'); n = a.length; i = w(e[t + 1]); i = i ? i.split('-') : null; while (n > 0) { r = O(a.slice(0, n).join('-')); if (r) return r; if (i && i.length >= n && S(a, i, true) >= n - 1) break; n-- } t++ } return null } function O(e) { var t = null; if (!E[e] && typeof Ur !== 'undefined' && Ur && Ur.exports) try { t = C._abbr; !function e() { var t = new Error('Cannot find module \'undefined\''); t.code = 'MODULE_NOT_FOUND'; throw t }(); M(t) } catch (e) { } return E[e] } function M(e, t) { var n; if (e) { if (m(t)) n = N(e); else n = A(e, t); if (n) C = n } return C._abbr } function A(e, t) { if (t !== null) { t.abbr = e; E[e] = E[e] || new x; E[e].set(t); M(e); return E[e] } else { delete E[e]; return null } } function N(e) { var t; if (e && e._locale && e._locale._abbr) e = e._locale._abbr; if (!e) return C; if (!r(e)) { t = O(e); if (t) return t; e = [ e ] } return T(e) } var D = { }; function k(e, t) { var n = e.toLowerCase(); D[n] = D[n + 's'] = D[t] = e } function P(e) { return typeof e === 'string' ? D[e] || D[e.toLowerCase()] : undefined } function L(e) { var t = { }, n, i; for (i in e) if (s(e, i)) { n = P(i); if (n) t[n] = e[i] } return t } function R(e) { return e instanceof Function || Object.prototype.toString.call(e) === '[object Function]' } function I(t, n) { return function (e) { if (e != null) { B(this, t, e); c.updateOffset(this, n); return this } else return F(this, t) } } function F(e, t) { return e.isValid() ? e._d['get' + (e._isUTC ? 'UTC' : '') + t]() : NaN } function B(e, t, n) { if (e.isValid()) e._d['set' + (e._isUTC ? 'UTC' : '') + t](n) } function G(e, t) { var n; if (typeof e === 'object') for (n in e) this.set(n, e[n]); else { e = P(e); if (R(this[e])) return this[e](t) } return this } function U(e, t, n) { var i = '' + Math.abs(e), r = t - i.length, a = e >= 0; return (a ? n ? '+' : '' : '-') + Math.pow(10, Math.max(0, r)).toString().substr(1) + i } var j = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g, V = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, z = { }, H = { }; function q(e, t, n, i) { var r = i; if (typeof i === 'string') r = function () { return this[i]() }; if (e) H[e] = r; if (t) H[t[0]] = function () { return U(r.apply(this, arguments), t[1], t[2]) }; if (n) H[n] = function () { return this.localeData().ordinal(r.apply(this, arguments), e) } } function W(e) { if (e.match(/\[[\s\S]/)) return e.replace(/^\[|\]$/g, ''); return e.replace(/\\/g, '') } function K(n) { var i = n.match(j), r, a; for (r = 0, a = i.length; r < a; r++) if (H[i[r]]) i[r] = H[i[r]]; else i[r] = W(i[r]); return function (e) { var t = ''; for (r = 0; r < a; r++) t += i[r] instanceof Function ? i[r].call(e, n) : i[r]; return t } } function $(e, t) { if (!e.isValid()) return e.localeData().invalidDate(); t = Y(t, e.localeData()); z[t] = z[t] || K(t); return z[t](e) } function Y(e, t) { var n = 5; function i(e) { return t.longDateFormat(e) || e } V.lastIndex = 0; while (n >= 0 && V.test(e)) { e = e.replace(V, i); V.lastIndex = 0; n -= 1 } return e } var X = /\d/, Q = /\d\d/, Z = /\d{3}/, J = /\d{4}/, ee = /[+-]?\d{6}/, te = /\d\d?/, ne = /\d\d\d\d?/, ie = /\d\d\d\d\d\d?/, re = /\d{1,3}/, ae = /\d{1,4}/, oe = /[+-]?\d{1,6}/, se = /\d+/, le = /[+-]?\d+/, ce = /Z|[+-]\d\d:?\d\d/gi, ue = /Z|[+-]\d\d(?::?\d\d)?/gi, de = /[+-]?\d+(\.\d{1,3})?/, pe = /[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i, me = { }; function fe(e, n, i) { me[e] = R(n) ? n : function (e, t) { return e && i ? i : n } } function he(e, t) { if (!s(me, e)) return new RegExp(ge(e)); return me[e](t._strict, t._locale) } function ge(e) { return _e(e.replace('\\', '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (e, t, n, i, r) { return t || n || i || r })) } function _e(e) { return e.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&') } var ye = { }; function be(e, n) { var t, i = n; if (typeof e === 'string') e = [ e ]; if (typeof n === 'number') i = function (e, t) { t[n] = v(e) }; for (t = 0; t < e.length; t++) ye[e[t]] = i } function ve(e, r) { be(e, function (e, t, n, i) { n._w = n._w || { }; r(e, n._w, n, i) }) } function Se(e, t, n) { if (t != null && s(ye, e)) ye[e](t, n._a, n, e) } var xe = 0, Ee = 1, Ce = 2, we = 3, Te = 4, Oe = 5, Me = 6, Ae = 7, Ne = 8; function De(e, t) { return new Date(Date.UTC(e, t + 1, 0)).getUTCDate() } q('M', [ 'MM', 2 ], 'Mo', function () { return this.month() + 1 }), q('MMM', 0, 0, function (e) { return this.localeData().monthsShort(this, e) }), q('MMMM', 0, 0, function (e) { return this.localeData().months(this, e) }), k('month', 'M'), fe('M', te), fe('MM', te, Q), fe('MMM', function (e, t) { return t.monthsShortRegex(e) }), fe('MMMM', function (e, t) { return t.monthsRegex(e) }), be(['M', 'MM'], function (e, t) { t[Ee] = v(e) - 1 }), be(['MMM', 'MMMM'], function (e, t, n, i) { var r = n._locale.monthsParse(e, i, n._strict); if (r != null) t[Ee] = r; else u(n).invalidMonth = e }); var ke = /D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/, Pe = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'); function Le(e, t) { return r(this._months) ? this._months[e.month()] : this._months[ke.test(t) ? 'format' : 'standalone'][e.month()] } var Re = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'); function Ie(e, t) { return r(this._monthsShort) ? this._monthsShort[e.month()] : this._monthsShort[ke.test(t) ? 'format' : 'standalone'][e.month()] } function Fe(e, t, n) { var i, r, a; if (!this._monthsParse) { this._monthsParse = [ ]; this._longMonthsParse = [ ]; this._shortMonthsParse = [ ] } for (i = 0; i < 12; i++) { r = l([2000, i]); if (n && !this._longMonthsParse[i]) { this._longMonthsParse[i] = new RegExp('^' + this.months(r, '').replace('.', '') + '$', 'i'); this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(r, '').replace('.', '') + '$', 'i') } if (!n && !this._monthsParse[i]) { a = '^' + this.months(r, '') + '|^' + this.monthsShort(r, ''); this._monthsParse[i] = new RegExp(a.replace('.', ''), 'i') } if (n && t === 'MMMM' && this._longMonthsParse[i].test(e)) return i; else if (n && t === 'MMM' && this._shortMonthsParse[i].test(e)) return i; else if (!n && this._monthsParse[i].test(e)) return i } } function Be(e, t) { var n; if (!e.isValid()) return e; if (typeof t === 'string') { t = e.localeData().monthsParse(t); if (typeof t !== 'number') return e } n = Math.min(e.date(), De(e.year(), t)); e._d['set' + (e._isUTC ? 'UTC' : '') + 'Month'](t, n); return e } function Ge(e) { if (e != null) { Be(this, e); c.updateOffset(this, true); return this } else return F(this, 'Month') } function Ue() { return De(this.year(), this.month()) } var je = pe; function Ve(e) { if (this._monthsParseExact) { if (!s(this, '_monthsRegex')) qe.call(this); if (e) return this._monthsShortStrictRegex; else return this._monthsShortRegex } else return this._monthsShortStrictRegex && e ? this._monthsShortStrictRegex : this._monthsShortRegex } var ze = pe; function He(e) { if (this._monthsParseExact) { if (!s(this, '_monthsRegex')) qe.call(this); if (e) return this._monthsStrictRegex; else return this._monthsRegex } else return this._monthsStrictRegex && e ? this._monthsStrictRegex : this._monthsRegex } function qe() { function e(e, t) { return t.length - e.length } var t = [ ], n = [ ], i = [ ], r, a; for (r = 0; r < 12; r++) { a = l([2000, r]); t.push(this.monthsShort(a, '')); n.push(this.months(a, '')); i.push(this.months(a, '')); i.push(this.monthsShort(a, '')) } t.sort(e); n.sort(e); i.sort(e); for (r = 0; r < 12; r++) { t[r] = _e(t[r]); n[r] = _e(n[r]); i[r] = _e(i[r]) } this._monthsRegex = new RegExp('^(' + i.join('|') + ')', 'i'); this._monthsShortRegex = this._monthsRegex; this._monthsStrictRegex = new RegExp('^(' + n.join('|') + ')$', 'i'); this._monthsShortStrictRegex = new RegExp('^(' + t.join('|') + ')$', 'i') } function We(e) { var t; var n = e._a; if (n && u(e).overflow === - 2) { t = n[Ee] < 0 || n[Ee] > 11 ? Ee : n[Ce] < 1 || n[Ce] > De(n[xe], n[Ee]) ? Ce : n[we] < 0 || n[we] > 24 || n[we] === 24 && (n[Te] !== 0 || n[Oe] !== 0 || n[Me] !== 0) ? we : n[Te] < 0 || n[Te] > 59 ? Te : n[Oe] < 0 || n[Oe] > 59 ? Oe : n[Me] < 0 || n[Me] > 999 ? Me : - 1; if (u(e)._overflowDayOfYear && (t < xe || t > Ce)) t = Ce; if (u(e)._overflowWeeks && t === - 1) t = Ae; if (u(e)._overflowWeekday && t === - 1) t = Ne; u(e).overflow = t } return e } function Ke(e) { if (c.suppressDeprecationWarnings === false && typeof console !== 'undefined' && console.warn) console.warn('Deprecation warning: ' + e) } function $e(e, t) { var n = true; return o(function () { if (n) { Ke(e + '\nArguments: ' + Array.prototype.slice.call(arguments).join(', ') + '\n' + (new Error).stack); n = false } return t.apply(this, arguments) }, t) } var Ye = { }; function Xe(e, t) { if (!Ye[e]) { Ke(t); Ye[e] = true } } var Qe = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/, Ze = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/, Je = /Z|[+-]\d\d(?::?\d\d)?/, et = [ ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/], [ 'YYYY-MM-DD', /\d{4}-\d\d-\d\d/ ], [ 'GGGG-[W]WW-E', /\d{4}-W\d\d-\d/ ], [ 'GGGG-[W]WW', /\d{4}-W\d\d/, c.suppressDeprecationWarnings = false ], [ 'YYYY-DDD', /\d{4}-\d{3}/ ], [ 'YYYY-MM', /\d{4}-\d\d/, false ], [ 'YYYYYYMMDD', /[+-]\d{10}/ ], [ 'YYYYMMDD', /\d{8}/ ], [ 'GGGG[W]WWE', /\d{4}W\d{3}/ ], [ 'GGGG[W]WW', /\d{4}W\d{2}/, false ], [ 'YYYYDDD', /\d{7}/ ] ], tt = [ ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/], [ 'HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/ ], [ 'HH:mm:ss', /\d\d:\d\d:\d\d/ ], [ 'HH:mm', /\d\d:\d\d/ ], [ 'HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/ ], [ 'HHmmss,SSSS', /\d\d\d\d\d\d,\d+/ ], [ 'HHmmss', /\d\d\d\d\d\d/ ], [ 'HHmm', /\d\d\d\d/ ], [ 'HH', /\d\d/ ] ], nt = /^\/?Date\((\-?\d+)/i; function it(e) { var t, n, i = e._i, r = Qe.exec(i) || Ze.exec(i), a, o, s, l; if (r) { u(e).iso = true; for (t = 0, n = et.length; t < n; t++) if (et[t][1].exec(r[1])) { o = et[t][0]; a = et[t][2] !== false; break } if (o == null) { e._isValid = false; return } if (r[3]) { for (t = 0, n = tt.length; t < n; t++) if (tt[t][1].exec(r[3])) { s = (r[2] || ' ') + tt[t][0]; break } if (s == null) { e._isValid = false; return } } if (!a && s != null) { e._isValid = false; return } if (r[4]) if (Je.exec(r[4])) l = 'Z'; else { e._isValid = false; return } e._f = o + (s || '') + (l || ''); bt(e) } else e._isValid = false } function rt(e) { var t = nt.exec(e._i); if (t !== null) { e._d = new Date( + t[1]); return } it(e); if (e._isValid === false) { delete e._isValid; c.createFromInputFallback(e) } } function at(e, t, n, i, r, a, o) { var s = new Date(e, t, n, i, r, a, o); if (e < 100 && e >= 0 && isFinite(s.getFullYear())) s.setFullYear(e); return s } function ot(e) { var t = new Date(Date.UTC.apply(null, arguments)); if (e < 100 && e >= 0 && isFinite(t.getUTCFullYear())) t.setUTCFullYear(e); return t } function st(e) { return lt(e) ? 366 : 365 } function lt(e) { return e % 4 === 0 && e % 100 !== 0 || e % 400 === 0 } c.createFromInputFallback = $e('moment construction falls back to js Date. This is ' + 'discouraged and will be removed in upcoming major ' + 'release. Please refer to ' + 'https://github.com/moment/moment/issues/1407 for more info.', function (e) { e._d = new Date(e._i + (e._useUTC ? ' UTC' : '')) }), q('Y', 0, 0, function () { var e = this.year(); return e <= 9999 ? '' + e : '+' + e }), q(0, [ 'YY', 2 ], 0, function () { return this.year() % 100 }), q(0, [ 'YYYY', 4 ], 0, 'year'), q(0, [ 'YYYYY', 5 ], 0, 'year'), q(0, [ 'YYYYYY', 6, true ], 0, 'year'), k('year', 'y'), fe('Y', le), fe('YY', te, Q), fe('YYYY', ae, J), fe('YYYYY', oe, ee), fe('YYYYYY', oe, ee), be(['YYYYY', 'YYYYYY'], xe), be('YYYY', function (e, t) { t[xe] = e.length === 2 ? c.parseTwoDigitYear(e) : v(e) }), be('YY', function (e, t) { t[xe] = c.parseTwoDigitYear(e) }), be('Y', function (e, t) { t[xe] = parseInt(e, 10) }), c.parseTwoDigitYear = function (e) { return v(e) + (v(e) > 68 ? 1900 : 2000) }; var ct = I('FullYear', false); function ut() { return lt(this.year()) } function dt(e, t, n) { var i = 7 + t - n, r = (7 + ot(e, 0, i).getUTCDay() - t) % 7; return - r + i - 1 } function pt(e, t, n, i, r) { var a = (7 + n - i) % 7, o = dt(e, i, r), s = 1 + 7 * (t - 1) + a + o, l, c; if (s <= 0) { l = e - 1; c = st(l) + s } else if (s > st(e)) { l = e + 1; c = s - st(e) } else { l = e; c = s } return { year: l, dayOfYear: c } } function mt(e, t, n) { var i = dt(e.year(), t, n), r = Math.floor((e.dayOfYear() - i - 1) / 7) + 1, a, o; if (r < 1) { o = e.year() - 1; a = r + ft(o, t, n) } else if (r > ft(e.year(), t, n)) { a = r - ft(e.year(), t, n); o = e.year() + 1 } else { o = e.year(); a = r } return { week: a, year: o } } function ft(e, t, n) { var i = dt(e, t, n), r = dt(e + 1, t, n); return (st(e) - i + r) / 7 } function ht(e, t, n) { if (e != null) return e; if (t != null) return t; return n } function gt(e) { var t = new Date(c.now()); if (e._useUTC) return [t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate()]; return [t.getFullYear(), t.getMonth(), t.getDate()] } function _t(e) { var t, n, i = [ ], r, a; if (e._d) return; r = gt(e); if (e._w && e._a[Ce] == null && e._a[Ee] == null) yt(e); if (e._dayOfYear) { a = ht(e._a[xe], r[xe]); if (e._dayOfYear > st(a)) u(e)._overflowDayOfYear = true; n = ot(a, 0, e._dayOfYear); e._a[Ee] = n.getUTCMonth(); e._a[Ce] = n.getUTCDate() } for (t = 0; t < 3 && e._a[t] == null; ++t) e._a[t] = i[t] = r[t]; for (; t < 7; t++) e._a[t] = i[t] = e._a[t] == null ? t === 2 ? 1 : 0 : e._a[t]; if (e._a[we] === 24 && e._a[Te] === 0 && e._a[Oe] === 0 && e._a[Me] === 0) { e._nextDay = true; e._a[we] = 0 } e._d = (e._useUTC ? ot : at).apply(null, i); if (e._tzm != null) e._d.setUTCMinutes(e._d.getUTCMinutes() - e._tzm); if (e._nextDay) e._a[we] = 24 } function yt(e) { var t, n, i, r, a, o, s, l; t = e._w; if (t.GG != null || t.W != null || t.E != null) { a = 1; o = 4; n = ht(t.GG, e._a[xe], mt(Ot(), 1, 4).year); i = ht(t.W, 1); r = ht(t.E, 1); if (r < 1 || r > 7) l = true } else { a = e._locale._week.dow; o = e._locale._week.doy; n = ht(t.gg, e._a[xe], mt(Ot(), a, o).year); i = ht(t.w, 1); if (t.d != null) { r = t.d; if (r < 0 || r > 6) l = true } else if (t.e != null) { r = t.e + a; if (t.e < 0 || t.e > 6) l = true } else r = a } if (i < 1 || i > ft(n, a, o)) u(e)._overflowWeeks = true; else if (l != null) u(e)._overflowWeekday = true; else { s = pt(n, i, r, a, o); e._a[xe] = s.year; e._dayOfYear = s.dayOfYear } } function bt(e) { if (e._f === c.ISO_8601) { it(e); return } e._a = [ ]; u(e).empty = true; var t = '' + e._i, n, i, r, a, o, s = t.length, l = 0; r = Y(e._f, e._locale).match(j) || [ ]; for (n = 0; n < r.length; n++) { a = r[n]; i = (t.match(he(a, e)) || [ ]) [0]; if (i) { o = t.substr(0, t.indexOf(i)); if (o.length > 0) u(e).unusedInput.push(o); t = t.slice(t.indexOf(i) + i.length); l += i.length } if (H[a]) { if (i) u(e).empty = false; else u(e).unusedTokens.push(a); Se(a, i, e) } else if (e._strict && !i) u(e).unusedTokens.push(a) } u(e).charsLeftOver = s - l; if (t.length > 0) u(e).unusedInput.push(t); if (u(e).bigHour === true && e._a[we] <= 12 && e._a[we] > 0) u(e).bigHour = undefined; e._a[we] = vt(e._locale, e._a[we], e._meridiem); _t(e); We(e) } function vt(e, t, n) { var i; if (n == null) return t; if (e.meridiemHour != null) return e.meridiemHour(t, n); else if (e.isPM != null) { i = e.isPM(n); if (i && t < 12) t += 12; if (!i && t === 12) t = 0; return t } else return t } function St(e) { var t, n, i, r, a; if (e._f.length === 0) { u(e).invalidFormat = true; e._d = new Date(NaN); return } for (r = 0; r < e._f.length; r++) { a = 0; t = h({ }, e); if (e._useUTC != null) t._useUTC = e._useUTC; t._f = e._f[r]; bt(t); if (!d(t)) continue; a += u(t).charsLeftOver; a += u(t).unusedTokens.length * 10; u(t).score = a; if (i == null || a < i) { i = a; n = t } } o(e, n || t) } function xt(e) { if (e._d) return; var t = L(e._i); e._a = n([t.year, t.month, t.day || t.date, t.hour, t.minute, t.second, t.millisecond], function (e) { return e && parseInt(e, 10) }); _t(e) } function Et(e) { var t = new _(We(Ct(e))); if (t._nextDay) { t.add(1, 'd'); t._nextDay = undefined } return t } function Ct(e) { var t = e._i, n = e._f; e._locale = e._locale || N(e._l); if (t === null || n === undefined && t === '') return p({ nullInput: true }); if (typeof t === 'string') e._i = t = e._locale.preparse(t); if (y(t)) return new _(We(t)); else if (r(n)) St(e); else if (n) bt(e); else if (a(t)) e._d = t; else wt(e); if (!d(e)) e._d = null; return e } function wt(e) { var t = e._i; if (t === undefined) e._d = new Date(c.now()); else if (a(t)) e._d = new Date( + t); else if (typeof t === 'string') rt(e); else if (r(t)) { e._a = n(t.slice(0), function (e) { return parseInt(e, 10) }); _t(e) } else if (typeof t === 'object') xt(e); else if (typeof t === 'number') e._d = new Date(t); else c.createFromInputFallback(e) } function Tt(e, t, n, i, r) { var a = { }; if (typeof n === 'boolean') { i = n; n = undefined } a._isAMomentObject = true; a._useUTC = a._isUTC = r; a._l = n; a._i = e; a._f = t; a._strict = i; return Et(a) } function Ot(e, t, n, i) { return Tt(e, t, n, i, false) } c.ISO_8601 = function () { }; var Mt = $e('moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548', function () { var e = Ot.apply(null, arguments); if (this.isValid() && e.isValid()) return e < this ? this : e; else return p() }), At = $e('moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548', function () { var e = Ot.apply(null, arguments); if (this.isValid() && e.isValid()) return e > this ? this : e; else return p() }); function Nt(e, t) { var n, i; if (t.length === 1 && r(t[0])) t = t[0]; if (!t.length) return Ot(); n = t[0]; for (i = 1; i < t.length; ++i) if (!t[i].isValid() || t[i][e](n)) n = t[i]; return n } function Dt() { var e = [ ].slice.call(arguments, 0); return Nt('isBefore', e) } function kt() { var e = [ ].slice.call(arguments, 0); return Nt('isAfter', e) } var Pt = function () { return Date.now ? Date.now() : + new Date }; function Lt(e) { var t = L(e), n = t.year || 0, i = t.quarter || 0, r = t.month || 0, a = t.week || 0, o = t.day || 0, s = t.hour || 0, l = t.minute || 0, c = t.second || 0, u = t.millisecond || 0; this._milliseconds = + u + c * 1000 + l * 60000 + s * 3600000; this._days = + o + a * 7; this._months = + r + i * 3 + n * 12; this._data = { }; this._locale = N(); this._bubble() } function Rt(e) { return e instanceof Lt } function It(e, n) { q(e, 0, 0, function () { var e = this.utcOffset(); var t = '+'; if (e < 0) { e = - e; t = '-' } return t + U(~~(e / 60), 2) + n + U(~~e % 60, 2) }) } It('Z', ':'), It('ZZ', ''), fe('Z', ue), fe('ZZ', ue), be(['Z', 'ZZ'], function (e, t, n) { n._useUTC = true; n._tzm = Bt(ue, e) }); var Ft = /([\+\-]|\d\d)/gi; function Bt(e, t) { var n = (t || '').match(e) || [ ]; var i = n[n.length - 1] || [ ]; var r = (i + '').match(Ft) || [ '-', 0, 0 ]; var a = + (r[1] * 60) + v(r[2]); return r[0] === '+' ? a : - a } function Gt(e, t) { var n, i; if (t._isUTC) { n = t.clone(); i = (y(e) || a(e) ? + e : + Ot(e)) - + n; n._d.setTime( + n._d + i); c.updateOffset(n, false); return n } else return Ot(e).local() } function Ut(e) { return - Math.round(e._d.getTimezoneOffset() / 15) * 15 } function jt(e, t) { var n = this._offset || 0, i; if (!this.isValid()) return e != null ? this : NaN; if (e != null) { if (typeof e === 'string') e = Bt(ue, e); else if (Math.abs(e) < 16) e = e * 60; if (!this._isUTC && t) i = Ut(this); this._offset = e; this._isUTC = true; if (i != null) this.add(i, 'm'); if (n !== e) if (!t || this._changeInProgress) on(this, en(e - n, 'm'), 1, false); else if (!this._changeInProgress) { this._changeInProgress = true; c.updateOffset(this, true); this._changeInProgress = null } return this } else return this._isUTC ? n : Ut(this) } function Vt(e, t) { if (e != null) { if (typeof e !== 'string') e = - e; this.utcOffset(e, t); return this } else return - this.utcOffset() } function zt(e) { return this.utcOffset(0, e) } function Ht(e) { if (this._isUTC) { this.utcOffset(0, e); this._isUTC = false; if (e) this.subtract(Ut(this), 'm') } return this } function qt() { if (this._tzm) this.utcOffset(this._tzm); else if (typeof this._i === 'string') this.utcOffset(Bt(ce, this._i)); return this } function Wt(e) { if (!this.isValid()) return false; e = e ? Ot(e).utcOffset() : 0; return (this.utcOffset() - e) % 60 === 0 } function Kt() { return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset() } function $t() { if (!m(this._isDSTShifted)) return this._isDSTShifted; var e = { }; h(e, this); e = Ct(e); if (e._a) { var t = e._isUTC ? l(e._a) : Ot(e._a); this._isDSTShifted = this.isValid() && S(e._a, t.toArray()) > 0 } else this._isDSTShifted = false; return this._isDSTShifted } function Yt() { return this.isValid() ? !this._isUTC : false } function Xt() { return this.isValid() ? this._isUTC : false } function Qt() { return this.isValid() ? this._isUTC && this._offset === 0 : false } c.updateOffset = function () { }; var Zt = /^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?\d*)?$/, Jt = /^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/; function en(e, t) { var n = e, i = null, r, a, o; if (Rt(e)) n = { ms: e._milliseconds, d: e._days, M: e._months }; else if (typeof e === 'number') { n = { }; if (t) n[t] = e; else n.milliseconds = e } else if (!!(i = Zt.exec(e))) { r = i[1] === '-' ? - 1 : 1; n = { y: 0, d: v(i[Ce]) * r, h: v(i[we]) * r, m: v(i[Te]) * r, s: v(i[Oe]) * r, ms: v(i[Me]) * r } } else if (!!(i = Jt.exec(e))) { r = i[1] === '-' ? - 1 : 1; n = { y: tn(i[2], r), M: tn(i[3], r), d: tn(i[4], r), h: tn(i[5], r), m: tn(i[6], r), s: tn(i[7], r), w: tn(i[8], r) } } else if (n == null) n = { }; else if (typeof n === 'object' && ('from' in n || 'to' in n)) { o = rn(Ot(n.from), Ot(n.to)); n = { }; n.ms = o.milliseconds; n.M = o.months } a = new Lt(n); if (Rt(e) && s(e, '_locale')) a._locale = e._locale; return a } function tn(e, t) { var n = e && parseFloat(e.replace(',', '.')); return (isNaN(n) ? 0 : n) * t } function nn(e, t) { var n = { milliseconds: 0, months: 0 }; n.months = t.month() - e.month() + (t.year() - e.year()) * 12; if (e.clone().add(n.months, 'M').isAfter(t)) --n.months; n.milliseconds = + t - + e.clone().add(n.months, 'M'); return n } function rn(e, t) { var n; if (!(e.isValid() && t.isValid())) return { milliseconds: 0, months: 0 }; t = Gt(t, e); if (e.isBefore(t)) n = nn(e, t); else { n = nn(t, e); n.milliseconds = - n.milliseconds; n.months = - n.months } return n } function an(r, a) { return function (e, t) { var n, i; if (t !== null && !isNaN( + t)) { Xe(a, 'moment().' + a + '(period, number) is deprecated. Please use moment().' + a + '(number, period).'); i = e; e = t; t = i } e = typeof e === 'string' ? + e : e; n = en(e, t); on(this, n, r); return this } } function on(e, t, n, i) { var r = t._milliseconds, a = t._days, o = t._months; if (!e.isValid()) return; i = i == null ? true : i; if (r) e._d.setTime( + e._d + r * n); if (a) B(e, 'Date', F(e, 'Date') + a * n); if (o) Be(e, F(e, 'Month') + o * n); if (i) c.updateOffset(e, a || o) } en.fn = Lt.prototype; var sn = an(1, 'add'), ln = an( - 1, 'subtract'); function cn(e, t) { var n = e || Ot(), i = Gt(n, this).startOf('day'), r = this.diff(i, 'days', true), a = r < - 6 ? 'sameElse' : r < - 1 ? 'lastWeek' : r < 0 ? 'lastDay' : r < 1 ? 'sameDay' : r < 2 ? 'nextDay' : r < 7 ? 'nextWeek' : 'sameElse'; var o = t && (R(t[a]) ? t[a]() : t[a]); return this.format(o || this.localeData().calendar(a, this, Ot(n))) } function un() { return new _(this) } function dn(e, t) { var n = y(e) ? e : Ot(e); if (!(this.isValid() && n.isValid())) return false; t = P(!m(t) ? t : 'millisecond'); if (t === 'millisecond') return + this > + n; else return + n < + this.clone().startOf(t) } function pn(e, t) { var n = y(e) ? e : Ot(e); if (!(this.isValid() && n.isValid())) return false; t = P(!m(t) ? t : 'millisecond'); if (t === 'millisecond') return + this < + n; else return + this.clone().endOf(t) < + n } function mn(e, t, n) { return this.isAfter(e, n) && this.isBefore(t, n) } function fn(e, t) { var n = y(e) ? e : Ot(e), i; if (!(this.isValid() && n.isValid())) return false; t = P(t || 'millisecond'); if (t === 'millisecond') return + this === + n; else { i = + n; return + this.clone().startOf(t) <= i && i <= + this.clone().endOf(t) } } function hn(e, t) { return this.isSame(e, t) || this.isAfter(e, t) } function gn(e, t) { return this.isSame(e, t) || this.isBefore(e, t) } function _n(e, t, n) { var i, r, a, o; if (!this.isValid()) return NaN; i = Gt(e, this); if (!i.isValid()) return NaN; r = (i.utcOffset() - this.utcOffset()) * 60000; t = P(t); if (t === 'year' || t === 'month' || t === 'quarter') { o = yn(this, i); if (t === 'quarter') o = o / 3; else if (t === 'year') o = o / 12 } else { a = this - i; o = t === 'second' ? a / 1000 : t === 'minute' ? a / 60000 : t === 'hour' ? a / 3600000 : t === 'day' ? (a - r) / 86400000 : t === 'week' ? (a - r) / 604800000 : a } return n ? o : b(o) } function yn(e, t) { var n = (t.year() - e.year()) * 12 + (t.month() - e.month()), i = e.clone().add(n, 'months'), r, a; if (t - i < 0) { r = e.clone().add(n - 1, 'months'); a = (t - i) / (i - r) } else { r = e.clone().add(n + 1, 'months'); a = (t - i) / (r - i) } return - (n + a) } function bn() { return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ') } function vn() { var e = this.clone().utc(); if (0 < e.year() && e.year() <= 9999) if (R(Date.prototype.toISOString)) return this.toDate().toISOString(); else return $(e, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]'); else return $(e, 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]') } function Sn(e) { var t = $(this, e || c.defaultFormat); return this.localeData().postformat(t) } function xn(e, t) { if (this.isValid() && (y(e) && e.isValid() || Ot(e).isValid())) return en({ to: this, from: e }).locale(this.locale()).humanize(!t); else return this.localeData().invalidDate() } function En(e) { return this.from(Ot(), e) } function Cn(e, t) { if (this.isValid() && (y(e) && e.isValid() || Ot(e).isValid())) return en({ from: this, to: e }).locale(this.locale()).humanize(!t); else return this.localeData().invalidDate() } function wn(e) { return this.to(Ot(), e) } function Tn(e) { var t; if (e === undefined) return this._locale._abbr; else { t = N(e); if (t != null) this._locale = t; return this } } c.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ'; var On = $e('moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', function (e) { if (e === undefined) return this.localeData(); else return this.locale(e) }); function Mn() { return this._locale } function An(e) { e = P(e); switch (e) { case 'year': this.month(0); case 'quarter': case 'month': this.date(1); case 'week': case 'isoWeek': case 'day': this.hours(0); case 'hour': this.minutes(0); case 'minute': this.seconds(0); case 'second': this.milliseconds(0) } if (e === 'week') this.weekday(0); if (e === 'isoWeek') this.isoWeekday(1); if (e === 'quarter') this.month(Math.floor(this.month() / 3) * 3); return this } function Nn(e) { e = P(e); if (e === undefined || e === 'millisecond') return this; return this.startOf(e).add(1, e === 'isoWeek' ? 'week' : e).subtract(1, 'ms') } function Dn() { return + this._d - (this._offset || 0) * 60000 } function kn() { return Math.floor( + this / 1000) } function Pn() { return this._offset ? new Date( + this) : this._d } function Ln() { var e = this; return [e.year(), e.month(), e.date(), e.hour(), e.minute(), e.second(), e.millisecond()] } function Rn() { var e = this; return { years: e.year(), months: e.month(), date: e.date(), hours: e.hours(), minutes: e.minutes(), seconds: e.seconds(), milliseconds: e.milliseconds() } } function In() { return this.isValid() ? this.toISOString() : 'null' } function Fn() { return d(this) } function Bn() { return o({ }, u(this)) } function Gn() { return u(this).overflow } function Un() { return { input: this._i, format: this._f, locale: this._locale, isUTC: this._isUTC, strict: this._strict } } function jn(e, t) { q(0, [ e, e.length ], 0, t) } function Vn(e) { return Wn.call(this, e, this.week(), this.weekday(), this.localeData()._week.dow, this.localeData()._week.doy) } function zn(e) { return Wn.call(this, e, this.isoWeek(), this.isoWeekday(), 1, 4) } function Hn() { return ft(this.year(), 1, 4) } function qn() { var e = this.localeData()._week; return ft(this.year(), e.dow, e.doy) } function Wn(e, t, n, i, r) { var a; if (e == null) return mt(this, i, r).year; else { a = ft(e, i, r); if (t > a) t = a; return Kn.call(this, e, t, n, i, r) } } function Kn(e, t, n, i, r) { var a = pt(e, t, n, i, r), o = ot(a.year, 0, a.dayOfYear); this.year(o.getUTCFullYear()); this.month(o.getUTCMonth()); this.date(o.getUTCDate()); return this } function $n(e) { return e == null ? Math.ceil((this.month() + 1) / 3) : this.month((e - 1) * 3 + this.month() % 3) } function Yn(e) { return mt(e, this._week.dow, this._week.doy).week } q(0, [ 'gg', 2 ], 0, function () { return this.weekYear() % 100 }), q(0, [ 'GG', 2 ], 0, function () { return this.isoWeekYear() % 100 }), jn('gggg', 'weekYear'), jn('ggggg', 'weekYear'), jn('GGGG', 'isoWeekYear'), jn('GGGGG', 'isoWeekYear'), k('weekYear', 'gg'), k('isoWeekYear', 'GG'), fe('G', le), fe('g', le), fe('GG', te, Q), fe('gg', te, Q), fe('GGGG', ae, J), fe('gggg', ae, J), fe('GGGGG', oe, ee), fe('ggggg', oe, ee), ve(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (e, t, n, i) { t[i.substr(0, 2)] = v(e) }), ve(['gg', 'GG'], function (e, t, n, i) { t[i] = c.parseTwoDigitYear(e) }), q('Q', 0, 'Qo', 'quarter'), k('quarter', 'Q'), fe('Q', X), be('Q', function (e, t) { t[Ee] = (v(e) - 1) * 3 }), q('w', [ 'ww', 2 ], 'wo', 'week'), q('W', [ 'WW', 2 ], 'Wo', 'isoWeek'), k('week', 'w'), k('isoWeek', 'W'), fe('w', te), fe('ww', te, Q), fe('W', te), fe('WW', te, Q), ve(['w', 'ww', 'W', 'WW'], function (e, t, n, i) { t[i.substr(0, 1)] = v(e) }); var Xn = { dow: 0, doy: 6 }; function Qn() { return this._week.dow } function Zn() { return this._week.doy } function Jn(e) { var t = this.localeData().week(this); return e == null ? t : this.add((e - t) * 7, 'd') } function ei(e) { var t = mt(this, 1, 4).week; return e == null ? t : this.add((e - t) * 7, 'd') } q('D', [ 'DD', 2 ], 'Do', 'date'), k('date', 'D'), fe('D', te), fe('DD', te, Q), fe('Do', function (e, t) { return e ? t._ordinalParse : t._ordinalParseLenient }), be(['D', 'DD'], Ce), be('Do', function (e, t) { t[Ce] = v(e.match(te) [0], 10) }); var ti = I('Date', true); function ni(e, t) { if (typeof e !== 'string') return e; if (!isNaN(e)) return parseInt(e, 10); e = t.weekdaysParse(e); if (typeof e === 'number') return e; return null } q('d', 0, 'do', 'day'), q('dd', 0, 0, function (e) { return this.localeData().weekdaysMin(this, e) }), q('ddd', 0, 0, function (e) { return this.localeData().weekdaysShort(this, e) }), q('dddd', 0, 0, function (e) { return this.localeData().weekdays(this, e) }), q('e', 0, 0, 'weekday'), q('E', 0, 0, 'isoWeekday'), k('day', 'd'), k('weekday', 'e'), k('isoWeekday', 'E'), fe('d', te), fe('e', te), fe('E', te), fe('dd', pe), fe('ddd', pe), fe('dddd', pe), ve(['dd', 'ddd', 'dddd'], function (e, t, n, i) { var r = n._locale.weekdaysParse(e, i, n._strict); if (r != null) t.d = r; else u(n).invalidWeekday = e }), ve(['d', 'e', 'E'], function (e, t, n, i) { t[i] = v(e) }); var ii = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'); function ri(e, t) { return r(this._weekdays) ? this._weekdays[e.day()] : this._weekdays[this._weekdays.isFormat.test(t) ? 'format' : 'standalone'][e.day()] } var ai = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'); function oi(e) { return this._weekdaysShort[e.day()] } var si = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'); function li(e) { return this._weekdaysMin[e.day()] } function ci(e, t, n) { var i, r, a; if (!this._weekdaysParse) { this._weekdaysParse = [ ]; this._minWeekdaysParse = [ ]; this._shortWeekdaysParse = [ ]; this._fullWeekdaysParse = [ ] } for (i = 0; i < 7; i++) { r = Ot([2000, 1]).day(i); if (n && !this._fullWeekdaysParse[i]) { this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(r, '').replace('.', '.?') + '$', 'i'); this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(r, '').replace('.', '.?') + '$', 'i'); this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(r, '').replace('.', '.?') + '$', 'i') } if (!this._weekdaysParse[i]) { a = '^' + this.weekdays(r, '') + '|^' + this.weekdaysShort(r, '') + '|^' + this.weekdaysMin(r, ''); this._weekdaysParse[i] = new RegExp(a.replace('.', ''), 'i') } if (n && t === 'dddd' && this._fullWeekdaysParse[i].test(e)) return i; else if (n && t === 'ddd' && this._shortWeekdaysParse[i].test(e)) return i; else if (n && t === 'dd' && this._minWeekdaysParse[i].test(e)) return i; else if (!n && this._weekdaysParse[i].test(e)) return i } } function ui(e) { if (!this.isValid()) return e != null ? this : NaN; var t = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); if (e != null) { e = ni(e, this.localeData()); return this.add(e - t, 'd') } else return t } function di(e) { if (!this.isValid()) return e != null ? this : NaN; var t = (this.day() + 7 - this.localeData()._week.dow) % 7; return e == null ? t : this.add(e - t, 'd') } function pi(e) { if (!this.isValid()) return e != null ? this : NaN; return e == null ? this.day() || 7 : this.day(this.day() % 7 ? e : e - 7) } function mi(e) { var t = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 86400000) + 1; return e == null ? t : this.add(e - t, 'd') } function fi() { return this.hours() % 12 || 12 } function hi(e, t) { q(e, 0, 0, function () { return this.localeData().meridiem(this.hours(), this.minutes(), t) }) } function gi(e, t) { return t._meridiemParse } function _i(e) { return (e + '').toLowerCase().charAt(0) === 'p' } q('DDD', [ 'DDDD', 3 ], 'DDDo', 'dayOfYear'), k('dayOfYear', 'DDD'), fe('DDD', re), fe('DDDD', Z), be(['DDD', 'DDDD'], function (e, t, n) { n._dayOfYear = v(e) }), q('H', [ 'HH', 2 ], 0, 'hour'), q('h', [ 'hh', 2 ], 0, fi), q('hmm', 0, 0, function () { return '' + fi.apply(this) + U(this.minutes(), 2) }), q('hmmss', 0, 0, function () { return '' + fi.apply(this) + U(this.minutes(), 2) + U(this.seconds(), 2) }), q('Hmm', 0, 0, function () { return '' + this.hours() + U(this.minutes(), 2) }), q('Hmmss', 0, 0, function () { return '' + this.hours() + U(this.minutes(), 2) + U(this.seconds(), 2) }), hi('a', true), hi('A', false), k('hour', 'h'), fe('a', gi), fe('A', gi), fe('H', te), fe('h', te), fe('HH', te, Q), fe('hh', te, Q), fe('hmm', ne), fe('hmmss', ie), fe('Hmm', ne), fe('Hmmss', ie), be(['H', 'HH'], we), be(['a', 'A'], function (e, t, n) { n._isPm = n._locale.isPM(e); n._meridiem = e }), be(['h', 'hh'], function (e, t, n) { t[we] = v(e); u(n).bigHour = true }), be('hmm', function (e, t, n) { var i = e.length - 2; t[we] = v(e.substr(0, i)); t[Te] = v(e.substr(i)); u(n).bigHour = true }), be('hmmss', function (e, t, n) { var i = e.length - 4; var r = e.length - 2; t[we] = v(e.substr(0, i)); t[Te] = v(e.substr(i, 2)); t[Oe] = v(e.substr(r)); u(n).bigHour = true }), be('Hmm', function (e, t, n) { var i = e.length - 2; t[we] = v(e.substr(0, i)); t[Te] = v(e.substr(i)) }), be('Hmmss', function (e, t, n) { var i = e.length - 4; var r = e.length - 2; t[we] = v(e.substr(0, i)); t[Te] = v(e.substr(i, 2)); t[Oe] = v(e.substr(r)) }); var yi = /[ap]\.?m?\.?/i; function bi(e, t, n) { if (e > 11) return n ? 'pm' : 'PM'; else return n ? 'am' : 'AM' } var vi = I('Hours', true); q('m', [ 'mm', 2 ], 0, 'minute'), k('minute', 'm'), fe('m', te), fe('mm', te, Q), be(['m', 'mm'], Te); var Si = I('Minutes', false); q('s', [ 'ss', 2 ], 0, 'second'), k('second', 's'), fe('s', te), fe('ss', te, Q), be(['s', 'ss'], Oe); var xi = I('Seconds', false), Ei; for (q('S', 0, 0, function () { return ~~(this.millisecond() / 100) }), q(0, [ 'SS', 2 ], 0, function () { return ~~(this.millisecond() / 10) }), q(0, [ 'SSS', 3 ], 0, 'millisecond'), q(0, [ 'SSSS', 4 ], 0, function () { return this.millisecond() * 10 }), q(0, [ 'SSSSS', 5 ], 0, function () { return this.millisecond() * 100 }), q(0, [ 'SSSSSS', 6 ], 0, function () { return this.millisecond() * 1000 }), q(0, [ 'SSSSSSS', 7 ], 0, function () { return this.millisecond() * 10000 }), q(0, [ 'SSSSSSSS', 8 ], 0, function () { return this.millisecond() * 100000 }), q(0, [ 'SSSSSSSSS', 9 ], 0, function () { return this.millisecond() * 1000000 }), k('millisecond', 'ms'), fe('S', re, X), fe('SS', re, Q), fe('SSS', re, Z), Ei = 'SSSS'; Ei.length <= 9; Ei += 'S') fe(Ei, se); function Ci(e, t) { t[Me] = v(('0.' + e) * 1000) } for (Ei = 'S'; Ei.length <= 9; Ei += 'S') be(Ei, Ci); var wi = I('Milliseconds', false); function Ti() { return this._isUTC ? 'UTC' : '' } function Oi() { return this._isUTC ? 'Coordinated Universal Time' : '' } q('z', 0, 0, 'zoneAbbr'), q('zz', 0, 0, 'zoneName'); var Mi = _.prototype; Mi.add = sn, Mi.calendar = cn, Mi.clone = un, Mi.diff = _n, Mi.endOf = Nn, Mi.format = Sn, Mi.from = xn, Mi.fromNow = En, Mi.to = Cn, Mi.toNow = wn, Mi.get = G, Mi.invalidAt = Gn, Mi.isAfter = dn, Mi.isBefore = pn, Mi.isBetween = mn, Mi.isSame = fn, Mi.isSameOrAfter = hn, Mi.isSameOrBefore = gn, Mi.isValid = Fn, Mi.lang = On, Mi.locale = Tn, Mi.localeData = Mn, Mi.max = At, Mi.min = Mt, Mi.parsingFlags = Bn, Mi.set = G, Mi.startOf = An, Mi.subtract = ln, Mi.toArray = Ln, Mi.toObject = Rn, Mi.toDate = Pn, Mi.toISOString = vn, Mi.toJSON = In, Mi.toString = bn, Mi.unix = kn, Mi.valueOf = Dn, Mi.creationData = Un, Mi.year = ct, Mi.isLeapYear = ut, Mi.weekYear = Vn, Mi.isoWeekYear = zn, Mi.quarter = Mi.quarters = $n, Mi.month = Ge, Mi.daysInMonth = Ue, Mi.week = Mi.weeks = Jn, Mi.isoWeek = Mi.isoWeeks = ei, Mi.weeksInYear = qn, Mi.isoWeeksInYear = Hn, Mi.date = ti, Mi.day = Mi.days = ui, Mi.weekday = di, Mi.isoWeekday = pi, Mi.dayOfYear = mi, Mi.hour = Mi.hours = vi, Mi.minute = Mi.minutes = Si, Mi.second = Mi.seconds = xi, Mi.millisecond = Mi.milliseconds = wi, Mi.utcOffset = jt, Mi.utc = zt, Mi.local = Ht, Mi.parseZone = qt, Mi.hasAlignedHourOffset = Wt, Mi.isDST = Kt, Mi.isDSTShifted = $t, Mi.isLocal = Yt, Mi.isUtcOffset = Xt, Mi.isUtc = Qt, Mi.isUTC = Qt, Mi.zoneAbbr = Ti, Mi.zoneName = Oi, Mi.dates = $e('dates accessor is deprecated. Use date instead.', ti), Mi.months = $e('months accessor is deprecated. Use month instead', Ge), Mi.years = $e('years accessor is deprecated. Use year instead', ct), Mi.zone = $e('moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779', Vt); var Ai = Mi, Ni; function Di(e) { return Ot(e * 1000) } function ki() { return Ot.apply(null, arguments).parseZone() } function Pi(e, t, n) { var i = this._calendar[e]; return R(i) ? i.call(t, n) : i } var Li = { LTS: 'h:mm:ss A', LT: 'h:mm A', L: 'MM/DD/YYYY', LL: 'MMMM D, YYYY', LLL: 'MMMM D, YYYY h:mm A', LLLL: 'dddd, MMMM D, YYYY h:mm A' }; function Ri(e) { var t = this._longDateFormat[e], n = this._longDateFormat[e.toUpperCase()]; if (t || !n) return t; this._longDateFormat[e] = n.replace(/MMMM|MM|DD|dddd/g, function (e) { return e.slice(1) }); return this._longDateFormat[e] } var Ii = 'Invalid date'; function Fi() { return this._invalidDate } var Bi = '%d', Gi = /\d{1,2}/; function Ui(e) { return this._ordinal.replace('%d', e) } function ji(e) { return e } var Vi = { future: 'in %s', past: '%s ago', s: 'a few seconds', m: 'a minute', mm: '%d minutes', h: 'an hour', hh: '%d hours', d: 'a day', dd: '%d days', M: 'a month', MM: '%d months', y: 'a year', yy: '%d years' }; function zi(e, t, n, i) { var r = this._relativeTime[n]; return R(r) ? r(e, t, n, i) : r.replace(/%d/i, e) } function Hi(e, t) { var n = this._relativeTime[e > 0 ? 'future' : 'past']; return R(n) ? n(t) : n.replace(/%s/i, t) } function qi(e) { var t, n; for (n in e) { t = e[n]; if (R(t)) this[n] = t; else this['_' + n] = t } this._ordinalParseLenient = new RegExp(this._ordinalParse.source + '|' + /\d{1,2}/.source) } var Wi = x.prototype; function Ki(e, t, n, i) { var r = N(); var a = l().set(i, t); return r[n](a, e) } function $i(e, t, n, i, r) { if (typeof e === 'number') { t = e; e = undefined } e = e || ''; if (t != null) return Ki(e, t, n, r); var a; var o = [ ]; for (a = 0; a < i; a++) o[a] = Ki(e, a, n, r); return o } function Yi(e, t) { return $i(e, t, 'months', 12, 'month') } function Xi(e, t) { return $i(e, t, 'monthsShort', 12, 'month') } function Qi(e, t) { return $i(e, t, 'weekdays', 7, 'day') } function Zi(e, t) { return $i(e, t, 'weekdaysShort', 7, 'day') } function Ji(e, t) { return $i(e, t, 'weekdaysMin', 7, 'day') } Wi._calendar = { sameDay: '[Today at] LT', nextDay: '[Tomorrow at] LT', nextWeek: 'dddd [at] LT', lastDay: '[Yesterday at] LT', lastWeek: '[Last] dddd [at] LT', sameElse: 'L' }, Wi.calendar = Pi, Wi._longDateFormat = Li, Wi.longDateFormat = Ri, Wi._invalidDate = Ii, Wi.invalidDate = Fi, Wi._ordinal = Bi, Wi.ordinal = Ui, Wi._ordinalParse = Gi, Wi.preparse = ji, Wi.postformat = ji, Wi._relativeTime = Vi, Wi.relativeTime = zi, Wi.pastFuture = Hi, Wi.set = qi, Wi.months = Le, Wi._months = Pe, Wi.monthsShort = Ie, Wi._monthsShort = Re, Wi.monthsParse = Fe, Wi._monthsRegex = ze, Wi.monthsRegex = He, Wi._monthsShortRegex = je, Wi.monthsShortRegex = Ve, Wi.week = Yn, Wi._week = Xn, Wi.firstDayOfYear = Zn, Wi.firstDayOfWeek = Qn, Wi.weekdays = ri, Wi._weekdays = ii, Wi.weekdaysMin = li, Wi._weekdaysMin = si, Wi.weekdaysShort = oi, Wi._weekdaysShort = ai, Wi.weekdaysParse = ci, Wi.isPM = _i, Wi._meridiemParse = yi, Wi.meridiem = bi, M('en', { ordinalParse: /\d{1,2}(th|st|nd|rd)/, ordinal: function (e) { var t = e % 10, n = v(e % 100 / 10) === 1 ? 'th' : t === 1 ? 'st' : t === 2 ? 'nd' : t === 3 ? 'rd' : 'th'; return e + n } }), c.lang = $e('moment.lang is deprecated. Use moment.locale instead.', M), c.langData = $e('moment.langData is deprecated. Use moment.localeData instead.', N); var er = Math.abs; function tr() { var e = this._data; this._milliseconds = er(this._milliseconds); this._days = er(this._days); this._months = er(this._months); e.milliseconds = er(e.milliseconds); e.seconds = er(e.seconds); e.minutes = er(e.minutes); e.hours = er(e.hours); e.months = er(e.months); e.years = er(e.years); return this } function nr(e, t, n, i) { var r = en(t, n); e._milliseconds += i * r._milliseconds; e._days += i * r._days; e._months += i * r._months; return e._bubble() } function ir(e, t) { return nr(this, e, t, 1) } function rr(e, t) { return nr(this, e, t, - 1) } function ar(e) { if (e < 0) return Math.floor(e); else return Math.ceil(e) } function or() { var e = this._milliseconds; var t = this._days; var n = this._months; var i = this._data; var r, a, o, s, l; if (!(e >= 0 && t >= 0 && n >= 0 || e <= 0 && t <= 0 && n <= 0)) { e += ar(lr(n) + t) * 86400000; t = 0; n = 0 } i.milliseconds = e % 1000; r = b(e / 1000); i.seconds = r % 60; a = b(r / 60); i.minutes = a % 60; o = b(a / 60); i.hours = o % 24; t += b(o / 24); l = b(sr(t)); n += l; t -= ar(lr(l)); s = b(n / 12); n %= 12; i.days = t; i.months = n; i.years = s; return this } function sr(e) { return e * 4800 / 146097 } function lr(e) { return e * 146097 / 4800 } function cr(e) { var t; var n; var i = this._milliseconds; e = P(e); if (e === 'month' || e === 'year') { t = this._days + i / 86400000; n = this._months + sr(t); return e === 'month' ? n : n / 12 } else { t = this._days + Math.round(lr(this._months)); switch (e) { case 'week': return t / 7 + i / 604800000; case 'day': return t + i / 86400000; case 'hour': return t * 24 + i / 3600000; case 'minute': return t * 1440 + i / 60000; case 'second': return t * 86400 + i / 1000; case 'millisecond': return Math.floor(t * 86400000) + i; default: throw new Error('Unknown unit ' + e) } } } function ur() { return this._milliseconds + this._days * 86400000 + this._months % 12 * 2592000000 + v(this._months / 12) * 31536000000 } function dr(e) { return function () { return this.as(e) } } var pr = dr('ms'), mr = dr('s'), fr = dr('m'), hr = dr('h'), gr = dr('d'), _r = dr('w'), yr = dr('M'), br = dr('y'); function vr(e) { e = P(e); return this[e + 's']() } function Sr(e) { return function () { return this._data[e] } } var xr = Sr('milliseconds'), Er = Sr('seconds'), Cr = Sr('minutes'), wr = Sr('hours'), Tr = Sr('days'), Or = Sr('months'), Mr = Sr('years'); function Ar() { return b(this.days() / 7) } var Nr = Math.round, Dr = { s: 45, m: 45, h: 22, d: 26, M: 11 }; function kr(e, t, n, i, r) { return r.relativeTime(t || 1, !!n, e, i) } function Pr(e, t, n) { var i = en(e).abs(); var r = Nr(i.as('s')); var a = Nr(i.as('m')); var o = Nr(i.as('h')); var s = Nr(i.as('d')); var l = Nr(i.as('M')); var c = Nr(i.as('y')); var u = r < Dr.s && [ 's', r ] || a <= 1 && [ 'm' ] || a < Dr.m && [ 'mm', a ] || o <= 1 && [ 'h' ] || o < Dr.h && [ 'hh', o ] || s <= 1 && [ 'd' ] || s < Dr.d && [ 'dd', s ] || l <= 1 && [ 'M' ] || l < Dr.M && [ 'MM', l ] || c <= 1 && [ 'y' ] || [ 'yy', c ]; u[2] = t; u[3] = + e > 0; u[4] = n; return kr.apply(null, u) } function Lr(e, t) { if (Dr[e] === undefined) return false; if (t === undefined) return Dr[e]; Dr[e] = t; return true } function Rr(e) { var t = this.localeData(); var n = Pr(this, !e, t); if (e) n = t.pastFuture( + this, n); return t.postformat(n) } var Ir = Math.abs; function Fr() { var e = Ir(this._milliseconds) / 1000; var t = Ir(this._days); var n = Ir(this._months); var i, r, a; i = b(e / 60); r = b(i / 60); e %= 60; i %= 60; a = b(n / 12); n %= 12; var o = a; var s = n; var l = t; var c = r; var u = i; var d = e; var p = this.asSeconds(); if (!p) return 'P0D'; return (p < 0 ? '-' : '') + 'P' + (o ? o + 'Y' : '') + (s ? s + 'M' : '') + (l ? l + 'D' : '') + (c || u || d ? 'T' : '') + (c ? c + 'H' : '') + (u ? u + 'M' : '') + (d ? d + 'S' : '') } var Br = Lt.prototype, Gr; return Br.abs = tr, Br.add = ir, Br.subtract = rr, Br.as = cr, Br.asMilliseconds = pr, Br.asSeconds = mr, Br.asMinutes = fr, Br.asHours = hr, Br.asDays = gr, Br.asWeeks = _r, Br.asMonths = yr, Br.asYears = br, Br.valueOf = ur, Br._bubble = or, Br.get = vr, Br.milliseconds = xr, Br.seconds = Er, Br.minutes = Cr, Br.hours = wr, Br.days = Tr, Br.weeks = Ar, Br.months = Or, Br.years = Mr, Br.humanize = Rr, Br.toISOString = Fr, Br.toString = Fr, Br.toJSON = Fr, Br.locale = Tn, Br.localeData = Mn, Br.toIsoString = $e('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', Fr), Br.lang = On, q('X', 0, 0, 'unix'), q('x', 0, 0, 'valueOf'), fe('x', le), fe('X', de), be('X', function (e, t, n) { n._d = new Date(parseFloat(e, 10) * 1000) }), be('x', function (e, t, n) { n._d = new Date(v(e)) }), c.version = '2.11.2', e(Ot), c.fn = Ai, c.min = Dt, c.max = kt, c.now = Pt, c.utc = l, c.unix = Di, c.months = Yi, c.isDate = a, c.locale = M, c.invalid = p, c.duration = en, c.isMoment = y, c.weekdays = Qi, c.parseZone = ki, c.localeData = N, c.isDuration = Rt, c.monthsShort = Xi, c.weekdaysMin = Ji, c.defineLocale = A, c.weekdaysShort = Zi, c.normalizeUnits = P, c.relativeTimeThreshold = Lr, c.prototype = Ai, c }() }, function (e, t, n) { 'use strict'; t.__esModule = !0, t.createMemoryHistory = t.hashHistory = t.browserHistory = t.applyRouterMiddleware = t.formatPattern = t.useRouterHistory = t.match = t.routerShape = t.locationShape = t.RouterContext = t.createRoutes = t.Route = t.Redirect = t.IndexRoute = t.IndexRedirect = t.withRouter = t.IndexLink = t.Link = t.Router = void 0; var i = n(48); Object.defineProperty(t, 'createRoutes', { enumerable: !0, get: function () { return i.createRoutes } }); var r = n(49); Object.defineProperty(t, 'locationShape', { enumerable: !0, get: function () { return r.locationShape } }), Object.defineProperty(t, 'routerShape', { enumerable: !0, get: function () { return r.routerShape } }); var a = n(56); Object.defineProperty(t, 'formatPattern', { enumerable: !0, get: function () { return a.formatPattern } }); var o = v(n(237)), s = v(n(137)), l = v(n(245)), c = v(n(246)), u = v(n(247)), d = v(n(248)), p = v(n(138)), m = v(n(249)), f = v(n(85)), h = v(n(250)), g = v(n(142)), _ = v(n(254)), y = v(n(255)), b = v(n(258)), n = v(n(139)); function v(e) { return e && e.__esModule ? e : { default: e } } t.Router = o.default, t.Link = s.default, t.IndexLink = l.default, t.withRouter = c.default, t.IndexRedirect = u.default, t.IndexRoute = d.default, t.Redirect = p.default, t.Route = m.default, t.RouterContext = f.default, t.match = h.default, t.useRouterHistory = g.default, t.applyRouterMiddleware = _.default, t.browserHistory = y.default, t.hashHistory = b.default, t.createMemoryHistory = n.default }, , , , , function (e, t, n) { 'use strict'; Object.defineProperty(t, '__esModule', { value: !0 }); var i, r = n(203), n = (i = r) && i.__esModule ? i : { default: i }; t.default = n.default, e.exports = t.default }, , function (e, t, n) { 'use strict'; e.exports = function (e, t, n, i, r, a, o, s) { var l, c, u; if (!e) throw void 0 === t ? u = Error('Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.') : (l = [ n, i, r, a, o, s ], c = 0, (u = Error(t.replace(/%s/g, function () { return l[c++] }))).name = 'Invariant Violation'), u.framesToPop = 1, u } }, , function (e, t, n) { 'use strict'; e.exports = function () { } }, function (e, t, n) { e.exports = n(235) () }, , , function (e, t, n) { 'use strict'; (function e() { if ('undefined' != typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && 'function' == typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE) try { __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e) } catch (e) { console.error(e) } }) (), e.exports = n(200) }, function (e, t, n) { 'use strict'; e.exports = function () { } }, function (e, t, n) { 'use strict'; var i = n(25), r = n(238); if (void 0 === i) throw Error('create-react-class could not find the React object. If you are using script tags, make sure that React is being loaded before create-react-class.'); n = (new i.Component).updater; e.exports = r(i.Component, i.isValidElement, n) }, function (E, C, w) { var T; !function (a) { 'use strict'; var i, s, e, t, n, r = { version: '0.4.11' }; function o(e) { this.owner = e } function l(e) { var t = this.internal = new c(this); t.loadConfig(e), t.beforeInit(e), t.init(), t.afterInit(e), function t(n, i, r) { Object.keys(n).forEach(function (e) { i[e] = n[e].bind(r), 0 < Object.keys(n[e]).length && t(n[e], i[e], r) }) }(i, this, this) } function c(e) { var t = this; t.d3 = a.d3 || w(93), t.api = e, t.config = t.getDefaultConfig(), t.data = { }, t.cache = { }, t.axes = { } } function u(e) { o.call(this, e) } r.generate = function (e) { return new l(e) }, r.chart = { fn: l.prototype, internal: { fn: c.prototype, axis: { fn: u.prototype } } }, i = r.chart.fn, (s = r.chart.internal.fn).beforeInit = function () { }, s.afterInit = function () { }, s.init = function () { var e = this, t = e.config; if (e.initParams(), t.data_url) e.convertUrlToData(t.data_url, t.data_mimeType, t.data_headers, t.data_keys, e.initWithData); else if (t.data_json) e.initWithData(e.convertJsonToData(t.data_json, t.data_keys)); else if (t.data_rows) e.initWithData(e.convertRowsToData(t.data_rows)); else { if (!t.data_columns) throw Error('url or json or rows or columns is required.'); e.initWithData(e.convertColumnsToData(t.data_columns)) } }, s.initParams = function () { var e = this, t = e.d3, n = e.config; e.clipId = 'c3-' + + new Date + '-clip', e.clipIdForXAxis = e.clipId + '-xaxis', e.clipIdForYAxis = e.clipId + '-yaxis', e.clipIdForGrid = e.clipId + '-grid', e.clipIdForSubchart = e.clipId + '-subchart', e.clipPath = e.getClipPath(e.clipId), e.clipPathForXAxis = e.getClipPath(e.clipIdForXAxis), e.clipPathForYAxis = e.getClipPath(e.clipIdForYAxis), e.clipPathForGrid = e.getClipPath(e.clipIdForGrid), e.clipPathForSubchart = e.getClipPath(e.clipIdForSubchart), e.dragStart = null, e.dragging = !1, e.flowing = !1, e.cancelClick = !1, e.mouseover = !1, e.transiting = !1, e.color = e.generateColor(), e.levelColor = e.generateLevelColor(), e.dataTimeFormat = n.data_xLocaltime ? t.time.format : t.time.format.utc, e.axisTimeFormat = n.axis_x_localtime ? t.time.format : t.time.format.utc, e.defaultAxisTimeFormat = e.axisTimeFormat.multi([['.%L', function (e) { return e.getMilliseconds() } ], [ ':%S', function (e) { return e.getSeconds() } ], [ '%I:%M', function (e) { return e.getMinutes() } ], [ '%I %p', function (e) { return e.getHours() } ], [ '%-m/%-d', function (e) { return e.getDay() && 1 != e.getDate() } ], [ '%-m/%-d', function (e) { return 1 != e.getDate() } ], [ '%-m/%-d', function (e) { return e.getMonth() } ], [ '%Y/%-m/%-d', function () { return !0 } ]]), e.hiddenTargetIds = [ ], e.hiddenLegendIds = [ ], e.focusedTargetIds = [ ], e.defocusedTargetIds = [ ], e.xOrient = n.axis_rotated ? 'left' : 'bottom', e.yOrient = n.axis_rotated ? n.axis_y_inner ? 'top' : 'bottom' : n.axis_y_inner ? 'right' : 'left', e.y2Orient = n.axis_rotated ? n.axis_y2_inner ? 'bottom' : 'top' : n.axis_y2_inner ? 'left' : 'right', e.subXOrient = n.axis_rotated ? 'left' : 'bottom', e.isLegendRight = 'right' === n.legend_position, e.isLegendInset = 'inset' === n.legend_position, e.isLegendTop = 'top-left' === n.legend_inset_anchor || 'top-right' === n.legend_inset_anchor, e.isLegendLeft = 'top-left' === n.legend_inset_anchor || 'bottom-left' === n.legend_inset_anchor, e.legendStep = 0, e.legendItemWidth = 0, e.legendItemHeight = 0, e.currentMaxTickWidths = { x: 0, y: 0, y2: 0 }, e.rotated_padding_left = 30, e.rotated_padding_right = n.axis_rotated && !n.axis_x_show ? 0 : 30, e.rotated_padding_top = 5, e.withoutFadeIn = { }, e.intervalForObserveInserted = void 0, e.axes.subx = t.selectAll([]) }, s.initChartElements = function () { this.initBar && this.initBar(), this.initLine && this.initLine(), this.initArc && this.initArc(), this.initGauge && this.initGauge(), this.initText && this.initText() }, s.initWithData = function (e) { var t = this, n = t.d3, i = t.config, r = !0; t.axis = new u(t), t.initPie && t.initPie(), t.initBrush && t.initBrush(), t.initZoom && t.initZoom(), t.selectChart = i.bindto ? 'function' == typeof i.bindto.node ? i.bindto : n.select(i.bindto) : n.selectAll([]), t.selectChart.empty() && (t.selectChart = n.select(document.createElement('div')).style('opacity', 0), t.observeInserted(t.selectChart), r = !1), t.selectChart.html('').classed('c3', !0), t.data.xs = { }, t.data.targets = t.convertDataToTargets(e), i.data_filter && (t.data.targets = t.data.targets.filter(i.data_filter)), i.data_hide && t.addHiddenTargetIds(!0 === i.data_hide ? t.mapToIds(t.data.targets) : i.data_hide), i.legend_hide && t.addHiddenLegendIds(!0 === i.legend_hide ? t.mapToIds(t.data.targets) : i.legend_hide), t.hasType('gauge') && (i.legend_show = !1), t.updateSizes(), t.updateScales(), t.x.domain(n.extent(t.getXDomain(t.data.targets))), t.y.domain(t.getYDomain(t.data.targets, 'y')), t.y2.domain(t.getYDomain(t.data.targets, 'y2')), t.subX.domain(t.x.domain()), t.subY.domain(t.y.domain()), t.subY2.domain(t.y2.domain()), t.orgXDomain = t.x.domain(), t.brush && t.brush.scale(t.subX), i.zoom_enabled && t.zoom.scale(t.x), t.svg = t.selectChart.append('svg').style('overflow', 'hidden').on('mouseenter', function () { return i.onmouseover.call(t) }).on('mouseleave', function () { return i.onmouseout.call(t) }), t.config.svg_classname && t.svg.attr('class', t.config.svg_classname), n = t.svg.append('defs'), t.clipChart = t.appendClip(n, t.clipId), t.clipXAxis = t.appendClip(n, t.clipIdForXAxis), t.clipYAxis = t.appendClip(n, t.clipIdForYAxis), t.clipGrid = t.appendClip(n, t.clipIdForGrid), t.clipSubchart = t.appendClip(n, t.clipIdForSubchart), t.updateSvgSize(), n = t.main = t.svg.append('g').attr('transform', t.getTranslate('main')), t.initSubchart && t.initSubchart(), t.initTooltip && t.initTooltip(), t.initLegend && t.initLegend(), t.initTitle && t.initTitle(), n.append('text').attr('class', G.text + ' ' + G.empty).attr('text-anchor', 'middle').attr('dominant-baseline', 'middle'), t.initRegion(), t.initGrid(), n.append('g').attr('clip-path', t.clipPath).attr('class', G.chart), i.grid_lines_front && t.initGridLines(), t.initEventRect(), t.initChartElements(), n.insert('rect', i.zoom_privileged ? null : 'g.' + G.regions).attr('class', G.zoomRect).attr('width', t.width).attr('height', t.height).style('opacity', 0).on('dblclick.zoom', null), i.axis_x_extent && t.brush.extent(t.getDefaultExtent()), t.axis.init(), t.updateTargets(t.data.targets), r && (t.updateDimension(), t.config.oninit.call(t), t.redraw({ withTransition: !1, withTransform: !0, withUpdateXDomain: !0, withUpdateOrgXDomain: !0, withTransitionForAxis: !1 })), t.bindResize(), t.api.element = t.selectChart.node() }, s.smoothLines = function (e, t) { var a = this; 'grid' === t && e.each(function () { var e = a.d3.select(this), t = e.attr('x1'), n = e.attr('x2'), i = e.attr('y1'), r = e.attr('y2'); e.attr({ x1: Math.ceil(t), x2: Math.ceil(n), y1: Math.ceil(i), y2: Math.ceil(r) }) }) }, s.updateSizes = function () { var e = this, t = e.config, n = e.legend ? e.getLegendHeight() : 0, i = e.legend ? e.getLegendWidth() : 0, r = e.isLegendRight || e.isLegendInset ? 0 : n, a = e.hasArcType(), o = t.axis_rotated || a ? 0 : e.getHorizontalAxisHeight('x'), s = t.subchart_show && !a ? t.subchart_size_height + o : 0; e.currentWidth = e.getCurrentWidth(), e.currentHeight = e.getCurrentHeight(), e.margin = t.axis_rotated ? { top: e.getHorizontalAxisHeight('y2') + e.getCurrentPaddingTop(), right: a ? 0 : e.getCurrentPaddingRight(), bottom: e.getHorizontalAxisHeight('y') + r + e.getCurrentPaddingBottom(), left: s + (a ? 0 : e.getCurrentPaddingLeft()) } : { top: 4 + e.getCurrentPaddingTop(), right: a ? 0 : e.getCurrentPaddingRight(), bottom: o + s + r + e.getCurrentPaddingBottom(), left: a ? 0 : e.getCurrentPaddingLeft() }, e.margin2 = t.axis_rotated ? { top: e.margin.top, right: NaN, bottom: 20 + r, left: e.rotated_padding_left } : { top: e.currentHeight - s - r, right: NaN, bottom: o + r, left: e.margin.left }, e.margin3 = { top: 0, right: NaN, bottom: 0, left: 0 }, e.updateSizeForLegend && e.updateSizeForLegend(n, i), e.width = e.currentWidth - e.margin.left - e.margin.right, e.height = e.currentHeight - e.margin.top - e.margin.bottom, e.width < 0 && (e.width = 0), e.height < 0 && (e.height = 0), e.width2 = t.axis_rotated ? e.margin.left - e.rotated_padding_left - e.rotated_padding_right : e.width, e.height2 = t.axis_rotated ? e.height : e.currentHeight - e.margin2.top - e.margin2.bottom, e.width2 < 0 && (e.width2 = 0), e.height2 < 0 && (e.height2 = 0), e.arcWidth = e.width - (e.isLegendRight ? i + 10 : 0), e.arcHeight = e.height - (e.isLegendRight ? 0 : 10), e.hasType('gauge') && !t.gauge_fullCircle && (e.arcHeight += e.height - e.getGaugeLabelHeight()), e.updateRadius && e.updateRadius(), e.isLegendRight && a && (e.margin3.left = e.arcWidth / 2 + 1.1 * e.radiusExpanded) }, s.updateTargets = function (e) { var t = this; t.updateTargetsForText(e), t.updateTargetsForBar(e), t.updateTargetsForLine(e), t.hasArcType() && t.updateTargetsForArc && t.updateTargetsForArc(e), t.updateTargetsForSubchart && t.updateTargetsForSubchart(e), t.showTargets() }, s.showTargets = function () { var t = this; t.svg.selectAll('.' + G.target).filter(function (e) { return t.isTargetToShow(e.id) }).transition().duration(t.config.transition_duration).style('opacity', 1) }, s.redraw = function (e, t) { var n, i, r, a, o, s, l, c, u, d, p, m, f, h = this, g = h.main, _ = h.d3, y = h.config, b = h.getShapeIndices(h.isAreaType), v = h.getShapeIndices(h.isBarType), S = h.getShapeIndices(h.isLineType), x = h.hasArcType(), E = h.filterTargetsToShow(h.data.targets), C = h.xv.bind(h), w = U(e = e || { }, 'withY', !0), T = U(e, 'withSubchart', !0), O = U(e, 'withTransition', !0), M = U(e, 'withTransform', !1), A = U(e, 'withUpdateXDomain', !1), N = U(e, 'withUpdateOrgXDomain', !1), D = U(e, 'withTrimXDomain', !0), k = U(e, 'withUpdateXAxis', A), P = U(e, 'withLegend', !1), L = U(e, 'withEventRect', !0), R = U(e, 'withDimension', !0), I = U(e, 'withTransitionForExit', O), F = U(e, 'withTransitionForAxis', O), B = O ? y.transition_duration : 0, I = I ? B : 0; if (t = t || h.axis.generateTransitions(F ? B : 0), P && y.legend_show ? h.updateLegend(h.mapToIds(h.data.targets), e, t) : R && h.updateDimension(!0), h.isCategorized() && 0 === E.length && h.x.domain([0, h.axes.x.selectAll('.tick').size()]), E.length ? (h.updateXDomain(E, A, N, D), y.axis_x_tick_values || (c = h.axis.updateXAxisTickValues(E))) : (h.xAxis.tickValues([]), h.subXAxis.tickValues([])), y.zoom_rescale && !e.flow && (p = h.x.orgDomain()), h.y.domain(h.getYDomain(E, 'y', p)), h.y2.domain(h.getYDomain(E, 'y2', p)), !y.axis_y_tick_values && y.axis_y_tick_count && h.yAxis.tickValues(h.axis.generateTickValues(h.y.domain(), y.axis_y_tick_count)), !y.axis_y2_tick_values && y.axis_y2_tick_count && h.y2Axis.tickValues(h.axis.generateTickValues(h.y2.domain(), y.axis_y2_tick_count)), h.axis.redraw(t, x), h.axis.updateLabels(O), (A || k) && E.length) if (y.axis_x_tick_culling && c) { for (u = 1; u < c.length; u++) if (c.length / u < y.axis_x_tick_culling_max) { d = u; break } h.svg.selectAll('.' + G.axisX + ' .tick text').each(function (e) { e = c.indexOf(e); 0 <= e && _.select(this).style('display', e % d ? 'none' : 'block') }) } else h.svg.selectAll('.' + G.axisX + ' .tick text').style('display', 'block'); n = h.generateDrawArea ? h.generateDrawArea(b, !1) : void 0, i = h.generateDrawBar ? h.generateDrawBar(v) : void 0, r = h.generateDrawLine ? h.generateDrawLine(S, !1) : void 0, a = h.generateXYForText(b, v, S, !0), o = h.generateXYForText(b, v, S, !1), w && (h.subY.domain(h.getYDomain(E, 'y')), h.subY2.domain(h.getYDomain(E, 'y2'))), h.updateXgridFocus(), g.select('text.' + G.text + '.' + G.empty).attr('x', h.width / 2).attr('y', h.height / 2).text(y.data_empty_label_text).transition().style('opacity', E.length ? 0 : 1), h.updateGrid(B), h.updateRegion(B), h.updateBar(I), h.updateLine(I), h.updateArea(I), h.updateCircle(), h.hasDataLabel() && h.updateText(I), h.redrawTitle && h.redrawTitle(), h.redrawArc && h.redrawArc(B, I, M), h.redrawSubchart && h.redrawSubchart(T, t, B, I, b, v, S), g.selectAll('.' + G.selectedCircles).filter(h.isBarType.bind(h)).selectAll('circle').remove(), y.interaction_enabled && !e.flow && L && (h.redrawEventRect(), h.updateZoom && h.updateZoom()), h.updateCircleY(), m = (h.config.axis_rotated ? h.circleY : h.circleX).bind(h), f = (h.config.axis_rotated ? h.circleX : h.circleY).bind(h), e.flow && (l = h.generateFlow({ targets: E, flow: e.flow, duration: e.flow.duration, drawBar: i, drawLine: r, drawArea: n, cx: m, cy: f, xv: C, xForText: a, yForText: o })), (B || l) && h.isTabVisible() ? _.transition().duration(B).each(function () { var t = [ ]; [ h.redrawBar(i, !0), h.redrawLine(r, !0), h.redrawArea(n, !0), h.redrawCircle(m, f, !0), h.redrawText(a, o, e.flow, !0), h.redrawRegion(!0), h.redrawGrid(!0) ].forEach(function (e) { e.forEach(function (e) { t.push(e) }) }), s = h.generateWait(), t.forEach(function (e) { s.add(e) }) }).call(s, function () { l && l(), y.onrendered && y.onrendered.call(h) }) : (h.redrawBar(i), h.redrawLine(r), h.redrawArea(n), h.redrawCircle(m, f), h.redrawText(a, o, e.flow), h.redrawRegion(), h.redrawGrid(), y.onrendered && y.onrendered.call(h)), h.mapToIds(h.data.targets).forEach(function (e) { h.withoutFadeIn[e] = !0 }) }, s.updateAndRedraw = function (e) { var t, n = this, i = n.config; (e = e || { }).withTransition = U(e, 'withTransition', !0), e.withTransform = U(e, 'withTransform', !1), e.withLegend = U(e, 'withLegend', !1), e.withUpdateXDomain = !0, e.withUpdateOrgXDomain = !0, e.withTransitionForExit = !1, e.withTransitionForTransform = U(e, 'withTransitionForTransform', e.withTransition), n.updateSizes(), e.withLegend && i.legend_show || (t = n.axis.generateTransitions(e.withTransitionForAxis ? i.transition_duration : 0), n.updateScales(), n.updateSvgSize(), n.transformAll(e.withTransitionForTransform, t)), n.redraw(e, t) }, s.redrawWithoutRescale = function () { this.redraw({ withY: !1, withSubchart: !1, withEventRect: !1, withTransitionForAxis: !1 }) }, s.isTimeSeries = function () { return 'timeseries' === this.config.axis_x_type }, s.isCategorized = function () { return !!~this.config.axis_x_type.indexOf('categor') }, s.isCustomX = function () { var e = this.config; return !this.isTimeSeries() && (e.data_x || y(e.data_xs)) }, s.isTimeSeriesY = function () { return 'timeseries' === this.config.axis_y_type }, s.getTranslate = function (e) { var t, n, i = this, r = i.config; return 'main' === e ? (t = f(i.margin.left), n = f(i.margin.top)) : 'context' === e ? (t = f(i.margin2.left), n = f(i.margin2.top)) : 'legend' === e ? (t = i.margin3.left, n = i.margin3.top) : 'x' === e ? (t = 0, n = r.axis_rotated ? 0 : i.height) : 'y' === e ? (t = 0, n = r.axis_rotated ? i.height : 0) : 'y2' === e ? (t = r.axis_rotated ? 0 : i.width, n = r.axis_rotated ? 1 : 0) : 'subx' === e ? (t = 0, n = r.axis_rotated ? 0 : i.height2) : 'arc' === e && (t = i.arcWidth / 2, n = i.arcHeight / 2), 'translate(' + t + ',' + n + ')' }, s.initialOpacity = function (e) { return null !== e.value && this.withoutFadeIn[e.id] ? 1 : 0 }, s.initialOpacityForCircle = function (e) { return null !== e.value && this.withoutFadeIn[e.id] ? this.opacityForCircle(e) : 0 }, s.opacityForCircle = function (e) { var t = this.config.point_show ? 1 : 0; return _(e.value) ? this.isScatterType(e) ? 0.5 : t : 0 }, s.opacityForText = function () { return this.hasDataLabel() ? 1 : 0 }, s.xx = function (e) { return e ? this.x(e.x) : null }, s.xv = function (e) { var t = this, n = e.value; return t.isTimeSeries() ? n = t.parseDate(e.value) : t.isCategorized() && 'string' == typeof e.value && (n = t.config.axis_x_categories.indexOf(e.value)), Math.ceil(t.x(n)) }, s.yv = function (e) { return Math.ceil((e.axis && 'y2' === e.axis ? this.y2 : this.y) (e.value)) }, s.subxx = function (e) { return e ? this.subX(e.x) : null }, s.transformMain = function (e, t) { var n, i, r, a = this; t && t.axisX ? n = t.axisX : (n = a.main.select('.' + G.axisX), e && (n = n.transition())), t && t.axisY ? i = t.axisY : (i = a.main.select('.' + G.axisY), e && (i = i.transition())), t && t.axisY2 ? r = t.axisY2 : (r = a.main.select('.' + G.axisY2), e && (r = r.transition())), (e ? a.main.transition() : a.main).attr('transform', a.getTranslate('main')), n.attr('transform', a.getTranslate('x')), i.attr('transform', a.getTranslate('y')), r.attr('transform', a.getTranslate('y2')), a.main.select('.' + G.chartArcs).attr('transform', a.getTranslate('arc')) }, s.transformAll = function (e, t) { var n = this; n.transformMain(e, t), n.config.subchart_show && n.transformContext(e, t), n.legend && n.transformLegend(e) }, s.updateSvgSize = function () { var e = this, t = e.svg.select('.c3-brush .background'); e.svg.attr('width', e.currentWidth).attr('height', e.currentHeight), e.svg.selectAll(['#' + e.clipId, '#' + e.clipIdForGrid]).select('rect').attr('width', e.width).attr('height', e.height), e.svg.select('#' + e.clipIdForXAxis).select('rect').attr('x', e.getXAxisClipX.bind(e)).attr('y', e.getXAxisClipY.bind(e)).attr('width', e.getXAxisClipWidth.bind(e)).attr('height', e.getXAxisClipHeight.bind(e)), e.svg.select('#' + e.clipIdForYAxis).select('rect').attr('x', e.getYAxisClipX.bind(e)).attr('y', e.getYAxisClipY.bind(e)).attr('width', e.getYAxisClipWidth.bind(e)).attr('height', e.getYAxisClipHeight.bind(e)), e.svg.select('#' + e.clipIdForSubchart).select('rect').attr('width', e.width).attr('height', t.size() ? t.attr('height') : 0), e.svg.select('.' + G.zoomRect).attr('width', e.width).attr('height', e.height), e.selectChart.style('max-height', e.currentHeight + 'px') }, s.updateDimension = function (e) { var t = this; e || (t.config.axis_rotated ? (t.axes.x.call(t.xAxis), t.axes.subx.call(t.subXAxis)) : (t.axes.y.call(t.yAxis), t.axes.y2.call(t.y2Axis))), t.updateSizes(), t.updateScales(), t.updateSvgSize(), t.transformAll(!1) }, s.observeInserted = function (t) { var n, i = this; 'undefined' != typeof MutationObserver ? (n = new MutationObserver(function (e) { e.forEach(function (e) { 'childList' === e.type && e.previousSibling && (n.disconnect(), i.intervalForObserveInserted = a.setInterval(function () { t.node().parentNode && (a.clearInterval(i.intervalForObserveInserted), i.updateDimension(), i.brush && i.brush.update(), i.config.oninit.call(i), i.redraw({ withTransform: !0, withUpdateXDomain: !0, withUpdateOrgXDomain: !0, withTransition: !1, withTransitionForTransform: !1, withLegend: !0 }), t.transition().style('opacity', 1)) }, 10)) }) })).observe(t.node(), { attributes: !0, childList: !0, characterData: !0 }) : a.console.error('MutationObserver not defined.') }, s.bindResize = function () { var e, t = this, n = t.config; t.resizeFunction = t.generateResize(), t.resizeFunction.add(function () { n.onresize.call(t) }), n.resize_auto && t.resizeFunction.add(function () { void 0 !== t.resizeTimeout && a.clearTimeout(t.resizeTimeout), t.resizeTimeout = a.setTimeout(function () { delete t.resizeTimeout, t.api.flush() }, 100) }), t.resizeFunction.add(function () { n.onresized.call(t) }), a.attachEvent ? a.attachEvent('onresize', t.resizeFunction) : a.addEventListener ? a.addEventListener('resize', t.resizeFunction, !1) : ((e = a.onresize) ? e.add && e.remove || (e = t.generateResize()).add(a.onresize) : e = t.generateResize(), e.add(t.resizeFunction), a.onresize = e) }, s.generateResize = function () { var n = [ ]; function e() { n.forEach(function (e) { e() }) } return e.add = function (e) { n.push(e) }, e.remove = function (e) { for (var t = 0; t < n.length; t++) if (n[t] === e) { n.splice(t, 1); break } }, e }, s.endall = function (e, t) { var n = 0; e.each(function () { ++n }).each('end', function () { --n || t.apply(this, arguments) }) }, s.generateWait = function () { function e(e, n) { var i = setInterval(function () { var t = 0; r.forEach(function (e) { if (e.empty()) t += 1; else try { e.transition() } catch (e) { t += 1 } }), t === r.length && (clearInterval(i), n && n()) }, 10) } var r = [ ]; return e.add = function (e) { r.push(e) }, e }, s.parseDate = function (e) { var t; return e instanceof Date ? t = e : 'string' == typeof e ? t = this.dataTimeFormat(this.config.data_xFormat).parse(e) : 'number' != typeof e || isNaN(e) || (t = new Date( + e)), t && !isNaN( + t) || a.console.error('Failed to parse x \'' + e + '\' to Date object'), t }, s.isTabVisible = function () { var e; return void 0 !== document.hidden ? e = 'hidden' : void 0 !== document.mozHidden ? e = 'mozHidden' : void 0 !== document.msHidden ? e = 'msHidden' : void 0 !== document.webkitHidden && (e = 'webkitHidden'), !document[e] }, s.getDefaultConfig = function () { var t = { bindto: '#chart', svg_classname: void 0, size_width: void 0, size_height: void 0, padding_left: void 0, padding_right: void 0, padding_top: void 0, padding_bottom: void 0, resize_auto: !0, zoom_enabled: !1, zoom_extent: void 0, zoom_privileged: !1, zoom_rescale: !1, zoom_onzoom: function () { }, zoom_onzoomstart: function () { }, zoom_onzoomend: function () { }, zoom_x_min: void 0, zoom_x_max: void 0, interaction_brighten: !0, interaction_enabled: !0, onmouseover: function () { }, onmouseout: function () { }, onresize: function () { }, onresized: function () { }, oninit: function () { }, onrendered: function () { }, transition_duration: 350, data_x: void 0, data_xs: { }, data_xFormat: '%Y-%m-%d', data_xLocaltime: !0, data_xSort: !0, data_idConverter: function (e) { return e }, data_names: { }, data_classes: { }, data_groups: [ ], data_axes: { }, data_type: void 0, data_types: { }, data_labels: { }, data_order: 'desc', data_regions: { }, data_color: void 0, data_colors: { }, data_hide: !1, data_filter: void 0, data_selection_enabled: !1, data_selection_grouped: !1, data_selection_isselectable: function () { return !0 }, data_selection_multiple: !0, data_selection_draggable: !1, data_onclick: function () { }, data_onmouseover: function () { }, data_onmouseout: function () { }, data_onselected: function () { }, data_onunselected: function () { }, data_url: void 0, data_headers: void 0, data_json: void 0, data_rows: void 0, data_columns: void 0, data_mimeType: void 0, data_keys: void 0, data_empty_label_text: '', subchart_show: !1, subchart_size_height: 60, subchart_axis_x_show: !0, subchart_onbrush: function () { }, color_pattern: [ ], color_threshold: { }, legend_show: !0, legend_hide: !1, legend_position: 'bottom', legend_inset_anchor: 'top-left', legend_inset_x: 10, legend_inset_y: 0, legend_inset_step: void 0, legend_item_onclick: void 0, legend_item_onmouseover: void 0, legend_item_onmouseout: void 0, legend_equally: !1, legend_padding: 0, legend_item_tile_width: 10, legend_item_tile_height: 10, axis_rotated: !1, axis_x_show: !0, axis_x_type: 'indexed', axis_x_localtime: !0, axis_x_categories: [ ], axis_x_tick_centered: !1, axis_x_tick_format: void 0, axis_x_tick_culling: { }, axis_x_tick_culling_max: 10, axis_x_tick_count: void 0, axis_x_tick_fit: !0, axis_x_tick_values: null, axis_x_tick_rotate: 0, axis_x_tick_outer: !0, axis_x_tick_multiline: !0, axis_x_tick_width: null, axis_x_max: void 0, axis_x_min: void 0, axis_x_padding: { }, axis_x_height: void 0, axis_x_extent: void 0, axis_x_label: { }, axis_y_show: !0, axis_y_type: void 0, axis_y_max: void 0, axis_y_min: void 0, axis_y_inverted: !1, axis_y_center: void 0, axis_y_inner: void 0, axis_y_label: { }, axis_y_tick_format: void 0, axis_y_tick_outer: !0, axis_y_tick_values: null, axis_y_tick_rotate: 0, axis_y_tick_count: void 0, axis_y_tick_time_value: void 0, axis_y_tick_time_interval: void 0, axis_y_padding: { }, axis_y_default: void 0, axis_y2_show: !1, axis_y2_max: void 0, axis_y2_min: void 0, axis_y2_inverted: !1, axis_y2_center: void 0, axis_y2_inner: void 0, axis_y2_label: { }, axis_y2_tick_format: void 0, axis_y2_tick_outer: !0, axis_y2_tick_values: null, axis_y2_tick_count: void 0, axis_y2_padding: { }, axis_y2_default: void 0, grid_x_show: !1, grid_x_type: 'tick', grid_x_lines: [ ], grid_y_show: !1, grid_y_lines: [ ], grid_y_ticks: 10, grid_focus_show: !0, grid_lines_front: !0, point_show: !0, point_r: 2.5, point_sensitivity: 10, point_focus_expand_enabled: !0, point_focus_expand_r: void 0, point_select_r: void 0, line_connectNull: !1, line_step_type: 'step', bar_width: void 0, bar_width_ratio: 0.6, bar_width_max: void 0, bar_zerobased: !0, area_zerobased: !0, area_above: !1, pie_label_show: !0, pie_label_format: void 0, pie_label_threshold: 0.05, pie_label_ratio: void 0, pie_expand: { }, pie_expand_duration: 50, gauge_fullCircle: !1, gauge_label_show: !0, gauge_label_format: void 0, gauge_min: 0, gauge_max: 100, gauge_startingAngle: - 1 * Math.PI / 2, gauge_units: void 0, gauge_width: void 0, gauge_expand: { }, gauge_expand_duration: 50, donut_label_show: !0, donut_label_format: void 0, donut_label_threshold: 0.05, donut_label_ratio: void 0, donut_width: void 0, donut_title: '', donut_expand: { }, donut_expand_duration: 50, spline_interpolation_type: 'cardinal', regions: [ ], tooltip_show: !0, tooltip_grouped: !0, tooltip_format_title: void 0, tooltip_format_name: void 0, tooltip_format_value: void 0, tooltip_position: void 0, tooltip_contents: function (e, t, n, i) { return this.getTooltipContent ? this.getTooltipContent(e, t, n, i) : '' }, tooltip_init_show: !1, tooltip_init_x: 0, tooltip_init_position: { top: '0px', left: '50px' }, tooltip_onshow: function () { }, tooltip_onhide: function () { }, title_text: void 0, title_padding: { top: 0, right: 0, bottom: 0, left: 0 }, title_position: 'top-center' }; return Object.keys(this.additionalConfig).forEach(function (e) { t[e] = this.additionalConfig[e] }, this), t }, s.additionalConfig = { }, s.loadConfig = function (t) { var n, i, r, a = this.config; Object.keys(a).forEach(function (e) { n = t, i = e.split('_'), r = function e() { var t = i.shift(); return t && n && 'object' == typeof n && t in n ? (n = n[t], e()) : t ? void 0 : n }(), D(r) && (a[e] = r) }) }, s.getScale = function (e, t, n) { return (n ? this.d3.time.scale() : this.d3.scale.linear()).range([e, t]) }, s.getX = function (e, t, n, i) { var r, a = this.getScale(e, t, this.isTimeSeries()), o = n ? a.domain(n) : a, a = this.isCategorized() ? (i = i || function () { return 0 }, function (e, t) { e = o(e) + i(e); return t ? e : Math.ceil(e) }) : function (e, t) { e = o(e); return t ? e : Math.ceil(e) }; for (r in o) a[r] = o[r]; return a.orgDomain = function () { return o.domain() }, this.isCategorized() && (a.domain = function (e) { return arguments.length ? (o.domain(e), a) : [ (e = this.orgDomain()) [0], e[1] + 1 ] }), a }, s.getY = function (e, t, n) { t = this.getScale(e, t, this.isTimeSeriesY()); return n && t.domain(n), t }, s.getYScale = function (e) { return 'y2' === this.axis.getId(e) ? this.y2 : this.y }, s.getSubYScale = function (e) { return 'y2' === this.axis.getId(e) ? this.subY2 : this.subY }, s.updateScales = function () { var t = this, e = t.config, n = !t.x; t.xMin = e.axis_rotated ? 1 : 0, t.xMax = e.axis_rotated ? t.height : t.width, t.yMin = e.axis_rotated ? 0 : t.height, t.yMax = e.axis_rotated ? t.width : 1, t.subXMin = t.xMin, t.subXMax = t.xMax, t.subYMin = e.axis_rotated ? 0 : t.height2, t.subYMax = e.axis_rotated ? t.width2 : 1, t.x = t.getX(t.xMin, t.xMax, n ? void 0 : t.x.orgDomain(), function () { return t.xAxis.tickOffset() }), t.y = t.getY(t.yMin, t.yMax, n ? e.axis_y_default : t.y.domain()), t.y2 = t.getY(t.yMin, t.yMax, n ? e.axis_y2_default : t.y2.domain()), t.subX = t.getX(t.xMin, t.xMax, t.orgXDomain, function (e) { return e % 1 ? 0 : t.subXAxis.tickOffset() }), t.subY = t.getY(t.subYMin, t.subYMax, n ? e.axis_y_default : t.subY.domain()), t.subY2 = t.getY(t.subYMin, t.subYMax, n ? e.axis_y2_default : t.subY2.domain()), t.xAxisTickFormat = t.axis.getXAxisTickFormat(), t.xAxisTickValues = t.axis.getXAxisTickValues(), t.yAxisTickValues = t.axis.getYAxisTickValues(), t.y2AxisTickValues = t.axis.getY2AxisTickValues(), t.xAxis = t.axis.getXAxis(t.x, t.xOrient, t.xAxisTickFormat, t.xAxisTickValues, e.axis_x_tick_outer), t.subXAxis = t.axis.getXAxis(t.subX, t.subXOrient, t.xAxisTickFormat, t.xAxisTickValues, e.axis_x_tick_outer), t.yAxis = t.axis.getYAxis(t.y, t.yOrient, e.axis_y_tick_format, t.yAxisTickValues, e.axis_y_tick_outer), t.y2Axis = t.axis.getYAxis(t.y2, t.y2Orient, e.axis_y2_tick_format, t.y2AxisTickValues, e.axis_y2_tick_outer), n || (t.brush && t.brush.scale(t.subX), e.zoom_enabled && t.zoom.scale(t.x)), t.updateArc && t.updateArc() }, s.getYDomainMin = function (e) { var t, n, i, r, a, o, s = this, l = s.config, c = s.mapToIds(e), u = s.getValuesAsIdKeyed(e); if (0 < l.data_groups.length) for (o = s.hasNegativeValueInTargets(e), t = 0; t < l.data_groups.length; t++) if (0 !== (r = l.data_groups[t].filter(function (e) { return !!~c.indexOf(e) })).length) for (i = r[0], o && u[i] && u[i].forEach(function (e, t) { u[i][t] = e < 0 ? e : 0 }), n = 1; n < r.length; n++) u[a = r[n]] && u[a].forEach(function (e, t) { s.axis.getId(a) !== s.axis.getId(i) || !u[i] || o && 0 < + e || (u[i][t] += + e) }); return s.d3.min(Object.keys(u).map(function (e) { return s.d3.min(u[e]) })) }, s.getYDomainMax = function (e) { var t, n, i, r, a, o, s = this, l = s.config, c = s.mapToIds(e), u = s.getValuesAsIdKeyed(e); if (0 < l.data_groups.length) for (o = s.hasPositiveValueInTargets(e), t = 0; t < l.data_groups.length; t++) if (0 !== (r = l.data_groups[t].filter(function (e) { return !!~c.indexOf(e) })).length) for (i = r[0], o && u[i] && u[i].forEach(function (e, t) { u[i][t] = 0 < e ? e : 0 }), n = 1; n < r.length; n++) u[a = r[n]] && u[a].forEach(function (e, t) { s.axis.getId(a) !== s.axis.getId(i) || !u[i] || o && + e < 0 || (u[i][t] += + e) }); return s.d3.max(Object.keys(u).map(function (e) { return s.d3.max(u[e]) })) }, s.getYDomain = function (e, t, n) { var i, r = this, a = r.config, o = e.filter(function (e) { return r.axis.getId(e.id) === t }), s = n ? r.filterByXDomain(o, n) : o, l = 'y2' === t ? a.axis_y2_min : a.axis_y_min, c = 'y2' === t ? a.axis_y2_max : a.axis_y_max, u = r.getYDomainMin(s), d = r.getYDomainMax(s), p = 'y2' === t ? a.axis_y2_center : a.axis_y_center, m = r.hasType('bar', s) && a.bar_zerobased || r.hasType('area', s) && a.area_zerobased, f = 'y2' === t ? a.axis_y2_inverted : a.axis_y_inverted, h = r.hasDataLabel() && a.axis_rotated, g = r.hasDataLabel() && !a.axis_rotated, u = _(l) ? l : !_(c) || u < c ? u : c - 10, d = _(c) ? c : !_(l) || l < d ? d : l + 10; return 0 === s.length ? ('y2' === t ? r.y2 : r.y).domain() : ((u = isNaN(u) ? 0 : u) === (d = isNaN(d) ? u : d) && (u < 0 ? d = 0 : u = 0), e = 0 <= u && 0 <= d, n = u <= 0 && d <= 0, (m = _(l) && e || _(c) && n ? !1 : m) && (e && (u = 0), n && (d = 0)), l = s = 0.1 * (o = Math.abs(d - u)), void 0 !== p && (d = p + (c = Math.max(Math.abs(u), Math.abs(d))), u = p - c), h ? (i = r.getDataLabelLength(u, d, 'width'), h = k(r.y.range()), l += (h = [ i[0] / h, i[1] / h ]) [1] / (1 - h[0] - h[1]) * o, s += h[0] / (1 - h[0] - h[1]) * o) : g && (i = r.getDataLabelLength(u, d, 'height'), l += r.axis.convertPixelsToAxisPadding(i[1], o), s += r.axis.convertPixelsToAxisPadding(i[0], o)), 'y' === t && y(a.axis_y_padding) && (l = r.axis.getPadding(a.axis_y_padding, 'top', l, o), s = r.axis.getPadding(a.axis_y_padding, 'bottom', s, o)), 'y2' === t && y(a.axis_y2_padding) && (l = r.axis.getPadding(a.axis_y2_padding, 'top', l, o), s = r.axis.getPadding(a.axis_y2_padding, 'bottom', s, o)), m && (e && (s = u), n && (l = - d)), l = [ u - s, d + l ], f ? l.reverse() : l) }, s.getXDomainMin = function (e) { var t = this, n = t.config; return D(n.axis_x_min) ? t.isTimeSeries() ? this.parseDate(n.axis_x_min) : n.axis_x_min : t.d3.min(e, function (e) { return t.d3.min(e.values, function (e) { return e.x }) }) }, s.getXDomainMax = function (e) { var t = this, n = t.config; return D(n.axis_x_max) ? t.isTimeSeries() ? this.parseDate(n.axis_x_max) : n.axis_x_max : t.d3.max(e, function (e) { return t.d3.max(e.values, function (e) { return e.x }) }) }, s.getXDomainPadding = function (e) { var t, n, i = this.config, r = e[1] - e[0], r = this.isCategorized() ? 0 : this.hasType('bar') ? 1 < (e = this.getMaxDataCount()) ? r / (e - 1) / 2 : 0.5 : 0.01 * r; return 'object' == typeof i.axis_x_padding && y(i.axis_x_padding) ? (t = _(i.axis_x_padding.left) ? i.axis_x_padding.left : r, n = _(i.axis_x_padding.right) ? i.axis_x_padding.right : r) : t = n = 'number' == typeof i.axis_x_padding ? i.axis_x_padding : r, { left: t, right: n } }, s.getXDomain = function (e) { var t = this, n = [ t.getXDomainMin(e), t.getXDomainMax(e) ], i = n[0], r = n[1], a = t.getXDomainPadding(n), e = 0, n = 0; return i - r != 0 || t.isCategorized() || (r = t.isTimeSeries() ? (i = new Date(0.5 * i.getTime()), new Date(1.5 * r.getTime())) : (i = 0 === i ? 1 : 0.5 * i, 0 === r ? - 1 : 1.5 * r)), [ e = i || 0 === i ? t.isTimeSeries() ? new Date(i.getTime() - a.left) : i - a.left : e, n = r || 0 === r ? t.isTimeSeries() ? new Date(r.getTime() + a.right) : r + a.right : n ] }, s.updateXDomain = function (e, t, n, i, r) { var a = this, o = a.config; return n && (a.x.domain(r || a.d3.extent(a.getXDomain(e))), a.orgXDomain = a.x.domain(), o.zoom_enabled && a.zoom.scale(a.x).updateScaleExtent(), a.subX.domain(a.x.domain()), a.brush && a.brush.scale(a.subX)), t && (a.x.domain(r || (!a.brush || a.brush.empty() ? a.orgXDomain : a.brush.extent())), o.zoom_enabled && a.zoom.scale(a.x).updateScaleExtent()), i && a.x.domain(a.trimXDomain(a.x.orgDomain())), a.x.domain() }, s.trimXDomain = function (e) { var t = this.getZoomDomain(), n = t[0], t = t[1]; return e[0] <= n && (e[1] = n - e[0] + + e[1], e[0] = n), t <= e[1] && (e[0] = + e[0] - (e[1] - t), e[1] = t), e }, s.isX = function (e) { var t = this.config; return t.data_x && e === t.data_x || y(t.data_xs) && g(t.data_xs, e) }, s.isNotX = function (e) { return !this.isX(e) }, s.getXKey = function (e) { var t = this.config; return t.data_x || (y(t.data_xs) ? t.data_xs[e] : null) }, s.getXValuesOfXKey = function (t, e) { var n, i = this; return (e && y(e) ? i.mapToIds(e) : [ ]).forEach(function (e) { i.getXKey(e) === t && (n = i.data.xs[e]) }), n }, s.getIndexByX = function (e) { e = this.filterByX(this.data.targets, e); return e.length ? e[0].index : null }, s.getXValue = function (e, t) { return e in this.data.xs && this.data.xs[e] && _(this.data.xs[e][t]) ? this.data.xs[e][t] : t }, s.getOtherTargetXs = function () { var e = Object.keys(this.data.xs); return e.length ? this.data.xs[e[0]] : null }, s.getOtherTargetX = function (e) { var t = this.getOtherTargetXs(); return t && e < t.length ? t[e] : null }, s.addXs = function (t) { var n = this; Object.keys(t).forEach(function (e) { n.config.data_xs[e] = t[e] }) }, s.hasMultipleX = function (t) { return 1 < this.d3.set(Object.keys(t).map(function (e) { return t[e] })).size() }, s.isMultipleX = function () { return y(this.config.data_xs) || !this.config.data_xSort || this.hasType('scatter') }, s.addName = function (e) { var t; return e && (e.name = void 0 !== (t = this.config.data_names[e.id]) ? t : e.id), e }, s.getValueOnIndex = function (e, t) { e = e.filter(function (e) { return e.index === t }); return e.length ? e[0] : null }, s.updateTargetX = function (e, i) { var r = this; e.forEach(function (n) { n.values.forEach(function (e, t) { e.x = r.generateTargetX(i[t], n.id, t) }), r.data.xs[n.id] = i }) }, s.updateTargetXs = function (e, t) { var n = this; e.forEach(function (e) { t[e.id] && n.updateTargetX([e], t[e.id]) }) }, s.generateTargetX = function (e, t, n) { var i = this, n = i.isTimeSeries() ? i.parseDate(e || i.getXValue(t, n)) : i.isCustomX() && !i.isCategorized() ? _(e) ? + e : i.getXValue(t, n) : n; return n }, s.cloneTarget = function (e) { return { id: e.id, id_org: e.id_org, values: e.values.map(function (e) { return { x: e.x, value: e.value, id: e.id } }) } }, s.updateXs = function () { var t = this; t.data.targets.length && (t.xs = [ ], t.data.targets[0].values.forEach(function (e) { t.xs[e.index] = e.x })) }, s.getPrevX = function (e) { e = this.xs[e - 1]; return void 0 !== e ? e : null }, s.getNextX = function (e) { e = this.xs[e + 1]; return void 0 !== e ? e : null }, s.getMaxDataCount = function () { return this.d3.max(this.data.targets, function (e) { return e.values.length }) }, s.getMaxDataCountTarget = function (e) { var t, n = e.length, i = 0; return 1 < n ? e.forEach(function (e) { i < e.values.length && (i = (t = e).values.length) }) : t = n ? e[0] : null, t }, s.getEdgeX = function (e) { return e.length ? [ this.d3.min(e, function (e) { return e.values[0].x }), this.d3.max(e, function (e) { return e.values[e.values.length - 1].x }) ] : [ 0, 0 ] }, s.mapToIds = function (e) { return e.map(function (e) { return e.id }) }, s.mapToTargetIds = function (e) { return e ? [ ].concat(e) : this.mapToIds(this.data.targets) }, s.hasTarget = function (e, t) { for (var n = this.mapToIds(e), i = 0; i < n.length; i++) if (n[i] === t) return !0; return !1 }, s.isTargetToShow = function (e) { return !~this.hiddenTargetIds.indexOf(e) }, s.isLegendToShow = function (e) { return !~this.hiddenLegendIds.indexOf(e) }, s.filterTargetsToShow = function (e) { var t = this; return e.filter(function (e) { return t.isTargetToShow(e.id) }) }, s.mapTargetsToUniqueXs = function (e) { e = this.d3.set(this.d3.merge(e.map(function (e) { return e.values.map(function (e) { return + e.x }) }))).values(); return (e = this.isTimeSeries() ? e.map(function (e) { return new Date( + e) }) : e.map(function (e) { return + e })).sort(function (e, t) { return e < t ? - 1 : t < e ? 1 : t <= e ? 0 : NaN }) }, s.addHiddenTargetIds = function (e) { this.hiddenTargetIds = this.hiddenTargetIds.concat(e) }, s.removeHiddenTargetIds = function (t) { this.hiddenTargetIds = this.hiddenTargetIds.filter(function (e) { return !~t.indexOf(e) }) }, s.addHiddenLegendIds = function (e) { this.hiddenLegendIds = this.hiddenLegendIds.concat(e) }, s.removeHiddenLegendIds = function (t) { this.hiddenLegendIds = this.hiddenLegendIds.filter(function (e) { return !~t.indexOf(e) }) }, s.getValuesAsIdKeyed = function (e) { var n = { }; return e.forEach(function (t) { n[t.id] = [ ], t.values.forEach(function (e) { n[t.id].push(e.value) }) }), n }, s.checkValueInTargets = function (e, t) { for (var n, i, r = Object.keys(e), a = 0; a < r.length; a++) for (i = e[r[a]].values, n = 0; n < i.length; n++) if (t(i[n].value)) return !0; return !1 }, s.hasNegativeValueInTargets = function (e) { return this.checkValueInTargets(e, function (e) { return e < 0 }) }, s.hasPositiveValueInTargets = function (e) { return this.checkValueInTargets(e, function (e) { return 0 < e }) }, s.isOrderDesc = function () { var e = this.config; return 'string' == typeof e.data_order && 'desc' == e.data_order.toLowerCase() }, s.isOrderAsc = function () { var e = this.config; return 'string' == typeof e.data_order && 'asc' == e.data_order.toLowerCase() }, s.orderTargets = function (e) { var t = this.config, i = this.isOrderAsc(), n = this.isOrderDesc(); return i || n ? e.sort(function (e, t) { var n = function (e, t) { return e + Math.abs(t.value) }, e = e.values.reduce(n, 0), n = t.values.reduce(n, 0); return i ? n - e : e - n }) : d(t.data_order) && e.sort(t.data_order), e }, s.filterByX = function (e, t) { return this.d3.merge(e.map(function (e) { return e.values })).filter(function (e) { return e.x - t == 0 }) }, s.filterRemoveNull = function (e) { return e.filter(function (e) { return _(e.value) }) }, s.filterByXDomain = function (e, t) { return e.map(function (e) { return { id: e.id, id_org: e.id_org, values: e.values.filter(function (e) { return t[0] <= e.x && e.x <= t[1] }) } }) }, s.hasDataLabel = function () { var e = this.config; return !('boolean' != typeof e.data_labels || !e.data_labels) || !('object' != typeof e.data_labels || !y(e.data_labels)) }, s.getDataLabelLength = function (e, t, n) { var i = this, r = [ 0, 0 ]; return i.selectChart.select('svg').selectAll('.dummy').data([e, t]).enter().append('text').text(function (e) { return i.dataLabelFormat(e.id) (e) }).each(function (e, t) { r[t] = 1.3 * this.getBoundingClientRect() [n] }).remove(), r }, s.isNoneArc = function (e) { return this.hasTarget(this.data.targets, e.id) }, s.isArc = function (e) { return 'data' in e && this.hasTarget(this.data.targets, e.data.id) }, s.findSameXOfValues = function (e, t) { for (var n = e[t].x, i = [ ], r = t - 1; 0 <= r && n === e[r].x; r--) i.push(e[r]); for (r = t; r < e.length && n === e[r].x; r++) i.push(e[r]); return i }, s.findClosestFromTargets = function (e, t) { var n = this, e = e.map(function (e) { return n.findClosest(e.values, t) }); return n.findClosest(e, t) }, s.findClosest = function (e, n) { var i, r = this, a = r.config.point_sensitivity; return e.filter(function (e) { return e && r.isBarType(e.id) }).forEach(function (e) { var t = r.main.select('.' + G.bars + r.getTargetSelectorSuffix(e.id) + ' .' + G.bar + '-' + e.index).node(); !i && r.isWithinBar(t) && (i = e) }), e.filter(function (e) { return e && !r.isBarType(e.id) }).forEach(function (e) { var t = r.dist(e, n); t < a && (a = t, i = e) }), i }, s.dist = function (e, t) { var n = this.config, i = n.axis_rotated ? 1 : 0, r = n.axis_rotated ? 0 : 1, n = this.circleY(e, e.index), e = this.x(e.x); return Math.sqrt(Math.pow(e - t[i], 2) + Math.pow(n - t[r], 2)) }, s.convertValuesToStep = function (e) { var t, n = [ ].concat(e); if (!this.isCategorized()) return e; for (t = e.length + 1; 0 < t; t--) n[t] = n[t - 1]; return n[0] = { x: n[0].x - 1, value: n[0].value, id: n[0].id }, n[e.length + 1] = { x: n[e.length].x + 1, value: n[e.length].value, id: n[e.length].id }, n }, s.updateDataAttributes = function (e, t) { var n = this.config['data_' + e]; return void 0 === t || (Object.keys(t).forEach(function (e) { n[e] = t[e] }), this.redraw({ withLegend: !0 })), n }, s.convertUrlToData = function (e, t, n, i, r) { var a = this, o = t || 'csv', s = a.d3.xhr(e); n && Object.keys(n).forEach(function (e) { s.header(e, n[e]) }), s.get(function (e, t) { if (!t) throw Error(e.responseURL + ' ' + e.status + ' (' + e.statusText + ')'); t = 'json' === o ? a.convertJsonToData(JSON.parse(t.response), i) : 'tsv' === o ? a.convertTsvToData(t.response) : a.convertCsvToData(t.response), r.call(a, t) }) }, s.convertXsvToData = function (e, t) { var n, i = t.parseRows(e); return 1 === i.length ? (n = [ { } ], i[0].forEach(function (e) { n[0][e] = null })) : n = t.parse(e), n }, s.convertCsvToData = function (e) { return this.convertXsvToData(e, this.d3.csv) }, s.convertTsvToData = function (e) { return this.convertXsvToData(e, this.d3.tsv) }, s.convertJsonToData = function (t, e) { var i, r = this, a = [ ], e = e ? (e.x ? (i = e.value.concat(e.x), r.config.data_x = e.x) : i = e.value, a.push(i), t.forEach(function (t) { var n = [ ]; i.forEach(function (e) { e = r.findValueInJson(t, e); S(e) && (e = null), n.push(e) }), a.push(n) }), r.convertRowsToData(a)) : (Object.keys(t).forEach(function (e) { a.push([e].concat(t[e])) }), r.convertColumnsToData(a)); return e }, s.findValueInJson = function (e, t) { for (var n = (t = (t = t.replace(/\[(\w+)\]/g, '.$1')).replace(/^\./, '')).split('.'), i = 0; i < n.length; ++i) { var r = n[i]; if (!(r in e)) return; e = e[r] } return e }, s.convertRowsToData = function (e) { for (var t, n = e[0], i = { }, r = [ ], a = 1; a < e.length; a++) { for (i = { }, t = 0; t < e[a].length; t++) { if (S(e[a][t])) throw Error('Source data is missing a component at (' + a + ',' + t + ')!'); i[n[t]] = e[a][t] } r.push(i) } return r }, s.convertColumnsToData = function (e) { for (var t, n, i = [ ], r = 0; r < e.length; r++) for (n = e[r][0], t = 1; t < e[r].length; t++) { if (S(i[t - 1]) && (i[t - 1] = { }), S(e[r][t])) throw Error('Source data is missing a component at (' + r + ',' + t + ')!'); i[t - 1][n] = e[r][t] } return i }, s.convertDataToTargets = function (e, i) { var l = this, c = l.config, t = l.d3.keys(e[0]).filter(l.isNotX, l), r = l.d3.keys(e[0]).filter(l.isX, l); return t.forEach(function (n) { var t = l.getXKey(n); l.isCustomX() || l.isTimeSeries() ? ~r.indexOf(t) ? l.data.xs[n] = (i && l.data.xs[n] ? l.data.xs[n] : [ ]).concat(e.map(function (e) { return e[t] }).filter(_).map(function (e, t) { return l.generateTargetX(e, n, t) })) : c.data_x ? l.data.xs[n] = l.getOtherTargetXs() : y(c.data_xs) && (l.data.xs[n] = l.getXValuesOfXKey(t, l.data.targets)) : l.data.xs[n] = e.map(function (e, t) { return t }) }), t.forEach(function (e) { if (!l.data.xs[e]) throw Error('x is not defined for id = "' + e + '".') }), (t = t.map(function (a, o) { var s = c.data_idConverter(a); return { id: s, id_org: a, values: e.map(function (e, t) { var n, i = e[l.getXKey(a)], r = null === e[a] || isNaN(e[a]) ? null : + e[a]; return l.isCustomX() && l.isCategorized() && 0 === o && !S(i) ? (0 === o && 0 === t && (c.axis_x_categories = [ ]), - 1 === (n = c.axis_x_categories.indexOf(i)) && (n = c.axis_x_categories.length, c.axis_x_categories.push(i))) : n = l.generateTargetX(i, a, t), { x: n = S(e[a]) || l.data.xs[a].length <= t ? void 0 : n, value: r, id: s } }).filter(function (e) { return D(e.x) }) } })).forEach(function (e) { var t; c.data_xSort && (e.values = e.values.sort(function (e, t) { return (e.x || 0 === e.x ? e.x : 1 / 0) - (t.x || 0 === t.x ? t.x : 1 / 0) })), t = 0, e.values.forEach(function (e) { e.index = t++ }), l.data.xs[e.id].sort(function (e, t) { return e - t }) }), l.hasNegativeValue = l.hasNegativeValueInTargets(t), l.hasPositiveValue = l.hasPositiveValueInTargets(t), c.data_type && l.setTargetType(l.mapToIds(t).filter(function (e) { return !(e in c.data_types) }), c.data_type), t.forEach(function (e) { l.addCache(e.id_org, e) }), t }, s.load = function (n, t) { var i = this; n && (t.filter && (n = n.filter(t.filter)), (t.type || t.types) && n.forEach(function (e) { i.setTargetType(e.id, t.types && t.types[e.id] ? t.types[e.id] : t.type) }), i.data.targets.forEach(function (e) { for (var t = 0; t < n.length; t++) if (e.id === n[t].id) { e.values = n[t].values, n.splice(t, 1); break } }), i.data.targets = i.data.targets.concat(n)), i.updateTargets(i.data.targets), i.redraw({ withUpdateOrgXDomain: !0, withUpdateXDomain: !0, withLegend: !0 }), t.done && t.done() }, s.loadFromArgs = function (t) { var n = this; t.data ? n.load(n.convertDataToTargets(t.data), t) : t.url ? n.convertUrlToData(t.url, t.mimeType, t.headers, t.keys, function (e) { n.load(n.convertDataToTargets(e), t) }) : n.load(t.json ? n.convertDataToTargets(n.convertJsonToData(t.json, t.keys)) : t.rows ? n.convertDataToTargets(n.convertRowsToData(t.rows)) : t.columns ? n.convertDataToTargets(n.convertColumnsToData(t.columns)) : null, t) }, s.unload = function (e, t) { var n = this; t = t || function () { }, (e = e.filter(function (e) { return n.hasTarget(n.data.targets, e) })) && 0 !== e.length ? (n.svg.selectAll(e.map(function (e) { return n.selectorTarget(e) })).transition().style('opacity', 0).remove().call(n.endall, t), e.forEach(function (t) { n.withoutFadeIn[t] = !1, n.legend && n.legend.selectAll('.' + G.legendItem + n.getTargetSelectorSuffix(t)).remove(), n.data.targets = n.data.targets.filter(function (e) { return e.id !== t }) })) : t() }, s.categoryName = function (e) { var t = this.config; return e < t.axis_x_categories.length ? t.axis_x_categories[e] : e }, s.initEventRect = function () { this.main.select('.' + G.chart).append('g').attr('class', G.eventRects).style('fill-opacity', 0) }, s.redrawEventRect = function () { var e, t = this, n = t.config, i = t.isMultipleX(), n = t.main.select('.' + G.eventRects).style('cursor', n.zoom_enabled ? n.axis_rotated ? 'ns-resize' : 'ew-resize' : null).classed(G.eventRectsMultiple, i).classed(G.eventRectsSingle, !i); n.selectAll('.' + G.eventRect).remove(), t.eventRect = n.selectAll('.' + G.eventRect), i ? (e = t.eventRect.data([0]), t.generateEventRectsForMultipleXs(e.enter()), t.updateEventRect(e)) : (i = t.getMaxDataCountTarget(t.data.targets), n.datum(i ? i.values : [ ]), t.eventRect = n.selectAll('.' + G.eventRect), e = t.eventRect.data(function (e) { return e }), t.generateEventRectsForSingleX(e.enter()), t.updateEventRect(e), e.exit().remove()) }, s.updateEventRect = function (e) { var t, n, i, r, a, o = this, s = o.config; e = e || o.eventRect.data(function (e) { return e }), a = o.isMultipleX() ? (n = t = 0, i = o.width, o.height) : (a = !o.isCustomX() && !o.isTimeSeries() || o.isCategorized() ? (r = o.getEventRectWidth(), function (e) { return o.x(e.x) - r / 2 }) : (o.updateXs(), r = function (e) { var t = o.getPrevX(e.index), e = o.getNextX(e.index); return null === t && null === e ? s.axis_rotated ? o.height : o.width : (null === t && (t = o.x.domain() [0]), null === e && (e = o.x.domain() [1]), Math.max(0, (o.x(e) - o.x(t)) / 2)) }, function (e) { var t = o.getPrevX(e.index), n = o.getNextX(e.index), e = o.data.xs[e.id][e.index]; return null === t && null === n ? 0 : (null === t && (t = o.x.domain() [0]), (o.x(e) + o.x(t)) / 2) }), t = s.axis_rotated ? 0 : a, n = s.axis_rotated ? a : 0, i = s.axis_rotated ? o.width : r, s.axis_rotated ? r : o.height), e.attr('class', o.classEvent.bind(o)).attr('x', t).attr('y', n).attr('width', i).attr('height', a) }, s.generateEventRectsForSingleX = function (e) { var i = this, r = i.d3, a = i.config; e.append('rect').attr('class', i.classEvent.bind(i)).style('cursor', a.data_selection_enabled && a.data_selection_grouped ? 'pointer' : null).on('mouseover', function (e) { e = e.index; i.dragging || i.flowing || i.hasArcType() || (a.point_focus_expand_enabled && i.expandCircles(e, null, !0), i.expandBars(e, null, !0), i.main.selectAll('.' + G.shape + '-' + e).each(function (e) { a.data_onmouseover.call(i.api, e) })) }).on('mouseout', function (e) { e = e.index; i.config && (i.hasArcType() || (i.hideXGridFocus(), i.hideTooltip(), i.unexpandCircles(), i.unexpandBars(), i.main.selectAll('.' + G.shape + '-' + e).each(function (e) { a.data_onmouseout.call(i.api, e) }))) }).on('mousemove', function (e) { var t = e.index, n = i.svg.select('.' + G.eventRect + '-' + t); i.dragging || i.flowing || i.hasArcType() || (i.isStepType(e) && 'step-after' === i.config.line_step_type && r.mouse(this) [0] < i.x(i.getXValue(e.id, t)) && --t, e = i.filterTargetsToShow(i.data.targets).map(function (e) { return i.addName(i.getValueOnIndex(e.values, t)) }), a.tooltip_grouped && (i.showTooltip(e, this), i.showXGridFocus(e)), a.tooltip_grouped && (!a.data_selection_enabled || a.data_selection_grouped) || i.main.selectAll('.' + G.shape + '-' + t).each(function () { r.select(this).classed(G.EXPANDED, !0), a.data_selection_enabled && n.style('cursor', a.data_selection_grouped ? 'pointer' : null), a.tooltip_grouped || (i.hideXGridFocus(), i.hideTooltip(), a.data_selection_grouped || (i.unexpandCircles(t), i.unexpandBars(t))) }).filter(function (e) { return i.isWithinShape(this, e) }).each(function (e) { a.data_selection_enabled && (a.data_selection_grouped || a.data_selection_isselectable(e)) && n.style('cursor', 'pointer'), a.tooltip_grouped || (i.showTooltip([e], this), i.showXGridFocus([e]), a.point_focus_expand_enabled && i.expandCircles(t, e.id, !0), i.expandBars(t, e.id, !0)) })) }).on('click', function (e) { var t = e.index; !i.hasArcType() && i.toggleShape && (i.cancelClick ? i.cancelClick = !1 : (i.isStepType(e) && 'step-after' === a.line_step_type && r.mouse(this) [0] < i.x(i.getXValue(e.id, t)) && --t, i.main.selectAll('.' + G.shape + '-' + t).each(function (e) { (a.data_selection_grouped || i.isWithinShape(this, e)) && (i.toggleShape(this, e, t), i.config.data_onclick.call(i.api, e, this)) }))) }).call(a.data_selection_draggable && i.drag ? r.behavior.drag().origin(Object).on('drag', function () { i.drag(r.mouse(this)) }).on('dragstart', function () { i.dragstart(r.mouse(this)) }).on('dragend', function () { i.dragend() }) : function () { }) }, s.generateEventRectsForMultipleXs = function (e) { var i = this, r = i.d3, a = i.config; function o() { i.svg.select('.' + G.eventRect).style('cursor', null), i.hideXGridFocus(), i.hideTooltip(), i.unexpandCircles(), i.unexpandBars() } e.append('rect').attr('x', 0).attr('y', 0).attr('width', i.width).attr('height', i.height).attr('class', G.eventRect).on('mouseout', function () { i.config && (i.hasArcType() || o()) }).on('mousemove', function () { var e, t, n = i.filterTargetsToShow(i.data.targets); i.dragging || i.hasArcType(n) || (e = r.mouse(this), t = i.findClosestFromTargets(n, e), !i.mouseover || t && t.id === i.mouseover.id || (a.data_onmouseout.call(i.api, i.mouseover), i.mouseover = void 0), t ? (n = (i.isScatterType(t) || !a.tooltip_grouped ? [ t ] : i.filterByX(n, t.x)).map(function (e) { return i.addName(e) }), i.showTooltip(n, this), a.point_focus_expand_enabled && i.expandCircles(t.index, t.id, !0), i.expandBars(t.index, t.id, !0), i.showXGridFocus(n), (i.isBarType(t.id) || i.dist(t, e) < a.point_sensitivity) && (i.svg.select('.' + G.eventRect).style('cursor', 'pointer'), i.mouseover || (a.data_onmouseover.call(i.api, t), i.mouseover = t))) : o()) }).on('click', function () { var e, t, n = i.filterTargetsToShow(i.data.targets); i.hasArcType(n) || (e = r.mouse(this), (t = i.findClosestFromTargets(n, e)) && (i.isBarType(t.id) || i.dist(t, e) < a.point_sensitivity) && i.main.selectAll('.' + G.shapes + i.getTargetSelectorSuffix(t.id)).selectAll('.' + G.shape + '-' + t.index).each(function () { (a.data_selection_grouped || i.isWithinShape(this, t)) && (i.toggleShape(this, t, t.index), i.config.data_onclick.call(i.api, t, this)) })) }).call(a.data_selection_draggable && i.drag ? r.behavior.drag().origin(Object).on('drag', function () { i.drag(r.mouse(this)) }).on('dragstart', function () { i.dragstart(r.mouse(this)) }).on('dragend', function () { i.dragend() }) : function () { }) }, s.dispatchEvent = function (e, t, n) { var i = '.' + G.eventRect + (this.isMultipleX() ? '' : '-' + t), r = this.main.select(i).node(), t = r.getBoundingClientRect(), i = t.left + (n ? n[0] : 0), t = t.top + (n ? n[1] : 0), n = document.createEvent('MouseEvents'); n.initMouseEvent(e, !0, !0, a, 0, i, t, i, t, !1, !1, !1, !1, 0, null), r.dispatchEvent(n) }, s.getCurrentWidth = function () { var e = this.config; return e.size_width || this.getParentWidth() }, s.getCurrentHeight = function () { var e = this.config, t = e.size_height || this.getParentHeight(); return 0 < t ? t : 320 / (this.hasType('gauge') && !e.gauge_fullCircle ? 2 : 1) }, s.getCurrentPaddingTop = function () { var e = this.config, e = _(e.padding_top) ? e.padding_top : 0; return this.title && this.title.node() && (e += this.getTitlePadding()), e }, s.getCurrentPaddingBottom = function () { var e = this.config; return _(e.padding_bottom) ? e.padding_bottom : 0 }, s.getCurrentPaddingLeft = function (e) { var t = this.config; return _(t.padding_left) ? t.padding_left : t.axis_rotated ? t.axis_x_show ? Math.max(m(this.getAxisWidthByAxisId('x', e)), 40) : 1 : !t.axis_y_show || t.axis_y_inner ? this.axis.getYAxisLabelPosition().isOuter ? 30 : 1 : m(this.getAxisWidthByAxisId('y', e)) }, s.getCurrentPaddingRight = function () { var e = this, t = e.config, n = e.isLegendRight ? e.getLegendWidth() + 20 : 0; return _(t.padding_right) ? t.padding_right + 1 : t.axis_rotated ? 10 + n : !t.axis_y2_show || t.axis_y2_inner ? 2 + n + (e.axis.getY2AxisLabelPosition().isOuter ? 20 : 0) : m(e.getAxisWidthByAxisId('y2')) + n }, s.getParentRectValue = function (t) { for (var n, i = this.selectChart.node(); i && 'BODY' !== i.tagName; ) { try { n = i.getBoundingClientRect() [t] } catch (e) { 'width' === t && (n = i.offsetWidth) } if (n) break; i = i.parentNode } return n }, s.getParentWidth = function () { return this.getParentRectValue('width') }, s.getParentHeight = function () { var e = this.selectChart.style('height'); return 0 < e.indexOf('px') ? + e.replace('px', '') : 0 }, s.getSvgLeft = function (e) { var t = this, n = t.config, i = n.axis_rotated || !n.axis_rotated && !n.axis_y_inner, r = t.main.select('.' + (n.axis_rotated ? G.axisX : G.axisY)).node(), n = r && i ? r.getBoundingClientRect() : { right: 0 }, i = t.selectChart.node().getBoundingClientRect(), r = t.hasArcType(), e = n.right - i.left - (r ? 0 : t.getCurrentPaddingLeft(e)); return 0 < e ? e : 0 }, s.getAxisWidthByAxisId = function (e, t) { var n = this.axis.getLabelPositionById(e); return this.axis.getMaxTickWidth(e, t) + (n.isInner ? 20 : 40) }, s.getHorizontalAxisHeight = function (e) { var t = this, n = t.config, i = 30; return 'x' !== e || n.axis_x_show ? 'x' === e && n.axis_x_height ? n.axis_x_height : 'y' !== e || n.axis_y_show ? 'y2' !== e || n.axis_y2_show ? ('x' === e && !n.axis_rotated && n.axis_x_tick_rotate && (i = 30 + t.axis.getMaxTickWidth(e) * Math.cos(Math.PI * (90 - n.axis_x_tick_rotate) / 180)), (i = 'y' === e && n.axis_rotated && n.axis_y_tick_rotate ? 30 + t.axis.getMaxTickWidth(e) * Math.cos(Math.PI * (90 - n.axis_y_tick_rotate) / 180) : i) + (t.axis.getLabelPositionById(e).isInner ? 0 : 10) + ('y2' === e ? - 10 : 0)) : t.rotated_padding_top : !n.legend_show || t.isLegendRight || t.isLegendInset ? 1 : 10 : 8 }, s.getEventRectWidth = function () { return Math.max(0, this.xAxis.tickInterval()) }, s.getShapeIndices = function (e) { var t, n, i = this.config, r = { }, a = 0; return this.filterTargetsToShow(this.data.targets.filter(e, this)).forEach(function (e) { for (t = 0; t < i.data_groups.length; t++) if (~i.data_groups[t].indexOf(e.id)) for (n = 0; n < i.data_groups[t].length; n++) if (i.data_groups[t][n] in r) { r[e.id] = r[i.data_groups[t][n]]; break } S(r[e.id]) && (r[e.id] = a++) }), r.__max__ = a - 1, r }, s.getShapeX = function (n, i, r, e) { var a = e ? this.subX : this.x; return function (e) { var t = e.id in r ? r[e.id] : 0; return e.x || 0 === e.x ? a(e.x) - n * (i / 2 - t) : 0 } }, s.getShapeY = function (t) { var n = this; return function (e) { return (t ? n.getSubYScale(e.id) : n.getYScale(e.id)) (e.value) } }, s.getShapeOffset = function (e, s, t) { var l = this, c = l.orderTargets(l.filterTargetsToShow(l.data.targets.filter(e, l))), u = c.map(function (e) { return e.id }); return function (n, i) { var r = t ? l.getSubYScale(n.id) : l.getYScale(n.id), a = r(0), o = a; return c.forEach(function (e) { var t = l.isStepType(n) ? l.convertValuesToStep(e.values) : e.values; e.id !== n.id && s[e.id] === s[n.id] && u.indexOf(e.id) < u.indexOf(n.id) && (void 0 !== t[i] && + t[i].x == + n.x || (i = - 1, t.forEach(function (e, t) { e.x === n.x && (i = t) })), i in t && 0 <= t[i].value * n.value && (o += r(t[i].value) - a)) }), o } }, s.isWithinShape = function (e, t) { var n, i = this, r = i.d3.select(e); return i.isTargetToShow(t.id) ? 'circle' === e.nodeName ? n = i.isStepType(t) ? i.isWithinStep(e, i.getYScale(t.id) (t.value)) : i.isWithinCircle(e, 1.5 * i.pointSelectR(t)) : 'path' === e.nodeName && (n = !r.classed(G.bar) || i.isWithinBar(e)) : n = !1, n }, s.getInterpolate = function (e) { var t = this, n = t.isInterpolationType(t.config.spline_interpolation_type) ? t.config.spline_interpolation_type : 'cardinal'; return t.isSplineType(e) ? n : t.isStepType(e) ? t.config.line_step_type : 'linear' }, s.initLine = function () { this.main.select('.' + G.chart).append('g').attr('class', G.chartLines) }, s.updateTargetsForLine = function (e) { var n = this, t = n.config, i = n.classChartLine.bind(n), r = n.classLines.bind(n), a = n.classAreas.bind(n), o = n.classCircles.bind(n), s = n.classFocus.bind(n), l = n.main.select('.' + G.chartLines).selectAll('.' + G.chartLine).data(e).attr('class', function (e) { return i(e) + s(e) }).enter().append('g').attr('class', i).style('opacity', 0).style('pointer-events', 'none'); l.append('g').attr('class', r), l.append('g').attr('class', a), l.append('g').attr('class', function (e) { return n.generateClass(G.selectedCircles, e.id) }), l.append('g').attr('class', o).style('cursor', function (e) { return t.data_selection_isselectable(e) ? 'pointer' : null }), e.forEach(function (t) { n.main.selectAll('.' + G.selectedCircles + n.getTargetSelectorSuffix(t.id)).selectAll('.' + G.selectedCircle).each(function (e) { e.value = t.values[e.index].value }) }) }, s.updateLine = function (e) { var t = this; t.mainLine = t.main.selectAll('.' + G.lines).selectAll('.' + G.line).data(t.lineData.bind(t)), t.mainLine.enter().append('path').attr('class', t.classLine.bind(t)).style('stroke', t.color), t.mainLine.style('opacity', t.initialOpacity.bind(t)).style('shape-rendering', function (e) { return t.isStepType(e) ? 'crispEdges' : '' }).attr('transform', null), t.mainLine.exit().transition().duration(e).style('opacity', 0).remove() }, s.redrawLine = function (e, t) { return [(t ? this.mainLine.transition('' + Math.random()) : this.mainLine).attr('d', e).style('stroke', this.color).style('opacity', 1)] }, s.generateDrawLine = function (e, o) { function t(e) { return (o ? s.subxx : s.xx).call(s, e) } var s = this, l = s.config, c = s.d3.svg.line(), n = s.generateGetLinePoints(e, o), u = o ? s.getSubYScale : s.getYScale, e = function (e, t) { return 0 < l.data_groups.length ? n(e, t) [0][1] : u.call(s, e.id) (e.value) }, c = l.axis_rotated ? c.x(e).y(t) : c.x(t).y(e); return l.line_connectNull || (c = c.defined(function (e) { return null != e.value })), function (e) { var t = l.line_connectNull ? s.filterRemoveNull(e.values) : e.values, n = o ? s.x : s.subX, i = u.call(s, e.id), r = 0, a = 0, a = s.isLineType(e) ? l.data_regions[e.id] ? s.lineWithRegions(t, n, i, l.data_regions[e.id]) : (s.isStepType(e) && (t = s.convertValuesToStep(t)), c.interpolate(s.getInterpolate(e)) (t)) : (t[0] && (r = n(t[0].x), a = i(t[0].value)), l.axis_rotated ? 'M ' + a + ' ' + r : 'M ' + r + ' ' + a); return a || 'M 0 0' } }, s.generateGetLinePoints = function (e, t) { var a = this, o = a.config, s = a.getShapeX(0, e.__max__ + 1, e, !!t), l = a.getShapeY(!!t), c = a.getShapeOffset(a.isLineType, e, !!t), u = t ? a.getSubYScale : a.getYScale; return function (e, t) { var n = u.call(a, e.id) (0), i = c(e, t) || n, r = s(e), t = l(e); return [[r, (t = o.axis_rotated && (0 < e.value && t < n || e.value < 0 && n < t) ? n : t) - (n - i)], [ r, t - (n - i) ], [ r, t - (n - i) ], [ r, t - (n - i) ]] } }, s.lineWithRegions = function (e, a, o, t) { var n, i, r, s, l, c, u, d, p, m, f, h = this, g = h.config, _ = 'M', y = h.isCategorized() ? 0.5 : 0, b = [ ]; if (D(t)) for (n = 0; n < t.length; n++) b[n] = { }, S(t[n].start) ? b[n].start = e[0].x : b[n].start = h.isTimeSeries() ? h.parseDate(t[n].start) : t[n].start, S(t[n].end) ? b[n].end = e[e.length - 1].x : b[n].end = h.isTimeSeries() ? h.parseDate(t[n].end) : t[n].end; function v(e) { return 'M' + e[0][0] + ' ' + e[0][1] + ' ' + e[1][0] + ' ' + e[1][1] } for (m = g.axis_rotated ? function (e) { return o(e.value) } : function (e) { return a(e.x) }, f = g.axis_rotated ? function (e) { return a(e.x) } : function (e) { return o(e.value) }, r = h.isTimeSeries() ? function (e, t, n, i) { var r = e.x.getTime(), t = t.x - e.x, e = new Date(r + t * n), t = new Date(r + t * (n + i)), i = g.axis_rotated ? [ [o(l(n)), a(e)], [ o(l(n + i)), a(t) ] ] : [ [a(e), o(l(n))], [ a(t), o(l(n + i)) ] ]; return v(i) } : function (e, t, n, i) { i = g.axis_rotated ? [ [o(l(n), !0), a(s(n))], [ o(l(n + i), !0), a(s(n + i)) ] ] : [ [a(s(n), !0), o(l(n))], [ a(s(n + i), !0), o(l(n + i)) ] ]; return v(i) }, n = 0; n < e.length; n++) { if (S(b) || !function (e, t) { for (var n = 0; n < t.length; n++) if (t[n].start < e && e <= t[n].end) return 1 }(e[n].x, b)) _ += ' ' + m(e[n]) + ' ' + f(e[n]); else for (s = h.getScale(e[n - 1].x + y, e[n].x + y, h.isTimeSeries()), l = h.getScale(e[n - 1].value, e[n].value), c = a(e[n].x) - a(e[n - 1].x), u = o(e[n].value) - o(e[n - 1].value), p = 2 * (d = 2 / Math.sqrt(Math.pow(c, 2) + Math.pow(u, 2))), i = d; i <= 1; i += p) _ += r(e[n - 1], e[n], i, d); 0 } return _ }, s.updateArea = function (e) { var t = this, n = t.d3; t.mainArea = t.main.selectAll('.' + G.areas).selectAll('.' + G.area).data(t.lineData.bind(t)), t.mainArea.enter().append('path').attr('class', t.classArea.bind(t)).style('fill', t.color).style('opacity', function () { return t.orgAreaOpacity = + n.select(this).style('opacity'), 0 }), t.mainArea.style('opacity', t.orgAreaOpacity), t.mainArea.exit().transition().duration(e).style('opacity', 0).remove() }, s.redrawArea = function (e, t) { return [(t ? this.mainArea.transition('' + Math.random()) : this.mainArea).attr('d', e).style('fill', this.color).style('opacity', this.orgAreaOpacity)] }, s.generateDrawArea = function (e, t) { function n(e) { return (t ? r.subxx : r.xx).call(r, e) } function i(e, t) { return 0 < a.data_groups.length ? s(e, t) [0][1] : l.call(r, e.id) (r.getAreaBaseValue(e.id)) } var r = this, a = r.config, o = r.d3.svg.area(), s = r.generateGetAreaPoints(e, t), l = t ? r.getSubYScale : r.getYScale, e = function (e, t) { return 0 < a.data_groups.length ? s(e, t) [1][1] : l.call(r, e.id) (e.value) }, o = a.axis_rotated ? o.x0(i).x1(e).y(n) : o.x(n).y0(a.area_above ? 0 : i).y1(e); return a.line_connectNull || (o = o.defined(function (e) { return null !== e.value })), function (e) { var t = a.line_connectNull ? r.filterRemoveNull(e.values) : e.values, n = 0, i = 0, i = r.isAreaType(e) ? (r.isStepType(e) && (t = r.convertValuesToStep(t)), o.interpolate(r.getInterpolate(e)) (t)) : (t[0] && (n = r.x(t[0].x), i = r.getYScale(e.id) (t[0].value)), a.axis_rotated ? 'M ' + i + ' ' + n : 'M ' + n + ' ' + i); return i || 'M 0 0' } }, s.getAreaBaseValue = function () { return 0 }, s.generateGetAreaPoints = function (e, t) { var a = this, o = a.config, s = a.getShapeX(0, e.__max__ + 1, e, !!t), l = a.getShapeY(!!t), c = a.getShapeOffset(a.isAreaType, e, !!t), u = t ? a.getSubYScale : a.getYScale; return function (e, t) { var n = u.call(a, e.id) (0), i = c(e, t) || n, r = s(e), t = l(e); return [[r, i], [ r, (t = o.axis_rotated && (0 < e.value && t < n || e.value < 0 && n < t) ? n : t) - (n - i) ], [ r, t - (n - i) ], [ r, i ]] } }, s.updateCircle = function () { var e = this; e.mainCircle = e.main.selectAll('.' + G.circles).selectAll('.' + G.circle).data(e.lineOrScatterData.bind(e)), e.mainCircle.enter().append('circle').attr('class', e.classCircle.bind(e)).attr('r', e.pointR.bind(e)).style('fill', e.color), e.mainCircle.style('opacity', e.initialOpacityForCircle.bind(e)), e.mainCircle.exit().remove() }, s.redrawCircle = function (e, t, n) { var i = this.main.selectAll('.' + G.selectedCircle); return [(n ? this.mainCircle.transition('' + Math.random()) : this.mainCircle).style('opacity', this.opacityForCircle.bind(this)).style('fill', this.color).attr('cx', e).attr('cy', t), (n ? i.transition('' + Math.random()) : i).attr('cx', e).attr('cy', t)] }, s.circleX = function (e) { return e.x || 0 === e.x ? this.x(e.x) : null }, s.updateCircleY = function () { var e, n, t = this; 0 < t.config.data_groups.length ? (e = t.getShapeIndices(t.isLineType), n = t.generateGetLinePoints(e), t.circleY = function (e, t) { return n(e, t) [0][1] }) : t.circleY = function (e) { return t.getYScale(e.id) (e.value) } }, s.getCircles = function (e, t) { return (t ? this.main.selectAll('.' + G.circles + this.getTargetSelectorSuffix(t)) : this.main).selectAll('.' + G.circle + (_(e) ? '-' + e : '')) }, s.expandCircles = function (e, t, n) { var i = this.pointExpandedR.bind(this); n && this.unexpandCircles(), this.getCircles(e, t).classed(G.EXPANDED, !0).attr('r', i) }, s.unexpandCircles = function (e) { var t = this, n = t.pointR.bind(t); t.getCircles(e).filter(function () { return t.d3.select(this).classed(G.EXPANDED) }).classed(G.EXPANDED, !1).attr('r', n) }, s.pointR = function (e) { var t = this.config; return this.isStepType(e) ? 0 : d(t.point_r) ? t.point_r(e) : t.point_r }, s.pointExpandedR = function (e) { var t = this.config; return t.point_focus_expand_enabled ? t.point_focus_expand_r || 1.75 * this.pointR(e) : this.pointR(e) }, s.pointSelectR = function (e) { var t = this.config; return d(t.point_select_r) ? t.point_select_r(e) : t.point_select_r || 4 * this.pointR(e) }, s.isWithinCircle = function (e, t) { var n = this.d3, i = n.mouse(e), n = n.select(e), e = + n.attr('cx'), n = + n.attr('cy'); return Math.sqrt(Math.pow(e - i[0], 2) + Math.pow(n - i[1], 2)) < t }, s.isWithinStep = function (e, t) { return Math.abs(t - this.d3.mouse(e) [1]) < 30 }, s.initBar = function () { this.main.select('.' + G.chart).append('g').attr('class', G.chartBars) }, s.updateTargetsForBar = function (e) { var t = this, n = t.config, i = t.classChartBar.bind(t), r = t.classBars.bind(t), a = t.classFocus.bind(t); t.main.select('.' + G.chartBars).selectAll('.' + G.chartBar).data(e).attr('class', function (e) { return i(e) + a(e) }).enter().append('g').attr('class', i).style('opacity', 0).style('pointer-events', 'none').append('g').attr('class', r).style('cursor', function (e) { return n.data_selection_isselectable(e) ? 'pointer' : null }) }, s.updateBar = function (e) { function t(e) { return n.color(e.id) } var n = this, i = n.barData.bind(n), r = n.classBar.bind(n), a = n.initialOpacity.bind(n); n.mainBar = n.main.selectAll('.' + G.bars).selectAll('.' + G.bar).data(i), n.mainBar.enter().append('path').attr('class', r).style('stroke', t).style('fill', t), n.mainBar.style('opacity', a), n.mainBar.exit().transition().duration(e).style('opacity', 0).remove() }, s.redrawBar = function (e, t) { return [(t ? this.mainBar.transition('' + Math.random()) : this.mainBar).attr('d', e).style('fill', this.color).style('opacity', 1)] }, s.getBarW = function (e, t) { var n = this.config, t = 'number' == typeof n.bar_width ? n.bar_width : t ? e.tickInterval() * n.bar_width_ratio / t : 0; return n.bar_width_max && n.bar_width_max < t ? n.bar_width_max : t }, s.getBars = function (e, t) { return (t ? this.main.selectAll('.' + G.bars + this.getTargetSelectorSuffix(t)) : this.main).selectAll('.' + G.bar + (_(e) ? '-' + e : '')) }, s.expandBars = function (e, t, n) { n && this.unexpandBars(), this.getBars(e, t).classed(G.EXPANDED, !0) }, s.unexpandBars = function (e) { this.getBars(e).classed(G.EXPANDED, !1) }, s.generateDrawBar = function (e, t) { var i = this.config, r = this.generateGetBarPoints(e, t); return function (e, t) { var n = r(e, t), e = i.axis_rotated ? 1 : 0, t = i.axis_rotated ? 0 : 1; return 'M ' + n[0][e] + ',' + n[0][t] + ' L' + n[1][e] + ',' + n[1][t] + ' L' + n[2][e] + ',' + n[2][t] + ' L' + n[3][e] + ',' + n[3][t] + ' z' } }, s.generateGetBarPoints = function (e, t) { var a = this, n = e.__max__ + 1, o = a.getBarW(t ? a.subXAxis : a.xAxis, n), s = a.getShapeX(o, n, e, !!t), l = a.getShapeY(!!t), c = a.getShapeOffset(a.isBarType, e, !!t), u = t ? a.getSubYScale : a.getYScale; return function (e, t) { var n = u.call(a, e.id) (0), i = c(e, t) || n, r = s(e), t = l(e); return [[r, i], [ r, (t = a.config.axis_rotated && (0 < e.value && t < n || e.value < 0 && n < t) ? n : t) - (n - i) ], [ r + o, t - (n - i) ], [ r + o, i ]] } }, s.isWithinBar = function (e) { var t = this.d3.mouse(e), n = e.getBoundingClientRect(), i = e.pathSegList.getItem(0), r = e.pathSegList.getItem(1), e = Math.min(i.x, r.x), r = Math.min(i.y, r.y); return e - 2 < t[0] && t[0] < e + n.width + 2 && r - 2 < t[1] && t[1] < r + n.height + 2 }, s.initText = function () { this.main.select('.' + G.chart).append('g').attr('class', G.chartTexts), this.mainText = this.d3.selectAll([]) }, s.updateTargetsForText = function (e) { var t = this, n = t.classChartText.bind(t), i = t.classTexts.bind(t), r = t.classFocus.bind(t); t.main.select('.' + G.chartTexts).selectAll('.' + G.chartText).data(e).attr('class', function (e) { return n(e) + r(e) }).enter().append('g').attr('class', n).style('opacity', 0).style('pointer-events', 'none').append('g').attr('class', i) }, s.updateText = function (e) { var i = this, t = i.config, n = i.barOrLineData.bind(i), r = i.classText.bind(i); i.mainText = i.main.selectAll('.' + G.texts).selectAll('.' + G.text).data(n), i.mainText.enter().append('text').attr('class', r).attr('text-anchor', function (e) { return t.axis_rotated ? e.value < 0 ? 'end' : 'start' : 'middle' }).style('stroke', 'none').style('fill', function (e) { return i.color(e) }).style('fill-opacity', 0), i.mainText.text(function (e, t, n) { return i.dataLabelFormat(e.id) (e.value, e.id, t, n) }), i.mainText.exit().transition().duration(e).style('fill-opacity', 0).remove() }, s.redrawText = function (e, t, n, i) { return [(i ? this.mainText.transition() : this.mainText).attr('x', e).attr('y', t).style('fill', this.color).style('fill-opacity', n ? 0 : this.opacityForText.bind(this))] }, s.getTextRect = function (e, t, n) { var i, r = this.d3.select('body').append('div').classed('c3', !0), a = r.append('svg').style('visibility', 'hidden').style('position', 'fixed').style('top', 0).style('left', 0), n = this.d3.select(n).style('font'); return a.selectAll('.dummy').data([e]).enter().append('text').classed(t || '', !0).style('font', n).text(e).each(function () { i = this.getBoundingClientRect() }), r.remove(), i }, s.generateXYForText = function (e, t, n, i) { var r = this, a = r.generateGetAreaPoints(e, !1), o = r.generateGetBarPoints(t, !1), s = r.generateGetLinePoints(n, !1), l = i ? r.getXForText : r.getYForText; return function (e, t) { var n = r.isAreaType(e) ? a : r.isBarType(e) ? o : s; return l.call(r, n(e, t), e, this) } }, s.getXForText = function (e, t, n) { var i = this, r = n.getBoundingClientRect(), e = i.config.axis_rotated ? (n = i.isBarType(t) ? 4 : 6, e[2][1] + n * (t.value < 0 ? - 1 : 1)) : i.hasType('bar') ? (e[2][0] + e[0][0]) / 2 : e[0][0]; return null === t.value && (i.width < e ? e = i.width - r.width : e < 0 && (e = 4)), e }, s.getYForText = function (e, t, n) { var i, r = this, n = n.getBoundingClientRect(); return r.config.axis_rotated ? i = (e[0][0] + e[2][0] + 0.6 * n.height) / 2 : (i = e[2][1], t.value < 0 || 0 === t.value && !r.hasPositiveValue ? (i += n.height, r.isBarType(t) && r.isSafari() ? i -= 3 : !r.isBarType(t) && r.isChrome() && (i += 3)) : i += r.isBarType(t) ? - 3 : - 6), null !== t.value || r.config.axis_rotated || (i < n.height ? i = n.height : this.height < i && (i = this.height - 4)), i }, s.setTargetType = function (e, t) { var n = this, i = n.config; n.mapToTargetIds(e).forEach(function (e) { n.withoutFadeIn[e] = t === i.data_types[e], i.data_types[e] = t }), e || (i.data_type = t) }, s.hasType = function (t, e) { var n = this.config.data_types, i = !1; return (e = e || this.data.targets) && e.length ? e.forEach(function (e) { e = n[e.id]; (e && ~e.indexOf(t) || !e && 'line' === t) && (i = !0) }) : Object.keys(n).length ? Object.keys(n).forEach(function (e) { n[e] === t && (i = !0) }) : i = this.config.data_type === t, i }, s.hasArcType = function (e) { return this.hasType('pie', e) || this.hasType('donut', e) || this.hasType('gauge', e) }, s.isLineType = function (e) { var t = this.config, e = p(e) ? e : e.id; return !t.data_types[e] || !!~['line', 'spline', 'area', 'area-spline', 'step', 'area-step'].indexOf(t.data_types[e]) }, s.isStepType = function (e) { e = p(e) ? e : e.id; return !!~['step', 'area-step'].indexOf(this.config.data_types[e]) }, s.isSplineType = function (e) { e = p(e) ? e : e.id; return !!~['spline', 'area-spline'].indexOf(this.config.data_types[e]) }, s.isAreaType = function (e) { e = p(e) ? e : e.id; return !!~['area', 'area-spline', 'area-step'].indexOf(this.config.data_types[e]) }, s.isBarType = function (e) { e = p(e) ? e : e.id; return 'bar' === this.config.data_types[e] }, s.isScatterType = function (e) { e = p(e) ? e : e.id; return 'scatter' === this.config.data_types[e] }, s.isPieType = function (e) { e = p(e) ? e : e.id; return 'pie' === this.config.data_types[e] }, s.isGaugeType = function (e) { e = p(e) ? e : e.id; return 'gauge' === this.config.data_types[e] }, s.isDonutType = function (e) { e = p(e) ? e : e.id; return 'donut' === this.config.data_types[e] }, s.isArcType = function (e) { return this.isPieType(e) || this.isDonutType(e) || this.isGaugeType(e) }, s.lineData = function (e) { return this.isLineType(e) ? [ e ] : [ ] }, s.arcData = function (e) { return this.isArcType(e.data) ? [ e ] : [ ] }, s.barData = function (e) { return this.isBarType(e) ? e.values : [ ] }, s.lineOrScatterData = function (e) { return this.isLineType(e) || this.isScatterType(e) ? e.values : [ ] }, s.barOrLineData = function (e) { return this.isBarType(e) || this.isLineType(e) ? e.values : [ ] }, s.isInterpolationType = function (e) { return !!~['linear', 'linear-closed', 'basis', 'basis-open', 'basis-closed', 'bundle', 'cardinal', 'cardinal-open', 'cardinal-closed', 'monotone'].indexOf(e) }, s.initGrid = function () { var e = this, t = e.config, n = e.d3; e.grid = e.main.append('g').attr('clip-path', e.clipPathForGrid).attr('class', G.grid), t.grid_x_show && e.grid.append('g').attr('class', G.xgrids), t.grid_y_show && e.grid.append('g').attr('class', G.ygrids), t.grid_focus_show && e.grid.append('g').attr('class', G.xgridFocus).append('line').attr('class', G.xgridFocus), e.xgrid = n.selectAll([]), t.grid_lines_front || e.initGridLines() }, s.initGridLines = function () { var e = this, t = e.d3; e.gridLines = e.main.append('g').attr('clip-path', e.clipPathForGrid).attr('class', G.grid + ' ' + G.gridLines), e.gridLines.append('g').attr('class', G.xgridLines), e.gridLines.append('g').attr('class', G.ygridLines), e.xgridLines = t.selectAll([]) }, s.updateXGrid = function (e) { var t = this, n = t.config, i = t.d3, r = t.generateGridData(n.grid_x_type, t.x), a = t.isCategorized() ? t.xAxis.tickOffset() : 0; t.xgridAttr = n.axis_rotated ? { x1: 0, x2: t.width, y1: function (e) { return t.x(e) - a }, y2: function (e) { return t.x(e) - a } } : { x1: function (e) { return t.x(e) + a }, x2: function (e) { return t.x(e) + a }, y1: 0, y2: t.height }, t.xgrid = t.main.select('.' + G.xgrids).selectAll('.' + G.xgrid).data(r), t.xgrid.enter().append('line').attr('class', G.xgrid), e || t.xgrid.attr(t.xgridAttr).style('opacity', function () { return + i.select(this).attr(n.axis_rotated ? 'y1' : 'x1') === (n.axis_rotated ? t.height : 0) ? 0 : 1 }), t.xgrid.exit().remove() }, s.updateYGrid = function () { var e = this, t = e.config, n = e.yAxis.tickValues() || e.y.ticks(t.grid_y_ticks); e.ygrid = e.main.select('.' + G.ygrids).selectAll('.' + G.ygrid).data(n), e.ygrid.enter().append('line').attr('class', G.ygrid), e.ygrid.attr('x1', t.axis_rotated ? e.y : 0).attr('x2', t.axis_rotated ? e.y : e.width).attr('y1', t.axis_rotated ? 0 : e.y).attr('y2', t.axis_rotated ? e.height : e.y), e.ygrid.exit().remove(), e.smoothLines(e.ygrid, 'grid') }, s.gridTextAnchor = function (e) { return e.position || 'end' }, s.gridTextDx = function (e) { return 'start' === e.position ? 4 : 'middle' === e.position ? 0 : - 4 }, s.xGridTextX = function (e) { return 'start' === e.position ? - this.height : 'middle' === e.position ? - this.height / 2 : 0 }, s.yGridTextX = function (e) { return 'start' === e.position ? 0 : 'middle' === e.position ? this.width / 2 : this.width }, s.updateGrid = function (e) { var t, n = this, i = n.main, r = n.config; n.grid.style('visibility', n.hasArcType() ? 'hidden' : 'visible'), i.select('line.' + G.xgridFocus).style('visibility', 'hidden'), r.grid_x_show && n.updateXGrid(), n.xgridLines = i.select('.' + G.xgridLines).selectAll('.' + G.xgridLine).data(r.grid_x_lines), (t = n.xgridLines.enter().append('g').attr('class', function (e) { return G.xgridLine + (e.class ? ' ' + e.class : '') })).append('line').style('opacity', 0), t.append('text').attr('text-anchor', n.gridTextAnchor).attr('transform', r.axis_rotated ? '' : 'rotate(-90)').attr('dx', n.gridTextDx).attr('dy', - 5).style('opacity', 0), n.xgridLines.exit().transition().duration(e).style('opacity', 0).remove(), r.grid_y_show && n.updateYGrid(), n.ygridLines = i.select('.' + G.ygridLines).selectAll('.' + G.ygridLine).data(r.grid_y_lines), (i = n.ygridLines.enter().append('g').attr('class', function (e) { return G.ygridLine + (e.class ? ' ' + e.class : '') })).append('line').style('opacity', 0), i.append('text').attr('text-anchor', n.gridTextAnchor).attr('transform', r.axis_rotated ? 'rotate(-90)' : '').attr('dx', n.gridTextDx).attr('dy', - 5).style('opacity', 0), i = n.yv.bind(n), n.ygridLines.select('line').transition().duration(e).attr('x1', r.axis_rotated ? i : 0).attr('x2', r.axis_rotated ? i : n.width).attr('y1', r.axis_rotated ? 0 : i).attr('y2', r.axis_rotated ? n.height : i).style('opacity', 1), n.ygridLines.select('text').transition().duration(e).attr('x', (r.axis_rotated ? n.xGridTextX : n.yGridTextX).bind(n)).attr('y', i).text(function (e) { return e.text }).style('opacity', 1), n.ygridLines.exit().transition().duration(e).style('opacity', 0).remove() }, s.redrawGrid = function (e) { var t = this, n = t.config, i = t.xv.bind(t), r = t.xgridLines.select('line'), a = t.xgridLines.select('text'); return [(e ? r.transition() : r).attr('x1', n.axis_rotated ? 0 : i).attr('x2', n.axis_rotated ? t.width : i).attr('y1', n.axis_rotated ? i : 0).attr('y2', n.axis_rotated ? i : t.height).style('opacity', 1), (e ? a.transition() : a).attr('x', (n.axis_rotated ? t.yGridTextX : t.xGridTextX).bind(t)).attr('y', i).text(function (e) { return e.text }).style('opacity', 1)] }, s.showXGridFocus = function (e) { var t = this, n = t.config, i = e.filter(function (e) { return e && _(e.value) }), r = t.main.selectAll('line.' + G.xgridFocus), e = t.xx.bind(t); n.tooltip_show && (t.hasType('scatter') || t.hasArcType() || (r.style('visibility', 'visible').data([i[0]]).attr(n.axis_rotated ? 'y1' : 'x1', e).attr(n.axis_rotated ? 'y2' : 'x2', e), t.smoothLines(r, 'grid'))) }, s.hideXGridFocus = function () { this.main.select('line.' + G.xgridFocus).style('visibility', 'hidden') }, s.updateXgridFocus = function () { var e = this.config; this.main.select('line.' + G.xgridFocus).attr('x1', e.axis_rotated ? 0 : - 10).attr('x2', e.axis_rotated ? this.width : - 10).attr('y1', e.axis_rotated ? - 10 : 0).attr('y2', e.axis_rotated ? - 10 : this.height) }, s.generateGridData = function (e, t) { var n, i, r, a = [ ], o = this.main.select('.' + G.axisX).selectAll('.tick').size(); if ('year' === e) for (e = (n = this.getXDomain()) [0].getFullYear(), i = n[1].getFullYear(), r = e; r <= i; r++) a.push(new Date(r + '-01-01 00:00:00')); else o < (a = t.ticks(10)).length && (a = a.filter(function (e) { return !~('' + e).indexOf('.') })); return a }, s.getGridFilterToRemove = function (e) { return e ? function (t) { var n = !1; return [].concat(e).forEach(function (e) { ('value' in e && t.value === e.value || 'class' in e && t.class === e.class) && (n = !0) }), n } : function () { return !0 } }, s.removeGridLines = function (e, t) { function n(e) { return !r(e) } var i = this.config, r = this.getGridFilterToRemove(e), e = t ? G.xgridLine : G.ygridLine; this.main.select('.' + (t ? G.xgridLines : G.ygridLines)).selectAll('.' + e).filter(r).transition().duration(i.transition_duration).style('opacity', 0).remove(), t ? i.grid_x_lines = i.grid_x_lines.filter(n) : i.grid_y_lines = i.grid_y_lines.filter(n) }, s.initTooltip = function () { var e, t = this, n = t.config; if (t.tooltip = t.selectChart.style('position', 'relative').append('div').attr('class', G.tooltipContainer).style('position', 'absolute').style('pointer-events', 'none').style('display', 'none'), n.tooltip_init_show) { if (t.isTimeSeries() && p(n.tooltip_init_x)) { for (n.tooltip_init_x = t.parseDate(n.tooltip_init_x), e = 0; e < t.data.targets[0].values.length && t.data.targets[0].values[e].x - n.tooltip_init_x != 0; e++); n.tooltip_init_x = e } t.tooltip.html(n.tooltip_contents.call(t, t.data.targets.map(function (e) { return t.addName(e.values[n.tooltip_init_x]) }), t.axis.getXAxisTickFormat(), t.getYFormat(t.hasArcType()), t.color)), t.tooltip.style('top', n.tooltip_init_position.top).style('left', n.tooltip_init_position.left).style('display', 'block') } }, s.getTooltipContent = function (e, t, n, i) { var r, a, o, s, l, c, u = this, d = u.config, p = d.tooltip_format_title || t, m = d.tooltip_format_name || function (e) { return e }, f = d.tooltip_format_value || n, h = u.isOrderAsc(); for (0 === d.data_groups.length ? e.sort(function (e, t) { e = e ? e.value : null, t = t ? t.value : null; return h ? e - t : t - e }) : (c = u.orderTargets(u.data.targets).map(function (e) { return e.id }), e.sort(function (e, t) { var n = e ? e.value : null, i = t ? t.value : null; return 0 < n && 0 < i && (n = e ? c.indexOf(e.id) : null, i = t ? c.indexOf(t.id) : null), h ? n - i : i - n })), a = 0; a < e.length; a++) e[a] && (e[a].value || 0 === e[a].value) && (r || (l = b(p ? p(e[a].x) : e[a].x), r = '' + (l || 0 === l ? '' : '')), void 0 !== (o = b(f(e[a].value, e[a].ratio, e[a].id, e[a].index, e))) && null !== e[a].name && (s = b(m(e[a].name, e[a].ratio, e[a].id, e[a].index)), l = u.levelColor ? u.levelColor(e[a].value) : i(e[a].id), r += '', r += '', r += '', r += '')); return r + '
' + l + '
' + s + '' + o + '
' }, s.tooltipPosition = function (e, t, n, i) { var r, a, o, s, l = this, c = l.config, u = l.d3, d = l.hasArcType(), i = u.mouse(i); return d ? (r = (l.width - (l.isLegendRight ? l.getLegendWidth() : 0)) / 2 + i[0], o = l.height / 2 + i[1] + 20) : (d = l.getSvgLeft(!0), o = c.axis_rotated ? (a = (r = d + i[0] + 100) + t, s = l.currentWidth - l.getCurrentPaddingRight(), l.x(e[0].x) + 20) : (a = (r = d + l.getCurrentPaddingLeft(!0) + l.x(e[0].x) + 20) + t, s = d + l.currentWidth - l.getCurrentPaddingRight(), i[1] + 15), s < a && (r -= a - s + 20), l.currentHeight < o + n && (o -= n + 30)), { top: o = o < 0 ? 0 : o, left: r } }, s.showTooltip = function (e, t) { var n = this, i = n.config, r = n.hasArcType(), a = e.filter(function (e) { return e && _(e.value) }), o = i.tooltip_position || s.tooltipPosition; 0 !== a.length && i.tooltip_show && (n.tooltip.html(i.tooltip_contents.call(n, e, n.axis.getXAxisTickFormat(), n.getYFormat(r), n.color)).style('display', 'block'), e = n.tooltip.property('offsetWidth'), r = n.tooltip.property('offsetHeight'), t = o.call(this, a, e, r, t), n.tooltip.style('top', t.top + 'px').style('left', t.left + 'px')) }, s.hideTooltip = function () { this.tooltip.style('display', 'none') }, s.initLegend = function () { var e = this; if (e.legendItemTextBox = { }, e.legendHasRendered = !1, e.legend = e.svg.append('g').attr('transform', e.getTranslate('legend')), !e.config.legend_show) return e.legend.style('visibility', 'hidden'), void (e.hiddenLegendIds = e.mapToIds(e.data.targets)); e.updateLegendWithDefaults() }, s.updateLegendWithDefaults = function () { this.updateLegend(this.mapToIds(this.data.targets), { withTransform: !1, withTransitionForTransform: !1, withTransition: !1 }) }, s.updateSizeForLegend = function (e, t) { var n = this, i = n.config, i = { top: n.isLegendTop ? n.getCurrentPaddingTop() + i.legend_inset_y + 5.5 : n.currentHeight - e - n.getCurrentPaddingBottom() - i.legend_inset_y, left: n.isLegendLeft ? n.getCurrentPaddingLeft() + i.legend_inset_x + 0.5 : n.currentWidth - t - n.getCurrentPaddingRight() - i.legend_inset_x + 0.5 }; n.margin3 = { top: n.isLegendRight ? 0 : n.isLegendInset ? i.top : n.currentHeight - e, right: NaN, bottom: 0, left: n.isLegendRight ? n.currentWidth - t : n.isLegendInset ? i.left : 0 } }, s.transformLegend = function (e) { (e ? this.legend.transition() : this.legend).attr('transform', this.getTranslate('legend')) }, s.updateLegendStep = function (e) { this.legendStep = e }, s.updateLegendItemWidth = function (e) { this.legendItemWidth = e }, s.updateLegendItemHeight = function (e) { this.legendItemHeight = e }, s.getLegendWidth = function () { var e = this; return e.config.legend_show ? e.isLegendRight || e.isLegendInset ? e.legendItemWidth * (e.legendStep + 1) : e.currentWidth : 0 }, s.getLegendHeight = function () { var e = this, e = e.config.legend_show ? e.isLegendRight ? e.currentHeight : Math.max(20, e.legendItemHeight) * (e.legendStep + 1) : 0; return e }, s.opacityForLegend = function (e) { return e.classed(G.legendItemHidden) ? null : 1 }, s.opacityForUnfocusedLegend = function (e) { return e.classed(G.legendItemHidden) ? null : 0.3 }, s.toggleFocusLegend = function (t, e) { var n = this; t = n.mapToTargetIds(t), n.legend.selectAll('.' + G.legendItem).filter(function (e) { return !!~t.indexOf(e) }).classed(G.legendItemFocused, e).transition().duration(100).style('opacity', function () { return (e ? n.opacityForLegend : n.opacityForUnfocusedLegend).call(n, n.d3.select(this)) }) }, s.revertLegend = function () { var e = this, t = e.d3; e.legend.selectAll('.' + G.legendItem).classed(G.legendItemFocused, !1).transition().duration(100).style('opacity', function () { return e.opacityForLegend(t.select(this)) }) }, s.showLegend = function (e) { var t = this, n = t.config; n.legend_show || (n.legend_show = !0, t.legend.style('visibility', 'visible'), t.legendHasRendered || t.updateLegendWithDefaults()), t.removeHiddenLegendIds(e), t.legend.selectAll(t.selectorLegends(e)).style('visibility', 'visible').transition().style('opacity', function () { return t.opacityForLegend(t.d3.select(this)) }) }, s.hideLegend = function (e) { var t = this, n = t.config; n.legend_show && h(e) && (n.legend_show = !1, t.legend.style('visibility', 'hidden')), t.addHiddenLegendIds(e), t.legend.selectAll(t.selectorLegends(e)).style('opacity', 0).style('visibility', 'hidden') }, s.clearLegendItemTextBoxCache = function () { this.legendItemTextBox = { } }, s.updateLegend = function (c, e, t) { var n, i, r, a, o, s, l, u, d, p, m, f, h = this, g = h.config, _ = 4, y = 10, b = 0, v = 0, S = 10, x = g.legend_item_tile_width + 5, E = 0, C = { }, w = { }, T = { }, O = [ 0 ], M = { }, A = 0; function N(e, t, n) { var i, r = 0 === n, a = n === c.length - 1, e = (n = e, h.legendItemTextBox[e = t] || (h.legendItemTextBox[e] = h.getTextRect(n.textContent, G.legendItem, n)), h.legendItemTextBox[e]), a = e.width + x + (!a || h.isLegendRight || h.isLegendInset ? y : 0) + g.legend_padding, e = e.height + _, o = h.isLegendRight || h.isLegendInset ? e : a, s = h.isLegendRight || h.isLegendInset ? h.getLegendHeight() : h.getLegendWidth(); function l(e, t) { t || (i = (s - E - o) / 2) < S && (i = (s - o) / 2, E = 0, A++), O[M[e] = A] = h.isLegendInset ? 10 : i, C[e] = E, E += o } r && (v = b = A = E = 0), !g.legend_show || h.isLegendToShow(t) ? (w[t] = a, T[t] = e, (!b || b <= a) && (b = a), (!v || v <= e) && (v = e), e = h.isLegendRight || h.isLegendInset ? v : b, g.legend_equally ? (Object.keys(w).forEach(function (e) { w[e] = b }), Object.keys(T).forEach(function (e) { T[e] = v }), (i = (s - e * c.length) / 2) < S ? (A = E = 0, c.forEach(function (e) { l(e) })) : l(t, !0)) : l(t)) : w[t] = T[t] = M[t] = C[t] = 0 } c = c.filter(function (e) { return !D(g.data_names[e]) || null !== g.data_names[e] }), u = U(e = e || { }, 'withTransition', !0), d = U(e, 'withTransitionForTransform', !0), h.isLegendInset && h.updateLegendStep(A = g.legend_inset_step || c.length), a = h.isLegendRight ? (n = function (e) { return b * M[e] }, function (e) { return O[M[e]] + C[e] }) : h.isLegendInset ? (n = function (e) { return b * M[e] + 10 }, function (e) { return O[M[e]] + C[e] }) : (n = function (e) { return O[M[e]] + C[e] }, function (e) { return v * M[e] }), i = function (e, t) { return n(e, t) + 4 + g.legend_item_tile_width }, m = function (e, t) { return a(e, t) + 9 }, r = function (e, t) { return n(e, t) }, f = function (e, t) { return a(e, t) - 5 }, o = function (e, t) { return n(e, t) - 2 }, s = function (e, t) { return n(e, t) - 2 + g.legend_item_tile_width }, l = function (e, t) { return a(e, t) + 4 }, (p = h.legend.selectAll('.' + G.legendItem).data(c).enter().append('g').attr('class', function (e) { return h.generateClass(G.legendItem, e) }).style('visibility', function (e) { return h.isLegendToShow(e) ? 'visible' : 'hidden' }).style('cursor', 'pointer').on('click', function (e) { g.legend_item_onclick ? g.legend_item_onclick.call(h, e) : h.d3.event.altKey ? (h.api.hide(), h.api.show(e)) : (h.api.toggle(e), h.isTargetToShow(e) ? h.api.focus(e) : h.api.revert()) }).on('mouseover', function (e) { g.legend_item_onmouseover ? g.legend_item_onmouseover.call(h, e) : (h.d3.select(this).classed(G.legendItemFocused, !0), !h.transiting && h.isTargetToShow(e) && h.api.focus(e)) }).on('mouseout', function (e) { g.legend_item_onmouseout ? g.legend_item_onmouseout.call(h, e) : (h.d3.select(this).classed(G.legendItemFocused, !1), h.api.revert()) })).append('text').text(function (e) { return D(g.data_names[e]) ? g.data_names[e] : e }).each(function (e, t) { N(this, e, t) }).style('pointer-events', 'none').attr('x', h.isLegendRight || h.isLegendInset ? i : - 200).attr('y', h.isLegendRight || h.isLegendInset ? - 200 : m), p.append('rect').attr('class', G.legendItemEvent).style('fill-opacity', 0).attr('x', h.isLegendRight || h.isLegendInset ? r : - 200).attr('y', h.isLegendRight || h.isLegendInset ? - 200 : f), p.append('line').attr('class', G.legendItemTile).style('stroke', h.color).style('pointer-events', 'none').attr('x1', h.isLegendRight || h.isLegendInset ? o : - 200).attr('y1', h.isLegendRight || h.isLegendInset ? - 200 : l).attr('x2', h.isLegendRight || h.isLegendInset ? s : - 200).attr('y2', h.isLegendRight || h.isLegendInset ? - 200 : l).attr('stroke-width', g.legend_item_tile_height), e = h.legend.select('.' + G.legendBackground + ' rect'), h.isLegendInset && 0 < b && 0 === e.size() && (e = h.legend.insert('g', '.' + G.legendItem).attr('class', G.legendBackground).append('rect')), p = h.legend.selectAll('text').data(c).text(function (e) { return D(g.data_names[e]) ? g.data_names[e] : e }).each(function (e, t) { N(this, e, t) }), (u ? p.transition() : p).attr('x', i).attr('y', m), m = h.legend.selectAll('rect.' + G.legendItemEvent).data(c), (u ? m.transition() : m).attr('width', function (e) { return w[e] }).attr('height', function (e) { return T[e] }).attr('x', r).attr('y', f), f = h.legend.selectAll('line.' + G.legendItemTile).data(c), (u ? f.transition() : f).style('stroke', h.color).attr('x1', o).attr('y1', l).attr('x2', s).attr('y2', l), e && (u ? e.transition() : e).attr('height', h.getLegendHeight() - 12).attr('width', b * (A + 1) + 10), h.legend.selectAll('.' + G.legendItem).classed(G.legendItemHidden, function (e) { return !h.isTargetToShow(e) }), h.updateLegendItemWidth(b), h.updateLegendItemHeight(v), h.updateLegendStep(A), h.updateSizes(), h.updateScales(), h.updateSvgSize(), h.transformAll(d, t), h.legendHasRendered = !0 }, s.initTitle = function () { this.title = this.svg.append('text').text(this.config.title_text).attr('class', this.CLASS.title) }, s.redrawTitle = function () { var e = this; e.title.attr('x', e.xForTitle.bind(e)).attr('y', e.yForTitle.bind(e)) }, s.xForTitle = function () { var e = this, t = e.config, n = t.title_position || 'left', t = ~n.indexOf('right') ? e.currentWidth - e.getTextRect(e.title.node().textContent, e.CLASS.title, e.title.node()).width - t.title_padding.right : ~n.indexOf('center') ? (e.currentWidth - e.getTextRect(e.title.node().textContent, e.CLASS.title, e.title.node()).width) / 2 : t.title_padding.left; return t }, s.yForTitle = function () { var e = this; return e.config.title_padding.top + e.getTextRect(e.title.node().textContent, e.CLASS.title, e.title.node()).height }, s.getTitlePadding = function () { return this.yForTitle() + this.config.title_padding.bottom }, e = o, t = u, Object.create ? t.prototype = Object.create(e.prototype) : ((n = function () { }).prototype = e.prototype, t.prototype = new n), t.prototype.constructor = t, u.prototype.init = function () { var e = this.owner, t = e.config, n = e.main; e.axes.x = n.append('g').attr('class', G.axis + ' ' + G.axisX).attr('clip-path', e.clipPathForXAxis).attr('transform', e.getTranslate('x')).style('visibility', t.axis_x_show ? 'visible' : 'hidden'), e.axes.x.append('text').attr('class', G.axisXLabel).attr('transform', t.axis_rotated ? 'rotate(-90)' : '').style('text-anchor', this.textAnchorForXAxisLabel.bind(this)), e.axes.y = n.append('g').attr('class', G.axis + ' ' + G.axisY).attr('clip-path', t.axis_y_inner ? '' : e.clipPathForYAxis).attr('transform', e.getTranslate('y')).style('visibility', t.axis_y_show ? 'visible' : 'hidden'), e.axes.y.append('text').attr('class', G.axisYLabel).attr('transform', t.axis_rotated ? '' : 'rotate(-90)').style('text-anchor', this.textAnchorForYAxisLabel.bind(this)), e.axes.y2 = n.append('g').attr('class', G.axis + ' ' + G.axisY2).attr('transform', e.getTranslate('y2')).style('visibility', t.axis_y2_show ? 'visible' : 'hidden'), e.axes.y2.append('text').attr('class', G.axisY2Label).attr('transform', t.axis_rotated ? '' : 'rotate(-90)').style('text-anchor', this.textAnchorForY2AxisLabel.bind(this)) }, u.prototype.getXAxis = function (e, t, n, i, r, a, o) { var s = this.owner, l = s.config, a = { isCategory: s.isCategorized(), withOuterTick: r, tickMultiline: l.axis_x_tick_multiline, tickWidth: l.axis_x_tick_width, tickTextRotate: o ? 0 : l.axis_x_tick_rotate, withoutTransition: a }, t = x(s.d3, a).scale(e).orient(t); return s.isTimeSeries() && i && 'function' != typeof i && (i = i.map(function (e) { return s.parseDate(e) })), t.tickFormat(n).tickValues(i), s.isCategorized() && (t.tickCentered(l.axis_x_tick_centered), h(l.axis_x_tick_culling) && (l.axis_x_tick_culling = !1)), t }, u.prototype.updateXAxisTickValues = function (e, t) { var n, i = this.owner, r = i.config; return (r.axis_x_tick_fit || r.axis_x_tick_count) && (n = this.generateTickValues(i.mapTargetsToUniqueXs(e), r.axis_x_tick_count, i.isTimeSeries())), t ? t.tickValues(n) : (i.xAxis.tickValues(n), i.subXAxis.tickValues(n)), n }, u.prototype.getYAxis = function (e, t, n, i, r, a, o) { var s = this.owner, l = s.config, n = x(s.d3, { withOuterTick: r, withoutTransition: a, tickTextRotate: o ? 0 : l.axis_y_tick_rotate }).scale(e).orient(t).tickFormat(n); return s.isTimeSeriesY() ? n.ticks(s.d3.time[l.axis_y_tick_time_value], l.axis_y_tick_time_interval) : n.tickValues(i), n }, u.prototype.getId = function (e) { var t = this.owner.config; return e in t.data_axes ? t.data_axes[e] : 'y' }, u.prototype.getXAxisTickFormat = function () { var t = this.owner, n = t.config, i = t.isTimeSeries() ? t.defaultAxisTimeFormat : t.isCategorized() ? t.categoryName : function (e) { return e < 0 ? e.toFixed(0) : e }; return n.axis_x_tick_format && (d(n.axis_x_tick_format) ? i = n.axis_x_tick_format : t.isTimeSeries() && (i = function (e) { return e ? t.axisTimeFormat(n.axis_x_tick_format) (e) : '' })), d(i) ? function (e) { return i.call(t, e) } : i }, u.prototype.getTickValues = function (e, t) { return e || (t ? t.tickValues() : void 0) }, u.prototype.getXAxisTickValues = function () { return this.getTickValues(this.owner.config.axis_x_tick_values, this.owner.xAxis) }, u.prototype.getYAxisTickValues = function () { return this.getTickValues(this.owner.config.axis_y_tick_values, this.owner.yAxis) }, u.prototype.getY2AxisTickValues = function () { return this.getTickValues(this.owner.config.axis_y2_tick_values, this.owner.y2Axis) }, u.prototype.getLabelOptionByAxisId = function (e) { var t, n = this.owner.config; return 'y' === e ? t = n.axis_y_label : 'y2' === e ? t = n.axis_y2_label : 'x' === e && (t = n.axis_x_label), t }, u.prototype.getLabelText = function (e) { e = this.getLabelOptionByAxisId(e); return p(e) ? e : e ? e.text : null }, u.prototype.setLabelText = function (e, t) { var n = this.owner.config, i = this.getLabelOptionByAxisId(e); p(i) ? 'y' === e ? n.axis_y_label = t : 'y2' === e ? n.axis_y2_label = t : 'x' === e && (n.axis_x_label = t) : i && (i.text = t) }, u.prototype.getLabelPosition = function (e, t) { e = this.getLabelOptionByAxisId(e), t = e && 'object' == typeof e && e.position ? e.position : t; return { isInner: !!~t.indexOf('inner'), isOuter: !!~t.indexOf('outer'), isLeft: !!~t.indexOf('left'), isCenter: !!~t.indexOf('center'), isRight: !!~t.indexOf('right'), isTop: !!~t.indexOf('top'), isMiddle: !!~t.indexOf('middle'), isBottom: !!~t.indexOf('bottom') } }, u.prototype.getXAxisLabelPosition = function () { return this.getLabelPosition('x', this.owner.config.axis_rotated ? 'inner-top' : 'inner-right') }, u.prototype.getYAxisLabelPosition = function () { return this.getLabelPosition('y', this.owner.config.axis_rotated ? 'inner-right' : 'inner-top') }, u.prototype.getY2AxisLabelPosition = function () { return this.getLabelPosition('y2', this.owner.config.axis_rotated ? 'inner-right' : 'inner-top') }, u.prototype.getLabelPositionById = function (e) { return 'y2' === e ? this.getY2AxisLabelPosition() : 'y' === e ? this.getYAxisLabelPosition() : this.getXAxisLabelPosition() }, u.prototype.textForXAxisLabel = function () { return this.getLabelText('x') }, u.prototype.textForYAxisLabel = function () { return this.getLabelText('y') }, u.prototype.textForY2AxisLabel = function () { return this.getLabelText('y2') }, u.prototype.xForAxisLabel = function (e, t) { var n = this.owner; return e ? t.isLeft ? 0 : t.isCenter ? n.width / 2 : n.width : t.isBottom ? - n.height : t.isMiddle ? - n.height / 2 : 0 }, u.prototype.dxForAxisLabel = function (e, t) { return e ? t.isLeft ? '0.5em' : t.isRight ? '-0.5em' : '0' : t.isTop ? '-0.5em' : t.isBottom ? '0.5em' : '0' }, u.prototype.textAnchorForAxisLabel = function (e, t) { return e ? t.isLeft ? 'start' : t.isCenter ? 'middle' : 'end' : t.isBottom ? 'start' : t.isMiddle ? 'middle' : 'end' }, u.prototype.xForXAxisLabel = function () { return this.xForAxisLabel(!this.owner.config.axis_rotated, this.getXAxisLabelPosition()) }, u.prototype.xForYAxisLabel = function () { return this.xForAxisLabel(this.owner.config.axis_rotated, this.getYAxisLabelPosition()) }, u.prototype.xForY2AxisLabel = function () { return this.xForAxisLabel(this.owner.config.axis_rotated, this.getY2AxisLabelPosition()) }, u.prototype.dxForXAxisLabel = function () { return this.dxForAxisLabel(!this.owner.config.axis_rotated, this.getXAxisLabelPosition()) }, u.prototype.dxForYAxisLabel = function () { return this.dxForAxisLabel(this.owner.config.axis_rotated, this.getYAxisLabelPosition()) }, u.prototype.dxForY2AxisLabel = function () { return this.dxForAxisLabel(this.owner.config.axis_rotated, this.getY2AxisLabelPosition()) }, u.prototype.dyForXAxisLabel = function () { var e = this.owner.config, t = this.getXAxisLabelPosition(); return e.axis_rotated ? t.isInner ? '1.2em' : - 25 - this.getMaxTickWidth('x') : t.isInner ? '-0.5em' : e.axis_x_height ? e.axis_x_height - 10 : '3em' }, u.prototype.dyForYAxisLabel = function () { var e = this.owner, t = this.getYAxisLabelPosition(); return e.config.axis_rotated ? t.isInner ? '-0.5em' : '3em' : t.isInner ? '1.2em' : - 10 - (e.config.axis_y_inner ? 0 : this.getMaxTickWidth('y') + 10) }, u.prototype.dyForY2AxisLabel = function () { var e = this.owner, t = this.getY2AxisLabelPosition(); return e.config.axis_rotated ? t.isInner ? '1.2em' : '-2.2em' : t.isInner ? '-0.5em' : 15 + (e.config.axis_y2_inner ? 0 : this.getMaxTickWidth('y2') + 15) }, u.prototype.textAnchorForXAxisLabel = function () { return this.textAnchorForAxisLabel(!this.owner.config.axis_rotated, this.getXAxisLabelPosition()) }, u.prototype.textAnchorForYAxisLabel = function () { return this.textAnchorForAxisLabel(this.owner.config.axis_rotated, this.getYAxisLabelPosition()) }, u.prototype.textAnchorForY2AxisLabel = function () { return this.textAnchorForAxisLabel(this.owner.config.axis_rotated, this.getY2AxisLabelPosition()) }, u.prototype.getMaxTickWidth = function (e, t) { var n, i, r, a = this.owner, o = a.config, s = 0; return t && a.currentMaxTickWidths[e] || (a.svg && (t = a.filterTargetsToShow(a.data.targets), 'y' === e ? (n = a.y.copy().domain(a.getYDomain(t, 'y')), i = this.getYAxis(n, a.yOrient, o.axis_y_tick_format, a.yAxisTickValues, !1, !0, !0)) : 'y2' === e ? (n = a.y2.copy().domain(a.getYDomain(t, 'y2')), i = this.getYAxis(n, a.y2Orient, o.axis_y2_tick_format, a.y2AxisTickValues, !1, !0, !0)) : (n = a.x.copy().domain(a.getXDomain(t)), i = this.getXAxis(n, a.xOrient, a.xAxisTickFormat, a.xAxisTickValues, !1, !0, !0), this.updateXAxisTickValues(t, i)), (r = a.d3.select('body').append('div').classed('c3', !0)).append('svg').style('visibility', 'hidden').style('position', 'fixed').style('top', 0).style('left', 0).append('g').call(i).each(function () { a.d3.select(this).selectAll('text').each(function () { var e = this.getBoundingClientRect(); s < e.width && (s = e.width) }), r.remove() })), a.currentMaxTickWidths[e] = s <= 0 ? a.currentMaxTickWidths[e] : s), a.currentMaxTickWidths[e] }, u.prototype.updateLabels = function (e) { var t = this.owner, n = t.main.select('.' + G.axisX + ' .' + G.axisXLabel), i = t.main.select('.' + G.axisY + ' .' + G.axisYLabel), t = t.main.select('.' + G.axisY2 + ' .' + G.axisY2Label); (e ? n.transition() : n).attr('x', this.xForXAxisLabel.bind(this)).attr('dx', this.dxForXAxisLabel.bind(this)).attr('dy', this.dyForXAxisLabel.bind(this)).text(this.textForXAxisLabel.bind(this)), (e ? i.transition() : i).attr('x', this.xForYAxisLabel.bind(this)).attr('dx', this.dxForYAxisLabel.bind(this)).attr('dy', this.dyForYAxisLabel.bind(this)).text(this.textForYAxisLabel.bind(this)), (e ? t.transition() : t).attr('x', this.xForY2AxisLabel.bind(this)).attr('dx', this.dxForY2AxisLabel.bind(this)).attr('dy', this.dyForY2AxisLabel.bind(this)).text(this.textForY2AxisLabel.bind(this)) }, u.prototype.getPadding = function (e, t, n, i) { var r = 'number' == typeof e ? e : e[t]; return _(r) ? 'ratio' === e.unit ? e[t] * i : this.convertPixelsToAxisPadding(r, i) : n }, u.prototype.convertPixelsToAxisPadding = function (e, t) { var n = this.owner; return t * (e / (n.config.axis_rotated ? n.width : n.height)) }, u.prototype.generateTickValues = function (e, t, n) { var i, r, a, o, s, l, c = e; if (t) if (1 === (i = d(t) ? t() : t)) c = [ e[0] ]; else if (2 === i) c = [ e[0], e[e.length - 1] ]; else if (2 < i) { for (o = ((t = e[e.length - 1]) - (r = e[0])) / (1 + (a = i - 2)), c = [ r ], s = 0; s < a; s++) l = + r + o * (s + 1), c.push(n ? new Date(l) : l); c.push(t) } return c = !n ? c.sort(function (e, t) { return e - t }) : c }, u.prototype.generateTransitions = function (e) { var t = this.owner.axes; return { axisX: e ? t.x.transition().duration(e) : t.x, axisY: e ? t.y.transition().duration(e) : t.y, axisY2: e ? t.y2.transition().duration(e) : t.y2, axisSubX: e ? t.subx.transition().duration(e) : t.subx } }, u.prototype.redraw = function (e, t) { var n = this.owner; n.axes.x.style('opacity', t ? 0 : 1), n.axes.y.style('opacity', t ? 0 : 1), n.axes.y2.style('opacity', t ? 0 : 1), n.axes.subx.style('opacity', t ? 0 : 1), e.axisX.call(n.xAxis), e.axisY.call(n.yAxis), e.axisY2.call(n.y2Axis), e.axisSubX.call(n.subXAxis) }, s.getClipPath = function (e) { return 'url(' + (!!~a.navigator.appVersion.toLowerCase().indexOf('msie 9.') ? '' : document.URL.split('#') [0]) + '#' + e + ')' }, s.appendClip = function (e, t) { return e.append('clipPath').attr('id', t).append('rect') }, s.getAxisClipX = function (e) { var t = Math.max(30, this.margin.left); return e ? - (1 + t) : - (t - 1) }, s.getAxisClipY = function (e) { return e ? - 20 : - this.margin.top }, s.getXAxisClipX = function () { return this.getAxisClipX(!this.config.axis_rotated) }, s.getXAxisClipY = function () { return this.getAxisClipY(!this.config.axis_rotated) }, s.getYAxisClipX = function () { return this.config.axis_y_inner ? - 1 : this.getAxisClipX(this.config.axis_rotated) }, s.getYAxisClipY = function () { return this.getAxisClipY(this.config.axis_rotated) }, s.getAxisClipWidth = function (e) { return e ? this.width + 2 + Math.max(30, this.margin.left) + Math.max(30, this.margin.right) : this.margin.left + 20 }, s.getAxisClipHeight = function (e) { return (e ? this.margin.bottom : this.margin.top + this.height) + 20 }, s.getXAxisClipWidth = function () { return this.getAxisClipWidth(!this.config.axis_rotated) }, s.getXAxisClipHeight = function () { return this.getAxisClipHeight(!this.config.axis_rotated) }, s.getYAxisClipWidth = function () { return this.getAxisClipWidth(this.config.axis_rotated) + (this.config.axis_y_inner ? 20 : 0) }, s.getYAxisClipHeight = function () { return this.getAxisClipHeight(this.config.axis_rotated) }, s.initPie = function () { var e = this.config; this.pie = this.d3.layout.pie().value(function (e) { return e.values.reduce(function (e, t) { return e + t.value }, 0) }), e.data_order || this.pie.sort(null) }, s.updateRadius = function () { var e = this, t = e.config, t = t.gauge_width || t.donut_width; e.radiusExpanded = Math.min(e.arcWidth, e.arcHeight) / 2, e.radius = 0.95 * e.radiusExpanded, e.innerRadiusRatio = t ? (e.radius - t) / e.radius : 0.6, e.innerRadius = e.hasType('donut') || e.hasType('gauge') ? e.radius * e.innerRadiusRatio : 0 }, s.updateArc = function () { var e = this; e.svgArc = e.getSvgArc(), e.svgArcExpanded = e.getSvgArcExpanded(), e.svgArcExpandedSub = e.getSvgArcExpanded(0.98) }, s.updateAngle = function (t) { var e, n, i = this, r = i.config, a = !1, o = 0; return r ? (i.pie(i.filterTargetsToShow(i.data.targets)).forEach(function (e) { a || e.data.id !== t.data.id || (a = !0, (t = e).index = o), o++ }), isNaN(t.startAngle) && (t.startAngle = 0), isNaN(t.endAngle) && (t.endAngle = t.startAngle), i.isGaugeType(t.data) && (i = Math.PI * (r.gauge_fullCircle ? 2 : 1) / ((e = r.gauge_max) - (n = r.gauge_min)), n = t.value < n ? 0 : t.value < e ? t.value - n : e - n, t.startAngle = r.gauge_startingAngle, t.endAngle = t.startAngle + i * n), a ? t : null) : null }, s.getSvgArc = function () { function e(e, t) { return t || (e = n.updateAngle(e)) ? i(e) : 'M 0 0' } var n = this, i = n.d3.svg.arc().outerRadius(n.radius).innerRadius(n.innerRadius); return e.centroid = i.centroid, e }, s.getSvgArcExpanded = function (e) { var t = this, n = t.d3.svg.arc().outerRadius(t.radiusExpanded * (e || 1)).innerRadius(t.innerRadius); return function (e) { e = t.updateAngle(e); return e ? n(e) : 'M 0 0' } }, s.getArc = function (e, t, n) { return n || this.isArcType(e.data) ? this.svgArc(e, t) : 'M 0 0' }, s.transformForArcLabel = function (e) { var t, n, i = this, r = i.config, a = i.updateAngle(e), o = ''; return a && !i.hasType('gauge') && (n = this.svgArc.centroid(a), n = Math.sqrt((t = isNaN(n[0]) ? 0 : n[0]) * t + (a = isNaN(n[1]) ? 0 : n[1]) * a), o = 'translate(' + t * (n = i.hasType('donut') && r.donut_label_ratio ? d(r.donut_label_ratio) ? r.donut_label_ratio(e, i.radius, n) : r.donut_label_ratio : i.hasType('pie') && r.pie_label_ratio ? d(r.pie_label_ratio) ? r.pie_label_ratio(e, i.radius, n) : r.pie_label_ratio : i.radius && n ? (0.375 < 36 / i.radius ? 1.175 - 36 / i.radius : 0.8) * i.radius / n : 0) + ',' + a * n + ')'), o }, s.getArcRatio = function (e) { var t = this.config, t = Math.PI * (this.hasType('gauge') && !t.gauge_fullCircle ? 1 : 2); return e ? (e.endAngle - e.startAngle) / t : null }, s.convertToArcData = function (e) { return this.addName({ id: e.data.id, value: e.value, ratio: this.getArcRatio(e), index: e.index }) }, s.textForArcLabel = function (e) { var t, n, i, r = this; return r.shouldShowArcLabel() ? (t = (i = r.updateAngle(e)) ? i.value : null, n = r.getArcRatio(i), i = e.data.id, r.hasType('gauge') || r.meetsArcLabelThreshold(n) ? (e = r.getArcLabelFormat()) ? e(t, n, i) : r.defaultArcValueFormat(t, n) : '') : '' }, s.expandArc = function (e) { var t, n = this; n.transiting ? t = a.setInterval(function () { n.transiting || (a.clearInterval(t), 0 < n.legend.selectAll('.c3-legend-item-focused').size() && n.expandArc(e)) }, 10) : (e = n.mapToTargetIds(e), n.svg.selectAll(n.selectorTargets(e, '.' + G.chartArc)).each(function (e) { n.shouldExpand(e.data.id) && n.d3.select(this).selectAll('path').transition().duration(n.expandDuration(e.data.id)).attr('d', n.svgArcExpanded).transition().duration(2 * n.expandDuration(e.data.id)).attr('d', n.svgArcExpandedSub).each(function (e) { n.isDonutType(e.data) }) })) }, s.unexpandArc = function (e) { var t = this; t.transiting || (e = t.mapToTargetIds(e), t.svg.selectAll(t.selectorTargets(e, '.' + G.chartArc)).selectAll('path').transition().duration(function (e) { return t.expandDuration(e.data.id) }).attr('d', t.svgArc), t.svg.selectAll('.' + G.arc).style('opacity', 1)) }, s.expandDuration = function (e) { var t = this.config; return this.isDonutType(e) ? t.donut_expand_duration : this.isGaugeType(e) ? t.gauge_expand_duration : this.isPieType(e) ? t.pie_expand_duration : 50 }, s.shouldExpand = function (e) { var t = this.config; return this.isDonutType(e) && t.donut_expand || this.isGaugeType(e) && t.gauge_expand || this.isPieType(e) && t.pie_expand }, s.shouldShowArcLabel = function () { var e = this.config, t = !0; return this.hasType('donut') ? t = e.donut_label_show : this.hasType('pie') && (t = e.pie_label_show), t }, s.meetsArcLabelThreshold = function (e) { var t = this.config; return (this.hasType('donut') ? t.donut_label_threshold : t.pie_label_threshold) <= e }, s.getArcLabelFormat = function () { var e = this.config, t = e.pie_label_format; return this.hasType('gauge') ? t = e.gauge_label_format : this.hasType('donut') && (t = e.donut_label_format), t }, s.getArcTitle = function () { return this.hasType('donut') ? this.config.donut_title : '' }, s.updateTargetsForArc = function (e) { var t = this, n = t.main, i = t.classChartArc.bind(t), r = t.classArcs.bind(t), a = t.classFocus.bind(t), e = n.select('.' + G.chartArcs).selectAll('.' + G.chartArc).data(t.pie(e)).attr('class', function (e) { return i(e) + a(e.data) }).enter().append('g').attr('class', i); e.append('g').attr('class', r), e.append('text').attr('dy', t.hasType('gauge') ? '-.1em' : '.35em').style('opacity', 0).style('text-anchor', 'middle').style('pointer-events', 'none') }, s.initArc = function () { var e = this; e.arcs = e.main.select('.' + G.chart).append('g').attr('class', G.chartArcs).attr('transform', e.getTranslate('arc')), e.arcs.append('text').attr('class', G.chartArcsTitle).style('text-anchor', 'middle').text(e.getArcTitle()) }, s.redrawArc = function (e, t, n) { var i = this, r = i.d3, a = i.config, o = i.main, s = o.selectAll('.' + G.arcs).selectAll('.' + G.arc).data(i.arcData.bind(i)); s.enter().append('path').attr('class', i.classArc.bind(i)).style('fill', function (e) { return i.color(e.data) }).style('cursor', function (e) { return a.interaction_enabled && a.data_selection_isselectable(e) ? 'pointer' : null }).style('opacity', 0).each(function (e) { i.isGaugeType(e.data) && (e.startAngle = e.endAngle = a.gauge_startingAngle), this._current = e }), s.attr('transform', function (e) { return !i.isGaugeType(e.data) && n ? 'scale(0)' : '' }).style('opacity', function (e) { return e === this._current ? 0 : 1 }).on('mouseover', a.interaction_enabled ? function (e) { var t; i.transiting || (t = i.updateAngle(e)) && (e = i.convertToArcData(t), i.expandArc(t.data.id), i.api.focus(t.data.id), i.toggleFocusLegend(t.data.id, !0), i.config.data_onmouseover(e, this)) } : null).on('mousemove', a.interaction_enabled ? function (e) { e = i.updateAngle(e); e && (e = i.convertToArcData(e), i.showTooltip([e], this)) } : null).on('mouseout', a.interaction_enabled ? function (e) { var t; i.transiting || (t = i.updateAngle(e)) && (e = i.convertToArcData(t), i.unexpandArc(t.data.id), i.api.revert(), i.revertLegend(), i.hideTooltip(), i.config.data_onmouseout(e, this)) } : null).on('click', a.interaction_enabled ? function (e, t) { e = i.updateAngle(e); e && (e = i.convertToArcData(e), i.toggleShape && i.toggleShape(this, e, t), i.config.data_onclick.call(i.api, e, this)) } : null).each(function () { i.transiting = !0 }).transition().duration(e).attrTween('d', function (t) { var n, e = i.updateAngle(t); return e ? (isNaN(this._current.startAngle) && (this._current.startAngle = 0), isNaN(this._current.endAngle) && (this._current.endAngle = this._current.startAngle), n = r.interpolate(this._current, e), this._current = n(0), function (e) { e = n(e); return e.data = t.data, i.getArc(e, !0) }) : function () { return 'M 0 0' } }).attr('transform', n ? 'scale(1)' : '').style('fill', function (e) { return i.levelColor ? i.levelColor(e.data.values[0].value) : i.color(e.data.id) }).style('opacity', 1).call(i.endall, function () { i.transiting = !1 }), s.exit().transition().duration(t).style('opacity', 0).remove(), o.selectAll('.' + G.chartArc).select('text').style('opacity', 0).attr('class', function (e) { return i.isGaugeType(e.data) ? G.gaugeValue : '' }).text(i.textForArcLabel.bind(i)).attr('transform', i.transformForArcLabel.bind(i)).style('font-size', function (e) { return i.isGaugeType(e.data) ? Math.round(i.radius / 5) + 'px' : '' }).transition().duration(e).style('opacity', function (e) { return i.isTargetToShow(e.data.id) && i.isArcType(e.data) ? 1 : 0 }), o.select('.' + G.chartArcsTitle).style('opacity', i.hasType('donut') || i.hasType('gauge') ? 1 : 0), i.hasType('gauge') && (i.arcs.select('.' + G.chartArcsBackground).attr('d', function () { return i.getArc({ data: [ { value: a.gauge_max } ], startAngle: a.gauge_startingAngle, endAngle: - 1 * a.gauge_startingAngle }, !0, !0) }), i.arcs.select('.' + G.chartArcsGaugeUnit).attr('dy', '.75em').text(a.gauge_label_show ? a.gauge_units : ''), i.arcs.select('.' + G.chartArcsGaugeMin).attr('dx', - 1 * (i.innerRadius + (i.radius - i.innerRadius) / (a.gauge_fullCircle ? 1 : 2)) + 'px').attr('dy', '1.2em').text(a.gauge_label_show ? a.gauge_min : ''), i.arcs.select('.' + G.chartArcsGaugeMax).attr('dx', i.innerRadius + (i.radius - i.innerRadius) / (a.gauge_fullCircle ? 1 : 2) + 'px').attr('dy', '1.2em').text(a.gauge_label_show ? a.gauge_max : '')) }, s.initGauge = function () { var e = this.arcs; this.hasType('gauge') && (e.append('path').attr('class', G.chartArcsBackground), e.append('text').attr('class', G.chartArcsGaugeUnit).style('text-anchor', 'middle').style('pointer-events', 'none'), e.append('text').attr('class', G.chartArcsGaugeMin).style('text-anchor', 'middle').style('pointer-events', 'none'), e.append('text').attr('class', G.chartArcsGaugeMax).style('text-anchor', 'middle').style('pointer-events', 'none')) }, s.getGaugeLabelHeight = function () { return this.config.gauge_label_show ? 20 : 0 }, s.initRegion = function () { this.region = this.main.append('g').attr('clip-path', this.clipPath).attr('class', G.regions) }, s.updateRegion = function (e) { var t = this, n = t.config; t.region.style('visibility', t.hasArcType() ? 'hidden' : 'visible'), t.mainRegion = t.main.select('.' + G.regions).selectAll('.' + G.region).data(n.regions), t.mainRegion.enter().append('g').append('rect').style('fill-opacity', 0), t.mainRegion.attr('class', t.classRegion.bind(t)), t.mainRegion.exit().transition().duration(e).style('opacity', 0).remove() }, s.redrawRegion = function (e) { var t = this, n = t.mainRegion.selectAll('rect').each(function () { var e = t.d3.select(this.parentNode).datum(); t.d3.select(this).datum(e) }), i = t.regionX.bind(t), r = t.regionY.bind(t), a = t.regionWidth.bind(t), o = t.regionHeight.bind(t); return [(e ? n.transition() : n).attr('x', i).attr('y', r).attr('width', a).attr('height', o).style('fill-opacity', function (e) { return _(e.opacity) ? e.opacity : 0.1 })] }, s.regionX = function (e) { var t = this, n = t.config, i = 'y' === e.axis ? t.y : t.y2, e = 'y' === e.axis || 'y2' === e.axis ? n.axis_rotated && 'start' in e ? i(e.start) : 0 : !n.axis_rotated && 'start' in e ? t.x(t.isTimeSeries() ? t.parseDate(e.start) : e.start) : 0; return e }, s.regionY = function (e) { var t = this, n = t.config, i = 'y' === e.axis ? t.y : t.y2, e = 'y' === e.axis || 'y2' === e.axis ? !n.axis_rotated && 'end' in e ? i(e.end) : 0 : n.axis_rotated && 'start' in e ? t.x(t.isTimeSeries() ? t.parseDate(e.start) : e.start) : 0; return e }, s.regionWidth = function (e) { var t = this, n = t.config, i = t.regionX(e), r = 'y' === e.axis ? t.y : t.y2, t = 'y' === e.axis || 'y2' === e.axis ? n.axis_rotated && 'end' in e ? r(e.end) : t.width : !n.axis_rotated && 'end' in e ? t.x(t.isTimeSeries() ? t.parseDate(e.end) : e.end) : t.width; return t < i ? 0 : t - i }, s.regionHeight = function (e) { var t = this, n = t.config, i = this.regionY(e), r = 'y' === e.axis ? t.y : t.y2, t = 'y' === e.axis || 'y2' === e.axis ? !n.axis_rotated && 'start' in e ? r(e.start) : t.height : n.axis_rotated && 'end' in e ? t.x(t.isTimeSeries() ? t.parseDate(e.end) : e.end) : t.height; return t < i ? 0 : t - i }, s.isRegionOnX = function (e) { return !e.axis || 'x' === e.axis }, s.drag = function (e) { var t, n, i, u, d, p, m, f = this, r = f.config, a = f.main, h = f.d3; f.hasArcType() || r.data_selection_enabled && (r.zoom_enabled && !f.zoom.altDomain || r.data_selection_multiple && (n = f.dragStart[1], i = e[1], u = Math.min(t = f.dragStart[0], e = e[0]), d = Math.max(t, e), p = r.data_selection_grouped ? f.margin.top : Math.min(n, i), m = r.data_selection_grouped ? f.height : Math.max(n, i), a.select('.' + G.dragarea).attr('x', u).attr('y', p).attr('width', d - u).attr('height', m - p), a.selectAll('.' + G.shapes).selectAll('.' + G.shape).filter(function (e) { return r.data_selection_isselectable(e) }).each(function (e, t) { var n, i, r, a, o = h.select(this), s = o.classed(G.SELECTED), l = o.classed(G.INCLUDED), c = !1; if (o.classed(G.circle)) n = + o.attr('cx'), i = + o.attr('cy'), r = f.togglePoint, c = u < n && n < d && p < i && i < m; else { if (!o.classed(G.bar)) return; i = (a = v(this)).y, r = f.togglePath, c = !(d < (n = a.x) || n + a.width < u || m < i || i + a.height < p) } c ^ l && (o.classed(G.INCLUDED, !l), o.classed(G.SELECTED, !s), r.call(f, !s, o, e, t)) }))) }, s.dragstart = function (e) { var t = this, n = t.config; t.hasArcType() || n.data_selection_enabled && (t.dragStart = e, t.main.select('.' + G.chart).append('rect').attr('class', G.dragarea).style('opacity', 0.1), t.dragging = !0) }, s.dragend = function () { var e = this, t = e.config; e.hasArcType() || t.data_selection_enabled && (e.main.select('.' + G.dragarea).transition().duration(100).style('opacity', 0).remove(), e.main.selectAll('.' + G.shape).classed(G.INCLUDED, !1), e.dragging = !1) }, s.selectPoint = function (e, t, n) { var i = this, r = i.config, a = (r.axis_rotated ? i.circleY : i.circleX).bind(i), o = (r.axis_rotated ? i.circleX : i.circleY).bind(i), s = i.pointSelectR.bind(i); r.data_onselected.call(i.api, t, e.node()), i.main.select('.' + G.selectedCircles + i.getTargetSelectorSuffix(t.id)).selectAll('.' + G.selectedCircle + '-' + n).data([t]).enter().append('circle').attr('class', function () { return i.generateClass(G.selectedCircle, n) }).attr('cx', a).attr('cy', o).attr('stroke', function () { return i.color(t) }).attr('r', function (e) { return 1.4 * i.pointSelectR(e) }).transition().duration(100).attr('r', s) }, s.unselectPoint = function (e, t, n) { this.config.data_onunselected.call(this.api, t, e.node()), this.main.select('.' + G.selectedCircles + this.getTargetSelectorSuffix(t.id)).selectAll('.' + G.selectedCircle + '-' + n).transition().duration(100).attr('r', 0).remove() }, s.togglePoint = function (e, t, n, i) { e ? this.selectPoint(t, n, i) : this.unselectPoint(t, n, i) }, s.selectPath = function (e, t) { var n = this; n.config.data_onselected.call(n, t, e.node()), n.config.interaction_brighten && e.transition().duration(100).style('fill', function () { return n.d3.rgb(n.color(t)).brighter(0.75) }) }, s.unselectPath = function (e, t) { var n = this; n.config.data_onunselected.call(n, t, e.node()), n.config.interaction_brighten && e.transition().duration(100).style('fill', function () { return n.color(t) }) }, s.togglePath = function (e, t, n, i) { e ? this.selectPath(t, n, i) : this.unselectPath(t, n, i) }, s.getToggle = function (e, t) { var n; return 'circle' === e.nodeName ? n = this.isStepType(t) ? function () { } : this.togglePoint : 'path' === e.nodeName && (n = this.togglePath), n }, s.toggleShape = function (e, t, n) { var i = this, r = i.d3, a = i.config, o = r.select(e), s = o.classed(G.SELECTED), l = i.getToggle(e, t).bind(i); a.data_selection_enabled && a.data_selection_isselectable(t) && (a.data_selection_multiple || i.main.selectAll('.' + G.shapes + (a.data_selection_grouped ? i.getTargetSelectorSuffix(t.id) : '')).selectAll('.' + G.shape).each(function (e, t) { var n = r.select(this); n.classed(G.SELECTED) && l(!1, n.classed(G.SELECTED, !1), e, t) }), o.classed(G.SELECTED, !s), l(!s, o, t, n)) }, s.initBrush = function () { var t = this; t.brush = t.d3.svg.brush().on('brush', function () { t.redrawForBrush() }), t.brush.update = function () { return t.context && t.context.select('.' + G.brush).call(this), this }, t.brush.scale = function (e) { return t.config.axis_rotated ? this.y(e) : this.x(e) } }, s.initSubchart = function () { var e = this, t = e.config, n = e.context = e.svg.append('g').attr('transform', e.getTranslate('context')), i = t.subchart_show ? 'visible' : 'hidden'; n.style('visibility', i), n.append('g').attr('clip-path', e.clipPathForSubchart).attr('class', G.chart), n.select('.' + G.chart).append('g').attr('class', G.chartBars), n.select('.' + G.chart).append('g').attr('class', G.chartLines), n.append('g').attr('clip-path', e.clipPath).attr('class', G.brush).call(e.brush), e.axes.subx = n.append('g').attr('class', G.axisX).attr('transform', e.getTranslate('subx')).attr('clip-path', t.axis_rotated ? '' : e.clipPathForXAxis).style('visibility', t.subchart_axis_x_show ? i : 'hidden') }, s.updateTargetsForSubchart = function (e) { var t = this, n = t.context, i = t.config, r = t.classChartBar.bind(t), a = t.classBars.bind(t), o = t.classChartLine.bind(t), s = t.classLines.bind(t), l = t.classAreas.bind(t); i.subchart_show && (n.select('.' + G.chartBars).selectAll('.' + G.chartBar).data(e).attr('class', r).enter().append('g').style('opacity', 0).attr('class', r).append('g').attr('class', a), (o = n.select('.' + G.chartLines).selectAll('.' + G.chartLine).data(e).attr('class', o).enter().append('g').style('opacity', 0).attr('class', o)).append('g').attr('class', s), o.append('g').attr('class', l), n.selectAll('.' + G.brush + ' rect').attr(i.axis_rotated ? 'width' : 'height', i.axis_rotated ? t.width2 : t.height2)) }, s.updateBarForSubchart = function (e) { var t = this; t.contextBar = t.context.selectAll('.' + G.bars).selectAll('.' + G.bar).data(t.barData.bind(t)), t.contextBar.enter().append('path').attr('class', t.classBar.bind(t)).style('stroke', 'none').style('fill', t.color), t.contextBar.style('opacity', t.initialOpacity.bind(t)), t.contextBar.exit().transition().duration(e).style('opacity', 0).remove() }, s.redrawBarForSubchart = function (e, t, n) { (t ? this.contextBar.transition('' + Math.random()).duration(n) : this.contextBar).attr('d', e).style('opacity', 1) }, s.updateLineForSubchart = function (e) { var t = this; t.contextLine = t.context.selectAll('.' + G.lines).selectAll('.' + G.line).data(t.lineData.bind(t)), t.contextLine.enter().append('path').attr('class', t.classLine.bind(t)).style('stroke', t.color), t.contextLine.style('opacity', t.initialOpacity.bind(t)), t.contextLine.exit().transition().duration(e).style('opacity', 0).remove() }, s.redrawLineForSubchart = function (e, t, n) { (t ? this.contextLine.transition('' + Math.random()).duration(n) : this.contextLine).attr('d', e).style('opacity', 1) }, s.updateAreaForSubchart = function (e) { var t = this, n = t.d3; t.contextArea = t.context.selectAll('.' + G.areas).selectAll('.' + G.area).data(t.lineData.bind(t)), t.contextArea.enter().append('path').attr('class', t.classArea.bind(t)).style('fill', t.color).style('opacity', function () { return t.orgAreaOpacity = + n.select(this).style('opacity'), 0 }), t.contextArea.style('opacity', 0), t.contextArea.exit().transition().duration(e).style('opacity', 0).remove() }, s.redrawAreaForSubchart = function (e, t, n) { (t ? this.contextArea.transition('' + Math.random()).duration(n) : this.contextArea).attr('d', e).style('fill', this.color).style('opacity', this.orgAreaOpacity) }, s.redrawSubchart = function (e, t, n, i, r, a, o) { var s = this, l = s.d3, c = s.config; s.context.style('visibility', c.subchart_show ? 'visible' : 'hidden'), c.subchart_show && (l.event && 'zoom' === l.event.type && s.brush.extent(s.x.orgDomain()).update(), e && (s.brush.empty() || s.brush.extent(s.x.orgDomain()).update(), r = s.generateDrawArea(r, !0), a = s.generateDrawBar(a, !0), o = s.generateDrawLine(o, !0), s.updateBarForSubchart(n), s.updateLineForSubchart(n), s.updateAreaForSubchart(n), s.redrawBarForSubchart(a, n, n), s.redrawLineForSubchart(o, n, n), s.redrawAreaForSubchart(r, n, n))) }, s.redrawForBrush = function () { var e = this, t = e.x; e.redraw({ withTransition: !1, withY: e.config.zoom_rescale, withSubchart: !1, withUpdateXDomain: !0, withDimension: !1 }), e.config.subchart_onbrush.call(e.api, t.orgDomain()) }, s.transformContext = function (e, t) { var n; t && t.axisSubX ? n = t.axisSubX : (n = this.context.select('.' + G.axisX), e && (n = n.transition())), this.context.attr('transform', this.getTranslate('context')), n.attr('transform', this.getTranslate('subx')) }, s.getDefaultExtent = function () { var e = this, t = e.config, t = d(t.axis_x_extent) ? t.axis_x_extent(e.getXDomain(e.data.targets)) : t.axis_x_extent; return t = e.isTimeSeries() ? [ e.parseDate(t[0]), e.parseDate(t[1]) ] : t }, s.initZoom = function () { var t, n = this, i = n.d3, r = n.config; n.zoom = i.behavior.zoom().on('zoomstart', function () { n.zoom.altDomain = (t = i.event.sourceEvent).altKey ? n.x.orgDomain() : null, r.zoom_onzoomstart.call(n.api, i.event.sourceEvent) }).on('zoom', function () { n.redrawForZoom.call(n) }).on('zoomend', function () { var e = i.event.sourceEvent; e && t.clientX === e.clientX && t.clientY === e.clientY || (n.redrawEventRect(), n.updateZoom(), r.zoom_onzoomend.call(n.api, n.x.orgDomain())) }), n.zoom.scale = function (e) { return r.axis_rotated ? this.y(e) : this.x(e) }, n.zoom.orgScaleExtent = function () { var e = r.zoom_extent || [ 1, 10 ]; return [e[0], Math.max(n.getMaxDataCount() / e[1], e[1])] }, n.zoom.updateScaleExtent = function () { var e = k(n.x.orgDomain()) / k(n.getZoomDomain()), t = this.orgScaleExtent(); return this.scaleExtent([t[0] * e, t[1] * e]), this } }, s.getZoomDomain = function () { var e = this.config, t = this.d3; return [t.min([this.orgXDomain[0], e.zoom_x_min]), t.max([this.orgXDomain[1], e.zoom_x_max])] }, s.updateZoom = function () { var e = this.config.zoom_enabled ? this.zoom : function () { }; this.main.select('.' + G.zoomRect).call(e).on('dblclick.zoom', null), this.main.selectAll('.' + G.eventRect).call(e).on('dblclick.zoom', null) }, s.redrawForZoom = function () { var e = this, t = e.d3, n = e.config, i = e.zoom, r = e.x; if (n.zoom_enabled && 0 !== e.filterTargetsToShow(e.data.targets).length) { if ('mousemove' === t.event.sourceEvent.type && i.altDomain) return r.domain(i.altDomain), void i.scale(r).updateScaleExtent(); e.isCategorized() && r.orgDomain() [0] === e.orgXDomain[0] && r.domain([e.orgXDomain[0] - 1e-10, r.orgDomain() [1]]), e.redraw({ withTransition: !1, withY: n.zoom_rescale, withSubchart: !1, withEventRect: !1, withDimension: !1 }), 'mousemove' === t.event.sourceEvent.type && (e.cancelClick = !0), n.zoom_onzoom.call(e.api, r.orgDomain()) } }, s.generateColor = function () { var e = this.config, t = this.d3, i = e.data_colors, r = y(e.color_pattern) ? e.color_pattern : t.scale.category10().range(), a = e.data_color, o = [ ]; return function (e) { var t, n = e.id || e.data && e.data.id || e; return i[n] instanceof Function ? t = i[n](e) : i[n] ? t = i[n] : (~o.indexOf(n) || o.push(n), t = r[o.indexOf(n) % r.length], i[n] = t), a instanceof Function ? a(t, e) : t } }, s.generateLevelColor = function () { var e = this.config, i = e.color_pattern, t = e.color_threshold, r = 'value' === t.unit, a = t.values && t.values.length ? t.values : [ ], o = t.max || 100; return y(e.color_threshold) ? function (e) { for (var t = i[i.length - 1], n = 0; n < a.length; n++) if ((r ? e : 100 * e / o) < a[n]) { t = i[n]; break } return t } : null }, s.getYFormat = function (e) { var i = this, r = e && !i.hasType('gauge') ? i.defaultArcValueFormat : i.yFormat, a = e && !i.hasType('gauge') ? i.defaultArcValueFormat : i.y2Format; return function (e, t, n) { return ('y2' === i.axis.getId(n) ? a : r).call(i, e, t) } }, s.yFormat = function (e) { var t = this.config; return (t.axis_y_tick_format || this.defaultValueFormat) (e) }, s.y2Format = function (e) { var t = this.config; return (t.axis_y2_tick_format || this.defaultValueFormat) (e) }, s.defaultValueFormat = function (e) { return _(e) ? + e : '' }, s.defaultArcValueFormat = function (e, t) { return (100 * t).toFixed(1) + '%' }, s.dataLabelFormat = function (e) { var t = this.config.data_labels, n = function (e) { return _(e) ? + e : '' }, n = 'function' == typeof t.format ? t.format : 'object' == typeof t.format ? t.format[e] ? !0 === t.format[e] ? n : t.format[e] : function () { return '' } : n; return n }, s.hasCaches = function (e) { for (var t = 0; t < e.length; t++) if (!(e[t] in this.cache)) return !1; return !0 }, s.addCache = function (e, t) { this.cache[e] = this.cloneTarget(t) }, s.getCaches = function (e) { for (var t = [ ], n = 0; n < e.length; n++) e[n] in this.cache && t.push(this.cloneTarget(this.cache[e[n]])); return t }; var G = s.CLASS = { target: 'c3-target', chart: 'c3-chart', chartLine: 'c3-chart-line', chartLines: 'c3-chart-lines', chartBar: 'c3-chart-bar', chartBars: 'c3-chart-bars', chartText: 'c3-chart-text', chartTexts: 'c3-chart-texts', chartArc: 'c3-chart-arc', chartArcs: 'c3-chart-arcs', chartArcsTitle: 'c3-chart-arcs-title', chartArcsBackground: 'c3-chart-arcs-background', chartArcsGaugeUnit: 'c3-chart-arcs-gauge-unit', chartArcsGaugeMax: 'c3-chart-arcs-gauge-max', chartArcsGaugeMin: 'c3-chart-arcs-gauge-min', selectedCircle: 'c3-selected-circle', selectedCircles: 'c3-selected-circles', eventRect: 'c3-event-rect', eventRects: 'c3-event-rects', eventRectsSingle: 'c3-event-rects-single', eventRectsMultiple: 'c3-event-rects-multiple', zoomRect: 'c3-zoom-rect', brush: 'c3-brush', focused: 'c3-focused', defocused: 'c3-defocused', region: 'c3-region', regions: 'c3-regions', title: 'c3-title', tooltipContainer: 'c3-tooltip-container', tooltip: 'c3-tooltip', tooltipName: 'c3-tooltip-name', shape: 'c3-shape', shapes: 'c3-shapes', line: 'c3-line', lines: 'c3-lines', bar: 'c3-bar', bars: 'c3-bars', circle: 'c3-circle', circles: 'c3-circles', arc: 'c3-arc', arcs: 'c3-arcs', area: 'c3-area', areas: 'c3-areas', empty: 'c3-empty', text: 'c3-text', texts: 'c3-texts', gaugeValue: 'c3-gauge-value', grid: 'c3-grid', gridLines: 'c3-grid-lines', xgrid: 'c3-xgrid', xgrids: 'c3-xgrids', xgridLine: 'c3-xgrid-line', xgridLines: 'c3-xgrid-lines', xgridFocus: 'c3-xgrid-focus', ygrid: 'c3-ygrid', ygrids: 'c3-ygrids', ygridLine: 'c3-ygrid-line', ygridLines: 'c3-ygrid-lines', axis: 'c3-axis', axisX: 'c3-axis-x', axisXLabel: 'c3-axis-x-label', axisY: 'c3-axis-y', axisYLabel: 'c3-axis-y-label', axisY2: 'c3-axis-y2', axisY2Label: 'c3-axis-y2-label', legendBackground: 'c3-legend-background', legendItem: 'c3-legend-item', legendItemEvent: 'c3-legend-item-event', legendItemTile: 'c3-legend-item-tile', legendItemHidden: 'c3-legend-item-hidden', legendItemFocused: 'c3-legend-item-focused', dragarea: 'c3-dragarea', EXPANDED: '_expanded_', SELECTED: '_selected_', INCLUDED: '_included_' }; s.generateClass = function (e, t) { return ' ' + e + ' ' + e + this.getTargetSelectorSuffix(t) }, s.classText = function (e) { return this.generateClass(G.text, e.index) }, s.classTexts = function (e) { return this.generateClass(G.texts, e.id) }, s.classShape = function (e) { return this.generateClass(G.shape, e.index) }, s.classShapes = function (e) { return this.generateClass(G.shapes, e.id) }, s.classLine = function (e) { return this.classShape(e) + this.generateClass(G.line, e.id) }, s.classLines = function (e) { return this.classShapes(e) + this.generateClass(G.lines, e.id) }, s.classCircle = function (e) { return this.classShape(e) + this.generateClass(G.circle, e.index) }, s.classCircles = function (e) { return this.classShapes(e) + this.generateClass(G.circles, e.id) }, s.classBar = function (e) { return this.classShape(e) + this.generateClass(G.bar, e.index) }, s.classBars = function (e) { return this.classShapes(e) + this.generateClass(G.bars, e.id) }, s.classArc = function (e) { return this.classShape(e.data) + this.generateClass(G.arc, e.data.id) }, s.classArcs = function (e) { return this.classShapes(e.data) + this.generateClass(G.arcs, e.data.id) }, s.classArea = function (e) { return this.classShape(e) + this.generateClass(G.area, e.id) }, s.classAreas = function (e) { return this.classShapes(e) + this.generateClass(G.areas, e.id) }, s.classRegion = function (e, t) { return this.generateClass(G.region, t) + ' ' + ('class' in e ? e.class : '') }, s.classEvent = function (e) { return this.generateClass(G.eventRect, e.index) }, s.classTarget = function (e) { var t = this.config.data_classes[e], t = t ? ' ' + G.target + '-' + t : ''; return this.generateClass(G.target, e) + t }, s.classFocus = function (e) { return this.classFocused(e) + this.classDefocused(e) }, s.classFocused = function (e) { return ' ' + (~this.focusedTargetIds.indexOf(e.id) ? G.focused : '') }, s.classDefocused = function (e) { return ' ' + (~this.defocusedTargetIds.indexOf(e.id) ? G.defocused : '') }, s.classChartText = function (e) { return G.chartText + this.classTarget(e.id) }, s.classChartLine = function (e) { return G.chartLine + this.classTarget(e.id) }, s.classChartBar = function (e) { return G.chartBar + this.classTarget(e.id) }, s.classChartArc = function (e) { return G.chartArc + this.classTarget(e.data.id) }, s.getTargetSelectorSuffix = function (e) { return e || 0 === e ? ('-' + e).replace(/[\s?!@#$%^&*()_=+,.<>'":;\[\]\/|~`{}\\]/g, '-') : '' }, s.selectorTarget = function (e, t) { return (t || '') + '.' + G.target + this.getTargetSelectorSuffix(e) }, s.selectorTargets = function (e, t) { var n = this; return (e = e || [ ]).length ? e.map(function (e) { return n.selectorTarget(e, t) }) : null }, s.selectorLegend = function (e) { return '.' + G.legendItem + this.getTargetSelectorSuffix(e) }, s.selectorLegends = function (e) { var t = this; return e && e.length ? e.map(function (e) { return t.selectorLegend(e) }) : null }; var X, _ = s.isValue = function (e) { return e || 0 === e }, d = s.isFunction = function (e) { return 'function' == typeof e }, p = s.isString = function (e) { return 'string' == typeof e }, S = s.isUndefined = function (e) { return void 0 === e }, D = s.isDefined = function (e) { return void 0 !== e }, m = s.ceil10 = function (e) { return 10 * Math.ceil(e / 10) }, f = s.asHalfPixel = function (e) { return 0.5 + Math.ceil(e) }, k = s.diffDomain = function (e) { return e[1] - e[0] }, h = s.isEmpty = function (e) { return null == e || p(e) && 0 === e.length || 'object' == typeof e && 0 === Object.keys(e).length }, y = s.notEmpty = function (e) { return !s.isEmpty(e) }, U = s.getOption = function (e, t, n) { return D(e[t]) ? e[t] : n }, g = s.hasValue = function (t, n) { var i = !1; return Object.keys(t).forEach(function (e) { t[e] === n && (i = !0) }), i }, b = s.sanitise = function (e) { return 'string' == typeof e ? e.replace(//g, '>') : e }, v = s.getPathBox = function (e) { var t = e.getBoundingClientRect(), e = [ e.pathSegList.getItem(0), e.pathSegList.getItem(1) ]; return { x: e[0].x, y: Math.min(e[0].y, e[1].y), width: t.width, height: t.height } }; function x(L, R) { var I, t, F, B, G = L.scale.linear(), U = 'bottom', j = 6, V = 3, z = null, H = 0, n = !0; function q(e, t) { e.attr('transform', function (e) { return 'translate(' + Math.ceil(t(e) + H) + ', 0)' }) } function W(e, t) { e.attr('transform', function (e) { return 'translate(0,' + Math.ceil(t(e)) + ')' }) } function K(e) { e = t ? t(e) : e; return void 0 !== e ? e : '' } function $(e) { return R.withoutTransition ? e : L.transition(e) } function Y(e) { e.each(function () { var e, t, n, i, r, a = Y.g = L.select(this), o = this.__chart__ || G, s = this.__chart__ = (i = G.copy(), R.isCategory && (p = G.domain(), i.domain([p[0], p[1] - 1])), i), l = z || function (e) { var t, n, i = [ ]; if (e.ticks) return e.ticks.apply(e, F); for (n = e.domain(), t = Math.ceil(n[0]); t < n[1]; t++) i.push(t); return 0 < i.length && 0 < i[0] && i.unshift(i[0] - (i[1] - i[0])), i }(s), c = a.selectAll('.tick').data(l, s), u = c.enter().insert('g', '.domain').attr('class', 'tick').style('opacity', 0.000001), d = c.exit().remove(), p = $(c).style('opacity', 1), m = G.rangeExtent ? G.rangeExtent() : (i = G.range(), (r = i[0]) < (i = i[i.length - 1]) ? [ r, i ] : [ i, r ]), r = a.selectAll('.domain').data([0]), f = (r.enter().append('path').attr('class', 'domain'), $(r)); u.append('line'), u.append('text'); var h = u.select('line'), g = p.select('line'), _ = u.select('text'), y = p.select('text'); R.isCategory ? (H = Math.ceil((s(1) - s(0)) / 2), t = B ? 0 : H, n = B ? H : 0) : H = t = 0; var b, v, S = function (e) { if (X) return X; var i = { h: 11.5, w: 5.5 }; return e.select('text').text(K).each(function (e) { var t = this.getBoundingClientRect(), n = K(e), e = t.height, n = n ? t.width / n.length : void 0; e && n && (i.h = e, i.w = n) }).text(''), X = i }(a.select('.tick')), x = [ ], E = Math.max(j, 0) + V, C = 'left' === U || 'right' === U; function w(e, r) { var a, o, e = K(e); return '[object Array]' === Object.prototype.toString.call(e) ? e : ((!r || r <= 0) && (r = C ? 95 : R.isCategory ? Math.ceil(s(l[1]) - s(l[0])) - 12 : 110), function e(t, n) { o = void 0; for (var i = 1; i < n.length; i++) if (' ' == (n[0 | i] || '') && (o = i), a = n.substr(0, i + 1), r < S.w * a.length) return e(t.concat(n.substr(0, o || i)), n.slice(o ? o + 1 : i)); return t.concat(n) }([], e + '')) } function T(e, t) { e = 0 === t ? 'left' === U || 'right' === U ? - (S.h / 2 * (x[e.index] - 1) - 3) : '.71em' : S.h; return e }(v = (b = c.select('text')).selectAll('tspan').data(function (e, t) { e = R.tickMultiline ? w(e, R.tickWidth) : [ ].concat(K(e)); return x[t] = e.length, e.map(function (e) { return { index: t, splitted: e } }) })).enter().append('tspan'), v.exit().remove(), v.text(function (e) { return e.splitted }); var O, M, A, N, D, k, P = R.tickTextRotate; switch (U) { case 'bottom': e = q, h.attr('y2', j), _.attr('y', E), g.attr('x1', t).attr('x2', t).attr('y2', function (e) { return e = G(e) + (B ? 0 : H), m[0] < e && e < m[1] ? j : 0 }), y.attr('x', 0).attr('y', (N = P) ? 11.5 - N / 15 * 2.5 * (0 < N ? 1 : - 1) : E).style('text-anchor', (A = P) ? 0 < A ? 'start' : 'end' : 'middle').attr('transform', (M = P) ? 'rotate(' + M + ')' : ''), v.attr('x', 0).attr('dy', T).attr('dx', (O = P) ? 8 * Math.sin(Math.PI * (O / 180)) : 0), f.attr('d', 'M' + m[0] + ',' + I + 'V0H' + m[1] + 'V' + I); break; case 'top': e = q, h.attr('y2', - j), _.attr('y', - E), g.attr('x2', 0).attr('y2', - j), y.attr('x', 0).attr('y', - E), b.style('text-anchor', 'middle'), v.attr('x', 0).attr('dy', '0em'), f.attr('d', 'M' + m[0] + ',' + - I + 'V0H' + m[1] + 'V' + - I); break; case 'left': e = W, h.attr('x2', - j), _.attr('x', - E), g.attr('x2', - j).attr('y1', n).attr('y2', n), y.attr('x', - E).attr('y', H), b.style('text-anchor', 'end'), v.attr('x', - E).attr('dy', T), f.attr('d', 'M' + - I + ',' + m[0] + 'H0V' + m[1] + 'H' + - I); break; case 'right': e = W, h.attr('x2', j), _.attr('x', E), g.attr('x2', j).attr('y2', 0), y.attr('x', E).attr('y', 0), b.style('text-anchor', 'start'), v.attr('x', E).attr('dy', T), f.attr('d', 'M' + I + ',' + m[0] + 'H0V' + m[1] + 'H' + I) } s.rangeBand ? (k = (D = s).rangeBand() / 2, o = s = function (e) { return D(e) + k }) : o.rangeBand ? o = s : d.call(e, s), u.call(e, o), p.call(e, s) }) } return I = (R = R || { }).withOuterTick ? 6 : 0, Y.scale = function (e) { return arguments.length ? (G = e, Y) : G }, Y.orient = function (e) { return arguments.length ? (U = e in { top: 1, right: 1, bottom: 1, left: 1 } ? e + '' : 'bottom', Y) : U }, Y.tickFormat = function (e) { return arguments.length ? (t = e, Y) : t }, Y.tickCentered = function (e) { return arguments.length ? (B = e, Y) : B }, Y.tickOffset = function () { return H }, Y.tickInterval = function () { var e = R.isCategory ? 2 * H : (Y.g.select('path.domain').node().getTotalLength() - 2 * I) / Y.g.selectAll('line').size(); return e === 1 / 0 ? 0 : e }, Y.ticks = function () { return arguments.length ? (F = arguments, Y) : F }, Y.tickCulling = function (e) { return arguments.length ? (n = e, Y) : n }, Y.tickValues = function (e) { if ('function' == typeof e) z = function () { return e(G.domain()) }; else { if (!arguments.length) return z; z = e } return Y }, Y } i.focus = function (t) { var e, n = this.internal; t = n.mapToTargetIds(t), e = n.svg.selectAll(n.selectorTargets(t.filter(n.isTargetToShow, n))), this.revert(), this.defocus(), e.classed(G.focused, !0).classed(G.defocused, !1), n.hasArcType() && n.expandArc(t), n.toggleFocusLegend(t, !0), n.focusedTargetIds = t, n.defocusedTargetIds = n.defocusedTargetIds.filter(function (e) { return !~t.indexOf(e) }) }, i.defocus = function (t) { var e = this.internal; t = e.mapToTargetIds(t), e.svg.selectAll(e.selectorTargets(t.filter(e.isTargetToShow, e))).classed(G.focused, !1).classed(G.defocused, !0), e.hasArcType() && e.unexpandArc(t), e.toggleFocusLegend(t, !1), e.focusedTargetIds = e.focusedTargetIds.filter(function (e) { return !~t.indexOf(e) }), e.defocusedTargetIds = t }, i.revert = function (e) { var t = this.internal; e = t.mapToTargetIds(e), t.svg.selectAll(t.selectorTargets(e)).classed(G.focused, !1).classed(G.defocused, !1), t.hasArcType() && t.unexpandArc(e), t.config.legend_show && (t.showLegend(e.filter(t.isLegendToShow.bind(t))), t.legend.selectAll(t.selectorLegends(e)).filter(function () { return t.d3.select(this).classed(G.legendItemFocused) }).classed(G.legendItemFocused, !1)), t.focusedTargetIds = [ ], t.defocusedTargetIds = [ ] }, i.show = function (e, t) { var n, i = this.internal; e = i.mapToTargetIds(e), t = t || { }, i.removeHiddenTargetIds(e), (n = i.svg.selectAll(i.selectorTargets(e))).transition().style('opacity', 1, 'important').call(i.endall, function () { n.style('opacity', null).style('opacity', 1) }), t.withLegend && i.showLegend(e), i.redraw({ withUpdateOrgXDomain: !0, withUpdateXDomain: !0, withLegend: !0 }) }, i.hide = function (e, t) { var n, i = this.internal; e = i.mapToTargetIds(e), t = t || { }, i.addHiddenTargetIds(e), (n = i.svg.selectAll(i.selectorTargets(e))).transition().style('opacity', 0, 'important').call(i.endall, function () { n.style('opacity', null).style('opacity', 0) }), t.withLegend && i.hideLegend(e), i.redraw({ withUpdateOrgXDomain: !0, withUpdateXDomain: !0, withLegend: !0 }) }, i.toggle = function (e, t) { var n = this, i = this.internal; i.mapToTargetIds(e).forEach(function (e) { i.isTargetToShow(e) ? n.hide(e, t) : n.show(e, t) }) }, i.zoom = function (e) { var t = this.internal; return e && (t.isTimeSeries() && (e = e.map(function (e) { return t.parseDate(e) })), t.brush.extent(e), t.redraw({ withUpdateXDomain: !0, withY: t.config.zoom_rescale }), t.config.zoom_onzoom.call(this, t.x.orgDomain())), t.brush.extent() }, i.zoom.enable = function (e) { var t = this.internal; t.config.zoom_enabled = e, t.updateAndRedraw() }, i.unzoom = function () { var e = this.internal; e.brush.clear().update(), e.redraw({ withUpdateXDomain: !0 }) }, i.zoom.max = function (e) { var t = this.internal, n = t.config; if (0 !== e && !e) return n.zoom_x_max; n.zoom_x_max = t.d3.max([t.orgXDomain[1], e]) }, i.zoom.min = function (e) { var t = this.internal, n = t.config; if (0 !== e && !e) return n.zoom_x_min; n.zoom_x_min = t.d3.min([t.orgXDomain[0], e]) }, i.zoom.range = function (e) { if (!arguments.length) return { max: this.domain.max(), min: this.domain.min() }; D(e.max) && this.domain.max(e.max), D(e.min) && this.domain.min(e.min) }, i.load = function (t) { var e = this.internal, n = e.config; t.xs && e.addXs(t.xs), 'names' in t && i.data.names.bind(this) (t.names), 'classes' in t && Object.keys(t.classes).forEach(function (e) { n.data_classes[e] = t.classes[e] }), 'categories' in t && e.isCategorized() && (n.axis_x_categories = t.categories), 'axes' in t && Object.keys(t.axes).forEach(function (e) { n.data_axes[e] = t.axes[e] }), 'colors' in t && Object.keys(t.colors).forEach(function (e) { n.data_colors[e] = t.colors[e] }), 'cacheIds' in t && e.hasCaches(t.cacheIds) ? e.load(e.getCaches(t.cacheIds), t.done) : 'unload' in t ? e.unload(e.mapToTargetIds('boolean' == typeof t.unload && t.unload ? null : t.unload), function () { e.loadFromArgs(t) }) : e.loadFromArgs(t) }, i.unload = function (e) { var t = this.internal; (e = e || { }) instanceof Array ? e = { ids: e } : 'string' == typeof e && (e = { ids: [ e ] }), t.unload(t.mapToTargetIds(e.ids), function () { t.redraw({ withUpdateOrgXDomain: !0, withUpdateXDomain: !0, withLegend: !0 }), e.done && e.done() }) }, i.flow = function (e) { var r, t, n, i, a, o, s = this.internal, l = [ ], c = s.getMaxDataCount(), u = 0, d = 0; if (e.json) i = s.convertJsonToData(e.json, e.keys); else if (e.rows) i = s.convertRowsToData(e.rows); else { if (!e.columns) return; i = s.convertColumnsToData(e.columns) } r = s.convertDataToTargets(i, !0), s.data.targets.forEach(function (e) { for (var t, n = !1, i = 0; i < r.length; i++) if (e.id === r[i].id) { for (n = !0, e.values[e.values.length - 1] && (d = e.values[e.values.length - 1].index + 1), u = r[i].values.length, t = 0; t < u; t++) r[i].values[t].index = d + t, s.isTimeSeries() || (r[i].values[t].x = d + t); e.values = e.values.concat(r[i].values), r.splice(i, 1); break } n || l.push(e.id) }), s.data.targets.forEach(function (e) { for (var t, n = 0; n < l.length; n++) if (e.id === l[n]) for (d = e.values[e.values.length - 1].index + 1, t = 0; t < u; t++) e.values.push({ id: e.id, index: d + t, x: s.isTimeSeries() ? s.getOtherTargetX(d + t) : d + t, value: null }) }), s.data.targets.length && r.forEach(function (e) { for (var t = [ ], n = s.data.targets[0].values[0].index; n < d; n++) t.push({ id: e.id, index: n, x: s.isTimeSeries() ? s.getOtherTargetX(n) : n, value: null }); e.values.forEach(function (e) { e.index += d, s.isTimeSeries() || (e.x += d) }), e.values = t.concat(e.values) }), s.data.targets = s.data.targets.concat(r), s.getMaxDataCount(), i = (n = s.data.targets[0]).values[0], D(e.to) ? (u = 0, o = s.isTimeSeries() ? s.parseDate(e.to) : e.to, n.values.forEach(function (e) { e.x < o && u++ })) : D(e.length) && (u = e.length), c ? 1 === c && s.isTimeSeries() && s.updateXDomain(null, !0, !0, !(t = [ new Date( + i.x - (a = (n.values[n.values.length - 1].x - i.x) / 2)), new Date( + i.x + a) ]), t) : (a = s.isTimeSeries() ? 1 < n.values.length ? n.values[n.values.length - 1].x - i.x : i.x - s.getXDomain(s.data.targets) [0] : 1, s.updateXDomain(null, !0, !0, !(t = [ i.x - a, i.x ]), t)), s.updateTargets(s.data.targets), s.redraw({ flow: { index: i.index, length: u, duration: _(e.duration) ? e.duration : s.config.transition_duration, done: e.done, orgDataCount: c }, withLegend: !0, withTransition: 1 < c, withTrimXDomain: !1, withUpdateXAxis: !0 }) }, s.generateFlow = function (M) { var A = this, N = A.config, D = A.d3; return function () { var e, t, n = M.targets, i = M.flow, r = M.drawBar, a = M.drawLine, o = M.drawArea, s = M.cx, l = M.cy, c = M.xv, u = M.xForText, d = M.yForText, p = M.duration, m = i.index, f = i.length, h = A.getValueOnIndex(A.data.targets[0].values, m), g = A.getValueOnIndex(A.data.targets[0].values, m + f), _ = A.x.domain(), p = i.duration || p, y = i.done || function () { }, b = A.generateWait(), v = A.xgrid || D.selectAll([]), S = A.xgridLines || D.selectAll([]), x = A.mainRegion || D.selectAll([]), E = A.mainText || D.selectAll([]), C = A.mainBar || D.selectAll([]), w = A.mainLine || D.selectAll([]), T = A.mainArea || D.selectAll([]), O = A.mainCircle || D.selectAll([]); A.flowing = !0, A.data.targets.forEach(function (e) { e.values.splice(0, f) }), n = A.updateXDomain(n, !0, !0), A.updateXGrid && A.updateXGrid(!0), g = i.orgDataCount ? 1 === i.orgDataCount || (h && h.x) === (g && g.x) || A.isTimeSeries() ? A.x(_[0]) - A.x(n[0]) : A.x(h.x) - A.x(g.x) : 1 !== A.data.targets[0].values.length ? A.x(_[0]) - A.x(n[0]) : A.isTimeSeries() ? (h = A.getValueOnIndex(A.data.targets[0].values, 0), g = A.getValueOnIndex(A.data.targets[0].values, A.data.targets[0].values.length - 1), A.x(h.x) - A.x(g.x)) : k(n) / 2, e = k(_) / k(n), t = 'translate(' + g + ',0) scale(' + e + ',1)', A.hideXGridFocus(), D.transition().ease('linear').duration(p).each(function () { b.add(A.axes.x.transition().call(A.xAxis)), b.add(C.transition().attr('transform', t)), b.add(w.transition().attr('transform', t)), b.add(T.transition().attr('transform', t)), b.add(O.transition().attr('transform', t)), b.add(E.transition().attr('transform', t)), b.add(x.filter(A.isRegionOnX).transition().attr('transform', t)), b.add(v.transition().attr('transform', t)), b.add(S.transition().attr('transform', t)) }).call(b, function () { var e, t = [ ], n = [ ], i = [ ]; if (f) { for (e = 0; e < f; e++) t.push('.' + G.shape + '-' + (m + e)), n.push('.' + G.text + '-' + (m + e)), i.push('.' + G.eventRect + '-' + (m + e)); A.svg.selectAll('.' + G.shapes).selectAll(t).remove(), A.svg.selectAll('.' + G.texts).selectAll(n).remove(), A.svg.selectAll('.' + G.eventRects).selectAll(i).remove(), A.svg.select('.' + G.xgrid).remove() } v.attr('transform', null).attr(A.xgridAttr), S.attr('transform', null), S.select('line').attr('x1', N.axis_rotated ? 0 : c).attr('x2', N.axis_rotated ? A.width : c), S.select('text').attr('x', N.axis_rotated ? A.width : 0).attr('y', c), C.attr('transform', null).attr('d', r), w.attr('transform', null).attr('d', a), T.attr('transform', null).attr('d', o), O.attr('transform', null).attr('cx', s).attr('cy', l), E.attr('transform', null).attr('x', u).attr('y', d).style('fill-opacity', A.opacityForText.bind(A)), x.attr('transform', null), x.select('rect').filter(A.isRegionOnX).attr('x', A.regionX.bind(A)).attr('width', A.regionWidth.bind(A)), N.interaction_enabled && A.redrawEventRect(), y(), A.flowing = !1 }) } }, i.selected = function (e) { var t = this.internal, n = t.d3; return n.merge(t.main.selectAll('.' + G.shapes + t.getTargetSelectorSuffix(e)).selectAll('.' + G.shape).filter(function () { return n.select(this).classed(G.SELECTED) }).map(function (e) { return e.map(function (e) { e = e.__data__; return e.data || e }) })) }, i.select = function (s, l, c) { var u = this.internal, d = u.d3, p = u.config; p.data_selection_enabled && u.main.selectAll('.' + G.shapes).selectAll('.' + G.shape).each(function (e, t) { var n = d.select(this), i = (e.data || e).id, r = u.getToggle(this, e).bind(u), a = p.data_selection_grouped || !s || !!~s.indexOf(i), o = !l || !!~l.indexOf(t), i = n.classed(G.SELECTED); n.classed(G.line) || n.classed(G.area) || (a && o ? p.data_selection_isselectable(e) && !i && r(!0, n.classed(G.SELECTED, !0), e, t) : D(c) && c && i && r(!1, n.classed(G.SELECTED, !1), e, t)) }) }, i.unselect = function (s, l) { var c = this.internal, u = c.d3, d = c.config; d.data_selection_enabled && c.main.selectAll('.' + G.shapes).selectAll('.' + G.shape).each(function (e, t) { var n = u.select(this), i = (e.data || e).id, r = c.getToggle(this, e).bind(c), a = d.data_selection_grouped || !s || !!~s.indexOf(i), o = !l || !!~l.indexOf(t), i = n.classed(G.SELECTED); n.classed(G.line) || n.classed(G.area) || a && o && d.data_selection_isselectable(e) && i && r(!1, n.classed(G.SELECTED, !1), e, t) }) }, i.transform = function (e, t) { this.internal.transformTo(t, e, ~['pie', 'donut'].indexOf(e) ? { withTransform: !0 } : null) }, s.transformTo = function (e, t, n) { var i = this, r = !i.hasArcType(), r = n || { withTransitionForAxis: r }; i.transiting = r.withTransitionForTransform = !1, i.setTargetType(e, t), i.updateTargets(i.data.targets), i.updateAndRedraw(r) }, i.groups = function (e) { var t = this.internal, n = t.config; return S(e) || (n.data_groups = e, t.redraw()), n.data_groups }, i.xgrids = function (e) { var t = this.internal, n = t.config; return e && (n.grid_x_lines = e, t.redrawWithoutRescale()), n.grid_x_lines }, i.xgrids.add = function (e) { return this.xgrids(this.internal.config.grid_x_lines.concat(e || [ ])) }, i.xgrids.remove = function (e) { this.internal.removeGridLines(e, !0) }, i.ygrids = function (e) { var t = this.internal, n = t.config; return e && (n.grid_y_lines = e, t.redrawWithoutRescale()), n.grid_y_lines }, i.ygrids.add = function (e) { return this.ygrids(this.internal.config.grid_y_lines.concat(e || [ ])) }, i.ygrids.remove = function (e) { this.internal.removeGridLines(e, !1) }, i.regions = function (e) { var t = this.internal, n = t.config; return e && (n.regions = e, t.redrawWithoutRescale()), n.regions }, i.regions.add = function (e) { var t = this.internal, n = t.config; return e && (n.regions = n.regions.concat(e), t.redrawWithoutRescale()), n.regions }, i.regions.remove = function (e) { var t = this.internal, n = t.config, i = t.getOption(e = e || { }, 'duration', n.transition_duration), r = t.getOption(e, 'classes', [ G.region ]), t = t.main.select('.' + G.regions).selectAll(r.map(function (e) { return '.' + e })); return (i ? t.transition().duration(i) : t).style('opacity', 0).remove(), n.regions = n.regions.filter(function (e) { var t = !1; return !e.class || (e.class.split(' ').forEach(function (e) { ~r.indexOf(e) && (t = !0) }), !t) }), n.regions }, i.data = function (t) { var e = this.internal.data.targets; return void 0 === t ? e : e.filter(function (e) { return !!~[].concat(t).indexOf(e.id) }) }, i.data.shown = function (e) { return this.internal.filterTargetsToShow(this.data(e)) }, i.data.values = function (e) { var t = null; return t = e ? (e = this.data(e)) [0] ? e[0].values.map(function (e) { return e.value }) : null : t }, i.data.names = function (e) { return this.internal.clearLegendItemTextBoxCache(), this.internal.updateDataAttributes('names', e) }, i.data.colors = function (e) { return this.internal.updateDataAttributes('colors', e) }, i.data.axes = function (e) { return this.internal.updateDataAttributes('axes', e) }, i.category = function (e, t) { var n = this.internal, i = n.config; return 1 < arguments.length && (i.axis_x_categories[e] = t, n.redraw()), i.axis_x_categories[e] }, i.categories = function (e) { var t = this.internal, n = t.config; return arguments.length && (n.axis_x_categories = e, t.redraw()), n.axis_x_categories }, i.color = function (e) { return this.internal.color(e) }, i.x = function (e) { var t = this.internal; return arguments.length && (t.updateTargetX(t.data.targets, e), t.redraw({ withUpdateOrgXDomain: !0, withUpdateXDomain: !0 })), t.data.xs }, i.xs = function (e) { var t = this.internal; return arguments.length && (t.updateTargetXs(t.data.targets, e), t.redraw({ withUpdateOrgXDomain: !0, withUpdateXDomain: !0 })), t.data.xs }, i.axis = function () { }, i.axis.labels = function (t) { var n = this.internal; arguments.length && (Object.keys(t).forEach(function (e) { n.axis.setLabelText(e, t[e]) }), n.axis.updateLabels()) }, i.axis.max = function (e) { var t = this.internal, n = t.config; if (!arguments.length) return { x: n.axis_x_max, y: n.axis_y_max, y2: n.axis_y2_max }; 'object' == typeof e ? (_(e.x) && (n.axis_x_max = e.x), _(e.y) && (n.axis_y_max = e.y), _(e.y2) && (n.axis_y2_max = e.y2)) : n.axis_y_max = n.axis_y2_max = e, t.redraw({ withUpdateOrgXDomain: !0, withUpdateXDomain: !0 }) }, i.axis.min = function (e) { var t = this.internal, n = t.config; if (!arguments.length) return { x: n.axis_x_min, y: n.axis_y_min, y2: n.axis_y2_min }; 'object' == typeof e ? (_(e.x) && (n.axis_x_min = e.x), _(e.y) && (n.axis_y_min = e.y), _(e.y2) && (n.axis_y2_min = e.y2)) : n.axis_y_min = n.axis_y2_min = e, t.redraw({ withUpdateOrgXDomain: !0, withUpdateXDomain: !0 }) }, i.axis.range = function (e) { if (!arguments.length) return { max: this.axis.max(), min: this.axis.min() }; D(e.max) && this.axis.max(e.max), D(e.min) && this.axis.min(e.min) }, i.legend = function () { }, i.legend.show = function (e) { var t = this.internal; t.showLegend(t.mapToTargetIds(e)), t.updateAndRedraw({ withLegend: !0 }) }, i.legend.hide = function (e) { var t = this.internal; t.hideLegend(t.mapToTargetIds(e)), t.updateAndRedraw({ withLegend: !0 }) }, i.resize = function (e) { var t = this.internal.config; t.size_width = e ? e.width : null, t.size_height = e ? e.height : null, this.flush() }, i.flush = function () { this.internal.updateAndRedraw({ withLegend: !0, withTransition: !1, withTransitionForTransform: !1 }) }, i.destroy = function () { var e, t = this.internal; return a.clearInterval(t.intervalForObserveInserted), void 0 !== t.resizeTimeout && a.clearTimeout(t.resizeTimeout), a.detachEvent ? a.detachEvent('onresize', t.resizeFunction) : a.removeEventListener ? a.removeEventListener('resize', t.resizeFunction) : (e = a.onresize) && e.add && e.remove && e.remove(t.resizeFunction), t.selectChart.classed('c3', !1).html(''), Object.keys(t).forEach(function (e) { t[e] = null }), null }, i.tooltip = function () { }, i.tooltip.show = function (e) { var t, n, i = this.internal; e.mouse && (n = e.mouse), e.data ? t = i.isMultipleX() ? (n = [ i.x(e.data.x), i.getYScale(e.data.id) (e.data.value) ], null) : _(e.data.index) ? e.data.index : i.getIndexByX(e.data.x) : void 0 !== e.x ? t = i.getIndexByX(e.x) : void 0 !== e.index && (t = e.index), i.dispatchEvent('mouseover', t, n), i.dispatchEvent('mousemove', t, n), i.config.tooltip_onshow.call(i, e.data) }, i.tooltip.hide = function () { this.internal.dispatchEvent('mouseout', 0), this.internal.config.tooltip_onhide.call(this) }, s.isSafari = function () { var e = a.navigator.userAgent; return !!~e.indexOf('Safari') && !~e.indexOf('Chrome') }, s.isChrome = function () { return !!~a.navigator.userAgent.indexOf('Chrome') }, Function.prototype.bind || (Function.prototype.bind = function (e) { if ('function' != typeof this) throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable'); function t() { } function n() { return r.apply(this instanceof t ? this : e, i.concat(Array.prototype.slice.call(arguments))) } var i = Array.prototype.slice.call(arguments, 1), r = this; return t.prototype = this.prototype, n.prototype = new t, n }), 'SVGPathSeg' in a || (a.SVGPathSeg = function (e, t, n) { this.pathSegType = e, this.pathSegTypeAsLetter = t, this._owningPathSegList = n }, SVGPathSeg.PATHSEG_UNKNOWN = 0, SVGPathSeg.PATHSEG_CLOSEPATH = 1, SVGPathSeg.PATHSEG_MOVETO_ABS = 2, SVGPathSeg.PATHSEG_MOVETO_REL = 3, SVGPathSeg.PATHSEG_LINETO_ABS = 4, SVGPathSeg.PATHSEG_LINETO_REL = 5, SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS = 6, SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL = 7, SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS = 8, SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL = 9, SVGPathSeg.PATHSEG_ARC_ABS = 10, SVGPathSeg.PATHSEG_ARC_REL = 11, SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS = 12, SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL = 13, SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS = 14, SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL = 15, SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS = 16, SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL = 17, SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS = 18, SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL = 19, SVGPathSeg.prototype._segmentChanged = function () { this._owningPathSegList && this._owningPathSegList.segmentChanged(this) }, a.SVGPathSegClosePath = function (e) { SVGPathSeg.call(this, SVGPathSeg.PATHSEG_CLOSEPATH, 'z', e) }, SVGPathSegClosePath.prototype = Object.create(SVGPathSeg.prototype), SVGPathSegClosePath.prototype.toString = function () { return '[object SVGPathSegClosePath]' }, SVGPathSegClosePath.prototype._asPathString = function () { return this.pathSegTypeAsLetter }, SVGPathSegClosePath.prototype.clone = function () { return new SVGPathSegClosePath(void 0) }, a.SVGPathSegMovetoAbs = function (e, t, n) { SVGPathSeg.call(this, SVGPathSeg.PATHSEG_MOVETO_ABS, 'M', e), this._x = t, this._y = n }, SVGPathSegMovetoAbs.prototype = Object.create(SVGPathSeg.prototype), SVGPathSegMovetoAbs.prototype.toString = function () { return '[object SVGPathSegMovetoAbs]' }, SVGPathSegMovetoAbs.prototype._asPathString = function () { return this.pathSegTypeAsLetter + ' ' + this._x + ' ' + this._y }, SVGPathSegMovetoAbs.prototype.clone = function () { return new SVGPathSegMovetoAbs(void 0, this._x, this._y) }, Object.defineProperty(SVGPathSegMovetoAbs.prototype, 'x', { get: function () { return this._x }, set: function (e) { this._x = e, this._segmentChanged() }, enumerable: !0 }), Object.defineProperty(SVGPathSegMovetoAbs.prototype, 'y', { get: function () { return this._y }, set: function (e) { this._y = e, this._segmentChanged() }, enumerable: !0 }), a.SVGPathSegMovetoRel = function (e, t, n) { SVGPathSeg.call(this, SVGPathSeg.PATHSEG_MOVETO_REL, 'm', e), this._x = t, this._y = n }, SVGPathSegMovetoRel.prototype = Object.create(SVGPathSeg.prototype), SVGPathSegMovetoRel.prototype.toString = function () { return '[object SVGPathSegMovetoRel]' }, SVGPathSegMovetoRel.prototype._asPathString = function () { return this.pathSegTypeAsLetter + ' ' + this._x + ' ' + this._y }, SVGPathSegMovetoRel.prototype.clone = function () { return new SVGPathSegMovetoRel(void 0, this._x, this._y) }, Object.defineProperty(SVGPathSegMovetoRel.prototype, 'x', { get: function () { return this._x }, set: function (e) { this._x = e, this._segmentChanged() }, enumerable: !0 }), Object.defineProperty(SVGPathSegMovetoRel.prototype, 'y', { get: function () { return this._y }, set: function (e) { this._y = e, this._segmentChanged() }, enumerable: !0 }), a.SVGPathSegLinetoAbs = function (e, t, n) { SVGPathSeg.call(this, SVGPathSeg.PATHSEG_LINETO_ABS, 'L', e), this._x = t, this._y = n }, SVGPathSegLinetoAbs.prototype = Object.create(SVGPathSeg.prototype), SVGPathSegLinetoAbs.prototype.toString = function () { return '[object SVGPathSegLinetoAbs]' }, SVGPathSegLinetoAbs.prototype._asPathString = function () { return this.pathSegTypeAsLetter + ' ' + this._x + ' ' + this._y }, SVGPathSegLinetoAbs.prototype.clone = function () { return new SVGPathSegLinetoAbs(void 0, this._x, this._y) }, Object.defineProperty(SVGPathSegLinetoAbs.prototype, 'x', { get: function () { return this._x }, set: function (e) { this._x = e, this._segmentChanged() }, enumerable: !0 }), Object.defineProperty(SVGPathSegLinetoAbs.prototype, 'y', { get: function () { return this._y }, set: function (e) { this._y = e, this._segmentChanged() }, enumerable: !0 }), a.SVGPathSegLinetoRel = function (e, t, n) { SVGPathSeg.call(this, SVGPathSeg.PATHSEG_LINETO_REL, 'l', e), this._x = t, this._y = n }, SVGPathSegLinetoRel.prototype = Object.create(SVGPathSeg.prototype), SVGPathSegLinetoRel.prototype.toString = function () { return '[object SVGPathSegLinetoRel]' }, SVGPathSegLinetoRel.prototype._asPathString = function () { return this.pathSegTypeAsLetter + ' ' + this._x + ' ' + this._y }, SVGPathSegLinetoRel.prototype.clone = function () { return new SVGPathSegLinetoRel(void 0, this._x, this._y) }, Object.defineProperty(SVGPathSegLinetoRel.prototype, 'x', { get: function () { return this._x }, set: function (e) { this._x = e, this._segmentChanged() }, enumerable: !0 }), Object.defineProperty(SVGPathSegLinetoRel.prototype, 'y', { get: function () { return this._y }, set: function (e) { this._y = e, this._segmentChanged() }, enumerable: !0 }), a.SVGPathSegCurvetoCubicAbs = function (e, t, n, i, r, a, o) { SVGPathSeg.call(this, SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS, 'C', e), this._x = t, this._y = n, this._x1 = i, this._y1 = r, this._x2 = a, this._y2 = o }, SVGPathSegCurvetoCubicAbs.prototype = Object.create(SVGPathSeg.prototype), SVGPathSegCurvetoCubicAbs.prototype.toString = function () { return '[object SVGPathSegCurvetoCubicAbs]' }, SVGPathSegCurvetoCubicAbs.prototype._asPathString = function () { return this.pathSegTypeAsLetter + ' ' + this._x1 + ' ' + this._y1 + ' ' + this._x2 + ' ' + this._y2 + ' ' + this._x + ' ' + this._y }, SVGPathSegCurvetoCubicAbs.prototype.clone = function () { return new SVGPathSegCurvetoCubicAbs(void 0, this._x, this._y, this._x1, this._y1, this._x2, this._y2) }, Object.defineProperty(SVGPathSegCurvetoCubicAbs.prototype, 'x', { get: function () { return this._x }, set: function (e) { this._x = e, this._segmentChanged() }, enumerable: !0 }), Object.defineProperty(SVGPathSegCurvetoCubicAbs.prototype, 'y', { get: function () { return this._y }, set: function (e) { this._y = e, this._segmentChanged() }, enumerable: !0 }), Object.defineProperty(SVGPathSegCurvetoCubicAbs.prototype, 'x1', { get: function () { return this._x1 }, set: function (e) { this._x1 = e, this._segmentChanged() }, enumerable: !0 }), Object.defineProperty(SVGPathSegCurvetoCubicAbs.prototype, 'y1', { get: function () { return this._y1 }, set: function (e) { this._y1 = e, this._segmentChanged() }, enumerable: !0 }), Object.defineProperty(SVGPathSegCurvetoCubicAbs.prototype, 'x2', { get: function () { return this._x2 }, set: function (e) { this._x2 = e, this._segmentChanged() }, enumerable: !0 }), Object.defineProperty(SVGPathSegCurvetoCubicAbs.prototype, 'y2', { get: function () { return this._y2 }, set: function (e) { this._y2 = e, this._segmentChanged() }, enumerable: !0 }), a.SVGPathSegCurvetoCubicRel = function (e, t, n, i, r, a, o) { SVGPathSeg.call(this, SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL, 'c', e), this._x = t, this._y = n, this._x1 = i, this._y1 = r, this._x2 = a, this._y2 = o }, SVGPathSegCurvetoCubicRel.prototype = Object.create(SVGPathSeg.prototype), SVGPathSegCurvetoCubicRel.prototype.toString = function () { return '[object SVGPathSegCurvetoCubicRel]' }, SVGPathSegCurvetoCubicRel.prototype._asPathString = function () { return this.pathSegTypeAsLetter + ' ' + this._x1 + ' ' + this._y1 + ' ' + this._x2 + ' ' + this._y2 + ' ' + this._x + ' ' + this._y }, SVGPathSegCurvetoCubicRel.prototype.clone = function () { return new SVGPathSegCurvetoCubicRel(void 0, this._x, this._y, this._x1, this._y1, this._x2, this._y2) }, Object.defineProperty(SVGPathSegCurvetoCubicRel.prototype, 'x', { get: function () { return this._x }, set: function (e) { this._x = e, this._segmentChanged() }, enumerable: !0 }), Object.defineProperty(SVGPathSegCurvetoCubicRel.prototype, 'y', { get: function () { return this._y }, set: function (e) { this._y = e, this._segmentChanged() }, enumerable: !0 }), Object.defineProperty(SVGPathSegCurvetoCubicRel.prototype, 'x1', { get: function () { return this._x1 }, set: function (e) { this._x1 = e, this._segmentChanged() }, enumerable: !0 }), Object.defineProperty(SVGPathSegCurvetoCubicRel.prototype, 'y1', { get: function () { return this._y1 }, set: function (e) { this._y1 = e, this._segmentChanged() }, enumerable: !0 }), Object.defineProperty(SVGPathSegCurvetoCubicRel.prototype, 'x2', { get: function () { return this._x2 }, set: function (e) { this._x2 = e, this._segmentChanged() }, enumerable: !0 }), Object.defineProperty(SVGPathSegCurvetoCubicRel.prototype, 'y2', { get: function () { return this._y2 }, set: function (e) { this._y2 = e, this._segmentChanged() }, enumerable: !0 }), a.SVGPathSegCurvetoQuadraticAbs = function (e, t, n, i, r) { SVGPathSeg.call(this, SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS, 'Q', e), this._x = t, this._y = n, this._x1 = i, this._y1 = r }, SVGPathSegCurvetoQuadraticAbs.prototype = Object.create(SVGPathSeg.prototype), SVGPathSegCurvetoQuadraticAbs.prototype.toString = function () { return '[object SVGPathSegCurvetoQuadraticAbs]' }, SVGPathSegCurvetoQuadraticAbs.prototype._asPathString = function () { return this.pathSegTypeAsLetter + ' ' + this._x1 + ' ' + this._y1 + ' ' + this._x + ' ' + this._y }, SVGPathSegCurvetoQuadraticAbs.prototype.clone = function () { return new SVGPathSegCurvetoQuadraticAbs(void 0, this._x, this._y, this._x1, this._y1) }, Object.defineProperty(SVGPathSegCurvetoQuadraticAbs.prototype, 'x', { get: function () { return this._x }, set: function (e) { this._x = e, this._segmentChanged() }, enumerable: !0 }), Object.defineProperty(SVGPathSegCurvetoQuadraticAbs.prototype, 'y', { get: function () { return this._y }, set: function (e) { this._y = e, this._segmentChanged() }, enumerable: !0 }), Object.defineProperty(SVGPathSegCurvetoQuadraticAbs.prototype, 'x1', { get: function () { return this._x1 }, set: function (e) { this._x1 = e, this._segmentChanged() }, enumerable: !0 }), Object.defineProperty(SVGPathSegCurvetoQuadraticAbs.prototype, 'y1', { get: function () { return this._y1 }, set: function (e) { this._y1 = e, this._segmentChanged() }, enumerable: !0 }), a.SVGPathSegCurvetoQuadraticRel = function (e, t, n, i, r) { SVGPathSeg.call(this, SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL, 'q', e), this._x = t, this._y = n, this._x1 = i, this._y1 = r }, SVGPathSegCurvetoQuadraticRel.prototype = Object.create(SVGPathSeg.prototype), SVGPathSegCurvetoQuadraticRel.prototype.toString = function () { return '[object SVGPathSegCurvetoQuadraticRel]' }, SVGPathSegCurvetoQuadraticRel.prototype._asPathString = function () { return this.pathSegTypeAsLetter + ' ' + this._x1 + ' ' + this._y1 + ' ' + this._x + ' ' + this._y }, SVGPathSegCurvetoQuadraticRel.prototype.clone = function () { return new SVGPathSegCurvetoQuadraticRel(void 0, this._x, this._y, this._x1, this._y1) }, Object.defineProperty(SVGPathSegCurvetoQuadraticRel.prototype, 'x', { get: function () { return this._x }, set: function (e) { this._x = e, this._segmentChanged() }, enumerable: !0 }), Object.defineProperty(SVGPathSegCurvetoQuadraticRel.prototype, 'y', { get: function () { return this._y }, set: function (e) { this._y = e, this._segmentChanged() }, enumerable: !0 }), Object.defineProperty(SVGPathSegCurvetoQuadraticRel.prototype, 'x1', { get: function () { return this._x1 }, set: function (e) { this._x1 = e, this._segmentChanged() }, enumerable: !0 }), Object.defineProperty(SVGPathSegCurvetoQuadraticRel.prototype, 'y1', { get: function () { return this._y1 }, set: function (e) { this._y1 = e, this._segmentChanged() }, enumerable: !0 }), a.SVGPathSegArcAbs = function (e, t, n, i, r, a, o, s) { SVGPathSeg.call(this, SVGPathSeg.PATHSEG_ARC_ABS, 'A', e), this._x = t, this._y = n, this._r1 = i, this._r2 = r, this._angle = a, this._largeArcFlag = o, this._sweepFlag = s }, SVGPathSegArcAbs.prototype = Object.create(SVGPathSeg.prototype), SVGPathSegArcAbs.prototype.toString = function () { return '[object SVGPathSegArcAbs]' }, SVGPathSegArcAbs.prototype._asPathString = function () { return this.pathSegTypeAsLetter + ' ' + this._r1 + ' ' + this._r2 + ' ' + this._angle + ' ' + (this._largeArcFlag ? '1' : '0') + ' ' + (this._sweepFlag ? '1' : '0') + ' ' + this._x + ' ' + this._y }, SVGPathSegArcAbs.prototype.clone = function () { return new SVGPathSegArcAbs(void 0, this._x, this._y, this._r1, this._r2, this._angle, this._largeArcFlag, this._sweepFlag) }, Object.defineProperty(SVGPathSegArcAbs.prototype, 'x', { get: function () { return this._x }, set: function (e) { this._x = e, this._segmentChanged() }, enumerable: !0 }), Object.defineProperty(SVGPathSegArcAbs.prototype, 'y', { get: function () { return this._y }, set: function (e) { this._y = e, this._segmentChanged() }, enumerable: !0 }), Object.defineProperty(SVGPathSegArcAbs.prototype, 'r1', { get: function () { return this._r1 }, set: function (e) { this._r1 = e, this._segmentChanged() }, enumerable: !0 }), Object.defineProperty(SVGPathSegArcAbs.prototype, 'r2', { get: function () { return this._r2 }, set: function (e) { this._r2 = e, this._segmentChanged() }, enumerable: !0 }), Object.defineProperty(SVGPathSegArcAbs.prototype, 'angle', { get: function () { return this._angle }, set: function (e) { this._angle = e, this._segmentChanged() }, enumerable: !0 }), Object.defineProperty(SVGPathSegArcAbs.prototype, 'largeArcFlag', { get: function () { return this._largeArcFlag }, set: function (e) { this._largeArcFlag = e, this._segmentChanged() }, enumerable: !0 }), Object.defineProperty(SVGPathSegArcAbs.prototype, 'sweepFlag', { get: function () { return this._sweepFlag }, set: function (e) { this._sweepFlag = e, this._segmentChanged() }, enumerable: !0 }), a.SVGPathSegArcRel = function (e, t, n, i, r, a, o, s) { SVGPathSeg.call(this, SVGPathSeg.PATHSEG_ARC_REL, 'a', e), this._x = t, this._y = n, this._r1 = i, this._r2 = r, this._angle = a, this._largeArcFlag = o, this._sweepFlag = s }, SVGPathSegArcRel.prototype = Object.create(SVGPathSeg.prototype), SVGPathSegArcRel.prototype.toString = function () { return '[object SVGPathSegArcRel]' }, SVGPathSegArcRel.prototype._asPathString = function () { return this.pathSegTypeAsLetter + ' ' + this._r1 + ' ' + this._r2 + ' ' + this._angle + ' ' + (this._largeArcFlag ? '1' : '0') + ' ' + (this._sweepFlag ? '1' : '0') + ' ' + this._x + ' ' + this._y }, SVGPathSegArcRel.prototype.clone = function () { return new SVGPathSegArcRel(void 0, this._x, this._y, this._r1, this._r2, this._angle, this._largeArcFlag, this._sweepFlag) }, Object.defineProperty(SVGPathSegArcRel.prototype, 'x', { get: function () { return this._x }, set: function (e) { this._x = e, this._segmentChanged() }, enumerable: !0 }), Object.defineProperty(SVGPathSegArcRel.prototype, 'y', { get: function () { return this._y }, set: function (e) { this._y = e, this._segmentChanged() }, enumerable: !0 }), Object.defineProperty(SVGPathSegArcRel.prototype, 'r1', { get: function () { return this._r1 }, set: function (e) { this._r1 = e, this._segmentChanged() }, enumerable: !0 }), Object.defineProperty(SVGPathSegArcRel.prototype, 'r2', { get: function () { return this._r2 }, set: function (e) { this._r2 = e, this._segmentChanged() }, enumerable: !0 }), Object.defineProperty(SVGPathSegArcRel.prototype, 'angle', { get: function () { return this._angle }, set: function (e) { this._angle = e, this._segmentChanged() }, enumerable: !0 }), Object.defineProperty(SVGPathSegArcRel.prototype, 'largeArcFlag', { get: function () { return this._largeArcFlag }, set: function (e) { this._largeArcFlag = e, this._segmentChanged() }, enumerable: !0 }), Object.defineProperty(SVGPathSegArcRel.prototype, 'sweepFlag', { get: function () { return this._sweepFlag }, set: function (e) { this._sweepFlag = e, this._segmentChanged() }, enumerable: !0 }), a.SVGPathSegLinetoHorizontalAbs = function (e, t) { SVGPathSeg.call(this, SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS, 'H', e), this._x = t }, SVGPathSegLinetoHorizontalAbs.prototype = Object.create(SVGPathSeg.prototype), SVGPathSegLinetoHorizontalAbs.prototype.toString = function () { return '[object SVGPathSegLinetoHorizontalAbs]' }, SVGPathSegLinetoHorizontalAbs.prototype._asPathString = function () { return this.pathSegTypeAsLetter + ' ' + this._x }, SVGPathSegLinetoHorizontalAbs.prototype.clone = function () { return new SVGPathSegLinetoHorizontalAbs(void 0, this._x) }, Object.defineProperty(SVGPathSegLinetoHorizontalAbs.prototype, 'x', { get: function () { return this._x }, set: function (e) { this._x = e, this._segmentChanged() }, enumerable: !0 }), a.SVGPathSegLinetoHorizontalRel = function (e, t) { SVGPathSeg.call(this, SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL, 'h', e), this._x = t }, SVGPathSegLinetoHorizontalRel.prototype = Object.create(SVGPathSeg.prototype), SVGPathSegLinetoHorizontalRel.prototype.toString = function () { return '[object SVGPathSegLinetoHorizontalRel]' }, SVGPathSegLinetoHorizontalRel.prototype._asPathString = function () { return this.pathSegTypeAsLetter + ' ' + this._x }, SVGPathSegLinetoHorizontalRel.prototype.clone = function () { return new SVGPathSegLinetoHorizontalRel(void 0, this._x) }, Object.defineProperty(SVGPathSegLinetoHorizontalRel.prototype, 'x', { get: function () { return this._x }, set: function (e) { this._x = e, this._segmentChanged() }, enumerable: !0 }), a.SVGPathSegLinetoVerticalAbs = function (e, t) { SVGPathSeg.call(this, SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS, 'V', e), this._y = t }, SVGPathSegLinetoVerticalAbs.prototype = Object.create(SVGPathSeg.prototype), SVGPathSegLinetoVerticalAbs.prototype.toString = function () { return '[object SVGPathSegLinetoVerticalAbs]' }, SVGPathSegLinetoVerticalAbs.prototype._asPathString = function () { return this.pathSegTypeAsLetter + ' ' + this._y }, SVGPathSegLinetoVerticalAbs.prototype.clone = function () { return new SVGPathSegLinetoVerticalAbs(void 0, this._y) }, Object.defineProperty(SVGPathSegLinetoVerticalAbs.prototype, 'y', { get: function () { return this._y }, set: function (e) { this._y = e, this._segmentChanged() }, enumerable: !0 }), a.SVGPathSegLinetoVerticalRel = function (e, t) { SVGPathSeg.call(this, SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL, 'v', e), this._y = t }, SVGPathSegLinetoVerticalRel.prototype = Object.create(SVGPathSeg.prototype), SVGPathSegLinetoVerticalRel.prototype.toString = function () { return '[object SVGPathSegLinetoVerticalRel]' }, SVGPathSegLinetoVerticalRel.prototype._asPathString = function () { return this.pathSegTypeAsLetter + ' ' + this._y }, SVGPathSegLinetoVerticalRel.prototype.clone = function () { return new SVGPathSegLinetoVerticalRel(void 0, this._y) }, Object.defineProperty(SVGPathSegLinetoVerticalRel.prototype, 'y', { get: function () { return this._y }, set: function (e) { this._y = e, this._segmentChanged() }, enumerable: !0 }), a.SVGPathSegCurvetoCubicSmoothAbs = function (e, t, n, i, r) { SVGPathSeg.call(this, SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS, 'S', e), this._x = t, this._y = n, this._x2 = i, this._y2 = r }, SVGPathSegCurvetoCubicSmoothAbs.prototype = Object.create(SVGPathSeg.prototype), SVGPathSegCurvetoCubicSmoothAbs.prototype.toString = function () { return '[object SVGPathSegCurvetoCubicSmoothAbs]' }, SVGPathSegCurvetoCubicSmoothAbs.prototype._asPathString = function () { return this.pathSegTypeAsLetter + ' ' + this._x2 + ' ' + this._y2 + ' ' + this._x + ' ' + this._y }, SVGPathSegCurvetoCubicSmoothAbs.prototype.clone = function () { return new SVGPathSegCurvetoCubicSmoothAbs(void 0, this._x, this._y, this._x2, this._y2) }, Object.defineProperty(SVGPathSegCurvetoCubicSmoothAbs.prototype, 'x', { get: function () { return this._x }, set: function (e) { this._x = e, this._segmentChanged() }, enumerable: !0 }), Object.defineProperty(SVGPathSegCurvetoCubicSmoothAbs.prototype, 'y', { get: function () { return this._y }, set: function (e) { this._y = e, this._segmentChanged() }, enumerable: !0 }), Object.defineProperty(SVGPathSegCurvetoCubicSmoothAbs.prototype, 'x2', { get: function () { return this._x2 }, set: function (e) { this._x2 = e, this._segmentChanged() }, enumerable: !0 }), Object.defineProperty(SVGPathSegCurvetoCubicSmoothAbs.prototype, 'y2', { get: function () { return this._y2 }, set: function (e) { this._y2 = e, this._segmentChanged() }, enumerable: !0 }), a.SVGPathSegCurvetoCubicSmoothRel = function (e, t, n, i, r) { SVGPathSeg.call(this, SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL, 's', e), this._x = t, this._y = n, this._x2 = i, this._y2 = r }, SVGPathSegCurvetoCubicSmoothRel.prototype = Object.create(SVGPathSeg.prototype), SVGPathSegCurvetoCubicSmoothRel.prototype.toString = function () { return '[object SVGPathSegCurvetoCubicSmoothRel]' }, SVGPathSegCurvetoCubicSmoothRel.prototype._asPathString = function () { return this.pathSegTypeAsLetter + ' ' + this._x2 + ' ' + this._y2 + ' ' + this._x + ' ' + this._y }, SVGPathSegCurvetoCubicSmoothRel.prototype.clone = function () { return new SVGPathSegCurvetoCubicSmoothRel(void 0, this._x, this._y, this._x2, this._y2) }, Object.defineProperty(SVGPathSegCurvetoCubicSmoothRel.prototype, 'x', { get: function () { return this._x }, set: function (e) { this._x = e, this._segmentChanged() }, enumerable: !0 }), Object.defineProperty(SVGPathSegCurvetoCubicSmoothRel.prototype, 'y', { get: function () { return this._y }, set: function (e) { this._y = e, this._segmentChanged() }, enumerable: !0 }), Object.defineProperty(SVGPathSegCurvetoCubicSmoothRel.prototype, 'x2', { get: function () { return this._x2 }, set: function (e) { this._x2 = e, this._segmentChanged() }, enumerable: !0 }), Object.defineProperty(SVGPathSegCurvetoCubicSmoothRel.prototype, 'y2', { get: function () { return this._y2 }, set: function (e) { this._y2 = e, this._segmentChanged() }, enumerable: !0 }), a.SVGPathSegCurvetoQuadraticSmoothAbs = function (e, t, n) { SVGPathSeg.call(this, SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS, 'T', e), this._x = t, this._y = n }, SVGPathSegCurvetoQuadraticSmoothAbs.prototype = Object.create(SVGPathSeg.prototype), SVGPathSegCurvetoQuadraticSmoothAbs.prototype.toString = function () { return '[object SVGPathSegCurvetoQuadraticSmoothAbs]' }, SVGPathSegCurvetoQuadraticSmoothAbs.prototype._asPathString = function () { return this.pathSegTypeAsLetter + ' ' + this._x + ' ' + this._y }, SVGPathSegCurvetoQuadraticSmoothAbs.prototype.clone = function () { return new SVGPathSegCurvetoQuadraticSmoothAbs(void 0, this._x, this._y) }, Object.defineProperty(SVGPathSegCurvetoQuadraticSmoothAbs.prototype, 'x', { get: function () { return this._x }, set: function (e) { this._x = e, this._segmentChanged() }, enumerable: !0 }), Object.defineProperty(SVGPathSegCurvetoQuadraticSmoothAbs.prototype, 'y', { get: function () { return this._y }, set: function (e) { this._y = e, this._segmentChanged() }, enumerable: !0 }), a.SVGPathSegCurvetoQuadraticSmoothRel = function (e, t, n) { SVGPathSeg.call(this, SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL, 't', e), this._x = t, this._y = n }, SVGPathSegCurvetoQuadraticSmoothRel.prototype = Object.create(SVGPathSeg.prototype), SVGPathSegCurvetoQuadraticSmoothRel.prototype.toString = function () { return '[object SVGPathSegCurvetoQuadraticSmoothRel]' }, SVGPathSegCurvetoQuadraticSmoothRel.prototype._asPathString = function () { return this.pathSegTypeAsLetter + ' ' + this._x + ' ' + this._y }, SVGPathSegCurvetoQuadraticSmoothRel.prototype.clone = function () { return new SVGPathSegCurvetoQuadraticSmoothRel(void 0, this._x, this._y) }, Object.defineProperty(SVGPathSegCurvetoQuadraticSmoothRel.prototype, 'x', { get: function () { return this._x }, set: function (e) { this._x = e, this._segmentChanged() }, enumerable: !0 }), Object.defineProperty(SVGPathSegCurvetoQuadraticSmoothRel.prototype, 'y', { get: function () { return this._y }, set: function (e) { this._y = e, this._segmentChanged() }, enumerable: !0 }), SVGPathElement.prototype.createSVGPathSegClosePath = function () { return new SVGPathSegClosePath(void 0) }, SVGPathElement.prototype.createSVGPathSegMovetoAbs = function (e, t) { return new SVGPathSegMovetoAbs(void 0, e, t) }, SVGPathElement.prototype.createSVGPathSegMovetoRel = function (e, t) { return new SVGPathSegMovetoRel(void 0, e, t) }, SVGPathElement.prototype.createSVGPathSegLinetoAbs = function (e, t) { return new SVGPathSegLinetoAbs(void 0, e, t) }, SVGPathElement.prototype.createSVGPathSegLinetoRel = function (e, t) { return new SVGPathSegLinetoRel(void 0, e, t) }, SVGPathElement.prototype.createSVGPathSegCurvetoCubicAbs = function (e, t, n, i, r, a) { return new SVGPathSegCurvetoCubicAbs(void 0, e, t, n, i, r, a) }, SVGPathElement.prototype.createSVGPathSegCurvetoCubicRel = function (e, t, n, i, r, a) { return new SVGPathSegCurvetoCubicRel(void 0, e, t, n, i, r, a) }, SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticAbs = function (e, t, n, i) { return new SVGPathSegCurvetoQuadraticAbs(void 0, e, t, n, i) }, SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticRel = function (e, t, n, i) { return new SVGPathSegCurvetoQuadraticRel(void 0, e, t, n, i) }, SVGPathElement.prototype.createSVGPathSegArcAbs = function (e, t, n, i, r, a, o) { return new SVGPathSegArcAbs(void 0, e, t, n, i, r, a, o) }, SVGPathElement.prototype.createSVGPathSegArcRel = function (e, t, n, i, r, a, o) { return new SVGPathSegArcRel(void 0, e, t, n, i, r, a, o) }, SVGPathElement.prototype.createSVGPathSegLinetoHorizontalAbs = function (e) { return new SVGPathSegLinetoHorizontalAbs(void 0, e) }, SVGPathElement.prototype.createSVGPathSegLinetoHorizontalRel = function (e) { return new SVGPathSegLinetoHorizontalRel(void 0, e) }, SVGPathElement.prototype.createSVGPathSegLinetoVerticalAbs = function (e) { return new SVGPathSegLinetoVerticalAbs(void 0, e) }, SVGPathElement.prototype.createSVGPathSegLinetoVerticalRel = function (e) { return new SVGPathSegLinetoVerticalRel(void 0, e) }, SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothAbs = function (e, t, n, i) { return new SVGPathSegCurvetoCubicSmoothAbs(void 0, e, t, n, i) }, SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothRel = function (e, t, n, i) { return new SVGPathSegCurvetoCubicSmoothRel(void 0, e, t, n, i) }, SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothAbs = function (e, t) { return new SVGPathSegCurvetoQuadraticSmoothAbs(void 0, e, t) }, SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothRel = function (e, t) { return new SVGPathSegCurvetoQuadraticSmoothRel(void 0, e, t) }), 'SVGPathSegList' in a || (a.SVGPathSegList = function (e) { this._pathElement = e, this._list = this._parsePath(this._pathElement.getAttribute('d')), this._mutationObserverConfig = { attributes: !0, attributeFilter: [ 'd' ] }, this._pathElementMutationObserver = new MutationObserver(this._updateListFromPathMutations.bind(this)), this._pathElementMutationObserver.observe(this._pathElement, this._mutationObserverConfig) }, Object.defineProperty(SVGPathSegList.prototype, 'numberOfItems', { get: function () { return this._checkPathSynchronizedToList(), this._list.length }, enumerable: !0 }), Object.defineProperty(SVGPathElement.prototype, 'pathSegList', { get: function () { return this._pathSegList || (this._pathSegList = new SVGPathSegList(this)), this._pathSegList }, enumerable: !0 }), Object.defineProperty(SVGPathElement.prototype, 'normalizedPathSegList', { get: function () { return this.pathSegList }, enumerable: !0 }), Object.defineProperty(SVGPathElement.prototype, 'animatedPathSegList', { get: function () { return this.pathSegList }, enumerable: !0 }), Object.defineProperty(SVGPathElement.prototype, 'animatedNormalizedPathSegList', { get: function () { return this.pathSegList }, enumerable: !0 }), SVGPathSegList.prototype._checkPathSynchronizedToList = function () { this._updateListFromPathMutations(this._pathElementMutationObserver.takeRecords()) }, SVGPathSegList.prototype._updateListFromPathMutations = function (e) { var t; this._pathElement && (t = !1, e.forEach(function (e) { 'd' == e.attributeName && (t = !0) }), t && (this._list = this._parsePath(this._pathElement.getAttribute('d')))) }, SVGPathSegList.prototype._writeListToPath = function () { this._pathElementMutationObserver.disconnect(), this._pathElement.setAttribute('d', SVGPathSegList._pathSegArrayAsString(this._list)), this._pathElementMutationObserver.observe(this._pathElement, this._mutationObserverConfig) }, SVGPathSegList.prototype.segmentChanged = function (e) { this._writeListToPath() }, SVGPathSegList.prototype.clear = function () { this._checkPathSynchronizedToList(), this._list.forEach(function (e) { e._owningPathSegList = null }), this._list = [ ], this._writeListToPath() }, SVGPathSegList.prototype.initialize = function (e) { return this._checkPathSynchronizedToList(), this._list = [ e ], (e._owningPathSegList = this)._writeListToPath(), e }, SVGPathSegList.prototype._checkValidIndex = function (e) { if (isNaN(e) || e < 0 || this.numberOfItems <= e) throw 'INDEX_SIZE_ERR' }, SVGPathSegList.prototype.getItem = function (e) { return this._checkPathSynchronizedToList(), this._checkValidIndex(e), this._list[e] }, SVGPathSegList.prototype.insertItemBefore = function (e, t) { return this._checkPathSynchronizedToList(), this.numberOfItems < t && (t = this.numberOfItems), e._owningPathSegList && (e = e.clone()), this._list.splice(t, 0, e), (e._owningPathSegList = this)._writeListToPath(), e }, SVGPathSegList.prototype.replaceItem = function (e, t) { return this._checkPathSynchronizedToList(), e._owningPathSegList && (e = e.clone()), this._checkValidIndex(t), ((this._list[t] = e)._owningPathSegList = this)._writeListToPath(), e }, SVGPathSegList.prototype.removeItem = function (e) { this._checkPathSynchronizedToList(), this._checkValidIndex(e); var t = this._list[e]; return this._list.splice(e, 1), this._writeListToPath(), t }, SVGPathSegList.prototype.appendItem = function (e) { return this._checkPathSynchronizedToList(), e._owningPathSegList && (e = e.clone()), this._list.push(e), (e._owningPathSegList = this)._writeListToPath(), e }, SVGPathSegList._pathSegArrayAsString = function (e) { var t = '', n = !0; return e.forEach(function (e) { n ? (n = !1, t += e._asPathString()) : t += ' ' + e._asPathString() }), t }, SVGPathSegList.prototype._parsePath = function (e) { if (!e || 0 == e.length) return []; function t() { this.pathSegList = [ ] } var i = this; t.prototype.appendSegment = function (e) { this.pathSegList.push(e) }; function n(e) { this._string = e, this._currentIndex = 0, this._endIndex = this._string.length, this._previousCommand = SVGPathSeg.PATHSEG_UNKNOWN, this._skipOptionalSpaces() } n.prototype._isCurrentSpace = function () { var e = this._string[this._currentIndex]; return e <= ' ' && (' ' == e || '\n' == e || '\t' == e || '\r' == e || '\f' == e) }, n.prototype._skipOptionalSpaces = function () { for (; this._currentIndex < this._endIndex && this._isCurrentSpace(); ) this._currentIndex++; return this._currentIndex < this._endIndex }, n.prototype._skipOptionalSpacesOrDelimiter = function () { return !(this._currentIndex < this._endIndex && !this._isCurrentSpace() && ',' != (this._string[0 | this._currentIndex] || '')) && (this._skipOptionalSpaces() && this._currentIndex < this._endIndex && ',' == (this._string[0 | this._currentIndex] || '') && (this._currentIndex++, this._skipOptionalSpaces()), this._currentIndex < this._endIndex) }, n.prototype.hasMoreData = function () { return this._currentIndex < this._endIndex }, n.prototype.peekSegmentType = function () { return this._pathSegTypeFromChar(this._string[this._currentIndex]) }, n.prototype._pathSegTypeFromChar = function (e) { switch (e) { case 'Z': case 'z': return SVGPathSeg.PATHSEG_CLOSEPATH; case 'M': return SVGPathSeg.PATHSEG_MOVETO_ABS; case 'm': return SVGPathSeg.PATHSEG_MOVETO_REL; case 'L': return SVGPathSeg.PATHSEG_LINETO_ABS; case 'l': return SVGPathSeg.PATHSEG_LINETO_REL; case 'C': return SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS; case 'c': return SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL; case 'Q': return SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS; case 'q': return SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL; case 'A': return SVGPathSeg.PATHSEG_ARC_ABS; case 'a': return SVGPathSeg.PATHSEG_ARC_REL; case 'H': return SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS; case 'h': return SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL; case 'V': return SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS; case 'v': return SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL; case 'S': return SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS; case 's': return SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL; case 'T': return SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS; case 't': return SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL; default: return SVGPathSeg.PATHSEG_UNKNOWN } }, n.prototype._nextCommandHelper = function (e, t) { return ('+' == e || '-' == e || '.' == e || '0' <= e && e <= '9') && t != SVGPathSeg.PATHSEG_CLOSEPATH ? t == SVGPathSeg.PATHSEG_MOVETO_ABS ? SVGPathSeg.PATHSEG_LINETO_ABS : t == SVGPathSeg.PATHSEG_MOVETO_REL ? SVGPathSeg.PATHSEG_LINETO_REL : t : SVGPathSeg.PATHSEG_UNKNOWN }, n.prototype.initialCommandIsMoveTo = function () { if (!this.hasMoreData()) return !0; var e = this.peekSegmentType(); return e == SVGPathSeg.PATHSEG_MOVETO_ABS || e == SVGPathSeg.PATHSEG_MOVETO_REL }, n.prototype._parseNumber = function () { var e = 0, t = 0, n = 1, i = 0, r = 1, a = 1, o = this._currentIndex; if (this._skipOptionalSpaces(), this._currentIndex < this._endIndex && '+' == (this._string[0 | this._currentIndex] || '') ? this._currentIndex++ : this._currentIndex < this._endIndex && '-' == (this._string[0 | this._currentIndex] || '') && (this._currentIndex++, r = - 1), !(this._currentIndex == this._endIndex || ((this._string[0 | this._currentIndex] || '') < '0' || '9' < (this._string[0 | this._currentIndex] || '')) && '.' != (this._string[0 | this._currentIndex] || ''))) { for (var s = this._currentIndex; this._currentIndex < this._endIndex && '0' <= (this._string[0 | this._currentIndex] || '') && (this._string[0 | this._currentIndex] || '') <= '9'; ) this._currentIndex++; if (this._currentIndex != s) for (var l = this._currentIndex - 1, c = 1; s <= l; ) t += c * ((this._string[0 | l--] || '') - '0'), c *= 10; if (this._currentIndex < this._endIndex && '.' == (this._string[0 | this._currentIndex] || '')) { if (this._currentIndex++, this._endIndex <= this._currentIndex || (this._string[0 | this._currentIndex] || '') < '0' || '9' < (this._string[0 | this._currentIndex] || '')) return; for (; this._currentIndex < this._endIndex && '0' <= (this._string[0 | this._currentIndex] || '') && (this._string[0 | this._currentIndex] || '') <= '9'; ) i += ((this._string[0 | this._currentIndex++] || '') - '0') * (n *= 0.1) } if (this._currentIndex != o && this._currentIndex + 1 < this._endIndex && ('e' == (this._string[0 | this._currentIndex] || '') || 'E' == (this._string[0 | this._currentIndex] || '')) && 'x' != (this._string[0 | this._currentIndex + 1] || '') && 'm' != (this._string[0 | this._currentIndex + 1] || '')) { if (this._currentIndex++, '+' == (this._string[0 | this._currentIndex] || '') ? this._currentIndex++ : '-' == (this._string[0 | this._currentIndex] || '') && (this._currentIndex++, a = - 1), this._endIndex <= this._currentIndex || (this._string[0 | this._currentIndex] || '') < '0' || '9' < (this._string[0 | this._currentIndex] || '')) return; for (; this._currentIndex < this._endIndex && '0' <= (this._string[0 | this._currentIndex] || '') && (this._string[0 | this._currentIndex] || '') <= '9'; ) e *= 10, e += (this._string[0 | this._currentIndex] || '') - '0', this._currentIndex++ } var u = t + i; if (u *= r, e && (u *= Math.pow(10, a * e)), o != this._currentIndex) return this._skipOptionalSpacesOrDelimiter(), u } }, n.prototype._parseArcFlag = function () { if (!(this._endIndex <= this._currentIndex)) { var e = !1, t = this._string[0 | this._currentIndex++] || ''; if ('0' == t) e = !1; else { if ('1' != t) return; e = !0 } return this._skipOptionalSpacesOrDelimiter(), e } }, n.prototype.parseSegment = function () { var e = this._string[this._currentIndex], t = this._pathSegTypeFromChar(e); if (t == SVGPathSeg.PATHSEG_UNKNOWN) { if (this._previousCommand == SVGPathSeg.PATHSEG_UNKNOWN) return null; if ((t = this._nextCommandHelper(e, this._previousCommand)) == SVGPathSeg.PATHSEG_UNKNOWN) return null } else this._currentIndex++; switch (this._previousCommand = t) { case SVGPathSeg.PATHSEG_MOVETO_REL: return new SVGPathSegMovetoRel(i, this._parseNumber(), this._parseNumber()); case SVGPathSeg.PATHSEG_MOVETO_ABS: return new SVGPathSegMovetoAbs(i, this._parseNumber(), this._parseNumber()); case SVGPathSeg.PATHSEG_LINETO_REL: return new SVGPathSegLinetoRel(i, this._parseNumber(), this._parseNumber()); case SVGPathSeg.PATHSEG_LINETO_ABS: return new SVGPathSegLinetoAbs(i, this._parseNumber(), this._parseNumber()); case SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL: return new SVGPathSegLinetoHorizontalRel(i, this._parseNumber()); case SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS: return new SVGPathSegLinetoHorizontalAbs(i, this._parseNumber()); case SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL: return new SVGPathSegLinetoVerticalRel(i, this._parseNumber()); case SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS: return new SVGPathSegLinetoVerticalAbs(i, this._parseNumber()); case SVGPathSeg.PATHSEG_CLOSEPATH: return this._skipOptionalSpaces(), new SVGPathSegClosePath(i); case SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL: var n = { x1: this._parseNumber(), y1: this._parseNumber(), x2: this._parseNumber(), y2: this._parseNumber(), x: this._parseNumber(), y: this._parseNumber() }; return new SVGPathSegCurvetoCubicRel(i, n.x, n.y, n.x1, n.y1, n.x2, n.y2); case SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS: n = { x1: this._parseNumber(), y1: this._parseNumber(), x2: this._parseNumber(), y2: this._parseNumber(), x: this._parseNumber(), y: this._parseNumber() }; return new SVGPathSegCurvetoCubicAbs(i, n.x, n.y, n.x1, n.y1, n.x2, n.y2); case SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL: n = { x2: this._parseNumber(), y2: this._parseNumber(), x: this._parseNumber(), y: this._parseNumber() }; return new SVGPathSegCurvetoCubicSmoothRel(i, n.x, n.y, n.x2, n.y2); case SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS: n = { x2: this._parseNumber(), y2: this._parseNumber(), x: this._parseNumber(), y: this._parseNumber() }; return new SVGPathSegCurvetoCubicSmoothAbs(i, n.x, n.y, n.x2, n.y2); case SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL: n = { x1: this._parseNumber(), y1: this._parseNumber(), x: this._parseNumber(), y: this._parseNumber() }; return new SVGPathSegCurvetoQuadraticRel(i, n.x, n.y, n.x1, n.y1); case SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS: n = { x1: this._parseNumber(), y1: this._parseNumber(), x: this._parseNumber(), y: this._parseNumber() }; return new SVGPathSegCurvetoQuadraticAbs(i, n.x, n.y, n.x1, n.y1); case SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL: return new SVGPathSegCurvetoQuadraticSmoothRel(i, this._parseNumber(), this._parseNumber()); case SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS: return new SVGPathSegCurvetoQuadraticSmoothAbs(i, this._parseNumber(), this._parseNumber()); case SVGPathSeg.PATHSEG_ARC_REL: n = { x1: this._parseNumber(), y1: this._parseNumber(), arcAngle: this._parseNumber(), arcLarge: this._parseArcFlag(), arcSweep: this._parseArcFlag(), x: this._parseNumber(), y: this._parseNumber() }; return new SVGPathSegArcRel(i, n.x, n.y, n.x1, n.y1, n.arcAngle, n.arcLarge, n.arcSweep); case SVGPathSeg.PATHSEG_ARC_ABS: n = { x1: this._parseNumber(), y1: this._parseNumber(), arcAngle: this._parseNumber(), arcLarge: this._parseArcFlag(), arcSweep: this._parseArcFlag(), x: this._parseNumber(), y: this._parseNumber() }; return new SVGPathSegArcAbs(i, n.x, n.y, n.x1, n.y1, n.arcAngle, n.arcLarge, n.arcSweep); default: throw 'Unknown path seg type.' } }; var r = new t, a = new n(e); if (!a.initialCommandIsMoveTo()) return []; for (; a.hasMoreData(); ) { var o = a.parseSegment(); if (!o) return []; r.appendSegment(o) } return r.pathSegList }), T = [ w(93) ], void 0 === (T = function () { return r }.apply(C, T)) || (E.exports = T) }(window) }, function (e, t, n) { 'use strict'; t.__esModule = !0; var i = Object.assign || function (e) { for (var t = 1; t < arguments.length; t++) { var n, i = arguments[t]; for (n in i) Object.prototype.hasOwnProperty.call(i, n) && (e[n] = i[n]) } return e }; t.isReactChildren = l, t.createRouteFromReactElement = c, t.createRoutesFromReactChildren = u, t.createRoutes = function (e) { l(e) ? e = u(e) : e && !Array.isArray(e) && (e = [ e ]); return e }; var r, a = n(25), o = (r = a) && r.__esModule ? r : { default: r }; function s(e) { return null == e || o.default.isValidElement(e) } function l(e) { return s(e) || Array.isArray(e) && e.every(s) } function c(e) { var t = i({ }, e.type.defaultProps, e.props); return t.children && ((e = u(t.children, t)).length && (t.childRoutes = e), delete t.children), t } function u(e, n) { var i = [ ]; return o.default.Children.forEach(e, function (e) { var t; o.default.isValidElement(e) && (e.type.createRouteFromReactElement ? (t = e.type.createRouteFromReactElement(e, n)) && i.push(t) : i.push(c(e))) }), i } }, function (e, t, n) { 'use strict'; t.__esModule = !0, t.locationShape = t.routerShape = void 0; n = n(41), t.routerShape = (0, n.shape) ({ push: n.func.isRequired, replace: n.func.isRequired, go: n.func.isRequired, goBack: n.func.isRequired, goForward: n.func.isRequired, setRouteLeaveHook: n.func.isRequired, isActive: n.func.isRequired }), t.locationShape = (0, n.shape) ({ pathname: n.string.isRequired, search: n.string.isRequired, state: n.object, action: n.string.isRequired, key: n.string }) }, function (e, t, n) { 'use strict'; t.__esModule = !0, t.createPath = t.parsePath = t.getQueryStringValueFromPath = t.stripQueryStringValueFromPath = t.addQueryStringValueToPath = void 0; var i, r = n(45); i = r; t.addQueryStringValueToPath = function (e, t, n) { var i = a(e), r = i.search, e = i.hash; return o({ pathname: i.pathname, search: r + (~r.indexOf('?') ? '&' : '?') + t + '=' + n, hash: e }) }, t.stripQueryStringValueFromPath = function (e, t) { var n = a(e), e = n.hash; return o({ pathname: n.pathname, search: n.search.replace(RegExp('([?&])' + t + '=[a-zA-Z0-9]+(&?)'), function (e, t, n) { return '?' === t ? t : n }), hash: e }) }, t.getQueryStringValueFromPath = function (e, t) { t = a(e).search.match(RegExp('[?&]' + t + '=([a-zA-Z0-9]+)')); return t && t[1] }; var a = t.parsePath = function (e) { var t = null == (i = (n = e).match(/^(https?:)?\/\/[^\/]*/)) ? n : n.substring(i[0].length), e = '', n = '', i = t.indexOf('#'); - 1 != i && (n = t.substring(i), t = t.substring(0, i)); i = t.indexOf('?'); return - 1 != i && (e = t.substring(i), t = t.substring(0, i)), { pathname: t = '' === t ? '/' : t, search: e, hash: n } }, o = t.createPath = function (e) { if (null == e || 'string' == typeof e) return e; var t = e.search, n = e.hash, e = (e.basename || '') + e.pathname; return t && '?' !== t && (e += t), n && (e += n), e } }, , function (e, t, n) { 'use strict'; t.__esModule = !0; var i, r = n(40); i = r; t.default = function (e, t) { return function () { return e.apply(this, arguments) } }, e.exports = t.default }, function (e, t, n) { 'use strict'; t.__esModule = !0, t.extractPath = a, t.parsePath = function (e) { var t = a(e), n = '', i = ''; e = t.indexOf('#'); - 1 != e && (i = t.substring(e), t = t.substring(0, e)); e = t.indexOf('?'); - 1 != e && (n = t.substring(e), t = t.substring(0, e)); '' === t && (t = '/'); return { pathname: t, search: n, hash: i } }; var i, r = n(40); i = r; function a(e) { var t = e.match(/^https?:\/\/[^\/]*/); return null == t ? e : e.substring(t[0].length) } }, , function (e, t, n) { 'use strict'; t.__esModule = !0; t.PUSH = 'PUSH'; t.REPLACE = 'REPLACE'; t.POP = 'POP', t.default = { PUSH: 'PUSH', REPLACE: 'REPLACE', POP: 'POP' } }, function (e, t, n) { 'use strict'; t.__esModule = !0, t.compilePattern = _, t.matchPattern = o, t.getParamNames = function (e) { return _(e).paramNames }, t.getParams = function (e, t) { t = o(e, t); if (!t) return null; var n = t.paramValues, i = { }; return t.paramNames.forEach(function (e, t) { i[e] = n[t] }), i }, t.formatPattern = function (e, t) { t = t || { }; for (var n = _(e).tokens, i = 0, r = '', a = 0, o = [ ], s = void 0, l = void 0, c = void 0, u = 0, d = n.length; u < d; ++u) if ('*' === (s = n[u]) || '**' === s) null != (c = Array.isArray(t.splat) ? t.splat[a++] : t.splat) || 0 < i || (0, g.default) (!1), null != c && (r += encodeURI(c)); else if ('(' === s) o[i] = '', i += 1; else if (')' === s) { var p = o.pop(); --i ? o[i - 1] += p : r += p } else if ('\\(' === s) r += '('; else if ('\\)' === s) r += ')'; else if (':' == (s[0] || '')) if (l = s.substring(1), null != (c = t[l]) || 0 < i || (0, g.default) (!1), null == c) { if (i) { o[i - 1] = ''; for (var p = n.indexOf(s), m = n.slice(p, n.length), f = - 1, h = 0; h < m.length; h++) if (')' == m[h]) { f = h; break } 0 < f || (0, g.default) (!1), u = p + f - 1 } } else i ? o[i - 1] += encodeURIComponent(c) : r += encodeURIComponent(c); else i ? o[i - 1] += s : r += s; return !(i <= 0) && (0, g.default) (!1), r.replace(/\/+/g, '/') }; var i, r = n(38), g = (i = r) && i.__esModule ? i : { default: i }; function s(e) { return e.replace(/[.*+?^${}()|[\]\\]/g, '\\$&') } var a = Object.create(null); function _(e) { return a[e] || (a[e] = function (e) { for (var t, n = '', i = [ ], r = [ ], a = 0, o = /:([a-zA-Z_$][a-zA-Z0-9_$]*)|\*\*|\*|\(|\)|\\\(|\\\)/g; t = o.exec(e); ) t.index !== a && (r.push(e.slice(a, t.index)), n += s(e.slice(a, t.index))), t[1] ? (n += '([^/]+)', i.push(t[1])) : '**' === t[0] ? (n += '(.*)', i.push('splat')) : '*' === t[0] ? (n += '(.*?)', i.push('splat')) : '(' === t[0] ? n += '(?:' : ')' === t[0] ? n += ')?' : '\\(' === t[0] ? n += '\\(' : '\\)' === t[0] && (n += '\\)'), r.push(t[0]), a = o.lastIndex; return a !== e.length && (r.push(e.slice(a, e.length)), n += s(e.slice(a, e.length))), { pattern: e, regexpSource: n, paramNames: i, tokens: r } }(e)), a[e] } function o(e, t) { var n = _(e = '/' != (e[0] || '') ? '/' + e : e), i = n.regexpSource, r = n.paramNames, n = n.tokens; '/' != (e[0 | e.length - 1] || '') && (i += '/?'), '*' === n[n.length - 1] && (i += '$'); n = t.match(RegExp('^' + i, 'i')); if (null == n) return null; i = n[0], t = t.substr(i.length); if (t) { if ('/' != (i[0 | i.length - 1] || '')) return null; t = '/' + t } return { remainingPathname: t, paramNames: r, paramValues: n.slice(1).map(function (e) { return e && decodeURIComponent(e) }) } } }, function (e, t, n) { 'use strict'; t.__esModule = !0, t.default = function (e, t) { if (~t.indexOf('deprecated')) { if (o[t]) return; o[t] = !0 } t = '[react-router] ' + t; for (var n = arguments.length, i = Array(2 < n ? n - 2 : 0), r = 2; r < n; r++) i[r - 2] = arguments[r]; a.default.apply(void 0, [ e, t ].concat(i)) }, t._resetWarned = function () { o = { } }; var i, r = n(45), a = (i = r) && i.__esModule ? i : { default: i }; var o = { } }, function (e, t, n) { 'use strict'; t.__esModule = !0, t.locationsAreEqual = t.statesAreEqual = t.createLocation = t.createQuery = void 0; var r = 'function' == typeof Symbol && 'symbol' == typeof Symbol.iterator ? function (e) { return typeof e } : function (e) { return e && 'function' == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? 'symbol' : typeof e }, i = Object.assign || function (e) { for (var t = 1; t < arguments.length; t++) { var n, i = arguments[t]; for (n in i) Object.prototype.hasOwnProperty.call(i, n) && (e[n] = i[n]) } return e }, a = l(n(38)), o = (l(n(45)), n(50)), s = n(70); function l(e) { return e && e.__esModule ? e : { default: e } } function c(e) { return '[object Date]' === Object.prototype.toString.call(e) } t.createQuery = function (e) { return i(Object.create(null), e) }, t.createLocation = function () { var e = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : '/', t = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : s.POP, n = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null, e = 'string' == typeof e ? (0, o.parsePath) (e) : e; return { pathname: e.pathname || '/', search: e.search || '', hash: e.hash || '', state: e.state, action: t, key: n } }; var u = t.statesAreEqual = function n(t, i) { if (t === i) return !0; var e = void 0 === t ? 'undefined' : r(t); if (e !== (void 0 === i ? 'undefined' : r(i))) return !1; if ('function' === e && (0, a.default) (!1), 'object' !== e) return !1; if (c(t) && c(i) && (0, a.default) (!1), Array.isArray(t)) return Array.isArray(i) && t.length === i.length && t.every(function (e, t) { return n(e, i[t]) }); e = Object.keys(t); return e.length === Object.keys(i).length && e.every(function (e) { return n(t[e], i[e]) }) }; t.locationsAreEqual = function (e, t) { return e.key === t.key && e.pathname === t.pathname && e.search === t.search && e.hash === t.hash && u(e.state, t.state) } }, , , , function (e, t, n) { 'use strict'; t.__esModule = !0; var i = !('undefined' == typeof window || !window.document || !window.document.createElement); t.canUseDOM = i }, function (e, t, n) { 'use strict'; function a(e, t, n, i) { var r; t in e && ('function' != typeof (r = i) || '[object Function]' !== l.call(r) || !i()) || (d ? u(e, t, { configurable: !0, enumerable: !1, value: n, writable: !0 }) : e[t] = n) } var o = n(107), s = 'function' == typeof Symbol && 'symbol' == typeof Symbol('foo'), l = Object.prototype.toString, c = Array.prototype.concat, u = Object.defineProperty, d = u && function () { var e = { }; try { for (var t in u(e, 'x', { enumerable: !1, value: e }), e) return !1; return e.x === e } catch (e) { return !1 } }(), n = function (e, t) { var n = 2 < arguments.length ? arguments[2] : { }, i = o(t); s && (i = c.call(i, Object.getOwnPropertySymbols(t))); for (var r = 0; r < i.length; r += 1) a(e, i[r], t[i[r]], n[i[r]]) }; n.supportsDescriptors = !!d, e.exports = n }, function (e, t, n) { 'use strict'; t.__esModule = !0, t.routes = t.route = t.components = t.component = t.history = void 0, t.falsy = function (e, t, n) { if (e[t]) return Error('<' + n + '> should not have a "' + t + '" prop') }; var i = n(41); t.history = (0, i.shape) ({ listen: i.func.isRequired, push: i.func.isRequired, replace: i.func.isRequired, go: i.func.isRequired, goBack: i.func.isRequired, goForward: i.func.isRequired }); n = t.component = (0, i.oneOfType) ([i.func, i.string]), t.components = (0, i.oneOfType) ([n, i.object]), n = t.route = (0, i.oneOfType) ([i.object, i.element]), t.routes = (0, i.oneOfType) ([n, (0, i.arrayOf) (n)]) }, function (e, t, n) { var i; i = this, n = [ n(267), n(37), t ], void 0 === (n = function (e, t, n) { i.Backbone = function (e, s, x, t) { var n = e.Backbone, i = [ ], r = i.push, a = i.slice, o = i.splice; s.VERSION = '1.1.2', s.$ = t, s.noConflict = function () { e.Backbone = n; return this }, s.emulateHTTP = false, s.emulateJSON = false; var l = s.Events = { on: function (e, t, n) { if (!d(this, 'on', e, [ t, n ]) || !t) return this; this._events || (this._events = { }); var i = this._events[e] || (this._events[e] = [ ]); i.push({ callback: t, context: n, ctx: n || this }); return this }, once: function (e, t, n) { if (!d(this, 'once', e, [ t, n ]) || !t) return this; var i = this; var r = x.once(function () { i.off(e, r); t.apply(this, arguments) }); r._callback = t; return this.on(e, r, n) }, off: function (e, t, n) { var i, r, a, o, s, l, c, u; if (!this._events || !d(this, 'off', e, [ t, n ])) return this; if (!e && !t && !n) { this._events = void 0; return this } o = e ? [ e ] : x.keys(this._events); for (s = 0, l = o.length; s < l; s++) { e = o[s]; if (a = this._events[e]) { this._events[e] = i = [ ]; if (t || n) for (c = 0, u = a.length; c < u; c++) { r = a[c]; if (t && t !== r.callback && t !== r.callback._callback || n && n !== r.context) i.push(r) } if (!i.length) delete this._events[e] } } return this }, trigger: function (e) { if (!this._events) return this; var t = a.call(arguments, 1); if (!d(this, 'trigger', e, t)) return this; var n = this._events[e]; var i = this._events.all; if (n) u(n, t); if (i) u(i, arguments); return this }, stopListening: function (e, t, n) { var i = this._listeningTo; if (!i) return this; var r = !t && !n; if (!n && typeof t === 'object') n = this; if (e) (i = { }) [e._listenId] = e; for (var a in i) { e = i[a]; e.off(t, n, this); if (r || x.isEmpty(e._events)) delete this._listeningTo[a] } return this } }, c = /\s+/, d = function (e, t, n, i) { if (!n) return true; if (typeof n === 'object') { for (var r in n) e[t].apply(e, [ r, n[r] ].concat(i)); return false } if (c.test(n)) { var a = n.split(c); for (var o = 0, s = a.length; o < s; o++) e[t].apply(e, [ a[o] ].concat(i)); return false } return true }, u = function (e, t) { var n, i = - 1, r = e.length, a = t[0], o = t[1], s = t[2]; switch (t.length) { case 0: while (++i < r) (n = e[i]).callback.call(n.ctx); return; case 1: while (++i < r) (n = e[i]).callback.call(n.ctx, a); return; case 2: while (++i < r) (n = e[i]).callback.call(n.ctx, a, o); return; case 3: while (++i < r) (n = e[i]).callback.call(n.ctx, a, o, s); return; default: while (++i < r) (n = e[i]).callback.apply(n.ctx, t); return } }, p; x.each({ listenTo: 'on', listenToOnce: 'once' }, function (a, e) { l[e] = function (e, t, n) { var i = this._listeningTo || (this._listeningTo = { }); var r = e._listenId || (e._listenId = x.uniqueId('l')); i[r] = e; if (!n && typeof t === 'object') n = this; e[a](t, n, this); return this } }), l.bind = l.on, l.unbind = l.off, x.extend(s, l); var E = s.Model = function (e, t) { var n = e || { }; t || (t = { }); this.cid = x.uniqueId('c'); this.attributes = { }; if (t.collection) this.collection = t.collection; if (t.parse) n = this.parse(n, t) || { }; n = x.defaults({ }, n, x.result(this, 'defaults')); this.set(n, t); this.changed = { }; this.initialize.apply(this, arguments) }, m; x.extend(E.prototype, l, { changed: null, validationError: null, idAttribute: 'id', initialize: function () { }, toJSON: function (e) { return x.clone(this.attributes) }, sync: function () { return s.sync.apply(this, arguments) }, get: function (e) { return this.attributes[e] }, escape: function (e) { return x.escape(this.get(e)) }, has: function (e) { return this.get(e) != null }, set: function (e, t, n) { var i, r, a, o, s, l, c, u; if (e == null) return this; if (typeof e === 'object') { r = e; n = t } else (r = { }) [e] = t; n || (n = { }); if (!this._validate(r, n)) return false; a = n.unset; s = n.silent; o = [ ]; l = this._changing; this._changing = true; if (!l) { this._previousAttributes = x.clone(this.attributes); this.changed = { } } u = this.attributes, c = this._previousAttributes; if (this.idAttribute in r) this.id = r[this.idAttribute]; for (i in r) { t = r[i]; if (!x.isEqual(u[i], t)) o.push(i); if (!x.isEqual(c[i], t)) this.changed[i] = t; else delete this.changed[i]; a ? delete u[i] : u[i] = t } if (!s) { if (o.length) this._pending = n; for (var d = 0, p = o.length; d < p; d++) this.trigger('change:' + o[d], this, u[o[d]], n) } if (l) return this; if (!s) while (this._pending) { n = this._pending; this._pending = false; this.trigger('change', this, n) } this._pending = false; this._changing = false; return this }, unset: function (e, t) { return this.set(e, void 0, x.extend({ }, t, { unset: true })) }, clear: function (e) { var t = { }; for (var n in this.attributes) t[n] = void 0; return this.set(t, x.extend({ }, e, { unset: true })) }, hasChanged: function (e) { if (e == null) return !x.isEmpty(this.changed); return x.has(this.changed, e) }, changedAttributes: function (e) { if (!e) return this.hasChanged() ? x.clone(this.changed) : false; var t, n = false; var i = this._changing ? this._previousAttributes : this.attributes; for (var r in e) { if (x.isEqual(i[r], t = e[r])) continue; (n || (n = { })) [r] = t } return n }, previous: function (e) { if (e == null || !this._previousAttributes) return null; return this._previousAttributes[e] }, previousAttributes: function () { return x.clone(this._previousAttributes) }, fetch: function (t) { t = t ? x.clone(t) : { }; if (t.parse === void 0) t.parse = true; var n = this; var i = t.success; t.success = function (e) { if (!n.set(n.parse(e, t), t)) return false; if (i) i(n, e, t); n.trigger('sync', n, e, t) }; G(this, t); return this.sync('read', this, t) }, save: function (e, t, n) { var i, r, a, o = this.attributes; if (e == null || typeof e === 'object') { i = e; n = t } else (i = { }) [e] = t; n = x.extend({ validate: true }, n); if (i && !n.wait) { if (!this.set(i, n)) return false } else if (!this._validate(i, n)) return false; if (i && n.wait) this.attributes = x.extend({ }, o, i); if (n.parse === void 0) n.parse = true; var s = this; var l = n.success; n.success = function (e) { s.attributes = o; var t = s.parse(e, n); if (n.wait) t = x.extend(i || { }, t); if (x.isObject(t) && !s.set(t, n)) return false; if (l) l(s, e, n); s.trigger('sync', s, e, n) }; G(this, n); r = this.isNew() ? 'create' : n.patch ? 'patch' : 'update'; if (r === 'patch') n.attrs = i; a = this.sync(r, this, n); if (i && n.wait) this.attributes = o; return a }, destroy: function (t) { t = t ? x.clone(t) : { }; var n = this; var i = t.success; var r = function () { n.trigger('destroy', n, n.collection, t) }; t.success = function (e) { if (t.wait || n.isNew()) r(); if (i) i(n, e, t); if (!n.isNew()) n.trigger('sync', n, e, t) }; if (this.isNew()) { t.success(); return false } G(this, t); var e = this.sync('delete', this, t); if (!t.wait) r(); return e }, url: function () { var e = x.result(this, 'urlRoot') || x.result(this.collection, 'url') || B(); if (this.isNew()) return e; return e.replace(/([^\/])$/, '$1/') + encodeURIComponent(this.id) }, parse: function (e, t) { return e }, clone: function () { return new this.constructor(this.attributes) }, isNew: function () { return !this.has(this.idAttribute) }, isValid: function (e) { return this._validate({ }, x.extend(e || { }, { validate: true })) }, _validate: function (e, t) { if (!t.validate || !this.validate) return true; e = x.extend({ }, this.attributes, e); var n = this.validationError = this.validate(e, t) || null; if (!n) return true; this.trigger('invalid', this, n, x.extend(t, { validationError: n })); return false } }), x.each(['keys', 'values', 'pairs', 'invert', 'pick', 'omit'], function (t) { E.prototype[t] = function () { var e = a.call(arguments); e.unshift(this.attributes); return x[t].apply(x, e) } }); var f = s.Collection = function (e, t) { t || (t = { }); if (t.model) this.model = t.model; if (t.comparator !== void 0) this.comparator = t.comparator; this._reset(); this.initialize.apply(this, arguments); if (e) this.reset(e, x.extend({ silent: true }, t)) }, C = { add: true, remove: true, merge: true }, h = { add: true, remove: false }, g, _; x.extend(f.prototype, l, { model: E, initialize: function () { }, toJSON: function (t) { return this.map(function (e) { return e.toJSON(t) }) }, sync: function () { return s.sync.apply(this, arguments) }, add: function (e, t) { return this.set(e, x.extend({ merge: false }, t, h)) }, remove: function (e, t) { var n = !x.isArray(e); e = n ? [ e ] : x.clone(e); t || (t = { }); var i, r, a, o; for (i = 0, r = e.length; i < r; i++) { o = e[i] = this.get(e[i]); if (!o) continue; delete this._byId[o.id]; delete this._byId[o.cid]; a = this.indexOf(o); this.models.splice(a, 1); this.length--; if (!t.silent) { t.index = a; o.trigger('remove', o, this, t) } this._removeReference(o, t) } return n ? e[0] : e }, set: function (e, t) { t = x.defaults({ }, t, C); if (t.parse) e = this.parse(e, t); var n = !x.isArray(e); e = n ? e ? [ e ] : [ ] : x.clone(e); var i, r, a, o, s, l, c; var u = t.at; var d = this.model; var p = this.comparator && u == null && t.sort !== false; var m = x.isString(this.comparator) ? this.comparator : null; var f = [ ], h = [ ], g = { }; var _ = t.add, y = t.merge, b = t.remove; var v = !p && _ && b ? [ ] : false; for (i = 0, r = e.length; i < r; i++) { s = e[i] || { }; if (s instanceof E) a = o = s; else a = s[d.prototype.idAttribute || 'id']; if (l = this.get(a)) { if (b) g[l.cid] = true; if (y) { s = s === o ? o.attributes : s; if (t.parse) s = l.parse(s, t); l.set(s, t); if (p && !c && l.hasChanged(m)) c = true } e[i] = l } else if (_) { o = e[i] = this._prepareModel(s, t); if (!o) continue; f.push(o); this._addReference(o, t) } o = l || o; if (v && (o.isNew() || !g[o.id])) v.push(o); g[o.id] = true } if (b) { for (i = 0, r = this.length; i < r; ++i) if (!g[(o = this.models[i]).cid]) h.push(o); if (h.length) this.remove(h, t) } if (f.length || v && v.length) { if (p) c = true; this.length += f.length; if (u != null) for (i = 0, r = f.length; i < r; i++) this.models.splice(u + i, 0, f[i]); else { if (v) this.models.length = 0; var S = v || f; for (i = 0, r = S.length; i < r; i++) this.models.push(S[i]) } } if (c) this.sort({ silent: true }); if (!t.silent) { for (i = 0, r = f.length; i < r; i++) (o = f[i]).trigger('add', o, this, t); if (c || v && v.length) this.trigger('sort', this, t) } return n ? e[0] : e }, reset: function (e, t) { t || (t = { }); for (var n = 0, i = this.models.length; n < i; n++) this._removeReference(this.models[n], t); t.previousModels = this.models; this._reset(); e = this.add(e, x.extend({ silent: true }, t)); if (!t.silent) this.trigger('reset', this, t); return e }, push: function (e, t) { return this.add(e, x.extend({ at: this.length }, t)) }, pop: function (e) { var t = this.at(this.length - 1); this.remove(t, e); return t }, unshift: function (e, t) { return this.add(e, x.extend({ at: 0 }, t)) }, shift: function (e) { var t = this.at(0); this.remove(t, e); return t }, slice: function () { return a.apply(this.models, arguments) }, get: function (e) { if (e == null) return void 0; return this._byId[e] || this._byId[e.id] || this._byId[e.cid] }, at: function (e) { return this.models[e] }, where: function (n, e) { if (x.isEmpty(n)) return e ? void 0 : [ ]; return this[e ? 'find' : 'filter'](function (e) { for (var t in n) if (n[t] !== e.get(t)) return false; return true }) }, findWhere: function (e) { return this.where(e, true) }, sort: function (e) { if (!this.comparator) throw new Error('Cannot sort a set without a comparator'); e || (e = { }); if (x.isString(this.comparator) || this.comparator.length === 1) this.models = this.sortBy(this.comparator, this); else this.models.sort(x.bind(this.comparator, this)); if (!e.silent) this.trigger('sort', this, e); return this }, pluck: function (e) { return x.invoke(this.models, 'get', e) }, fetch: function (n) { n = n ? x.clone(n) : { }; if (n.parse === void 0) n.parse = true; var i = n.success; var r = this; n.success = function (e) { var t = n.reset ? 'reset' : 'set'; r[t](e, n); if (i) i(r, e, n); r.trigger('sync', r, e, n) }; G(this, n); return this.sync('read', this, n) }, create: function (e, n) { n = n ? x.clone(n) : { }; if (!(e = this._prepareModel(e, n))) return false; if (!n.wait) this.add(e, n); var i = this; var r = n.success; n.success = function (e, t) { if (n.wait) i.add(e, n); if (r) r(e, t, n) }; e.save(null, n); return e }, parse: function (e, t) { return e }, clone: function () { return new this.constructor(this.models) }, _reset: function () { this.length = 0; this.models = [ ]; this._byId = { } }, _prepareModel: function (e, t) { if (e instanceof E) return e; t = t ? x.clone(t) : { }; t.collection = this; var n = new this.model(e, t); if (!n.validationError) return n; this.trigger('invalid', this, n.validationError, t); return false }, _addReference: function (e, t) { this._byId[e.cid] = e; if (e.id != null) this._byId[e.id] = e; if (!e.collection) e.collection = this; e.on('all', this._onModelEvent, this) }, _removeReference: function (e, t) { if (this === e.collection) delete e.collection; e.off('all', this._onModelEvent, this) }, _onModelEvent: function (e, t, n, i) { if ((e === 'add' || e === 'remove') && n !== this) return; if (e === 'destroy') this.remove(t, i); if (t && e === 'change:' + t.idAttribute) { delete this._byId[t.previous(t.idAttribute)]; if (t.id != null) this._byId[t.id] = t } this.trigger.apply(this, arguments) } }), x.each(['forEach', 'each', 'map', 'collect', 'reduce', 'foldl', 'inject', 'reduceRight', 'foldr', 'find', 'detect', 'filter', 'select', 'reject', 'every', 'all', 'some', 'any', 'include', 'contains', 'invoke', 'max', 'min', 'toArray', 'size', 'first', 'head', 'take', 'initial', 'rest', 'tail', 'drop', 'last', 'without', 'difference', 'indexOf', 'shuffle', 'lastIndexOf', 'isEmpty', 'chain', 'sample'], function (t) { f.prototype[t] = function () { var e = a.call(arguments); e.unshift(this.models); return x[t].apply(x, e) } }), x.each(['groupBy', 'countBy', 'sortBy', 'indexBy'], function (i) { f.prototype[i] = function (t, e) { var n = x.isFunction(t) ? t : function (e) { return e.get(t) }; return x[i](this.models, n, e) } }); var y = s.View = function (e) { this.cid = x.uniqueId('view'); e || (e = { }); x.extend(this, x.pick(e, v)); this._ensureElement(); this.initialize.apply(this, arguments); this.delegateEvents() }, b = /^(\S+)\s*(.*)$/, v = [ 'model', 'collection', 'el', 'id', 'attributes', 'className', 'tagName', 'events' ]; x.extend(y.prototype, l, { tagName: 'div', $: function (e) { return this.$el.find(e) }, initialize: function () { }, render: function () { return this }, remove: function () { this.$el.remove(); this.stopListening(); return this }, setElement: function (e, t) { if (this.$el) this.undelegateEvents(); this.$el = e instanceof s.$ ? e : s.$(e); this.el = this.$el[0]; if (t !== false) this.delegateEvents(); return this }, delegateEvents: function (e) { if (!(e || (e = x.result(this, 'events')))) return this; this.undelegateEvents(); for (var t in e) { var n = e[t]; if (!x.isFunction(n)) n = this[e[t]]; if (!n) continue; var i = t.match(b); var r = i[1], a = i[2]; n = x.bind(n, this); r += '.delegateEvents' + this.cid; if (a === '') this.$el.on(r, n); else this.$el.on(r, a, n) } return this }, undelegateEvents: function () { this.$el.off('.delegateEvents' + this.cid); return this }, _ensureElement: function () { if (!this.el) { var e = x.extend({ }, x.result(this, 'attributes')); if (this.id) e.id = x.result(this, 'id'); if (this.className) e['class'] = x.result(this, 'className'); var t = s.$('<' + x.result(this, 'tagName') + '>').attr(e); this.setElement(t, false) } else this.setElement(x.result(this, 'el'), false) } }), s.sync = function (e, t, n) { var i = w[e]; x.defaults(n || (n = { }), { emulateHTTP: s.emulateHTTP, emulateJSON: s.emulateJSON }); var r = { type: i, dataType: 'json' }; if (!n.url) r.url = x.result(t, 'url') || B(); if (n.data == null && t && (e === 'create' || e === 'update' || e === 'patch')) { r.contentType = 'application/json'; r.data = JSON.stringify(n.attrs || t.toJSON(n)) } if (n.emulateJSON) { r.contentType = 'application/x-www-form-urlencoded'; r.data = r.data ? { model: r.data } : { } } if (n.emulateHTTP && (i === 'PUT' || i === 'DELETE' || i === 'PATCH')) { r.type = 'POST'; if (n.emulateJSON) r.data._method = i; var a = n.beforeSend; n.beforeSend = function (e) { e.setRequestHeader('X-HTTP-Method-Override', i); if (a) return a.apply(this, arguments) } } if (r.type !== 'GET' && !n.emulateJSON) r.processData = false; if (r.type === 'PATCH' && S) r.xhr = function () { return new ActiveXObject('Microsoft.XMLHTTP') }; var o = n.xhr = s.ajax(x.extend(r, n)); t.trigger('request', t, o, n); return o }; var S = typeof window !== 'undefined' && !!window.ActiveXObject && !(window.XMLHttpRequest && (new XMLHttpRequest).dispatchEvent), w = { create: 'POST', update: 'PUT', patch: 'PATCH', delete : 'DELETE', read: 'GET' }; s.ajax = function () { return s.$.ajax.apply(s.$, arguments) }; var T = s.Router = function (e) { e || (e = { }); if (e.routes) this.routes = e.routes; this._bindRoutes(); this.initialize.apply(this, arguments) }, O = /\((.*?)\)/g, M = /(\(\?)?:\w+/g, A = /\*\w+/g, N = /[\-{}\[\]+?.,\\\^$|#\s]/g; x.extend(T.prototype, l, { initialize: function () { }, route: function (n, i, r) { if (!x.isRegExp(n)) n = this._routeToRegExp(n); if (x.isFunction(i)) { r = i; i = '' } if (!r) r = this[i]; var a = this; s.history.route(n, function (e) { var t = a._extractParameters(n, e); a.execute(r, t); a.trigger.apply(a, [ 'route:' + i ].concat(t)); a.trigger('route', i, t); s.history.trigger('route', a, i, t) }); return this }, execute: function (e, t) { if (e) e.apply(this, t) }, navigate: function (e, t) { s.history.navigate(e, t); return this }, _bindRoutes: function () { if (!this.routes) return; this.routes = x.result(this, 'routes'); var e, t = x.keys(this.routes); while ((e = t.pop()) != null) this.route(e, this.routes[e]) }, _routeToRegExp: function (e) { e = e.replace(N, '\\$&').replace(O, '(?:$1)?').replace(M, function (e, t) { return t ? e : '([^/?]+)' }).replace(A, '([^?]*?)'); return new RegExp('^' + e + '(?:\\?([\\s\\S]*))?$') }, _extractParameters: function (e, t) { var n = e.exec(t).slice(1); return x.map(n, function (e, t) { if (t === n.length - 1) return e || null; return e ? decodeURIComponent(e) : null }) } }); var D = s.History = function () { this.handlers = [ ]; x.bindAll(this, 'checkUrl'); if (typeof window !== 'undefined') { this.location = window.location; this.history = window.history } }, k = /^[#\/]|\s+$/g, P = /^\/+|\/+$/g, L = /msie [\w.]+/, R = /\/$/, I = /#.*$/, F; D.started = false, x.extend(D.prototype, l, { interval: 50, atRoot: function () { return this.location.pathname.replace(/[^\/]$/, '$&/') === this.root }, getHash: function (e) { var t = (e || this).location.href.match(/#(.*)$/); return t ? t[1] : '' }, getFragment: function (e, t) { if (e == null) if (this._hasPushState || !this._wantsHashChange || t) { e = decodeURI(this.location.pathname + this.location.search); var n = this.root.replace(R, ''); if (!e.indexOf(n)) e = e.slice(n.length) } else e = this.getHash(); return e.replace(k, '') }, start: function (e) { if (D.started) throw new Error('Backbone.history has already been started'); D.started = true; this.options = x.extend({ root: '/' }, this.options, e); this.root = this.options.root; this._wantsHashChange = this.options.hashChange !== false; this._wantsPushState = !!this.options.pushState; this._hasPushState = !!(this.options.pushState && this.history && this.history.pushState); var t = this.getFragment(); var n = document.documentMode; var i = L.exec(navigator.userAgent.toLowerCase()) && (!n || n <= 7); this.root = ('/' + this.root + '/').replace(P, '/'); if (i && this._wantsHashChange) { var r = s.$('