@carbon/charts 0.29.7 → 0.29.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bundle.js CHANGED
@@ -12,4 +12,4 @@
12
12
 
13
13
  See the Apache Version 2.0 License for specific language governing permissions
14
14
  and limitations under the License.
15
- ***************************************************************************** */var e,n,r,i,o,a=function(t,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function s(t,e){function n(){this.constructor=t}a(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function u(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),i=0;for(e=0;e<n;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}!function(t){t.GRAPHICS_DOCUMENT="graphics-document",t.GRAPHICS_OBJECT="graphics-object",t.GRAPHICS_SYMBOL="graphics-symbol",t.GROUP="group"}(e||(e={})),function(t){t.SLICE_MOUSEOVER="pie-slice-mouseover",t.SLICE_MOUSEMOVE="pie-slice-mousemove",t.SLICE_CLICK="pie-slice-click",t.SLICE_MOUSEOUT="pie-slice-mouseout"}(n||(n={})),function(t){t.BAR_MOUSEOVER="bar-mouseover",t.BAR_MOUSEMOVE="bar-mousemove",t.BAR_CLICK="bar-click",t.BAR_MOUSEOUT="bar-mouseout"}(r||(r={})),function(t){t.SCATTER_MOUSEOVER="scatter-mouseover",t.SCATTER_MOUSEMOVE="scatter-mousemove",t.SCATTER_CLICK="scatter-click",t.SCATTER_MOUSEOUT="scatter-mouseout"}(i||(i={})),function(t){t.POINT_MOUSEOVER="scatter-mouseover",t.POINT_MOUSEMOVE="scatter-mousemove",t.POINT_CLICK="scatter-click",t.POINT_MOUSEOUT="scatter-mouseout"}(o||(o={}));var l,c,h,f,p,d,v,g,y,m,_,b,x=Object.freeze({__proto__:null,get Pie(){return n},get Bar(){return r},get Scatter(){return i},get Line(){return o}});!function(t){t.DEFAULT="default",t.G100="g100",t.G90="g90",t.G10="g10"}(l||(l={})),function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(c||(c={})),function(t){t.VERTICAL="vertical",t.HORIZONTAL="horizontal"}(h||(h={})),function(t){t.PRIMARY="primary",t.SECONDARY="secondary"}(f||(f={})),function(t){t.TIME="time",t.LINEAR="linear",t.LOG="log",t.LABELS="labels"}(p||(p={})),function(t){t.MOUSE="mouse",t.TOP="top",t.BOTTOM="bottom"}(d||(d={})),function(t){t.DATAPOINT="datapoint",t.GRIDLINE="gridline",t.TITLE="title"}(v||(v={})),function(t){t.RIGHT="right",t.LEFT="left",t.TOP="top",t.BOTTOM="bottom"}(g||(g={})),function(t){t.HORIZONTAL="horizontal",t.VERTICAL="vertical"}(y||(y={})),function(t){t.ROW="row",t.COLUMN="column",t.ROW_REVERSE="row-reverse",t.COLUMN_REVERSE="column-reverse"}(m||(m={})),function(t){t.FIXED="fixed",t.PREFERRED="preferred",t.STRETCH="stretch"}(_||(_={})),function(t){t.LEFT="left",t.RIGHT="right"}(b||(b={}));var w=Object.freeze({__proto__:null,get Roles(){return e},Events:x,get ChartTheme(){return l},get AxisPositions(){return c},get CartesianOrientations(){return h},get AxisTypes(){return f},get ScaleTypes(){return p},get TooltipPosition(){return d},get TooltipTypes(){return v},get LegendPositions(){return g},get LegendOrientations(){return y},get LayoutDirection(){return m},get LayoutGrowth(){return _},get CalloutDirections(){return b}}),T="object"==typeof global&&global&&global.Object===Object&&global,E="object"==typeof self&&self&&self.Object===Object&&self,O=T||E||Function("return this")(),S=O.Symbol,M=Object.prototype,A=M.hasOwnProperty,C=M.toString,L=S?S.toStringTag:void 0;var k=Object.prototype.toString;var P=S?S.toStringTag:void 0;function D(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":P&&P in Object(t)?function(t){var e=A.call(t,L),n=t[L];try{t[L]=void 0;var r=!0}catch(t){}var i=C.call(t);return r&&(e?t[L]=n:delete t[L]),i}(t):function(t){return k.call(t)}(t)}function R(t){return null!=t&&"object"==typeof t}var j=Array.isArray;function I(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var N=/^\s+|\s+$/g,F=/^[-+]0x[0-9a-f]+$/i,B=/^0b[01]+$/i,V=/^0o[0-7]+$/i,U=parseInt;function H(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||R(t)&&"[object Symbol]"==D(t)}(t))return NaN;if(I(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=I(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(N,"");var n=B.test(t);return n||V.test(t)?U(t.slice(2),n?2:8):F.test(t)?NaN:+t}function z(t){return t}function G(t){if(!I(t))return!1;var e=D(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var Y,q=O["__core-js_shared__"],W=(Y=/[^.]+$/.exec(q&&q.keys&&q.keys.IE_PROTO||""))?"Symbol(src)_1."+Y:"";var X=Function.prototype.toString;function $(t){if(null!=t){try{return X.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var Z=/^\[object .+?Constructor\]$/,J=Function.prototype,K=Object.prototype,Q=J.toString,tt=K.hasOwnProperty,et=RegExp("^"+Q.call(tt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function nt(t){return!(!I(t)||(e=t,W&&W in e))&&(G(t)?et:Z).test($(t));var e}function rt(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return nt(n)?n:void 0}var it=rt(O,"WeakMap"),ot=Object.create,at=function(){function t(){}return function(e){if(!I(e))return{};if(ot)return ot(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function st(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function ut(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var lt=Date.now;var ct=function(){try{var t=rt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),ht=function(t){var e=0,n=0;return function(){var r=lt(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(ct?function(t,e){return ct(t,"toString",{configurable:!0,enumerable:!1,value:(n=e,function(){return n}),writable:!0});var n}:z);function ft(t){return t!=t}function pt(t,e){return!!(null==t?0:t.length)&&function(t,e,n){return e==e?function(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):function(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}(t,ft,n)}(t,e,0)>-1}var dt=/^(?:0|[1-9]\d*)$/;function vt(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&dt.test(t))&&t>-1&&t%1==0&&t<e}function gt(t,e,n){"__proto__"==e&&ct?ct(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function yt(t,e){return t===e||t!=t&&e!=e}var mt=Object.prototype.hasOwnProperty;function _t(t,e,n){var r=t[e];mt.call(t,e)&&yt(r,n)&&(void 0!==n||e in t)||gt(t,e,n)}function bt(t,e,n,r){var i=!n;n||(n={});for(var o=-1,a=e.length;++o<a;){var s=e[o],u=r?r(n[s],t[s],s,n,t):void 0;void 0===u&&(u=t[s]),i?gt(n,s,u):_t(n,s,u)}return n}var xt=Math.max;function wt(t,e){return ht(function(t,e,n){return e=xt(void 0===e?t.length-1:e,0),function(){for(var r=arguments,i=-1,o=xt(r.length-e,0),a=Array(o);++i<o;)a[i]=r[e+i];i=-1;for(var s=Array(e+1);++i<e;)s[i]=r[i];return s[e]=n(a),st(t,this,s)}}(t,e,z),t+"")}function Tt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function Et(t){return null!=t&&Tt(t.length)&&!G(t)}var Ot=Object.prototype;function St(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Ot)}function Mt(t){return R(t)&&"[object Arguments]"==D(t)}var At=Object.prototype,Ct=At.hasOwnProperty,Lt=At.propertyIsEnumerable,kt=Mt(function(){return arguments}())?Mt:function(t){return R(t)&&Ct.call(t,"callee")&&!Lt.call(t,"callee")};var Pt="object"==typeof t&&t&&!t.nodeType&&t,Dt=Pt&&"object"==typeof module&&module&&!module.nodeType&&module,Rt=Dt&&Dt.exports===Pt?O.Buffer:void 0,jt=(Rt?Rt.isBuffer:void 0)||function(){return!1},It={};function Nt(t){return function(e){return t(e)}}It["[object Float32Array]"]=It["[object Float64Array]"]=It["[object Int8Array]"]=It["[object Int16Array]"]=It["[object Int32Array]"]=It["[object Uint8Array]"]=It["[object Uint8ClampedArray]"]=It["[object Uint16Array]"]=It["[object Uint32Array]"]=!0,It["[object Arguments]"]=It["[object Array]"]=It["[object ArrayBuffer]"]=It["[object Boolean]"]=It["[object DataView]"]=It["[object Date]"]=It["[object Error]"]=It["[object Function]"]=It["[object Map]"]=It["[object Number]"]=It["[object Object]"]=It["[object RegExp]"]=It["[object Set]"]=It["[object String]"]=It["[object WeakMap]"]=!1;var Ft="object"==typeof t&&t&&!t.nodeType&&t,Bt=Ft&&"object"==typeof module&&module&&!module.nodeType&&module,Vt=Bt&&Bt.exports===Ft&&T.process,Ut=function(){try{var t=Bt&&Bt.require&&Bt.require("util").types;return t||Vt&&Vt.binding&&Vt.binding("util")}catch(t){}}(),Ht=Ut&&Ut.isTypedArray,zt=Ht?Nt(Ht):function(t){return R(t)&&Tt(t.length)&&!!It[D(t)]},Gt=Object.prototype.hasOwnProperty;function Yt(t,e){var n=j(t),r=!n&&kt(t),i=!n&&!r&&jt(t),o=!n&&!r&&!i&&zt(t),a=n||r||i||o,s=a?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],u=s.length;for(var l in t)!e&&!Gt.call(t,l)||a&&("length"==l||i&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||vt(l,u))||s.push(l);return s}function qt(t,e){return function(n){return t(e(n))}}var Wt=qt(Object.keys,Object),Xt=Object.prototype.hasOwnProperty;function $t(t){return Et(t)?Yt(t):function(t){if(!St(t))return Wt(t);var e=[];for(var n in Object(t))Xt.call(t,n)&&"constructor"!=n&&e.push(n);return e}(t)}var Zt=Object.prototype.hasOwnProperty;function Jt(t){if(!I(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=St(t),n=[];for(var r in t)("constructor"!=r||!e&&Zt.call(t,r))&&n.push(r);return n}function Kt(t){return Et(t)?Yt(t,!0):Jt(t)}var Qt=rt(Object,"create");var te=Object.prototype.hasOwnProperty;var ee=Object.prototype.hasOwnProperty;function ne(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function re(t,e){for(var n=t.length;n--;)if(yt(t[n][0],e))return n;return-1}ne.prototype.clear=function(){this.__data__=Qt?Qt(null):{},this.size=0},ne.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},ne.prototype.get=function(t){var e=this.__data__;if(Qt){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return te.call(e,t)?e[t]:void 0},ne.prototype.has=function(t){var e=this.__data__;return Qt?void 0!==e[t]:ee.call(e,t)},ne.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Qt&&void 0===e?"__lodash_hash_undefined__":e,this};var ie=Array.prototype.splice;function oe(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}oe.prototype.clear=function(){this.__data__=[],this.size=0},oe.prototype.delete=function(t){var e=this.__data__,n=re(e,t);return!(n<0)&&(n==e.length-1?e.pop():ie.call(e,n,1),--this.size,!0)},oe.prototype.get=function(t){var e=this.__data__,n=re(e,t);return n<0?void 0:e[n][1]},oe.prototype.has=function(t){return re(this.__data__,t)>-1},oe.prototype.set=function(t,e){var n=this.__data__,r=re(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var ae=rt(O,"Map");function se(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function ue(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function le(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}ue.prototype.clear=function(){this.size=0,this.__data__={hash:new ne,map:new(ae||oe),string:new ne}},ue.prototype.delete=function(t){var e=se(this,t).delete(t);return this.size-=e?1:0,e},ue.prototype.get=function(t){return se(this,t).get(t)},ue.prototype.has=function(t){return se(this,t).has(t)},ue.prototype.set=function(t,e){var n=se(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};var ce=qt(Object.getPrototypeOf,Object),he=Function.prototype,fe=Object.prototype,pe=he.toString,de=fe.hasOwnProperty,ve=pe.call(Object);function ge(t){var e=this.__data__=new oe(t);this.size=e.size}ge.prototype.clear=function(){this.__data__=new oe,this.size=0},ge.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},ge.prototype.get=function(t){return this.__data__.get(t)},ge.prototype.has=function(t){return this.__data__.has(t)},ge.prototype.set=function(t,e){var n=this.__data__;if(n instanceof oe){var r=n.__data__;if(!ae||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new ue(r)}return n.set(t,e),this.size=n.size,this};var ye="object"==typeof t&&t&&!t.nodeType&&t,me=ye&&"object"==typeof module&&module&&!module.nodeType&&module,_e=me&&me.exports===ye?O.Buffer:void 0,be=_e?_e.allocUnsafe:void 0;function xe(t,e){if(e)return t.slice();var n=t.length,r=be?be(n):new t.constructor(n);return t.copy(r),r}function we(){return[]}var Te=Object.prototype.propertyIsEnumerable,Ee=Object.getOwnPropertySymbols,Oe=Ee?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}(Ee(t),(function(e){return Te.call(t,e)})))}:we;var Se=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)le(e,Oe(t)),t=ce(t);return e}:we;function Me(t,e,n){var r=e(t);return j(t)?r:le(r,n(t))}function Ae(t){return Me(t,$t,Oe)}function Ce(t){return Me(t,Kt,Se)}var Le=rt(O,"DataView"),ke=rt(O,"Promise"),Pe=rt(O,"Set"),De=$(Le),Re=$(ae),je=$(ke),Ie=$(Pe),Ne=$(it),Fe=D;(Le&&"[object DataView]"!=Fe(new Le(new ArrayBuffer(1)))||ae&&"[object Map]"!=Fe(new ae)||ke&&"[object Promise]"!=Fe(ke.resolve())||Pe&&"[object Set]"!=Fe(new Pe)||it&&"[object WeakMap]"!=Fe(new it))&&(Fe=function(t){var e=D(t),n="[object Object]"==e?t.constructor:void 0,r=n?$(n):"";if(r)switch(r){case De:return"[object DataView]";case Re:return"[object Map]";case je:return"[object Promise]";case Ie:return"[object Set]";case Ne:return"[object WeakMap]"}return e});var Be=Fe,Ve=Object.prototype.hasOwnProperty;var Ue=O.Uint8Array;function He(t){var e=new t.constructor(t.byteLength);return new Ue(e).set(new Ue(t)),e}var ze=/\w*$/;var Ge=S?S.prototype:void 0,Ye=Ge?Ge.valueOf:void 0;function qe(t,e){var n=e?He(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function We(t,e,n){var r,i,o,a=t.constructor;switch(e){case"[object ArrayBuffer]":return He(t);case"[object Boolean]":case"[object Date]":return new a(+t);case"[object DataView]":return function(t,e){var n=e?He(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return qe(t,n);case"[object Map]":return new a;case"[object Number]":case"[object String]":return new a(t);case"[object RegExp]":return(o=new(i=t).constructor(i.source,ze.exec(i))).lastIndex=i.lastIndex,o;case"[object Set]":return new a;case"[object Symbol]":return r=t,Ye?Object(Ye.call(r)):{}}}function Xe(t){return"function"!=typeof t.constructor||St(t)?{}:at(ce(t))}var $e=Ut&&Ut.isMap,Ze=$e?Nt($e):function(t){return R(t)&&"[object Map]"==Be(t)};var Je=Ut&&Ut.isSet,Ke=Je?Nt(Je):function(t){return R(t)&&"[object Set]"==Be(t)},Qe={};function tn(t,e,n,r,i,o){var a,s=1&e,u=2&e,l=4&e;if(n&&(a=i?n(t,r,i,o):n(t)),void 0!==a)return a;if(!I(t))return t;var c=j(t);if(c){if(a=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&Ve.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!s)return ut(t,a)}else{var h=Be(t),f="[object Function]"==h||"[object GeneratorFunction]"==h;if(jt(t))return xe(t,s);if("[object Object]"==h||"[object Arguments]"==h||f&&!i){if(a=u||f?{}:Xe(t),!s)return u?function(t,e){return bt(t,Se(t),e)}(t,function(t,e){return t&&bt(e,Kt(e),t)}(a,t)):function(t,e){return bt(t,Oe(t),e)}(t,function(t,e){return t&&bt(e,$t(e),t)}(a,t))}else{if(!Qe[h])return i?t:{};a=We(t,h,s)}}o||(o=new ge);var p=o.get(t);if(p)return p;o.set(t,a),Ke(t)?t.forEach((function(r){a.add(tn(r,e,n,r,t,o))})):Ze(t)&&t.forEach((function(r,i){a.set(i,tn(r,e,n,i,t,o))}));var d=l?u?Ce:Ae:u?keysIn:$t,v=c?void 0:d(t);return function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););}(v||t,(function(r,i){v&&(r=t[i=r]),_t(a,i,tn(r,e,n,i,t,o))})),a}Qe["[object Arguments]"]=Qe["[object Array]"]=Qe["[object ArrayBuffer]"]=Qe["[object DataView]"]=Qe["[object Boolean]"]=Qe["[object Date]"]=Qe["[object Float32Array]"]=Qe["[object Float64Array]"]=Qe["[object Int8Array]"]=Qe["[object Int16Array]"]=Qe["[object Int32Array]"]=Qe["[object Map]"]=Qe["[object Number]"]=Qe["[object Object]"]=Qe["[object RegExp]"]=Qe["[object Set]"]=Qe["[object String]"]=Qe["[object Symbol]"]=Qe["[object Uint8Array]"]=Qe["[object Uint8ClampedArray]"]=Qe["[object Uint16Array]"]=Qe["[object Uint32Array]"]=!0,Qe["[object Error]"]=Qe["[object Function]"]=Qe["[object WeakMap]"]=!1;function en(t){return tn(t,5)}function nn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new ue;++e<n;)this.add(t[e])}function rn(t,e){return t.has(e)}function on(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}nn.prototype.add=nn.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},nn.prototype.has=function(t){return this.__data__.has(t)};var an,sn=function(t,e,n){for(var r=-1,i=Object(t),o=n(t),a=o.length;a--;){var s=o[an?a:++r];if(!1===e(i[s],s,i))break}return t},un=function(){return O.Date.now()},ln=Math.max,cn=Math.min;function hn(t,e,n){var r,i,o,a,s,u,l=0,c=!1,h=!1,f=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function p(e){var n=r,o=i;return r=i=void 0,l=e,a=t.apply(o,n)}function d(t){return l=t,s=setTimeout(g,e),c?p(t):a}function v(t){var n=t-u;return void 0===u||n>=e||n<0||h&&t-l>=o}function g(){var t=un();if(v(t))return y(t);s=setTimeout(g,function(t){var n=e-(t-u);return h?cn(n,o-(t-l)):n}(t))}function y(t){return s=void 0,f&&r?p(t):(r=i=void 0,a)}function m(){var t=un(),n=v(t);if(r=arguments,i=this,u=t,n){if(void 0===s)return d(u);if(h)return clearTimeout(s),s=setTimeout(g,e),p(u)}return void 0===s&&(s=setTimeout(g,e)),a}return e=H(e)||0,I(n)&&(c=!!n.leading,o=(h="maxWait"in n)?ln(H(n.maxWait)||0,e):o,f="trailing"in n?!!n.trailing:f),m.cancel=function(){void 0!==s&&clearTimeout(s),l=0,r=u=i=s=void 0},m.flush=function(){return void 0===s?a:y(un())},m}function fn(t,e,n){(void 0===n||yt(t[e],n))&&(void 0!==n||e in t)||gt(t,e,n)}function pn(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}function dn(t,e,n,r,i,o,a){var s=pn(t,n),u=pn(e,n),l=a.get(u);if(l)fn(t,n,l);else{var c,h=o?o(s,u,n+"",t,e,a):void 0,f=void 0===h;if(f){var p=j(u),d=!p&&jt(u),v=!p&&!d&&zt(u);h=u,p||d||v?j(s)?h=s:R(c=s)&&Et(c)?h=ut(s):d?(f=!1,h=xe(u,!0)):v?(f=!1,h=qe(u,!0)):h=[]:function(t){if(!R(t)||"[object Object]"!=D(t))return!1;var e=ce(t);if(null===e)return!0;var n=de.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&pe.call(n)==ve}(u)||kt(u)?(h=s,kt(s)?h=function(t){return bt(t,Kt(t))}(s):I(s)&&!G(s)||(h=Xe(u))):f=!1}f&&(a.set(u,h),i(h,u,r,o,a),a.delete(u)),fn(t,n,h)}}function vn(t,e,n,r,i){t!==e&&sn(e,(function(o,a){if(i||(i=new ge),I(o))dn(t,e,a,n,vn,r,i);else{var s=r?r(pn(t,a),o,a+"",t,e,i):void 0;void 0===s&&(s=o),fn(t,a,s)}}),Kt)}function gn(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}var yn,mn,_n=(yn=function(t,e,n){vn(t,e,n)},wt((function(t,e){var n=-1,r=e.length,i=r>1?e[r-1]:void 0,o=r>2?e[2]:void 0;for(i=yn.length>3&&"function"==typeof i?(r--,i):void 0,o&&function(t,e,n){if(!I(n))return!1;var r=typeof e;return!!("number"==r?Et(n)&&vt(e,n.length):"string"==r&&e in n)&&yt(n[e],t)}(e[0],e[1],o)&&(i=r<3?void 0:i,r=1),t=Object(t);++n<r;){var a=e[n];a&&yn(t,a,n,i)}return t}))),bn=Pe&&1/on(new Pe([,-0]))[1]==1/0?function(t){return new Pe(t)}:function(){};function xn(t){return t&&t.length?function(t,e,n){var r=-1,i=pt,o=t.length,a=!0,s=[],u=s;if(n)a=!1,i=gn;else if(o>=200){var l=e?null:bn(t);if(l)return on(l);a=!1,i=rn,u=new nn}else u=e?[]:s;t:for(;++r<o;){var c=t[r],h=e?e(c):c;if(c=n||0!==c?c:0,a&&h==h){for(var f=u.length;f--;)if(u[f]===h)continue t;e&&u.push(h),s.push(c)}else i(u,h,n)||(u!==s&&u.push(h),s.push(c))}return s}(t):[]}!function(t){t.debounce=hn,t.clone=en,t.merge=_n,t.removeArrayDuplicates=xn,t.getDimensions=function(t){return{width:parseFloat(t.style.width.replace("px","")||t.offsetWidth),height:parseFloat(t.style.height.replace("px","")||t.offsetHeight)}},t.getTranslationValues=function(t){var e=t.getAttribute("transform").match(/translate\([0-9]+\.?[0-9]*,[0-9]+\.?[0-9]*\)/);if(e[0]){var n=e[0].replace(/translate\(/,"").replace(/\)/,"").split(",");return{tx:n[0],ty:n[1]}}return null},t.getTranformOffsets=function(t){var e=/\(([^)]+)\)/.exec(t)[1].split(",");return{x:parseFloat(e[0]),y:parseFloat(e[1])}},t.capitalizeFirstLetter=function(t){return t[0].toUpperCase()+t.slice(1)},t.convertValueToPercentage=function(t,e){var n=t/e.reduce((function(t,e){return t+e.value}),0)*100;return n<1?n.toPrecision(1):Math.floor(n)},t.arrayDifferences=function(t,e){var n={missing:[],added:[]};return t.forEach((function(t){-1===e.indexOf(t)&&n.missing.push(t)})),e.forEach((function(e){-1===t.indexOf(e)&&n.added.push(e)})),n},t.getDuplicateValues=function(t){var e=[],n=[];return t.forEach((function(t){-1!==e.indexOf(t)&&-1===n.indexOf(t)&&n.push(t),e.push(t)})),n},t.moveToFront=function(t){return t.each((function(){this.parentNode.appendChild(this)}))},t.getProperty=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=t;if(r){for(var i=0,o=e;i<o.length;i++){var a=o[i];if(null===r[a]||void 0===r[a])return null;r=r[a]}return r}return null},t.flipSVGCoordinatesBasedOnOrientation=function(t,e){return e===h.HORIZONTAL?{y0:t.x0,y1:t.x1,x0:t.y0,x1:t.y1}:t},t.generateSVGPathString=function(e,n){var r=t.flipSVGCoordinatesBasedOnOrientation(e,n),i=r.x0,o=r.x1,a=r.y0,s=r.y1;return"M"+i+","+a+"L"+i+","+s+"L"+o+","+s+"L"+o+","+a+"L"+i+","+a}}(mn||(mn={}));var wn={position:g.BOTTOM,clickable:!0,enabled:!0,items:{status:{ACTIVE:1,DISABLED:0},horizontalSpace:12,verticalSpace:24,textYOffset:8},checkbox:{radius:6.5,spaceAfter:4}},Tn={x:{numberOfTicks:5},y:{numberOfTicks:5}},En={datapoint:{horizontalOffset:10,enabled:!0},title:{verticalOffset:.75,width:.4}},On=mn.merge({},En,{gridline:{enabled:!0,threshold:.25}}),Sn=mn.merge({},On,{datapoint:{verticalOffset:4},gridline:{enabled:!1}}),Mn={addSpaceOnEdges:1},An={width:"100%",height:"100%",resizable:!0,tooltip:En,legend:wn,style:{prefix:"cc"}},Cn=mn.merge({},An,{axes:{},timeScale:Mn,grid:Tn,tooltip:On}),Ln=mn.merge({},Cn,{bars:{maxWidth:16},timeScale:mn.merge(Mn,{addSpaceOnEdges:1}),tooltip:Sn}),kn=mn.merge({},Ln,{}),Pn=mn.merge({},Ln,{}),Dn=mn.merge({},Ln,{bars:mn.merge({},Ln.bars,{dividerSize:1.5})}),Rn=mn.merge({},Cn,{points:{radius:3,filled:!1}}),jn=mn.merge({},Cn,{points:{radius:4,fillOpacity:.3,filled:!0}}),In=mn.merge({},Cn,{bubble:{radiusRange:function(t,e){var n=Math.min(t.width,t.height);return[3*n/400,25*n/400]},fillOpacity:.2}}),Nn=mn.merge({},An,{pie:{radiusOffset:-15,innerRadius:2,padAngle:.007,hoverArc:{outerRadiusOffset:3},xOffset:30,yOffset:20,yOffsetCallout:10,callout:{minSliceDegree:5,offsetX:15,offsetY:12,horizontalLineLength:8,textMargin:2},labels:{formatter:null}}}),Fn={chart:An,axisChart:Cn,simpleBarChart:kn,groupedBarChart:Pn,stackedBarChart:Dn,bubbleChart:In,lineChart:Rn,scatterChart:jn,pieChart:Nn,donutChart:mn.merge({},Nn,{donut:{center:{numberFontSize:function(t){return Math.min(t/100*24,24)+"px"},titleFontSize:function(t){return Math.min(t/100*15,15)+"px"},titleYPosition:function(t){return Math.min(t/80*20,20)},numberFormatter:function(t){return Math.floor(t).toLocaleString()}}}})},Bn={opacity:{unselected:.3,selected:1}},Vn={default:{duration:300},pie_slice_mouseover:{duration:100},pie_chart_titles:{duration:375},graph_element_mouseover_fill_update:{duration:100},graph_element_mouseout_fill_update:{duration:100}},Un={ticks:{number:7,rotateIfSmallerThan:30}},Hn={default:{size:24}},zn=Object.freeze({__proto__:null,legend:wn,grid:Tn,baseTooltip:En,axisChartTooltip:On,barChartTooltip:Sn,options:Fn,lines:Bn,transitions:Vn,axis:Un,spacers:Hn}),Gn={10:"#fff0f1",20:"#fcd0d3",30:"#ffa4a9",40:"#ff767c",50:"#fb4b53",60:"#da1e28",70:"#a51920",80:"#750e13",90:"#570408",100:"#2c080a"},Yn={10:"#fff0f6",20:"#ffcfe1",30:"#ffa0c2",40:"#fa75a6",50:"#ee538b",60:"#d12765",70:"#a11950",80:"#760a3a",90:"#57002b",100:"#2a0a16"},qn={10:"#f7f1ff",20:"#e6d6ff",30:"#d0b0ff",40:"#bb8eff",50:"#a66efa",60:"#8a3ffc",70:"#6e32c9",80:"#4f2196",90:"#38146b",100:"#1e1033"},Wn={10:"#edf4ff",20:"#c9deff",30:"#97c1ff",40:"#6ea6ff",50:"#408bfc",60:"#0062ff",70:"#054ada",80:"#0530ad",90:"#061f80",100:"#051243"},Xn={10:"#e3f6ff",20:"#b3e6ff",30:"#6ccaff",40:"#30b0ff",50:"#1191e6",60:"#0072c3",70:"#0058a1",80:"#003d73",90:"#002b50",100:"#07192b"},$n={10:"#dbfbfb",20:"#92eeee",30:"#20d5d2",40:"#00bab6",50:"#009c98",60:"#007d79",70:"#006161",80:"#004548",90:"#003137",100:"#081a1c"},Zn={10:"#dafbe4",20:"#9deeb2",30:"#56d679",40:"#3dbb61",50:"#24a148",60:"#198038",70:"#10642a",80:"#054719",90:"#01330f",100:"#081b09"},Jn=function(t,e){return t[e]},Kn=function(t){return Jn(Wn,t)},Qn=function(t){return Jn(Xn,t)},tr=function(t){return Jn(Zn,t)},er=function(t){return Jn(Yn,t)},nr=function(t){return Jn(qn,t)},rr=function(t){return Jn(Gn,t)},ir=function(t){return Jn($n,t)},or=[nr(70),Qn(50),ir(70),er(70),rr(50),rr(90),tr(60),Kn(80),er(50),"#b28600",ir(50),Qn(90),"#8a3800",nr(50)],ar=[nr(60),Qn(40),ir(60),er(40),rr(50),rr(10),tr(30),Kn(50),er(60),"#d2a106",ir(40),Qn(20),"#ba4e00",nr(30)],sr=or,ur=ar,lr=ar,cr=or,hr=Object.freeze({__proto__:null,WHITE:or,DARK:ar,G10:sr,G90:ur,G100:lr,DEFAULT:cr});function fr(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function pr(t){var e;return 1===t.length&&(e=t,t=function(t,n){return fr(e(t),n)}),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var o=r+i>>>1;t(e[o],n)<0?r=o+1:i=o}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var o=r+i>>>1;t(e[o],n)>0?i=o:r=o+1}return r}}}var dr=pr(fr).right;function vr(t,e){var n,r,i,o=t.length,a=-1;if(null==e){for(;++a<o;)if(null!=(n=t[a])&&n>=n)for(r=i=n;++a<o;)null!=(n=t[a])&&(r>n&&(r=n),i<n&&(i=n))}else for(;++a<o;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=i=n;++a<o;)null!=(n=e(t[a],a,t))&&(r>n&&(r=n),i<n&&(i=n));return[r,i]}function gr(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),o=new Array(i);++r<i;)o[r]=t+r*n;return o}var yr=Math.sqrt(50),mr=Math.sqrt(10),_r=Math.sqrt(2);function br(t,e,n){var r,i,o,a,s=-1;if(n=+n,(t=+t)===(e=+e)&&n>0)return[t];if((r=e<t)&&(i=t,t=e,e=i),0===(a=xr(t,e,n))||!isFinite(a))return[];if(a>0)for(t=Math.ceil(t/a),e=Math.floor(e/a),o=new Array(i=Math.ceil(e-t+1));++s<i;)o[s]=(t+s)*a;else for(t=Math.floor(t*a),e=Math.ceil(e*a),o=new Array(i=Math.ceil(t-e+1));++s<i;)o[s]=(t-s)/a;return r&&o.reverse(),o}function xr(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=yr?10:o>=mr?5:o>=_r?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=yr?10:o>=mr?5:o>=_r?2:1)}function wr(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=yr?i*=10:o>=mr?i*=5:o>=_r&&(i*=2),e<t?-i:i}function Tr(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function Er(){}function Or(t,e){var n=new Er;if(t instanceof Er)t.each((function(t,e){n.set(e,t)}));else if(Array.isArray(t)){var r,i=-1,o=t.length;if(null==e)for(;++i<o;)n.set(i,t[i]);else for(;++i<o;)n.set(e(r=t[i],i,t),r)}else if(t)for(var a in t)n.set(a,t[a]);return n}function Sr(){}Er.prototype=Or.prototype={constructor:Er,has:function(t){return"$"+t in this},get:function(t){return this["$"+t]},set:function(t,e){return this["$"+t]=e,this},remove:function(t){var e="$"+t;return e in this&&delete this[e]},clear:function(){for(var t in this)"$"===t[0]&&delete this[t]},keys:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)"$"===e[0]&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)"$"===e[0]&&++t;return t},empty:function(){for(var t in this)if("$"===t[0])return!1;return!0},each:function(t){for(var e in this)"$"===e[0]&&t(this[e],e.slice(1),this)}};var Mr=Or.prototype;Sr.prototype=function(t,e){var n=new Sr;if(t instanceof Sr)t.each((function(t){n.add(t)}));else if(t){var r=-1,i=t.length;if(null==e)for(;++r<i;)n.add(t[r]);else for(;++r<i;)n.add(e(t[r],r,t))}return n}.prototype={constructor:Sr,has:Mr.has,add:function(t){return this["$"+(t+="")]=t,this},remove:Mr.remove,clear:Mr.clear,values:Mr.keys,size:Mr.size,empty:Mr.empty,each:Mr.each};var Ar=Array.prototype,Cr=Ar.map,Lr=Ar.slice,kr={name:"implicit"};function Pr(){var t=Or(),e=[],n=[],r=kr;function i(i){var o=i+"",a=t.get(o);if(!a){if(r!==kr)return r;t.set(o,a=e.push(i))}return n[(a-1)%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=Or();for(var r,o,a=-1,s=n.length;++a<s;)t.has(o=(r=n[a])+"")||t.set(o,e.push(r));return i},i.range=function(t){return arguments.length?(n=Lr.call(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return Pr(e,n).unknown(r)},Tr.apply(i,arguments),i}function Dr(){var t,e,n=Pr().unknown(void 0),r=n.domain,i=n.range,o=[0,1],a=!1,s=0,u=0,l=.5;function c(){var n=r().length,c=o[1]<o[0],h=o[c-0],f=o[1-c];t=(f-h)/Math.max(1,n-s+2*u),a&&(t=Math.floor(t)),h+=(f-h-t*(n-s))*l,e=t*(1-s),a&&(h=Math.round(h),e=Math.round(e));var p=gr(n).map((function(e){return h+t*e}));return i(c?p.reverse():p)}return delete n.unknown,n.domain=function(t){return arguments.length?(r(t),c()):r()},n.range=function(t){return arguments.length?(o=[+t[0],+t[1]],c()):o.slice()},n.rangeRound=function(t){return o=[+t[0],+t[1]],a=!0,c()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(a=!!t,c()):a},n.padding=function(t){return arguments.length?(s=Math.min(1,u=+t),c()):s},n.paddingInner=function(t){return arguments.length?(s=Math.min(1,t),c()):s},n.paddingOuter=function(t){return arguments.length?(u=+t,c()):u},n.align=function(t){return arguments.length?(l=Math.max(0,Math.min(1,t)),c()):l},n.copy=function(){return Dr(r(),o).round(a).paddingInner(s).paddingOuter(u).align(l)},Tr.apply(c(),arguments)}function Rr(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function jr(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Ir(){}var Nr="\\s*([+-]?\\d+)\\s*",Fr="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Br="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Vr=/^#([0-9a-f]{3,8})$/,Ur=new RegExp("^rgb\\("+[Nr,Nr,Nr]+"\\)$"),Hr=new RegExp("^rgb\\("+[Br,Br,Br]+"\\)$"),zr=new RegExp("^rgba\\("+[Nr,Nr,Nr,Fr]+"\\)$"),Gr=new RegExp("^rgba\\("+[Br,Br,Br,Fr]+"\\)$"),Yr=new RegExp("^hsl\\("+[Fr,Br,Br]+"\\)$"),qr=new RegExp("^hsla\\("+[Fr,Br,Br,Fr]+"\\)$"),Wr={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Xr(){return this.rgb().formatHex()}function $r(){return this.rgb().formatRgb()}function Zr(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Vr.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Jr(e):3===n?new ei(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?new ei(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?new ei(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Ur.exec(t))?new ei(e[1],e[2],e[3],1):(e=Hr.exec(t))?new ei(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=zr.exec(t))?Kr(e[1],e[2],e[3],e[4]):(e=Gr.exec(t))?Kr(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Yr.exec(t))?oi(e[1],e[2]/100,e[3]/100,1):(e=qr.exec(t))?oi(e[1],e[2]/100,e[3]/100,e[4]):Wr.hasOwnProperty(t)?Jr(Wr[t]):"transparent"===t?new ei(NaN,NaN,NaN,0):null}function Jr(t){return new ei(t>>16&255,t>>8&255,255&t,1)}function Kr(t,e,n,r){return r<=0&&(t=e=n=NaN),new ei(t,e,n,r)}function Qr(t){return t instanceof Ir||(t=Zr(t)),t?new ei((t=t.rgb()).r,t.g,t.b,t.opacity):new ei}function ti(t,e,n,r){return 1===arguments.length?Qr(t):new ei(t,e,n,null==r?1:r)}function ei(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function ni(){return"#"+ii(this.r)+ii(this.g)+ii(this.b)}function ri(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function ii(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function oi(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new si(t,e,n,r)}function ai(t){if(t instanceof si)return new si(t.h,t.s,t.l,t.opacity);if(t instanceof Ir||(t=Zr(t)),!t)return new si;if(t instanceof si)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(a=e===o?(n-r)/s+6*(n<r):n===o?(r-e)/s+2:(e-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new si(a,s,u,t.opacity)}function si(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function ui(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function li(t){return function(){return t}}function ci(t){return 1==(t=+t)?hi:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):li(isNaN(e)?n:e)}}function hi(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):li(isNaN(t)?e:t)}Rr(Ir,Zr,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Xr,formatHex:Xr,formatHsl:function(){return ai(this).formatHsl()},formatRgb:$r,toString:$r}),Rr(ei,ti,jr(Ir,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new ei(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new ei(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ni,formatHex:ni,formatRgb:ri,toString:ri})),Rr(si,(function(t,e,n,r){return 1===arguments.length?ai(t):new si(t,e,n,null==r?1:r)}),jr(Ir,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new si(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new si(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new ei(ui(t>=240?t-240:t+120,i,r),ui(t,i,r),ui(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var fi=function t(e){var n=ci(e);function r(t,e){var r=n((t=ti(t)).r,(e=ti(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=hi(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=o(e),t.opacity=a(e),t+""}}return r.gamma=t,r}(1);function pi(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(o){for(n=0;n<r;++n)i[n]=t[n]*(1-o)+e[n]*o;return i}}function di(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=xi(t[n],e[n]);for(;n<r;++n)a[n]=e[n];return function(t){for(n=0;n<i;++n)a[n]=o[n](t);return a}}function vi(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function gi(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function yi(t,e){var n,r={},i={};for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?r[n]=xi(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}var mi=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,_i=new RegExp(mi.source,"g");function bi(t,e){var n,r,i,o=mi.lastIndex=_i.lastIndex=0,a=-1,s=[],u=[];for(t+="",e+="";(n=mi.exec(t))&&(r=_i.exec(e));)(i=r.index)>o&&(i=e.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,u.push({i:a,x:gi(n,r)})),o=_i.lastIndex;return o<e.length&&(i=e.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?u[0]?function(t){return function(e){return t(e)+""}}(u[0].x):function(t){return function(){return t}}(e):(e=u.length,function(t){for(var n,r=0;r<e;++r)s[(n=u[r]).i]=n.x(t);return s.join("")})}function xi(t,e){var n,r=typeof e;return null==e||"boolean"===r?li(e):("number"===r?gi:"string"===r?(n=Zr(e))?(e=n,fi):bi:e instanceof Zr?fi:e instanceof Date?vi:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(e)?pi:Array.isArray(e)?di:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?yi:gi)(t,e)}function wi(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var Ti,Ei,Oi,Si,Mi=180/Math.PI,Ai={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Ci(t,e,n,r,i,o){var a,s,u;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,u/=s),t*r<e*n&&(t=-t,e=-e,u=-u,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*Mi,skewX:Math.atan(u)*Mi,scaleX:a,scaleY:s}}function Li(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(o,a){var s=[],u=[];return o=t(o),a=t(a),function(t,r,i,o,a,s){if(t!==i||r!==o){var u=a.push("translate(",null,e,null,n);s.push({i:u-4,x:gi(t,i)},{i:u-2,x:gi(r,o)})}else(i||o)&&a.push("translate("+i+e+o+n)}(o.translateX,o.translateY,a.translateX,a.translateY,s,u),function(t,e,n,o){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:gi(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(o.rotate,a.rotate,s,u),function(t,e,n,o){t!==e?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:gi(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(o.skewX,a.skewX,s,u),function(t,e,n,r,o,a){if(t!==n||e!==r){var s=o.push(i(o)+"scale(",null,",",null,")");a.push({i:s-4,x:gi(t,n)},{i:s-2,x:gi(e,r)})}else 1===n&&1===r||o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,s,u),o=a=null,function(t){for(var e,n=-1,r=u.length;++n<r;)s[(e=u[n]).i]=e.x(t);return s.join("")}}}var ki=Li((function(t){return"none"===t?Ai:(Ti||(Ti=document.createElement("DIV"),Ei=document.documentElement,Oi=document.defaultView),Ti.style.transform=t,t=Oi.getComputedStyle(Ei.appendChild(Ti),null).getPropertyValue("transform"),Ei.removeChild(Ti),Ci(+(t=t.slice(7,-1).split(","))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),Pi=Li((function(t){return null==t?Ai:(Si||(Si=document.createElementNS("http://www.w3.org/2000/svg","g")),Si.setAttribute("transform",t),(t=Si.transform.baseVal.consolidate())?Ci((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Ai)}),", ",")",")");function Di(t){return+t}var Ri=[0,1];function ji(t){return t}function Ii(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:function(t){return function(){return t}}(isNaN(e)?NaN:.5)}function Ni(t){var e,n=t[0],r=t[t.length-1];return n>r&&(e=n,n=r,r=e),function(t){return Math.max(n,Math.min(r,t))}}function Fi(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=Ii(i,r),o=n(a,o)):(r=Ii(r,i),o=n(o,a)),function(t){return o(r(t))}}function Bi(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<r;)i[a]=Ii(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(e){var n=dr(t,e,1,r)-1;return o[n](i[n](e))}}function Vi(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Ui(){var t,e,n,r,i,o,a=Ri,s=Ri,u=xi,l=ji;function c(){return r=Math.min(a.length,s.length)>2?Bi:Fi,i=o=null,h}function h(e){return isNaN(e=+e)?n:(i||(i=r(a.map(t),s,u)))(t(l(e)))}return h.invert=function(n){return l(e((o||(o=r(s,a.map(t),gi)))(n)))},h.domain=function(t){return arguments.length?(a=Cr.call(t,Di),l===ji||(l=Ni(a)),c()):a.slice()},h.range=function(t){return arguments.length?(s=Lr.call(t),c()):s.slice()},h.rangeRound=function(t){return s=Lr.call(t),u=wi,c()},h.clamp=function(t){return arguments.length?(l=t?Ni(a):ji,h):l!==ji},h.interpolate=function(t){return arguments.length?(u=t,c()):u},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,r){return t=n,e=r,c()}}function Hi(t,e){return Ui()(t,e)}function zi(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Gi(t){return(t=zi(Math.abs(t)))?t[1]:NaN}var Yi,qi=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Wi(t){if(!(e=qi.exec(t)))throw new Error("invalid format: "+t);var e;return new Xi({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function Xi(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function $i(t,e){var n=zi(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}Wi.prototype=Xi.prototype,Xi.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Zi={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return $i(100*t,e)},r:$i,s:function(t,e){var n=zi(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(Yi=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+zi(t,Math.max(0,e+o-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function Ji(t){return t}var Ki,Qi,to,eo=Array.prototype.map,no=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function ro(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?Ji:(e=eo.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,o=[],a=0,s=e[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),o.push(t.substring(i-=s,i+s)),!((u+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",a=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?Ji:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(eo.call(t.numerals,String)),u=void 0===t.percent?"%":t.percent+"",l=void 0===t.minus?"-":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=Wi(t)).fill,n=t.align,h=t.sign,f=t.symbol,p=t.zero,d=t.width,v=t.comma,g=t.precision,y=t.trim,m=t.type;"n"===m?(v=!0,m="g"):Zi[m]||(void 0===g&&(g=12),y=!0,m="g"),(p||"0"===e&&"="===n)&&(p=!0,e="0",n="=");var _="$"===f?i:"#"===f&&/[boxX]/.test(m)?"0"+m.toLowerCase():"",b="$"===f?o:/[%p]/.test(m)?u:"",x=Zi[m],w=/[defgprs%]/.test(m);function T(t){var i,o,u,f=_,T=b;if("c"===m)T=x(t)+T,t="";else{var E=(t=+t)<0;if(t=isNaN(t)?c:x(Math.abs(t),g),y&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),E&&0==+t&&(E=!1),f=(E?"("===h?h:l:"-"===h||"("===h?"":h)+f,T=("s"===m?no[8+Yi/3]:"")+T+(E&&"("===h?")":""),w)for(i=-1,o=t.length;++i<o;)if(48>(u=t.charCodeAt(i))||u>57){T=(46===u?a+t.slice(i+1):t.slice(i))+T,t=t.slice(0,i);break}}v&&!p&&(t=r(t,1/0));var O=f.length+t.length+T.length,S=O<d?new Array(d-O+1).join(e):"";switch(v&&p&&(t=r(S+t,S.length?d-T.length:1/0),S=""),n){case"<":t=f+t+T+S;break;case"=":t=f+S+t+T;break;case"^":t=S.slice(0,O=S.length>>1)+f+t+T+S.slice(O);break;default:t=S+f+t+T}return s(t)}return g=void 0===g?6:/[gprs]/.test(m)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),T.toString=function(){return t+""},T}return{format:h,formatPrefix:function(t,e){var n=h(((t=Wi(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Gi(e)/3))),i=Math.pow(10,-r),o=no[8+r/3];return function(t){return n(i*t)+o}}}}function io(t,e,n,r){var i,o=wr(t,e,n);switch((r=Wi(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Gi(e)/3)))-Gi(Math.abs(t)))}(o,a))||(r.precision=i),to(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Gi(e)-Gi(t))+1}(o,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(t){return Math.max(0,-Gi(Math.abs(t)))}(o))||(r.precision=i-2*("%"===r.type))}return Qi(r)}function oo(t){var e=t.domain;return t.ticks=function(t){var n=e();return br(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return io(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i=e(),o=0,a=i.length-1,s=i[o],u=i[a];return u<s&&(r=s,s=u,u=r,r=o,o=a,a=r),(r=xr(s,u,n))>0?r=xr(s=Math.floor(s/r)*r,u=Math.ceil(u/r)*r,n):r<0&&(r=xr(s=Math.ceil(s*r)/r,u=Math.floor(u*r)/r,n)),r>0?(i[o]=Math.floor(s/r)*r,i[a]=Math.ceil(u/r)*r,e(i)):r<0&&(i[o]=Math.ceil(s*r)/r,i[a]=Math.floor(u*r)/r,e(i)),t},t}function ao(){var t=Hi(ji,ji);return t.copy=function(){return Vi(t,ao())},Tr.apply(t,arguments),oo(t)}function so(t,e){var n,r=0,i=(t=t.slice()).length-1,o=t[r],a=t[i];return a<o&&(n=r,r=i,i=n,n=o,o=a,a=n),t[r]=e.floor(o),t[i]=e.ceil(a),t}function uo(t){return Math.log(t)}function lo(t){return Math.exp(t)}function co(t){return-Math.log(-t)}function ho(t){return-Math.exp(-t)}function fo(t){return isFinite(t)?+("1e"+t):t<0?0:t}function po(t){return function(e){return-t(-e)}}function vo(t){var e,n,r=t(uo,lo),i=r.domain,o=10;function a(){return e=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),function(e){return Math.log(e)/t})}(o),n=function(t){return 10===t?fo:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}(o),i()[0]<0?(e=po(e),n=po(n),t(co,ho)):t(uo,lo),r}return r.base=function(t){return arguments.length?(o=+t,a()):o},r.domain=function(t){return arguments.length?(i(t),a()):i()},r.ticks=function(t){var r,a=i(),s=a[0],u=a[a.length-1];(r=u<s)&&(f=s,s=u,u=f);var l,c,h,f=e(s),p=e(u),d=null==t?10:+t,v=[];if(!(o%1)&&p-f<d){if(f=Math.round(f)-1,p=Math.round(p)+1,s>0){for(;f<p;++f)for(c=1,l=n(f);c<o;++c)if(!((h=l*c)<s)){if(h>u)break;v.push(h)}}else for(;f<p;++f)for(c=o-1,l=n(f);c>=1;--c)if(!((h=l*c)<s)){if(h>u)break;v.push(h)}}else v=br(f,p,Math.min(p-f,d)).map(n);return r?v.reverse():v},r.tickFormat=function(t,i){if(null==i&&(i=10===o?".0e":","),"function"!=typeof i&&(i=Qi(i)),t===1/0)return i;null==t&&(t=10);var a=Math.max(1,o*t/r.ticks().length);return function(t){var r=t/n(Math.round(e(t)));return r*o<o-.5&&(r*=o),r<=a?i(t):""}},r.nice=function(){return i(so(i(),{floor:function(t){return n(Math.floor(e(t)))},ceil:function(t){return n(Math.ceil(e(t)))}}))},r}Ki=ro({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),Qi=Ki.format,to=Ki.formatPrefix;var go=new Date,yo=new Date;function mo(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=function(e){return t(e=new Date(+e)),e},i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e<n-t?e:n},i.offset=function(t,n){return e(t=new Date(+t),null==n?1:Math.floor(n)),t},i.range=function(n,r,o){var a,s=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return s;do{s.push(a=new Date(+n)),e(n,o),t(n)}while(a<n&&n<r);return s},i.filter=function(n){return mo((function(e){if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}))},n&&(i.count=function(e,r){return go.setTime(+e),yo.setTime(+r),t(go),t(yo),Math.floor(n(go,yo))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t==0}:function(e){return i.count(0,e)%t==0}):i:null}),i}var _o=mo((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));_o.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?mo((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):_o:null};var bo=mo((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+1e3*e)}),(function(t,e){return(e-t)/1e3}),(function(t){return t.getUTCSeconds()})),xo=mo((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())}),(function(t,e){t.setTime(+t+6e4*e)}),(function(t,e){return(e-t)/6e4}),(function(t){return t.getMinutes()})),wo=mo((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-6e4*t.getMinutes())}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getHours()})),To=mo((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5}),(function(t){return t.getDate()-1}));function Eo(t){return mo((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/6048e5}))}var Oo=Eo(0),So=Eo(1),Mo=(Eo(2),Eo(3),Eo(4)),Ao=(Eo(5),Eo(6),mo((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()}))),Co=mo((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));Co.every=function(t){return isFinite(t=Math.floor(t))&&t>0?mo((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null};var Lo=mo((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/864e5}),(function(t){return t.getUTCDate()-1}));function ko(t){return mo((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/6048e5}))}var Po=ko(0),Do=ko(1),Ro=(ko(2),ko(3),ko(4)),jo=(ko(5),ko(6),mo((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()})));function Io(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function No(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Fo(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}jo.every=function(t){return isFinite(t=Math.floor(t))&&t>0?mo((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null};var Bo,Vo,Uo={"-":"",_:" ",0:"0"},Ho=/^\s*\d+/,zo=/^%/,Go=/[\\^$*+?|[\]().{}]/g;function Yo(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(e)+i:i)}function qo(t){return t.replace(Go,"\\$&")}function Wo(t){return new RegExp("^(?:"+t.map(qo).join("|")+")","i")}function Xo(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function $o(t,e,n){var r=Ho.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Zo(t,e,n){var r=Ho.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Jo(t,e,n){var r=Ho.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Ko(t,e,n){var r=Ho.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Qo(t,e,n){var r=Ho.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function ta(t,e,n){var r=Ho.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function ea(t,e,n){var r=Ho.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function na(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function ra(t,e,n){var r=Ho.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function ia(t,e,n){var r=Ho.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function oa(t,e,n){var r=Ho.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function aa(t,e,n){var r=Ho.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function sa(t,e,n){var r=Ho.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function ua(t,e,n){var r=Ho.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function la(t,e,n){var r=Ho.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function ca(t,e,n){var r=Ho.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function ha(t,e,n){var r=Ho.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function fa(t,e,n){var r=zo.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function pa(t,e,n){var r=Ho.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function da(t,e,n){var r=Ho.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function va(t,e){return Yo(t.getDate(),e,2)}function ga(t,e){return Yo(t.getHours(),e,2)}function ya(t,e){return Yo(t.getHours()%12||12,e,2)}function ma(t,e){return Yo(1+To.count(Co(t),t),e,3)}function _a(t,e){return Yo(t.getMilliseconds(),e,3)}function ba(t,e){return _a(t,e)+"000"}function xa(t,e){return Yo(t.getMonth()+1,e,2)}function wa(t,e){return Yo(t.getMinutes(),e,2)}function Ta(t,e){return Yo(t.getSeconds(),e,2)}function Ea(t){var e=t.getDay();return 0===e?7:e}function Oa(t,e){return Yo(Oo.count(Co(t)-1,t),e,2)}function Sa(t,e){var n=t.getDay();return t=n>=4||0===n?Mo(t):Mo.ceil(t),Yo(Mo.count(Co(t),t)+(4===Co(t).getDay()),e,2)}function Ma(t){return t.getDay()}function Aa(t,e){return Yo(So.count(Co(t)-1,t),e,2)}function Ca(t,e){return Yo(t.getFullYear()%100,e,2)}function La(t,e){return Yo(t.getFullYear()%1e4,e,4)}function ka(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Yo(e/60|0,"0",2)+Yo(e%60,"0",2)}function Pa(t,e){return Yo(t.getUTCDate(),e,2)}function Da(t,e){return Yo(t.getUTCHours(),e,2)}function Ra(t,e){return Yo(t.getUTCHours()%12||12,e,2)}function ja(t,e){return Yo(1+Lo.count(jo(t),t),e,3)}function Ia(t,e){return Yo(t.getUTCMilliseconds(),e,3)}function Na(t,e){return Ia(t,e)+"000"}function Fa(t,e){return Yo(t.getUTCMonth()+1,e,2)}function Ba(t,e){return Yo(t.getUTCMinutes(),e,2)}function Va(t,e){return Yo(t.getUTCSeconds(),e,2)}function Ua(t){var e=t.getUTCDay();return 0===e?7:e}function Ha(t,e){return Yo(Po.count(jo(t)-1,t),e,2)}function za(t,e){var n=t.getUTCDay();return t=n>=4||0===n?Ro(t):Ro.ceil(t),Yo(Ro.count(jo(t),t)+(4===jo(t).getUTCDay()),e,2)}function Ga(t){return t.getUTCDay()}function Ya(t,e){return Yo(Do.count(jo(t)-1,t),e,2)}function qa(t,e){return Yo(t.getUTCFullYear()%100,e,2)}function Wa(t,e){return Yo(t.getUTCFullYear()%1e4,e,4)}function Xa(){return"+0000"}function $a(){return"%"}function Za(t){return+t}function Ja(t){return Math.floor(+t/1e3)}function Ka(t){return Bo=function(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,o=t.days,a=t.shortDays,s=t.months,u=t.shortMonths,l=Wo(i),c=Xo(i),h=Wo(o),f=Xo(o),p=Wo(a),d=Xo(a),v=Wo(s),g=Xo(s),y=Wo(u),m=Xo(u),_={a:function(t){return a[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return u[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:va,e:va,f:ba,H:ga,I:ya,j:ma,L:_a,m:xa,M:wa,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Za,s:Ja,S:Ta,u:Ea,U:Oa,V:Sa,w:Ma,W:Aa,x:null,X:null,y:Ca,Y:La,Z:ka,"%":$a},b={a:function(t){return a[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return u[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:Pa,e:Pa,f:Na,H:Da,I:Ra,j:ja,L:Ia,m:Fa,M:Ba,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Za,s:Ja,S:Va,u:Ua,U:Ha,V:za,w:Ga,W:Ya,x:null,X:null,y:qa,Y:Wa,Z:Xa,"%":$a},x={a:function(t,e,n){var r=p.exec(e.slice(n));return r?(t.w=d[r[0].toLowerCase()],n+r[0].length):-1},A:function(t,e,n){var r=h.exec(e.slice(n));return r?(t.w=f[r[0].toLowerCase()],n+r[0].length):-1},b:function(t,e,n){var r=y.exec(e.slice(n));return r?(t.m=m[r[0].toLowerCase()],n+r[0].length):-1},B:function(t,e,n){var r=v.exec(e.slice(n));return r?(t.m=g[r[0].toLowerCase()],n+r[0].length):-1},c:function(t,n,r){return E(t,e,n,r)},d:oa,e:oa,f:ha,H:sa,I:sa,j:aa,L:ca,m:ia,M:ua,p:function(t,e,n){var r=l.exec(e.slice(n));return r?(t.p=c[r[0].toLowerCase()],n+r[0].length):-1},q:ra,Q:pa,s:da,S:la,u:Zo,U:Jo,V:Ko,w:$o,W:Qo,x:function(t,e,r){return E(t,n,e,r)},X:function(t,e,n){return E(t,r,e,n)},y:ea,Y:ta,Z:na,"%":fa};function w(t,e){return function(n){var r,i,o,a=[],s=-1,u=0,l=t.length;for(n instanceof Date||(n=new Date(+n));++s<l;)37===t.charCodeAt(s)&&(a.push(t.slice(u,s)),null!=(i=Uo[r=t.charAt(++s)])?r=t.charAt(++s):i="e"===r?" ":"0",(o=e[r])&&(r=o(n,i)),a.push(r),u=s+1);return a.push(t.slice(u,s)),a.join("")}}function T(t,e){return function(n){var r,i,o=Fo(1900,void 0,1);if(E(o,t,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(!e||"Z"in o||(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=No(Fo(o.y,0,1))).getUTCDay(),r=i>4||0===i?Do.ceil(r):Do(r),r=Lo.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=Io(Fo(o.y,0,1))).getDay(),r=i>4||0===i?So.ceil(r):So(r),r=To.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?No(Fo(o.y,0,1)).getUTCDay():Io(Fo(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,No(o)):Io(o)}}function E(t,e,n,r){for(var i,o,a=0,s=e.length,u=n.length;a<s;){if(r>=u)return-1;if(37===(i=e.charCodeAt(a++))){if(i=e.charAt(a++),!(o=x[i in Uo?e.charAt(a++):i])||(r=o(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return(_.x=w(n,_),_.X=w(r,_),_.c=w(e,_),b.x=w(n,b),b.X=w(r,b),b.c=w(e,b),{format:function(t){var e=w(t+="",_);return e.toString=function(){return t},e},parse:function(t){var e=T(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=w(t+="",b);return e.toString=function(){return t},e},utcParse:function(t){var e=T(t+="",!0);return e.toString=function(){return t},e}})}(t),Vo=Bo.format,Bo.parse,Bo.utcFormat,Bo.utcParse,Bo}Ka({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Qa(t){return new Date(t)}function ts(t){return t instanceof Date?+t:+new Date(+t)}function es(t,e,n,r,i,o,a,s,u){var l=Hi(ji,ji),c=l.invert,h=l.domain,f=u(".%L"),p=u(":%S"),d=u("%I:%M"),v=u("%I %p"),g=u("%a %d"),y=u("%b %d"),m=u("%B"),_=u("%Y"),b=[[a,1,1e3],[a,5,5e3],[a,15,15e3],[a,30,3e4],[o,1,6e4],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,36e5],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,864e5],[r,2,1728e5],[n,1,6048e5],[e,1,2592e6],[e,3,7776e6],[t,1,31536e6]];function x(s){return(a(s)<s?f:o(s)<s?p:i(s)<s?d:r(s)<s?v:e(s)<s?n(s)<s?g:y:t(s)<s?m:_)(s)}function w(e,n,r,i){if(null==e&&(e=10),"number"==typeof e){var o=Math.abs(r-n)/e,a=pr((function(t){return t[2]})).right(b,o);a===b.length?(i=wr(n/31536e6,r/31536e6,e),e=t):a?(i=(a=b[o/b[a-1][2]<b[a][2]/o?a-1:a])[1],e=a[0]):(i=Math.max(wr(n,r,e),1),e=s)}return null==i?e:e.every(i)}return l.invert=function(t){return new Date(c(t))},l.domain=function(t){return arguments.length?h(Cr.call(t,ts)):h().map(Qa)},l.ticks=function(t,e){var n,r=h(),i=r[0],o=r[r.length-1],a=o<i;return a&&(n=i,i=o,o=n),n=(n=w(t,i,o,e))?n.range(i,o+1):[],a?n.reverse():n},l.tickFormat=function(t,e){return null==e?x:u(e)},l.nice=function(t,e){var n=h();return(t=w(t,n[0],n[n.length-1],e))?h(so(n,t)):l},l.copy=function(){return Vi(l,es(t,e,n,r,i,o,a,s,u))},l}var ns=function(){function t(t){this.state={options:{}},this.patternScale={},this.colorScale={},this.services=t}return t.prototype.sanitize=function(t){return t.datasets.forEach((function(t){t.data=t.data.map((function(t){return t.date&&!t.date.getTime&&(t.date=new Date(t.date)),t}))})),t},t.prototype.getDisplayData=function(){var t=wn.items.status.ACTIVE,e=this.get("dataLabels");if(!this.get("data"))return null;var n=mn.clone(this.get("data"));return n.datasets=n.datasets.filter((function(n){return e[n.label]===t})),n},t.prototype.getData=function(){return this.get("data")},t.prototype.setData=function(t){var e=this.sanitize(mn.clone(t)),n=this.generateDataLabels(e);return this.set({data:e,dataLabels:n}),e},t.prototype.generateDataLabels=function(t){var e={};return t.datasets.forEach((function(t){e[t.label]=wn.items.status.ACTIVE})),e},t.prototype.getOptions=function(){return this.state.options},t.prototype.set=function(t,e){void 0===e&&(e=!1),this.state=Object.assign({},this.state,t),e||this.update()},t.prototype.get=function(t){return t?this.state[t]:this.state},t.prototype.setOptions=function(t){this.set({options:mn.merge(this.getOptions(),t)})},t.prototype.update=function(){this.getDisplayData()&&(this.updateAllDataLabels(),this.setColorScale(),this.services.events.dispatchEvent("model-update"))},t.prototype.setUpdateCallback=function(t){this.updateCallback=t},t.prototype.toggleDataLabel=function(t){var e=wn.items.status,n=e.ACTIVE,r=e.DISABLED,i=this.get("dataLabels"),o=Object.keys(i).some((function(t){return i[t]===r})),a=Object.keys(i).filter((function(t){return i[t]===n}));o?1===a.length&&a[0]===t?Object.keys(i).forEach((function(t){i[t]=n})):i[t]=i[t]===r?n:r:Object.keys(i).forEach((function(e){i[e]=e===t?n:r})),this.set({dataLabels:i})},t.prototype.setColorScale=function(){var t=this;if(this.getDisplayData().datasets[0].fillColors)this.getDisplayData().datasets.forEach((function(e){t.colorScale[e.label]=Pr().range(e.fillColors).domain(t.allDataLabels)}));else{var e=cr;this.getData().datasets.forEach((function(n,r){t.colorScale[n.label]=Pr().range([e[r]]).domain(t.allDataLabels)}))}},t.prototype.getIsFilled=function(t,e,n,r){var i=this.getOptions();return i.getIsFilled?i.getIsFilled(t,e,n,r):r},t.prototype.getFillColor=function(t,e,n){var r=this.getOptions(),i=this.getFillScale()[t](e);return r.getFillColor?r.getFillColor(t,e,n,i):i},t.prototype.getStrokeColor=function(t,e,n){var r=this.getOptions(),i=this.colorScale[t](e);return r.getStrokeColor?r.getStrokeColor(t,e,n,i):i},t.prototype.getFillScale=function(){return this.colorScale},t.prototype.updateAllDataLabels=function(){var t=this;this.allDataLabels?this.getDisplayData().labels.forEach((function(e){-1===t.allDataLabels.indexOf(e)&&t.allDataLabels.push(e)})):this.allDataLabels=this.getDisplayData().labels},t}(),rs=function(){function t(t,e){this.model=t,this.services=e,this.init()}return t.prototype.init=function(){},t.prototype.update=function(){},t.prototype.setModel=function(t){this.model=t},t.prototype.setServices=function(t){this.services=t},t}(),is="http://www.w3.org/1999/xhtml",os={svg:"http://www.w3.org/2000/svg",xhtml:is,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function as(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),os.hasOwnProperty(e)?{space:os[e],local:t}:t}function ss(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===is&&e.documentElement.namespaceURI===is?e.createElement(t):e.createElementNS(n,t)}}function us(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function ls(t){var e=as(t);return(e.local?us:ss)(e)}function cs(){}function hs(t){return null==t?cs:function(){return this.querySelector(t)}}function fs(){return[]}function ps(t){return null==t?fs:function(){return this.querySelectorAll(t)}}function ds(t){return function(){return this.matches(t)}}function vs(t){return new Array(t.length)}function gs(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}gs.prototype={constructor:gs,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function ys(t,e,n,r,i,o){for(var a,s=0,u=e.length,l=o.length;s<l;++s)(a=e[s])?(a.__data__=o[s],r[s]=a):n[s]=new gs(t,o[s]);for(;s<u;++s)(a=e[s])&&(i[s]=a)}function ms(t,e,n,r,i,o,a){var s,u,l,c={},h=e.length,f=o.length,p=new Array(h);for(s=0;s<h;++s)(u=e[s])&&(p[s]=l="$"+a.call(u,u.__data__,s,e),l in c?i[s]=u:c[l]=u);for(s=0;s<f;++s)(u=c[l="$"+a.call(t,o[s],s,o)])?(r[s]=u,u.__data__=o[s],c[l]=null):n[s]=new gs(t,o[s]);for(s=0;s<h;++s)(u=e[s])&&c[p[s]]===u&&(i[s]=u)}function _s(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function bs(t){return function(){this.removeAttribute(t)}}function xs(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ws(t,e){return function(){this.setAttribute(t,e)}}function Ts(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Es(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Os(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Ss(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Ms(t){return function(){this.style.removeProperty(t)}}function As(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Cs(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Ls(t,e){return t.style.getPropertyValue(e)||Ss(t).getComputedStyle(t,null).getPropertyValue(e)}function ks(t){return function(){delete this[t]}}function Ps(t,e){return function(){this[t]=e}}function Ds(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Rs(t){return t.trim().split(/^|\s+/)}function js(t){return t.classList||new Is(t)}function Is(t){this._node=t,this._names=Rs(t.getAttribute("class")||"")}function Ns(t,e){for(var n=js(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Fs(t,e){for(var n=js(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function Bs(t){return function(){Ns(this,t)}}function Vs(t){return function(){Fs(this,t)}}function Us(t,e){return function(){(e.apply(this,arguments)?Ns:Fs)(this,t)}}function Hs(){this.textContent=""}function zs(t){return function(){this.textContent=t}}function Gs(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function Ys(){this.innerHTML=""}function qs(t){return function(){this.innerHTML=t}}function Ws(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function Xs(){this.nextSibling&&this.parentNode.appendChild(this)}function $s(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Zs(){return null}function Js(){var t=this.parentNode;t&&t.removeChild(this)}function Ks(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Qs(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}Is.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var tu={},eu=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(tu={mouseenter:"mouseover",mouseleave:"mouseout"}));function nu(t,e,n){return t=ru(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function ru(t,e,n){return function(r){var i=eu;eu=r;try{t.call(this,this.__data__,e,n)}finally{eu=i}}}function iu(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function ou(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,o=e.length;r<o;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.capture);++i?e.length=i:delete this.__on}}}function au(t,e,n){var r=tu.hasOwnProperty(t.type)?nu:ru;return function(i,o,a){var s,u=this.__on,l=r(e,o,a);if(u)for(var c=0,h=u.length;c<h;++c)if((s=u[c]).type===t.type&&s.name===t.name)return this.removeEventListener(s.type,s.listener,s.capture),this.addEventListener(s.type,s.listener=l,s.capture=n),void(s.value=e);this.addEventListener(t.type,l,n),s={type:t.type,name:t.name,value:e,listener:l,capture:n},u?u.push(s):this.__on=[s]}}function su(t,e,n){var r=Ss(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function uu(t,e){return function(){return su(this,t,e)}}function lu(t,e){return function(){return su(this,t,e.apply(this,arguments))}}var cu=[null];function hu(t,e){this._groups=t,this._parents=e}function fu(){return new hu([[document.documentElement]],cu)}function pu(t){return"string"==typeof t?new hu([[document.querySelector(t)]],[document.documentElement]):new hu([[t]],cu)}function du(){for(var t,e=eu;t=e.sourceEvent;)e=t;return e}function vu(t){var e=du();return e.changedTouches&&(e=e.changedTouches[0]),function(t,e){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}(t,e)}hu.prototype=fu.prototype={constructor:hu,select:function(t){"function"!=typeof t&&(t=hs(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a,s=e[i],u=s.length,l=r[i]=new Array(u),c=0;c<u;++c)(o=s[c])&&(a=t.call(o,o.__data__,c,s))&&("__data__"in o&&(a.__data__=o.__data__),l[c]=a);return new hu(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=ps(t));for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a,s=e[o],u=s.length,l=0;l<u;++l)(a=s[l])&&(r.push(t.call(a,a.__data__,l,s)),i.push(a));return new hu(r,i)},filter:function(t){"function"!=typeof t&&(t=ds(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a=e[i],s=a.length,u=r[i]=[],l=0;l<s;++l)(o=a[l])&&t.call(o,o.__data__,l,a)&&u.push(o);return new hu(r,this._parents)},data:function(t,e){if(!t)return p=new Array(this.size()),l=-1,this.each((function(t){p[++l]=t})),p;var n=e?ms:ys,r=this._parents,i=this._groups;"function"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var o=i.length,a=new Array(o),s=new Array(o),u=new Array(o),l=0;l<o;++l){var c=r[l],h=i[l],f=h.length,p=t.call(c,c&&c.__data__,l,r),d=p.length,v=s[l]=new Array(d),g=a[l]=new Array(d);n(c,h,v,g,u[l]=new Array(f),p,e);for(var y,m,_=0,b=0;_<d;++_)if(y=v[_]){for(_>=b&&(b=_+1);!(m=g[b])&&++b<d;);y._next=m||null}}return(a=new hu(a,r))._enter=s,a._exit=u,a},enter:function(){return new hu(this._enter||this._groups.map(vs),this._parents)},exit:function(){return new hu(this._exit||this._groups.map(vs),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,o=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=e&&(i=e(i)),null==n?o.remove():n(o),r&&i?r.merge(i).order():i},merge:function(t){for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u,l=e[s],c=n[s],h=l.length,f=a[s]=new Array(h),p=0;p<h;++p)(u=l[p]||c[p])&&(f[p]=u);for(;s<r;++s)a[s]=e[s];return new hu(a,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=_s);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a,s=n[o],u=s.length,l=i[o]=new Array(u),c=0;c<u;++c)(a=s[c])&&(l[c]=a);l.sort(e)}return new hu(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),e=-1;return this.each((function(){t[++e]=this})),t},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null},size:function(){var t=0;return this.each((function(){++t})),t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,o=e[n],a=0,s=o.length;a<s;++a)(i=o[a])&&t.call(i,i.__data__,a,o);return this},attr:function(t,e){var n=as(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?xs:bs:"function"==typeof e?n.local?Os:Es:n.local?Ts:ws)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?Ms:"function"==typeof e?Cs:As)(t,e,null==n?"":n)):Ls(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?ks:"function"==typeof e?Ds:Ps)(t,e)):this.node()[t]},classed:function(t,e){var n=Rs(t+"");if(arguments.length<2){for(var r=js(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?Us:e?Bs:Vs)(n,e))},text:function(t){return arguments.length?this.each(null==t?Hs:("function"==typeof t?Gs:zs)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Ys:("function"==typeof t?Ws:qs)(t)):this.node().innerHTML},raise:function(){return this.each(Xs)},lower:function(){return this.each($s)},append:function(t){var e="function"==typeof t?t:ls(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:ls(t),r=null==e?Zs:"function"==typeof e?e:hs(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(Js)},clone:function(t){return this.select(t?Qs:Ks)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,o=iu(t+""),a=o.length;if(!(arguments.length<2)){for(s=e?au:ou,null==n&&(n=!1),r=0;r<a;++r)this.each(s(o[r],e,n));return this}var s=this.node().__on;if(s)for(var u,l=0,c=s.length;l<c;++l)for(r=0,u=s[l];r<a;++r)if((i=o[r]).type===u.type&&i.name===u.name)return u.value},dispatch:function(t,e){return this.each(("function"==typeof e?lu:uu)(t,e))}};var gu={prefix:"bx",selectorTabbable:"\n a[href], area[href], input:not([disabled]):not([tabindex='-1']),\n button:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']),\n textarea:not([disabled]):not([tabindex='-1']),\n iframe, object, embed, *[tabindex]:not([tabindex='-1']), *[contenteditable=true]\n "},yu=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var n=-1;return t.some((function(t,r){return t[0]===e&&(n=r,!0)})),n}return function(){function e(){this.__entries__=[]}var n={size:{configurable:!0}};return n.size.get=function(){return this.__entries__.length},e.prototype.get=function(e){var n=t(this.__entries__,e),r=this.__entries__[n];return r&&r[1]},e.prototype.set=function(e,n){var r=t(this.__entries__,e);~r?this.__entries__[r][1]=n:this.__entries__.push([e,n])},e.prototype.delete=function(e){var n=this.__entries__,r=t(n,e);~r&&n.splice(r,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var n=0,r=this.__entries__;n<r.length;n+=1){var i=r[n];t.call(e,i[1],i[0])}},Object.defineProperties(e.prototype,n),e}()}(),mu="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,_u="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),bu="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(_u):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)},xu=["top","right","bottom","left","width","height","size","weight"],wu="undefined"!=typeof MutationObserver,Tu=function(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var n=!1,r=!1,i=0;function o(){n&&(n=!1,t()),r&&s()}function a(){bu(o)}function s(){var t=Date.now();if(n){if(t-i<2)return;r=!0}else n=!0,r=!1,setTimeout(a,e);i=t}return s}(this.refresh.bind(this),20)};Tu.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},Tu.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},Tu.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},Tu.prototype.updateObservers_=function(){var t=this.observers_.filter((function(t){return t.gatherActive(),t.hasActive()}));return t.forEach((function(t){return t.broadcastActive()})),t.length>0},Tu.prototype.connect_=function(){mu&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),wu?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},Tu.prototype.disconnect_=function(){mu&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},Tu.prototype.onTransitionEnd_=function(t){var e=t.propertyName;void 0===e&&(e=""),xu.some((function(t){return!!~e.indexOf(t)}))&&this.refresh()},Tu.getInstance=function(){return this.instance_||(this.instance_=new Tu),this.instance_},Tu.instance_=null;var Eu=function(t,e){for(var n=0,r=Object.keys(e);n<r.length;n+=1){var i=r[n];Object.defineProperty(t,i,{value:e[i],enumerable:!1,writable:!1,configurable:!0})}return t},Ou=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||_u},Su=Pu(0,0,0,0);function Mu(t){return parseFloat(t)||0}function Au(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];return e.reduce((function(e,n){return e+Mu(t["border-"+n+"-width"])}),0)}function Cu(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return Su;var r=Ou(t).getComputedStyle(t),i=function(t){for(var e={},n=0,r=["top","right","bottom","left"];n<r.length;n+=1){var i=r[n],o=t["padding-"+i];e[i]=Mu(o)}return e}(r),o=i.left+i.right,a=i.top+i.bottom,s=Mu(r.width),u=Mu(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==e&&(s-=Au(r,"left","right")+o),Math.round(u+a)!==n&&(u-=Au(r,"top","bottom")+a)),!function(t){return t===Ou(t).document.documentElement}(t)){var l=Math.round(s+o)-e,c=Math.round(u+a)-n;1!==Math.abs(l)&&(s-=l),1!==Math.abs(c)&&(u-=c)}return Pu(i.left,i.top,s,u)}var Lu="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof Ou(t).SVGGraphicsElement}:function(t){return t instanceof Ou(t).SVGElement&&"function"==typeof t.getBBox};function ku(t){return mu?Lu(t)?function(t){var e=t.getBBox();return Pu(0,0,e.width,e.height)}(t):Cu(t):Su}function Pu(t,e,n,r){return{x:t,y:e,width:n,height:r}}var Du=function(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Pu(0,0,0,0),this.target=t};Du.prototype.isActive=function(){var t=ku(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},Du.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t};var Ru=function(t,e){var n=function(t){var e=t.x,n=t.y,r=t.width,i=t.height,o="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,a=Object.create(o.prototype);return Eu(a,{x:e,y:n,width:r,height:i,top:n,right:e+r,bottom:i+n,left:e}),a}(e);Eu(this,{target:t,contentRect:n})},ju=function(t,e,n){if(this.activeObservations_=[],this.observations_=new yu,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=n};ju.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof Ou(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new Du(t)),this.controller_.addObserver(this),this.controller_.refresh())}},ju.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof Ou(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},ju.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},ju.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},ju.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new Ru(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},ju.prototype.clearActive=function(){this.activeObservations_.splice(0)},ju.prototype.hasActive=function(){return this.activeObservations_.length>0};var Iu="undefined"!=typeof WeakMap?new WeakMap:new yu,Nu=function(t){if(!(this instanceof Nu))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var e=Tu.getInstance(),n=new ju(t,e,this);Iu.set(this,n)};["observe","unobserve","disconnect"].forEach((function(t){Nu.prototype[t]=function(){return(e=Iu.get(this))[t].apply(e,arguments);var e}}));var Fu=void 0!==_u.ResizeObserver?_u.ResizeObserver:Nu,Bu=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s(e,t),e.getSVGElementSize=function(t,e){t.attr||(t=pu(t));var n,r,i,o,a={width:t.attr("width"),height:t.attr("height")};try{r={width:(n=t.node().getBBox()).width,height:n.height}}catch(t){}try{o={width:(i=t.node().getBoundingClientRect()).width,height:i.height}}catch(t){}var s={width:t.node().clientWidth,height:t.node().clientHeight},u=function(t){return!!(t&&t.width&&t.height&&!isNaN(t.height)&&!isNaN(t.width)&&-1===(""+t.width+t.height).indexOf("%")&&t.width>0&&t.height>0)};if(e){if(e.useAttrs&&u(a))return a;if(e.useClientDimensions&&u(s))return s;if(e.useBBox&&u(r))return r;if(e.useBoundingRect&&u(o))return o}try{var l={width:mn.getProperty(t.node(),"width","baseVal","value"),height:mn.getProperty(t.node(),"height","baseVal","value")};if(u(l))return l}catch(t){if(u(s))return s;if(u(r))return r;if(u(a))return a}return{width:0,height:0}},e.appendOrSelect=function(t,e){var n=e.split("."),r=n[0],i=t.select(e);return i.empty()?t.append(r).attr("class",n.slice(1).join(" ")):i},e.prototype.init=function(){this.styleHolderElement(),this.addSVGElement(),this.model.getOptions().resizable&&this.addResizeListener()},e.prototype.update=function(){this.styleHolderElement()},e.prototype.styleHolderElement=function(){var t=this.getHolder();pu(this.getHolder()).classed(gu.prefix+"--chart-holder",!0);var e=this.model.getOptions(),n=e.width,r=e.height;n!==this.width&&(t.style.width=n,this.width=n),r!==this.height&&(t.style.height=r,this.height=r)},e.prototype.getHolder=function(){return this.model.get("holder")},e.prototype.addSVGElement=function(){var t=mn.getProperty(this.model.getOptions(),"style","prefix"),e=pu(this.getHolder()).append("svg").classed(gu.prefix+"--"+t+"--chart-svg",!0).attr("height","100%").attr("width","100%");this.svg=e.node()},e.prototype.getMainSVG=function(){return this.svg},e.prototype.addResizeListener=function(){var t=this,e=this.getHolder();if(e){var n=e.clientWidth,r=e.clientHeight,i=mn.debounce((function(i,o){e&&(Math.abs(n-e.clientWidth)>1||Math.abs(r-e.clientHeight)>1)&&(n=e.clientWidth,r=e.clientHeight,t.services.events.dispatchEvent("chart-resize"))}),12.5);new Fu(i).observe(e)}},e}(rs),Vu=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s(e,t),e.prototype.init=function(){this.documentFragment=document.createDocumentFragment()},e.prototype.addEventListener=function(t,e){this.documentFragment.addEventListener(t,e)},e.prototype.removeEventListener=function(t,e){this.documentFragment.removeEventListener(t,e)},e.prototype.dispatchEvent=function(t,e){var n;e?n=new CustomEvent(t,{detail:e}):(n=document.createEvent("Event")).initEvent(t,!1,!0),this.documentFragment.dispatchEvent(n)},e}(rs),Uu={value:function(){}};function Hu(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new zu(r)}function zu(t){this._=t}function Gu(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function Yu(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function qu(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Uu,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}zu.prototype=Hu.prototype={constructor:zu,on:function(t,e){var n,r=this._,i=Gu(t+"",r),o=-1,a=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<a;)if(n=(t=i[o]).type)r[n]=qu(r[n],t.name,e);else if(null==e)for(n in r)r[n]=qu(r[n],t.name,null);return this}for(;++o<a;)if((n=(t=i[o]).type)&&(n=Yu(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new zu(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,n=(r=this._[t]).length;o<n;++o)r[o].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};var Wu,Xu,$u=0,Zu=0,Ju=0,Ku=0,Qu=0,tl=0,el="object"==typeof performance&&performance.now?performance:Date,nl="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function rl(){return Qu||(nl(il),Qu=el.now()+tl)}function il(){Qu=0}function ol(){this._call=this._time=this._next=null}function al(t,e,n){var r=new ol;return r.restart(t,e,n),r}function sl(){Qu=(Ku=el.now())+tl,$u=Zu=0;try{!function(){rl(),++$u;for(var t,e=Wu;e;)(t=Qu-e._time)>=0&&e._call.call(null,t),e=e._next;--$u}()}finally{$u=0,function(){var t,e,n=Wu,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Wu=e);Xu=t,ll(r)}(),Qu=0}}function ul(){var t=el.now(),e=t-Ku;e>1e3&&(tl-=e,Ku=t)}function ll(t){$u||(Zu&&(Zu=clearTimeout(Zu)),t-Qu>24?(t<1/0&&(Zu=setTimeout(sl,t-el.now()-tl)),Ju&&(Ju=clearInterval(Ju))):(Ju||(Ku=el.now(),Ju=setInterval(ul,1e3)),$u=1,nl(sl)))}function cl(t,e,n){var r=new ol;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}ol.prototype=al.prototype={constructor:ol,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?rl():+n)+(null==e?0:+e),this._next||Xu===this||(Xu?Xu._next=this:Wu=this,Xu=this),this._call=t,this._time=n,ll()},stop:function(){this._call&&(this._call=null,this._time=1/0,ll())}};var hl=Hu("start","end","cancel","interrupt"),fl=[];function pl(t,e,n,r,i,o){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function o(u){var l,c,h,f;if(1!==n.state)return s();for(l in i)if((f=i[l]).name===n.name){if(3===f.state)return cl(o);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[l]):+l<e&&(f.state=6,f.timer.stop(),f.on.call("cancel",t,t.__data__,f.index,f.group),delete i[l])}if(cl((function(){3===n.state&&(n.state=4,n.timer.restart(a,n.delay,n.time),a(u))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(h=n.tween.length),l=0,c=-1;l<h;++l)(f=n.tween[l].value.call(t,t.__data__,n.index,n.group))&&(r[++c]=f);r.length=c+1}}function a(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(s),n.state=5,1),o=-1,a=r.length;++o<a;)r[o].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),s())}function s(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=al((function(t){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=t&&o(t-n.delay)}),0,n.time)}(t,n,{name:e,index:r,group:i,on:hl,tween:fl,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function dl(t,e){var n=gl(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function vl(t,e){var n=gl(t,e);if(n.state>3)throw new Error("too late; already running");return n}function gl(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function yl(t,e){var n,r;return function(){var i=vl(this,t),o=i.tween;if(o!==n)for(var a=0,s=(r=n=o).length;a<s;++a)if(r[a].name===e){(r=r.slice()).splice(a,1);break}i.tween=r}}function ml(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var o=vl(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},u=0,l=i.length;u<l;++u)if(i[u].name===e){i[u]=s;break}u===l&&i.push(s)}o.tween=i}}function _l(t,e,n){var r=t._id;return t.each((function(){var t=vl(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return gl(t,r).value[e]}}function bl(t,e){var n;return("number"==typeof e?gi:e instanceof Zr?fi:(n=Zr(e))?(e=n,fi):bi)(t,e)}function xl(t){return function(){this.removeAttribute(t)}}function wl(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Tl(t,e,n){var r,i,o=n+"";return function(){var a=this.getAttribute(t);return a===o?null:a===r?i:i=e(r=a,n)}}function El(t,e,n){var r,i,o=n+"";return function(){var a=this.getAttributeNS(t.space,t.local);return a===o?null:a===r?i:i=e(r=a,n)}}function Ol(t,e,n){var r,i,o;return function(){var a,s,u=n(this);if(null!=u)return(a=this.getAttribute(t))===(s=u+"")?null:a===r&&s===i?o:(i=s,o=e(r=a,u));this.removeAttribute(t)}}function Sl(t,e,n){var r,i,o;return function(){var a,s,u=n(this);if(null!=u)return(a=this.getAttributeNS(t.space,t.local))===(s=u+"")?null:a===r&&s===i?o:(i=s,o=e(r=a,u));this.removeAttributeNS(t.space,t.local)}}function Ml(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Al(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Cl(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&Al(t,i)),n}return i._value=e,i}function Ll(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&Ml(t,i)),n}return i._value=e,i}function kl(t,e){return function(){dl(this,t).delay=+e.apply(this,arguments)}}function Pl(t,e){return e=+e,function(){dl(this,t).delay=e}}function Dl(t,e){return function(){vl(this,t).duration=+e.apply(this,arguments)}}function Rl(t,e){return e=+e,function(){vl(this,t).duration=e}}function jl(t,e){if("function"!=typeof e)throw new Error;return function(){vl(this,t).ease=e}}function Il(t,e,n){var r,i,o=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?dl:vl;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}var Nl=fu.prototype.constructor;function Fl(t){return function(){this.style.removeProperty(t)}}function Bl(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function Vl(t,e,n){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&Bl(t,o,n)),r}return o._value=e,o}function Ul(t){return function(e){this.textContent=t.call(this,e)}}function Hl(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&Ul(r)),e}return r._value=t,r}var zl=0;function Gl(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Yl(t){return fu().transition(t)}function ql(){return++zl}var Wl=fu.prototype;Gl.prototype=Yl.prototype={constructor:Gl,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=hs(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s,u,l=r[a],c=l.length,h=o[a]=new Array(c),f=0;f<c;++f)(s=l[f])&&(u=t.call(s,s.__data__,f,l))&&("__data__"in s&&(u.__data__=s.__data__),h[f]=u,pl(h[f],e,n,f,h,gl(s,n)));return new Gl(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=ps(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var u,l=r[s],c=l.length,h=0;h<c;++h)if(u=l[h]){for(var f,p=t.call(u,u.__data__,h,l),d=gl(u,n),v=0,g=p.length;v<g;++v)(f=p[v])&&pl(f,e,n,v,p,d);o.push(p),a.push(u)}return new Gl(o,a,e,n)},filter:function(t){"function"!=typeof t&&(t=ds(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a=e[i],s=a.length,u=r[i]=[],l=0;l<s;++l)(o=a[l])&&t.call(o,o.__data__,l,a)&&u.push(o);return new Gl(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u,l=e[s],c=n[s],h=l.length,f=a[s]=new Array(h),p=0;p<h;++p)(u=l[p]||c[p])&&(f[p]=u);for(;s<r;++s)a[s]=e[s];return new Gl(a,this._parents,this._name,this._id)},selection:function(){return new Nl(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=ql(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],u=s.length,l=0;l<u;++l)if(a=s[l]){var c=gl(a,e);pl(a,t,n,l,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Gl(r,this._parents,t,n)},call:Wl.call,nodes:Wl.nodes,node:Wl.node,size:Wl.size,empty:Wl.empty,each:Wl.each,on:function(t,e){var n=this._id;return arguments.length<2?gl(this.node(),n).on.on(t):this.each(Il(n,t,e))},attr:function(t,e){var n=as(t),r="transform"===n?Pi:bl;return this.attrTween(t,"function"==typeof e?(n.local?Sl:Ol)(n,r,_l(this,"attr."+t,e)):null==e?(n.local?wl:xl)(n):(n.local?El:Tl)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=as(t);return this.tween(n,(r.local?Cl:Ll)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?ki:bl;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var o=Ls(this,t),a=(this.style.removeProperty(t),Ls(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}(t,r)).on("end.style."+t,Fl(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,o;return function(){var a=Ls(this,t),s=n(this),u=s+"";return null==s&&(this.style.removeProperty(t),u=s=Ls(this,t)),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}(t,r,_l(this,"style."+t,e))).each(function(t,e){var n,r,i,o,a="style."+e,s="end."+a;return function(){var u=vl(this,t),l=u.on,c=null==u.value[a]?o||(o=Fl(e)):void 0;l===n&&i===c||(r=(n=l).copy()).on(s,i=c),u.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,o=n+"";return function(){var a=Ls(this,t);return a===o?null:a===r?i:i=e(r=a,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,Vl(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(_l(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,Hl(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=gl(this.node(),n).tween,o=0,a=i.length;o<a;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==e?yl:ml)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?kl:Pl)(e,t)):gl(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Dl:Rl)(e,t)):gl(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(jl(e,t)):gl(this.node(),e).ease},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(o,a){var s={value:a},u={value:function(){0==--i&&o()}};n.each((function(){var n=vl(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(u)),n.on=e}))}))}};var Xl={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function $l(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return Xl.time=rl(),Xl;return n}fu.prototype.interrupt=function(t){return this.each((function(){!function(t,e){var n,r,i,o=t.__transition,a=!0;if(o){for(i in e=null==e?null:e+"",o)(n=o[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete o[i]):a=!1;a&&delete t.__transition}}(this,t)}))},fu.prototype.transition=function(t){var e,n;t instanceof Gl?(e=t._id,t=t._name):(e=ql(),(n=Xl).time=rl(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],u=s.length,l=0;l<u;++l)(a=s[l])&&pl(a,t,e,l,s,n||$l(a,e));return new Gl(r,this._parents,t,e)};var Zl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.pendingTransitions={},e}return s(e,t),e.prototype.init=function(){var t=this;this.services.events.addEventListener("model-update",(function(){t.pendingTransitions={}}))},e.prototype.getTransition=function(t,e){var n=this;if(!1===this.model.getOptions().animations||!1===e)return this.getInstantTransition(t);var r=Yl(t).duration(mn.getProperty(Vn,t,"duration")||Vn.default.duration);return this.pendingTransitions[r._id]=r,r.on("end interrupt cancel",(function(){delete n.pendingTransitions[r._id]})),r},e.prototype.getInstantTransition=function(t){var e=this,n=Yl(t).duration(0);return this.pendingTransitions[n._id]=n,n.on("end interrupt cancel",(function(){delete e.pendingTransitions[n._id]})),n},e.prototype.getPendingTransitions=function(){return this.pendingTransitions},e}(rs),Jl={dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]};function Kl(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Object.prototype.toString.call(t);return t instanceof Date||"object"==typeof t&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn((new Error).stack)),new Date(NaN))}function Ql(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function tc(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Kl(t),r=Ql(e);return n.setDate(n.getDate()+r),n}function ec(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Kl(t).getTime(),r=Ql(e);return new Date(n+r)}function nc(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ql(e);return ec(t,36e5*n)}function rc(t){var e=new Date(t.getTime()),n=Math.ceil(e.getTimezoneOffset());return e.setSeconds(0,0),6e4*n+e.getTime()%6e4}function ic(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Kl(t);return e.setHours(0,0,0,0),e}function oc(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=ic(t),r=ic(e),i=n.getTime()-rc(n),o=r.getTime()-rc(r);return Math.round((i-o)/864e5)}function ac(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ql(e);return ec(t,6e4*n)}function sc(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Kl(t),n=e.getFullYear(),r=e.getMonth(),i=new Date(0);return i.setFullYear(n,r+1,0),i.setHours(0,0,0,0),i.getDate()}function uc(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Kl(t),r=Ql(e),i=n.getMonth()+r,o=new Date(0);o.setFullYear(n.getFullYear(),i,1),o.setHours(0,0,0,0);var a=sc(o);return n.setMonth(i,Math.min(a,n.getDate())),n}function lc(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ql(e);return uc(t,12*n)}function cc(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Kl(t),r=Kl(e),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}function hc(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Kl(t),r=Kl(e),i=n.getFullYear()-r.getFullYear(),o=n.getMonth()-r.getMonth();return 12*i+o}function fc(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Kl(t),r=Kl(e);return n.getFullYear()-r.getFullYear()}function pc(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Kl(t),r=Kl(e);return n.getTime()-r.getTime()}function dc(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ql(e);return tc(t,-n)}function vc(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ql(e);return nc(t,-n)}function gc(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ql(e);return ac(t,-n)}function yc(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ql(e);return uc(t,-n)}function mc(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ql(e);return lc(t,-n)}var _c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.scaleTypes={top:null,right:null,bottom:null,left:null},e.scales={top:null,right:null,bottom:null,left:null},e}return s(e,t),e.prototype.getDomainAxisPosition=function(){return this.domainAxisPosition},e.prototype.getRangeAxisPosition=function(){return this.rangeAxisPosition},e.prototype.update=function(t){var e=this;this.determineOrientation(),Object.keys(c).map((function(t){return c[t]})).forEach((function(t){e.scales[t]=e.createScale(t)}))},e.prototype.determineOrientation=function(){var t=this,e=this.model.getOptions();[c.LEFT,c.BOTTOM,c.RIGHT,c.TOP].forEach((function(n){var r=mn.getProperty(e,"axes",n);if(r){var i=r.scaleType||p.LINEAR;t.scaleTypes[n]=i,i===p.LINEAR?t.rangeAxisPosition=n:t.domainAxisPosition=n}})),this.rangeAxisPosition===c.LEFT&&this.domainAxisPosition===c.BOTTOM?this.orientation=h.VERTICAL:this.orientation=h.HORIZONTAL},e.prototype.getOrientation=function(){return this.orientation},e.prototype.getScaleByPosition=function(t){return this.scales[t]},e.prototype.getScaleTypeByPosition=function(t){return this.scaleTypes[t]},e.prototype.getDomainScale=function(){return this.scales[this.domainAxisPosition]},e.prototype.getRangeScale=function(){return this.scales[this.rangeAxisPosition]},e.prototype.getMainXAxisPosition=function(){var t=[c.BOTTOM,c.TOP];return[this.domainAxisPosition,this.rangeAxisPosition].find((function(e){return t.indexOf(e)>-1}))},e.prototype.getMainYAxisPosition=function(){var t=[c.LEFT,c.RIGHT];return[this.domainAxisPosition,this.rangeAxisPosition].find((function(e){return t.indexOf(e)>-1}))},e.prototype.getMainXScale=function(){return this.scales[this.getMainXAxisPosition()]},e.prototype.getMainYScale=function(){return this.scales[this.getMainYAxisPosition()]},e.prototype.getValueFromScale=function(t,e,n){var r=isNaN(e)?e.value:e,i=this.scaleTypes[t],o=this.scales[t];return i===p.LABELS?o(this.model.getDisplayData().labels[n])+o.step()/2:i===p.TIME?o(new Date(e.date||e.label)):o(r)},e.prototype.getDomainValue=function(t,e){return this.getValueFromScale(this.domainAxisPosition,t,e)},e.prototype.getRangeValue=function(t,e){return this.getValueFromScale(this.rangeAxisPosition,t,e)},e.prototype.getDataFromDomain=function(t){var e=this.model.getDisplayData(),n=[];switch(this.scaleTypes[this.domainAxisPosition]){case p.LABELS:var r=e.labels.indexOf(t);e.datasets.forEach((function(t){n.push({datasetLabel:t.label,value:t.data[r]})}));break;case p.TIME:var i=Object.keys(e.datasets[0].data[0]).filter((function(t){return"value"!==t}))[0];e.datasets.forEach((function(e){var r=e.label;e.data.filter((function(e){var n=new Date(e[i]),r=new Date(t);return n.getTime()===r.getTime()})).forEach((function(t){n.push(Object.assign({datasetLabel:r,value:t.value},t))}))}))}return n},e.prototype.getScaleDomain=function(t){var e,n=this.model.getOptions(),r=mn.getProperty(n,"axes",t),i=this.model.getDisplayData(),o=i.datasets,a=i.labels;if(r&&r.scaleType===p.LABELS)return a||this.model.getDisplayData().datasets[0].data.map((function(t,e){return e+1}));if(r.domain)return r.domain;if(r.stacked)e=vr(a.reduce((function(t,e,n){var r=o.map((function(t){return isNaN(t.data[n])?t.data[n].value:t.data[n]})),i=r.reduce((function(t,e){return t+e}),0);return t.concat(i,function(t,e){var n,r,i=t.length,o=-1;if(null==e){for(;++o<i;)if(null!=(n=t[o])&&n>=n)for(r=n;++o<i;)null!=(n=t[o])&&r>n&&(r=n)}else for(;++o<i;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=n;++o<i;)null!=(n=e(t[o],o,t))&&r>n&&(r=n);return r}(r))}),[]).concat(0));else{var s=o.reduce((function(t,e){return e.data.forEach((function(e){t=r.scaleType===p.TIME?t.concat(e.date):t.concat(isNaN(e)?e.value:e)})),t}),[]);r.scaleType!==p.TIME&&(s=s.concat(0)),e=vr(s)}if(r.scaleType===p.TIME){var u=mn.getProperty(n,"timeScale","addSpaceOnEdges");if(u){var l=new Date(e[0]),c=new Date(e[1]);return function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Kl(t),r=Kl(e),i=cc(n,r),o=Math.abs(fc(n,r));n.setFullYear(n.getFullYear()-i*o);var a=cc(n,r)===-i,s=i*(o-a);return 0===s?0:s}(c,l)>1?[mc(l,u),lc(c,u)]:function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Kl(t),r=Kl(e),i=cc(n,r),o=Math.abs(hc(n,r));n.setMonth(n.getMonth()-i*o);var a=cc(n,r)===-i,s=i*(o-a);return 0===s?0:s}(c,l)>1?[yc(l,u),uc(c,u)]:function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Kl(t),r=Kl(e),i=cc(n,r),o=Math.abs(oc(n,r));n.setDate(n.getDate()-i*o);var a=cc(n,r)===-i,s=i*(o-a);return 0===s?0:s}(c,l)>1?[dc(l,u),tc(c,u)]:function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=pc(t,e)/36e5;return n>0?Math.floor(n):Math.ceil(n)}(c,l)>1?[vc(l,u),nc(c,u)]:function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=pc(t,e)/6e4;return n>0?Math.floor(n):Math.ceil(n)}(c,l)>1?[gc(l,u),ac(c,u)]:[l,c]}return[new Date(e[0]),new Date(e[1])]}return e[1]=1.1*e[1],e[0]<0&&(e[0]=1.1*e[0]),e},e.prototype.createScale=function(t){var e=this.model.getOptions(),n=mn.getProperty(e,"axes",t);if(!n)return null;var r,i=mn.getProperty(n,"scaleType")||p.LINEAR;(this.scaleTypes[t]=i,i===p.TIME)&&Ka(mn.getProperty(e,"locale","time")||Jl);return(r=i===p.TIME?function(){return Tr.apply(es(Co,Ao,Oo,To,wo,xo,bo,_o,Vo).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}():i===p.LOG?function t(){var e=vo(Ui()).domain([1,10]);return e.copy=function(){return Vi(e,t()).base(e.base())},Tr.apply(e,arguments),e}().base(n.base||10):i===p.LABELS?Dr():ao()).domain(this.getScaleDomain(t)),r},e}(rs),bc=Math.PI,xc=2*bc,wc=xc-1e-6;function Tc(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Ec(){return new Tc}function Oc(t){return function(){return t}}Tc.prototype=Ec.prototype={constructor:Tc,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,o){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var o=this._x1,a=this._y1,s=n-t,u=r-e,l=o-t,c=a-e,h=l*l+c*c;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>1e-6)if(Math.abs(c*s-u*l)>1e-6&&i){var f=n-o,p=r-a,d=s*s+u*u,v=f*f+p*p,g=Math.sqrt(d),y=Math.sqrt(h),m=i*Math.tan((bc-Math.acos((d+h-v)/(2*g*y)))/2),_=m/y,b=m/g;Math.abs(_-1)>1e-6&&(this._+="L"+(t+_*l)+","+(e+_*c)),this._+="A"+i+","+i+",0,0,"+ +(c*f>l*p)+","+(this._x1=t+b*s)+","+(this._y1=e+b*u)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,r,i,o){t=+t,e=+e,o=!!o;var a=(n=+n)*Math.cos(r),s=n*Math.sin(r),u=t+a,l=e+s,c=1^o,h=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+u+","+l:(Math.abs(this._x1-u)>1e-6||Math.abs(this._y1-l)>1e-6)&&(this._+="L"+u+","+l),n&&(h<0&&(h=h%xc+xc),h>wc?this._+="A"+n+","+n+",0,1,"+c+","+(t-a)+","+(e-s)+"A"+n+","+n+",0,1,"+c+","+(this._x1=u)+","+(this._y1=l):h>1e-6&&(this._+="A"+n+","+n+",0,"+ +(h>=bc)+","+c+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var Sc=Math.abs,Mc=Math.atan2,Ac=Math.cos,Cc=Math.max,Lc=Math.min,kc=Math.sin,Pc=Math.sqrt,Dc=Math.PI,Rc=Dc/2,jc=2*Dc;function Ic(t){return t>1?0:t<-1?Dc:Math.acos(t)}function Nc(t){return t>=1?Rc:t<=-1?-Rc:Math.asin(t)}function Fc(t){return t.innerRadius}function Bc(t){return t.outerRadius}function Vc(t){return t.startAngle}function Uc(t){return t.endAngle}function Hc(t){return t&&t.padAngle}function zc(t,e,n,r,i,o,a,s){var u=n-t,l=r-e,c=a-i,h=s-o,f=h*u-c*l;if(!(f*f<1e-12))return[t+(f=(c*(e-o)-h*(t-i))/f)*u,e+f*l]}function Gc(t,e,n,r,i,o,a){var s=t-n,u=e-r,l=(a?o:-o)/Pc(s*s+u*u),c=l*u,h=-l*s,f=t+c,p=e+h,d=n+c,v=r+h,g=(f+d)/2,y=(p+v)/2,m=d-f,_=v-p,b=m*m+_*_,x=i-o,w=f*v-d*p,T=(_<0?-1:1)*Pc(Cc(0,x*x*b-w*w)),E=(w*_-m*T)/b,O=(-w*m-_*T)/b,S=(w*_+m*T)/b,M=(-w*m+_*T)/b,A=E-g,C=O-y,L=S-g,k=M-y;return A*A+C*C>L*L+k*k&&(E=S,O=M),{cx:E,cy:O,x01:-c,y01:-h,x11:E*(i/x-1),y11:O*(i/x-1)}}function Yc(){var t=Fc,e=Bc,n=Oc(0),r=null,i=Vc,o=Uc,a=Hc,s=null;function u(){var u,l,c=+t.apply(this,arguments),h=+e.apply(this,arguments),f=i.apply(this,arguments)-Rc,p=o.apply(this,arguments)-Rc,d=Sc(p-f),v=p>f;if(s||(s=u=Ec()),h<c&&(l=h,h=c,c=l),h>1e-12)if(d>jc-1e-12)s.moveTo(h*Ac(f),h*kc(f)),s.arc(0,0,h,f,p,!v),c>1e-12&&(s.moveTo(c*Ac(p),c*kc(p)),s.arc(0,0,c,p,f,v));else{var g,y,m=f,_=p,b=f,x=p,w=d,T=d,E=a.apply(this,arguments)/2,O=E>1e-12&&(r?+r.apply(this,arguments):Pc(c*c+h*h)),S=Lc(Sc(h-c)/2,+n.apply(this,arguments)),M=S,A=S;if(O>1e-12){var C=Nc(O/c*kc(E)),L=Nc(O/h*kc(E));(w-=2*C)>1e-12?(b+=C*=v?1:-1,x-=C):(w=0,b=x=(f+p)/2),(T-=2*L)>1e-12?(m+=L*=v?1:-1,_-=L):(T=0,m=_=(f+p)/2)}var k=h*Ac(m),P=h*kc(m),D=c*Ac(x),R=c*kc(x);if(S>1e-12){var j,I=h*Ac(_),N=h*kc(_),F=c*Ac(b),B=c*kc(b);if(d<Dc&&(j=zc(k,P,F,B,I,N,D,R))){var V=k-j[0],U=P-j[1],H=I-j[0],z=N-j[1],G=1/kc(Ic((V*H+U*z)/(Pc(V*V+U*U)*Pc(H*H+z*z)))/2),Y=Pc(j[0]*j[0]+j[1]*j[1]);M=Lc(S,(c-Y)/(G-1)),A=Lc(S,(h-Y)/(G+1))}}T>1e-12?A>1e-12?(g=Gc(F,B,k,P,h,A,v),y=Gc(I,N,D,R,h,A,v),s.moveTo(g.cx+g.x01,g.cy+g.y01),A<S?s.arc(g.cx,g.cy,A,Mc(g.y01,g.x01),Mc(y.y01,y.x01),!v):(s.arc(g.cx,g.cy,A,Mc(g.y01,g.x01),Mc(g.y11,g.x11),!v),s.arc(0,0,h,Mc(g.cy+g.y11,g.cx+g.x11),Mc(y.cy+y.y11,y.cx+y.x11),!v),s.arc(y.cx,y.cy,A,Mc(y.y11,y.x11),Mc(y.y01,y.x01),!v))):(s.moveTo(k,P),s.arc(0,0,h,m,_,!v)):s.moveTo(k,P),c>1e-12&&w>1e-12?M>1e-12?(g=Gc(D,R,I,N,c,-M,v),y=Gc(k,P,F,B,c,-M,v),s.lineTo(g.cx+g.x01,g.cy+g.y01),M<S?s.arc(g.cx,g.cy,M,Mc(g.y01,g.x01),Mc(y.y01,y.x01),!v):(s.arc(g.cx,g.cy,M,Mc(g.y01,g.x01),Mc(g.y11,g.x11),!v),s.arc(0,0,c,Mc(g.cy+g.y11,g.cx+g.x11),Mc(y.cy+y.y11,y.cx+y.x11),v),s.arc(y.cx,y.cy,M,Mc(y.y11,y.x11),Mc(y.y01,y.x01),!v))):s.arc(0,0,c,x,b,v):s.lineTo(D,R)}else s.moveTo(0,0);if(s.closePath(),u)return s=null,u+""||null}return u.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-Dc/2;return[Ac(r)*n,kc(r)*n]},u.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:Oc(+e),u):t},u.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:Oc(+t),u):e},u.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:Oc(+t),u):n},u.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:Oc(+t),u):r},u.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:Oc(+t),u):i},u.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:Oc(+t),u):o},u.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:Oc(+t),u):a},u.context=function(t){return arguments.length?(s=null==t?null:t,u):s},u}function qc(t){this._context=t}function Wc(t){return new qc(t)}function Xc(t){return t[0]}function $c(t){return t[1]}function Zc(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function Jc(t){return t}qc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var Kc=Array.prototype.slice;function Qc(){}function th(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function eh(t){this._context=t}function nh(t){return new eh(t)}function rh(t){this._context=t}function ih(t){return new rh(t)}function oh(t){this._context=t}function ah(t){return new oh(t)}function sh(t,e){this._basis=new eh(t),this._beta=e}eh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:th(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:th(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},rh.prototype={areaStart:Qc,areaEnd:Qc,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:th(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},oh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:th(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},sh.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r,i=t[0],o=e[0],a=t[n]-i,s=e[n]-o,u=-1;++u<=n;)r=u/n,this._basis.point(this._beta*t[u]+(1-this._beta)*(i+r*a),this._beta*e[u]+(1-this._beta)*(o+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var uh=function t(e){function n(t){return 1===e?new eh(t):new sh(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function lh(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function ch(t,e){this._context=t,this._k=(1-e)/6}ch.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:lh(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:lh(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var hh=function t(e){function n(t){return new ch(t,e)}return n.tension=function(e){return t(+e)},n}(0);function fh(t,e){this._context=t,this._k=(1-e)/6}fh.prototype={areaStart:Qc,areaEnd:Qc,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:lh(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var ph=function t(e){function n(t){return new fh(t,e)}return n.tension=function(e){return t(+e)},n}(0);function dh(t,e){this._context=t,this._k=(1-e)/6}dh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:lh(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var vh=function t(e){function n(t){return new dh(t,e)}return n.tension=function(e){return t(+e)},n}(0);function gh(t,e,n){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>1e-12){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,u=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/u,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/u}if(t._l23_a>1e-12){var l=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,c=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*l+t._x1*t._l23_2a-e*t._l12_2a)/c,a=(a*l+t._y1*t._l23_2a-n*t._l12_2a)/c}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function yh(t,e){this._context=t,this._alpha=e}yh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:gh(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var mh=function t(e){function n(t){return e?new yh(t,e):new ch(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function _h(t,e){this._context=t,this._alpha=e}_h.prototype={areaStart:Qc,areaEnd:Qc,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:gh(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var bh=function t(e){function n(t){return e?new _h(t,e):new fh(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function xh(t,e){this._context=t,this._alpha=e}xh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:gh(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var wh=function t(e){function n(t){return e?new xh(t,e):new dh(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Th(t){this._context=t}function Eh(t){return new Th(t)}function Oh(t){return t<0?-1:1}function Sh(t,e,n){var r=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),a=(n-t._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(Oh(o)+Oh(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function Mh(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Ah(t,e,n){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,s=(o-r)/3;t._context.bezierCurveTo(r+s,i+s*e,o-s,a-s*n,o,a)}function Ch(t){this._context=t}function Lh(t){this._context=new kh(t)}function kh(t){this._context=t}function Ph(t){return new Ch(t)}function Dh(t){return new Lh(t)}function Rh(t){this._context=t}function jh(t){var e,n,r=t.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,o[e]=4,a[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,o[r-1]=7,a[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/o[e-1],o[e]-=n,a[e]-=n*a[e-1];for(i[r-1]=a[r-1]/o[r-1],e=r-2;e>=0;--e)i[e]=(a[e]-i[e+1])/o[e];for(o[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)o[e]=2*t[e+1]-i[e+1];return[i,o]}function Ih(t){return new Rh(t)}function Nh(t,e){this._context=t,this._t=e}function Fh(t){return new Nh(t,.5)}function Bh(t){return new Nh(t,0)}function Vh(t){return new Nh(t,1)}function Uh(t,e){if((i=t.length)>1)for(var n,r,i,o=1,a=t[e[0]],s=a.length;o<i;++o)for(r=a,a=t[e[o]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function Hh(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function zh(t,e){return t[e]}Th.prototype={areaStart:Qc,areaEnd:Qc,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}},Ch.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Ah(this,this._t0,Mh(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,Ah(this,Mh(this,n=Sh(this,t,e)),n);break;default:Ah(this,this._t0,n=Sh(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(Lh.prototype=Object.create(Ch.prototype)).point=function(t,e){Ch.prototype.point.call(this,e,t)},kh.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,o){this._context.bezierCurveTo(e,t,r,n,o,i)}},Rh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===n)this._context.lineTo(t[1],e[1]);else for(var r=jh(t),i=jh(e),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],t[a],e[a]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}},Nh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};var Gh,Yh,qh=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.curveTypes={curveLinear:Wc,curveLinearClosed:Eh,curveBasis:nh,curveBasisClosed:ih,curveBasisOpen:ah,curveBundle:uh,curveCardinal:hh,curveCardinalClosed:ph,curveCardinalOpen:vh,curveCatmullRom:mh,curveCatmullRomClosed:bh,curveCatmullRomOpen:wh,curveMonotoneX:Ph,curveMonotoneY:Dh,curveNatural:Ih,curveStep:Fh,curveStepAfter:Vh,curveStepBefore:Bh},e}return s(e,t),e.prototype.getD3Curve=function(){var t="curveLinear",e=this.model.getOptions().curve;if(e&&(t="string"==typeof e?e:e.name),this.curveTypes[t]){var n=this.curveTypes[t];return e&&Object.keys(e).forEach((function(t){n[t]&&(n=n[t](e[t]))})),n}return console.warn("The curve type '"+t+"' is invalid, using 'curveLinear' instead"),this.curveTypes.curveLinear},e}(rs),Wh=function(){function t(t,e,n){this.configs={},this.model=t,this.services=e,n&&(this.configs=n),this.parent||this.setParent(pu(this.services.domUtils.getMainSVG()))}return t.prototype.init=function(){},t.prototype.render=function(t){console.error("render() method is not implemented")},t.prototype.destroy=function(){},t.prototype.setModel=function(t){this.model=t},t.prototype.setServices=function(t){this.services=t},t.prototype.setParent=function(t){var e=this.parent;if(this.parent=t,(!e||e.node()!==t.node())&&this.type){var n=mn.getProperty(this.model.getOptions(),"style","prefix");this.parent.classed(gu.prefix+"--"+n+"--"+this.type,!0),e&&e.classed(gu.prefix+"--"+n+"--"+this.type,!1)}},t.prototype.getParent=function(){return this.parent},t.prototype.getContainerSVG=function(){if(this.type){var t=mn.getProperty(this.model.getOptions(),"style","prefix");return Bu.appendOrSelect(this.parent,"g."+gu.prefix+"--"+t+"--"+this.type)}return this.parent},t}(),Xh=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="legend",e}return s(n,t),n.prototype.render=function(){var t=this,n=this.getContainerSVG().attr("role",e.GRAPHICS_DOCUMENT),r=this.model.getOptions(),i=n.selectAll("g.legend-item").data(this.getLegendItemArray()),o=i.enter().append("g").classed("legend-item",!0),a=r.legend.checkbox.radius;o.append("rect").classed("checkbox",!0).merge(i.select("rect.checkbox")).attr("width",2*a).attr("height",2*a).attr("rx",1).attr("ry",1).style("fill",(function(e){return e.value===r.legend.items.status.ACTIVE?t.model.getStrokeColor(e.key):null})).classed("active",(function(t,e){return t.value===r.legend.items.status.ACTIVE})),o.append("text").merge(i.select("text")).text((function(t){return t.key})).attr("alignment-baseline","middle"),this.breakItemsIntoLines(o),i.exit().on("mouseover",null).on("click",null).on("mouseout",null).remove();var s=mn.getProperty(this.model.getOptions(),"legend","clickable");n.classed("clickable",s),s&&o.size()>0&&this.addEventListeners()},n.prototype.breakItemsIntoLines=function(t){var e,n=this,r=this.getContainerSVG(),i=this.model.getOptions(),o=i.legend.checkbox.radius,a=i.legend.items.horizontalSpace,s=i.legend.items.verticalSpace,u=i.legend.items.textYOffset,l=2*o+i.legend.checkbox.spaceAfter,c=i.legend.items.status.DISABLED,h=this.model.get("dataLabels"),f=Object.keys(h).some((function(t){return h[t]===c})),p=mn.getProperty(i,"legend","orientation"),d=0,v=0,g=0;t.merge(r.selectAll("g.legend-item")).each((function(t,i){var c=pu(this),h=pu(r.selectAll("g.legend-item").nodes()[i-1]);if(0===g||h.empty()||p===y.VERTICAL)p===y.VERTICAL&&0!==i&&v++;else{var m=Bu.getSVGElementSize(n.parent,{useAttr:!0}),_=Bu.getSVGElementSize(pu(this).select("text"),{useBBox:!0}),b=Bu.getSVGElementSize(h.select("text"),{useBBox:!0});(d=d+b.width+l+a)+l+_.width>m.width&&(v++,d=0,g=0)}c.select("rect.checkbox").attr("x",d).attr("y",0+v*s);var x=u+v*s;c.select("text").attr("x",d+l).attr("y",0+x),e=x,f&&c.select("g.check").empty()?(c.append("g").classed("check",!0).html('\n\t\t\t\t\t\t\t<svg focusable="false" preserveAspectRatio="xMidYMid meet"\n\t\t\t\t\t\t\t\txmlns="http://www.w3.org/2000/svg" width="32" height="32"\n\t\t\t\t\t\t\t\tviewBox="0 0 32 32" aria-hidden="true"\n\t\t\t\t\t\t\t\tstyle="will-change: transform;">\n\t\t\t\t\t\t\t\t<path d="M13 21.2l-7.1-7.1-1.4 1.4 7.1 7.1L13 24 27.1 9.9l-1.4-1.5z"></path>\n\t\t\t\t\t\t\t\t<title>Checkmark</title>\n\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t'),c.select("g.check svg").attr("width",2*o-1).attr("height",2*o-1).attr("x",parseFloat(c.select("rect.checkbox").attr("x"))+.5).attr("y",parseFloat(c.select("rect.checkbox").attr("y"))+.5)):f||c.select("g.check").empty()||c.select("g.check").remove(),g++})),Bu.appendOrSelect(r,"rect.spacer").attr("x",0).attr("y",e).attr("width",16).attr("height",16).attr("fill","none")},n.prototype.getLegendItemArray=function(){var t=this.model.get("dataLabels");return Object.keys(t).map((function(e){return{key:e,value:t[e]}}))},n.prototype.addEventListeners=function(){var t=this,e=this.getContainerSVG(),n=this.model.getOptions();e.selectAll("g.legend-item").on("mouseover",(function(){t.services.events.dispatchEvent("legend-item-onhover",{hoveredElement:pu(this)});var e=n.legend.checkbox.radius,r=pu(this);r.append("rect").classed("hover-stroke",!0).attr("x",parseFloat(r.select("rect.checkbox").attr("x"))-2).attr("y",parseFloat(r.select("rect.checkbox").attr("y"))-2).attr("width",2*e+4).attr("height",2*e+4).attr("rx",3).attr("ry",3).lower()})).on("click",(function(){t.services.events.dispatchEvent("legend-item-onclick",{clickedElement:pu(this)});var e=pu(this).datum();t.model.toggleDataLabel(e.key)})).on("mouseout",(function(){var e=pu(this);e.select("rect.hover-stroke").remove(),t.services.events.dispatchEvent("legend-item-onmouseout",{hoveredElement:e})}))},n}(Wh),$h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="title",e}return s(e,t),e.prototype.truncateTitle=function(){var t=Bu.getSVGElementSize(this.services.domUtils.getMainSVG(),{useAttr:!0}).width,e=Bu.appendOrSelect(this.parent,"text.title");if(!(t<=0)&&e.node().getComputedTextLength()>t){e.append("tspan").text("...");var n=Bu.appendOrSelect(e,"tspan").node().getComputedTextLength(),r=Math.floor(t-n),i=this.model.getOptions().title,o=this.getSubstringIndex(e.node(),0,i.length-1,r);e.text(i.substring(0,o-1)).append("tspan").text("...");var a=this;e.on("mouseenter",(function(){a.services.events.dispatchEvent("show-tooltip",{hoveredElement:e,type:v.TITLE})})).on("mouseout",(function(){a.services.events.dispatchEvent("hide-tooltip",{hoveredElement:e})}))}},e.prototype.render=function(){var t=this.getContainerSVG();Bu.appendOrSelect(t,"text.title").attr("x",0).attr("y",20).text(this.model.getOptions().title),this.truncateTitle()},e.prototype.getSubstringIndex=function(t,e,n,r){var i=Math.floor((n+e)/2);return t.getSubStringLength(0,i)>r?this.getSubstringIndex(t,e,i,r):t.getSubStringLength(0,i)<r?t.getSubStringLength(0,i+1)>r?i:this.getSubstringIndex(t,i,n,r):i},e}(Wh);!function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(Yh||(Yh={}));var Zh=((Gh={})[Yh.LEFT]=function(t,e,n){return{top:t.top-Math.round(e.offsetHeight/2)+Math.round(n.height/2),left:Math.round(t.left-e.offsetWidth)}},Gh[Yh.RIGHT]=function(t,e,n){return{top:t.top-Math.round(e.offsetHeight/2)+Math.round(n.height/2),left:Math.round(t.left+n.width)}},Gh[Yh.TOP]=function(t,e,n){return{top:Math.round(t.top-e.offsetHeight),left:t.left-Math.round(e.offsetWidth/2)+Math.round(n.width/2)}},Gh[Yh.BOTTOM]=function(t,e,n){return{top:Math.round(t.top+n.height),left:t.left-Math.round(e.offsetWidth/2)+Math.round(n.width/2)}},Gh),Jh="undefined"!=typeof window?window:{innerHeight:0,scrollY:0,innerWidth:0,scrollX:0},Kh=function(){function t(t){void 0===t&&(t={}),this.positions=Zh,this.positions=Object.assign({},Zh,t)}return t.prototype.getRelativeOffset=function(t){for(var e={left:t.offsetLeft,top:t.offsetTop};t.offsetParent&&"static"===getComputedStyle(t.offsetParent).position;)e.left+=t.offsetLeft,e.top+=t.offsetTop,t=t.offsetParent;return e},t.prototype.getAbsoluteOffset=function(t){for(var e=t,n={top:0,left:0};e.offsetParent;){var r=getComputedStyle(e.offsetParent);"static"===r.position&&r.marginLeft&&r.marginTop&&(parseInt(r.marginTop,10)&&(n.top+=parseInt(r.marginTop,10)),parseInt(r.marginLeft,10)&&(n.left+=parseInt(r.marginLeft,10))),e=e.offsetParent}var i=t.getBoundingClientRect(),o=document.body.getBoundingClientRect();return{top:i.top-o.top+n.top,left:i.left-o.left+n.left}},t.prototype.findRelative=function(t,e,n){var r=this.getRelativeOffset(t),i=t.getBoundingClientRect();return this.calculatePosition(r,i,e,n)},t.prototype.findAbsolute=function(t,e,n){var r=this.getAbsoluteOffset(t),i=t.getBoundingClientRect();return this.calculatePosition(r,i,e,n)},t.prototype.findPosition=function(t,e,n,r){void 0===r&&(r=this.getAbsoluteOffset);var i=r(t),o=t.getBoundingClientRect();return this.calculatePosition(i,o,e,n)},t.prototype.findPositionAt=function(t,e,n){return this.calculatePosition(t,{height:0,width:0},e,n)},t.prototype.getPlacementBox=function(t,e){var n=t.offsetHeight+e.top,r=t.offsetWidth+e.left;return{top:e.top,bottom:n,left:e.left,right:r}},t.prototype.addOffset=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),Object.assign({},t,{top:t.top+e,left:t.left+n})},t.prototype.setElement=function(t,e){t.style.top=e.top+"px",t.style.left=e.left+"px"},t.prototype.findBestPlacement=function(t,e,n,r,i){var o=this;void 0===r&&(r=this.defaultContainerFunction),void 0===i&&(i=this.findPosition);var a=n.map((function(n){var a=i(t,e,n),s=o.getPlacementBox(e,a),u=s.bottom-r().height,l=s.right-r().width;u=u<0?e.offsetHeight:u,l=l<0?e.offsetWidth:l;var c=e.offsetHeight*e.offsetWidth,h=c-u*l;return{placement:n,weight:(h=0===h?c:h)/c}}));return a.sort((function(t,e){return e.weight-t.weight})),a[0].placement},t.prototype.findBestPlacementAt=function(t,e,n,r){var i=this;void 0===r&&(r=this.defaultContainerFunction);return this.findBestPlacement(null,e,n,r,(function(e,n,r){return i.findPositionAt(t,n,r)}))},t.prototype.defaultContainerFunction=function(){return{width:Jh.innerHeight-Jh.scrollY,height:Jh.innerWidth-Jh.scrollX}},t.prototype.calculatePosition=function(t,e,n,r){return this.positions[r]?this.positions[r](t,n,e):(console.error("No function found for placement, defaulting to 0,0"),{left:0,top:0})},t}(),Qh=(new Kh,function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="tooltip",i.positionService=new Kh,i.init(),i}return s(e,t),e.prototype.init=function(){var t=this,e=pu(this.services.domUtils.getHolder()),n=mn.getProperty(this.model.getOptions(),"style","prefix");this.tooltip=Bu.appendOrSelect(e,"div."+gu.prefix+"--"+n+"--tooltip");var r=Bu.appendOrSelect(this.tooltip,"div.content-box");this.tooltip.style("max-width",null),this.services.events.addEventListener("show-tooltip",(function(i){if(i.detail.type===v.DATAPOINT&&mn.getProperty(t.model.getOptions(),"tooltip","datapoint","enabled")||i.detail.type===v.GRIDLINE&&mn.getProperty(t.model.getOptions(),"tooltip","gridline","enabled")){var o=pu(eu.target).datum(),a=void 0;i.detail.multidata?(o=i.detail.multidata,a=t.getMultilineTooltipHTML(o)):a=t.getTooltipHTML(o,v.DATAPOINT),mn.getProperty(t.model.getOptions(),"tooltip","customHTML")?r.html(t.model.getOptions().tooltip.customHTML(o,a)):r.html(a),t.positionTooltip()}else if(i.detail.type===v.TITLE){var s=Bu.appendOrSelect(e,"svg."+gu.prefix+"--"+n+"--chart-svg"),u=Bu.getSVGElementSize(s).width*mn.getProperty(t.model.getOptions(),"tooltip","title","width");t.tooltip.style("max-width",u),r.html(t.getTooltipHTML(i.detail.hoveredElement,v.TITLE));var l=t.getTooltipPosition(i.detail.hoveredElement.node());t.positionTooltip(l)}t.tooltip.classed("hidden",!1)})),this.services.events.addEventListener("hide-tooltip",(function(){t.tooltip.classed("hidden",!0)}))},e.prototype.getTooltipHTML=function(t,e){if(e===v.TITLE)return'<div class="title-tooltip"><text>'+this.model.getOptions().title+"</text></div>";var n=mn.getProperty(t,"data")?t.data:t,r=mn.getProperty(this.model.getOptions(),"tooltip","valueFormatter")?this.model.getOptions().tooltip.valueFormatter(n.value):n.value.toLocaleString("en");return'<div class="datapoint-tooltip">\n\t\t\t\t\t<p class="label">'+(n.datasetLabel?n.datasetLabel:n.label)+'</p>\n\t\t\t\t\t<p class="value">'+r+"</p>\n\t\t\t\t</div>"},e.prototype.getMultilineTooltipHTML=function(t){var e=this,n=t;n.sort((function(t,e){return e.value-t.value}));var r=this.services.cartesianScales.getDomainScale().scaleType;return"<ul class='multi-tooltip'>"+n.map((function(t){var n=t.value;n instanceof Object&&(n=r===p.TIME?t.value.date:t.value.value);var i=mn.getProperty(e.model.getOptions(),"tooltip","valueFormatter")?e.model.getOptions().tooltip.valueFormatter(n):n.toLocaleString("en");return'\n\t\t\t\t<li>\n\t\t\t\t\t<div class="datapoint-tooltip">\n\t\t\t\t\t\t<a style="background-color:'+e.model.getStrokeColor(t.datasetLabel,t.label)+'" class="tooltip-color"></a>\n\t\t\t\t\t\t<p class="label">'+t.datasetLabel+'</p>\n\t\t\t\t\t\t<p class="value">'+i+"</p>\n\t\t\t\t\t</div>\n\t\t\t\t</li>"})).join("")+"</ul>"},e.prototype.render=function(){this.tooltip.classed("hidden",!0)},e.prototype.getTooltipPosition=function(t){var e=pu(this.services.domUtils.getHolder()).node().getBoundingClientRect(),n=t.getBoundingClientRect(),r=this.model.getOptions().tooltip.title.verticalOffset,i={left:n.left-e.left+n.width/2,top:n.top-e.top-r};return{placement:d.BOTTOM,position:i}},e.prototype.positionTooltip=function(t){var e,n=this.services.domUtils.getHolder(),r=this.tooltip.node(),i=vu(n);if(t){var o=t.placement===d.TOP?Yh.TOP:Yh.BOTTOM;e=this.positionService.findPositionAt(t.position,r,o)}else{var a=this.positionService.findBestPlacementAt({left:i[0],top:i[1]},r,[Yh.RIGHT,Yh.LEFT,Yh.TOP,Yh.BOTTOM],(function(){return{width:n.offsetWidth,height:n.offsetHeight}})),s=this.model.getOptions().tooltip.datapoint.horizontalOffset;a===Yh.LEFT&&(s*=-1),e=this.positionService.findPositionAt({left:i[0]+s,top:i[1]},r,a)}this.positionService.setElement(r,e)},e}(Wh)),tf=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s(e,t),e.prototype.init=function(){var e=this,n=pu(this.services.domUtils.getHolder()),r=mn.getProperty(this.model.getOptions(),"style","prefix");this.tooltip=Bu.appendOrSelect(n,"div."+gu.prefix+"--"+r+"--tooltip");var i=Bu.appendOrSelect(this.tooltip,"div.content-box");this.tooltip.style("max-width",null),this.services.events.addEventListener("show-tooltip",(function(o){if(o.detail.type===v.DATAPOINT&&mn.getProperty(e.model.getOptions(),"tooltip","datapoint","enabled")||o.detail.type===v.GRIDLINE&&mn.getProperty(e.model.getOptions(),"tooltip","gridline","enabled")){var a=o.detail.hoveredElement.datum(),s=o.detail.hoveredElement.node(),u=void 0;o.detail.multidata?(a=o.detail.multidata,u=e.getMultilineTooltipHTML(a)):u=e.getTooltipHTML(o.detail.hoveredElement.datum()),mn.getProperty(e.model.getOptions(),"tooltip","customHTML")?i.html(e.model.getOptions().tooltip.customHTML(a,u)):i.html(u);var l=e.getTooltipPosition(s);e.positionTooltip(o.detail.multidata?void 0:l)}else if(o.detail.type===v.TITLE){var c=Bu.appendOrSelect(n,"svg."+gu.prefix+"--"+r+"--chart-svg"),h=Bu.getSVGElementSize(c).width*mn.getProperty(e.model.getOptions(),"tooltip","title","width");e.tooltip.style("max-width",h),i.html(t.prototype.getTooltipHTML.call(e,o.detail.hoveredElement,v.TITLE));l=t.prototype.getTooltipPosition.call(e,o.detail.hoveredElement.node());e.positionTooltip(l)}e.tooltip.classed("hidden",!1)})),this.services.events.addEventListener("hide-tooltip",(function(){e.tooltip.classed("hidden",!0)}))},e.prototype.getTooltipPosition=function(t){var e=pu(t).datum(),n=pu(this.services.domUtils.getHolder()).node().getBoundingClientRect(),r=t.getBoundingClientRect(),i=this.model.getOptions().tooltip.datapoint.verticalOffset;if(e.value<=0){var o={left:r.left-n.left+r.width/2,top:r.bottom-n.top+i};return{placement:d.BOTTOM,position:o}}o={left:r.left-n.left+r.width/2,top:r.top-n.top-i};return{placement:d.TOP,position:o}},e.prototype.getTooltipHTML=function(t){return'<div class="datapoint-tooltip"><p class="value">'+(mn.getProperty(this.model.getOptions(),"tooltip","valueFormatter")?this.model.getOptions().tooltip.valueFormatter(t.value):t.value.toLocaleString("en"))+"</p></div>"},e.prototype.getMultilineTooltipHTML=function(t){var e=this,n=t;n.reverse(),this.services.cartesianScales.getOrientation()===h.VERTICAL&&n.reverse();var r=n.reduce((function(t,e){return t+e.value}),0);return r=mn.getProperty(this.model.getOptions(),"tooltip","valueFormatter")?this.model.getOptions().tooltip.valueFormatter(r):r.toLocaleString("en"),"<ul class='multi-tooltip'>"+n.map((function(t){var n=mn.getProperty(e.model.getOptions(),"tooltip","valueFormatter")?e.model.getOptions().tooltip.valueFormatter(t.value):t.value.toLocaleString("en");return'\n\t\t\t\t<li>\n\t\t\t\t\t<div class="datapoint-tooltip">\n\t\t\t\t\t\t<a style="background-color:'+e.model.getStrokeColor(t.datasetLabel,t.label)+'" class="tooltip-color"></a>\n\t\t\t\t\t\t<p class="label">'+t.datasetLabel+'</p>\n\t\t\t\t\t\t<p class="value">'+n+"</p>\n\t\t\t\t\t</div>\n\t\t\t\t</li>"})).join("")+"<li>\n\t\t\t\t\t<div class='total-val'>\n\t\t\t\t\t\t<p class='label'>Total</p>\n\t\t\t\t\t\t<p class='value'>"+r+"</p>\n\t\t\t\t\t</div>\n\t\t\t\t</li>\n\t\t\t</ul>"},e}(Qh),ef=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s(e,t),e.prototype.getTooltipHTML=function(e,n){if(n===v.TITLE)return t.prototype.getTooltipHTML.call(this,e,n);var r=mn.getProperty(this.model.getOptions(),"tooltip","valueFormatter")?this.model.getOptions().tooltip.valueFormatter(e.value):e.value.toLocaleString("en");return'\n\t\t\t<div class="datapoint-tooltip">\n\t\t\t\t<a style="background-color:'+this.model.getStrokeColor(e.datasetLabel,e.label)+'" class="tooltip-color"></a>\n\t\t\t\t<p class="label">'+e.datasetLabel+'</p>\n\t\t\t\t<p class="value">'+r+"</p>\n\t\t\t</div>"},e}(Qh),nf=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s(e,t),e.prototype.getBarWidth=function(){var t=this.model.getOptions(),e=this.services.cartesianScales.getMainXScale();return e.step?Math.min(t.bars.maxWidth,e.step()/2):Math.min(t.bars.maxWidth,5/e.ticks().length*t.bars.maxWidth)},e}(Wh),rf=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="simple-bar",e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("path.bar").transition(e.services.transitions.getTransition("legend-hover-simple-bar")).attr("opacity",(function(t){return t.label!==n.datum().key?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.bar").transition(e.services.transitions.getTransition("legend-mouseout-simple-bar")).attr("opacity",1)},e}return s(n,t),n.prototype.init=function(){var t=this.services.events;t.addEventListener("legend-item-onhover",this.handleLegendOnHover),t.addEventListener("legend-item-onmouseout",this.handleLegendMouseOut)},n.prototype.render=function(t){var n=this,r=this.getContainerSVG().selectAll("g.bars").data(this.model.getDisplayData().datasets,(function(t){return t.label}));r.exit().attr("opacity",0).remove();var i=r.enter().append("g").classed("bars",!0).attr("role",e.GROUP).merge(r).selectAll("path.bar").data((function(t,e){return n.addLabelsToDataPoints(t,e)}),(function(t){return t.label}));i.exit().attr("opacity",0).remove(),i.enter().append("path").attr("opacity",0).merge(i).classed("bar",!0).attr("width",this.getBarWidth.bind(this)).transition(this.services.transitions.getTransition("bar-update-enter",t)).attr("fill",(function(t){return n.model.getFillScale()(t.label)})).attr("d",(function(t,e){var r=n.getBarWidth(),i=n.services.cartesianScales.getDomainValue(t,e)-r/2,o=i+r,a=n.services.cartesianScales.getRangeValue(0),s=n.services.cartesianScales.getRangeValue(t,e);return mn.generateSVGPathString({x0:i,x1:o,y0:a,y1:s},n.services.cartesianScales.getOrientation())})).attr("opacity",1).attr("role",e.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t.value})),this.addEventListeners()},n.prototype.addLabelsToDataPoints=function(t,e){var n=this.model.getDisplayData().labels;return t.data.map((function(e,r){return{date:e.date,label:n[r],datasetLabel:t.label,value:isNaN(e)?e.value:e}}))},n.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("path.bar").on("mouseover",(function(e){var n=pu(this);n.classed("hovered",!0),n.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")).attr("fill",Zr(n.attr("fill")).darker(.7).toString()),t.services.events.dispatchEvent(x.Bar.BAR_MOUSEOVER,{element:n,datum:e}),t.services.events.dispatchEvent("show-tooltip",{hoveredElement:n,type:v.DATAPOINT})})).on("mousemove",(function(e){t.services.events.dispatchEvent(x.Bar.BAR_MOUSEMOVE,{element:pu(this),datum:e})})).on("click",(function(e){t.services.events.dispatchEvent(x.Bar.BAR_CLICK,{element:pu(this),datum:e})})).on("mouseout",(function(e){var n=pu(this);n.classed("hovered",!1),n.transition(t.services.transitions.getTransition("graph_element_mouseout_fill_update")).attr("fill",(function(e){return t.model.getFillScale()(e.label)})),t.services.events.dispatchEvent(x.Bar.BAR_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent("hide-tooltip",{hoveredElement:n})}))},n.prototype.destroy=function(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener("legend-item-onhover",this.handleLegendOnHover),t.removeEventListener("legend-item-onmouseout",this.handleLegendMouseOut)},n}(nf),of=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grouped-bar",e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("path.bar").transition(e.services.transitions.getTransition("legend-hover-bar")).attr("opacity",(function(t){return t.datasetLabel!==n.datum().key?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.bar").transition(e.services.transitions.getTransition("legend-mouseout-bar")).attr("opacity",1)},e}return s(n,t),n.prototype.init=function(){var t=this.services.events;t.addEventListener("legend-item-onhover",this.handleLegendOnHover),t.addEventListener("legend-item-onmouseout",this.handleLegendMouseOut)},n.prototype.getGroupWidth=function(){var t=this.model.getDisplayData().datasets;return t.length*this.getBarWidth()+5*(t.length-1)},n.prototype.setGroupScale=function(){var t=this.model.getDisplayData().datasets;this.groupScale=Dr().domain(t.map((function(t){return t.label}))).rangeRound([0,this.getGroupWidth()])},n.prototype.getBarWidth=function(){var e=this.model.getDisplayData().datasets,n=this.services.cartesianScales.getDomainScale();return Math.min(n.step()/2/e.length,t.prototype.getBarWidth.call(this))},n.prototype.render=function(t){var n=this,r=this.model.getDisplayData();this.setGroupScale();var i=this.getContainerSVG().selectAll("g.bars").data(r.labels);i.exit().attr("opacity",0).remove();var o=i.enter().append("g").classed("bars",!0).attr("role",e.GROUP).attr("aria-labelledby",(function(t){return t})).merge(i).attr("transform",(function(t,e){var r=n.services.cartesianScales.getDomainValue(t,e)-n.getGroupWidth()/2+n.getBarWidth();return n.services.cartesianScales.getOrientation()===h.VERTICAL?"translate("+r+", 0)":"translate(0, "+r+")"})).selectAll("path.bar").data((function(t,e){return n.addLabelsToDataPoints(t,e)}));o.exit().attr("opacity",0).remove(),o.enter().append("path").attr("opacity",0).merge(o).classed("bar",!0).transition(this.services.transitions.getTransition("bar-update-enter",t)).attr("fill",(function(t){return n.model.getFillScale()[t.datasetLabel](t.label)})).attr("d",(function(t){var e=n.groupScale(t.datasetLabel),r=n.getBarWidth(),i=e-r/2,o=e+r/2,a=n.services.cartesianScales.getRangeValue(0),s=n.services.cartesianScales.getRangeValue(t.value);return mn.generateSVGPathString({x0:i,x1:o,y0:a,y1:s},n.services.cartesianScales.getOrientation())})).attr("opacity",1).attr("role",e.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t.value})),this.addEventListeners()},n.prototype.addLabelsToDataPoints=function(t,e){return this.model.getDisplayData().datasets.map((function(n){return{label:t,datasetLabel:n.label,value:n.data[e].value?n.data[e].value:n.data[e]}}))},n.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("path.bar").on("mouseover",(function(e){var n=pu(this);n.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")).attr("fill",Zr(n.attr("fill")).darker(.7).toString()),t.services.events.dispatchEvent(x.Bar.BAR_MOUSEOVER,{element:n,datum:e}),t.services.events.dispatchEvent("show-tooltip",{hoveredElement:n,type:v.DATAPOINT})})).on("mousemove",(function(e){t.services.events.dispatchEvent(x.Bar.BAR_MOUSEMOVE,{element:pu(this),datum:e})})).on("click",(function(e){t.services.events.dispatchEvent(x.Bar.BAR_CLICK,{element:pu(this),datum:e})})).on("mouseout",(function(e){var n=pu(this);n.classed("hovered",!1),n.transition(t.services.transitions.getTransition("graph_element_mouseout_fill_update")).attr("fill",(function(e){return t.model.getFillScale()[e.datasetLabel](e.label)})),t.services.events.dispatchEvent(x.Bar.BAR_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent("hide-tooltip",{hoveredElement:n})}))},n.prototype.destroy=function(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener("legend-item-onhover",this.handleLegendOnHover),t.removeEventListener("legend-item-onmouseout",this.handleLegendMouseOut)},n}(nf),af=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="stacked-bar",e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("path.bar").transition(e.services.transitions.getTransition("legend-hover-bar")).attr("opacity",(function(t){return t.datasetLabel!==n.datum().key?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.bar").transition(e.services.transitions.getTransition("legend-mouseout-bar")).attr("opacity",1)},e}return s(n,t),n.prototype.init=function(){var t=this.services.events;t.addEventListener("legend-item-onhover",this.handleLegendOnHover),t.addEventListener("legend-item-onmouseout",this.handleLegendMouseOut)},n.prototype.getStackData=function(){var t,e=this.model.getDisplayData(),n=this.services.cartesianScales.getDomainAxisPosition();if(this.services.cartesianScales.getScaleTypeByPosition(n)===p.TIME){var r=[];e.datasets.forEach((function(t){r=r.concat(t.data.map((function(t){return Number(t.date)})))})),t=(r=mn.removeArrayDuplicates(r).sort()).map((function(t,n){var r={};return e.datasets.forEach((function(e){var n=e.data.find((function(e){return Number(e.date)===Number(t)}));r[e.label]=n?n.value:0})),r.label=t,r}))}else t=e.labels.map((function(t,n){var r={};return e.datasets.forEach((function(t){r[t.label]=isNaN(t.data[n])?t.data[n].value:t.data[n]})),r.label=t,r}));return t},n.prototype.render=function(t){var n=this,r=this.model.getOptions(),i=this.getContainerSVG(),o=this.model.getDisplayData(),a=this.getStackData(),s=o.datasets.map((function(t){return t.label})),u=i.selectAll("g.bars").data(function(){var t=Oc([]),e=Hh,n=Uh,r=zh;function i(i){var o,a,s=t.apply(this,arguments),u=i.length,l=s.length,c=new Array(l);for(o=0;o<l;++o){for(var h,f=s[o],p=c[o]=new Array(u),d=0;d<u;++d)p[d]=h=[0,+r(i[d],f,d,i)],h.data=i[d];p.key=f}for(o=0,a=e(c);o<l;++o)c[a[o]].index=o;return n(c,a),c}return i.keys=function(e){return arguments.length?(t="function"==typeof e?e:Oc(Kc.call(e)),i):t},i.value=function(t){return arguments.length?(r="function"==typeof t?t:Oc(+t),i):r},i.order=function(t){return arguments.length?(e=null==t?Hh:"function"==typeof t?t:Oc(Kc.call(t)),i):e},i.offset=function(t){return arguments.length?(n=null==t?Uh:t,i):n},i}().keys(s)(a),(function(t){return t.key}));u.exit().attr("opacity",0).remove(),u.enter().append("g").classed("bars",!0).attr("role",e.GROUP);var l=i.selectAll("g.bars").selectAll("path.bar").data((function(t){return function(t){return Object.keys(t).map((function(e){"object"==typeof t[e]&&(t[e].datasetLabel=t.key,t[e].label=t[e].data.label,t[e].value=t[e].data[t.key])})),t}(t)}),(function(t){return t.label}));l.exit().remove();var c=this.services.cartesianScales.getRangeScale();l.enter().append("path").merge(l).classed("bar",!0).transition(this.services.transitions.getTransition("bar-update-enter",t)).attr("fill",(function(t){return n.model.getFillScale()[t.datasetLabel](t.label)})).attr("height",(function(t,e){var i,o=t.datasetLabel,a=s.indexOf(o);return i=c.scaleType===p.LABELS?Math.abs(c.scale.range()[0]-n.services.cartesianScales.getRangeValue(t.label,e)):n.services.cartesianScales.getRangeValue(t[0])-n.services.cartesianScales.getRangeValue(t[1]),a>0&&i>=r.bars.dividerSize?i-r.bars.dividerSize:i})).attr("d",(function(t,e){var i=n.getBarWidth(),o=n.services.cartesianScales.getDomainValue(t,e)-i/2,a=o+i,s=n.services.cartesianScales.getRangeValue(t[0],e),u=n.services.cartesianScales.getRangeValue(t[1],e);return Math.abs(u-s)>0&&Math.abs(u-s)>r.bars.dividerSize&&(n.services.cartesianScales.getOrientation()===h.VERTICAL?u+=1:u-=1),mn.generateSVGPathString({x0:o,x1:a,y0:s,y1:u},n.services.cartesianScales.getOrientation())})).attr("opacity",1).attr("role",e.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t.value})),this.addEventListeners()},n.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("path.bar").on("mouseover",(function(e){var n=pu(this);n.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")).attr("fill",Zr(n.attr("fill")).darker(.7).toString()),t.services.events.dispatchEvent(x.Bar.BAR_MOUSEOVER,{element:n,datum:e})})).on("mousemove",(function(e){var n=pu(this),r=pu(this).datum();n.classed("hovered",!0);var i=r.data,o=i.label;delete i.label;var a=Object.keys(i).map((function(t){return{datasetLabel:t,value:i[t],label:o}}));t.services.events.dispatchEvent(x.Bar.BAR_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent("show-tooltip",{multidata:a,hoveredElement:n,type:v.DATAPOINT})})).on("click",(function(e){t.services.events.dispatchEvent(x.Bar.BAR_CLICK,{element:pu(this),datum:e})})).on("mouseout",(function(e){var n=pu(this);n.classed("hovered",!1),n.transition(t.services.transitions.getTransition("graph_element_mouseout_fill_update")).attr("fill",(function(e){return t.model.getFillScale()[e.datasetLabel](e.label)})),t.services.events.dispatchEvent(x.Bar.BAR_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent("hide-tooltip",{hoveredElement:n})}))},n.prototype.destroy=function(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener("legend-item-onhover",this.handleLegendOnHover),t.removeEventListener("legend-item-onmouseout",this.handleLegendMouseOut)},n}(nf),sf=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="scatter",e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("circle.dot").transition(e.services.transitions.getTransition("legend-hover-scatter")).attr("opacity",(function(t){return t.datasetLabel!==n.datum().key?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("circle.dot").transition(e.services.transitions.getTransition("legend-mouseout-scatter")).attr("opacity",1)},e}return s(n,t),n.prototype.init=function(){var t=this.services.events;t.addEventListener("legend-item-onhover",this.handleLegendOnHover),t.addEventListener("legend-item-onmouseout",this.handleLegendMouseOut)},n.prototype.render=function(t){var n=this,r=(this.model.getOptions(),this.getContainerSVG().selectAll("g.dots").data(this.model.getDisplayData().datasets,(function(t){return t.label})));r.exit().attr("opacity",0).remove();var i=r.enter().append("g").classed("dots",!0).attr("role",e.GROUP).merge(r).selectAll("circle.dot").data((function(t,e){return n.addLabelsToDataPoints(t,e)})),o=i.enter().append("circle").attr("opacity",0).merge(i);this.styleCircles(o,t),this.addEventListeners()},n.prototype.styleCircles=function(t,n){var r=this,i=this.model.getOptions(),o=i.points.filled;t.raise().classed("dot",!0).classed("filled",(function(t){return r.model.getIsFilled(t.datasetLabel,t.label,t,o)})).classed("unfilled",(function(t){return!r.model.getIsFilled(t.datasetLabel,t.label,t,o)})).attr("cx",(function(t,e){return r.services.cartesianScales.getDomainValue(t,e)})).transition(this.services.transitions.getTransition("scatter-update-enter",n)).attr("cy",(function(t,e){return r.services.cartesianScales.getRangeValue(t,e)})).attr("r",i.points.radius).attr("fill",(function(t){if(r.model.getIsFilled(t.datasetLabel,t.label,t,o))return r.model.getFillColor(t.datasetLabel,t.label,t)})).attr("fill-opacity",o?.2:1).attr("stroke",(function(t){return r.model.getStrokeColor(t.datasetLabel,t.label,t)})).attr("opacity",1).attr("role",e.GRAPHICS_SYMBOL).attr("aria-roledescription","point").attr("aria-label",(function(t){return t.value})),this.addEventListeners()},n.prototype.addLabelsToDataPoints=function(t,e){var n=this.model.getDisplayData().labels;return t.data.map((function(e,r){return{date:e.date,label:n[r],datasetLabel:t.label,class:e.class,value:isNaN(e)?e.value:e}}))},n.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("circle").on("mouseover mousemove",(function(e){var n=pu(this);n.classed("hovered",!0).style("fill",(function(e){return t.model.getFillColor(e.datasetLabel,e.label,e)}));var r="mouseover"===eu.type?x.Scatter.SCATTER_MOUSEOVER:x.Scatter.SCATTER_MOUSEMOVE;t.services.events.dispatchEvent(r,{element:n,datum:e}),t.services.events.dispatchEvent("show-tooltip",{hoveredElement:n,type:v.DATAPOINT})})).on("click",(function(e){t.services.events.dispatchEvent(x.Scatter.SCATTER_CLICK,{element:pu(this),datum:e})})).on("mouseout",(function(e){var n=pu(this);n.classed("hovered",!1),t.configs.filled||n.style("fill",null),t.services.events.dispatchEvent(x.Scatter.SCATTER_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent("hide-tooltip",{hoveredElement:n})}))},n.prototype.destroy=function(){this.parent.selectAll("circle").on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener("legend-item-onhover",this.handleLegendOnHover),t.removeEventListener("legend-item-onmouseout",this.handleLegendMouseOut)},n}(Wh),uf=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="bubble",e}return s(e,t),e.prototype.getRadiusScale=function(t){var e=t.data(),n=e.map((function(t){return t.radius})).filter((function(t){return t})),r=this.model.getOptions(),i=Bu.getSVGElementSize(this.services.domUtils.getMainSVG(),{useAttr:!0});return ao().domain(vr(n)).range(r.bubble.radiusRange(i,e))},e.prototype.styleCircles=function(t,e){var n=this,r=this.model.getOptions(),i=this.getRadiusScale(t);t.raise().classed("dot",!0).attr("cx",(function(t,e){return n.services.cartesianScales.getDomainValue(t,e)})).transition(this.services.transitions.getTransition("bubble-update-enter",e)).attr("cy",(function(t,e){return n.services.cartesianScales.getRangeValue(t,e)})).attr("r",(function(t){return i(t.radius)})).attr("fill",(function(t){return n.model.getFillScale()[t.datasetLabel](t.label)})).attr("fill-opacity",r.bubble.fillOpacity).attr("stroke",(function(t){return n.model.getStrokeColor(t.datasetLabel,t.label,t.value)})).attr("opacity",1)},e.prototype.addLabelsToDataPoints=function(t,e){var n=this.model.getOptions(),r=this.model.getDisplayData().labels;return t.data.map((function(e,i){return{date:e.date,label:r[i],datasetLabel:t.label,value:isNaN(e)?e.value:e,radius:e.radius||n.points.radius}}))},e}(sf),lf=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="line",e}return s(n,t),n.prototype.init=function(){var t=this;this.services.events.addEventListener("legend-item-onhover",(function(e){var n=e.detail.hoveredElement;t.parent.selectAll("g.lines").transition(t.services.transitions.getTransition("legend-hover-line")).attr("opacity",(function(t){return t.label!==n.datum().key?Bn.opacity.unselected:Bn.opacity.selected}))})),this.services.events.addEventListener("legend-item-onmouseout",(function(e){t.parent.selectAll("g.lines").transition(t.services.transitions.getTransition("legend-mouseout-line")).attr("opacity",Bn.opacity.selected)}))},n.prototype.render=function(t){var n=this;void 0===t&&(t=!0);var r=this.getContainerSVG();this.lineGenerator=function(){var t=Xc,e=$c,n=Oc(!0),r=null,i=Wc,o=null;function a(a){var s,u,l,c=a.length,h=!1;for(null==r&&(o=i(l=Ec())),s=0;s<=c;++s)!(s<c&&n(u=a[s],s,a))===h&&((h=!h)?o.lineStart():o.lineEnd()),h&&o.point(+t(u,s,a),+e(u,s,a));if(l)return o=null,l+""||null}return a.x=function(e){return arguments.length?(t="function"==typeof e?e:Oc(+e),a):t},a.y=function(t){return arguments.length?(e="function"==typeof t?t:Oc(+t),a):e},a.defined=function(t){return arguments.length?(n="function"==typeof t?t:Oc(!!t),a):n},a.curve=function(t){return arguments.length?(i=t,null!=r&&(o=i(r)),a):i},a.context=function(t){return arguments.length?(null==t?r=o=null:o=i(r=t),a):r},a}().x((function(t,e){return n.services.cartesianScales.getDomainValue(t,e)})).y((function(t,e){return n.services.cartesianScales.getRangeValue(t,e)})).curve(this.services.curves.getD3Curve());var i=r.selectAll("g.lines").data(this.model.getDisplayData().datasets,(function(t){return t.label}));i.exit().attr("opacity",0).remove();var o=i.enter().append("g").classed("lines",!0),a=this;o.append("path").attr("opacity",0).merge(r.selectAll("g.lines path")).attr("stroke",(function(t){var e=pu(this.parentNode).datum();return a.model.getStrokeColor(e.label)})).datum((function(t){var e=pu(this.parentNode).datum();return this._datasetLabel=e.label,e.data})).attr("role",e.GRAPHICS_SYMBOL).attr("aria-roledescription","line").attr("aria-label",(function(t){return t.map((function(t){return t.value||t})).join(",")})).transition(this.services.transitions.getTransition("line-update-enter",t)).attr("opacity",1).attr("class","line").attr("d",this.lineGenerator)},n}(Wh);function cf(t,e){var n=this,r=xi(this._current,t);return function(t){return n._current=r(t),e(n._current)}}var hf=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="pie",e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("path.slice").transition(e.services.transitions.getTransition("legend-hover-bar")).attr("opacity",(function(t){return t.data.label!==n.datum().key?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.slice").transition(e.services.transitions.getTransition("legend-mouseout-bar")).attr("opacity",1)},e}return s(n,t),n.prototype.init=function(){var t=this.services.events;t.addEventListener("legend-item-onhover",this.handleLegendOnHover),t.addEventListener("legend-item-onmouseout",this.handleLegendMouseOut)},n.prototype.getDataList=function(){var t=this.model.getDisplayData();return t.datasets[0].data.map((function(e,n){return{label:t.labels[n],value:e.value?e.value:e}}))},n.prototype.getInnerRadius=function(){return this.model.getOptions().pie.innerRadius},n.prototype.render=function(t){var n=this;void 0===t&&(t=!0);var r=this,i=this.getContainerSVG(),o=this.model.getOptions(),a=this.getDataList(),s=this.computeRadius();this.arc=Yc().innerRadius(this.getInnerRadius()).outerRadius(s),this.hoverArc=Yc().innerRadius(this.getInnerRadius()).outerRadius(s+o.pie.hoverArc.outerRadiusOffset);var u=function(){var t=Jc,e=Zc,n=null,r=Oc(0),i=Oc(jc),o=Oc(0);function a(a){var s,u,l,c,h,f=a.length,p=0,d=new Array(f),v=new Array(f),g=+r.apply(this,arguments),y=Math.min(jc,Math.max(-jc,i.apply(this,arguments)-g)),m=Math.min(Math.abs(y)/f,o.apply(this,arguments)),_=m*(y<0?-1:1);for(s=0;s<f;++s)(h=v[d[s]=s]=+t(a[s],s,a))>0&&(p+=h);for(null!=e?d.sort((function(t,n){return e(v[t],v[n])})):null!=n&&d.sort((function(t,e){return n(a[t],a[e])})),s=0,l=p?(y-f*_)/p:0;s<f;++s,g=c)u=d[s],c=g+((h=v[u])>0?h*l:0)+_,v[u]={data:a[u],index:s,value:h,startAngle:g,endAngle:c,padAngle:m};return v}return a.value=function(e){return arguments.length?(t="function"==typeof e?e:Oc(+e),a):t},a.sortValues=function(t){return arguments.length?(e=t,n=null,a):e},a.sort=function(t){return arguments.length?(n=t,e=null,a):n},a.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:Oc(+t),a):r},a.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Oc(+t),a):i},a.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:Oc(+t),a):o},a}().value((function(t){return t.value})).sort(null).padAngle(o.pie.padAngle)(a).sort((function(t,e){return t.index-e.index})),l=Bu.appendOrSelect(i,"g.slices").attr("role",e.GROUP).selectAll("path.slice").data(u,(function(t){return t.data.label}));l.exit().attr("opacity",0).remove(),l.enter().append("path").classed("slice",!0).attr("opacity",0).merge(l).attr("fill",(function(t){return n.model.getFillScale()(t.data.label)})).attr("d",this.arc).transition(this.services.transitions.getTransition("pie-slice-enter-update",t)).attr("opacity",1).attr("role",e.GRAPHICS_SYMBOL).attr("aria-roledescription","slice").attr("aria-label",(function(t){return t.value+", "+mn.convertValueToPercentage(t.data.value,a)+"%"})).attrTween("d",(function(t){return cf.bind(this)(t,r.arc)}));var c=Bu.appendOrSelect(i,"g.labels").attr("role",e.GROUP).selectAll("text.pie-label").data(u,(function(t){return t.data.label}));c.exit().attr("opacity",0).remove();var h=c.enter().append("text").classed("pie-label",!0),f=[];h.merge(c).style("text-anchor","middle").text((function(t){return o.pie.labels.formatter?o.pie.labels.formatter(t):mn.convertValueToPercentage(t.data.value,a)+"%"})).datum((function(t){var e=this.getComputedTextLength();t.textOffsetX=e/2,t.textOffsetY=parseFloat(getComputedStyle(this).fontSize)/2;var n=s+7,r=(t.endAngle-t.startAngle)/2+t.startAngle;return t.xPosition=(t.textOffsetX+n)*Math.sin(r),t.yPosition=(t.textOffsetY+n)*-Math.cos(r),t})).attr("transform",(function(t,e){var n=a.length,r=(t.endAngle-t.startAngle)*(180/Math.PI);if(e>=n-2&&r<o.pie.callout.minSliceDegree){var i=void 0,s=void 0;return t.index===n-1?(i=t.xPosition+o.pie.callout.offsetX+o.pie.callout.textMargin+t.textOffsetX,s=t.yPosition-o.pie.callout.offsetY,t.direction=b.RIGHT,f.push(t)):(i=t.xPosition-o.pie.callout.offsetX-t.textOffsetX-o.pie.callout.textMargin,s=t.yPosition-o.pie.callout.offsetY,t.direction=b.LEFT,f.push(t)),"translate("+i+", "+s+")"}return"translate("+t.xPosition+", "+t.yPosition+")"})),this.renderCallouts(f);var p=s+o.pie.xOffset,d=s+o.pie.yOffset;f.length>0&&(d+=o.pie.yOffsetCallout),i.attr("transform","translate("+p+", "+d+")"),this.addEventListeners()},n.prototype.renderCallouts=function(t){var n=Bu.appendOrSelect(this.getContainerSVG(),"g.callouts").attr("role",e.GROUP),r=this.model.getOptions(),i=n.selectAll("g.callout").data(t);i.exit().remove();var o=i.enter().append("g").classed("callout",!0).attr("role",e.GRAPHICS_SYMBOL+" "+e.GROUP).attr("aria-roledescription","label callout");o.merge(i).datum((function(t){var e=t.xPosition,n=t.yPosition;return t.direction===b.RIGHT?(t.startPos={x:e,y:n+t.textOffsetY},t.endPos={x:e+r.pie.callout.offsetX,y:n-r.pie.callout.offsetY+t.textOffsetY},t.intersectPointX=t.endPos.x-r.pie.callout.horizontalLineLength):(t.startPos={x:e,y:n+t.textOffsetY},t.endPos={x:e-r.pie.callout.offsetX,y:n-r.pie.callout.offsetY+t.textOffsetY},t.intersectPointX=t.endPos.x+r.pie.callout.horizontalLineLength),t})),o.append("line").classed("vertical-line",!0).merge(n.selectAll("line.vertical-line")).datum((function(t){return pu(this.parentNode).datum()})).style("stroke-width","1px").attr("x1",(function(t){return t.startPos.x})).attr("y1",(function(t){return t.startPos.y})).attr("x2",(function(t){return t.intersectPointX})).attr("y2",(function(t){return t.endPos.y})),o.append("line").classed("horizontal-line",!0).merge(i.selectAll("line.horizontal-line")).datum((function(t){return pu(this.parentNode).datum()})).style("stroke-width","1px").attr("x1",(function(t){return t.intersectPointX})).attr("y1",(function(t){return t.endPos.y})).attr("x2",(function(t){return t.endPos.x})).attr("y2",(function(t){return t.endPos.y}))},n.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("path.slice").on("mouseover",(function(e){t.services.events.dispatchEvent(x.Pie.SLICE_MOUSEOVER,{element:pu(this),datum:e})})).on("mousemove",(function(e){var n=pu(this);n.classed("hovered",!0).transition(t.services.transitions.getTransition("pie_slice_mouseover")).attr("d",t.hoverArc),t.services.events.dispatchEvent(x.Pie.SLICE_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent("show-tooltip",{hoveredElement:n,type:v.DATAPOINT})})).on("click",(function(e){t.services.events.dispatchEvent(x.Pie.SLICE_CLICK,{element:pu(this),datum:e})})).on("mouseout",(function(e){var n=pu(this);n.classed("hovered",!1).transition(t.services.transitions.getTransition("pie_slice_mouseover")).attr("d",t.arc),t.services.events.dispatchEvent(x.Pie.SLICE_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent("hide-tooltip",{hoveredElement:n})}))},n.prototype.computeRadius=function(){var t=this.model.getOptions(),e=Bu.getSVGElementSize(this.parent,{useAttrs:!0}),n=e.width,r=e.height;return Math.min(n,r)/2+t.pie.radiusOffset},n}(Wh),ff=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="donut",e}return s(e,t),e.prototype.render=function(e){void 0===e&&(e=!0),t.prototype.render.call(this,e);var n=this,r=Bu.appendOrSelect(this.getContainerSVG(),"g.center"),i=this.model.getOptions(),o=this.computeRadius();Bu.appendOrSelect(r,"text.donut-figure").attr("text-anchor","middle").style("font-size",(function(){return i.donut.center.numberFontSize(o)})).transition(this.services.transitions.getTransition("donut-figure-enter-update",e)).tween("text",(function(){return n.centerNumberTween(pu(this))})),Bu.appendOrSelect(r,"text.donut-title").attr("text-anchor","middle").style("font-size",(function(){return i.donut.center.titleFontSize(o)})).attr("y",i.donut.center.titleYPosition(o)).text(mn.getProperty(i,"donut","center","label"))},e.prototype.getInnerRadius=function(){return.75*this.computeRadius()},e.prototype.centerNumberTween=function(t){var e=this.model.getOptions(),n=mn.getProperty(e,"donut","center","number");n||(n=this.getDataList().reduce((function(t,e){return t+e.value}),0));var r=gi(parseInt(t.text().replace(/[, ]+/g,""),10)||0,n);return function(n){var i=e.donut.center.numberFormatter;t.text(i(r(n)))}},e}(hf),pf=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="spacer",e}return s(e,t),e.prototype.render=function(){this.getContainerSVG().append("rect").attr("x",0).attr("y",0).attr("width",this.configs.size||Hn.default.size).attr("height",this.configs.size||Hn.default.size).attr("opacity",0)},e}(Wh);function df(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function vf(t,e){var n,r,i,o,a,s=new _f(t),u=+t.value&&(s.value=t.value),l=[s];for(null==e&&(e=gf);n=l.pop();)if(u&&(n.value=+n.data.value),(i=e(n.data))&&(a=i.length))for(n.children=new Array(a),o=a-1;o>=0;--o)l.push(r=n.children[o]=new _f(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(mf)}function gf(t){return t.children}function yf(t){t.data=t.data.data}function mf(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function _f(t){this.data=t,this.depth=this.height=0,this.parent=null}function bf(t){if("function"!=typeof t)throw new Error;return t}function xf(){return 0}function wf(t){return function(){return t}}function Tf(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function Ef(t,e,n,r,i){for(var o,a=t.children,s=-1,u=a.length,l=t.value&&(r-e)/t.value;++s<u;)(o=a[s]).y0=n,o.y1=i,o.x0=e,o.x1=e+=o.value*l}function Of(t,e,n,r,i){for(var o,a=t.children,s=-1,u=a.length,l=t.value&&(i-n)/t.value;++s<u;)(o=a[s]).x0=e,o.x1=r,o.y0=n,o.y1=n+=o.value*l}_f.prototype=vf.prototype={constructor:_f,count:function(){return this.eachAfter(df)},each:function(t){var e,n,r,i,o=this,a=[o];do{for(e=a.reverse(),a=[];o=e.pop();)if(t(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r])}while(a.length);return this},eachAfter:function(t){for(var e,n,r,i=this,o=[i],a=[];i=o.pop();)if(a.push(i),e=i.children)for(n=0,r=e.length;n<r;++n)o.push(e[n]);for(;i=a.pop();)t(i);return this},eachBefore:function(t){for(var e,n,r=this,i=[r];r=i.pop();)if(t(r),e=r.children)for(n=e.length-1;n>=0;--n)i.push(e[n]);return this},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;t=n.pop(),e=r.pop();for(;t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){var t=[];return this.each((function(e){t.push(e)})),t},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return vf(this).eachBefore(yf)}};var Sf=function t(e){function n(t,n,r,i,o){!function(t,e,n,r,i,o){for(var a,s,u,l,c,h,f,p,d,v,g,y=[],m=e.children,_=0,b=0,x=m.length,w=e.value;_<x;){u=i-n,l=o-r;do{c=m[b++].value}while(!c&&b<x);for(h=f=c,g=c*c*(v=Math.max(l/u,u/l)/(w*t)),d=Math.max(f/g,g/h);b<x;++b){if(c+=s=m[b].value,s<h&&(h=s),s>f&&(f=s),g=c*c*v,(p=Math.max(f/g,g/h))>d){c-=s;break}d=p}y.push(a={value:c,dice:u<l,children:m.slice(_,b)}),a.dice?Ef(a,n,r,i,w?r+=l*c/w:o):Of(a,n,r,w?n+=u*c/w:i,o),w-=c,_=b}}(e,t,n,r,i,o)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}((1+Math.sqrt(5))/2);function Mf(){var t=Sf,e=!1,n=1,r=1,i=[0],o=xf,a=xf,s=xf,u=xf,l=xf;function c(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(h),i=[0],e&&t.eachBefore(Tf),t}function h(e){var n=i[e.depth],r=e.x0+n,c=e.y0+n,h=e.x1-n,f=e.y1-n;h<r&&(r=h=(r+h)/2),f<c&&(c=f=(c+f)/2),e.x0=r,e.y0=c,e.x1=h,e.y1=f,e.children&&(n=i[e.depth+1]=o(e)/2,r+=l(e)-n,c+=a(e)-n,(h-=s(e)-n)<r&&(r=h=(r+h)/2),(f-=u(e)-n)<c&&(c=f=(c+f)/2),t(e,r,c,h,f))}return c.round=function(t){return arguments.length?(e=!!t,c):e},c.size=function(t){return arguments.length?(n=+t[0],r=+t[1],c):[n,r]},c.tile=function(e){return arguments.length?(t=bf(e),c):t},c.padding=function(t){return arguments.length?c.paddingInner(t).paddingOuter(t):c.paddingInner()},c.paddingInner=function(t){return arguments.length?(o="function"==typeof t?t:wf(+t),c):o},c.paddingOuter=function(t){return arguments.length?c.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):c.paddingTop()},c.paddingTop=function(t){return arguments.length?(a="function"==typeof t?t:wf(+t),c):a},c.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:wf(+t),c):s},c.paddingBottom=function(t){return arguments.length?(u="function"==typeof t?t:wf(+t),c):u},c.paddingLeft=function(t){return arguments.length?(l="function"==typeof t?t:wf(+t),c):l},c}var Af=function(t){function e(n,r,i,o){var a=t.call(this,n,r,o)||this;return a.type="layout",a.configs=o,a.children=i,a._instanceID=e.instanceID++,(a.configs.direction===m.ROW_REVERSE||a.configs.direction===m.COLUMN_REVERSE)&&(a.children=a.children.reverse()),a.init(),a}return s(e,t),e.prototype.init=function(){this.children.forEach((function(t){t.components.forEach((function(t){t.init()}))}))},e.prototype.getPreferedAndFixedSizeSum=function(){var t=this.parent,e=0;return t.selectAll("svg.layout-child-"+this._instanceID).filter((function(t){var e=mn.getProperty(t,"data","growth","x");return e===_.PREFERRED||e===_.FIXED})).each((function(t){e+=t.data.size})),e},e.prototype.getNumOfStretchChildren=function(){return this.parent.selectAll("svg.layout-child-"+this._instanceID).filter((function(t){return mn.getProperty(t,"data","growth","x")===_.STRETCH})).size()},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.parent,r=Bu.getSVGElementSize(n,{useAttrs:!0}),i=r.width,o=r.height,a=vf({children:this.children}).sum((function(t){return t.size})),s=this.configs.direction===m.ROW||this.configs.direction===m.ROW_REVERSE?Ef:Of;Mf().tile(s).size([i,o])(a);var u=this.configs.direction===m.ROW||this.configs.direction===m.ROW_REVERSE,l=n.selectAll("svg.layout-child-"+this._instanceID).data(a.leaves(),(function(t){return t.data.id}));l.attr("width",(function(t){return t.x1-t.x0})).attr("height",(function(t){return t.y1-t.y0})),l.enter().append("svg").attr("class",(function(t){return"layout-child layout-child-"+e._instanceID+" "+t.data.id})).attr("x",(function(t){return t.x0})).attr("y",(function(t){return t.y0})).merge(n.selectAll("svg.layout-child-"+this._instanceID)).each((function(e){var n=this;e.data.components.forEach((function(r){r.setParent(pu(n));var i=mn.getProperty(e,"data","growth","x");i!==_.PREFERRED&&i!==_.FIXED||r.render(t)}))})),n.selectAll("svg.layout-child-"+this._instanceID).each((function(t){var e=mn.getProperty(t,"data","growth","x"),n=Bu.getSVGElementSize(pu(this),{useBBox:!0});if(e===_.PREFERRED){var r=u?n.width:n.height,a=u?i:o;t.data.size=r/a*100}})),l.exit().remove(),this.children.filter((function(t){return mn.getProperty(t,"growth","x")===_.STRETCH})).forEach((function(t,n){t.size=(100-+e.getPreferedAndFixedSizeSum())/+e.getNumOfStretchChildren()})),a=vf({children:this.children}).sum((function(t){return t.size})),Mf().tile(s).size([i,o]).padding(0)(a),n.selectAll("svg.layout-child-"+this._instanceID).data(a.leaves(),(function(t){return t.data.id})).attr("x",(function(t){return t.x0})).attr("y",(function(t){return t.y0})).attr("width",(function(t){return t.x1-t.x0})).attr("height",(function(t){return t.y1-t.y0})).each((function(e,n){e.data.components.forEach((function(n){mn.getProperty(e,"data","growth","x")===_.STRETCH&&n.render(t)}))}))},e.prototype.setModel=function(e){t.prototype.setModel.call(this,e),this.children.forEach((function(t){t.components.forEach((function(t){return t.setModel(e)}))}))},e.prototype.setServices=function(e){t.prototype.setServices.call(this,e),this.children.forEach((function(t){t.components.forEach((function(t){return t.setServices(e)}))}))},e.prototype.destroy=function(){this.children.forEach((function(t){t.components.forEach((function(t){return t.destroy()}))}))},e.instanceID=Math.floor(99999999999*Math.random()),e}(Wh),Cf=Array.prototype.slice;function Lf(t){return t}function kf(t){return"translate("+(t+.5)+",0)"}function Pf(t){return"translate(0,"+(t+.5)+")"}function Df(t){return function(e){return+t(e)}}function Rf(t){var e=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}function jf(){return!this.__axis}function If(t,e){var n=[],r=null,i=null,o=6,a=6,s=3,u=1===t||4===t?-1:1,l=4===t||2===t?"x":"y",c=1===t||3===t?kf:Pf;function h(h){var f=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,p=null==i?e.tickFormat?e.tickFormat.apply(e,n):Lf:i,d=Math.max(o,0)+s,v=e.range(),g=+v[0]+.5,y=+v[v.length-1]+.5,m=(e.bandwidth?Rf:Df)(e.copy()),_=h.selection?h.selection():h,b=_.selectAll(".domain").data([null]),x=_.selectAll(".tick").data(f,e).order(),w=x.exit(),T=x.enter().append("g").attr("class","tick"),E=x.select("line"),O=x.select("text");b=b.merge(b.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),x=x.merge(T),E=E.merge(T.append("line").attr("stroke","currentColor").attr(l+"2",u*o)),O=O.merge(T.append("text").attr("fill","currentColor").attr(l,u*d).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),h!==_&&(b=b.transition(h),x=x.transition(h),E=E.transition(h),O=O.transition(h),w=w.transition(h).attr("opacity",1e-6).attr("transform",(function(t){return isFinite(t=m(t))?c(t):this.getAttribute("transform")})),T.attr("opacity",1e-6).attr("transform",(function(t){var e=this.parentNode.__axis;return c(e&&isFinite(e=e(t))?e:m(t))}))),w.remove(),b.attr("d",4===t||2==t?a?"M"+u*a+","+g+"H0.5V"+y+"H"+u*a:"M0.5,"+g+"V"+y:a?"M"+g+","+u*a+"V0.5H"+y+"V"+u*a:"M"+g+",0.5H"+y),x.attr("opacity",1).attr("transform",(function(t){return c(m(t))})),E.attr(l+"2",u*o),O.attr(l,u*d).text(p),_.filter(jf).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),_.each((function(){this.__axis=m}))}return h.scale=function(t){return arguments.length?(e=t,h):e},h.ticks=function(){return n=Cf.call(arguments),h},h.tickArguments=function(t){return arguments.length?(n=null==t?[]:Cf.call(t),h):n.slice()},h.tickValues=function(t){return arguments.length?(r=null==t?null:Cf.call(t),h):r&&r.slice()},h.tickFormat=function(t){return arguments.length?(i=t,h):i},h.tickSize=function(t){return arguments.length?(o=a=+t,h):o},h.tickSizeInner=function(t){return arguments.length?(o=+t,h):o},h.tickSizeOuter=function(t){return arguments.length?(a=+t,h):a},h.tickPadding=function(t){return arguments.length?(s=+t,h):s},h}function Nf(t){return If(1,t)}function Ff(t){return If(2,t)}function Bf(t){return If(3,t)}function Vf(t){return If(4,t)}var Uf=function(t){function n(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="axes",r&&(i.configs=r),i.margins=i.configs.margins,i}return s(n,t),n.prototype.render=function(t){void 0===t&&(t=!0);var n,r,i=this.configs.position,o=this.model.getOptions(),a=mn.getProperty(o,"axes",i),s=this.getContainerSVG(),u=Bu.getSVGElementSize(this.parent,{useAttrs:!0}),l=u.width,h=u.height;i===c.BOTTOM||i===c.TOP?(n=this.configs.axes[c.LEFT]?this.margins.left:0,r=this.configs.axes[c.RIGHT]?l-this.margins.right:l):(n=h-this.margins.bottom,r=this.margins.top);var f,d=this.services.cartesianScales.getScaleByPosition(i);switch(this.scaleType===p.LABELS?d.rangeRound([n,r]):d.range([n,r]),i){case c.LEFT:f=Vf;break;case c.BOTTOM:f=Bf;break;case c.RIGHT:f=Ff;break;case c.TOP:f=Nf}var v=f(d).tickSizeOuter(0).tickFormat(mn.getProperty(a,"ticks","formatter"));if(d.ticks){var g=mn.getProperty(a,"ticks","number")||Un.ticks.number;if(v.ticks(g),this.scaleType===p.TIME){var y=d.ticks(g).concat(d.domain()).map((function(t){return+t})).sort();y=mn.removeArrayDuplicates(y),mn.getProperty(o,"timeScale","addSpaceOnEdges")&&y.length>2&&(y.splice(y.length-1,1),y.splice(0,1)),v.tickValues(y)}}var m=Bu.appendOrSelect(s,"g.axis."+i),_=!m.select("g.ticks").empty(),b=Bu.appendOrSelect(m,"g.ticks");_||b.attr("role",e.GRAPHICS_OBJECT+" "+e.GROUP);var x=Bu.appendOrSelect(m,"g.ticks.invisible").style("opacity","0").attr("aria-hidden",!0);switch(i){case c.LEFT:b.attr("transform","translate("+this.margins.left+", 0)");break;case c.BOTTOM:b.attr("transform","translate(0, "+(h-this.margins.bottom)+")");break;case c.RIGHT:b.attr("transform","translate("+(l-this.margins.right)+", 0)");break;case c.TOP:b.attr("transform","translate(0, "+this.margins.top+")")}if(a.title){var w=Bu.appendOrSelect(m,"text.axis-title").text(a.title);switch(i){case c.LEFT:w.attr("transform","rotate(-90)").attr("y",0).attr("x",-d.range()[0]/2).attr("dy","1em").style("text-anchor","middle");break;case c.BOTTOM:w.attr("transform","translate("+(this.margins.left/2+d.range()[1]/2)+", "+h+")").style("text-anchor","middle");break;case c.RIGHT:w.attr("transform","rotate(90)").attr("y",-l).attr("x",d.range()[0]/2).attr("dy","1em").style("text-anchor","middle");break;case c.TOP:var T=Bu.getSVGElementSize(w,{useBBox:!0}).height;w.attr("transform","translate("+(this.margins.left/2+d.range()[1]/2)+", "+T/2+")").style("text-anchor","middle")}}if(b=t&&_?b.transition(this.services.transitions.getTransition("axis-update")).call(v):b.call(v),x.call(v),i===c.BOTTOM||i===c.TOP){var E=!1;if(d.step){E=x.selectAll("g.tick text").nodes().some((function(t){return Bu.getSVGElementSize(t,{useBBox:!0}).width>=d.step()}))}else{var O=mn.getProperty(a,"ticks","rotateIfSmallerThan")||Un.ticks.rotateIfSmallerThan;E=l/d.ticks().length/2<O}E?m.selectAll("g.ticks g.tick text").attr("transform","rotate(45)").style("text-anchor",i===c.TOP?"end":"start"):m.selectAll("g.ticks g.tick text").attr("transform",null).style("text-anchor",null)}},n.prototype.getInvisibleAxisRef=function(){var t=this.configs.position;return this.getContainerSVG().select("g.axis."+t+" g.ticks.invisible")},n.prototype.getTitleRef=function(){var t=this.configs.position;return this.getContainerSVG().select("g.axis."+t+" text.axis-title")},n}(Wh),Hf=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="2D-axes",e.children={},e.margins={top:0,right:0,bottom:0,left:0},e}return s(e,t),e.prototype.render=function(t){var e=this;void 0===t&&(t=!1);var n={},r=Object.keys(c),i=mn.getProperty(this.model.getOptions(),"axes");i?r.forEach((function(t){var e=i[c[t]];e&&(n[c[t]]=!0,!0===e.primary||e.secondary)})):(this.model.getOptions().axes={left:{primary:!0},bottom:{secondary:!0,type:this.model.getDisplayData().labels?p.LABELS:void 0}},n[c.LEFT]=!0,n[c.BOTTOM]=!0),this.configs.axes=n,r.forEach((function(t){var n=c[t];if(e.configs.axes[n]&&!e.children[n]){var r=new Uf(e.model,e.services,{position:n,axes:e.configs.axes,margins:e.margins});r.setModel(e.model),r.setServices(e.services),r.setParent(e.parent),e.children[n]=r}})),Object.keys(this.children).forEach((function(n){e.children[n].render(t)}));var o={};Object.keys(this.children).forEach((function(t){var n,r=e.children[t],i=r.configs.position,a=r.getInvisibleAxisRef(),s=Bu.getSVGElementSize(a,{useBBox:!0}),u=s.width,l=s.height;switch(n=r.getTitleRef().empty()?0:Bu.getSVGElementSize(r.getTitleRef(),{useBBox:!0}).height,i){case c.TOP:o.top=l+n;break;case c.BOTTOM:o.bottom=l+n;break;case c.LEFT:o.left=u+n;break;case c.RIGHT:o.right=u+n}})),Object.keys(o).some((function(t){return e.margins[t]!==o[t]}))&&(this.margins=Object.assign(this.margins,o),Object.keys(this.children).forEach((function(t){e.children[t].margins=e.margins})),this.render(!0))},e}(Wh),zf=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grid",e}return s(e,t),e.prototype.render=function(){this.drawBackdrop(),Bu.appendOrSelect(this.backdrop,"g.x.grid"),Bu.appendOrSelect(this.backdrop,"g.y.grid"),this.drawXGrid(),this.drawYGrid(),mn.getProperty(this.model.getOptions(),"tooltip","gridline","enabled")&&this.addGridEventListeners()},e.prototype.drawXGrid=function(){var t=this.parent,e=this.backdrop.attr("height"),n=Bf(this.services.cartesianScales.getMainXScale()).tickSizeInner(-e).tickSizeOuter(0),r=mn.getProperty(this.model.getOptions(),"grid","x","numberOfTicks");n.ticks(r);var i=t.select(".x.grid").attr("transform","translate("+-this.backdrop.attr("x")+", "+e+")").call(n);this.cleanGrid(i)},e.prototype.drawYGrid=function(){var t=this.parent,e=this.backdrop.attr("width"),n=Vf(this.services.cartesianScales.getMainYScale()).tickSizeInner(-e).tickSizeOuter(0),r=mn.getProperty(this.model.getOptions(),"grid","y","numberOfTicks");n.ticks(r);var i=t.select(".y.grid").attr("transform","translate(0, "+-this.backdrop.attr("y")+")").call(n);this.cleanGrid(i)},e.prototype.getGridlineThreshold=function(t){var e,n=this.parent,r=n.selectAll(".x.grid .tick").nodes().sort((function(t,e){return Number(mn.getTranslationValues(t).tx)-Number(mn.getTranslationValues(e).tx)})),i=-1;r.forEach((function(e,n){t[0]>=+mn.getTranslationValues(e).tx&&i++})),e=i+1<r.length?i+1:r.length;var o,a=r[i],s=r[e];if(a)if(s)o=+mn.getTranslationValues(s).tx-+mn.getTranslationValues(a).tx;else{var u=n.select("rect.chart-grid-backdrop").node();o=Bu.getSVGElementSize(u).width-+mn.getTranslationValues(a).tx}else o=+mn.getTranslationValues(s).tx;return o*this.model.getOptions().tooltip.gridline.threshold},e.prototype.getActiveGridline=function(t){var e=mn.getProperty(this.model.getOptions,"tooltip","gridline","threshold")?mn.getProperty(this.model.getOptions,"tooltip","gridline","threshold"):this.getGridlineThreshold(t);return this.parent.selectAll(".x.grid .tick").filter((function(){var n=mn.getTranslationValues(this),r=Number(n.tx)-e,i=Number(n.tx)+e;return r<=t[0]&&t[0]<=i}))},e.prototype.addGridEventListeners=function(){var t=this,e=this.parent;Bu.appendOrSelect(e,"rect.chart-grid-backdrop").on("mousemove mouseover",(function(){var n=vu(t.services.domUtils.getMainSVG()),r=pu(this);e.selectAll(".x.grid .tick").classed("active",!1);var i,o=t.getActiveGridline(n);o.empty()?t.services.events.dispatchEvent("hide-tooltip",{}):(o.classed("active",!0),o.each((function(e){i=t.services.cartesianScales.getDataFromDomain(e)})),t.services.events.dispatchEvent("show-tooltip",{hoveredElement:r,multidata:i,type:v.GRIDLINE}))})).on("mouseout",(function(){e.selectAll(".x.grid .tick").classed("active",!1),t.services.events.dispatchEvent("hide-tooltip",{})}))},e.prototype.drawBackdrop=function(){var t=this.parent,e=this.services.cartesianScales.getMainXScale(),n=this.services.cartesianScales.getMainYScale(),r=e.range(),i=r[0],o=r[1],a=n.range(),s=a[0],u=a[1];this.backdrop=Bu.appendOrSelect(t,"svg.chart-grid-backdrop");var l=Bu.appendOrSelect(this.backdrop,"rect.chart-grid-backdrop");this.backdrop.merge(l).attr("x",i).attr("y",u).attr("width",o-i).attr("height",s-u).lower(),l.attr("width","100%").attr("height","100%")},e.prototype.cleanGrid=function(t){var e=this.model.getOptions();t.selectAll("line").attr("stroke",e.grid.strokeColor),t.selectAll("text").remove(),t.select(".domain").remove()},e}(Wh),Gf=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="zero-line",e}return s(e,t),e.prototype.render=function(t){var e=this.getContainerSVG(),n=this.services.cartesianScales.getDomainScale().range(),r=n[0],i=n[1],o=+this.services.cartesianScales.getRangeValue(0)+.5,a=mn.flipSVGCoordinatesBasedOnOrientation({x0:r,x1:i,y0:o,y1:o},this.services.cartesianScales.getOrientation());Bu.appendOrSelect(e,"line.domain").transition(this.services.transitions.getTransition("zero-line-update",t)).attr("y1",a.y0).attr("y2",a.y1).attr("x1",a.x0).attr("x2",a.x1)},e}(Wh),Yf=function(){function t(t,e){this.services={domUtils:Bu,events:Vu,transitions:Zl},this.model=new ns(this.services)}return t.prototype.init=function(t,e){var n=this;this.model.set({holder:t},!0),Object.keys(this.services).forEach((function(t){var e=n.services[t];n.services[t]=new e(n.model,n.services)})),this.services.events.addEventListener("model-update",(function(){n.update(!0)})),this.model.setData(e.data),this.services.events.addEventListener("chart-resize",(function(){n.update(!1)})),this.components=this.getComponents(),this.update()},t.prototype.getComponents=function(){return console.error("getComponents() method is not implemented"),null},t.prototype.update=function(t){var e=this;if(void 0===t&&(t=!0),this.components){Object.keys(this.services).forEach((function(t){e.services[t].update()})),this.components.forEach((function(e){return e.render(t)}));var n=this.services.transitions.getPendingTransitions(),r=Object.keys(n).map((function(t){return n[t].end().catch((function(t){return t}))}));Promise.all(r).then((function(){return e.services.events.dispatchEvent("render-finished")}))}},t.prototype.destroy=function(){this.components.forEach((function(t){return t.destroy()})),this.services.domUtils.getHolder().remove(),this.model.set({destroyed:!0},!0)},t.prototype.getChartComponents=function(t){var e={id:"title",components:[new $h(this.model,this.services)],growth:{x:_.PREFERRED,y:_.FIXED}},n={id:"legend",components:[new Xh(this.model,this.services)],growth:{x:_.PREFERRED,y:_.FIXED}},r={id:"graph-frame",components:t,growth:{x:_.STRETCH,y:_.FIXED}},i=!1!==this.model.getOptions().legend.enabled,o=m.COLUMN;if(i){var a=mn.getProperty(this.model.getOptions(),"legend","position");"left"===a?(o=m.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=y.VERTICAL)):"right"===a?(o=m.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=y.VERTICAL)):"bottom"===a&&(o=m.COLUMN_REVERSE)}var s={id:"spacer",components:[new pf(this.model,this.services)],growth:{x:_.PREFERRED,y:_.FIXED}},l={id:"full-frame",components:[new Af(this.model,this.services,u(i?[n]:[],[s,r]),{direction:o})],growth:{x:_.STRETCH,y:_.FIXED}},c=[];if(this.model.getOptions().title){c.push(e);var h={id:"spacer",components:[new pf(this.model,this.services)],growth:{x:_.PREFERRED,y:_.FIXED}};c.push(h)}return c.push(l),[new Af(this.model,this.services,c,{direction:m.COLUMN})]},t}(),qf=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.services=Object.assign(r.services,{cartesianScales:_c,curves:qh}),r}return s(e,t),e.prototype.getAxisChartComponents=function(t){var e={id:"title",components:[new $h(this.model,this.services)],growth:{x:_.PREFERRED,y:_.FIXED}},n={id:"legend",components:[new Xh(this.model,this.services)],growth:{x:_.PREFERRED,y:_.FIXED}},r={id:"graph-frame",components:t,growth:{x:_.STRETCH,y:_.FIXED}},i=!1!==this.model.getOptions().legend.enabled,o=m.COLUMN;if(i){var a=mn.getProperty(this.model.getOptions(),"legend","position");a===g.LEFT?(o=m.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=y.VERTICAL)):a===g.RIGHT?(o=m.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=y.VERTICAL)):a===g.BOTTOM&&(o=m.COLUMN_REVERSE)}var s={id:"spacer",components:[new pf(this.model,this.services)],growth:{x:_.PREFERRED,y:_.FIXED}},l={id:"full-frame",components:[new Af(this.model,this.services,u(i?[n]:[],[s,r]),{direction:o})],growth:{x:_.STRETCH,y:_.FIXED}},c=[];if(this.model.getOptions().title){c.push(e);var h={id:"spacer",components:[new pf(this.model,this.services)],growth:{x:_.PREFERRED,y:_.FIXED}};c.push(h)}return c.push(l),[new Af(this.model,this.services,c,{direction:m.COLUMN})]},e}(Yf),Wf=function(t){function e(e){return t.call(this,e)||this}return s(e,t),e.prototype.generateDataLabels=function(t){var e={};return t.labels.forEach((function(t){e[t]=wn.items.status.ACTIVE})),e},e.prototype.getDisplayData=function(){var t=wn.items.status.ACTIVE,e=this.get("dataLabels");if(!this.get("data"))return null;var n=mn.clone(this.get("data")),r=n.datasets[0];return r.data=r.data.filter((function(r,i){var o=n.labels[i];return e[o]===t})),n.labels=n.labels.filter((function(n){return e[n]===t})),n},e.prototype.setColorScale=function(){var t=this.getDisplayData().datasets[0];if(t.fillColors)this.colorScale=Pr().range(t.fillColors).domain(this.allDataLabels);else{var e=cr;this.colorScale=Pr().range(e).domain(this.allDataLabels)}},e.prototype.getFillColor=function(t){var e=this.getOptions();return e.getFillColor?e.getFillColor(t):this.getFillScale()(t)},e.prototype.getStrokeColor=function(t){var e=this.getOptions();return e.getStrokeColor?e.getStrokeColor(t):this.colorScale(t)},e}(ns),Xf=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new Wf(r.services),r.model.setOptions(mn.merge(mn.clone(Fn.simpleBarChart),n.options)),r.init(e,n),r}return s(e,t),e.prototype.getComponents=function(){var t=[new Hf(this.model,this.services),new zf(this.model,this.services),new rf(this.model,this.services),new Gf(this.model,this.services)],e=this.getAxisChartComponents(t);return e.push(new tf(this.model,this.services)),e},e}(qf),$f=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(mn.merge(mn.clone(Fn.groupedBarChart),n.options)),r.init(e,n),r}return s(e,t),e.prototype.getComponents=function(){var t=[new Hf(this.model,this.services),new zf(this.model,this.services),new of(this.model,this.services),new Gf(this.model,this.services)],e=this.getAxisChartComponents(t);return e.push(new tf(this.model,this.services)),e},e}(qf),Zf=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(mn.merge(mn.clone(Fn.stackedBarChart),n.options)),r.init(e,n),r}return s(e,t),e.prototype.getComponents=function(){var t=[new Hf(this.model,this.services),new zf(this.model,this.services),new af(this.model,this.services)],e=this.getAxisChartComponents(t);return e.push(new tf(this.model,this.services)),e},e}(qf),Jf=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(mn.merge(mn.clone(Fn.bubbleChart),n.options)),r.init(e,n),r}return s(e,t),e.prototype.getComponents=function(){var t=[new Hf(this.model,this.services),new zf(this.model,this.services),new uf(this.model,this.services)],e=this.getAxisChartComponents(t);return e.push(new ef(this.model,this.services)),e},e}(qf),Kf=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(mn.merge(mn.clone(Fn.lineChart),n.options)),r.init(e,n),r}return s(e,t),e.prototype.getComponents=function(){var t=[new Hf(this.model,this.services),new zf(this.model,this.services),new lf(this.model,this.services),new sf(this.model,this.services)],e=this.getAxisChartComponents(t);return e.push(new ef(this.model,this.services)),e},e}(qf),Qf=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(mn.merge(mn.clone(Fn.scatterChart),n.options)),r.init(e,n),r}return s(e,t),e.prototype.getComponents=function(){var t=[new Hf(this.model,this.services),new zf(this.model,this.services),new sf(this.model,this.services)],e=this.getAxisChartComponents(t);return e.push(new ef(this.model,this.services)),e},e}(qf),tp=function(t){function e(e){return t.call(this,e)||this}return s(e,t),e.prototype.sanitize=function(t){var e=mn.getProperty(t,"datasets",0);if(e){var n=t.labels.map((function(t,n){return{label:t,value:e.data[n],fillColor:e.fillColors?e.fillColors[n]:void 0}})).sort((function(t,e){return e.value-t.value}));e.data=n.map((function(t){return t.value})),t.labels=n.map((function(t){return t.label})),e.fillColors&&(e.fillColors=n.map((function(t){return t.fillColor})))}return t},e.prototype.generateDataLabels=function(t){var e={};return t.labels.forEach((function(t){e[t]=wn.items.status.ACTIVE})),e},e.prototype.getDisplayData=function(){var t=wn.items.status.ACTIVE,e=this.get("dataLabels");if(!this.get("data"))return null;var n=mn.clone(this.get("data")),r=n.datasets[0];return r.data=r.data.filter((function(r,i){var o=n.labels[i];return e[o]===t})),n.labels=n.labels.filter((function(n){return e[n]===t})),n},e.prototype.toggleDataLabel=function(t){var e=wn.items.status,n=e.ACTIVE,r=e.DISABLED,i=this.get("dataLabels"),o=Object.keys(i).some((function(t){return i[t]===r})),a=Object.keys(i).filter((function(t){return i[t]===n}));o?1===a.length&&a[0]===t?Object.keys(i).forEach((function(t){i[t]=n})):i[t]=i[t]===r?n:r:Object.keys(i).forEach((function(e){i[e]=e===t?n:r})),this.set({dataLabels:i})},e.prototype.setColorScale=function(){var t=this.getDisplayData().datasets[0];if(t.fillColors)this.colorScale=Pr().range(t.fillColors).domain(this.allDataLabels);else{var e=cr;this.colorScale=Pr().range(e).domain(this.allDataLabels)}},e.prototype.getFillColor=function(t){var e=this.getOptions();return e.getFillColor?e.getFillColor(t):this.getFillScale()(t)},e.prototype.getStrokeColor=function(t){var e=this.getOptions();return e.getStrokeColor?e.getStrokeColor(t):this.colorScale(t)},e}(ns),ep=function(t){function e(e,n,r){void 0===r&&(r=!1);var i=t.call(this,e,n)||this;return i.model=new tp(i.services),r?i:(i.model.setOptions(mn.merge(mn.clone(Fn.pieChart),n.options)),i.init(e,n),i)}return s(e,t),e.prototype.getComponents=function(){var t=[new hf(this.model,this.services)],e=this.getChartComponents(t);return e.push(new Qh(this.model,this.services)),e},e}(Yf),np=function(t){function e(e,n){var r=t.call(this,e,n,!0)||this;return r.model.setOptions(mn.merge(mn.clone(Fn.donutChart),n.options)),r.init(e,n),r}return s(e,t),e.prototype.getComponents=function(){var t=[new ff(this.model,this.services)],e=this.getChartComponents(t);return e.push(new Qh(this.model,this.services)),e},e}(ep),rp=cr;t.BubbleChart=Jf,t.DonutChart=np,t.GroupedBarChart=$f,t.LineChart=Kf,t.PieChart=ep,t.ScatterChart=Qf,t.SimpleBarChart=Xf,t.StackedBarChart=Zf,t.colorPalettes=hr,t.configurations=zn,t.defaultColors=rp,t.interfaces=w,Object.defineProperty(t,"__esModule",{value:!0})}));
15
+ ***************************************************************************** */var e,n,r,i,o,a=function(t,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function s(t,e){function n(){this.constructor=t}a(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function u(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),i=0;for(e=0;e<n;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}!function(t){t.GRAPHICS_DOCUMENT="graphics-document",t.GRAPHICS_OBJECT="graphics-object",t.GRAPHICS_SYMBOL="graphics-symbol",t.GROUP="group"}(e||(e={})),function(t){t.SLICE_MOUSEOVER="pie-slice-mouseover",t.SLICE_MOUSEMOVE="pie-slice-mousemove",t.SLICE_CLICK="pie-slice-click",t.SLICE_MOUSEOUT="pie-slice-mouseout"}(n||(n={})),function(t){t.BAR_MOUSEOVER="bar-mouseover",t.BAR_MOUSEMOVE="bar-mousemove",t.BAR_CLICK="bar-click",t.BAR_MOUSEOUT="bar-mouseout"}(r||(r={})),function(t){t.SCATTER_MOUSEOVER="scatter-mouseover",t.SCATTER_MOUSEMOVE="scatter-mousemove",t.SCATTER_CLICK="scatter-click",t.SCATTER_MOUSEOUT="scatter-mouseout"}(i||(i={})),function(t){t.POINT_MOUSEOVER="scatter-mouseover",t.POINT_MOUSEMOVE="scatter-mousemove",t.POINT_CLICK="scatter-click",t.POINT_MOUSEOUT="scatter-mouseout"}(o||(o={}));var l,c,h,f,p,d,v,g,y,m,_,b,x=Object.freeze({__proto__:null,get Pie(){return n},get Bar(){return r},get Scatter(){return i},get Line(){return o}});!function(t){t.DEFAULT="default",t.G100="g100",t.G90="g90",t.G10="g10"}(l||(l={})),function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(c||(c={})),function(t){t.VERTICAL="vertical",t.HORIZONTAL="horizontal"}(h||(h={})),function(t){t.PRIMARY="primary",t.SECONDARY="secondary"}(f||(f={})),function(t){t.TIME="time",t.LINEAR="linear",t.LOG="log",t.LABELS="labels"}(p||(p={})),function(t){t.MOUSE="mouse",t.TOP="top",t.BOTTOM="bottom"}(d||(d={})),function(t){t.DATAPOINT="datapoint",t.GRIDLINE="gridline",t.TITLE="title"}(v||(v={})),function(t){t.RIGHT="right",t.LEFT="left",t.TOP="top",t.BOTTOM="bottom"}(g||(g={})),function(t){t.HORIZONTAL="horizontal",t.VERTICAL="vertical"}(y||(y={})),function(t){t.ROW="row",t.COLUMN="column",t.ROW_REVERSE="row-reverse",t.COLUMN_REVERSE="column-reverse"}(m||(m={})),function(t){t.FIXED="fixed",t.PREFERRED="preferred",t.STRETCH="stretch"}(_||(_={})),function(t){t.LEFT="left",t.RIGHT="right"}(b||(b={}));var w=Object.freeze({__proto__:null,get Roles(){return e},Events:x,get ChartTheme(){return l},get AxisPositions(){return c},get CartesianOrientations(){return h},get AxisTypes(){return f},get ScaleTypes(){return p},get TooltipPosition(){return d},get TooltipTypes(){return v},get LegendPositions(){return g},get LegendOrientations(){return y},get LayoutDirection(){return m},get LayoutGrowth(){return _},get CalloutDirections(){return b}}),T="object"==typeof global&&global&&global.Object===Object&&global,E="object"==typeof self&&self&&self.Object===Object&&self,O=T||E||Function("return this")(),S=O.Symbol,M=Object.prototype,A=M.hasOwnProperty,C=M.toString,L=S?S.toStringTag:void 0;var k=Object.prototype.toString;var P=S?S.toStringTag:void 0;function D(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":P&&P in Object(t)?function(t){var e=A.call(t,L),n=t[L];try{t[L]=void 0;var r=!0}catch(t){}var i=C.call(t);return r&&(e?t[L]=n:delete t[L]),i}(t):function(t){return k.call(t)}(t)}function R(t){return null!=t&&"object"==typeof t}var j=Array.isArray;function I(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var N=/^\s+|\s+$/g,F=/^[-+]0x[0-9a-f]+$/i,B=/^0b[01]+$/i,V=/^0o[0-7]+$/i,H=parseInt;function U(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||R(t)&&"[object Symbol]"==D(t)}(t))return NaN;if(I(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=I(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(N,"");var n=B.test(t);return n||V.test(t)?H(t.slice(2),n?2:8):F.test(t)?NaN:+t}function z(t){return t}function G(t){if(!I(t))return!1;var e=D(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var Y,q=O["__core-js_shared__"],W=(Y=/[^.]+$/.exec(q&&q.keys&&q.keys.IE_PROTO||""))?"Symbol(src)_1."+Y:"";var X=Function.prototype.toString;function $(t){if(null!=t){try{return X.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var Z=/^\[object .+?Constructor\]$/,J=Function.prototype,K=Object.prototype,Q=J.toString,tt=K.hasOwnProperty,et=RegExp("^"+Q.call(tt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function nt(t){return!(!I(t)||(e=t,W&&W in e))&&(G(t)?et:Z).test($(t));var e}function rt(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return nt(n)?n:void 0}var it=rt(O,"WeakMap"),ot=Object.create,at=function(){function t(){}return function(e){if(!I(e))return{};if(ot)return ot(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function st(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function ut(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var lt=Date.now;var ct=function(){try{var t=rt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),ht=function(t){var e=0,n=0;return function(){var r=lt(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(ct?function(t,e){return ct(t,"toString",{configurable:!0,enumerable:!1,value:(n=e,function(){return n}),writable:!0});var n}:z);function ft(t){return t!=t}function pt(t,e){return!!(null==t?0:t.length)&&function(t,e,n){return e==e?function(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):function(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}(t,ft,n)}(t,e,0)>-1}var dt=/^(?:0|[1-9]\d*)$/;function vt(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&dt.test(t))&&t>-1&&t%1==0&&t<e}function gt(t,e,n){"__proto__"==e&&ct?ct(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function yt(t,e){return t===e||t!=t&&e!=e}var mt=Object.prototype.hasOwnProperty;function _t(t,e,n){var r=t[e];mt.call(t,e)&&yt(r,n)&&(void 0!==n||e in t)||gt(t,e,n)}function bt(t,e,n,r){var i=!n;n||(n={});for(var o=-1,a=e.length;++o<a;){var s=e[o],u=r?r(n[s],t[s],s,n,t):void 0;void 0===u&&(u=t[s]),i?gt(n,s,u):_t(n,s,u)}return n}var xt=Math.max;function wt(t,e){return ht(function(t,e,n){return e=xt(void 0===e?t.length-1:e,0),function(){for(var r=arguments,i=-1,o=xt(r.length-e,0),a=Array(o);++i<o;)a[i]=r[e+i];i=-1;for(var s=Array(e+1);++i<e;)s[i]=r[i];return s[e]=n(a),st(t,this,s)}}(t,e,z),t+"")}function Tt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function Et(t){return null!=t&&Tt(t.length)&&!G(t)}var Ot=Object.prototype;function St(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Ot)}function Mt(t){return R(t)&&"[object Arguments]"==D(t)}var At=Object.prototype,Ct=At.hasOwnProperty,Lt=At.propertyIsEnumerable,kt=Mt(function(){return arguments}())?Mt:function(t){return R(t)&&Ct.call(t,"callee")&&!Lt.call(t,"callee")};var Pt="object"==typeof t&&t&&!t.nodeType&&t,Dt=Pt&&"object"==typeof module&&module&&!module.nodeType&&module,Rt=Dt&&Dt.exports===Pt?O.Buffer:void 0,jt=(Rt?Rt.isBuffer:void 0)||function(){return!1},It={};function Nt(t){return function(e){return t(e)}}It["[object Float32Array]"]=It["[object Float64Array]"]=It["[object Int8Array]"]=It["[object Int16Array]"]=It["[object Int32Array]"]=It["[object Uint8Array]"]=It["[object Uint8ClampedArray]"]=It["[object Uint16Array]"]=It["[object Uint32Array]"]=!0,It["[object Arguments]"]=It["[object Array]"]=It["[object ArrayBuffer]"]=It["[object Boolean]"]=It["[object DataView]"]=It["[object Date]"]=It["[object Error]"]=It["[object Function]"]=It["[object Map]"]=It["[object Number]"]=It["[object Object]"]=It["[object RegExp]"]=It["[object Set]"]=It["[object String]"]=It["[object WeakMap]"]=!1;var Ft="object"==typeof t&&t&&!t.nodeType&&t,Bt=Ft&&"object"==typeof module&&module&&!module.nodeType&&module,Vt=Bt&&Bt.exports===Ft&&T.process,Ht=function(){try{var t=Bt&&Bt.require&&Bt.require("util").types;return t||Vt&&Vt.binding&&Vt.binding("util")}catch(t){}}(),Ut=Ht&&Ht.isTypedArray,zt=Ut?Nt(Ut):function(t){return R(t)&&Tt(t.length)&&!!It[D(t)]},Gt=Object.prototype.hasOwnProperty;function Yt(t,e){var n=j(t),r=!n&&kt(t),i=!n&&!r&&jt(t),o=!n&&!r&&!i&&zt(t),a=n||r||i||o,s=a?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],u=s.length;for(var l in t)!e&&!Gt.call(t,l)||a&&("length"==l||i&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||vt(l,u))||s.push(l);return s}function qt(t,e){return function(n){return t(e(n))}}var Wt=qt(Object.keys,Object),Xt=Object.prototype.hasOwnProperty;function $t(t){return Et(t)?Yt(t):function(t){if(!St(t))return Wt(t);var e=[];for(var n in Object(t))Xt.call(t,n)&&"constructor"!=n&&e.push(n);return e}(t)}var Zt=Object.prototype.hasOwnProperty;function Jt(t){if(!I(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=St(t),n=[];for(var r in t)("constructor"!=r||!e&&Zt.call(t,r))&&n.push(r);return n}function Kt(t){return Et(t)?Yt(t,!0):Jt(t)}var Qt=rt(Object,"create");var te=Object.prototype.hasOwnProperty;var ee=Object.prototype.hasOwnProperty;function ne(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function re(t,e){for(var n=t.length;n--;)if(yt(t[n][0],e))return n;return-1}ne.prototype.clear=function(){this.__data__=Qt?Qt(null):{},this.size=0},ne.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},ne.prototype.get=function(t){var e=this.__data__;if(Qt){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return te.call(e,t)?e[t]:void 0},ne.prototype.has=function(t){var e=this.__data__;return Qt?void 0!==e[t]:ee.call(e,t)},ne.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Qt&&void 0===e?"__lodash_hash_undefined__":e,this};var ie=Array.prototype.splice;function oe(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}oe.prototype.clear=function(){this.__data__=[],this.size=0},oe.prototype.delete=function(t){var e=this.__data__,n=re(e,t);return!(n<0)&&(n==e.length-1?e.pop():ie.call(e,n,1),--this.size,!0)},oe.prototype.get=function(t){var e=this.__data__,n=re(e,t);return n<0?void 0:e[n][1]},oe.prototype.has=function(t){return re(this.__data__,t)>-1},oe.prototype.set=function(t,e){var n=this.__data__,r=re(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var ae=rt(O,"Map");function se(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function ue(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function le(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}ue.prototype.clear=function(){this.size=0,this.__data__={hash:new ne,map:new(ae||oe),string:new ne}},ue.prototype.delete=function(t){var e=se(this,t).delete(t);return this.size-=e?1:0,e},ue.prototype.get=function(t){return se(this,t).get(t)},ue.prototype.has=function(t){return se(this,t).has(t)},ue.prototype.set=function(t,e){var n=se(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};var ce=qt(Object.getPrototypeOf,Object),he=Function.prototype,fe=Object.prototype,pe=he.toString,de=fe.hasOwnProperty,ve=pe.call(Object);function ge(t,e,n){return void 0===n&&(n=e,e=void 0),void 0!==n&&(n=(n=U(n))==n?n:0),void 0!==e&&(e=(e=U(e))==e?e:0),function(t,e,n){return t==t&&(void 0!==n&&(t=t<=n?t:n),void 0!==e&&(t=t>=e?t:e)),t}(U(t),e,n)}function ye(t){var e=this.__data__=new oe(t);this.size=e.size}ye.prototype.clear=function(){this.__data__=new oe,this.size=0},ye.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},ye.prototype.get=function(t){return this.__data__.get(t)},ye.prototype.has=function(t){return this.__data__.has(t)},ye.prototype.set=function(t,e){var n=this.__data__;if(n instanceof oe){var r=n.__data__;if(!ae||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new ue(r)}return n.set(t,e),this.size=n.size,this};var me="object"==typeof t&&t&&!t.nodeType&&t,_e=me&&"object"==typeof module&&module&&!module.nodeType&&module,be=_e&&_e.exports===me?O.Buffer:void 0,xe=be?be.allocUnsafe:void 0;function we(t,e){if(e)return t.slice();var n=t.length,r=xe?xe(n):new t.constructor(n);return t.copy(r),r}function Te(){return[]}var Ee=Object.prototype.propertyIsEnumerable,Oe=Object.getOwnPropertySymbols,Se=Oe?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}(Oe(t),(function(e){return Ee.call(t,e)})))}:Te;var Me=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)le(e,Se(t)),t=ce(t);return e}:Te;function Ae(t,e,n){var r=e(t);return j(t)?r:le(r,n(t))}function Ce(t){return Ae(t,$t,Se)}function Le(t){return Ae(t,Kt,Me)}var ke=rt(O,"DataView"),Pe=rt(O,"Promise"),De=rt(O,"Set"),Re=$(ke),je=$(ae),Ie=$(Pe),Ne=$(De),Fe=$(it),Be=D;(ke&&"[object DataView]"!=Be(new ke(new ArrayBuffer(1)))||ae&&"[object Map]"!=Be(new ae)||Pe&&"[object Promise]"!=Be(Pe.resolve())||De&&"[object Set]"!=Be(new De)||it&&"[object WeakMap]"!=Be(new it))&&(Be=function(t){var e=D(t),n="[object Object]"==e?t.constructor:void 0,r=n?$(n):"";if(r)switch(r){case Re:return"[object DataView]";case je:return"[object Map]";case Ie:return"[object Promise]";case Ne:return"[object Set]";case Fe:return"[object WeakMap]"}return e});var Ve=Be,He=Object.prototype.hasOwnProperty;var Ue=O.Uint8Array;function ze(t){var e=new t.constructor(t.byteLength);return new Ue(e).set(new Ue(t)),e}var Ge=/\w*$/;var Ye=S?S.prototype:void 0,qe=Ye?Ye.valueOf:void 0;function We(t,e){var n=e?ze(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Xe(t,e,n){var r,i,o,a=t.constructor;switch(e){case"[object ArrayBuffer]":return ze(t);case"[object Boolean]":case"[object Date]":return new a(+t);case"[object DataView]":return function(t,e){var n=e?ze(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return We(t,n);case"[object Map]":return new a;case"[object Number]":case"[object String]":return new a(t);case"[object RegExp]":return(o=new(i=t).constructor(i.source,Ge.exec(i))).lastIndex=i.lastIndex,o;case"[object Set]":return new a;case"[object Symbol]":return r=t,qe?Object(qe.call(r)):{}}}function $e(t){return"function"!=typeof t.constructor||St(t)?{}:at(ce(t))}var Ze=Ht&&Ht.isMap,Je=Ze?Nt(Ze):function(t){return R(t)&&"[object Map]"==Ve(t)};var Ke=Ht&&Ht.isSet,Qe=Ke?Nt(Ke):function(t){return R(t)&&"[object Set]"==Ve(t)},tn={};function en(t,e,n,r,i,o){var a,s=1&e,u=2&e,l=4&e;if(n&&(a=i?n(t,r,i,o):n(t)),void 0!==a)return a;if(!I(t))return t;var c=j(t);if(c){if(a=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&He.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!s)return ut(t,a)}else{var h=Ve(t),f="[object Function]"==h||"[object GeneratorFunction]"==h;if(jt(t))return we(t,s);if("[object Object]"==h||"[object Arguments]"==h||f&&!i){if(a=u||f?{}:$e(t),!s)return u?function(t,e){return bt(t,Me(t),e)}(t,function(t,e){return t&&bt(e,Kt(e),t)}(a,t)):function(t,e){return bt(t,Se(t),e)}(t,function(t,e){return t&&bt(e,$t(e),t)}(a,t))}else{if(!tn[h])return i?t:{};a=Xe(t,h,s)}}o||(o=new ye);var p=o.get(t);if(p)return p;o.set(t,a),Qe(t)?t.forEach((function(r){a.add(en(r,e,n,r,t,o))})):Je(t)&&t.forEach((function(r,i){a.set(i,en(r,e,n,i,t,o))}));var d=l?u?Le:Ce:u?keysIn:$t,v=c?void 0:d(t);return function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););}(v||t,(function(r,i){v&&(r=t[i=r]),_t(a,i,en(r,e,n,i,t,o))})),a}tn["[object Arguments]"]=tn["[object Array]"]=tn["[object ArrayBuffer]"]=tn["[object DataView]"]=tn["[object Boolean]"]=tn["[object Date]"]=tn["[object Float32Array]"]=tn["[object Float64Array]"]=tn["[object Int8Array]"]=tn["[object Int16Array]"]=tn["[object Int32Array]"]=tn["[object Map]"]=tn["[object Number]"]=tn["[object Object]"]=tn["[object RegExp]"]=tn["[object Set]"]=tn["[object String]"]=tn["[object Symbol]"]=tn["[object Uint8Array]"]=tn["[object Uint8ClampedArray]"]=tn["[object Uint16Array]"]=tn["[object Uint32Array]"]=!0,tn["[object Error]"]=tn["[object Function]"]=tn["[object WeakMap]"]=!1;function nn(t){return en(t,5)}function rn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new ue;++e<n;)this.add(t[e])}function on(t,e){return t.has(e)}function an(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}rn.prototype.add=rn.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},rn.prototype.has=function(t){return this.__data__.has(t)};var sn,un=function(t,e,n){for(var r=-1,i=Object(t),o=n(t),a=o.length;a--;){var s=o[sn?a:++r];if(!1===e(i[s],s,i))break}return t},ln=function(){return O.Date.now()},cn=Math.max,hn=Math.min;function fn(t,e,n){var r,i,o,a,s,u,l=0,c=!1,h=!1,f=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function p(e){var n=r,o=i;return r=i=void 0,l=e,a=t.apply(o,n)}function d(t){return l=t,s=setTimeout(g,e),c?p(t):a}function v(t){var n=t-u;return void 0===u||n>=e||n<0||h&&t-l>=o}function g(){var t=ln();if(v(t))return y(t);s=setTimeout(g,function(t){var n=e-(t-u);return h?hn(n,o-(t-l)):n}(t))}function y(t){return s=void 0,f&&r?p(t):(r=i=void 0,a)}function m(){var t=ln(),n=v(t);if(r=arguments,i=this,u=t,n){if(void 0===s)return d(u);if(h)return clearTimeout(s),s=setTimeout(g,e),p(u)}return void 0===s&&(s=setTimeout(g,e)),a}return e=U(e)||0,I(n)&&(c=!!n.leading,o=(h="maxWait"in n)?cn(U(n.maxWait)||0,e):o,f="trailing"in n?!!n.trailing:f),m.cancel=function(){void 0!==s&&clearTimeout(s),l=0,r=u=i=s=void 0},m.flush=function(){return void 0===s?a:y(ln())},m}function pn(t,e,n){(void 0===n||yt(t[e],n))&&(void 0!==n||e in t)||gt(t,e,n)}function dn(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}function vn(t,e,n,r,i,o,a){var s=dn(t,n),u=dn(e,n),l=a.get(u);if(l)pn(t,n,l);else{var c,h=o?o(s,u,n+"",t,e,a):void 0,f=void 0===h;if(f){var p=j(u),d=!p&&jt(u),v=!p&&!d&&zt(u);h=u,p||d||v?j(s)?h=s:R(c=s)&&Et(c)?h=ut(s):d?(f=!1,h=we(u,!0)):v?(f=!1,h=We(u,!0)):h=[]:function(t){if(!R(t)||"[object Object]"!=D(t))return!1;var e=ce(t);if(null===e)return!0;var n=de.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&pe.call(n)==ve}(u)||kt(u)?(h=s,kt(s)?h=function(t){return bt(t,Kt(t))}(s):I(s)&&!G(s)||(h=$e(u))):f=!1}f&&(a.set(u,h),i(h,u,r,o,a),a.delete(u)),pn(t,n,h)}}function gn(t,e,n,r,i){t!==e&&un(e,(function(o,a){if(i||(i=new ye),I(o))vn(t,e,a,n,gn,r,i);else{var s=r?r(dn(t,a),o,a+"",t,e,i):void 0;void 0===s&&(s=o),pn(t,a,s)}}),Kt)}function yn(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}var mn,_n,bn=(mn=function(t,e,n){gn(t,e,n)},wt((function(t,e){var n=-1,r=e.length,i=r>1?e[r-1]:void 0,o=r>2?e[2]:void 0;for(i=mn.length>3&&"function"==typeof i?(r--,i):void 0,o&&function(t,e,n){if(!I(n))return!1;var r=typeof e;return!!("number"==r?Et(n)&&vt(e,n.length):"string"==r&&e in n)&&yt(n[e],t)}(e[0],e[1],o)&&(i=r<3?void 0:i,r=1),t=Object(t);++n<r;){var a=e[n];a&&mn(t,a,n,i)}return t}))),xn=De&&1/an(new De([,-0]))[1]==1/0?function(t){return new De(t)}:function(){};function wn(t){return t&&t.length?function(t,e,n){var r=-1,i=pt,o=t.length,a=!0,s=[],u=s;if(n)a=!1,i=yn;else if(o>=200){var l=e?null:xn(t);if(l)return an(l);a=!1,i=on,u=new rn}else u=e?[]:s;t:for(;++r<o;){var c=t[r],h=e?e(c):c;if(c=n||0!==c?c:0,a&&h==h){for(var f=u.length;f--;)if(u[f]===h)continue t;e&&u.push(h),s.push(c)}else i(u,h,n)||(u!==s&&u.push(h),s.push(c))}return s}(t):[]}!function(t){t.debounce=fn,t.clone=nn,t.merge=bn,t.removeArrayDuplicates=wn,t.clamp=ge,t.getDimensions=function(t){return{width:parseFloat(t.style.width.replace("px","")||t.offsetWidth),height:parseFloat(t.style.height.replace("px","")||t.offsetHeight)}},t.getTranslationValues=function(t){var e=t.getAttribute("transform").match(/translate\([0-9]+\.?[0-9]*,[0-9]+\.?[0-9]*\)/);if(e[0]){var n=e[0].replace(/translate\(/,"").replace(/\)/,"").split(",");return{tx:n[0],ty:n[1]}}return null},t.getTranformOffsets=function(t){var e=/\(([^)]+)\)/.exec(t)[1].split(",");return{x:parseFloat(e[0]),y:parseFloat(e[1])}},t.capitalizeFirstLetter=function(t){return t[0].toUpperCase()+t.slice(1)},t.convertValueToPercentage=function(t,e){var n=t/e.reduce((function(t,e){return t+e.value}),0)*100;return n<1?n.toPrecision(1):Math.floor(n)},t.arrayDifferences=function(t,e){var n={missing:[],added:[]};return t.forEach((function(t){-1===e.indexOf(t)&&n.missing.push(t)})),e.forEach((function(e){-1===t.indexOf(e)&&n.added.push(e)})),n},t.getDuplicateValues=function(t){var e=[],n=[];return t.forEach((function(t){-1!==e.indexOf(t)&&-1===n.indexOf(t)&&n.push(t),e.push(t)})),n},t.moveToFront=function(t){return t.each((function(){this.parentNode.appendChild(this)}))},t.getProperty=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=t;if(r){for(var i=0,o=e;i<o.length;i++){var a=o[i];if(null===r[a]||void 0===r[a])return null;r=r[a]}return r}return null},t.flipSVGCoordinatesBasedOnOrientation=function(t,e){return e===h.HORIZONTAL?{y0:t.x0,y1:t.x1,x0:t.y0,x1:t.y1}:t},t.generateSVGPathString=function(e,n){var r=t.flipSVGCoordinatesBasedOnOrientation(e,n),i=r.x0,o=r.x1,a=r.y0,s=r.y1;return"M"+i+","+a+"L"+i+","+s+"L"+o+","+s+"L"+o+","+a+"L"+i+","+a}}(_n||(_n={}));var Tn={position:g.BOTTOM,clickable:!0,enabled:!0,items:{status:{ACTIVE:1,DISABLED:0},horizontalSpace:12,verticalSpace:24,textYOffset:8},checkbox:{radius:6.5,spaceAfter:4}},En={x:{numberOfTicks:5},y:{numberOfTicks:5}},On={datapoint:{horizontalOffset:10,enabled:!0},title:{verticalOffset:.75,width:.4}},Sn=_n.merge({},On,{gridline:{enabled:!0,threshold:.25}}),Mn=_n.merge({},Sn,{datapoint:{verticalOffset:4},gridline:{enabled:!1}}),An={addSpaceOnEdges:1},Cn={width:"100%",height:"100%",resizable:!0,tooltip:On,legend:Tn,style:{prefix:"cc"}},Ln=_n.merge({},Cn,{axes:{},timeScale:An,grid:En,tooltip:Sn}),kn=_n.merge({},Ln,{bars:{maxWidth:16},timeScale:_n.merge(An,{addSpaceOnEdges:1}),tooltip:Mn}),Pn=_n.merge({},kn,{}),Dn=_n.merge({},kn,{}),Rn=_n.merge({},kn,{bars:_n.merge({},kn.bars,{dividerSize:1.5})}),jn=_n.merge({},Ln,{points:{radius:3,filled:!1}}),In=_n.merge({},Ln,{points:{radius:4,fillOpacity:.3,filled:!0}}),Nn=_n.merge({},Ln,{bubble:{radiusRange:function(t,e){var n=Math.min(t.width,t.height);return[3*n/400,25*n/400]},fillOpacity:.2}}),Fn=_n.merge({},Cn,{pie:{radiusOffset:-15,innerRadius:2,padAngle:.007,hoverArc:{outerRadiusOffset:3},xOffset:30,yOffset:20,yOffsetCallout:10,callout:{minSliceDegree:5,offsetX:15,offsetY:12,horizontalLineLength:8,textMargin:2},labels:{formatter:null}}}),Bn={chart:Cn,axisChart:Ln,simpleBarChart:Pn,groupedBarChart:Dn,stackedBarChart:Rn,bubbleChart:Nn,lineChart:jn,scatterChart:In,pieChart:Fn,donutChart:_n.merge({},Fn,{donut:{center:{numberFontSize:function(t){return Math.min(t/100*24,24)+"px"},titleFontSize:function(t){return Math.min(t/100*15,15)+"px"},titleYPosition:function(t){return Math.min(t/80*20,20)},numberFormatter:function(t){return Math.floor(t).toLocaleString()}}}})},Vn={opacity:{unselected:.3,selected:1}},Hn={default:{duration:300},pie_slice_mouseover:{duration:100},pie_chart_titles:{duration:375},graph_element_mouseover_fill_update:{duration:100},graph_element_mouseout_fill_update:{duration:100}},Un={ticks:{number:7,rotateIfSmallerThan:30}},zn={default:{size:24}},Gn=Object.freeze({__proto__:null,legend:Tn,grid:En,baseTooltip:On,axisChartTooltip:Sn,barChartTooltip:Mn,options:Bn,lines:Vn,transitions:Hn,axis:Un,spacers:zn,tickSpaceRatioVertical:2.5,tickSpaceRatioHorizontal:3.5}),Yn={10:"#fff0f1",20:"#fcd0d3",30:"#ffa4a9",40:"#ff767c",50:"#fb4b53",60:"#da1e28",70:"#a51920",80:"#750e13",90:"#570408",100:"#2c080a"},qn={10:"#fff0f6",20:"#ffcfe1",30:"#ffa0c2",40:"#fa75a6",50:"#ee538b",60:"#d12765",70:"#a11950",80:"#760a3a",90:"#57002b",100:"#2a0a16"},Wn={10:"#f7f1ff",20:"#e6d6ff",30:"#d0b0ff",40:"#bb8eff",50:"#a66efa",60:"#8a3ffc",70:"#6e32c9",80:"#4f2196",90:"#38146b",100:"#1e1033"},Xn={10:"#edf4ff",20:"#c9deff",30:"#97c1ff",40:"#6ea6ff",50:"#408bfc",60:"#0062ff",70:"#054ada",80:"#0530ad",90:"#061f80",100:"#051243"},$n={10:"#e3f6ff",20:"#b3e6ff",30:"#6ccaff",40:"#30b0ff",50:"#1191e6",60:"#0072c3",70:"#0058a1",80:"#003d73",90:"#002b50",100:"#07192b"},Zn={10:"#dbfbfb",20:"#92eeee",30:"#20d5d2",40:"#00bab6",50:"#009c98",60:"#007d79",70:"#006161",80:"#004548",90:"#003137",100:"#081a1c"},Jn={10:"#dafbe4",20:"#9deeb2",30:"#56d679",40:"#3dbb61",50:"#24a148",60:"#198038",70:"#10642a",80:"#054719",90:"#01330f",100:"#081b09"},Kn=function(t,e){return t[e]},Qn=function(t){return Kn(Xn,t)},tr=function(t){return Kn($n,t)},er=function(t){return Kn(Jn,t)},nr=function(t){return Kn(qn,t)},rr=function(t){return Kn(Wn,t)},ir=function(t){return Kn(Yn,t)},or=function(t){return Kn(Zn,t)},ar=[rr(70),tr(50),or(70),nr(70),ir(50),ir(90),er(60),Qn(80),nr(50),"#b28600",or(50),tr(90),"#8a3800",rr(50)],sr=[rr(60),tr(40),or(60),nr(40),ir(50),ir(10),er(30),Qn(50),nr(60),"#d2a106",or(40),tr(20),"#ba4e00",rr(30)],ur=ar,lr=sr,cr=sr,hr=ar,fr=Object.freeze({__proto__:null,WHITE:ar,DARK:sr,G10:ur,G90:lr,G100:cr,DEFAULT:hr});function pr(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function dr(t){var e;return 1===t.length&&(e=t,t=function(t,n){return pr(e(t),n)}),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var o=r+i>>>1;t(e[o],n)<0?r=o+1:i=o}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var o=r+i>>>1;t(e[o],n)>0?i=o:r=o+1}return r}}}var vr=dr(pr).right;function gr(t,e){var n,r,i,o=t.length,a=-1;if(null==e){for(;++a<o;)if(null!=(n=t[a])&&n>=n)for(r=i=n;++a<o;)null!=(n=t[a])&&(r>n&&(r=n),i<n&&(i=n))}else for(;++a<o;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=i=n;++a<o;)null!=(n=e(t[a],a,t))&&(r>n&&(r=n),i<n&&(i=n));return[r,i]}function yr(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),o=new Array(i);++r<i;)o[r]=t+r*n;return o}var mr=Math.sqrt(50),_r=Math.sqrt(10),br=Math.sqrt(2);function xr(t,e,n){var r,i,o,a,s=-1;if(n=+n,(t=+t)===(e=+e)&&n>0)return[t];if((r=e<t)&&(i=t,t=e,e=i),0===(a=wr(t,e,n))||!isFinite(a))return[];if(a>0)for(t=Math.ceil(t/a),e=Math.floor(e/a),o=new Array(i=Math.ceil(e-t+1));++s<i;)o[s]=(t+s)*a;else for(t=Math.floor(t*a),e=Math.ceil(e*a),o=new Array(i=Math.ceil(t-e+1));++s<i;)o[s]=(t-s)/a;return r&&o.reverse(),o}function wr(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=mr?10:o>=_r?5:o>=br?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=mr?10:o>=_r?5:o>=br?2:1)}function Tr(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=mr?i*=10:o>=_r?i*=5:o>=br&&(i*=2),e<t?-i:i}function Er(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function Or(){}function Sr(t,e){var n=new Or;if(t instanceof Or)t.each((function(t,e){n.set(e,t)}));else if(Array.isArray(t)){var r,i=-1,o=t.length;if(null==e)for(;++i<o;)n.set(i,t[i]);else for(;++i<o;)n.set(e(r=t[i],i,t),r)}else if(t)for(var a in t)n.set(a,t[a]);return n}function Mr(){}Or.prototype=Sr.prototype={constructor:Or,has:function(t){return"$"+t in this},get:function(t){return this["$"+t]},set:function(t,e){return this["$"+t]=e,this},remove:function(t){var e="$"+t;return e in this&&delete this[e]},clear:function(){for(var t in this)"$"===t[0]&&delete this[t]},keys:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)"$"===e[0]&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)"$"===e[0]&&++t;return t},empty:function(){for(var t in this)if("$"===t[0])return!1;return!0},each:function(t){for(var e in this)"$"===e[0]&&t(this[e],e.slice(1),this)}};var Ar=Sr.prototype;Mr.prototype=function(t,e){var n=new Mr;if(t instanceof Mr)t.each((function(t){n.add(t)}));else if(t){var r=-1,i=t.length;if(null==e)for(;++r<i;)n.add(t[r]);else for(;++r<i;)n.add(e(t[r],r,t))}return n}.prototype={constructor:Mr,has:Ar.has,add:function(t){return this["$"+(t+="")]=t,this},remove:Ar.remove,clear:Ar.clear,values:Ar.keys,size:Ar.size,empty:Ar.empty,each:Ar.each};var Cr=Array.prototype,Lr=Cr.map,kr=Cr.slice,Pr={name:"implicit"};function Dr(){var t=Sr(),e=[],n=[],r=Pr;function i(i){var o=i+"",a=t.get(o);if(!a){if(r!==Pr)return r;t.set(o,a=e.push(i))}return n[(a-1)%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=Sr();for(var r,o,a=-1,s=n.length;++a<s;)t.has(o=(r=n[a])+"")||t.set(o,e.push(r));return i},i.range=function(t){return arguments.length?(n=kr.call(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return Dr(e,n).unknown(r)},Er.apply(i,arguments),i}function Rr(){var t,e,n=Dr().unknown(void 0),r=n.domain,i=n.range,o=[0,1],a=!1,s=0,u=0,l=.5;function c(){var n=r().length,c=o[1]<o[0],h=o[c-0],f=o[1-c];t=(f-h)/Math.max(1,n-s+2*u),a&&(t=Math.floor(t)),h+=(f-h-t*(n-s))*l,e=t*(1-s),a&&(h=Math.round(h),e=Math.round(e));var p=yr(n).map((function(e){return h+t*e}));return i(c?p.reverse():p)}return delete n.unknown,n.domain=function(t){return arguments.length?(r(t),c()):r()},n.range=function(t){return arguments.length?(o=[+t[0],+t[1]],c()):o.slice()},n.rangeRound=function(t){return o=[+t[0],+t[1]],a=!0,c()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(a=!!t,c()):a},n.padding=function(t){return arguments.length?(s=Math.min(1,u=+t),c()):s},n.paddingInner=function(t){return arguments.length?(s=Math.min(1,t),c()):s},n.paddingOuter=function(t){return arguments.length?(u=+t,c()):u},n.align=function(t){return arguments.length?(l=Math.max(0,Math.min(1,t)),c()):l},n.copy=function(){return Rr(r(),o).round(a).paddingInner(s).paddingOuter(u).align(l)},Er.apply(c(),arguments)}function jr(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Ir(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Nr(){}var Fr="\\s*([+-]?\\d+)\\s*",Br="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Vr="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Hr=/^#([0-9a-f]{3,8})$/,Ur=new RegExp("^rgb\\("+[Fr,Fr,Fr]+"\\)$"),zr=new RegExp("^rgb\\("+[Vr,Vr,Vr]+"\\)$"),Gr=new RegExp("^rgba\\("+[Fr,Fr,Fr,Br]+"\\)$"),Yr=new RegExp("^rgba\\("+[Vr,Vr,Vr,Br]+"\\)$"),qr=new RegExp("^hsl\\("+[Br,Vr,Vr]+"\\)$"),Wr=new RegExp("^hsla\\("+[Br,Vr,Vr,Br]+"\\)$"),Xr={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function $r(){return this.rgb().formatHex()}function Zr(){return this.rgb().formatRgb()}function Jr(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Hr.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Kr(e):3===n?new ni(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?new ni(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?new ni(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Ur.exec(t))?new ni(e[1],e[2],e[3],1):(e=zr.exec(t))?new ni(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Gr.exec(t))?Qr(e[1],e[2],e[3],e[4]):(e=Yr.exec(t))?Qr(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=qr.exec(t))?ai(e[1],e[2]/100,e[3]/100,1):(e=Wr.exec(t))?ai(e[1],e[2]/100,e[3]/100,e[4]):Xr.hasOwnProperty(t)?Kr(Xr[t]):"transparent"===t?new ni(NaN,NaN,NaN,0):null}function Kr(t){return new ni(t>>16&255,t>>8&255,255&t,1)}function Qr(t,e,n,r){return r<=0&&(t=e=n=NaN),new ni(t,e,n,r)}function ti(t){return t instanceof Nr||(t=Jr(t)),t?new ni((t=t.rgb()).r,t.g,t.b,t.opacity):new ni}function ei(t,e,n,r){return 1===arguments.length?ti(t):new ni(t,e,n,null==r?1:r)}function ni(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function ri(){return"#"+oi(this.r)+oi(this.g)+oi(this.b)}function ii(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function oi(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function ai(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new ui(t,e,n,r)}function si(t){if(t instanceof ui)return new ui(t.h,t.s,t.l,t.opacity);if(t instanceof Nr||(t=Jr(t)),!t)return new ui;if(t instanceof ui)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(a=e===o?(n-r)/s+6*(n<r):n===o?(r-e)/s+2:(e-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new ui(a,s,u,t.opacity)}function ui(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function li(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function ci(t){return function(){return t}}function hi(t){return 1==(t=+t)?fi:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):ci(isNaN(e)?n:e)}}function fi(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):ci(isNaN(t)?e:t)}jr(Nr,Jr,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:$r,formatHex:$r,formatHsl:function(){return si(this).formatHsl()},formatRgb:Zr,toString:Zr}),jr(ni,ei,Ir(Nr,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new ni(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new ni(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ri,formatHex:ri,formatRgb:ii,toString:ii})),jr(ui,(function(t,e,n,r){return 1===arguments.length?si(t):new ui(t,e,n,null==r?1:r)}),Ir(Nr,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new ui(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new ui(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new ni(li(t>=240?t-240:t+120,i,r),li(t,i,r),li(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var pi=function t(e){var n=hi(e);function r(t,e){var r=n((t=ei(t)).r,(e=ei(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=fi(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=o(e),t.opacity=a(e),t+""}}return r.gamma=t,r}(1);function di(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(o){for(n=0;n<r;++n)i[n]=t[n]*(1-o)+e[n]*o;return i}}function vi(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=wi(t[n],e[n]);for(;n<r;++n)a[n]=e[n];return function(t){for(n=0;n<i;++n)a[n]=o[n](t);return a}}function gi(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function yi(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function mi(t,e){var n,r={},i={};for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?r[n]=wi(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}var _i=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,bi=new RegExp(_i.source,"g");function xi(t,e){var n,r,i,o=_i.lastIndex=bi.lastIndex=0,a=-1,s=[],u=[];for(t+="",e+="";(n=_i.exec(t))&&(r=bi.exec(e));)(i=r.index)>o&&(i=e.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,u.push({i:a,x:yi(n,r)})),o=bi.lastIndex;return o<e.length&&(i=e.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?u[0]?function(t){return function(e){return t(e)+""}}(u[0].x):function(t){return function(){return t}}(e):(e=u.length,function(t){for(var n,r=0;r<e;++r)s[(n=u[r]).i]=n.x(t);return s.join("")})}function wi(t,e){var n,r=typeof e;return null==e||"boolean"===r?ci(e):("number"===r?yi:"string"===r?(n=Jr(e))?(e=n,pi):xi:e instanceof Jr?pi:e instanceof Date?gi:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(e)?di:Array.isArray(e)?vi:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?mi:yi)(t,e)}function Ti(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var Ei,Oi,Si,Mi,Ai=180/Math.PI,Ci={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Li(t,e,n,r,i,o){var a,s,u;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,u/=s),t*r<e*n&&(t=-t,e=-e,u=-u,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*Ai,skewX:Math.atan(u)*Ai,scaleX:a,scaleY:s}}function ki(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(o,a){var s=[],u=[];return o=t(o),a=t(a),function(t,r,i,o,a,s){if(t!==i||r!==o){var u=a.push("translate(",null,e,null,n);s.push({i:u-4,x:yi(t,i)},{i:u-2,x:yi(r,o)})}else(i||o)&&a.push("translate("+i+e+o+n)}(o.translateX,o.translateY,a.translateX,a.translateY,s,u),function(t,e,n,o){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:yi(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(o.rotate,a.rotate,s,u),function(t,e,n,o){t!==e?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:yi(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(o.skewX,a.skewX,s,u),function(t,e,n,r,o,a){if(t!==n||e!==r){var s=o.push(i(o)+"scale(",null,",",null,")");a.push({i:s-4,x:yi(t,n)},{i:s-2,x:yi(e,r)})}else 1===n&&1===r||o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,s,u),o=a=null,function(t){for(var e,n=-1,r=u.length;++n<r;)s[(e=u[n]).i]=e.x(t);return s.join("")}}}var Pi=ki((function(t){return"none"===t?Ci:(Ei||(Ei=document.createElement("DIV"),Oi=document.documentElement,Si=document.defaultView),Ei.style.transform=t,t=Si.getComputedStyle(Oi.appendChild(Ei),null).getPropertyValue("transform"),Oi.removeChild(Ei),Li(+(t=t.slice(7,-1).split(","))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),Di=ki((function(t){return null==t?Ci:(Mi||(Mi=document.createElementNS("http://www.w3.org/2000/svg","g")),Mi.setAttribute("transform",t),(t=Mi.transform.baseVal.consolidate())?Li((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Ci)}),", ",")",")");function Ri(t){return+t}var ji=[0,1];function Ii(t){return t}function Ni(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:function(t){return function(){return t}}(isNaN(e)?NaN:.5)}function Fi(t){var e,n=t[0],r=t[t.length-1];return n>r&&(e=n,n=r,r=e),function(t){return Math.max(n,Math.min(r,t))}}function Bi(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=Ni(i,r),o=n(a,o)):(r=Ni(r,i),o=n(o,a)),function(t){return o(r(t))}}function Vi(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<r;)i[a]=Ni(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(e){var n=vr(t,e,1,r)-1;return o[n](i[n](e))}}function Hi(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Ui(){var t,e,n,r,i,o,a=ji,s=ji,u=wi,l=Ii;function c(){return r=Math.min(a.length,s.length)>2?Vi:Bi,i=o=null,h}function h(e){return isNaN(e=+e)?n:(i||(i=r(a.map(t),s,u)))(t(l(e)))}return h.invert=function(n){return l(e((o||(o=r(s,a.map(t),yi)))(n)))},h.domain=function(t){return arguments.length?(a=Lr.call(t,Ri),l===Ii||(l=Fi(a)),c()):a.slice()},h.range=function(t){return arguments.length?(s=kr.call(t),c()):s.slice()},h.rangeRound=function(t){return s=kr.call(t),u=Ti,c()},h.clamp=function(t){return arguments.length?(l=t?Fi(a):Ii,h):l!==Ii},h.interpolate=function(t){return arguments.length?(u=t,c()):u},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,r){return t=n,e=r,c()}}function zi(t,e){return Ui()(t,e)}function Gi(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Yi(t){return(t=Gi(Math.abs(t)))?t[1]:NaN}var qi,Wi=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Xi(t){if(!(e=Wi.exec(t)))throw new Error("invalid format: "+t);var e;return new $i({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function $i(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function Zi(t,e){var n=Gi(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}Xi.prototype=$i.prototype,$i.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Ji={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return Zi(100*t,e)},r:Zi,s:function(t,e){var n=Gi(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(qi=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Gi(t,Math.max(0,e+o-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function Ki(t){return t}var Qi,to,eo,no=Array.prototype.map,ro=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function io(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?Ki:(e=no.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,o=[],a=0,s=e[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),o.push(t.substring(i-=s,i+s)),!((u+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",a=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?Ki:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(no.call(t.numerals,String)),u=void 0===t.percent?"%":t.percent+"",l=void 0===t.minus?"-":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=Xi(t)).fill,n=t.align,h=t.sign,f=t.symbol,p=t.zero,d=t.width,v=t.comma,g=t.precision,y=t.trim,m=t.type;"n"===m?(v=!0,m="g"):Ji[m]||(void 0===g&&(g=12),y=!0,m="g"),(p||"0"===e&&"="===n)&&(p=!0,e="0",n="=");var _="$"===f?i:"#"===f&&/[boxX]/.test(m)?"0"+m.toLowerCase():"",b="$"===f?o:/[%p]/.test(m)?u:"",x=Ji[m],w=/[defgprs%]/.test(m);function T(t){var i,o,u,f=_,T=b;if("c"===m)T=x(t)+T,t="";else{var E=(t=+t)<0;if(t=isNaN(t)?c:x(Math.abs(t),g),y&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),E&&0==+t&&(E=!1),f=(E?"("===h?h:l:"-"===h||"("===h?"":h)+f,T=("s"===m?ro[8+qi/3]:"")+T+(E&&"("===h?")":""),w)for(i=-1,o=t.length;++i<o;)if(48>(u=t.charCodeAt(i))||u>57){T=(46===u?a+t.slice(i+1):t.slice(i))+T,t=t.slice(0,i);break}}v&&!p&&(t=r(t,1/0));var O=f.length+t.length+T.length,S=O<d?new Array(d-O+1).join(e):"";switch(v&&p&&(t=r(S+t,S.length?d-T.length:1/0),S=""),n){case"<":t=f+t+T+S;break;case"=":t=f+S+t+T;break;case"^":t=S.slice(0,O=S.length>>1)+f+t+T+S.slice(O);break;default:t=S+f+t+T}return s(t)}return g=void 0===g?6:/[gprs]/.test(m)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),T.toString=function(){return t+""},T}return{format:h,formatPrefix:function(t,e){var n=h(((t=Xi(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Yi(e)/3))),i=Math.pow(10,-r),o=ro[8+r/3];return function(t){return n(i*t)+o}}}}function oo(t,e,n,r){var i,o=Tr(t,e,n);switch((r=Xi(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Yi(e)/3)))-Yi(Math.abs(t)))}(o,a))||(r.precision=i),eo(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Yi(e)-Yi(t))+1}(o,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(t){return Math.max(0,-Yi(Math.abs(t)))}(o))||(r.precision=i-2*("%"===r.type))}return to(r)}function ao(t){var e=t.domain;return t.ticks=function(t){var n=e();return xr(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return oo(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i=e(),o=0,a=i.length-1,s=i[o],u=i[a];return u<s&&(r=s,s=u,u=r,r=o,o=a,a=r),(r=wr(s,u,n))>0?r=wr(s=Math.floor(s/r)*r,u=Math.ceil(u/r)*r,n):r<0&&(r=wr(s=Math.ceil(s*r)/r,u=Math.floor(u*r)/r,n)),r>0?(i[o]=Math.floor(s/r)*r,i[a]=Math.ceil(u/r)*r,e(i)):r<0&&(i[o]=Math.ceil(s*r)/r,i[a]=Math.floor(u*r)/r,e(i)),t},t}function so(){var t=zi(Ii,Ii);return t.copy=function(){return Hi(t,so())},Er.apply(t,arguments),ao(t)}function uo(t,e){var n,r=0,i=(t=t.slice()).length-1,o=t[r],a=t[i];return a<o&&(n=r,r=i,i=n,n=o,o=a,a=n),t[r]=e.floor(o),t[i]=e.ceil(a),t}function lo(t){return Math.log(t)}function co(t){return Math.exp(t)}function ho(t){return-Math.log(-t)}function fo(t){return-Math.exp(-t)}function po(t){return isFinite(t)?+("1e"+t):t<0?0:t}function vo(t){return function(e){return-t(-e)}}function go(t){var e,n,r=t(lo,co),i=r.domain,o=10;function a(){return e=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),function(e){return Math.log(e)/t})}(o),n=function(t){return 10===t?po:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}(o),i()[0]<0?(e=vo(e),n=vo(n),t(ho,fo)):t(lo,co),r}return r.base=function(t){return arguments.length?(o=+t,a()):o},r.domain=function(t){return arguments.length?(i(t),a()):i()},r.ticks=function(t){var r,a=i(),s=a[0],u=a[a.length-1];(r=u<s)&&(f=s,s=u,u=f);var l,c,h,f=e(s),p=e(u),d=null==t?10:+t,v=[];if(!(o%1)&&p-f<d){if(f=Math.round(f)-1,p=Math.round(p)+1,s>0){for(;f<p;++f)for(c=1,l=n(f);c<o;++c)if(!((h=l*c)<s)){if(h>u)break;v.push(h)}}else for(;f<p;++f)for(c=o-1,l=n(f);c>=1;--c)if(!((h=l*c)<s)){if(h>u)break;v.push(h)}}else v=xr(f,p,Math.min(p-f,d)).map(n);return r?v.reverse():v},r.tickFormat=function(t,i){if(null==i&&(i=10===o?".0e":","),"function"!=typeof i&&(i=to(i)),t===1/0)return i;null==t&&(t=10);var a=Math.max(1,o*t/r.ticks().length);return function(t){var r=t/n(Math.round(e(t)));return r*o<o-.5&&(r*=o),r<=a?i(t):""}},r.nice=function(){return i(uo(i(),{floor:function(t){return n(Math.floor(e(t)))},ceil:function(t){return n(Math.ceil(e(t)))}}))},r}Qi=io({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),to=Qi.format,eo=Qi.formatPrefix;var yo=new Date,mo=new Date;function _o(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=function(e){return t(e=new Date(+e)),e},i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e<n-t?e:n},i.offset=function(t,n){return e(t=new Date(+t),null==n?1:Math.floor(n)),t},i.range=function(n,r,o){var a,s=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return s;do{s.push(a=new Date(+n)),e(n,o),t(n)}while(a<n&&n<r);return s},i.filter=function(n){return _o((function(e){if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}))},n&&(i.count=function(e,r){return yo.setTime(+e),mo.setTime(+r),t(yo),t(mo),Math.floor(n(yo,mo))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t==0}:function(e){return i.count(0,e)%t==0}):i:null}),i}var bo=_o((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));bo.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?_o((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):bo:null};var xo=_o((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+1e3*e)}),(function(t,e){return(e-t)/1e3}),(function(t){return t.getUTCSeconds()})),wo=_o((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())}),(function(t,e){t.setTime(+t+6e4*e)}),(function(t,e){return(e-t)/6e4}),(function(t){return t.getMinutes()})),To=_o((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-6e4*t.getMinutes())}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getHours()})),Eo=_o((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5}),(function(t){return t.getDate()-1}));function Oo(t){return _o((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/6048e5}))}var So=Oo(0),Mo=Oo(1),Ao=(Oo(2),Oo(3),Oo(4)),Co=(Oo(5),Oo(6),_o((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()}))),Lo=_o((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));Lo.every=function(t){return isFinite(t=Math.floor(t))&&t>0?_o((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null};var ko=_o((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/864e5}),(function(t){return t.getUTCDate()-1}));function Po(t){return _o((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/6048e5}))}var Do=Po(0),Ro=Po(1),jo=(Po(2),Po(3),Po(4)),Io=(Po(5),Po(6),_o((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()})));function No(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Fo(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Bo(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}Io.every=function(t){return isFinite(t=Math.floor(t))&&t>0?_o((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null};var Vo,Ho,Uo={"-":"",_:" ",0:"0"},zo=/^\s*\d+/,Go=/^%/,Yo=/[\\^$*+?|[\]().{}]/g;function qo(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(e)+i:i)}function Wo(t){return t.replace(Yo,"\\$&")}function Xo(t){return new RegExp("^(?:"+t.map(Wo).join("|")+")","i")}function $o(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function Zo(t,e,n){var r=zo.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Jo(t,e,n){var r=zo.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Ko(t,e,n){var r=zo.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Qo(t,e,n){var r=zo.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function ta(t,e,n){var r=zo.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function ea(t,e,n){var r=zo.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function na(t,e,n){var r=zo.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function ra(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function ia(t,e,n){var r=zo.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function oa(t,e,n){var r=zo.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function aa(t,e,n){var r=zo.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function sa(t,e,n){var r=zo.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function ua(t,e,n){var r=zo.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function la(t,e,n){var r=zo.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function ca(t,e,n){var r=zo.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function ha(t,e,n){var r=zo.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function fa(t,e,n){var r=zo.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function pa(t,e,n){var r=Go.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function da(t,e,n){var r=zo.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function va(t,e,n){var r=zo.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function ga(t,e){return qo(t.getDate(),e,2)}function ya(t,e){return qo(t.getHours(),e,2)}function ma(t,e){return qo(t.getHours()%12||12,e,2)}function _a(t,e){return qo(1+Eo.count(Lo(t),t),e,3)}function ba(t,e){return qo(t.getMilliseconds(),e,3)}function xa(t,e){return ba(t,e)+"000"}function wa(t,e){return qo(t.getMonth()+1,e,2)}function Ta(t,e){return qo(t.getMinutes(),e,2)}function Ea(t,e){return qo(t.getSeconds(),e,2)}function Oa(t){var e=t.getDay();return 0===e?7:e}function Sa(t,e){return qo(So.count(Lo(t)-1,t),e,2)}function Ma(t,e){var n=t.getDay();return t=n>=4||0===n?Ao(t):Ao.ceil(t),qo(Ao.count(Lo(t),t)+(4===Lo(t).getDay()),e,2)}function Aa(t){return t.getDay()}function Ca(t,e){return qo(Mo.count(Lo(t)-1,t),e,2)}function La(t,e){return qo(t.getFullYear()%100,e,2)}function ka(t,e){return qo(t.getFullYear()%1e4,e,4)}function Pa(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+qo(e/60|0,"0",2)+qo(e%60,"0",2)}function Da(t,e){return qo(t.getUTCDate(),e,2)}function Ra(t,e){return qo(t.getUTCHours(),e,2)}function ja(t,e){return qo(t.getUTCHours()%12||12,e,2)}function Ia(t,e){return qo(1+ko.count(Io(t),t),e,3)}function Na(t,e){return qo(t.getUTCMilliseconds(),e,3)}function Fa(t,e){return Na(t,e)+"000"}function Ba(t,e){return qo(t.getUTCMonth()+1,e,2)}function Va(t,e){return qo(t.getUTCMinutes(),e,2)}function Ha(t,e){return qo(t.getUTCSeconds(),e,2)}function Ua(t){var e=t.getUTCDay();return 0===e?7:e}function za(t,e){return qo(Do.count(Io(t)-1,t),e,2)}function Ga(t,e){var n=t.getUTCDay();return t=n>=4||0===n?jo(t):jo.ceil(t),qo(jo.count(Io(t),t)+(4===Io(t).getUTCDay()),e,2)}function Ya(t){return t.getUTCDay()}function qa(t,e){return qo(Ro.count(Io(t)-1,t),e,2)}function Wa(t,e){return qo(t.getUTCFullYear()%100,e,2)}function Xa(t,e){return qo(t.getUTCFullYear()%1e4,e,4)}function $a(){return"+0000"}function Za(){return"%"}function Ja(t){return+t}function Ka(t){return Math.floor(+t/1e3)}function Qa(t){return Vo=function(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,o=t.days,a=t.shortDays,s=t.months,u=t.shortMonths,l=Xo(i),c=$o(i),h=Xo(o),f=$o(o),p=Xo(a),d=$o(a),v=Xo(s),g=$o(s),y=Xo(u),m=$o(u),_={a:function(t){return a[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return u[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:ga,e:ga,f:xa,H:ya,I:ma,j:_a,L:ba,m:wa,M:Ta,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Ja,s:Ka,S:Ea,u:Oa,U:Sa,V:Ma,w:Aa,W:Ca,x:null,X:null,y:La,Y:ka,Z:Pa,"%":Za},b={a:function(t){return a[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return u[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:Da,e:Da,f:Fa,H:Ra,I:ja,j:Ia,L:Na,m:Ba,M:Va,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Ja,s:Ka,S:Ha,u:Ua,U:za,V:Ga,w:Ya,W:qa,x:null,X:null,y:Wa,Y:Xa,Z:$a,"%":Za},x={a:function(t,e,n){var r=p.exec(e.slice(n));return r?(t.w=d[r[0].toLowerCase()],n+r[0].length):-1},A:function(t,e,n){var r=h.exec(e.slice(n));return r?(t.w=f[r[0].toLowerCase()],n+r[0].length):-1},b:function(t,e,n){var r=y.exec(e.slice(n));return r?(t.m=m[r[0].toLowerCase()],n+r[0].length):-1},B:function(t,e,n){var r=v.exec(e.slice(n));return r?(t.m=g[r[0].toLowerCase()],n+r[0].length):-1},c:function(t,n,r){return E(t,e,n,r)},d:aa,e:aa,f:fa,H:ua,I:ua,j:sa,L:ha,m:oa,M:la,p:function(t,e,n){var r=l.exec(e.slice(n));return r?(t.p=c[r[0].toLowerCase()],n+r[0].length):-1},q:ia,Q:da,s:va,S:ca,u:Jo,U:Ko,V:Qo,w:Zo,W:ta,x:function(t,e,r){return E(t,n,e,r)},X:function(t,e,n){return E(t,r,e,n)},y:na,Y:ea,Z:ra,"%":pa};function w(t,e){return function(n){var r,i,o,a=[],s=-1,u=0,l=t.length;for(n instanceof Date||(n=new Date(+n));++s<l;)37===t.charCodeAt(s)&&(a.push(t.slice(u,s)),null!=(i=Uo[r=t.charAt(++s)])?r=t.charAt(++s):i="e"===r?" ":"0",(o=e[r])&&(r=o(n,i)),a.push(r),u=s+1);return a.push(t.slice(u,s)),a.join("")}}function T(t,e){return function(n){var r,i,o=Bo(1900,void 0,1);if(E(o,t,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(!e||"Z"in o||(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=Fo(Bo(o.y,0,1))).getUTCDay(),r=i>4||0===i?Ro.ceil(r):Ro(r),r=ko.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=No(Bo(o.y,0,1))).getDay(),r=i>4||0===i?Mo.ceil(r):Mo(r),r=Eo.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?Fo(Bo(o.y,0,1)).getUTCDay():No(Bo(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,Fo(o)):No(o)}}function E(t,e,n,r){for(var i,o,a=0,s=e.length,u=n.length;a<s;){if(r>=u)return-1;if(37===(i=e.charCodeAt(a++))){if(i=e.charAt(a++),!(o=x[i in Uo?e.charAt(a++):i])||(r=o(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return(_.x=w(n,_),_.X=w(r,_),_.c=w(e,_),b.x=w(n,b),b.X=w(r,b),b.c=w(e,b),{format:function(t){var e=w(t+="",_);return e.toString=function(){return t},e},parse:function(t){var e=T(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=w(t+="",b);return e.toString=function(){return t},e},utcParse:function(t){var e=T(t+="",!0);return e.toString=function(){return t},e}})}(t),Ho=Vo.format,Vo.parse,Vo.utcFormat,Vo.utcParse,Vo}Qa({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function ts(t){return new Date(t)}function es(t){return t instanceof Date?+t:+new Date(+t)}function ns(t,e,n,r,i,o,a,s,u){var l=zi(Ii,Ii),c=l.invert,h=l.domain,f=u(".%L"),p=u(":%S"),d=u("%I:%M"),v=u("%I %p"),g=u("%a %d"),y=u("%b %d"),m=u("%B"),_=u("%Y"),b=[[a,1,1e3],[a,5,5e3],[a,15,15e3],[a,30,3e4],[o,1,6e4],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,36e5],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,864e5],[r,2,1728e5],[n,1,6048e5],[e,1,2592e6],[e,3,7776e6],[t,1,31536e6]];function x(s){return(a(s)<s?f:o(s)<s?p:i(s)<s?d:r(s)<s?v:e(s)<s?n(s)<s?g:y:t(s)<s?m:_)(s)}function w(e,n,r,i){if(null==e&&(e=10),"number"==typeof e){var o=Math.abs(r-n)/e,a=dr((function(t){return t[2]})).right(b,o);a===b.length?(i=Tr(n/31536e6,r/31536e6,e),e=t):a?(i=(a=b[o/b[a-1][2]<b[a][2]/o?a-1:a])[1],e=a[0]):(i=Math.max(Tr(n,r,e),1),e=s)}return null==i?e:e.every(i)}return l.invert=function(t){return new Date(c(t))},l.domain=function(t){return arguments.length?h(Lr.call(t,es)):h().map(ts)},l.ticks=function(t,e){var n,r=h(),i=r[0],o=r[r.length-1],a=o<i;return a&&(n=i,i=o,o=n),n=(n=w(t,i,o,e))?n.range(i,o+1):[],a?n.reverse():n},l.tickFormat=function(t,e){return null==e?x:u(e)},l.nice=function(t,e){var n=h();return(t=w(t,n[0],n[n.length-1],e))?h(uo(n,t)):l},l.copy=function(){return Hi(l,ns(t,e,n,r,i,o,a,s,u))},l}var rs=function(){function t(t){this.state={options:{}},this.patternScale={},this.colorScale={},this.services=t}return t.prototype.sanitize=function(t){return t.datasets.forEach((function(t){t.data=t.data.map((function(t){return t.date&&!t.date.getTime&&(t.date=new Date(t.date)),t}))})),t},t.prototype.getDisplayData=function(){var t=Tn.items.status.ACTIVE,e=this.get("dataLabels");if(!this.get("data"))return null;var n=_n.clone(this.get("data"));return n.datasets=n.datasets.filter((function(n){return e[n.label]===t})),n},t.prototype.getData=function(){return this.get("data")},t.prototype.setData=function(t){var e=this.sanitize(_n.clone(t)),n=this.generateDataLabels(e);return this.set({data:e,dataLabels:n}),e},t.prototype.generateDataLabels=function(t){var e={};return t.datasets.forEach((function(t){e[t.label]=Tn.items.status.ACTIVE})),e},t.prototype.getOptions=function(){return this.state.options},t.prototype.set=function(t,e){void 0===e&&(e=!1),this.state=Object.assign({},this.state,t),e||this.update()},t.prototype.get=function(t){return t?this.state[t]:this.state},t.prototype.setOptions=function(t){this.set({options:_n.merge(this.getOptions(),t)})},t.prototype.update=function(){this.getDisplayData()&&(this.updateAllDataLabels(),this.setColorScale(),this.services.events.dispatchEvent("model-update"))},t.prototype.setUpdateCallback=function(t){this.updateCallback=t},t.prototype.toggleDataLabel=function(t){var e=Tn.items.status,n=e.ACTIVE,r=e.DISABLED,i=this.get("dataLabels"),o=Object.keys(i).some((function(t){return i[t]===r})),a=Object.keys(i).filter((function(t){return i[t]===n}));o?1===a.length&&a[0]===t?Object.keys(i).forEach((function(t){i[t]=n})):i[t]=i[t]===r?n:r:Object.keys(i).forEach((function(e){i[e]=e===t?n:r})),this.set({dataLabels:i})},t.prototype.setColorScale=function(){var t=this;if(this.getDisplayData().datasets[0].fillColors)this.getDisplayData().datasets.forEach((function(e){t.colorScale[e.label]=Dr().range(e.fillColors).domain(t.allDataLabels)}));else{var e=hr;this.getData().datasets.forEach((function(n,r){t.colorScale[n.label]=Dr().range([e[r]]).domain(t.allDataLabels)}))}},t.prototype.getIsFilled=function(t,e,n,r){var i=this.getOptions();return i.getIsFilled?i.getIsFilled(t,e,n,r):r},t.prototype.getFillColor=function(t,e,n){var r=this.getOptions(),i=this.getFillScale()[t](e);return r.getFillColor?r.getFillColor(t,e,n,i):i},t.prototype.getStrokeColor=function(t,e,n){var r=this.getOptions(),i=this.colorScale[t](e);return r.getStrokeColor?r.getStrokeColor(t,e,n,i):i},t.prototype.getFillScale=function(){return this.colorScale},t.prototype.updateAllDataLabels=function(){var t=this;this.allDataLabels?this.getDisplayData().labels.forEach((function(e){-1===t.allDataLabels.indexOf(e)&&t.allDataLabels.push(e)})):this.allDataLabels=this.getDisplayData().labels},t}(),is=function(){function t(t,e){this.model=t,this.services=e,this.init()}return t.prototype.init=function(){},t.prototype.update=function(){},t.prototype.setModel=function(t){this.model=t},t.prototype.setServices=function(t){this.services=t},t}(),os="http://www.w3.org/1999/xhtml",as={svg:"http://www.w3.org/2000/svg",xhtml:os,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ss(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),as.hasOwnProperty(e)?{space:as[e],local:t}:t}function us(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===os&&e.documentElement.namespaceURI===os?e.createElement(t):e.createElementNS(n,t)}}function ls(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function cs(t){var e=ss(t);return(e.local?ls:us)(e)}function hs(){}function fs(t){return null==t?hs:function(){return this.querySelector(t)}}function ps(){return[]}function ds(t){return null==t?ps:function(){return this.querySelectorAll(t)}}function vs(t){return function(){return this.matches(t)}}function gs(t){return new Array(t.length)}function ys(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}ys.prototype={constructor:ys,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function ms(t,e,n,r,i,o){for(var a,s=0,u=e.length,l=o.length;s<l;++s)(a=e[s])?(a.__data__=o[s],r[s]=a):n[s]=new ys(t,o[s]);for(;s<u;++s)(a=e[s])&&(i[s]=a)}function _s(t,e,n,r,i,o,a){var s,u,l,c={},h=e.length,f=o.length,p=new Array(h);for(s=0;s<h;++s)(u=e[s])&&(p[s]=l="$"+a.call(u,u.__data__,s,e),l in c?i[s]=u:c[l]=u);for(s=0;s<f;++s)(u=c[l="$"+a.call(t,o[s],s,o)])?(r[s]=u,u.__data__=o[s],c[l]=null):n[s]=new ys(t,o[s]);for(s=0;s<h;++s)(u=e[s])&&c[p[s]]===u&&(i[s]=u)}function bs(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function xs(t){return function(){this.removeAttribute(t)}}function ws(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Ts(t,e){return function(){this.setAttribute(t,e)}}function Es(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Os(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Ss(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Ms(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function As(t){return function(){this.style.removeProperty(t)}}function Cs(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Ls(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function ks(t,e){return t.style.getPropertyValue(e)||Ms(t).getComputedStyle(t,null).getPropertyValue(e)}function Ps(t){return function(){delete this[t]}}function Ds(t,e){return function(){this[t]=e}}function Rs(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function js(t){return t.trim().split(/^|\s+/)}function Is(t){return t.classList||new Ns(t)}function Ns(t){this._node=t,this._names=js(t.getAttribute("class")||"")}function Fs(t,e){for(var n=Is(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Bs(t,e){for(var n=Is(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function Vs(t){return function(){Fs(this,t)}}function Hs(t){return function(){Bs(this,t)}}function Us(t,e){return function(){(e.apply(this,arguments)?Fs:Bs)(this,t)}}function zs(){this.textContent=""}function Gs(t){return function(){this.textContent=t}}function Ys(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function qs(){this.innerHTML=""}function Ws(t){return function(){this.innerHTML=t}}function Xs(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function $s(){this.nextSibling&&this.parentNode.appendChild(this)}function Zs(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Js(){return null}function Ks(){var t=this.parentNode;t&&t.removeChild(this)}function Qs(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function tu(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}Ns.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var eu={},nu=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(eu={mouseenter:"mouseover",mouseleave:"mouseout"}));function ru(t,e,n){return t=iu(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function iu(t,e,n){return function(r){var i=nu;nu=r;try{t.call(this,this.__data__,e,n)}finally{nu=i}}}function ou(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function au(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,o=e.length;r<o;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.capture);++i?e.length=i:delete this.__on}}}function su(t,e,n){var r=eu.hasOwnProperty(t.type)?ru:iu;return function(i,o,a){var s,u=this.__on,l=r(e,o,a);if(u)for(var c=0,h=u.length;c<h;++c)if((s=u[c]).type===t.type&&s.name===t.name)return this.removeEventListener(s.type,s.listener,s.capture),this.addEventListener(s.type,s.listener=l,s.capture=n),void(s.value=e);this.addEventListener(t.type,l,n),s={type:t.type,name:t.name,value:e,listener:l,capture:n},u?u.push(s):this.__on=[s]}}function uu(t,e,n){var r=Ms(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function lu(t,e){return function(){return uu(this,t,e)}}function cu(t,e){return function(){return uu(this,t,e.apply(this,arguments))}}var hu=[null];function fu(t,e){this._groups=t,this._parents=e}function pu(){return new fu([[document.documentElement]],hu)}function du(t){return"string"==typeof t?new fu([[document.querySelector(t)]],[document.documentElement]):new fu([[t]],hu)}function vu(){for(var t,e=nu;t=e.sourceEvent;)e=t;return e}function gu(t){var e=vu();return e.changedTouches&&(e=e.changedTouches[0]),function(t,e){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}(t,e)}fu.prototype=pu.prototype={constructor:fu,select:function(t){"function"!=typeof t&&(t=fs(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a,s=e[i],u=s.length,l=r[i]=new Array(u),c=0;c<u;++c)(o=s[c])&&(a=t.call(o,o.__data__,c,s))&&("__data__"in o&&(a.__data__=o.__data__),l[c]=a);return new fu(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=ds(t));for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a,s=e[o],u=s.length,l=0;l<u;++l)(a=s[l])&&(r.push(t.call(a,a.__data__,l,s)),i.push(a));return new fu(r,i)},filter:function(t){"function"!=typeof t&&(t=vs(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a=e[i],s=a.length,u=r[i]=[],l=0;l<s;++l)(o=a[l])&&t.call(o,o.__data__,l,a)&&u.push(o);return new fu(r,this._parents)},data:function(t,e){if(!t)return p=new Array(this.size()),l=-1,this.each((function(t){p[++l]=t})),p;var n=e?_s:ms,r=this._parents,i=this._groups;"function"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var o=i.length,a=new Array(o),s=new Array(o),u=new Array(o),l=0;l<o;++l){var c=r[l],h=i[l],f=h.length,p=t.call(c,c&&c.__data__,l,r),d=p.length,v=s[l]=new Array(d),g=a[l]=new Array(d);n(c,h,v,g,u[l]=new Array(f),p,e);for(var y,m,_=0,b=0;_<d;++_)if(y=v[_]){for(_>=b&&(b=_+1);!(m=g[b])&&++b<d;);y._next=m||null}}return(a=new fu(a,r))._enter=s,a._exit=u,a},enter:function(){return new fu(this._enter||this._groups.map(gs),this._parents)},exit:function(){return new fu(this._exit||this._groups.map(gs),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,o=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=e&&(i=e(i)),null==n?o.remove():n(o),r&&i?r.merge(i).order():i},merge:function(t){for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u,l=e[s],c=n[s],h=l.length,f=a[s]=new Array(h),p=0;p<h;++p)(u=l[p]||c[p])&&(f[p]=u);for(;s<r;++s)a[s]=e[s];return new fu(a,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=bs);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a,s=n[o],u=s.length,l=i[o]=new Array(u),c=0;c<u;++c)(a=s[c])&&(l[c]=a);l.sort(e)}return new fu(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),e=-1;return this.each((function(){t[++e]=this})),t},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null},size:function(){var t=0;return this.each((function(){++t})),t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,o=e[n],a=0,s=o.length;a<s;++a)(i=o[a])&&t.call(i,i.__data__,a,o);return this},attr:function(t,e){var n=ss(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?ws:xs:"function"==typeof e?n.local?Ss:Os:n.local?Es:Ts)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?As:"function"==typeof e?Ls:Cs)(t,e,null==n?"":n)):ks(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Ps:"function"==typeof e?Rs:Ds)(t,e)):this.node()[t]},classed:function(t,e){var n=js(t+"");if(arguments.length<2){for(var r=Is(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?Us:e?Vs:Hs)(n,e))},text:function(t){return arguments.length?this.each(null==t?zs:("function"==typeof t?Ys:Gs)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?qs:("function"==typeof t?Xs:Ws)(t)):this.node().innerHTML},raise:function(){return this.each($s)},lower:function(){return this.each(Zs)},append:function(t){var e="function"==typeof t?t:cs(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:cs(t),r=null==e?Js:"function"==typeof e?e:fs(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(Ks)},clone:function(t){return this.select(t?tu:Qs)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,o=ou(t+""),a=o.length;if(!(arguments.length<2)){for(s=e?su:au,null==n&&(n=!1),r=0;r<a;++r)this.each(s(o[r],e,n));return this}var s=this.node().__on;if(s)for(var u,l=0,c=s.length;l<c;++l)for(r=0,u=s[l];r<a;++r)if((i=o[r]).type===u.type&&i.name===u.name)return u.value},dispatch:function(t,e){return this.each(("function"==typeof e?cu:lu)(t,e))}};var yu={prefix:"bx",selectorTabbable:"\n a[href], area[href], input:not([disabled]):not([tabindex='-1']),\n button:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']),\n textarea:not([disabled]):not([tabindex='-1']),\n iframe, object, embed, *[tabindex]:not([tabindex='-1']), *[contenteditable=true]\n "},mu=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var n=-1;return t.some((function(t,r){return t[0]===e&&(n=r,!0)})),n}return function(){function e(){this.__entries__=[]}var n={size:{configurable:!0}};return n.size.get=function(){return this.__entries__.length},e.prototype.get=function(e){var n=t(this.__entries__,e),r=this.__entries__[n];return r&&r[1]},e.prototype.set=function(e,n){var r=t(this.__entries__,e);~r?this.__entries__[r][1]=n:this.__entries__.push([e,n])},e.prototype.delete=function(e){var n=this.__entries__,r=t(n,e);~r&&n.splice(r,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var n=0,r=this.__entries__;n<r.length;n+=1){var i=r[n];t.call(e,i[1],i[0])}},Object.defineProperties(e.prototype,n),e}()}(),_u="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,bu="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),xu="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(bu):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)},wu=["top","right","bottom","left","width","height","size","weight"],Tu="undefined"!=typeof MutationObserver,Eu=function(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var n=!1,r=!1,i=0;function o(){n&&(n=!1,t()),r&&s()}function a(){xu(o)}function s(){var t=Date.now();if(n){if(t-i<2)return;r=!0}else n=!0,r=!1,setTimeout(a,e);i=t}return s}(this.refresh.bind(this),20)};Eu.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},Eu.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},Eu.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},Eu.prototype.updateObservers_=function(){var t=this.observers_.filter((function(t){return t.gatherActive(),t.hasActive()}));return t.forEach((function(t){return t.broadcastActive()})),t.length>0},Eu.prototype.connect_=function(){_u&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Tu?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},Eu.prototype.disconnect_=function(){_u&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},Eu.prototype.onTransitionEnd_=function(t){var e=t.propertyName;void 0===e&&(e=""),wu.some((function(t){return!!~e.indexOf(t)}))&&this.refresh()},Eu.getInstance=function(){return this.instance_||(this.instance_=new Eu),this.instance_},Eu.instance_=null;var Ou=function(t,e){for(var n=0,r=Object.keys(e);n<r.length;n+=1){var i=r[n];Object.defineProperty(t,i,{value:e[i],enumerable:!1,writable:!1,configurable:!0})}return t},Su=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||bu},Mu=Du(0,0,0,0);function Au(t){return parseFloat(t)||0}function Cu(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];return e.reduce((function(e,n){return e+Au(t["border-"+n+"-width"])}),0)}function Lu(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return Mu;var r=Su(t).getComputedStyle(t),i=function(t){for(var e={},n=0,r=["top","right","bottom","left"];n<r.length;n+=1){var i=r[n],o=t["padding-"+i];e[i]=Au(o)}return e}(r),o=i.left+i.right,a=i.top+i.bottom,s=Au(r.width),u=Au(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==e&&(s-=Cu(r,"left","right")+o),Math.round(u+a)!==n&&(u-=Cu(r,"top","bottom")+a)),!function(t){return t===Su(t).document.documentElement}(t)){var l=Math.round(s+o)-e,c=Math.round(u+a)-n;1!==Math.abs(l)&&(s-=l),1!==Math.abs(c)&&(u-=c)}return Du(i.left,i.top,s,u)}var ku="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof Su(t).SVGGraphicsElement}:function(t){return t instanceof Su(t).SVGElement&&"function"==typeof t.getBBox};function Pu(t){return _u?ku(t)?function(t){var e=t.getBBox();return Du(0,0,e.width,e.height)}(t):Lu(t):Mu}function Du(t,e,n,r){return{x:t,y:e,width:n,height:r}}var Ru=function(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Du(0,0,0,0),this.target=t};Ru.prototype.isActive=function(){var t=Pu(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},Ru.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t};var ju=function(t,e){var n=function(t){var e=t.x,n=t.y,r=t.width,i=t.height,o="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,a=Object.create(o.prototype);return Ou(a,{x:e,y:n,width:r,height:i,top:n,right:e+r,bottom:i+n,left:e}),a}(e);Ou(this,{target:t,contentRect:n})},Iu=function(t,e,n){if(this.activeObservations_=[],this.observations_=new mu,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=n};Iu.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof Su(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new Ru(t)),this.controller_.addObserver(this),this.controller_.refresh())}},Iu.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof Su(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},Iu.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},Iu.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},Iu.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new ju(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},Iu.prototype.clearActive=function(){this.activeObservations_.splice(0)},Iu.prototype.hasActive=function(){return this.activeObservations_.length>0};var Nu="undefined"!=typeof WeakMap?new WeakMap:new mu,Fu=function(t){if(!(this instanceof Fu))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var e=Eu.getInstance(),n=new Iu(t,e,this);Nu.set(this,n)};["observe","unobserve","disconnect"].forEach((function(t){Fu.prototype[t]=function(){return(e=Nu.get(this))[t].apply(e,arguments);var e}}));var Bu=void 0!==bu.ResizeObserver?bu.ResizeObserver:Fu,Vu=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s(e,t),e.getSVGElementSize=function(t,e){t.attr||(t=du(t));var n,r,i,o,a={width:t.attr("width"),height:t.attr("height")};try{r={width:(n=t.node().getBBox()).width,height:n.height}}catch(t){}try{o={width:(i=t.node().getBoundingClientRect()).width,height:i.height}}catch(t){}var s={width:t.node().clientWidth,height:t.node().clientHeight},u=function(t){return!!(t&&t.width&&t.height&&!isNaN(t.height)&&!isNaN(t.width)&&-1===(""+t.width+t.height).indexOf("%")&&t.width>0&&t.height>0)};if(e){if(e.useAttrs&&u(a))return a;if(e.useClientDimensions&&u(s))return s;if(e.useBBox&&u(r))return r;if(e.useBoundingRect&&u(o))return o}try{var l={width:_n.getProperty(t.node(),"width","baseVal","value"),height:_n.getProperty(t.node(),"height","baseVal","value")};if(u(l))return l}catch(t){if(u(s))return s;if(u(r))return r;if(u(a))return a}return{width:0,height:0}},e.appendOrSelect=function(t,e){var n=e.split("."),r=n[0],i=t.select(e);return i.empty()?t.append(r).attr("class",n.slice(1).join(" ")):i},e.prototype.init=function(){this.styleHolderElement(),this.addSVGElement(),this.model.getOptions().resizable&&this.addResizeListener()},e.prototype.update=function(){this.styleHolderElement()},e.prototype.styleHolderElement=function(){var t=this.getHolder();du(this.getHolder()).classed(yu.prefix+"--chart-holder",!0);var e=this.model.getOptions(),n=e.width,r=e.height;n!==this.width&&(t.style.width=n,this.width=n),r!==this.height&&(t.style.height=r,this.height=r)},e.prototype.getHolder=function(){return this.model.get("holder")},e.prototype.addSVGElement=function(){var t=_n.getProperty(this.model.getOptions(),"style","prefix"),e=du(this.getHolder()).append("svg").classed(yu.prefix+"--"+t+"--chart-svg",!0).attr("height","100%").attr("width","100%");this.svg=e.node()},e.prototype.getMainSVG=function(){return this.svg},e.prototype.addResizeListener=function(){var t=this,e=this.getHolder();if(e){var n=e.clientWidth,r=e.clientHeight,i=_n.debounce((function(i,o){e&&(Math.abs(n-e.clientWidth)>1||Math.abs(r-e.clientHeight)>1)&&(n=e.clientWidth,r=e.clientHeight,t.services.events.dispatchEvent("chart-resize"))}),12.5);new Bu(i).observe(e)}},e}(is),Hu=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s(e,t),e.prototype.init=function(){this.documentFragment=document.createDocumentFragment()},e.prototype.addEventListener=function(t,e){this.documentFragment.addEventListener(t,e)},e.prototype.removeEventListener=function(t,e){this.documentFragment.removeEventListener(t,e)},e.prototype.dispatchEvent=function(t,e){var n;e?n=new CustomEvent(t,{detail:e}):(n=document.createEvent("Event")).initEvent(t,!1,!0),this.documentFragment.dispatchEvent(n)},e}(is),Uu={value:function(){}};function zu(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new Gu(r)}function Gu(t){this._=t}function Yu(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function qu(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function Wu(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Uu,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}Gu.prototype=zu.prototype={constructor:Gu,on:function(t,e){var n,r=this._,i=Yu(t+"",r),o=-1,a=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<a;)if(n=(t=i[o]).type)r[n]=Wu(r[n],t.name,e);else if(null==e)for(n in r)r[n]=Wu(r[n],t.name,null);return this}for(;++o<a;)if((n=(t=i[o]).type)&&(n=qu(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Gu(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,n=(r=this._[t]).length;o<n;++o)r[o].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};var Xu,$u,Zu=0,Ju=0,Ku=0,Qu=0,tl=0,el=0,nl="object"==typeof performance&&performance.now?performance:Date,rl="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function il(){return tl||(rl(ol),tl=nl.now()+el)}function ol(){tl=0}function al(){this._call=this._time=this._next=null}function sl(t,e,n){var r=new al;return r.restart(t,e,n),r}function ul(){tl=(Qu=nl.now())+el,Zu=Ju=0;try{!function(){il(),++Zu;for(var t,e=Xu;e;)(t=tl-e._time)>=0&&e._call.call(null,t),e=e._next;--Zu}()}finally{Zu=0,function(){var t,e,n=Xu,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Xu=e);$u=t,cl(r)}(),tl=0}}function ll(){var t=nl.now(),e=t-Qu;e>1e3&&(el-=e,Qu=t)}function cl(t){Zu||(Ju&&(Ju=clearTimeout(Ju)),t-tl>24?(t<1/0&&(Ju=setTimeout(ul,t-nl.now()-el)),Ku&&(Ku=clearInterval(Ku))):(Ku||(Qu=nl.now(),Ku=setInterval(ll,1e3)),Zu=1,rl(ul)))}function hl(t,e,n){var r=new al;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}al.prototype=sl.prototype={constructor:al,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?il():+n)+(null==e?0:+e),this._next||$u===this||($u?$u._next=this:Xu=this,$u=this),this._call=t,this._time=n,cl()},stop:function(){this._call&&(this._call=null,this._time=1/0,cl())}};var fl=zu("start","end","cancel","interrupt"),pl=[];function dl(t,e,n,r,i,o){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function o(u){var l,c,h,f;if(1!==n.state)return s();for(l in i)if((f=i[l]).name===n.name){if(3===f.state)return hl(o);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[l]):+l<e&&(f.state=6,f.timer.stop(),f.on.call("cancel",t,t.__data__,f.index,f.group),delete i[l])}if(hl((function(){3===n.state&&(n.state=4,n.timer.restart(a,n.delay,n.time),a(u))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(h=n.tween.length),l=0,c=-1;l<h;++l)(f=n.tween[l].value.call(t,t.__data__,n.index,n.group))&&(r[++c]=f);r.length=c+1}}function a(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(s),n.state=5,1),o=-1,a=r.length;++o<a;)r[o].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),s())}function s(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=sl((function(t){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=t&&o(t-n.delay)}),0,n.time)}(t,n,{name:e,index:r,group:i,on:fl,tween:pl,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function vl(t,e){var n=yl(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function gl(t,e){var n=yl(t,e);if(n.state>3)throw new Error("too late; already running");return n}function yl(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function ml(t,e){var n,r;return function(){var i=gl(this,t),o=i.tween;if(o!==n)for(var a=0,s=(r=n=o).length;a<s;++a)if(r[a].name===e){(r=r.slice()).splice(a,1);break}i.tween=r}}function _l(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var o=gl(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},u=0,l=i.length;u<l;++u)if(i[u].name===e){i[u]=s;break}u===l&&i.push(s)}o.tween=i}}function bl(t,e,n){var r=t._id;return t.each((function(){var t=gl(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return yl(t,r).value[e]}}function xl(t,e){var n;return("number"==typeof e?yi:e instanceof Jr?pi:(n=Jr(e))?(e=n,pi):xi)(t,e)}function wl(t){return function(){this.removeAttribute(t)}}function Tl(t){return function(){this.removeAttributeNS(t.space,t.local)}}function El(t,e,n){var r,i,o=n+"";return function(){var a=this.getAttribute(t);return a===o?null:a===r?i:i=e(r=a,n)}}function Ol(t,e,n){var r,i,o=n+"";return function(){var a=this.getAttributeNS(t.space,t.local);return a===o?null:a===r?i:i=e(r=a,n)}}function Sl(t,e,n){var r,i,o;return function(){var a,s,u=n(this);if(null!=u)return(a=this.getAttribute(t))===(s=u+"")?null:a===r&&s===i?o:(i=s,o=e(r=a,u));this.removeAttribute(t)}}function Ml(t,e,n){var r,i,o;return function(){var a,s,u=n(this);if(null!=u)return(a=this.getAttributeNS(t.space,t.local))===(s=u+"")?null:a===r&&s===i?o:(i=s,o=e(r=a,u));this.removeAttributeNS(t.space,t.local)}}function Al(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Cl(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Ll(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&Cl(t,i)),n}return i._value=e,i}function kl(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&Al(t,i)),n}return i._value=e,i}function Pl(t,e){return function(){vl(this,t).delay=+e.apply(this,arguments)}}function Dl(t,e){return e=+e,function(){vl(this,t).delay=e}}function Rl(t,e){return function(){gl(this,t).duration=+e.apply(this,arguments)}}function jl(t,e){return e=+e,function(){gl(this,t).duration=e}}function Il(t,e){if("function"!=typeof e)throw new Error;return function(){gl(this,t).ease=e}}function Nl(t,e,n){var r,i,o=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?vl:gl;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}var Fl=pu.prototype.constructor;function Bl(t){return function(){this.style.removeProperty(t)}}function Vl(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function Hl(t,e,n){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&Vl(t,o,n)),r}return o._value=e,o}function Ul(t){return function(e){this.textContent=t.call(this,e)}}function zl(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&Ul(r)),e}return r._value=t,r}var Gl=0;function Yl(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function ql(t){return pu().transition(t)}function Wl(){return++Gl}var Xl=pu.prototype;Yl.prototype=ql.prototype={constructor:Yl,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=fs(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s,u,l=r[a],c=l.length,h=o[a]=new Array(c),f=0;f<c;++f)(s=l[f])&&(u=t.call(s,s.__data__,f,l))&&("__data__"in s&&(u.__data__=s.__data__),h[f]=u,dl(h[f],e,n,f,h,yl(s,n)));return new Yl(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=ds(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var u,l=r[s],c=l.length,h=0;h<c;++h)if(u=l[h]){for(var f,p=t.call(u,u.__data__,h,l),d=yl(u,n),v=0,g=p.length;v<g;++v)(f=p[v])&&dl(f,e,n,v,p,d);o.push(p),a.push(u)}return new Yl(o,a,e,n)},filter:function(t){"function"!=typeof t&&(t=vs(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a=e[i],s=a.length,u=r[i]=[],l=0;l<s;++l)(o=a[l])&&t.call(o,o.__data__,l,a)&&u.push(o);return new Yl(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u,l=e[s],c=n[s],h=l.length,f=a[s]=new Array(h),p=0;p<h;++p)(u=l[p]||c[p])&&(f[p]=u);for(;s<r;++s)a[s]=e[s];return new Yl(a,this._parents,this._name,this._id)},selection:function(){return new Fl(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Wl(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],u=s.length,l=0;l<u;++l)if(a=s[l]){var c=yl(a,e);dl(a,t,n,l,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Yl(r,this._parents,t,n)},call:Xl.call,nodes:Xl.nodes,node:Xl.node,size:Xl.size,empty:Xl.empty,each:Xl.each,on:function(t,e){var n=this._id;return arguments.length<2?yl(this.node(),n).on.on(t):this.each(Nl(n,t,e))},attr:function(t,e){var n=ss(t),r="transform"===n?Di:xl;return this.attrTween(t,"function"==typeof e?(n.local?Ml:Sl)(n,r,bl(this,"attr."+t,e)):null==e?(n.local?Tl:wl)(n):(n.local?Ol:El)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=ss(t);return this.tween(n,(r.local?Ll:kl)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?Pi:xl;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var o=ks(this,t),a=(this.style.removeProperty(t),ks(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}(t,r)).on("end.style."+t,Bl(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,o;return function(){var a=ks(this,t),s=n(this),u=s+"";return null==s&&(this.style.removeProperty(t),u=s=ks(this,t)),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}(t,r,bl(this,"style."+t,e))).each(function(t,e){var n,r,i,o,a="style."+e,s="end."+a;return function(){var u=gl(this,t),l=u.on,c=null==u.value[a]?o||(o=Bl(e)):void 0;l===n&&i===c||(r=(n=l).copy()).on(s,i=c),u.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,o=n+"";return function(){var a=ks(this,t);return a===o?null:a===r?i:i=e(r=a,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,Hl(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(bl(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,zl(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=yl(this.node(),n).tween,o=0,a=i.length;o<a;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==e?ml:_l)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Pl:Dl)(e,t)):yl(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Rl:jl)(e,t)):yl(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(Il(e,t)):yl(this.node(),e).ease},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(o,a){var s={value:a},u={value:function(){0==--i&&o()}};n.each((function(){var n=gl(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(u)),n.on=e}))}))}};var $l={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function Zl(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return $l.time=il(),$l;return n}pu.prototype.interrupt=function(t){return this.each((function(){!function(t,e){var n,r,i,o=t.__transition,a=!0;if(o){for(i in e=null==e?null:e+"",o)(n=o[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete o[i]):a=!1;a&&delete t.__transition}}(this,t)}))},pu.prototype.transition=function(t){var e,n;t instanceof Yl?(e=t._id,t=t._name):(e=Wl(),(n=$l).time=il(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],u=s.length,l=0;l<u;++l)(a=s[l])&&dl(a,t,e,l,s,n||Zl(a,e));return new Yl(r,this._parents,t,e)};var Jl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.pendingTransitions={},e}return s(e,t),e.prototype.init=function(){var t=this;this.services.events.addEventListener("model-update",(function(){t.pendingTransitions={}}))},e.prototype.getTransition=function(t,e){var n=this;if(!1===this.model.getOptions().animations||!1===e)return this.getInstantTransition(t);var r=ql(t).duration(_n.getProperty(Hn,t,"duration")||Hn.default.duration);return this.pendingTransitions[r._id]=r,r.on("end interrupt cancel",(function(){delete n.pendingTransitions[r._id]})),r},e.prototype.getInstantTransition=function(t){var e=this,n=ql(t).duration(0);return this.pendingTransitions[n._id]=n,n.on("end interrupt cancel",(function(){delete e.pendingTransitions[n._id]})),n},e.prototype.getPendingTransitions=function(){return this.pendingTransitions},e}(is),Kl={dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]};function Ql(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Object.prototype.toString.call(t);return t instanceof Date||"object"==typeof t&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn((new Error).stack)),new Date(NaN))}function tc(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function ec(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ql(t),r=tc(e);return n.setDate(n.getDate()+r),n}function nc(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ql(t).getTime(),r=tc(e);return new Date(n+r)}function rc(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=tc(e);return nc(t,36e5*n)}function ic(t){var e=new Date(t.getTime()),n=Math.ceil(e.getTimezoneOffset());return e.setSeconds(0,0),6e4*n+e.getTime()%6e4}function oc(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Ql(t);return e.setHours(0,0,0,0),e}function ac(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=oc(t),r=oc(e),i=n.getTime()-ic(n),o=r.getTime()-ic(r);return Math.round((i-o)/864e5)}function sc(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=tc(e);return nc(t,6e4*n)}function uc(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Ql(t),n=e.getFullYear(),r=e.getMonth(),i=new Date(0);return i.setFullYear(n,r+1,0),i.setHours(0,0,0,0),i.getDate()}function lc(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ql(t),r=tc(e),i=n.getMonth()+r,o=new Date(0);o.setFullYear(n.getFullYear(),i,1),o.setHours(0,0,0,0);var a=uc(o);return n.setMonth(i,Math.min(a,n.getDate())),n}function cc(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=tc(e);return lc(t,12*n)}function hc(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ql(t),r=Ql(e),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}function fc(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ql(t),r=Ql(e),i=n.getFullYear()-r.getFullYear(),o=n.getMonth()-r.getMonth();return 12*i+o}function pc(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ql(t),r=Ql(e);return n.getFullYear()-r.getFullYear()}function dc(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ql(t),r=Ql(e);return n.getTime()-r.getTime()}function vc(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=tc(e);return ec(t,-n)}function gc(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=tc(e);return rc(t,-n)}function yc(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=tc(e);return sc(t,-n)}function mc(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=tc(e);return lc(t,-n)}function _c(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=tc(e);return cc(t,-n)}var bc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.scaleTypes={top:null,right:null,bottom:null,left:null},e.scales={top:null,right:null,bottom:null,left:null},e}return s(e,t),e.prototype.getDomainAxisPosition=function(){return this.domainAxisPosition},e.prototype.getRangeAxisPosition=function(){return this.rangeAxisPosition},e.prototype.update=function(t){var e=this;this.determineOrientation(),Object.keys(c).map((function(t){return c[t]})).forEach((function(t){e.scales[t]=e.createScale(t)}))},e.prototype.determineOrientation=function(){var t=this,e=this.model.getOptions();[c.LEFT,c.BOTTOM,c.RIGHT,c.TOP].forEach((function(n){var r=_n.getProperty(e,"axes",n);if(r){var i=r.scaleType||p.LINEAR;t.scaleTypes[n]=i,i===p.LINEAR?t.rangeAxisPosition=n:t.domainAxisPosition=n}})),this.rangeAxisPosition===c.LEFT&&this.domainAxisPosition===c.BOTTOM?this.orientation=h.VERTICAL:this.orientation=h.HORIZONTAL},e.prototype.getOrientation=function(){return this.orientation},e.prototype.getScaleByPosition=function(t){return this.scales[t]},e.prototype.getScaleTypeByPosition=function(t){return this.scaleTypes[t]},e.prototype.getDomainScale=function(){return this.scales[this.domainAxisPosition]},e.prototype.getRangeScale=function(){return this.scales[this.rangeAxisPosition]},e.prototype.getMainXAxisPosition=function(){var t=[c.BOTTOM,c.TOP];return[this.domainAxisPosition,this.rangeAxisPosition].find((function(e){return t.indexOf(e)>-1}))},e.prototype.getMainYAxisPosition=function(){var t=[c.LEFT,c.RIGHT];return[this.domainAxisPosition,this.rangeAxisPosition].find((function(e){return t.indexOf(e)>-1}))},e.prototype.getMainXScale=function(){return this.scales[this.getMainXAxisPosition()]},e.prototype.getMainYScale=function(){return this.scales[this.getMainYAxisPosition()]},e.prototype.getValueFromScale=function(t,e,n){var r=isNaN(e)?e.value:e,i=this.scaleTypes[t],o=this.scales[t];return i===p.LABELS?o(this.model.getDisplayData().labels[n])+o.step()/2:i===p.TIME?o(new Date(e.date||e.label)):o(r)},e.prototype.getDomainValue=function(t,e){return this.getValueFromScale(this.domainAxisPosition,t,e)},e.prototype.getRangeValue=function(t,e){return this.getValueFromScale(this.rangeAxisPosition,t,e)},e.prototype.getDataFromDomain=function(t){var e=this.model.getDisplayData(),n=[];switch(this.scaleTypes[this.domainAxisPosition]){case p.LABELS:var r=e.labels.indexOf(t);e.datasets.forEach((function(t){n.push({datasetLabel:t.label,value:t.data[r]})}));break;case p.TIME:var i=Object.keys(e.datasets[0].data[0]).filter((function(t){return"value"!==t}))[0];e.datasets.forEach((function(e){var r=e.label;e.data.filter((function(e){var n=new Date(e[i]),r=new Date(t);return n.getTime()===r.getTime()})).forEach((function(t){n.push(Object.assign({datasetLabel:r,value:t.value},t))}))}))}return n},e.prototype.getScaleDomain=function(t){var e,n=this.model.getOptions(),r=_n.getProperty(n,"axes",t),i=this.model.getDisplayData(),o=i.datasets,a=i.labels;if(r&&r.scaleType===p.LABELS)return a||this.model.getDisplayData().datasets[0].data.map((function(t,e){return e+1}));if(r.domain)return r.domain;if(r.stacked)e=gr(a.reduce((function(t,e,n){var r=o.map((function(t){return isNaN(t.data[n])?t.data[n].value:t.data[n]})),i=r.reduce((function(t,e){return t+e}),0);return t.concat(i,function(t,e){var n,r,i=t.length,o=-1;if(null==e){for(;++o<i;)if(null!=(n=t[o])&&n>=n)for(r=n;++o<i;)null!=(n=t[o])&&r>n&&(r=n)}else for(;++o<i;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=n;++o<i;)null!=(n=e(t[o],o,t))&&r>n&&(r=n);return r}(r))}),[]).concat(0));else{var s=o.reduce((function(t,e){return e.data.forEach((function(e){t=r.scaleType===p.TIME?t.concat(e.date):t.concat(isNaN(e)?e.value:e)})),t}),[]);r.scaleType!==p.TIME&&(s=s.concat(0)),e=gr(s)}if(r.scaleType===p.TIME){var u=_n.getProperty(n,"timeScale","addSpaceOnEdges");if(u){var l=new Date(e[0]),c=new Date(e[1]);return function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ql(t),r=Ql(e),i=hc(n,r),o=Math.abs(pc(n,r));n.setFullYear(n.getFullYear()-i*o);var a=hc(n,r)===-i,s=i*(o-a);return 0===s?0:s}(c,l)>1?[_c(l,u),cc(c,u)]:function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ql(t),r=Ql(e),i=hc(n,r),o=Math.abs(fc(n,r));n.setMonth(n.getMonth()-i*o);var a=hc(n,r)===-i,s=i*(o-a);return 0===s?0:s}(c,l)>1?[mc(l,u),lc(c,u)]:function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ql(t),r=Ql(e),i=hc(n,r),o=Math.abs(ac(n,r));n.setDate(n.getDate()-i*o);var a=hc(n,r)===-i,s=i*(o-a);return 0===s?0:s}(c,l)>1?[vc(l,u),ec(c,u)]:function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=dc(t,e)/36e5;return n>0?Math.floor(n):Math.ceil(n)}(c,l)>1?[gc(l,u),rc(c,u)]:function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=dc(t,e)/6e4;return n>0?Math.floor(n):Math.ceil(n)}(c,l)>1?[yc(l,u),sc(c,u)]:[l,c]}return[new Date(e[0]),new Date(e[1])]}return e[1]=1.1*e[1],e[0]<0&&(e[0]=1.1*e[0]),e},e.prototype.createScale=function(t){var e=this.model.getOptions(),n=_n.getProperty(e,"axes",t);if(!n)return null;var r,i=_n.getProperty(n,"scaleType")||p.LINEAR;(this.scaleTypes[t]=i,i===p.TIME)&&Qa(_n.getProperty(e,"locale","time")||Kl);return(r=i===p.TIME?function(){return Er.apply(ns(Lo,Co,So,Eo,To,wo,xo,bo,Ho).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}():i===p.LOG?function t(){var e=go(Ui()).domain([1,10]);return e.copy=function(){return Hi(e,t()).base(e.base())},Er.apply(e,arguments),e}().base(n.base||10):i===p.LABELS?Rr():so()).domain(this.getScaleDomain(t)),r},e}(is),xc=Math.PI,wc=2*xc,Tc=wc-1e-6;function Ec(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Oc(){return new Ec}function Sc(t){return function(){return t}}Ec.prototype=Oc.prototype={constructor:Ec,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,o){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var o=this._x1,a=this._y1,s=n-t,u=r-e,l=o-t,c=a-e,h=l*l+c*c;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>1e-6)if(Math.abs(c*s-u*l)>1e-6&&i){var f=n-o,p=r-a,d=s*s+u*u,v=f*f+p*p,g=Math.sqrt(d),y=Math.sqrt(h),m=i*Math.tan((xc-Math.acos((d+h-v)/(2*g*y)))/2),_=m/y,b=m/g;Math.abs(_-1)>1e-6&&(this._+="L"+(t+_*l)+","+(e+_*c)),this._+="A"+i+","+i+",0,0,"+ +(c*f>l*p)+","+(this._x1=t+b*s)+","+(this._y1=e+b*u)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,r,i,o){t=+t,e=+e,o=!!o;var a=(n=+n)*Math.cos(r),s=n*Math.sin(r),u=t+a,l=e+s,c=1^o,h=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+u+","+l:(Math.abs(this._x1-u)>1e-6||Math.abs(this._y1-l)>1e-6)&&(this._+="L"+u+","+l),n&&(h<0&&(h=h%wc+wc),h>Tc?this._+="A"+n+","+n+",0,1,"+c+","+(t-a)+","+(e-s)+"A"+n+","+n+",0,1,"+c+","+(this._x1=u)+","+(this._y1=l):h>1e-6&&(this._+="A"+n+","+n+",0,"+ +(h>=xc)+","+c+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var Mc=Math.abs,Ac=Math.atan2,Cc=Math.cos,Lc=Math.max,kc=Math.min,Pc=Math.sin,Dc=Math.sqrt,Rc=Math.PI,jc=Rc/2,Ic=2*Rc;function Nc(t){return t>1?0:t<-1?Rc:Math.acos(t)}function Fc(t){return t>=1?jc:t<=-1?-jc:Math.asin(t)}function Bc(t){return t.innerRadius}function Vc(t){return t.outerRadius}function Hc(t){return t.startAngle}function Uc(t){return t.endAngle}function zc(t){return t&&t.padAngle}function Gc(t,e,n,r,i,o,a,s){var u=n-t,l=r-e,c=a-i,h=s-o,f=h*u-c*l;if(!(f*f<1e-12))return[t+(f=(c*(e-o)-h*(t-i))/f)*u,e+f*l]}function Yc(t,e,n,r,i,o,a){var s=t-n,u=e-r,l=(a?o:-o)/Dc(s*s+u*u),c=l*u,h=-l*s,f=t+c,p=e+h,d=n+c,v=r+h,g=(f+d)/2,y=(p+v)/2,m=d-f,_=v-p,b=m*m+_*_,x=i-o,w=f*v-d*p,T=(_<0?-1:1)*Dc(Lc(0,x*x*b-w*w)),E=(w*_-m*T)/b,O=(-w*m-_*T)/b,S=(w*_+m*T)/b,M=(-w*m+_*T)/b,A=E-g,C=O-y,L=S-g,k=M-y;return A*A+C*C>L*L+k*k&&(E=S,O=M),{cx:E,cy:O,x01:-c,y01:-h,x11:E*(i/x-1),y11:O*(i/x-1)}}function qc(){var t=Bc,e=Vc,n=Sc(0),r=null,i=Hc,o=Uc,a=zc,s=null;function u(){var u,l,c=+t.apply(this,arguments),h=+e.apply(this,arguments),f=i.apply(this,arguments)-jc,p=o.apply(this,arguments)-jc,d=Mc(p-f),v=p>f;if(s||(s=u=Oc()),h<c&&(l=h,h=c,c=l),h>1e-12)if(d>Ic-1e-12)s.moveTo(h*Cc(f),h*Pc(f)),s.arc(0,0,h,f,p,!v),c>1e-12&&(s.moveTo(c*Cc(p),c*Pc(p)),s.arc(0,0,c,p,f,v));else{var g,y,m=f,_=p,b=f,x=p,w=d,T=d,E=a.apply(this,arguments)/2,O=E>1e-12&&(r?+r.apply(this,arguments):Dc(c*c+h*h)),S=kc(Mc(h-c)/2,+n.apply(this,arguments)),M=S,A=S;if(O>1e-12){var C=Fc(O/c*Pc(E)),L=Fc(O/h*Pc(E));(w-=2*C)>1e-12?(b+=C*=v?1:-1,x-=C):(w=0,b=x=(f+p)/2),(T-=2*L)>1e-12?(m+=L*=v?1:-1,_-=L):(T=0,m=_=(f+p)/2)}var k=h*Cc(m),P=h*Pc(m),D=c*Cc(x),R=c*Pc(x);if(S>1e-12){var j,I=h*Cc(_),N=h*Pc(_),F=c*Cc(b),B=c*Pc(b);if(d<Rc&&(j=Gc(k,P,F,B,I,N,D,R))){var V=k-j[0],H=P-j[1],U=I-j[0],z=N-j[1],G=1/Pc(Nc((V*U+H*z)/(Dc(V*V+H*H)*Dc(U*U+z*z)))/2),Y=Dc(j[0]*j[0]+j[1]*j[1]);M=kc(S,(c-Y)/(G-1)),A=kc(S,(h-Y)/(G+1))}}T>1e-12?A>1e-12?(g=Yc(F,B,k,P,h,A,v),y=Yc(I,N,D,R,h,A,v),s.moveTo(g.cx+g.x01,g.cy+g.y01),A<S?s.arc(g.cx,g.cy,A,Ac(g.y01,g.x01),Ac(y.y01,y.x01),!v):(s.arc(g.cx,g.cy,A,Ac(g.y01,g.x01),Ac(g.y11,g.x11),!v),s.arc(0,0,h,Ac(g.cy+g.y11,g.cx+g.x11),Ac(y.cy+y.y11,y.cx+y.x11),!v),s.arc(y.cx,y.cy,A,Ac(y.y11,y.x11),Ac(y.y01,y.x01),!v))):(s.moveTo(k,P),s.arc(0,0,h,m,_,!v)):s.moveTo(k,P),c>1e-12&&w>1e-12?M>1e-12?(g=Yc(D,R,I,N,c,-M,v),y=Yc(k,P,F,B,c,-M,v),s.lineTo(g.cx+g.x01,g.cy+g.y01),M<S?s.arc(g.cx,g.cy,M,Ac(g.y01,g.x01),Ac(y.y01,y.x01),!v):(s.arc(g.cx,g.cy,M,Ac(g.y01,g.x01),Ac(g.y11,g.x11),!v),s.arc(0,0,c,Ac(g.cy+g.y11,g.cx+g.x11),Ac(y.cy+y.y11,y.cx+y.x11),v),s.arc(y.cx,y.cy,M,Ac(y.y11,y.x11),Ac(y.y01,y.x01),!v))):s.arc(0,0,c,x,b,v):s.lineTo(D,R)}else s.moveTo(0,0);if(s.closePath(),u)return s=null,u+""||null}return u.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-Rc/2;return[Cc(r)*n,Pc(r)*n]},u.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:Sc(+e),u):t},u.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:Sc(+t),u):e},u.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:Sc(+t),u):n},u.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:Sc(+t),u):r},u.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:Sc(+t),u):i},u.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:Sc(+t),u):o},u.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:Sc(+t),u):a},u.context=function(t){return arguments.length?(s=null==t?null:t,u):s},u}function Wc(t){this._context=t}function Xc(t){return new Wc(t)}function $c(t){return t[0]}function Zc(t){return t[1]}function Jc(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function Kc(t){return t}Wc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var Qc=Array.prototype.slice;function th(){}function eh(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function nh(t){this._context=t}function rh(t){return new nh(t)}function ih(t){this._context=t}function oh(t){return new ih(t)}function ah(t){this._context=t}function sh(t){return new ah(t)}function uh(t,e){this._basis=new nh(t),this._beta=e}nh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:eh(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:eh(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ih.prototype={areaStart:th,areaEnd:th,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:eh(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ah.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:eh(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},uh.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r,i=t[0],o=e[0],a=t[n]-i,s=e[n]-o,u=-1;++u<=n;)r=u/n,this._basis.point(this._beta*t[u]+(1-this._beta)*(i+r*a),this._beta*e[u]+(1-this._beta)*(o+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var lh=function t(e){function n(t){return 1===e?new nh(t):new uh(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function ch(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function hh(t,e){this._context=t,this._k=(1-e)/6}hh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:ch(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:ch(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var fh=function t(e){function n(t){return new hh(t,e)}return n.tension=function(e){return t(+e)},n}(0);function ph(t,e){this._context=t,this._k=(1-e)/6}ph.prototype={areaStart:th,areaEnd:th,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:ch(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var dh=function t(e){function n(t){return new ph(t,e)}return n.tension=function(e){return t(+e)},n}(0);function vh(t,e){this._context=t,this._k=(1-e)/6}vh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:ch(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var gh=function t(e){function n(t){return new vh(t,e)}return n.tension=function(e){return t(+e)},n}(0);function yh(t,e,n){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>1e-12){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,u=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/u,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/u}if(t._l23_a>1e-12){var l=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,c=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*l+t._x1*t._l23_2a-e*t._l12_2a)/c,a=(a*l+t._y1*t._l23_2a-n*t._l12_2a)/c}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function mh(t,e){this._context=t,this._alpha=e}mh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:yh(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var _h=function t(e){function n(t){return e?new mh(t,e):new hh(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function bh(t,e){this._context=t,this._alpha=e}bh.prototype={areaStart:th,areaEnd:th,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:yh(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var xh=function t(e){function n(t){return e?new bh(t,e):new ph(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function wh(t,e){this._context=t,this._alpha=e}wh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:yh(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Th=function t(e){function n(t){return e?new wh(t,e):new vh(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Eh(t){this._context=t}function Oh(t){return new Eh(t)}function Sh(t){return t<0?-1:1}function Mh(t,e,n){var r=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),a=(n-t._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(Sh(o)+Sh(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function Ah(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Ch(t,e,n){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,s=(o-r)/3;t._context.bezierCurveTo(r+s,i+s*e,o-s,a-s*n,o,a)}function Lh(t){this._context=t}function kh(t){this._context=new Ph(t)}function Ph(t){this._context=t}function Dh(t){return new Lh(t)}function Rh(t){return new kh(t)}function jh(t){this._context=t}function Ih(t){var e,n,r=t.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,o[e]=4,a[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,o[r-1]=7,a[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/o[e-1],o[e]-=n,a[e]-=n*a[e-1];for(i[r-1]=a[r-1]/o[r-1],e=r-2;e>=0;--e)i[e]=(a[e]-i[e+1])/o[e];for(o[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)o[e]=2*t[e+1]-i[e+1];return[i,o]}function Nh(t){return new jh(t)}function Fh(t,e){this._context=t,this._t=e}function Bh(t){return new Fh(t,.5)}function Vh(t){return new Fh(t,0)}function Hh(t){return new Fh(t,1)}function Uh(t,e){if((i=t.length)>1)for(var n,r,i,o=1,a=t[e[0]],s=a.length;o<i;++o)for(r=a,a=t[e[o]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function zh(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function Gh(t,e){return t[e]}Eh.prototype={areaStart:th,areaEnd:th,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}},Lh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Ch(this,this._t0,Ah(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,Ch(this,Ah(this,n=Mh(this,t,e)),n);break;default:Ch(this,this._t0,n=Mh(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(kh.prototype=Object.create(Lh.prototype)).point=function(t,e){Lh.prototype.point.call(this,e,t)},Ph.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,o){this._context.bezierCurveTo(e,t,r,n,o,i)}},jh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===n)this._context.lineTo(t[1],e[1]);else for(var r=Ih(t),i=Ih(e),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],t[a],e[a]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}},Fh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};var Yh,qh,Wh=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.curveTypes={curveLinear:Xc,curveLinearClosed:Oh,curveBasis:rh,curveBasisClosed:oh,curveBasisOpen:sh,curveBundle:lh,curveCardinal:fh,curveCardinalClosed:dh,curveCardinalOpen:gh,curveCatmullRom:_h,curveCatmullRomClosed:xh,curveCatmullRomOpen:Th,curveMonotoneX:Dh,curveMonotoneY:Rh,curveNatural:Nh,curveStep:Bh,curveStepAfter:Hh,curveStepBefore:Vh},e}return s(e,t),e.prototype.getD3Curve=function(){var t="curveLinear",e=this.model.getOptions().curve;if(e&&(t="string"==typeof e?e:e.name),this.curveTypes[t]){var n=this.curveTypes[t];return e&&Object.keys(e).forEach((function(t){n[t]&&(n=n[t](e[t]))})),n}return console.warn("The curve type '"+t+"' is invalid, using 'curveLinear' instead"),this.curveTypes.curveLinear},e}(is),Xh=function(){function t(t,e,n){this.configs={},this.model=t,this.services=e,n&&(this.configs=n),this.parent||this.setParent(du(this.services.domUtils.getMainSVG()))}return t.prototype.init=function(){},t.prototype.render=function(t){console.error("render() method is not implemented")},t.prototype.destroy=function(){},t.prototype.setModel=function(t){this.model=t},t.prototype.setServices=function(t){this.services=t},t.prototype.setParent=function(t){var e=this.parent;if(this.parent=t,(!e||e.node()!==t.node())&&this.type){var n=_n.getProperty(this.model.getOptions(),"style","prefix");this.parent.classed(yu.prefix+"--"+n+"--"+this.type,!0),e&&e.classed(yu.prefix+"--"+n+"--"+this.type,!1)}},t.prototype.getParent=function(){return this.parent},t.prototype.getContainerSVG=function(){if(this.type){var t=_n.getProperty(this.model.getOptions(),"style","prefix");return Vu.appendOrSelect(this.parent,"g."+yu.prefix+"--"+t+"--"+this.type)}return this.parent},t}(),$h=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="legend",e}return s(n,t),n.prototype.render=function(){var t=this,n=this.getContainerSVG().attr("role",e.GRAPHICS_DOCUMENT),r=this.model.getOptions(),i=n.selectAll("g.legend-item").data(this.getLegendItemArray()),o=i.enter().append("g").classed("legend-item",!0),a=r.legend.checkbox.radius;o.append("rect").classed("checkbox",!0).merge(i.select("rect.checkbox")).attr("width",2*a).attr("height",2*a).attr("rx",1).attr("ry",1).style("fill",(function(e){return e.value===r.legend.items.status.ACTIVE?t.model.getStrokeColor(e.key):null})).classed("active",(function(t,e){return t.value===r.legend.items.status.ACTIVE})),o.append("text").merge(i.select("text")).text((function(t){return t.key})).attr("alignment-baseline","middle"),this.breakItemsIntoLines(o),i.exit().on("mouseover",null).on("click",null).on("mouseout",null).remove();var s=_n.getProperty(this.model.getOptions(),"legend","clickable");n.classed("clickable",s),s&&o.size()>0&&this.addEventListeners()},n.prototype.breakItemsIntoLines=function(t){var e,n=this,r=this.getContainerSVG(),i=this.model.getOptions(),o=i.legend.checkbox.radius,a=i.legend.items.horizontalSpace,s=i.legend.items.verticalSpace,u=i.legend.items.textYOffset,l=2*o+i.legend.checkbox.spaceAfter,c=i.legend.items.status.DISABLED,h=this.model.get("dataLabels"),f=Object.keys(h).some((function(t){return h[t]===c})),p=_n.getProperty(i,"legend","orientation"),d=0,v=0,g=0;t.merge(r.selectAll("g.legend-item")).each((function(t,i){var c=du(this),h=du(r.selectAll("g.legend-item").nodes()[i-1]);if(0===g||h.empty()||p===y.VERTICAL)p===y.VERTICAL&&0!==i&&v++;else{var m=Vu.getSVGElementSize(n.parent,{useAttr:!0}),_=Vu.getSVGElementSize(du(this).select("text"),{useBBox:!0}),b=Vu.getSVGElementSize(h.select("text"),{useBBox:!0});(d=d+b.width+l+a)+l+_.width>m.width&&(v++,d=0,g=0)}c.select("rect.checkbox").attr("x",d).attr("y",0+v*s);var x=u+v*s;c.select("text").attr("x",d+l).attr("y",0+x),e=x,f&&c.select("g.check").empty()?(c.append("g").classed("check",!0).html('\n\t\t\t\t\t\t\t<svg focusable="false" preserveAspectRatio="xMidYMid meet"\n\t\t\t\t\t\t\t\txmlns="http://www.w3.org/2000/svg" width="32" height="32"\n\t\t\t\t\t\t\t\tviewBox="0 0 32 32" aria-hidden="true"\n\t\t\t\t\t\t\t\tstyle="will-change: transform;">\n\t\t\t\t\t\t\t\t<path d="M13 21.2l-7.1-7.1-1.4 1.4 7.1 7.1L13 24 27.1 9.9l-1.4-1.5z"></path>\n\t\t\t\t\t\t\t\t<title>Checkmark</title>\n\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t'),c.select("g.check svg").attr("width",2*o-1).attr("height",2*o-1).attr("x",parseFloat(c.select("rect.checkbox").attr("x"))+.5).attr("y",parseFloat(c.select("rect.checkbox").attr("y"))+.5)):f||c.select("g.check").empty()||c.select("g.check").remove(),g++})),Vu.appendOrSelect(r,"rect.spacer").attr("x",0).attr("y",e).attr("width",16).attr("height",16).attr("fill","none")},n.prototype.getLegendItemArray=function(){var t=this.model.get("dataLabels");return Object.keys(t).map((function(e){return{key:e,value:t[e]}}))},n.prototype.addEventListeners=function(){var t=this,e=this.getContainerSVG(),n=this.model.getOptions();e.selectAll("g.legend-item").on("mouseover",(function(){t.services.events.dispatchEvent("legend-item-onhover",{hoveredElement:du(this)});var e=n.legend.checkbox.radius,r=du(this);r.append("rect").classed("hover-stroke",!0).attr("x",parseFloat(r.select("rect.checkbox").attr("x"))-2).attr("y",parseFloat(r.select("rect.checkbox").attr("y"))-2).attr("width",2*e+4).attr("height",2*e+4).attr("rx",3).attr("ry",3).lower()})).on("click",(function(){t.services.events.dispatchEvent("legend-item-onclick",{clickedElement:du(this)});var e=du(this).datum();t.model.toggleDataLabel(e.key)})).on("mouseout",(function(){var e=du(this);e.select("rect.hover-stroke").remove(),t.services.events.dispatchEvent("legend-item-onmouseout",{hoveredElement:e})}))},n}(Xh),Zh=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="title",e}return s(e,t),e.prototype.truncateTitle=function(){var t=Vu.getSVGElementSize(this.services.domUtils.getMainSVG(),{useAttr:!0}).width,e=Vu.appendOrSelect(this.parent,"text.title");if(!(t<=0)&&e.node().getComputedTextLength()>t){e.append("tspan").text("...");var n=Vu.appendOrSelect(e,"tspan").node().getComputedTextLength(),r=Math.floor(t-n),i=this.model.getOptions().title,o=this.getSubstringIndex(e.node(),0,i.length-1,r);e.text(i.substring(0,o-1)).append("tspan").text("...");var a=this;e.on("mouseenter",(function(){a.services.events.dispatchEvent("show-tooltip",{hoveredElement:e,type:v.TITLE})})).on("mouseout",(function(){a.services.events.dispatchEvent("hide-tooltip",{hoveredElement:e})}))}},e.prototype.render=function(){var t=this.getContainerSVG();Vu.appendOrSelect(t,"text.title").attr("x",0).attr("y",20).text(this.model.getOptions().title),this.truncateTitle()},e.prototype.getSubstringIndex=function(t,e,n,r){var i=Math.floor((n+e)/2);return t.getSubStringLength(0,i)>r?this.getSubstringIndex(t,e,i,r):t.getSubStringLength(0,i)<r?t.getSubStringLength(0,i+1)>r?i:this.getSubstringIndex(t,i,n,r):i},e}(Xh);!function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(qh||(qh={}));var Jh=((Yh={})[qh.LEFT]=function(t,e,n){return{top:t.top-Math.round(e.offsetHeight/2)+Math.round(n.height/2),left:Math.round(t.left-e.offsetWidth)}},Yh[qh.RIGHT]=function(t,e,n){return{top:t.top-Math.round(e.offsetHeight/2)+Math.round(n.height/2),left:Math.round(t.left+n.width)}},Yh[qh.TOP]=function(t,e,n){return{top:Math.round(t.top-e.offsetHeight),left:t.left-Math.round(e.offsetWidth/2)+Math.round(n.width/2)}},Yh[qh.BOTTOM]=function(t,e,n){return{top:Math.round(t.top+n.height),left:t.left-Math.round(e.offsetWidth/2)+Math.round(n.width/2)}},Yh),Kh="undefined"!=typeof window?window:{innerHeight:0,scrollY:0,innerWidth:0,scrollX:0},Qh=function(){function t(t){void 0===t&&(t={}),this.positions=Jh,this.positions=Object.assign({},Jh,t)}return t.prototype.getRelativeOffset=function(t){for(var e={left:t.offsetLeft,top:t.offsetTop};t.offsetParent&&"static"===getComputedStyle(t.offsetParent).position;)e.left+=t.offsetLeft,e.top+=t.offsetTop,t=t.offsetParent;return e},t.prototype.getAbsoluteOffset=function(t){for(var e=t,n={top:0,left:0};e.offsetParent;){var r=getComputedStyle(e.offsetParent);"static"===r.position&&r.marginLeft&&r.marginTop&&(parseInt(r.marginTop,10)&&(n.top+=parseInt(r.marginTop,10)),parseInt(r.marginLeft,10)&&(n.left+=parseInt(r.marginLeft,10))),e=e.offsetParent}var i=t.getBoundingClientRect(),o=document.body.getBoundingClientRect();return{top:i.top-o.top+n.top,left:i.left-o.left+n.left}},t.prototype.findRelative=function(t,e,n){var r=this.getRelativeOffset(t),i=t.getBoundingClientRect();return this.calculatePosition(r,i,e,n)},t.prototype.findAbsolute=function(t,e,n){var r=this.getAbsoluteOffset(t),i=t.getBoundingClientRect();return this.calculatePosition(r,i,e,n)},t.prototype.findPosition=function(t,e,n,r){void 0===r&&(r=this.getAbsoluteOffset);var i=r(t),o=t.getBoundingClientRect();return this.calculatePosition(i,o,e,n)},t.prototype.findPositionAt=function(t,e,n){return this.calculatePosition(t,{height:0,width:0},e,n)},t.prototype.getPlacementBox=function(t,e){var n=t.offsetHeight+e.top,r=t.offsetWidth+e.left;return{top:e.top,bottom:n,left:e.left,right:r}},t.prototype.addOffset=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),Object.assign({},t,{top:t.top+e,left:t.left+n})},t.prototype.setElement=function(t,e){t.style.top=e.top+"px",t.style.left=e.left+"px"},t.prototype.findBestPlacement=function(t,e,n,r,i){var o=this;void 0===r&&(r=this.defaultContainerFunction),void 0===i&&(i=this.findPosition);var a=n.map((function(n){var a=i(t,e,n),s=o.getPlacementBox(e,a),u=s.bottom-r().height,l=s.right-r().width;u=u<0?e.offsetHeight:u,l=l<0?e.offsetWidth:l;var c=e.offsetHeight*e.offsetWidth,h=c-u*l;return{placement:n,weight:(h=0===h?c:h)/c}}));return a.sort((function(t,e){return e.weight-t.weight})),a[0].placement},t.prototype.findBestPlacementAt=function(t,e,n,r){var i=this;void 0===r&&(r=this.defaultContainerFunction);return this.findBestPlacement(null,e,n,r,(function(e,n,r){return i.findPositionAt(t,n,r)}))},t.prototype.defaultContainerFunction=function(){return{width:Kh.innerHeight-Kh.scrollY,height:Kh.innerWidth-Kh.scrollX}},t.prototype.calculatePosition=function(t,e,n,r){return this.positions[r]?this.positions[r](t,n,e):(console.error("No function found for placement, defaulting to 0,0"),{left:0,top:0})},t}(),tf=(new Qh,function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="tooltip",i.positionService=new Qh,i.init(),i}return s(e,t),e.prototype.init=function(){var t=this,e=du(this.services.domUtils.getHolder()),n=_n.getProperty(this.model.getOptions(),"style","prefix");this.tooltip=Vu.appendOrSelect(e,"div."+yu.prefix+"--"+n+"--tooltip");var r=Vu.appendOrSelect(this.tooltip,"div.content-box");this.tooltip.style("max-width",null),this.services.events.addEventListener("show-tooltip",(function(i){if(i.detail.type===v.DATAPOINT&&_n.getProperty(t.model.getOptions(),"tooltip","datapoint","enabled")||i.detail.type===v.GRIDLINE&&_n.getProperty(t.model.getOptions(),"tooltip","gridline","enabled")){var o=du(nu.target).datum(),a=void 0;i.detail.multidata?(o=i.detail.multidata,a=t.getMultilineTooltipHTML(o)):a=t.getTooltipHTML(o,v.DATAPOINT),_n.getProperty(t.model.getOptions(),"tooltip","customHTML")?r.html(t.model.getOptions().tooltip.customHTML(o,a)):r.html(a),t.positionTooltip()}else if(i.detail.type===v.TITLE){var s=Vu.appendOrSelect(e,"svg."+yu.prefix+"--"+n+"--chart-svg"),u=Vu.getSVGElementSize(s).width*_n.getProperty(t.model.getOptions(),"tooltip","title","width");t.tooltip.style("max-width",u),r.html(t.getTooltipHTML(i.detail.hoveredElement,v.TITLE));var l=t.getTooltipPosition(i.detail.hoveredElement.node());t.positionTooltip(l)}t.tooltip.classed("hidden",!1)})),this.services.events.addEventListener("hide-tooltip",(function(){t.tooltip.classed("hidden",!0)}))},e.prototype.getTooltipHTML=function(t,e){if(e===v.TITLE)return'<div class="title-tooltip"><text>'+this.model.getOptions().title+"</text></div>";var n=_n.getProperty(t,"data")?t.data:t,r=_n.getProperty(this.model.getOptions(),"tooltip","valueFormatter")?this.model.getOptions().tooltip.valueFormatter(n.value):n.value.toLocaleString("en");return'<div class="datapoint-tooltip">\n\t\t\t\t\t<p class="label">'+(n.datasetLabel?n.datasetLabel:n.label)+'</p>\n\t\t\t\t\t<p class="value">'+r+"</p>\n\t\t\t\t</div>"},e.prototype.getMultilineTooltipHTML=function(t){var e=this,n=t;n.sort((function(t,e){return e.value-t.value}));var r=this.services.cartesianScales.getDomainScale().scaleType;return"<ul class='multi-tooltip'>"+n.map((function(t){var n=t.value;n instanceof Object&&(n=r===p.TIME?t.value.date:t.value.value);var i=_n.getProperty(e.model.getOptions(),"tooltip","valueFormatter")?e.model.getOptions().tooltip.valueFormatter(n):n.toLocaleString("en");return'\n\t\t\t\t<li>\n\t\t\t\t\t<div class="datapoint-tooltip">\n\t\t\t\t\t\t<a style="background-color:'+e.model.getStrokeColor(t.datasetLabel,t.label)+'" class="tooltip-color"></a>\n\t\t\t\t\t\t<p class="label">'+t.datasetLabel+'</p>\n\t\t\t\t\t\t<p class="value">'+i+"</p>\n\t\t\t\t\t</div>\n\t\t\t\t</li>"})).join("")+"</ul>"},e.prototype.render=function(){this.tooltip.classed("hidden",!0)},e.prototype.getTooltipPosition=function(t){var e=du(this.services.domUtils.getHolder()).node().getBoundingClientRect(),n=t.getBoundingClientRect(),r=this.model.getOptions().tooltip.title.verticalOffset,i={left:n.left-e.left+n.width/2,top:n.top-e.top-r};return{placement:d.BOTTOM,position:i}},e.prototype.positionTooltip=function(t){var e,n=this.services.domUtils.getHolder(),r=this.tooltip.node(),i=gu(n);if(t){var o=t.placement===d.TOP?qh.TOP:qh.BOTTOM;e=this.positionService.findPositionAt(t.position,r,o)}else{var a=this.positionService.findBestPlacementAt({left:i[0],top:i[1]},r,[qh.RIGHT,qh.LEFT,qh.TOP,qh.BOTTOM],(function(){return{width:n.offsetWidth,height:n.offsetHeight}})),s=this.model.getOptions().tooltip.datapoint.horizontalOffset;a===qh.LEFT&&(s*=-1),e=this.positionService.findPositionAt({left:i[0]+s,top:i[1]},r,a)}this.positionService.setElement(r,e)},e}(Xh)),ef=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s(e,t),e.prototype.init=function(){var e=this,n=du(this.services.domUtils.getHolder()),r=_n.getProperty(this.model.getOptions(),"style","prefix");this.tooltip=Vu.appendOrSelect(n,"div."+yu.prefix+"--"+r+"--tooltip");var i=Vu.appendOrSelect(this.tooltip,"div.content-box");this.tooltip.style("max-width",null),this.services.events.addEventListener("show-tooltip",(function(o){if(o.detail.type===v.DATAPOINT&&_n.getProperty(e.model.getOptions(),"tooltip","datapoint","enabled")||o.detail.type===v.GRIDLINE&&_n.getProperty(e.model.getOptions(),"tooltip","gridline","enabled")){var a=o.detail.hoveredElement.datum(),s=o.detail.hoveredElement.node(),u=void 0;o.detail.multidata?(a=o.detail.multidata,u=e.getMultilineTooltipHTML(a)):u=e.getTooltipHTML(o.detail.hoveredElement.datum()),_n.getProperty(e.model.getOptions(),"tooltip","customHTML")?i.html(e.model.getOptions().tooltip.customHTML(a,u)):i.html(u);var l=e.getTooltipPosition(s);e.positionTooltip(o.detail.multidata?void 0:l)}else if(o.detail.type===v.TITLE){var c=Vu.appendOrSelect(n,"svg."+yu.prefix+"--"+r+"--chart-svg"),h=Vu.getSVGElementSize(c).width*_n.getProperty(e.model.getOptions(),"tooltip","title","width");e.tooltip.style("max-width",h),i.html(t.prototype.getTooltipHTML.call(e,o.detail.hoveredElement,v.TITLE));l=t.prototype.getTooltipPosition.call(e,o.detail.hoveredElement.node());e.positionTooltip(l)}e.tooltip.classed("hidden",!1)})),this.services.events.addEventListener("hide-tooltip",(function(){e.tooltip.classed("hidden",!0)}))},e.prototype.getTooltipPosition=function(t){var e=du(t).datum(),n=du(this.services.domUtils.getHolder()).node().getBoundingClientRect(),r=t.getBoundingClientRect(),i=this.model.getOptions().tooltip.datapoint.verticalOffset;if(e.value<=0){var o={left:r.left-n.left+r.width/2,top:r.bottom-n.top+i};return{placement:d.BOTTOM,position:o}}o={left:r.left-n.left+r.width/2,top:r.top-n.top-i};return{placement:d.TOP,position:o}},e.prototype.getTooltipHTML=function(t){return'<div class="datapoint-tooltip"><p class="value">'+(_n.getProperty(this.model.getOptions(),"tooltip","valueFormatter")?this.model.getOptions().tooltip.valueFormatter(t.value):t.value.toLocaleString("en"))+"</p></div>"},e.prototype.getMultilineTooltipHTML=function(t){var e=this,n=t;n.reverse(),this.services.cartesianScales.getOrientation()===h.VERTICAL&&n.reverse();var r=n.reduce((function(t,e){return t+e.value}),0);return r=_n.getProperty(this.model.getOptions(),"tooltip","valueFormatter")?this.model.getOptions().tooltip.valueFormatter(r):r.toLocaleString("en"),"<ul class='multi-tooltip'>"+n.map((function(t){var n=_n.getProperty(e.model.getOptions(),"tooltip","valueFormatter")?e.model.getOptions().tooltip.valueFormatter(t.value):t.value.toLocaleString("en");return'\n\t\t\t\t<li>\n\t\t\t\t\t<div class="datapoint-tooltip">\n\t\t\t\t\t\t<a style="background-color:'+e.model.getStrokeColor(t.datasetLabel,t.label)+'" class="tooltip-color"></a>\n\t\t\t\t\t\t<p class="label">'+t.datasetLabel+'</p>\n\t\t\t\t\t\t<p class="value">'+n+"</p>\n\t\t\t\t\t</div>\n\t\t\t\t</li>"})).join("")+"<li>\n\t\t\t\t\t<div class='total-val'>\n\t\t\t\t\t\t<p class='label'>Total</p>\n\t\t\t\t\t\t<p class='value'>"+r+"</p>\n\t\t\t\t\t</div>\n\t\t\t\t</li>\n\t\t\t</ul>"},e}(tf),nf=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s(e,t),e.prototype.getTooltipHTML=function(e,n){if(n===v.TITLE)return t.prototype.getTooltipHTML.call(this,e,n);var r=_n.getProperty(this.model.getOptions(),"tooltip","valueFormatter")?this.model.getOptions().tooltip.valueFormatter(e.value):e.value.toLocaleString("en");return'\n\t\t\t<div class="datapoint-tooltip">\n\t\t\t\t<a style="background-color:'+this.model.getStrokeColor(e.datasetLabel,e.label)+'" class="tooltip-color"></a>\n\t\t\t\t<p class="label">'+e.datasetLabel+'</p>\n\t\t\t\t<p class="value">'+r+"</p>\n\t\t\t</div>"},e}(tf),rf=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s(e,t),e.prototype.getBarWidth=function(){var t=this.model.getOptions(),e=this.services.cartesianScales.getMainXScale();return e.step?Math.min(t.bars.maxWidth,e.step()/2):Math.min(t.bars.maxWidth,5/e.ticks().length*t.bars.maxWidth)},e}(Xh),of=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="simple-bar",e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("path.bar").transition(e.services.transitions.getTransition("legend-hover-simple-bar")).attr("opacity",(function(t){return t.label!==n.datum().key?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.bar").transition(e.services.transitions.getTransition("legend-mouseout-simple-bar")).attr("opacity",1)},e}return s(n,t),n.prototype.init=function(){var t=this.services.events;t.addEventListener("legend-item-onhover",this.handleLegendOnHover),t.addEventListener("legend-item-onmouseout",this.handleLegendMouseOut)},n.prototype.render=function(t){var n=this,r=this.getContainerSVG().selectAll("g.bars").data(this.model.getDisplayData().datasets,(function(t){return t.label}));r.exit().attr("opacity",0).remove();var i=r.enter().append("g").classed("bars",!0).attr("role",e.GROUP).merge(r).selectAll("path.bar").data((function(t,e){return n.addLabelsToDataPoints(t,e)}),(function(t){return t.label}));i.exit().attr("opacity",0).remove(),i.enter().append("path").attr("opacity",0).merge(i).classed("bar",!0).attr("width",this.getBarWidth.bind(this)).transition(this.services.transitions.getTransition("bar-update-enter",t)).attr("fill",(function(t){return n.model.getFillScale()(t.label)})).attr("d",(function(t,e){var r=n.getBarWidth(),i=n.services.cartesianScales.getDomainValue(t,e)-r/2,o=i+r,a=n.services.cartesianScales.getRangeValue(0),s=n.services.cartesianScales.getRangeValue(t,e);return _n.generateSVGPathString({x0:i,x1:o,y0:a,y1:s},n.services.cartesianScales.getOrientation())})).attr("opacity",1).attr("role",e.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t.value})),this.addEventListeners()},n.prototype.addLabelsToDataPoints=function(t,e){var n=this.model.getDisplayData().labels;return t.data.map((function(e,r){return{date:e.date,label:n[r],datasetLabel:t.label,value:isNaN(e)?e.value:e}}))},n.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("path.bar").on("mouseover",(function(e){var n=du(this);n.classed("hovered",!0),n.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")).attr("fill",Jr(n.attr("fill")).darker(.7).toString()),t.services.events.dispatchEvent(x.Bar.BAR_MOUSEOVER,{element:n,datum:e}),t.services.events.dispatchEvent("show-tooltip",{hoveredElement:n,type:v.DATAPOINT})})).on("mousemove",(function(e){t.services.events.dispatchEvent(x.Bar.BAR_MOUSEMOVE,{element:du(this),datum:e})})).on("click",(function(e){t.services.events.dispatchEvent(x.Bar.BAR_CLICK,{element:du(this),datum:e})})).on("mouseout",(function(e){var n=du(this);n.classed("hovered",!1),n.transition(t.services.transitions.getTransition("graph_element_mouseout_fill_update")).attr("fill",(function(e){return t.model.getFillScale()(e.label)})),t.services.events.dispatchEvent(x.Bar.BAR_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent("hide-tooltip",{hoveredElement:n})}))},n.prototype.destroy=function(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener("legend-item-onhover",this.handleLegendOnHover),t.removeEventListener("legend-item-onmouseout",this.handleLegendMouseOut)},n}(rf),af=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grouped-bar",e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("path.bar").transition(e.services.transitions.getTransition("legend-hover-bar")).attr("opacity",(function(t){return t.datasetLabel!==n.datum().key?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.bar").transition(e.services.transitions.getTransition("legend-mouseout-bar")).attr("opacity",1)},e}return s(n,t),n.prototype.init=function(){var t=this.services.events;t.addEventListener("legend-item-onhover",this.handleLegendOnHover),t.addEventListener("legend-item-onmouseout",this.handleLegendMouseOut)},n.prototype.getGroupWidth=function(){var t=this.model.getDisplayData().datasets;return t.length*this.getBarWidth()+5*(t.length-1)},n.prototype.setGroupScale=function(){var t=this.model.getDisplayData().datasets;this.groupScale=Rr().domain(t.map((function(t){return t.label}))).rangeRound([0,this.getGroupWidth()])},n.prototype.getBarWidth=function(){var e=this.model.getDisplayData().datasets,n=this.services.cartesianScales.getDomainScale();return Math.min(n.step()/2/e.length,t.prototype.getBarWidth.call(this))},n.prototype.render=function(t){var n=this,r=this.model.getDisplayData();this.setGroupScale();var i=this.getContainerSVG().selectAll("g.bars").data(r.labels);i.exit().attr("opacity",0).remove();var o=i.enter().append("g").classed("bars",!0).attr("role",e.GROUP).attr("aria-labelledby",(function(t){return t})).merge(i).attr("transform",(function(t,e){var r=n.services.cartesianScales.getDomainValue(t,e)-n.getGroupWidth()/2+n.getBarWidth();return n.services.cartesianScales.getOrientation()===h.VERTICAL?"translate("+r+", 0)":"translate(0, "+r+")"})).selectAll("path.bar").data((function(t,e){return n.addLabelsToDataPoints(t,e)}));o.exit().attr("opacity",0).remove(),o.enter().append("path").attr("opacity",0).merge(o).classed("bar",!0).transition(this.services.transitions.getTransition("bar-update-enter",t)).attr("fill",(function(t){return n.model.getFillScale()[t.datasetLabel](t.label)})).attr("d",(function(t){var e=n.groupScale(t.datasetLabel),r=n.getBarWidth(),i=e-r/2,o=e+r/2,a=n.services.cartesianScales.getRangeValue(0),s=n.services.cartesianScales.getRangeValue(t.value);return _n.generateSVGPathString({x0:i,x1:o,y0:a,y1:s},n.services.cartesianScales.getOrientation())})).attr("opacity",1).attr("role",e.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t.value})),this.addEventListeners()},n.prototype.addLabelsToDataPoints=function(t,e){return this.model.getDisplayData().datasets.map((function(n){return{label:t,datasetLabel:n.label,value:n.data[e].value?n.data[e].value:n.data[e]}}))},n.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("path.bar").on("mouseover",(function(e){var n=du(this);n.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")).attr("fill",Jr(n.attr("fill")).darker(.7).toString()),t.services.events.dispatchEvent(x.Bar.BAR_MOUSEOVER,{element:n,datum:e}),t.services.events.dispatchEvent("show-tooltip",{hoveredElement:n,type:v.DATAPOINT})})).on("mousemove",(function(e){t.services.events.dispatchEvent(x.Bar.BAR_MOUSEMOVE,{element:du(this),datum:e})})).on("click",(function(e){t.services.events.dispatchEvent(x.Bar.BAR_CLICK,{element:du(this),datum:e})})).on("mouseout",(function(e){var n=du(this);n.classed("hovered",!1),n.transition(t.services.transitions.getTransition("graph_element_mouseout_fill_update")).attr("fill",(function(e){return t.model.getFillScale()[e.datasetLabel](e.label)})),t.services.events.dispatchEvent(x.Bar.BAR_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent("hide-tooltip",{hoveredElement:n})}))},n.prototype.destroy=function(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener("legend-item-onhover",this.handleLegendOnHover),t.removeEventListener("legend-item-onmouseout",this.handleLegendMouseOut)},n}(rf),sf=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="stacked-bar",e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("path.bar").transition(e.services.transitions.getTransition("legend-hover-bar")).attr("opacity",(function(t){return t.datasetLabel!==n.datum().key?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.bar").transition(e.services.transitions.getTransition("legend-mouseout-bar")).attr("opacity",1)},e}return s(n,t),n.prototype.init=function(){var t=this.services.events;t.addEventListener("legend-item-onhover",this.handleLegendOnHover),t.addEventListener("legend-item-onmouseout",this.handleLegendMouseOut)},n.prototype.getStackData=function(){var t,e=this.model.getDisplayData(),n=this.services.cartesianScales.getDomainAxisPosition();if(this.services.cartesianScales.getScaleTypeByPosition(n)===p.TIME){var r=[];e.datasets.forEach((function(t){r=r.concat(t.data.map((function(t){return Number(t.date)})))})),t=(r=_n.removeArrayDuplicates(r).sort()).map((function(t,n){var r={};return e.datasets.forEach((function(e){var n=e.data.find((function(e){return Number(e.date)===Number(t)}));r[e.label]=n?n.value:0})),r.label=t,r}))}else t=e.labels.map((function(t,n){var r={};return e.datasets.forEach((function(t){r[t.label]=isNaN(t.data[n])?t.data[n].value:t.data[n]})),r.label=t,r}));return t},n.prototype.render=function(t){var n=this,r=this.model.getOptions(),i=this.getContainerSVG(),o=this.model.getDisplayData(),a=this.getStackData(),s=o.datasets.map((function(t){return t.label})),u=i.selectAll("g.bars").data(function(){var t=Sc([]),e=zh,n=Uh,r=Gh;function i(i){var o,a,s=t.apply(this,arguments),u=i.length,l=s.length,c=new Array(l);for(o=0;o<l;++o){for(var h,f=s[o],p=c[o]=new Array(u),d=0;d<u;++d)p[d]=h=[0,+r(i[d],f,d,i)],h.data=i[d];p.key=f}for(o=0,a=e(c);o<l;++o)c[a[o]].index=o;return n(c,a),c}return i.keys=function(e){return arguments.length?(t="function"==typeof e?e:Sc(Qc.call(e)),i):t},i.value=function(t){return arguments.length?(r="function"==typeof t?t:Sc(+t),i):r},i.order=function(t){return arguments.length?(e=null==t?zh:"function"==typeof t?t:Sc(Qc.call(t)),i):e},i.offset=function(t){return arguments.length?(n=null==t?Uh:t,i):n},i}().keys(s)(a),(function(t){return t.key}));u.exit().attr("opacity",0).remove(),u.enter().append("g").classed("bars",!0).attr("role",e.GROUP);var l=i.selectAll("g.bars").selectAll("path.bar").data((function(t){return function(t){return Object.keys(t).map((function(e){"object"==typeof t[e]&&(t[e].datasetLabel=t.key,t[e].label=t[e].data.label,t[e].value=t[e].data[t.key])})),t}(t)}),(function(t){return t.label}));l.exit().remove();var c=this.services.cartesianScales.getRangeScale();l.enter().append("path").merge(l).classed("bar",!0).transition(this.services.transitions.getTransition("bar-update-enter",t)).attr("fill",(function(t){return n.model.getFillScale()[t.datasetLabel](t.label)})).attr("height",(function(t,e){var i,o=t.datasetLabel,a=s.indexOf(o);return i=c.scaleType===p.LABELS?Math.abs(c.scale.range()[0]-n.services.cartesianScales.getRangeValue(t.label,e)):n.services.cartesianScales.getRangeValue(t[0])-n.services.cartesianScales.getRangeValue(t[1]),a>0&&i>=r.bars.dividerSize?i-r.bars.dividerSize:i})).attr("d",(function(t,e){var i=n.getBarWidth(),o=n.services.cartesianScales.getDomainValue(t,e)-i/2,a=o+i,s=n.services.cartesianScales.getRangeValue(t[0],e),u=n.services.cartesianScales.getRangeValue(t[1],e);return Math.abs(u-s)>0&&Math.abs(u-s)>r.bars.dividerSize&&(n.services.cartesianScales.getOrientation()===h.VERTICAL?u+=1:u-=1),_n.generateSVGPathString({x0:o,x1:a,y0:s,y1:u},n.services.cartesianScales.getOrientation())})).attr("opacity",1).attr("role",e.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t.value})),this.addEventListeners()},n.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("path.bar").on("mouseover",(function(e){var n=du(this);n.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")).attr("fill",Jr(n.attr("fill")).darker(.7).toString()),t.services.events.dispatchEvent(x.Bar.BAR_MOUSEOVER,{element:n,datum:e})})).on("mousemove",(function(e){var n=du(this),r=du(this).datum();n.classed("hovered",!0);var i=r.data,o=i.label;delete i.label;var a=Object.keys(i).map((function(t){return{datasetLabel:t,value:i[t],label:o}}));t.services.events.dispatchEvent(x.Bar.BAR_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent("show-tooltip",{multidata:a,hoveredElement:n,type:v.DATAPOINT})})).on("click",(function(e){t.services.events.dispatchEvent(x.Bar.BAR_CLICK,{element:du(this),datum:e})})).on("mouseout",(function(e){var n=du(this);n.classed("hovered",!1),n.transition(t.services.transitions.getTransition("graph_element_mouseout_fill_update")).attr("fill",(function(e){return t.model.getFillScale()[e.datasetLabel](e.label)})),t.services.events.dispatchEvent(x.Bar.BAR_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent("hide-tooltip",{hoveredElement:n})}))},n.prototype.destroy=function(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener("legend-item-onhover",this.handleLegendOnHover),t.removeEventListener("legend-item-onmouseout",this.handleLegendMouseOut)},n}(rf),uf=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="scatter",e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("circle.dot").transition(e.services.transitions.getTransition("legend-hover-scatter")).attr("opacity",(function(t){return t.datasetLabel!==n.datum().key?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("circle.dot").transition(e.services.transitions.getTransition("legend-mouseout-scatter")).attr("opacity",1)},e}return s(n,t),n.prototype.init=function(){var t=this.services.events;t.addEventListener("legend-item-onhover",this.handleLegendOnHover),t.addEventListener("legend-item-onmouseout",this.handleLegendMouseOut)},n.prototype.render=function(t){var n=this,r=(this.model.getOptions(),this.getContainerSVG().selectAll("g.dots").data(this.model.getDisplayData().datasets,(function(t){return t.label})));r.exit().attr("opacity",0).remove();var i=r.enter().append("g").classed("dots",!0).attr("role",e.GROUP).merge(r).selectAll("circle.dot").data((function(t,e){return n.addLabelsToDataPoints(t,e)})),o=i.enter().append("circle").attr("opacity",0).merge(i);this.styleCircles(o,t),this.addEventListeners()},n.prototype.styleCircles=function(t,n){var r=this,i=this.model.getOptions(),o=i.points.filled;t.raise().classed("dot",!0).classed("filled",(function(t){return r.model.getIsFilled(t.datasetLabel,t.label,t,o)})).classed("unfilled",(function(t){return!r.model.getIsFilled(t.datasetLabel,t.label,t,o)})).attr("cx",(function(t,e){return r.services.cartesianScales.getDomainValue(t,e)})).transition(this.services.transitions.getTransition("scatter-update-enter",n)).attr("cy",(function(t,e){return r.services.cartesianScales.getRangeValue(t,e)})).attr("r",i.points.radius).attr("fill",(function(t){if(r.model.getIsFilled(t.datasetLabel,t.label,t,o))return r.model.getFillColor(t.datasetLabel,t.label,t)})).attr("fill-opacity",o?.2:1).attr("stroke",(function(t){return r.model.getStrokeColor(t.datasetLabel,t.label,t)})).attr("opacity",1).attr("role",e.GRAPHICS_SYMBOL).attr("aria-roledescription","point").attr("aria-label",(function(t){return t.value})),this.addEventListeners()},n.prototype.addLabelsToDataPoints=function(t,e){var n=this.model.getDisplayData().labels;return t.data.map((function(e,r){return{date:e.date,label:n[r],datasetLabel:t.label,class:e.class,value:isNaN(e)?e.value:e}}))},n.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("circle").on("mouseover mousemove",(function(e){var n=du(this);n.classed("hovered",!0).style("fill",(function(e){return t.model.getFillColor(e.datasetLabel,e.label,e)}));var r="mouseover"===nu.type?x.Scatter.SCATTER_MOUSEOVER:x.Scatter.SCATTER_MOUSEMOVE;t.services.events.dispatchEvent(r,{element:n,datum:e}),t.services.events.dispatchEvent("show-tooltip",{hoveredElement:n,type:v.DATAPOINT})})).on("click",(function(e){t.services.events.dispatchEvent(x.Scatter.SCATTER_CLICK,{element:du(this),datum:e})})).on("mouseout",(function(e){var n=du(this);n.classed("hovered",!1),t.configs.filled||n.style("fill",null),t.services.events.dispatchEvent(x.Scatter.SCATTER_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent("hide-tooltip",{hoveredElement:n})}))},n.prototype.destroy=function(){this.parent.selectAll("circle").on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener("legend-item-onhover",this.handleLegendOnHover),t.removeEventListener("legend-item-onmouseout",this.handleLegendMouseOut)},n}(Xh),lf=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="bubble",e}return s(e,t),e.prototype.getRadiusScale=function(t){var e=t.data(),n=e.map((function(t){return t.radius})).filter((function(t){return t})),r=this.model.getOptions(),i=Vu.getSVGElementSize(this.services.domUtils.getMainSVG(),{useAttr:!0});return so().domain(gr(n)).range(r.bubble.radiusRange(i,e))},e.prototype.styleCircles=function(t,e){var n=this,r=this.model.getOptions(),i=this.getRadiusScale(t);t.raise().classed("dot",!0).attr("cx",(function(t,e){return n.services.cartesianScales.getDomainValue(t,e)})).transition(this.services.transitions.getTransition("bubble-update-enter",e)).attr("cy",(function(t,e){return n.services.cartesianScales.getRangeValue(t,e)})).attr("r",(function(t){return i(t.radius)})).attr("fill",(function(t){return n.model.getFillScale()[t.datasetLabel](t.label)})).attr("fill-opacity",r.bubble.fillOpacity).attr("stroke",(function(t){return n.model.getStrokeColor(t.datasetLabel,t.label,t.value)})).attr("opacity",1)},e.prototype.addLabelsToDataPoints=function(t,e){var n=this.model.getOptions(),r=this.model.getDisplayData().labels;return t.data.map((function(e,i){return{date:e.date,label:r[i],datasetLabel:t.label,value:isNaN(e)?e.value:e,radius:e.radius||n.points.radius}}))},e}(uf),cf=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="line",e}return s(n,t),n.prototype.init=function(){var t=this;this.services.events.addEventListener("legend-item-onhover",(function(e){var n=e.detail.hoveredElement;t.parent.selectAll("g.lines").transition(t.services.transitions.getTransition("legend-hover-line")).attr("opacity",(function(t){return t.label!==n.datum().key?Vn.opacity.unselected:Vn.opacity.selected}))})),this.services.events.addEventListener("legend-item-onmouseout",(function(e){t.parent.selectAll("g.lines").transition(t.services.transitions.getTransition("legend-mouseout-line")).attr("opacity",Vn.opacity.selected)}))},n.prototype.render=function(t){var n=this;void 0===t&&(t=!0);var r=this.getContainerSVG();this.lineGenerator=function(){var t=$c,e=Zc,n=Sc(!0),r=null,i=Xc,o=null;function a(a){var s,u,l,c=a.length,h=!1;for(null==r&&(o=i(l=Oc())),s=0;s<=c;++s)!(s<c&&n(u=a[s],s,a))===h&&((h=!h)?o.lineStart():o.lineEnd()),h&&o.point(+t(u,s,a),+e(u,s,a));if(l)return o=null,l+""||null}return a.x=function(e){return arguments.length?(t="function"==typeof e?e:Sc(+e),a):t},a.y=function(t){return arguments.length?(e="function"==typeof t?t:Sc(+t),a):e},a.defined=function(t){return arguments.length?(n="function"==typeof t?t:Sc(!!t),a):n},a.curve=function(t){return arguments.length?(i=t,null!=r&&(o=i(r)),a):i},a.context=function(t){return arguments.length?(null==t?r=o=null:o=i(r=t),a):r},a}().x((function(t,e){return n.services.cartesianScales.getDomainValue(t,e)})).y((function(t,e){return n.services.cartesianScales.getRangeValue(t,e)})).curve(this.services.curves.getD3Curve());var i=r.selectAll("g.lines").data(this.model.getDisplayData().datasets,(function(t){return t.label}));i.exit().attr("opacity",0).remove();var o=i.enter().append("g").classed("lines",!0),a=this;o.append("path").attr("opacity",0).merge(r.selectAll("g.lines path")).attr("stroke",(function(t){var e=du(this.parentNode).datum();return a.model.getStrokeColor(e.label)})).datum((function(t){var e=du(this.parentNode).datum();return this._datasetLabel=e.label,e.data})).attr("role",e.GRAPHICS_SYMBOL).attr("aria-roledescription","line").attr("aria-label",(function(t){return t.map((function(t){return t.value||t})).join(",")})).transition(this.services.transitions.getTransition("line-update-enter",t)).attr("opacity",1).attr("class","line").attr("d",this.lineGenerator)},n}(Xh);function hf(t,e){var n=this,r=wi(this._current,t);return function(t){return n._current=r(t),e(n._current)}}var ff=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="pie",e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("path.slice").transition(e.services.transitions.getTransition("legend-hover-bar")).attr("opacity",(function(t){return t.data.label!==n.datum().key?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.slice").transition(e.services.transitions.getTransition("legend-mouseout-bar")).attr("opacity",1)},e}return s(n,t),n.prototype.init=function(){var t=this.services.events;t.addEventListener("legend-item-onhover",this.handleLegendOnHover),t.addEventListener("legend-item-onmouseout",this.handleLegendMouseOut)},n.prototype.getDataList=function(){var t=this.model.getDisplayData();return t.datasets[0].data.map((function(e,n){return{label:t.labels[n],value:e.value?e.value:e}}))},n.prototype.getInnerRadius=function(){return this.model.getOptions().pie.innerRadius},n.prototype.render=function(t){var n=this;void 0===t&&(t=!0);var r=this,i=this.getContainerSVG(),o=this.model.getOptions(),a=this.getDataList(),s=this.computeRadius();this.arc=qc().innerRadius(this.getInnerRadius()).outerRadius(s),this.hoverArc=qc().innerRadius(this.getInnerRadius()).outerRadius(s+o.pie.hoverArc.outerRadiusOffset);var u=function(){var t=Kc,e=Jc,n=null,r=Sc(0),i=Sc(Ic),o=Sc(0);function a(a){var s,u,l,c,h,f=a.length,p=0,d=new Array(f),v=new Array(f),g=+r.apply(this,arguments),y=Math.min(Ic,Math.max(-Ic,i.apply(this,arguments)-g)),m=Math.min(Math.abs(y)/f,o.apply(this,arguments)),_=m*(y<0?-1:1);for(s=0;s<f;++s)(h=v[d[s]=s]=+t(a[s],s,a))>0&&(p+=h);for(null!=e?d.sort((function(t,n){return e(v[t],v[n])})):null!=n&&d.sort((function(t,e){return n(a[t],a[e])})),s=0,l=p?(y-f*_)/p:0;s<f;++s,g=c)u=d[s],c=g+((h=v[u])>0?h*l:0)+_,v[u]={data:a[u],index:s,value:h,startAngle:g,endAngle:c,padAngle:m};return v}return a.value=function(e){return arguments.length?(t="function"==typeof e?e:Sc(+e),a):t},a.sortValues=function(t){return arguments.length?(e=t,n=null,a):e},a.sort=function(t){return arguments.length?(n=t,e=null,a):n},a.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:Sc(+t),a):r},a.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Sc(+t),a):i},a.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:Sc(+t),a):o},a}().value((function(t){return t.value})).sort(null).padAngle(o.pie.padAngle)(a).sort((function(t,e){return t.index-e.index})),l=Vu.appendOrSelect(i,"g.slices").attr("role",e.GROUP).selectAll("path.slice").data(u,(function(t){return t.data.label}));l.exit().attr("opacity",0).remove(),l.enter().append("path").classed("slice",!0).attr("opacity",0).merge(l).attr("fill",(function(t){return n.model.getFillScale()(t.data.label)})).attr("d",this.arc).transition(this.services.transitions.getTransition("pie-slice-enter-update",t)).attr("opacity",1).attr("role",e.GRAPHICS_SYMBOL).attr("aria-roledescription","slice").attr("aria-label",(function(t){return t.value+", "+_n.convertValueToPercentage(t.data.value,a)+"%"})).attrTween("d",(function(t){return hf.bind(this)(t,r.arc)}));var c=Vu.appendOrSelect(i,"g.labels").attr("role",e.GROUP).selectAll("text.pie-label").data(u,(function(t){return t.data.label}));c.exit().attr("opacity",0).remove();var h=c.enter().append("text").classed("pie-label",!0),f=[];h.merge(c).style("text-anchor","middle").text((function(t){return o.pie.labels.formatter?o.pie.labels.formatter(t):_n.convertValueToPercentage(t.data.value,a)+"%"})).datum((function(t){var e=this.getComputedTextLength();t.textOffsetX=e/2,t.textOffsetY=parseFloat(getComputedStyle(this).fontSize)/2;var n=s+7,r=(t.endAngle-t.startAngle)/2+t.startAngle;return t.xPosition=(t.textOffsetX+n)*Math.sin(r),t.yPosition=(t.textOffsetY+n)*-Math.cos(r),t})).attr("transform",(function(t,e){var n=a.length,r=(t.endAngle-t.startAngle)*(180/Math.PI);if(e>=n-2&&r<o.pie.callout.minSliceDegree){var i=void 0,s=void 0;return t.index===n-1?(i=t.xPosition+o.pie.callout.offsetX+o.pie.callout.textMargin+t.textOffsetX,s=t.yPosition-o.pie.callout.offsetY,t.direction=b.RIGHT,f.push(t)):(i=t.xPosition-o.pie.callout.offsetX-t.textOffsetX-o.pie.callout.textMargin,s=t.yPosition-o.pie.callout.offsetY,t.direction=b.LEFT,f.push(t)),"translate("+i+", "+s+")"}return"translate("+t.xPosition+", "+t.yPosition+")"})),this.renderCallouts(f);var p=s+o.pie.xOffset,d=s+o.pie.yOffset;f.length>0&&(d+=o.pie.yOffsetCallout),i.attr("transform","translate("+p+", "+d+")"),this.addEventListeners()},n.prototype.renderCallouts=function(t){var n=Vu.appendOrSelect(this.getContainerSVG(),"g.callouts").attr("role",e.GROUP),r=this.model.getOptions(),i=n.selectAll("g.callout").data(t);i.exit().remove();var o=i.enter().append("g").classed("callout",!0).attr("role",e.GRAPHICS_SYMBOL+" "+e.GROUP).attr("aria-roledescription","label callout");o.merge(i).datum((function(t){var e=t.xPosition,n=t.yPosition;return t.direction===b.RIGHT?(t.startPos={x:e,y:n+t.textOffsetY},t.endPos={x:e+r.pie.callout.offsetX,y:n-r.pie.callout.offsetY+t.textOffsetY},t.intersectPointX=t.endPos.x-r.pie.callout.horizontalLineLength):(t.startPos={x:e,y:n+t.textOffsetY},t.endPos={x:e-r.pie.callout.offsetX,y:n-r.pie.callout.offsetY+t.textOffsetY},t.intersectPointX=t.endPos.x+r.pie.callout.horizontalLineLength),t})),o.append("line").classed("vertical-line",!0).merge(n.selectAll("line.vertical-line")).datum((function(t){return du(this.parentNode).datum()})).style("stroke-width","1px").attr("x1",(function(t){return t.startPos.x})).attr("y1",(function(t){return t.startPos.y})).attr("x2",(function(t){return t.intersectPointX})).attr("y2",(function(t){return t.endPos.y})),o.append("line").classed("horizontal-line",!0).merge(i.selectAll("line.horizontal-line")).datum((function(t){return du(this.parentNode).datum()})).style("stroke-width","1px").attr("x1",(function(t){return t.intersectPointX})).attr("y1",(function(t){return t.endPos.y})).attr("x2",(function(t){return t.endPos.x})).attr("y2",(function(t){return t.endPos.y}))},n.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("path.slice").on("mouseover",(function(e){t.services.events.dispatchEvent(x.Pie.SLICE_MOUSEOVER,{element:du(this),datum:e})})).on("mousemove",(function(e){var n=du(this);n.classed("hovered",!0).transition(t.services.transitions.getTransition("pie_slice_mouseover")).attr("d",t.hoverArc),t.services.events.dispatchEvent(x.Pie.SLICE_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent("show-tooltip",{hoveredElement:n,type:v.DATAPOINT})})).on("click",(function(e){t.services.events.dispatchEvent(x.Pie.SLICE_CLICK,{element:du(this),datum:e})})).on("mouseout",(function(e){var n=du(this);n.classed("hovered",!1).transition(t.services.transitions.getTransition("pie_slice_mouseover")).attr("d",t.arc),t.services.events.dispatchEvent(x.Pie.SLICE_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent("hide-tooltip",{hoveredElement:n})}))},n.prototype.computeRadius=function(){var t=this.model.getOptions(),e=Vu.getSVGElementSize(this.parent,{useAttrs:!0}),n=e.width,r=e.height;return Math.min(n,r)/2+t.pie.radiusOffset},n}(Xh),pf=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="donut",e}return s(e,t),e.prototype.render=function(e){void 0===e&&(e=!0),t.prototype.render.call(this,e);var n=this,r=Vu.appendOrSelect(this.getContainerSVG(),"g.center"),i=this.model.getOptions(),o=this.computeRadius();Vu.appendOrSelect(r,"text.donut-figure").attr("text-anchor","middle").style("font-size",(function(){return i.donut.center.numberFontSize(o)})).transition(this.services.transitions.getTransition("donut-figure-enter-update",e)).tween("text",(function(){return n.centerNumberTween(du(this))})),Vu.appendOrSelect(r,"text.donut-title").attr("text-anchor","middle").style("font-size",(function(){return i.donut.center.titleFontSize(o)})).attr("y",i.donut.center.titleYPosition(o)).text(_n.getProperty(i,"donut","center","label"))},e.prototype.getInnerRadius=function(){return.75*this.computeRadius()},e.prototype.centerNumberTween=function(t){var e=this.model.getOptions(),n=_n.getProperty(e,"donut","center","number");n||(n=this.getDataList().reduce((function(t,e){return t+e.value}),0));var r=yi(parseInt(t.text().replace(/[, ]+/g,""),10)||0,n);return function(n){var i=e.donut.center.numberFormatter;t.text(i(r(n)))}},e}(ff),df=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="spacer",e}return s(e,t),e.prototype.render=function(){this.getContainerSVG().append("rect").attr("x",0).attr("y",0).attr("width",this.configs.size||zn.default.size).attr("height",this.configs.size||zn.default.size).attr("opacity",0)},e}(Xh);function vf(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function gf(t,e){var n,r,i,o,a,s=new bf(t),u=+t.value&&(s.value=t.value),l=[s];for(null==e&&(e=yf);n=l.pop();)if(u&&(n.value=+n.data.value),(i=e(n.data))&&(a=i.length))for(n.children=new Array(a),o=a-1;o>=0;--o)l.push(r=n.children[o]=new bf(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(_f)}function yf(t){return t.children}function mf(t){t.data=t.data.data}function _f(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function bf(t){this.data=t,this.depth=this.height=0,this.parent=null}function xf(t){if("function"!=typeof t)throw new Error;return t}function wf(){return 0}function Tf(t){return function(){return t}}function Ef(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function Of(t,e,n,r,i){for(var o,a=t.children,s=-1,u=a.length,l=t.value&&(r-e)/t.value;++s<u;)(o=a[s]).y0=n,o.y1=i,o.x0=e,o.x1=e+=o.value*l}function Sf(t,e,n,r,i){for(var o,a=t.children,s=-1,u=a.length,l=t.value&&(i-n)/t.value;++s<u;)(o=a[s]).x0=e,o.x1=r,o.y0=n,o.y1=n+=o.value*l}bf.prototype=gf.prototype={constructor:bf,count:function(){return this.eachAfter(vf)},each:function(t){var e,n,r,i,o=this,a=[o];do{for(e=a.reverse(),a=[];o=e.pop();)if(t(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r])}while(a.length);return this},eachAfter:function(t){for(var e,n,r,i=this,o=[i],a=[];i=o.pop();)if(a.push(i),e=i.children)for(n=0,r=e.length;n<r;++n)o.push(e[n]);for(;i=a.pop();)t(i);return this},eachBefore:function(t){for(var e,n,r=this,i=[r];r=i.pop();)if(t(r),e=r.children)for(n=e.length-1;n>=0;--n)i.push(e[n]);return this},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;t=n.pop(),e=r.pop();for(;t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){var t=[];return this.each((function(e){t.push(e)})),t},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return gf(this).eachBefore(mf)}};var Mf=function t(e){function n(t,n,r,i,o){!function(t,e,n,r,i,o){for(var a,s,u,l,c,h,f,p,d,v,g,y=[],m=e.children,_=0,b=0,x=m.length,w=e.value;_<x;){u=i-n,l=o-r;do{c=m[b++].value}while(!c&&b<x);for(h=f=c,g=c*c*(v=Math.max(l/u,u/l)/(w*t)),d=Math.max(f/g,g/h);b<x;++b){if(c+=s=m[b].value,s<h&&(h=s),s>f&&(f=s),g=c*c*v,(p=Math.max(f/g,g/h))>d){c-=s;break}d=p}y.push(a={value:c,dice:u<l,children:m.slice(_,b)}),a.dice?Of(a,n,r,i,w?r+=l*c/w:o):Sf(a,n,r,w?n+=u*c/w:i,o),w-=c,_=b}}(e,t,n,r,i,o)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}((1+Math.sqrt(5))/2);function Af(){var t=Mf,e=!1,n=1,r=1,i=[0],o=wf,a=wf,s=wf,u=wf,l=wf;function c(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(h),i=[0],e&&t.eachBefore(Ef),t}function h(e){var n=i[e.depth],r=e.x0+n,c=e.y0+n,h=e.x1-n,f=e.y1-n;h<r&&(r=h=(r+h)/2),f<c&&(c=f=(c+f)/2),e.x0=r,e.y0=c,e.x1=h,e.y1=f,e.children&&(n=i[e.depth+1]=o(e)/2,r+=l(e)-n,c+=a(e)-n,(h-=s(e)-n)<r&&(r=h=(r+h)/2),(f-=u(e)-n)<c&&(c=f=(c+f)/2),t(e,r,c,h,f))}return c.round=function(t){return arguments.length?(e=!!t,c):e},c.size=function(t){return arguments.length?(n=+t[0],r=+t[1],c):[n,r]},c.tile=function(e){return arguments.length?(t=xf(e),c):t},c.padding=function(t){return arguments.length?c.paddingInner(t).paddingOuter(t):c.paddingInner()},c.paddingInner=function(t){return arguments.length?(o="function"==typeof t?t:Tf(+t),c):o},c.paddingOuter=function(t){return arguments.length?c.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):c.paddingTop()},c.paddingTop=function(t){return arguments.length?(a="function"==typeof t?t:Tf(+t),c):a},c.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:Tf(+t),c):s},c.paddingBottom=function(t){return arguments.length?(u="function"==typeof t?t:Tf(+t),c):u},c.paddingLeft=function(t){return arguments.length?(l="function"==typeof t?t:Tf(+t),c):l},c}var Cf=function(t){function e(n,r,i,o){var a=t.call(this,n,r,o)||this;return a.type="layout",a.configs=o,a.children=i,a._instanceID=e.instanceID++,(a.configs.direction===m.ROW_REVERSE||a.configs.direction===m.COLUMN_REVERSE)&&(a.children=a.children.reverse()),a.init(),a}return s(e,t),e.prototype.init=function(){this.children.forEach((function(t){t.components.forEach((function(t){t.init()}))}))},e.prototype.getPreferedAndFixedSizeSum=function(){var t=this.parent,e=0;return t.selectAll("svg.layout-child-"+this._instanceID).filter((function(t){var e=_n.getProperty(t,"data","growth","x");return e===_.PREFERRED||e===_.FIXED})).each((function(t){e+=t.data.size})),e},e.prototype.getNumOfStretchChildren=function(){return this.parent.selectAll("svg.layout-child-"+this._instanceID).filter((function(t){return _n.getProperty(t,"data","growth","x")===_.STRETCH})).size()},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.parent,r=Vu.getSVGElementSize(n,{useAttrs:!0}),i=r.width,o=r.height,a=gf({children:this.children}).sum((function(t){return t.size})),s=this.configs.direction===m.ROW||this.configs.direction===m.ROW_REVERSE?Of:Sf;Af().tile(s).size([i,o])(a);var u=this.configs.direction===m.ROW||this.configs.direction===m.ROW_REVERSE,l=n.selectAll("svg.layout-child-"+this._instanceID).data(a.leaves(),(function(t){return t.data.id}));l.attr("width",(function(t){return t.x1-t.x0})).attr("height",(function(t){return t.y1-t.y0})),l.enter().append("svg").attr("class",(function(t){return"layout-child layout-child-"+e._instanceID+" "+t.data.id})).attr("x",(function(t){return t.x0})).attr("y",(function(t){return t.y0})).merge(n.selectAll("svg.layout-child-"+this._instanceID)).each((function(e){var n=this;e.data.components.forEach((function(r){r.setParent(du(n));var i=_n.getProperty(e,"data","growth","x");i!==_.PREFERRED&&i!==_.FIXED||r.render(t)}))})),n.selectAll("svg.layout-child-"+this._instanceID).each((function(t){var e=_n.getProperty(t,"data","growth","x"),n=Vu.getSVGElementSize(du(this),{useBBox:!0});if(e===_.PREFERRED){var r=u?n.width:n.height,a=u?i:o;t.data.size=r/a*100}})),l.exit().remove(),this.children.filter((function(t){return _n.getProperty(t,"growth","x")===_.STRETCH})).forEach((function(t,n){t.size=(100-+e.getPreferedAndFixedSizeSum())/+e.getNumOfStretchChildren()})),a=gf({children:this.children}).sum((function(t){return t.size})),Af().tile(s).size([i,o]).padding(0)(a),n.selectAll("svg.layout-child-"+this._instanceID).data(a.leaves(),(function(t){return t.data.id})).attr("x",(function(t){return t.x0})).attr("y",(function(t){return t.y0})).attr("width",(function(t){return t.x1-t.x0})).attr("height",(function(t){return t.y1-t.y0})).each((function(e,n){e.data.components.forEach((function(n){_n.getProperty(e,"data","growth","x")===_.STRETCH&&n.render(t)}))}))},e.prototype.setModel=function(e){t.prototype.setModel.call(this,e),this.children.forEach((function(t){t.components.forEach((function(t){return t.setModel(e)}))}))},e.prototype.setServices=function(e){t.prototype.setServices.call(this,e),this.children.forEach((function(t){t.components.forEach((function(t){return t.setServices(e)}))}))},e.prototype.destroy=function(){this.children.forEach((function(t){t.components.forEach((function(t){return t.destroy()}))}))},e.instanceID=Math.floor(99999999999*Math.random()),e}(Xh),Lf=Array.prototype.slice;function kf(t){return t}function Pf(t){return"translate("+(t+.5)+",0)"}function Df(t){return"translate(0,"+(t+.5)+")"}function Rf(t){return function(e){return+t(e)}}function jf(t){var e=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}function If(){return!this.__axis}function Nf(t,e){var n=[],r=null,i=null,o=6,a=6,s=3,u=1===t||4===t?-1:1,l=4===t||2===t?"x":"y",c=1===t||3===t?Pf:Df;function h(h){var f=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,p=null==i?e.tickFormat?e.tickFormat.apply(e,n):kf:i,d=Math.max(o,0)+s,v=e.range(),g=+v[0]+.5,y=+v[v.length-1]+.5,m=(e.bandwidth?jf:Rf)(e.copy()),_=h.selection?h.selection():h,b=_.selectAll(".domain").data([null]),x=_.selectAll(".tick").data(f,e).order(),w=x.exit(),T=x.enter().append("g").attr("class","tick"),E=x.select("line"),O=x.select("text");b=b.merge(b.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),x=x.merge(T),E=E.merge(T.append("line").attr("stroke","currentColor").attr(l+"2",u*o)),O=O.merge(T.append("text").attr("fill","currentColor").attr(l,u*d).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),h!==_&&(b=b.transition(h),x=x.transition(h),E=E.transition(h),O=O.transition(h),w=w.transition(h).attr("opacity",1e-6).attr("transform",(function(t){return isFinite(t=m(t))?c(t):this.getAttribute("transform")})),T.attr("opacity",1e-6).attr("transform",(function(t){var e=this.parentNode.__axis;return c(e&&isFinite(e=e(t))?e:m(t))}))),w.remove(),b.attr("d",4===t||2==t?a?"M"+u*a+","+g+"H0.5V"+y+"H"+u*a:"M0.5,"+g+"V"+y:a?"M"+g+","+u*a+"V0.5H"+y+"V"+u*a:"M"+g+",0.5H"+y),x.attr("opacity",1).attr("transform",(function(t){return c(m(t))})),E.attr(l+"2",u*o),O.attr(l,u*d).text(p),_.filter(If).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),_.each((function(){this.__axis=m}))}return h.scale=function(t){return arguments.length?(e=t,h):e},h.ticks=function(){return n=Lf.call(arguments),h},h.tickArguments=function(t){return arguments.length?(n=null==t?[]:Lf.call(t),h):n.slice()},h.tickValues=function(t){return arguments.length?(r=null==t?null:Lf.call(t),h):r&&r.slice()},h.tickFormat=function(t){return arguments.length?(i=t,h):i},h.tickSize=function(t){return arguments.length?(o=a=+t,h):o},h.tickSizeInner=function(t){return arguments.length?(o=+t,h):o},h.tickSizeOuter=function(t){return arguments.length?(a=+t,h):a},h.tickPadding=function(t){return arguments.length?(s=+t,h):s},h}function Ff(t){return Nf(1,t)}function Bf(t){return Nf(2,t)}function Vf(t){return Nf(3,t)}function Hf(t){return Nf(4,t)}var Uf=function(t){function n(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="axes",r&&(i.configs=r),i.margins=i.configs.margins,i}return s(n,t),n.prototype.render=function(t){void 0===t&&(t=!0);var n,r,i=this.configs.position,o=this.model.getOptions(),a=_n.getProperty(o,"axes",i),s=_n.getProperty(a,"ticks","number"),u=null!==s,l=i===c.LEFT||i===c.RIGHT,h=this.getContainerSVG(),f=Vu.getSVGElementSize(this.parent,{useAttrs:!0}),d=f.width,v=f.height;i===c.BOTTOM||i===c.TOP?(n=this.configs.axes[c.LEFT]?this.margins.left:0,r=this.configs.axes[c.RIGHT]?d-this.margins.right:d):(n=v-this.margins.bottom,r=this.margins.top);var g,y=this.services.cartesianScales.getScaleByPosition(i);switch(this.scaleType===p.LABELS?y.rangeRound([n,r]):y.range([n,r]),i){case c.LEFT:g=Hf;break;case c.BOTTOM:g=Vf;break;case c.RIGHT:g=Bf;break;case c.TOP:g=Ff}var m=Vu.appendOrSelect(h,"g.axis."+i),_=!m.select("g.ticks").empty(),b=Vu.appendOrSelect(m,"g.ticks");_||b.attr("role",e.GRAPHICS_OBJECT+" "+e.GROUP);var x=Vu.appendOrSelect(m,"g.ticks.invisible").style("opacity","0").attr("aria-hidden",!0),w=Vu.appendOrSelect(x,"g.tick"),T=Vu.appendOrSelect(w,"text").text("0"),E=Vu.getSVGElementSize(T.node(),{useBBox:!0}).height;w.remove();var O=g(y).tickSizeOuter(0).tickFormat(_n.getProperty(a,"ticks","formatter"));if(y.ticks){var S=void 0;if(u?S=s:(S=Un.ticks.number,l&&(S=this.getNumberOfFittingTicks(v,E,2.5))),O.ticks(S),this.scaleType===p.TIME){var M=y.ticks(S).concat(y.domain()).map((function(t){return+t})).sort();M=_n.removeArrayDuplicates(M),_n.getProperty(o,"timeScale","addSpaceOnEdges")&&M.length>2&&(M.splice(M.length-1,1),M.splice(0,1)),O.tickValues(M)}}switch(i){case c.LEFT:b.attr("transform","translate("+this.margins.left+", 0)");break;case c.BOTTOM:b.attr("transform","translate(0, "+(v-this.margins.bottom)+")");break;case c.RIGHT:b.attr("transform","translate("+(d-this.margins.right)+", 0)");break;case c.TOP:b.attr("transform","translate(0, "+this.margins.top+")")}if(a.title){var A=Vu.appendOrSelect(m,"text.axis-title").text(a.title);switch(i){case c.LEFT:A.attr("transform","rotate(-90)").attr("y",0).attr("x",-y.range()[0]/2).attr("dy","1em").style("text-anchor","middle");break;case c.BOTTOM:A.attr("transform","translate("+(this.margins.left/2+y.range()[1]/2)+", "+v+")").style("text-anchor","middle");break;case c.RIGHT:A.attr("transform","rotate(90)").attr("y",-d).attr("x",y.range()[0]/2).attr("dy","1em").style("text-anchor","middle");break;case c.TOP:var C=Vu.getSVGElementSize(A,{useBBox:!0}).height;A.attr("transform","translate("+(this.margins.left/2+y.range()[1]/2)+", "+C/2+")").style("text-anchor","middle")}}if(b=t&&_?b.transition(this.services.transitions.getTransition("axis-update")).call(O):b.call(O),x.call(O),i===c.BOTTOM||i===c.TOP){var L=!1;if(y.step){L=x.selectAll("g.tick text").nodes().some((function(t){return Vu.getSVGElementSize(t,{useBBox:!0}).width>=y.step()}))}else{var k=_n.getProperty(a,"ticks","rotateIfSmallerThan")||Un.ticks.rotateIfSmallerThan;L=d/y.ticks().length/2<k}L?(u||(O.ticks(this.getNumberOfFittingTicks(d,E,3.5)),x.call(O),b.call(O)),m.selectAll("g.ticks g.tick text").attr("transform","rotate(45)").style("text-anchor",i===c.TOP?"end":"start")):m.selectAll("g.ticks g.tick text").attr("transform",null).style("text-anchor",null)}},n.prototype.getInvisibleAxisRef=function(){var t=this.configs.position;return this.getContainerSVG().select("g.axis."+t+" g.ticks.invisible")},n.prototype.getTitleRef=function(){var t=this.configs.position;return this.getContainerSVG().select("g.axis."+t+" text.axis-title")},n.prototype.getNumberOfFittingTicks=function(t,e,n){var r=Math.floor(t/(e*n));return _n.clamp(r,2,Un.ticks.number)},n}(Xh),zf=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="2D-axes",e.children={},e.margins={top:0,right:0,bottom:0,left:0},e}return s(e,t),e.prototype.render=function(t){var e=this;void 0===t&&(t=!1);var n={},r=Object.keys(c),i=_n.getProperty(this.model.getOptions(),"axes");i?r.forEach((function(t){var e=i[c[t]];e&&(n[c[t]]=!0,!0===e.primary||e.secondary)})):(this.model.getOptions().axes={left:{primary:!0},bottom:{secondary:!0,type:this.model.getDisplayData().labels?p.LABELS:void 0}},n[c.LEFT]=!0,n[c.BOTTOM]=!0),this.configs.axes=n,r.forEach((function(t){var n=c[t];if(e.configs.axes[n]&&!e.children[n]){var r=new Uf(e.model,e.services,{position:n,axes:e.configs.axes,margins:e.margins});r.setModel(e.model),r.setServices(e.services),r.setParent(e.parent),e.children[n]=r}})),Object.keys(this.children).forEach((function(n){e.children[n].render(t)}));var o={};Object.keys(this.children).forEach((function(t){var n,r=e.children[t],i=r.configs.position,a=r.getInvisibleAxisRef(),s=Vu.getSVGElementSize(a,{useBBox:!0}),u=s.width,l=s.height;switch(n=r.getTitleRef().empty()?0:Vu.getSVGElementSize(r.getTitleRef(),{useBBox:!0}).height,i){case c.TOP:o.top=l+n;break;case c.BOTTOM:o.bottom=l+n;break;case c.LEFT:o.left=u+n;break;case c.RIGHT:o.right=u+n}})),Object.keys(o).some((function(t){return e.margins[t]!==o[t]}))&&(this.margins=Object.assign(this.margins,o),Object.keys(this.children).forEach((function(t){e.children[t].margins=e.margins})),this.render(!0))},e}(Xh),Gf=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grid",e}return s(e,t),e.prototype.render=function(){this.drawBackdrop(),Vu.appendOrSelect(this.backdrop,"g.x.grid"),Vu.appendOrSelect(this.backdrop,"g.y.grid"),this.drawXGrid(),this.drawYGrid(),_n.getProperty(this.model.getOptions(),"tooltip","gridline","enabled")&&this.addGridEventListeners()},e.prototype.drawXGrid=function(){var t=this.parent,e=this.backdrop.attr("height"),n=Vf(this.services.cartesianScales.getMainXScale()).tickSizeInner(-e).tickSizeOuter(0),r=_n.getProperty(this.model.getOptions(),"grid","x","numberOfTicks");n.ticks(r);var i=t.select(".x.grid").attr("transform","translate("+-this.backdrop.attr("x")+", "+e+")").call(n);this.cleanGrid(i)},e.prototype.drawYGrid=function(){var t=this.parent,e=this.backdrop.attr("width"),n=Hf(this.services.cartesianScales.getMainYScale()).tickSizeInner(-e).tickSizeOuter(0),r=_n.getProperty(this.model.getOptions(),"grid","y","numberOfTicks");n.ticks(r);var i=t.select(".y.grid").attr("transform","translate(0, "+-this.backdrop.attr("y")+")").call(n);this.cleanGrid(i)},e.prototype.getGridlineThreshold=function(t){var e,n=this.parent,r=n.selectAll(".x.grid .tick").nodes().sort((function(t,e){return Number(_n.getTranslationValues(t).tx)-Number(_n.getTranslationValues(e).tx)})),i=-1;r.forEach((function(e,n){t[0]>=+_n.getTranslationValues(e).tx&&i++})),e=i+1<r.length?i+1:r.length;var o,a=r[i],s=r[e];if(a)if(s)o=+_n.getTranslationValues(s).tx-+_n.getTranslationValues(a).tx;else{var u=n.select("rect.chart-grid-backdrop").node();o=Vu.getSVGElementSize(u).width-+_n.getTranslationValues(a).tx}else o=+_n.getTranslationValues(s).tx;return o*this.model.getOptions().tooltip.gridline.threshold},e.prototype.getActiveGridline=function(t){var e=_n.getProperty(this.model.getOptions,"tooltip","gridline","threshold")?_n.getProperty(this.model.getOptions,"tooltip","gridline","threshold"):this.getGridlineThreshold(t);return this.parent.selectAll(".x.grid .tick").filter((function(){var n=_n.getTranslationValues(this),r=Number(n.tx)-e,i=Number(n.tx)+e;return r<=t[0]&&t[0]<=i}))},e.prototype.addGridEventListeners=function(){var t=this,e=this.parent;Vu.appendOrSelect(e,"rect.chart-grid-backdrop").on("mousemove mouseover",(function(){var n=gu(t.services.domUtils.getMainSVG()),r=du(this);e.selectAll(".x.grid .tick").classed("active",!1);var i,o=t.getActiveGridline(n);o.empty()?t.services.events.dispatchEvent("hide-tooltip",{}):(o.classed("active",!0),o.each((function(e){i=t.services.cartesianScales.getDataFromDomain(e)})),t.services.events.dispatchEvent("show-tooltip",{hoveredElement:r,multidata:i,type:v.GRIDLINE}))})).on("mouseout",(function(){e.selectAll(".x.grid .tick").classed("active",!1),t.services.events.dispatchEvent("hide-tooltip",{})}))},e.prototype.drawBackdrop=function(){var t=this.parent,e=this.services.cartesianScales.getMainXScale(),n=this.services.cartesianScales.getMainYScale(),r=e.range(),i=r[0],o=r[1],a=n.range(),s=a[0],u=a[1];this.backdrop=Vu.appendOrSelect(t,"svg.chart-grid-backdrop");var l=Vu.appendOrSelect(this.backdrop,"rect.chart-grid-backdrop");this.backdrop.merge(l).attr("x",i).attr("y",u).attr("width",o-i).attr("height",s-u).lower(),l.attr("width","100%").attr("height","100%")},e.prototype.cleanGrid=function(t){var e=this.model.getOptions();t.selectAll("line").attr("stroke",e.grid.strokeColor),t.selectAll("text").remove(),t.select(".domain").remove()},e}(Xh),Yf=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="zero-line",e}return s(e,t),e.prototype.render=function(t){var e=this.getContainerSVG(),n=this.services.cartesianScales.getDomainScale().range(),r=n[0],i=n[1],o=+this.services.cartesianScales.getRangeValue(0)+.5,a=_n.flipSVGCoordinatesBasedOnOrientation({x0:r,x1:i,y0:o,y1:o},this.services.cartesianScales.getOrientation());Vu.appendOrSelect(e,"line.domain").transition(this.services.transitions.getTransition("zero-line-update",t)).attr("y1",a.y0).attr("y2",a.y1).attr("x1",a.x0).attr("x2",a.x1)},e}(Xh),qf=function(){function t(t,e){this.services={domUtils:Vu,events:Hu,transitions:Jl},this.model=new rs(this.services)}return t.prototype.init=function(t,e){var n=this;this.model.set({holder:t},!0),Object.keys(this.services).forEach((function(t){var e=n.services[t];n.services[t]=new e(n.model,n.services)})),this.services.events.addEventListener("model-update",(function(){n.update(!0)})),this.model.setData(e.data),this.services.events.addEventListener("chart-resize",(function(){n.update(!1)})),this.components=this.getComponents(),this.update()},t.prototype.getComponents=function(){return console.error("getComponents() method is not implemented"),null},t.prototype.update=function(t){var e=this;if(void 0===t&&(t=!0),this.components){Object.keys(this.services).forEach((function(t){e.services[t].update()})),this.components.forEach((function(e){return e.render(t)}));var n=this.services.transitions.getPendingTransitions(),r=Object.keys(n).map((function(t){return n[t].end().catch((function(t){return t}))}));Promise.all(r).then((function(){return e.services.events.dispatchEvent("render-finished")}))}},t.prototype.destroy=function(){this.components.forEach((function(t){return t.destroy()})),this.services.domUtils.getHolder().remove(),this.model.set({destroyed:!0},!0)},t.prototype.getChartComponents=function(t){var e={id:"title",components:[new Zh(this.model,this.services)],growth:{x:_.PREFERRED,y:_.FIXED}},n={id:"legend",components:[new $h(this.model,this.services)],growth:{x:_.PREFERRED,y:_.FIXED}},r={id:"graph-frame",components:t,growth:{x:_.STRETCH,y:_.FIXED}},i=!1!==this.model.getOptions().legend.enabled,o=m.COLUMN;if(i){var a=_n.getProperty(this.model.getOptions(),"legend","position");"left"===a?(o=m.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=y.VERTICAL)):"right"===a?(o=m.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=y.VERTICAL)):"bottom"===a&&(o=m.COLUMN_REVERSE)}var s={id:"spacer",components:[new df(this.model,this.services)],growth:{x:_.PREFERRED,y:_.FIXED}},l={id:"full-frame",components:[new Cf(this.model,this.services,u(i?[n]:[],[s,r]),{direction:o})],growth:{x:_.STRETCH,y:_.FIXED}},c=[];if(this.model.getOptions().title){c.push(e);var h={id:"spacer",components:[new df(this.model,this.services)],growth:{x:_.PREFERRED,y:_.FIXED}};c.push(h)}return c.push(l),[new Cf(this.model,this.services,c,{direction:m.COLUMN})]},t}(),Wf=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.services=Object.assign(r.services,{cartesianScales:bc,curves:Wh}),r}return s(e,t),e.prototype.getAxisChartComponents=function(t){var e={id:"title",components:[new Zh(this.model,this.services)],growth:{x:_.PREFERRED,y:_.FIXED}},n={id:"legend",components:[new $h(this.model,this.services)],growth:{x:_.PREFERRED,y:_.FIXED}},r={id:"graph-frame",components:t,growth:{x:_.STRETCH,y:_.FIXED}},i=!1!==this.model.getOptions().legend.enabled,o=m.COLUMN;if(i){var a=_n.getProperty(this.model.getOptions(),"legend","position");a===g.LEFT?(o=m.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=y.VERTICAL)):a===g.RIGHT?(o=m.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=y.VERTICAL)):a===g.BOTTOM&&(o=m.COLUMN_REVERSE)}var s={id:"spacer",components:[new df(this.model,this.services)],growth:{x:_.PREFERRED,y:_.FIXED}},l={id:"full-frame",components:[new Cf(this.model,this.services,u(i?[n]:[],[s,r]),{direction:o})],growth:{x:_.STRETCH,y:_.FIXED}},c=[];if(this.model.getOptions().title){c.push(e);var h={id:"spacer",components:[new df(this.model,this.services)],growth:{x:_.PREFERRED,y:_.FIXED}};c.push(h)}return c.push(l),[new Cf(this.model,this.services,c,{direction:m.COLUMN})]},e}(qf),Xf=function(t){function e(e){return t.call(this,e)||this}return s(e,t),e.prototype.generateDataLabels=function(t){var e={};return t.labels.forEach((function(t){e[t]=Tn.items.status.ACTIVE})),e},e.prototype.getDisplayData=function(){var t=Tn.items.status.ACTIVE,e=this.get("dataLabels");if(!this.get("data"))return null;var n=_n.clone(this.get("data")),r=n.datasets[0];return r.data=r.data.filter((function(r,i){var o=n.labels[i];return e[o]===t})),n.labels=n.labels.filter((function(n){return e[n]===t})),n},e.prototype.setColorScale=function(){var t=this.getDisplayData().datasets[0];if(t.fillColors)this.colorScale=Dr().range(t.fillColors).domain(this.allDataLabels);else{var e=hr;this.colorScale=Dr().range(e).domain(this.allDataLabels)}},e.prototype.getFillColor=function(t){var e=this.getOptions();return e.getFillColor?e.getFillColor(t):this.getFillScale()(t)},e.prototype.getStrokeColor=function(t){var e=this.getOptions();return e.getStrokeColor?e.getStrokeColor(t):this.colorScale(t)},e}(rs),$f=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new Xf(r.services),r.model.setOptions(_n.merge(_n.clone(Bn.simpleBarChart),n.options)),r.init(e,n),r}return s(e,t),e.prototype.getComponents=function(){var t=[new zf(this.model,this.services),new Gf(this.model,this.services),new of(this.model,this.services),new Yf(this.model,this.services)],e=this.getAxisChartComponents(t);return e.push(new ef(this.model,this.services)),e},e}(Wf),Zf=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(_n.merge(_n.clone(Bn.groupedBarChart),n.options)),r.init(e,n),r}return s(e,t),e.prototype.getComponents=function(){var t=[new zf(this.model,this.services),new Gf(this.model,this.services),new af(this.model,this.services),new Yf(this.model,this.services)],e=this.getAxisChartComponents(t);return e.push(new ef(this.model,this.services)),e},e}(Wf),Jf=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(_n.merge(_n.clone(Bn.stackedBarChart),n.options)),r.init(e,n),r}return s(e,t),e.prototype.getComponents=function(){var t=[new zf(this.model,this.services),new Gf(this.model,this.services),new sf(this.model,this.services)],e=this.getAxisChartComponents(t);return e.push(new ef(this.model,this.services)),e},e}(Wf),Kf=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(_n.merge(_n.clone(Bn.bubbleChart),n.options)),r.init(e,n),r}return s(e,t),e.prototype.getComponents=function(){var t=[new zf(this.model,this.services),new Gf(this.model,this.services),new lf(this.model,this.services)],e=this.getAxisChartComponents(t);return e.push(new nf(this.model,this.services)),e},e}(Wf),Qf=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(_n.merge(_n.clone(Bn.lineChart),n.options)),r.init(e,n),r}return s(e,t),e.prototype.getComponents=function(){var t=[new zf(this.model,this.services),new Gf(this.model,this.services),new cf(this.model,this.services),new uf(this.model,this.services)],e=this.getAxisChartComponents(t);return e.push(new nf(this.model,this.services)),e},e}(Wf),tp=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(_n.merge(_n.clone(Bn.scatterChart),n.options)),r.init(e,n),r}return s(e,t),e.prototype.getComponents=function(){var t=[new zf(this.model,this.services),new Gf(this.model,this.services),new uf(this.model,this.services)],e=this.getAxisChartComponents(t);return e.push(new nf(this.model,this.services)),e},e}(Wf),ep=function(t){function e(e){return t.call(this,e)||this}return s(e,t),e.prototype.sanitize=function(t){var e=_n.getProperty(t,"datasets",0);if(e){var n=t.labels.map((function(t,n){return{label:t,value:e.data[n],fillColor:e.fillColors?e.fillColors[n]:void 0}})).sort((function(t,e){return e.value-t.value}));e.data=n.map((function(t){return t.value})),t.labels=n.map((function(t){return t.label})),e.fillColors&&(e.fillColors=n.map((function(t){return t.fillColor})))}return t},e.prototype.generateDataLabels=function(t){var e={};return t.labels.forEach((function(t){e[t]=Tn.items.status.ACTIVE})),e},e.prototype.getDisplayData=function(){var t=Tn.items.status.ACTIVE,e=this.get("dataLabels");if(!this.get("data"))return null;var n=_n.clone(this.get("data")),r=n.datasets[0];return r.data=r.data.filter((function(r,i){var o=n.labels[i];return e[o]===t})),n.labels=n.labels.filter((function(n){return e[n]===t})),n},e.prototype.toggleDataLabel=function(t){var e=Tn.items.status,n=e.ACTIVE,r=e.DISABLED,i=this.get("dataLabels"),o=Object.keys(i).some((function(t){return i[t]===r})),a=Object.keys(i).filter((function(t){return i[t]===n}));o?1===a.length&&a[0]===t?Object.keys(i).forEach((function(t){i[t]=n})):i[t]=i[t]===r?n:r:Object.keys(i).forEach((function(e){i[e]=e===t?n:r})),this.set({dataLabels:i})},e.prototype.setColorScale=function(){var t=this.getDisplayData().datasets[0];if(t.fillColors)this.colorScale=Dr().range(t.fillColors).domain(this.allDataLabels);else{var e=hr;this.colorScale=Dr().range(e).domain(this.allDataLabels)}},e.prototype.getFillColor=function(t){var e=this.getOptions();return e.getFillColor?e.getFillColor(t):this.getFillScale()(t)},e.prototype.getStrokeColor=function(t){var e=this.getOptions();return e.getStrokeColor?e.getStrokeColor(t):this.colorScale(t)},e}(rs),np=function(t){function e(e,n,r){void 0===r&&(r=!1);var i=t.call(this,e,n)||this;return i.model=new ep(i.services),r?i:(i.model.setOptions(_n.merge(_n.clone(Bn.pieChart),n.options)),i.init(e,n),i)}return s(e,t),e.prototype.getComponents=function(){var t=[new ff(this.model,this.services)],e=this.getChartComponents(t);return e.push(new tf(this.model,this.services)),e},e}(qf),rp=function(t){function e(e,n){var r=t.call(this,e,n,!0)||this;return r.model.setOptions(_n.merge(_n.clone(Bn.donutChart),n.options)),r.init(e,n),r}return s(e,t),e.prototype.getComponents=function(){var t=[new pf(this.model,this.services)],e=this.getChartComponents(t);return e.push(new tf(this.model,this.services)),e},e}(np),ip=hr;t.BubbleChart=Kf,t.DonutChart=rp,t.GroupedBarChart=Zf,t.LineChart=Qf,t.PieChart=np,t.ScatterChart=tp,t.SimpleBarChart=$f,t.StackedBarChart=Jf,t.colorPalettes=fr,t.configurations=Gn,t.defaultColors=ip,t.interfaces=w,Object.defineProperty(t,"__esModule",{value:!0})}));