@carbon/charts 0.30.20 → 0.30.24
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/CHANGELOG.md +32 -0
- package/build/demo/data/bar.d.ts +174 -0
- package/build/demo/data/bubble.d.ts +41 -0
- package/build/demo/data/donut.d.ts +23 -0
- package/build/demo/data/line.d.ts +70 -0
- package/build/demo/data/pie.d.ts +13 -0
- package/build/demo/data/scatter.d.ts +31 -0
- package/build/demo/data/step.d.ts +4 -0
- package/build/demo/data/time-series-axis.d.ts +55 -3
- package/build/src/components/axes/grid.d.ts +3 -3
- package/build/src/components/axes/two-dimensional-axes.d.ts +3 -0
- package/build/src/components/essentials/threshold.d.ts +17 -0
- package/build/src/components/graphs/bar.d.ts +1 -1
- package/build/src/components/graphs/scatter.d.ts +1 -0
- package/build/src/components/graphs/skeleton.d.ts +22 -0
- package/build/src/components/index.d.ts +2 -0
- package/build/src/interfaces/axis-scales.d.ts +11 -0
- package/build/src/interfaces/charts.d.ts +4 -0
- package/build/src/interfaces/components.d.ts +21 -0
- package/build/src/interfaces/enums.d.ts +9 -0
- package/build/src/interfaces/events.d.ts +7 -0
- package/build/src/model.d.ts +1 -0
- package/build/src/services/scales-cartesian.d.ts +9 -1
- package/build/stories/tutorials/event-listeners.d.ts +1 -0
- package/build/stories/tutorials/getting-started/angular.d.ts +1 -0
- package/build/stories/tutorials/getting-started/react.d.ts +1 -0
- package/build/stories/tutorials/getting-started/vanilla.d.ts +1 -0
- package/build/stories/tutorials/getting-started/vue.d.ts +1 -0
- package/build/stories/tutorials/index.d.ts +6 -0
- package/build/stories/tutorials/tabular-data-format.d.ts +1 -0
- package/bundle.js +1 -1
- package/charts/bar-grouped.js +4 -2
- package/charts/bar-grouped.js.map +1 -1
- package/charts/bar-simple.js +4 -2
- package/charts/bar-simple.js.map +1 -1
- package/charts/bar-stacked.js +4 -2
- package/charts/bar-stacked.js.map +1 -1
- package/charts/bubble.js +4 -2
- package/charts/bubble.js.map +1 -1
- package/charts/donut.js +4 -2
- package/charts/donut.js.map +1 -1
- package/charts/line.js +4 -2
- package/charts/line.js.map +1 -1
- package/charts/pie.js +4 -2
- package/charts/pie.js.map +1 -1
- package/charts/scatter.js +4 -2
- package/charts/scatter.js.map +1 -1
- package/components/axes/axis.js +24 -13
- package/components/axes/axis.js.map +1 -1
- package/components/axes/grid.d.ts +3 -3
- package/components/axes/grid.js +27 -9
- package/components/axes/grid.js.map +1 -1
- package/components/axes/two-dimensional-axes.d.ts +3 -0
- package/components/axes/two-dimensional-axes.js +30 -0
- package/components/axes/two-dimensional-axes.js.map +1 -1
- package/components/axes/zero-line.js +15 -1
- package/components/axes/zero-line.js.map +1 -1
- package/components/essentials/threshold.d.ts +17 -0
- package/components/essentials/threshold.js +165 -0
- package/components/essentials/threshold.js.map +1 -0
- package/components/graphs/bar-grouped.js +3 -1
- package/components/graphs/bar-grouped.js.map +1 -1
- package/components/graphs/bar-simple.js +1 -1
- package/components/graphs/bar-simple.js.map +1 -1
- package/components/graphs/bar-stacked.js +1 -1
- package/components/graphs/bar-stacked.js.map +1 -1
- package/components/graphs/bar.d.ts +1 -1
- package/components/graphs/bar.js +1 -1
- package/components/graphs/bar.js.map +1 -1
- package/components/graphs/donut.js +6 -0
- package/components/graphs/donut.js.map +1 -1
- package/components/graphs/scatter.d.ts +1 -0
- package/components/graphs/scatter.js +28 -0
- package/components/graphs/scatter.js.map +1 -1
- package/components/graphs/skeleton.d.ts +22 -0
- package/components/graphs/skeleton.js +241 -0
- package/components/graphs/skeleton.js.map +1 -0
- package/components/index.d.ts +2 -0
- package/components/index.js +2 -0
- package/components/index.js.map +1 -1
- package/configuration.js +2 -1
- package/configuration.js.map +1 -1
- package/demo/data/bar.d.ts +174 -0
- package/demo/data/bar.js +188 -2
- package/demo/data/bar.js.map +1 -1
- package/demo/data/bubble.d.ts +41 -0
- package/demo/data/bubble.js +43 -0
- package/demo/data/bubble.js.map +1 -1
- package/demo/data/bundle.js +1 -1
- package/demo/data/donut.d.ts +23 -0
- package/demo/data/donut.js +25 -0
- package/demo/data/donut.js.map +1 -1
- package/demo/data/index.js +177 -0
- package/demo/data/index.js.map +1 -1
- package/demo/data/line.d.ts +70 -0
- package/demo/data/line.js +73 -0
- package/demo/data/line.js.map +1 -1
- package/demo/data/pie.d.ts +13 -0
- package/demo/data/pie.js +15 -0
- package/demo/data/pie.js.map +1 -1
- package/demo/data/scatter.d.ts +31 -0
- package/demo/data/scatter.js +33 -0
- package/demo/data/scatter.js.map +1 -1
- package/demo/data/step.d.ts +4 -0
- package/demo/data/step.js +15 -0
- package/demo/data/step.js.map +1 -1
- package/demo/data/time-series-axis.d.ts +55 -3
- package/demo/data/time-series-axis.js +61 -3
- package/demo/data/time-series-axis.js.map +1 -1
- package/demo/styles.css +292 -0
- package/demo/styles.css.map +1 -1
- package/demo/styles.min.css +1 -1
- package/demo/styles.min.css.map +1 -1
- package/demo/tsconfig.tsbuildinfo +248 -245
- package/interfaces/axis-scales.d.ts +11 -0
- package/interfaces/axis-scales.js.map +1 -1
- package/interfaces/charts.d.ts +4 -0
- package/interfaces/charts.js.map +1 -1
- package/interfaces/components.d.ts +21 -0
- package/interfaces/components.js.map +1 -1
- package/interfaces/enums.d.ts +9 -0
- package/interfaces/enums.js +10 -0
- package/interfaces/enums.js.map +1 -1
- package/interfaces/events.d.ts +7 -0
- package/interfaces/events.js +8 -0
- package/interfaces/events.js.map +1 -1
- package/model.d.ts +1 -0
- package/model.js +3 -0
- package/model.js.map +1 -1
- package/package.json +1 -1
- package/services/scales-cartesian.d.ts +9 -1
- package/services/scales-cartesian.js +33 -0
- package/services/scales-cartesian.js.map +1 -1
- package/services/time-series.js +8 -7
- package/services/time-series.js.map +1 -1
- package/styles/components/_skeleton.scss +57 -0
- package/styles/components/_threshold.scss +49 -0
- package/styles/components/index.scss +2 -0
- package/styles/graphs/_scatter.scss +4 -0
- package/styles-g10.css +76 -0
- package/styles-g10.css.map +1 -1
- package/styles-g10.min.css +1 -1
- package/styles-g10.min.css.map +1 -1
- package/styles-g100.css +76 -0
- package/styles-g100.css.map +1 -1
- package/styles-g100.min.css +1 -1
- package/styles-g100.min.css.map +1 -1
- package/styles-g90.css +76 -0
- package/styles-g90.css.map +1 -1
- package/styles-g90.min.css +1 -1
- package/styles-g90.min.css.map +1 -1
- package/styles.css +76 -0
- package/styles.css.map +1 -1
- package/styles.min.css +1 -1
- package/styles.min.css.map +1 -1
- package/tools.js +6 -0
- package/tools.js.map +1 -1
- package/tsconfig.tsbuildinfo +145 -82
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,s,u,c,l,h,f=function(t,e){return(f=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 d(t,e){function n(){this.constructor=t}f(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function p(){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.RENDER_FINISHED="render-finished",t.RESIZE="chart-resize"}(n||(n={})),function(t){t.UPDATE="model-update"}(r||(r={})),function(t){t.LABEL_MOUSEOVER="axis-label-mouseover",t.LABEL_MOUSEMOVE="axis-label-mousemove",t.LABEL_CLICK="axis-label-click",t.LABEL_MOUSEOUT="axis-label-mouseout"}(i||(i={})),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"}(o||(o={})),function(t){t.BAR_MOUSEOVER="bar-mouseover",t.BAR_MOUSEMOVE="bar-mousemove",t.BAR_CLICK="bar-click",t.BAR_MOUSEOUT="bar-mouseout"}(a||(a={})),function(t){t.SCATTER_MOUSEOVER="scatter-mouseover",t.SCATTER_MOUSEMOVE="scatter-mousemove",t.SCATTER_CLICK="scatter-click",t.SCATTER_MOUSEOUT="scatter-mouseout"}(s||(s={})),function(t){t.POINT_MOUSEOVER="scatter-mouseover",t.POINT_MOUSEMOVE="scatter-mousemove",t.POINT_CLICK="scatter-click",t.POINT_MOUSEOUT="scatter-mouseout"}(u||(u={})),function(t){t.X_AXIS_MOUSEOVER="radar-x-axis-mouseover",t.X_AXIS_MOUSEMOVE="radar-x-axis-mousemove",t.X_AXIS_CLICK="radar-x-axis-click",t.X_AXIS_MOUSEOUT="radar-x-axis-mouseout"}(c||(c={})),function(t){t.SHOW="show-tooltip",t.HIDE="hide-tooltip"}(l||(l={})),function(t){t.ITEM_HOVER="legend-item-onhover",t.ITEM_CLICK="legend-item-onclick",t.ITEM_MOUSEOUT="legend-item-onmouseout",t.ITEMS_UPDATE="legend-items-update"}(h||(h={}));var g,v,m,y,_,b,x,w,T,E,O,M,S,A=Object.freeze({__proto__:null,get Chart(){return n},get Model(){return r},get Axis(){return i},get Pie(){return o},get Bar(){return a},get Scatter(){return s},get Line(){return u},get Radar(){return c},get Tooltip(){return l},get Legend(){return h}});!function(t){t.DEFAULT="default",t.G100="g100",t.G90="g90",t.G10="g10"}(g||(g={})),function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(v||(v={})),function(t){t.VERTICAL="vertical",t.HORIZONTAL="horizontal"}(m||(m={})),function(t){t.TIME="time",t.LINEAR="linear",t.LOG="log",t.LABELS="labels"}(y||(y={})),function(t){t.MOUSE="mouse",t.TOP="top",t.BOTTOM="bottom"}(_||(_={})),function(t){t.DATAPOINT="datapoint",t.GRIDLINE="gridline",t.TITLE="title"}(b||(b={})),function(t){t.RIGHT="right",t.LEFT="left",t.TOP="top",t.BOTTOM="bottom"}(x||(x={})),function(t){t.HORIZONTAL="horizontal",t.VERTICAL="vertical"}(w||(w={})),function(t){t.ROW="row",t.COLUMN="column",t.ROW_REVERSE="row-reverse",t.COLUMN_REVERSE="column-reverse"}(T||(T={})),function(t){t.FIXED="fixed",t.PREFERRED="preferred",t.STRETCH="stretch"}(E||(E={})),function(t){t.LEFT="left",t.RIGHT="right"}(O||(O={})),function(t){t.START="start",t.MIDDLE="middle",t.END="end"}(M||(M={})),function(t){t.BASELINE="baseline",t.MIDDLE="middle",t.HANGING="hanging"}(S||(S={}));var C=Object.freeze({__proto__:null,get Roles(){return e},Events:A,get ChartTheme(){return g},get AxisPositions(){return v},get CartesianOrientations(){return m},get ScaleTypes(){return y},get TooltipPosition(){return _},get TooltipTypes(){return b},get LegendPositions(){return x},get LegendOrientations(){return w},get LayoutDirection(){return T},get LayoutGrowth(){return E},get CalloutDirections(){return O},get TextAnchor(){return M},get DominantBaseline(){return S}}),P="object"==typeof global&&global&&global.Object===Object&&global,D="object"==typeof self&&self&&self.Object===Object&&self,k=P||D||Function("return this")(),L=k.Symbol,R=Object.prototype,I=R.hasOwnProperty,j=R.toString,N=L?L.toStringTag:void 0;var U=Object.prototype.toString;var H=L?L.toStringTag:void 0;function F(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":H&&H in Object(t)?function(t){var e=I.call(t,N),n=t[N];try{t[N]=void 0;var r=!0}catch(t){}var i=j.call(t);return r&&(e?t[N]=n:delete t[N]),i}(t):function(t){return U.call(t)}(t)}function B(t){return null!=t&&"object"==typeof t}function V(t){return"symbol"==typeof t||B(t)&&"[object Symbol]"==F(t)}function G(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}var z=Array.isArray,W=L?L.prototype:void 0,Y=W?W.toString:void 0;function q(t){if("string"==typeof t)return t;if(z(t))return G(t,q)+"";if(V(t))return Y?Y.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function X(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var $=/^\s+|\s+$/g,Z=/^[-+]0x[0-9a-f]+$/i,Q=/^0b[01]+$/i,K=/^0o[0-7]+$/i,J=parseInt;function tt(t){if("number"==typeof t)return t;if(V(t))return NaN;if(X(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=X(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace($,"");var n=Q.test(t);return n||K.test(t)?J(t.slice(2),n?2:8):Z.test(t)?NaN:+t}function et(t){return t}function nt(t){if(!X(t))return!1;var e=F(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var rt,it=k["__core-js_shared__"],ot=(rt=/[^.]+$/.exec(it&&it.keys&&it.keys.IE_PROTO||""))?"Symbol(src)_1."+rt:"";var at=Function.prototype.toString;function st(t){if(null!=t){try{return at.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var ut=/^\[object .+?Constructor\]$/,ct=Function.prototype,lt=Object.prototype,ht=ct.toString,ft=lt.hasOwnProperty,dt=RegExp("^"+ht.call(ft).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function pt(t){return!(!X(t)||(e=t,ot&&ot in e))&&(nt(t)?dt:ut).test(st(t));var e}function gt(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return pt(n)?n:void 0}var vt=gt(k,"WeakMap"),mt=Object.create,yt=function(){function t(){}return function(e){if(!X(e))return{};if(mt)return mt(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function _t(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 bt(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var xt=Date.now;var wt=function(){try{var t=gt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),Tt=function(t){var e=0,n=0;return function(){var r=xt(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(wt?function(t,e){return wt(t,"toString",{configurable:!0,enumerable:!1,value:(n=e,function(){return n}),writable:!0});var n}:et);function Et(t){return t!=t}function Ot(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,Et,n)}(t,e,0)>-1}var Mt=/^(?:0|[1-9]\d*)$/;function St(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&Mt.test(t))&&t>-1&&t%1==0&&t<e}function At(t,e,n){"__proto__"==e&&wt?wt(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Ct(t,e){return t===e||t!=t&&e!=e}var Pt=Object.prototype.hasOwnProperty;function Dt(t,e,n){var r=t[e];Pt.call(t,e)&&Ct(r,n)&&(void 0!==n||e in t)||At(t,e,n)}function kt(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?At(n,s,u):Dt(n,s,u)}return n}var Lt=Math.max;function Rt(t,e){return Tt(function(t,e,n){return e=Lt(void 0===e?t.length-1:e,0),function(){for(var r=arguments,i=-1,o=Lt(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),_t(t,this,s)}}(t,e,et),t+"")}function It(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function jt(t){return null!=t&&It(t.length)&&!nt(t)}var Nt=Object.prototype;function Ut(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Nt)}function Ht(t){return B(t)&&"[object Arguments]"==F(t)}var Ft=Object.prototype,Bt=Ft.hasOwnProperty,Vt=Ft.propertyIsEnumerable,Gt=Ht(function(){return arguments}())?Ht:function(t){return B(t)&&Bt.call(t,"callee")&&!Vt.call(t,"callee")};var zt="object"==typeof t&&t&&!t.nodeType&&t,Wt=zt&&"object"==typeof module&&module&&!module.nodeType&&module,Yt=Wt&&Wt.exports===zt?k.Buffer:void 0,qt=(Yt?Yt.isBuffer:void 0)||function(){return!1},Xt={};function $t(t){return function(e){return t(e)}}Xt["[object Float32Array]"]=Xt["[object Float64Array]"]=Xt["[object Int8Array]"]=Xt["[object Int16Array]"]=Xt["[object Int32Array]"]=Xt["[object Uint8Array]"]=Xt["[object Uint8ClampedArray]"]=Xt["[object Uint16Array]"]=Xt["[object Uint32Array]"]=!0,Xt["[object Arguments]"]=Xt["[object Array]"]=Xt["[object ArrayBuffer]"]=Xt["[object Boolean]"]=Xt["[object DataView]"]=Xt["[object Date]"]=Xt["[object Error]"]=Xt["[object Function]"]=Xt["[object Map]"]=Xt["[object Number]"]=Xt["[object Object]"]=Xt["[object RegExp]"]=Xt["[object Set]"]=Xt["[object String]"]=Xt["[object WeakMap]"]=!1;var Zt="object"==typeof t&&t&&!t.nodeType&&t,Qt=Zt&&"object"==typeof module&&module&&!module.nodeType&&module,Kt=Qt&&Qt.exports===Zt&&P.process,Jt=function(){try{var t=Qt&&Qt.require&&Qt.require("util").types;return t||Kt&&Kt.binding&&Kt.binding("util")}catch(t){}}(),te=Jt&&Jt.isTypedArray,ee=te?$t(te):function(t){return B(t)&&It(t.length)&&!!Xt[F(t)]},ne=Object.prototype.hasOwnProperty;function re(t,e){var n=z(t),r=!n&&Gt(t),i=!n&&!r&&qt(t),o=!n&&!r&&!i&&ee(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 c in t)!e&&!ne.call(t,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||St(c,u))||s.push(c);return s}function ie(t,e){return function(n){return t(e(n))}}var oe=ie(Object.keys,Object),ae=Object.prototype.hasOwnProperty;function se(t){return jt(t)?re(t):function(t){if(!Ut(t))return oe(t);var e=[];for(var n in Object(t))ae.call(t,n)&&"constructor"!=n&&e.push(n);return e}(t)}var ue=Object.prototype.hasOwnProperty;function ce(t){if(!X(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=Ut(t),n=[];for(var r in t)("constructor"!=r||!e&&ue.call(t,r))&&n.push(r);return n}function le(t){return jt(t)?re(t,!0):ce(t)}var he=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,fe=/^\w*$/;function de(t,e){if(z(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!V(t))||(fe.test(t)||!he.test(t)||null!=e&&t in Object(e))}var pe=gt(Object,"create");var ge=Object.prototype.hasOwnProperty;var ve=Object.prototype.hasOwnProperty;function me(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 ye(t,e){for(var n=t.length;n--;)if(Ct(t[n][0],e))return n;return-1}me.prototype.clear=function(){this.__data__=pe?pe(null):{},this.size=0},me.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},me.prototype.get=function(t){var e=this.__data__;if(pe){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return ge.call(e,t)?e[t]:void 0},me.prototype.has=function(t){var e=this.__data__;return pe?void 0!==e[t]:ve.call(e,t)},me.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=pe&&void 0===e?"__lodash_hash_undefined__":e,this};var _e=Array.prototype.splice;function be(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])}}be.prototype.clear=function(){this.__data__=[],this.size=0},be.prototype.delete=function(t){var e=this.__data__,n=ye(e,t);return!(n<0)&&(n==e.length-1?e.pop():_e.call(e,n,1),--this.size,!0)},be.prototype.get=function(t){var e=this.__data__,n=ye(e,t);return n<0?void 0:e[n][1]},be.prototype.has=function(t){return ye(this.__data__,t)>-1},be.prototype.set=function(t,e){var n=this.__data__,r=ye(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var xe=gt(k,"Map");function we(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 Te(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])}}Te.prototype.clear=function(){this.size=0,this.__data__={hash:new me,map:new(xe||be),string:new me}},Te.prototype.delete=function(t){var e=we(this,t).delete(t);return this.size-=e?1:0,e},Te.prototype.get=function(t){return we(this,t).get(t)},Te.prototype.has=function(t){return we(this,t).has(t)},Te.prototype.set=function(t,e){var n=we(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function Ee(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Ee.Cache||Te),n}Ee.Cache=Te;var Oe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Me=/\\(\\)?/g,Se=function(t){var e=Ee(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Oe,(function(t,n,r,i){e.push(r?i.replace(Me,"$1"):n||t)})),e}));function Ae(t){return null==t?"":q(t)}function Ce(t,e){return z(t)?t:de(t,e)?[t]:Se(Ae(t))}function Pe(t){if("string"==typeof t||V(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function De(t,e){for(var n=0,r=(e=Ce(e,t)).length;null!=t&&n<r;)t=t[Pe(e[n++])];return n&&n==r?t:void 0}function ke(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var Le=L?L.isConcatSpreadable:void 0;function Re(t){return z(t)||Gt(t)||!!(Le&&t&&t[Le])}var Ie=ie(Object.getPrototypeOf,Object),je=Function.prototype,Ne=Object.prototype,Ue=je.toString,He=Ne.hasOwnProperty,Fe=Ue.call(Object);var Be=function(t){return function(e){return null==t?void 0:t[e]}}({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Ve=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ge=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var ze=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var We=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var Ye="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",qe="["+Ye+"]",Xe="\\d+",$e="[\\u2700-\\u27bf]",Ze="[a-z\\xdf-\\xf6\\xf8-\\xff]",Qe="[^\\ud800-\\udfff"+Ye+Xe+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",Ke="(?:\\ud83c[\\udde6-\\uddff]){2}",Je="[\\ud800-\\udbff][\\udc00-\\udfff]",tn="[A-Z\\xc0-\\xd6\\xd8-\\xde]",en="(?:"+Ze+"|"+Qe+")",nn="(?:"+tn+"|"+Qe+")",rn="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",on="[\\ufe0e\\ufe0f]?"+rn+("(?:\\u200d(?:"+["[^\\ud800-\\udfff]",Ke,Je].join("|")+")[\\ufe0e\\ufe0f]?"+rn+")*"),an="(?:"+[$e,Ke,Je].join("|")+")"+on,sn=RegExp([tn+"?"+Ze+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[qe,tn,"$"].join("|")+")",nn+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[qe,tn+en,"$"].join("|")+")",tn+"?"+en+"+(?:['’](?:d|ll|m|re|s|t|ve))?",tn+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Xe,an].join("|"),"g");function un(t,e,n){return t=Ae(t),void 0===(e=n?void 0:e)?function(t){return We.test(t)}(t)?function(t){return t.match(sn)||[]}(t):function(t){return t.match(ze)||[]}(t):t.match(e)||[]}var cn=RegExp("['’]","g");function ln(t,e,n){return void 0===n&&(n=e,e=void 0),void 0!==n&&(n=(n=tt(n))==n?n:0),void 0!==e&&(e=(e=tt(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}(tt(t),e,n)}function hn(t){var e=this.__data__=new be(t);this.size=e.size}hn.prototype.clear=function(){this.__data__=new be,this.size=0},hn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},hn.prototype.get=function(t){return this.__data__.get(t)},hn.prototype.has=function(t){return this.__data__.has(t)},hn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof be){var r=n.__data__;if(!xe||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Te(r)}return n.set(t,e),this.size=n.size,this};var fn="object"==typeof t&&t&&!t.nodeType&&t,dn=fn&&"object"==typeof module&&module&&!module.nodeType&&module,pn=dn&&dn.exports===fn?k.Buffer:void 0,gn=pn?pn.allocUnsafe:void 0;function vn(t,e){if(e)return t.slice();var n=t.length,r=gn?gn(n):new t.constructor(n);return t.copy(r),r}function mn(){return[]}var yn=Object.prototype.propertyIsEnumerable,_n=Object.getOwnPropertySymbols,bn=_n?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}(_n(t),(function(e){return yn.call(t,e)})))}:mn;var xn=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)ke(e,bn(t)),t=Ie(t);return e}:mn;function wn(t,e,n){var r=e(t);return z(t)?r:ke(r,n(t))}function Tn(t){return wn(t,se,bn)}function En(t){return wn(t,le,xn)}var On=gt(k,"DataView"),Mn=gt(k,"Promise"),Sn=gt(k,"Set"),An=st(On),Cn=st(xe),Pn=st(Mn),Dn=st(Sn),kn=st(vt),Ln=F;(On&&"[object DataView]"!=Ln(new On(new ArrayBuffer(1)))||xe&&"[object Map]"!=Ln(new xe)||Mn&&"[object Promise]"!=Ln(Mn.resolve())||Sn&&"[object Set]"!=Ln(new Sn)||vt&&"[object WeakMap]"!=Ln(new vt))&&(Ln=function(t){var e=F(t),n="[object Object]"==e?t.constructor:void 0,r=n?st(n):"";if(r)switch(r){case An:return"[object DataView]";case Cn:return"[object Map]";case Pn:return"[object Promise]";case Dn:return"[object Set]";case kn:return"[object WeakMap]"}return e});var Rn=Ln,In=Object.prototype.hasOwnProperty;var jn=k.Uint8Array;function Nn(t){var e=new t.constructor(t.byteLength);return new jn(e).set(new jn(t)),e}var Un=/\w*$/;var Hn=L?L.prototype:void 0,Fn=Hn?Hn.valueOf:void 0;function Bn(t,e){var n=e?Nn(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Vn(t,e,n){var r,i,o,a=t.constructor;switch(e){case"[object ArrayBuffer]":return Nn(t);case"[object Boolean]":case"[object Date]":return new a(+t);case"[object DataView]":return function(t,e){var n=e?Nn(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 Bn(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,Un.exec(i))).lastIndex=i.lastIndex,o;case"[object Set]":return new a;case"[object Symbol]":return r=t,Fn?Object(Fn.call(r)):{}}}function Gn(t){return"function"!=typeof t.constructor||Ut(t)?{}:yt(Ie(t))}var zn=Jt&&Jt.isMap,Wn=zn?$t(zn):function(t){return B(t)&&"[object Map]"==Rn(t)};var Yn=Jt&&Jt.isSet,qn=Yn?$t(Yn):function(t){return B(t)&&"[object Set]"==Rn(t)},Xn={};function $n(t,e,n,r,i,o){var a,s=1&e,u=2&e,c=4&e;if(n&&(a=i?n(t,r,i,o):n(t)),void 0!==a)return a;if(!X(t))return t;var l=z(t);if(l){if(a=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&In.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!s)return bt(t,a)}else{var h=Rn(t),f="[object Function]"==h||"[object GeneratorFunction]"==h;if(qt(t))return vn(t,s);if("[object Object]"==h||"[object Arguments]"==h||f&&!i){if(a=u||f?{}:Gn(t),!s)return u?function(t,e){return kt(t,xn(t),e)}(t,function(t,e){return t&&kt(e,le(e),t)}(a,t)):function(t,e){return kt(t,bn(t),e)}(t,function(t,e){return t&&kt(e,se(e),t)}(a,t))}else{if(!Xn[h])return i?t:{};a=Vn(t,h,s)}}o||(o=new hn);var d=o.get(t);if(d)return d;o.set(t,a),qn(t)?t.forEach((function(r){a.add($n(r,e,n,r,t,o))})):Wn(t)&&t.forEach((function(r,i){a.set(i,$n(r,e,n,i,t,o))}));var p=c?u?En:Tn:u?keysIn:se,g=l?void 0:p(t);return function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););}(g||t,(function(r,i){g&&(r=t[i=r]),Dt(a,i,$n(r,e,n,i,t,o))})),a}Xn["[object Arguments]"]=Xn["[object Array]"]=Xn["[object ArrayBuffer]"]=Xn["[object DataView]"]=Xn["[object Boolean]"]=Xn["[object Date]"]=Xn["[object Float32Array]"]=Xn["[object Float64Array]"]=Xn["[object Int8Array]"]=Xn["[object Int16Array]"]=Xn["[object Int32Array]"]=Xn["[object Map]"]=Xn["[object Number]"]=Xn["[object Object]"]=Xn["[object RegExp]"]=Xn["[object Set]"]=Xn["[object String]"]=Xn["[object Symbol]"]=Xn["[object Uint8Array]"]=Xn["[object Uint8ClampedArray]"]=Xn["[object Uint16Array]"]=Xn["[object Uint32Array]"]=!0,Xn["[object Error]"]=Xn["[object Function]"]=Xn["[object WeakMap]"]=!1;function Zn(t){return $n(t,5)}function Qn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Te;++e<n;)this.add(t[e])}function Kn(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function Jn(t,e){return t.has(e)}Qn.prototype.add=Qn.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Qn.prototype.has=function(t){return this.__data__.has(t)};function tr(t,e,n,r,i,o){var a=1&n,s=t.length,u=e.length;if(s!=u&&!(a&&u>s))return!1;var c=o.get(t);if(c&&o.get(e))return c==e;var l=-1,h=!0,f=2&n?new Qn:void 0;for(o.set(t,e),o.set(e,t);++l<s;){var d=t[l],p=e[l];if(r)var g=a?r(p,d,l,e,t,o):r(d,p,l,t,e,o);if(void 0!==g){if(g)continue;h=!1;break}if(f){if(!Kn(e,(function(t,e){if(!Jn(f,e)&&(d===t||i(d,t,n,r,o)))return f.push(e)}))){h=!1;break}}else if(d!==p&&!i(d,p,n,r,o)){h=!1;break}}return o.delete(t),o.delete(e),h}function er(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function nr(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}var rr=L?L.prototype:void 0,ir=rr?rr.valueOf:void 0;var or=Object.prototype.hasOwnProperty;var ar=Object.prototype.hasOwnProperty;function sr(t,e,n,r,i,o){var a=z(t),s=z(e),u=a?"[object Array]":Rn(t),c=s?"[object Array]":Rn(e),l="[object Object]"==(u="[object Arguments]"==u?"[object Object]":u),h="[object Object]"==(c="[object Arguments]"==c?"[object Object]":c),f=u==c;if(f&&qt(t)){if(!qt(e))return!1;a=!0,l=!1}if(f&&!l)return o||(o=new hn),a||ee(t)?tr(t,e,n,r,i,o):function(t,e,n,r,i,o,a){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!o(new jn(t),new jn(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Ct(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var s=er;case"[object Set]":var u=1&r;if(s||(s=nr),t.size!=e.size&&!u)return!1;var c=a.get(t);if(c)return c==e;r|=2,a.set(t,e);var l=tr(s(t),s(e),r,i,o,a);return a.delete(t),l;case"[object Symbol]":if(ir)return ir.call(t)==ir.call(e)}return!1}(t,e,u,n,r,i,o);if(!(1&n)){var d=l&&ar.call(t,"__wrapped__"),p=h&&ar.call(e,"__wrapped__");if(d||p){var g=d?t.value():t,v=p?e.value():e;return o||(o=new hn),i(g,v,n,r,o)}}return!!f&&(o||(o=new hn),function(t,e,n,r,i,o){var a=1&n,s=Tn(t),u=s.length;if(u!=Tn(e).length&&!a)return!1;for(var c=u;c--;){var l=s[c];if(!(a?l in e:or.call(e,l)))return!1}var h=o.get(t);if(h&&o.get(e))return h==e;var f=!0;o.set(t,e),o.set(e,t);for(var d=a;++c<u;){var p=t[l=s[c]],g=e[l];if(r)var v=a?r(g,p,l,e,t,o):r(p,g,l,t,e,o);if(!(void 0===v?p===g||i(p,g,n,r,o):v)){f=!1;break}d||(d="constructor"==l)}if(f&&!d){var m=t.constructor,y=e.constructor;m!=y&&"constructor"in t&&"constructor"in e&&!("function"==typeof m&&m instanceof m&&"function"==typeof y&&y instanceof y)&&(f=!1)}return o.delete(t),o.delete(e),f}(t,e,n,r,i,o))}function ur(t,e,n,r,i){return t===e||(null==t||null==e||!B(t)&&!B(e)?t!=t&&e!=e:sr(t,e,n,r,ur,i))}function cr(t){return t==t&&!X(t)}function lr(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}}function hr(t){var e=function(t){for(var e=se(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,cr(i)]}return e}(t);return 1==e.length&&e[0][2]?lr(e[0][0],e[0][1]):function(n){return n===t||function(t,e,n,r){var i=n.length,o=i,a=!r;if(null==t)return!o;for(t=Object(t);i--;){var s=n[i];if(a&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++i<o;){var u=(s=n[i])[0],c=t[u],l=s[1];if(a&&s[2]){if(void 0===c&&!(u in t))return!1}else{var h=new hn;if(r)var f=r(c,l,u,t,e,h);if(!(void 0===f?ur(l,c,3,r,h):f))return!1}}return!0}(n,t,e)}}function fr(t,e){return null!=t&&e in Object(t)}function dr(t,e){return null!=t&&function(t,e,n){for(var r=-1,i=(e=Ce(e,t)).length,o=!1;++r<i;){var a=Pe(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&It(i)&&St(a,i)&&(z(t)||Gt(t))}(t,e,fr)}function pr(t,e){return de(t)&&cr(e)?lr(Pe(t),e):function(n){var r=function(t,e,n){var r=null==t?void 0:De(t,e);return void 0===r?n:r}(n,t);return void 0===r&&r===e?dr(n,t):ur(e,r,3)}}function gr(t){return de(t)?(e=Pe(t),function(t){return null==t?void 0:t[e]}):function(t){return function(e){return De(e,t)}}(t);var e}var vr,mr=function(t,e,n){for(var r=-1,i=Object(t),o=n(t),a=o.length;a--;){var s=o[vr?a:++r];if(!1===e(i[s],s,i))break}return t};var yr=function(t,e){return function(n,r){if(null==n)return n;if(!jt(n))return t(n,r);for(var i=n.length,o=e?i:-1,a=Object(n);(e?o--:++o<i)&&!1!==r(a[o],o,a););return n}}((function(t,e){return t&&mr(t,e,se)})),_r=function(){return k.Date.now()},br=Math.max,xr=Math.min;function wr(t,e,n){var r,i,o,a,s,u,c=0,l=!1,h=!1,f=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function d(e){var n=r,o=i;return r=i=void 0,c=e,a=t.apply(o,n)}function p(t){return c=t,s=setTimeout(v,e),l?d(t):a}function g(t){var n=t-u;return void 0===u||n>=e||n<0||h&&t-c>=o}function v(){var t=_r();if(g(t))return m(t);s=setTimeout(v,function(t){var n=e-(t-u);return h?xr(n,o-(t-c)):n}(t))}function m(t){return s=void 0,f&&r?d(t):(r=i=void 0,a)}function y(){var t=_r(),n=g(t);if(r=arguments,i=this,u=t,n){if(void 0===s)return p(u);if(h)return clearTimeout(s),s=setTimeout(v,e),d(u)}return void 0===s&&(s=setTimeout(v,e)),a}return e=tt(e)||0,X(n)&&(l=!!n.leading,o=(h="maxWait"in n)?br(tt(n.maxWait)||0,e):o,f="trailing"in n?!!n.trailing:f),y.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=u=i=s=void 0},y.flush=function(){return void 0===s?a:m(_r())},y}function Tr(t,e,n){(void 0===n||Ct(t[e],n))&&(void 0!==n||e in t)||At(t,e,n)}function Er(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}function Or(t,e,n,r,i,o,a){var s=Er(t,n),u=Er(e,n),c=a.get(u);if(c)Tr(t,n,c);else{var l,h=o?o(s,u,n+"",t,e,a):void 0,f=void 0===h;if(f){var d=z(u),p=!d&&qt(u),g=!d&&!p&&ee(u);h=u,d||p||g?z(s)?h=s:B(l=s)&&jt(l)?h=bt(s):p?(f=!1,h=vn(u,!0)):g?(f=!1,h=Bn(u,!0)):h=[]:function(t){if(!B(t)||"[object Object]"!=F(t))return!1;var e=Ie(t);if(null===e)return!0;var n=He.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Ue.call(n)==Fe}(u)||Gt(u)?(h=s,Gt(s)?h=function(t){return kt(t,le(t))}(s):X(s)&&!nt(s)||(h=Gn(u))):f=!1}f&&(a.set(u,h),i(h,u,r,o,a),a.delete(u)),Tr(t,n,h)}}function Mr(t,e,n,r,i){t!==e&&mr(e,(function(o,a){if(i||(i=new hn),X(o))Or(t,e,a,n,Mr,r,i);else{var s=r?r(Er(t,a),o,a+"",t,e,i):void 0;void 0===s&&(s=o),Tr(t,a,s)}}),le)}function Sr(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function Ar(t,e){var n=-1,r=jt(t)?Array(t.length):[];return yr(t,(function(t,i,o){r[++n]=e(t,i,o)})),r}function Cr(t,e){var n;return(z(t)?G:Ar)(t,"function"==typeof(n=e)?n:null==n?et:"object"==typeof n?z(n)?pr(n[0],n[1]):hr(n):gr(n))}function Pr(t,e){return function t(e,n,r,i,o){var a=-1,s=e.length;for(r||(r=Re),o||(o=[]);++a<s;){var u=e[a];n>0&&r(u)?n>1?t(u,n-1,r,i,o):ke(o,u):i||(o[o.length]=u)}return o}(Cr(t,e),1/0)}function Dr(t,e){return ur(t,e)}var kr,Lr,Rr,Ir=(kr=function(t,e,n){return t+(n?"-":"")+e.toLowerCase()},function(t){return function(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}(un(function(t){return(t=Ae(t))&&t.replace(Ve,Be).replace(Ge,"")}(t).replace(cn,"")),kr,"")}),jr=(Lr=function(t,e,n){Mr(t,e,n)},Rt((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=Lr.length>3&&"function"==typeof i?(r--,i):void 0,o&&function(t,e,n){if(!X(n))return!1;var r=typeof e;return!!("number"==r?jt(n)&&St(e,n.length):"string"==r&&e in n)&&Ct(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&&Lr(t,a,n,i)}return t}))),Nr=Sn&&1/nr(new Sn([,-0]))[1]==1/0?function(t){return new Sn(t)}:function(){};function Ur(t){return t&&t.length?function(t,e,n){var r=-1,i=Ot,o=t.length,a=!0,s=[],u=s;if(n)a=!1,i=Sr;else if(o>=200){var c=e?null:Nr(t);if(c)return nr(c);a=!1,i=Jn,u=new Qn}else u=e?[]:s;t:for(;++r<o;){var l=t[r],h=e?e(l):l;if(l=n||0!==l?l:0,a&&h==h){for(var f=u.length;f--;)if(u[f]===h)continue t;e&&u.push(h),s.push(l)}else i(u,h,n)||(u!==s&&u.push(h),s.push(l))}return s}(t):[]}function Hr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Fr(t,e){return t(e={exports:{}},e.exports),e.exports}!function(t){t.debounce=wr,t.clone=Zn,t.merge=jr,t.removeArrayDuplicates=Ur,t.clamp=ln,t.isEqual=Dr,t.flatMapDeep=Pr,t.kebabCase=Ir,t.mergeDefaultChartOptions=function(e,n){e=t.clone(e);var r=Object.keys(n.axes||{});for(var i in 0===r.length&&delete e.axes,e.axes)if(r.includes(i)){var o=n.axes[i];(o.primary||o.secondary)&&console.warn("`primary` & `secondary` are no longer needed for axis configurations. Read more here https://carbon-design-system.github.io/carbon-charts/?path=/story/tutorials--tabular-data-format");var a=o.mapsTo;if(null==a){var s=o.scaleType;null==s?o.mapsTo="value":s===y.TIME?o.mapsTo="date":s===y.LABELS&&(o.mapsTo="key")}}else delete e.axes[i];return t.merge(e,n)},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.formatWidthHeightValues=function(t){var e=t.toString();return e.match(/[a-z]/i)?e:e+"px"},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!=0?parseFloat(n.toFixed(1)):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===m.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},t.flipDomainAndRangeBasedOnOrientation=function(t,e,n){return n===m.VERTICAL?[t,e]:[e,t]}}(Rr||(Rr={}));var Br=Fr((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,r){var i;r=r||{},i="string"==typeof n[t]?n[t]:1===e?n[t].one:n[t].other.replace("{{count}}",e);if(r.addSuffix)return r.comparison>0?"in "+i:i+" ago";return i};var n={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};t.exports=e.default}));Hr(Br);var Vr=Fr((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e){var n=e||{},r=n.width?String(n.width):t.defaultWidth;return t.formats[r]||t.formats[t.defaultWidth]}},t.exports=e.default}));Hr(Vr);var Gr=Fr((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,r=(n=Vr)&&n.__esModule?n:{default:n};var i={date:(0,r.default)({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:(0,r.default)({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:(0,r.default)({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})};e.default=i,t.exports=e.default}));Hr(Gr);var zr=Fr((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,r,i){return n[t]};var n={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};t.exports=e.default}));Hr(zr);var Wr=Fr((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e,n){var r,i=n||{};if("formatting"===(i.context?String(i.context):"standalone")&&t.formattingValues){var o=t.defaultFormattingWidth||t.defaultWidth,a=i.width?String(i.width):o;r=t.formattingValues[a]||t.formattingValues[o]}else{var s=t.defaultWidth,u=i.width?String(i.width):t.defaultWidth;r=t.values[u]||t.values[s]}return r[t.argumentCallback?t.argumentCallback(e):e]}},t.exports=e.default}));Hr(Wr);var Yr=Fr((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,r=(n=Wr)&&n.__esModule?n:{default:n};var i={ordinalNumber:function(t,e){var n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:(0,r.default)({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:(0,r.default)({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return Number(t)-1}}),month:(0,r.default)({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:(0,r.default)({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:(0,r.default)({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};e.default=i,t.exports=e.default}));Hr(Yr);var qr=Fr((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e,n){var r=String(e),i=n||{},o=r.match(t.matchPattern);if(!o)return null;var a=o[0],s=r.match(t.parsePattern);if(!s)return null;var u=t.valueCallback?t.valueCallback(s[0]):s[0];return{value:u=i.valueCallback?i.valueCallback(u):u,rest:r.slice(a.length)}}},t.exports=e.default}));Hr(qr);var Xr=Fr((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e,n){var r=String(e),i=n||{},o=i.width,a=o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth],s=r.match(a);if(!s)return null;var u,c=s[0],l=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth];return u="[object Array]"===Object.prototype.toString.call(l)?function(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return n}(l,(function(t){return t.test(r)})):function(t,e){for(var n in t)if(t.hasOwnProperty(n)&&e(t[n]))return n}(l,(function(t){return t.test(r)})),u=t.valueCallback?t.valueCallback(u):u,{value:u=i.valueCallback?i.valueCallback(u):u,rest:r.slice(c.length)}}},t.exports=e.default}));Hr(Xr);var $r=Fr((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i(qr),r=i(Xr);function i(t){return t&&t.__esModule?t:{default:t}}var o={ordinalNumber:(0,n.default)({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}}),era:(0,r.default)({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:(0,r.default)({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:(0,r.default)({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:(0,r.default)({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:(0,r.default)({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};e.default=o,t.exports=e.default}));Hr($r);var Zr=Hr(Fr((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=s(Br),r=s(Gr),i=s(zr),o=s(Yr),a=s($r);function s(t){return t&&t.__esModule?t:{default:t}}var u={code:"en-US",formatDistance:n.default,formatLong:r.default,formatRelative:i.default,localize:o.default,match:a.default,options:{weekStartsOn:0,firstWeekContainsDate:1}};e.default=u,t.exports=e.default}))),Qr={position:x.BOTTOM,clickable:!0,enabled:!0,items:{status:{ACTIVE:1,DISABLED:0},horizontalSpace:12,verticalSpace:24,textYOffset:8},checkbox:{radius:6.5,spaceAfter:4}},Kr={x:{numberOfTicks:5},y:{numberOfTicks:5}},Jr={datapoint:{horizontalOffset:10,enabled:!0},title:{verticalOffset:.75,width:.4}},ti=Rr.merge({},Jr,{gridline:{enabled:!0,threshold:.02}}),ei=Rr.merge({},ti,{datapoint:{verticalOffset:4},gridline:{enabled:!1}}),ni={addSpaceOnEdges:1,showDayName:!1,localeObject:Zr,timeIntervalFormats:{"15seconds":{primary:"MMM d, pp",secondary:"pp"},minute:{primary:"MMM d, p",secondary:"p"},"30minutes":{primary:"MMM d, p",secondary:"p"},hourly:{primary:"MMM d, hh a",secondary:"hh a"},daily:{primary:"MMM d",secondary:"d"},weekly:{primary:"eee, MMM d",secondary:"eee"},monthly:{primary:"MMM yyyy",secondary:"MMM"},quarterly:{primary:"QQQ ''yy",secondary:"QQQ"},yearly:{primary:"yyyy",secondary:"yyyy"}}},ri={width:null,height:null,resizable:!0,tooltip:Jr,legend:Qr,style:{prefix:"cc"},data:{groupMapsTo:"group"},color:{scale:null}},ii=Rr.merge({},ri,{axes:{top:{includeZero:!0},bottom:{includeZero:!0},left:{includeZero:!0},right:{includeZero:!0}},timeScale:ni,grid:Kr,tooltip:ti}),oi=Rr.merge({},ii,{bars:{maxWidth:16},timeScale:Rr.merge(ni,{addSpaceOnEdges:1}),tooltip:ei}),ai=Rr.merge({},oi,{}),si=Rr.merge({},oi,{}),ui=Rr.merge({},oi,{bars:Rr.merge({},oi.bars,{dividerSize:1.5})}),ci=Rr.merge({},ii,{points:{radius:3,filled:!1}}),li=Rr.merge({},ii,{points:{radius:4,fillOpacity:.3,filled:!0}}),hi=Rr.merge({},ii,{bubble:{radiusMapsTo:"radius",radiusRange:function(t,e){var n=Math.min(t.width,t.height);return[3*n/400,25*n/400]},fillOpacity:.2}}),fi=Rr.merge({},ri,{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}}}),di={chart:ri,axisChart:ii,simpleBarChart:ai,groupedBarChart:si,stackedBarChart:ui,bubbleChart:hi,lineChart:ci,scatterChart:li,pieChart:fi,donutChart:Rr.merge({},fi,{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()}}}}),radarChart:Rr.merge({},ri,{radar:{axes:{angle:"key",value:"value"},opacity:{unselected:.1,selected:.3},xLabelPadding:10,yLabelPadding:8,yTicksNumber:4,minRange:10,xAxisRectHeight:50,dotsRadius:5},tooltip:{gridline:{enabled:!0},valueFormatter:function(t){return null!=t?t:"N/A"}}})},pi={opacity:{unselected:.3,selected:1}},gi={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}},vi={ticks:{number:7,rotateIfSmallerThan:30},paddingRatio:.1},mi={default:{size:24}},yi=Object.freeze({__proto__:null,legend:Qr,grid:Kr,baseTooltip:Jr,axisChartTooltip:ti,barChartTooltip:ei,timeScale:ni,options:di,lines:pi,transitions:gi,axis:vi,spacers:mi,tickSpaceRatioVertical:2.5,tickSpaceRatioHorizontal:3.5}),_i={10:"#fff0f1",20:"#fcd0d3",30:"#ffa4a9",40:"#ff767c",50:"#fb4b53",60:"#da1e28",70:"#a51920",80:"#750e13",90:"#570408",100:"#2c080a"},bi={10:"#fff0f6",20:"#ffcfe1",30:"#ffa0c2",40:"#fa75a6",50:"#ee538b",60:"#d12765",70:"#a11950",80:"#760a3a",90:"#57002b",100:"#2a0a16"},xi={10:"#f7f1ff",20:"#e6d6ff",30:"#d0b0ff",40:"#bb8eff",50:"#a66efa",60:"#8a3ffc",70:"#6e32c9",80:"#4f2196",90:"#38146b",100:"#1e1033"},wi={10:"#edf4ff",20:"#c9deff",30:"#97c1ff",40:"#6ea6ff",50:"#408bfc",60:"#0062ff",70:"#054ada",80:"#0530ad",90:"#061f80",100:"#051243"},Ti={10:"#e3f6ff",20:"#b3e6ff",30:"#6ccaff",40:"#30b0ff",50:"#1191e6",60:"#0072c3",70:"#0058a1",80:"#003d73",90:"#002b50",100:"#07192b"},Ei={10:"#dbfbfb",20:"#92eeee",30:"#20d5d2",40:"#00bab6",50:"#009c98",60:"#007d79",70:"#006161",80:"#004548",90:"#003137",100:"#081a1c"},Oi={10:"#dafbe4",20:"#9deeb2",30:"#56d679",40:"#3dbb61",50:"#24a148",60:"#198038",70:"#10642a",80:"#054719",90:"#01330f",100:"#081b09"},Mi=function(t,e){return t[e]},Si=function(t){return Mi(wi,t)},Ai=function(t){return Mi(Ti,t)},Ci=function(t){return Mi(Oi,t)},Pi=function(t){return Mi(bi,t)},Di=function(t){return Mi(xi,t)},ki=function(t){return Mi(_i,t)},Li=function(t){return Mi(Ei,t)},Ri=[Di(70),Ai(50),Li(70),Pi(70),ki(50),ki(90),Ci(60),Si(80),Pi(50),"#b28600",Li(50),Ai(90),"#8a3800",Di(50)],Ii=[Di(60),Ai(40),Li(60),Pi(40),ki(50),ki(10),Ci(30),Si(50),Pi(60),"#d2a106",Li(40),Ai(20),"#ba4e00",Di(30)],ji=Ri,Ni=Ii,Ui=Ii,Hi=Ri,Fi=Object.freeze({__proto__:null,WHITE:Ri,DARK:Ii,G10:ji,G90:Ni,G100:Ui,DEFAULT:Hi});function Bi(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Vi(t){var e;return 1===t.length&&(e=t,t=function(t,n){return Bi(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 Gi=Vi(Bi).right;function zi(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 Wi(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 Yi=Math.sqrt(50),qi=Math.sqrt(10),Xi=Math.sqrt(2);function $i(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=Zi(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 Zi(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>=Yi?10:o>=qi?5:o>=Xi?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=Yi?10:o>=qi?5:o>=Xi?2:1)}function Qi(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>=Yi?i*=10:o>=qi?i*=5:o>=Xi&&(i*=2),e<t?-i:i}function Ki(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])&&n>r&&(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))&&n>r&&(r=n);return r}function Ji(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function to(){}function eo(t,e){var n=new to;if(t instanceof to)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 no(){}to.prototype=eo.prototype={constructor:to,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 ro=eo.prototype;no.prototype=function(t,e){var n=new no;if(t instanceof no)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:no,has:ro.has,add:function(t){return this["$"+(t+="")]=t,this},remove:ro.remove,clear:ro.clear,values:ro.keys,size:ro.size,empty:ro.empty,each:ro.each};var io=Array.prototype,oo=io.map,ao=io.slice,so={name:"implicit"};function uo(){var t=eo(),e=[],n=[],r=so;function i(i){var o=i+"",a=t.get(o);if(!a){if(r!==so)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=eo();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=ao.call(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return uo(e,n).unknown(r)},Ji.apply(i,arguments),i}function co(){var t,e,n=uo().unknown(void 0),r=n.domain,i=n.range,o=[0,1],a=!1,s=0,u=0,c=.5;function l(){var n=r().length,l=o[1]<o[0],h=o[l-0],f=o[1-l];t=(f-h)/Math.max(1,n-s+2*u),a&&(t=Math.floor(t)),h+=(f-h-t*(n-s))*c,e=t*(1-s),a&&(h=Math.round(h),e=Math.round(e));var d=Wi(n).map((function(e){return h+t*e}));return i(l?d.reverse():d)}return delete n.unknown,n.domain=function(t){return arguments.length?(r(t),l()):r()},n.range=function(t){return arguments.length?(o=[+t[0],+t[1]],l()):o.slice()},n.rangeRound=function(t){return o=[+t[0],+t[1]],a=!0,l()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(a=!!t,l()):a},n.padding=function(t){return arguments.length?(s=Math.min(1,u=+t),l()):s},n.paddingInner=function(t){return arguments.length?(s=Math.min(1,t),l()):s},n.paddingOuter=function(t){return arguments.length?(u=+t,l()):u},n.align=function(t){return arguments.length?(c=Math.max(0,Math.min(1,t)),l()):c},n.copy=function(){return co(r(),o).round(a).paddingInner(s).paddingOuter(u).align(c)},Ji.apply(l(),arguments)}function lo(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function ho(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function fo(){}var po="\\s*([+-]?\\d+)\\s*",go="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",vo="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",mo=/^#([0-9a-f]{3,8})$/,yo=new RegExp("^rgb\\("+[po,po,po]+"\\)$"),_o=new RegExp("^rgb\\("+[vo,vo,vo]+"\\)$"),bo=new RegExp("^rgba\\("+[po,po,po,go]+"\\)$"),xo=new RegExp("^rgba\\("+[vo,vo,vo,go]+"\\)$"),wo=new RegExp("^hsl\\("+[go,vo,vo]+"\\)$"),To=new RegExp("^hsla\\("+[go,vo,vo,go]+"\\)$"),Eo={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 Oo(){return this.rgb().formatHex()}function Mo(){return this.rgb().formatRgb()}function So(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=mo.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Ao(e):3===n?new ko(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?new ko(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?new ko(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=yo.exec(t))?new ko(e[1],e[2],e[3],1):(e=_o.exec(t))?new ko(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=bo.exec(t))?Co(e[1],e[2],e[3],e[4]):(e=xo.exec(t))?Co(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=wo.exec(t))?jo(e[1],e[2]/100,e[3]/100,1):(e=To.exec(t))?jo(e[1],e[2]/100,e[3]/100,e[4]):Eo.hasOwnProperty(t)?Ao(Eo[t]):"transparent"===t?new ko(NaN,NaN,NaN,0):null}function Ao(t){return new ko(t>>16&255,t>>8&255,255&t,1)}function Co(t,e,n,r){return r<=0&&(t=e=n=NaN),new ko(t,e,n,r)}function Po(t){return t instanceof fo||(t=So(t)),t?new ko((t=t.rgb()).r,t.g,t.b,t.opacity):new ko}function Do(t,e,n,r){return 1===arguments.length?Po(t):new ko(t,e,n,null==r?1:r)}function ko(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Lo(){return"#"+Io(this.r)+Io(this.g)+Io(this.b)}function Ro(){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 Io(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function jo(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Uo(t,e,n,r)}function No(t){if(t instanceof Uo)return new Uo(t.h,t.s,t.l,t.opacity);if(t instanceof fo||(t=So(t)),!t)return new Uo;if(t instanceof Uo)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 Uo(a,s,u,t.opacity)}function Uo(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Ho(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 Fo(t){return function(){return t}}function Bo(t){return 1==(t=+t)?Vo: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):Fo(isNaN(e)?n:e)}}function Vo(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):Fo(isNaN(t)?e:t)}lo(fo,So,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Oo,formatHex:Oo,formatHsl:function(){return No(this).formatHsl()},formatRgb:Mo,toString:Mo}),lo(ko,Do,ho(fo,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new ko(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new ko(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:Lo,formatHex:Lo,formatRgb:Ro,toString:Ro})),lo(Uo,(function(t,e,n,r){return 1===arguments.length?No(t):new Uo(t,e,n,null==r?1:r)}),ho(fo,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Uo(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Uo(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 ko(Ho(t>=240?t-240:t+120,i,r),Ho(t,i,r),Ho(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 Go=function t(e){var n=Bo(e);function r(t,e){var r=n((t=Do(t)).r,(e=Do(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=Vo(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 zo(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 Wo(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]=Ko(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 Yo(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function qo(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Xo(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]=Ko(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}var $o=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Zo=new RegExp($o.source,"g");function Qo(t,e){var n,r,i,o=$o.lastIndex=Zo.lastIndex=0,a=-1,s=[],u=[];for(t+="",e+="";(n=$o.exec(t))&&(r=Zo.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:qo(n,r)})),o=Zo.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 Ko(t,e){var n,r=typeof e;return null==e||"boolean"===r?Fo(e):("number"===r?qo:"string"===r?(n=So(e))?(e=n,Go):Qo:e instanceof So?Go:e instanceof Date?Yo:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(e)?zo:Array.isArray(e)?Wo:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?Xo:qo)(t,e)}function Jo(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var ta,ea,na,ra,ia=180/Math.PI,oa={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function aa(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)*ia,skewX:Math.atan(u)*ia,scaleX:a,scaleY:s}}function sa(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:qo(t,i)},{i:u-2,x:qo(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:qo(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:qo(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:qo(t,n)},{i:s-2,x:qo(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 ua=sa((function(t){return"none"===t?oa:(ta||(ta=document.createElement("DIV"),ea=document.documentElement,na=document.defaultView),ta.style.transform=t,t=na.getComputedStyle(ea.appendChild(ta),null).getPropertyValue("transform"),ea.removeChild(ta),aa(+(t=t.slice(7,-1).split(","))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),ca=sa((function(t){return null==t?oa:(ra||(ra=document.createElementNS("http://www.w3.org/2000/svg","g")),ra.setAttribute("transform",t),(t=ra.transform.baseVal.consolidate())?aa((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):oa)}),", ",")",")");function la(t){return+t}var ha=[0,1];function fa(t){return t}function da(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:function(t){return function(){return t}}(isNaN(e)?NaN:.5)}function pa(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 ga(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=da(i,r),o=n(a,o)):(r=da(r,i),o=n(o,a)),function(t){return o(r(t))}}function va(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]=da(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(e){var n=Gi(t,e,1,r)-1;return o[n](i[n](e))}}function ma(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function ya(){var t,e,n,r,i,o,a=ha,s=ha,u=Ko,c=fa;function l(){return r=Math.min(a.length,s.length)>2?va:ga,i=o=null,h}function h(e){return isNaN(e=+e)?n:(i||(i=r(a.map(t),s,u)))(t(c(e)))}return h.invert=function(n){return c(e((o||(o=r(s,a.map(t),qo)))(n)))},h.domain=function(t){return arguments.length?(a=oo.call(t,la),c===fa||(c=pa(a)),l()):a.slice()},h.range=function(t){return arguments.length?(s=ao.call(t),l()):s.slice()},h.rangeRound=function(t){return s=ao.call(t),u=Jo,l()},h.clamp=function(t){return arguments.length?(c=t?pa(a):fa,h):c!==fa},h.interpolate=function(t){return arguments.length?(u=t,l()):u},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,r){return t=n,e=r,l()}}function _a(t,e){return ya()(t,e)}function ba(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 xa(t){return(t=ba(Math.abs(t)))?t[1]:NaN}var wa,Ta=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ea(t){if(!(e=Ta.exec(t)))throw new Error("invalid format: "+t);var e;return new Oa({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 Oa(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 Ma(t,e){var n=ba(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")}Ea.prototype=Oa.prototype,Oa.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 Sa={"%":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 Ma(100*t,e)},r:Ma,s:function(t,e){var n=ba(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(wa=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")+ba(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 Aa(t){return t}var Ca,Pa,Da,ka=Array.prototype.map,La=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Ra(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?Aa:(e=ka.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?Aa:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(ka.call(t.numerals,String)),u=void 0===t.percent?"%":t.percent+"",c=void 0===t.minus?"-":t.minus+"",l=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=Ea(t)).fill,n=t.align,h=t.sign,f=t.symbol,d=t.zero,p=t.width,g=t.comma,v=t.precision,m=t.trim,y=t.type;"n"===y?(g=!0,y="g"):Sa[y]||(void 0===v&&(v=12),m=!0,y="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var _="$"===f?i:"#"===f&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",b="$"===f?o:/[%p]/.test(y)?u:"",x=Sa[y],w=/[defgprs%]/.test(y);function T(t){var i,o,u,f=_,T=b;if("c"===y)T=x(t)+T,t="";else{var E=(t=+t)<0;if(t=isNaN(t)?l:x(Math.abs(t),v),m&&(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:c:"-"===h||"("===h?"":h)+f,T=("s"===y?La[8+wa/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}}g&&!d&&(t=r(t,1/0));var O=f.length+t.length+T.length,M=O<p?new Array(p-O+1).join(e):"";switch(g&&d&&(t=r(M+t,M.length?p-T.length:1/0),M=""),n){case"<":t=f+t+T+M;break;case"=":t=f+M+t+T;break;case"^":t=M.slice(0,O=M.length>>1)+f+t+T+M.slice(O);break;default:t=M+f+t+T}return s(t)}return v=void 0===v?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v)),T.toString=function(){return t+""},T}return{format:h,formatPrefix:function(t,e){var n=h(((t=Ea(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(xa(e)/3))),i=Math.pow(10,-r),o=La[8+r/3];return function(t){return n(i*t)+o}}}}function Ia(t,e,n,r){var i,o=Qi(t,e,n);switch((r=Ea(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(xa(e)/3)))-xa(Math.abs(t)))}(o,a))||(r.precision=i),Da(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,xa(e)-xa(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,-xa(Math.abs(t)))}(o))||(r.precision=i-2*("%"===r.type))}return Pa(r)}function ja(t){var e=t.domain;return t.ticks=function(t){var n=e();return $i(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return Ia(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=Zi(s,u,n))>0?r=Zi(s=Math.floor(s/r)*r,u=Math.ceil(u/r)*r,n):r<0&&(r=Zi(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 Na(){var t=_a(fa,fa);return t.copy=function(){return ma(t,Na())},Ji.apply(t,arguments),ja(t)}function Ua(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 Ha(t){return Math.log(t)}function Fa(t){return Math.exp(t)}function Ba(t){return-Math.log(-t)}function Va(t){return-Math.exp(-t)}function Ga(t){return isFinite(t)?+("1e"+t):t<0?0:t}function za(t){return function(e){return-t(-e)}}function Wa(t){var e,n,r=t(Ha,Fa),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?Ga:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}(o),i()[0]<0?(e=za(e),n=za(n),t(Ba,Va)):t(Ha,Fa),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 c,l,h,f=e(s),d=e(u),p=null==t?10:+t,g=[];if(!(o%1)&&d-f<p){if(f=Math.round(f)-1,d=Math.round(d)+1,s>0){for(;f<d;++f)for(l=1,c=n(f);l<o;++l)if(!((h=c*l)<s)){if(h>u)break;g.push(h)}}else for(;f<d;++f)for(l=o-1,c=n(f);l>=1;--l)if(!((h=c*l)<s)){if(h>u)break;g.push(h)}}else g=$i(f,d,Math.min(d-f,p)).map(n);return r?g.reverse():g},r.tickFormat=function(t,i){if(null==i&&(i=10===o?".0e":","),"function"!=typeof i&&(i=Pa(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(Ua(i(),{floor:function(t){return n(Math.floor(e(t)))},ceil:function(t){return n(Math.ceil(e(t)))}}))},r}Ca=Ra({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),Pa=Ca.format,Da=Ca.formatPrefix;var Ya=new Date,qa=new Date;function Xa(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 Xa((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 Ya.setTime(+e),qa.setTime(+r),t(Ya),t(qa),Math.floor(n(Ya,qa))},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 $a=Xa((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));$a.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?Xa((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):$a:null};var Za=Xa((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()})),Qa=Xa((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()})),Ka=Xa((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()})),Ja=Xa((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 ts(t){return Xa((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 es=ts(0),ns=ts(1),rs=(ts(2),ts(3),ts(4)),is=(ts(5),ts(6),Xa((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()}))),os=Xa((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()}));os.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Xa((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 as=Xa((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 ss(t){return Xa((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 us=ss(0),cs=ss(1),ls=(ss(2),ss(3),ss(4)),hs=(ss(5),ss(6),Xa((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 fs(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 ds(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 ps(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}hs.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Xa((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 gs,vs,ms={"-":"",_:" ",0:"0"},ys=/^\s*\d+/,_s=/^%/,bs=/[\\^$*+?|[\]().{}]/g;function xs(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 ws(t){return t.replace(bs,"\\$&")}function Ts(t){return new RegExp("^(?:"+t.map(ws).join("|")+")","i")}function Es(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function Os(t,e,n){var r=ys.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Ms(t,e,n){var r=ys.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Ss(t,e,n){var r=ys.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function As(t,e,n){var r=ys.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Cs(t,e,n){var r=ys.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Ps(t,e,n){var r=ys.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Ds(t,e,n){var r=ys.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function ks(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 Ls(t,e,n){var r=ys.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function Rs(t,e,n){var r=ys.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Is(t,e,n){var r=ys.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function js(t,e,n){var r=ys.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Ns(t,e,n){var r=ys.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Us(t,e,n){var r=ys.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Hs(t,e,n){var r=ys.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Fs(t,e,n){var r=ys.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Bs(t,e,n){var r=ys.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Vs(t,e,n){var r=_s.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Gs(t,e,n){var r=ys.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function zs(t,e,n){var r=ys.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Ws(t,e){return xs(t.getDate(),e,2)}function Ys(t,e){return xs(t.getHours(),e,2)}function qs(t,e){return xs(t.getHours()%12||12,e,2)}function Xs(t,e){return xs(1+Ja.count(os(t),t),e,3)}function $s(t,e){return xs(t.getMilliseconds(),e,3)}function Zs(t,e){return $s(t,e)+"000"}function Qs(t,e){return xs(t.getMonth()+1,e,2)}function Ks(t,e){return xs(t.getMinutes(),e,2)}function Js(t,e){return xs(t.getSeconds(),e,2)}function tu(t){var e=t.getDay();return 0===e?7:e}function eu(t,e){return xs(es.count(os(t)-1,t),e,2)}function nu(t,e){var n=t.getDay();return t=n>=4||0===n?rs(t):rs.ceil(t),xs(rs.count(os(t),t)+(4===os(t).getDay()),e,2)}function ru(t){return t.getDay()}function iu(t,e){return xs(ns.count(os(t)-1,t),e,2)}function ou(t,e){return xs(t.getFullYear()%100,e,2)}function au(t,e){return xs(t.getFullYear()%1e4,e,4)}function su(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+xs(e/60|0,"0",2)+xs(e%60,"0",2)}function uu(t,e){return xs(t.getUTCDate(),e,2)}function cu(t,e){return xs(t.getUTCHours(),e,2)}function lu(t,e){return xs(t.getUTCHours()%12||12,e,2)}function hu(t,e){return xs(1+as.count(hs(t),t),e,3)}function fu(t,e){return xs(t.getUTCMilliseconds(),e,3)}function du(t,e){return fu(t,e)+"000"}function pu(t,e){return xs(t.getUTCMonth()+1,e,2)}function gu(t,e){return xs(t.getUTCMinutes(),e,2)}function vu(t,e){return xs(t.getUTCSeconds(),e,2)}function mu(t){var e=t.getUTCDay();return 0===e?7:e}function yu(t,e){return xs(us.count(hs(t)-1,t),e,2)}function _u(t,e){var n=t.getUTCDay();return t=n>=4||0===n?ls(t):ls.ceil(t),xs(ls.count(hs(t),t)+(4===hs(t).getUTCDay()),e,2)}function bu(t){return t.getUTCDay()}function xu(t,e){return xs(cs.count(hs(t)-1,t),e,2)}function wu(t,e){return xs(t.getUTCFullYear()%100,e,2)}function Tu(t,e){return xs(t.getUTCFullYear()%1e4,e,4)}function Eu(){return"+0000"}function Ou(){return"%"}function Mu(t){return+t}function Su(t){return Math.floor(+t/1e3)}!function(t){gs=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,c=Ts(i),l=Es(i),h=Ts(o),f=Es(o),d=Ts(a),p=Es(a),g=Ts(s),v=Es(s),m=Ts(u),y=Es(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:Ws,e:Ws,f:Zs,H:Ys,I:qs,j:Xs,L:$s,m:Qs,M:Ks,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Mu,s:Su,S:Js,u:tu,U:eu,V:nu,w:ru,W:iu,x:null,X:null,y:ou,Y:au,Z:su,"%":Ou},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:uu,e:uu,f:du,H:cu,I:lu,j:hu,L:fu,m:pu,M:gu,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Mu,s:Su,S:vu,u:mu,U:yu,V:_u,w:bu,W:xu,x:null,X:null,y:wu,Y:Tu,Z:Eu,"%":Ou},x={a:function(t,e,n){var r=d.exec(e.slice(n));return r?(t.w=p[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=m.exec(e.slice(n));return r?(t.m=y[r[0].toLowerCase()],n+r[0].length):-1},B:function(t,e,n){var r=g.exec(e.slice(n));return r?(t.m=v[r[0].toLowerCase()],n+r[0].length):-1},c:function(t,n,r){return E(t,e,n,r)},d:Is,e:Is,f:Bs,H:Ns,I:Ns,j:js,L:Fs,m:Rs,M:Us,p:function(t,e,n){var r=c.exec(e.slice(n));return r?(t.p=l[r[0].toLowerCase()],n+r[0].length):-1},q:Ls,Q:Gs,s:zs,S:Hs,u:Ms,U:Ss,V:As,w:Os,W:Cs,x:function(t,e,r){return E(t,n,e,r)},X:function(t,e,n){return E(t,r,e,n)},y:Ds,Y:Ps,Z:ks,"%":Vs};function w(t,e){return function(n){var r,i,o,a=[],s=-1,u=0,c=t.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===t.charCodeAt(s)&&(a.push(t.slice(u,s)),null!=(i=ms[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=ps(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=ds(ps(o.y,0,1))).getUTCDay(),r=i>4||0===i?cs.ceil(r):cs(r),r=as.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=fs(ps(o.y,0,1))).getDay(),r=i>4||0===i?ns.ceil(r):ns(r),r=Ja.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?ds(ps(o.y,0,1)).getUTCDay():fs(ps(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,ds(o)):fs(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 ms?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),vs=gs.format,gs.parse,gs.utcFormat,gs.utcParse}({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 Au(t){return new Date(t)}function Cu(t){return t instanceof Date?+t:+new Date(+t)}function Pu(t,e,n,r,i,o,a,s,u){var c=_a(fa,fa),l=c.invert,h=c.domain,f=u(".%L"),d=u(":%S"),p=u("%I:%M"),g=u("%I %p"),v=u("%a %d"),m=u("%b %d"),y=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?d:i(s)<s?p:r(s)<s?g:e(s)<s?n(s)<s?v:m:t(s)<s?y:_)(s)}function w(e,n,r,i){if(null==e&&(e=10),"number"==typeof e){var o=Math.abs(r-n)/e,a=Vi((function(t){return t[2]})).right(b,o);a===b.length?(i=Qi(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(Qi(n,r,e),1),e=s)}return null==i?e:e.every(i)}return c.invert=function(t){return new Date(l(t))},c.domain=function(t){return arguments.length?h(oo.call(t,Cu)):h().map(Au)},c.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},c.tickFormat=function(t,e){return null==e?x:u(e)},c.nice=function(t,e){var n=h();return(t=w(t,n[0],n[n.length-1],e))?h(Ua(n,t)):c},c.copy=function(){return ma(c,Pu(t,e,n,r,i,o,a,s,u))},c}var Du=Math.PI,ku=2*Du,Lu=ku-1e-6;function Ru(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Iu(){return new Ru}function ju(t){return function(){return t}}Ru.prototype=Iu.prototype={constructor:Ru,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,c=o-t,l=a-e,h=c*c+l*l;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(l*s-u*c)>1e-6&&i){var f=n-o,d=r-a,p=s*s+u*u,g=f*f+d*d,v=Math.sqrt(p),m=Math.sqrt(h),y=i*Math.tan((Du-Math.acos((p+h-g)/(2*v*m)))/2),_=y/m,b=y/v;Math.abs(_-1)>1e-6&&(this._+="L"+(t+_*c)+","+(e+_*l)),this._+="A"+i+","+i+",0,0,"+ +(l*f>c*d)+","+(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,c=e+s,l=1^o,h=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+u+","+c:(Math.abs(this._x1-u)>1e-6||Math.abs(this._y1-c)>1e-6)&&(this._+="L"+u+","+c),n&&(h<0&&(h=h%ku+ku),h>Lu?this._+="A"+n+","+n+",0,1,"+l+","+(t-a)+","+(e-s)+"A"+n+","+n+",0,1,"+l+","+(this._x1=u)+","+(this._y1=c):h>1e-6&&(this._+="A"+n+","+n+",0,"+ +(h>=Du)+","+l+","+(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 Nu=Math.abs,Uu=Math.atan2,Hu=Math.cos,Fu=Math.max,Bu=Math.min,Vu=Math.sin,Gu=Math.sqrt,zu=Math.PI,Wu=zu/2,Yu=2*zu;function qu(t){return t>1?0:t<-1?zu:Math.acos(t)}function Xu(t){return t>=1?Wu:t<=-1?-Wu:Math.asin(t)}function $u(t){return t.innerRadius}function Zu(t){return t.outerRadius}function Qu(t){return t.startAngle}function Ku(t){return t.endAngle}function Ju(t){return t&&t.padAngle}function tc(t,e,n,r,i,o,a,s){var u=n-t,c=r-e,l=a-i,h=s-o,f=h*u-l*c;if(!(f*f<1e-12))return[t+(f=(l*(e-o)-h*(t-i))/f)*u,e+f*c]}function ec(t,e,n,r,i,o,a){var s=t-n,u=e-r,c=(a?o:-o)/Gu(s*s+u*u),l=c*u,h=-c*s,f=t+l,d=e+h,p=n+l,g=r+h,v=(f+p)/2,m=(d+g)/2,y=p-f,_=g-d,b=y*y+_*_,x=i-o,w=f*g-p*d,T=(_<0?-1:1)*Gu(Fu(0,x*x*b-w*w)),E=(w*_-y*T)/b,O=(-w*y-_*T)/b,M=(w*_+y*T)/b,S=(-w*y+_*T)/b,A=E-v,C=O-m,P=M-v,D=S-m;return A*A+C*C>P*P+D*D&&(E=M,O=S),{cx:E,cy:O,x01:-l,y01:-h,x11:E*(i/x-1),y11:O*(i/x-1)}}function nc(){var t=$u,e=Zu,n=ju(0),r=null,i=Qu,o=Ku,a=Ju,s=null;function u(){var u,c,l=+t.apply(this,arguments),h=+e.apply(this,arguments),f=i.apply(this,arguments)-Wu,d=o.apply(this,arguments)-Wu,p=Nu(d-f),g=d>f;if(s||(s=u=Iu()),h<l&&(c=h,h=l,l=c),h>1e-12)if(p>Yu-1e-12)s.moveTo(h*Hu(f),h*Vu(f)),s.arc(0,0,h,f,d,!g),l>1e-12&&(s.moveTo(l*Hu(d),l*Vu(d)),s.arc(0,0,l,d,f,g));else{var v,m,y=f,_=d,b=f,x=d,w=p,T=p,E=a.apply(this,arguments)/2,O=E>1e-12&&(r?+r.apply(this,arguments):Gu(l*l+h*h)),M=Bu(Nu(h-l)/2,+n.apply(this,arguments)),S=M,A=M;if(O>1e-12){var C=Xu(O/l*Vu(E)),P=Xu(O/h*Vu(E));(w-=2*C)>1e-12?(b+=C*=g?1:-1,x-=C):(w=0,b=x=(f+d)/2),(T-=2*P)>1e-12?(y+=P*=g?1:-1,_-=P):(T=0,y=_=(f+d)/2)}var D=h*Hu(y),k=h*Vu(y),L=l*Hu(x),R=l*Vu(x);if(M>1e-12){var I,j=h*Hu(_),N=h*Vu(_),U=l*Hu(b),H=l*Vu(b);if(p<zu&&(I=tc(D,k,U,H,j,N,L,R))){var F=D-I[0],B=k-I[1],V=j-I[0],G=N-I[1],z=1/Vu(qu((F*V+B*G)/(Gu(F*F+B*B)*Gu(V*V+G*G)))/2),W=Gu(I[0]*I[0]+I[1]*I[1]);S=Bu(M,(l-W)/(z-1)),A=Bu(M,(h-W)/(z+1))}}T>1e-12?A>1e-12?(v=ec(U,H,D,k,h,A,g),m=ec(j,N,L,R,h,A,g),s.moveTo(v.cx+v.x01,v.cy+v.y01),A<M?s.arc(v.cx,v.cy,A,Uu(v.y01,v.x01),Uu(m.y01,m.x01),!g):(s.arc(v.cx,v.cy,A,Uu(v.y01,v.x01),Uu(v.y11,v.x11),!g),s.arc(0,0,h,Uu(v.cy+v.y11,v.cx+v.x11),Uu(m.cy+m.y11,m.cx+m.x11),!g),s.arc(m.cx,m.cy,A,Uu(m.y11,m.x11),Uu(m.y01,m.x01),!g))):(s.moveTo(D,k),s.arc(0,0,h,y,_,!g)):s.moveTo(D,k),l>1e-12&&w>1e-12?S>1e-12?(v=ec(L,R,j,N,l,-S,g),m=ec(D,k,U,H,l,-S,g),s.lineTo(v.cx+v.x01,v.cy+v.y01),S<M?s.arc(v.cx,v.cy,S,Uu(v.y01,v.x01),Uu(m.y01,m.x01),!g):(s.arc(v.cx,v.cy,S,Uu(v.y01,v.x01),Uu(v.y11,v.x11),!g),s.arc(0,0,l,Uu(v.cy+v.y11,v.cx+v.x11),Uu(m.cy+m.y11,m.cx+m.x11),g),s.arc(m.cx,m.cy,S,Uu(m.y11,m.x11),Uu(m.y01,m.x01),!g))):s.arc(0,0,l,x,b,g):s.lineTo(L,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-zu/2;return[Hu(r)*n,Vu(r)*n]},u.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:ju(+e),u):t},u.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:ju(+t),u):e},u.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:ju(+t),u):n},u.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:ju(+t),u):r},u.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:ju(+t),u):i},u.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:ju(+t),u):o},u.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:ju(+t),u):a},u.context=function(t){return arguments.length?(s=null==t?null:t,u):s},u}function rc(t){this._context=t}function ic(t){return new rc(t)}function oc(t){return t[0]}function ac(t){return t[1]}function sc(){var t=oc,e=ac,n=ju(!0),r=null,i=ic,o=null;function a(a){var s,u,c,l=a.length,h=!1;for(null==r&&(o=i(c=Iu())),s=0;s<=l;++s)!(s<l&&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(c)return o=null,c+""||null}return a.x=function(e){return arguments.length?(t="function"==typeof e?e:ju(+e),a):t},a.y=function(t){return arguments.length?(e="function"==typeof t?t:ju(+t),a):e},a.defined=function(t){return arguments.length?(n="function"==typeof t?t:ju(!!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}function uc(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function cc(t){return t}rc.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 lc=fc(ic);function hc(t){this._curve=t}function fc(t){function e(e){return new hc(t(e))}return e._curve=t,e}function dc(){return t=sc().curve(lc),e=t.curve,t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(fc(t)):e()._curve},t;var t,e}hc.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};var pc=Array.prototype.slice;function gc(){}function vc(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 mc(t){this._context=t}function yc(t){return new mc(t)}function _c(t){this._context=t}function bc(t){return new _c(t)}function xc(t){this._context=t}function wc(t){return new xc(t)}function Tc(t,e){this._basis=new mc(t),this._beta=e}mc.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:vc(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:vc(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},_c.prototype={areaStart:gc,areaEnd:gc,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:vc(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},xc.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:vc(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Tc.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 Ec=function t(e){function n(t){return 1===e?new mc(t):new Tc(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function Oc(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 Mc(t,e){this._context=t,this._k=(1-e)/6}Mc.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:Oc(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:Oc(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 Sc=function t(e){function n(t){return new Mc(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Ac(t,e){this._context=t,this._k=(1-e)/6}Ac.prototype={areaStart:gc,areaEnd:gc,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:Oc(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 Cc=function t(e){function n(t){return new Ac(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Pc(t,e){this._context=t,this._k=(1-e)/6}Pc.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:Oc(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 Dc=function t(e){function n(t){return new Pc(t,e)}return n.tension=function(e){return t(+e)},n}(0);function kc(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 c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*c+t._x1*t._l23_2a-e*t._l12_2a)/l,a=(a*c+t._y1*t._l23_2a-n*t._l12_2a)/l}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function Lc(t,e){this._context=t,this._alpha=e}Lc.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:kc(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 Rc=function t(e){function n(t){return e?new Lc(t,e):new Mc(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Ic(t,e){this._context=t,this._alpha=e}Ic.prototype={areaStart:gc,areaEnd:gc,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:kc(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 jc=function t(e){function n(t){return e?new Ic(t,e):new Ac(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Nc(t,e){this._context=t,this._alpha=e}Nc.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:kc(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 Uc=function t(e){function n(t){return e?new Nc(t,e):new Pc(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Hc(t){this._context=t}function Fc(t){return new Hc(t)}function Bc(t){return t<0?-1:1}function Vc(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(Bc(o)+Bc(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function Gc(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function zc(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 Wc(t){this._context=t}function Yc(t){this._context=new qc(t)}function qc(t){this._context=t}function Xc(t){return new Wc(t)}function $c(t){return new Yc(t)}function Zc(t){this._context=t}function Qc(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 Kc(t){return new Zc(t)}function Jc(t,e){this._context=t,this._t=e}function tl(t){return new Jc(t,.5)}function el(t){return new Jc(t,0)}function nl(t){return new Jc(t,1)}function rl(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 il(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function ol(t,e){return t[e]}Hc.prototype={areaStart:gc,areaEnd:gc,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))}},Wc.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:zc(this,this._t0,Gc(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,zc(this,Gc(this,n=Vc(this,t,e)),n);break;default:zc(this,this._t0,n=Vc(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(Yc.prototype=Object.create(Wc.prototype)).point=function(t,e){Wc.prototype.point.call(this,e,t)},qc.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)}},Zc.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=Qc(t),i=Qc(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)}},Jc.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 al=function(){function t(t){this.state={options:{}},this.colorScale={},this.services=t}return t.prototype.getDisplayData=function(){if(!this.get("data"))return null;var t=Qr.items.status.ACTIVE,e=this.getDataGroups(),n=Rr.clone(this.get("data")),r=this.getOptions().data.groupMapsTo;return n.filter((function(n){return e.find((function(t){return t.name===n[r]})).status===t}))},t.prototype.getData=function(){return this.get("data")},t.prototype.setData=function(t){var e=this.sanitize(Rr.clone(t)),n=this.generateDataGroups(e);return this.set({data:e,dataGroups:n}),e},t.prototype.getDataGroups=function(){return this.get("dataGroups")},t.prototype.getActiveDataGroups=function(){var t=Qr.items.status.ACTIVE;return this.getDataGroups().filter((function(e){return e.status===t}))},t.prototype.getDataGroupNames=function(){return this.getDataGroups().map((function(t){return t.name}))},t.prototype.getActiveDataGroupNames=function(){return this.getActiveDataGroups().map((function(t){return t.name}))},t.prototype.getGroupedData=function(){var t=this.getDisplayData(),e={},n=this.getOptions().data.groupMapsTo;return t.map((function(t){var r=t[n];null!==e[r]&&void 0!==e[r]?e[r].push(t):e[r]=[t]})),Object.keys(e).map((function(t){return{name:t,data:e[t]}}))},t.prototype.getDataValuesGroupedByKeys=function(){var t=this.getOptions().data.groupMapsTo,e=this.getDisplayData(),n=this.services.cartesianScales.getDomainIdentifier(),r=this.services.cartesianScales.getRangeIdentifier(),i=eo(e,(function(t){return t[n]})).keys(),o=this.getDataGroupNames();return i.map((function(i){var a={sharedStackKey:i};return o.forEach((function(o){var s=e.find((function(e){return e[t]===o&&e[n].toString()===i}));a[o]=s?s[r]:null})),a}))},t.prototype.getStackedData=function(){var t=this.getOptions().data.groupMapsTo,e=this.getDataGroupNames(),n=this.getDataValuesGroupedByKeys();return function(){var t=ju([]),e=il,n=rl,r=ol;function i(i){var o,a,s=t.apply(this,arguments),u=i.length,c=s.length,l=new Array(c);for(o=0;o<c;++o){for(var h,f=s[o],d=l[o]=new Array(u),p=0;p<u;++p)d[p]=h=[0,+r(i[p],f,p,i)],h.data=i[p];d.key=f}for(o=0,a=e(l);o<c;++o)l[a[o]].index=o;return n(l,a),l}return i.keys=function(e){return arguments.length?(t="function"==typeof e?e:ju(pc.call(e)),i):t},i.value=function(t){return arguments.length?(r="function"==typeof t?t:ju(+t),i):r},i.order=function(t){return arguments.length?(e=null==t?il:"function"==typeof t?t:ju(pc.call(t)),i):e},i.offset=function(t){return arguments.length?(n=null==t?rl:t,i):n},i}().keys(e)(n).map((function(n,r){return Object.keys(n).filter((function(t){return!isNaN(t)})).map((function(i){var o=n[i];return o[t]=e[r],o}))}))},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:Rr.merge(this.getOptions(),t)})},t.prototype.update=function(){this.getDisplayData()&&(this.updateAllDataGroups(),this.setColorScale(),this.services.events.dispatchEvent(A.Model.UPDATE))},t.prototype.setUpdateCallback=function(t){this.updateCallback=t},t.prototype.toggleDataLabel=function(t){var e=Qr.items.status,n=e.ACTIVE,r=e.DISABLED,i=this.getDataGroups(),o=i.some((function(t){return t.status===r})),a=i.filter((function(t){return t.status===n}));if(o)if(1===a.length&&a[0].name===t)i.forEach((function(t,e){i[e].status=n}));else{var s=i.findIndex((function(e){return e.name===t}));i[s].status=i[s].status===r?n:r}else i.forEach((function(e,o){i[o].status=e.name===t?n:r}));this.services.events.dispatchEvent(A.Legend.ITEMS_UPDATE,{dataGroups:i}),this.set({dataGroups:i})},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);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);return r.getStrokeColor?r.getStrokeColor(t,e,n,i):i},t.prototype.getFillScale=function(){return this.colorScale},t.prototype.transformToTabularData=function(t){console.warn("We've updated the charting data format to be tabular by default. The current format you're using is deprecated and will be removed in v1.0, read more here https://carbon-design-system.github.io/carbon-charts/?path=/story/tutorials--tabular-data-format");var e=[],n=t.datasets,r=t.labels;return n.forEach((function(t){t.data.forEach((function(n,i){var o,a=Rr.getProperty(t,"label");if(null===a){var s=Rr.getProperty(r,i);o=s||"Ungrouped"}else o=a;var u={group:o,key:r[i]};isNaN(n)?(u.value=n.value,u.date=n.date):u.value=n,e.push(u)}))})),e},t.prototype.getTabularData=function(t){return Array.isArray(t)?t:this.transformToTabularData(t)},t.prototype.sanitize=function(t){return this.getTabularData(t)},t.prototype.updateAllDataGroups=function(){var t=this;this.allDataGroups?this.getDataGroupNames().forEach((function(e){-1===t.allDataGroups.indexOf(e)&&t.allDataGroups.push(e)})):this.allDataGroups=this.getDataGroupNames()},t.prototype.generateDataGroups=function(t){var e=this.getOptions().data.groupMapsTo,n=Qr.items.status.ACTIVE;return eo(t,(function(t){return t[e]})).keys().map((function(t){return{name:t,status:n}}))},t.prototype.setColorScale=function(){var t=Hi,e=this.getOptions(),n=Rr.getProperty(e,"color","scale");if(null!==n&&0!==Object.keys(n).length){var r=[],i=0;this.allDataGroups.forEach((function(e){n[e]?r.push(n[e]):r.push(t[i]),i===t.length-1?i=0:i++})),this.colorScale=uo().range(r).domain(this.allDataGroups)}else this.colorScale=uo().range(t).domain(this.allDataGroups)},t}(),sl=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}(),ul="http://www.w3.org/1999/xhtml",cl={svg:"http://www.w3.org/2000/svg",xhtml:ul,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ll(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),cl.hasOwnProperty(e)?{space:cl[e],local:t}:t}function hl(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===ul&&e.documentElement.namespaceURI===ul?e.createElement(t):e.createElementNS(n,t)}}function fl(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function dl(t){var e=ll(t);return(e.local?fl:hl)(e)}function pl(){}function gl(t){return null==t?pl:function(){return this.querySelector(t)}}function vl(){return[]}function ml(t){return null==t?vl:function(){return this.querySelectorAll(t)}}function yl(t){return function(){return this.matches(t)}}function _l(t){return new Array(t.length)}function bl(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}bl.prototype={constructor:bl,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 xl(t,e,n,r,i,o){for(var a,s=0,u=e.length,c=o.length;s<c;++s)(a=e[s])?(a.__data__=o[s],r[s]=a):n[s]=new bl(t,o[s]);for(;s<u;++s)(a=e[s])&&(i[s]=a)}function wl(t,e,n,r,i,o,a){var s,u,c,l={},h=e.length,f=o.length,d=new Array(h);for(s=0;s<h;++s)(u=e[s])&&(d[s]=c="$"+a.call(u,u.__data__,s,e),c in l?i[s]=u:l[c]=u);for(s=0;s<f;++s)(u=l[c="$"+a.call(t,o[s],s,o)])?(r[s]=u,u.__data__=o[s],l[c]=null):n[s]=new bl(t,o[s]);for(s=0;s<h;++s)(u=e[s])&&l[d[s]]===u&&(i[s]=u)}function Tl(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function El(t){return function(){this.removeAttribute(t)}}function Ol(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Ml(t,e){return function(){this.setAttribute(t,e)}}function Sl(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Al(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Cl(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 Pl(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Dl(t){return function(){this.style.removeProperty(t)}}function kl(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Ll(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Rl(t,e){return t.style.getPropertyValue(e)||Pl(t).getComputedStyle(t,null).getPropertyValue(e)}function Il(t){return function(){delete this[t]}}function jl(t,e){return function(){this[t]=e}}function Nl(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Ul(t){return t.trim().split(/^|\s+/)}function Hl(t){return t.classList||new Fl(t)}function Fl(t){this._node=t,this._names=Ul(t.getAttribute("class")||"")}function Bl(t,e){for(var n=Hl(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Vl(t,e){for(var n=Hl(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function Gl(t){return function(){Bl(this,t)}}function zl(t){return function(){Vl(this,t)}}function Wl(t,e){return function(){(e.apply(this,arguments)?Bl:Vl)(this,t)}}function Yl(){this.textContent=""}function ql(t){return function(){this.textContent=t}}function Xl(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function $l(){this.innerHTML=""}function Zl(t){return function(){this.innerHTML=t}}function Ql(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function Kl(){this.nextSibling&&this.parentNode.appendChild(this)}function Jl(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function th(){return null}function eh(){var t=this.parentNode;t&&t.removeChild(this)}function nh(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function rh(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}Fl.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 ih={},oh=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(ih={mouseenter:"mouseover",mouseleave:"mouseout"}));function ah(t,e,n){return t=sh(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function sh(t,e,n){return function(r){var i=oh;oh=r;try{t.call(this,this.__data__,e,n)}finally{oh=i}}}function uh(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 ch(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 lh(t,e,n){var r=ih.hasOwnProperty(t.type)?ah:sh;return function(i,o,a){var s,u=this.__on,c=r(e,o,a);if(u)for(var l=0,h=u.length;l<h;++l)if((s=u[l]).type===t.type&&s.name===t.name)return this.removeEventListener(s.type,s.listener,s.capture),this.addEventListener(s.type,s.listener=c,s.capture=n),void(s.value=e);this.addEventListener(t.type,c,n),s={type:t.type,name:t.name,value:e,listener:c,capture:n},u?u.push(s):this.__on=[s]}}function hh(t,e,n){var r=Pl(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 fh(t,e){return function(){return hh(this,t,e)}}function dh(t,e){return function(){return hh(this,t,e.apply(this,arguments))}}var ph=[null];function gh(t,e){this._groups=t,this._parents=e}function vh(){return new gh([[document.documentElement]],ph)}function mh(t){return"string"==typeof t?new gh([[document.querySelector(t)]],[document.documentElement]):new gh([[t]],ph)}function yh(){for(var t,e=oh;t=e.sourceEvent;)e=t;return e}function _h(t){var e=yh();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)}gh.prototype=vh.prototype={constructor:gh,select:function(t){"function"!=typeof t&&(t=gl(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,c=r[i]=new Array(u),l=0;l<u;++l)(o=s[l])&&(a=t.call(o,o.__data__,l,s))&&("__data__"in o&&(a.__data__=o.__data__),c[l]=a);return new gh(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=ml(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,c=0;c<u;++c)(a=s[c])&&(r.push(t.call(a,a.__data__,c,s)),i.push(a));return new gh(r,i)},filter:function(t){"function"!=typeof t&&(t=yl(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]=[],c=0;c<s;++c)(o=a[c])&&t.call(o,o.__data__,c,a)&&u.push(o);return new gh(r,this._parents)},data:function(t,e){if(!t)return d=new Array(this.size()),c=-1,this.each((function(t){d[++c]=t})),d;var n=e?wl:xl,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),c=0;c<o;++c){var l=r[c],h=i[c],f=h.length,d=t.call(l,l&&l.__data__,c,r),p=d.length,g=s[c]=new Array(p),v=a[c]=new Array(p);n(l,h,g,v,u[c]=new Array(f),d,e);for(var m,y,_=0,b=0;_<p;++_)if(m=g[_]){for(_>=b&&(b=_+1);!(y=v[b])&&++b<p;);m._next=y||null}}return(a=new gh(a,r))._enter=s,a._exit=u,a},enter:function(){return new gh(this._enter||this._groups.map(_l),this._parents)},exit:function(){return new gh(this._exit||this._groups.map(_l),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,c=e[s],l=n[s],h=c.length,f=a[s]=new Array(h),d=0;d<h;++d)(u=c[d]||l[d])&&(f[d]=u);for(;s<r;++s)a[s]=e[s];return new gh(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=Tl);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,c=i[o]=new Array(u),l=0;l<u;++l)(a=s[l])&&(c[l]=a);c.sort(e)}return new gh(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=ll(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?Ol:El:"function"==typeof e?n.local?Cl:Al:n.local?Sl:Ml)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?Dl:"function"==typeof e?Ll:kl)(t,e,null==n?"":n)):Rl(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Il:"function"==typeof e?Nl:jl)(t,e)):this.node()[t]},classed:function(t,e){var n=Ul(t+"");if(arguments.length<2){for(var r=Hl(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?Wl:e?Gl:zl)(n,e))},text:function(t){return arguments.length?this.each(null==t?Yl:("function"==typeof t?Xl:ql)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?$l:("function"==typeof t?Ql:Zl)(t)):this.node().innerHTML},raise:function(){return this.each(Kl)},lower:function(){return this.each(Jl)},append:function(t){var e="function"==typeof t?t:dl(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:dl(t),r=null==e?th:"function"==typeof e?e:gl(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(eh)},clone:function(t){return this.select(t?rh:nh)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,o=uh(t+""),a=o.length;if(!(arguments.length<2)){for(s=e?lh:ch,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,c=0,l=s.length;c<l;++c)for(r=0,u=s[c];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?dh:fh)(t,e))}};var bh={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 "},xh=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}()}(),wh="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,Th="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),Eh="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(Th):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)},Oh=["top","right","bottom","left","width","height","size","weight"],Mh="undefined"!=typeof MutationObserver,Sh=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(){Eh(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)};Sh.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},Sh.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},Sh.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},Sh.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},Sh.prototype.connect_=function(){wh&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Mh?(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)},Sh.prototype.disconnect_=function(){wh&&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)},Sh.prototype.onTransitionEnd_=function(t){var e=t.propertyName;void 0===e&&(e=""),Oh.some((function(t){return!!~e.indexOf(t)}))&&this.refresh()},Sh.getInstance=function(){return this.instance_||(this.instance_=new Sh),this.instance_},Sh.instance_=null;var Ah=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},Ch=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||Th},Ph=jh(0,0,0,0);function Dh(t){return parseFloat(t)||0}function kh(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];return e.reduce((function(e,n){return e+Dh(t["border-"+n+"-width"])}),0)}function Lh(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return Ph;var r=Ch(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]=Dh(o)}return e}(r),o=i.left+i.right,a=i.top+i.bottom,s=Dh(r.width),u=Dh(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==e&&(s-=kh(r,"left","right")+o),Math.round(u+a)!==n&&(u-=kh(r,"top","bottom")+a)),!function(t){return t===Ch(t).document.documentElement}(t)){var c=Math.round(s+o)-e,l=Math.round(u+a)-n;1!==Math.abs(c)&&(s-=c),1!==Math.abs(l)&&(u-=l)}return jh(i.left,i.top,s,u)}var Rh="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof Ch(t).SVGGraphicsElement}:function(t){return t instanceof Ch(t).SVGElement&&"function"==typeof t.getBBox};function Ih(t){return wh?Rh(t)?function(t){var e=t.getBBox();return jh(0,0,e.width,e.height)}(t):Lh(t):Ph}function jh(t,e,n,r){return{x:t,y:e,width:n,height:r}}var Nh=function(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=jh(0,0,0,0),this.target=t};Nh.prototype.isActive=function(){var t=Ih(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},Nh.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t};var Uh=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 Ah(a,{x:e,y:n,width:r,height:i,top:n,right:e+r,bottom:i+n,left:e}),a}(e);Ah(this,{target:t,contentRect:n})},Hh=function(t,e,n){if(this.activeObservations_=[],this.observations_=new xh,"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};Hh.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 Ch(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new Nh(t)),this.controller_.addObserver(this),this.controller_.refresh())}},Hh.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 Ch(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))}},Hh.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},Hh.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},Hh.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new Uh(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},Hh.prototype.clearActive=function(){this.activeObservations_.splice(0)},Hh.prototype.hasActive=function(){return this.activeObservations_.length>0};var Fh="undefined"!=typeof WeakMap?new WeakMap:new xh,Bh=function(t){if(!(this instanceof Bh))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=Sh.getInstance(),n=new Hh(t,e,this);Fh.set(this,n)};["observe","unobserve","disconnect"].forEach((function(t){Bh.prototype[t]=function(){return(e=Fh.get(this))[t].apply(e,arguments);var e}}));var Vh=void 0!==Th.ResizeObserver?Th.ResizeObserver:Bh,Gh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return d(e,t),e.getSVGElementSize=function(t,e){t.attr||(t=mh(t));var n,r,i,o,a={width:0,height:0},s=function(t){t&&Object.keys(a).forEach((function(e){if(t[e]){var n=t[e],r=parseFloat(n);n&&r>a[e]&&-1===(""+n).indexOf("%")&&(a[e]=r)}}))},u={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 c={width:t.node().clientWidth,height:t.node().clientHeight};if(e){if(e.useAttrs&&(s(u),a.width>0&&a.height>0))return a;if(e.useClientDimensions&&(s(c),a.width>0&&a.height>0))return c;if(e.useBBox&&(s(r),a.width>0&&a.height>0))return r;if(e.useBoundingRect&&(s(o),a.width>0&&a.height>0))return o}try{s({width:Rr.getProperty(t.node(),"width","baseVal","value"),height:Rr.getProperty(t.node(),"height","baseVal","value")})}catch(t){s(c),s(r),s(u)}return a},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();mh(this.getHolder()).classed(bh.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=Rr.getProperty(this.model.getOptions(),"style","prefix"),e=mh(this.getHolder()).append("svg").classed(bh.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=Rr.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(A.Chart.RESIZE))}),12.5);new Vh(i).observe(e)}},e}(sl),zh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return d(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}(sl),Wh={value:function(){}};function Yh(){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 qh(r)}function qh(t){this._=t}function Xh(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 $h(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function Zh(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Wh,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}qh.prototype=Yh.prototype={constructor:qh,on:function(t,e){var n,r=this._,i=Xh(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]=Zh(r[n],t.name,e);else if(null==e)for(n in r)r[n]=Zh(r[n],t.name,null);return this}for(;++o<a;)if((n=(t=i[o]).type)&&(n=$h(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new qh(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 Qh,Kh,Jh=0,tf=0,ef=0,nf=0,rf=0,of=0,af="object"==typeof performance&&performance.now?performance:Date,sf="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function uf(){return rf||(sf(cf),rf=af.now()+of)}function cf(){rf=0}function lf(){this._call=this._time=this._next=null}function hf(t,e,n){var r=new lf;return r.restart(t,e,n),r}function ff(){rf=(nf=af.now())+of,Jh=tf=0;try{!function(){uf(),++Jh;for(var t,e=Qh;e;)(t=rf-e._time)>=0&&e._call.call(null,t),e=e._next;--Jh}()}finally{Jh=0,function(){var t,e,n=Qh,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:Qh=e);Kh=t,pf(r)}(),rf=0}}function df(){var t=af.now(),e=t-nf;e>1e3&&(of-=e,nf=t)}function pf(t){Jh||(tf&&(tf=clearTimeout(tf)),t-rf>24?(t<1/0&&(tf=setTimeout(ff,t-af.now()-of)),ef&&(ef=clearInterval(ef))):(ef||(nf=af.now(),ef=setInterval(df,1e3)),Jh=1,sf(ff)))}function gf(t,e,n){var r=new lf;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}lf.prototype=hf.prototype={constructor:lf,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?uf():+n)+(null==e?0:+e),this._next||Kh===this||(Kh?Kh._next=this:Qh=this,Kh=this),this._call=t,this._time=n,pf()},stop:function(){this._call&&(this._call=null,this._time=1/0,pf())}};var vf=Yh("start","end","cancel","interrupt"),mf=[];function yf(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 c,l,h,f;if(1!==n.state)return s();for(c in i)if((f=i[c]).name===n.name){if(3===f.state)return gf(o);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[c]):+c<e&&(f.state=6,f.timer.stop(),f.on.call("cancel",t,t.__data__,f.index,f.group),delete i[c])}if(gf((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),c=0,l=-1;c<h;++c)(f=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(r[++l]=f);r.length=l+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=hf((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:vf,tween:mf,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function _f(t,e){var n=xf(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function bf(t,e){var n=xf(t,e);if(n.state>3)throw new Error("too late; already running");return n}function xf(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function wf(t,e){var n,r;return function(){var i=bf(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 Tf(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var o=bf(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},u=0,c=i.length;u<c;++u)if(i[u].name===e){i[u]=s;break}u===c&&i.push(s)}o.tween=i}}function Ef(t,e,n){var r=t._id;return t.each((function(){var t=bf(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return xf(t,r).value[e]}}function Of(t,e){var n;return("number"==typeof e?qo:e instanceof So?Go:(n=So(e))?(e=n,Go):Qo)(t,e)}function Mf(t){return function(){this.removeAttribute(t)}}function Sf(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Af(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 Cf(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 Pf(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 Df(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 kf(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Lf(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Rf(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&Lf(t,i)),n}return i._value=e,i}function If(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&kf(t,i)),n}return i._value=e,i}function jf(t,e){return function(){_f(this,t).delay=+e.apply(this,arguments)}}function Nf(t,e){return e=+e,function(){_f(this,t).delay=e}}function Uf(t,e){return function(){bf(this,t).duration=+e.apply(this,arguments)}}function Hf(t,e){return e=+e,function(){bf(this,t).duration=e}}function Ff(t,e){if("function"!=typeof e)throw new Error;return function(){bf(this,t).ease=e}}function Bf(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)?_f:bf;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}var Vf=vh.prototype.constructor;function Gf(t){return function(){this.style.removeProperty(t)}}function zf(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function Wf(t,e,n){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&zf(t,o,n)),r}return o._value=e,o}function Yf(t){return function(e){this.textContent=t.call(this,e)}}function qf(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&Yf(r)),e}return r._value=t,r}var Xf=0;function $f(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Zf(t){return vh().transition(t)}function Qf(){return++Xf}var Kf=vh.prototype;$f.prototype=Zf.prototype={constructor:$f,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=gl(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s,u,c=r[a],l=c.length,h=o[a]=new Array(l),f=0;f<l;++f)(s=c[f])&&(u=t.call(s,s.__data__,f,c))&&("__data__"in s&&(u.__data__=s.__data__),h[f]=u,yf(h[f],e,n,f,h,xf(s,n)));return new $f(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=ml(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var u,c=r[s],l=c.length,h=0;h<l;++h)if(u=c[h]){for(var f,d=t.call(u,u.__data__,h,c),p=xf(u,n),g=0,v=d.length;g<v;++g)(f=d[g])&&yf(f,e,n,g,d,p);o.push(d),a.push(u)}return new $f(o,a,e,n)},filter:function(t){"function"!=typeof t&&(t=yl(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]=[],c=0;c<s;++c)(o=a[c])&&t.call(o,o.__data__,c,a)&&u.push(o);return new $f(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,c=e[s],l=n[s],h=c.length,f=a[s]=new Array(h),d=0;d<h;++d)(u=c[d]||l[d])&&(f[d]=u);for(;s<r;++s)a[s]=e[s];return new $f(a,this._parents,this._name,this._id)},selection:function(){return new Vf(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Qf(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],u=s.length,c=0;c<u;++c)if(a=s[c]){var l=xf(a,e);yf(a,t,n,c,s,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new $f(r,this._parents,t,n)},call:Kf.call,nodes:Kf.nodes,node:Kf.node,size:Kf.size,empty:Kf.empty,each:Kf.each,on:function(t,e){var n=this._id;return arguments.length<2?xf(this.node(),n).on.on(t):this.each(Bf(n,t,e))},attr:function(t,e){var n=ll(t),r="transform"===n?ca:Of;return this.attrTween(t,"function"==typeof e?(n.local?Df:Pf)(n,r,Ef(this,"attr."+t,e)):null==e?(n.local?Sf:Mf)(n):(n.local?Cf:Af)(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=ll(t);return this.tween(n,(r.local?Rf:If)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?ua:Of;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var o=Rl(this,t),a=(this.style.removeProperty(t),Rl(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}(t,r)).on("end.style."+t,Gf(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,o;return function(){var a=Rl(this,t),s=n(this),u=s+"";return null==s&&(this.style.removeProperty(t),u=s=Rl(this,t)),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}(t,r,Ef(this,"style."+t,e))).each(function(t,e){var n,r,i,o,a="style."+e,s="end."+a;return function(){var u=bf(this,t),c=u.on,l=null==u.value[a]?o||(o=Gf(e)):void 0;c===n&&i===l||(r=(n=c).copy()).on(s,i=l),u.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,o=n+"";return function(){var a=Rl(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,Wf(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}}(Ef(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,qf(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=xf(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?wf:Tf)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?jf:Nf)(e,t)):xf(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Uf:Hf)(e,t)):xf(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(Ff(e,t)):xf(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=bf(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 Jf={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function td(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return Jf.time=uf(),Jf;return n}vh.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)}))},vh.prototype.transition=function(t){var e,n;t instanceof $f?(e=t._id,t=t._name):(e=Qf(),(n=Jf).time=uf(),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,c=0;c<u;++c)(a=s[c])&&yf(a,t,e,c,s,n||td(a,e));return new $f(r,this._parents,t,e)};var ed=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.pendingTransitions={},e}return d(e,t),e.prototype.init=function(){var t=this;this.services.events.addEventListener(A.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=Zf(t).duration(Rr.getProperty(gi,t,"duration")||gi.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=Zf(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}(sl);function nd(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 rd(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 id(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=nd(t),r=rd(e);return n.setDate(n.getDate()+r),n}function od(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=nd(t).getTime(),r=rd(e);return new Date(n+r)}function ad(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=rd(e);return od(t,36e5*n)}function sd(t){var e=new Date(t.getTime()),n=Math.ceil(e.getTimezoneOffset());return e.setSeconds(0,0),6e4*n+e.getTime()%6e4}function ud(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=nd(t);return e.setHours(0,0,0,0),e}function cd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=ud(t),r=ud(e),i=n.getTime()-sd(n),o=r.getTime()-sd(r);return Math.round((i-o)/864e5)}function ld(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=rd(e);return od(t,6e4*n)}function hd(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=nd(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 fd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=nd(t),r=rd(e),i=n.getMonth()+r,o=new Date(0);o.setFullYear(n.getFullYear(),i,1),o.setHours(0,0,0,0);var a=hd(o);return n.setMonth(i,Math.min(a,n.getDate())),n}function dd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=rd(e);return od(t,1e3*n)}function pd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=rd(e);return fd(t,12*n)}function gd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=nd(t),r=nd(e),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}function vd(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=nd(t);return!isNaN(e)}function md(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=nd(t),r=nd(e),i=n.getFullYear()-r.getFullYear(),o=n.getMonth()-r.getMonth();return 12*i+o}function yd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=nd(t),r=nd(e);return n.getFullYear()-r.getFullYear()}function _d(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=nd(t),r=nd(e);return n.getTime()-r.getTime()}function bd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=_d(t,e)/6e4;return n>0?Math.floor(n):Math.ceil(n)}function xd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=_d(t,e)/1e3;return n>0?Math.floor(n):Math.ceil(n)}var wd={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function Td(t){return function(e){var n=e||{},r=n.width?String(n.width):t.defaultWidth;return t.formats[r]||t.formats[t.defaultWidth]}}var Ed={date:Td({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Td({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Td({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Od={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Md(t){return function(e,n){var r,i=n||{};if("formatting"===(i.context?String(i.context):"standalone")&&t.formattingValues){var o=t.defaultFormattingWidth||t.defaultWidth,a=i.width?String(i.width):o;r=t.formattingValues[a]||t.formattingValues[o]}else{var s=t.defaultWidth,u=i.width?String(i.width):t.defaultWidth;r=t.values[u]||t.values[s]}return r[t.argumentCallback?t.argumentCallback(e):e]}}function Sd(t){return function(e,n){var r=String(e),i=n||{},o=i.width,a=o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth],s=r.match(a);if(!s)return null;var u,c=s[0],l=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth];return u="[object Array]"===Object.prototype.toString.call(l)?function(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return n}(l,(function(t){return t.test(r)})):function(t,e){for(var n in t)if(t.hasOwnProperty(n)&&e(t[n]))return n}(l,(function(t){return t.test(r)})),u=t.valueCallback?t.valueCallback(u):u,{value:u=i.valueCallback?i.valueCallback(u):u,rest:r.slice(c.length)}}}var Ad,Cd={code:"en-US",formatDistance:function(t,e,n){var r;return n=n||{},r="string"==typeof wd[t]?wd[t]:1===e?wd[t].one:wd[t].other.replace("{{count}}",e),n.addSuffix?n.comparison>0?"in "+r:r+" ago":r},formatLong:Ed,formatRelative:function(t,e,n,r){return Od[t]},localize:{ordinalNumber:function(t,e){var n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Md({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Md({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return Number(t)-1}}),month:Md({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:Md({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:Md({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(Ad={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t,e){var n=String(t),r=e||{},i=n.match(Ad.matchPattern);if(!i)return null;var o=i[0],a=n.match(Ad.parsePattern);if(!a)return null;var s=Ad.valueCallback?Ad.valueCallback(a[0]):a[0];return{value:s=r.valueCallback?r.valueCallback(s):s,rest:n.slice(o.length)}}),era:Sd({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Sd({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:Sd({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Sd({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Sd({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function Pd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=rd(e);return od(t,-n)}function Dd(t,e){for(var n=t<0?"-":"",r=Math.abs(t).toString();r.length<e;)r="0"+r;return n+r}var kd=function(t,e){var n=t.getUTCFullYear(),r=n>0?n:1-n;return Dd("yy"===e?r%100:r,e.length)},Ld=function(t,e){var n=t.getUTCMonth();return"M"===e?String(n+1):Dd(n+1,2)},Rd=function(t,e){return Dd(t.getUTCDate(),e.length)},Id=function(t,e){return Dd(t.getUTCHours()%12||12,e.length)},jd=function(t,e){return Dd(t.getUTCHours(),e.length)},Nd=function(t,e){return Dd(t.getUTCMinutes(),e.length)},Ud=function(t,e){return Dd(t.getUTCSeconds(),e.length)},Hd=function(t,e){var n=e.length,r=t.getUTCMilliseconds();return Dd(Math.floor(r*Math.pow(10,n-3)),e.length)};function Fd(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=1,n=nd(t),r=n.getUTCDay(),i=(r<e?7:0)+r-e;return n.setUTCDate(n.getUTCDate()-i),n.setUTCHours(0,0,0,0),n}function Bd(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=nd(t),n=e.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var i=Fd(r),o=new Date(0);o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0);var a=Fd(o);return e.getTime()>=i.getTime()?n+1:e.getTime()>=a.getTime()?n:n-1}function Vd(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Bd(t),n=new Date(0);n.setUTCFullYear(e,0,4),n.setUTCHours(0,0,0,0);var r=Fd(n);return r}function Gd(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=e||{},r=n.locale,i=r&&r.options&&r.options.weekStartsOn,o=null==i?0:rd(i),a=null==n.weekStartsOn?o:rd(n.weekStartsOn);if(!(a>=0&&a<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=nd(t),u=s.getUTCDay(),c=(u<a?7:0)+u-a;return s.setUTCDate(s.getUTCDate()-c),s.setUTCHours(0,0,0,0),s}function zd(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=nd(t,e),r=n.getUTCFullYear(),i=e||{},o=i.locale,a=o&&o.options&&o.options.firstWeekContainsDate,s=null==a?1:rd(a),u=null==i.firstWeekContainsDate?s:rd(i.firstWeekContainsDate);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var c=new Date(0);c.setUTCFullYear(r+1,0,u),c.setUTCHours(0,0,0,0);var l=Gd(c,e),h=new Date(0);h.setUTCFullYear(r,0,u),h.setUTCHours(0,0,0,0);var f=Gd(h,e);return n.getTime()>=l.getTime()?r+1:n.getTime()>=f.getTime()?r:r-1}function Wd(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=e||{},r=n.locale,i=r&&r.options&&r.options.firstWeekContainsDate,o=null==i?1:rd(i),a=null==n.firstWeekContainsDate?o:rd(n.firstWeekContainsDate),s=zd(t,e),u=new Date(0);u.setUTCFullYear(s,0,a),u.setUTCHours(0,0,0,0);var c=Gd(u,e);return c}var Yd="midnight",qd="noon",Xd="morning",$d="afternoon",Zd="evening",Qd="night",Kd={G:function(t,e,n){var r=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if("yo"===e){var r=t.getUTCFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return kd(t,e)},Y:function(t,e,n,r){var i=zd(t,r),o=i>0?i:1-i;return"YY"===e?Dd(o%100,2):"Yo"===e?n.ordinalNumber(o,{unit:"year"}):Dd(o,e.length)},R:function(t,e){return Dd(Bd(t),e.length)},u:function(t,e){return Dd(t.getUTCFullYear(),e.length)},Q:function(t,e,n){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return Dd(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return Dd(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){var r=t.getUTCMonth();switch(e){case"M":case"MM":return Ld(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){var r=t.getUTCMonth();switch(e){case"L":return String(r+1);case"LL":return Dd(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){var i=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=nd(t),r=Gd(n,e).getTime()-Wd(n,e).getTime();return Math.round(r/6048e5)+1}(t,r);return"wo"===e?n.ordinalNumber(i,{unit:"week"}):Dd(i,e.length)},I:function(t,e,n){var r=function(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=nd(t),n=Fd(e).getTime()-Vd(e).getTime();return Math.round(n/6048e5)+1}(t);return"Io"===e?n.ordinalNumber(r,{unit:"week"}):Dd(r,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):Rd(t,e)},D:function(t,e,n){var r=function(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=nd(t),n=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var r=e.getTime(),i=n-r;return Math.floor(i/864e5)+1}(t);return"Do"===e?n.ordinalNumber(r,{unit:"dayOfYear"}):Dd(r,e.length)},E:function(t,e,n){var r=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){var i=t.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return Dd(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){var i=t.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return Dd(o,e.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(t,e,n){var r=t.getUTCDay(),i=0===r?7:r;switch(e){case"i":return String(i);case"ii":return Dd(i,e.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){var r=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,e,n){var r,i=t.getUTCHours();switch(r=12===i?qd:0===i?Yd:i/12>=1?"pm":"am",e){case"b":case"bb":case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,e,n){var r,i=t.getUTCHours();switch(r=i>=17?Zd:i>=12?$d:i>=4?Xd:Qd,e){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(t,e,n){if("ho"===e){var r=t.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Id(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):jd(t,e)},K:function(t,e,n){var r=t.getUTCHours()%12;return"Ko"===e?n.ordinalNumber(r,{unit:"hour"}):Dd(r,e.length)},k:function(t,e,n){var r=t.getUTCHours();return 0===r&&(r=24),"ko"===e?n.ordinalNumber(r,{unit:"hour"}):Dd(r,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):Nd(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):Ud(t,e)},S:function(t,e){return Hd(t,e)},X:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();if(0===i)return"Z";switch(e){case"X":return tp(i);case"XXXX":case"XX":return ep(i);case"XXXXX":case"XXX":default:return ep(i,":")}},x:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"x":return tp(i);case"xxxx":case"xx":return ep(i);case"xxxxx":case"xxx":default:return ep(i,":")}},O:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Jd(i,":");case"OOOO":default:return"GMT"+ep(i,":")}},z:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Jd(i,":");case"zzzz":default:return"GMT"+ep(i,":")}},t:function(t,e,n,r){var i=r._originalDate||t;return Dd(Math.floor(i.getTime()/1e3),e.length)},T:function(t,e,n,r){return Dd((r._originalDate||t).getTime(),e.length)}};function Jd(t,e){var n=t>0?"-":"+",r=Math.abs(t),i=Math.floor(r/60),o=r%60;if(0===o)return n+String(i);var a=e||"";return n+String(i)+a+Dd(o,2)}function tp(t,e){return t%60==0?(t>0?"-":"+")+Dd(Math.abs(t)/60,2):ep(t,e)}function ep(t,e){var n=e||"",r=t>0?"-":"+",i=Math.abs(t);return r+Dd(Math.floor(i/60),2)+n+Dd(i%60,2)}function np(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}}function rp(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}}var ip={p:rp,P:function(t,e){var n,r=t.match(/(P+)(p+)?/),i=r[1],o=r[2];if(!o)return np(t,e);switch(i){case"P":n=e.dateTime({width:"short"});break;case"PP":n=e.dateTime({width:"medium"});break;case"PPP":n=e.dateTime({width:"long"});break;case"PPPP":default:n=e.dateTime({width:"full"})}return n.replace("{{date}}",np(i,e)).replace("{{time}}",rp(o,e))}},op=["D","DD"],ap=["YY","YYYY"];function sp(t){return-1!==op.indexOf(t)}function up(t){return-1!==ap.indexOf(t)}function cp(t){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` for formatting years; see: https://git.io/fxCyr");if("YY"===t)throw new RangeError("Use `yy` instead of `YY` for formatting years; see: https://git.io/fxCyr");if("D"===t)throw new RangeError("Use `d` instead of `D` for formatting days of the month; see: https://git.io/fxCyr");if("DD"===t)throw new RangeError("Use `dd` instead of `DD` for formatting days of the month; see: https://git.io/fxCyr")}var lp=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,hp=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,fp=/^'([^]*?)'?$/,dp=/''/g,pp=/[a-zA-Z]/;function gp(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=String(e),i=n||{},o=i.locale||Cd,a=o.options&&o.options.firstWeekContainsDate,s=null==a?1:rd(a),u=null==i.firstWeekContainsDate?s:rd(i.firstWeekContainsDate);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var c=o.options&&o.options.weekStartsOn,l=null==c?0:rd(c),h=null==i.weekStartsOn?l:rd(i.weekStartsOn);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!o.localize)throw new RangeError("locale must contain localize property");if(!o.formatLong)throw new RangeError("locale must contain formatLong property");var f=nd(t);if(!vd(f))throw new RangeError("Invalid time value");var d=sd(f),p=Pd(f,d),g={firstWeekContainsDate:u,weekStartsOn:h,locale:o,_originalDate:f},v=r.match(hp).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,ip[e])(t,o.formatLong,g):t})).join("").match(lp).map((function(t){if("''"===t)return"'";var e=t[0];if("'"===e)return vp(t);var n=Kd[e];if(n)return!i.useAdditionalWeekYearTokens&&up(t)&&cp(t),!i.useAdditionalDayOfYearTokens&&sp(t)&&cp(t),n(p,t,o.localize,g);if(e.match(pp))throw new RangeError("Format string contains an unescaped latin alphabet character `"+e+"`");return t})).join("");return v}function vp(t){return t.match(fp)[1].replace(dp,"'")}function mp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=rd(e);return id(t,-n)}function yp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=rd(e);return ad(t,-n)}function _p(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=rd(e);return ld(t,-n)}function bp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=rd(e);return fd(t,-n)}function xp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=rd(e);return dd(t,-n)}function wp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=rd(e);return pd(t,-n)}var Tp=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 d(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.findDomainAndRangeAxes(),this.determineOrientation(),Object.keys(v).map((function(t){return v[t]})).forEach((function(t){e.scales[t]=e.createScale(t)}))},e.prototype.findDomainAndRangeAxes=function(){var t=this.findMainVerticalAxisPosition(),e=this.findMainHorizontalAxisPosition(),n=this.findDomainAndRangeAxesPositions(t,e);this.domainAxisPosition=n.domainAxisPosition,this.rangeAxisPosition=n.rangeAxisPosition},e.prototype.determineOrientation=function(){this.rangeAxisPosition===v.LEFT&&this.domainAxisPosition===v.BOTTOM?this.orientation=m.VERTICAL:this.orientation=m.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=[v.BOTTOM,v.TOP];return[this.domainAxisPosition,this.rangeAxisPosition].find((function(e){return t.indexOf(e)>-1}))},e.prototype.getMainYAxisPosition=function(){var t=[v.LEFT,v.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=this.model.getOptions(),i=Rr.getProperty(r,"axes",t),o=this.scaleTypes[t],a=this.scales[t],s=i.mapsTo,u=void 0!==e[s]?e[s]:e;return o===y.LABELS?a(u)+a.step()/2:o===y.TIME?a(new Date(u)):a(u)},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.getDomainIdentifier=function(){var t=this.model.getOptions();return Rr.getProperty(t,"axes",this.domainAxisPosition).mapsTo},e.prototype.getRangeIdentifier=function(){var t=this.model.getOptions();return Rr.getProperty(t,"axes",this.rangeAxisPosition).mapsTo},e.prototype.getDataFromDomain=function(t){var e=this.model.getDisplayData(),n=this.getDomainIdentifier();return this.scaleTypes[this.domainAxisPosition]===y.TIME?e.filter((function(e){var r=e[n];return"string"!=typeof r&&void 0!==r.getTime||(r=new Date(r)),r.getTime()===t.getTime()})):e.filter((function(e){return e[n]===t}))},e.prototype.extendsDomain=function(t,e){var n=this.model.getOptions();return Rr.getProperty(n,"axes",t).scaleType===y.TIME?function(t,e){var n=new Date(t[0]),r=new Date(t[1]);if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=nd(t),r=nd(e),i=gd(n,r),o=Math.abs(yd(n,r));n.setFullYear(n.getFullYear()-i*o);var a=gd(n,r)===-i,s=i*(o-a);return 0===s?0:s}(r,n)>1)return[wp(n,e),pd(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=nd(t),r=nd(e),i=gd(n,r),o=Math.abs(md(n,r));n.setMonth(n.getMonth()-i*o);var a=gd(n,r)===-i,s=i*(o-a);return 0===s?0:s}(r,n)>1)return[bp(n,e),fd(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=nd(t),r=nd(e),i=gd(n,r),o=Math.abs(cd(n,r));n.setDate(n.getDate()-i*o);var a=gd(n,r)===-i,s=i*(o-a);return 0===s?0:s}(r,n)>1)return[mp(n,e),id(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=_d(t,e)/36e5;return n>0?Math.floor(n):Math.ceil(n)}(r,n)>1)return[yp(n,e),ad(r,e)];if(bd(r,n)>30)return[_p(n,30*e),ld(r,30*e)];if(bd(r,n)>1)return[_p(n,e),ld(r,e)];if(xd(r,n)>15)return[xp(n,15*e),dd(r,15*e)];if(xd(r,n)>1)return[xp(n,e),dd(r,e)];return[n,r]}(e,Rr.getProperty(n,"timeScale","addSpaceOnEdges")):function(t,e){var n=t[0],r=t[1],i=(r-n)*e;return[n>=0&&n-i<0?0:n-i,r<=0&&r+i>0?0:r+i]}(e,vi.paddingRatio)},e.prototype.findMainVerticalAxisPosition=function(){var t=this.model.getOptions(),e=Rr.getProperty(t,"axes");return!0===Rr.getProperty(e,v.RIGHT,"main")?v.RIGHT:v.LEFT},e.prototype.findMainHorizontalAxisPosition=function(){var t=this.model.getOptions(),e=Rr.getProperty(t,"axes");return!0===Rr.getProperty(e,v.TOP,"main")?v.TOP:v.BOTTOM},e.prototype.findDomainAndRangeAxesPositions=function(t,e){var n=this.model.getOptions(),r=Rr.getProperty(n,"axes",t),i=Rr.getProperty(n,"axes",e),o=r.scaleType||y.LINEAR,a=i.scaleType||y.LINEAR,s={domainAxisPosition:null,rangeAxisPosition:null};return a===y.LABELS||a===y.TIME?(s.domainAxisPosition=e,s.rangeAxisPosition=t):o===y.LABELS||o===y.TIME?(s.domainAxisPosition=t,s.rangeAxisPosition=e):(s.domainAxisPosition=e,s.rangeAxisPosition=t),s},e.prototype.getScaleDomain=function(t){var e,n,r=this.model.getOptions(),i=Rr.getProperty(r,"axes",t),o=i.includeZero,a=Rr.getProperty(i,"scaleType")||y.LINEAR,s=this.model.getDisplayData(),u=i.mapsTo;if(i.domain)return i.domain;if(i&&a===y.LABELS)return eo(s,(function(t){return t[u]})).keys();i.stacked?n=this.model.getDataValuesGroupedByKeys().map((function(t){return function(t,e){var n,r=t.length,i=-1,o=0;if(null==e)for(;++i<r;)(n=+t[i])&&(o+=n);else for(;++i<r;)(n=+e(t[i],i,t))&&(o+=n);return o}(function(t){var e=[];for(var n in t)e.push(t[n]);return e}(t))})):n=s.map((function(t){return t[u]}));return a!==y.TIME&&o&&n.push(0),e=zi(n),e=this.extendsDomain(t,e)},e.prototype.createScale=function(t){var e=this.model.getOptions(),n=Rr.getProperty(e,"axes",t);if(!n)return null;var r,i=Rr.getProperty(n,"scaleType")||y.LINEAR;return this.scaleTypes[t]=i,(r=i===y.TIME?function(){return Ji.apply(Pu(os,is,es,Ja,Ka,Qa,Za,$a,vs).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}():i===y.LOG?function t(){var e=Wa(ya()).domain([1,10]);return e.copy=function(){return ma(e,t()).base(e.base())},Ji.apply(e,arguments),e}().base(n.base||10):i===y.LABELS?co():Na()).domain(this.getScaleDomain(t)),r},e}(sl);var Ep,Op,Mp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.curveTypes={curveLinear:ic,curveLinearClosed:Fc,curveBasis:yc,curveBasisClosed:bc,curveBasisOpen:wc,curveBundle:Ec,curveCardinal:Sc,curveCardinalClosed:Cc,curveCardinalOpen:Dc,curveCatmullRom:Rc,curveCatmullRomClosed:jc,curveCatmullRomOpen:Uc,curveMonotoneX:Xc,curveMonotoneY:$c,curveNatural:Kc,curveStep:tl,curveStepAfter:nl,curveStepBefore:el},e}return d(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}(sl),Sp=function(){function t(t,e,n){this.configs={},this.model=t,this.services=e,n&&(this.configs=n),this.parent||this.setParent(mh(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=Rr.getProperty(this.model.getOptions(),"style","prefix");this.parent.classed(bh.prefix+"--"+n+"--"+this.type,!0),e&&e.classed(bh.prefix+"--"+n+"--"+this.type,!1)}},t.prototype.getParent=function(){return this.parent},t.prototype.getContainerSVG=function(){if(this.type){var t=Rr.getProperty(this.model.getOptions(),"style","prefix");return Gh.appendOrSelect(this.parent,"g."+bh.prefix+"--"+t+"--"+this.type)}return this.parent},t}(),Ap=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="legend",e}return d(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.model.getDataGroups(),(function(t){return t.name})),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.status===r.legend.items.status.ACTIVE?t.model.getStrokeColor(e.name):null})).classed("active",(function(t,e){return t.status===r.legend.items.status.ACTIVE})),o.append("text").merge(i.select("text")).html((function(t){return t.name})).attr("alignment-baseline","middle"),this.breakItemsIntoLines(o),i.exit().on("mouseover",null).on("click",null).on("mouseout",null).remove();var s=Rr.getProperty(this.model.getOptions(),"legend","clickable");n.classed("clickable",s),s&&o.size()>0&&this.addEventListeners()},n.prototype.breakItemsIntoLines=function(t){var e=this,n=this.getContainerSVG(),r=this.model.getOptions(),i=r.legend.checkbox.radius,o=r.legend.items.horizontalSpace,a=r.legend.items.verticalSpace,s=r.legend.items.textYOffset,u=2*i+r.legend.checkbox.spaceAfter,c=r.legend.items.status.DISABLED,l=this.model.getDataGroups().some((function(t){return t.status===c})),h=Rr.getProperty(r,"legend","orientation"),f=0,d=0,p=0;t.merge(n.selectAll("g.legend-item")).each((function(t,r){var c=mh(this),g=mh(n.selectAll("g.legend-item").nodes()[r-1]);if(0===p||g.empty()||h===w.VERTICAL)h===w.VERTICAL&&0!==r&&d++;else{var v=Gh.getSVGElementSize(e.parent,{useAttr:!0}),m=Gh.getSVGElementSize(mh(this).select("text"),{useBBox:!0}),y=Gh.getSVGElementSize(g.select("text"),{useBBox:!0});(f=f+y.width+u+o)+u+m.width>v.width&&(d++,f=0,p=0)}c.select("rect.checkbox").attr("x",f).attr("y",0+d*a);var _=s+d*a;c.select("text").attr("x",f+u).attr("y",0+_),l&&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*i-1).attr("height",2*i-1).attr("x",parseFloat(c.select("rect.checkbox").attr("x"))+.5).attr("y",parseFloat(c.select("rect.checkbox").attr("y"))+.5)):l||c.select("g.check").empty()||c.select("g.check").remove(),p++}))},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(A.Legend.ITEM_HOVER,{hoveredElement:mh(this)});var e=n.legend.checkbox.radius,r=mh(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(A.Legend.ITEM_CLICK,{clickedElement:mh(this)});var e=mh(this).datum();t.model.toggleDataLabel(e.name)})).on("mouseout",(function(){var e=mh(this);e.select("rect.hover-stroke").remove(),t.services.events.dispatchEvent(A.Legend.ITEM_MOUSEOUT,{hoveredElement:e})}))},n}(Sp),Cp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="title",e}return d(e,t),e.prototype.truncateTitle=function(){var t=Gh.getSVGElementSize(this.services.domUtils.getMainSVG(),{useAttr:!0}).width,e=Gh.appendOrSelect(this.parent,"text.title");if(!(t<=0)&&e.node().getComputedTextLength()>t){e.append("tspan").text("...");var n=Gh.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.html(i.substring(0,o-1)).append("tspan").text("...");var a=this;e.on("mouseenter",(function(){a.services.events.dispatchEvent(A.Tooltip.SHOW,{hoveredElement:e,type:b.TITLE})})).on("mouseout",(function(){a.services.events.dispatchEvent(A.Tooltip.HIDE,{hoveredElement:e})}))}},e.prototype.render=function(){var t=this.getContainerSVG();Gh.appendOrSelect(t,"text.title").attr("x",0).attr("y",20).html(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}(Sp);!function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(Op||(Op={}));var Pp=((Ep={})[Op.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)}},Ep[Op.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)}},Ep[Op.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)}},Ep[Op.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)}},Ep),Dp="undefined"!=typeof window?window:{innerHeight:0,scrollY:0,innerWidth:0,scrollX:0},kp=function(){function t(t){void 0===t&&(t={}),this.positions=Pp,this.positions=Object.assign({},Pp,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,c=s.right-r().width;u=u<0?e.offsetHeight:u,c=c<0?e.offsetWidth:c;var l=e.offsetHeight*e.offsetWidth,h=l-u*c;return{placement:n,weight:(h=0===h?l:h)/l}}));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:Dp.innerHeight-Dp.scrollY,height:Dp.innerWidth-Dp.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}(),Lp=(new kp,function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="tooltip",i.positionService=new kp,i.init(),i}return d(e,t),e.prototype.init=function(){var t=this,e=mh(this.services.domUtils.getHolder()),n=Rr.getProperty(this.model.getOptions(),"style","prefix");this.tooltip=Gh.appendOrSelect(e,"div."+bh.prefix+"--"+n+"--tooltip");var r=Gh.appendOrSelect(this.tooltip,"div.content-box");this.tooltip.style("max-width",null),this.services.events.addEventListener(A.Tooltip.SHOW,(function(i){if(i.detail.type===b.DATAPOINT&&Rr.getProperty(t.model.getOptions(),"tooltip","datapoint","enabled")||i.detail.type===b.GRIDLINE&&Rr.getProperty(t.model.getOptions(),"tooltip","gridline","enabled")){var o=mh(oh.target).datum(),a=void 0;i.detail.multidata?(o=i.detail.multidata,a=t.getMultilineTooltipHTML(o)):a=t.getTooltipHTML(o,b.DATAPOINT),Rr.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===b.TITLE){var s=Gh.appendOrSelect(e,"svg."+bh.prefix+"--"+n+"--chart-svg"),u=Gh.getSVGElementSize(s).width*Rr.getProperty(t.model.getOptions(),"tooltip","title","width");t.tooltip.style("max-width",u),r.html(t.getTooltipHTML(i.detail.hoveredElement,b.TITLE));var c=t.getTooltipPosition(i.detail.hoveredElement.node());t.positionTooltip(c)}t.tooltip.classed("hidden",!1)})),this.services.events.addEventListener(A.Tooltip.HIDE,(function(){t.tooltip.classed("hidden",!0)}))},e.prototype.getTooltipHTML=function(t,e){if(e===b.TITLE)return'<div class="title-tooltip"><text>'+this.model.getOptions().title+"</text></div>";var n=Rr.getProperty(t,"data")?t.data:t,r=this.model.getOptions().data.groupMapsTo,i=this.services.cartesianScales.getRangeIdentifier(),o=Rr.getProperty(this.model.getOptions(),"tooltip","valueFormatter")?this.model.getOptions().tooltip.valueFormatter(n[i]):n[i].toLocaleString("en");return'<div class="datapoint-tooltip">\n\t\t\t\t\t<p class="label">'+n[r]+'</p>\n\t\t\t\t\t<p class="value">'+o+"</p>\n\t\t\t\t</div>"},e.prototype.getMultilineTooltipHTML=function(t){var e=this;t.sort((function(t,e){return e.value-t.value}));this.services.cartesianScales.getDomainScale().scaleType;return"<ul class='multi-tooltip'>"+t.map((function(t){var n=e.model.getOptions().data.groupMapsTo,r=e.services.cartesianScales.getRangeIdentifier(),i=Rr.getProperty(e.model.getOptions(),"tooltip","valueFormatter"),o=i?i(t[r]):t[r].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[n])+'" class="tooltip-color"></a>\n\t\t\t\t\t\t<p class="label">'+t[n]+'</p>\n\t\t\t\t\t\t<p class="value">'+o+"</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=mh(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:_.BOTTOM,position:i}},e.prototype.positionTooltip=function(t){var e,n=this.services.domUtils.getHolder(),r=this.tooltip.node(),i=_h(n);if(t){var o=t.placement===_.TOP?Op.TOP:Op.BOTTOM;e=this.positionService.findPositionAt(t.position,r,o)}else{var a=this.positionService.findBestPlacementAt({left:i[0],top:i[1]},r,[Op.RIGHT,Op.LEFT,Op.TOP,Op.BOTTOM],(function(){return{width:n.offsetWidth,height:n.offsetHeight}})),s=this.model.getOptions().tooltip.datapoint.horizontalOffset;a===Op.LEFT&&(s*=-1),e=this.positionService.findPositionAt({left:i[0]+s,top:i[1]},r,a)}this.positionService.setElement(r,e)},e}(Sp)),Rp=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return d(e,t),e.prototype.init=function(){var e=this,n=mh(this.services.domUtils.getHolder()),r=Rr.getProperty(this.model.getOptions(),"style","prefix");this.tooltip=Gh.appendOrSelect(n,"div."+bh.prefix+"--"+r+"--tooltip");var i=Gh.appendOrSelect(this.tooltip,"div.content-box");this.tooltip.style("max-width",null),this.services.events.addEventListener(A.Tooltip.SHOW,(function(o){if(o.detail.type===b.DATAPOINT&&Rr.getProperty(e.model.getOptions(),"tooltip","datapoint","enabled")||o.detail.type===b.GRIDLINE&&Rr.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)):(a=o.detail.data?o.detail.data:o.detail.hoveredElement.datum(),u=e.getTooltipHTML(a)),Rr.getProperty(e.model.getOptions(),"tooltip","customHTML")?i.html(e.model.getOptions().tooltip.customHTML(a,u)):i.html(u);var c=e.getTooltipPosition(s,a);e.positionTooltip(o.detail.multidata?void 0:c)}else if(o.detail.type===b.TITLE){var l=Gh.appendOrSelect(n,"svg."+bh.prefix+"--"+r+"--chart-svg"),h=Gh.getSVGElementSize(l).width*Rr.getProperty(e.model.getOptions(),"tooltip","title","width");e.tooltip.style("max-width",h),i.html(t.prototype.getTooltipHTML.call(e,o.detail.hoveredElement,b.TITLE));c=t.prototype.getTooltipPosition.call(e,o.detail.hoveredElement.node());e.positionTooltip(c)}e.tooltip.classed("hidden",!1)})),this.services.events.addEventListener(A.Tooltip.HIDE,(function(){e.tooltip.classed("hidden",!0)}))},e.prototype.getTooltipPosition=function(t,e){void 0===e&&(e=mh(t).datum());var n=mh(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:_.BOTTOM,position:o}}o={left:r.left-n.left+r.width/2,top:r.top-n.top-i};return{placement:_.TOP,position:o}},e.prototype.getTooltipHTML=function(t){return'<div class="datapoint-tooltip"><p class="value">'+(Rr.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()===m.VERTICAL&&n.reverse();var r=n.reduce((function(t,e){return t+e.value}),0);return r=Rr.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=Rr.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}(Lp),Ip=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return d(e,t),e.prototype.getTooltipHTML=function(t,e){if(e===b.TITLE)return'<div class="title-tooltip"><text>'+this.model.getOptions().title+"</text></div>";var n=t.data,r=this.model.getOptions().data.groupMapsTo,i=Rr.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<p class="label">'+n[r]+'</p>\n\t\t\t\t<p class="value">'+i+"</p>\n\t\t\t</div>"},e}(Lp),jp=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return d(e,t),e.prototype.getTooltipHTML=function(e,n){if(n===b.TITLE)return t.prototype.getTooltipHTML.call(this,e,n);var r=this.model.getOptions().data.groupMapsTo,i=this.services.cartesianScales.getRangeIdentifier(),o=Rr.getProperty(this.model.getOptions(),"tooltip","valueFormatter"),a=o?o(e[i]):e[i].toLocaleString("en");return'\n\t\t\t<div class="datapoint-tooltip">\n\t\t\t\t<a style="background-color:'+this.model.getStrokeColor(e[r])+'" class="tooltip-color"></a>\n\t\t\t\t<p class="label">'+e[r]+'</p>\n\t\t\t\t<p class="value">'+a+"</p>\n\t\t\t</div>"},e}(Lp),Np=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return d(e,t),e.prototype.getMultilineTooltipHTML=function(t){var e=this,n=this.model.getOptions(),r=n.data.groupMapsTo,i=n.radar.axes,o=(i.angle,i.value);return t.sort((function(t,e){return e[o]-t[o]})),"<ul class='multi-tooltip'>"+t.map((function(t){var i=Rr.getProperty(n,"tooltip","valueFormatter"),a=i?i(t[o]):t[o];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[r])+'" class="tooltip-color"></a>\n\t\t\t\t\t\t<p class="label">'+t[r]+'</p>\n\t\t\t\t\t\t<p class="value">'+a+"</p>\n\t\t\t\t\t</div>\n\t\t\t\t</li>"})).join("")+"</ul>"},e}(Lp),Up=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return d(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}(Sp),Hp=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,r=e.model.getOptions().data.groupMapsTo;e.parent.selectAll("path.bar").transition(e.services.transitions.getTransition("legend-hover-simple-bar")).attr("opacity",(function(t){return t[r]!==n.datum().name?.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 d(n,t),n.prototype.init=function(){var t=this.services.events;t.addEventListener(A.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(A.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},n.prototype.render=function(t){var n=this,r=this.model.getOptions().data.groupMapsTo,i=this.getContainerSVG().selectAll("path.bar").data(this.model.getDisplayData(),(function(t){return t[r]}));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.getFillColor(t[r])})).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 Rr.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.addEventListeners=function(){var t=this.model.getOptions().data.groupMapsTo,e=this;this.parent.selectAll("path.bar").on("mouseover",(function(t){var n=mh(this);n.classed("hovered",!0),n.transition(e.services.transitions.getTransition("graph_element_mouseover_fill_update")).attr("fill",So(n.attr("fill")).darker(.7).toString()),e.services.events.dispatchEvent(A.Bar.BAR_MOUSEOVER,{element:n,datum:t}),e.services.events.dispatchEvent(A.Tooltip.SHOW,{hoveredElement:n,type:b.DATAPOINT})})).on("mousemove",(function(t){e.services.events.dispatchEvent(A.Bar.BAR_MOUSEMOVE,{element:mh(this),datum:t})})).on("click",(function(t){e.services.events.dispatchEvent(A.Bar.BAR_CLICK,{element:mh(this),datum:t})})).on("mouseout",(function(n){var r=mh(this);r.classed("hovered",!1),r.transition(e.services.transitions.getTransition("graph_element_mouseout_fill_update")).attr("fill",(function(n){return e.model.getFillColor(n[t])})),e.services.events.dispatchEvent(A.Bar.BAR_MOUSEOUT,{element:r,datum:n}),e.services.events.dispatchEvent(A.Tooltip.HIDE,{hoveredElement:r})}))},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(A.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(A.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},n}(Up),Fp=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grouped-bar",e.padding=5,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.model.getOptions().data.groupMapsTo;e.parent.selectAll("path.bar").transition(e.services.transitions.getTransition("legend-hover-bar")).attr("opacity",(function(t){return t[r]!==n.datum().name?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.bar").transition(e.services.transitions.getTransition("legend-mouseout-bar")).attr("opacity",1)},e}return d(n,t),n.prototype.init=function(){var t=this.services.events;t.addEventListener(A.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(A.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},n.prototype.render=function(t){var n=this,r=this.model.getDisplayData(),i=this.model.getOptions().data.groupMapsTo,o=this.services.cartesianScales.getDomainIdentifier();this.setGroupScale();var a=this.getContainerSVG(),s=eo(r,(function(t){return t[o]})).keys(),u=a.selectAll("g.bars").data(s,(function(t){return t}));u.exit().attr("opacity",0).remove();var c=u.enter().append("g").classed("bars",!0).attr("role",e.GROUP).attr("aria-labelledby",(function(t){return t})).merge(u).attr("transform",(function(t,e){var r=n.services.cartesianScales.getDomainValue(t,e)-n.getGroupWidth()/2;return n.services.cartesianScales.getOrientation()===m.VERTICAL?"translate("+r+", 0)":"translate(0, "+r+")"})).selectAll("path.bar").data((function(t){return n.getDataCorrespondingToLabel(t)}));c.exit().attr("opacity",0).remove(),c.enter().append("path").attr("opacity",0).merge(c).classed("bar",!0).transition(this.services.transitions.getTransition("bar-update-enter",t)).attr("fill",(function(t){return n.model.getFillColor(t[i])})).attr("d",(function(t){var e=n.groupScale(t[i]),r=e,o=e+n.getBarWidth(),a=n.services.cartesianScales.getRangeValue(0),s=n.services.cartesianScales.getRangeValue(t.value);return Rr.generateSVGPathString({x0:r,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.addEventListeners=function(){var t=this;this.parent.selectAll("path.bar").on("mouseover",(function(e){var n=mh(this);n.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")).attr("fill",So(n.attr("fill")).darker(.7).toString()),t.services.events.dispatchEvent(A.Bar.BAR_MOUSEOVER,{element:n,datum:e}),t.services.events.dispatchEvent(A.Tooltip.SHOW,{hoveredElement:n,type:b.DATAPOINT})})).on("mousemove",(function(e){t.services.events.dispatchEvent(A.Bar.BAR_MOUSEMOVE,{element:mh(this),datum:e})})).on("click",(function(e){t.services.events.dispatchEvent(A.Bar.BAR_CLICK,{element:mh(this),datum:e})})).on("mouseout",(function(e){var n=mh(this);n.classed("hovered",!1);var r=t.model.getOptions().data.groupMapsTo;n.transition(t.services.transitions.getTransition("graph_element_mouseout_fill_update")).attr("fill",(function(e){return t.model.getFillColor(e[r])})),t.services.events.dispatchEvent(A.Bar.BAR_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(A.Tooltip.HIDE,{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(A.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(A.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},n.prototype.getDataCorrespondingToLabel=function(t){var e=this.model.getDisplayData(),n=this.services.cartesianScales.getDomainIdentifier();return e.filter((function(e){return e[n]===t}))},n.prototype.getGroupWidth=function(){var t=this.model.getActiveDataGroupNames().length,e=this.getTotalGroupPadding();return this.getBarWidth()*t+e},n.prototype.getTotalGroupPadding=function(){var t=this.model.getActiveDataGroupNames().length;if(1===t)return 0;var e=this.services.cartesianScales.getDomainScale();return Math.min(5,e.step()/70*5)*(t-1)},n.prototype.getBarWidth=function(){var t=this.model.getOptions(),e=Rr.getProperty(t,"bars","width"),n=Rr.getProperty(t,"bars","maxWidth");if(null!==e){if(null===n)return e;if(e<=n)return e}var r=this.model.getActiveDataGroupNames().length,i=this.getTotalGroupPadding(),o=this.services.cartesianScales.getDomainScale();return Math.min(n,(o.step()-i)/r)},n.prototype.setGroupScale=function(){this.groupScale=co().domain(this.model.getActiveDataGroupNames()).rangeRound([0,this.getGroupWidth()])},n}(Up),Bp=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 d(n,t),n.prototype.init=function(){var t=this.services.events;t.addEventListener(A.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(A.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},n.prototype.render=function(t){var n=this,r=this.getContainerSVG(),i=this.model.getDisplayData(),o=this.model.getOptions(),a=o.data.groupMapsTo,s=this.services.cartesianScales.getDomainIdentifier(),u=eo(i,(function(t){return t[s]})).keys(),c=this.model.getStackedData(),l=r.selectAll("g.bars").data(c,(function(t){return t.key}));l.exit().attr("opacity",0).remove(),l.enter().append("g").classed("bars",!0).attr("role",e.GROUP);var h=r.selectAll("g.bars").selectAll("path.bar").data((function(t){return t}));h.exit().remove(),h.enter().append("path").merge(h).classed("bar",!0).transition(this.services.transitions.getTransition("bar-update-enter",t)).attr("fill",(function(t){return n.model.getFillColor(t[a])})).attr("d",(function(t,e){var r=u[e],i=n.getBarWidth(),a=n.services.cartesianScales.getDomainValue(r,e)-i/2,s=a+i,c=n.services.cartesianScales.getRangeValue(t[0],e),l=n.services.cartesianScales.getRangeValue(t[1],e);return Math.abs(l-c)>0&&Math.abs(l-c)>o.bars.dividerSize&&(n.services.cartesianScales.getOrientation()===m.VERTICAL?l+=1:l-=1),Rr.generateSVGPathString({x0:a,x1:s,y0:c,y1:l},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.model.getOptions().data.groupMapsTo,e=this;this.parent.selectAll("path.bar").on("mouseover",(function(t){var n=mh(this);n.transition(e.services.transitions.getTransition("graph_element_mouseover_fill_update")).attr("fill",So(n.attr("fill")).darker(.7).toString()),e.services.events.dispatchEvent(A.Bar.BAR_MOUSEOVER,{element:n,datum:t})})).on("mousemove",(function(t){var n,r=e.model.getDisplayData(),i=mh(this),o=e.services.cartesianScales.getDomainIdentifier(),a=e.services.cartesianScales.getRangeIdentifier(),s=e.model.getOptions().data.groupMapsTo,u=r.find((function(e){return e[a]===t.data[t.group]&&e[o].toString()===t.data.sharedStackKey&&e[s]===t.group}));void 0===u&&((n={})[o]=t.data.sharedStackKey,n[a]=t.data[t.group],n[s]=t.group,u=n),e.services.events.dispatchEvent(A.Tooltip.SHOW,{hoveredElement:i,data:u,type:b.DATAPOINT})})).on("click",(function(t){e.services.events.dispatchEvent(A.Bar.BAR_CLICK,{element:mh(this),datum:t})})).on("mouseout",(function(n){var r=mh(this);r.classed("hovered",!1),r.transition(e.services.transitions.getTransition("graph_element_mouseout_fill_update")).attr("fill",(function(n){return e.model.getFillColor(n[t])})),e.services.events.dispatchEvent(A.Bar.BAR_MOUSEOUT,{element:r,datum:n}),e.services.events.dispatchEvent(A.Tooltip.HIDE,{hoveredElement:r})}))},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(A.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(A.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},n}(Up),Vp=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,r=e.model.getOptions().data.groupMapsTo;e.parent.selectAll("circle.dot").transition(e.services.transitions.getTransition("legend-hover-scatter")).attr("opacity",(function(t){return t[r]!==n.datum().name?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("circle.dot").transition(e.services.transitions.getTransition("legend-mouseout-scatter")).attr("opacity",1)},e}return d(n,t),n.prototype.init=function(){var t=this.services.events;t.addEventListener(A.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(A.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},n.prototype.render=function(t){var n=this.getContainerSVG(),r=this.model.getGroupedData(),i=n.selectAll("g.dots").data(r,(function(t){return t.name}));i.exit().attr("opacity",0).remove();var o=i.enter().append("g").classed("dots",!0).attr("role",e.GROUP),a=this.services.cartesianScales.getRangeIdentifier(),s=o.merge(i).selectAll("circle.dot").data((function(t){return t.data.filter((function(t){return null!==t[a]&&void 0!==t[a]}))})),u=s.enter().append("circle").attr("opacity",0).merge(s);this.styleCircles(u,t),this.addEventListeners()},n.prototype.styleCircles=function(t,n){var r=this,i=this.model.getOptions(),o=i.points.filled,a=this.services,s=a.cartesianScales,u=a.transitions,c=i.data.groupMapsTo,l=s.getDomainIdentifier(),h=s.getRangeIdentifier(),f=Rr.flipDomainAndRangeBasedOnOrientation((function(t,e){return s.getDomainValue(t,e)}),(function(t,e){return s.getRangeValue(t,e)}),s.getOrientation()),d=f[0],p=f[1];t.raise().classed("dot",!0).classed("filled",(function(t){return r.model.getIsFilled(t[c],t[l],t,o)})).classed("unfilled",(function(t){return!r.model.getIsFilled(t[c],t[l],t,o)})).attr("cx",d).transition(u.getTransition("scatter-update-enter",n)).attr("cy",p).attr("r",i.points.radius).attr("fill",(function(t){if(r.model.getIsFilled(t[c],t[l],t,o))return r.model.getFillColor(t[c],t[l],t)})).attr("fill-opacity",o?.2:1).attr("stroke",(function(t){return r.model.getStrokeColor(t[c],t[l],t)})).attr("opacity",1).attr("role",e.GRAPHICS_SYMBOL).attr("aria-roledescription","point").attr("aria-label",(function(t){return t[h]})),this.addEventListeners()},n.prototype.addEventListeners=function(){var t=this,e=this.model.getOptions().data.groupMapsTo,n=this.services.cartesianScales.getDomainIdentifier();this.parent.selectAll("circle").on("mouseover mousemove",(function(r){var i=mh(this);i.classed("hovered",!0).style("fill",(function(r){return t.model.getFillColor(r[e],r[n],r)}));var o="mouseover"===oh.type?A.Scatter.SCATTER_MOUSEOVER:A.Scatter.SCATTER_MOUSEMOVE;t.services.events.dispatchEvent(o,{element:i,datum:r}),t.services.events.dispatchEvent(A.Tooltip.SHOW,{hoveredElement:i,type:b.DATAPOINT})})).on("click",(function(e){t.services.events.dispatchEvent(A.Scatter.SCATTER_CLICK,{element:mh(this),datum:e})})).on("mouseout",(function(e){var n=mh(this);n.classed("hovered",!1),t.configs.filled||n.style("fill",null),t.services.events.dispatchEvent(A.Scatter.SCATTER_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(A.Tooltip.HIDE,{hoveredElement:n})}))},n.prototype.destroy=function(){this.parent.selectAll("circle").on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(A.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(A.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},n}(Sp),Gp=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="bubble",e}return d(n,t),n.prototype.getRadiusScale=function(t){var e=this.model.getOptions(),n=e.bubble.radiusMapsTo,r=t.data(),i=r.map((function(t){return t[n]})).filter((function(t){return t})),o=Gh.getSVGElementSize(this.services.domUtils.getMainSVG(),{useAttr:!0}),a=i.length>0,s=a?zi(i):[1,1];return Na().domain(s).range(a?e.bubble.radiusRange(o,r):[4,4])},n.prototype.styleCircles=function(t,n){var r=this,i=this.model.getOptions(),o=i.bubble.radiusMapsTo,a=this.getRadiusScale(t),s=i.data.groupMapsTo,u=this.services.cartesianScales.getDomainIdentifier();t.raise().classed("dot",!0).attr("role",e.GRAPHICS_SYMBOL).attr("cx",(function(t,e){return r.services.cartesianScales.getDomainValue(t,e)})).transition(this.services.transitions.getTransition("bubble-update-enter",n)).attr("cy",(function(t,e){return r.services.cartesianScales.getRangeValue(t,e)})).attr("r",(function(t){return a(t[o]||1)})).attr("fill",(function(t){return r.model.getFillColor(t[s],t[u],t)})).attr("fill-opacity",i.bubble.fillOpacity).attr("stroke",(function(t){return r.model.getStrokeColor(t[s],t[u],t)})).attr("opacity",1)},n}(Vp),zp=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="line",e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("g.lines").transition(e.services.transitions.getTransition("legend-hover-line")).attr("opacity",(function(t){return t.name!==n.datum().name?pi.opacity.unselected:pi.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("g.lines").transition(e.services.transitions.getTransition("legend-mouseout-line")).attr("opacity",pi.opacity.selected)},e}return d(n,t),n.prototype.init=function(){var t=this.services.events;t.addEventListener(A.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(A.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},n.prototype.render=function(t){var n=this;void 0===t&&(t=!0);var r=this.getContainerSVG(),i=this.services,o=i.cartesianScales,a=i.curves,s=Rr.flipDomainAndRangeBasedOnOrientation((function(t,e){return o.getDomainValue(t,e)}),(function(t,e){return o.getRangeValue(t,e)}),o.getOrientation()),u=s[0],c=s[1],l=sc().x(u).y(c).curve(a.getD3Curve()).defined((function(t,e){var n=t[o.getRangeIdentifier()];return null!=n})),h=this.model.getGroupedData(),f=r.selectAll("path.line").data(h,(function(t){return t.name}));f.exit().attr("opacity",0).remove(),f.enter().append("path").classed("line",!0).attr("opacity",0).merge(f).attr("stroke",(function(t,e){return n.model.getStrokeColor(t.name)})).attr("role",e.GRAPHICS_SYMBOL).attr("aria-roledescription","line").attr("aria-label",(function(t){var e=t.data,r=n.services.cartesianScales.getRangeIdentifier();return e.map((function(t){return t[r]})).join(",")})).transition(this.services.transitions.getTransition("line-update-enter",t)).attr("opacity",1).attr("d",(function(t){var e=t.data;return l(e)}))},n.prototype.destroy=function(){this.parent.selectAll("path").on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(A.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(A.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},n}(Sp);function Wp(t,e){var n=this,r=Ko(this._current,t);return function(t){return n._current=r(t),e(n._current)}}var Yp=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,r=e.model.getOptions().data.groupMapsTo;e.parent.selectAll("path.slice").transition(e.services.transitions.getTransition("legend-hover-bar")).attr("opacity",(function(t){return t.data[r]!==n.datum().name?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.slice").transition(e.services.transitions.getTransition("legend-mouseout-bar")).attr("opacity",1)},e}return d(n,t),n.prototype.init=function(){var t=this.services.events;t.addEventListener(A.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(A.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},n.prototype.getInnerRadius=function(){return this.model.getOptions().pie.innerRadius},n.prototype.render=function(t){void 0===t&&(t=!0);var n=this,r=this.getContainerSVG(),i=this.model.getDisplayData(),o=this.model.getOptions(),a=o.data.groupMapsTo,s=this.computeRadius();this.arc=nc().innerRadius(this.getInnerRadius()).outerRadius(s),this.hoverArc=nc().innerRadius(this.getInnerRadius()).outerRadius(s+o.pie.hoverArc.outerRadiusOffset);var u=function(){var t=cc,e=uc,n=null,r=ju(0),i=ju(Yu),o=ju(0);function a(a){var s,u,c,l,h,f=a.length,d=0,p=new Array(f),g=new Array(f),v=+r.apply(this,arguments),m=Math.min(Yu,Math.max(-Yu,i.apply(this,arguments)-v)),y=Math.min(Math.abs(m)/f,o.apply(this,arguments)),_=y*(m<0?-1:1);for(s=0;s<f;++s)(h=g[p[s]=s]=+t(a[s],s,a))>0&&(d+=h);for(null!=e?p.sort((function(t,n){return e(g[t],g[n])})):null!=n&&p.sort((function(t,e){return n(a[t],a[e])})),s=0,c=d?(m-f*_)/d:0;s<f;++s,v=l)u=p[s],l=v+((h=g[u])>0?h*c:0)+_,g[u]={data:a[u],index:s,value:h,startAngle:v,endAngle:l,padAngle:y};return g}return a.value=function(e){return arguments.length?(t="function"==typeof e?e:ju(+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:ju(+t),a):r},a.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:ju(+t),a):i},a.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:ju(+t),a):o},a}().value((function(t){return t.value})).sort(null).padAngle(o.pie.padAngle)(i).sort((function(t,e){return t.index-e.index})),c=Gh.appendOrSelect(r,"g.slices").attr("role",e.GROUP).selectAll("path.slice").data(u,(function(t){return t.data[a]}));c.exit().attr("opacity",0).remove(),c.enter().append("path").classed("slice",!0).attr("opacity",0).merge(c).attr("fill",(function(t){return n.model.getFillColor(t.data[a])})).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+", "+Rr.convertValueToPercentage(t.data.value,i)+"%"})).attrTween("d",(function(t){return Wp.bind(this)(t,n.arc)}));var l=u.filter((function(t){return t.value>0})),h=Gh.appendOrSelect(r,"g.labels").attr("role",e.GROUP).selectAll("text.pie-label").data(l,(function(t){return t.data[a]}));h.exit().attr("opacity",0).remove();var f=h.enter().append("text").classed("pie-label",!0),d=[];f.merge(h).style("text-anchor","middle").text((function(t){return o.pie.labels.formatter?o.pie.labels.formatter(t):Rr.convertValueToPercentage(t.data.value,i)+"%"})).datum((function(t){var e=s+7,n=(t.endAngle-t.startAngle)/2+t.startAngle,r=n/Math.PI*180,i=this.getComputedTextLength();return t.textOffsetX=i/2,t.textOffsetY=r>90&&r<270?10:0,t.xPosition=(t.textOffsetX+e)*Math.sin(n),t.yPosition=(t.textOffsetY+e)*-Math.cos(n),t})).attr("transform",(function(t,e){var n=l.length,r=(t.endAngle-t.startAngle)*(180/Math.PI);if(e>=n-2&&r<o.pie.callout.minSliceDegree){var i=void 0,a=void 0;return t.index===n-1?(i=t.xPosition+o.pie.callout.offsetX+o.pie.callout.textMargin+t.textOffsetX,a=t.yPosition-o.pie.callout.offsetY,t.direction=O.RIGHT,d.push(t)):(i=t.xPosition-o.pie.callout.offsetX-t.textOffsetX-o.pie.callout.textMargin,a=t.yPosition-o.pie.callout.offsetY,t.direction=O.LEFT,d.push(t)),"translate("+i+", "+a+")"}return"translate("+t.xPosition+", "+t.yPosition+")"})),this.renderCallouts(d);var p=s+o.pie.xOffset,g=s+o.pie.yOffset;d.length>0&&(g+=o.pie.yOffsetCallout),r.attr("transform","translate("+p+", "+g+")"),this.addEventListeners()},n.prototype.renderCallouts=function(t){var n=Gh.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===O.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 mh(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(n.selectAll("line.horizontal-line")).datum((function(t){return mh(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(A.Pie.SLICE_MOUSEOVER,{element:mh(this),datum:e})})).on("mousemove",(function(e){var n=mh(this);n.classed("hovered",!0).transition(t.services.transitions.getTransition("pie_slice_mouseover")).attr("d",t.hoverArc),t.services.events.dispatchEvent(A.Pie.SLICE_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(A.Tooltip.SHOW,{hoveredElement:n,type:b.DATAPOINT})})).on("click",(function(e){t.services.events.dispatchEvent(A.Pie.SLICE_CLICK,{element:mh(this),datum:e})})).on("mouseout",(function(e){var n=mh(this);n.classed("hovered",!1).transition(t.services.transitions.getTransition("pie_slice_mouseover")).attr("d",t.arc),t.services.events.dispatchEvent(A.Pie.SLICE_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(A.Tooltip.HIDE,{hoveredElement:n})}))},n.prototype.computeRadius=function(){var t=this.model.getOptions(),e=Gh.getSVGElementSize(this.parent,{useAttrs:!0}),n=e.width,r=e.height;return Math.min(n,r)/2+t.pie.radiusOffset},n}(Sp),qp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="donut",e}return d(e,t),e.prototype.render=function(e){void 0===e&&(e=!0),t.prototype.render.call(this,e);var n=this,r=Gh.appendOrSelect(this.getContainerSVG(),"g.center"),i=this.model.getOptions(),o=this.computeRadius();Gh.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(mh(this))})),Gh.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(Rr.getProperty(i,"donut","center","label"))},e.prototype.getInnerRadius=function(){return.75*this.computeRadius()},e.prototype.centerNumberTween=function(t){var e=this.model.getOptions(),n=Rr.getProperty(e,"donut","center","number");null===n&&(n=this.model.getDisplayData().reduce((function(t,e){return t+e.value}),0));var r=parseInt(t.text().replace(/[, ]+/g,""),10)||0,i=(r%1==0&&n%1==0?Jo:qo)(r,n);return function(n){var r=e.donut.center.numberFormatter;t.text(r(i(n)))}},e}(Yp),Xp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="spacer",e}return d(e,t),e.prototype.render=function(){this.getContainerSVG().append("rect").attr("x",0).attr("y",0).attr("width",this.configs.size||mi.default.size).attr("height",this.configs.size||mi.default.size).attr("opacity",0)},e}(Sp);function $p(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 Zp(t,e){var n,r,i,o,a,s=new tg(t),u=+t.value&&(s.value=t.value),c=[s];for(null==e&&(e=Qp);n=c.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)c.push(r=n.children[o]=new tg(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(Jp)}function Qp(t){return t.children}function Kp(t){t.data=t.data.data}function Jp(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function tg(t){this.data=t,this.depth=this.height=0,this.parent=null}function eg(t){if("function"!=typeof t)throw new Error;return t}function ng(){return 0}function rg(t){return function(){return t}}function ig(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 og(t,e,n,r,i){for(var o,a=t.children,s=-1,u=a.length,c=t.value&&(r-e)/t.value;++s<u;)(o=a[s]).y0=n,o.y1=i,o.x0=e,o.x1=e+=o.value*c}function ag(t,e,n,r,i){for(var o,a=t.children,s=-1,u=a.length,c=t.value&&(i-n)/t.value;++s<u;)(o=a[s]).x0=e,o.x1=r,o.y0=n,o.y1=n+=o.value*c}tg.prototype=Zp.prototype={constructor:tg,count:function(){return this.eachAfter($p)},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 Zp(this).eachBefore(Kp)}};var sg=function t(e){function n(t,n,r,i,o){!function(t,e,n,r,i,o){for(var a,s,u,c,l,h,f,d,p,g,v,m=[],y=e.children,_=0,b=0,x=y.length,w=e.value;_<x;){u=i-n,c=o-r;do{l=y[b++].value}while(!l&&b<x);for(h=f=l,v=l*l*(g=Math.max(c/u,u/c)/(w*t)),p=Math.max(f/v,v/h);b<x;++b){if(l+=s=y[b].value,s<h&&(h=s),s>f&&(f=s),v=l*l*g,(d=Math.max(f/v,v/h))>p){l-=s;break}p=d}m.push(a={value:l,dice:u<c,children:y.slice(_,b)}),a.dice?og(a,n,r,i,w?r+=c*l/w:o):ag(a,n,r,w?n+=u*l/w:i,o),w-=l,_=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 ug(){var t=sg,e=!1,n=1,r=1,i=[0],o=ng,a=ng,s=ng,u=ng,c=ng;function l(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(h),i=[0],e&&t.eachBefore(ig),t}function h(e){var n=i[e.depth],r=e.x0+n,l=e.y0+n,h=e.x1-n,f=e.y1-n;h<r&&(r=h=(r+h)/2),f<l&&(l=f=(l+f)/2),e.x0=r,e.y0=l,e.x1=h,e.y1=f,e.children&&(n=i[e.depth+1]=o(e)/2,r+=c(e)-n,l+=a(e)-n,(h-=s(e)-n)<r&&(r=h=(r+h)/2),(f-=u(e)-n)<l&&(l=f=(l+f)/2),t(e,r,l,h,f))}return l.round=function(t){return arguments.length?(e=!!t,l):e},l.size=function(t){return arguments.length?(n=+t[0],r=+t[1],l):[n,r]},l.tile=function(e){return arguments.length?(t=eg(e),l):t},l.padding=function(t){return arguments.length?l.paddingInner(t).paddingOuter(t):l.paddingInner()},l.paddingInner=function(t){return arguments.length?(o="function"==typeof t?t:rg(+t),l):o},l.paddingOuter=function(t){return arguments.length?l.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):l.paddingTop()},l.paddingTop=function(t){return arguments.length?(a="function"==typeof t?t:rg(+t),l):a},l.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:rg(+t),l):s},l.paddingBottom=function(t){return arguments.length?(u="function"==typeof t?t:rg(+t),l):u},l.paddingLeft=function(t){return arguments.length?(c="function"==typeof t?t:rg(+t),l):c},l}var cg=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===T.ROW_REVERSE||a.configs.direction===T.COLUMN_REVERSE)&&(a.children=a.children.reverse()),a.init(),a}return d(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=Rr.getProperty(t,"data","growth","x");return e===E.PREFERRED||e===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 Rr.getProperty(t,"data","growth","x")===E.STRETCH})).size()},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.parent,r=Gh.getSVGElementSize(n,{useAttrs:!0}),i=r.width,o=r.height,a=Zp({children:this.children}).sum((function(t){return t.size})),s=this.configs.direction===T.ROW||this.configs.direction===T.ROW_REVERSE?og:ag;ug().tile(s).size([i,o])(a);var u=this.configs.direction===T.ROW||this.configs.direction===T.ROW_REVERSE,c=n.selectAll("svg.layout-child-"+this._instanceID).data(a.leaves(),(function(t){return t.data.id}));c.attr("width",(function(t){return t.x1-t.x0})).attr("height",(function(t){return t.y1-t.y0})),c.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(mh(n));var i=Rr.getProperty(e,"data","growth","x");i!==E.PREFERRED&&i!==E.FIXED||r.render(t)}))})),n.selectAll("svg.layout-child-"+this._instanceID).each((function(t){var e=Rr.getProperty(t,"data","growth","x"),n=Gh.getSVGElementSize(mh(this),{useBBox:!0});if(e===E.PREFERRED){var r=u?n.width:n.height,a=u?i:o;t.data.size=r/a*100}})),c.exit().remove(),this.children.filter((function(t){return Rr.getProperty(t,"growth","x")===E.STRETCH})).forEach((function(t,n){t.size=(100-+e.getPreferedAndFixedSizeSum())/+e.getNumOfStretchChildren()})),a=Zp({children:this.children}).sum((function(t){return t.size})),ug().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){Rr.getProperty(e,"data","growth","x")===E.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}(Sp),lg=[["15seconds",15e3],["minute",6e4],["30minutes",18e5],["hourly",36e5],["daily",864e5],["monthly",2592e6],["quarterly",7776e6],["yearly",31104e6]];function hg(t,e,n,r){var i=0===e,o=2===Number(gp(new Date(t),"c")),a=1===Number(gp(new Date(t),"q"));switch(n){case"15seconds":case"minute":case"30minutes":case"hourly":return i||gg(t)||vg(t)||mg(t);case"daily":return r?i||o||mg(t):i||vg(t)||mg(t);case"monthly":return i||mg(t);case"quarterly":return i||a;case"yearly":return!1;default:throw new Error(n+" is not a valid time interval.")}}function fg(t,e,n,r){var i=r.showDayName,o="daily"===n&&i?"weekly":n,a=new Date(t),s=Rr.getProperty(r,"timeIntervalFormats")[o],u=Rr.getProperty(s,"primary"),c=Rr.getProperty(s,"secondary");return gp(a,hg(t,e,n,i)?u:c,{locale:r.localeObject})}function dg(t){var e=new Date(t);return{M:e.getMonth()+1,d:e.getDate(),H:e.getHours(),m:e.getMinutes(),s:e.getSeconds()}}function pg(t){return 1===t.length?"15seconds":function(t){var e=lg.reduce((function(e,n,r){n[0];var i=n[1];return Math.abs(e-t)<Math.abs(i-t)?e:r}),0);return lg[e][0]}(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}(function(t){if(t)return t.slice(1).map((function(e,n){return e-t[n]}))}(t)))}function gg(t){var e=dg(t),n=e.s,r=e.m;return 0===e.H&&0===r&&0===n}function vg(t){var e=dg(t),n=e.d,r=e.s,i=e.m,o=e.H;return 1===n&&0===o&&0===i&&0===r}function mg(t){var e=dg(t),n=e.M,r=e.d,i=e.s,o=e.m,a=e.H;return 1===n&&1===r&&0===a&&0===o&&0===i}var yg=Array.prototype.slice;function _g(t){return t}function bg(t){return"translate("+(t+.5)+",0)"}function xg(t){return"translate(0,"+(t+.5)+")"}function wg(t){return function(e){return+t(e)}}function Tg(t){var e=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}function Eg(){return!this.__axis}function Og(t,e){var n=[],r=null,i=null,o=6,a=6,s=3,u=1===t||4===t?-1:1,c=4===t||2===t?"x":"y",l=1===t||3===t?bg:xg;function h(h){var f=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,d=null==i?e.tickFormat?e.tickFormat.apply(e,n):_g:i,p=Math.max(o,0)+s,g=e.range(),v=+g[0]+.5,m=+g[g.length-1]+.5,y=(e.bandwidth?Tg:wg)(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(c+"2",u*o)),O=O.merge(T.append("text").attr("fill","currentColor").attr(c,u*p).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=y(t))?l(t):this.getAttribute("transform")})),T.attr("opacity",1e-6).attr("transform",(function(t){var e=this.parentNode.__axis;return l(e&&isFinite(e=e(t))?e:y(t))}))),w.remove(),b.attr("d",4===t||2==t?a?"M"+u*a+","+v+"H0.5V"+m+"H"+u*a:"M0.5,"+v+"V"+m:a?"M"+v+","+u*a+"V0.5H"+m+"V"+u*a:"M"+v+",0.5H"+m),x.attr("opacity",1).attr("transform",(function(t){return l(y(t))})),E.attr(c+"2",u*o),O.attr(c,u*p).text(d),_.filter(Eg).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=y}))}return h.scale=function(t){return arguments.length?(e=t,h):e},h.ticks=function(){return n=yg.call(arguments),h},h.tickArguments=function(t){return arguments.length?(n=null==t?[]:yg.call(t),h):n.slice()},h.tickValues=function(t){return arguments.length?(r=null==t?null:yg.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 Mg(t){return Og(1,t)}function Sg(t){return Og(2,t)}function Ag(t){return Og(3,t)}function Cg(t){return Og(4,t)}var Pg=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 d(n,t),n.prototype.render=function(t){void 0===t&&(t=!0);var n,r,i=this.configs.position,o=this.model.getOptions(),a=Rr.getProperty(o,"axes",i),s=Rr.getProperty(a,"ticks","number"),u=null!==s,c=i===v.LEFT||i===v.RIGHT,l=Rr.getProperty(o,"timeScale"),h=this.getContainerSVG(),f=Gh.getSVGElementSize(this.parent,{useAttrs:!0}),d=f.width,p=f.height;i===v.BOTTOM||i===v.TOP?(n=this.configs.axes[v.LEFT]?this.margins.left:0,r=this.configs.axes[v.RIGHT]?d-this.margins.right:d):(n=p-this.margins.bottom,r=this.margins.top);var g,m=this.services.cartesianScales.getScaleByPosition(i);switch(this.scaleType===y.LABELS?m.rangeRound([n,r]):m.range([n,r]),i){case v.LEFT:g=Cg;break;case v.BOTTOM:g=Ag;break;case v.RIGHT:g=Sg;break;case v.TOP:g=Mg}var _=Gh.appendOrSelect(h,"g.axis."+i),b=!_.select("g.ticks").empty(),x=Gh.appendOrSelect(_,"g.ticks");b||x.attr("role",e.GRAPHICS_OBJECT+" "+e.GROUP);var w=Gh.appendOrSelect(_,"g.ticks.invisible").style("opacity","0").attr("aria-hidden",!0),T=Gh.appendOrSelect(w,"g.tick"),E=Gh.appendOrSelect(T,"text").text("0"),O=Gh.getSVGElementSize(E.node(),{useBBox:!0}).height;T.remove();var M,S=this.scaleType===y.TIME||a.scaleType===y.TIME,A=this.scaleType||a.scaleType||y.LINEAR,C=g(m).tickSizeOuter(0);if(m.ticks){var P=void 0;if(u?P=s:(P=vi.ticks.number,c&&(P=this.getNumberOfFittingTicks(p,O,2.5))),C.ticks(P),S){var D=m.ticks(P).concat(m.domain()).map((function(t){return+t})).sort();D=Rr.removeArrayDuplicates(D),Rr.getProperty(o,"timeScale","addSpaceOnEdges")&&D.length>2&&(D.splice(D.length-1,1),D.splice(0,1)),C.tickValues(D)}}var k=Rr.getProperty(a,"ticks","formatter");if(S){var L=pg(C.tickValues());M=null===k?function(t,e){return fg(t,e,L,l)}:function(t,e){var n=fg(t,e,L,l);return k(t,e,n)}}else null===k?A===y.LINEAR&&(M=function(t){return t.toLocaleString()}):M=k;switch(C.tickFormat(M),i){case v.LEFT:x.attr("transform","translate("+this.margins.left+", 0)");break;case v.BOTTOM:x.attr("transform","translate(0, "+(p-this.margins.bottom)+")");break;case v.RIGHT:x.attr("transform","translate("+(d-this.margins.right)+", 0)");break;case v.TOP:x.attr("transform","translate(0, "+this.margins.top+")")}if(a.title){var R=Gh.appendOrSelect(_,"text.axis-title").html(a.title);switch(i){case v.LEFT:R.attr("transform","rotate(-90)").attr("y",0).attr("x",-m.range()[0]/2).attr("dy","1em").style("text-anchor","middle");break;case v.BOTTOM:R.attr("transform","translate("+(this.margins.left/2+m.range()[1]/2)+", "+p+")").style("text-anchor","middle");break;case v.RIGHT:R.attr("transform","rotate(90)").attr("y",-d).attr("x",m.range()[0]/2).attr("dy","1em").style("text-anchor","middle");break;case v.TOP:var I=Gh.getSVGElementSize(R,{useBBox:!0}).height;R.attr("transform","translate("+(this.margins.left/2+m.range()[1]/2)+", "+I/2+")").style("text-anchor","middle")}}if(S){var j=pg(C.tickValues()),N=l.showDayName,U=x;t&&(x=x.transition(this.services.transitions.getTransition("axis-update",t))),x=x.call(C),U.selectAll(".tick").data(C.tickValues(),m).order().select("text").style("font-weight",(function(t,e){return hg(t,e,j,N)?"bold":"normal"}))}else x=t&&b?x.transition(this.services.transitions.getTransition("axis-update")).call(C):x.call(C);if(w.call(C),i===v.BOTTOM||i===v.TOP){var H=!1;if(m.step){H=w.selectAll("g.tick text").nodes().some((function(t){return Gh.getSVGElementSize(t,{useBBox:!0}).width>=m.step()}))}else{var F=Rr.getProperty(a,"ticks","rotateIfSmallerThan")||vi.ticks.rotateIfSmallerThan;H=d/(S?C.tickValues().length:m.ticks().length)/2<F}H?(u||(C.ticks(this.getNumberOfFittingTicks(d,O,3.5)),w.call(C),x.call(C)),_.selectAll("g.ticks g.tick text").attr("transform","rotate(45)").style("text-anchor",i===v.TOP?"end":"start")):_.selectAll("g.ticks g.tick text").attr("transform",null).style("text-anchor",null)}this.addEventListeners()},n.prototype.addEventListeners=function(){var t=this.getContainerSVG(),e=this.configs.position,n=Gh.appendOrSelect(t,"g.axis."+e),r=this;n.selectAll("g.tick text").on("mouseover",(function(t){r.services.events.dispatchEvent(A.Axis.LABEL_MOUSEOVER,{element:mh(this),datum:t})})).on("mousemove",(function(t){r.services.events.dispatchEvent(A.Axis.LABEL_MOUSEMOVE,{element:mh(this),datum:t})})).on("click",(function(t){r.services.events.dispatchEvent(A.Axis.LABEL_CLICK,{element:mh(this),datum:t})})).on("mouseout",(function(t){r.services.events.dispatchEvent(A.Axis.LABEL_MOUSEOUT,{element:mh(this),datum:t})}))},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 Rr.clamp(r,2,vi.ticks.number)},n.prototype.destroy=function(){var t=this.getContainerSVG(),e=this.configs.position;Gh.appendOrSelect(t,"g.axis."+e).selectAll("g.tick text").on("mouseover",null).on("mousemove",null).on("mouseout",null)},n}(Sp),Dg=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 d(e,t),e.prototype.render=function(t){var e=this;void 0===t&&(t=!1);var n={},r=Object.keys(v),i=Rr.getProperty(this.model.getOptions(),"axes");r.forEach((function(t){i[v[t]]&&(n[v[t]]=!0)})),this.configs.axes=n,r.forEach((function(t){var n=v[t];if(e.configs.axes[n]&&!e.children[n]){var r=new Pg(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=Gh.getSVGElementSize(a,{useBBox:!0}),u=s.width,c=s.height;switch(n=r.getTitleRef().empty()?0:Gh.getSVGElementSize(r.getTitleRef(),{useBBox:!0}).height,i){case v.TOP:o.top=c+n;break;case v.BOTTOM:o.bottom=c+n;break;case v.LEFT:o.left=u+n;break;case v.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}(Sp),kg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grid",e}return d(e,t),e.prototype.render=function(){this.drawBackdrop(),Gh.appendOrSelect(this.backdrop,"g.x.grid"),Gh.appendOrSelect(this.backdrop,"g.y.grid"),this.drawXGrid(),this.drawYGrid()},e.prototype.drawXGrid=function(){var t=this.parent,e=this.backdrop.attr("height"),n=Ag(this.services.cartesianScales.getMainXScale()).tickSizeInner(-e).tickSizeOuter(0),r=Rr.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=Cg(this.services.cartesianScales.getMainYScale()).tickSizeInner(-e).tickSizeOuter(0),r=Rr.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(Rr.getTranslationValues(t).tx)-Number(Rr.getTranslationValues(e).tx)})),i=-1;r.forEach((function(e,n){t[0]>=+Rr.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=+Rr.getTranslationValues(s).tx-+Rr.getTranslationValues(a).tx;else{var u=n.select("rect.chart-grid-backdrop").node();o=Gh.getSVGElementSize(u).width-+Rr.getTranslationValues(a).tx}else o=+Rr.getTranslationValues(s).tx;return o*this.model.getOptions().tooltip.gridline.threshold},e.prototype.getActiveGridline=function(t){var e=Rr.getProperty(this.model.getOptions,"tooltip","gridline","threshold"),n=e||this.getGridlineThreshold(t);return this.parent.selectAll(".x.grid .tick").filter((function(){var e=Rr.getTranslationValues(this),r=Number(e.tx)-n,i=Number(e.tx)+n;return r<=t[0]&&t[0]<=i}))},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=Gh.appendOrSelect(t,"svg.chart-grid-backdrop");var c=Gh.appendOrSelect(this.backdrop,"rect.chart-grid-backdrop");this.backdrop.merge(c).attr("x",i).attr("y",u).attr("width",o-i).attr("height",s-u).lower(),c.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}(Sp);var Lg,Rg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="ruler",e}return d(e,t),e.prototype.render=function(){this.drawBackdrop(),this.addBackdropEventListeners()},e.prototype.showRuler=function(t){var e=this,n=t[0],r=t[1],i=this.parent,o=this.services.cartesianScales.getOrientation(),a=o===m.HORIZONTAL?r:n,s=Gh.appendOrSelect(i,"g.ruler"),u=Gh.appendOrSelect(s,"line.ruler-line"),c=i.selectAll("[role=graphics-symbol]"),l=this.model.getDisplayData(),h=this.services.cartesianScales.getRangeScale().range(),f=h[0],d=h[1],p=l.map((function(t){return{domainValue:e.services.cartesianScales.getDomainValue(t),originalData:t}})).filter((function(t){return function(t,e){return t>e-5&&t<e+5}(t.domainValue,a)})).reduce((function(t,e){if(0===t.length)return t.push(e),t;var n=t[0].domainValue,r=Math.abs(a-e.domainValue),i=Math.abs(a-n);return r>i?t:(r<i?t=[e]:t.push(e),t)}),[]);if(p.length>0){var g=this.services.cartesianScales.getRangeIdentifier(),v=p.map((function(t){return t.originalData})).filter((function(t){var e=t[g];return null!=e})),y=p.map((function(t){return t.domainValue})),_=c.filter((function(t){var n=e.services.cartesianScales.getDomainValue(t);return y.includes(n)}));this.elementsToHighlight&&this.elementsToHighlight.size()>0&&!Rr.isEqual(this.elementsToHighlight,_)&&this.hideRuler(),_.dispatch("mouseover"),this.elementsToHighlight=_,this.services.events.dispatchEvent("show-tooltip",{hoveredElement:u,multidata:v,type:b.GRIDLINE}),s.attr("opacity",1);var x=p[0];"horizontal"===o?u.attr("x1",d).attr("x2",f).attr("y1",x.domainValue).attr("y2",x.domainValue):u.attr("y1",d).attr("y2",f).attr("x1",x.domainValue).attr("x2",x.domainValue)}else this.hideRuler()},e.prototype.hideRuler=function(){var t=this.parent,e=Gh.appendOrSelect(t,"g.ruler");t.selectAll("[role=graphics-symbol]").dispatch("mouseout"),this.services.events.dispatchEvent("hide-tooltip"),e.attr("opacity",0)},e.prototype.addBackdropEventListeners=function(){var t=this;this.backdrop.on("mousemove mouseover",(function(){var e=_h(t.parent.node());t.showRuler(e)})).on("mouseout",(function(){t.hideRuler()}))},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=Gh.appendOrSelect(t,"svg.chart-grid-backdrop");var c=Gh.appendOrSelect(this.backdrop,"rect.chart-grid-backdrop");this.backdrop.merge(c).attr("x",i).attr("y",u).attr("width",o-i).attr("height",s-u).lower(),c.attr("width","100%").attr("height","100%")},e}(Sp),Ig=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="zero-line",e}return d(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=Rr.flipSVGCoordinatesBasedOnOrientation({x0:r,x1:i,y0:o,y1:o},this.services.cartesianScales.getOrientation());Gh.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}(Sp),jg=function(){function t(t,e){this.services={domUtils:Gh,events:zh,transitions:ed},this.model=new al(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(A.Model.UPDATE,(function(){n.update(!0)})),this.model.setData(e.data),this.services.events.addEventListener(A.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(A.Chart.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 Cp(this.model,this.services)],growth:{x:E.PREFERRED,y:E.FIXED}},n={id:"legend",components:[new Ap(this.model,this.services)],growth:{x:E.PREFERRED,y:E.FIXED}},r={id:"graph-frame",components:t,growth:{x:E.STRETCH,y:E.FIXED}},i=!1!==this.model.getOptions().legend.enabled,o=T.COLUMN;if(i){var a=Rr.getProperty(this.model.getOptions(),"legend","position");"left"===a?(o=T.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=w.VERTICAL)):"right"===a?(o=T.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=w.VERTICAL)):"bottom"===a&&(o=T.COLUMN_REVERSE)}var s={id:"spacer",components:[new Xp(this.model,this.services)],growth:{x:E.PREFERRED,y:E.FIXED}},u={id:"full-frame",components:[new cg(this.model,this.services,p(i?[n]:[],[s,r]),{direction:o})],growth:{x:E.STRETCH,y:E.FIXED}},c=[];if(this.model.getOptions().title){c.push(e);var l={id:"spacer",components:[new Xp(this.model,this.services)],growth:{x:E.PREFERRED,y:E.FIXED}};c.push(l)}return c.push(u),[new cg(this.model,this.services,c,{direction:T.COLUMN})]},t}(),Ng=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.services=Object.assign(r.services,{cartesianScales:Tp,curves:Mp}),r}return d(e,t),e.prototype.getAxisChartComponents=function(t){var e={id:"title",components:[new Cp(this.model,this.services)],growth:{x:E.PREFERRED,y:E.FIXED}},n={id:"legend",components:[new Ap(this.model,this.services)],growth:{x:E.PREFERRED,y:E.FIXED}},r={id:"graph-frame",components:t,growth:{x:E.STRETCH,y:E.FIXED}},i=!1!==this.model.getOptions().legend.enabled,o=T.COLUMN;if(i){var a=Rr.getProperty(this.model.getOptions(),"legend","position");a===x.LEFT?(o=T.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=w.VERTICAL)):a===x.RIGHT?(o=T.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=w.VERTICAL)):a===x.BOTTOM&&(o=T.COLUMN_REVERSE)}var s={id:"spacer",components:[new Xp(this.model,this.services)],growth:{x:E.PREFERRED,y:E.FIXED}},u={id:"full-frame",components:[new cg(this.model,this.services,p(i?[n]:[],[s,r]),{direction:o})],growth:{x:E.STRETCH,y:E.FIXED}},c=[];if(this.model.getOptions().title){c.push(e);var l={id:"spacer",components:[new Xp(this.model,this.services)],growth:{x:E.PREFERRED,y:E.FIXED}};c.push(l)}return c.push(u),[new cg(this.model,this.services,c,{direction:T.COLUMN})]},e}(jg),Ug=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Rr.mergeDefaultChartOptions(di.simpleBarChart,n.options)),r.init(e,n),r}return d(e,t),e.prototype.getComponents=function(){var t=[new Dg(this.model,this.services),new kg(this.model,this.services),new Hp(this.model,this.services),new Ig(this.model,this.services)],e=this.getAxisChartComponents(t);return e.push(new Rp(this.model,this.services)),e},e}(Ng),Hg=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Rr.mergeDefaultChartOptions(di.groupedBarChart,n.options)),r.init(e,n),r}return d(e,t),e.prototype.getComponents=function(){var t=[new Dg(this.model,this.services),new kg(this.model,this.services),new Fp(this.model,this.services),new Ig(this.model,this.services)],e=this.getAxisChartComponents(t);return e.push(new Rp(this.model,this.services)),e},e}(Ng),Fg=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Rr.mergeDefaultChartOptions(di.stackedBarChart,n.options)),r.init(e,n),r}return d(e,t),e.prototype.getComponents=function(){var t=[new Dg(this.model,this.services),new kg(this.model,this.services),new Bp(this.model,this.services)],e=this.getAxisChartComponents(t);return e.push(new Rp(this.model,this.services)),e},e}(Ng),Bg=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Rr.mergeDefaultChartOptions(di.bubbleChart,n.options)),r.init(e,n),r}return d(e,t),e.prototype.getComponents=function(){var t=[new Dg(this.model,this.services),new kg(this.model,this.services),new Rg(this.model,this.services),new Gp(this.model,this.services)],e=this.getAxisChartComponents(t);return e.push(new jp(this.model,this.services)),e},e}(Ng),Vg=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Rr.mergeDefaultChartOptions(di.lineChart,n.options)),r.init(e,n),r}return d(e,t),e.prototype.getComponents=function(){var t=[new Dg(this.model,this.services),new kg(this.model,this.services),new Rg(this.model,this.services),new zp(this.model,this.services),new Vp(this.model,this.services)],e=this.getAxisChartComponents(t);return e.push(new jp(this.model,this.services)),e},e}(Ng),Gg=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Rr.mergeDefaultChartOptions(di.scatterChart,n.options)),r.init(e,n),r}return d(e,t),e.prototype.getComponents=function(){var t=[new Dg(this.model,this.services),new kg(this.model,this.services),new Rg(this.model,this.services),new Vp(this.model,this.services)],e=this.getAxisChartComponents(t);return e.push(new jp(this.model,this.services)),e},e}(Ng),zg=function(t){function e(e){return t.call(this,e)||this}return d(e,t),e.prototype.getTabularData=function(e){var n=t.prototype.getTabularData.call(this,e);return e!==n&&n.forEach((function(t){t.key&&t.key!==t.group&&(t.group=t.key)})),n},e.prototype.sanitize=function(t){return this.getTabularData(t).sort((function(t,e){return e.value-t.value}))},e}(al),Wg=function(t){function e(e,n,r){void 0===r&&(r=!1);var i=t.call(this,e,n)||this;return i.model=new zg(i.services),r?i:(i.model.setOptions(Rr.mergeDefaultChartOptions(di.pieChart,n.options)),i.init(e,n),i)}return d(e,t),e.prototype.getComponents=function(){var t=[new Yp(this.model,this.services)],e=this.getChartComponents(t);return e.push(new Ip(this.model,this.services)),e},e}(jg),Yg=function(t){function e(e,n){var r=t.call(this,e,n,!0)||this;return r.model.setOptions(Rr.mergeDefaultChartOptions(di.donutChart,n.options)),r.init(e,n),r}return d(e,t),e.prototype.getComponents=function(){var t=[new qp(this.model,this.services)],e=this.getChartComponents(t);return e.push(new Ip(this.model,this.services)),e},e}(Wg);function qg(t){var e,n=($g(t)%(e=360)+e)%e;return Xg(n,[0,10])||Xg(n,[350,0])?{textAnchor:M.START,dominantBaseline:S.MIDDLE}:Xg(n,[10,80])?{textAnchor:M.START,dominantBaseline:S.HANGING}:Xg(n,[80,100])?{textAnchor:M.MIDDLE,dominantBaseline:S.HANGING}:Xg(n,[100,170])?{textAnchor:M.END,dominantBaseline:S.HANGING}:Xg(n,[170,190])?{textAnchor:M.END,dominantBaseline:S.MIDDLE}:Xg(n,[190,260])?{textAnchor:M.END,dominantBaseline:S.BASELINE}:Xg(n,[260,280])?{textAnchor:M.MIDDLE,dominantBaseline:S.BASELINE}:{textAnchor:M.START,dominantBaseline:S.BASELINE}}function Xg(t,e){var n=e[0],r=e[1];return t>=n&&t<=r}function $g(t){return t*(180/Math.PI)}function Zg(t,e,n){return void 0===n&&(n={x:0,y:0}),{x:e*Math.cos(t)+n.x,y:e*Math.sin(t)+n.y}}var Qg=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="radar",e.getLabelDimensions=function(t){var n=Gh.appendOrSelect(e.svg,"g.tmp-tick"),r=Gh.appendOrSelect(n,"text").text(t),i=Gh.getSVGElementSize(r.node(),{useBBox:!0}),o=i.width,a=i.height;return n.remove(),{width:o,height:a}},e.normalizeFlatData=function(t){var n=e.model.getOptions(),r=Rr.getProperty(n,"radar","axes"),i=r.angle,o=r.value,a=Rr.getProperty(n,"data","groupMapsTo"),s=Rr.flatMapDeep(e.uniqueKeys.map((function(t){return e.uniqueGroups.map((function(e){var n;return(n={})[i]=t,n[a]=e,n[o]=null,n}))})));return Rr.merge(s,t)},e.normalizeGroupedData=function(t){var n=e.model.getOptions(),r=Rr.getProperty(n,"radar","axes"),i=r.angle,o=r.value,a=Rr.getProperty(n,"data","groupMapsTo");return t.map((function(t){var n=t.name,r=t.data,s=e.uniqueKeys.map((function(t){var e;return(e={})[a]=n,e[i]=t,e[o]=null,e}));return{name:n,data:Rr.merge(s,r)}}))},e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=Rr.getProperty(e.model.getOptions(),"radar","opacity");e.parent.selectAll("g.blobs path").transition(e.services.transitions.getTransition("legend-hover-blob")).style("fill-opacity",(function(t){return t.name!==n.datum().name?Rr.getProperty(r,"unselected"):Rr.getProperty(r,"selected")}))},e.handleLegendMouseOut=function(t){var n=Rr.getProperty(e.model.getOptions(),"radar","opacity");e.parent.selectAll("g.blobs path").transition(e.services.transitions.getTransition("legend-mouseout-blob")).style("fill-opacity",Rr.getProperty(n,"selected"))},e}return d(n,t),n.prototype.init=function(){var t=this.services.events;t.addEventListener(A.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(A.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},n.prototype.render=function(t){var n=this;void 0===t&&(t=!0),this.svg=this.getContainerSVG();var r=Gh.getSVGElementSize(this.parent,{useAttrs:!0}),i=r.width,o=r.height,a=this.model.getData(),s=this.model.getDisplayData(),u=this.model.getGroupedData(),c=this.model.getOptions(),l=Rr.getProperty(c,"radar","axes"),h=l.angle,f=l.value,d=Rr.getProperty(c,"data","groupMapsTo"),p=Rr.getProperty(c,"radar"),g=p.xLabelPadding,v=p.yLabelPadding,m=p.yTicksNumber,y=p.minRange,_=p.xAxisRectHeight,b=p.opacity;this.uniqueKeys=Array.from(new Set(a.map((function(t){return t[h]})))),this.uniqueGroups=Array.from(new Set(a.map((function(t){return t[d]})))),this.displayDataNormalized=this.normalizeFlatData(s),this.groupedDataNormalized=this.normalizeGroupedData(u);var x=2*(this.getLabelDimensions(this.uniqueKeys[0]).height+v),w=(Math.min(i,o)-x)/2;if(!(w<=0)){var T=co().domain(this.displayDataNormalized.map((function(t){return t[h]}))).range([0,2*Math.PI].map((function(t){return t-Math.PI/2}))),E=Na().domain([0,Ki(this.displayDataNormalized.map((function(t){return t[f]})))]).range([y,w]).nice(m),O=E.ticks(m),M=function(t){return n.model.getFillColor(t)},S=dc().angle((function(t){return T(t[h])+Math.PI/2})).radius((function(t){return E(t[f])})).curve(Fc),A=dc().angle(S.angle()).radius((function(t){return Lg?Lg(t[f]):y})).curve(S.curve()),C={x:Ki(this.uniqueKeys.map((function(t){var e;return n.getLabelDimensions(t).width+(e=T(t),w*Math.sin(e-Math.PI/2))})))+g,y:o/2},P=Gh.appendOrSelect(this.svg,"g.y-axes").attr("role",e.GROUP).selectAll("path").data(O,(function(t){return t})),D=function(t){return n.uniqueKeys.map((function(e){var n;return(n={})[h]=e,n[f]=t,n}))};P.join((function(r){return r.append("path").attr("role",e.GRAPHICS_SYMBOL).attr("opacity",0).attr("transform","translate("+C.x+", "+C.y+")").attr("fill","none").attr("d",(function(t){return A(D(t))})).call((function(e){return e.transition(n.services.transitions.getTransition("radar_y_axes_enter",t)).attr("opacity",1).attr("d",(function(t){return S(D(t))}))}))}),(function(e){return e.call((function(e){return e.transition(n.services.transitions.getTransition("radar_y_axes_update",t)).attr("opacity",1).attr("transform","translate("+C.x+", "+C.y+")").attr("d",(function(t){return S(D(t))}))}))}),(function(e){return e.call((function(e){return e.transition(n.services.transitions.getTransition("radar_y_axes_exit",t)).attr("d",(function(t){return S(D(t))})).attr("opacity",0).remove()}))})),Gh.appendOrSelect(this.svg,"g.y-labels").attr("role",e.GROUP).selectAll("text").data(zi(O)).join((function(e){return e.append("text").attr("opacity",0).text((function(t){return t})).attr("x",(function(t){return Zg(-Math.PI/2,E(t),C).x+v})).attr("y",(function(t){return Zg(-Math.PI/2,E(t),C).y})).style("text-anchor","start").style("dominant-baseline","middle").call((function(e){return e.transition(n.services.transitions.getTransition("radar_y_labels_enter",t)).attr("opacity",1)}))}),(function(e){return e.call((function(e){return e.transition(n.services.transitions.getTransition("radar_y_labels_update",t)).text((function(t){return t})).attr("opacity",1).attr("x",(function(t){return Zg(-Math.PI/2,E(t),C).x+v})).attr("y",(function(t){return Zg(-Math.PI/2,E(t),C).y}))}))}),(function(e){return e.call((function(e){return e.transition(n.services.transitions.getTransition("radar_y_labels_exit",t)).attr("opacity",0).remove()}))})),Gh.appendOrSelect(this.svg,"g.x-axes").attr("role",e.GROUP).selectAll("line").data(this.uniqueKeys,(function(t){return t})).join((function(r){return r.append("line").attr("role",e.GRAPHICS_SYMBOL).attr("opacity",0).attr("class",(function(t){return"x-axis-"+Rr.kebabCase(t)})).attr("stroke-dasharray","0").attr("x1",(function(t){return Zg(T(t),0,C).x})).attr("y1",(function(t){return Zg(T(t),0,C).y})).attr("x2",(function(t){return Zg(T(t),0,C).x})).attr("y2",(function(t){return Zg(T(t),0,C).y})).call((function(e){return e.transition(n.services.transitions.getTransition("radar_x_axes_enter",t)).attr("opacity",1).attr("x1",(function(t){return Zg(T(t),E.range()[0],C).x})).attr("y1",(function(t){return Zg(T(t),E.range()[0],C).y})).attr("x2",(function(t){return Zg(T(t),E.range()[1],C).x})).attr("y2",(function(t){return Zg(T(t),E.range()[1],C).y}))}))}),(function(e){return e.call((function(e){return e.transition(n.services.transitions.getTransition("radar_x_axes_update",t)).attr("opacity",1).attr("x1",(function(t){return Zg(T(t),E.range()[0],C).x})).attr("y1",(function(t){return Zg(T(t),E.range()[0],C).y})).attr("x2",(function(t){return Zg(T(t),E.range()[1],C).x})).attr("y2",(function(t){return Zg(T(t),E.range()[1],C).y}))}))}),(function(e){return e.call((function(e){return e.transition(n.services.transitions.getTransition("radar_x_axes_exit",t)).attr("opacity",0).remove()}))})),Gh.appendOrSelect(this.svg,"g.x-labels").attr("role",e.GROUP).selectAll("text").data(this.uniqueKeys).join((function(e){return e.append("text").text((function(t){return t})).attr("opacity",0).attr("x",(function(t){return Zg(T(t),E.range()[1]+g,C).x})).attr("y",(function(t){return Zg(T(t),E.range()[1]+g,C).y})).style("text-anchor",(function(t){return qg(T(t)).textAnchor})).style("dominant-baseline",(function(t){return qg(T(t)).dominantBaseline})).call((function(e){return e.transition(n.services.transitions.getTransition("radar_x_labels_enter",t)).attr("opacity",1)}))}),(function(e){return e.call((function(e){return e.transition(n.services.transitions.getTransition("radar_x_labels_update",t)).attr("opacity",1).attr("x",(function(t){return Zg(T(t),E.range()[1]+g,C).x})).attr("y",(function(t){return Zg(T(t),E.range()[1]+g,C).y}))}))}),(function(e){return e.call((function(e){return e.transition(n.services.transitions.getTransition("radar_x_labels_exit",t)).attr("opacity",0).remove()}))})),Gh.appendOrSelect(this.svg,"g.blobs").attr("role",e.GROUP).selectAll("path").data(this.groupedDataNormalized,(function(t){return t.name})).join((function(r){return r.append("path").attr("class","blob").attr("role",e.GRAPHICS_SYMBOL).attr("opacity",0).attr("transform","translate("+C.x+", "+C.y+")").attr("fill",(function(t){return M(t.name)})).style("fill-opacity",b.selected).attr("stroke",(function(t){return M(t.name)})).attr("d",(function(t){return A(t.data)})).call((function(e){return e.transition(n.services.transitions.getTransition("radar_blobs_enter",t)).attr("opacity",1).attr("d",(function(t){return S(t.data)}))}))}),(function(e){return e.call((function(e){return e.transition(n.services.transitions.getTransition("radar_blobs_update",t)).attr("opacity",1).attr("transform","translate("+C.x+", "+C.y+")").attr("d",(function(t){return S(t.data)}))}))}),(function(e){return e.call((function(e){return e.transition(n.services.transitions.getTransition("radar_blobs_exit",t)).attr("d",(function(t){return S(t.data)})).attr("opacity",0).remove()}))})),Gh.appendOrSelect(this.svg,"g.dots").attr("role",e.GROUP).selectAll("circle").data(this.displayDataNormalized).join((function(t){return t.append("circle").attr("role",e.GRAPHICS_SYMBOL)}),(function(t){return t}),(function(t){return t.remove()})).attr("class",(function(t){return Rr.kebabCase(t[h])})).attr("cx",(function(t){return Zg(T(t[h]),E(t[f]),C).x})).attr("cy",(function(t){return Zg(T(t[h]),E(t[f]),C).y})).attr("r",0).attr("opacity",0).attr("fill",(function(t){return M(t[d])})),Gh.appendOrSelect(this.svg,"g.x-axes-rect").attr("role",e.GROUP).selectAll("rect").data(this.uniqueKeys).join((function(t){return t.append("rect").attr("role",e.GRAPHICS_SYMBOL)}),(function(t){return t}),(function(t){return t.remove()})).attr("x",C.x).attr("y",C.y-_/2).attr("width",E.range()[1]).attr("height",_).attr("fill","red").style("fill-opacity",0).attr("transform",(function(t){return"rotate("+$g(T(t))+", "+C.x+", "+C.y+")"})),this.addEventListeners(),Lg=E}},n.prototype.destroy=function(){this.parent.selectAll(".x-axes-rect > rect").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(A.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(A.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},n.prototype.addEventListeners=function(){var t=this,e=Rr.getProperty(this.model.getOptions(),"radar"),n=e.axes.angle,r=e.dotsRadius;this.parent.selectAll(".x-axes-rect > rect").on("mouseover",(function(e){t.services.events.dispatchEvent(A.Radar.X_AXIS_MOUSEOVER,{element:mh(this),datum:e})})).on("mousemove",(function(e){var i=mh(this),o=t.parent.select(".x-axes .x-axis-"+Rr.kebabCase(e)),a=t.parent.selectAll(".dots circle."+Rr.kebabCase(e));o.classed("hovered",!0).attr("stroke-dasharray","4 4"),a.classed("hovered",!0).attr("opacity",1).attr("r",r),t.services.events.dispatchEvent(A.Radar.X_AXIS_MOUSEMOVE,{element:i,datum:e});var s=t.displayDataNormalized.filter((function(t){return t[n]===e}));t.services.events.dispatchEvent(A.Tooltip.SHOW,{hoveredElement:i,multidata:s,type:b.GRIDLINE})})).on("click",(function(e){t.services.events.dispatchEvent(A.Radar.X_AXIS_CLICK,{element:mh(this),datum:e})})).on("mouseout",(function(e){var n=mh(this),r=t.parent.select(".x-axes .x-axis-"+Rr.kebabCase(e)),i=t.parent.selectAll(".dots circle."+Rr.kebabCase(e));r.classed("hovered",!1).attr("stroke-dasharray","0"),i.classed("hovered",!1).attr("opacity",0).attr("r",0),t.services.events.dispatchEvent(A.Radar.X_AXIS_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent("hide-tooltip",{hoveredElement:n}),t.services.events.dispatchEvent(A.Tooltip.HIDE,{hoveredElement:n})}))},n}(Sp),Kg=function(t){function e(e,n,r){void 0===r&&(r=!1);var i=t.call(this,e,n)||this;return r?i:(i.model.setOptions(Rr.mergeDefaultChartOptions(di.radarChart,n.options)),i.init(e,n),i)}return d(e,t),e.prototype.getComponents=function(){var t=[new Qg(this.model,this.services)],e=this.getChartComponents(t);return e.push(new Np(this.model,this.services)),e},e}(jg),Jg=Hi;t.BubbleChart=Bg,t.DonutChart=Yg,t.GroupedBarChart=Hg,t.LineChart=Vg,t.PieChart=Wg,t.RadarChart=Kg,t.ScatterChart=Gg,t.SimpleBarChart=Ug,t.StackedBarChart=Fg,t.colorPalettes=Fi,t.configurations=yi,t.defaultColors=Jg,t.interfaces=C,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
15
|
+
***************************************************************************** */var e=function(t,n){return(e=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,n)};function n(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var r,i,o,a,s,u,l,c,h,f,d,p,g=function(){return(g=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function v(){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"}(r||(r={})),function(t){t.RENDER_FINISHED="render-finished",t.RESIZE="chart-resize"}(i||(i={})),function(t){t.UPDATE="model-update"}(o||(o={})),function(t){t.LABEL_MOUSEOVER="axis-label-mouseover",t.LABEL_MOUSEMOVE="axis-label-mousemove",t.LABEL_CLICK="axis-label-click",t.LABEL_MOUSEOUT="axis-label-mouseout"}(a||(a={})),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"}(s||(s={})),function(t){t.BAR_MOUSEOVER="bar-mouseover",t.BAR_MOUSEMOVE="bar-mousemove",t.BAR_CLICK="bar-click",t.BAR_MOUSEOUT="bar-mouseout"}(u||(u={})),function(t){t.SCATTER_MOUSEOVER="scatter-mouseover",t.SCATTER_MOUSEMOVE="scatter-mousemove",t.SCATTER_CLICK="scatter-click",t.SCATTER_MOUSEOUT="scatter-mouseout"}(l||(l={})),function(t){t.POINT_MOUSEOVER="scatter-mouseover",t.POINT_MOUSEMOVE="scatter-mousemove",t.POINT_CLICK="scatter-click",t.POINT_MOUSEOUT="scatter-mouseout"}(c||(c={})),function(t){t.X_AXIS_MOUSEOVER="radar-x-axis-mouseover",t.X_AXIS_MOUSEMOVE="radar-x-axis-mousemove",t.X_AXIS_CLICK="radar-x-axis-click",t.X_AXIS_MOUSEOUT="radar-x-axis-mouseout"}(h||(h={})),function(t){t.SHOW="show-tooltip",t.HIDE="hide-tooltip"}(f||(f={})),function(t){t.SHOW="show-threshold",t.HIDE="hide-threshold"}(d||(d={})),function(t){t.ITEM_HOVER="legend-item-onhover",t.ITEM_CLICK="legend-item-onclick",t.ITEM_MOUSEOUT="legend-item-onmouseout",t.ITEMS_UPDATE="legend-items-update"}(p||(p={}));var m,y,_,b,x,w,T,O,E,M,S,A,P,C,k=Object.freeze({__proto__:null,get Chart(){return i},get Model(){return o},get Axis(){return a},get Pie(){return s},get Bar(){return u},get Scatter(){return l},get Line(){return c},get Radar(){return h},get Tooltip(){return f},get Threshold(){return d},get Legend(){return p}});!function(t){t.DEFAULT="default",t.G100="g100",t.G90="g90",t.G10="g10"}(m||(m={})),function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(y||(y={})),function(t){t.VERTICAL="vertical",t.HORIZONTAL="horizontal"}(_||(_={})),function(t){t.TIME="time",t.LINEAR="linear",t.LOG="log",t.LABELS="labels"}(b||(b={})),function(t){t.MOUSE="mouse",t.TOP="top",t.BOTTOM="bottom"}(x||(x={})),function(t){t.DATAPOINT="datapoint",t.GRIDLINE="gridline",t.TITLE="title"}(w||(w={})),function(t){t.RIGHT="right",t.LEFT="left",t.TOP="top",t.BOTTOM="bottom"}(T||(T={})),function(t){t.HORIZONTAL="horizontal",t.VERTICAL="vertical"}(O||(O={})),function(t){t.ROW="row",t.COLUMN="column",t.ROW_REVERSE="row-reverse",t.COLUMN_REVERSE="column-reverse"}(E||(E={})),function(t){t.FIXED="fixed",t.PREFERRED="preferred",t.STRETCH="stretch"}(M||(M={})),function(t){t.LEFT="left",t.RIGHT="right"}(S||(S={})),function(t){t.GRID="grid",t.VERT_OR_HORIZ="vertOrHoriz",t.PIE="pie",t.DONUT="donut"}(A||(A={})),function(t){t.START="start",t.MIDDLE="middle",t.END="end"}(P||(P={})),function(t){t.BASELINE="baseline",t.MIDDLE="middle",t.HANGING="hanging"}(C||(C={}));var D=Object.freeze({__proto__:null,get Roles(){return r},Events:k,get ChartTheme(){return m},get AxisPositions(){return y},get CartesianOrientations(){return _},get ScaleTypes(){return b},get TooltipPosition(){return x},get TooltipTypes(){return w},get LegendPositions(){return T},get LegendOrientations(){return O},get LayoutDirection(){return E},get LayoutGrowth(){return M},get CalloutDirections(){return S},get Skeletons(){return A},get TextAnchor(){return P},get DominantBaseline(){return C}}),L="object"==typeof global&&global&&global.Object===Object&&global,R="object"==typeof self&&self&&self.Object===Object&&self,I=L||R||Function("return this")(),j=I.Symbol,N=Object.prototype,U=N.hasOwnProperty,H=N.toString,V=j?j.toStringTag:void 0;var G=Object.prototype.toString;var B=j?j.toStringTag:void 0;function F(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":B&&B in Object(t)?function(t){var e=U.call(t,V),n=t[V];try{t[V]=void 0;var r=!0}catch(t){}var i=H.call(t);return r&&(e?t[V]=n:delete t[V]),i}(t):function(t){return G.call(t)}(t)}function z(t){return null!=t&&"object"==typeof t}function W(t){return"symbol"==typeof t||z(t)&&"[object Symbol]"==F(t)}function Y(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}var q=Array.isArray,X=j?j.prototype:void 0,$=X?X.toString:void 0;function Z(t){if("string"==typeof t)return t;if(q(t))return Y(t,Z)+"";if(W(t))return $?$.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Q(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var K=/^\s+|\s+$/g,J=/^[-+]0x[0-9a-f]+$/i,tt=/^0b[01]+$/i,et=/^0o[0-7]+$/i,nt=parseInt;function rt(t){if("number"==typeof t)return t;if(W(t))return NaN;if(Q(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Q(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(K,"");var n=tt.test(t);return n||et.test(t)?nt(t.slice(2),n?2:8):J.test(t)?NaN:+t}function it(t){return t}function ot(t){if(!Q(t))return!1;var e=F(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var at,st=I["__core-js_shared__"],ut=(at=/[^.]+$/.exec(st&&st.keys&&st.keys.IE_PROTO||""))?"Symbol(src)_1."+at:"";var lt=Function.prototype.toString;function ct(t){if(null!=t){try{return lt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var ht=/^\[object .+?Constructor\]$/,ft=Function.prototype,dt=Object.prototype,pt=ft.toString,gt=dt.hasOwnProperty,vt=RegExp("^"+pt.call(gt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function mt(t){return!(!Q(t)||(e=t,ut&&ut in e))&&(ot(t)?vt:ht).test(ct(t));var e}function yt(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return mt(n)?n:void 0}var _t=yt(I,"WeakMap"),bt=Object.create,xt=function(){function t(){}return function(e){if(!Q(e))return{};if(bt)return bt(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function wt(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 Tt(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var Ot=Date.now;var Et=function(){try{var t=yt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),Mt=function(t){var e=0,n=0;return function(){var r=Ot(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(Et?function(t,e){return Et(t,"toString",{configurable:!0,enumerable:!1,value:(n=e,function(){return n}),writable:!0});var n}:it);function St(t){return t!=t}function At(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,St,n)}(t,e,0)>-1}var Pt=/^(?:0|[1-9]\d*)$/;function Ct(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&Pt.test(t))&&t>-1&&t%1==0&&t<e}function kt(t,e,n){"__proto__"==e&&Et?Et(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Dt(t,e){return t===e||t!=t&&e!=e}var Lt=Object.prototype.hasOwnProperty;function Rt(t,e,n){var r=t[e];Lt.call(t,e)&&Dt(r,n)&&(void 0!==n||e in t)||kt(t,e,n)}function It(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?kt(n,s,u):Rt(n,s,u)}return n}var jt=Math.max;function Nt(t,e){return Mt(function(t,e,n){return e=jt(void 0===e?t.length-1:e,0),function(){for(var r=arguments,i=-1,o=jt(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),wt(t,this,s)}}(t,e,it),t+"")}function Ut(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function Ht(t){return null!=t&&Ut(t.length)&&!ot(t)}var Vt=Object.prototype;function Gt(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Vt)}function Bt(t){return z(t)&&"[object Arguments]"==F(t)}var Ft=Object.prototype,zt=Ft.hasOwnProperty,Wt=Ft.propertyIsEnumerable,Yt=Bt(function(){return arguments}())?Bt:function(t){return z(t)&&zt.call(t,"callee")&&!Wt.call(t,"callee")};var qt="object"==typeof t&&t&&!t.nodeType&&t,Xt=qt&&"object"==typeof module&&module&&!module.nodeType&&module,$t=Xt&&Xt.exports===qt?I.Buffer:void 0,Zt=($t?$t.isBuffer:void 0)||function(){return!1},Qt={};function Kt(t){return function(e){return t(e)}}Qt["[object Float32Array]"]=Qt["[object Float64Array]"]=Qt["[object Int8Array]"]=Qt["[object Int16Array]"]=Qt["[object Int32Array]"]=Qt["[object Uint8Array]"]=Qt["[object Uint8ClampedArray]"]=Qt["[object Uint16Array]"]=Qt["[object Uint32Array]"]=!0,Qt["[object Arguments]"]=Qt["[object Array]"]=Qt["[object ArrayBuffer]"]=Qt["[object Boolean]"]=Qt["[object DataView]"]=Qt["[object Date]"]=Qt["[object Error]"]=Qt["[object Function]"]=Qt["[object Map]"]=Qt["[object Number]"]=Qt["[object Object]"]=Qt["[object RegExp]"]=Qt["[object Set]"]=Qt["[object String]"]=Qt["[object WeakMap]"]=!1;var Jt="object"==typeof t&&t&&!t.nodeType&&t,te=Jt&&"object"==typeof module&&module&&!module.nodeType&&module,ee=te&&te.exports===Jt&&L.process,ne=function(){try{var t=te&&te.require&&te.require("util").types;return t||ee&&ee.binding&&ee.binding("util")}catch(t){}}(),re=ne&&ne.isTypedArray,ie=re?Kt(re):function(t){return z(t)&&Ut(t.length)&&!!Qt[F(t)]},oe=Object.prototype.hasOwnProperty;function ae(t,e){var n=q(t),r=!n&&Yt(t),i=!n&&!r&&Zt(t),o=!n&&!r&&!i&&ie(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&&!oe.call(t,l)||a&&("length"==l||i&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Ct(l,u))||s.push(l);return s}function se(t,e){return function(n){return t(e(n))}}var ue=se(Object.keys,Object),le=Object.prototype.hasOwnProperty;function ce(t){return Ht(t)?ae(t):function(t){if(!Gt(t))return ue(t);var e=[];for(var n in Object(t))le.call(t,n)&&"constructor"!=n&&e.push(n);return e}(t)}var he=Object.prototype.hasOwnProperty;function fe(t){if(!Q(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=Gt(t),n=[];for(var r in t)("constructor"!=r||!e&&he.call(t,r))&&n.push(r);return n}function de(t){return Ht(t)?ae(t,!0):fe(t)}var pe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ge=/^\w*$/;function ve(t,e){if(q(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!W(t))||(ge.test(t)||!pe.test(t)||null!=e&&t in Object(e))}var me=yt(Object,"create");var ye=Object.prototype.hasOwnProperty;var _e=Object.prototype.hasOwnProperty;function be(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 xe(t,e){for(var n=t.length;n--;)if(Dt(t[n][0],e))return n;return-1}be.prototype.clear=function(){this.__data__=me?me(null):{},this.size=0},be.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},be.prototype.get=function(t){var e=this.__data__;if(me){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return ye.call(e,t)?e[t]:void 0},be.prototype.has=function(t){var e=this.__data__;return me?void 0!==e[t]:_e.call(e,t)},be.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=me&&void 0===e?"__lodash_hash_undefined__":e,this};var we=Array.prototype.splice;function Te(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])}}Te.prototype.clear=function(){this.__data__=[],this.size=0},Te.prototype.delete=function(t){var e=this.__data__,n=xe(e,t);return!(n<0)&&(n==e.length-1?e.pop():we.call(e,n,1),--this.size,!0)},Te.prototype.get=function(t){var e=this.__data__,n=xe(e,t);return n<0?void 0:e[n][1]},Te.prototype.has=function(t){return xe(this.__data__,t)>-1},Te.prototype.set=function(t,e){var n=this.__data__,r=xe(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var Oe=yt(I,"Map");function Ee(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 Me(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])}}Me.prototype.clear=function(){this.size=0,this.__data__={hash:new be,map:new(Oe||Te),string:new be}},Me.prototype.delete=function(t){var e=Ee(this,t).delete(t);return this.size-=e?1:0,e},Me.prototype.get=function(t){return Ee(this,t).get(t)},Me.prototype.has=function(t){return Ee(this,t).has(t)},Me.prototype.set=function(t,e){var n=Ee(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function Se(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Se.Cache||Me),n}Se.Cache=Me;var Ae=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Pe=/\\(\\)?/g,Ce=function(t){var e=Se(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Ae,(function(t,n,r,i){e.push(r?i.replace(Pe,"$1"):n||t)})),e}));function ke(t){return null==t?"":Z(t)}function De(t,e){return q(t)?t:ve(t,e)?[t]:Ce(ke(t))}function Le(t){if("string"==typeof t||W(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Re(t,e){for(var n=0,r=(e=De(e,t)).length;null!=t&&n<r;)t=t[Le(e[n++])];return n&&n==r?t:void 0}function Ie(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var je=j?j.isConcatSpreadable:void 0;function Ne(t){return q(t)||Yt(t)||!!(je&&t&&t[je])}var Ue=se(Object.getPrototypeOf,Object),He=Function.prototype,Ve=Object.prototype,Ge=He.toString,Be=Ve.hasOwnProperty,Fe=Ge.call(Object);var ze=function(t){return function(e){return null==t?void 0:t[e]}}({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),We=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ye=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var qe=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var Xe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var $e="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ze="["+$e+"]",Qe="\\d+",Ke="[\\u2700-\\u27bf]",Je="[a-z\\xdf-\\xf6\\xf8-\\xff]",tn="[^\\ud800-\\udfff"+$e+Qe+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",en="(?:\\ud83c[\\udde6-\\uddff]){2}",nn="[\\ud800-\\udbff][\\udc00-\\udfff]",rn="[A-Z\\xc0-\\xd6\\xd8-\\xde]",on="(?:"+Je+"|"+tn+")",an="(?:"+rn+"|"+tn+")",sn="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",un="[\\ufe0e\\ufe0f]?"+sn+("(?:\\u200d(?:"+["[^\\ud800-\\udfff]",en,nn].join("|")+")[\\ufe0e\\ufe0f]?"+sn+")*"),ln="(?:"+[Ke,en,nn].join("|")+")"+un,cn=RegExp([rn+"?"+Je+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[Ze,rn,"$"].join("|")+")",an+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[Ze,rn+on,"$"].join("|")+")",rn+"?"+on+"+(?:['’](?:d|ll|m|re|s|t|ve))?",rn+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Qe,ln].join("|"),"g");function hn(t,e,n){return t=ke(t),void 0===(e=n?void 0:e)?function(t){return Xe.test(t)}(t)?function(t){return t.match(cn)||[]}(t):function(t){return t.match(qe)||[]}(t):t.match(e)||[]}var fn=RegExp("['’]","g");function dn(t,e,n){return void 0===n&&(n=e,e=void 0),void 0!==n&&(n=(n=rt(n))==n?n:0),void 0!==e&&(e=(e=rt(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}(rt(t),e,n)}function pn(t){var e=this.__data__=new Te(t);this.size=e.size}pn.prototype.clear=function(){this.__data__=new Te,this.size=0},pn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},pn.prototype.get=function(t){return this.__data__.get(t)},pn.prototype.has=function(t){return this.__data__.has(t)},pn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Te){var r=n.__data__;if(!Oe||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Me(r)}return n.set(t,e),this.size=n.size,this};var gn="object"==typeof t&&t&&!t.nodeType&&t,vn=gn&&"object"==typeof module&&module&&!module.nodeType&&module,mn=vn&&vn.exports===gn?I.Buffer:void 0,yn=mn?mn.allocUnsafe:void 0;function _n(t,e){if(e)return t.slice();var n=t.length,r=yn?yn(n):new t.constructor(n);return t.copy(r),r}function bn(){return[]}var xn=Object.prototype.propertyIsEnumerable,wn=Object.getOwnPropertySymbols,Tn=wn?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}(wn(t),(function(e){return xn.call(t,e)})))}:bn;var On=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)Ie(e,Tn(t)),t=Ue(t);return e}:bn;function En(t,e,n){var r=e(t);return q(t)?r:Ie(r,n(t))}function Mn(t){return En(t,ce,Tn)}function Sn(t){return En(t,de,On)}var An=yt(I,"DataView"),Pn=yt(I,"Promise"),Cn=yt(I,"Set"),kn=ct(An),Dn=ct(Oe),Ln=ct(Pn),Rn=ct(Cn),In=ct(_t),jn=F;(An&&"[object DataView]"!=jn(new An(new ArrayBuffer(1)))||Oe&&"[object Map]"!=jn(new Oe)||Pn&&"[object Promise]"!=jn(Pn.resolve())||Cn&&"[object Set]"!=jn(new Cn)||_t&&"[object WeakMap]"!=jn(new _t))&&(jn=function(t){var e=F(t),n="[object Object]"==e?t.constructor:void 0,r=n?ct(n):"";if(r)switch(r){case kn:return"[object DataView]";case Dn:return"[object Map]";case Ln:return"[object Promise]";case Rn:return"[object Set]";case In:return"[object WeakMap]"}return e});var Nn=jn,Un=Object.prototype.hasOwnProperty;var Hn=I.Uint8Array;function Vn(t){var e=new t.constructor(t.byteLength);return new Hn(e).set(new Hn(t)),e}var Gn=/\w*$/;var Bn=j?j.prototype:void 0,Fn=Bn?Bn.valueOf:void 0;function zn(t,e){var n=e?Vn(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Wn(t,e,n){var r,i,o,a=t.constructor;switch(e){case"[object ArrayBuffer]":return Vn(t);case"[object Boolean]":case"[object Date]":return new a(+t);case"[object DataView]":return function(t,e){var n=e?Vn(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 zn(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,Gn.exec(i))).lastIndex=i.lastIndex,o;case"[object Set]":return new a;case"[object Symbol]":return r=t,Fn?Object(Fn.call(r)):{}}}function Yn(t){return"function"!=typeof t.constructor||Gt(t)?{}:xt(Ue(t))}var qn=ne&&ne.isMap,Xn=qn?Kt(qn):function(t){return z(t)&&"[object Map]"==Nn(t)};var $n=ne&&ne.isSet,Zn=$n?Kt($n):function(t){return z(t)&&"[object Set]"==Nn(t)},Qn={};function Kn(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(!Q(t))return t;var c=q(t);if(c){if(a=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&Un.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!s)return Tt(t,a)}else{var h=Nn(t),f="[object Function]"==h||"[object GeneratorFunction]"==h;if(Zt(t))return _n(t,s);if("[object Object]"==h||"[object Arguments]"==h||f&&!i){if(a=u||f?{}:Yn(t),!s)return u?function(t,e){return It(t,On(t),e)}(t,function(t,e){return t&&It(e,de(e),t)}(a,t)):function(t,e){return It(t,Tn(t),e)}(t,function(t,e){return t&&It(e,ce(e),t)}(a,t))}else{if(!Qn[h])return i?t:{};a=Wn(t,h,s)}}o||(o=new pn);var d=o.get(t);if(d)return d;o.set(t,a),Zn(t)?t.forEach((function(r){a.add(Kn(r,e,n,r,t,o))})):Xn(t)&&t.forEach((function(r,i){a.set(i,Kn(r,e,n,i,t,o))}));var p=l?u?Sn:Mn:u?keysIn:ce,g=c?void 0:p(t);return function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););}(g||t,(function(r,i){g&&(r=t[i=r]),Rt(a,i,Kn(r,e,n,i,t,o))})),a}Qn["[object Arguments]"]=Qn["[object Array]"]=Qn["[object ArrayBuffer]"]=Qn["[object DataView]"]=Qn["[object Boolean]"]=Qn["[object Date]"]=Qn["[object Float32Array]"]=Qn["[object Float64Array]"]=Qn["[object Int8Array]"]=Qn["[object Int16Array]"]=Qn["[object Int32Array]"]=Qn["[object Map]"]=Qn["[object Number]"]=Qn["[object Object]"]=Qn["[object RegExp]"]=Qn["[object Set]"]=Qn["[object String]"]=Qn["[object Symbol]"]=Qn["[object Uint8Array]"]=Qn["[object Uint8ClampedArray]"]=Qn["[object Uint16Array]"]=Qn["[object Uint32Array]"]=!0,Qn["[object Error]"]=Qn["[object Function]"]=Qn["[object WeakMap]"]=!1;function Jn(t){return Kn(t,5)}function tr(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Me;++e<n;)this.add(t[e])}function er(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function nr(t,e){return t.has(e)}tr.prototype.add=tr.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},tr.prototype.has=function(t){return this.__data__.has(t)};function rr(t,e,n,r,i,o){var a=1&n,s=t.length,u=e.length;if(s!=u&&!(a&&u>s))return!1;var l=o.get(t);if(l&&o.get(e))return l==e;var c=-1,h=!0,f=2&n?new tr:void 0;for(o.set(t,e),o.set(e,t);++c<s;){var d=t[c],p=e[c];if(r)var g=a?r(p,d,c,e,t,o):r(d,p,c,t,e,o);if(void 0!==g){if(g)continue;h=!1;break}if(f){if(!er(e,(function(t,e){if(!nr(f,e)&&(d===t||i(d,t,n,r,o)))return f.push(e)}))){h=!1;break}}else if(d!==p&&!i(d,p,n,r,o)){h=!1;break}}return o.delete(t),o.delete(e),h}function ir(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function or(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}var ar=j?j.prototype:void 0,sr=ar?ar.valueOf:void 0;var ur=Object.prototype.hasOwnProperty;var lr=Object.prototype.hasOwnProperty;function cr(t,e,n,r,i,o){var a=q(t),s=q(e),u=a?"[object Array]":Nn(t),l=s?"[object Array]":Nn(e),c="[object Object]"==(u="[object Arguments]"==u?"[object Object]":u),h="[object Object]"==(l="[object Arguments]"==l?"[object Object]":l),f=u==l;if(f&&Zt(t)){if(!Zt(e))return!1;a=!0,c=!1}if(f&&!c)return o||(o=new pn),a||ie(t)?rr(t,e,n,r,i,o):function(t,e,n,r,i,o,a){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!o(new Hn(t),new Hn(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Dt(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var s=ir;case"[object Set]":var u=1&r;if(s||(s=or),t.size!=e.size&&!u)return!1;var l=a.get(t);if(l)return l==e;r|=2,a.set(t,e);var c=rr(s(t),s(e),r,i,o,a);return a.delete(t),c;case"[object Symbol]":if(sr)return sr.call(t)==sr.call(e)}return!1}(t,e,u,n,r,i,o);if(!(1&n)){var d=c&&lr.call(t,"__wrapped__"),p=h&&lr.call(e,"__wrapped__");if(d||p){var g=d?t.value():t,v=p?e.value():e;return o||(o=new pn),i(g,v,n,r,o)}}return!!f&&(o||(o=new pn),function(t,e,n,r,i,o){var a=1&n,s=Mn(t),u=s.length;if(u!=Mn(e).length&&!a)return!1;for(var l=u;l--;){var c=s[l];if(!(a?c in e:ur.call(e,c)))return!1}var h=o.get(t);if(h&&o.get(e))return h==e;var f=!0;o.set(t,e),o.set(e,t);for(var d=a;++l<u;){var p=t[c=s[l]],g=e[c];if(r)var v=a?r(g,p,c,e,t,o):r(p,g,c,t,e,o);if(!(void 0===v?p===g||i(p,g,n,r,o):v)){f=!1;break}d||(d="constructor"==c)}if(f&&!d){var m=t.constructor,y=e.constructor;m!=y&&"constructor"in t&&"constructor"in e&&!("function"==typeof m&&m instanceof m&&"function"==typeof y&&y instanceof y)&&(f=!1)}return o.delete(t),o.delete(e),f}(t,e,n,r,i,o))}function hr(t,e,n,r,i){return t===e||(null==t||null==e||!z(t)&&!z(e)?t!=t&&e!=e:cr(t,e,n,r,hr,i))}function fr(t){return t==t&&!Q(t)}function dr(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}}function pr(t){var e=function(t){for(var e=ce(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,fr(i)]}return e}(t);return 1==e.length&&e[0][2]?dr(e[0][0],e[0][1]):function(n){return n===t||function(t,e,n,r){var i=n.length,o=i,a=!r;if(null==t)return!o;for(t=Object(t);i--;){var s=n[i];if(a&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++i<o;){var u=(s=n[i])[0],l=t[u],c=s[1];if(a&&s[2]){if(void 0===l&&!(u in t))return!1}else{var h=new pn;if(r)var f=r(l,c,u,t,e,h);if(!(void 0===f?hr(c,l,3,r,h):f))return!1}}return!0}(n,t,e)}}function gr(t,e){return null!=t&&e in Object(t)}function vr(t,e){return null!=t&&function(t,e,n){for(var r=-1,i=(e=De(e,t)).length,o=!1;++r<i;){var a=Le(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&Ut(i)&&Ct(a,i)&&(q(t)||Yt(t))}(t,e,gr)}function mr(t,e){return ve(t)&&fr(e)?dr(Le(t),e):function(n){var r=function(t,e,n){var r=null==t?void 0:Re(t,e);return void 0===r?n:r}(n,t);return void 0===r&&r===e?vr(n,t):hr(e,r,3)}}function yr(t){return ve(t)?(e=Le(t),function(t){return null==t?void 0:t[e]}):function(t){return function(e){return Re(e,t)}}(t);var e}var _r,br=function(t,e,n){for(var r=-1,i=Object(t),o=n(t),a=o.length;a--;){var s=o[_r?a:++r];if(!1===e(i[s],s,i))break}return t};var xr=function(t,e){return function(n,r){if(null==n)return n;if(!Ht(n))return t(n,r);for(var i=n.length,o=e?i:-1,a=Object(n);(e?o--:++o<i)&&!1!==r(a[o],o,a););return n}}((function(t,e){return t&&br(t,e,ce)})),wr=function(){return I.Date.now()},Tr=Math.max,Or=Math.min;function Er(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 d(e){var n=r,o=i;return r=i=void 0,l=e,a=t.apply(o,n)}function p(t){return l=t,s=setTimeout(v,e),c?d(t):a}function g(t){var n=t-u;return void 0===u||n>=e||n<0||h&&t-l>=o}function v(){var t=wr();if(g(t))return m(t);s=setTimeout(v,function(t){var n=e-(t-u);return h?Or(n,o-(t-l)):n}(t))}function m(t){return s=void 0,f&&r?d(t):(r=i=void 0,a)}function y(){var t=wr(),n=g(t);if(r=arguments,i=this,u=t,n){if(void 0===s)return p(u);if(h)return clearTimeout(s),s=setTimeout(v,e),d(u)}return void 0===s&&(s=setTimeout(v,e)),a}return e=rt(e)||0,Q(n)&&(c=!!n.leading,o=(h="maxWait"in n)?Tr(rt(n.maxWait)||0,e):o,f="trailing"in n?!!n.trailing:f),y.cancel=function(){void 0!==s&&clearTimeout(s),l=0,r=u=i=s=void 0},y.flush=function(){return void 0===s?a:m(wr())},y}function Mr(t,e,n){(void 0===n||Dt(t[e],n))&&(void 0!==n||e in t)||kt(t,e,n)}function Sr(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}function Ar(t,e,n,r,i,o,a){var s=Sr(t,n),u=Sr(e,n),l=a.get(u);if(l)Mr(t,n,l);else{var c,h=o?o(s,u,n+"",t,e,a):void 0,f=void 0===h;if(f){var d=q(u),p=!d&&Zt(u),g=!d&&!p&&ie(u);h=u,d||p||g?q(s)?h=s:z(c=s)&&Ht(c)?h=Tt(s):p?(f=!1,h=_n(u,!0)):g?(f=!1,h=zn(u,!0)):h=[]:function(t){if(!z(t)||"[object Object]"!=F(t))return!1;var e=Ue(t);if(null===e)return!0;var n=Be.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Ge.call(n)==Fe}(u)||Yt(u)?(h=s,Yt(s)?h=function(t){return It(t,de(t))}(s):Q(s)&&!ot(s)||(h=Yn(u))):f=!1}f&&(a.set(u,h),i(h,u,r,o,a),a.delete(u)),Mr(t,n,h)}}function Pr(t,e,n,r,i){t!==e&&br(e,(function(o,a){if(i||(i=new pn),Q(o))Ar(t,e,a,n,Pr,r,i);else{var s=r?r(Sr(t,a),o,a+"",t,e,i):void 0;void 0===s&&(s=o),Mr(t,a,s)}}),de)}function Cr(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function kr(t,e){var n=-1,r=Ht(t)?Array(t.length):[];return xr(t,(function(t,i,o){r[++n]=e(t,i,o)})),r}function Dr(t,e){var n;return(q(t)?Y:kr)(t,"function"==typeof(n=e)?n:null==n?it:"object"==typeof n?q(n)?mr(n[0],n[1]):pr(n):yr(n))}function Lr(t,e){return function t(e,n,r,i,o){var a=-1,s=e.length;for(r||(r=Ne),o||(o=[]);++a<s;){var u=e[a];n>0&&r(u)?n>1?t(u,n-1,r,i,o):Ie(o,u):i||(o[o.length]=u)}return o}(Dr(t,e),1/0)}function Rr(t,e){return hr(t,e)}var Ir,jr,Nr,Ur=(Ir=function(t,e,n){return t+(n?"-":"")+e.toLowerCase()},function(t){return function(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}(hn(function(t){return(t=ke(t))&&t.replace(We,ze).replace(Ye,"")}(t).replace(fn,"")),Ir,"")}),Hr=(jr=function(t,e,n){Pr(t,e,n)},Nt((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=jr.length>3&&"function"==typeof i?(r--,i):void 0,o&&function(t,e,n){if(!Q(n))return!1;var r=typeof e;return!!("number"==r?Ht(n)&&Ct(e,n.length):"string"==r&&e in n)&&Dt(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&&jr(t,a,n,i)}return t}))),Vr=Cn&&1/or(new Cn([,-0]))[1]==1/0?function(t){return new Cn(t)}:function(){};function Gr(t){return t&&t.length?function(t,e,n){var r=-1,i=At,o=t.length,a=!0,s=[],u=s;if(n)a=!1,i=Cr;else if(o>=200){var l=e?null:Vr(t);if(l)return or(l);a=!1,i=nr,u=new tr}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 Br(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Fr(t,e){return t(e={exports:{}},e.exports),e.exports}!function(t){t.debounce=Er,t.clone=Jn,t.merge=Hr,t.removeArrayDuplicates=Gr,t.clamp=dn,t.isEqual=Rr,t.flatMapDeep=Lr,t.kebabCase=Ur,t.mergeDefaultChartOptions=function(e,n){e=t.clone(e);var r=Object.keys(n.axes||{});for(var i in 0===r.length&&delete e.axes,e.axes)if(r.includes(i)){var o=n.axes[i];(o.primary||o.secondary)&&console.warn("`primary` & `secondary` are no longer needed for axis configurations. Read more here https://carbon-design-system.github.io/carbon-charts/?path=/story/tutorials--tabular-data-format");var a=o.mapsTo;if(null==a){var s=o.scaleType;null==s?o.mapsTo="value":s===b.TIME?o.mapsTo="date":s===b.LABELS&&(o.mapsTo="key")}}else delete e.axes[i];return t.merge(e,n)},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){if(t){var e=t.getAttribute("transform").match(/translate\([0-9]+\.?[0-9]*,[0-9]+\.?[0-9]*\)/);if(!e)return null;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.formatWidthHeightValues=function(t){var e=t.toString();return e.match(/[a-z]/i)?e:e+"px"},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!=0?parseFloat(n.toFixed(1)):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===_.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},t.flipDomainAndRangeBasedOnOrientation=function(t,e,n){return n===_.VERTICAL?[t,e]:[e,t]}}(Nr||(Nr={}));var zr=Fr((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,r){var i;r=r||{},i="string"==typeof n[t]?n[t]:1===e?n[t].one:n[t].other.replace("{{count}}",e);if(r.addSuffix)return r.comparison>0?"in "+i:i+" ago";return i};var n={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};t.exports=e.default}));Br(zr);var Wr=Fr((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e){var n=e||{},r=n.width?String(n.width):t.defaultWidth;return t.formats[r]||t.formats[t.defaultWidth]}},t.exports=e.default}));Br(Wr);var Yr=Fr((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,r=(n=Wr)&&n.__esModule?n:{default:n};var i={date:(0,r.default)({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:(0,r.default)({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:(0,r.default)({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})};e.default=i,t.exports=e.default}));Br(Yr);var qr=Fr((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,r,i){return n[t]};var n={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};t.exports=e.default}));Br(qr);var Xr=Fr((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e,n){var r,i=n||{};if("formatting"===(i.context?String(i.context):"standalone")&&t.formattingValues){var o=t.defaultFormattingWidth||t.defaultWidth,a=i.width?String(i.width):o;r=t.formattingValues[a]||t.formattingValues[o]}else{var s=t.defaultWidth,u=i.width?String(i.width):t.defaultWidth;r=t.values[u]||t.values[s]}return r[t.argumentCallback?t.argumentCallback(e):e]}},t.exports=e.default}));Br(Xr);var $r=Fr((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,r=(n=Xr)&&n.__esModule?n:{default:n};var i={ordinalNumber:function(t,e){var n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:(0,r.default)({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:(0,r.default)({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return Number(t)-1}}),month:(0,r.default)({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:(0,r.default)({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:(0,r.default)({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};e.default=i,t.exports=e.default}));Br($r);var Zr=Fr((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e,n){var r=String(e),i=n||{},o=r.match(t.matchPattern);if(!o)return null;var a=o[0],s=r.match(t.parsePattern);if(!s)return null;var u=t.valueCallback?t.valueCallback(s[0]):s[0];return{value:u=i.valueCallback?i.valueCallback(u):u,rest:r.slice(a.length)}}},t.exports=e.default}));Br(Zr);var Qr=Fr((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e,n){var r=String(e),i=n||{},o=i.width,a=o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth],s=r.match(a);if(!s)return null;var u,l=s[0],c=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth];return u="[object Array]"===Object.prototype.toString.call(c)?function(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return n}(c,(function(t){return t.test(r)})):function(t,e){for(var n in t)if(t.hasOwnProperty(n)&&e(t[n]))return n}(c,(function(t){return t.test(r)})),u=t.valueCallback?t.valueCallback(u):u,{value:u=i.valueCallback?i.valueCallback(u):u,rest:r.slice(l.length)}}},t.exports=e.default}));Br(Qr);var Kr=Fr((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i(Zr),r=i(Qr);function i(t){return t&&t.__esModule?t:{default:t}}var o={ordinalNumber:(0,n.default)({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}}),era:(0,r.default)({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:(0,r.default)({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:(0,r.default)({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:(0,r.default)({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:(0,r.default)({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};e.default=o,t.exports=e.default}));Br(Kr);var Jr=Br(Fr((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=s(zr),r=s(Yr),i=s(qr),o=s($r),a=s(Kr);function s(t){return t&&t.__esModule?t:{default:t}}var u={code:"en-US",formatDistance:n.default,formatLong:r.default,formatRelative:i.default,localize:o.default,match:a.default,options:{weekStartsOn:0,firstWeekContainsDate:1}};e.default=u,t.exports=e.default}))),ti={position:T.BOTTOM,clickable:!0,enabled:!0,items:{status:{ACTIVE:1,DISABLED:0},horizontalSpace:12,verticalSpace:24,textYOffset:8},checkbox:{radius:6.5,spaceAfter:4}},ei={x:{numberOfTicks:5},y:{numberOfTicks:5}},ni={datapoint:{horizontalOffset:10,enabled:!0},title:{verticalOffset:.75,width:.4}},ri=Nr.merge({},ni,{gridline:{enabled:!0,threshold:.02}}),ii=Nr.merge({},ri,{datapoint:{verticalOffset:4},gridline:{enabled:!1}}),oi={addSpaceOnEdges:1,showDayName:!1,localeObject:Jr,timeIntervalFormats:{"15seconds":{primary:"MMM d, pp",secondary:"pp"},minute:{primary:"MMM d, p",secondary:"p"},"30minutes":{primary:"MMM d, p",secondary:"p"},hourly:{primary:"MMM d, hh a",secondary:"hh a"},daily:{primary:"MMM d",secondary:"d"},weekly:{primary:"eee, MMM d",secondary:"eee"},monthly:{primary:"MMM yyyy",secondary:"MMM"},quarterly:{primary:"QQQ ''yy",secondary:"QQQ"},yearly:{primary:"yyyy",secondary:"yyyy"}}},ai={width:null,height:null,resizable:!0,tooltip:ni,legend:ti,style:{prefix:"cc"},data:{groupMapsTo:"group",loading:!1},color:{scale:null}},si=Nr.merge({},ai,{axes:{top:{includeZero:!0},bottom:{includeZero:!0},left:{includeZero:!0},right:{includeZero:!0}},timeScale:oi,grid:ei,tooltip:ri}),ui=Nr.merge({},si,{bars:{maxWidth:16},timeScale:Nr.merge(oi,{addSpaceOnEdges:1}),tooltip:ii}),li=Nr.merge({},ui,{}),ci=Nr.merge({},ui,{}),hi=Nr.merge({},ui,{bars:Nr.merge({},ui.bars,{dividerSize:1.5})}),fi=Nr.merge({},si,{points:{radius:3,filled:!1}}),di=Nr.merge({},si,{points:{radius:4,fillOpacity:.3,filled:!0}}),pi=Nr.merge({},si,{bubble:{radiusMapsTo:"radius",radiusRange:function(t,e){var n=Math.min(t.width,t.height);return[3*n/400,25*n/400]},fillOpacity:.2}}),gi=Nr.merge({},ai,{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}}}),vi={chart:ai,axisChart:si,simpleBarChart:li,groupedBarChart:ci,stackedBarChart:hi,bubbleChart:pi,lineChart:fi,scatterChart:di,pieChart:gi,donutChart:Nr.merge({},gi,{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()}}}}),radarChart:Nr.merge({},ai,{radar:{axes:{angle:"key",value:"value"},opacity:{unselected:.1,selected:.3},xLabelPadding:10,yLabelPadding:8,yTicksNumber:4,minRange:10,xAxisRectHeight:50,dotsRadius:5},tooltip:{gridline:{enabled:!0},valueFormatter:function(t){return null!=t?t:"N/A"}}})},mi={opacity:{unselected:.3,selected:1}},yi={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}},_i={ticks:{number:7,rotateIfSmallerThan:30},paddingRatio:.1},bi={default:{size:24}},xi=Object.freeze({__proto__:null,legend:ti,grid:ei,baseTooltip:ni,axisChartTooltip:ri,barChartTooltip:ii,timeScale:oi,options:vi,lines:mi,transitions:yi,axis:_i,spacers:bi,tickSpaceRatioVertical:2.5,tickSpaceRatioHorizontal:3.5}),wi={10:"#fff0f1",20:"#fcd0d3",30:"#ffa4a9",40:"#ff767c",50:"#fb4b53",60:"#da1e28",70:"#a51920",80:"#750e13",90:"#570408",100:"#2c080a"},Ti={10:"#fff0f6",20:"#ffcfe1",30:"#ffa0c2",40:"#fa75a6",50:"#ee538b",60:"#d12765",70:"#a11950",80:"#760a3a",90:"#57002b",100:"#2a0a16"},Oi={10:"#f7f1ff",20:"#e6d6ff",30:"#d0b0ff",40:"#bb8eff",50:"#a66efa",60:"#8a3ffc",70:"#6e32c9",80:"#4f2196",90:"#38146b",100:"#1e1033"},Ei={10:"#edf4ff",20:"#c9deff",30:"#97c1ff",40:"#6ea6ff",50:"#408bfc",60:"#0062ff",70:"#054ada",80:"#0530ad",90:"#061f80",100:"#051243"},Mi={10:"#e3f6ff",20:"#b3e6ff",30:"#6ccaff",40:"#30b0ff",50:"#1191e6",60:"#0072c3",70:"#0058a1",80:"#003d73",90:"#002b50",100:"#07192b"},Si={10:"#dbfbfb",20:"#92eeee",30:"#20d5d2",40:"#00bab6",50:"#009c98",60:"#007d79",70:"#006161",80:"#004548",90:"#003137",100:"#081a1c"},Ai={10:"#dafbe4",20:"#9deeb2",30:"#56d679",40:"#3dbb61",50:"#24a148",60:"#198038",70:"#10642a",80:"#054719",90:"#01330f",100:"#081b09"},Pi=function(t,e){return t[e]},Ci=function(t){return Pi(Ei,t)},ki=function(t){return Pi(Mi,t)},Di=function(t){return Pi(Ai,t)},Li=function(t){return Pi(Ti,t)},Ri=function(t){return Pi(Oi,t)},Ii=function(t){return Pi(wi,t)},ji=function(t){return Pi(Si,t)},Ni=[Ri(70),ki(50),ji(70),Li(70),Ii(50),Ii(90),Di(60),Ci(80),Li(50),"#b28600",ji(50),ki(90),"#8a3800",Ri(50)],Ui=[Ri(60),ki(40),ji(60),Li(40),Ii(50),Ii(10),Di(30),Ci(50),Li(60),"#d2a106",ji(40),ki(20),"#ba4e00",Ri(30)],Hi=Ni,Vi=Ui,Gi=Ui,Bi=Ni,Fi=Object.freeze({__proto__:null,WHITE:Ni,DARK:Ui,G10:Hi,G90:Vi,G100:Gi,DEFAULT:Bi});function zi(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Wi(t){var e;return 1===t.length&&(e=t,t=function(t,n){return zi(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 Yi=Wi(zi).right;function qi(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 Xi(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 $i=Math.sqrt(50),Zi=Math.sqrt(10),Qi=Math.sqrt(2);function Ki(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=Ji(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 Ji(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>=$i?10:o>=Zi?5:o>=Qi?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=$i?10:o>=Zi?5:o>=Qi?2:1)}function to(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>=$i?i*=10:o>=Zi?i*=5:o>=Qi&&(i*=2),e<t?-i:i}function eo(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])&&n>r&&(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))&&n>r&&(r=n);return r}function no(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function ro(){}function io(t,e){var n=new ro;if(t instanceof ro)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 oo(){}ro.prototype=io.prototype={constructor:ro,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 ao=io.prototype;oo.prototype=function(t,e){var n=new oo;if(t instanceof oo)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:oo,has:ao.has,add:function(t){return this["$"+(t+="")]=t,this},remove:ao.remove,clear:ao.clear,values:ao.keys,size:ao.size,empty:ao.empty,each:ao.each};var so=Array.prototype,uo=so.map,lo=so.slice,co={name:"implicit"};function ho(){var t=io(),e=[],n=[],r=co;function i(i){var o=i+"",a=t.get(o);if(!a){if(r!==co)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=io();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=lo.call(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return ho(e,n).unknown(r)},no.apply(i,arguments),i}function fo(){var t,e,n=ho().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 d=Xi(n).map((function(e){return h+t*e}));return i(c?d.reverse():d)}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 fo(r(),o).round(a).paddingInner(s).paddingOuter(u).align(l)},no.apply(c(),arguments)}function po(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function go(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function vo(){}var mo="\\s*([+-]?\\d+)\\s*",yo="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",_o="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",bo=/^#([0-9a-f]{3,8})$/,xo=new RegExp("^rgb\\("+[mo,mo,mo]+"\\)$"),wo=new RegExp("^rgb\\("+[_o,_o,_o]+"\\)$"),To=new RegExp("^rgba\\("+[mo,mo,mo,yo]+"\\)$"),Oo=new RegExp("^rgba\\("+[_o,_o,_o,yo]+"\\)$"),Eo=new RegExp("^hsl\\("+[yo,_o,_o]+"\\)$"),Mo=new RegExp("^hsla\\("+[yo,_o,_o,yo]+"\\)$"),So={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 Ao(){return this.rgb().formatHex()}function Po(){return this.rgb().formatRgb()}function Co(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=bo.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?ko(e):3===n?new Io(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?new Io(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?new Io(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=xo.exec(t))?new Io(e[1],e[2],e[3],1):(e=wo.exec(t))?new Io(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=To.exec(t))?Do(e[1],e[2],e[3],e[4]):(e=Oo.exec(t))?Do(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Eo.exec(t))?Ho(e[1],e[2]/100,e[3]/100,1):(e=Mo.exec(t))?Ho(e[1],e[2]/100,e[3]/100,e[4]):So.hasOwnProperty(t)?ko(So[t]):"transparent"===t?new Io(NaN,NaN,NaN,0):null}function ko(t){return new Io(t>>16&255,t>>8&255,255&t,1)}function Do(t,e,n,r){return r<=0&&(t=e=n=NaN),new Io(t,e,n,r)}function Lo(t){return t instanceof vo||(t=Co(t)),t?new Io((t=t.rgb()).r,t.g,t.b,t.opacity):new Io}function Ro(t,e,n,r){return 1===arguments.length?Lo(t):new Io(t,e,n,null==r?1:r)}function Io(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function jo(){return"#"+Uo(this.r)+Uo(this.g)+Uo(this.b)}function No(){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 Uo(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Ho(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Go(t,e,n,r)}function Vo(t){if(t instanceof Go)return new Go(t.h,t.s,t.l,t.opacity);if(t instanceof vo||(t=Co(t)),!t)return new Go;if(t instanceof Go)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 Go(a,s,u,t.opacity)}function Go(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Bo(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 Fo(t){return function(){return t}}function zo(t){return 1==(t=+t)?Wo: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):Fo(isNaN(e)?n:e)}}function Wo(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):Fo(isNaN(t)?e:t)}po(vo,Co,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Ao,formatHex:Ao,formatHsl:function(){return Vo(this).formatHsl()},formatRgb:Po,toString:Po}),po(Io,Ro,go(vo,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Io(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Io(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:jo,formatHex:jo,formatRgb:No,toString:No})),po(Go,(function(t,e,n,r){return 1===arguments.length?Vo(t):new Go(t,e,n,null==r?1:r)}),go(vo,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Go(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Go(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 Io(Bo(t>=240?t-240:t+120,i,r),Bo(t,i,r),Bo(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 Yo=function t(e){var n=zo(e);function r(t,e){var r=n((t=Ro(t)).r,(e=Ro(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=Wo(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 qo(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 Xo(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]=ea(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 $o(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function Zo(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Qo(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]=ea(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}var Ko=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Jo=new RegExp(Ko.source,"g");function ta(t,e){var n,r,i,o=Ko.lastIndex=Jo.lastIndex=0,a=-1,s=[],u=[];for(t+="",e+="";(n=Ko.exec(t))&&(r=Jo.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:Zo(n,r)})),o=Jo.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 ea(t,e){var n,r=typeof e;return null==e||"boolean"===r?Fo(e):("number"===r?Zo:"string"===r?(n=Co(e))?(e=n,Yo):ta:e instanceof Co?Yo:e instanceof Date?$o:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(e)?qo:Array.isArray(e)?Xo:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?Qo:Zo)(t,e)}function na(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var ra,ia,oa,aa,sa=180/Math.PI,ua={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function la(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)*sa,skewX:Math.atan(u)*sa,scaleX:a,scaleY:s}}function ca(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:Zo(t,i)},{i:u-2,x:Zo(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:Zo(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:Zo(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:Zo(t,n)},{i:s-2,x:Zo(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 ha=ca((function(t){return"none"===t?ua:(ra||(ra=document.createElement("DIV"),ia=document.documentElement,oa=document.defaultView),ra.style.transform=t,t=oa.getComputedStyle(ia.appendChild(ra),null).getPropertyValue("transform"),ia.removeChild(ra),la(+(t=t.slice(7,-1).split(","))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),fa=ca((function(t){return null==t?ua:(aa||(aa=document.createElementNS("http://www.w3.org/2000/svg","g")),aa.setAttribute("transform",t),(t=aa.transform.baseVal.consolidate())?la((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):ua)}),", ",")",")");function da(t){return+t}var pa=[0,1];function ga(t){return t}function va(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:function(t){return function(){return t}}(isNaN(e)?NaN:.5)}function ma(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 ya(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=va(i,r),o=n(a,o)):(r=va(r,i),o=n(o,a)),function(t){return o(r(t))}}function _a(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]=va(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(e){var n=Yi(t,e,1,r)-1;return o[n](i[n](e))}}function ba(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function xa(){var t,e,n,r,i,o,a=pa,s=pa,u=ea,l=ga;function c(){return r=Math.min(a.length,s.length)>2?_a:ya,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),Zo)))(n)))},h.domain=function(t){return arguments.length?(a=uo.call(t,da),l===ga||(l=ma(a)),c()):a.slice()},h.range=function(t){return arguments.length?(s=lo.call(t),c()):s.slice()},h.rangeRound=function(t){return s=lo.call(t),u=na,c()},h.clamp=function(t){return arguments.length?(l=t?ma(a):ga,h):l!==ga},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 wa(t,e){return xa()(t,e)}function Ta(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 Oa(t){return(t=Ta(Math.abs(t)))?t[1]:NaN}var Ea,Ma=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Sa(t){if(!(e=Ma.exec(t)))throw new Error("invalid format: "+t);var e;return new Aa({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 Aa(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 Pa(t,e){var n=Ta(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")}Sa.prototype=Aa.prototype,Aa.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 Ca={"%":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 Pa(100*t,e)},r:Pa,s:function(t,e){var n=Ta(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(Ea=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")+Ta(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 ka(t){return t}var Da,La,Ra,Ia=Array.prototype.map,ja=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Na(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?ka:(e=Ia.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?ka:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(Ia.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=Sa(t)).fill,n=t.align,h=t.sign,f=t.symbol,d=t.zero,p=t.width,g=t.comma,v=t.precision,m=t.trim,y=t.type;"n"===y?(g=!0,y="g"):Ca[y]||(void 0===v&&(v=12),m=!0,y="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var _="$"===f?i:"#"===f&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",b="$"===f?o:/[%p]/.test(y)?u:"",x=Ca[y],w=/[defgprs%]/.test(y);function T(t){var i,o,u,f=_,T=b;if("c"===y)T=x(t)+T,t="";else{var O=(t=+t)<0;if(t=isNaN(t)?c:x(Math.abs(t),v),m&&(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)),O&&0==+t&&(O=!1),f=(O?"("===h?h:l:"-"===h||"("===h?"":h)+f,T=("s"===y?ja[8+Ea/3]:"")+T+(O&&"("===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}}g&&!d&&(t=r(t,1/0));var E=f.length+t.length+T.length,M=E<p?new Array(p-E+1).join(e):"";switch(g&&d&&(t=r(M+t,M.length?p-T.length:1/0),M=""),n){case"<":t=f+t+T+M;break;case"=":t=f+M+t+T;break;case"^":t=M.slice(0,E=M.length>>1)+f+t+T+M.slice(E);break;default:t=M+f+t+T}return s(t)}return v=void 0===v?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v)),T.toString=function(){return t+""},T}return{format:h,formatPrefix:function(t,e){var n=h(((t=Sa(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Oa(e)/3))),i=Math.pow(10,-r),o=ja[8+r/3];return function(t){return n(i*t)+o}}}}function Ua(t,e,n,r){var i,o=to(t,e,n);switch((r=Sa(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(Oa(e)/3)))-Oa(Math.abs(t)))}(o,a))||(r.precision=i),Ra(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,Oa(e)-Oa(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,-Oa(Math.abs(t)))}(o))||(r.precision=i-2*("%"===r.type))}return La(r)}function Ha(t){var e=t.domain;return t.ticks=function(t){var n=e();return Ki(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return Ua(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=Ji(s,u,n))>0?r=Ji(s=Math.floor(s/r)*r,u=Math.ceil(u/r)*r,n):r<0&&(r=Ji(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 Va(){var t=wa(ga,ga);return t.copy=function(){return ba(t,Va())},no.apply(t,arguments),Ha(t)}function Ga(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 Ba(t){return Math.log(t)}function Fa(t){return Math.exp(t)}function za(t){return-Math.log(-t)}function Wa(t){return-Math.exp(-t)}function Ya(t){return isFinite(t)?+("1e"+t):t<0?0:t}function qa(t){return function(e){return-t(-e)}}function Xa(t){var e,n,r=t(Ba,Fa),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?Ya:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}(o),i()[0]<0?(e=qa(e),n=qa(n),t(za,Wa)):t(Ba,Fa),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),d=e(u),p=null==t?10:+t,g=[];if(!(o%1)&&d-f<p){if(f=Math.round(f)-1,d=Math.round(d)+1,s>0){for(;f<d;++f)for(c=1,l=n(f);c<o;++c)if(!((h=l*c)<s)){if(h>u)break;g.push(h)}}else for(;f<d;++f)for(c=o-1,l=n(f);c>=1;--c)if(!((h=l*c)<s)){if(h>u)break;g.push(h)}}else g=Ki(f,d,Math.min(d-f,p)).map(n);return r?g.reverse():g},r.tickFormat=function(t,i){if(null==i&&(i=10===o?".0e":","),"function"!=typeof i&&(i=La(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(Ga(i(),{floor:function(t){return n(Math.floor(e(t)))},ceil:function(t){return n(Math.ceil(e(t)))}}))},r}Da=Na({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),La=Da.format,Ra=Da.formatPrefix;var $a=new Date,Za=new Date;function Qa(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 Qa((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 $a.setTime(+e),Za.setTime(+r),t($a),t(Za),Math.floor(n($a,Za))},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 Ka=Qa((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));Ka.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?Qa((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):Ka:null};var Ja=Qa((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()})),ts=Qa((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()})),es=Qa((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()})),ns=Qa((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 rs(t){return Qa((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 is=rs(0),os=rs(1),as=(rs(2),rs(3),rs(4)),ss=(rs(5),rs(6),Qa((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()}))),us=Qa((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()}));us.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Qa((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 ls=Qa((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 cs(t){return Qa((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 hs=cs(0),fs=cs(1),ds=(cs(2),cs(3),cs(4)),ps=(cs(5),cs(6),Qa((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 gs(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 vs(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 ms(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}ps.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Qa((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 ys,_s,bs={"-":"",_:" ",0:"0"},xs=/^\s*\d+/,ws=/^%/,Ts=/[\\^$*+?|[\]().{}]/g;function Os(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 Es(t){return t.replace(Ts,"\\$&")}function Ms(t){return new RegExp("^(?:"+t.map(Es).join("|")+")","i")}function Ss(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function As(t,e,n){var r=xs.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Ps(t,e,n){var r=xs.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Cs(t,e,n){var r=xs.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function ks(t,e,n){var r=xs.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Ds(t,e,n){var r=xs.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Ls(t,e,n){var r=xs.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Rs(t,e,n){var r=xs.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Is(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 js(t,e,n){var r=xs.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function Ns(t,e,n){var r=xs.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Us(t,e,n){var r=xs.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Hs(t,e,n){var r=xs.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Vs(t,e,n){var r=xs.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Gs(t,e,n){var r=xs.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Bs(t,e,n){var r=xs.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Fs(t,e,n){var r=xs.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function zs(t,e,n){var r=xs.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Ws(t,e,n){var r=ws.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Ys(t,e,n){var r=xs.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function qs(t,e,n){var r=xs.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Xs(t,e){return Os(t.getDate(),e,2)}function $s(t,e){return Os(t.getHours(),e,2)}function Zs(t,e){return Os(t.getHours()%12||12,e,2)}function Qs(t,e){return Os(1+ns.count(us(t),t),e,3)}function Ks(t,e){return Os(t.getMilliseconds(),e,3)}function Js(t,e){return Ks(t,e)+"000"}function tu(t,e){return Os(t.getMonth()+1,e,2)}function eu(t,e){return Os(t.getMinutes(),e,2)}function nu(t,e){return Os(t.getSeconds(),e,2)}function ru(t){var e=t.getDay();return 0===e?7:e}function iu(t,e){return Os(is.count(us(t)-1,t),e,2)}function ou(t,e){var n=t.getDay();return t=n>=4||0===n?as(t):as.ceil(t),Os(as.count(us(t),t)+(4===us(t).getDay()),e,2)}function au(t){return t.getDay()}function su(t,e){return Os(os.count(us(t)-1,t),e,2)}function uu(t,e){return Os(t.getFullYear()%100,e,2)}function lu(t,e){return Os(t.getFullYear()%1e4,e,4)}function cu(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Os(e/60|0,"0",2)+Os(e%60,"0",2)}function hu(t,e){return Os(t.getUTCDate(),e,2)}function fu(t,e){return Os(t.getUTCHours(),e,2)}function du(t,e){return Os(t.getUTCHours()%12||12,e,2)}function pu(t,e){return Os(1+ls.count(ps(t),t),e,3)}function gu(t,e){return Os(t.getUTCMilliseconds(),e,3)}function vu(t,e){return gu(t,e)+"000"}function mu(t,e){return Os(t.getUTCMonth()+1,e,2)}function yu(t,e){return Os(t.getUTCMinutes(),e,2)}function _u(t,e){return Os(t.getUTCSeconds(),e,2)}function bu(t){var e=t.getUTCDay();return 0===e?7:e}function xu(t,e){return Os(hs.count(ps(t)-1,t),e,2)}function wu(t,e){var n=t.getUTCDay();return t=n>=4||0===n?ds(t):ds.ceil(t),Os(ds.count(ps(t),t)+(4===ps(t).getUTCDay()),e,2)}function Tu(t){return t.getUTCDay()}function Ou(t,e){return Os(fs.count(ps(t)-1,t),e,2)}function Eu(t,e){return Os(t.getUTCFullYear()%100,e,2)}function Mu(t,e){return Os(t.getUTCFullYear()%1e4,e,4)}function Su(){return"+0000"}function Au(){return"%"}function Pu(t){return+t}function Cu(t){return Math.floor(+t/1e3)}!function(t){ys=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=Ms(i),c=Ss(i),h=Ms(o),f=Ss(o),d=Ms(a),p=Ss(a),g=Ms(s),v=Ss(s),m=Ms(u),y=Ss(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:Xs,e:Xs,f:Js,H:$s,I:Zs,j:Qs,L:Ks,m:tu,M:eu,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Pu,s:Cu,S:nu,u:ru,U:iu,V:ou,w:au,W:su,x:null,X:null,y:uu,Y:lu,Z:cu,"%":Au},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:hu,e:hu,f:vu,H:fu,I:du,j:pu,L:gu,m:mu,M:yu,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Pu,s:Cu,S:_u,u:bu,U:xu,V:wu,w:Tu,W:Ou,x:null,X:null,y:Eu,Y:Mu,Z:Su,"%":Au},x={a:function(t,e,n){var r=d.exec(e.slice(n));return r?(t.w=p[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=m.exec(e.slice(n));return r?(t.m=y[r[0].toLowerCase()],n+r[0].length):-1},B:function(t,e,n){var r=g.exec(e.slice(n));return r?(t.m=v[r[0].toLowerCase()],n+r[0].length):-1},c:function(t,n,r){return O(t,e,n,r)},d:Us,e:Us,f:zs,H:Vs,I:Vs,j:Hs,L:Fs,m:Ns,M:Gs,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:js,Q:Ys,s:qs,S:Bs,u:Ps,U:Cs,V:ks,w:As,W:Ds,x:function(t,e,r){return O(t,n,e,r)},X:function(t,e,n){return O(t,r,e,n)},y:Rs,Y:Ls,Z:Is,"%":Ws};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=bs[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=ms(1900,void 0,1);if(O(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=vs(ms(o.y,0,1))).getUTCDay(),r=i>4||0===i?fs.ceil(r):fs(r),r=ls.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=gs(ms(o.y,0,1))).getDay(),r=i>4||0===i?os.ceil(r):os(r),r=ns.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?vs(ms(o.y,0,1)).getUTCDay():gs(ms(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,vs(o)):gs(o)}}function O(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 bs?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),_s=ys.format,ys.parse,ys.utcFormat,ys.utcParse}({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 ku(t){return new Date(t)}function Du(t){return t instanceof Date?+t:+new Date(+t)}function Lu(t,e,n,r,i,o,a,s,u){var l=wa(ga,ga),c=l.invert,h=l.domain,f=u(".%L"),d=u(":%S"),p=u("%I:%M"),g=u("%I %p"),v=u("%a %d"),m=u("%b %d"),y=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?d:i(s)<s?p:r(s)<s?g:e(s)<s?n(s)<s?v:m:t(s)<s?y:_)(s)}function w(e,n,r,i){if(null==e&&(e=10),"number"==typeof e){var o=Math.abs(r-n)/e,a=Wi((function(t){return t[2]})).right(b,o);a===b.length?(i=to(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(to(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(uo.call(t,Du)):h().map(ku)},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(Ga(n,t)):l},l.copy=function(){return ba(l,Lu(t,e,n,r,i,o,a,s,u))},l}var Ru=Math.PI,Iu=2*Ru,ju=Iu-1e-6;function Nu(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Uu(){return new Nu}function Hu(t){return function(){return t}}Nu.prototype=Uu.prototype={constructor:Nu,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,d=r-a,p=s*s+u*u,g=f*f+d*d,v=Math.sqrt(p),m=Math.sqrt(h),y=i*Math.tan((Ru-Math.acos((p+h-g)/(2*v*m)))/2),_=y/m,b=y/v;Math.abs(_-1)>1e-6&&(this._+="L"+(t+_*l)+","+(e+_*c)),this._+="A"+i+","+i+",0,0,"+ +(c*f>l*d)+","+(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%Iu+Iu),h>ju?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>=Ru)+","+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 Vu=Math.abs,Gu=Math.atan2,Bu=Math.cos,Fu=Math.max,zu=Math.min,Wu=Math.sin,Yu=Math.sqrt,qu=Math.PI,Xu=qu/2,$u=2*qu;function Zu(t){return t>1?0:t<-1?qu:Math.acos(t)}function Qu(t){return t>=1?Xu:t<=-1?-Xu:Math.asin(t)}function Ku(t){return t.innerRadius}function Ju(t){return t.outerRadius}function tl(t){return t.startAngle}function el(t){return t.endAngle}function nl(t){return t&&t.padAngle}function rl(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 il(t,e,n,r,i,o,a){var s=t-n,u=e-r,l=(a?o:-o)/Yu(s*s+u*u),c=l*u,h=-l*s,f=t+c,d=e+h,p=n+c,g=r+h,v=(f+p)/2,m=(d+g)/2,y=p-f,_=g-d,b=y*y+_*_,x=i-o,w=f*g-p*d,T=(_<0?-1:1)*Yu(Fu(0,x*x*b-w*w)),O=(w*_-y*T)/b,E=(-w*y-_*T)/b,M=(w*_+y*T)/b,S=(-w*y+_*T)/b,A=O-v,P=E-m,C=M-v,k=S-m;return A*A+P*P>C*C+k*k&&(O=M,E=S),{cx:O,cy:E,x01:-c,y01:-h,x11:O*(i/x-1),y11:E*(i/x-1)}}function ol(){var t=Ku,e=Ju,n=Hu(0),r=null,i=tl,o=el,a=nl,s=null;function u(){var u,l,c=+t.apply(this,arguments),h=+e.apply(this,arguments),f=i.apply(this,arguments)-Xu,d=o.apply(this,arguments)-Xu,p=Vu(d-f),g=d>f;if(s||(s=u=Uu()),h<c&&(l=h,h=c,c=l),h>1e-12)if(p>$u-1e-12)s.moveTo(h*Bu(f),h*Wu(f)),s.arc(0,0,h,f,d,!g),c>1e-12&&(s.moveTo(c*Bu(d),c*Wu(d)),s.arc(0,0,c,d,f,g));else{var v,m,y=f,_=d,b=f,x=d,w=p,T=p,O=a.apply(this,arguments)/2,E=O>1e-12&&(r?+r.apply(this,arguments):Yu(c*c+h*h)),M=zu(Vu(h-c)/2,+n.apply(this,arguments)),S=M,A=M;if(E>1e-12){var P=Qu(E/c*Wu(O)),C=Qu(E/h*Wu(O));(w-=2*P)>1e-12?(b+=P*=g?1:-1,x-=P):(w=0,b=x=(f+d)/2),(T-=2*C)>1e-12?(y+=C*=g?1:-1,_-=C):(T=0,y=_=(f+d)/2)}var k=h*Bu(y),D=h*Wu(y),L=c*Bu(x),R=c*Wu(x);if(M>1e-12){var I,j=h*Bu(_),N=h*Wu(_),U=c*Bu(b),H=c*Wu(b);if(p<qu&&(I=rl(k,D,U,H,j,N,L,R))){var V=k-I[0],G=D-I[1],B=j-I[0],F=N-I[1],z=1/Wu(Zu((V*B+G*F)/(Yu(V*V+G*G)*Yu(B*B+F*F)))/2),W=Yu(I[0]*I[0]+I[1]*I[1]);S=zu(M,(c-W)/(z-1)),A=zu(M,(h-W)/(z+1))}}T>1e-12?A>1e-12?(v=il(U,H,k,D,h,A,g),m=il(j,N,L,R,h,A,g),s.moveTo(v.cx+v.x01,v.cy+v.y01),A<M?s.arc(v.cx,v.cy,A,Gu(v.y01,v.x01),Gu(m.y01,m.x01),!g):(s.arc(v.cx,v.cy,A,Gu(v.y01,v.x01),Gu(v.y11,v.x11),!g),s.arc(0,0,h,Gu(v.cy+v.y11,v.cx+v.x11),Gu(m.cy+m.y11,m.cx+m.x11),!g),s.arc(m.cx,m.cy,A,Gu(m.y11,m.x11),Gu(m.y01,m.x01),!g))):(s.moveTo(k,D),s.arc(0,0,h,y,_,!g)):s.moveTo(k,D),c>1e-12&&w>1e-12?S>1e-12?(v=il(L,R,j,N,c,-S,g),m=il(k,D,U,H,c,-S,g),s.lineTo(v.cx+v.x01,v.cy+v.y01),S<M?s.arc(v.cx,v.cy,S,Gu(v.y01,v.x01),Gu(m.y01,m.x01),!g):(s.arc(v.cx,v.cy,S,Gu(v.y01,v.x01),Gu(v.y11,v.x11),!g),s.arc(0,0,c,Gu(v.cy+v.y11,v.cx+v.x11),Gu(m.cy+m.y11,m.cx+m.x11),g),s.arc(m.cx,m.cy,S,Gu(m.y11,m.x11),Gu(m.y01,m.x01),!g))):s.arc(0,0,c,x,b,g):s.lineTo(L,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-qu/2;return[Bu(r)*n,Wu(r)*n]},u.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:Hu(+e),u):t},u.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:Hu(+t),u):e},u.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:Hu(+t),u):n},u.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:Hu(+t),u):r},u.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:Hu(+t),u):i},u.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:Hu(+t),u):o},u.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:Hu(+t),u):a},u.context=function(t){return arguments.length?(s=null==t?null:t,u):s},u}function al(t){this._context=t}function sl(t){return new al(t)}function ul(t){return t[0]}function ll(t){return t[1]}function cl(){var t=ul,e=ll,n=Hu(!0),r=null,i=sl,o=null;function a(a){var s,u,l,c=a.length,h=!1;for(null==r&&(o=i(l=Uu())),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:Hu(+e),a):t},a.y=function(t){return arguments.length?(e="function"==typeof t?t:Hu(+t),a):e},a.defined=function(t){return arguments.length?(n="function"==typeof t?t:Hu(!!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}function hl(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function fl(t){return t}al.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 dl=gl(sl);function pl(t){this._curve=t}function gl(t){function e(e){return new pl(t(e))}return e._curve=t,e}function vl(){return t=cl().curve(dl),e=t.curve,t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(gl(t)):e()._curve},t;var t,e}pl.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};var ml=Array.prototype.slice;function yl(){}function _l(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 bl(t){this._context=t}function xl(t){return new bl(t)}function wl(t){this._context=t}function Tl(t){return new wl(t)}function Ol(t){this._context=t}function El(t){return new Ol(t)}function Ml(t,e){this._basis=new bl(t),this._beta=e}bl.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:_l(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:_l(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},wl.prototype={areaStart:yl,areaEnd:yl,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:_l(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Ol.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:_l(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Ml.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 Sl=function t(e){function n(t){return 1===e?new bl(t):new Ml(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function Al(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 Pl(t,e){this._context=t,this._k=(1-e)/6}Pl.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:Al(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:Al(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 Cl=function t(e){function n(t){return new Pl(t,e)}return n.tension=function(e){return t(+e)},n}(0);function kl(t,e){this._context=t,this._k=(1-e)/6}kl.prototype={areaStart:yl,areaEnd:yl,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:Al(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 Dl=function t(e){function n(t){return new kl(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Ll(t,e){this._context=t,this._k=(1-e)/6}Ll.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:Al(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 Rl=function t(e){function n(t){return new Ll(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Il(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 jl(t,e){this._context=t,this._alpha=e}jl.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:Il(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 Nl=function t(e){function n(t){return e?new jl(t,e):new Pl(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Ul(t,e){this._context=t,this._alpha=e}Ul.prototype={areaStart:yl,areaEnd:yl,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:Il(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 Hl=function t(e){function n(t){return e?new Ul(t,e):new kl(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Vl(t,e){this._context=t,this._alpha=e}Vl.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:Il(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 Gl=function t(e){function n(t){return e?new Vl(t,e):new Ll(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Bl(t){this._context=t}function Fl(t){return new Bl(t)}function zl(t){return t<0?-1:1}function Wl(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(zl(o)+zl(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function Yl(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function ql(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 Xl(t){this._context=t}function $l(t){this._context=new Zl(t)}function Zl(t){this._context=t}function Ql(t){return new Xl(t)}function Kl(t){return new $l(t)}function Jl(t){this._context=t}function tc(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 ec(t){return new Jl(t)}function nc(t,e){this._context=t,this._t=e}function rc(t){return new nc(t,.5)}function ic(t){return new nc(t,0)}function oc(t){return new nc(t,1)}function ac(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 sc(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function uc(t,e){return t[e]}Bl.prototype={areaStart:yl,areaEnd:yl,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))}},Xl.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:ql(this,this._t0,Yl(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,ql(this,Yl(this,n=Wl(this,t,e)),n);break;default:ql(this,this._t0,n=Wl(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},($l.prototype=Object.create(Xl.prototype)).point=function(t,e){Xl.prototype.point.call(this,e,t)},Zl.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)}},Jl.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=tc(t),i=tc(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)}},nc.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 lc=function(){function t(t){this.state={options:{}},this.colorScale={},this.services=t}return t.prototype.getDisplayData=function(){if(!this.get("data"))return null;var t=ti.items.status.ACTIVE,e=this.getDataGroups(),n=Nr.clone(this.get("data")),r=this.getOptions().data.groupMapsTo;return n.filter((function(n){return e.find((function(t){return t.name===n[r]})).status===t}))},t.prototype.getData=function(){return this.get("data")},t.prototype.isDataEmpty=function(){return!this.getData().length},t.prototype.setData=function(t){var e=this.sanitize(Nr.clone(t)),n=this.generateDataGroups(e);return this.set({data:e,dataGroups:n}),e},t.prototype.getDataGroups=function(){return this.get("dataGroups")},t.prototype.getActiveDataGroups=function(){var t=ti.items.status.ACTIVE;return this.getDataGroups().filter((function(e){return e.status===t}))},t.prototype.getDataGroupNames=function(){return this.getDataGroups().map((function(t){return t.name}))},t.prototype.getActiveDataGroupNames=function(){return this.getActiveDataGroups().map((function(t){return t.name}))},t.prototype.getGroupedData=function(){var t=this.getDisplayData(),e={},n=this.getOptions().data.groupMapsTo;return t.map((function(t){var r=t[n];null!==e[r]&&void 0!==e[r]?e[r].push(t):e[r]=[t]})),Object.keys(e).map((function(t){return{name:t,data:e[t]}}))},t.prototype.getDataValuesGroupedByKeys=function(){var t=this.getOptions().data.groupMapsTo,e=this.getDisplayData(),n=this.services.cartesianScales.getDomainIdentifier(),r=this.services.cartesianScales.getRangeIdentifier(),i=io(e,(function(t){return t[n]})).keys(),o=this.getDataGroupNames();return i.map((function(i){var a={sharedStackKey:i};return o.forEach((function(o){var s=e.find((function(e){return e[t]===o&&e[n].toString()===i}));a[o]=s?s[r]:null})),a}))},t.prototype.getStackedData=function(){var t=this.getOptions().data.groupMapsTo,e=this.getDataGroupNames(),n=this.getDataValuesGroupedByKeys();return function(){var t=Hu([]),e=sc,n=ac,r=uc;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],d=c[o]=new Array(u),p=0;p<u;++p)d[p]=h=[0,+r(i[p],f,p,i)],h.data=i[p];d.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:Hu(ml.call(e)),i):t},i.value=function(t){return arguments.length?(r="function"==typeof t?t:Hu(+t),i):r},i.order=function(t){return arguments.length?(e=null==t?sc:"function"==typeof t?t:Hu(ml.call(t)),i):e},i.offset=function(t){return arguments.length?(n=null==t?ac:t,i):n},i}().keys(e)(n).map((function(n,r){return Object.keys(n).filter((function(t){return!isNaN(t)})).map((function(i){var o=n[i];return o[t]=e[r],o}))}))},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:Nr.merge(this.getOptions(),t)})},t.prototype.update=function(){this.getDisplayData()&&(this.updateAllDataGroups(),this.setColorScale(),this.services.events.dispatchEvent(k.Model.UPDATE))},t.prototype.setUpdateCallback=function(t){this.updateCallback=t},t.prototype.toggleDataLabel=function(t){var e=ti.items.status,n=e.ACTIVE,r=e.DISABLED,i=this.getDataGroups(),o=i.some((function(t){return t.status===r})),a=i.filter((function(t){return t.status===n}));if(o)if(1===a.length&&a[0].name===t)i.forEach((function(t,e){i[e].status=n}));else{var s=i.findIndex((function(e){return e.name===t}));i[s].status=i[s].status===r?n:r}else i.forEach((function(e,o){i[o].status=e.name===t?n:r}));this.services.events.dispatchEvent(k.Legend.ITEMS_UPDATE,{dataGroups:i}),this.set({dataGroups:i})},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);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);return r.getStrokeColor?r.getStrokeColor(t,e,n,i):i},t.prototype.getFillScale=function(){return this.colorScale},t.prototype.transformToTabularData=function(t){console.warn("We've updated the charting data format to be tabular by default. The current format you're using is deprecated and will be removed in v1.0, read more here https://carbon-design-system.github.io/carbon-charts/?path=/story/tutorials--tabular-data-format");var e=[],n=t.datasets,r=t.labels;return n.forEach((function(t){t.data.forEach((function(n,i){var o,a=Nr.getProperty(t,"label");if(null===a){var s=Nr.getProperty(r,i);o=s||"Ungrouped"}else o=a;var u={group:o,key:r[i]};isNaN(n)?(u.value=n.value,u.date=n.date):u.value=n,e.push(u)}))})),e},t.prototype.getTabularData=function(t){return Array.isArray(t)?t:this.transformToTabularData(t)},t.prototype.sanitize=function(t){return this.getTabularData(t)},t.prototype.updateAllDataGroups=function(){var t=this;this.allDataGroups?this.getDataGroupNames().forEach((function(e){-1===t.allDataGroups.indexOf(e)&&t.allDataGroups.push(e)})):this.allDataGroups=this.getDataGroupNames()},t.prototype.generateDataGroups=function(t){var e=this.getOptions().data.groupMapsTo,n=ti.items.status.ACTIVE;return io(t,(function(t){return t[e]})).keys().map((function(t){return{name:t,status:n}}))},t.prototype.setColorScale=function(){var t=Bi,e=this.getOptions(),n=Nr.getProperty(e,"color","scale");if(null!==n&&0!==Object.keys(n).length){var r=[],i=0;this.allDataGroups.forEach((function(e){n[e]?r.push(n[e]):r.push(t[i]),i===t.length-1?i=0:i++})),this.colorScale=ho().range(r).domain(this.allDataGroups)}else this.colorScale=ho().range(t).domain(this.allDataGroups)},t}(),cc=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}(),hc="http://www.w3.org/1999/xhtml",fc={svg:"http://www.w3.org/2000/svg",xhtml:hc,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function dc(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),fc.hasOwnProperty(e)?{space:fc[e],local:t}:t}function pc(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===hc&&e.documentElement.namespaceURI===hc?e.createElement(t):e.createElementNS(n,t)}}function gc(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function vc(t){var e=dc(t);return(e.local?gc:pc)(e)}function mc(){}function yc(t){return null==t?mc:function(){return this.querySelector(t)}}function _c(){return[]}function bc(t){return null==t?_c:function(){return this.querySelectorAll(t)}}function xc(t){return function(){return this.matches(t)}}function wc(t){return new Array(t.length)}function Tc(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Tc.prototype={constructor:Tc,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 Oc(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 Tc(t,o[s]);for(;s<u;++s)(a=e[s])&&(i[s]=a)}function Ec(t,e,n,r,i,o,a){var s,u,l,c={},h=e.length,f=o.length,d=new Array(h);for(s=0;s<h;++s)(u=e[s])&&(d[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 Tc(t,o[s]);for(s=0;s<h;++s)(u=e[s])&&c[d[s]]===u&&(i[s]=u)}function Mc(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Sc(t){return function(){this.removeAttribute(t)}}function Ac(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Pc(t,e){return function(){this.setAttribute(t,e)}}function Cc(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function kc(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Dc(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 Lc(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Rc(t){return function(){this.style.removeProperty(t)}}function Ic(t,e,n){return function(){this.style.setProperty(t,e,n)}}function jc(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Nc(t,e){return t.style.getPropertyValue(e)||Lc(t).getComputedStyle(t,null).getPropertyValue(e)}function Uc(t){return function(){delete this[t]}}function Hc(t,e){return function(){this[t]=e}}function Vc(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Gc(t){return t.trim().split(/^|\s+/)}function Bc(t){return t.classList||new Fc(t)}function Fc(t){this._node=t,this._names=Gc(t.getAttribute("class")||"")}function zc(t,e){for(var n=Bc(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Wc(t,e){for(var n=Bc(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function Yc(t){return function(){zc(this,t)}}function qc(t){return function(){Wc(this,t)}}function Xc(t,e){return function(){(e.apply(this,arguments)?zc:Wc)(this,t)}}function $c(){this.textContent=""}function Zc(t){return function(){this.textContent=t}}function Qc(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function Kc(){this.innerHTML=""}function Jc(t){return function(){this.innerHTML=t}}function th(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function eh(){this.nextSibling&&this.parentNode.appendChild(this)}function nh(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function rh(){return null}function ih(){var t=this.parentNode;t&&t.removeChild(this)}function oh(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function ah(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}Fc.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 sh={},uh=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(sh={mouseenter:"mouseover",mouseleave:"mouseout"}));function lh(t,e,n){return t=ch(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function ch(t,e,n){return function(r){var i=uh;uh=r;try{t.call(this,this.__data__,e,n)}finally{uh=i}}}function hh(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 fh(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 dh(t,e,n){var r=sh.hasOwnProperty(t.type)?lh:ch;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 ph(t,e,n){var r=Lc(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 gh(t,e){return function(){return ph(this,t,e)}}function vh(t,e){return function(){return ph(this,t,e.apply(this,arguments))}}var mh=[null];function yh(t,e){this._groups=t,this._parents=e}function _h(){return new yh([[document.documentElement]],mh)}function bh(t){return"string"==typeof t?new yh([[document.querySelector(t)]],[document.documentElement]):new yh([[t]],mh)}function xh(){for(var t,e=uh;t=e.sourceEvent;)e=t;return e}function wh(t){var e=xh();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)}yh.prototype=_h.prototype={constructor:yh,select:function(t){"function"!=typeof t&&(t=yc(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 yh(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=bc(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 yh(r,i)},filter:function(t){"function"!=typeof t&&(t=xc(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 yh(r,this._parents)},data:function(t,e){if(!t)return d=new Array(this.size()),l=-1,this.each((function(t){d[++l]=t})),d;var n=e?Ec:Oc,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,d=t.call(c,c&&c.__data__,l,r),p=d.length,g=s[l]=new Array(p),v=a[l]=new Array(p);n(c,h,g,v,u[l]=new Array(f),d,e);for(var m,y,_=0,b=0;_<p;++_)if(m=g[_]){for(_>=b&&(b=_+1);!(y=v[b])&&++b<p;);m._next=y||null}}return(a=new yh(a,r))._enter=s,a._exit=u,a},enter:function(){return new yh(this._enter||this._groups.map(wc),this._parents)},exit:function(){return new yh(this._exit||this._groups.map(wc),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),d=0;d<h;++d)(u=l[d]||c[d])&&(f[d]=u);for(;s<r;++s)a[s]=e[s];return new yh(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=Mc);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 yh(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=dc(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?Ac:Sc:"function"==typeof e?n.local?Dc:kc:n.local?Cc:Pc)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?Rc:"function"==typeof e?jc:Ic)(t,e,null==n?"":n)):Nc(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Uc:"function"==typeof e?Vc:Hc)(t,e)):this.node()[t]},classed:function(t,e){var n=Gc(t+"");if(arguments.length<2){for(var r=Bc(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?Xc:e?Yc:qc)(n,e))},text:function(t){return arguments.length?this.each(null==t?$c:("function"==typeof t?Qc:Zc)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Kc:("function"==typeof t?th:Jc)(t)):this.node().innerHTML},raise:function(){return this.each(eh)},lower:function(){return this.each(nh)},append:function(t){var e="function"==typeof t?t:vc(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:vc(t),r=null==e?rh:"function"==typeof e?e:yc(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(ih)},clone:function(t){return this.select(t?ah:oh)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,o=hh(t+""),a=o.length;if(!(arguments.length<2)){for(s=e?dh:fh,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?vh:gh)(t,e))}};var Th={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 "},Oh=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}()}(),Eh="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,Mh="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),Sh="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(Mh):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)},Ah=["top","right","bottom","left","width","height","size","weight"],Ph="undefined"!=typeof MutationObserver,Ch=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(){Sh(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)};Ch.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},Ch.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},Ch.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},Ch.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},Ch.prototype.connect_=function(){Eh&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Ph?(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)},Ch.prototype.disconnect_=function(){Eh&&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)},Ch.prototype.onTransitionEnd_=function(t){var e=t.propertyName;void 0===e&&(e=""),Ah.some((function(t){return!!~e.indexOf(t)}))&&this.refresh()},Ch.getInstance=function(){return this.instance_||(this.instance_=new Ch),this.instance_},Ch.instance_=null;var kh=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},Dh=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||Mh},Lh=Hh(0,0,0,0);function Rh(t){return parseFloat(t)||0}function Ih(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];return e.reduce((function(e,n){return e+Rh(t["border-"+n+"-width"])}),0)}function jh(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return Lh;var r=Dh(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]=Rh(o)}return e}(r),o=i.left+i.right,a=i.top+i.bottom,s=Rh(r.width),u=Rh(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==e&&(s-=Ih(r,"left","right")+o),Math.round(u+a)!==n&&(u-=Ih(r,"top","bottom")+a)),!function(t){return t===Dh(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 Hh(i.left,i.top,s,u)}var Nh="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof Dh(t).SVGGraphicsElement}:function(t){return t instanceof Dh(t).SVGElement&&"function"==typeof t.getBBox};function Uh(t){return Eh?Nh(t)?function(t){var e=t.getBBox();return Hh(0,0,e.width,e.height)}(t):jh(t):Lh}function Hh(t,e,n,r){return{x:t,y:e,width:n,height:r}}var Vh=function(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Hh(0,0,0,0),this.target=t};Vh.prototype.isActive=function(){var t=Uh(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},Vh.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t};var Gh=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 kh(a,{x:e,y:n,width:r,height:i,top:n,right:e+r,bottom:i+n,left:e}),a}(e);kh(this,{target:t,contentRect:n})},Bh=function(t,e,n){if(this.activeObservations_=[],this.observations_=new Oh,"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};Bh.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 Dh(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new Vh(t)),this.controller_.addObserver(this),this.controller_.refresh())}},Bh.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 Dh(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))}},Bh.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},Bh.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},Bh.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new Gh(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},Bh.prototype.clearActive=function(){this.activeObservations_.splice(0)},Bh.prototype.hasActive=function(){return this.activeObservations_.length>0};var Fh="undefined"!=typeof WeakMap?new WeakMap:new Oh,zh=function(t){if(!(this instanceof zh))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=Ch.getInstance(),n=new Bh(t,e,this);Fh.set(this,n)};["observe","unobserve","disconnect"].forEach((function(t){zh.prototype[t]=function(){return(e=Fh.get(this))[t].apply(e,arguments);var e}}));var Wh=void 0!==Mh.ResizeObserver?Mh.ResizeObserver:zh,Yh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.getSVGElementSize=function(t,e){t.attr||(t=bh(t));var n,r,i,o,a={width:0,height:0},s=function(t){t&&Object.keys(a).forEach((function(e){if(t[e]){var n=t[e],r=parseFloat(n);n&&r>a[e]&&-1===(""+n).indexOf("%")&&(a[e]=r)}}))},u={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 l={width:t.node().clientWidth,height:t.node().clientHeight};if(e){if(e.useAttrs&&(s(u),a.width>0&&a.height>0))return a;if(e.useClientDimensions&&(s(l),a.width>0&&a.height>0))return l;if(e.useBBox&&(s(r),a.width>0&&a.height>0))return r;if(e.useBoundingRect&&(s(o),a.width>0&&a.height>0))return o}try{s({width:Nr.getProperty(t.node(),"width","baseVal","value"),height:Nr.getProperty(t.node(),"height","baseVal","value")})}catch(t){s(l),s(r),s(u)}return a},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();bh(this.getHolder()).classed(Th.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=Nr.getProperty(this.model.getOptions(),"style","prefix"),e=bh(this.getHolder()).append("svg").classed(Th.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=Nr.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(k.Chart.RESIZE))}),12.5);new Wh(i).observe(e)}},e}(cc),qh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(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}(cc),Xh={value:function(){}};function $h(){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 Zh(r)}function Zh(t){this._=t}function Qh(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 Kh(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function Jh(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Xh,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}Zh.prototype=$h.prototype={constructor:Zh,on:function(t,e){var n,r=this._,i=Qh(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]=Jh(r[n],t.name,e);else if(null==e)for(n in r)r[n]=Jh(r[n],t.name,null);return this}for(;++o<a;)if((n=(t=i[o]).type)&&(n=Kh(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Zh(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 tf,ef,nf=0,rf=0,of=0,af=0,sf=0,uf=0,lf="object"==typeof performance&&performance.now?performance:Date,cf="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function hf(){return sf||(cf(ff),sf=lf.now()+uf)}function ff(){sf=0}function df(){this._call=this._time=this._next=null}function pf(t,e,n){var r=new df;return r.restart(t,e,n),r}function gf(){sf=(af=lf.now())+uf,nf=rf=0;try{!function(){hf(),++nf;for(var t,e=tf;e;)(t=sf-e._time)>=0&&e._call.call(null,t),e=e._next;--nf}()}finally{nf=0,function(){var t,e,n=tf,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:tf=e);ef=t,mf(r)}(),sf=0}}function vf(){var t=lf.now(),e=t-af;e>1e3&&(uf-=e,af=t)}function mf(t){nf||(rf&&(rf=clearTimeout(rf)),t-sf>24?(t<1/0&&(rf=setTimeout(gf,t-lf.now()-uf)),of&&(of=clearInterval(of))):(of||(af=lf.now(),of=setInterval(vf,1e3)),nf=1,cf(gf)))}function yf(t,e,n){var r=new df;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}df.prototype=pf.prototype={constructor:df,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?hf():+n)+(null==e?0:+e),this._next||ef===this||(ef?ef._next=this:tf=this,ef=this),this._call=t,this._time=n,mf()},stop:function(){this._call&&(this._call=null,this._time=1/0,mf())}};var _f=$h("start","end","cancel","interrupt"),bf=[];function xf(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 yf(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(yf((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=pf((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:_f,tween:bf,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function wf(t,e){var n=Of(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function Tf(t,e){var n=Of(t,e);if(n.state>3)throw new Error("too late; already running");return n}function Of(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Ef(t,e){var n,r;return function(){var i=Tf(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 Mf(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var o=Tf(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 Sf(t,e,n){var r=t._id;return t.each((function(){var t=Tf(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return Of(t,r).value[e]}}function Af(t,e){var n;return("number"==typeof e?Zo:e instanceof Co?Yo:(n=Co(e))?(e=n,Yo):ta)(t,e)}function Pf(t){return function(){this.removeAttribute(t)}}function Cf(t){return function(){this.removeAttributeNS(t.space,t.local)}}function kf(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 Df(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 Lf(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 Rf(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 If(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function jf(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Nf(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&jf(t,i)),n}return i._value=e,i}function Uf(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&If(t,i)),n}return i._value=e,i}function Hf(t,e){return function(){wf(this,t).delay=+e.apply(this,arguments)}}function Vf(t,e){return e=+e,function(){wf(this,t).delay=e}}function Gf(t,e){return function(){Tf(this,t).duration=+e.apply(this,arguments)}}function Bf(t,e){return e=+e,function(){Tf(this,t).duration=e}}function Ff(t,e){if("function"!=typeof e)throw new Error;return function(){Tf(this,t).ease=e}}function zf(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)?wf:Tf;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}var Wf=_h.prototype.constructor;function Yf(t){return function(){this.style.removeProperty(t)}}function qf(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function Xf(t,e,n){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&qf(t,o,n)),r}return o._value=e,o}function $f(t){return function(e){this.textContent=t.call(this,e)}}function Zf(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&$f(r)),e}return r._value=t,r}var Qf=0;function Kf(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Jf(t){return _h().transition(t)}function td(){return++Qf}var ed=_h.prototype;function nd(t){return+t}Kf.prototype=Jf.prototype={constructor:Kf,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=yc(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,xf(h[f],e,n,f,h,Of(s,n)));return new Kf(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=bc(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,d=t.call(u,u.__data__,h,l),p=Of(u,n),g=0,v=d.length;g<v;++g)(f=d[g])&&xf(f,e,n,g,d,p);o.push(d),a.push(u)}return new Kf(o,a,e,n)},filter:function(t){"function"!=typeof t&&(t=xc(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 Kf(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),d=0;d<h;++d)(u=l[d]||c[d])&&(f[d]=u);for(;s<r;++s)a[s]=e[s];return new Kf(a,this._parents,this._name,this._id)},selection:function(){return new Wf(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=td(),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=Of(a,e);xf(a,t,n,l,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Kf(r,this._parents,t,n)},call:ed.call,nodes:ed.nodes,node:ed.node,size:ed.size,empty:ed.empty,each:ed.each,on:function(t,e){var n=this._id;return arguments.length<2?Of(this.node(),n).on.on(t):this.each(zf(n,t,e))},attr:function(t,e){var n=dc(t),r="transform"===n?fa:Af;return this.attrTween(t,"function"==typeof e?(n.local?Rf:Lf)(n,r,Sf(this,"attr."+t,e)):null==e?(n.local?Cf:Pf)(n):(n.local?Df:kf)(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=dc(t);return this.tween(n,(r.local?Nf:Uf)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?ha:Af;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var o=Nc(this,t),a=(this.style.removeProperty(t),Nc(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}(t,r)).on("end.style."+t,Yf(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,o;return function(){var a=Nc(this,t),s=n(this),u=s+"";return null==s&&(this.style.removeProperty(t),u=s=Nc(this,t)),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}(t,r,Sf(this,"style."+t,e))).each(function(t,e){var n,r,i,o,a="style."+e,s="end."+a;return function(){var u=Tf(this,t),l=u.on,c=null==u.value[a]?o||(o=Yf(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=Nc(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,Xf(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}}(Sf(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,Zf(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=Of(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?Ef:Mf)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Hf:Vf)(e,t)):Of(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Gf:Bf)(e,t)):Of(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(Ff(e,t)):Of(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=Tf(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 rd={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function id(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return rd.time=hf(),rd;return n}_h.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)}))},_h.prototype.transition=function(t){var e,n;t instanceof Kf?(e=t._id,t=t._name):(e=td(),(n=rd).time=hf(),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])&&xf(a,t,e,l,s,n||id(a,e));return new Kf(r,this._parents,t,e)};var od=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.pendingTransitions={},e}return n(e,t),e.prototype.init=function(){var t=this;this.services.events.addEventListener(k.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=Jf(t).duration(Nr.getProperty(yi,t,"duration")||yi.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=Jf(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}(cc);function ad(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 sd(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 ud(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=ad(t),r=sd(e);return n.setDate(n.getDate()+r),n}function ld(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=ad(t).getTime(),r=sd(e);return new Date(n+r)}function cd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=sd(e);return ld(t,36e5*n)}function hd(t){var e=new Date(t.getTime()),n=Math.ceil(e.getTimezoneOffset());return e.setSeconds(0,0),6e4*n+e.getTime()%6e4}function fd(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=ad(t);return e.setHours(0,0,0,0),e}function dd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=fd(t),r=fd(e),i=n.getTime()-hd(n),o=r.getTime()-hd(r);return Math.round((i-o)/864e5)}function pd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=sd(e);return ld(t,6e4*n)}function gd(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=ad(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 vd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=ad(t),r=sd(e),i=n.getMonth()+r,o=new Date(0);o.setFullYear(n.getFullYear(),i,1),o.setHours(0,0,0,0);var a=gd(o);return n.setMonth(i,Math.min(a,n.getDate())),n}function md(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=sd(e);return ld(t,1e3*n)}function yd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=sd(e);return vd(t,12*n)}function _d(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=ad(t),r=ad(e),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}function bd(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=ad(t);return!isNaN(e)}function xd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=ad(t),r=ad(e),i=n.getFullYear()-r.getFullYear(),o=n.getMonth()-r.getMonth();return 12*i+o}function wd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=ad(t),r=ad(e);return n.getFullYear()-r.getFullYear()}function Td(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=ad(t),r=ad(e);return n.getTime()-r.getTime()}function Od(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Td(t,e)/6e4;return n>0?Math.floor(n):Math.ceil(n)}function Ed(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Td(t,e)/1e3;return n>0?Math.floor(n):Math.ceil(n)}var Md={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function Sd(t){return function(e){var n=e||{},r=n.width?String(n.width):t.defaultWidth;return t.formats[r]||t.formats[t.defaultWidth]}}var Ad={date:Sd({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Sd({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Sd({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Pd={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Cd(t){return function(e,n){var r,i=n||{};if("formatting"===(i.context?String(i.context):"standalone")&&t.formattingValues){var o=t.defaultFormattingWidth||t.defaultWidth,a=i.width?String(i.width):o;r=t.formattingValues[a]||t.formattingValues[o]}else{var s=t.defaultWidth,u=i.width?String(i.width):t.defaultWidth;r=t.values[u]||t.values[s]}return r[t.argumentCallback?t.argumentCallback(e):e]}}function kd(t){return function(e,n){var r=String(e),i=n||{},o=i.width,a=o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth],s=r.match(a);if(!s)return null;var u,l=s[0],c=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth];return u="[object Array]"===Object.prototype.toString.call(c)?function(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return n}(c,(function(t){return t.test(r)})):function(t,e){for(var n in t)if(t.hasOwnProperty(n)&&e(t[n]))return n}(c,(function(t){return t.test(r)})),u=t.valueCallback?t.valueCallback(u):u,{value:u=i.valueCallback?i.valueCallback(u):u,rest:r.slice(l.length)}}}var Dd,Ld={code:"en-US",formatDistance:function(t,e,n){var r;return n=n||{},r="string"==typeof Md[t]?Md[t]:1===e?Md[t].one:Md[t].other.replace("{{count}}",e),n.addSuffix?n.comparison>0?"in "+r:r+" ago":r},formatLong:Ad,formatRelative:function(t,e,n,r){return Pd[t]},localize:{ordinalNumber:function(t,e){var n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Cd({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Cd({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return Number(t)-1}}),month:Cd({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:Cd({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:Cd({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(Dd={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t,e){var n=String(t),r=e||{},i=n.match(Dd.matchPattern);if(!i)return null;var o=i[0],a=n.match(Dd.parsePattern);if(!a)return null;var s=Dd.valueCallback?Dd.valueCallback(a[0]):a[0];return{value:s=r.valueCallback?r.valueCallback(s):s,rest:n.slice(o.length)}}),era:kd({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:kd({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:kd({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:kd({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:kd({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function Rd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=sd(e);return ld(t,-n)}function Id(t,e){for(var n=t<0?"-":"",r=Math.abs(t).toString();r.length<e;)r="0"+r;return n+r}var jd=function(t,e){var n=t.getUTCFullYear(),r=n>0?n:1-n;return Id("yy"===e?r%100:r,e.length)},Nd=function(t,e){var n=t.getUTCMonth();return"M"===e?String(n+1):Id(n+1,2)},Ud=function(t,e){return Id(t.getUTCDate(),e.length)},Hd=function(t,e){return Id(t.getUTCHours()%12||12,e.length)},Vd=function(t,e){return Id(t.getUTCHours(),e.length)},Gd=function(t,e){return Id(t.getUTCMinutes(),e.length)},Bd=function(t,e){return Id(t.getUTCSeconds(),e.length)},Fd=function(t,e){var n=e.length,r=t.getUTCMilliseconds();return Id(Math.floor(r*Math.pow(10,n-3)),e.length)};function zd(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=1,n=ad(t),r=n.getUTCDay(),i=(r<e?7:0)+r-e;return n.setUTCDate(n.getUTCDate()-i),n.setUTCHours(0,0,0,0),n}function Wd(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=ad(t),n=e.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var i=zd(r),o=new Date(0);o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0);var a=zd(o);return e.getTime()>=i.getTime()?n+1:e.getTime()>=a.getTime()?n:n-1}function Yd(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Wd(t),n=new Date(0);n.setUTCFullYear(e,0,4),n.setUTCHours(0,0,0,0);var r=zd(n);return r}function qd(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=e||{},r=n.locale,i=r&&r.options&&r.options.weekStartsOn,o=null==i?0:sd(i),a=null==n.weekStartsOn?o:sd(n.weekStartsOn);if(!(a>=0&&a<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=ad(t),u=s.getUTCDay(),l=(u<a?7:0)+u-a;return s.setUTCDate(s.getUTCDate()-l),s.setUTCHours(0,0,0,0),s}function Xd(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=ad(t,e),r=n.getUTCFullYear(),i=e||{},o=i.locale,a=o&&o.options&&o.options.firstWeekContainsDate,s=null==a?1:sd(a),u=null==i.firstWeekContainsDate?s:sd(i.firstWeekContainsDate);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var l=new Date(0);l.setUTCFullYear(r+1,0,u),l.setUTCHours(0,0,0,0);var c=qd(l,e),h=new Date(0);h.setUTCFullYear(r,0,u),h.setUTCHours(0,0,0,0);var f=qd(h,e);return n.getTime()>=c.getTime()?r+1:n.getTime()>=f.getTime()?r:r-1}function $d(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=e||{},r=n.locale,i=r&&r.options&&r.options.firstWeekContainsDate,o=null==i?1:sd(i),a=null==n.firstWeekContainsDate?o:sd(n.firstWeekContainsDate),s=Xd(t,e),u=new Date(0);u.setUTCFullYear(s,0,a),u.setUTCHours(0,0,0,0);var l=qd(u,e);return l}var Zd="midnight",Qd="noon",Kd="morning",Jd="afternoon",tp="evening",ep="night",np={G:function(t,e,n){var r=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if("yo"===e){var r=t.getUTCFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return jd(t,e)},Y:function(t,e,n,r){var i=Xd(t,r),o=i>0?i:1-i;return"YY"===e?Id(o%100,2):"Yo"===e?n.ordinalNumber(o,{unit:"year"}):Id(o,e.length)},R:function(t,e){return Id(Wd(t),e.length)},u:function(t,e){return Id(t.getUTCFullYear(),e.length)},Q:function(t,e,n){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return Id(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return Id(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){var r=t.getUTCMonth();switch(e){case"M":case"MM":return Nd(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){var r=t.getUTCMonth();switch(e){case"L":return String(r+1);case"LL":return Id(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){var i=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=ad(t),r=qd(n,e).getTime()-$d(n,e).getTime();return Math.round(r/6048e5)+1}(t,r);return"wo"===e?n.ordinalNumber(i,{unit:"week"}):Id(i,e.length)},I:function(t,e,n){var r=function(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=ad(t),n=zd(e).getTime()-Yd(e).getTime();return Math.round(n/6048e5)+1}(t);return"Io"===e?n.ordinalNumber(r,{unit:"week"}):Id(r,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):Ud(t,e)},D:function(t,e,n){var r=function(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=ad(t),n=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var r=e.getTime(),i=n-r;return Math.floor(i/864e5)+1}(t);return"Do"===e?n.ordinalNumber(r,{unit:"dayOfYear"}):Id(r,e.length)},E:function(t,e,n){var r=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){var i=t.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return Id(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){var i=t.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return Id(o,e.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(t,e,n){var r=t.getUTCDay(),i=0===r?7:r;switch(e){case"i":return String(i);case"ii":return Id(i,e.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){var r=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,e,n){var r,i=t.getUTCHours();switch(r=12===i?Qd:0===i?Zd:i/12>=1?"pm":"am",e){case"b":case"bb":case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,e,n){var r,i=t.getUTCHours();switch(r=i>=17?tp:i>=12?Jd:i>=4?Kd:ep,e){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(t,e,n){if("ho"===e){var r=t.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Hd(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):Vd(t,e)},K:function(t,e,n){var r=t.getUTCHours()%12;return"Ko"===e?n.ordinalNumber(r,{unit:"hour"}):Id(r,e.length)},k:function(t,e,n){var r=t.getUTCHours();return 0===r&&(r=24),"ko"===e?n.ordinalNumber(r,{unit:"hour"}):Id(r,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):Gd(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):Bd(t,e)},S:function(t,e){return Fd(t,e)},X:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();if(0===i)return"Z";switch(e){case"X":return ip(i);case"XXXX":case"XX":return op(i);case"XXXXX":case"XXX":default:return op(i,":")}},x:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"x":return ip(i);case"xxxx":case"xx":return op(i);case"xxxxx":case"xxx":default:return op(i,":")}},O:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+rp(i,":");case"OOOO":default:return"GMT"+op(i,":")}},z:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+rp(i,":");case"zzzz":default:return"GMT"+op(i,":")}},t:function(t,e,n,r){var i=r._originalDate||t;return Id(Math.floor(i.getTime()/1e3),e.length)},T:function(t,e,n,r){return Id((r._originalDate||t).getTime(),e.length)}};function rp(t,e){var n=t>0?"-":"+",r=Math.abs(t),i=Math.floor(r/60),o=r%60;if(0===o)return n+String(i);var a=e||"";return n+String(i)+a+Id(o,2)}function ip(t,e){return t%60==0?(t>0?"-":"+")+Id(Math.abs(t)/60,2):op(t,e)}function op(t,e){var n=e||"",r=t>0?"-":"+",i=Math.abs(t);return r+Id(Math.floor(i/60),2)+n+Id(i%60,2)}function ap(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}}function sp(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}}var up={p:sp,P:function(t,e){var n,r=t.match(/(P+)(p+)?/),i=r[1],o=r[2];if(!o)return ap(t,e);switch(i){case"P":n=e.dateTime({width:"short"});break;case"PP":n=e.dateTime({width:"medium"});break;case"PPP":n=e.dateTime({width:"long"});break;case"PPPP":default:n=e.dateTime({width:"full"})}return n.replace("{{date}}",ap(i,e)).replace("{{time}}",sp(o,e))}},lp=["D","DD"],cp=["YY","YYYY"];function hp(t){return-1!==lp.indexOf(t)}function fp(t){return-1!==cp.indexOf(t)}function dp(t){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` for formatting years; see: https://git.io/fxCyr");if("YY"===t)throw new RangeError("Use `yy` instead of `YY` for formatting years; see: https://git.io/fxCyr");if("D"===t)throw new RangeError("Use `d` instead of `D` for formatting days of the month; see: https://git.io/fxCyr");if("DD"===t)throw new RangeError("Use `dd` instead of `DD` for formatting days of the month; see: https://git.io/fxCyr")}var pp=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,gp=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,vp=/^'([^]*?)'?$/,mp=/''/g,yp=/[a-zA-Z]/;function _p(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=String(e),i=n||{},o=i.locale||Ld,a=o.options&&o.options.firstWeekContainsDate,s=null==a?1:sd(a),u=null==i.firstWeekContainsDate?s:sd(i.firstWeekContainsDate);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var l=o.options&&o.options.weekStartsOn,c=null==l?0:sd(l),h=null==i.weekStartsOn?c:sd(i.weekStartsOn);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!o.localize)throw new RangeError("locale must contain localize property");if(!o.formatLong)throw new RangeError("locale must contain formatLong property");var f=ad(t);if(!bd(f))throw new RangeError("Invalid time value");var d=hd(f),p=Rd(f,d),g={firstWeekContainsDate:u,weekStartsOn:h,locale:o,_originalDate:f},v=r.match(gp).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,up[e])(t,o.formatLong,g):t})).join("").match(pp).map((function(t){if("''"===t)return"'";var e=t[0];if("'"===e)return bp(t);var n=np[e];if(n)return!i.useAdditionalWeekYearTokens&&fp(t)&&dp(t),!i.useAdditionalDayOfYearTokens&&hp(t)&&dp(t),n(p,t,o.localize,g);if(e.match(yp))throw new RangeError("Format string contains an unescaped latin alphabet character `"+e+"`");return t})).join("");return v}function bp(t){return t.match(vp)[1].replace(mp,"'")}function xp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=sd(e);return ud(t,-n)}function wp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=sd(e);return cd(t,-n)}function Tp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=sd(e);return pd(t,-n)}function Op(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=sd(e);return vd(t,-n)}function Ep(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=sd(e);return md(t,-n)}function Mp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=sd(e);return yd(t,-n)}var Sp=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 n(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.findDomainAndRangeAxes(),this.determineOrientation(),Object.keys(y).map((function(t){return y[t]})).forEach((function(t){e.scales[t]=e.createScale(t)}))},e.prototype.findDomainAndRangeAxes=function(){var t=this.findMainVerticalAxisPosition(),e=this.findMainHorizontalAxisPosition(),n=this.findDomainAndRangeAxesPositions(t,e);this.domainAxisPosition=n.domainAxisPosition,this.rangeAxisPosition=n.rangeAxisPosition},e.prototype.determineOrientation=function(){this.rangeAxisPosition===y.LEFT&&this.domainAxisPosition===y.BOTTOM?this.orientation=_.VERTICAL:this.orientation=_.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=[y.BOTTOM,y.TOP];return[this.domainAxisPosition,this.rangeAxisPosition].find((function(e){return t.indexOf(e)>-1}))},e.prototype.getMainYAxisPosition=function(){var t=[y.LEFT,y.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=this.model.getOptions(),i=Nr.getProperty(r,"axes",t),o=this.scaleTypes[t],a=this.scales[t],s=i.mapsTo,u=void 0!==e[s]?e[s]:e;return o===b.LABELS?a(u)+a.step()/2:o===b.TIME?a(new Date(u)):a(u)},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.getDomainIdentifier=function(){var t=this.model.getOptions();return Nr.getProperty(t,"axes",this.domainAxisPosition).mapsTo},e.prototype.getRangeIdentifier=function(){var t=this.model.getOptions();return Nr.getProperty(t,"axes",this.rangeAxisPosition).mapsTo},e.prototype.getDataFromDomain=function(t){var e=this.model.getDisplayData(),n=this.getDomainIdentifier();return this.scaleTypes[this.domainAxisPosition]===b.TIME?e.filter((function(e){var r=e[n];return"string"!=typeof r&&void 0!==r.getTime||(r=new Date(r)),r.getTime()===t.getTime()})):e.filter((function(e){return e[n]===t}))},e.prototype.extendsDomain=function(t,e){var n=this.model.getOptions();return Nr.getProperty(n,"axes",t).scaleType===b.TIME?function(t,e){var n=new Date(t[0]),r=new Date(t[1]);if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=ad(t),r=ad(e),i=_d(n,r),o=Math.abs(wd(n,r));n.setFullYear(n.getFullYear()-i*o);var a=_d(n,r)===-i,s=i*(o-a);return 0===s?0:s}(r,n)>1)return[Mp(n,e),yd(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=ad(t),r=ad(e),i=_d(n,r),o=Math.abs(xd(n,r));n.setMonth(n.getMonth()-i*o);var a=_d(n,r)===-i,s=i*(o-a);return 0===s?0:s}(r,n)>1)return[Op(n,e),vd(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=ad(t),r=ad(e),i=_d(n,r),o=Math.abs(dd(n,r));n.setDate(n.getDate()-i*o);var a=_d(n,r)===-i,s=i*(o-a);return 0===s?0:s}(r,n)>1)return[xp(n,e),ud(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Td(t,e)/36e5;return n>0?Math.floor(n):Math.ceil(n)}(r,n)>1)return[wp(n,e),cd(r,e)];if(Od(r,n)>30)return[Tp(n,30*e),pd(r,30*e)];if(Od(r,n)>1)return[Tp(n,e),pd(r,e)];if(Ed(r,n)>15)return[Ep(n,15*e),md(r,15*e)];if(Ed(r,n)>1)return[Ep(n,e),md(r,e)];return[n,r]}(e,Nr.getProperty(n,"timeScale","addSpaceOnEdges")):function(t,e){var n=t[0],r=t[1],i=(r-n)*e;return[n>=0&&n-i<0?0:n-i,r<=0&&r+i>0?0:r+i]}(e,_i.paddingRatio)},e.prototype.findMainVerticalAxisPosition=function(){var t=this.model.getOptions(),e=Nr.getProperty(t,"axes");return!0===Nr.getProperty(e,y.RIGHT,"main")?y.RIGHT:y.LEFT},e.prototype.findMainHorizontalAxisPosition=function(){var t=this.model.getOptions(),e=Nr.getProperty(t,"axes");return!0===Nr.getProperty(e,y.TOP,"main")?y.TOP:y.BOTTOM},e.prototype.findDomainAndRangeAxesPositions=function(t,e){var n=this.model.getOptions(),r=Nr.getProperty(n,"axes",t),i=Nr.getProperty(n,"axes",e),o=r.scaleType||b.LINEAR,a=i.scaleType||b.LINEAR,s={domainAxisPosition:null,rangeAxisPosition:null};return a===b.LABELS||a===b.TIME?(s.domainAxisPosition=e,s.rangeAxisPosition=t):o===b.LABELS||o===b.TIME?(s.domainAxisPosition=t,s.rangeAxisPosition=e):(s.domainAxisPosition=e,s.rangeAxisPosition=t),s},e.prototype.getScaleDomain=function(t){var e=this.model.getOptions(),n=Nr.getProperty(e,"axes",t),r=n.includeZero,i=Nr.getProperty(n,"scaleType")||b.LINEAR;if(this.model.isDataEmpty())return[];var o,a,s=this.model.getDisplayData(),u=n.mapsTo;if(n.domain)return n.domain;if(n&&i===b.LABELS)return io(s,(function(t){return t[u]})).keys();n.stacked?a=this.model.getDataValuesGroupedByKeys().map((function(t){return function(t,e){var n,r=t.length,i=-1,o=0;if(null==e)for(;++i<r;)(n=+t[i])&&(o+=n);else for(;++i<r;)(n=+e(t[i],i,t))&&(o+=n);return o}(function(t){var e=[];for(var n in t)e.push(t[n]);return e}(t))})):a=s.map((function(t){return t[u]}));return i!==b.TIME&&r&&a.push(0),o=qi(a),o=this.extendsDomain(t,o)},e.prototype.createScale=function(t){var e=this.model.getOptions(),n=Nr.getProperty(e,"axes",t);if(!n)return null;var r,i=Nr.getProperty(n,"scaleType")||b.LINEAR;return this.scaleTypes[t]=i,(r=i===b.TIME?function(){return no.apply(Lu(us,ss,is,ns,es,ts,Ja,Ka,_s).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}():i===b.LOG?function t(){var e=Xa(xa()).domain([1,10]);return e.copy=function(){return ba(e,t()).base(e.base())},no.apply(e,arguments),e}().base(n.base||10):i===b.LABELS?fo():Va()).domain(this.getScaleDomain(t)),r},e.prototype.getHighestDomainThreshold=function(){var t=Nr.getProperty(this.model.getOptions(),"axes")[this.getDomainAxisPosition()].thresholds;if(!t)return null;var e=this.getDomainScale(),n=t.sort((function(t,e){return e.value-t.value}))[0];return{threshold:n,scaleValue:e(n.value)}},e.prototype.getHighestRangeThreshold=function(){var t=Nr.getProperty(this.model.getOptions(),"axes")[this.getRangeAxisPosition()].thresholds;if(!t)return null;var e=this.getRangeScale(),n=t.sort((function(t,e){return e.value-t.value}))[0];return{threshold:n,scaleValue:e(n.value)}},e}(cc);var Ap,Pp,Cp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.curveTypes={curveLinear:sl,curveLinearClosed:Fl,curveBasis:xl,curveBasisClosed:Tl,curveBasisOpen:El,curveBundle:Sl,curveCardinal:Cl,curveCardinalClosed:Dl,curveCardinalOpen:Rl,curveCatmullRom:Nl,curveCatmullRomClosed:Hl,curveCatmullRomOpen:Gl,curveMonotoneX:Ql,curveMonotoneY:Kl,curveNatural:ec,curveStep:rc,curveStepAfter:oc,curveStepBefore:ic},e}return n(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}(cc),kp=function(){function t(t,e,n){this.configs={},this.model=t,this.services=e,n&&(this.configs=n),this.parent||this.setParent(bh(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=Nr.getProperty(this.model.getOptions(),"style","prefix");this.parent.classed(Th.prefix+"--"+n+"--"+this.type,!0),e&&e.classed(Th.prefix+"--"+n+"--"+this.type,!1)}},t.prototype.getParent=function(){return this.parent},t.prototype.getContainerSVG=function(){if(this.type){var t=Nr.getProperty(this.model.getOptions(),"style","prefix");return Yh.appendOrSelect(this.parent,"g."+Th.prefix+"--"+t+"--"+this.type)}return this.parent},t}(),Dp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="legend",e}return n(e,t),e.prototype.render=function(){var t=this,e=this.getContainerSVG().attr("role",r.GRAPHICS_DOCUMENT),n=this.model.getOptions(),i=e.selectAll("g.legend-item").data(this.model.getDataGroups(),(function(t){return t.name})),o=i.enter().append("g").classed("legend-item",!0),a=n.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.status===n.legend.items.status.ACTIVE?t.model.getStrokeColor(e.name):null})).classed("active",(function(t,e){return t.status===n.legend.items.status.ACTIVE})),o.append("text").merge(i.select("text")).html((function(t){return t.name})).attr("alignment-baseline","middle"),this.breakItemsIntoLines(o),i.exit().on("mouseover",null).on("click",null).on("mouseout",null).remove();var s=Nr.getProperty(this.model.getOptions(),"legend","clickable");e.classed("clickable",s),s&&o.size()>0&&this.addEventListeners()},e.prototype.breakItemsIntoLines=function(t){var e=this,n=this.getContainerSVG(),r=this.model.getOptions(),i=r.legend.checkbox.radius,o=r.legend.items.horizontalSpace,a=r.legend.items.verticalSpace,s=r.legend.items.textYOffset,u=2*i+r.legend.checkbox.spaceAfter,l=r.legend.items.status.DISABLED,c=this.model.getDataGroups().some((function(t){return t.status===l})),h=Nr.getProperty(r,"legend","orientation"),f=0,d=0,p=0;t.merge(n.selectAll("g.legend-item")).each((function(t,r){var l=bh(this),g=bh(n.selectAll("g.legend-item").nodes()[r-1]);if(0===p||g.empty()||h===O.VERTICAL)h===O.VERTICAL&&0!==r&&d++;else{var v=Yh.getSVGElementSize(e.parent,{useAttr:!0}),m=Yh.getSVGElementSize(bh(this).select("text"),{useBBox:!0}),y=Yh.getSVGElementSize(g.select("text"),{useBBox:!0});(f=f+y.width+u+o)+u+m.width>v.width&&(d++,f=0,p=0)}l.select("rect.checkbox").attr("x",f).attr("y",0+d*a);var _=s+d*a;l.select("text").attr("x",f+u).attr("y",0+_),c&&l.select("g.check").empty()?(l.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'),l.select("g.check svg").attr("width",2*i-1).attr("height",2*i-1).attr("x",parseFloat(l.select("rect.checkbox").attr("x"))+.5).attr("y",parseFloat(l.select("rect.checkbox").attr("y"))+.5)):c||l.select("g.check").empty()||l.select("g.check").remove(),p++}))},e.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(k.Legend.ITEM_HOVER,{hoveredElement:bh(this)});var e=n.legend.checkbox.radius,r=bh(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(k.Legend.ITEM_CLICK,{clickedElement:bh(this)});var e=bh(this).datum();t.model.toggleDataLabel(e.name)})).on("mouseout",(function(){var e=bh(this);e.select("rect.hover-stroke").remove(),t.services.events.dispatchEvent(k.Legend.ITEM_MOUSEOUT,{hoveredElement:e})}))},e}(kp);!function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(Pp||(Pp={}));var Lp=((Ap={})[Pp.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)}},Ap[Pp.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)}},Ap[Pp.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)}},Ap[Pp.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)}},Ap),Rp="undefined"!=typeof window?window:{innerHeight:0,scrollY:0,innerWidth:0,scrollX:0},Ip=function(){function t(t){void 0===t&&(t={}),this.positions=Lp,this.positions=Object.assign({},Lp,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:Rp.innerHeight-Rp.scrollY,height:Rp.innerWidth-Rp.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}(),jp=(new Ip,[["15seconds",15e3],["minute",6e4],["30minutes",18e5],["hourly",36e5],["daily",864e5],["monthly",2592e6],["quarterly",7776e6],["yearly",31104e6]]);function Np(t,e,n,r){var i=0===e,o=2===Number(_p(new Date(t),"c")),a=1===Number(_p(new Date(t),"q"));switch(n){case"15seconds":case"minute":case"30minutes":case"hourly":return i||Gp(t)||Bp(t)||Fp(t);case"daily":return r?i||o||Fp(t):i||Bp(t)||Fp(t);case"monthly":return i||Fp(t);case"quarterly":return i||a;case"yearly":return!1;default:throw new Error(n+" is not a valid time interval.")}}function Up(t,e,n,r){var i=r.showDayName,o="daily"===n&&i?"weekly":n,a=new Date(t),s=Nr.getProperty(r,"timeIntervalFormats")[o],u=Nr.getProperty(s,"primary"),l=Nr.getProperty(s,"secondary");return _p(a,Np(t,e,n,i)?u:l,{locale:r.localeObject})}function Hp(t){var e=new Date(t);return{M:e.getMonth()+1,d:e.getDate(),H:e.getHours(),m:e.getMinutes(),s:e.getSeconds()}}function Vp(t){return 1===t.length?"15seconds":function(t){var e=jp.reduce((function(e,n,r){n[0];var i=n[1],o=jp[e][1];return Math.abs(o-t)<Math.abs(i-t)?e:r}),0);return jp[e][0]}(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}(function(t){if(t)return t.slice(1).map((function(e,n){return e-t[n]}))}(t)))}function Gp(t){var e=Hp(t),n=e.s,r=e.m;return 0===e.H&&0===r&&0===n}function Bp(t){var e=Hp(t),n=e.d,r=e.s,i=e.m,o=e.H;return 1===n&&0===o&&0===i&&0===r}function Fp(t){var e=Hp(t),n=e.M,r=e.d,i=e.s,o=e.m,a=e.H;return 1===n&&1===r&&0===a&&0===o&&0===i}var zp=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="threshold",i.positionService=new Ip,i}return n(e,t),e.prototype.render=function(t){var e=this;void 0===t&&(t=!1);var n=this.configs,r=n.value,i=n.fillColor,o=n.axisPosition,a=n.index,s=Nr.getProperty(this.model.getOptions(),"style","prefix");this.thresholdClass=Th.prefix+"--"+s+"--threshold",this.thresholdIdentifierClass=o+"-"+a,this.threshold=Yh.appendOrSelect(this.parent,"g."+this.thresholdClass+"."+this.thresholdIdentifierClass).raise();var u=Yh.appendOrSelect(this.threshold,"rect.threshold-hoverable-area"),l=Yh.appendOrSelect(this.threshold,"line.threshold-line");l.style("stroke",i);var c=this.services.cartesianScales.getScaleByPosition(o),h=[y.LEFT,y.RIGHT].includes(o),f=this.services.cartesianScales.getScaleTypeByPosition(o),d=this.services.cartesianScales.getMainXScale(),p=this.services.cartesianScales.getMainYScale(),g=f===b.LABELS,v=d.range(),m=v[0],_=v[1],x=p.range(),w=x[0],T=x[1];if(h){var O=c(r)+(g?c.step()/2:0);this.threshold.transition(this.services.transitions.getTransition("threshold-update",t)).attr("transform","translate("+m+", "+O+")"),l.attr("x2",_-m),u.attr("width",_-m)}else{var E=c(r)+(g?c.step()/2:0);this.threshold.transition(this.services.transitions.getTransition("threshold-update",t)).attr("transform","translate("+E+", "+T+")"),l.attr("y2",w-T),u.attr("width",w-T),u.classed("rotate",!0)}var M=this;this.services.events.addEventListener(k.Threshold.SHOW,(function(t){t.detail.hoveredElement.node()===M.threshold&&(e.setThresholdLabelPosition(),e.label.classed("hidden",!1))})),this.services.events.addEventListener(k.Threshold.HIDE,(function(t){e.label.classed("hidden",!0)})),this.appendThresholdLabel(),this.addEventListeners()},e.prototype.getFormattedValue=function(){var t=this.configs,e=t.value,n=t.axisPosition,r=this.model.getOptions();if(this.services.cartesianScales.getScaleTypeByPosition(n)===b.TIME){var i=[y.LEFT,y.RIGHT].includes(n),o=this.services.cartesianScales.getMainXScale(),a=this.services.cartesianScales.getMainYScale(),s=i?a:o,u=Nr.getProperty(r,"timeScale");return Up(e,0,Vp(s.ticks()),u)}return e.toLocaleString("en")},e.prototype.appendThresholdLabel=function(){var t=this.configs,e=t.value,n=t.valueFormatter,r=t.fillColor,i=t.label,o=void 0===i?"Threshold":i,a=bh(this.services.domUtils.getHolder()),s=n?n(e):this.getFormattedValue();this.label=Yh.appendOrSelect(a,"div."+this.thresholdClass+"--label."+this.thresholdIdentifierClass),this.label.html(o+": "+s).classed("hidden",!0).style("background-color",r)},e.prototype.setThresholdLabelPosition=function(){var t=this.services.domUtils.getHolder(),e=this.label.node(),n=wh(t),r=this.positionService.findBestPlacementAt({left:n[0],top:n[1]},e,[Pp.RIGHT,Pp.LEFT,Pp.TOP,Pp.BOTTOM],(function(){return{width:t.offsetWidth,height:t.offsetHeight}})),i=this.positionService.findPositionAt({left:n[0],top:n[1]},e,r);this.positionService.setElement(e,i)},e.prototype.addEventListeners=function(){var t=this;Yh.appendOrSelect(this.threshold,"rect").on("mouseover mousemove",(function(){t.threshold.classed("active",!0),t.services.events.dispatchEvent(k.Threshold.SHOW,{hoveredElement:bh(t.threshold)})})).on("mouseout",(function(){t.threshold.classed("active",!1),t.services.events.dispatchEvent(k.Threshold.HIDE,{hoveredElement:bh(t.threshold)})}))},e}(kp),Wp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="title",e}return n(e,t),e.prototype.truncateTitle=function(){var t=Yh.getSVGElementSize(this.services.domUtils.getMainSVG(),{useAttr:!0}).width,e=Yh.appendOrSelect(this.parent,"text.title");if(!(t<=0)&&e.node().getComputedTextLength()>t){e.append("tspan").text("...");var n=Yh.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.html(i.substring(0,o-1)).append("tspan").text("...");var a=this;e.on("mouseenter",(function(){a.services.events.dispatchEvent(k.Tooltip.SHOW,{hoveredElement:e,type:w.TITLE})})).on("mouseout",(function(){a.services.events.dispatchEvent(k.Tooltip.HIDE,{hoveredElement:e})}))}},e.prototype.render=function(){var t=this.getContainerSVG();Yh.appendOrSelect(t,"text.title").attr("x",0).attr("y",20).html(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}(kp),Yp=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="tooltip",i.positionService=new Ip,i.init(),i}return n(e,t),e.prototype.init=function(){var t=this,e=bh(this.services.domUtils.getHolder()),n=Nr.getProperty(this.model.getOptions(),"style","prefix");this.tooltip=Yh.appendOrSelect(e,"div."+Th.prefix+"--"+n+"--tooltip");var r=Yh.appendOrSelect(this.tooltip,"div.content-box");this.tooltip.style("max-width",null),this.services.events.addEventListener(k.Tooltip.SHOW,(function(i){if(i.detail.type===w.DATAPOINT&&Nr.getProperty(t.model.getOptions(),"tooltip","datapoint","enabled")||i.detail.type===w.GRIDLINE&&Nr.getProperty(t.model.getOptions(),"tooltip","gridline","enabled")){var o=bh(uh.target).datum(),a=void 0;i.detail.multidata?(o=i.detail.multidata,a=t.getMultilineTooltipHTML(o)):a=t.getTooltipHTML(o,w.DATAPOINT),Nr.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===w.TITLE){var s=Yh.appendOrSelect(e,"svg."+Th.prefix+"--"+n+"--chart-svg"),u=Yh.getSVGElementSize(s).width*Nr.getProperty(t.model.getOptions(),"tooltip","title","width");t.tooltip.style("max-width",u),r.html(t.getTooltipHTML(i.detail.hoveredElement,w.TITLE));var l=t.getTooltipPosition(i.detail.hoveredElement.node());t.positionTooltip(l)}t.tooltip.classed("hidden",!1)})),this.services.events.addEventListener(k.Tooltip.HIDE,(function(){t.tooltip.classed("hidden",!0)}))},e.prototype.getTooltipHTML=function(t,e){if(e===w.TITLE)return'<div class="title-tooltip"><text>'+this.model.getOptions().title+"</text></div>";var n=Nr.getProperty(t,"data")?t.data:t,r=this.model.getOptions().data.groupMapsTo,i=this.services.cartesianScales.getRangeIdentifier(),o=Nr.getProperty(this.model.getOptions(),"tooltip","valueFormatter")?this.model.getOptions().tooltip.valueFormatter(n[i]):n[i].toLocaleString("en");return'<div class="datapoint-tooltip">\n\t\t\t\t\t<p class="label">'+n[r]+'</p>\n\t\t\t\t\t<p class="value">'+o+"</p>\n\t\t\t\t</div>"},e.prototype.getMultilineTooltipHTML=function(t){var e=this;t.sort((function(t,e){return e.value-t.value}));this.services.cartesianScales.getDomainScale().scaleType;return"<ul class='multi-tooltip'>"+t.map((function(t){var n=e.model.getOptions().data.groupMapsTo,r=e.services.cartesianScales.getRangeIdentifier(),i=Nr.getProperty(e.model.getOptions(),"tooltip","valueFormatter"),o=i?i(t[r]):t[r].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[n])+'" class="tooltip-color"></a>\n\t\t\t\t\t\t<p class="label">'+t[n]+'</p>\n\t\t\t\t\t\t<p class="value">'+o+"</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=bh(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:x.BOTTOM,position:i}},e.prototype.positionTooltip=function(t){var e,n=this.services.domUtils.getHolder(),r=this.tooltip.node(),i=wh(n);if(t){var o=t.placement===x.TOP?Pp.TOP:Pp.BOTTOM;e=this.positionService.findPositionAt(t.position,r,o)}else{var a=this.positionService.findBestPlacementAt({left:i[0],top:i[1]},r,[Pp.RIGHT,Pp.LEFT,Pp.TOP,Pp.BOTTOM],(function(){return{width:n.offsetWidth,height:n.offsetHeight}})),s=this.model.getOptions().tooltip.datapoint.horizontalOffset;a===Pp.LEFT&&(s*=-1),e=this.positionService.findPositionAt({left:i[0]+s,top:i[1]},r,a)}this.positionService.setElement(r,e)},e}(kp),qp=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.init=function(){var e=this,n=bh(this.services.domUtils.getHolder()),r=Nr.getProperty(this.model.getOptions(),"style","prefix");this.tooltip=Yh.appendOrSelect(n,"div."+Th.prefix+"--"+r+"--tooltip");var i=Yh.appendOrSelect(this.tooltip,"div.content-box");this.tooltip.style("max-width",null),this.services.events.addEventListener(k.Tooltip.SHOW,(function(o){if(o.detail.type===w.DATAPOINT&&Nr.getProperty(e.model.getOptions(),"tooltip","datapoint","enabled")||o.detail.type===w.GRIDLINE&&Nr.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)):(a=o.detail.data?o.detail.data:o.detail.hoveredElement.datum(),u=e.getTooltipHTML(a)),Nr.getProperty(e.model.getOptions(),"tooltip","customHTML")?i.html(e.model.getOptions().tooltip.customHTML(a,u)):i.html(u);var l=e.getTooltipPosition(s,a);e.positionTooltip(o.detail.multidata?void 0:l)}else if(o.detail.type===w.TITLE){var c=Yh.appendOrSelect(n,"svg."+Th.prefix+"--"+r+"--chart-svg"),h=Yh.getSVGElementSize(c).width*Nr.getProperty(e.model.getOptions(),"tooltip","title","width");e.tooltip.style("max-width",h),i.html(t.prototype.getTooltipHTML.call(e,o.detail.hoveredElement,w.TITLE));l=t.prototype.getTooltipPosition.call(e,o.detail.hoveredElement.node());e.positionTooltip(l)}e.tooltip.classed("hidden",!1)})),this.services.events.addEventListener(k.Tooltip.HIDE,(function(){e.tooltip.classed("hidden",!0)}))},e.prototype.getTooltipPosition=function(t,e){void 0===e&&(e=bh(t).datum());var n=bh(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:x.BOTTOM,position:o}}o={left:r.left-n.left+r.width/2,top:r.top-n.top-i};return{placement:x.TOP,position:o}},e.prototype.getTooltipHTML=function(t){return'<div class="datapoint-tooltip"><p class="value">'+(Nr.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()===_.VERTICAL&&n.reverse();var r=n.reduce((function(t,e){return t+e.value}),0);return r=Nr.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=Nr.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}(Yp),Xp=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getTooltipHTML=function(t,e){if(e===w.TITLE)return'<div class="title-tooltip"><text>'+this.model.getOptions().title+"</text></div>";var n=t.data,r=this.model.getOptions().data.groupMapsTo,i=Nr.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<p class="label">'+n[r]+'</p>\n\t\t\t\t<p class="value">'+i+"</p>\n\t\t\t</div>"},e}(Yp),$p=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getTooltipHTML=function(e,n){if(n===w.TITLE)return t.prototype.getTooltipHTML.call(this,e,n);var r=this.model.getOptions().data.groupMapsTo,i=this.services.cartesianScales.getRangeIdentifier(),o=Nr.getProperty(this.model.getOptions(),"tooltip","valueFormatter"),a=o?o(e[i]):e[i].toLocaleString("en");return'\n\t\t\t<div class="datapoint-tooltip">\n\t\t\t\t<a style="background-color:'+this.model.getStrokeColor(e[r])+'" class="tooltip-color"></a>\n\t\t\t\t<p class="label">'+e[r]+'</p>\n\t\t\t\t<p class="value">'+a+"</p>\n\t\t\t</div>"},e}(Yp),Zp=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getMultilineTooltipHTML=function(t){var e=this,n=this.model.getOptions(),r=n.data.groupMapsTo,i=n.radar.axes,o=(i.angle,i.value);return t.sort((function(t,e){return e[o]-t[o]})),"<ul class='multi-tooltip'>"+t.map((function(t){var i=Nr.getProperty(n,"tooltip","valueFormatter"),a=i?i(t[o]):t[o];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[r])+'" class="tooltip-color"></a>\n\t\t\t\t\t\t<p class="label">'+t[r]+'</p>\n\t\t\t\t\t\t<p class="value">'+a+"</p>\n\t\t\t\t\t</div>\n\t\t\t\t</li>"})).join("")+"</ul>"},e}(Yp),Qp=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getBarWidth=function(t){var e=this.model.getOptions(),n=this.services.cartesianScales.getMainXScale();return n.step?Math.min(e.bars.maxWidth,n.step()/2):Math.min(e.bars.maxWidth,5/n.ticks().length*e.bars.maxWidth)},e}(kp),Kp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="simple-bar",e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.model.getOptions().data.groupMapsTo;e.parent.selectAll("path.bar").transition(e.services.transitions.getTransition("legend-hover-simple-bar")).attr("opacity",(function(t){return t[r]!==n.datum().name?.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 n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(k.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(k.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.model.getOptions().data.groupMapsTo,i=this.getContainerSVG().selectAll("path.bar").data(this.model.getDisplayData(),(function(t){return t[n]}));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 e.model.getFillColor(t[n])})).attr("d",(function(t,n){var r=e.getBarWidth(),i=e.services.cartesianScales.getDomainValue(t,n)-r/2,o=i+r,a=e.services.cartesianScales.getRangeValue(0),s=e.services.cartesianScales.getRangeValue(t,n);return Nr.generateSVGPathString({x0:i,x1:o,y0:a,y1:s},e.services.cartesianScales.getOrientation())})).attr("opacity",1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t.value})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this.model.getOptions().data.groupMapsTo,e=this;this.parent.selectAll("path.bar").on("mouseover",(function(n){var r=bh(this);r.classed("hovered",!0),r.transition(e.services.transitions.getTransition("graph_element_mouseover_fill_update")).attr("fill",(function(n){return Co(e.model.getFillColor(n[t])).darker(.7).toString()})),e.services.events.dispatchEvent(k.Bar.BAR_MOUSEOVER,{element:r,datum:n}),e.services.events.dispatchEvent(k.Tooltip.SHOW,{hoveredElement:r,type:w.DATAPOINT})})).on("mousemove",(function(t){e.services.events.dispatchEvent(k.Bar.BAR_MOUSEMOVE,{element:bh(this),datum:t})})).on("click",(function(t){e.services.events.dispatchEvent(k.Bar.BAR_CLICK,{element:bh(this),datum:t})})).on("mouseout",(function(n){var r=bh(this);r.classed("hovered",!1),r.transition(e.services.transitions.getTransition("graph_element_mouseout_fill_update")).attr("fill",(function(n){return e.model.getFillColor(n[t])})),e.services.events.dispatchEvent(k.Bar.BAR_MOUSEOUT,{element:r,datum:n}),e.services.events.dispatchEvent(k.Tooltip.HIDE,{hoveredElement:r})}))},e.prototype.destroy=function(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(k.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(k.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Qp),Jp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grouped-bar",e.padding=5,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.model.getOptions().data.groupMapsTo;e.parent.selectAll("path.bar").transition(e.services.transitions.getTransition("legend-hover-bar")).attr("opacity",(function(t){return t[r]!==n.datum().name?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.bar").transition(e.services.transitions.getTransition("legend-mouseout-bar")).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(k.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(k.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.model.getDisplayData(),i=this.model.getOptions().data.groupMapsTo,o=this.services.cartesianScales.getDomainIdentifier();this.setGroupScale();var a=this.getContainerSVG(),s=io(n,(function(t){return t[o]})).keys(),u=a.selectAll("g.bars").data(s,(function(t){return t}));u.exit().attr("opacity",0).remove();var l=u.enter().append("g").classed("bars",!0).attr("role",r.GROUP).attr("aria-labelledby",(function(t){return t})).merge(u).attr("transform",(function(t,n){var r=e.services.cartesianScales.getDomainValue(t,n)-e.getGroupWidth()/2;return e.services.cartesianScales.getOrientation()===_.VERTICAL?"translate("+r+", 0)":"translate(0, "+r+")"})).selectAll("path.bar").data((function(t){return e.getDataCorrespondingToLabel(t)}));l.exit().attr("opacity",0).remove(),l.enter().append("path").attr("opacity",0).merge(l).classed("bar",!0).transition(this.services.transitions.getTransition("bar-update-enter",t)).attr("fill",(function(t){return e.model.getFillColor(t[i])})).attr("d",(function(t){var n=e.groupScale(t[i]),r=n,o=n+e.getBarWidth(),a=e.services.cartesianScales.getRangeValue(0),s=e.services.cartesianScales.getRangeValue(t.value);return Nr.generateSVGPathString({x0:r,x1:o,y0:a,y1:s},e.services.cartesianScales.getOrientation())})).attr("opacity",1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t.value})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this,e=this.model.getOptions().data.groupMapsTo;this.parent.selectAll("path.bar").on("mouseover",(function(n){var r=bh(this);r.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")).attr("fill",(function(n){return Co(t.model.getFillColor(n[e])).darker(.7).toString()})),t.services.events.dispatchEvent(k.Bar.BAR_MOUSEOVER,{element:r,datum:n}),t.services.events.dispatchEvent(k.Tooltip.SHOW,{hoveredElement:r,type:w.DATAPOINT})})).on("mousemove",(function(e){t.services.events.dispatchEvent(k.Bar.BAR_MOUSEMOVE,{element:bh(this),datum:e})})).on("click",(function(e){t.services.events.dispatchEvent(k.Bar.BAR_CLICK,{element:bh(this),datum:e})})).on("mouseout",(function(e){var n=bh(this);n.classed("hovered",!1);var r=t.model.getOptions().data.groupMapsTo;n.transition(t.services.transitions.getTransition("graph_element_mouseout_fill_update")).attr("fill",(function(e){return t.model.getFillColor(e[r])})),t.services.events.dispatchEvent(k.Bar.BAR_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(k.Tooltip.HIDE,{hoveredElement:n})}))},e.prototype.destroy=function(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(k.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(k.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.getDataCorrespondingToLabel=function(t){var e=this.model.getDisplayData(),n=this.services.cartesianScales.getDomainIdentifier();return e.filter((function(e){return e[n]===t}))},e.prototype.getGroupWidth=function(){var t=this.model.getActiveDataGroupNames().length,e=this.getTotalGroupPadding();return this.getBarWidth()*t+e},e.prototype.getTotalGroupPadding=function(){var t=this.model.getActiveDataGroupNames().length;if(1===t)return 0;var e=this.services.cartesianScales.getDomainScale();return Math.min(5,e.step()/70*5)*(t-1)},e.prototype.getBarWidth=function(){var t=this.model.getOptions(),e=Nr.getProperty(t,"bars","width"),n=Nr.getProperty(t,"bars","maxWidth");if(null!==e){if(null===n)return e;if(e<=n)return e}var r=this.model.getActiveDataGroupNames().length,i=this.getTotalGroupPadding(),o=this.services.cartesianScales.getDomainScale();return Math.min(n,(o.step()-i)/r)},e.prototype.setGroupScale=function(){this.groupScale=fo().domain(this.model.getActiveDataGroupNames()).rangeRound([0,this.getGroupWidth()])},e}(Qp),tg=function(t){function e(){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 n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(k.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(k.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.getContainerSVG(),i=this.model.getDisplayData(),o=this.model.getOptions(),a=o.data.groupMapsTo,s=this.services.cartesianScales.getDomainIdentifier(),u=io(i,(function(t){return t[s]})).keys(),l=this.model.getStackedData(),c=n.selectAll("g.bars").data(l,(function(t){return t.key}));c.exit().attr("opacity",0).remove(),c.enter().append("g").classed("bars",!0).attr("role",r.GROUP);var h=n.selectAll("g.bars").selectAll("path.bar").data((function(t){return t}));h.exit().remove(),h.enter().append("path").merge(h).classed("bar",!0).transition(this.services.transitions.getTransition("bar-update-enter",t)).attr("fill",(function(t){return e.model.getFillColor(t[a])})).attr("d",(function(t,n){var r=u[n],i=e.getBarWidth(),a=e.services.cartesianScales.getDomainValue(r,n)-i/2,s=a+i,l=e.services.cartesianScales.getRangeValue(t[0],n),c=e.services.cartesianScales.getRangeValue(t[1],n);return Math.abs(c-l)>0&&Math.abs(c-l)>o.bars.dividerSize&&(e.services.cartesianScales.getOrientation()===_.VERTICAL?c+=1:c-=1),Nr.generateSVGPathString({x0:a,x1:s,y0:l,y1:c},e.services.cartesianScales.getOrientation())})).attr("opacity",1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t.value})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this.model.getOptions().data.groupMapsTo,e=this;this.parent.selectAll("path.bar").on("mouseover",(function(n){var r=bh(this);r.transition(e.services.transitions.getTransition("graph_element_mouseover_fill_update")).attr("fill",(function(n){return Co(e.model.getFillColor(n[t])).darker(.7).toString()})),e.services.events.dispatchEvent(k.Bar.BAR_MOUSEOVER,{element:r,datum:n})})).on("mousemove",(function(t){var n,r=e.model.getDisplayData(),i=bh(this),o=e.services.cartesianScales.getDomainIdentifier(),a=e.services.cartesianScales.getRangeIdentifier(),s=e.model.getOptions().data.groupMapsTo,u=r.find((function(e){return e[a]===t.data[t.group]&&e[o].toString()===t.data.sharedStackKey&&e[s]===t.group}));void 0===u&&((n={})[o]=t.data.sharedStackKey,n[a]=t.data[t.group],n[s]=t.group,u=n),e.services.events.dispatchEvent(k.Tooltip.SHOW,{hoveredElement:i,data:u,type:w.DATAPOINT})})).on("click",(function(t){e.services.events.dispatchEvent(k.Bar.BAR_CLICK,{element:bh(this),datum:t})})).on("mouseout",(function(n){var r=bh(this);r.classed("hovered",!1),r.transition(e.services.transitions.getTransition("graph_element_mouseout_fill_update")).attr("fill",(function(n){return e.model.getFillColor(n[t])})),e.services.events.dispatchEvent(k.Bar.BAR_MOUSEOUT,{element:r,datum:n}),e.services.events.dispatchEvent(k.Tooltip.HIDE,{hoveredElement:r})}))},e.prototype.destroy=function(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(k.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(k.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Qp),eg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="scatter",e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.model.getOptions().data.groupMapsTo;e.parent.selectAll("circle.dot").transition(e.services.transitions.getTransition("legend-hover-scatter")).attr("opacity",(function(t){return t[r]!==n.datum().name?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("circle.dot").transition(e.services.transitions.getTransition("legend-mouseout-scatter")).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(k.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(k.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this.getContainerSVG(),n=this.model.getGroupedData(),i=e.selectAll("g.dots").data(n,(function(t){return t.name}));i.exit().attr("opacity",0).remove();var o=i.enter().append("g").classed("dots",!0).attr("role",r.GROUP),a=this.services.cartesianScales.getRangeIdentifier(),s=o.merge(i).selectAll("circle.dot").data((function(t){return t.data.filter((function(t){return null!==t[a]&&void 0!==t[a]}))})),u=s.enter().append("circle").attr("opacity",0).merge(s);this.styleCircles(u,t),this.addEventListeners()},e.prototype.isDatapointThresholdAnomaly=function(t,e){if(!this.configs.handleThresholds)return!1;var n=this.services.cartesianScales,r=n.getOrientation(),i=Nr.flipDomainAndRangeBasedOnOrientation(this.services.cartesianScales.getHighestDomainThreshold(),this.services.cartesianScales.getHighestRangeThreshold(),r),o=i[0],a=i[1],s=Nr.flipDomainAndRangeBasedOnOrientation((function(t,e){return n.getDomainValue(t,e)}),(function(t,e){return n.getRangeValue(t,e)}),r),u=s[0],l=s[1],c=u(t,e),h=l(t,e);return a&&o?h<=a.scaleValue&&c>=o.scaleValue:a?h<=a.scaleValue:o?c>=o.scaleValue:void 0},e.prototype.styleCircles=function(t,e){var n=this,i=this.model.getOptions(),o=i.points.filled,a=this.services,s=a.cartesianScales,u=a.transitions,l=i.data.groupMapsTo,c=s.getDomainIdentifier(),h=s.getRangeIdentifier(),f=Nr.flipDomainAndRangeBasedOnOrientation((function(t,e){return s.getDomainValue(t,e)}),(function(t,e){return s.getRangeValue(t,e)}),s.getOrientation()),d=f[0],p=f[1];t.raise().classed("dot",!0).classed("threshold-anomaly",(function(t,e){return n.isDatapointThresholdAnomaly(t,e)})).classed("filled",(function(t){return n.model.getIsFilled(t[l],t[c],t,o)})).classed("unfilled",(function(t){return!n.model.getIsFilled(t[l],t[c],t,o)})).attr("cx",d).transition(u.getTransition("scatter-update-enter",e)).attr("cy",p).attr("r",i.points.radius).attr("fill",(function(t){if(n.model.getIsFilled(t[l],t[c],t,o))return n.model.getFillColor(t[l],t[c],t)})).attr("fill-opacity",o?.2:1).attr("stroke",(function(t){return n.model.getStrokeColor(t[l],t[c],t)})).attr("opacity",1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","point").attr("aria-label",(function(t){return t[h]})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this,e=this.model.getOptions().data.groupMapsTo,n=this.services.cartesianScales.getDomainIdentifier();this.parent.selectAll("circle").on("mouseover mousemove",(function(r){var i=bh(this);i.classed("hovered",!0).style("fill",(function(r){return t.model.getFillColor(r[e],r[n],r)}));var o="mouseover"===uh.type?k.Scatter.SCATTER_MOUSEOVER:k.Scatter.SCATTER_MOUSEMOVE;t.services.events.dispatchEvent(o,{element:i,datum:r}),t.services.events.dispatchEvent(k.Tooltip.SHOW,{hoveredElement:i,type:w.DATAPOINT})})).on("click",(function(e){t.services.events.dispatchEvent(k.Scatter.SCATTER_CLICK,{element:bh(this),datum:e})})).on("mouseout",(function(e){var n=bh(this);n.classed("hovered",!1),t.configs.filled||n.style("fill",null),t.services.events.dispatchEvent(k.Scatter.SCATTER_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(k.Tooltip.HIDE,{hoveredElement:n})}))},e.prototype.destroy=function(){this.parent.selectAll("circle").on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(k.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(k.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(kp),ng=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="bubble",e}return n(e,t),e.prototype.getRadiusScale=function(t){var e=this.model.getOptions(),n=e.bubble.radiusMapsTo,r=t.data(),i=r.map((function(t){return t[n]})).filter((function(t){return t})),o=Yh.getSVGElementSize(this.services.domUtils.getMainSVG(),{useAttr:!0}),a=i.length>0,s=a?qi(i):[1,1];return Va().domain(s).range(a?e.bubble.radiusRange(o,r):[4,4])},e.prototype.styleCircles=function(t,e){var n=this,i=this.model.getOptions(),o=i.bubble.radiusMapsTo,a=this.getRadiusScale(t),s=i.data.groupMapsTo,u=this.services.cartesianScales.getDomainIdentifier();t.raise().classed("dot",!0).attr("role",r.GRAPHICS_SYMBOL).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 a(t[o]||1)})).attr("fill",(function(t){return n.model.getFillColor(t[s],t[u],t)})).attr("fill-opacity",i.bubble.fillOpacity).attr("stroke",(function(t){return n.model.getStrokeColor(t[s],t[u],t)})).attr("opacity",1)},e}(eg),rg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="line",e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("g.lines").transition(e.services.transitions.getTransition("legend-hover-line")).attr("opacity",(function(t){return t.name!==n.datum().name?mi.opacity.unselected:mi.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("g.lines").transition(e.services.transitions.getTransition("legend-mouseout-line")).attr("opacity",mi.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(k.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(k.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getContainerSVG(),i=this.services,o=i.cartesianScales,a=i.curves,s=Nr.flipDomainAndRangeBasedOnOrientation((function(t,e){return o.getDomainValue(t,e)}),(function(t,e){return o.getRangeValue(t,e)}),o.getOrientation()),u=s[0],l=s[1],c=cl().x(u).y(l).curve(a.getD3Curve()).defined((function(t,e){var n=t[o.getRangeIdentifier()];return null!=n})),h=this.model.getGroupedData(),f=n.selectAll("path.line").data(h,(function(t){return t.name}));f.exit().attr("opacity",0).remove(),f.enter().append("path").classed("line",!0).attr("opacity",0).merge(f).attr("stroke",(function(t,n){return e.model.getStrokeColor(t.name)})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","line").attr("aria-label",(function(t){var n=t.data,r=e.services.cartesianScales.getRangeIdentifier();return n.map((function(t){return t[r]})).join(",")})).transition(this.services.transitions.getTransition("line-update-enter",t)).attr("opacity",1).attr("d",(function(t){var e=t.data;return c(e)}))},e.prototype.destroy=function(){this.parent.selectAll("path").on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(k.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(k.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(kp);function ig(t,e){var n=this,r=ea(this._current,t);return function(t){return n._current=r(t),e(n._current)}}var og=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="pie",e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.model.getOptions().data.groupMapsTo;e.parent.selectAll("path.slice").transition(e.services.transitions.getTransition("legend-hover-bar")).attr("opacity",(function(t){return t.data[r]!==n.datum().name?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.slice").transition(e.services.transitions.getTransition("legend-mouseout-bar")).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(k.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(k.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.getInnerRadius=function(){return this.model.getOptions().pie.innerRadius},e.prototype.render=function(t){void 0===t&&(t=!0);var e=this,n=this.getContainerSVG(),i=this.model.getDisplayData(),o=this.model.getOptions(),a=o.data.groupMapsTo,s=this.computeRadius();this.arc=ol().innerRadius(this.getInnerRadius()).outerRadius(s),this.hoverArc=ol().innerRadius(this.getInnerRadius()).outerRadius(s+o.pie.hoverArc.outerRadiusOffset);var u=function(){var t=fl,e=hl,n=null,r=Hu(0),i=Hu($u),o=Hu(0);function a(a){var s,u,l,c,h,f=a.length,d=0,p=new Array(f),g=new Array(f),v=+r.apply(this,arguments),m=Math.min($u,Math.max(-$u,i.apply(this,arguments)-v)),y=Math.min(Math.abs(m)/f,o.apply(this,arguments)),_=y*(m<0?-1:1);for(s=0;s<f;++s)(h=g[p[s]=s]=+t(a[s],s,a))>0&&(d+=h);for(null!=e?p.sort((function(t,n){return e(g[t],g[n])})):null!=n&&p.sort((function(t,e){return n(a[t],a[e])})),s=0,l=d?(m-f*_)/d:0;s<f;++s,v=c)u=p[s],c=v+((h=g[u])>0?h*l:0)+_,g[u]={data:a[u],index:s,value:h,startAngle:v,endAngle:c,padAngle:y};return g}return a.value=function(e){return arguments.length?(t="function"==typeof e?e:Hu(+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:Hu(+t),a):r},a.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Hu(+t),a):i},a.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:Hu(+t),a):o},a}().value((function(t){return t.value})).sort(null).padAngle(o.pie.padAngle)(i).sort((function(t,e){return t.index-e.index})),l=Yh.appendOrSelect(n,"g.slices").attr("role",r.GROUP).selectAll("path.slice").data(u,(function(t){return t.data[a]}));l.exit().attr("opacity",0).remove(),l.enter().append("path").classed("slice",!0).attr("opacity",0).merge(l).attr("fill",(function(t){return e.model.getFillColor(t.data[a])})).attr("d",this.arc).transition(this.services.transitions.getTransition("pie-slice-enter-update",t)).attr("opacity",1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","slice").attr("aria-label",(function(t){return t.value+", "+Nr.convertValueToPercentage(t.data.value,i)+"%"})).attrTween("d",(function(t){return ig.bind(this)(t,e.arc)}));var c=u.filter((function(t){return t.value>0})),h=Yh.appendOrSelect(n,"g.labels").attr("role",r.GROUP).selectAll("text.pie-label").data(c,(function(t){return t.data[a]}));h.exit().attr("opacity",0).remove();var f=h.enter().append("text").classed("pie-label",!0),d=[];f.merge(h).style("text-anchor","middle").text((function(t){return o.pie.labels.formatter?o.pie.labels.formatter(t):Nr.convertValueToPercentage(t.data.value,i)+"%"})).datum((function(t){var e=s+7,n=(t.endAngle-t.startAngle)/2+t.startAngle,r=n/Math.PI*180,i=this.getComputedTextLength();return t.textOffsetX=i/2,t.textOffsetY=r>90&&r<270?10:0,t.xPosition=(t.textOffsetX+e)*Math.sin(n),t.yPosition=(t.textOffsetY+e)*-Math.cos(n),t})).attr("transform",(function(t,e){var n=c.length,r=(t.endAngle-t.startAngle)*(180/Math.PI);if(e>=n-2&&r<o.pie.callout.minSliceDegree){var i=void 0,a=void 0;return t.index===n-1?(i=t.xPosition+o.pie.callout.offsetX+o.pie.callout.textMargin+t.textOffsetX,a=t.yPosition-o.pie.callout.offsetY,t.direction=S.RIGHT,d.push(t)):(i=t.xPosition-o.pie.callout.offsetX-t.textOffsetX-o.pie.callout.textMargin,a=t.yPosition-o.pie.callout.offsetY,t.direction=S.LEFT,d.push(t)),"translate("+i+", "+a+")"}return"translate("+t.xPosition+", "+t.yPosition+")"})),this.renderCallouts(d);var p=s+o.pie.xOffset,g=s+o.pie.yOffset;d.length>0&&(g+=o.pie.yOffsetCallout),n.attr("transform","translate("+p+", "+g+")"),this.addEventListeners()},e.prototype.renderCallouts=function(t){var e=Yh.appendOrSelect(this.getContainerSVG(),"g.callouts").attr("role",r.GROUP),n=this.model.getOptions(),i=e.selectAll("g.callout").data(t);i.exit().remove();var o=i.enter().append("g").classed("callout",!0).attr("role",r.GRAPHICS_SYMBOL+" "+r.GROUP).attr("aria-roledescription","label callout");o.merge(i).datum((function(t){var e=t.xPosition,r=t.yPosition;return t.direction===S.RIGHT?(t.startPos={x:e,y:r+t.textOffsetY},t.endPos={x:e+n.pie.callout.offsetX,y:r-n.pie.callout.offsetY+t.textOffsetY},t.intersectPointX=t.endPos.x-n.pie.callout.horizontalLineLength):(t.startPos={x:e,y:r+t.textOffsetY},t.endPos={x:e-n.pie.callout.offsetX,y:r-n.pie.callout.offsetY+t.textOffsetY},t.intersectPointX=t.endPos.x+n.pie.callout.horizontalLineLength),t})),o.append("line").classed("vertical-line",!0).merge(e.selectAll("line.vertical-line")).datum((function(t){return bh(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(e.selectAll("line.horizontal-line")).datum((function(t){return bh(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}))},e.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("path.slice").on("mouseover",(function(e){t.services.events.dispatchEvent(k.Pie.SLICE_MOUSEOVER,{element:bh(this),datum:e})})).on("mousemove",(function(e){var n=bh(this);n.classed("hovered",!0).transition(t.services.transitions.getTransition("pie_slice_mouseover")).attr("d",t.hoverArc),t.services.events.dispatchEvent(k.Pie.SLICE_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(k.Tooltip.SHOW,{hoveredElement:n,type:w.DATAPOINT})})).on("click",(function(e){t.services.events.dispatchEvent(k.Pie.SLICE_CLICK,{element:bh(this),datum:e})})).on("mouseout",(function(e){var n=bh(this);n.classed("hovered",!1).transition(t.services.transitions.getTransition("pie_slice_mouseover")).attr("d",t.arc),t.services.events.dispatchEvent(k.Pie.SLICE_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(k.Tooltip.HIDE,{hoveredElement:n})}))},e.prototype.computeRadius=function(){var t=this.model.getOptions(),e=Yh.getSVGElementSize(this.parent,{useAttrs:!0}),n=e.width,r=e.height;return Math.min(n,r)/2+t.pie.radiusOffset},e}(kp),ag=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="donut",e}return n(e,t),e.prototype.render=function(e){void 0===e&&(e=!0),t.prototype.render.call(this,e);var n=this;if(this.model.isDataEmpty())this.getContainerSVG().select("g.center").remove();else{var r=Yh.appendOrSelect(this.getContainerSVG(),"g.center"),i=this.model.getOptions(),o=this.computeRadius();Yh.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(bh(this))})),Yh.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(Nr.getProperty(i,"donut","center","label"))}},e.prototype.getInnerRadius=function(){return.75*this.computeRadius()},e.prototype.centerNumberTween=function(t){var e=this.model.getOptions(),n=Nr.getProperty(e,"donut","center","number");null===n&&(n=this.model.getDisplayData().reduce((function(t,e){return t+e.value}),0));var r=parseInt(t.text().replace(/[, ]+/g,""),10)||0,i=(r%1==0&&n%1==0?na:Zo)(r,n);return function(n){var r=e.donut.center.numberFormatter;t.text(r(i(n)))}},e}(og),sg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="skeleton",e}return n(e,t),e.prototype.render=function(){var t=this.parent,e=t.node().parentNode,n=Yh.getSVGElementSize(e,{useAttrs:!0}),r=n.width,i=n.height;t.attr("width",r).attr("height",i);var o=this.model.isDataEmpty(),a=Nr.getProperty(this.model.getOptions(),"data","loading");if(o)this.renderSkeleton(a);else{if(!o&&a)throw new Error("Something went wrong. You can't provided non-empty data and data loading together.");this.removeSkeleton()}},e.prototype.renderSkeleton=function(t){if(this.configs.skeleton===A.GRID)this.renderGridSkeleton(t);else if(this.configs.skeleton===A.VERT_OR_HORIZ)this.renderVertOrHorizSkeleton(t);else if(this.configs.skeleton===A.PIE)this.renderPieSkeleton(t);else{if(this.configs.skeleton!==A.DONUT)throw new Error('"'+this.configs.skeleton+'" is not a valid Skeleton type.');this.renderDonutSkeleton(t)}},e.prototype.renderGridSkeleton=function(t){this.setScales(),this.drawBackdrop(t),this.drawXGrid(t),this.drawYGrid(t),t&&this.setShimmerEffect("shimmer-lines")},e.prototype.renderVertOrHorizSkeleton=function(t){var e=this.services.cartesianScales.getOrientation();this.setScales(),this.drawBackdrop(t),e===_.VERTICAL&&this.drawYGrid(t),e===_.HORIZONTAL&&this.drawXGrid(t),this.setShimmerEffect("shimmer-lines")},e.prototype.renderPieSkeleton=function(t){var e=this.computeOuterRadius();this.drawRing(e,0,t),t&&this.setShimmerEffect("shimmer-areas")},e.prototype.renderDonutSkeleton=function(t){var e=this.computeOuterRadius(),n=this.computeInnerRadius();this.drawRing(e,n,t),t&&this.setShimmerEffect("shimmer-areas")},e.prototype.setScales=function(){var t=this.services.cartesianScales.getMainXScale().range(),e=this.services.cartesianScales.getMainYScale().range();this.xScale=Va().domain([0,1]).range(t),this.yScale=Va().domain([0,1]).range(e)},e.prototype.drawBackdrop=function(t){var e=this.parent,n=e.node().parentNode,r=Yh.getSVGElementSize(n,{useAttrs:!0}),i=r.width,o=r.height;this.backdrop=Yh.appendOrSelect(e,"svg.chart-skeleton.DAII").attr("width",i).attr("height",o);var a=Yh.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop");a.attr("width","100%").attr("height","100%");var s=this.xScale.range(),u=s[0],l=(s[1],this.yScale.range()),c=(l[0],l[1]);this.backdrop.merge(a).attr("x",u).attr("y",c),a.classed("shimmer-effect-lines",t).classed("empty-state-lines",!t)},e.prototype.drawXGrid=function(t){var e=this.backdrop.attr("height"),n=this.backdrop.attr("width"),r=Nr.getProperty(this.model.getOptions(),"grid","x","numberOfTicks"),i=this.xScale.ticks(r).map((function(t){return t*n})),o=Yh.appendOrSelect(this.backdrop,"g.x.skeleton"),a=o.selectAll("line").data(i);a.enter().append("line").merge(a).attr("x1",(function(t){return t})).attr("x2",(function(t){return t})).attr("y1",0).attr("y2",e),o.selectAll("line").classed("shimmer-effect-lines",t).classed("empty-state-lines",!t)},e.prototype.drawYGrid=function(t){var e=this.backdrop.attr("height"),n=this.backdrop.attr("width"),r=Nr.getProperty(this.model.getOptions(),"grid","y","numberOfTicks"),i=this.xScale.ticks(r).map((function(t){return t*e})),o=Yh.appendOrSelect(this.backdrop,"g.y.skeleton"),a=o.selectAll("line").data(i);a.enter().append("line").merge(a).attr("x1",0).attr("x2",n).attr("y1",(function(t){return t})).attr("y2",(function(t){return t})),o.selectAll("line").classed("shimmer-effect-lines",t).classed("empty-state-lines",!t)},e.prototype.drawRing=function(t,e,n){void 0===n&&(n=!0);var r=this.parent,i=Yh.getSVGElementSize(r.node().parentNode,{useAttrs:!0}),o=i.width,a=i.height,s=Yh.appendOrSelect(r,"svg.chart-skeleton").attr("width",o).attr("height",a),u=this.model.getOptions().pie,l=(Yh.appendOrSelect(s,"rect.chart-skeleton-area-container").attr("width",o).attr("height",a).attr("fill","none"),ol().innerRadius(e).outerRadius(t).startAngle(0).endAngle(2*Math.PI)),c=t+Math.abs(u.radiusOffset),h=t+(Math.min(o,a)-2*t)/2;Yh.appendOrSelect(s,"path").attr("class","skeleton-area-shape").attr("transform","translate("+c+", "+h+")").attr("d",l).classed("shimmer-effect-areas",n).classed("empty-state-areas",!n)},e.prototype.computeOuterRadius=function(){var t=this.model.getOptions(),e=Yh.getSVGElementSize(this.parent.node().parentNode,{useAttrs:!0}),n=e.width,r=e.height;return Math.min(n,r)/2+t.pie.radiusOffset},e.prototype.computeInnerRadius=function(){return.75*this.computeOuterRadius()},e.prototype.setShimmerEffect=function(t){var e=this.parent.select(".chart-skeleton"),n=Yh.getSVGElementSize(this.parent,{useAttrs:!0}).width,r=n,i=Yh.appendOrSelect(e,"defs").lower(),o=Yh.appendOrSelect(i,"linearGradient").attr("id",t).attr("x1",0-3*.2*n).attr("x2",r).attr("y1",0).attr("y2",0).attr("gradientUnits","userSpaceOnUse").attr("gradientTransform","translate(0, 0)");o.html('\n\t\t\t<stop class="stop-bg-shimmer" offset="0"></stop>\n\t\t\t<stop class="stop-shimmer" offset="0.2"></stop>\n\t\t\t<stop class="stop-bg-shimmer" offset="0.4"></stop>\n\t\t'),function t(){o.attr("gradientTransform","translate("+(0-3*.2*n)+", 0)").transition().duration(2e3).delay(1e3).ease(nd).attr("gradientTransform","translate("+(r+3*.2*n)+", 0)").on("end",t)}()},e.prototype.removeSkeleton=function(){this.parent.select(".chart-skeleton").remove()},e}(kp),ug=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="spacer",e}return n(e,t),e.prototype.render=function(){this.getContainerSVG().append("rect").attr("x",0).attr("y",0).attr("width",this.configs.size||bi.default.size).attr("height",this.configs.size||bi.default.size).attr("opacity",0)},e}(kp);function lg(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 cg(t,e){var n,r,i,o,a,s=new pg(t),u=+t.value&&(s.value=t.value),l=[s];for(null==e&&(e=hg);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 pg(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(dg)}function hg(t){return t.children}function fg(t){t.data=t.data.data}function dg(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function pg(t){this.data=t,this.depth=this.height=0,this.parent=null}function gg(t){if("function"!=typeof t)throw new Error;return t}function vg(){return 0}function mg(t){return function(){return t}}function yg(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 _g(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 bg(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}pg.prototype=cg.prototype={constructor:pg,count:function(){return this.eachAfter(lg)},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 cg(this).eachBefore(fg)}};var xg=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,d,p,g,v,m=[],y=e.children,_=0,b=0,x=y.length,w=e.value;_<x;){u=i-n,l=o-r;do{c=y[b++].value}while(!c&&b<x);for(h=f=c,v=c*c*(g=Math.max(l/u,u/l)/(w*t)),p=Math.max(f/v,v/h);b<x;++b){if(c+=s=y[b].value,s<h&&(h=s),s>f&&(f=s),v=c*c*g,(d=Math.max(f/v,v/h))>p){c-=s;break}p=d}m.push(a={value:c,dice:u<l,children:y.slice(_,b)}),a.dice?_g(a,n,r,i,w?r+=l*c/w:o):bg(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 wg(){var t=xg,e=!1,n=1,r=1,i=[0],o=vg,a=vg,s=vg,u=vg,l=vg;function c(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(h),i=[0],e&&t.eachBefore(yg),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=gg(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:mg(+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:mg(+t),c):a},c.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:mg(+t),c):s},c.paddingBottom=function(t){return arguments.length?(u="function"==typeof t?t:mg(+t),c):u},c.paddingLeft=function(t){return arguments.length?(l="function"==typeof t?t:mg(+t),c):l},c}var Tg=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===E.ROW_REVERSE||a.configs.direction===E.COLUMN_REVERSE)&&(a.children=a.children.reverse()),a.init(),a}return n(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=Nr.getProperty(t,"data","growth","x");return e===M.PREFERRED||e===M.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 Nr.getProperty(t,"data","growth","x")===M.STRETCH})).size()},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.parent,r=Yh.getSVGElementSize(n,{useAttrs:!0}),i=r.width,o=r.height,a=cg({children:this.children}).sum((function(t){return t.size})),s=this.configs.direction===E.ROW||this.configs.direction===E.ROW_REVERSE?_g:bg;wg().tile(s).size([i,o])(a);var u=this.configs.direction===E.ROW||this.configs.direction===E.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(bh(n));var i=Nr.getProperty(e,"data","growth","x");i!==M.PREFERRED&&i!==M.FIXED||r.render(t)}))})),n.selectAll("svg.layout-child-"+this._instanceID).each((function(t){var e=Nr.getProperty(t,"data","growth","x"),n=Yh.getSVGElementSize(bh(this),{useBBox:!0});if(e===M.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 Nr.getProperty(t,"growth","x")===M.STRETCH})).forEach((function(t,n){t.size=(100-+e.getPreferedAndFixedSizeSum())/+e.getNumOfStretchChildren()})),a=cg({children:this.children}).sum((function(t){return t.size})),wg().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){Nr.getProperty(e,"data","growth","x")===M.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}(kp),Og=Array.prototype.slice;function Eg(t){return t}function Mg(t){return"translate("+(t+.5)+",0)"}function Sg(t){return"translate(0,"+(t+.5)+")"}function Ag(t){return function(e){return+t(e)}}function Pg(t){var e=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}function Cg(){return!this.__axis}function kg(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?Mg:Sg;function h(h){var f=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,d=null==i?e.tickFormat?e.tickFormat.apply(e,n):Eg:i,p=Math.max(o,0)+s,g=e.range(),v=+g[0]+.5,m=+g[g.length-1]+.5,y=(e.bandwidth?Pg:Ag)(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"),O=x.select("line"),E=x.select("text");b=b.merge(b.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),x=x.merge(T),O=O.merge(T.append("line").attr("stroke","currentColor").attr(l+"2",u*o)),E=E.merge(T.append("text").attr("fill","currentColor").attr(l,u*p).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),h!==_&&(b=b.transition(h),x=x.transition(h),O=O.transition(h),E=E.transition(h),w=w.transition(h).attr("opacity",1e-6).attr("transform",(function(t){return isFinite(t=y(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:y(t))}))),w.remove(),b.attr("d",4===t||2==t?a?"M"+u*a+","+v+"H0.5V"+m+"H"+u*a:"M0.5,"+v+"V"+m:a?"M"+v+","+u*a+"V0.5H"+m+"V"+u*a:"M"+v+",0.5H"+m),x.attr("opacity",1).attr("transform",(function(t){return c(y(t))})),O.attr(l+"2",u*o),E.attr(l,u*p).text(d),_.filter(Cg).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=y}))}return h.scale=function(t){return arguments.length?(e=t,h):e},h.ticks=function(){return n=Og.call(arguments),h},h.tickArguments=function(t){return arguments.length?(n=null==t?[]:Og.call(t),h):n.slice()},h.tickValues=function(t){return arguments.length?(r=null==t?null:Og.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 Dg(t){return kg(1,t)}function Lg(t){return kg(2,t)}function Rg(t){return kg(3,t)}function Ig(t){return kg(4,t)}var jg=function(t){function e(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 n(e,t),e.prototype.render=function(t){void 0===t&&(t=!0);var e,n,i=this.configs.position,o=this.model.getOptions(),a=Nr.getProperty(o,"axes",i),s=Nr.getProperty(a,"ticks","number"),u=null!==s,l=i===y.LEFT||i===y.RIGHT,c=Nr.getProperty(o,"timeScale"),h=this.getContainerSVG(),f=Yh.getSVGElementSize(this.parent,{useAttrs:!0}),d=f.width,p=f.height;i===y.BOTTOM||i===y.TOP?(e=this.configs.axes[y.LEFT]?this.margins.left:0,n=this.configs.axes[y.RIGHT]?d-this.margins.right:d):(e=p-this.margins.bottom,n=this.margins.top);var g,v=this.services.cartesianScales.getScaleByPosition(i);switch(this.scaleType===b.LABELS?v.rangeRound([e,n]):v.range([e,n]),i){case y.LEFT:g=Ig;break;case y.BOTTOM:g=Rg;break;case y.RIGHT:g=Lg;break;case y.TOP:g=Dg}var m=Yh.appendOrSelect(h,"g.axis."+i),_=!m.select("g.ticks").empty(),x=Yh.appendOrSelect(m,"g.ticks");_||x.attr("role",r.GRAPHICS_OBJECT+" "+r.GROUP);var w=Yh.appendOrSelect(m,"g.ticks.invisible").style("opacity","0").attr("aria-hidden",!0),T=Yh.appendOrSelect(w,"g.tick"),O=Yh.appendOrSelect(T,"text").text("0"),E=Yh.getSVGElementSize(O.node(),{useBBox:!0}).height;T.remove();var M,S=this.scaleType===b.TIME||a.scaleType===b.TIME,A=this.scaleType||a.scaleType||b.LINEAR,P=g(v).tickSizeOuter(0);if(v.ticks){var C=void 0;if(u?C=s:(C=_i.ticks.number,l&&(C=this.getNumberOfFittingTicks(p,E,2.5))),1===v.ticks().length&&0===v.ticks()[0]&&(C=0),P.ticks(C),S)if(v.ticks(C).length){var k=v.nice(C).ticks(C);Nr.getProperty(o,"timeScale","addSpaceOnEdges")&&k.length>2&&(k.splice(k.length-1,1),k.splice(0,1)),P.tickValues(k)}else P.tickValues([])}var D=Nr.getProperty(a,"ticks","formatter");if(S){var L=Vp(P.tickValues());M=null===D?function(t,e){return Up(t,e,L,c)}:function(t,e){var n=Up(t,e,L,c);return D(t,e,n)}}else null===D?A===b.LINEAR&&(M=function(t){return t.toLocaleString()}):M=D;switch(P.tickFormat(M),i){case y.LEFT:x.attr("transform","translate("+this.margins.left+", 0)");break;case y.BOTTOM:x.attr("transform","translate(0, "+(p-this.margins.bottom)+")");break;case y.RIGHT:x.attr("transform","translate("+(d-this.margins.right)+", 0)");break;case y.TOP:x.attr("transform","translate(0, "+this.margins.top+")")}if(a.title){var R=Yh.appendOrSelect(m,"text.axis-title").html(this.model.isDataEmpty()?"":a.title);switch(i){case y.LEFT:R.attr("transform","rotate(-90)").attr("y",0).attr("x",-v.range()[0]/2).attr("dy","1em").style("text-anchor","middle");break;case y.BOTTOM:R.attr("transform","translate("+(this.margins.left/2+v.range()[1]/2)+", "+p+")").style("text-anchor","middle");break;case y.RIGHT:R.attr("transform","rotate(90)").attr("y",-d).attr("x",v.range()[0]/2).attr("dy","1em").style("text-anchor","middle");break;case y.TOP:var I=Yh.getSVGElementSize(R,{useBBox:!0}).height;R.attr("transform","translate("+(this.margins.left/2+v.range()[1]/2)+", "+I/2+")").style("text-anchor","middle")}}if(S){var j=Vp(P.tickValues()),N=c.showDayName,U=x;t&&(x=x.transition(this.services.transitions.getTransition("axis-update",t))),x=x.call(P),U.selectAll(".tick").data(P.tickValues(),v).order().select("text").style("font-weight",(function(t,e){return Np(t,e,j,N)?"bold":"normal"}))}else x=t&&_?x.transition(this.services.transitions.getTransition("axis-update")).call(P):x.call(P);if(w.call(P),i===y.BOTTOM||i===y.TOP){var H=!1;if(v.step){H=w.selectAll("g.tick text").nodes().some((function(t){return Yh.getSVGElementSize(t,{useBBox:!0}).width>=v.step()}))}else{var V=Nr.getProperty(a,"ticks","rotateIfSmallerThan")||_i.ticks.rotateIfSmallerThan;H=d/(S?P.tickValues().length:v.ticks().length)/2<V}H?(u||(P.ticks(this.getNumberOfFittingTicks(d,E,3.5)),w.call(P),x.call(P)),m.selectAll("g.ticks g.tick text").attr("transform","rotate(45)").style("text-anchor",i===y.TOP?"end":"start")):m.selectAll("g.ticks g.tick text").attr("transform",null).style("text-anchor",null)}this.model.isDataEmpty()&&m.attr("opacity",0),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this.getContainerSVG(),e=this.configs.position,n=Yh.appendOrSelect(t,"g.axis."+e),r=this;n.selectAll("g.tick text").on("mouseover",(function(t){r.services.events.dispatchEvent(k.Axis.LABEL_MOUSEOVER,{element:bh(this),datum:t})})).on("mousemove",(function(t){r.services.events.dispatchEvent(k.Axis.LABEL_MOUSEMOVE,{element:bh(this),datum:t})})).on("click",(function(t){r.services.events.dispatchEvent(k.Axis.LABEL_CLICK,{element:bh(this),datum:t})})).on("mouseout",(function(t){r.services.events.dispatchEvent(k.Axis.LABEL_MOUSEOUT,{element:bh(this),datum:t})}))},e.prototype.getInvisibleAxisRef=function(){var t=this.configs.position;return this.getContainerSVG().select("g.axis."+t+" g.ticks.invisible")},e.prototype.getTitleRef=function(){var t=this.configs.position;return this.getContainerSVG().select("g.axis."+t+" text.axis-title")},e.prototype.getNumberOfFittingTicks=function(t,e,n){var r=Math.floor(t/(e*n));return Nr.clamp(r,2,_i.ticks.number)},e.prototype.destroy=function(){var t=this.getContainerSVG(),e=this.configs.position;Yh.appendOrSelect(t,"g.axis."+e).selectAll("g.tick text").on("mouseover",null).on("mousemove",null).on("mouseout",null)},e}(kp),Ng=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="2D-axes",e.children={},e.thresholds=[],e.margins={top:0,right:0,bottom:0,left:0},e}return n(e,t),e.prototype.render=function(t){var e=this;void 0===t&&(t=!1);var n={},r=Object.keys(y),i=Nr.getProperty(this.model.getOptions(),"axes");r.forEach((function(t){i[y[t]]&&(n[y[t]]=!0)})),this.configs.axes=n,r.forEach((function(t){var n=y[t];if(e.configs.axes[n]&&!e.children[n]){var r=new jg(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(n){var r,i=e.children[n],a=i.configs.position,s=i.getInvisibleAxisRef(),u=Yh.getSVGElementSize(s,{useBBox:!0}),l=u.width,c=u.height;switch(r=i.getTitleRef().empty()?0:Yh.getSVGElementSize(i.getTitleRef(),{useBBox:!0}).height,a){case y.TOP:o.top=c+r;break;case y.BOTTOM:o.bottom=c+r;break;case y.LEFT:o.left=l+r;break;case y.RIGHT:o.right=l+r}e.addAxisThresholds(t,a)})),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.prototype.addAxisThresholds=function(t,e){var n=this,r=Nr.getProperty(this.model.getOptions(),"axes",e).thresholds;r&&(r.forEach((function(t,r){var i=new zp(n.model,n.services,g(g({},t),{axisPosition:e,index:r}));n.thresholds.push(i)})),this.thresholds.forEach((function(e){e.setParent(n.parent),e.render(t)})))},e}(kp),Ug=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grid",e}return n(e,t),e.prototype.render=function(t){void 0===t&&(t=!0),this.drawBackdrop(),Yh.appendOrSelect(this.backdrop,"g.x.grid"),Yh.appendOrSelect(this.backdrop,"g.y.grid"),this.drawXGrid(t),this.drawYGrid(t)},e.prototype.drawXGrid=function(t){var e=this.parent,n=this.backdrop.attr("height"),r=Rg(this.services.cartesianScales.getMainXScale()).tickSizeInner(-n).tickSizeOuter(0),i=Nr.getProperty(this.model.getOptions(),"grid","x","numberOfTicks");r.ticks(i);var o=e.select(".x.grid").attr("transform","translate("+-this.backdrop.attr("x")+", "+n+")");if(t){var a=this.services.transitions.getTransition("grid-update");o.transition(a).call(r)}else o.call(r);this.cleanGrid(o)},e.prototype.drawYGrid=function(t){var e=this.parent,n=this.backdrop.attr("width"),r=Ig(this.services.cartesianScales.getMainYScale()).tickSizeInner(-n).tickSizeOuter(0),i=Nr.getProperty(this.model.getOptions(),"grid","y","numberOfTicks");r.ticks(i);var o=e.select(".y.grid").attr("transform","translate(0, "+-this.backdrop.attr("y")+")");if(t){var a=this.services.transitions.getTransition("grid-update");o.transition(a).call(r)}else o.call(r);this.cleanGrid(o)},e.prototype.getGridlineThreshold=function(t){var e,n=this.parent,r=n.selectAll(".x.grid .tick").nodes().sort((function(t,e){return Number(Nr.getTranslationValues(t).tx)-Number(Nr.getTranslationValues(e).tx)})),i=-1;if(r.length){r.forEach((function(e,n){t[0]>=+Nr.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=+Nr.getTranslationValues(s).tx-+Nr.getTranslationValues(a).tx;else{var u=n.select("rect.chart-grid-backdrop").node();o=Yh.getSVGElementSize(u).width-+Nr.getTranslationValues(a).tx}else o=+Nr.getTranslationValues(s).tx;return o*this.model.getOptions().tooltip.gridline.threshold}},e.prototype.getActiveGridline=function(t){var e=Nr.getProperty(this.model.getOptions,"tooltip","gridline","threshold"),n=e||this.getGridlineThreshold(t);return this.parent.selectAll(".x.grid .tick").filter((function(){var e=Nr.getTranslationValues(this),r=Number(e.tx)-n,i=Number(e.tx)+n;return r<=t[0]&&t[0]<=i}))},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=Yh.appendOrSelect(t,"svg.chart-grid-backdrop");var l=Yh.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}(kp);var Hg,Vg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="ruler",e}return n(e,t),e.prototype.render=function(){this.drawBackdrop(),this.addBackdropEventListeners()},e.prototype.showRuler=function(t){var e=this,n=t[0],r=t[1],i=this.parent,o=this.services.cartesianScales.getOrientation(),a=o===_.HORIZONTAL?r:n,s=Yh.appendOrSelect(i,"g.ruler"),u=Yh.appendOrSelect(s,"line.ruler-line"),l=i.selectAll("[role=graphics-symbol]"),c=this.model.getDisplayData(),h=this.services.cartesianScales.getRangeScale().range(),f=h[0],d=h[1],p=c.map((function(t){return{domainValue:e.services.cartesianScales.getDomainValue(t),originalData:t}})).filter((function(t){return function(t,e){return t>e-5&&t<e+5}(t.domainValue,a)})).reduce((function(t,e){if(0===t.length)return t.push(e),t;var n=t[0].domainValue,r=Math.abs(a-e.domainValue),i=Math.abs(a-n);return r>i?t:(r<i?t=[e]:t.push(e),t)}),[]);if(p.length>0){var g=this.services.cartesianScales.getRangeIdentifier(),v=p.map((function(t){return t.originalData})).filter((function(t){var e=t[g];return null!=e})),m=p.map((function(t){return t.domainValue})),y=l.filter((function(t){var n=e.services.cartesianScales.getDomainValue(t);return m.includes(n)}));this.elementsToHighlight&&this.elementsToHighlight.size()>0&&!Nr.isEqual(this.elementsToHighlight,y)&&this.hideRuler(),y.dispatch("mouseover"),this.elementsToHighlight=y,this.services.events.dispatchEvent("show-tooltip",{hoveredElement:u,multidata:v,type:w.GRIDLINE}),s.attr("opacity",1);var b=p[0];"horizontal"===o?u.attr("x1",d).attr("x2",f).attr("y1",b.domainValue).attr("y2",b.domainValue):u.attr("y1",d).attr("y2",f).attr("x1",b.domainValue).attr("x2",b.domainValue)}else this.hideRuler()},e.prototype.hideRuler=function(){var t=this.parent,e=Yh.appendOrSelect(t,"g.ruler");t.selectAll("[role=graphics-symbol]").dispatch("mouseout"),this.services.events.dispatchEvent("hide-tooltip"),e.attr("opacity",0)},e.prototype.addBackdropEventListeners=function(){var t=this;this.backdrop.on("mousemove mouseover",(function(){var e=wh(t.parent.node());t.showRuler(e)})).on("mouseout",(function(){t.hideRuler()}))},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=Yh.appendOrSelect(t,"svg.chart-grid-backdrop");var l=Yh.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}(kp),Gg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="zero-line",e}return n(e,t),e.prototype.render=function(t){var e=this.services.cartesianScales.getRangeScale().domain(),n=e[0],r=e[1];if(n>0&&r<0||n<0&&r>0){var i=this.getContainerSVG(),o=this.services.cartesianScales.getDomainScale().range(),a=o[0],s=o[1],u=+this.services.cartesianScales.getRangeValue(0)+.5;if(!u){var l=this.services.cartesianScales.getRangeAxisPosition();u=this.services.cartesianScales.getScaleByPosition(l).range()[0]}var c=Nr.flipSVGCoordinatesBasedOnOrientation({x0:a,x1:s,y0:u,y1:u},this.services.cartesianScales.getOrientation());Yh.appendOrSelect(i,"line.domain").transition(this.services.transitions.getTransition("zero-line-update",t)).attr("y1",c.y0).attr("y2",c.y1).attr("x1",c.x0).attr("x2",c.x1)}},e}(kp),Bg=function(){function t(t,e){this.services={domUtils:Yh,events:qh,transitions:od},this.model=new lc(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(k.Model.UPDATE,(function(){n.update(!0)})),this.model.setData(e.data),this.services.events.addEventListener(k.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(k.Chart.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 Wp(this.model,this.services)],growth:{x:M.PREFERRED,y:M.FIXED}},n={id:"legend",components:[new Dp(this.model,this.services)],growth:{x:M.PREFERRED,y:M.FIXED}},r={id:"graph-frame",components:t,growth:{x:M.STRETCH,y:M.FIXED}},i=!1!==this.model.getOptions().legend.enabled,o=E.COLUMN;if(i){var a=Nr.getProperty(this.model.getOptions(),"legend","position");"left"===a?(o=E.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=O.VERTICAL)):"right"===a?(o=E.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=O.VERTICAL)):"bottom"===a&&(o=E.COLUMN_REVERSE)}var s={id:"spacer",components:[new ug(this.model,this.services)],growth:{x:M.PREFERRED,y:M.FIXED}},u={id:"full-frame",components:[new Tg(this.model,this.services,v(i?[n]:[],[s,r]),{direction:o})],growth:{x:M.STRETCH,y:M.FIXED}},l=[];if(this.model.getOptions().title){l.push(e);var c={id:"spacer",components:[new ug(this.model,this.services)],growth:{x:M.PREFERRED,y:M.FIXED}};l.push(c)}return l.push(u),[new Tg(this.model,this.services,l,{direction:E.COLUMN})]},t}(),Fg=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.services=Object.assign(r.services,{cartesianScales:Sp,curves:Cp}),r}return n(e,t),e.prototype.getAxisChartComponents=function(t){var e={id:"title",components:[new Wp(this.model,this.services)],growth:{x:M.PREFERRED,y:M.FIXED}},n={id:"legend",components:[new Dp(this.model,this.services)],growth:{x:M.PREFERRED,y:M.FIXED}},r={id:"graph-frame",components:t,growth:{x:M.STRETCH,y:M.FIXED}},i=!1!==this.model.getOptions().legend.enabled,o=E.COLUMN;if(i){var a=Nr.getProperty(this.model.getOptions(),"legend","position");a===T.LEFT?(o=E.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=O.VERTICAL)):a===T.RIGHT?(o=E.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=O.VERTICAL)):a===T.BOTTOM&&(o=E.COLUMN_REVERSE)}var s={id:"spacer",components:[new ug(this.model,this.services)],growth:{x:M.PREFERRED,y:M.FIXED}},u={id:"full-frame",components:[new Tg(this.model,this.services,v(i?[n]:[],[s,r]),{direction:o})],growth:{x:M.STRETCH,y:M.FIXED}},l=[];if(this.model.getOptions().title){l.push(e);var c={id:"spacer",components:[new ug(this.model,this.services)],growth:{x:M.PREFERRED,y:M.FIXED}};l.push(c)}return l.push(u),[new Tg(this.model,this.services,l,{direction:E.COLUMN})]},e}(Bg),zg=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Nr.mergeDefaultChartOptions(vi.simpleBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Ng(this.model,this.services),new Ug(this.model,this.services),new Kp(this.model,this.services),new Gg(this.model,this.services),new sg(this.model,this.services,{skeleton:A.VERT_OR_HORIZ})],e=this.getAxisChartComponents(t);return e.push(new qp(this.model,this.services)),e},e}(Fg),Wg=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Nr.mergeDefaultChartOptions(vi.groupedBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Ng(this.model,this.services),new Ug(this.model,this.services),new Jp(this.model,this.services),new Gg(this.model,this.services),new sg(this.model,this.services,{skeleton:A.VERT_OR_HORIZ})],e=this.getAxisChartComponents(t);return e.push(new qp(this.model,this.services)),e},e}(Fg),Yg=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Nr.mergeDefaultChartOptions(vi.stackedBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Ng(this.model,this.services),new Ug(this.model,this.services),new tg(this.model,this.services),new sg(this.model,this.services,{skeleton:A.VERT_OR_HORIZ})],e=this.getAxisChartComponents(t);return e.push(new qp(this.model,this.services)),e},e}(Fg),qg=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Nr.mergeDefaultChartOptions(vi.bubbleChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Ng(this.model,this.services),new Ug(this.model,this.services),new Vg(this.model,this.services),new ng(this.model,this.services),new sg(this.model,this.services,{skeleton:A.GRID})],e=this.getAxisChartComponents(t);return e.push(new $p(this.model,this.services)),e},e}(Fg),Xg=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Nr.mergeDefaultChartOptions(vi.lineChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Ng(this.model,this.services),new Ug(this.model,this.services),new Vg(this.model,this.services),new rg(this.model,this.services),new eg(this.model,this.services,{handleThresholds:!0}),new sg(this.model,this.services,{skeleton:A.GRID})],e=this.getAxisChartComponents(t);return e.push(new $p(this.model,this.services)),e},e}(Fg),$g=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Nr.mergeDefaultChartOptions(vi.scatterChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Ng(this.model,this.services),new Ug(this.model,this.services),new Vg(this.model,this.services),new eg(this.model,this.services),new sg(this.model,this.services,{skeleton:A.GRID})],e=this.getAxisChartComponents(t);return e.push(new $p(this.model,this.services)),e},e}(Fg),Zg=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getTabularData=function(e){var n=t.prototype.getTabularData.call(this,e);return e!==n&&n.forEach((function(t){t.key&&t.key!==t.group&&(t.group=t.key)})),n},e.prototype.sanitize=function(t){return this.getTabularData(t).sort((function(t,e){return e.value-t.value}))},e}(lc),Qg=function(t){function e(e,n,r){void 0===r&&(r=!1);var i=t.call(this,e,n)||this;return i.model=new Zg(i.services),r?i:(i.model.setOptions(Nr.mergeDefaultChartOptions(vi.pieChart,n.options)),i.init(e,n),i)}return n(e,t),e.prototype.getComponents=function(){var t=[new og(this.model,this.services),new sg(this.model,this.services,{skeleton:A.PIE})],e=this.getChartComponents(t);return e.push(new Xp(this.model,this.services)),e},e}(Bg),Kg=function(t){function e(e,n){var r=t.call(this,e,n,!0)||this;return r.model.setOptions(Nr.mergeDefaultChartOptions(vi.donutChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new ag(this.model,this.services),new sg(this.model,this.services,{skeleton:A.DONUT})],e=this.getChartComponents(t);return e.push(new Xp(this.model,this.services)),e},e}(Qg);function Jg(t){var e,n=(ev(t)%(e=360)+e)%e;return tv(n,[0,10])||tv(n,[350,0])?{textAnchor:P.START,dominantBaseline:C.MIDDLE}:tv(n,[10,80])?{textAnchor:P.START,dominantBaseline:C.HANGING}:tv(n,[80,100])?{textAnchor:P.MIDDLE,dominantBaseline:C.HANGING}:tv(n,[100,170])?{textAnchor:P.END,dominantBaseline:C.HANGING}:tv(n,[170,190])?{textAnchor:P.END,dominantBaseline:C.MIDDLE}:tv(n,[190,260])?{textAnchor:P.END,dominantBaseline:C.BASELINE}:tv(n,[260,280])?{textAnchor:P.MIDDLE,dominantBaseline:C.BASELINE}:{textAnchor:P.START,dominantBaseline:C.BASELINE}}function tv(t,e){var n=e[0],r=e[1];return t>=n&&t<=r}function ev(t){return t*(180/Math.PI)}function nv(t,e,n){return void 0===n&&(n={x:0,y:0}),{x:e*Math.cos(t)+n.x,y:e*Math.sin(t)+n.y}}var rv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="radar",e.getLabelDimensions=function(t){var n=Yh.appendOrSelect(e.svg,"g.tmp-tick"),r=Yh.appendOrSelect(n,"text").text(t),i=Yh.getSVGElementSize(r.node(),{useBBox:!0}),o=i.width,a=i.height;return n.remove(),{width:o,height:a}},e.normalizeFlatData=function(t){var n=e.model.getOptions(),r=Nr.getProperty(n,"radar","axes"),i=r.angle,o=r.value,a=Nr.getProperty(n,"data","groupMapsTo"),s=Nr.flatMapDeep(e.uniqueKeys.map((function(t){return e.uniqueGroups.map((function(e){var n;return(n={})[i]=t,n[a]=e,n[o]=null,n}))})));return Nr.merge(s,t)},e.normalizeGroupedData=function(t){var n=e.model.getOptions(),r=Nr.getProperty(n,"radar","axes"),i=r.angle,o=r.value,a=Nr.getProperty(n,"data","groupMapsTo");return t.map((function(t){var n=t.name,r=t.data,s=e.uniqueKeys.map((function(t){var e;return(e={})[a]=n,e[i]=t,e[o]=null,e}));return{name:n,data:Nr.merge(s,r)}}))},e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=Nr.getProperty(e.model.getOptions(),"radar","opacity");e.parent.selectAll("g.blobs path").transition(e.services.transitions.getTransition("legend-hover-blob")).style("fill-opacity",(function(t){return t.name!==n.datum().name?Nr.getProperty(r,"unselected"):Nr.getProperty(r,"selected")}))},e.handleLegendMouseOut=function(t){var n=Nr.getProperty(e.model.getOptions(),"radar","opacity");e.parent.selectAll("g.blobs path").transition(e.services.transitions.getTransition("legend-mouseout-blob")).style("fill-opacity",Nr.getProperty(n,"selected"))},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(k.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(k.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0),this.svg=this.getContainerSVG();var n=Yh.getSVGElementSize(this.parent,{useAttrs:!0}),i=n.width,o=n.height,a=this.model.getData(),s=this.model.getDisplayData(),u=this.model.getGroupedData(),l=this.model.getOptions(),c=Nr.getProperty(l,"radar","axes"),h=c.angle,f=c.value,d=Nr.getProperty(l,"data","groupMapsTo"),p=Nr.getProperty(l,"radar"),g=p.xLabelPadding,v=p.yLabelPadding,m=p.yTicksNumber,y=p.minRange,_=p.xAxisRectHeight,b=p.opacity;this.uniqueKeys=Array.from(new Set(a.map((function(t){return t[h]})))),this.uniqueGroups=Array.from(new Set(a.map((function(t){return t[d]})))),this.displayDataNormalized=this.normalizeFlatData(s),this.groupedDataNormalized=this.normalizeGroupedData(u);var x=2*(this.getLabelDimensions(this.uniqueKeys[0]).height+v),w=(Math.min(i,o)-x)/2;if(!(w<=0)){var T=fo().domain(this.displayDataNormalized.map((function(t){return t[h]}))).range([0,2*Math.PI].map((function(t){return t-Math.PI/2}))),O=Va().domain([0,eo(this.displayDataNormalized.map((function(t){return t[f]})))]).range([y,w]).nice(m),E=O.ticks(m),M=function(t){return e.model.getFillColor(t)},S=vl().angle((function(t){return T(t[h])+Math.PI/2})).radius((function(t){return O(t[f])})).curve(Fl),A=vl().angle(S.angle()).radius((function(t){return Hg?Hg(t[f]):y})).curve(S.curve()),P={x:eo(this.uniqueKeys.map((function(t){var n;return e.getLabelDimensions(t).width+(n=T(t),w*Math.sin(n-Math.PI/2))})))+g,y:o/2},C=Yh.appendOrSelect(this.svg,"g.y-axes").attr("role",r.GROUP).selectAll("path").data(E,(function(t){return t})),k=function(t){return e.uniqueKeys.map((function(e){var n;return(n={})[h]=e,n[f]=t,n}))};C.join((function(n){return n.append("path").attr("role",r.GRAPHICS_SYMBOL).attr("opacity",0).attr("transform","translate("+P.x+", "+P.y+")").attr("fill","none").attr("d",(function(t){return A(k(t))})).call((function(n){return n.transition(e.services.transitions.getTransition("radar_y_axes_enter",t)).attr("opacity",1).attr("d",(function(t){return S(k(t))}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_y_axes_update",t)).attr("opacity",1).attr("transform","translate("+P.x+", "+P.y+")").attr("d",(function(t){return S(k(t))}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_y_axes_exit",t)).attr("d",(function(t){return S(k(t))})).attr("opacity",0).remove()}))})),Yh.appendOrSelect(this.svg,"g.y-labels").attr("role",r.GROUP).selectAll("text").data(qi(E)).join((function(n){return n.append("text").attr("opacity",0).text((function(t){return t})).attr("x",(function(t){return nv(-Math.PI/2,O(t),P).x+v})).attr("y",(function(t){return nv(-Math.PI/2,O(t),P).y})).style("text-anchor","start").style("dominant-baseline","middle").call((function(n){return n.transition(e.services.transitions.getTransition("radar_y_labels_enter",t)).attr("opacity",1)}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_y_labels_update",t)).text((function(t){return t})).attr("opacity",1).attr("x",(function(t){return nv(-Math.PI/2,O(t),P).x+v})).attr("y",(function(t){return nv(-Math.PI/2,O(t),P).y}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_y_labels_exit",t)).attr("opacity",0).remove()}))})),Yh.appendOrSelect(this.svg,"g.x-axes").attr("role",r.GROUP).selectAll("line").data(this.uniqueKeys,(function(t){return t})).join((function(n){return n.append("line").attr("role",r.GRAPHICS_SYMBOL).attr("opacity",0).attr("class",(function(t){return"x-axis-"+Nr.kebabCase(t)})).attr("stroke-dasharray","0").attr("x1",(function(t){return nv(T(t),0,P).x})).attr("y1",(function(t){return nv(T(t),0,P).y})).attr("x2",(function(t){return nv(T(t),0,P).x})).attr("y2",(function(t){return nv(T(t),0,P).y})).call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_axes_enter",t)).attr("opacity",1).attr("x1",(function(t){return nv(T(t),O.range()[0],P).x})).attr("y1",(function(t){return nv(T(t),O.range()[0],P).y})).attr("x2",(function(t){return nv(T(t),O.range()[1],P).x})).attr("y2",(function(t){return nv(T(t),O.range()[1],P).y}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_axes_update",t)).attr("opacity",1).attr("x1",(function(t){return nv(T(t),O.range()[0],P).x})).attr("y1",(function(t){return nv(T(t),O.range()[0],P).y})).attr("x2",(function(t){return nv(T(t),O.range()[1],P).x})).attr("y2",(function(t){return nv(T(t),O.range()[1],P).y}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_axes_exit",t)).attr("opacity",0).remove()}))})),Yh.appendOrSelect(this.svg,"g.x-labels").attr("role",r.GROUP).selectAll("text").data(this.uniqueKeys).join((function(n){return n.append("text").text((function(t){return t})).attr("opacity",0).attr("x",(function(t){return nv(T(t),O.range()[1]+g,P).x})).attr("y",(function(t){return nv(T(t),O.range()[1]+g,P).y})).style("text-anchor",(function(t){return Jg(T(t)).textAnchor})).style("dominant-baseline",(function(t){return Jg(T(t)).dominantBaseline})).call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_labels_enter",t)).attr("opacity",1)}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_labels_update",t)).attr("opacity",1).attr("x",(function(t){return nv(T(t),O.range()[1]+g,P).x})).attr("y",(function(t){return nv(T(t),O.range()[1]+g,P).y}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_labels_exit",t)).attr("opacity",0).remove()}))})),Yh.appendOrSelect(this.svg,"g.blobs").attr("role",r.GROUP).selectAll("path").data(this.groupedDataNormalized,(function(t){return t.name})).join((function(n){return n.append("path").attr("class","blob").attr("role",r.GRAPHICS_SYMBOL).attr("opacity",0).attr("transform","translate("+P.x+", "+P.y+")").attr("fill",(function(t){return M(t.name)})).style("fill-opacity",b.selected).attr("stroke",(function(t){return M(t.name)})).attr("d",(function(t){return A(t.data)})).call((function(n){return n.transition(e.services.transitions.getTransition("radar_blobs_enter",t)).attr("opacity",1).attr("d",(function(t){return S(t.data)}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_blobs_update",t)).attr("opacity",1).attr("transform","translate("+P.x+", "+P.y+")").attr("d",(function(t){return S(t.data)}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_blobs_exit",t)).attr("d",(function(t){return S(t.data)})).attr("opacity",0).remove()}))})),Yh.appendOrSelect(this.svg,"g.dots").attr("role",r.GROUP).selectAll("circle").data(this.displayDataNormalized).join((function(t){return t.append("circle").attr("role",r.GRAPHICS_SYMBOL)}),(function(t){return t}),(function(t){return t.remove()})).attr("class",(function(t){return Nr.kebabCase(t[h])})).attr("cx",(function(t){return nv(T(t[h]),O(t[f]),P).x})).attr("cy",(function(t){return nv(T(t[h]),O(t[f]),P).y})).attr("r",0).attr("opacity",0).attr("fill",(function(t){return M(t[d])})),Yh.appendOrSelect(this.svg,"g.x-axes-rect").attr("role",r.GROUP).selectAll("rect").data(this.uniqueKeys).join((function(t){return t.append("rect").attr("role",r.GRAPHICS_SYMBOL)}),(function(t){return t}),(function(t){return t.remove()})).attr("x",P.x).attr("y",P.y-_/2).attr("width",O.range()[1]).attr("height",_).attr("fill","red").style("fill-opacity",0).attr("transform",(function(t){return"rotate("+ev(T(t))+", "+P.x+", "+P.y+")"})),this.addEventListeners(),Hg=O}},e.prototype.destroy=function(){this.parent.selectAll(".x-axes-rect > rect").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(k.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(k.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.addEventListeners=function(){var t=this,e=Nr.getProperty(this.model.getOptions(),"radar"),n=e.axes.angle,r=e.dotsRadius;this.parent.selectAll(".x-axes-rect > rect").on("mouseover",(function(e){t.services.events.dispatchEvent(k.Radar.X_AXIS_MOUSEOVER,{element:bh(this),datum:e})})).on("mousemove",(function(e){var i=bh(this),o=t.parent.select(".x-axes .x-axis-"+Nr.kebabCase(e)),a=t.parent.selectAll(".dots circle."+Nr.kebabCase(e));o.classed("hovered",!0).attr("stroke-dasharray","4 4"),a.classed("hovered",!0).attr("opacity",1).attr("r",r),t.services.events.dispatchEvent(k.Radar.X_AXIS_MOUSEMOVE,{element:i,datum:e});var s=t.displayDataNormalized.filter((function(t){return t[n]===e}));t.services.events.dispatchEvent(k.Tooltip.SHOW,{hoveredElement:i,multidata:s,type:w.GRIDLINE})})).on("click",(function(e){t.services.events.dispatchEvent(k.Radar.X_AXIS_CLICK,{element:bh(this),datum:e})})).on("mouseout",(function(e){var n=bh(this),r=t.parent.select(".x-axes .x-axis-"+Nr.kebabCase(e)),i=t.parent.selectAll(".dots circle."+Nr.kebabCase(e));r.classed("hovered",!1).attr("stroke-dasharray","0"),i.classed("hovered",!1).attr("opacity",0).attr("r",0),t.services.events.dispatchEvent(k.Radar.X_AXIS_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent("hide-tooltip",{hoveredElement:n}),t.services.events.dispatchEvent(k.Tooltip.HIDE,{hoveredElement:n})}))},e}(kp),iv=function(t){function e(e,n,r){void 0===r&&(r=!1);var i=t.call(this,e,n)||this;return r?i:(i.model.setOptions(Nr.mergeDefaultChartOptions(vi.radarChart,n.options)),i.init(e,n),i)}return n(e,t),e.prototype.getComponents=function(){var t=[new rv(this.model,this.services)],e=this.getChartComponents(t);return e.push(new Zp(this.model,this.services)),e},e}(Bg),ov=Bi;t.BubbleChart=qg,t.DonutChart=Kg,t.GroupedBarChart=Wg,t.LineChart=Xg,t.PieChart=Qg,t.RadarChart=iv,t.ScatterChart=$g,t.SimpleBarChart=zg,t.StackedBarChart=Yg,t.colorPalettes=Fi,t.configurations=xi,t.defaultColors=ov,t.interfaces=D,Object.defineProperty(t,"__esModule",{value:!0})}));
|