monte
Version:
A visualization framework for D3.js and SVG. Ships with prebuilt charts and components.
2 lines • 188 kB
JavaScript
// https://github.com/YellowTugboat/monte#readme Version 0.0.0-alpha28 Copyright 2017 Yellow Tugboat
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.monte=t.monte||{})}(this,function(t){"use strict";function e(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=Array(i);++r<i;)o[r]=t[r+e];return o}function n(t,n,r){var i=t.length;return r=void 0===r?i:r,!n&&r>=i?t:e(t,n,r)}function r(t){return ln.test(t)}function i(t){return t.split("")}function o(t){return t.match(vn)||[]}function a(t){return r(t)?o(t):i(t)}function s(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function l(t){var e=xn.call(t,On),n=t[On];try{t[On]=void 0;var r=!0}catch(t){}var i=An.call(t);return r&&(e?t[On]=n:delete t[On]),i}function u(t){return In.call(t)}function c(t){return null==t?void 0===t?En:Cn:Pn&&Pn in Object(t)?l(t):u(t)}function p(t){return null!=t&&"object"==(void 0===t?"undefined":Xe(t))}function h(t){return"symbol"==(void 0===t?"undefined":Xe(t))||p(t)&&c(t)==Rn}function d(t){if("string"==typeof t)return t;if(kn(t))return s(t,d)+"";if(h(t))return Tn?Tn.call(t):"";var e=t+"";return"0"==e&&1/t==-wn?"-0":e}function f(t){return null==t?"":d(t)}function y(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function v(t){return(t=f(t))&&t.replace(Ln,Dn).replace(Fn,"")}function _(t){return t.match(Bn)||[]}function g(t){return Un.test(t)}function b(t){return t.match(Zn)||[]}function m(t,e,n){return t=f(t),void 0===(e=n?void 0:e)?g(t)?b(t):_(t):t.match(e)||[]}function k(t){return function(e){return y(m(v(e).replace($n,"")),t,"")}}function S(t){return zn(f(t).toLowerCase())}function x(t,e){return t===e||t!==t&&e!==e}function A(t,e){for(var n=t.length;n--;)if(x(t[n][0],e))return n;return-1}function O(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function I(t){var e=void 0===t?"undefined":Xe(t);return null!=t&&("object"==e||"function"==e)}function C(t){if(!I(t))return!1;var e=c(t);return e==nr||e==rr||e==er||e==ir}function E(t){return!!ar&&ar in t}function P(t){if(null!=t){try{return sr.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function R(t){return!(!I(t)||E(t))&&(C(t)?fr:ur).test(P(t))}function w(t,e){return null==t?void 0:t[e]}function j(t,e){var n=w(t,e);return R(n)?n:void 0}function T(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function z(t){var e=void 0===t?"undefined":Xe(t);return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}function D(t,e){var n=t.__data__;return z(e)?n["string"==typeof e?"string":"hash"]:n.map}function L(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function F(t){var e=this.__data__=new O(t);this.size=e.size}function B(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new L;++e<n;)this.add(t[e])}function U(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function M(t,e){return t.has(e)}function N(t,e,n,r,i,o){var a=n&xr,s=t.length,l=e.length;if(s!=l&&!(a&&l>s))return!1;var u=o.get(t);if(u&&o.get(e))return u==e;var c=-1,p=!0,h=n&Ar?new B:void 0;for(o.set(t,e),o.set(e,t);++c<s;){var d=t[c],f=e[c];if(r)var y=a?r(f,d,c,e,t,o):r(d,f,c,t,e,o);if(void 0!==y){if(y)continue;p=!1;break}if(h){if(!U(e,function(t,e){if(!M(h,e)&&(d===t||i(d,t,n,r,o)))return h.push(e)})){p=!1;break}}else if(d!==f&&!i(d,f,n,r,o)){p=!1;break}}return o.delete(t),o.delete(e),p}function Y(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function H(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function W(t,e,n,r,i,o,a){switch(n){case Br:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Fr:return!(t.byteLength!=e.byteLength||!o(new Or(t),new Or(e)));case Er:case Pr:case jr:return x(+t,+e);case Rr:return t.name==e.name&&t.message==e.message;case Tr:case Dr:return t==e+"";case wr:var s=Y;case zr:var l=r&Ir;if(s||(s=H),t.size!=e.size&&!l)return!1;var u=a.get(t);if(u)return u==e;r|=Cr,a.set(t,e);var c=N(s(t),s(e),r,i,o,a);return a.delete(t),c;case Lr:if(Mr)return Mr.call(t)==Mr.call(e)}return!1}function V(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function X(t,e,n){var r=e(t);return kn(t)?r:V(r,n(t))}function G(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}function K(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function Z(t){return p(t)&&c(t)==Wr}function $(t,e){return!!(e=null==e?Qr:e)&&("number"==typeof t||ti.test(t))&&t>-1&&t%1==0&&t<e}function q(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=ei}function J(t,e){var n=kn(t),r=!n&&Kr(t),i=!n&&!r&&Jr(t),o=!n&&!r&&!i&&li(t),a=n||r||i||o,s=a?K(t.length,String):[],l=s.length;for(var u in t)!e&&!ui.call(t,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||$(u,l))||s.push(u);return s}function Q(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||ci)}function tt(t,e){return function(n){return t(e(n))}}function et(t){if(!Q(t))return pi(t);var e=[];for(var n in Object(t))hi.call(t,n)&&"constructor"!=n&&e.push(n);return e}function nt(t){return null!=t&&q(t.length)&&!C(t)}function rt(t){return nt(t)?J(t):et(t)}function it(t){return X(t,rt,Hr)}function ot(t,e,n,r,i,o){var a=n&di,s=it(t),l=s.length;if(l!=it(e).length&&!a)return!1;for(var u=l;u--;){var c=s[u];if(!(a?c in e:fi.call(e,c)))return!1}var p=o.get(t);if(p&&o.get(e))return p==e;var h=!0;o.set(t,e),o.set(e,t);for(var d=a;++u<l;){var f=t[c=s[u]],y=e[c];if(r)var v=a?r(y,f,c,e,t,o):r(f,y,c,t,e,o);if(!(void 0===v?f===y||i(f,y,n,r,o):v)){h=!1;break}d||(d="constructor"==c)}if(h&&!d){var _=t.constructor,g=e.constructor;_!=g&&"constructor"in t&&"constructor"in e&&!("function"==typeof _&&_ instanceof _&&"function"==typeof g&&g instanceof g)&&(h=!1)}return o.delete(t),o.delete(e),h}function at(t,e,n,r,i,o){var a=kn(t),s=kn(e),l=a?Ei:Oi(t),u=s?Ei:Oi(e),c=(l=l==Ci?Pi:l)==Pi,p=(u=u==Ci?Pi:u)==Pi,h=l==u;if(h&&Jr(t)){if(!Jr(e))return!1;a=!0,c=!1}if(h&&!c)return o||(o=new F),a||li(t)?N(t,e,n,r,i,o):W(t,e,l,n,r,i,o);if(!(n&Ii)){var d=c&&Ri.call(t,"__wrapped__"),f=p&&Ri.call(e,"__wrapped__");if(d||f){var y=d?t.value():t,v=f?e.value():e;return o||(o=new F),i(y,v,n,r,o)}}return!!h&&(o||(o=new F),ot(t,e,n,r,i,o))}function st(t,e,n,r,i){return t===e||(null==t||null==e||!p(t)&&!p(e)?t!==t&&e!==e:at(t,e,n,r,st,i))}function lt(t){return kn(t)||Kr(t)||!!(wi&&t&&t[wi])}function ut(t,e,n,r,i){var o=-1,a=t.length;for(n||(n=lt),i||(i=[]);++o<a;){var s=t[o];e>0&&n(s)?e>1?ut(s,e-1,n,r,i):V(i,s):r||(i[i.length]=s)}return i}function ct(t,e){return null!=t&&Ti.call(t,e)}function pt(t,e){if(kn(t))return!1;var n=void 0===t?"undefined":Xe(t);return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!h(t))||(Di.test(t)||!zi.test(t)||null!=e&&t in Object(e))}function ht(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError(Li);var n=function n(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(ht.Cache||L),n}function dt(t,e){return kn(t)?t:pt(t,e)?[t]:Ni(f(t))}function ft(t){if("string"==typeof t||h(t))return t;var e=t+"";return"0"==e&&1/t==-Yi?"-0":e}function yt(t,e,n){for(var r=-1,i=(e=dt(e,t)).length,o=!1;++r<i;){var a=ft(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&q(i)&&$(a,i)&&(kn(t)||Kr(t))}function vt(t,e){for(var n=0,r=(e=dt(e,t)).length;null!=t&&n<r;)t=t[ft(e[n++])];return n&&n==r?t:void 0}function _t(t,e,n){"__proto__"==e&&Hi?Hi(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function gt(t,e,n){var r=t[e];Wi.call(t,e)&&x(r,n)&&(void 0!==n||e in t)||_t(t,e,n)}function bt(t,e,n,r){if(!I(t))return t;for(var i=-1,o=(e=dt(e,t)).length,a=o-1,s=t;null!=s&&++i<o;){var l=ft(e[i]),u=n;if(i!=a){var c=s[l];void 0===(u=r?r(c,l,s):void 0)&&(u=I(c)?c:$(e[i+1])?[]:{})}gt(s,l,u),s=s[l]}return t}function mt(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function kt(t){return t}function St(t,e,n){return e=Vi(void 0===e?t.length-1:e,0),function(){for(var r=arguments,i=-1,o=Vi(r.length-e,0),a=Array(o);++i<o;)a[i]=r[e+i];i=-1;for(var s=Array(e+1);++i<e;)s[i]=r[i];return s[e]=n(a),mt(t,this,s)}}function xt(t){return function(){return t}}function At(t,e){return $i(St(t,e,kt),t+"")}function Ot(t,e,n){(void 0===n||x(t[e],n))&&(void 0!==n||e in t)||_t(t,e,n)}function It(t,e){if(e)return t.slice();var n=t.length,r=eo?eo(n):new t.constructor(n);return t.copy(r),r}function Ct(t){var e=new t.constructor(t.byteLength);return new Or(e).set(new Or(t)),e}function Et(t,e){var n=e?Ct(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Pt(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}function Rt(t){return"function"!=typeof t.constructor||Q(t)?{}:ro(io(t))}function wt(t){return p(t)&&nt(t)}function jt(t){if(!p(t)||c(t)!=oo)return!1;var e=io(t);if(null===e)return!0;var n=uo.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&lo.call(n)==co}function Tt(t,e,n,r){var i=!n;n||(n={});for(var o=-1,a=e.length;++o<a;){var s=e[o],l=r?r(n[s],t[s],s,n,t):void 0;void 0===l&&(l=t[s]),i?_t(n,s,l):gt(n,s,l)}return n}function zt(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}function Dt(t){if(!I(t))return zt(t);var e=Q(t),n=[];for(var r in t)("constructor"!=r||!e&&po.call(t,r))&&n.push(r);return n}function Lt(t){return nt(t)?J(t,!0):Dt(t)}function Ft(t){return Tt(t,Lt(t))}function Bt(t,e,n,r,i,o,a){var s=t[n],l=e[n],u=a.get(l);if(u)Ot(t,n,u);else{var c=o?o(s,l,n+"",t,e,a):void 0,p=void 0===c;if(p){var h=kn(l),d=!h&&Jr(l),f=!h&&!d&&li(l);c=l,h||d||f?kn(s)?c=s:wt(s)?c=Pt(s):d?(p=!1,c=It(l,!0)):f?(p=!1,c=Et(l,!0)):c=[]:jt(l)||Kr(l)?(c=s,Kr(s)?c=Ft(s):(!I(s)||r&&C(s))&&(c=Rt(l))):p=!1}p&&(a.set(l,c),i(c,l,r,o,a),a.delete(l)),Ot(t,n,c)}}function Ut(t,e,n,r,i){t!==e&&qi(e,function(o,a){if(I(o))i||(i=new F),Bt(t,e,a,n,Ut,r,i);else{var s=r?r(t[a],o,a+"",t,e,i):void 0;void 0===s&&(s=o),Ot(t,a,s)}},Lt)}function Mt(t,e,n,r,i,o){return I(t)&&I(e)&&(o.set(e,t),Ut(t,e,void 0,Mt,o),o.delete(e)),t}function Nt(t,e,n){if(!I(n))return!1;var r=void 0===e?"undefined":Xe(e);return!!("number"==r?nt(n)&&$(e,n.length):"string"==r&&e in n)&&x(n[e],t)}function Yt(){}function Ht(t){return"number"==typeof t&&isFinite(t)}function Wt(t){return Ht(t)||Vt(t)&&Ht(+t)}function Vt(t){return"string"==typeof t}function Xt(t){return"function"==typeof t}function Gt(t){return t===Yt}function Kt(t){return null!==t&&"object"===(void 0===t?"undefined":Xe(t))&&!Zt(t)}function Zt(t){return Array.isArray(t)}function $t(t){return null!==t&&t!==Ao}function qt(t,e,n,r){if(t){for(var i=e.length-1;i>=0;i--){var o=e.slice(0,i+1).join(".");if(o&&(o+="."),o+=n,_o(t,o))return vo(t,o)}for(var a=0;a<e.length;a++){var s=e.slice(a+1).join(".");if(s&&(s+="."),s+=n,_o(t,s))return vo(t,s)}}return r}function Jt(t){return t instanceof Fo?t.value:t}function Qt(t){var e=null;if(Array.isArray(t)){for(var n=-1,r=t.length-1;r>=0;r--)if(t[r]instanceof Bo){n=r;break}e=-1!==n?t.slice(n):t;for(var i=0;i<e.length;i++)e[i]=Jt(e[i])}else e=Jt(t);return e}function te(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=fo.apply(void 0,[{}].concat(e));for(var i in r)r.hasOwnProperty(i)&&(r[i]=Qt(r[i]));return r}function ee(t){var e=+t;if(!Ht(e))throw new Io("Cannot get chart clipPath ID. The chart ID must be numeric.");return Yo+e}function ne(t,e){return t&&t.id||e}function re(){for(var t=[],e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];for(var i=0;i<n.length;i++){var o=n[i],a=!0,s=!1,l=void 0;try{for(var u,c=tn[Symbol.iterator]();!(a=(u=c.next()).done);a=!0){var p=u.value;t.push(o+":"+p)}}catch(t){s=!0,l=t}finally{try{!a&&c.return&&c.return()}finally{if(s)throw l}}}return t}function ie(t){t&&t.domain&&t.domain([])}function oe(t){return xo(mo(t))}function ae(t){return[0,t[1]]}function se(t){var e=t[0],n=t[1];if(e>=0)return[0,n];if(e<0&&n<0)return[e,0];var r=Math.abs(e),i=Math.abs(n),o=i>r?i:r;return[-o,o]}function le(t,e){var n=[];for(var r in t)t.hasOwnProperty(r)&&r!==e&&n.push(t[r]);return n}function ue(t,e,n){var r=this.tryInvoke(this.opts.arrangement.columnIndex,t,e,n),i=this.tryInvoke(this.opts.arrangement.rowIndex,t,e,n);return"translate("+this.getScaledProp("x",r)+", "+this.getScaledProp("y",i)+")"}function ce(t,e,n){var r=this.tryInvoke(this.opts.arrangement.columnIndex,t,e,n),i=this.tryInvoke(this.opts.arrangement.rowIndex,t,e,n),o=this.getScaledProp("x",r),a=this.getScaledProp("y",i);return"translate("+(o-this.opts.iconSvgWidth/2)+", "+(a-this.opts.iconSvgHeight/2)+")"}function pe(t,e){var n=(t-e)/Da;return Number.isInteger(n)}function he(t,e){var n=e-za;return[Math.cos(n)*t,Math.sin(n)*t]}function de(t){return t*(180/Ta)}function fe(t,e){return(t+e)/2}function ye(t){return fe(t.startAngle,t.endAngle)}function ve(t,e,n){var r=d3.interpolate(e,n);return function(e){return t(r(e))}}function _e(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;t||(t={angle:0,radius:n,rotate:0});var r=d3.interpolateObject(t,e);return function(t){var e=r(t);return"translate("+he(e.radius,e.angle)+") rotate("+(e.rotate||0)+")"}}function ge(){return Ba.CENTROID}function be(){return Ba.INNER}function me(){return Ba.OUTER}function ke(t){return Ht(+t)?{startAngle:t,endAngle:t}:t}function Se(t){return t}function xe(t){var e=Math.abs(t);return e>za&&e<=3*za&&(t-=Ta),t}function Ae(t){return t-za}function Oe(t){return t-za-Ta}function Ie(t){return t<=0&&t>=-Ta||t>Ta?t+za:t>0&&t<=Ta||t<-Ta?t-za:t}function Ce(){return 0}function Ee(t){return xe(ye(ke(t)))}function Pe(t){return xe(ke(t).endAngle)}function Re(){return Ce()}function we(t,e){var n=t/2,r=e/2;return n<r?n:r}function je(t){$t(t)||(t="");var e=/(.*?\(.*?\))/,n={},r=/(.*?)\((.*?)\)\s*/;return t.split(e).filter(function(t){return!!t}).forEach(function(t){var e=r.exec(t.trim());if(e)for(var i=1;i<e.length;i+=2){var o=e[i],a=e[i+1].trim();if((a.indexOf(" ")>-1||a.indexOf(",")>-1)&&(a=a.split(/,\s*|\s+/)),Zt(a))for(var s=0;s<a.length;s++)a[s]=Wt(a[s])?+a[s]:a[s];else Wt(a)&&(a=+a);n[o]=a}}),n}function Te(t){var e=[],n=[];for(var r in t)t.hasOwnProperty(r)&&n.push(r);return n.sort(),n.forEach(function(n){var r=Zt(t[n])?t[n].join(", "):t[n];e.push(n+"("+r+")")}),e.join(" ")}function ze(t,e){var n=t.node().getAttribute("class").trim().split(/^|\s+/),r=void 0;if("string"==typeof e)r=new RegExp(e);else{if(!(e instanceof RegExp))throw Io.InvalidArgumentType("removeClassByPattern","pattern","String or RegExp",e);r=e}n.forEach(function(e){r.test(e)&&t.classed(e,!1)})}function De(){return function(t,e){var n=e/2;return["M","-"+n+" 0","0 -"+t,n+" 0","A",[n+" "+n,0,0,1,"-"+n+" 0"].join(","),"Z"].join(" ")}}function Le(t,e,n,r){for(var i=null,o=0;o<t.length;o++)if(t[o]&&t[o][e]===n){i=t[o][r];break}return i}function Fe(t,e,n){t.each(function(){for(var t=d3.select(this),r=t.text().split(/\s+/).reverse(),i=t.attr("y"),o=parseFloat(t.attr("dy")),a=[],s=t.text(null).append("tspan").attr("x",0).attr("y",i).attr("dy",o+"em"),l=0,u=r.pop();u;)a.push(u),s.text(a.join(" ")),s.node().getComputedTextLength()>e&&(a.pop(),s.text(a.join(" ")),a=[u],++l,s=t.append("tspan").attr("x",0).attr("y",i).attr("dy",l*n+o+"em").text(u)),u=r.pop()})}function Be(t,e,n){t.each(function(){for(var t=d3.select(this),r=t.node(),i=e<1?1:e,o=t.text(),a=t.text(),s=!1;r.getComputedTextLength()>i;)a=a.slice(0,-1),t.text(a+n),s=!0;s&&t.append("title").text(o)})}function Ue(t){var e=window.getComputedStyle(t,null);return parseFloat(e.getPropertyValue("font-size"),10)}function Me(t,e){return(t+e)/2}function Ne(t){var e=this.width||0;t.attr("transform","translate("+e/2+", 30)").style("text-anchor","middle")}function Ye(t){var e=this.height||0;t.attr("transform","translate(-30, "+e/2+"), rotate(-90)").style("text-anchor","middle")}function He(t,e){var n=parseFloat(t.getPropertyValue(e),10);return isNaN(n)?0:n}function We(t){var e=window.getComputedStyle(t,null);return{rect:t.getBoundingClientRect(),style:e,pl:He(e,"padding-left"),pr:He(e,"padding-right"),pt:He(e,"padding-top"),pb:He(e,"padding-bottom")}}var Ve,Xe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},Ge=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},Ke=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),Ze=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},$e=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},qe=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)},Je=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},Qe=function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)},tn=["click","touchstart","touchend","mouseover","mouseout"],en=["touchstart","mouseover"],nn=["touchend","mouseout"],rn=["suppressedError","extension"],on=["beforeRender","rendered","beforeUpdate","updated","beforeBoundsUpdate","boundsUpdated","beforeClear","cleared","beforeStyleDomainsReset","styleDomainsReset","beforeOptionChange","optionChanged","beforeDestroy","destroyed"],an=["beforeUpdate","updated","beforeClear","cleared","beforeOptionChange","optionChanged","beforeDestroy","destroyed"],sn=(Ve={},Ze(Ve,"mouseover",{action:"add",css:"over"}),Ze(Ve,"mouseout",{action:"remove",css:"over"}),Ze(Ve,"touchstart",{action:"add",css:"touch"}),Ze(Ve,"touchend",{action:"remove",css:"touch"}),Ve),ln=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),un="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",cn="\\ud83c[\\udffb-\\udfff]",pn="(?:\\ud83c[\\udde6-\\uddff]){2}",hn="[\\ud800-\\udbff][\\udc00-\\udfff]",dn="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",fn="[\\ufe0e\\ufe0f]?"+dn+("(?:\\u200d(?:"+["[^\\ud800-\\udfff]",pn,hn].join("|")+")[\\ufe0e\\ufe0f]?"+dn+")*"),yn="(?:"+["[^\\ud800-\\udfff]"+un+"?",un,pn,hn,"[\\ud800-\\udfff]"].join("|")+")",vn=RegExp(cn+"(?="+cn+")|"+yn+fn,"g"),_n="object"==("undefined"==typeof global?"undefined":Xe(global))&&global&&global.Object===Object&&global,gn="object"==("undefined"==typeof self?"undefined":Xe(self))&&self&&self.Object===Object&&self,bn=_n||gn||Function("return this")(),mn=bn.Symbol,kn=Array.isArray,Sn=Object.prototype,xn=Sn.hasOwnProperty,An=Sn.toString,On=mn?mn.toStringTag:void 0,In=Object.prototype.toString,Cn="[object Null]",En="[object Undefined]",Pn=mn?mn.toStringTag:void 0,Rn="[object Symbol]",wn=1/0,jn=mn?mn.prototype:void 0,Tn=jn?jn.toString:void 0,zn=function(t){return function(e){var i=r(e=f(e))?a(e):void 0,o=i?i[0]:e.charAt(0),s=i?n(i,1).join(""):e.slice(1);return o[t]()+s}}("toUpperCase"),Dn=function(t){return function(e){return null==t?void 0:t[e]}}({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Ln=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Fn=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g"),Bn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Un=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Mn="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Nn="["+Mn+"]",Yn="[a-z\\xdf-\\xf6\\xf8-\\xff]",Hn="[^\\ud800-\\udfff"+Mn+"\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",Wn="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Vn="(?:"+Yn+"|"+Hn+")",Xn="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",Gn="[\\ufe0e\\ufe0f]?"+Xn+("(?:\\u200d(?:"+["[^\\ud800-\\udfff]","(?:\\ud83c[\\udde6-\\uddff]){2}","[\\ud800-\\udbff][\\udc00-\\udfff]"].join("|")+")[\\ufe0e\\ufe0f]?"+Xn+")*"),Kn="(?:"+["[\\u2700-\\u27bf]","(?:\\ud83c[\\udde6-\\uddff]){2}","[\\ud800-\\udbff][\\udc00-\\udfff]"].join("|")+")"+Gn,Zn=RegExp([Wn+"?"+Yn+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[Nn,Wn,"$"].join("|")+")","(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[Nn,Wn+Vn,"$"].join("|")+")",Wn+"?"+Vn+"+(?:['’](?:d|ll|m|re|s|t|ve))?",Wn+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)","\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)","\\d+",Kn].join("|"),"g"),$n=RegExp("['’]","g"),qn=k(function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}),Jn=k(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),Qn=k(function(t,e,n){return e=e.toLowerCase(),t+(n?S(e):e)}),tr=Array.prototype.splice;O.prototype.clear=function(){this.__data__=[],this.size=0},O.prototype.delete=function(t){var e=this.__data__,n=A(e,t);return!(n<0||(n==e.length-1?e.pop():tr.call(e,n,1),--this.size,0))},O.prototype.get=function(t){var e=this.__data__,n=A(e,t);return n<0?void 0:e[n][1]},O.prototype.has=function(t){return A(this.__data__,t)>-1},O.prototype.set=function(t,e){var n=this.__data__,r=A(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var er="[object AsyncFunction]",nr="[object Function]",rr="[object GeneratorFunction]",ir="[object Proxy]",or=bn["__core-js_shared__"],ar=function(){var t=/[^.]+$/.exec(or&&or.keys&&or.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),sr=Function.prototype.toString,lr=/[\\^$.*+?()[\]{}|]/g,ur=/^\[object .+?Constructor\]$/,cr=Function.prototype,pr=Object.prototype,hr=cr.toString,dr=pr.hasOwnProperty,fr=RegExp("^"+hr.call(dr).replace(lr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),yr=j(bn,"Map"),vr=j(Object,"create"),_r="__lodash_hash_undefined__",gr=Object.prototype.hasOwnProperty,br=Object.prototype.hasOwnProperty,mr="__lodash_hash_undefined__";T.prototype.clear=function(){this.__data__=vr?vr(null):{},this.size=0},T.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},T.prototype.get=function(t){var e=this.__data__;if(vr){var n=e[t];return n===_r?void 0:n}return gr.call(e,t)?e[t]:void 0},T.prototype.has=function(t){var e=this.__data__;return vr?void 0!==e[t]:br.call(e,t)},T.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=vr&&void 0===e?mr:e,this},L.prototype.clear=function(){this.size=0,this.__data__={hash:new T,map:new(yr||O),string:new T}},L.prototype.delete=function(t){var e=D(this,t).delete(t);return this.size-=e?1:0,e},L.prototype.get=function(t){return D(this,t).get(t)},L.prototype.has=function(t){return D(this,t).has(t)},L.prototype.set=function(t,e){var n=D(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};var kr=200;F.prototype.clear=function(){this.__data__=new O,this.size=0},F.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},F.prototype.get=function(t){return this.__data__.get(t)},F.prototype.has=function(t){return this.__data__.has(t)},F.prototype.set=function(t,e){var n=this.__data__;if(n instanceof O){var r=n.__data__;if(!yr||r.length<kr-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new L(r)}return n.set(t,e),this.size=n.size,this};var Sr="__lodash_hash_undefined__";B.prototype.add=B.prototype.push=function(t){return this.__data__.set(t,Sr),this},B.prototype.has=function(t){return this.__data__.has(t)};var xr=1,Ar=2,Or=bn.Uint8Array,Ir=1,Cr=2,Er="[object Boolean]",Pr="[object Date]",Rr="[object Error]",wr="[object Map]",jr="[object Number]",Tr="[object RegExp]",zr="[object Set]",Dr="[object String]",Lr="[object Symbol]",Fr="[object ArrayBuffer]",Br="[object DataView]",Ur=mn?mn.prototype:void 0,Mr=Ur?Ur.valueOf:void 0,Nr=Object.prototype.propertyIsEnumerable,Yr=Object.getOwnPropertySymbols,Hr=Yr?function(t){return null==t?[]:(t=Object(t),G(Yr(t),function(e){return Nr.call(t,e)}))}:function(){return[]},Wr="[object Arguments]",Vr=Object.prototype,Xr=Vr.hasOwnProperty,Gr=Vr.propertyIsEnumerable,Kr=Z(function(){return arguments}())?Z:function(t){return p(t)&&Xr.call(t,"callee")&&!Gr.call(t,"callee")},Zr="object"==(void 0===t?"undefined":Xe(t))&&t&&!t.nodeType&&t,$r=Zr&&"object"==("undefined"==typeof module?"undefined":Xe(module))&&module&&!module.nodeType&&module,qr=$r&&$r.exports===Zr?bn.Buffer:void 0,Jr=(qr?qr.isBuffer:void 0)||function(){return!1},Qr=9007199254740991,ti=/^(?:0|[1-9]\d*)$/,ei=9007199254740991,ni={};ni["[object Float32Array]"]=ni["[object Float64Array]"]=ni["[object Int8Array]"]=ni["[object Int16Array]"]=ni["[object Int32Array]"]=ni["[object Uint8Array]"]=ni["[object Uint8ClampedArray]"]=ni["[object Uint16Array]"]=ni["[object Uint32Array]"]=!0,ni["[object Arguments]"]=ni["[object Array]"]=ni["[object ArrayBuffer]"]=ni["[object Boolean]"]=ni["[object DataView]"]=ni["[object Date]"]=ni["[object Error]"]=ni["[object Function]"]=ni["[object Map]"]=ni["[object Number]"]=ni["[object Object]"]=ni["[object RegExp]"]=ni["[object Set]"]=ni["[object String]"]=ni["[object WeakMap]"]=!1;var ri="object"==(void 0===t?"undefined":Xe(t))&&t&&!t.nodeType&&t,ii=ri&&"object"==("undefined"==typeof module?"undefined":Xe(module))&&module&&!module.nodeType&&module,oi=ii&&ii.exports===ri&&_n.process,ai=function(){try{return oi&&oi.binding&&oi.binding("util")}catch(t){}}(),si=ai&&ai.isTypedArray,li=si?function(t){return function(e){return t(e)}}(si):function(t){return p(t)&&q(t.length)&&!!ni[c(t)]},ui=Object.prototype.hasOwnProperty,ci=Object.prototype,pi=tt(Object.keys,Object),hi=Object.prototype.hasOwnProperty,di=1,fi=Object.prototype.hasOwnProperty,yi=j(bn,"DataView"),vi=j(bn,"Promise"),_i=j(bn,"Set"),gi=j(bn,"WeakMap"),bi=P(yi),mi=P(yr),ki=P(vi),Si=P(_i),xi=P(gi),Ai=c;(yi&&"[object DataView]"!=Ai(new yi(new ArrayBuffer(1)))||yr&&"[object Map]"!=Ai(new yr)||vi&&"[object Promise]"!=Ai(vi.resolve())||_i&&"[object Set]"!=Ai(new _i)||gi&&"[object WeakMap]"!=Ai(new gi))&&(Ai=function(t){var e=c(t),n="[object Object]"==e?t.constructor:void 0,r=n?P(n):"";if(r)switch(r){case bi:return"[object DataView]";case mi:return"[object Map]";case ki:return"[object Promise]";case Si:return"[object Set]";case xi:return"[object WeakMap]"}return e});var Oi=Ai,Ii=1,Ci="[object Arguments]",Ei="[object Array]",Pi="[object Object]",Ri=Object.prototype.hasOwnProperty,wi=mn?mn.isConcatSpreadable:void 0,ji=1/0,Ti=Object.prototype.hasOwnProperty,zi=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Di=/^\w*$/,Li="Expected a function";ht.Cache=L;var Fi=500,Bi=/^\./,Ui=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Mi=/\\(\\)?/g,Ni=function(t){var e=ht(t,function(t){return n.size===Fi&&n.clear(),t}),n=e.cache;return e}(function(t){var e=[];return Bi.test(t)&&e.push(""),t.replace(Ui,function(t,n,r,i){e.push(r?i.replace(Mi,"$1"):n||t)}),e}),Yi=1/0,Hi=function(){try{var t=j(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),Wi=Object.prototype.hasOwnProperty,Vi=Math.max,Xi=Hi?function(t,e){return Hi(t,"toString",{configurable:!0,enumerable:!1,value:xt(e),writable:!0})}:kt,Gi=800,Ki=16,Zi=Date.now,$i=function(t){var e=0,n=0;return function(){var r=Zi(),i=Ki-(r-n);if(n=r,i>0){if(++e>=Gi)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(Xi),qi=function(t){return function(e,n,r){for(var i=-1,o=Object(e),a=r(e),s=a.length;s--;){var l=a[t?s:++i];if(!1===n(o[l],l,o))break}return e}}(),Ji="object"==(void 0===t?"undefined":Xe(t))&&t&&!t.nodeType&&t,Qi=Ji&&"object"==("undefined"==typeof module?"undefined":Xe(module))&&module&&!module.nodeType&&module,to=Qi&&Qi.exports===Ji?bn.Buffer:void 0,eo=to?to.allocUnsafe:void 0,no=Object.create,ro=function(){function t(){}return function(e){if(!I(e))return{};if(no)return no(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}(),io=tt(Object.getPrototypeOf,Object),oo="[object Object]",ao=Function.prototype,so=Object.prototype,lo=ao.toString,uo=so.hasOwnProperty,co=lo.call(Object),po=Object.prototype.hasOwnProperty,ho=function(t){return At(function(e,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o=t.length>3&&"function"==typeof o?(i--,o):void 0,a&&Nt(n[0],n[1],a)&&(o=i<3?void 0:o,i=1),e=Object(e);++r<i;){var s=n[r];s&&t(e,s,r,o)}return e})}(function(t,e,n,r){Ut(t,e,n,r)}),fo=At(function(t){return t.push(void 0,Mt),mt(ho,void 0,t)}),yo=function(t,e,n){return null==t?t:bt(t,e,n)},vo=function(t,e,n){var r=null==t?void 0:vt(t,e);return void 0===r?n:r},_o=function(t,e){return null!=t&&yt(t,e,ct)},go=function(t){return(null==t?0:t.length)?ut(t,ji):[]},bo=function(t,e){return st(t,e)},mo=Qn,ko=Jn,So=qn,xo=zn,Ao=void 0,Oo="An error has occurred, but no specific message was provided. Please use the stacktrace to debug.",Io=function(t){function e(t){Ge(this,e);for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=[t||Oo].concat(r).join(" "),a=Je(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,o));return a.name=a.constructor.name,a.message=o,"function"==typeof Error.captureStackTrace?Error.captureStackTrace(a,a.constructor):a.stack=new Error(t).stack,a}return qe(e,t),Ke(e,null,[{key:"UnimplementedMethod",value:function(t,n){for(var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"chart",i=arguments.length,o=Array(i>3?i-3:0),a=3;a<i;a++)o[a-3]=arguments[a];return new(Function.prototype.bind.apply(e,[null].concat([t+" (`"+n+"`) needs to be defined in order for the "+r+" to be useful."],o)))}},{key:"InvalidArgumentType",value:function(t,n,r,i){for(var o=arguments.length,a=Array(o>4?o-4:0),s=4;s<o;s++)a[s-4]=arguments[s];return new(Function.prototype.bind.apply(e,[null].concat(["Method ("+t+') argument "'+n+'" of unexpected type. Expected '+r+", but was given "+i+"."],a)))}}]),e}(Error),Co=function(){function t(e,n){var r=this;Ge(this,t),this._instances=[];for(var i=arguments.length,o=Array(i>2?i-2:0),a=2;a<i;a++)o[a-2]=arguments[a];this._methodsToProxy=n.concat(go.apply(void 0,o)),this._methodsToProxy.forEach(function(t){return r.addProxyMethod(t)}),e.forEach(function(t){return r.addInstance(t)})}return Ke(t,[{key:"addProxyMethod",value:function(t){this[t]=this.invokeProxyMethod.bind(this,t)}},{key:"removeProxyMethod",value:function(t){var e=this._methodsToProxy.indexOf(t);e>-1&&this._methodsToProxy.splice(e,1)}},{key:"addInstance",value:function(t){t&&this._instances.push(t)}},{key:"removeChart",value:function(t){var e=this._instances.indexOf(t);e>-1&&this._instances.splice(e,1)}},{key:"invokeProxyMethod",value:function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return this._instances.forEach(function(e){if(!(e&&e[t]&&Xt(e[t])))throw new Io("Cannot invoke "+t+" on "+e);e[t].apply(e,n)}),this}},{key:"getProxiedMethods",value:function(){return this._methodsToProxy}},{key:"destroy",value:function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];this._instances.forEach(function(t){t&&t.destroy&&Xt(t.destroy)&&t.destroy.apply(t,e)}),this._instances.length=0}}]),t}(),Eo=function(t){function e(){return Ge(this,e),Je(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return qe(e,t),Ke(e,null,[{key:"RequiredOption",value:function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return new(Function.prototype.bind.apply(e,[null].concat(['Option "'+t+'" is required.'],r)))}},{key:"InvalidEnumOption",value:function(t,n){for(var r=arguments.length,i=Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return new(Function.prototype.bind.apply(e,[null].concat(['Option "'+t+'" must be set to a valid option. The value "'+n+'" is not valid.'],i)))}},{key:"OptionMustBeFunction",value:function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return new(Function.prototype.bind.apply(e,[null].concat(['Option "'+t+'" must be a function.'],r)))}}]),e}(Io),Po=d3.easeCubic,Ro="enter",wo="update",jo="exit",To={ENTER:Ro,UPDATE:wo,EXIT:jo},zo=Object.freeze({AXIS_SHIFT:.5,TRANSITION_DURATION_MS:250,TRANSITION_DELAY_MS:0,TRANSITION_EASE:Po,TRANSITION_EASE_START_POSITION:0,TRANSITION_EASE_END_POSITION:1,ENTER:Ro,UPDATE:wo,EXIT:jo,UPDATE_PATTERN:To,BRUSH_HANDLE_SIZE:6,SYMBOL_SIZE:64}),Do={delay:0,duration:250,ease:Po},Lo={standard:Do,none:{delay:0,duration:0,ease:function(){return 1}}},Fo=function t(e){Ge(this,t),this.value=e},Bo=function(t){function e(){return Ge(this,e),Je(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return qe(e,t),e}(Fo),Uo={timeoutDelayMs:{FPS_30:33,FPS_20:50,FPS_15:66,FPS_10:100,FPS_05:200}.FPS_15,target:window,eventName:"resize",documentLoadRun:!0},Mo=function(){function t(e){var n=this;if(Ge(this,t),this.opts=te(e,Uo),this.callbacks=[],this.running=!1,this.pendingFrame=null,this.pendingTimeout=null,this.listenerAttached=!1,this.documentReady=null,!this.opts.eventName)throw new t.EventWatcherException("An event name must be given!");this.opts.documentLoadRun&&function(){var t=n,e=function e(){setTimeout(function(){document.removeEventListener("DOMContentLoaded",e),window.removeEventListener("load",e),t.documentReady=!0,t.runCallbacks()},0)};n.documentReady=!1,document.addEventListener("DOMContentLoaded",e),window.addEventListener("load",e),"complete"===document.readyState&&e()}()}return Ke(t,[{key:"_fired",value:function(){if(!this.running){this.running=!0;var t=this._runCallbacks.bind(this);window.requestAnimationFrame?this.pendingFrame=window.requestAnimationFrame(t):this.pendingTimeout=setTimeout(t,this.opts.timeoutDelayMs)}}},{key:"_runCallbacks",value:function(){this.pendingFrame=this.pendingTimeout=null,this.runCallbacks(),this.running=!1}},{key:"runCallbacks",value:function(){this.callbacks.forEach(function(t){return t()})}},{key:"add",value:function(t){this.listenerAttached||(this.opts.target.addEventListener(this.opts.eventName,this._fired.bind(this)),this.listenerAttached=!0),t&&this.callbacks.push(t)}},{key:"remove",value:function(t){if(this.callbacks.length){var e=this.callbacks.indexOf(t);e>-1&&this.callbacks.splice(e,1)}return this}},{key:"destroy",value:function(){this.pendingFrame?window.cancelAnimationFrame(this.pendingFrame):this.pendingTimeout&&clearTimeout(this.pendingTimeout),this.listenerAttached&&this.opts.target.removeEventListener(this.opts.eventName,this._fired.bind(this))}},{key:"timeoutDelay",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return null===t?this.opts.timeoutDelayMs:(this.opts.timeoutDelayMs=t,this)}}]),t}(),No=new(function(){function t(){Ge(this,t),this._developerMode=!1,this._developerModeEvents=null,this._resizeWatch=new Mo,this.extensionId=0,this.chartId=0}return Ke(t,[{key:"getNextChartId",value:function(){return this.chartId++}},{key:"resetChartCount",value:function(){this.chartId=0}},{key:"getNextExtensionId",value:function(){return this.extensionId++}},{key:"resetExtensionCount",value:function(){this.extensionId=0}},{key:"getResizeWatcher",value:function(){return this._resizeWatch}},{key:"isDeveloperMode",value:function(){return this._developerMode}},{key:"setDeveloperModeEvents",value:function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];this._developerModeEvents=go(e),this._developerMode=!0}},{key:"getDeveloperModeEvents",value:function(){return this._developerModeEvents}},{key:"clearDeveloperModeEvents",value:function(){this._developerModeEvents=null}},{key:"clearDeveloperMode",value:function(){this._developerMode=!1}},{key:"enableDeveloperMode",value:function(){this._developerMode=!0}}]),t}());"object"===("undefined"==typeof window?"undefined":Xe(window))&&(window.MonteGlobal=No);var Yo="drawPath",Ho={css:"",boundingWidth:250,boundingHeight:250,margin:{top:0,right:0,bottom:0,left:0},customEvents:[],extensions:[],transition:Do,resize:null,dataKey:ne,autoResetStyleDomains:!1,directUse:!1,developerOptions:{scales:!1,transitions:!1,listeners:!1}},Wo=function(){function t(e,n,r){Ge(this,t),this._constructed=!1,this._optsSet=!1,this.hasRendered=!1,this.layers=[],this.extensions=[],this._optionReaderCache={},this.__chartId=No.getNextChartId(),this.parentSelector=e,this._initOptions(n),this._initPublicEvents.apply(this,Qe(tn).concat(Qe(rn),Qe(on),Qe(this.opts.customEvents))),(this.opts.developerMode||No.isDeveloperMode())&&this._initDeveloperMode(),this._initCore(),this._initCustomize(),this._boundsUpdate(),this._bindExt(this.tryInvoke(this.opts.extensions)),this._initRender(),this._constructed=!0,this._resizeHandler&&No.getResizeWatcher().documentReady&&this._resizeHandler(),r&&this.data(r)}return Ke(t,[{key:"getChartId",value:function(){return this.__chartId}},{key:"_getChartAttr",value:function(){return"monte-chart-"+this.getChartId()}},{key:"_initOptions",value:function(){this.opts={};for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=te.apply(void 0,e.concat([Ho]));for(var i in r)r.hasOwnProperty(i)&&this.option(i,r[i]);this._optsSet=!0}},{key:"_initCore",value:function(){var t=this,e=d3.select(this.parentSelector);if(null===e.node())throw new Io('Invalid selector. "'+this.parentSelector+'" did not match any element."');"svg"===e.node().tagName.toLowerCase()?this.bound=e:this.bound=e.append("svg"),this.bound.attr(this._getChartAttr(),""),this.bound.node().monteChart=this,this.bound.classed(this._buildCss(["monte-chart",this.opts.css,this.opts.chartCss]),!0),this.defs=this.bound.append("defs"),this.clip=this.defs.append("clipPath").attr("id",ee(this.getChartId())),this.clipRect=this.clip.append("rect").attr("x",0).attr("y",0),this._initLayers();var n=this;tn.forEach(function(e){t.bound.on(e,function(){for(var t=arguments.length,r=Array(t),i=0;i<t;i++)r[i]=arguments[i];n.__notify.apply(n,[e,this].concat(r))})});var r=this.tryInvoke(this.opts.resize);r&&(this._resizeHandler=r.resize.bind(r,this),No.getResizeWatcher().add(this._resizeHandler))}},{key:"_initLayers",value:function(){this.addLayer("bg"),this.addLayer("support"),this.addLayer("selection"),this.addLayer("draw"),this.addLayer("overlay")}},{key:"_initPublicEvents",value:function(){for(var t,e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];this._events=n,this.dispatch=(t=d3).dispatch.apply(t,n)}},{key:"_initDeveloperMode",value:function(){var t=this,e=function(e){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o="(no arguments)";r&&r.length>0&&(o="\n",r.forEach(function(t,e){if($t(t)){var n=Xt(t)?"func: '"+(t.name||"anonymous")+"'":t;o+="\t"+e+": "+n+"\n"}})),console.log("["+t+'] "'+e+'": '+o)};this.developerMode=!0,(Zt(this.opts.developerMode)||No.getDeveloperModeEvents()?this.opts.developerMode||No.getDeveloperModeEvents():this._events).forEach(function(n){t.opts.developerOptions.listeners&&console.log("["+t+'] Adding listener for "'+n+'"'),t.on(n+".developerMode",e.bind(t,n))})}},{key:"_initCustomize",value:function(){}},{key:"_initRender",value:function(){}},{key:"_boundsUpdate",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.__notify("beforeBoundsUpdate"),this.margin=this.opts.margin,this.width=this.opts.boundingWidth-this.margin.left-this.margin.right,this.height=this.opts.boundingHeight-this.margin.top-this.margin.bottom,this.layers.forEach(function(e){return e.attr("transform",t._getLayerTranslate())}),this.bound&&this.bound.attr("width",this.opts.boundingWidthAttr||this.opts.boundingWidth).attr("height",this.opts.boundingHeightAttr||this.opts.boundingHeight),this.clipRect&&this.clipRect.attr("width",this.width).attr("height",this.height);var r=function(){t._constructed&&t.__notify("boundsUpdated")},i=function(){t.hasRendered&&t.update()};return e||r(),n||i(),{notify:r,update:i}}},{key:"checkSize",value:function(){return this._resizeHandler&&this._resizeHandler(),this}},{key:"destroy",value:function(){this.__notify("beforeDestroy"),this._resizeHandler&&No.getResizeWatcher().remove(this._resizeHandler),this._destroy(),this.bound.node()===d3.select(this.parentSelector).node()?this.bound.node().innerHTML="":this.bound.remove(),this.__notify("destroyed")}},{key:"_destroy",value:function(){}},{key:"addLayer",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"g",n=this.bound.append(e).attr("class","monte-"+t);return this[t]=n,this.layers.push(n),this}},{key:"layerUseClipPath",value:function(t,e){return $t(e)||(e=ee(this.getChartId())),this[t].attr("clip-path","url(#"+e+")"),this}},{key:"_getLayerTranslate",value:function(){return"translate("+this.margin.left+", "+this.margin.top+")"}},{key:"boundingRect",value:function(t,e){if(0===arguments.length)return[this.opts.boundingWidth,this.opts.boundingHeight];if(arguments.length>=1&&$t(t)){var n=this.option("margin.left")+this.option("margin.right");t<n&&(t=n),this.opts.boundingWidth=t}if(2===arguments.length&&$t(e)){var r=this.option("margin.top")+this.option("margin.bottom");e<r&&(e=r),this.opts.boundingHeight=e}return this._boundsUpdate(),this.update(),this}},{key:"on",value:function(t,e){return arguments.length<2?this.dispatch.on(t):(this.dispatch.on(t,e),this)}},{key:"onExt",value:function(t,e){if(arguments.length<2)return this.on(t);var n="extension."+t;return null===e?this.on(n,null):this.on(n,function(n){if(0===n.indexOf(t)){for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];e.call.apply(e,[this,n].concat(i))}}),this}},{key:"emit",value:function(t){if(t){if(!this.dispatch._[t])throw new Io("Unknown event "+t+". Double check the spelling or register the event. Custom events must registered at chart creation.");for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return this.__notify.apply(this,[t].concat(n)),this}}},{key:"option",value:function(t,e){var n=vo(this.opts,t);if(e===Ao)return n;this._optsSet&&this.__notify("beforeOptionChange",t),yo(this.opts,t,e);var r=this.__handleMarginOptions(t,e,n);return this._optsSet&&(r&&this._boundsUpdate(),this.__notify("optionChanged",t)),this}},{key:"__handleMarginOptions",value:function(t,e,n){var r=!1;if("margin"===t)if(Kt(e))bo(n,e)||(r=!0);else{var i={top:e,left:e,right:e,bottom:e};bo(n,i)||(this.opts.margin=i,r=!0)}else/^margin\./.test(t)&&n!==e&&(r=!0);return r}},{key:"optionReaderFunc",value:function(t){var e=this;if(!Vt(t))throw Io.InvalidArgumentType("optionReaderFunc","optionKey","string",t);return this._optionReaderCache[t]||(this._optionReaderCache[t]=function(){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return e.tryInvoke.apply(e,[e.opts[t]].concat(r))}),this._optionReaderCache[t]}},{key:"tryInvoke",value:function(t){if(null===t)return null;if(t===Ao)throw new Eo("Value not initialized.");try{for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return Xt(t)?t.call.apply(t,[this].concat(n)):t}catch(t){return console&&console.error&&console.error(t),this.__notify("suppressedError",t),null}}},{key:"fnInvoke",value:function(t){if(null==t||!Xt(t))return null;try{for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return t.call.apply(t,[this].concat(n))}catch(t){return this.__notify("suppressedError",t),null}}},{key:"getPropKey",value:function(t){var e=t+"Prop";if(this.opts[e])return this.opts[e];if(this.opts[t]){var n=t.indexOf("Prop");if(n>-1){var r=t.substring(0,n);throw new Io('Property options should be accessed using short names without the "Prop" suffix. Given '+t+", but expected "+r+".")}}return null}},{key:"getProp",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=this.getPropKey(t);return r?e[r]:n}},{key:"getScaledProp",value:function(t,e,n){var r=void 0,i=void 0,o=void 0;if(2===arguments.length)i=t,o=e;else{if(3!==arguments.length)throw new Io("Incorrect number of arguments. Expected 2 or 3 recieved "+arguments.length);i=e,o=n}var a=vo(this,t);if(!a)throw new Io('Scale "'+t+'" is not defined.');return a===Yt?Ao:Xt(a)?(r=Kt(o)?o[this.opts[i+"Prop"]]:o,a(r)):a}},{key:"clear",value:function(){return this.__notify("beforeClear"),this.displayData=null,this._clearDataElements(),this.opts.autoResetStyleDomains&&this.resetStyleDomains(),this.__notify("cleared"),this}},{key:"_clearDataElements",value:function(){}},{key:"resetStyleDomains",value:function(){return this.__notify("beforeStyleDomainsReset"),this._resetStyleDomains(),this.__notify("styleDomainsReset"),this}},{key:"_resetStyleDomains",value:function(){}},{key:"_buildCss",value:function(t,e,n,r){var i=this,o=[];return(Array.isArray(t)?t:[t]).forEach(function(t){$t(t)&&o.push(i.tryInvoke(t,e,n,r))}),o.join(" ").replace(/\s+/," ")}},{key:"_transitionSetup",value:function(){for(var t=this,e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return function(e){for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];var a=t._transitionSettings.apply(t,n),s=a.duration,l=a.delay,u=a.ease;t._transitionConfigureDuration.apply(t,[e,s].concat(i)),t._transitionConfigureDelay.apply(t,[e,l].concat(i)),e.ease(u)}}},{key:"_transitionConfigureDuration",value:function(t,e){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var o=null;Xt(e)&&r&&r.length&&(o=function(t,n,i){return e.apply(void 0,[t,n,i].concat(r))}),t.duration(o||e)}},{key:"_transitionConfigureDelay",value:function(t,e){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var o=null;Xt(e)&&r&&r.length&&(o=function(t,n,i){return e.apply(void 0,[t,n,i].concat(r))}),t.delay(o||e)}},{key:"_transitionConfigure",value:function(t,e,n,r,i){for(var o=e.duration,a=e.delay,s=e.ease,l=arguments.length,u=Array(l>5?l-5:0),c=5;c<l;c++)u[c-5]=arguments[c];t.duration(this.tryInvoke.apply(this,[o,n,r,i].concat(u))).delay(this.tryInvoke.apply(this,[a,n,r,i].concat(u))).ease(s)}},{key:"_transitionSettings",value:function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=this.tryInvoke(this.opts.transition),i=qt(r,e,"duration",Do.duration),o=qt(r,e,"delay",Do.delay),a=qt(r,e,"ease",Do.ease);return this.developerMode&&this.opts.developerOptions.transitions&&(console.log("Transition: "+e.join(".")),console.log({levels:e,duration:i,delay:o,ease:a})),{duration:i,delay:o,ease:a}}},{key:"attr",value:function(t,e){return e===Ao?this.bound.attr(t):(this.bound.attr(t,e),this)}},{key:"style",value:function(t,e){return e===Ao?this.bound.style(t):(this.bound.style(t,e),this)}},{key:"classed",value:function(){var t;return(t=this.bound).classed.apply(t,arguments),this}},{key:"call",value:function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return t.call.apply(t,[this].concat(n)),this}},{key:"updateData",value:function(t){return this.data(t,!0),this}},{key:"data",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return t===Ao?this.displayData:(e||this.clear(),this._data(t),n||this.update(),this)}},{key:"_data",value:function(t){this.displayData=t}},{key:"getRawData",value:function(){return this.rawData?this.rawData:this.displayData}},{key:"addExt",value:function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)