!function(n){function t(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return n[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var e={};t.m=n,t.c=e,t.d=function(n,e,r){t.o(n,e)||Object.defineProperty(n,e,{configurable:!1,enumerable:!0,get:r})},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},t.p="",t(t.s=403)}([function(n,t,e){"use strict";n.exports=e(408)},function(n,t,e){"use strict";t.__esModule=!0,t.default=function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}},function(n,t,e){"use strict";t.__esModule=!0;var r=e(156),o=function(n){return n&&n.__esModule?n:{default:n}}(r);t.default=function(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":(0,o.default)(t))&&"function"!=typeof t?n:t}},function(n,t,e){"use strict";function r(n){return n&&n.__esModule?n:{default:n}}t.__esModule=!0;var o=e(562),i=r(o),a=e(566),s=r(a),l=e(156),c=r(l);t.default=function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":(0,c.default)(t)));n.prototype=(0,s.default)(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),t&&(i.default?(0,i.default)(n,t):n.__proto__=t)}},function(n,t,e){"use strict";t.__esModule=!0;var r=e(318),o=function(n){return n&&n.__esModule?n:{default:n}}(r);t.default=o.default||function(n){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e}},function(n,t,e){var r,o;/*! Copyright (c) 2016 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ !function(){"use strict";function e(){for(var n=[],t=0;t1?t-1:0),r=1;r=0&&y.splice(t,1)}function s(n){var t=document.createElement("style");return n.attrs.type="text/css",c(t,n.attrs),i(n,t),t}function l(n){var t=document.createElement("link");return n.attrs.type="text/css",n.attrs.rel="stylesheet",c(t,n.attrs),i(n,t),t}function c(n,t){Object.keys(t).forEach(function(e){n.setAttribute(e,t[e])})}function u(n,t){var e,r,o,i;if(t.transform&&n.css){if(!(i=t.transform(n.css)))return function(){};n.css=i}if(t.singleton){var c=v++;e=m||(m=s(t)),r=p.bind(null,e,c,!1),o=p.bind(null,e,c,!0)}else n.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(e=l(t),r=f.bind(null,e,t),o=function(){a(e),e.href&&URL.revokeObjectURL(e.href)}):(e=s(t),r=d.bind(null,e),o=function(){a(e)});return r(n),function(t){if(t){if(t.css===n.css&&t.media===n.media&&t.sourceMap===n.sourceMap)return;r(n=t)}else o()}}function p(n,t,e,r){var o=e?"":r.css;if(n.styleSheet)n.styleSheet.cssText=w(t,o);else{var i=document.createTextNode(o),a=n.childNodes;a[t]&&n.removeChild(a[t]),a.length?n.insertBefore(i,a[t]):n.appendChild(i)}}function d(n,t){var e=t.css,r=t.media;if(r&&n.setAttribute("media",r),n.styleSheet)n.styleSheet.cssText=e;else{for(;n.firstChild;)n.removeChild(n.firstChild);n.appendChild(document.createTextNode(e))}}function f(n,t,e){var r=e.css,o=e.sourceMap,i=void 0===t.convertToAbsoluteUrls&&o;(t.convertToAbsoluteUrls||i)&&(r=x(r)),o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var a=new Blob([r],{type:"text/css"}),s=n.href;n.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}var h={},g=function(n){var t;return function(){return void 0===t&&(t=n.apply(this,arguments)),t}}(function(){return window&&document&&document.all&&!window.atob}),b=function(n){var t={};return function(e){if(void 0===t[e]){var r=n.call(this,e);if(r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(n){r=null}t[e]=r}return t[e]}}(function(n){return document.querySelector(n)}),m=null,v=0,y=[],x=e(677);n.exports=function(n,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");t=t||{},t.attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||(t.singleton=g()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var e=o(n,t);return r(e,t),function(n){for(var i=[],a=0;a1){for(var p=Array(u),d=0;d1){for(var f=Array(d),h=0;ht&&!i||!o||e&&!a&&s||r&&s)return 1;if(n-1;);return e}function p(n,t){for(var e=n.length;e--&&t.indexOf(n.charAt(e))>-1;);return e}function d(n,t){return i(n.criteria,t.criteria)||n.index-t.index}function f(n,t,e){for(var r=-1,o=n.criteria,a=t.criteria,s=o.length,l=e.length;++r=l)return c;var u=e[r];return c*("asc"===u||!0===u?1:-1)}}return n.index-t.index}function h(n){return Hn[n]}function g(n){return qn[n]}function b(n,t,e){return t?n=Xn[n]:e&&(n=Yn[n]),"\\"+n}function m(n){return"\\"+Yn[n]}function v(n,t,e){for(var r=n.length,o=t+(e?0:-1);e?o--:++o=9&&n<=13||32==n||160==n||5760==n||6158==n||n>=8192&&(n<=8202||8232==n||8233==n||8239==n||8287==n||12288==n||65279==n)}function w(n,t){for(var e=-1,r=n.length,o=-1,i=[];++e=B?ge(t):null,c=t.length;l&&(i=Qn,a=!1,t=l);n:for(;++oo?0:o+e),r=r===O||r>o?o:+r||0,r<0&&(r+=o),o=e>r?0:r>>>0,e>>>=0;eo?0:o+t),e=e===O||e>o?o:+e||0,e<0&&(e+=o),o=t>e?0:e-t>>>0,t>>>=0;for(var i=Vi(o);++r=B,l=a?ge():null,c=[];l?(r=Qn,i=!1):(a=!1,l=t?[]:c);n:for(;++e>>1,a=n[i];(e?a<=t:a2?e[o-2]:O,a=o>2?e[2]:O,s=o>1?e[o-1]:O;for("function"==typeof i?(i=ae(i,s,5),o-=2):(i="function"==typeof s?s:O,o-=i?1:0),a&&Je(e[0],e[1],a)&&(i=o<3?O:i,o=1);++r-1?e[i]:O}return At(e,r,n)}}function _e(n){return function(t,e,r){return t&&t.length?(e=Ve(e,r,3),a(t,e,n)):-1}}function Ee(n){return function(t,e,r){return e=Ve(e,r,3),At(t,e,n,!0)}}function ke(n){return function(){for(var t,e=arguments.length,o=n?e:-1,i=0,a=Vi(e);n?o--:++o=B)return t.plant(r).value();for(var o=0,i=e?a[o].apply(this,n):r;++o=t||!xa(t))return"";var o=t-r;return e=null==e?" ":e+"",mi(e,ba(o/e.length)).slice(0,o)}function De(n,t,e,r){function o(){for(var t=-1,s=arguments.length,l=-1,c=r.length,u=Vi(c+s);++ll))return!1;for(;++s-1&&n%1==0&&n-1&&n%1==0&&n<=Ra}function rr(n){return n===n&&!Io(n)}function or(n,t){var e=n[1],r=t[1],o=e|r,i=o-1;)fa.call(t,i,1);return t}function Ar(n,t,e){var r=[];if(!n||!n.length)return r;var o=-1,i=[],a=n.length;for(t=Ve(t,e,3);++o-1:!!o&&Ge(n,t,e)>-1}function no(n,t,e){var r=As(n)?ct:zt;return t=Ve(t,e,3),r(n,t)}function to(n,t){return no(n,Di(t))}function eo(n,t,e){var r=As(n)?lt:Tt;return t=Ve(t,e,3),r(n,function(n,e,r){return!t(n,e,r)})}function ro(n,t,e){if(e?Je(n,t,e):null==t){n=ur(n);var r=n.length;return r>0?n[Kt(0,r-1)]:O}var o=-1,i=Xo(n),r=i.length,a=r-1;for(t=Ea(t<0?0:+t||0,r);++o0&&(e=t.apply(this,arguments)),n<=1&&(t=O),e}}function ho(n,t,e){function r(){f&&sa(f),c&&sa(c),g=0,c=f=h=O}function o(t,e){e&&sa(e),c=f=h=O,t&&(g=gs(),u=n.apply(d,l),f||c||(l=d=O))}function i(){var n=t-(gs()-p);n<=0||n>t?o(h,c):f=da(i,n)}function a(){o(m,f)}function s(){if(l=arguments,p=gs(),d=this,h=m&&(f||!v),!1===b)var e=v&&!f;else{c||v||(g=p);var r=b-(p-g),o=r<=0||r>b;o?(c&&(c=sa(c)),g=p,u=n.apply(d,l)):c||(c=da(a,r))}return o&&f?f=sa(f):f||t===b||(f=da(i,t)),e&&(o=!0,u=n.apply(d,l)),!o||f||c||(l=d=O),u}var l,c,u,p,d,f,h,g=0,b=!1,m=!0;if("function"!=typeof n)throw new $i(q);if(t=t<0?0:+t||0,!0===e){var v=!0;m=!1}else Io(e)&&(v=!!e.leading,b="maxWait"in e&&_a(+e.maxWait||0,t),m="trailing"in e?!!e.trailing:m);return s.cancel=r,s}function go(n,t){if("function"!=typeof n||t&&"function"!=typeof t)throw new $i(q);var e=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=e.cache;if(i.has(o))return i.get(o);var a=n.apply(this,r);return e.cache=i.set(o,a),a};return e.cache=new go.Cache,e}function bo(n){if("function"!=typeof n)throw new $i(q);return function(){return!n.apply(this,arguments)}}function mo(n){return fo(2,n)}function vo(n,t){if("function"!=typeof n)throw new $i(q);return t=_a(t===O?n.length-1:+t||0,0),function(){for(var e=arguments,r=-1,o=_a(e.length-t,0),i=Vi(o);++rt}function So(n,t){return n>=t}function Co(n){return y(n)&&Ze(n)&&ta.call(n,"callee")&&!ua.call(n,"callee")}function Oo(n){return!0===n||!1===n||y(n)&&ra.call(n)==Y}function To(n){return y(n)&&ra.call(n)==$}function Ao(n){return!!n&&1===n.nodeType&&y(n)&&!Vo(n)}function Po(n){return null==n||(Ze(n)&&(As(n)||Go(n)||Co(n)||y(n)&&Do(n.splice))?!n.length:!Us(n).length)}function Mo(n,t,e,r){e="function"==typeof e?ae(e,r,3):O;var o=e?e(n,t):O;return o===O?Lt(n,t,e):!!o}function Ro(n){return y(n)&&"string"==typeof n.message&&ra.call(n)==Z}function No(n){return"number"==typeof n&&xa(n)}function Do(n){return Io(n)&&ra.call(n)==Q}function Io(n){var t=typeof n;return!!n&&("object"==t||"function"==t)}function Lo(n,t,e,r){return e="function"==typeof e?ae(e,r,3):O,Ft(n,He(t),e)}function jo(n){return Uo(n)&&n!=+n}function Fo(n){return null!=n&&(Do(n)?ia.test(na.call(n)):y(n)&&Dn.test(n))}function zo(n){return null===n}function Uo(n){return"number"==typeof n||y(n)&&ra.call(n)==J}function Vo(n){var t;if(!y(n)||ra.call(n)!=nn||Co(n)||!ta.call(n,"constructor")&&"function"==typeof(t=n.constructor)&&!(t instanceof t))return!1;var e;return Mt(n,function(n,t){e=t}),e===O||ta.call(n,e)}function Bo(n){return Io(n)&&ra.call(n)==tn}function Go(n){return"string"==typeof n||y(n)&&ra.call(n)==en}function Ho(n){return y(n)&&er(n.length)&&!!Bn[ra.call(n)]}function qo(n){return n===O}function Wo(n,t){return n0;++r=Ea(t,e)&&n<_a(t,e)}function ci(n,t,e){e&&Je(n,t,e)&&(t=e=O);var r=null==n,o=null==t;if(null==e&&(o&&"boolean"==typeof n?(e=n,n=1):"boolean"==typeof t&&(e=t,o=!0)),r&&o&&(t=1,o=!1),n=+n||0,o?(t=n,n=0):t=+t||0,e||n%1||t%1){var i=Ca();return Ea(n+i*(t-n+la("1e-"+((i+"").length-1))),t)}return Kt(n,t)}function ui(n){return(n=c(n))&&n.charAt(0).toUpperCase()+n.slice(1)}function pi(n){return(n=c(n))&&n.replace(Ln,h).replace(An,"")}function di(n,t,e){n=c(n),t+="";var r=n.length;return e=e===O?r:Ea(e<0?0:+e||0,r),(e-=t.length)>=0&&n.indexOf(t,e)==e}function fi(n){return n=c(n),n&&xn.test(n)?n.replace(vn,g):n}function hi(n){return n=c(n),n&&Tn.test(n)?n.replace(On,b):n||"(?:)"}function gi(n,t,e){n=c(n),t=+t;var r=n.length;if(r>=t||!xa(t))return n;var o=(t-r)/2,i=va(o);return e=Ne("",ba(o),e),e.slice(0,i)+n+e}function bi(n,t,e){return(e?Je(n,t,e):null==t)?t=0:t&&(t=+t),n=xi(n),Sa(n,t||(Nn.test(n)?16:10))}function mi(n,t){var e="";if(n=c(n),(t=+t)<1||!n||!xa(t))return e;do{t%2&&(e+=n),t=va(t/2),n+=n}while(t);return e}function vi(n,t,e){return n=c(n),e=null==e?0:Ea(e<0?0:+e||0,n.length),n.lastIndexOf(t,e)==e}function yi(n,e,r){var o=t.templateSettings;r&&Je(n,e,r)&&(e=r=O),n=c(n),e=mt(vt({},r||e),o,bt);var i,a,s=mt(vt({},e.imports),o.imports,bt),l=Us(s),u=te(s,l),p=0,d=e.interpolate||jn,f="__p += '",h=Xi((e.escape||jn).source+"|"+d.source+"|"+(d===En?Mn:jn).source+"|"+(e.evaluate||jn).source+"|$","g"),g="//# sourceURL="+("sourceURL"in e?e.sourceURL:"lodash.templateSources["+ ++Vn+"]")+"\n";n.replace(h,function(t,e,r,o,s,l){return r||(r=o),f+=n.slice(p,l).replace(Fn,m),e&&(i=!0,f+="' +\n__e("+e+") +\n'"),s&&(a=!0,f+="';\n"+s+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),p=l+t.length,t}),f+="';\n";var b=e.variable;b||(f="with (obj) {\n"+f+"\n}\n"),f=(a?f.replace(hn,""):f).replace(gn,"$1").replace(bn,"$1;"),f="function("+(b||"obj")+") {\n"+(b?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var v=Zs(function(){return Hi(l,g+"return "+f).apply(O,u)});if(v.source=f,Ro(v))throw v;return v}function xi(n,t,e){var r=n;return(n=c(n))?(e?Je(r,t,e):null==t)?n.slice(E(n),k(n)+1):(t+="",n.slice(u(n,t),p(n,t)+1)):n}function wi(n,t,e){var r=n;return n=c(n),n?(e?Je(r,t,e):null==t)?n.slice(E(n)):n.slice(u(n,t+"")):n}function _i(n,t,e){var r=n;return n=c(n),n?(e?Je(r,t,e):null==t)?n.slice(0,k(n)+1):n.slice(0,p(n,t+"")+1):n}function Ei(n,t,e){e&&Je(n,t,e)&&(t=O);var r=F,o=z;if(null!=t)if(Io(t)){var i="separator"in t?t.separator:i;r="length"in t?+t.length||0:r,o="omission"in t?c(t.omission):o}else r=+t||0;if(n=c(n),r>=n.length)return n;var a=r-o.length;if(a<1)return o;var s=n.slice(0,a);if(null==i)return s+o;if(Bo(i)){if(n.slice(a).search(i)){var l,u,p=n.slice(0,a);for(i.global||(i=Xi(i.source,(Rn.exec(i)||"")+"g")),i.lastIndex=0;l=i.exec(p);)u=l.index;s=s.slice(0,null==u?a:u)}}else if(n.indexOf(i,a)!=a){var d=s.lastIndexOf(i);d>-1&&(s=s.slice(0,d))}return s+o}function ki(n){return n=c(n),n&&yn.test(n)?n.replace(mn,S):n}function Si(n,t,e){return e&&Je(n,t,e)&&(t=O),n=c(n),n.match(t||zn)||[]}function Ci(n,t,e){return e&&Je(n,t,e)&&(t=O),y(n)?Ai(n):wt(n,t)}function Oi(n){return function(){return n}}function Ti(n){return n}function Ai(n){return Ut(_t(n,!0))}function Pi(n,t){return Vt(n,_t(t,!0))}function Mi(n,t,e){if(null==e){var r=Io(t),o=r?Us(t):O,i=o&&o.length?Dt(t,o):O;(i?i.length:r)||(i=!1,e=t,t=n,n=this)}i||(i=Dt(t,Us(t)));var a=!0,s=-1,l=Do(n),c=i.length;!1===e?a=!1:Io(e)&&"chain"in e&&(a=e.chain);for(;++s>>1,Ra=9007199254740991,Na=ga&&new ga,Da={};t.support={};t.templateSettings={escape:wn,evaluate:_n,interpolate:En,variable:"",imports:{_:t}};var Ia=function(){function n(){}return function(t){if(Io(t)){n.prototype=t;var e=new n;n.prototype=O}return e||{}}}(),La=de(Rt),ja=de(Nt,!0),Fa=fe(),za=fe(!0),Ua=Na?function(n,t){return Na.set(n,t),n}:Ti,Va=Na?function(n){return Na.get(n)}:Ni,Ba=Ht("length"),Ga=function(){var n=0,t=0;return function(e,r){var o=gs(),i=V-(o-t);if(t=o,i>0){if(++n>=U)return e}else n=0;return Ua(e,r)}}(),Ha=vo(function(n,t){return y(n)&&Ze(n)?kt(n,Pt(t,!1,!0)):[]}),qa=_e(),Wa=_e(!0),Ka=vo(function(n){for(var t=n.length,e=t,r=Vi(p),o=Ge(),i=o==s,a=[];e--;){var l=n[e]=Ze(l=n[e])?l:[];r[e]=i&&l.length>=120?ge(e&&l):null}var c=n[0],u=-1,p=c?c.length:0,d=r[0];n:for(;++u2?n[t-2]:O,r=t>1?n[t-1]:O;return t>2&&"function"==typeof e?t-=2:(e=t>1&&"function"==typeof r?(--t,r):O,r=O),n.length=t,Fr(n,e,r)}),ts=vo(function(n){return n=Pt(n),this.thru(function(t){return nt(As(t)?t:[pr(t)],n)})}),es=vo(function(n,t){return yt(n,Pt(t))}),rs=ue(function(n,t,e){ta.call(n,e)?++n[e]:n[e]=1}),os=we(La),is=we(ja,!0),as=Se(ot,La),ss=Se(it,ja),ls=ue(function(n,t,e){ta.call(n,e)?n[e].push(t):n[e]=[t]}),cs=ue(function(n,t,e){n[e]=t}),us=vo(function(n,t,e){var r=-1,o="function"==typeof t,i=nr(t),a=Ze(n)?Vi(n.length):[];return La(n,function(n){var s=o?t:i&&null!=n?n[t]:O;a[++r]=s?s.apply(n,e):$e(n,t,e)}),a}),ps=ue(function(n,t,e){n[e?0:1].push(t)},function(){return[[],[]]}),ds=Me(pt,La),fs=Me(dt,ja),hs=vo(function(n,t){if(null==n)return[];var e=t[2];return e&&Je(t[0],t[1],e)&&(t.length=1),Qt(n,Pt(t),[])}),gs=ka||function(){return(new Bi).getTime()},bs=vo(function(n,t,e){var r=A;if(e.length){var o=w(e,bs.placeholder);r|=D}return je(n,r,t,e,o)}),ms=vo(function(n,t){t=t.length?Pt(t):Zo(n);for(var e=-1,r=t.length;++e0||t<0)?new o(e):(n<0?e=e.takeRight(-n):n&&(e=e.drop(n)),t!==O&&(t=+t||0,e=t<0?e.dropRight(-t):e.take(t-n)),e)},o.prototype.takeRightWhile=function(n,t){return this.reverse().takeWhile(n,t).reverse()},o.prototype.toArray=function(){return this.take(Ta)},Rt(o.prototype,function(n,e){var i=/^(?:filter|map|reject)|While$/.test(e),a=/^(?:first|last)$/.test(e),s=t[a?"take"+("last"==e?"Right":""):e];s&&(t.prototype[e]=function(){var t=a?[1]:arguments,e=this.__chain__,l=this.__wrapped__,c=!!this.__actions__.length,u=l instanceof o,p=t[0],d=u||As(l);d&&i&&"function"==typeof p&&1!=p.length&&(u=d=!1);var f=function(n){return a&&e?s(n,1)[0]:s.apply(O,ut([n],t))},h={func:Gr,args:[f],thisArg:O},g=u&&!c;if(a&&!e)return g?(l=l.clone(),l.__actions__.push(h),n.call(l)):s.call(O,this.value())[0];if(!a&&d){l=g?l:new o(this);var b=n.apply(l,t);return b.__actions__.push(h),new r(b,e)}return this.thru(f)})}),ot(["join","pop","push","replace","shift","sort","splice","split","unshift"],function(n){var e=(/^(?:replace|split)$/.test(n)?Ji:Zi)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",o=/^(?:join|pop|replace|shift)$/.test(n);t.prototype[n]=function(){var n=arguments;return o&&!this.__chain__?e.apply(this.value(),n):this[r](function(t){return e.apply(t,n)})}}),Rt(o.prototype,function(n,e){var r=t[e];if(r){var o=r.name;(Da[o]||(Da[o]=[])).push({name:e,func:r})}}),Da[Re(O,P).name]=[{name:"wrapper",func:O}],o.prototype.clone=x,o.prototype.reverse=Hn,o.prototype.value=qn,t.prototype.chain=Hr,t.prototype.commit=qr,t.prototype.concat=ts,t.prototype.plant=Wr,t.prototype.reverse=Kr,t.prototype.toString=Xr,t.prototype.run=t.prototype.toJSON=t.prototype.valueOf=t.prototype.value=Yr,t.prototype.collect=t.prototype.map,t.prototype.head=t.prototype.first,t.prototype.select=t.prototype.filter,t.prototype.tail=t.prototype.rest,t}var O,T="3.10.1",A=1,P=2,M=4,R=8,N=16,D=32,I=64,L=128,j=256,F=30,z="...",U=150,V=16,B=200,G=1,H=2,q="Expected a function",W="__lodash_placeholder__",K="[object Arguments]",X="[object Array]",Y="[object Boolean]",$="[object Date]",Z="[object Error]",Q="[object Function]",J="[object Number]",nn="[object Object]",tn="[object RegExp]",en="[object String]",rn="[object ArrayBuffer]",on="[object Float32Array]",an="[object Float64Array]",sn="[object Int8Array]",ln="[object Int16Array]",cn="[object Int32Array]",un="[object Uint8Array]",pn="[object Uint8ClampedArray]",dn="[object Uint16Array]",fn="[object Uint32Array]",hn=/\b__p \+= '';/g,gn=/\b(__p \+=) '' \+/g,bn=/(__e\(.*?\)|\b__t\)) \+\n'';/g,mn=/&(?:amp|lt|gt|quot|#39|#96);/g,vn=/[&<>"'`]/g,yn=RegExp(mn.source),xn=RegExp(vn.source),wn=/<%-([\s\S]+?)%>/g,_n=/<%([\s\S]+?)%>/g,En=/<%=([\s\S]+?)%>/g,kn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,Sn=/^\w*$/,Cn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,On=/^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g,Tn=RegExp(On.source),An=/[\u0300-\u036f\ufe20-\ufe23]/g,Pn=/\\(\\)?/g,Mn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Rn=/\w*$/,Nn=/^0[xX]/,Dn=/^\[object .+?Constructor\]$/,In=/^\d+$/,Ln=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,jn=/($^)/,Fn=/['\n\r\u2028\u2029\\]/g,zn=function(){var n="[A-Z\\xc0-\\xd6\\xd8-\\xde]",t="[a-z\\xdf-\\xf6\\xf8-\\xff]+";return RegExp(n+"+(?="+n+t+")|"+n+"?"+t+"|"+n+"+|[0-9]+","g")}(),Un=["Array","ArrayBuffer","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Math","Number","Object","RegExp","Set","String","_","clearTimeout","isFinite","parseFloat","parseInt","setTimeout","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap"],Vn=-1,Bn={};Bn[on]=Bn[an]=Bn[sn]=Bn[ln]=Bn[cn]=Bn[un]=Bn[pn]=Bn[dn]=Bn[fn]=!0,Bn[K]=Bn[X]=Bn[rn]=Bn[Y]=Bn[$]=Bn[Z]=Bn[Q]=Bn["[object Map]"]=Bn[J]=Bn[nn]=Bn[tn]=Bn["[object Set]"]=Bn[en]=Bn["[object WeakMap]"]=!1;var Gn={};Gn[K]=Gn[X]=Gn[rn]=Gn[Y]=Gn[$]=Gn[on]=Gn[an]=Gn[sn]=Gn[ln]=Gn[cn]=Gn[J]=Gn[nn]=Gn[tn]=Gn[en]=Gn[un]=Gn[pn]=Gn[dn]=Gn[fn]=!0,Gn[Z]=Gn[Q]=Gn["[object Map]"]=Gn["[object Set]"]=Gn["[object WeakMap]"]=!1;var Hn={"À":"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"},qn={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Wn={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},Kn={function:!0,object:!0},Xn={0:"x30",1:"x31",2:"x32",3:"x33",4:"x34",5:"x35",6:"x36",7:"x37",8:"x38",9:"x39",A:"x41",B:"x42",C:"x43",D:"x44",E:"x45",F:"x46",a:"x61",b:"x62",c:"x63",d:"x64",e:"x65",f:"x66",n:"x6e",r:"x72",t:"x74",u:"x75",v:"x76",x:"x78"},Yn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},$n=Kn[typeof t]&&t&&!t.nodeType&&t,Zn=Kn[typeof n]&&n&&!n.nodeType&&n,Qn=$n&&Zn&&"object"==typeof r&&r&&r.Object&&r,Jn=Kn[typeof self]&&self&&self.Object&&self,nt=Kn[typeof window]&&window&&window.Object&&window,tt=(Zn&&Zn.exports,Qn||nt!==(this&&this.window)&&nt||Jn||this),et=C();tt._=et,(o=function(){return et}.call(t,e,t,n))!==O&&(n.exports=o)}).call(this)}).call(t,e(297)(n),e(139))},function(n,t){var e=n.exports={version:"2.5.1"};"number"==typeof __e&&(__e=e)},function(n,t,e){var r=e(152)("wks"),o=e(104),i=e(44).Symbol,a="function"==typeof i;(n.exports=function(n){return r[n]||(r[n]=a&&i[n]||(a?i:o)("Symbol."+n))}).store=r},function(n,t,e){"use strict";function r(n){return!n||"#"===n.trim()}var o=e(4),i=e.n(o),a=e(5),s=e.n(a),l=e(1),c=e.n(l),u=e(2),p=e.n(u),d=e(3),f=e.n(d),h=e(0),g=e.n(h),b=e(7),m=e.n(b),v=e(11),y=e.n(v),x=e(14),w={href:m.a.string,onClick:m.a.func,onKeyDown:m.a.func,disabled:m.a.bool,role:m.a.string,tabIndex:m.a.oneOfType([m.a.number,m.a.string]),componentClass:y.a},_={componentClass:"a"},E=function(n){function t(e,r){c()(this,t);var o=p()(this,n.call(this,e,r));return o.handleClick=o.handleClick.bind(o),o.handleKeyDown=o.handleKeyDown.bind(o),o}return f()(t,n),t.prototype.handleClick=function(n){var t=this.props,e=t.disabled,o=t.href,i=t.onClick;if((e||r(o))&&n.preventDefault(),e)return void n.stopPropagation();i&&i(n)},t.prototype.handleKeyDown=function(n){" "===n.key&&(n.preventDefault(),this.handleClick(n))},t.prototype.render=function(){var n=this.props,t=n.componentClass,e=n.disabled,o=n.onKeyDown,a=s()(n,["componentClass","disabled","onKeyDown"]);return r(a.href)&&(a.role=a.role||"button",a.href=a.href||"#"),e&&(a.tabIndex=-1,a.style=i()({pointerEvents:"none"},a.style)),g.a.createElement(t,i()({},a,{onClick:this.handleClick,onKeyDown:Object(x.a)(this.handleKeyDown,o)}))},t}(g.a.Component);E.propTypes=w,E.defaultProps=_,t.a=E},function(n,t,e){"use strict";var r={current:null};n.exports=r},function(n,t,e){"use strict";var r=e(94),o=r({bubbled:null,captured:null}),i=r({topAbort:null,topBlur:null,topCanPlay:null,topCanPlayThrough:null,topChange:null,topClick:null,topCompositionEnd:null,topCompositionStart:null,topCompositionUpdate:null,topContextMenu:null,topCopy:null,topCut:null,topDoubleClick:null,topDrag:null,topDragEnd:null,topDragEnter:null,topDragExit:null,topDragLeave:null,topDragOver:null,topDragStart:null,topDrop:null,topDurationChange:null,topEmptied:null,topEncrypted:null,topEnded:null,topError:null,topFocus:null,topInput:null,topKeyDown:null,topKeyPress:null,topKeyUp:null,topLoad:null,topLoadedData:null,topLoadedMetadata:null,topLoadStart:null,topMouseDown:null,topMouseMove:null,topMouseOut:null,topMouseOver:null,topMouseUp:null,topPaste:null,topPause:null,topPlay:null,topPlaying:null,topProgress:null,topRateChange:null,topReset:null,topScroll:null,topSeeked:null,topSeeking:null,topSelectionChange:null,topStalled:null,topSubmit:null,topSuspend:null,topTextInput:null,topTimeUpdate:null,topTouchCancel:null,topTouchEnd:null,topTouchMove:null,topTouchStart:null,topVolumeChange:null,topWaiting:null,topWheel:null}),a={topLevelTypes:i,PropagationPhases:o};n.exports=a},function(n,t,e){"use strict";function r(n){return"[object Array]"===v.call(n)}function o(n){return"[object ArrayBuffer]"===v.call(n)}function i(n){return"[object FormData]"===v.call(n)}function a(n){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(n):n&&n.buffer&&n.buffer instanceof ArrayBuffer}function s(n){return"string"==typeof n}function l(n){return"number"==typeof n}function c(n){return void 0===n}function u(n){return null!==n&&"object"==typeof n}function p(n){return"[object Date]"===v.call(n)}function d(n){return"[object File]"===v.call(n)}function f(n){return"[object Blob]"===v.call(n)}function h(n){return n.replace(/^\s*/,"").replace(/\s*$/,"")}function g(n){return"[object Arguments]"===v.call(n)}function b(n,t){if(null!==n&&void 0!==n){var e=r(n)||g(n);if("object"==typeof n||e||(n=[n]),e)for(var o=0,i=n.length;o should not have a "'+t+'" prop')}t.__esModule=!0,t.falsy=r;var o=e(0),i=o.PropTypes.func,a=o.PropTypes.object,s=o.PropTypes.arrayOf,l=o.PropTypes.oneOfType,c=o.PropTypes.element,u=o.PropTypes.shape,p=o.PropTypes.string,d=u({listen:i.isRequired,pushState:i.isRequired,replaceState:i.isRequired,go:i.isRequired});t.history=d;var f=u({pathname:p.isRequired,search:p.isRequired,state:a,action:p.isRequired,key:p});t.location=f;var h=l([i,p]);t.component=h;var g=l([h,a]);t.components=g;var b=l([a,c]);t.route=b;var m=l([b,s(b)]);t.routes=m,t.default={falsy:r,history:d,location:f,component:h,components:g,route:b}},function(n,t,e){var r=e(67),o=e(319),i=e(147),a=Object.defineProperty;t.f=e(68)?Object.defineProperty:function(n,t,e){if(r(n),t=i(t,!0),r(e),o)try{return a(n,t,e)}catch(n){}if("get"in e||"set"in e)throw TypeError("Accessors not supported!");return"value"in e&&(n[t]=e.value),n}},function(n,t){var e={}.hasOwnProperty;n.exports=function(n,t){return e.call(n,t)}},function(n,t,e){var r=e(322),o=e(149);n.exports=function(n){return r(o(n))}},function(n,t,e){"use strict";function r(n){return!n.error}function o(n,t){return function(e,r){return r.type===n?t(e,r):e}}function i(n,t){return function(e,r){return void 0===e&&(e=t),n.reduce(function(n,t){return t(n,r)},e)}}function a(n,t){return{type:"string"==typeof n?n:n.name,payload:t}}function s(n){return n}function l(n,t){return void 0===t&&(t=s),function(e,r){switch(r.type){case n:return t(r.payload)}}}function c(n,t){return function(e){var r=n(e);return t(r)}}Object.defineProperty(t,"__esModule",{value:!0}),t.SequenceType={Start:"start",Next:"next",Done:"done"};var u=function(){function n(n,t){t&&(n=t+"/"+n),this.name=n}return n.prototype.create=function(n){return{type:this.name,payload:n}},n.prototype.createError=function(n){return{type:this.name,payload:n}},n.prototype.matches=function(n){return n.type===this.name},n}();t.ActionType=u;var p=function(){function n(n,t){t&&(n=t+"/"+n),this.name=n}return n.prototype.create=function(n){var t=this,e=_.uniqueId();return function(r,o){r({type:t.name,sequence:{id:e,type:"start"}}),n.then(function(n){r({type:t.name,payload:n,sequence:{id:e,type:"done"}})}).catch(function(n){r({type:t.name,payload:n,error:!0,sequence:{id:e,type:"done"}})})}},n.prototype.matches=function(n){return n.type===this.name},n}();t.AsyncActionType=p,t.actionIsError=r,t.handleAction=o,t.handleActions=i,t.CreateAction=a,t.ActionReducer=l,t.selectAndMap=c},function(n,t,e){"use strict";function r(n){var t=d3.scale.category20().range();return n.reduce(function(n,t){var e=t.lines.map(function(n){return n.code});return s.unique(n.concat(e))},[]).sort().reduce(function(n,e,r){return n[e]=t[r%t.length],n},{})}function o(n){var t=n.filter(function(n){return n.totalProduced<0}).map(function(n){return n.reference});return n.filter(function(n){return!s.contains(t,"RV"+n.reference)&&n.totalProduced>0})}function i(n,e,r){return void 0===n&&(n=t.DEFAULT_EFFICIENCY_CODE),void 0===r&&(r=t.LABOUR_CODES),function(o){var i=0,a=0,l=0,c=0;if(!o.lines)return s.assign(o,{efficiency:i,totalCost:a,totalLoss:l,lines:[]});var u=o.lines.map(function(u){u.code===n&&(i=u.quantity/o.totalProduced);var p=Math.abs(u.quantity),d=Math.abs(u.cost),f=d/o.totalProduced,h=d/p;a+=d,s.contains(t.TOP_UP_CODES,u.code)&&(c+=d);var g={units:p,value:d,percentage:0},b=0;return e&&e.materials[u.code]&&(b=e.materials[u.code].quantity*o.totalProduced,g.units=p-b,g.percentage=g.units/b*100,g.value=g.units*h),s.contains(r,u.code)||(l+=g.value),s.assign({},u,{loss:g,expectedQuantity:b,costPerUnit:f})}),p=a/o.totalProduced,d=(a-c)/o.totalProduced;return s.assign(o,{efficiency:i,totalCost:a,unitCost:p,unitProductionCost:d,totalLoss:l,lines:u})}}function a(n,t,e,r){return n.map(i(t,e,r)).reduce(function(n,t,e,r){if(t.averageProductionCost=t.averageProductionCost,t.averageEfficiency=t.efficiency,t.averageLoss=t.totalLoss,e>1){var o=e+1,i=0;e>10&&(i=o-10);var a=o-i,s=r.slice(i,o).reduce(function(n,t){return n.cost+=t.unitProductionCost,n.efficiency+=t.efficiency,n.loss+=t.totalLoss,n},{loss:0,efficiency:0,cost:0});t.averageProductionCost=s.cost/a,t.averageEfficiency=s.efficiency/a,t.averageLoss=s.loss/a}return n.push(t),n},[])}Object.defineProperty(t,"__esModule",{value:!0});var s=e(31);t.LABOUR_CODES=["00-LABOUR","00-PACK","00-XTRALABOUR"],t.TOP_UP_CODES=["00-PACK","00-XTRALABOUR"],t.DEFAULT_EFFICIENCY_CODE="00-LABOUR",t.getColors=r,t.filterReversed=o,t.processBOM=i,t.processBillOfMaterials=a},function(n,t,e){"use strict";function r(n){return f+n.toString(36)}function o(n,t){return n.charAt(t)===f||t===n.length}function i(n){return""===n||n.charAt(0)===f&&n.charAt(n.length-1)!==f}function a(n,t){return 0===t.indexOf(n)&&o(t,n.length)}function s(n){return n?n.substr(0,n.lastIndexOf(f)):""}function l(n,t){if(i(n)&&i(t)||d(!1),a(n,t)||d(!1),n===t)return n;var e,r=n.length+h;for(e=r;e1){var t=n.indexOf(f,1);return t>-1?n.substr(0,t):n}return null},traverseEnterLeave:function(n,t,e,r,o){var i=c(n,t);i!==n&&u(n,i,e,r,!1,!0),i!==t&&u(i,t,e,o,!0,!1)},traverseTwoPhase:function(n,t,e){n&&(u("",n,t,e,!0,!1),u(n,"",t,e,!1,!0))},traverseTwoPhaseSkipTarget:function(n,t,e){n&&(u("",n,t,e,!0,!0),u(n,"",t,e,!0,!0))},traverseAncestors:function(n,t,e){u("",n,t,e,!0,!1)},getFirstCommonAncestorID:c,_getNextDescendantID:l,isAncestorIDOf:a,SEPARATOR:f};n.exports=b},function(n,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e(294),o=e(492),i=e(493),a=e(494),s=e(299);e(298);e.d(t,"createStore",function(){return r.b}),e.d(t,"combineReducers",function(){return o.a}),e.d(t,"bindActionCreators",function(){return i.a}),e.d(t,"applyMiddleware",function(){return a.a}),e.d(t,"compose",function(){return s.a})},function(n,t,e){"use strict";var r=function(){};n.exports=r},function(n,t,e){"use strict";function r(n){return n.columns.reduce(function(n,t){return n&&0===t},!0)}var o=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var e in t)t.hasOwnProperty(e)&&(n[e]=t[e])};return function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),i=this&&this.__assign||Object.assign||function(n){for(var t,e=1,r=arguments.length;eh){var g=Math.floor(this.props.rows.length/h+.5);f=i.createElement(l.Pagination,{next:!0,prev:!0,ellipsis:!0,first:!0,last:!0,maxButtons:5,items:g,activePage:this.state.currentPage+1,bsSize:"small",onSelect:this.handlePageChange.bind(this)})}return i.createElement("div",null,c,i.createElement(l.Table,o({},r),i.createElement("thead",null,i.createElement("tr",null,n)),i.createElement("tbody",null,p,d)),f)},t.defaultProps={columns:[],perPage:10,inlineAdd:!1},t}(i.Component),p=function(n){function t(){return null!==n&&n.apply(this,arguments)||this}return r(t,n),t.prototype.getRowValues=function(n){return n},t}(u);t.SimpleSelectableTable=p,t.default=u},function(n,t,e){"use strict";function r(n){return n&&n.__esModule?n:{default:n}}Object.defineProperty(t,"__esModule",{value:!0});var o=e(780),i=r(o);t.IndexLinkContainer=i.default;var a=e(398),s=r(a);t.LinkContainer=s.default},function(n,t,e){n.exports=e.p+"f4769f9bdb7466be65088239c12046d1.eot"},function(n,t,e){"use strict";var r=e(264),o=e(414),i=e(265),a=e(266),s=e(267),l=e(9),c=(e(12),{}),u=null,p=function(n,t){n&&(o.executeDispatchesInOrder(n,t),n.isPersistent()||n.constructor.release(n))},d=function(n){return p(n,!0)},f=function(n){return p(n,!1)},h=null,g={injection:{injectMount:o.injection.injectMount,injectInstanceHandle:function(n){h=n},getInstanceHandle:function(){return h},injectEventPluginOrder:r.injectEventPluginOrder,injectEventPluginsByName:r.injectEventPluginsByName},eventNameDispatchConfigs:r.eventNameDispatchConfigs,registrationNameModules:r.registrationNameModules,putListener:function(n,t,e){"function"!=typeof e&&l(!1),(c[t]||(c[t]={}))[n]=e;var o=r.registrationNameModules[t];o&&o.didPutListener&&o.didPutListener(n,t,e)},getListener:function(n,t){var e=c[t];return e&&e[n]},deleteListener:function(n,t){var e=r.registrationNameModules[t];e&&e.willDeleteListener&&e.willDeleteListener(n,t);var o=c[t];o&&delete o[n]},deleteAllListeners:function(n){for(var t in c)if(c[t][n]){var e=r.registrationNameModules[t];e&&e.willDeleteListener&&e.willDeleteListener(n,t),delete c[t][n]}},extractEvents:function(n,t,e,o,i){for(var s,l=r.plugins,c=0;c0||d.default(!1),null!=u&&(i+=encodeURI(u))):"("===l?o+=1:")"===l?o-=1:":"===l.charAt(0)?(c=l.substring(1),u=t[c],null!=u||o>0||d.default(!1),null!=u&&(i+=encodeURIComponent(u))):i+=l;return i.replace(/\/+/g,"/")}t.__esModule=!0,t.compilePattern=a,t.matchPattern=s,t.getParamNames=l,t.getParams=c,t.formatPattern=u;var p=e(15),d=function(n){return n&&n.__esModule?n:{default:n}}(p),f={}},function(n,t){n.exports=function(n){return"object"==typeof n?null!==n:"function"==typeof n}},function(n,t){n.exports=function(n){try{return!!n()}catch(n){return!0}}},function(n,t){n.exports=function(n,t){return{enumerable:!(1&n),configurable:!(2&n),writable:!(4&n),value:t}}},function(n,t,e){var r=e(321),o=e(153);n.exports=Object.keys||function(n){return r(n,o)}},function(n,t){t.f={}.propertyIsEnumerable},function(n,t){n.exports={}},function(n,t,e){"use strict";var r=e(69),o=e.n(r),i=e(5),a=e.n(i),s=e(4),l=e.n(s),c=e(1),u=e.n(c),p=e(2),d=e.n(p),f=e(3),h=e.n(f),g=e(6),b=e.n(g),m=e(0),v=e.n(m),y=e(7),x=e.n(y),w=e(11),_=e.n(w),E=e(8),k=e(17),S=e(34),C={active:x.a.bool,disabled:x.a.bool,block:x.a.bool,onClick:x.a.func,componentClass:_.a,href:x.a.string,type:x.a.oneOf(["button","reset","submit"])},O={active:!1,block:!1,disabled:!1},T=function(n){function t(){return u()(this,t),d()(this,n.apply(this,arguments))}return h()(t,n),t.prototype.renderAnchor=function(n,t){return v.a.createElement(S.a,l()({},n,{className:b()(t,n.disabled&&"disabled")}))},t.prototype.renderButton=function(n,t){var e=n.componentClass,r=a()(n,["componentClass"]),o=e||"button";return v.a.createElement(o,l()({},r,{type:r.type||"button",className:t}))},t.prototype.render=function(){var n,t=this.props,e=t.active,r=t.block,o=t.className,i=a()(t,["active","block","className"]),s=Object(E.splitBsProps)(i),c=s[0],u=s[1],p=l()({},Object(E.getClassSet)(c),(n={active:e},n[Object(E.prefix)(c,"block")]=r,n)),d=b()(o,p);return u.href?this.renderAnchor(u,d):this.renderButton(u,d)},t}(v.a.Component);T.propTypes=C,T.defaultProps=O,t.a=Object(E.bsClass)("btn",Object(E.bsSizes)([k.c.LARGE,k.c.SMALL,k.c.XSMALL],Object(E.bsStyles)([].concat(o()(k.d),[k.e.DEFAULT,k.e.PRIMARY,k.e.LINK]),k.e.DEFAULT,T)))},function(n,t,e){"use strict";function r(n,t,e,r,o){e&&(n._notifying=!0,e.call.apply(e,[n,r].concat(o)),n._notifying=!1),n._values[t]=r,n.unmounted||n.forceUpdate()}t.__esModule=!0;var o=e(594),i=function(n){return n&&n.__esModule?n:{default:n}}(o),a={shouldComponentUpdate:function(){return!this._notifying}};t.default=(0,i.default)(a,r),n.exports=t.default},function(n,t,e){"use strict";function r(n){return n&&n.__esModule?n:{default:n}}t.__esModule=!0,t.default=function(n){return(0,s.default)(i.default.findDOMNode(n))};var o=e(22),i=r(o),a=e(70),s=r(a);n.exports=t.default},function(n,t,e){"use strict";function r(n,t){if(t){var e="Bearer "+t;n.headers?n.headers.Authorization=e:n.headers={Authorization:e}}return n.url=l.API_URL+n.url,s(n).then(function(n){return n.data})}function o(n){return!!n[c]}function i(n){return function(t){return function(e){return function(r){var i=t.getState().user;if(o(r)){var a=r[c];return n({url:a.endpoint,method:a.method||"get",params:a.params,data:a.data||void 0},i.idToken).then(function(n){return e(a.onSuccess(n))}).catch(function(n){if(a.onError)return e(a.onError(n));console.log(n)}),delete r[c],e(r)}return e(r)}}}}function a(n,t,e){var r={type:n,payload:e};return r[c]=t,r}Object.defineProperty(t,"__esModule",{value:!0});var s=e(366),l=e(42);t.request=r;var c="$$API_CALL";t.apiMiddleware=i,t.ApiCall=a},function(n,t,e){/*! Copyright (c) 2015 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ function r(){for(var n,t="",e=0;e]/,a=function(n,t){n.innerHTML=t};if("undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction&&(a=function(n,t){MSApp.execUnsafeLocalFunction(function(){n.innerHTML=t})}),r.canUseDOM){var s=document.createElement("div");s.innerHTML=" ",""===s.innerHTML&&(a=function(n,t){if(n.parentNode&&n.parentNode.replaceChild(n,n),o.test(t)||"<"===t[0]&&i.test(t)){n.innerHTML=String.fromCharCode(65279)+t;var e=n.firstChild;1===e.data.length?n.removeChild(e):e.deleteData(0,1)}else n.innerHTML=t})}n.exports=a},function(n,t,e){"use strict";function r(n){return i[n]}function o(n){return(""+n).replace(a,r)}var i={"&":"&",">":">","<":"<",'"':""","'":"'"},a=/[&><"']/g;n.exports=o},function(n,t,e){"use strict";function r(n){return Object.prototype.hasOwnProperty.call(n,b)||(n[b]=h++,d[n[b]]={}),d[n[b]]}var o=e(36),i=e(76),a=e(264),s=e(415),l=e(24),c=e(268),u=e(10),p=e(124),d={},f=!1,h=0,g={topAbort:"abort",topBlur:"blur",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topChange:"change",topClick:"click",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topScroll:"scroll",topSeeked:"seeked",topSeeking:"seeking",topSelectionChange:"selectionchange",topStalled:"stalled",topSuspend:"suspend",topTextInput:"textInput",topTimeUpdate:"timeupdate",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topVolumeChange:"volumechange",topWaiting:"waiting",topWheel:"wheel"},b="_reactListenersID"+String(Math.random()).slice(2),m=u({},s,{ReactEventListener:null,injection:{injectReactEventListener:function(n){n.setHandleTopLevel(m.handleTopLevel),m.ReactEventListener=n}},setEnabled:function(n){m.ReactEventListener&&m.ReactEventListener.setEnabled(n)},isEnabled:function(){return!(!m.ReactEventListener||!m.ReactEventListener.isEnabled())},listenTo:function(n,t){for(var e=t,i=r(e),s=a.registrationNameDependencies[n],l=o.topLevelTypes,c=0;c>",l=a||r;if(null==e[r])return t?new Error("Required "+i+" `"+l+"` was not specified in `"+s+"`."):null;for(var c=arguments.length,u=Array(c>6?c-6:0),p=6;p>",s=i||e;if(null==t[e])return new Error("The "+o+" `"+s+"` is required to make `"+a+"` accessible for users of assistive technologies such as screen readers.");for(var l=arguments.length,c=Array(l>5?l-5:0),u=5;u0&&r[0]>0&&r.unshift(r[0]-(r[1]-r[0])),r}function s(){var n,e=b.copy();return t.isCategory&&(n=b.domain(),e.domain([n[0],n[1]-1])),e}function l(n){var t=f?f(n):n;return void 0!==t?t:""}function c(n){if(a)return a;var t={h:11.5,w:5.5};return n.select("text").text(l).each(function(n){var e=this.getBoundingClientRect(),r=l(n),o=e.height,i=r?e.width/r.length:void 0;o&&i&&(t.h=o,t.w=i)}).text(""),a=t,t}function u(e){return t.withoutTransition?e:n.transition(e)}function p(a){a.each(function(){function a(n,e){function r(n,t){i=void 0;for(var s=1;s0?1:-1):H}(W)).style("text-anchor",function(n){return n?n>0?"start":"end":"middle"}(W)).attr("transform",function(n){return n?"rotate("+n+")":""}(W)),V.attr("x",0).attr("dy",f).attr("dx",function(n){return n?8*Math.sin(Math.PI*(n/180)):0}(W)),I.attr("d","M"+N[0]+","+d+"V0H"+N[1]+"V"+d);break;case"top":_=e,L.attr("y2",-v),F.attr("y",-H),j.attr("x2",0).attr("y2",-v),z.attr("x",0).attr("y",-H),U.style("text-anchor","middle"),V.attr("x",0).attr("dy","0em"),I.attr("d","M"+N[0]+","+-d+"V0H"+N[1]+"V"+-d);break;case"left":_=r,L.attr("x2",-v),F.attr("x",-H),j.attr("x2",-v).attr("y1",k).attr("y2",k),z.attr("x",-H).attr("y",w),U.style("text-anchor","end"),V.attr("x",-H).attr("dy",f),I.attr("d","M"+-d+","+N[0]+"H0V"+N[1]+"H"+-d);break;case"right":_=r,L.attr("x2",v),F.attr("x",H),j.attr("x2",v).attr("y2",0),z.attr("x",H).attr("y",0),U.style("text-anchor","start"),V.attr("x",H).attr("dy",f),I.attr("d","M"+d+","+N[0]+"H0V"+N[1]+"H"+d)}if(O.rangeBand){var K=O,X=K.rangeBand()/2;C=O=function(n){return K(n)+X}}else C.rangeBand?C=O:M.call(_,O);P.call(_,C),R.call(_,O)})}var d,f,h,g,b=n.scale.linear(),m="bottom",v=6,y=3,x=null,w=0,_=!0;return t=t||{},d=t.withOuterTick?6:0,p.scale=function(n){return arguments.length?(b=n,p):b},p.orient=function(n){return arguments.length?(m=n in{top:1,right:1,bottom:1,left:1}?n+"":"bottom",p):m},p.tickFormat=function(n){return arguments.length?(f=n,p):f},p.tickCentered=function(n){return arguments.length?(g=n,p):g},p.tickOffset=function(){return w},p.tickInterval=function(){var n,e;return t.isCategory?n=2*w:(e=p.g.select("path.domain").node().getTotalLength()-2*d,n=e/p.g.selectAll("line").size()),n===1/0?0:n},p.ticks=function(){return arguments.length?(h=arguments,p):h},p.tickCulling=function(n){return arguments.length?(_=n,p):_},p.tickValues=function(n){if("function"==typeof n)x=function(){return n(b.domain())};else{if(!arguments.length)return x;x=n}return p},p}function t(n){r.call(this,n)}function r(n){this.owner=n}function o(n){var t=this.internal=new i(this);t.loadConfig(n),t.beforeInit(n),t.init(),t.afterInit(n),function n(t,e,r){Object.keys(t).forEach(function(o){e[o]=t[o].bind(r),Object.keys(t[o]).length>0&&n(t[o],e[o],r)})}(E,this,this)}function i(n){var t=this;t.d3=window.d3?window.d3:e(374),t.api=n,t.config=t.getDefaultConfig(),t.data={},t.cache={},t.axes={}}var a,s={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_"},l=function(n){return n||0===n},c=function(n){return"function"==typeof n},u=function(n){return Array.isArray(n)},p=function(n){return"string"==typeof n},d=function(n){return void 0===n},f=function(n){return void 0!==n},h=function(n){return 10*Math.ceil(n/10)},g=function(n){return Math.ceil(n)+.5},b=function(n){return n[1]-n[0]},m=function(n){return void 0===n||null===n||p(n)&&0===n.length||"object"==typeof n&&0===Object.keys(n).length},v=function(n){return!k.isEmpty(n)},y=function(n,t,e){return f(n[t])?n[t]:e},x=function(n,t){var e=!1;return Object.keys(n).forEach(function(r){n[r]===t&&(e=!0)}),e},w=function(n){return"string"==typeof n?n.replace(//g,">"):n},_=function(n){var t=n.getBoundingClientRect(),e=[n.pathSegList.getItem(0),n.pathSegList.getItem(1)];return{x:e[0].x,y:Math.min(e[0].y,e[1].y),width:t.width,height:t.height}};!function(n,t){if(Object.create)t.prototype=Object.create(n.prototype);else{var e=function(){};e.prototype=n.prototype,t.prototype=new e}t.prototype.constructor=t}(r,t),t.prototype.init=function(){var n=this.owner,t=n.config,e=n.main;n.axes.x=e.append("g").attr("class",s.axis+" "+s.axisX).attr("clip-path",n.clipPathForXAxis).attr("transform",n.getTranslate("x")).style("visibility",t.axis_x_show?"visible":"hidden"),n.axes.x.append("text").attr("class",s.axisXLabel).attr("transform",t.axis_rotated?"rotate(-90)":"").style("text-anchor",this.textAnchorForXAxisLabel.bind(this)),n.axes.y=e.append("g").attr("class",s.axis+" "+s.axisY).attr("clip-path",t.axis_y_inner?"":n.clipPathForYAxis).attr("transform",n.getTranslate("y")).style("visibility",t.axis_y_show?"visible":"hidden"),n.axes.y.append("text").attr("class",s.axisYLabel).attr("transform",t.axis_rotated?"":"rotate(-90)").style("text-anchor",this.textAnchorForYAxisLabel.bind(this)),n.axes.y2=e.append("g").attr("class",s.axis+" "+s.axisY2).attr("transform",n.getTranslate("y2")).style("visibility",t.axis_y2_show?"visible":"hidden"),n.axes.y2.append("text").attr("class",s.axisY2Label).attr("transform",t.axis_rotated?"":"rotate(-90)").style("text-anchor",this.textAnchorForY2AxisLabel.bind(this))},t.prototype.getXAxis=function(t,e,r,o,i,a,s){var l=this.owner,c=l.config,u={isCategory:l.isCategorized(),withOuterTick:i,tickMultiline:c.axis_x_tick_multiline,tickWidth:c.axis_x_tick_width,tickTextRotate:s?0:c.axis_x_tick_rotate,withoutTransition:a},p=n(l.d3,u).scale(t).orient(e);return l.isTimeSeries()&&o&&"function"!=typeof o&&(o=o.map(function(n){return l.parseDate(n)})),p.tickFormat(r).tickValues(o),l.isCategorized()&&(p.tickCentered(c.axis_x_tick_centered),m(c.axis_x_tick_culling)&&(c.axis_x_tick_culling=!1)),p},t.prototype.updateXAxisTickValues=function(n,t){var e,r=this.owner,o=r.config;return(o.axis_x_tick_fit||o.axis_x_tick_count)&&(e=this.generateTickValues(r.mapTargetsToUniqueXs(n),o.axis_x_tick_count,r.isTimeSeries())),t?t.tickValues(e):(r.xAxis.tickValues(e),r.subXAxis.tickValues(e)),e},t.prototype.getYAxis=function(t,e,r,o,i,a,s){var l=this.owner,c=l.config,u={withOuterTick:i,withoutTransition:a,tickTextRotate:s?0:c.axis_y_tick_rotate},p=n(l.d3,u).scale(t).orient(e).tickFormat(r);return l.isTimeSeriesY()?p.ticks(l.d3.time[c.axis_y_tick_time_value],c.axis_y_tick_time_interval):p.tickValues(o),p},t.prototype.getId=function(n){var t=this.owner.config;return n in t.data_axes?t.data_axes[n]:"y"},t.prototype.getXAxisTickFormat=function(){var n=this.owner,t=n.config,e=n.isTimeSeries()?n.defaultAxisTimeFormat:n.isCategorized()?n.categoryName:function(n){return n<0?n.toFixed(0):n};return t.axis_x_tick_format&&(c(t.axis_x_tick_format)?e=t.axis_x_tick_format:n.isTimeSeries()&&(e=function(e){return e?n.axisTimeFormat(t.axis_x_tick_format)(e):""})),c(e)?function(t){return e.call(n,t)}:e},t.prototype.getTickValues=function(n,t){return n||(t?t.tickValues():void 0)},t.prototype.getXAxisTickValues=function(){return this.getTickValues(this.owner.config.axis_x_tick_values,this.owner.xAxis)},t.prototype.getYAxisTickValues=function(){return this.getTickValues(this.owner.config.axis_y_tick_values,this.owner.yAxis)},t.prototype.getY2AxisTickValues=function(){return this.getTickValues(this.owner.config.axis_y2_tick_values,this.owner.y2Axis)},t.prototype.getLabelOptionByAxisId=function(n){var t,e=this.owner,r=e.config;return"y"===n?t=r.axis_y_label:"y2"===n?t=r.axis_y2_label:"x"===n&&(t=r.axis_x_label),t},t.prototype.getLabelText=function(n){var t=this.getLabelOptionByAxisId(n);return p(t)?t:t?t.text:null},t.prototype.setLabelText=function(n,t){var e=this.owner,r=e.config,o=this.getLabelOptionByAxisId(n);p(o)?"y"===n?r.axis_y_label=t:"y2"===n?r.axis_y2_label=t:"x"===n&&(r.axis_x_label=t):o&&(o.text=t)},t.prototype.getLabelPosition=function(n,t){var e=this.getLabelOptionByAxisId(n),r=e&&"object"==typeof e&&e.position?e.position:t;return{isInner:r.indexOf("inner")>=0,isOuter:r.indexOf("outer")>=0,isLeft:r.indexOf("left")>=0,isCenter:r.indexOf("center")>=0,isRight:r.indexOf("right")>=0,isTop:r.indexOf("top")>=0,isMiddle:r.indexOf("middle")>=0,isBottom:r.indexOf("bottom")>=0}},t.prototype.getXAxisLabelPosition=function(){return this.getLabelPosition("x",this.owner.config.axis_rotated?"inner-top":"inner-right")},t.prototype.getYAxisLabelPosition=function(){return this.getLabelPosition("y",this.owner.config.axis_rotated?"inner-right":"inner-top")},t.prototype.getY2AxisLabelPosition=function(){return this.getLabelPosition("y2",this.owner.config.axis_rotated?"inner-right":"inner-top")},t.prototype.getLabelPositionById=function(n){return"y2"===n?this.getY2AxisLabelPosition():"y"===n?this.getYAxisLabelPosition():this.getXAxisLabelPosition()},t.prototype.textForXAxisLabel=function(){return this.getLabelText("x")},t.prototype.textForYAxisLabel=function(){return this.getLabelText("y")},t.prototype.textForY2AxisLabel=function(){return this.getLabelText("y2")},t.prototype.xForAxisLabel=function(n,t){var e=this.owner;return n?t.isLeft?0:t.isCenter?e.width/2:e.width:t.isBottom?-e.height:t.isMiddle?-e.height/2:0},t.prototype.dxForAxisLabel=function(n,t){return n?t.isLeft?"0.5em":t.isRight?"-0.5em":"0":t.isTop?"-0.5em":t.isBottom?"0.5em":"0"},t.prototype.textAnchorForAxisLabel=function(n,t){return n?t.isLeft?"start":t.isCenter?"middle":"end":t.isBottom?"start":t.isMiddle?"middle":"end"},t.prototype.xForXAxisLabel=function(){return this.xForAxisLabel(!this.owner.config.axis_rotated,this.getXAxisLabelPosition())},t.prototype.xForYAxisLabel=function(){return this.xForAxisLabel(this.owner.config.axis_rotated,this.getYAxisLabelPosition())},t.prototype.xForY2AxisLabel=function(){return this.xForAxisLabel(this.owner.config.axis_rotated,this.getY2AxisLabelPosition())},t.prototype.dxForXAxisLabel=function(){return this.dxForAxisLabel(!this.owner.config.axis_rotated,this.getXAxisLabelPosition())},t.prototype.dxForYAxisLabel=function(){return this.dxForAxisLabel(this.owner.config.axis_rotated,this.getYAxisLabelPosition())},t.prototype.dxForY2AxisLabel=function(){return this.dxForAxisLabel(this.owner.config.axis_rotated,this.getY2AxisLabelPosition())},t.prototype.dyForXAxisLabel=function(){var n=this.owner,t=n.config,e=this.getXAxisLabelPosition();return t.axis_rotated?e.isInner?"1.2em":-25-this.getMaxTickWidth("x"):e.isInner?"-0.5em":t.axis_x_height?t.axis_x_height-10:"3em"},t.prototype.dyForYAxisLabel=function(){var n=this.owner,t=this.getYAxisLabelPosition();return n.config.axis_rotated?t.isInner?"-0.5em":"3em":t.isInner?"1.2em":-10-(n.config.axis_y_inner?0:this.getMaxTickWidth("y")+10)},t.prototype.dyForY2AxisLabel=function(){var n=this.owner,t=this.getY2AxisLabelPosition();return n.config.axis_rotated?t.isInner?"1.2em":"-2.2em":t.isInner?"-0.5em":15+(n.config.axis_y2_inner?0:this.getMaxTickWidth("y2")+15)},t.prototype.textAnchorForXAxisLabel=function(){var n=this.owner;return this.textAnchorForAxisLabel(!n.config.axis_rotated,this.getXAxisLabelPosition())},t.prototype.textAnchorForYAxisLabel=function(){var n=this.owner;return this.textAnchorForAxisLabel(n.config.axis_rotated,this.getYAxisLabelPosition())},t.prototype.textAnchorForY2AxisLabel=function(){var n=this.owner;return this.textAnchorForAxisLabel(n.config.axis_rotated,this.getY2AxisLabelPosition())},t.prototype.getMaxTickWidth=function(n,t){var e,r,o,i,a,s=this.owner,l=s.config,c=0;return t&&s.currentMaxTickWidths[n]?s.currentMaxTickWidths[n]:(s.svg&&(e=s.filterTargetsToShow(s.data.targets),"y"===n?(r=s.y.copy().domain(s.getYDomain(e,"y")),o=this.getYAxis(r,s.yOrient,l.axis_y_tick_format,s.yAxisTickValues,!1,!0,!0)):"y2"===n?(r=s.y2.copy().domain(s.getYDomain(e,"y2")),o=this.getYAxis(r,s.y2Orient,l.axis_y2_tick_format,s.y2AxisTickValues,!1,!0,!0)):(r=s.x.copy().domain(s.getXDomain(e)),o=this.getXAxis(r,s.xOrient,s.xAxisTickFormat,s.xAxisTickValues,!1,!0,!0),this.updateXAxisTickValues(e,o)),i=s.d3.select("body").append("div").classed("c3",!0),a=i.append("svg").style("visibility","hidden").style("position","fixed").style("top",0).style("left",0),a.append("g").call(o).each(function(){s.d3.select(this).selectAll("text").each(function(){var n=this.getBoundingClientRect();c2){for(a=r-2,o=n[0],i=n[n.length-1],s=(i-o)/(a+1),p=[o],l=0;l=0&&I.select(this).style("display",t%A?"none":"block")})}else N.svg.selectAll("."+s.axisX+" .tick text").style("display","block");b=N.generateDrawArea?N.generateDrawArea(j,!1):void 0,m=N.generateDrawBar?N.generateDrawBar(F):void 0,v=N.generateDrawLine?N.generateDrawLine(z,!1):void 0,x=N.generateXYForText(j,F,z,!0),w=N.generateXYForText(j,F,z,!1),e&&(N.subY.domain(N.getYDomain(V,"y")),N.subY2.domain(N.getYDomain(V,"y2"))),N.updateXgridFocus(),D.select("text."+s.text+"."+s.empty).attr("x",N.width/2).attr("y",N.height/2).text(L.data_empty_label_text).transition().style("opacity",V.length?0:1),N.updateGrid(_),N.updateRegion(_),N.updateBar(E),N.updateLine(E),N.updateArea(E),N.updateCircle(),N.hasDataLabel()&&N.updateText(E),N.redrawTitle&&N.redrawTitle(),N.redrawArc&&N.redrawArc(_,E,l),N.redrawSubchart&&N.redrawSubchart(r,t,_,E,j,F,z),D.selectAll("."+s.selectedCircles).filter(N.isBarType.bind(N)).selectAll("circle").remove(),L.interaction_enabled&&!n.flow&&f&&(N.redrawEventRect(),N.updateZoom&&N.updateZoom()),N.updateCircleY(),M=(N.config.axis_rotated?N.circleY:N.circleX).bind(N),R=(N.config.axis_rotated?N.circleX:N.circleY).bind(N),n.flow&&(C=N.generateFlow({targets:V,flow:n.flow,duration:n.flow.duration,drawBar:m,drawLine:v,drawArea:b,cx:M,cy:R,xv:B,xForText:x,yForText:w})),(_||C)&&N.isTabVisible()?I.transition().duration(_).each(function(){var t=[];[N.redrawBar(m,!0),N.redrawLine(v,!0),N.redrawArea(b,!0),N.redrawCircle(M,R,!0),N.redrawText(x,w,n.flow,!0),N.redrawRegion(!0),N.redrawGrid(!0)].forEach(function(n){n.forEach(function(n){t.push(n)})}),S=N.generateWait(),t.forEach(function(n){S.add(n)})}).call(S,function(){C&&C(),L.onrendered&&L.onrendered.call(N)}):(N.redrawBar(m),N.redrawLine(v),N.redrawArea(b),N.redrawCircle(M,R),N.redrawText(x,w,n.flow),N.redrawRegion(),N.redrawGrid(),L.onrendered&&L.onrendered.call(N)),N.mapToIds(N.data.targets).forEach(function(n){N.withoutFadeIn[n]=!0})},k.updateAndRedraw=function(n){var t,e=this,r=e.config;n=n||{},n.withTransition=y(n,"withTransition",!0),n.withTransform=y(n,"withTransform",!1),n.withLegend=y(n,"withLegend",!1),n.withUpdateXDomain=!0,n.withUpdateOrgXDomain=!0,n.withTransitionForExit=!1,n.withTransitionForTransform=y(n,"withTransitionForTransform",n.withTransition),e.updateSizes(),n.withLegend&&r.legend_show||(t=e.axis.generateTransitions(n.withTransitionForAxis?r.transition_duration:0),e.updateScales(),e.updateSvgSize(),e.transformAll(n.withTransitionForTransform,t)),e.redraw(n,t)},k.redrawWithoutRescale=function(){this.redraw({withY:!1,withSubchart:!1,withEventRect:!1,withTransitionForAxis:!1})},k.isTimeSeries=function(){return"timeseries"===this.config.axis_x_type},k.isCategorized=function(){return this.config.axis_x_type.indexOf("categor")>=0},k.isCustomX=function(){var n=this,t=n.config;return!n.isTimeSeries()&&(t.data_x||v(t.data_xs))},k.isTimeSeriesY=function(){return"timeseries"===this.config.axis_y_type},k.getTranslate=function(n){var t,e,r=this,o=r.config;return"main"===n?(t=g(r.margin.left),e=g(r.margin.top)):"context"===n?(t=g(r.margin2.left),e=g(r.margin2.top)):"legend"===n?(t=r.margin3.left,e=r.margin3.top):"x"===n?(t=0,e=o.axis_rotated?0:r.height):"y"===n?(t=0,e=o.axis_rotated?r.height:0):"y2"===n?(t=o.axis_rotated?0:r.width,e=o.axis_rotated?1:0):"subx"===n?(t=0,e=o.axis_rotated?0:r.height2):"arc"===n&&(t=r.arcWidth/2,e=r.arcHeight/2),"translate("+t+","+e+")"},k.initialOpacity=function(n){return null!==n.value&&this.withoutFadeIn[n.id]?1:0},k.initialOpacityForCircle=function(n){return null!==n.value&&this.withoutFadeIn[n.id]?this.opacityForCircle(n):0},k.opacityForCircle=function(n){var t=c(this.config.point_show)?this.config.point_show(n):this.config.point_show,e=t?1:0;return l(n.value)?this.isScatterType(n)?.5:e:0},k.opacityForText=function(){return this.hasDataLabel()?1:0},k.xx=function(n){return n?this.x(n.x):null},k.xv=function(n){var t=this,e=n.value;return t.isTimeSeries()?e=t.parseDate(n.value):t.isCategorized()&&"string"==typeof n.value&&(e=t.config.axis_x_categories.indexOf(n.value)),Math.ceil(t.x(e))},k.yv=function(n){var t=this,e=n.axis&&"y2"===n.axis?t.y2:t.y;return Math.ceil(e(n.value))},k.subxx=function(n){return n?this.subX(n.x):null},k.transformMain=function(n,t){var e,r,o,i=this;t&&t.axisX?e=t.axisX:(e=i.main.select("."+s.axisX),n&&(e=e.transition())),t&&t.axisY?r=t.axisY:(r=i.main.select("."+s.axisY),n&&(r=r.transition())),t&&t.axisY2?o=t.axisY2:(o=i.main.select("."+s.axisY2),n&&(o=o.transition())),(n?i.main.transition():i.main).attr("transform",i.getTranslate("main")),e.attr("transform",i.getTranslate("x")),r.attr("transform",i.getTranslate("y")),o.attr("transform",i.getTranslate("y2")),i.main.select("."+s.chartArcs).attr("transform",i.getTranslate("arc"))},k.transformAll=function(n,t){var e=this;e.transformMain(n,t),e.config.subchart_show&&e.transformContext(n,t),e.legend&&e.transformLegend(n)},k.updateSvgSize=function(){var n=this,t=n.svg.select(".c3-brush .background");n.svg.attr("width",n.currentWidth).attr("height",n.currentHeight),n.svg.selectAll(["#"+n.clipId,"#"+n.clipIdForGrid]).select("rect").attr("width",n.width).attr("height",n.height),n.svg.select("#"+n.clipIdForXAxis).select("rect").attr("x",n.getXAxisClipX.bind(n)).attr("y",n.getXAxisClipY.bind(n)).attr("width",n.getXAxisClipWidth.bind(n)).attr("height",n.getXAxisClipHeight.bind(n)),n.svg.select("#"+n.clipIdForYAxis).select("rect").attr("x",n.getYAxisClipX.bind(n)).attr("y",n.getYAxisClipY.bind(n)).attr("width",n.getYAxisClipWidth.bind(n)).attr("height",n.getYAxisClipHeight.bind(n)),n.svg.select("#"+n.clipIdForSubchart).select("rect").attr("width",n.width).attr("height",t.size()?t.attr("height"):0),n.svg.select("."+s.zoomRect).attr("width",n.width).attr("height",n.height),n.selectChart.style("max-height",n.currentHeight+"px")},k.updateDimension=function(n){var t=this;n||(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)},k.observeInserted=function(n){var t,e=this;if("undefined"==typeof MutationObserver)return void window.console.error("MutationObserver not defined.");t=new MutationObserver(function(r){r.forEach(function(r){"childList"===r.type&&r.previousSibling&&(t.disconnect(),e.intervalForObserveInserted=window.setInterval(function(){n.node().parentNode&&(window.clearInterval(e.intervalForObserveInserted),e.updateDimension(),e.brush&&e.brush.update(),e.config.oninit.call(e),e.redraw({withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransition:!1,withTransitionForTransform:!1,withLegend:!0}),n.transition().style("opacity",1))},10))})}),t.observe(n.node(),{attributes:!0,childList:!0,characterData:!0})},k.bindResize=function(){var n=this,t=n.config;if(n.resizeFunction=n.generateResize(),n.resizeFunction.add(function(){t.onresize.call(n)}),t.resize_auto&&n.resizeFunction.add(function(){void 0!==n.resizeTimeout&&window.clearTimeout(n.resizeTimeout),n.resizeTimeout=window.setTimeout(function(){delete n.resizeTimeout,n.api.flush()},100)}),n.resizeFunction.add(function(){t.onresized.call(n)}),window.attachEvent)window.attachEvent("onresize",n.resizeFunction);else if(window.addEventListener)window.addEventListener("resize",n.resizeFunction,!1);else{var e=window.onresize;e?e.add&&e.remove||(e=n.generateResize(),e.add(window.onresize)):e=n.generateResize(),e.add(n.resizeFunction),window.onresize=e}},k.generateResize=function(){function n(){t.forEach(function(n){n()})}var t=[];return n.add=function(n){t.push(n)},n.remove=function(n){for(var e=0;et.getTotalLength())break;e--}while(e>0);return e})),"SVGPathSegList"in window||(window.SVGPathSegList=function(n){this._pathElement=n,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)},window.SVGPathSegList.prototype.classname="SVGPathSegList",Object.defineProperty(window.SVGPathSegList.prototype,"numberOfItems",{get:function(){return this._checkPathSynchronizedToList(),this._list.length},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"pathSegList",{get:function(){return this._pathSegList||(this._pathSegList=new window.SVGPathSegList(this)),this._pathSegList},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"normalizedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"animatedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"animatedNormalizedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),window.SVGPathSegList.prototype._checkPathSynchronizedToList=function(){this._updateListFromPathMutations(this._pathElementMutationObserver.takeRecords())},window.SVGPathSegList.prototype._updateListFromPathMutations=function(n){if(this._pathElement){var t=!1;n.forEach(function(n){"d"==n.attributeName&&(t=!0)}),t&&(this._list=this._parsePath(this._pathElement.getAttribute("d")))}},window.SVGPathSegList.prototype._writeListToPath=function(){this._pathElementMutationObserver.disconnect(),this._pathElement.setAttribute("d",window.SVGPathSegList._pathSegArrayAsString(this._list)),this._pathElementMutationObserver.observe(this._pathElement,this._mutationObserverConfig)},window.SVGPathSegList.prototype.segmentChanged=function(n){this._writeListToPath()},window.SVGPathSegList.prototype.clear=function(){this._checkPathSynchronizedToList(),this._list.forEach(function(n){n._owningPathSegList=null}),this._list=[],this._writeListToPath()},window.SVGPathSegList.prototype.initialize=function(n){return this._checkPathSynchronizedToList(),this._list=[n],n._owningPathSegList=this,this._writeListToPath(),n},window.SVGPathSegList.prototype._checkValidIndex=function(n){if(isNaN(n)||n<0||n>=this.numberOfItems)throw"INDEX_SIZE_ERR"},window.SVGPathSegList.prototype.getItem=function(n){return this._checkPathSynchronizedToList(),this._checkValidIndex(n),this._list[n]},window.SVGPathSegList.prototype.insertItemBefore=function(n,t){return this._checkPathSynchronizedToList(),t>this.numberOfItems&&(t=this.numberOfItems),n._owningPathSegList&&(n=n.clone()),this._list.splice(t,0,n),n._owningPathSegList=this,this._writeListToPath(),n},window.SVGPathSegList.prototype.replaceItem=function(n,t){return this._checkPathSynchronizedToList(),n._owningPathSegList&&(n=n.clone()),this._checkValidIndex(t),this._list[t]=n,n._owningPathSegList=this,this._writeListToPath(),n},window.SVGPathSegList.prototype.removeItem=function(n){this._checkPathSynchronizedToList(),this._checkValidIndex(n);var t=this._list[n];return this._list.splice(n,1),this._writeListToPath(),t},window.SVGPathSegList.prototype.appendItem=function(n){return this._checkPathSynchronizedToList(),n._owningPathSegList&&(n=n.clone()),this._list.push(n),n._owningPathSegList=this,this._writeListToPath(),n},window.SVGPathSegList._pathSegArrayAsString=function(n){var t="",e=!0;return n.forEach(function(n){e?(e=!1,t+=n._asPathString()):t+=" "+n._asPathString()}),t},window.SVGPathSegList.prototype._parsePath=function(n){if(!n||0==n.length)return[];var t=this,e=function(){this.pathSegList=[]};e.prototype.appendSegment=function(n){this.pathSegList.push(n)};var r=function(n){this._string=n,this._currentIndex=0,this._endIndex=this._string.length,this._previousCommand=window.SVGPathSeg.PATHSEG_UNKNOWN,this._skipOptionalSpaces()};r.prototype._isCurrentSpace=function(){var n=this._string[this._currentIndex];return n<=" "&&(" "==n||"\n"==n||"\t"==n||"\r"==n||"\f"==n)},r.prototype._skipOptionalSpaces=function(){for(;this._currentIndex="0"&&n<="9")&&t!=window.SVGPathSeg.PATHSEG_CLOSEPATH?t==window.SVGPathSeg.PATHSEG_MOVETO_ABS?window.SVGPathSeg.PATHSEG_LINETO_ABS:t==window.SVGPathSeg.PATHSEG_MOVETO_REL?window.SVGPathSeg.PATHSEG_LINETO_REL:t:window.SVGPathSeg.PATHSEG_UNKNOWN},r.prototype.initialCommandIsMoveTo=function(){if(!this.hasMoreData())return!0;var n=this.peekSegmentType();return n==window.SVGPathSeg.PATHSEG_MOVETO_ABS||n==window.SVGPathSeg.PATHSEG_MOVETO_REL},r.prototype._parseNumber=function(){var n=0,t=0,e=1,r=0,o=1,i=1,a=this._currentIndex;if(this._skipOptionalSpaces(),this._currentIndex"9")&&"."!=this._string.charAt(this._currentIndex))){for(var s=this._currentIndex;this._currentIndex="0"&&this._string.charAt(this._currentIndex)<="9";)this._currentIndex++;if(this._currentIndex!=s)for(var l=this._currentIndex-1,c=1;l>=s;)t+=c*(this._string.charAt(l--)-"0"),c*=10;if(this._currentIndex=this._endIndex||this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")return;for(;this._currentIndex="0"&&this._string.charAt(this._currentIndex)<="9";)e*=10,r+=(this._string.charAt(this._currentIndex)-"0")/e,this._currentIndex+=1}if(this._currentIndex!=a&&this._currentIndex+1=this._endIndex||this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")return;for(;this._currentIndex="0"&&this._string.charAt(this._currentIndex)<="9";)n*=10,n+=this._string.charAt(this._currentIndex)-"0",this._currentIndex++}var u=t+r;if(u*=o,n&&(u*=Math.pow(10,i*n)),a!=this._currentIndex)return this._skipOptionalSpacesOrDelimiter(),u}},r.prototype._parseArcFlag=function(){if(!(this._currentIndex>=this._endIndex)){var n=!1,t=this._string.charAt(this._currentIndex++);if("0"==t)n=!1;else{if("1"!=t)return;n=!0}return this._skipOptionalSpacesOrDelimiter(),n}},r.prototype.parseSegment=function(){var n=this._string[this._currentIndex],e=this._pathSegTypeFromChar(n);if(e==window.SVGPathSeg.PATHSEG_UNKNOWN){if(this._previousCommand==window.SVGPathSeg.PATHSEG_UNKNOWN)return null;if((e=this._nextCommandHelper(n,this._previousCommand))==window.SVGPathSeg.PATHSEG_UNKNOWN)return null}else this._currentIndex++;switch(this._previousCommand=e,e){case window.SVGPathSeg.PATHSEG_MOVETO_REL:return new window.SVGPathSegMovetoRel(t,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_MOVETO_ABS:return new window.SVGPathSegMovetoAbs(t,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_REL:return new window.SVGPathSegLinetoRel(t,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_ABS:return new window.SVGPathSegLinetoAbs(t,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL:return new window.SVGPathSegLinetoHorizontalRel(t,this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS:return new window.SVGPathSegLinetoHorizontalAbs(t,this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL:return new window.SVGPathSegLinetoVerticalRel(t,this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS:return new window.SVGPathSegLinetoVerticalAbs(t,this._parseNumber());case window.SVGPathSeg.PATHSEG_CLOSEPATH:return this._skipOptionalSpaces(),new window.SVGPathSegClosePath(t);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL:var r={x1:this._parseNumber(),y1:this._parseNumber(),x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()};return new window.SVGPathSegCurvetoCubicRel(t,r.x,r.y,r.x1,r.y1,r.x2,r.y2);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS:var r={x1:this._parseNumber(),y1:this._parseNumber(),x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()};return new window.SVGPathSegCurvetoCubicAbs(t,r.x,r.y,r.x1,r.y1,r.x2,r.y2);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL:var r={x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()};return new window.SVGPathSegCurvetoCubicSmoothRel(t,r.x,r.y,r.x2,r.y2);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:var r={x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()};return new window.SVGPathSegCurvetoCubicSmoothAbs(t,r.x,r.y,r.x2,r.y2);case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL:var r={x1:this._parseNumber(),y1:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()};return new window.SVGPathSegCurvetoQuadraticRel(t,r.x,r.y,r.x1,r.y1);case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS:var r={x1:this._parseNumber(),y1:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()};return new window.SVGPathSegCurvetoQuadraticAbs(t,r.x,r.y,r.x1,r.y1);case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL:return new window.SVGPathSegCurvetoQuadraticSmoothRel(t,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:return new window.SVGPathSegCurvetoQuadraticSmoothAbs(t,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_ARC_REL:var r={x1:this._parseNumber(),y1:this._parseNumber(),arcAngle:this._parseNumber(),arcLarge:this._parseArcFlag(),arcSweep:this._parseArcFlag(),x:this._parseNumber(),y:this._parseNumber()};return new window.SVGPathSegArcRel(t,r.x,r.y,r.x1,r.y1,r.arcAngle,r.arcLarge,r.arcSweep);case window.SVGPathSeg.PATHSEG_ARC_ABS:var r={x1:this._parseNumber(),y1:this._parseNumber(),arcAngle:this._parseNumber(),arcLarge:this._parseArcFlag(),arcSweep:this._parseArcFlag(),x:this._parseNumber(),y:this._parseNumber()};return new window.SVGPathSegArcAbs(t,r.x,r.y,r.x1,r.y1,r.arcAngle,r.arcLarge,r.arcSweep);default:throw"Unknown path seg type."}};var o=new e,i=new r(n);if(!i.initialCommandIsMoveTo())return[];for(;i.hasMoreData();){var a=i.parseSegment();if(!a)return[];o.appendSegment(a)}return o.pathSegList})}(),E.axis=function(){},E.axis.labels=function(n){var t=this.internal;arguments.length&&(Object.keys(n).forEach(function(e){t.axis.setLabelText(e,n[e])}),t.axis.updateLabels())},E.axis.max=function(n){var t=this.internal,e=t.config;if(!arguments.length)return{x:e.axis_x_max,y:e.axis_y_max,y2:e.axis_y2_max};"object"==typeof n?(l(n.x)&&(e.axis_x_max=n.x),l(n.y)&&(e.axis_y_max=n.y),l(n.y2)&&(e.axis_y2_max=n.y2)):e.axis_y_max=e.axis_y2_max=n,t.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})},E.axis.min=function(n){var t=this.internal,e=t.config;if(!arguments.length)return{x:e.axis_x_min,y:e.axis_y_min,y2:e.axis_y2_min};"object"==typeof n?(l(n.x)&&(e.axis_x_min=n.x),l(n.y)&&(e.axis_y_min=n.y),l(n.y2)&&(e.axis_y2_min=n.y2)):e.axis_y_min=e.axis_y2_min=n,t.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})},E.axis.range=function(n){if(!arguments.length)return{max:this.axis.max(),min:this.axis.min()};f(n.max)&&this.axis.max(n.max),f(n.min)&&this.axis.min(n.min)},E.category=function(n,t){var e=this.internal,r=e.config;return arguments.length>1&&(r.axis_x_categories[n]=t,e.redraw()),r.axis_x_categories[n]},E.categories=function(n){var t=this.internal,e=t.config;return arguments.length?(e.axis_x_categories=n,t.redraw(),e.axis_x_categories):e.axis_x_categories},E.resize=function(n){var t=this.internal,e=t.config;e.size_width=n?n.width:null,e.size_height=n?n.height:null,this.flush()},E.flush=function(){this.internal.updateAndRedraw({withLegend:!0,withTransition:!1,withTransitionForTransform:!1})},E.destroy=function(){var n=this.internal;if(window.clearInterval(n.intervalForObserveInserted),void 0!==n.resizeTimeout&&window.clearTimeout(n.resizeTimeout),window.detachEvent)window.detachEvent("onresize",n.resizeFunction);else if(window.removeEventListener)window.removeEventListener("resize",n.resizeFunction);else{var t=window.onresize;t&&t.add&&t.remove&&t.remove(n.resizeFunction)}return n.selectChart.classed("c3",!1).html(""),Object.keys(n).forEach(function(t){n[t]=null}),null},E.color=function(n){return this.internal.color(n)},E.data=function(n){var t=this.internal.data.targets;return void 0===n?t:t.filter(function(t){return[].concat(n).indexOf(t.id)>=0})},E.data.shown=function(n){return this.internal.filterTargetsToShow(this.data(n))},E.data.values=function(n){var t,e=null;return n&&(t=this.data(n),e=t[0]?t[0].values.map(function(n){return n.value}):null),e},E.data.names=function(n){return this.internal.clearLegendItemTextBoxCache(),this.internal.updateDataAttributes("names",n)},E.data.colors=function(n){return this.internal.updateDataAttributes("colors",n)},E.data.axes=function(n){return this.internal.updateDataAttributes("axes",n)},E.flow=function(n){var t,e,r,o,i,a,s,c=this.internal,u=[],p=c.getMaxDataCount(),d=0,h=0;if(n.json)e=c.convertJsonToData(n.json,n.keys);else if(n.rows)e=c.convertRowsToData(n.rows);else{if(!n.columns)return;e=c.convertColumnsToData(n.columns)}t=c.convertDataToTargets(e,!0),c.data.targets.forEach(function(n){var e,r,o=!1;for(e=0;e1?o.values[o.values.length-1].x-i.x:i.x-c.getXDomain(c.data.targets)[0]:1,r=[i.x-a,i.x],c.updateXDomain(null,!0,!0,!1,r)),c.updateTargets(c.data.targets),c.redraw({flow:{index:i.index,length:d,duration:l(n.duration)?n.duration:c.config.transition_duration,done:n.done,orgDataCount:p},withLegend:!0,withTransition:p>1,withTrimXDomain:!1,withUpdateXAxis:!0})},k.generateFlow=function(n){var t=this,e=t.config,r=t.d3;return function(){var o,i,a,l=n.targets,c=n.flow,u=n.drawBar,p=n.drawLine,d=n.drawArea,f=n.cx,h=n.cy,g=n.xv,m=n.xForText,v=n.yForText,y=n.duration,x=1,w=c.index,_=c.length,E=t.getValueOnIndex(t.data.targets[0].values,w),k=t.getValueOnIndex(t.data.targets[0].values,w+_),S=t.x.domain(),C=c.duration||y,O=c.done||function(){},T=t.generateWait(),A=t.xgrid||r.selectAll([]),P=t.xgridLines||r.selectAll([]),M=t.mainRegion||r.selectAll([]),R=t.mainText||r.selectAll([]),N=t.mainBar||r.selectAll([]),D=t.mainLine||r.selectAll([]),I=t.mainArea||r.selectAll([]),L=t.mainCircle||r.selectAll([]);t.flowing=!0,t.data.targets.forEach(function(n){n.values.splice(0,_)}),a=t.updateXDomain(l,!0,!0),t.updateXGrid&&t.updateXGrid(!0),c.orgDataCount?o=1===c.orgDataCount||(E&&E.x)===(k&&k.x)?t.x(S[0])-t.x(a[0]):t.isTimeSeries()?t.x(S[0])-t.x(a[0]):t.x(E.x)-t.x(k.x):1!==t.data.targets[0].values.length?o=t.x(S[0])-t.x(a[0]):t.isTimeSeries()?(E=t.getValueOnIndex(t.data.targets[0].values,0),k=t.getValueOnIndex(t.data.targets[0].values,t.data.targets[0].values.length-1),o=t.x(E.x)-t.x(k.x)):o=b(a)/2,x=b(S)/b(a),i="translate("+o+",0) scale("+x+",1)",t.hideXGridFocus(),r.transition().ease("linear").duration(C).each(function(){T.add(t.axes.x.transition().call(t.xAxis)),T.add(N.transition().attr("transform",i)),T.add(D.transition().attr("transform",i)),T.add(I.transition().attr("transform",i)),T.add(L.transition().attr("transform",i)),T.add(R.transition().attr("transform",i)),T.add(M.filter(t.isRegionOnX).transition().attr("transform",i)),T.add(A.transition().attr("transform",i)),T.add(P.transition().attr("transform",i))}).call(T,function(){var n,r=[],o=[],i=[];if(_){for(n=0;n<_;n++)r.push("."+s.shape+"-"+(w+n)),o.push("."+s.text+"-"+(w+n)),i.push("."+s.eventRect+"-"+(w+n));t.svg.selectAll("."+s.shapes).selectAll(r).remove(),t.svg.selectAll("."+s.texts).selectAll(o).remove(),t.svg.selectAll("."+s.eventRects).selectAll(i).remove(),t.svg.select("."+s.xgrid).remove()}A.attr("transform",null).attr(t.xgridAttr),P.attr("transform",null),P.select("line").attr("x1",e.axis_rotated?0:g).attr("x2",e.axis_rotated?t.width:g),P.select("text").attr("x",e.axis_rotated?t.width:0).attr("y",g),N.attr("transform",null).attr("d",u),D.attr("transform",null).attr("d",p),I.attr("transform",null).attr("d",d),L.attr("transform",null).attr("cx",f).attr("cy",h),R.attr("transform",null).attr("x",m).attr("y",v).style("fill-opacity",t.opacityForText.bind(t)),M.attr("transform",null),M.select("rect").filter(t.isRegionOnX).attr("x",t.regionX.bind(t)).attr("width",t.regionWidth.bind(t)),e.interaction_enabled&&t.redrawEventRect(),O(),t.flowing=!1})}},E.focus=function(n){var t,e=this.internal;n=e.mapToTargetIds(n),t=e.svg.selectAll(e.selectorTargets(n.filter(e.isTargetToShow,e))),this.revert(),this.defocus(),t.classed(s.focused,!0).classed(s.defocused,!1),e.hasArcType()&&e.expandArc(n),e.toggleFocusLegend(n,!0),e.focusedTargetIds=n,e.defocusedTargetIds=e.defocusedTargetIds.filter(function(t){return n.indexOf(t)<0})},E.defocus=function(n){var t,e=this.internal;n=e.mapToTargetIds(n),t=e.svg.selectAll(e.selectorTargets(n.filter(e.isTargetToShow,e))),t.classed(s.focused,!1).classed(s.defocused,!0),e.hasArcType()&&e.unexpandArc(n),e.toggleFocusLegend(n,!1),e.focusedTargetIds=e.focusedTargetIds.filter(function(t){return n.indexOf(t)<0}),e.defocusedTargetIds=n},E.revert=function(n){var t,e=this.internal;n=e.mapToTargetIds(n),t=e.svg.selectAll(e.selectorTargets(n)),t.classed(s.focused,!1).classed(s.defocused,!1),e.hasArcType()&&e.unexpandArc(n),e.config.legend_show&&(e.showLegend(n.filter(e.isLegendToShow.bind(e))),e.legend.selectAll(e.selectorLegends(n)).filter(function(){return e.d3.select(this).classed(s.legendItemFocused)}).classed(s.legendItemFocused,!1)),e.focusedTargetIds=[],e.defocusedTargetIds=[]},E.xgrids=function(n){var t=this.internal,e=t.config;return n?(e.grid_x_lines=n,t.redrawWithoutRescale(),e.grid_x_lines):e.grid_x_lines},E.xgrids.add=function(n){var t=this.internal;return this.xgrids(t.config.grid_x_lines.concat(n||[]))},E.xgrids.remove=function(n){this.internal.removeGridLines(n,!0)},E.ygrids=function(n){var t=this.internal,e=t.config;return n?(e.grid_y_lines=n,t.redrawWithoutRescale(),e.grid_y_lines):e.grid_y_lines},E.ygrids.add=function(n){var t=this.internal;return this.ygrids(t.config.grid_y_lines.concat(n||[]))},E.ygrids.remove=function(n){this.internal.removeGridLines(n,!1)},E.groups=function(n){var t=this.internal,e=t.config;return d(n)?e.data_groups:(e.data_groups=n,t.redraw(),e.data_groups)},E.legend=function(){},E.legend.show=function(n){var t=this.internal;t.showLegend(t.mapToTargetIds(n)),t.updateAndRedraw({withLegend:!0})},E.legend.hide=function(n){var t=this.internal;t.hideLegend(t.mapToTargetIds(n)),t.updateAndRedraw({withLegend:!0})},E.load=function(n){var t=this.internal,e=t.config;if(n.xs&&t.addXs(n.xs),"names"in n&&E.data.names.bind(this)(n.names),"classes"in n&&Object.keys(n.classes).forEach(function(t){e.data_classes[t]=n.classes[t]}),"categories"in n&&t.isCategorized()&&(e.axis_x_categories=n.categories),"axes"in n&&Object.keys(n.axes).forEach(function(t){e.data_axes[t]=n.axes[t]}),"colors"in n&&Object.keys(n.colors).forEach(function(t){e.data_colors[t]=n.colors[t]}),"cacheIds"in n&&t.hasCaches(n.cacheIds))return void t.load(t.getCaches(n.cacheIds),n.done);"unload"in n?t.unload(t.mapToTargetIds("boolean"==typeof n.unload&&n.unload?null:n.unload),function(){t.loadFromArgs(n)}):t.loadFromArgs(n)},E.unload=function(n){var t=this.internal;n=n||{},n instanceof Array?n={ids:n}:"string"==typeof n&&(n={ids:[n]}),t.unload(t.mapToTargetIds(n.ids),function(){t.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),n.done&&n.done()})},E.regions=function(n){var t=this.internal,e=t.config;return n?(e.regions=n,t.redrawWithoutRescale(),e.regions):e.regions},E.regions.add=function(n){var t=this.internal,e=t.config;return n?(e.regions=e.regions.concat(n),t.redrawWithoutRescale(),e.regions):e.regions},E.regions.remove=function(n){var t,e,r,o=this.internal,i=o.config;return n=n||{},t=o.getOption(n,"duration",i.transition_duration),e=o.getOption(n,"classes",[s.region]),r=o.main.select("."+s.regions).selectAll(e.map(function(n){return"."+n})),(t?r.transition().duration(t):r).style("opacity",0).remove(),i.regions=i.regions.filter(function(n){var t=!1;return!n.class||(n.class.split(" ").forEach(function(n){e.indexOf(n)>=0&&(t=!0)}),!t)}),i.regions},E.selected=function(n){var t=this.internal,e=t.d3;return e.merge(t.main.selectAll("."+s.shapes+t.getTargetSelectorSuffix(n)).selectAll("."+s.shape).filter(function(){return e.select(this).classed(s.SELECTED)}).map(function(n){return n.map(function(n){var t=n.__data__;return t.data?t.data:t})}))},E.select=function(n,t,e){var r=this.internal,o=r.d3,i=r.config;i.data_selection_enabled&&r.main.selectAll("."+s.shapes).selectAll("."+s.shape).each(function(a,l){var c=o.select(this),u=a.data?a.data.id:a.id,p=r.getToggle(this,a).bind(r),d=i.data_selection_grouped||!n||n.indexOf(u)>=0,h=!t||t.indexOf(l)>=0,g=c.classed(s.SELECTED);c.classed(s.line)||c.classed(s.area)||(d&&h?i.data_selection_isselectable(a)&&!g&&p(!0,c.classed(s.SELECTED,!0),a,l):f(e)&&e&&g&&p(!1,c.classed(s.SELECTED,!1),a,l))})},E.unselect=function(n,t){var e=this.internal,r=e.d3,o=e.config;o.data_selection_enabled&&e.main.selectAll("."+s.shapes).selectAll("."+s.shape).each(function(i,a){var l=r.select(this),c=i.data?i.data.id:i.id,u=e.getToggle(this,i).bind(e),p=o.data_selection_grouped||!n||n.indexOf(c)>=0,d=!t||t.indexOf(a)>=0,f=l.classed(s.SELECTED);l.classed(s.line)||l.classed(s.area)||p&&d&&o.data_selection_isselectable(i)&&f&&u(!1,l.classed(s.SELECTED,!1),i,a)})},E.show=function(n,t){var e,r=this.internal;n=r.mapToTargetIds(n),t=t||{},r.removeHiddenTargetIds(n),e=r.svg.selectAll(r.selectorTargets(n)),e.transition().style("opacity",1,"important").call(r.endall,function(){e.style("opacity",null).style("opacity",1)}),t.withLegend&&r.showLegend(n),r.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0})},E.hide=function(n,t){var e,r=this.internal;n=r.mapToTargetIds(n),t=t||{},r.addHiddenTargetIds(n),e=r.svg.selectAll(r.selectorTargets(n)),e.transition().style("opacity",0,"important").call(r.endall,function(){e.style("opacity",null).style("opacity",0)}),t.withLegend&&r.hideLegend(n),r.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0})},E.toggle=function(n,t){var e=this,r=this.internal;r.mapToTargetIds(n).forEach(function(n){r.isTargetToShow(n)?e.hide(n,t):e.show(n,t)})},E.tooltip=function(){},E.tooltip.show=function(n){var t,e,r=this.internal;n.mouse&&(e=n.mouse),n.data?r.isMultipleX()?(e=[r.x(n.data.x),r.getYScale(n.data.id)(n.data.value)],t=null):t=l(n.data.index)?n.data.index:r.getIndexByX(n.data.x):void 0!==n.x?t=r.getIndexByX(n.x):void 0!==n.index&&(t=n.index),r.dispatchEvent("mouseover",t,e),r.dispatchEvent("mousemove",t,e),r.config.tooltip_onshow.call(r,n.data)},E.tooltip.hide=function(){this.internal.dispatchEvent("mouseout",0),this.internal.config.tooltip_onhide.call(this)},E.transform=function(n,t){var e=this.internal,r=["pie","donut"].indexOf(n)>=0?{withTransform:!0}:null;e.transformTo(t,n,r)},k.transformTo=function(n,t,e){var r=this,o=!r.hasArcType(),i=e||{withTransitionForAxis:o};i.withTransitionForTransform=!1,r.transiting=!1,r.setTargetType(n,t),r.updateTargets(r.data.targets),r.updateAndRedraw(i)},E.x=function(n){var t=this.internal;return arguments.length&&(t.updateTargetX(t.data.targets,n),t.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),t.data.xs},E.xs=function(n){var t=this.internal;return arguments.length&&(t.updateTargetXs(t.data.targets,n),t.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),t.data.xs},E.zoom=function(n){var t=this.internal;return n&&(t.isTimeSeries()&&(n=n.map(function(n){return t.parseDate(n)})),t.brush.extent(n),t.redraw({withUpdateXDomain:!0,withY:t.config.zoom_rescale}),t.config.zoom_onzoom.call(this,t.x.orgDomain())),t.brush.extent()},E.zoom.enable=function(n){var t=this.internal;t.config.zoom_enabled=n,t.updateAndRedraw()},E.unzoom=function(){var n=this.internal;n.brush.clear().update(),n.redraw({withUpdateXDomain:!0})},E.zoom.max=function(n){var t=this.internal,e=t.config,r=t.d3;if(0!==n&&!n)return e.zoom_x_max;e.zoom_x_max=r.max([t.orgXDomain[1],n])},E.zoom.min=function(n){var t=this.internal,e=t.config,r=t.d3;if(0!==n&&!n)return e.zoom_x_min;e.zoom_x_min=r.min([t.orgXDomain[0],n])},E.zoom.range=function(n){if(!arguments.length)return{max:this.domain.max(),min:this.domain.min()};f(n.max)&&this.domain.max(n.max),f(n.min)&&this.domain.min(n.min)},k.initPie=function(){var n=this,t=n.d3,e=n.config;n.pie=t.layout.pie().value(function(n){return n.values.reduce(function(n,t){return n+t.value},0)}),e.data_order||n.pie.sort(null)},k.updateRadius=function(){var n=this,t=n.config,e=t.gauge_width||t.donut_width;n.radiusExpanded=Math.min(n.arcWidth,n.arcHeight)/2,n.radius=.95*n.radiusExpanded,n.innerRadiusRatio=e?(n.radius-e)/n.radius:.6,n.innerRadius=n.hasType("donut")||n.hasType("gauge")?n.radius*n.innerRadiusRatio:0},k.updateArc=function(){var n=this;n.svgArc=n.getSvgArc(),n.svgArcExpanded=n.getSvgArcExpanded(),n.svgArcExpandedSub=n.getSvgArcExpanded(.98)},k.updateAngle=function(n){var t,e,r,o,i=this,a=i.config,s=!1,l=0;return a?(i.pie(i.filterTargetsToShow(i.data.targets)).forEach(function(t){s||t.data.id!==n.data.id||(s=!0,n=t,n.index=l),l++}),isNaN(n.startAngle)&&(n.startAngle=0),isNaN(n.endAngle)&&(n.endAngle=n.startAngle),i.isGaugeType(n.data)&&(t=a.gauge_min,e=a.gauge_max,r=Math.PI*(a.gauge_fullCircle?2:1)/(e-t),o=n.value.375?1.175-36/a.radius:.8)*a.radius/o:0,u="translate("+e*i+","+r*i+")"),u},k.getArcRatio=function(n){var t=this,e=t.config,r=Math.PI*(t.hasType("gauge")&&!e.gauge_fullCircle?1:2);return n?(n.endAngle-n.startAngle)/r:null},k.convertToArcData=function(n){return this.addName({id:n.data.id,value:n.value,ratio:this.getArcRatio(n),index:n.index})},k.textForArcLabel=function(n){var t,e,r,o,i,a=this;return a.shouldShowArcLabel()?(t=a.updateAngle(n),e=t?t.value:null,r=a.getArcRatio(t),o=n.data.id,a.hasType("gauge")||a.meetsArcLabelThreshold(r)?(i=a.getArcLabelFormat(),i?i(e,r,o):a.defaultArcValueFormat(e,r)):""):""},k.textForGaugeMinMax=function(n,t){var e=this,r=e.getGaugeLabelExtents();return r?r(n,t):n},k.expandArc=function(n){var t,e=this;if(e.transiting)return void(t=window.setInterval(function(){e.transiting||(window.clearInterval(t),e.legend.selectAll(".c3-legend-item-focused").size()>0&&e.expandArc(n))},10));n=e.mapToTargetIds(n),e.svg.selectAll(e.selectorTargets(n,"."+s.chartArc)).each(function(n){e.shouldExpand(n.data.id)&&e.d3.select(this).selectAll("path").transition().duration(e.expandDuration(n.data.id)).attr("d",e.svgArcExpanded).transition().duration(2*e.expandDuration(n.data.id)).attr("d",e.svgArcExpandedSub).each(function(n){e.isDonutType(n.data)})})},k.unexpandArc=function(n){var t=this;t.transiting||(n=t.mapToTargetIds(n),t.svg.selectAll(t.selectorTargets(n,"."+s.chartArc)).selectAll("path").transition().duration(function(n){return t.expandDuration(n.data.id)}).attr("d",t.svgArc),t.svg.selectAll("."+s.arc).style("opacity",1))},k.expandDuration=function(n){var t=this,e=t.config;return t.isDonutType(n)?e.donut_expand_duration:t.isGaugeType(n)?e.gauge_expand_duration:t.isPieType(n)?e.pie_expand_duration:50},k.shouldExpand=function(n){var t=this,e=t.config;return t.isDonutType(n)&&e.donut_expand||t.isGaugeType(n)&&e.gauge_expand||t.isPieType(n)&&e.pie_expand},k.shouldShowArcLabel=function(){var n=this,t=n.config,e=!0;return n.hasType("donut")?e=t.donut_label_show:n.hasType("pie")&&(e=t.pie_label_show),e},k.meetsArcLabelThreshold=function(n){var t=this,e=t.config;return n>=(t.hasType("donut")?e.donut_label_threshold:e.pie_label_threshold)},k.getArcLabelFormat=function(){var n=this,t=n.config,e=t.pie_label_format;return n.hasType("gauge")?e=t.gauge_label_format:n.hasType("donut")&&(e=t.donut_label_format),e},k.getGaugeLabelExtents=function(){return this.config.gauge_label_extents},k.getArcTitle=function(){var n=this;return n.hasType("donut")?n.config.donut_title:""},k.updateTargetsForArc=function(n){var t,e,r=this,o=r.main,i=r.classChartArc.bind(r),a=r.classArcs.bind(r),l=r.classFocus.bind(r);t=o.select("."+s.chartArcs).selectAll("."+s.chartArc).data(r.pie(n)).attr("class",function(n){return i(n)+l(n.data)}),e=t.enter().append("g").attr("class",i),e.append("g").attr("class",a),e.append("text").attr("dy",r.hasType("gauge")?"-.1em":".35em").style("opacity",0).style("text-anchor","middle").style("pointer-events","none")},k.initArc=function(){var n=this;n.arcs=n.main.select("."+s.chart).append("g").attr("class",s.chartArcs).attr("transform",n.getTranslate("arc")),n.arcs.append("text").attr("class",s.chartArcsTitle).style("text-anchor","middle").text(n.getArcTitle())},k.redrawArc=function(n,t,e){var r,o=this,i=o.d3,a=o.config,l=o.main;r=l.selectAll("."+s.arcs).selectAll("."+s.arc).data(o.arcData.bind(o)),r.enter().append("path").attr("class",o.classArc.bind(o)).style("fill",function(n){return o.color(n.data)}).style("cursor",function(n){return a.interaction_enabled&&a.data_selection_isselectable(n)?"pointer":null}).style("opacity",0).each(function(n){o.isGaugeType(n.data)&&(n.startAngle=n.endAngle=a.gauge_startingAngle),this._current=n}),r.attr("transform",function(n){return!o.isGaugeType(n.data)&&e?"scale(0)":""}).style("opacity",function(n){return n===this._current?0:1}).on("mouseover",a.interaction_enabled?function(n){var t,e;o.transiting||(t=o.updateAngle(n))&&(e=o.convertToArcData(t),o.expandArc(t.data.id),o.api.focus(t.data.id),o.toggleFocusLegend(t.data.id,!0),o.config.data_onmouseover(e,this))}:null).on("mousemove",a.interaction_enabled?function(n){var t,e,r=o.updateAngle(n);r&&(t=o.convertToArcData(r),e=[t],o.showTooltip(e,this))}:null).on("mouseout",a.interaction_enabled?function(n){var t,e;o.transiting||(t=o.updateAngle(n))&&(e=o.convertToArcData(t),o.unexpandArc(t.data.id),o.api.revert(),o.revertLegend(),o.hideTooltip(),o.config.data_onmouseout(e,this))}:null).on("click",a.interaction_enabled?function(n,t){var e,r=o.updateAngle(n);r&&(e=o.convertToArcData(r),o.toggleShape&&o.toggleShape(this,e,t),o.config.data_onclick.call(o.api,e,this))}:null).each(function(){o.transiting=!0}).transition().duration(n).attrTween("d",function(n){var t,e=o.updateAngle(n);return e?(isNaN(this._current.startAngle)&&(this._current.startAngle=0),isNaN(this._current.endAngle)&&(this._current.endAngle=this._current.startAngle),t=i.interpolate(this._current,e),this._current=t(0),function(e){var r=t(e);return r.data=n.data,o.getArc(r,!0)}):function(){return"M 0 0"}}).attr("transform",e?"scale(1)":"").style("fill",function(n){return o.levelColor?o.levelColor(n.data.values[0].value):o.color(n.data.id)}).style("opacity",1).call(o.endall,function(){o.transiting=!1}),r.exit().transition().duration(t).style("opacity",0).remove(),l.selectAll("."+s.chartArc).select("text").style("opacity",0).attr("class",function(n){return o.isGaugeType(n.data)?s.gaugeValue:""}).text(o.textForArcLabel.bind(o)).attr("transform",o.transformForArcLabel.bind(o)).style("font-size",function(n){return o.isGaugeType(n.data)?Math.round(o.radius/5)+"px":""}).transition().duration(n).style("opacity",function(n){return o.isTargetToShow(n.data.id)&&o.isArcType(n.data)?1:0}),l.select("."+s.chartArcsTitle).style("opacity",o.hasType("donut")||o.hasType("gauge")?1:0),o.hasType("gauge")&&(o.arcs.select("."+s.chartArcsBackground).attr("d",function(){var n={data:[{value:a.gauge_max}],startAngle:a.gauge_startingAngle,endAngle:-1*a.gauge_startingAngle};return o.getArc(n,!0,!0)}),o.arcs.select("."+s.chartArcsGaugeUnit).attr("dy",".75em").text(a.gauge_label_show?a.gauge_units:""),o.arcs.select("."+s.chartArcsGaugeMin).attr("dx",-1*(o.innerRadius+(o.radius-o.innerRadius)/(a.gauge_fullCircle?1:2))+"px").attr("dy","1.2em").text(a.gauge_label_show?o.textForGaugeMinMax(a.gauge_min,!1):""),o.arcs.select("."+s.chartArcsGaugeMax).attr("dx",o.innerRadius+(o.radius-o.innerRadius)/(a.gauge_fullCircle?1:2)+"px").attr("dy","1.2em").text(a.gauge_label_show?o.textForGaugeMinMax(a.gauge_max,!0):""))},k.initGauge=function(){var n=this.arcs;this.hasType("gauge")&&(n.append("path").attr("class",s.chartArcsBackground),n.append("text").attr("class",s.chartArcsGaugeUnit).style("text-anchor","middle").style("pointer-events","none"),n.append("text").attr("class",s.chartArcsGaugeMin).style("text-anchor","middle").style("pointer-events","none"),n.append("text").attr("class",s.chartArcsGaugeMax).style("text-anchor","middle").style("pointer-events","none"))},k.getGaugeLabelHeight=function(){return this.config.gauge_label_show?20:0},k.hasCaches=function(n){for(var t=0;t=0?s.focused:"")},k.classDefocused=function(n){return" "+(this.defocusedTargetIds.indexOf(n.id)>=0?s.defocused:"")},k.classChartText=function(n){return s.chartText+this.classTarget(n.id)},k.classChartLine=function(n){return s.chartLine+this.classTarget(n.id)},k.classChartBar=function(n){return s.chartBar+this.classTarget(n.id)},k.classChartArc=function(n){return s.chartArc+this.classTarget(n.data.id)},k.getTargetSelectorSuffix=function(n){return n||0===n?("-"+n).replace(/[\s?!@#$%^&*()_=+,.<>'":;\[\]\/|~`{}\\]/g,"-"):""},k.selectorTarget=function(n,t){return(t||"")+"."+s.target+this.getTargetSelectorSuffix(n)},k.selectorTargets=function(n,t){var e=this;return n=n||[],n.length?n.map(function(n){return e.selectorTarget(n,t)}):null},k.selectorLegend=function(n){return"."+s.legendItem+this.getTargetSelectorSuffix(n)},k.selectorLegends=function(n){var t=this;return n&&n.length?n.map(function(n){return t.selectorLegend(n)}):null},k.getClipPath=function(n){return"url("+(window.navigator.appVersion.toLowerCase().indexOf("msie 9.")>=0?"":document.URL.split("#")[0])+"#"+n+")"},k.appendClip=function(n,t){return n.append("clipPath").attr("id",t).append("rect")},k.getAxisClipX=function(n){var t=Math.max(30,this.margin.left);return n?-(1+t):-(t-1)},k.getAxisClipY=function(n){return n?-20:-this.margin.top},k.getXAxisClipX=function(){var n=this;return n.getAxisClipX(!n.config.axis_rotated)},k.getXAxisClipY=function(){var n=this;return n.getAxisClipY(!n.config.axis_rotated)},k.getYAxisClipX=function(){var n=this;return n.config.axis_y_inner?-1:n.getAxisClipX(n.config.axis_rotated)},k.getYAxisClipY=function(){var n=this;return n.getAxisClipY(n.config.axis_rotated)},k.getAxisClipWidth=function(n){var t=this,e=Math.max(30,t.margin.left),r=Math.max(30,t.margin.right);return n?t.width+2+e+r:t.margin.left+20},k.getAxisClipHeight=function(n){return(n?this.margin.bottom:this.margin.top+this.height)+20},k.getXAxisClipWidth=function(){var n=this;return n.getAxisClipWidth(!n.config.axis_rotated)},k.getXAxisClipHeight=function(){var n=this;return n.getAxisClipHeight(!n.config.axis_rotated)},k.getYAxisClipWidth=function(){var n=this;return n.getAxisClipWidth(n.config.axis_rotated)+(n.config.axis_y_inner?20:0)},k.getYAxisClipHeight=function(){var n=this;return n.getAxisClipHeight(n.config.axis_rotated)},k.generateColor=function(){var n=this,t=n.config,e=n.d3,r=t.data_colors,o=v(t.color_pattern)?t.color_pattern:e.scale.category10().range(),i=t.data_color,a=[];return function(n){var t,e=n.id||n.data&&n.data.id||n;return r[e]instanceof Function?t=r[e](n):r[e]?t=r[e]:(a.indexOf(e)<0&&a.push(e),t=o[a.indexOf(e)%o.length],r[e]=t),i instanceof Function?i(t,n):t}},k.generateLevelColor=function(){var n=this,t=n.config,e=t.color_pattern,r=t.color_threshold,o="value"===r.unit,i=r.values&&r.values.length?r.values:[],a=r.max||100;return v(t.color_threshold)?function(n){var t,r=e[e.length-1];for(t=0;t=0?r.data.xs[e]=(t&&r.data.xs[e]?r.data.xs[e]:[]).concat(n.map(function(n){return n[i]}).filter(l).map(function(n,t){return r.generateTargetX(n,e,t)})):o.data_x?r.data.xs[e]=r.getOtherTargetXs():v(o.data_xs)&&(r.data.xs[e]=r.getXValuesOfXKey(i,r.data.targets)):r.data.xs[e]=n.map(function(n,t){return t})}),i.forEach(function(n){if(!r.data.xs[n])throw new Error('x is not defined for id = "'+n+'".')}),e=i.map(function(t,e){var i=o.data_idConverter(t);return{id:i,id_org:t,values:n.map(function(n,a){var s,l=r.getXKey(t),c=n[l],u=null===n[t]||isNaN(n[t])?null:+n[t];return r.isCustomX()&&r.isCategorized()&&!d(c)?(0===e&&0===a&&(o.axis_x_categories=[]),-1===(s=o.axis_x_categories.indexOf(c))&&(s=o.axis_x_categories.length,o.axis_x_categories.push(c))):s=r.generateTargetX(c,t,a),(d(n[t])||r.data.xs[t].length<=a)&&(s=void 0),{x:s,value:u,id:i}}).filter(function(n){return f(n.x)})}}),e.forEach(function(n){var t;o.data_xSort&&(n.values=n.values.sort(function(n,t){return(n.x||0===n.x?n.x:1/0)-(t.x||0===t.x?t.x:1/0)})),t=0,n.values.forEach(function(n){n.index=t++}),r.data.xs[n.id].sort(function(n,t){return n-t})}),r.hasNegativeValue=r.hasNegativeValueInTargets(e),r.hasPositiveValue=r.hasPositiveValueInTargets(e),o.data_type&&r.setTargetType(r.mapToIds(e).filter(function(n){return!(n in o.data_types)}),o.data_type),e.forEach(function(n){r.addCache(n.id_org,n)}),e},k.isX=function(n){var t=this,e=t.config;return e.data_x&&n===e.data_x||v(e.data_xs)&&x(e.data_xs,n)},k.isNotX=function(n){return!this.isX(n)},k.getXKey=function(n){var t=this,e=t.config;return e.data_x?e.data_x:v(e.data_xs)?e.data_xs[n]:null},k.getXValuesOfXKey=function(n,t){var e,r=this;return(t&&v(t)?r.mapToIds(t):[]).forEach(function(t){r.getXKey(t)===n&&(e=r.data.xs[t])}),e},k.getIndexByX=function(n){var t=this,e=t.filterByX(t.data.targets,n);return e.length?e[0].index:null},k.getXValue=function(n,t){var e=this;return n in e.data.xs&&e.data.xs[n]&&l(e.data.xs[n][t])?e.data.xs[n][t]:t},k.getOtherTargetXs=function(){var n=this,t=Object.keys(n.data.xs);return t.length?n.data.xs[t[0]]:null},k.getOtherTargetX=function(n){var t=this.getOtherTargetXs();return t&&n1},k.isMultipleX=function(){return v(this.config.data_xs)||!this.config.data_xSort||this.hasType("scatter")},k.addName=function(n){var t,e=this;return n&&(t=e.config.data_names[n.id],n.name=void 0!==t?t:n.id),n},k.getValueOnIndex=function(n,t){var e=n.filter(function(n){return n.index===t});return e.length?e[0]:null},k.updateTargetX=function(n,t){var e=this;n.forEach(function(n){n.values.forEach(function(r,o){r.x=e.generateTargetX(t[o],n.id,o)}),e.data.xs[n.id]=t})},k.updateTargetXs=function(n,t){var e=this;n.forEach(function(n){t[n.id]&&e.updateTargetX([n],t[n.id])})},k.generateTargetX=function(n,t,e){var r=this;return r.isTimeSeries()?n?r.parseDate(n):r.parseDate(r.getXValue(t,e)):r.isCustomX()&&!r.isCategorized()?l(n)?+n:r.getXValue(t,e):e},k.cloneTarget=function(n){return{id:n.id,id_org:n.id_org,values:n.values.map(function(n){return{x:n.x,value:n.value,id:n.id}})}},k.updateXs=function(){var n=this;n.data.targets.length&&(n.xs=[],n.data.targets[0].values.forEach(function(t){n.xs[t.index]=t.x}))},k.getPrevX=function(n){var t=this.xs[n-1];return void 0!==t?t:null},k.getNextX=function(n){var t=this.xs[n+1];return void 0!==t?t:null},k.getMaxDataCount=function(){var n=this;return n.d3.max(n.data.targets,function(n){return n.values.length})},k.getMaxDataCountTarget=function(n){var t,e=n.length,r=0;return e>1?n.forEach(function(n){n.values.length>r&&(t=n,r=n.values.length)}):t=e?n[0]:null,t},k.getEdgeX=function(n){var t=this;return n.length?[t.d3.min(n,function(n){return n.values[0].x}),t.d3.max(n,function(n){return n.values[n.values.length-1].x})]:[0,0]},k.mapToIds=function(n){return n.map(function(n){return n.id})},k.mapToTargetIds=function(n){var t=this;return n?[].concat(n):t.mapToIds(t.data.targets)},k.hasTarget=function(n,t){var e,r=this.mapToIds(n);for(e=0;et?1:n>=t?0:NaN})},k.addHiddenTargetIds=function(n){n=n instanceof Array?n:new Array(n);for(var t=0;t0})},k.isOrderDesc=function(){var n=this.config;return"string"==typeof n.data_order&&"desc"===n.data_order.toLowerCase()},k.isOrderAsc=function(){var n=this.config;return"string"==typeof n.data_order&&"asc"===n.data_order.toLowerCase()},k.orderTargets=function(n){var t=this,e=t.config,r=t.isOrderAsc(),o=t.isOrderDesc();return r||o?n.sort(function(n,t){var e=function(n,t){return n+Math.abs(t.value)},o=n.values.reduce(e,0),i=t.values.reduce(e,0);return r?i-o:o-i}):c(e.data_order)?n.sort(e.data_order):u(e.data_order)&&n.sort(function(n,t){return e.data_order.indexOf(n.id)-e.data_order.indexOf(t.id)}),n},k.filterByX=function(n,t){return this.d3.merge(n.map(function(n){return n.values})).filter(function(n){return n.x-t==0})},k.filterRemoveNull=function(n){return n.filter(function(n){return l(n.value)})},k.filterByXDomain=function(n,t){return n.map(function(n){return{id:n.id,id_org:n.id_org,values:n.values.filter(function(n){return t[0]<=n.x&&n.x<=t[1]})}})},k.hasDataLabel=function(){var n=this.config;return!("boolean"!=typeof n.data_labels||!n.data_labels)||!("object"!=typeof n.data_labels||!v(n.data_labels))},k.getDataLabelLength=function(n,t,e){var r=this,o=[0,0];return r.selectChart.select("svg").selectAll(".dummy").data([n,t]).enter().append("text").text(function(n){return r.dataLabelFormat(n.id)(n)}).each(function(n,t){o[t]=1.3*this.getBoundingClientRect()[e]}).remove(),o},k.isNoneArc=function(n){return this.hasTarget(this.data.targets,n.id)},k.isArc=function(n){return"data"in n&&this.hasTarget(this.data.targets,n.data.id)},k.findSameXOfValues=function(n,t){var e,r=n[t].x,o=[];for(e=t-1;e>=0&&r===n[e].x;e--)o.push(n[e]);for(e=t;e0)for(a=s.hasNegativeValueInTargets(n),t=0;t=0}),0!==o.length)for(r=o[0],a&&u[r]&&u[r].forEach(function(n,t){u[r][t]=n<0?n:0}),e=1;e0||(u[r][t]+=+n)});return s.d3.min(Object.keys(u).map(function(n){return s.d3.min(u[n])}))},k.getYDomainMax=function(n){var t,e,r,o,i,a,s=this,l=s.config,c=s.mapToIds(n),u=s.getValuesAsIdKeyed(n);if(l.data_groups.length>0)for(a=s.hasPositiveValueInTargets(n),t=0;t=0}),0!==o.length)for(r=o[0],a&&u[r]&&u[r].forEach(function(n,t){u[r][t]=n>0?n:0}),e=1;e=0&&E>=0,f=_<=0&&E<=0,(l(x)&&d||l(w)&&f)&&(S=!1),S&&(d&&(_=0),f&&(E=0)),o=Math.abs(E-_),i=a=.1*o,void 0!==k&&(s=Math.max(Math.abs(_),Math.abs(E)),E=k+s,_=k-s),O?(c=h.getDataLabelLength(_,E,"width"),u=b(h.y.range()),p=[c[0]/u,c[1]/u],i+=o*(p[1]/(1-p[0]-p[1])),a+=o*(p[0]/(1-p[0]-p[1]))):T&&(c=h.getDataLabelLength(_,E,"height"),i+=h.axis.convertPixelsToAxisPadding(c[1],o),a+=h.axis.convertPixelsToAxisPadding(c[0],o)),"y"===t&&v(g.axis_y_padding)&&(i=h.axis.getPadding(g.axis_y_padding,"top",i,o),a=h.axis.getPadding(g.axis_y_padding,"bottom",a,o)),"y2"===t&&v(g.axis_y2_padding)&&(i=h.axis.getPadding(g.axis_y2_padding,"top",i,o),a=h.axis.getPadding(g.axis_y2_padding,"bottom",a,o)),S&&(d&&(a=_),f&&(i=-E)),r=[_-a,E+i],C?r.reverse():r)},k.getXDomainMin=function(n){var t=this,e=t.config;return f(e.axis_x_min)?t.isTimeSeries()?this.parseDate(e.axis_x_min):e.axis_x_min:t.d3.min(n,function(n){return t.d3.min(n.values,function(n){return n.x})})},k.getXDomainMax=function(n){var t=this,e=t.config;return f(e.axis_x_max)?t.isTimeSeries()?this.parseDate(e.axis_x_max):e.axis_x_max:t.d3.max(n,function(n){return t.d3.max(n.values,function(n){return n.x})})},k.getXDomainPadding=function(n){var t,e,r,o,i=this,a=i.config,s=n[1]-n[0];return i.isCategorized()?e=0:i.hasType("bar")?(t=i.getMaxDataCount(),e=t>1?s/(t-1)/2:.5):e=.01*s,"object"==typeof a.axis_x_padding&&v(a.axis_x_padding)?(r=l(a.axis_x_padding.left)?a.axis_x_padding.left:e,o=l(a.axis_x_padding.right)?a.axis_x_padding.right:e):r=o="number"==typeof a.axis_x_padding?a.axis_x_padding:e,{left:r,right:o}},k.getXDomain=function(n){var t=this,e=[t.getXDomainMin(n),t.getXDomainMax(n)],r=e[0],o=e[1],i=t.getXDomainPadding(e),a=0,s=0;return r-o!=0||t.isCategorized()||(t.isTimeSeries()?(r=new Date(.5*r.getTime()),o=new Date(1.5*o.getTime())):(r=0===r?1:.5*r,o=0===o?-1:1.5*o)),(r||0===r)&&(a=t.isTimeSeries()?new Date(r.getTime()-i.left):r-i.left),(o||0===o)&&(s=t.isTimeSeries()?new Date(o.getTime()+i.right):o+i.right),[a,s]},k.updateXDomain=function(n,t,e,r,o){var i=this,a=i.config;return e&&(i.x.domain(o||i.d3.extent(i.getXDomain(n))),i.orgXDomain=i.x.domain(),a.zoom_enabled&&i.zoom.scale(i.x).updateScaleExtent(),i.subX.domain(i.x.domain()),i.brush&&i.brush.scale(i.subX)),t&&(i.x.domain(o||(!i.brush||i.brush.empty()?i.orgXDomain:i.brush.extent())),a.zoom_enabled&&i.zoom.scale(i.x).updateScaleExtent()),r&&i.x.domain(i.trimXDomain(i.x.orgDomain())),i.x.domain()},k.trimXDomain=function(n){var t=this.getZoomDomain(),e=t[0],r=t[1];return n[0]<=e&&(n[1]=+n[1]+(e-n[0]),n[0]=e),r<=n[1]&&(n[0]=+n[0]-(n[1]-r),n[1]=r),n},k.drag=function(n){var t,e,r,o,i,a,l,c,u=this,p=u.config,d=u.main,f=u.d3;u.hasArcType()||p.data_selection_enabled&&(p.zoom_enabled&&!u.zoom.altDomain||p.data_selection_multiple&&(t=u.dragStart[0],e=u.dragStart[1],r=n[0],o=n[1],i=Math.min(t,r),a=Math.max(t,r),l=p.data_selection_grouped?u.margin.top:Math.min(e,o),c=p.data_selection_grouped?u.height:Math.max(e,o),d.select("."+s.dragarea).attr("x",i).attr("y",l).attr("width",a-i).attr("height",c-l),d.selectAll("."+s.shapes).selectAll("."+s.shape).filter(function(n){return p.data_selection_isselectable(n)}).each(function(n,t){var e,r,o,p,d,h,g=f.select(this),b=g.classed(s.SELECTED),m=g.classed(s.INCLUDED),v=!1;if(g.classed(s.circle))e=1*g.attr("cx"),r=1*g.attr("cy"),d=u.togglePoint,v=ic&&(l=l.filter(function(n){return(""+n).indexOf(".")<0}));return l},k.getGridFilterToRemove=function(n){return n?function(t){var e=!1;return[].concat(n).forEach(function(n){("value"in n&&t.value===n.value||"class"in n&&t.class===n.class)&&(e=!0)}),e}:function(){return!0}},k.removeGridLines=function(n,t){var e=this,r=e.config,o=e.getGridFilterToRemove(n),i=function(n){return!o(n)},a=t?s.xgridLines:s.ygridLines,l=t?s.xgridLine:s.ygridLine;e.main.select("."+a).selectAll("."+l).filter(o).transition().duration(r.transition_duration).style("opacity",0).remove(),t?r.grid_x_lines=r.grid_x_lines.filter(i):r.grid_y_lines=r.grid_y_lines.filter(i)},k.initEventRect=function(){this.main.select("."+s.chart).append("g").attr("class",s.eventRects).style("fill-opacity",0)},k.redrawEventRect=function(){var n,t,e=this,r=e.config,o=e.isMultipleX(),i=e.main.select("."+s.eventRects).style("cursor",r.zoom_enabled?r.axis_rotated?"ns-resize":"ew-resize":null).classed(s.eventRectsMultiple,o).classed(s.eventRectsSingle,!o);i.selectAll("."+s.eventRect).remove(),e.eventRect=i.selectAll("."+s.eventRect),o?(n=e.eventRect.data([0]),e.generateEventRectsForMultipleXs(n.enter()),e.updateEventRect(n)):(t=e.getMaxDataCountTarget(e.data.targets),i.datum(t?t.values:[]),e.eventRect=i.selectAll("."+s.eventRect),n=e.eventRect.data(function(n){return n}),e.generateEventRectsForSingleX(n.enter()),e.updateEventRect(n),n.exit().remove())},k.updateEventRect=function(n){var t,e,r,o,i,a,s=this,l=s.config;n=n||s.eventRect.data(function(n){return n}),s.isMultipleX()?(t=0,e=0,r=s.width,o=s.height):(!s.isCustomX()&&!s.isTimeSeries()||s.isCategorized()?(i=s.getEventRectWidth(),a=function(n){return s.x(n.x)-i/2}):(s.updateXs(),i=function(n){var t=s.getPrevX(n.index),e=s.getNextX(n.index);return null===t&&null===e?l.axis_rotated?s.height:s.width:(null===t&&(t=s.x.domain()[0]),null===e&&(e=s.x.domain()[1]),Math.max(0,(s.x(e)-s.x(t))/2))},a=function(n){var t=s.getPrevX(n.index),e=s.getNextX(n.index),r=s.data.xs[n.id][n.index];return null===t&&null===e?0:(null===t&&(t=s.x.domain()[0]),(s.x(r)+s.x(t))/2)}),t=l.axis_rotated?0:a,e=l.axis_rotated?a:0,r=l.axis_rotated?s.width:i,o=l.axis_rotated?i:s.height),n.attr("class",s.classEvent.bind(s)).attr("x",t).attr("y",e).attr("width",r).attr("height",o)},k.generateEventRectsForSingleX=function(n){var t=this,e=t.d3,r=t.config;n.append("rect").attr("class",t.classEvent.bind(t)).style("cursor",r.data_selection_enabled&&r.data_selection_grouped?"pointer":null).on("mouseover",function(n){var e=n.index;t.dragging||t.flowing||t.hasArcType()||(r.point_focus_expand_enabled&&t.expandCircles(e,null,!0),t.expandBars(e,null,!0),t.main.selectAll("."+s.shape+"-"+e).each(function(n){r.data_onmouseover.call(t.api,n)}))}).on("mouseout",function(n){var e=n.index;t.config&&(t.hasArcType()||(t.hideXGridFocus(),t.hideTooltip(),t.unexpandCircles(),t.unexpandBars(),t.main.selectAll("."+s.shape+"-"+e).each(function(n){r.data_onmouseout.call(t.api,n)})))}).on("mousemove",function(n){var o,i=n.index,a=t.svg.select("."+s.eventRect+"-"+i);t.dragging||t.flowing||t.hasArcType()||(t.isStepType(n)&&"step-after"===t.config.line_step_type&&e.mouse(this)[0]=0}).classed(s.legendItemFocused,t).transition().duration(100).style("opacity",function(){return(t?e.opacityForLegend:e.opacityForUnfocusedLegend).call(e,e.d3.select(this))})},k.revertLegend=function(){var n=this,t=n.d3;n.legend.selectAll("."+s.legendItem).classed(s.legendItemFocused,!1).transition().duration(100).style("opacity",function(){return n.opacityForLegend(t.select(this))})},k.showLegend=function(n){var t=this,e=t.config;e.legend_show||(e.legend_show=!0,t.legend.style("visibility","visible"),t.legendHasRendered||t.updateLegendWithDefaults()),t.removeHiddenLegendIds(n),t.legend.selectAll(t.selectorLegends(n)).style("visibility","visible").transition().style("opacity",function(){return t.opacityForLegend(t.d3.select(this))})},k.hideLegend=function(n){var t=this,e=t.config;e.legend_show&&m(n)&&(e.legend_show=!1,t.legend.style("visibility","hidden")),t.addHiddenLegendIds(n),t.legend.selectAll(t.selectorLegends(n)).style("opacity",0).style("visibility","hidden")},k.clearLegendItemTextBoxCache=function(){this.legendItemTextBox={}},k.updateLegend=function(n,t,e){function r(n,t){return k.legendItemTextBox[t]||(k.legendItemTextBox[t]=k.getTextRect(n.textContent,s.legendItem,n)),k.legendItemTextBox[t]}function o(t,e,o){function i(n,t){t||(a=(h-R-f)/2)=T)&&(T=p),(!A||d>=A)&&(A=d),s=k.isLegendRight||k.isLegendInset?A:T,S.legend_equally?(Object.keys(D).forEach(function(n){D[n]=T}),Object.keys(I).forEach(function(n){I[n]=A}),a=(h-s*n.length)/2,a0&&0===E.size()&&(E=k.legend.insert("g","."+s.legendItem).attr("class",s.legendBackground).append("rect")),x=k.legend.selectAll("text").data(n).text(function(n){return f(S.data_names[n])?S.data_names[n]:n}).each(function(n,t){o(this,n,t)}),(m?x.transition():x).attr("x",a).attr("y",u),w=k.legend.selectAll("rect."+s.legendItemEvent).data(n),(m?w.transition():w).attr("width",function(n){return D[n]}).attr("height",function(n){return I[n]}).attr("x",l).attr("y",p),_=k.legend.selectAll("line."+s.legendItemTile).data(n),(m?_.transition():_).style("stroke",k.color).attr("x1",d).attr("y1",g).attr("x2",h).attr("y2",g),E&&(m?E.transition():E).attr("height",k.getLegendHeight()-12).attr("width",T*(F+1)+10),k.legend.selectAll("."+s.legendItem).classed(s.legendItemHidden,function(n){return!k.isTargetToShow(n)}),k.updateLegendItemWidth(T),k.updateLegendItemHeight(A),k.updateLegendStep(F),k.updateSizes(),k.updateScales(),k.updateSvgSize(),k.transformAll(v,e),k.legendHasRendered=!0},k.initRegion=function(){var n=this;n.region=n.main.append("g").attr("clip-path",n.clipPath).attr("class",s.regions)},k.updateRegion=function(n){var t=this,e=t.config;t.region.style("visibility",t.hasArcType()?"hidden":"visible"),t.mainRegion=t.main.select("."+s.regions).selectAll("."+s.region).data(e.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(n).style("opacity",0).remove()},k.redrawRegion=function(n){var t=this,e=t.mainRegion.selectAll("rect").each(function(){var n=t.d3.select(this.parentNode).datum();t.d3.select(this).datum(n)}),r=t.regionX.bind(t),o=t.regionY.bind(t),i=t.regionWidth.bind(t),a=t.regionHeight.bind(t);return[(n?e.transition():e).attr("x",r).attr("y",o).attr("width",i).attr("height",a).style("fill-opacity",function(n){return l(n.opacity)?n.opacity:.1})]},k.regionX=function(n){var t=this,e=t.config,r="y"===n.axis?t.y:t.y2;return"y"===n.axis||"y2"===n.axis?e.axis_rotated&&"start"in n?r(n.start):0:e.axis_rotated?0:"start"in n?t.x(t.isTimeSeries()?t.parseDate(n.start):n.start):0},k.regionY=function(n){var t=this,e=t.config,r="y"===n.axis?t.y:t.y2;return"y"===n.axis||"y2"===n.axis?e.axis_rotated?0:"end"in n?r(n.end):0:e.axis_rotated&&"start"in n?t.x(t.isTimeSeries()?t.parseDate(n.start):n.start):0},k.regionWidth=function(n){var t,e=this,r=e.config,o=e.regionX(n),i="y"===n.axis?e.y:e.y2;return t="y"===n.axis||"y2"===n.axis?r.axis_rotated&&"end"in n?i(n.end):e.width:r.axis_rotated?e.width:"end"in n?e.x(e.isTimeSeries()?e.parseDate(n.end):n.end):e.width,tr.bar_width_max?r.bar_width_max:o},k.getBars=function(n,t){var e=this;return(t?e.main.selectAll("."+s.bars+e.getTargetSelectorSuffix(t)):e.main).selectAll("."+s.bar+(l(n)?"-"+n:""))},k.expandBars=function(n,t,e){var r=this;e&&r.unexpandBars(),r.getBars(n,t).classed(s.EXPANDED,!0)},k.unexpandBars=function(n){this.getBars(n).classed(s.EXPANDED,!1)},k.generateDrawBar=function(n,t){var e=this,r=e.config,o=e.generateGetBarPoints(n,t);return function(n,t){var e=o(n,t),i=r.axis_rotated?1:0,a=r.axis_rotated?0:1;return"M "+e[0][i]+","+e[0][a]+" L"+e[1][i]+","+e[1][a]+" L"+e[2][i]+","+e[2][a]+" L"+e[3][i]+","+e[3][a]+" z"}},k.generateGetBarPoints=function(n,t){var e=this,r=t?e.subXAxis:e.xAxis,o=n.__max__+1,i=e.getBarW(r,o),a=e.getShapeX(i,o,n,!!t),s=e.getShapeY(!!t),l=e.getShapeOffset(e.isBarType,n,!!t),c=t?e.getSubYScale:e.getYScale;return function(n,t){var r=c.call(e,n.id)(0),o=l(n,t)||r,u=a(n),p=s(n);return e.config.axis_rotated&&(0=0&&(c+=s(o[a].value)-l))}),c}},k.isWithinShape=function(n,t){var e,r=this,o=r.d3.select(n);return r.isTargetToShow(t.id)?"circle"===n.nodeName?e=r.isStepType(t)?r.isWithinStep(n,r.getYScale(t.id)(t.value)):r.isWithinCircle(n,1.5*r.pointSelectR(t)):"path"===n.nodeName&&(e=!o.classed(s.bar)||r.isWithinBar(n)):e=!1,e},k.getInterpolate=function(n){var t=this,e=t.isInterpolationType(t.config.spline_interpolation_type)?t.config.spline_interpolation_type:"cardinal";return t.isSplineType(n)?e:t.isStepType(n)?t.config.line_step_type:"linear"},k.initLine=function(){this.main.select("."+s.chart).append("g").attr("class",s.chartLines)},k.updateTargetsForLine=function(n){var t,e,r=this,o=r.config,i=r.classChartLine.bind(r),a=r.classLines.bind(r),l=r.classAreas.bind(r),c=r.classCircles.bind(r),u=r.classFocus.bind(r);t=r.main.select("."+s.chartLines).selectAll("."+s.chartLine).data(n).attr("class",function(n){return i(n)+u(n)}),e=t.enter().append("g").attr("class",i).style("opacity",0).style("pointer-events","none"),e.append("g").attr("class",a),e.append("g").attr("class",l),e.append("g").attr("class",function(n){return r.generateClass(s.selectedCircles,n.id)}),e.append("g").attr("class",c).style("cursor",function(n){return o.data_selection_isselectable(n)?"pointer":null}),n.forEach(function(n){r.main.selectAll("."+s.selectedCircles+r.getTargetSelectorSuffix(n.id)).selectAll("."+s.selectedCircle).each(function(t){t.value=n.values[t.index].value})})},k.updateLine=function(n){var t=this;t.mainLine=t.main.selectAll("."+s.lines).selectAll("."+s.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(n){return t.isStepType(n)?"crispEdges":""}).attr("transform",null),t.mainLine.exit().transition().duration(n).style("opacity",0).remove()},k.redrawLine=function(n,t){return[(t?this.mainLine.transition(Math.random().toString()):this.mainLine).attr("d",n).style("stroke",this.color).style("opacity",1)]},k.generateDrawLine=function(n,t){var e=this,r=e.config,o=e.d3.svg.line(),i=e.generateGetLinePoints(n,t),a=t?e.getSubYScale:e.getYScale,s=function(n){return(t?e.subxx:e.xx).call(e,n)},l=function(n,t){return r.data_groups.length>0?i(n,t)[0][1]:a.call(e,n.id)(n.value)};return o=r.axis_rotated?o.x(l).y(s):o.x(s).y(l),r.line_connectNull||(o=o.defined(function(n){return null!=n.value})),function(n){var i,s=r.line_connectNull?e.filterRemoveNull(n.values):n.values,l=t?e.x:e.subX,c=a.call(e,n.id),u=0,p=0;return e.isLineType(n)?r.data_regions[n.id]?i=e.lineWithRegions(s,l,c,r.data_regions[n.id]):(e.isStepType(n)&&(s=e.convertValuesToStep(s)),i=o.interpolate(e.getInterpolate(n))(s)):(s[0]&&(u=l(s[0].x),p=c(s[0].value)),i=r.axis_rotated?"M "+p+" "+u:"M "+u+" "+p),i||"M 0 0"}},k.generateGetLinePoints=function(n,t){var e=this,r=e.config,o=n.__max__+1,i=e.getShapeX(0,o,n,!!t),a=e.getShapeY(!!t),s=e.getShapeOffset(e.isLineType,n,!!t),l=t?e.getSubYScale:e.getYScale;return function(n,t){var o=l.call(e,n.id)(0),c=s(n,t)||o,u=i(n),p=a(n);return r.axis_rotated&&(00?i(n,t)[0][1]:a.call(e,n.id)(e.getAreaBaseValue(n.id))},c=function(n,t){return r.data_groups.length>0?i(n,t)[1][1]:a.call(e,n.id)(n.value)};return o=r.axis_rotated?o.x0(l).x1(c).y(s):o.x(s).y0(r.area_above?0:l).y1(c),r.line_connectNull||(o=o.defined(function(n){return null!==n.value})),function(n){var t,i=r.line_connectNull?e.filterRemoveNull(n.values):n.values,a=0,s=0;return e.isAreaType(n)?(e.isStepType(n)&&(i=e.convertValuesToStep(i)),t=o.interpolate(e.getInterpolate(n))(i)):(i[0]&&(a=e.x(i[0].x),s=e.getYScale(n.id)(i[0].value)),t=r.axis_rotated?"M "+s+" "+a:"M "+a+" "+s),t||"M 0 0"}},k.getAreaBaseValue=function(){return 0},k.generateGetAreaPoints=function(n,t){var e=this,r=e.config,o=n.__max__+1,i=e.getShapeX(0,o,n,!!t),a=e.getShapeY(!!t),s=e.getShapeOffset(e.isAreaType,n,!!t),l=t?e.getSubYScale:e.getYScale;return function(n,t){var o=l.call(e,n.id)(0),c=s(n,t)||o,u=i(n),p=a(n);return r.axis_rotated&&(00?(n=e.getShapeIndices(e.isLineType),t=e.generateGetLinePoints(n),e.circleY=function(n,e){return t(n,e)[0][1]}):e.circleY=function(n){return e.getYScale(n.id)(n.value)}},k.getCircles=function(n,t){var e=this;return(t?e.main.selectAll("."+s.circles+e.getTargetSelectorSuffix(t)):e.main).selectAll("."+s.circle+(l(n)?"-"+n:""))},k.expandCircles=function(n,t,e){var r=this,o=r.pointExpandedR.bind(r);e&&r.unexpandCircles(),r.getCircles(n,t).classed(s.EXPANDED,!0).attr("r",o)},k.unexpandCircles=function(n){var t=this,e=t.pointR.bind(t);t.getCircles(n).filter(function(){return t.d3.select(this).classed(s.EXPANDED)}).classed(s.EXPANDED,!1).attr("r",e)},k.pointR=function(n){var t=this,e=t.config;return t.isStepType(n)?0:c(e.point_r)?e.point_r(n):e.point_r},k.pointExpandedR=function(n){var t=this,e=t.config;return e.point_focus_expand_enabled?e.point_focus_expand_r?e.point_focus_expand_r:1.75*t.pointR(n):t.pointR(n)},k.pointSelectR=function(n){var t=this,e=t.config;return c(e.point_select_r)?e.point_select_r(n):e.point_select_r?e.point_select_r:4*t.pointR(n)},k.isWithinCircle=function(n,t){var e=this.d3,r=e.mouse(n),o=e.select(n),i=+o.attr("cx"),a=+o.attr("cy");return Math.sqrt(Math.pow(i-r[0],2)+Math.pow(a-r[1],2))0?e:320/(n.hasType("gauge")&&!t.gauge_fullCircle?2:1)},k.getCurrentPaddingTop=function(){var n=this,t=n.config,e=l(t.padding_top)?t.padding_top:0;return n.title&&n.title.node()&&(e+=n.getTitlePadding()),e},k.getCurrentPaddingBottom=function(){var n=this.config;return l(n.padding_bottom)?n.padding_bottom:0},k.getCurrentPaddingLeft=function(n){var t=this,e=t.config;return l(e.padding_left)?e.padding_left:e.axis_rotated?e.axis_x_show?Math.max(h(t.getAxisWidthByAxisId("x",n)),40):1:!e.axis_y_show||e.axis_y_inner?t.axis.getYAxisLabelPosition().isOuter?30:1:h(t.getAxisWidthByAxisId("y",n))},k.getCurrentPaddingRight=function(){var n=this,t=n.config,e=n.isLegendRight?n.getLegendWidth()+20:0;return l(t.padding_right)?t.padding_right+1:t.axis_rotated?10+e:!t.axis_y2_show||t.axis_y2_inner?2+e+(n.axis.getY2AxisLabelPosition().isOuter?20:0):h(n.getAxisWidthByAxisId("y2"))+e},k.getParentRectValue=function(n){for(var t,e=this.selectChart.node();e&&"BODY"!==e.tagName;){try{t=e.getBoundingClientRect()[n]}catch(r){"width"===n&&(t=e.offsetWidth)}if(t)break;e=e.parentNode}return t},k.getParentWidth=function(){return this.getParentRectValue("width")},k.getParentHeight=function(){var n=this.selectChart.style("height");return n.indexOf("px")>0?+n.replace("px",""):0},k.getSvgLeft=function(n){var t=this,e=t.config,r=e.axis_rotated||!e.axis_rotated&&!e.axis_y_inner,o=e.axis_rotated?s.axisX:s.axisY,i=t.main.select("."+o).node(),a=i&&r?i.getBoundingClientRect():{right:0},l=t.selectChart.node().getBoundingClientRect(),c=t.hasArcType(),u=a.right-l.left-(c?0:t.getCurrentPaddingLeft(n));return u>0?u:0},k.getAxisWidthByAxisId=function(n,t){var e=this,r=e.axis.getLabelPositionById(n);return e.axis.getMaxTickWidth(n,t)+(r.isInner?20:40)},k.getHorizontalAxisHeight=function(n){var t=this,e=t.config,r=30;return"x"!==n||e.axis_x_show?"x"===n&&e.axis_x_height?e.axis_x_height:"y"!==n||e.axis_y_show?"y2"!==n||e.axis_y2_show?("x"===n&&!e.axis_rotated&&e.axis_x_tick_rotate&&(r=30+t.axis.getMaxTickWidth(n)*Math.cos(Math.PI*(90-e.axis_x_tick_rotate)/180)),"y"===n&&e.axis_rotated&&e.axis_y_tick_rotate&&(r=30+t.axis.getMaxTickWidth(n)*Math.cos(Math.PI*(90-e.axis_y_tick_rotate)/180)),r+(t.axis.getLabelPositionById(n).isInner?0:10)+("y2"===n?-10:0)):t.rotated_padding_top:!e.legend_show||t.isLegendRight||t.isLegendInset?1:10:8},k.getEventRectWidth=function(){return Math.max(0,this.xAxis.tickInterval())},k.initBrush=function(){var n=this,t=n.d3;n.brush=t.svg.brush().on("brush",function(){n.redrawForBrush()}),n.brush.update=function(){return n.context&&n.context.select("."+s.brush).call(this),this},n.brush.scale=function(t){return n.config.axis_rotated?this.y(t):this.x(t)}},k.initSubchart=function(){var n=this,t=n.config,e=n.context=n.svg.append("g").attr("transform",n.getTranslate("context")),r=t.subchart_show?"visible":"hidden";e.style("visibility",r),e.append("g").attr("clip-path",n.clipPathForSubchart).attr("class",s.chart),e.select("."+s.chart).append("g").attr("class",s.chartBars),e.select("."+s.chart).append("g").attr("class",s.chartLines),e.append("g").attr("clip-path",n.clipPath).attr("class",s.brush).call(n.brush),n.axes.subx=e.append("g").attr("class",s.axisX).attr("transform",n.getTranslate("subx")).attr("clip-path",t.axis_rotated?"":n.clipPathForXAxis).style("visibility",t.subchart_axis_x_show?r:"hidden")},k.updateTargetsForSubchart=function(n){var t,e,r,o,i=this,a=i.context,l=i.config,c=i.classChartBar.bind(i),u=i.classBars.bind(i),p=i.classChartLine.bind(i),d=i.classLines.bind(i),f=i.classAreas.bind(i);l.subchart_show&&(o=a.select("."+s.chartBars).selectAll("."+s.chartBar).data(n).attr("class",c),r=o.enter().append("g").style("opacity",0).attr("class",c),r.append("g").attr("class",u),e=a.select("."+s.chartLines).selectAll("."+s.chartLine).data(n).attr("class",p),t=e.enter().append("g").style("opacity",0).attr("class",p),t.append("g").attr("class",d),t.append("g").attr("class",f),a.selectAll("."+s.brush+" rect").attr(l.axis_rotated?"width":"height",l.axis_rotated?i.width2:i.height2))},k.updateBarForSubchart=function(n){var t=this;t.contextBar=t.context.selectAll("."+s.bars).selectAll("."+s.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(n).style("opacity",0).remove()},k.redrawBarForSubchart=function(n,t,e){(t?this.contextBar.transition(Math.random().toString()).duration(e):this.contextBar).attr("d",n).style("opacity",1)},k.updateLineForSubchart=function(n){var t=this;t.contextLine=t.context.selectAll("."+s.lines).selectAll("."+s.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(n).style("opacity",0).remove()},k.redrawLineForSubchart=function(n,t,e){(t?this.contextLine.transition(Math.random().toString()).duration(e):this.contextLine).attr("d",n).style("opacity",1)},k.updateAreaForSubchart=function(n){var t=this,e=t.d3;t.contextArea=t.context.selectAll("."+s.areas).selectAll("."+s.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=+e.select(this).style("opacity"),0}),t.contextArea.style("opacity",0),t.contextArea.exit().transition().duration(n).style("opacity",0).remove()},k.redrawAreaForSubchart=function(n,t,e){(t?this.contextArea.transition(Math.random().toString()).duration(e):this.contextArea).attr("d",n).style("fill",this.color).style("opacity",this.orgAreaOpacity)},k.redrawSubchart=function(n,t,e,r,o,i,a){var s,l,c,u=this,p=u.d3,d=u.config;u.context.style("visibility",d.subchart_show?"visible":"hidden"),d.subchart_show&&(p.event&&"zoom"===p.event.type&&u.brush.extent(u.x.orgDomain()).update(),n&&(u.brush.empty()||u.brush.extent(u.x.orgDomain()).update(),s=u.generateDrawArea(o,!0),l=u.generateDrawBar(i,!0),c=u.generateDrawLine(a,!0),u.updateBarForSubchart(e),u.updateLineForSubchart(e),u.updateAreaForSubchart(e),u.redrawBarForSubchart(l,e,e),u.redrawLineForSubchart(c,e,e),u.redrawAreaForSubchart(s,e,e)))},k.redrawForBrush=function(){var n=this,t=n.x;n.redraw({withTransition:!1,withY:n.config.zoom_rescale,withSubchart:!1,withUpdateXDomain:!0,withDimension:!1}),n.config.subchart_onbrush.call(n.api,t.orgDomain())},k.transformContext=function(n,t){var e,r=this;t&&t.axisSubX?e=t.axisSubX:(e=r.context.select("."+s.axisX),n&&(e=e.transition())),r.context.attr("transform",r.getTranslate("context")),e.attr("transform",r.getTranslate("subx"))},k.getDefaultExtent=function(){var n=this,t=n.config,e=c(t.axis_x_extent)?t.axis_x_extent(n.getXDomain(n.data.targets)):t.axis_x_extent;return n.isTimeSeries()&&(e=[n.parseDate(e[0]),n.parseDate(e[1])]),e},k.initText=function(){var n=this;n.main.select("."+s.chart).append("g").attr("class",s.chartTexts),n.mainText=n.d3.selectAll([])},k.updateTargetsForText=function(n){var t,e,r=this,o=r.classChartText.bind(r),i=r.classTexts.bind(r),a=r.classFocus.bind(r);t=r.main.select("."+s.chartTexts).selectAll("."+s.chartText).data(n).attr("class",function(n){return o(n)+a(n)}),e=t.enter().append("g").attr("class",o).style("opacity",0).style("pointer-events","none"),e.append("g").attr("class",i)},k.updateText=function(n){var t=this,e=t.config,r=t.barOrLineData.bind(t),o=t.classText.bind(t);t.mainText=t.main.selectAll("."+s.texts).selectAll("."+s.text).data(r),t.mainText.enter().append("text").attr("class",o).attr("text-anchor",function(n){return e.axis_rotated?n.value<0?"end":"start":"middle"}).style("stroke","none").style("fill",function(n){return t.color(n)}).style("fill-opacity",0),t.mainText.text(function(n,e,r){return t.dataLabelFormat(n.id)(n.value,n.id,e,r)}),t.mainText.exit().transition().duration(n).style("fill-opacity",0).remove()},k.redrawText=function(n,t,e,r){return[(r?this.mainText.transition():this.mainText).attr("x",n).attr("y",t).style("fill",this.color).style("fill-opacity",e?0:this.opacityForText.bind(this))]},k.getTextRect=function(n,t,e){var r,o=this.d3.select("body").append("div").classed("c3",!0),i=o.append("svg").style("visibility","hidden").style("position","fixed").style("top",0).style("left",0),a=this.d3.select(e).style("font");return i.selectAll(".dummy").data([n]).enter().append("text").classed(t||"",!0).style("font",a).text(n).each(function(){r=this.getBoundingClientRect()}),o.remove(),r},k.generateXYForText=function(n,t,e,r){var o=this,i=o.generateGetAreaPoints(n,!1),a=o.generateGetBarPoints(t,!1),s=o.generateGetLinePoints(e,!1),l=r?o.getXForText:o.getYForText;return function(n,t){var e=o.isAreaType(n)?i:o.isBarType(n)?a:s;return l.call(o,e(n,t),n,this)}},k.getXForText=function(n,t,e){var r,o,i=this,a=e.getBoundingClientRect();return i.config.axis_rotated?(o=i.isBarType(t)?4:6,r=n[2][1]+o*(t.value<0?-1:1)):r=i.hasType("bar")?(n[2][0]+n[0][0])/2:n[0][0],null===t.value&&(r>i.width?r=i.width-a.width:r<0&&(r=4)),r},k.getYForText=function(n,t,e){var r,o=this,i=e.getBoundingClientRect();return o.config.axis_rotated?r=(n[0][0]+n[2][0]+.6*i.height)/2:(r=n[2][1],t.value<0||0===t.value&&!o.hasPositiveValue?(r+=i.height,o.isBarType(t)&&o.isSafari()?r-=3:!o.isBarType(t)&&o.isChrome()&&(r+=3)):r+=o.isBarType(t)?-3:-6),null!==t.value||o.config.axis_rotated||(rthis.height&&(r=this.height-4)),r},k.initTitle=function(){var n=this;n.title=n.svg.append("text").text(n.config.title_text).attr("class",n.CLASS.title)},k.redrawTitle=function(){var n=this;n.title.attr("x",n.xForTitle.bind(n)).attr("y",n.yForTitle.bind(n))},k.xForTitle=function(){var n=this,t=n.config,e=t.title_position||"left";return e.indexOf("right")>=0?n.currentWidth-n.getTextRect(n.title.node().textContent,n.CLASS.title,n.title.node()).width-t.title_padding.right:e.indexOf("center")>=0?(n.currentWidth-n.getTextRect(n.title.node().textContent,n.CLASS.title,n.title.node()).width)/2:t.title_padding.left},k.yForTitle=function(){var n=this;return n.config.title_padding.top+n.getTextRect(n.title.node().textContent,n.CLASS.title,n.title.node()).height},k.getTitlePadding=function(){var n=this;return n.yForTitle()+n.config.title_padding.bottom},k.initTooltip=function(){var n,t=this,e=t.config;if(t.tooltip=t.selectChart.style("position","relative").append("div").attr("class",s.tooltipContainer).style("position","absolute").style("pointer-events","none").style("display","none"),e.tooltip_init_show){if(t.isTimeSeries()&&p(e.tooltip_init_x)){for(e.tooltip_init_x=t.parseDate(e.tooltip_init_x),n=0;n"+(a||0===a?""+a+"":"")),void 0!==(s=w(h(n[i].value,n[i].ratio,n[i].id,n[i].index,n))))){if(null===n[i].name)continue;l=w(f(n[i].name,n[i].ratio,n[i].id,n[i].index)),c=u.levelColor?u.levelColor(n[i].value):r(n[i].id),o+="",o+=""+l+"",o+=""+s+"",o+=""}return o+""},k.tooltipPosition=function(n,t,e,r){var o,i,a,s,l,c=this,u=c.config,p=c.d3,d=c.hasArcType(),f=p.mouse(r);return d?(i=(c.width-(c.isLegendRight?c.getLegendWidth():0))/2+f[0],s=c.height/2+f[1]+20):(o=c.getSvgLeft(!0),u.axis_rotated?(i=o+f[0]+100,a=i+t,l=c.currentWidth-c.getCurrentPaddingRight(),s=c.x(n[0].x)+20):(i=o+c.getCurrentPaddingLeft(!0)+c.x(n[0].x)+20,a=i+t,l=o+c.currentWidth-c.getCurrentPaddingRight(),s=f[1]+15),a>l&&(i-=a-l+20),s+e>c.currentHeight&&(s-=e+30)),s<0&&(s=0),{top:s,left:i}},k.showTooltip=function(n,t){var e,r,o,i=this,a=i.config,s=i.hasArcType(),c=n.filter(function(n){return n&&l(n.value)}),u=a.tooltip_position||k.tooltipPosition;0!==c.length&&a.tooltip_show&&(i.tooltip.html(a.tooltip_contents.call(i,n,i.axis.getXAxisTickFormat(),i.getYFormat(s),i.color)).style("display","block"),e=i.tooltip.property("offsetWidth"),r=i.tooltip.property("offsetHeight"),o=u.call(this,c,e,r,t),i.tooltip.style("top",o.top+"px").style("left",o.left+"px"))},k.hideTooltip=function(){this.tooltip.style("display","none")},k.setTargetType=function(n,t){var e=this,r=e.config;e.mapToTargetIds(n).forEach(function(n){e.withoutFadeIn[n]=t===r.data_types[n],r.data_types[n]=t}),n||(r.data_type=t)},k.hasType=function(n,t){var e=this,r=e.config.data_types,o=!1;return t=t||e.data.targets,t&&t.length?t.forEach(function(t){var e=r[t.id];(e&&e.indexOf(n)>=0||!e&&"line"===n)&&(o=!0)}):Object.keys(r).length?Object.keys(r).forEach(function(t){r[t]===n&&(o=!0)}):o=e.config.data_type===n,o},k.hasArcType=function(n){return this.hasType("pie",n)||this.hasType("donut",n)||this.hasType("gauge",n)},k.isLineType=function(n){var t=this.config,e=p(n)?n:n.id;return!t.data_types[e]||["line","spline","area","area-spline","step","area-step"].indexOf(t.data_types[e])>=0},k.isStepType=function(n){var t=p(n)?n:n.id;return["step","area-step"].indexOf(this.config.data_types[t])>=0},k.isSplineType=function(n){var t=p(n)?n:n.id;return["spline","area-spline"].indexOf(this.config.data_types[t])>=0},k.isAreaType=function(n){var t=p(n)?n:n.id;return["area","area-spline","area-step"].indexOf(this.config.data_types[t])>=0},k.isBarType=function(n){var t=p(n)?n:n.id;return"bar"===this.config.data_types[t]},k.isScatterType=function(n){var t=p(n)?n:n.id;return"scatter"===this.config.data_types[t]},k.isPieType=function(n){var t=p(n)?n:n.id;return"pie"===this.config.data_types[t]},k.isGaugeType=function(n){var t=p(n)?n:n.id;return"gauge"===this.config.data_types[t]},k.isDonutType=function(n){var t=p(n)?n:n.id;return"donut"===this.config.data_types[t]},k.isArcType=function(n){return this.isPieType(n)||this.isDonutType(n)||this.isGaugeType(n)},k.lineData=function(n){return this.isLineType(n)?[n]:[]},k.arcData=function(n){return this.isArcType(n.data)?[n]:[]},k.barData=function(n){return this.isBarType(n)?n.values:[]},k.lineOrScatterData=function(n){return this.isLineType(n)||this.isScatterType(n)?n.values:[]},k.barOrLineData=function(n){return this.isBarType(n)||this.isLineType(n)?n.values:[]},k.isInterpolationType=function(n){return["linear","linear-closed","basis","basis-open","basis-closed","bundle","cardinal","cardinal-open","cardinal-closed","monotone"].indexOf(n)>=0},k.isSafari=function(){var n=window.navigator.userAgent;return n.indexOf("Safari")>=0&&n.indexOf("Chrome")<0},k.isChrome=function(){return window.navigator.userAgent.indexOf("Chrome")>=0},k.initZoom=function(){var n,t=this,e=t.d3,r=t.config;t.zoom=e.behavior.zoom().on("zoomstart",function(){n=e.event.sourceEvent,t.zoom.altDomain=e.event.sourceEvent.altKey?t.x.orgDomain():null,r.zoom_onzoomstart.call(t.api,e.event.sourceEvent)}).on("zoom",function(){t.redrawForZoom.call(t)}).on("zoomend",function(){var o=e.event.sourceEvent;o&&n.clientX===o.clientX&&n.clientY===o.clientY||(t.redrawEventRect(),t.updateZoom(),r.zoom_onzoomend.call(t.api,t.x.orgDomain()))}),t.zoom.scale=function(n){return r.axis_rotated?this.y(n):this.x(n)},t.zoom.orgScaleExtent=function(){var n=r.zoom_extent?r.zoom_extent:[1,10];return[n[0],Math.max(t.getMaxDataCount()/n[1],n[1])]},t.zoom.updateScaleExtent=function(){var n=b(t.x.orgDomain())/b(t.getZoomDomain()),e=this.orgScaleExtent();return this.scaleExtent([e[0]*n,e[1]*n]),this}},k.getZoomDomain=function(){var n=this,t=n.config,e=n.d3;return[e.min([n.orgXDomain[0],t.zoom_x_min]),e.max([n.orgXDomain[1],t.zoom_x_max])]},k.updateZoom=function(){var n=this,t=n.config.zoom_enabled?n.zoom:function(){};n.main.select("."+s.zoomRect).call(t).on("dblclick.zoom",null),n.main.selectAll("."+s.eventRect).call(t).on("dblclick.zoom",null)},k.redrawForZoom=function(){var n=this,t=n.d3,e=n.config,r=n.zoom,o=n.x;if(e.zoom_enabled&&0!==n.filterTargetsToShow(n.data.targets).length){if("mousemove"===t.event.sourceEvent.type&&r.altDomain)return o.domain(r.altDomain),void r.scale(o).updateScaleExtent();n.isCategorized()&&o.orgDomain()[0]===n.orgXDomain[0]&&o.domain([n.orgXDomain[0]-1e-10,o.orgDomain()[1]]),n.redraw({withTransition:!1,withY:e.zoom_rescale,withSubchart:!1,withEventRect:!1,withDimension:!1}),"mousemove"===t.event.sourceEvent.type&&(n.cancelClick=!0),e.zoom_onzoom.call(n.api,o.orgDomain())}},S})},function(n,t){function e(n,t){for(n=String(n),t=t||2;n.length0?"-":"+")+e(100*Math.floor(Math.abs(E)/60)+Math.abs(E)%60,4),S:["th","st","nd","rd"][g%10>3?0:(g%100-g%10!=10)*g%10],W:k,N:S};return t.replace(l,function(n){return n in C?C[n]:n.slice(1,n.length-1)})};n.exports=p},function(n,t,e){"use strict";function r(n,t){for(var e=o(n),r=0,i=0;i=32||13===t?t:0}n.exports=r},function(n,t,e){"use strict";n.exports="0.14.9"},function(n,t){var e;e=function(){return this}();try{e=e||Function("return this")()||(0,eval)("this")}catch(n){"object"==typeof window&&(e=window)}n.exports=e},function(n,t,e){"use strict";function r(n,t,e){var r=n(t,e);n.length<2&&e(r)}t.__esModule=!0;var o=e(52);!function(n){n&&n.__esModule}(o);t.default=r,n.exports=t.default},function(n,t,e){"use strict";function r(n){return n&&n.__esModule?n:{default:n}}function o(n,t){var e={};for(var r in n)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e}function i(n){for(var t in n)if(n.hasOwnProperty(t))return!0;return!1}function a(n){return function(){function t(n,t){var e=!(arguments.length<=2||void 0===arguments[2])&&arguments[2];return b.default(n,t,e,S.location,S.routes,S.params)}function e(n){var t=n.pathname,e=n.query,r=n.state;return k.createLocation(k.createPath(t,e),r,c.REPLACE)}function r(n,t){C&&C.location===n?a(C,t):x.default(_,n,function(e,r){e?t(e):r?a(s({},r,{location:n}),t):t()})}function a(n,t){var r=f.default(S,n),o=r.leaveRoutes,i=r.enterRoutes;h.runLeaveHooks(o),h.runEnterHooks(i,n,function(r,o){r?t(r):o?t(null,e(o)):v.default(n,function(e,r){e?t(e):t(null,null,S=s({},n,{components:r}))})})}function l(n){return n.__id__||(n.__id__=O++)}function u(n){return n.reduce(function(n,t){return n.push.apply(n,T[l(t)]),n},[])}function d(n,t){x.default(_,n,function(e,r){if(null==r)return void t();C=s({},r,{location:n});for(var o=u(f.default(S,C).leaveRoutes),i=void 0,a=0,l=o.length;null==i&&a=0||Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e}function i(n){return c.stringify(n).replace(/%20/g,"+")}function a(n){return function(){function t(n){if(null==n.query){var t=n.search;n.query=_(t.substring(1)),n[b]={search:t,searchBase:""}}return n}function e(n,t){var e,r=void 0;if(!t||""===(r=w(t)))return n;"string"==typeof n&&(n=f.default(n));var o=n[b],i=void 0;i=o&&n.search===o.search?o.searchBase:n.search||"";var a=i+(i?"&":"?")+r;return s({},n,(e={search:a},e[b]={search:a,searchBase:i},e))}function r(n){return k.listenBefore(function(e,r){p.default(n,t(e),r)})}function a(n){return k.listen(function(e){n(t(e))})}function l(n){k.push(e(n,n.query))}function c(n){k.replace(e(n,n.query))}function u(n,t){return k.createPath(e(n,t||n.query))}function d(n,t){return k.createHref(e(n,t||n.query))}function h(){return t(k.createLocation.apply(k,arguments))}function v(n,t,e){"string"==typeof t&&(t=f.default(t)),l(s({state:n},t,{query:e}))}function y(n,t,e){"string"==typeof t&&(t=f.default(t)),c(s({state:n},t,{query:e}))}var x=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],w=x.stringifyQuery,_=x.parseQueryString,E=o(x,["stringifyQuery","parseQueryString"]),k=n(E);return"function"!=typeof w&&(w=i),"function"!=typeof _&&(_=m),s({},k,{listenBefore:r,listen:a,push:l,replace:c,createPath:u,createHref:d,createLocation:h,pushState:g.default(v,"pushState is deprecated; use push instead"),replaceState:g.default(y,"replaceState is deprecated; use replace instead")})}}t.__esModule=!0;var s=Object.assign||function(n){for(var t=1;t0?r:e)(n)}},function(n,t,e){var r=e(152)("keys"),o=e(104);n.exports=function(n){return r[n]||(r[n]=o(n))}},function(n,t,e){var r=e(44),o=r["__core-js_shared__"]||(r["__core-js_shared__"]={});n.exports=function(n){return o[n]||(o[n]={})}},function(n,t){n.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(n,t){t.f=Object.getOwnPropertySymbols},function(n,t,e){var r=e(149);n.exports=function(n){return Object(r(n))}},function(n,t,e){"use strict";function r(n){return n&&n.__esModule?n:{default:n}}t.__esModule=!0;var o=e(541),i=r(o),a=e(552),s=r(a),l="function"==typeof s.default&&"symbol"==typeof i.default?function(n){return typeof n}:function(n){return n&&"function"==typeof s.default&&n.constructor===s.default&&n!==s.default.prototype?"symbol":typeof n};t.default="function"==typeof s.default&&"symbol"===l(i.default)?function(n){return void 0===n?"undefined":l(n)}:function(n){return n&&"function"==typeof s.default&&n.constructor===s.default&&n!==s.default.prototype?"symbol":void 0===n?"undefined":l(n)}},function(n,t){n.exports=!0},function(n,t,e){var r=e(67),o=e(545),i=e(153),a=e(151)("IE_PROTO"),s=function(){},l=function(){var n,t=e(320)("iframe"),r=i.length;for(t.style.display="none",e(546).appendChild(t),t.src="javascript:",n=t.contentWindow.document,n.open(),n.write("