@carbon/charts 0.41.4 → 0.41.5
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 +8 -0
- package/axis-chart.js +2 -0
- package/axis-chart.js.map +1 -1
- package/build/demo/data/area.d.ts +25 -0
- package/build/demo/data/bubble.d.ts +24 -0
- package/build/demo/data/combo.d.ts +422 -0
- package/build/demo/data/index.d.ts +6 -0
- package/build/demo/data/line.d.ts +31 -0
- package/build/demo/data/scatter.d.ts +31 -0
- package/build/src/axis-chart.d.ts +1 -1
- package/build/src/chart.d.ts +1 -1
- package/build/src/charts/bar-stacked.d.ts +2 -2
- package/build/src/charts/combo.d.ts +7 -0
- package/build/src/charts/index.d.ts +1 -0
- package/build/src/components/axes/{ruler-stacked-bar.d.ts → ruler-stacked.d.ts} +1 -1
- package/build/src/components/axes/zoom-bar.d.ts +1 -1
- package/build/src/components/component.d.ts +7 -0
- package/build/src/components/graphs/scatter.d.ts +0 -1
- package/build/src/components/index.d.ts +2 -1
- package/build/src/configuration.d.ts +2 -1
- package/build/src/interfaces/charts.d.ts +11 -2
- package/build/src/interfaces/enums.d.ts +12 -0
- package/build/src/model.d.ts +17 -10
- package/build/src/services/scales-cartesian.d.ts +27 -9
- package/build/src/tools.d.ts +2 -0
- package/bundle.js +1 -1
- package/charts/area-stacked.js +2 -2
- package/charts/area-stacked.js.map +1 -1
- package/charts/bar-stacked.d.ts +2 -2
- package/charts/bar-stacked.js +2 -2
- package/charts/bar-stacked.js.map +1 -1
- package/charts/combo.d.ts +7 -0
- package/charts/combo.js +111 -0
- package/charts/combo.js.map +1 -0
- package/charts/index.d.ts +1 -0
- package/charts/index.js +1 -0
- package/charts/index.js.map +1 -1
- package/components/axes/axis.js +7 -8
- package/components/axes/axis.js.map +1 -1
- package/components/axes/grid.js +8 -9
- package/components/axes/grid.js.map +1 -1
- package/components/axes/{ruler-stacked-bar.d.ts → ruler-stacked.d.ts} +1 -1
- package/components/axes/{ruler-stacked-bar.js → ruler-stacked.js} +8 -8
- package/components/axes/ruler-stacked.js.map +1 -0
- package/components/axes/ruler.js +5 -5
- package/components/axes/ruler.js.map +1 -1
- package/components/axes/toolbar.js +4 -4
- package/components/axes/toolbar.js.map +1 -1
- package/components/axes/two-dimensional-axes.js +2 -2
- package/components/axes/two-dimensional-axes.js.map +1 -1
- package/components/axes/zero-line.js +12 -8
- package/components/axes/zero-line.js.map +1 -1
- package/components/axes/zoom-bar.d.ts +1 -1
- package/components/axes/zoom-bar.js +7 -7
- package/components/axes/zoom-bar.js.map +1 -1
- package/components/component.d.ts +7 -0
- package/components/component.js +24 -3
- package/components/component.js.map +1 -1
- package/components/essentials/legend.js +4 -4
- package/components/essentials/legend.js.map +1 -1
- package/components/essentials/threshold.js +4 -4
- package/components/essentials/threshold.js.map +1 -1
- package/components/essentials/title-meter.js +3 -3
- package/components/essentials/title-meter.js.map +1 -1
- package/components/essentials/title.js +1 -1
- package/components/essentials/title.js.map +1 -1
- package/components/essentials/tooltip-axis.js +10 -8
- package/components/essentials/tooltip-axis.js.map +1 -1
- package/components/essentials/tooltip.js +5 -5
- package/components/essentials/tooltip.js.map +1 -1
- package/components/graphs/area-stacked.js +11 -13
- package/components/graphs/area-stacked.js.map +1 -1
- package/components/graphs/area.js +15 -12
- package/components/graphs/area.js.map +1 -1
- package/components/graphs/bar-grouped.js +29 -23
- package/components/graphs/bar-grouped.js.map +1 -1
- package/components/graphs/bar-simple.js +4 -3
- package/components/graphs/bar-simple.js.map +1 -1
- package/components/graphs/bar-stacked.js +10 -8
- package/components/graphs/bar-stacked.js.map +1 -1
- package/components/graphs/bar.js +1 -1
- package/components/graphs/bar.js.map +1 -1
- package/components/graphs/bubble.js +4 -3
- package/components/graphs/bubble.js.map +1 -1
- package/components/graphs/donut.js +2 -2
- package/components/graphs/donut.js.map +1 -1
- package/components/graphs/gauge.js +7 -7
- package/components/graphs/gauge.js.map +1 -1
- package/components/graphs/line.js +24 -21
- package/components/graphs/line.js.map +1 -1
- package/components/graphs/meter.js +1 -1
- package/components/graphs/meter.js.map +1 -1
- package/components/graphs/pie.js +3 -3
- package/components/graphs/pie.js.map +1 -1
- package/components/graphs/radar.js +5 -5
- package/components/graphs/radar.js.map +1 -1
- package/components/graphs/scatter-stacked.js +14 -11
- package/components/graphs/scatter-stacked.js.map +1 -1
- package/components/graphs/scatter.d.ts +0 -1
- package/components/graphs/scatter.js +27 -32
- package/components/graphs/scatter.js.map +1 -1
- package/components/graphs/skeleton-lines.js +5 -5
- package/components/graphs/skeleton-lines.js.map +1 -1
- package/components/graphs/skeleton.js +4 -4
- package/components/graphs/skeleton.js.map +1 -1
- package/components/index.d.ts +2 -1
- package/components/index.js +2 -1
- package/components/index.js.map +1 -1
- package/configuration.d.ts +2 -1
- package/configuration.js +6 -2
- package/configuration.js.map +1 -1
- package/demo/data/area.d.ts +25 -0
- package/demo/data/area.js +41 -4
- package/demo/data/area.js.map +1 -1
- package/demo/data/bubble.d.ts +24 -0
- package/demo/data/bubble.js +39 -0
- package/demo/data/bubble.js.map +1 -1
- package/demo/data/bundle.js +1 -1
- package/demo/data/combo.d.ts +422 -0
- package/demo/data/combo.js +545 -0
- package/demo/data/combo.js.map +1 -0
- package/demo/data/index.d.ts +6 -0
- package/demo/data/index.js +102 -0
- package/demo/data/index.js.map +1 -1
- package/demo/data/line.d.ts +31 -0
- package/demo/data/line.js +38 -0
- package/demo/data/line.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/zoom-bar.js.map +1 -1
- package/demo/tsconfig.tsbuildinfo +35 -21
- package/interfaces/charts.d.ts +11 -2
- package/interfaces/charts.js +1 -0
- package/interfaces/charts.js.map +1 -1
- package/interfaces/enums.d.ts +12 -0
- package/interfaces/enums.js +13 -0
- package/interfaces/enums.js.map +1 -1
- package/model.d.ts +17 -10
- package/model.js +60 -31
- package/model.js.map +1 -1
- package/package.json +1 -1
- package/services/essentials/dom-utils.js +19 -3
- package/services/essentials/dom-utils.js.map +1 -1
- package/services/scales-cartesian.d.ts +27 -9
- package/services/scales-cartesian.js +130 -52
- package/services/scales-cartesian.js.map +1 -1
- package/tools.d.ts +2 -0
- package/tools.js +4 -2
- package/tools.js.map +1 -1
- package/tsconfig.tsbuildinfo +125 -100
- package/components/axes/ruler-stacked-bar.js.map +0 -1
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=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,a,o,s,u,l,c,h,f,d,p,g,v,m,y,_,b,x=function(){return(x=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 w(){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 a=arguments[e],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r}!function(t){t.GRAPHICS_DOCUMENT="graphics-document",t.GRAPHICS_OBJECT="graphics-object",t.GRAPHICS_SYMBOL="graphics-symbol",t.GROUP="group",t.DOCUMENT="document",t.CHECKBOX="checkbox",t.BUTTON="button",t.MENU="menu",t.MENU_ITEM="menuitem",t.IMG="img"}(r||(r={})),function(t){t.RENDER_FINISHED="render-finished",t.RESIZE="chart-resize",t.MOUSEOVER="chart-mouseover",t.MOUSEOUT="chart-mouseout"}(i||(i={})),function(t){t.UPDATE="model-update"}(a||(a={})),function(t){t.SHOW_OVERFLOW_MENU="show-toolbar-overflow-menu",t.HIDE_OVERFLOW_MENU="hide-toolbar-overflow-menu"}(o||(o={})),function(t){t.UPDATE="zoom-bar-update",t.SELECTION_START="zoom-bar-selection-start",t.SELECTION_IN_PROGRESS="zoom-bar-selection-in-progress",t.SELECTION_END="zoom-bar-selection-end"}(s||(s={})),function(t){t.CHANGE="zoom-domain-change"}(u||(u={})),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"}(l||(l={})),function(t){t.AREA_MOUSEOVER="area-mouseover",t.AREA_MOUSEMOVE="area-mousemove",t.AREA_CLICK="area-click",t.AREA_MOUSEOUT="area-mouseout"}(c||(c={})),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"}(h||(h={})),function(t){t.ARC_MOUSEOVER="gauge-arc-mouseover",t.ARC_MOUSEMOVE="gauge-arc-mousemove",t.ARC_CLICK="gauge-arc-click",t.ARC_MOUSEOUT="gauge-arc-mouseout"}(f||(f={})),function(t){t.BAR_MOUSEOVER="bar-mouseover",t.BAR_MOUSEMOVE="bar-mousemove",t.BAR_CLICK="bar-click",t.BAR_MOUSEOUT="bar-mouseout"}(d||(d={})),function(t){t.SCATTER_MOUSEOVER="scatter-mouseover",t.SCATTER_MOUSEMOVE="scatter-mousemove",t.SCATTER_CLICK="scatter-click",t.SCATTER_MOUSEOUT="scatter-mouseout"}(p||(p={})),function(t){t.POINT_MOUSEOVER="scatter-mouseover",t.POINT_MOUSEMOVE="scatter-mousemove",t.POINT_CLICK="scatter-click",t.POINT_MOUSEOUT="scatter-mouseout"}(g||(g={})),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"}(v||(v={})),function(t){t.LEAF_MOUSEOVER="leaf-mouseover",t.LEAF_MOUSEMOVE="leaf-mousemove",t.LEAF_CLICK="leaf-click",t.LEAF_MOUSEOUT="leaf-mouseout"}(m||(m={})),function(t){t.SHOW="show-tooltip",t.MOVE="move-tooltip",t.HIDE="hide-tooltip"}(y||(y={})),function(t){t.SHOW="show-threshold",t.HIDE="hide-threshold"}(_||(_={})),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"}(b||(b={}));var O,E,S,T,M,A,C,D,P,k,L,R,I,N,V,B,G,U,z,H,F,j=Object.freeze({__proto__:null,get Chart(){return i},get Model(){return a},get Toolbar(){return o},get ZoomBar(){return s},get ZoomDomain(){return u},get Axis(){return l},get Area(){return c},get Pie(){return h},get Gauge(){return f},get Bar(){return d},get Scatter(){return p},get Line(){return g},get Radar(){return v},get Treemap(){return m},get Tooltip(){return y},get Threshold(){return _},get Legend(){return b}});!function(t){t.DEFAULT="default",t.G100="g100",t.G90="g90",t.G10="g10"}(O||(O={})),function(t){t.FILL="fill",t.STROKE="stroke",t.TOOLTIP="tooltip"}(E||(E={})),function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(S||(S={})),function(t){t.GRAPH_VIEW="graph_view",t.SLIDER_VIEW="slider_view"}(T||(T={})),function(t){t.END_LINE="end_line",t.MID_LINE="mid_line",t.FRONT_LINE="front_line",t.NONE="none"}(M||(M={})),function(t){t.VERTICAL="vertical",t.HORIZONTAL="horizontal"}(A||(A={})),function(t){t.TIME="time",t.LINEAR="linear",t.LOG="log",t.LABELS="labels"}(C||(C={})),function(t){t.RIGHT="right",t.LEFT="left",t.TOP="top",t.BOTTOM="bottom"}(D||(D={})),function(t){t.LEFT="left",t.CENTER="center",t.RIGHT="right"}(P||(P={})),function(t){t.HORIZONTAL="horizontal",t.VERTICAL="vertical"}(k||(k={})),function(t){t.ROW="row",t.COLUMN="column",t.ROW_REVERSE="row-reverse",t.COLUMN_REVERSE="column-reverse"}(L||(L={})),function(t){t.FIXED="fixed",t.PREFERRED="preferred",t.STRETCH="stretch"}(R||(R={})),function(t){t.LEFT="left",t.RIGHT="right"}(I||(I={})),function(t){t.GRID="grid",t.VERT_OR_HORIZ="vertOrHoriz",t.PIE="pie",t.DONUT="donut"}(N||(N={})),function(t){t.START="start",t.MIDDLE="middle",t.END="end"}(V||(V={})),function(t){t.BASELINE="baseline",t.MIDDLE="middle",t.HANGING="hanging"}(B||(B={})),function(t){t.SEMI="semi",t.FULL="full"}(G||(G={})),function(t){t.UP="up",t.DOWN="down"}(U||(U={})),function(t){t.SUCCESS="success",t.WARNING="warning",t.DANGER="danger"}(z||(z={})),function(t){t.ALWAYS="always",t.AUTO="auto",t.NEVER="never"}(H||(H={})),function(t){t.ZOOM_IN="Zoom in",t.ZOOM_OUT="Zoom out",t.RESET_ZOOM="Reset zoom"}(F||(F={}));var W=Object.freeze({__proto__:null,get Roles(){return r},Events:j,get ChartTheme(){return O},get ColorClassNameTypes(){return E},get AxisPositions(){return S},get ZoomBarTypes(){return T},get TruncationTypes(){return M},get CartesianOrientations(){return A},get ScaleTypes(){return C},get LegendPositions(){return D},get Alignments(){return P},get LegendOrientations(){return k},get LayoutDirection(){return L},get LayoutGrowth(){return R},get CalloutDirections(){return I},get Skeletons(){return N},get TextAnchor(){return V},get DominantBaseline(){return B},get GaugeTypes(){return G},get ArrowDirections(){return U},get Statuses(){return z},get TickRotations(){return H},get ToolbarControlTypes(){return F}}),Y="object"==typeof global&&global&&global.Object===Object&&global,X="object"==typeof self&&self&&self.Object===Object&&self,q=Y||X||Function("return this")(),Z=q.Symbol,K=Object.prototype,$=K.hasOwnProperty,Q=K.toString,J=Z?Z.toStringTag:void 0;var tt=Object.prototype.toString;var et=Z?Z.toStringTag:void 0;function nt(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":et&&et in Object(t)?function(t){var e=$.call(t,J),n=t[J];try{t[J]=void 0;var r=!0}catch(t){}var i=Q.call(t);return r&&(e?t[J]=n:delete t[J]),i}(t):function(t){return tt.call(t)}(t)}function rt(t){return null!=t&&"object"==typeof t}function it(t){return"symbol"==typeof t||rt(t)&&"[object Symbol]"==nt(t)}function at(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 ot=Array.isArray,st=Z?Z.prototype:void 0,ut=st?st.toString:void 0;function lt(t){if("string"==typeof t)return t;if(ot(t))return at(t,lt)+"";if(it(t))return ut?ut.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function ct(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var ht=/^\s+|\s+$/g,ft=/^[-+]0x[0-9a-f]+$/i,dt=/^0b[01]+$/i,pt=/^0o[0-7]+$/i,gt=parseInt;function vt(t){if("number"==typeof t)return t;if(it(t))return NaN;if(ct(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=ct(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(ht,"");var n=dt.test(t);return n||pt.test(t)?gt(t.slice(2),n?2:8):ft.test(t)?NaN:+t}function mt(t){return t}function yt(t){if(!ct(t))return!1;var e=nt(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var _t,bt=q["__core-js_shared__"],xt=(_t=/[^.]+$/.exec(bt&&bt.keys&&bt.keys.IE_PROTO||""))?"Symbol(src)_1."+_t:"";var wt=Function.prototype.toString;function Ot(t){if(null!=t){try{return wt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var Et=/^\[object .+?Constructor\]$/,St=Function.prototype,Tt=Object.prototype,Mt=St.toString,At=Tt.hasOwnProperty,Ct=RegExp("^"+Mt.call(At).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Dt(t){return!(!ct(t)||(e=t,xt&&xt in e))&&(yt(t)?Ct:Et).test(Ot(t));var e}function Pt(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return Dt(n)?n:void 0}var kt=Pt(q,"WeakMap"),Lt=Object.create,Rt=function(){function t(){}return function(e){if(!ct(e))return{};if(Lt)return Lt(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function It(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 Nt(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var Vt=Date.now;var Bt=function(){try{var t=Pt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),Gt=function(t){var e=0,n=0;return function(){var r=Vt(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(Bt?function(t,e){return Bt(t,"toString",{configurable:!0,enumerable:!1,value:(n=e,function(){return n}),writable:!0});var n}:mt);function Ut(t){return t!=t}function zt(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,a=n+(r?1:-1);r?a--:++a<i;)if(e(t[a],a,t))return a;return-1}(t,Ut,n)}(t,e,0)>-1}var Ht=/^(?:0|[1-9]\d*)$/;function Ft(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&Ht.test(t))&&t>-1&&t%1==0&&t<e}function jt(t,e,n){"__proto__"==e&&Bt?Bt(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Wt(t,e){return t===e||t!=t&&e!=e}var Yt=Object.prototype.hasOwnProperty;function Xt(t,e,n){var r=t[e];Yt.call(t,e)&&Wt(r,n)&&(void 0!==n||e in t)||jt(t,e,n)}function qt(t,e,n,r){var i=!n;n||(n={});for(var a=-1,o=e.length;++a<o;){var s=e[a],u=r?r(n[s],t[s],s,n,t):void 0;void 0===u&&(u=t[s]),i?jt(n,s,u):Xt(n,s,u)}return n}var Zt=Math.max;function Kt(t,e){return Gt(function(t,e,n){return e=Zt(void 0===e?t.length-1:e,0),function(){for(var r=arguments,i=-1,a=Zt(r.length-e,0),o=Array(a);++i<a;)o[i]=r[e+i];i=-1;for(var s=Array(e+1);++i<e;)s[i]=r[i];return s[e]=n(o),It(t,this,s)}}(t,e,mt),t+"")}function $t(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function Qt(t){return null!=t&&$t(t.length)&&!yt(t)}function Jt(t,e,n){if(!ct(n))return!1;var r=typeof e;return!!("number"==r?Qt(n)&&Ft(e,n.length):"string"==r&&e in n)&&Wt(n[e],t)}var te=Object.prototype;function ee(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||te)}function ne(t){return rt(t)&&"[object Arguments]"==nt(t)}var re=Object.prototype,ie=re.hasOwnProperty,ae=re.propertyIsEnumerable,oe=ne(function(){return arguments}())?ne:function(t){return rt(t)&&ie.call(t,"callee")&&!ae.call(t,"callee")};var se="object"==typeof t&&t&&!t.nodeType&&t,ue=se&&"object"==typeof module&&module&&!module.nodeType&&module,le=ue&&ue.exports===se?q.Buffer:void 0,ce=(le?le.isBuffer:void 0)||function(){return!1},he={};function fe(t){return function(e){return t(e)}}he["[object Float32Array]"]=he["[object Float64Array]"]=he["[object Int8Array]"]=he["[object Int16Array]"]=he["[object Int32Array]"]=he["[object Uint8Array]"]=he["[object Uint8ClampedArray]"]=he["[object Uint16Array]"]=he["[object Uint32Array]"]=!0,he["[object Arguments]"]=he["[object Array]"]=he["[object ArrayBuffer]"]=he["[object Boolean]"]=he["[object DataView]"]=he["[object Date]"]=he["[object Error]"]=he["[object Function]"]=he["[object Map]"]=he["[object Number]"]=he["[object Object]"]=he["[object RegExp]"]=he["[object Set]"]=he["[object String]"]=he["[object WeakMap]"]=!1;var de="object"==typeof t&&t&&!t.nodeType&&t,pe=de&&"object"==typeof module&&module&&!module.nodeType&&module,ge=pe&&pe.exports===de&&Y.process,ve=function(){try{var t=pe&&pe.require&&pe.require("util").types;return t||ge&&ge.binding&&ge.binding("util")}catch(t){}}(),me=ve&&ve.isTypedArray,ye=me?fe(me):function(t){return rt(t)&&$t(t.length)&&!!he[nt(t)]},_e=Object.prototype.hasOwnProperty;function be(t,e){var n=ot(t),r=!n&&oe(t),i=!n&&!r&&ce(t),a=!n&&!r&&!i&&ye(t),o=n||r||i||a,s=o?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&&!_e.call(t,l)||o&&("length"==l||i&&("offset"==l||"parent"==l)||a&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Ft(l,u))||s.push(l);return s}function xe(t,e){return function(n){return t(e(n))}}var we=xe(Object.keys,Object),Oe=Object.prototype.hasOwnProperty;function Ee(t){if(!ee(t))return we(t);var e=[];for(var n in Object(t))Oe.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Se(t){return Qt(t)?be(t):Ee(t)}var Te=Object.prototype.hasOwnProperty;function Me(t){if(!ct(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=ee(t),n=[];for(var r in t)("constructor"!=r||!e&&Te.call(t,r))&&n.push(r);return n}function Ae(t){return Qt(t)?be(t,!0):Me(t)}var Ce=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,De=/^\w*$/;function Pe(t,e){if(ot(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!it(t))||(De.test(t)||!Ce.test(t)||null!=e&&t in Object(e))}var ke=Pt(Object,"create");var Le=Object.prototype.hasOwnProperty;var Re=Object.prototype.hasOwnProperty;function Ie(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 Ne(t,e){for(var n=t.length;n--;)if(Wt(t[n][0],e))return n;return-1}Ie.prototype.clear=function(){this.__data__=ke?ke(null):{},this.size=0},Ie.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Ie.prototype.get=function(t){var e=this.__data__;if(ke){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return Le.call(e,t)?e[t]:void 0},Ie.prototype.has=function(t){var e=this.__data__;return ke?void 0!==e[t]:Re.call(e,t)},Ie.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=ke&&void 0===e?"__lodash_hash_undefined__":e,this};var Ve=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=Ne(e,t);return!(n<0)&&(n==e.length-1?e.pop():Ve.call(e,n,1),--this.size,!0)},Be.prototype.get=function(t){var e=this.__data__,n=Ne(e,t);return n<0?void 0:e[n][1]},Be.prototype.has=function(t){return Ne(this.__data__,t)>-1},Be.prototype.set=function(t,e){var n=this.__data__,r=Ne(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var Ge=Pt(q,"Map");function Ue(t,e){var n=t.__data__;return function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}(e)?n["string"==typeof e?"string":"hash"]:n.map}function ze(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])}}ze.prototype.clear=function(){this.size=0,this.__data__={hash:new Ie,map:new(Ge||Be),string:new Ie}},ze.prototype.delete=function(t){var e=Ue(this,t).delete(t);return this.size-=e?1:0,e},ze.prototype.get=function(t){return Ue(this,t).get(t)},ze.prototype.has=function(t){return Ue(this,t).has(t)},ze.prototype.set=function(t,e){var n=Ue(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function He(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],a=n.cache;if(a.has(i))return a.get(i);var o=t.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(He.Cache||ze),n}He.Cache=ze;var Fe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,je=/\\(\\)?/g,We=function(t){var e=He(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(Fe,(function(t,n,r,i){e.push(r?i.replace(je,"$1"):n||t)})),e}));function Ye(t){return null==t?"":lt(t)}function Xe(t,e){return ot(t)?t:Pe(t,e)?[t]:We(Ye(t))}function qe(t){if("string"==typeof t||it(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Ze(t,e){for(var n=0,r=(e=Xe(e,t)).length;null!=t&&n<r;)t=t[qe(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 $e=Z?Z.isConcatSpreadable:void 0;function Qe(t){return ot(t)||oe(t)||!!($e&&t&&t[$e])}var Je=xe(Object.getPrototypeOf,Object),tn=Function.prototype,en=Object.prototype,nn=tn.toString,rn=en.hasOwnProperty,an=nn.call(Object);var on=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"}),sn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,un=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var ln=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var cn=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var hn="\\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",fn="["+hn+"]",dn="\\d+",pn="[\\u2700-\\u27bf]",gn="[a-z\\xdf-\\xf6\\xf8-\\xff]",vn="[^\\ud800-\\udfff"+hn+dn+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",mn="(?:\\ud83c[\\udde6-\\uddff]){2}",yn="[\\ud800-\\udbff][\\udc00-\\udfff]",_n="[A-Z\\xc0-\\xd6\\xd8-\\xde]",bn="(?:"+gn+"|"+vn+")",xn="(?:"+_n+"|"+vn+")",wn="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",On="[\\ufe0e\\ufe0f]?"+wn+("(?:\\u200d(?:"+["[^\\ud800-\\udfff]",mn,yn].join("|")+")[\\ufe0e\\ufe0f]?"+wn+")*"),En="(?:"+[pn,mn,yn].join("|")+")"+On,Sn=RegExp([_n+"?"+gn+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[fn,_n,"$"].join("|")+")",xn+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[fn,_n+bn,"$"].join("|")+")",_n+"?"+bn+"+(?:['’](?:d|ll|m|re|s|t|ve))?",_n+"+(?:['’](?: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_])",dn,En].join("|"),"g");function Tn(t,e,n){return t=Ye(t),void 0===(e=n?void 0:e)?function(t){return cn.test(t)}(t)?function(t){return t.match(Sn)||[]}(t):function(t){return t.match(ln)||[]}(t):t.match(e)||[]}var Mn=RegExp("['’]","g");function An(t,e,n){return void 0===n&&(n=e,e=void 0),void 0!==n&&(n=(n=vt(n))==n?n:0),void 0!==e&&(e=(e=vt(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}(vt(t),e,n)}function Cn(t){var e=this.__data__=new Be(t);this.size=e.size}Cn.prototype.clear=function(){this.__data__=new Be,this.size=0},Cn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Cn.prototype.get=function(t){return this.__data__.get(t)},Cn.prototype.has=function(t){return this.__data__.has(t)},Cn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Be){var r=n.__data__;if(!Ge||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new ze(r)}return n.set(t,e),this.size=n.size,this};var Dn="object"==typeof t&&t&&!t.nodeType&&t,Pn=Dn&&"object"==typeof module&&module&&!module.nodeType&&module,kn=Pn&&Pn.exports===Dn?q.Buffer:void 0,Ln=kn?kn.allocUnsafe:void 0;function Rn(t,e){if(e)return t.slice();var n=t.length,r=Ln?Ln(n):new t.constructor(n);return t.copy(r),r}function In(){return[]}var Nn=Object.prototype.propertyIsEnumerable,Vn=Object.getOwnPropertySymbols,Bn=Vn?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,a=[];++n<r;){var o=t[n];e(o,n,t)&&(a[i++]=o)}return a}(Vn(t),(function(e){return Nn.call(t,e)})))}:In;var Gn=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)Ke(e,Bn(t)),t=Je(t);return e}:In;function Un(t,e,n){var r=e(t);return ot(t)?r:Ke(r,n(t))}function zn(t){return Un(t,Se,Bn)}function Hn(t){return Un(t,Ae,Gn)}var Fn=Pt(q,"DataView"),jn=Pt(q,"Promise"),Wn=Pt(q,"Set"),Yn=Ot(Fn),Xn=Ot(Ge),qn=Ot(jn),Zn=Ot(Wn),Kn=Ot(kt),$n=nt;(Fn&&"[object DataView]"!=$n(new Fn(new ArrayBuffer(1)))||Ge&&"[object Map]"!=$n(new Ge)||jn&&"[object Promise]"!=$n(jn.resolve())||Wn&&"[object Set]"!=$n(new Wn)||kt&&"[object WeakMap]"!=$n(new kt))&&($n=function(t){var e=nt(t),n="[object Object]"==e?t.constructor:void 0,r=n?Ot(n):"";if(r)switch(r){case Yn:return"[object DataView]";case Xn:return"[object Map]";case qn:return"[object Promise]";case Zn:return"[object Set]";case Kn:return"[object WeakMap]"}return e});var Qn=$n,Jn=Object.prototype.hasOwnProperty;var tr=q.Uint8Array;function er(t){var e=new t.constructor(t.byteLength);return new tr(e).set(new tr(t)),e}var nr=/\w*$/;var rr=Z?Z.prototype:void 0,ir=rr?rr.valueOf:void 0;function ar(t,e){var n=e?er(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function or(t,e,n){var r,i,a,o=t.constructor;switch(e){case"[object ArrayBuffer]":return er(t);case"[object Boolean]":case"[object Date]":return new o(+t);case"[object DataView]":return function(t,e){var n=e?er(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 ar(t,n);case"[object Map]":return new o;case"[object Number]":case"[object String]":return new o(t);case"[object RegExp]":return(a=new(i=t).constructor(i.source,nr.exec(i))).lastIndex=i.lastIndex,a;case"[object Set]":return new o;case"[object Symbol]":return r=t,ir?Object(ir.call(r)):{}}}function sr(t){return"function"!=typeof t.constructor||ee(t)?{}:Rt(Je(t))}var ur=ve&&ve.isMap,lr=ur?fe(ur):function(t){return rt(t)&&"[object Map]"==Qn(t)};var cr=ve&&ve.isSet,hr=cr?fe(cr):function(t){return rt(t)&&"[object Set]"==Qn(t)},fr={};function dr(t,e,n,r,i,a){var o,s=1&e,u=2&e,l=4&e;if(n&&(o=i?n(t,r,i,a):n(t)),void 0!==o)return o;if(!ct(t))return t;var c=ot(t);if(c){if(o=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&Jn.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!s)return Nt(t,o)}else{var h=Qn(t),f="[object Function]"==h||"[object GeneratorFunction]"==h;if(ce(t))return Rn(t,s);if("[object Object]"==h||"[object Arguments]"==h||f&&!i){if(o=u||f?{}:sr(t),!s)return u?function(t,e){return qt(t,Gn(t),e)}(t,function(t,e){return t&&qt(e,Ae(e),t)}(o,t)):function(t,e){return qt(t,Bn(t),e)}(t,function(t,e){return t&&qt(e,Se(e),t)}(o,t))}else{if(!fr[h])return i?t:{};o=or(t,h,s)}}a||(a=new Cn);var d=a.get(t);if(d)return d;a.set(t,o),hr(t)?t.forEach((function(r){o.add(dr(r,e,n,r,t,a))})):lr(t)&&t.forEach((function(r,i){o.set(i,dr(r,e,n,i,t,a))}));var p=l?u?Hn:zn:u?keysIn:Se,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]),Xt(o,i,dr(r,e,n,i,t,a))})),o}fr["[object Arguments]"]=fr["[object Array]"]=fr["[object ArrayBuffer]"]=fr["[object DataView]"]=fr["[object Boolean]"]=fr["[object Date]"]=fr["[object Float32Array]"]=fr["[object Float64Array]"]=fr["[object Int8Array]"]=fr["[object Int16Array]"]=fr["[object Int32Array]"]=fr["[object Map]"]=fr["[object Number]"]=fr["[object Object]"]=fr["[object RegExp]"]=fr["[object Set]"]=fr["[object String]"]=fr["[object Symbol]"]=fr["[object Uint8Array]"]=fr["[object Uint8ClampedArray]"]=fr["[object Uint16Array]"]=fr["[object Uint32Array]"]=!0,fr["[object Error]"]=fr["[object Function]"]=fr["[object WeakMap]"]=!1;function pr(t){return dr(t,5)}function gr(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new ze;++e<n;)this.add(t[e])}function vr(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 mr(t,e){return t.has(e)}gr.prototype.add=gr.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},gr.prototype.has=function(t){return this.__data__.has(t)};function yr(t,e,n,r,i,a){var o=1&n,s=t.length,u=e.length;if(s!=u&&!(o&&u>s))return!1;var l=a.get(t);if(l&&a.get(e))return l==e;var c=-1,h=!0,f=2&n?new gr:void 0;for(a.set(t,e),a.set(e,t);++c<s;){var d=t[c],p=e[c];if(r)var g=o?r(p,d,c,e,t,a):r(d,p,c,t,e,a);if(void 0!==g){if(g)continue;h=!1;break}if(f){if(!vr(e,(function(t,e){if(!mr(f,e)&&(d===t||i(d,t,n,r,a)))return f.push(e)}))){h=!1;break}}else if(d!==p&&!i(d,p,n,r,a)){h=!1;break}}return a.delete(t),a.delete(e),h}function _r(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function br(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}var xr=Z?Z.prototype:void 0,wr=xr?xr.valueOf:void 0;var Or=Object.prototype.hasOwnProperty;var Er=Object.prototype.hasOwnProperty;function Sr(t,e,n,r,i,a){var o=ot(t),s=ot(e),u=o?"[object Array]":Qn(t),l=s?"[object Array]":Qn(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&&ce(t)){if(!ce(e))return!1;o=!0,c=!1}if(f&&!c)return a||(a=new Cn),o||ye(t)?yr(t,e,n,r,i,a):function(t,e,n,r,i,a,o){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||!a(new tr(t),new tr(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Wt(+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=_r;case"[object Set]":var u=1&r;if(s||(s=br),t.size!=e.size&&!u)return!1;var l=o.get(t);if(l)return l==e;r|=2,o.set(t,e);var c=yr(s(t),s(e),r,i,a,o);return o.delete(t),c;case"[object Symbol]":if(wr)return wr.call(t)==wr.call(e)}return!1}(t,e,u,n,r,i,a);if(!(1&n)){var d=c&&Er.call(t,"__wrapped__"),p=h&&Er.call(e,"__wrapped__");if(d||p){var g=d?t.value():t,v=p?e.value():e;return a||(a=new Cn),i(g,v,n,r,a)}}return!!f&&(a||(a=new Cn),function(t,e,n,r,i,a){var o=1&n,s=zn(t),u=s.length;if(u!=zn(e).length&&!o)return!1;for(var l=u;l--;){var c=s[l];if(!(o?c in e:Or.call(e,c)))return!1}var h=a.get(t);if(h&&a.get(e))return h==e;var f=!0;a.set(t,e),a.set(e,t);for(var d=o;++l<u;){var p=t[c=s[l]],g=e[c];if(r)var v=o?r(g,p,c,e,t,a):r(p,g,c,t,e,a);if(!(void 0===v?p===g||i(p,g,n,r,a):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 a.delete(t),a.delete(e),f}(t,e,n,r,i,a))}function Tr(t,e,n,r,i){return t===e||(null==t||null==e||!rt(t)&&!rt(e)?t!=t&&e!=e:Sr(t,e,n,r,Tr,i))}function Mr(t){return t==t&&!ct(t)}function Ar(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}}function Cr(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,Mr(i)]}return e}(t);return 1==e.length&&e[0][2]?Ar(e[0][0],e[0][1]):function(n){return n===t||function(t,e,n,r){var i=n.length,a=i,o=!r;if(null==t)return!a;for(t=Object(t);i--;){var s=n[i];if(o&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++i<a;){var u=(s=n[i])[0],l=t[u],c=s[1];if(o&&s[2]){if(void 0===l&&!(u in t))return!1}else{var h=new Cn;if(r)var f=r(l,c,u,t,e,h);if(!(void 0===f?Tr(c,l,3,r,h):f))return!1}}return!0}(n,t,e)}}function Dr(t,e){return null!=t&&e in Object(t)}function Pr(t,e){return null!=t&&function(t,e,n){for(var r=-1,i=(e=Xe(e,t)).length,a=!1;++r<i;){var o=qe(e[r]);if(!(a=null!=t&&n(t,o)))break;t=t[o]}return a||++r!=i?a:!!(i=null==t?0:t.length)&&$t(i)&&Ft(o,i)&&(ot(t)||oe(t))}(t,e,Dr)}function kr(t,e){return Pe(t)&&Mr(e)?Ar(qe(t),e):function(n){var r=function(t,e,n){var r=null==t?void 0:Ze(t,e);return void 0===r?n:r}(n,t);return void 0===r&&r===e?Pr(n,t):Tr(e,r,3)}}function Lr(t){return Pe(t)?(e=qe(t),function(t){return null==t?void 0:t[e]}):function(t){return function(e){return Ze(e,t)}}(t);var e}function Rr(t){return"function"==typeof t?t:null==t?mt:"object"==typeof t?ot(t)?kr(t[0],t[1]):Cr(t):Lr(t)}var Ir,Nr=function(t,e,n){for(var r=-1,i=Object(t),a=n(t),o=a.length;o--;){var s=a[Ir?o:++r];if(!1===e(i[s],s,i))break}return t};var Vr=function(t,e){return function(n,r){if(null==n)return n;if(!Qt(n))return t(n,r);for(var i=n.length,a=e?i:-1,o=Object(n);(e?a--:++a<i)&&!1!==r(o[a],a,o););return n}}((function(t,e){return t&&Nr(t,e,Se)})),Br=function(){return q.Date.now()},Gr=Math.max,Ur=Math.min;function zr(t,e,n){var r,i,a,o,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,a=i;return r=i=void 0,l=e,o=t.apply(a,n)}function p(t){return l=t,s=setTimeout(v,e),c?d(t):o}function g(t){var n=t-u;return void 0===u||n>=e||n<0||h&&t-l>=a}function v(){var t=Br();if(g(t))return m(t);s=setTimeout(v,function(t){var n=e-(t-u);return h?Ur(n,a-(t-l)):n}(t))}function m(t){return s=void 0,f&&r?d(t):(r=i=void 0,o)}function y(){var t=Br(),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)),o}return e=vt(e)||0,ct(n)&&(c=!!n.leading,a=(h="maxWait"in n)?Gr(vt(n.maxWait)||0,e):a,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?o:m(Br())},y}function Hr(t,e,n){(void 0===n||Wt(t[e],n))&&(void 0!==n||e in t)||jt(t,e,n)}function Fr(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}function jr(t,e,n,r,i,a,o){var s=Fr(t,n),u=Fr(e,n),l=o.get(u);if(l)Hr(t,n,l);else{var c,h=a?a(s,u,n+"",t,e,o):void 0,f=void 0===h;if(f){var d=ot(u),p=!d&&ce(u),g=!d&&!p&&ye(u);h=u,d||p||g?ot(s)?h=s:rt(c=s)&&Qt(c)?h=Nt(s):p?(f=!1,h=Rn(u,!0)):g?(f=!1,h=ar(u,!0)):h=[]:function(t){if(!rt(t)||"[object Object]"!=nt(t))return!1;var e=Je(t);if(null===e)return!0;var n=rn.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&nn.call(n)==an}(u)||oe(u)?(h=s,oe(s)?h=function(t){return qt(t,Ae(t))}(s):ct(s)&&!yt(s)||(h=sr(u))):f=!1}f&&(o.set(u,h),i(h,u,r,a,o),o.delete(u)),Hr(t,n,h)}}function Wr(t,e,n,r,i){t!==e&&Nr(e,(function(a,o){if(i||(i=new Cn),ct(a))jr(t,e,o,n,Wr,r,i);else{var s=r?r(Fr(t,o),a,o+"",t,e,i):void 0;void 0===s&&(s=a),Hr(t,o,s)}}),Ae)}function Yr(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 Xr(t,e){var n=-1,r=Qt(t)?Array(t.length):[];return Vr(t,(function(t,i,a){r[++n]=e(t,i,a)})),r}function qr(t,e){return function t(e,n,r,i,a){var o=-1,s=e.length;for(r||(r=Qe),a||(a=[]);++o<s;){var u=e[o];n>0&&r(u)?n>1?t(u,n-1,r,i,a):Ke(a,u):i||(a[a.length]=u)}return a}(function(t,e){return(ot(t)?at:Xr)(t,Rr(e))}(t,e),1/0)}function Zr(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r}var Kr=Object.prototype.hasOwnProperty;function $r(t){if(null==t)return!0;if(Qt(t)&&(ot(t)||"string"==typeof t||"function"==typeof t.splice||ce(t)||ye(t)||oe(t)))return!t.length;var e=Qn(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(ee(t))return!Ee(t).length;for(var n in t)if(Kr.call(t,n))return!1;return!0}function Qr(t,e){return Tr(t,e)}var Jr,ti,ei=(Jr=function(t,e,n){return t+(n?"-":"")+e.toLowerCase()},function(t){return function(t,e,n,r){var i=-1,a=null==t?0:t.length;for(r&&a&&(n=t[++i]);++i<a;)n=e(n,t[i],i,t);return n}(Tn(function(t){return(t=Ye(t))&&t.replace(sn,on).replace(un,"")}(t).replace(Mn,"")),Jr,"")}),ni=(ti=function(t,e,n){Wr(t,e,n)},Kt((function(t,e){var n=-1,r=e.length,i=r>1?e[r-1]:void 0,a=r>2?e[2]:void 0;for(i=ti.length>3&&"function"==typeof i?(r--,i):void 0,a&&Jt(e[0],e[1],a)&&(i=r<3?void 0:i,r=1),t=Object(t);++n<r;){var o=e[n];o&&ti(t,o,n,i)}return t})));function ri(t,e){var n;return Vr(t,(function(t,r,i){return!(n=e(t,r,i))})),!!n}function ii(t,e,n){var r=ot(t)?vr:ri;return n&&Jt(t,e,n)&&(e=void 0),r(t,Rr(e))}var ai=Wn&&1/br(new Wn([,-0]))[1]==1/0?function(t){return new Wn(t)}:function(){};function oi(t){return t&&t.length?function(t,e,n){var r=-1,i=zt,a=t.length,o=!0,s=[],u=s;if(n)o=!1,i=Yr;else if(a>=200){var l=e?null:ai(t);if(l)return br(l);o=!1,i=mr,u=new gr}else u=e?[]:s;t:for(;++r<a;){var c=t[r],h=e?e(c):c;if(c=n||0!==c?c:0,o&&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):[]}var si="http://www.w3.org/1999/xhtml",ui={svg:"http://www.w3.org/2000/svg",xhtml:si,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function li(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),ui.hasOwnProperty(e)?{space:ui[e],local:t}:t}function ci(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===si&&e.documentElement.namespaceURI===si?e.createElement(t):e.createElementNS(n,t)}}function hi(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function fi(t){var e=li(t);return(e.local?hi:ci)(e)}function di(){}function pi(t){return null==t?di:function(){return this.querySelector(t)}}function gi(){return[]}function vi(t){return null==t?gi:function(){return this.querySelectorAll(t)}}function mi(t){return function(){return this.matches(t)}}function yi(t){return new Array(t.length)}function _i(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}_i.prototype={constructor:_i,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 bi(t,e,n,r,i,a){for(var o,s=0,u=e.length,l=a.length;s<l;++s)(o=e[s])?(o.__data__=a[s],r[s]=o):n[s]=new _i(t,a[s]);for(;s<u;++s)(o=e[s])&&(i[s]=o)}function xi(t,e,n,r,i,a,o){var s,u,l,c={},h=e.length,f=a.length,d=new Array(h);for(s=0;s<h;++s)(u=e[s])&&(d[s]=l="$"+o.call(u,u.__data__,s,e),l in c?i[s]=u:c[l]=u);for(s=0;s<f;++s)(u=c[l="$"+o.call(t,a[s],s,a)])?(r[s]=u,u.__data__=a[s],c[l]=null):n[s]=new _i(t,a[s]);for(s=0;s<h;++s)(u=e[s])&&c[d[s]]===u&&(i[s]=u)}function wi(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Oi(t){return function(){this.removeAttribute(t)}}function Ei(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Si(t,e){return function(){this.setAttribute(t,e)}}function Ti(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Mi(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Ai(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 Ci(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Di(t){return function(){this.style.removeProperty(t)}}function Pi(t,e,n){return function(){this.style.setProperty(t,e,n)}}function ki(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Li(t,e){return t.style.getPropertyValue(e)||Ci(t).getComputedStyle(t,null).getPropertyValue(e)}function Ri(t){return function(){delete this[t]}}function Ii(t,e){return function(){this[t]=e}}function Ni(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Vi(t){return t.trim().split(/^|\s+/)}function Bi(t){return t.classList||new Gi(t)}function Gi(t){this._node=t,this._names=Vi(t.getAttribute("class")||"")}function Ui(t,e){for(var n=Bi(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function zi(t,e){for(var n=Bi(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function Hi(t){return function(){Ui(this,t)}}function Fi(t){return function(){zi(this,t)}}function ji(t,e){return function(){(e.apply(this,arguments)?Ui:zi)(this,t)}}function Wi(){this.textContent=""}function Yi(t){return function(){this.textContent=t}}function Xi(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function qi(){this.innerHTML=""}function Zi(t){return function(){this.innerHTML=t}}function Ki(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function $i(){this.nextSibling&&this.parentNode.appendChild(this)}function Qi(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Ji(){return null}function ta(){var t=this.parentNode;t&&t.removeChild(this)}function ea(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function na(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}Gi.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 ra={},ia=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(ra={mouseenter:"mouseover",mouseleave:"mouseout"}));function aa(t,e,n){return t=oa(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function oa(t,e,n){return function(r){var i=ia;ia=r;try{t.call(this,this.__data__,e,n)}finally{ia=i}}}function sa(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 ua(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r<a;++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 la(t,e,n){var r=ra.hasOwnProperty(t.type)?aa:oa;return function(i,a,o){var s,u=this.__on,l=r(e,a,o);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 ca(t,e,n){var r=Ci(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 ha(t,e){return function(){return ca(this,t,e)}}function fa(t,e){return function(){return ca(this,t,e.apply(this,arguments))}}var da,pa=[null];function ga(t,e){this._groups=t,this._parents=e}function va(){return new ga([[document.documentElement]],pa)}function ma(t){return"string"==typeof t?new ga([[document.querySelector(t)]],[document.documentElement]):new ga([[t]],pa)}function ya(){for(var t,e=ia;t=e.sourceEvent;)e=t;return e}function _a(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]}function ba(t){var e=ya();return e.changedTouches&&(e=e.changedTouches[0]),_a(t,e)}function xa(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function wa(t,e){return t(e={exports:{}},e.exports),e.exports}ga.prototype=va.prototype={constructor:ga,select:function(t){"function"!=typeof t&&(t=pi(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o,s=e[i],u=s.length,l=r[i]=new Array(u),c=0;c<u;++c)(a=s[c])&&(o=t.call(a,a.__data__,c,s))&&("__data__"in a&&(o.__data__=a.__data__),l[c]=o);return new ga(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=vi(t));for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var o,s=e[a],u=s.length,l=0;l<u;++l)(o=s[l])&&(r.push(t.call(o,o.__data__,l,s)),i.push(o));return new ga(r,i)},filter:function(t){"function"!=typeof t&&(t=mi(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,u=r[i]=[],l=0;l<s;++l)(a=o[l])&&t.call(a,a.__data__,l,o)&&u.push(a);return new ga(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?xi:bi,r=this._parents,i=this._groups;"function"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var a=i.length,o=new Array(a),s=new Array(a),u=new Array(a),l=0;l<a;++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=o[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(o=new ga(o,r))._enter=s,o._exit=u,o},enter:function(){return new ga(this._enter||this._groups.map(yi),this._parents)},exit:function(){return new ga(this._exit||this._groups.map(yi),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,a=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=e&&(i=e(i)),null==n?a.remove():n(a),r&&i?r.merge(i).order():i},merge:function(t){for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),s=0;s<a;++s)for(var u,l=e[s],c=n[s],h=l.length,f=o[s]=new Array(h),d=0;d<h;++d)(u=l[d]||c[d])&&(f[d]=u);for(;s<r;++s)o[s]=e[s];return new ga(o,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],a=i.length-1,o=i[a];--a>=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=wi);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o,s=n[a],u=s.length,l=i[a]=new Array(u),c=0;c<u;++c)(o=s[c])&&(l[c]=o);l.sort(e)}return new ga(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,a=r.length;i<a;++i){var o=r[i];if(o)return o}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,a=e[n],o=0,s=a.length;o<s;++o)(i=a[o])&&t.call(i,i.__data__,o,a);return this},attr:function(t,e){var n=li(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?Ei:Oi:"function"==typeof e?n.local?Ai:Mi:n.local?Ti:Si)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?Di:"function"==typeof e?ki:Pi)(t,e,null==n?"":n)):Li(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Ri:"function"==typeof e?Ni:Ii)(t,e)):this.node()[t]},classed:function(t,e){var n=Vi(t+"");if(arguments.length<2){for(var r=Bi(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?ji:e?Hi:Fi)(n,e))},text:function(t){return arguments.length?this.each(null==t?Wi:("function"==typeof t?Xi:Yi)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?qi:("function"==typeof t?Ki:Zi)(t)):this.node().innerHTML},raise:function(){return this.each($i)},lower:function(){return this.each(Qi)},append:function(t){var e="function"==typeof t?t:fi(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:fi(t),r=null==e?Ji:"function"==typeof e?e:pi(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(ta)},clone:function(t){return this.select(t?na:ea)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,a=sa(t+""),o=a.length;if(!(arguments.length<2)){for(s=e?la:ua,null==n&&(n=!1),r=0;r<o;++r)this.each(s(a[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<o;++r)if((i=a[r]).type===u.type&&i.name===u.name)return u.value},dispatch:function(t,e){return this.each(("function"==typeof e?fa:ha)(t,e))}},function(t){t.debounce=zr,t.clone=pr,t.merge=ni,t.removeArrayDuplicates=oi,t.clamp=An,t.isEmpty=$r,t.isEqual=Qr,t.flatMapDeep=qr,t.kebabCase=ei,t.fromPairs=Zr,t.some=ii,t.debounceWithD3MousePosition=function(t,e,n){var r=null;return function(){var i=this,a=arguments;i.mousePosition=ba(n),clearTimeout(r),r=setTimeout((function(){t.apply(i,a)}),e)}},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 a=n.axes[i];(a.primary||a.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 o=a.mapsTo;if(null==o){var s=a.scaleType;null==s?a.mapsTo="value":s===C.TIME?a.mapsTo="date":s===C.LABELS&&(a.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.truncateLabel=function(t,e,n){return n>t.length?t:e===M.MID_LINE?t.substr(0,n/2)+"..."+t.substr(-n/2):e===M.FRONT_LINE?"..."+t.substr(-n):e===M.END_LINE?t.substr(0,n)+"...":void 0},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,a=e;i<a.length;i++){var o=a[i];if(null===r[o]||void 0===r[o])return null;r=r[o]}return r}return null},t.flipSVGCoordinatesBasedOnOrientation=function(t,e){return e===A.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,a=r.x1,o=r.y0,s=r.y1;return"M"+i+","+o+"L"+i+","+s+"L"+a+","+s+"L"+a+","+o+"L"+i+","+o},t.flipDomainAndRangeBasedOnOrientation=function(t,e,n){return n===A.VERTICAL?[t,e]:[e,t]},t.compareNumeric=function(t,e){return Number(t)===Number(e)}}(da||(da={}));var Oa=wa((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}));xa(Oa);var Ea=wa((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}));xa(Ea);var Sa=wa((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,r=(n=Ea)&&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}));xa(Sa);var Ta=wa((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}));xa(Ta);var Ma=wa((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 a=t.defaultFormattingWidth||t.defaultWidth,o=i.width?String(i.width):a;r=t.formattingValues[o]||t.formattingValues[a]}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}));xa(Ma);var Aa=wa((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,r=(n=Ma)&&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}));xa(Aa);var Ca=wa((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e,n){var r=String(e),i=n||{},a=r.match(t.matchPattern);if(!a)return null;var o=a[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(o.length)}}},t.exports=e.default}));xa(Ca);var Da=wa((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e,n){var r=String(e),i=n||{},a=i.width,o=a&&t.matchPatterns[a]||t.matchPatterns[t.defaultMatchWidth],s=r.match(o);if(!s)return null;var u,l=s[0],c=a&&t.parsePatterns[a]||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}));xa(Da);var Pa=wa((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i(Ca),r=i(Da);function i(t){return t&&t.__esModule?t:{default:t}}var a={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=a,t.exports=e.default}));xa(Pa);var ka,La=xa(wa((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=s(Oa),r=s(Sa),i=s(Ta),a=s(Aa),o=s(Pa);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:a.default,match:o.default,options:{weekStartsOn:0,firstWeekContainsDate:1}};e.default=u,t.exports=e.default}))),Ra={pairingOptions:{"1-color":4,"2-color":5,"3-color":5,"4-color":3,"5-color":2,"14-color":1}},Ia={opacity:{unselected:0,selected:.4}},Na={ticks:{number:7,rotateIfSmallerThan:30,verticalSpaceRatio:2.5,horizontalSpaceRatio:3.5},paddingRatio:.1},Va={items:{status:{ACTIVE:1,DISABLED:0},horizontalSpace:12,verticalSpace:24,textYOffset:8},checkbox:{radius:6.5,spaceAfter:4}},Ba={opacity:{unselected:.3,selected:1}},Ga={statusBar:{paddingRight:5},status:{indicatorSize:16,paddingLeft:15}},Ua={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}},za={opacity:{unselected:.1,selected:.3},xLabelPadding:10,yLabelPadding:8,yTicksNumber:4,minRange:10,xAxisRectHeight:50,dotsRadius:5},Ha={default:{size:24}},Fa={horizontalOffset:10},ja={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}},Wa={buttonSize:32,iconSize:20,height:32,spacerHeight:10,iconPadding:6},Ya={height:(ka={},ka[T.GRAPH_VIEW]=32,ka[T.SLIDER_VIEW]=10,ka),spacerHeight:8,handleWidth:5,handleBarWidth:1,handleBarHeight:12},Xa={type:M.END_LINE,threshold:16,numCharacter:14},qa={x:{enabled:!0,numberOfTicks:15},y:{enabled:!0,numberOfTicks:5}},Za={enabled:!0},Ka={enabled:!0,showTotal:!0,valueFormatter:function(t){return t.toLocaleString()},truncation:Xa},$a={top:{visible:!0,includeZero:!0,truncation:Xa},bottom:{visible:!0,includeZero:!0,truncation:Xa},left:{visible:!0,includeZero:!0,truncation:Xa},right:{visible:!0,includeZero:!0,truncation:Xa}},Qa={addSpaceOnEdges:1,showDayName:!1,localeObject:La,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"}}},Ja={width:null,height:null,resizable:!0,tooltip:Ka,legend:{enabled:!0,position:D.BOTTOM,clickable:!0,truncation:Xa,alignment:P.LEFT,order:null},style:{prefix:"cc"},data:{groupMapsTo:"group",loading:!1,selectedGroups:[]},color:{scale:null,pairing:{numberOfVariants:null,option:1},gradient:{enabled:!1}}},to=da.merge({},Ja,{axes:$a,timeScale:Qa,grid:qa,ruler:Za,zoomBar:{zoomRatio:.4,minZoomRatio:.01,top:{enabled:!1,type:T.GRAPH_VIEW},updateRangeAxis:!1},toolbar:{enabled:!1,numberOfIcons:3,controls:[]}}),eo=da.merge({},to,{bars:{maxWidth:16},timeScale:da.merge(Qa,{addSpaceOnEdges:1})}),no=da.merge({},eo,{}),ro=da.merge({},eo,{}),io=da.merge({},eo,{bars:da.merge({},eo.bars,{dividerSize:1.5})}),ao=da.merge({},to,{points:{radius:4,fillOpacity:.3,filled:!0,enabled:!0}}),oo=da.merge({},ao,{points:{radius:3,filled:!1,enabled:!0}}),so=da.merge({},oo,{timeScale:da.merge(Qa,{addSpaceOnEdges:0})}),uo=so,lo=da.merge({},to,{bubble:{radiusMapsTo:"radius",radiusRange:function(t,e){var n=Math.min(t.width,t.height);return[3*n/400,25*n/400]},fillOpacity:.2,enabled:!0}}),co=da.merge({},Ja,{pie:{labels:{formatter:null},alignment:P.LEFT}}),ho=da.merge({},Ja,{legend:{enabled:!1},gauge:{type:G.SEMI,arcWidth:16,deltaArrow:{size:function(t){return t/8},enabled:!0},status:null,numberSpacing:10,deltaFontSize:function(t){return t/8},valueFontSize:function(t){return t/2.5},numberFormatter:function(t){return t.toFixed(2)%1!=0?t.toFixed(2).toLocaleString():t.toFixed().toLocaleString()},alignment:P.LEFT}}),fo={chart:Ja,axisChart:to,simpleBarChart:no,groupedBarChart:ro,stackedBarChart:io,bubbleChart:lo,lineChart:oo,areaChart:so,stackedAreaChart:uo,scatterChart:ao,pieChart:co,donutChart:da.merge({},co,{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()}},alignment:P.LEFT}}),meterChart:da.merge({},Ja,{legend:{enabled:!1},meter:{height:8,statusBar:{percentageIndicator:{enabled:!0}}}}),radarChart:da.merge({},Ja,{radar:{axes:{angle:"key",value:"value"},alignment:P.LEFT},tooltip:{gridline:{enabled:!0},valueFormatter:function(t){return null!=t?t:"N/A"}}}),gaugeChart:ho,treemapChart:da.merge({},Ja,{data:da.merge(Ja.data,{groupMapsTo:"name"})})},po=Object.freeze({__proto__:null,grid:qa,ruler:Za,baseTooltip:Ka,timeScale:Qa,options:fo,color:Ra,area:Ia,axis:Na,legend:Va,lines:Ba,meter:Ga,pie:Ua,radar:za,spacers:Ha,tooltips:Fa,transitions:ja,toolbar:Wa,zoomBar:Ya});function go(){}function vo(t,e){var n=new go;if(t instanceof go)t.each((function(t,e){n.set(e,t)}));else if(Array.isArray(t)){var r,i=-1,a=t.length;if(null==e)for(;++i<a;)n.set(i,t[i]);else for(;++i<a;)n.set(e(r=t[i],i,t),r)}else if(t)for(var o in t)n.set(o,t[o]);return n}function mo(){}go.prototype=vo.prototype={constructor:go,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 yo=vo.prototype;function _o(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function bo(t){var e;return 1===t.length&&(e=t,t=function(t,n){return _o(e(t),n)}),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)<0?r=a+1:i=a}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)>0?i=a:r=a+1}return r}}}mo.prototype=function(t,e){var n=new mo;if(t instanceof mo)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:mo,has:yo.has,add:function(t){return this["$"+(t+="")]=t,this},remove:yo.remove,clear:yo.clear,values:yo.keys,size:yo.size,empty:yo.empty,each:yo.each};var xo=bo(_o).right;function wo(t,e){var n,r,i,a=t.length,o=-1;if(null==e){for(;++o<a;)if(null!=(n=t[o])&&n>=n)for(r=i=n;++o<a;)null!=(n=t[o])&&(r>n&&(r=n),i<n&&(i=n))}else for(;++o<a;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=i=n;++o<a;)null!=(n=e(t[o],o,t))&&(r>n&&(r=n),i<n&&(i=n));return[r,i]}function Oo(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)),a=new Array(i);++r<i;)a[r]=t+r*n;return a}var Eo=Math.sqrt(50),So=Math.sqrt(10),To=Math.sqrt(2);function Mo(t,e,n){var r,i,a,o,s=-1;if(n=+n,(t=+t)===(e=+e)&&n>0)return[t];if((r=e<t)&&(i=t,t=e,e=i),0===(o=Ao(t,e,n))||!isFinite(o))return[];if(o>0)for(t=Math.ceil(t/o),e=Math.floor(e/o),a=new Array(i=Math.ceil(e-t+1));++s<i;)a[s]=(t+s)*o;else for(t=Math.floor(t*o),e=Math.ceil(e*o),a=new Array(i=Math.ceil(t-e+1));++s<i;)a[s]=(t-s)/o;return r&&a.reverse(),a}function Ao(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),a=r/Math.pow(10,i);return i>=0?(a>=Eo?10:a>=So?5:a>=To?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=Eo?10:a>=So?5:a>=To?2:1)}function Co(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=Eo?i*=10:a>=So?i*=5:a>=To&&(i*=2),e<t?-i:i}function Do(t,e){var n,r,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(n=t[a])&&n>=n)for(r=n;++a<i;)null!=(n=t[a])&&n>r&&(r=n)}else for(;++a<i;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=n;++a<i;)null!=(n=e(t[a],a,t))&&n>r&&(r=n);return r}function Po(t,e){var n,r=t.length,i=-1,a=0;if(null==e)for(;++i<r;)(n=+t[i])&&(a+=n);else for(;++i<r;)(n=+e(t[i],i,t))&&(a+=n);return a}function ko(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}var Lo=Array.prototype,Ro=Lo.map,Io=Lo.slice,No={name:"implicit"};function Vo(){var t=vo(),e=[],n=[],r=No;function i(i){var a=i+"",o=t.get(a);if(!o){if(r!==No)return r;t.set(a,o=e.push(i))}return n[(o-1)%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=vo();for(var r,a,o=-1,s=n.length;++o<s;)t.has(a=(r=n[o])+"")||t.set(a,e.push(r));return i},i.range=function(t){return arguments.length?(n=Io.call(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return Vo(e,n).unknown(r)},ko.apply(i,arguments),i}function Bo(){var t,e,n=Vo().unknown(void 0),r=n.domain,i=n.range,a=[0,1],o=!1,s=0,u=0,l=.5;function c(){var n=r().length,c=a[1]<a[0],h=a[c-0],f=a[1-c];t=(f-h)/Math.max(1,n-s+2*u),o&&(t=Math.floor(t)),h+=(f-h-t*(n-s))*l,e=t*(1-s),o&&(h=Math.round(h),e=Math.round(e));var d=Oo(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?(a=[+t[0],+t[1]],c()):a.slice()},n.rangeRound=function(t){return a=[+t[0],+t[1]],o=!0,c()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(o=!!t,c()):o},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 Bo(r(),a).round(o).paddingInner(s).paddingOuter(u).align(l)},ko.apply(c(),arguments)}function Go(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Uo(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function zo(){}var Ho="\\s*([+-]?\\d+)\\s*",Fo="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",jo="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Wo=/^#([0-9a-f]{3,8})$/,Yo=new RegExp("^rgb\\("+[Ho,Ho,Ho]+"\\)$"),Xo=new RegExp("^rgb\\("+[jo,jo,jo]+"\\)$"),qo=new RegExp("^rgba\\("+[Ho,Ho,Ho,Fo]+"\\)$"),Zo=new RegExp("^rgba\\("+[jo,jo,jo,Fo]+"\\)$"),Ko=new RegExp("^hsl\\("+[Fo,jo,jo]+"\\)$"),$o=new RegExp("^hsla\\("+[Fo,jo,jo,Fo]+"\\)$"),Qo={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 Jo(){return this.rgb().formatHex()}function ts(){return this.rgb().formatRgb()}function es(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Wo.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?ns(e):3===n?new os(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?new os(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?new os(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 os(e[1],e[2],e[3],1):(e=Xo.exec(t))?new os(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=qo.exec(t))?rs(e[1],e[2],e[3],e[4]):(e=Zo.exec(t))?rs(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Ko.exec(t))?cs(e[1],e[2]/100,e[3]/100,1):(e=$o.exec(t))?cs(e[1],e[2]/100,e[3]/100,e[4]):Qo.hasOwnProperty(t)?ns(Qo[t]):"transparent"===t?new os(NaN,NaN,NaN,0):null}function ns(t){return new os(t>>16&255,t>>8&255,255&t,1)}function rs(t,e,n,r){return r<=0&&(t=e=n=NaN),new os(t,e,n,r)}function is(t){return t instanceof zo||(t=es(t)),t?new os((t=t.rgb()).r,t.g,t.b,t.opacity):new os}function as(t,e,n,r){return 1===arguments.length?is(t):new os(t,e,n,null==r?1:r)}function os(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function ss(){return"#"+ls(this.r)+ls(this.g)+ls(this.b)}function us(){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 ls(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function cs(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new ds(t,e,n,r)}function hs(t){if(t instanceof ds)return new ds(t.h,t.s,t.l,t.opacity);if(t instanceof zo||(t=es(t)),!t)return new ds;if(t instanceof ds)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,s=a-i,u=(a+i)/2;return s?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=u<.5?a+i:2-a-i,o*=60):s=u>0&&u<1?0:o,new ds(o,s,u,t.opacity)}function fs(t,e,n,r){return 1===arguments.length?hs(t):new ds(t,e,n,null==r?1:r)}function ds(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function ps(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 gs(t){return function(){return t}}function vs(t){return 1==(t=+t)?ms: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):gs(isNaN(e)?n:e)}}function ms(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):gs(isNaN(t)?e:t)}Go(zo,es,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Jo,formatHex:Jo,formatHsl:function(){return hs(this).formatHsl()},formatRgb:ts,toString:ts}),Go(os,as,Uo(zo,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new os(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new os(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:ss,formatHex:ss,formatRgb:us,toString:us})),Go(ds,fs,Uo(zo,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new ds(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new ds(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 os(ps(t>=240?t-240:t+120,i,r),ps(t,i,r),ps(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 ys=function t(e){var n=vs(e);function r(t,e){var r=n((t=as(t)).r,(e=as(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=ms(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function _s(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(a){for(n=0;n<r;++n)i[n]=t[n]*(1-a)+e[n]*a;return i}}function bs(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,a=new Array(i),o=new Array(r);for(n=0;n<i;++n)a[n]=Ms(t[n],e[n]);for(;n<r;++n)o[n]=e[n];return function(t){for(n=0;n<i;++n)o[n]=a[n](t);return o}}function xs(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function ws(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Os(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]=Ms(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}var Es=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ss=new RegExp(Es.source,"g");function Ts(t,e){var n,r,i,a=Es.lastIndex=Ss.lastIndex=0,o=-1,s=[],u=[];for(t+="",e+="";(n=Es.exec(t))&&(r=Ss.exec(e));)(i=r.index)>a&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,u.push({i:o,x:ws(n,r)})),a=Ss.lastIndex;return a<e.length&&(i=e.slice(a),s[o]?s[o]+=i:s[++o]=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 Ms(t,e){var n,r=typeof e;return null==e||"boolean"===r?gs(e):("number"===r?ws:"string"===r?(n=es(e))?(e=n,ys):Ts:e instanceof es?ys:e instanceof Date?xs:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(e)?_s:Array.isArray(e)?bs:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?Os:ws)(t,e)}function As(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var Cs,Ds,Ps,ks,Ls=180/Math.PI,Rs={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Is(t,e,n,r,i,a){var o,s,u;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(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,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*Ls,skewX:Math.atan(u)*Ls,scaleX:o,scaleY:s}}function Ns(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(a,o){var s=[],u=[];return a=t(a),o=t(o),function(t,r,i,a,o,s){if(t!==i||r!==a){var u=o.push("translate(",null,e,null,n);s.push({i:u-4,x:ws(t,i)},{i:u-2,x:ws(r,a)})}else(i||a)&&o.push("translate("+i+e+a+n)}(a.translateX,a.translateY,o.translateX,o.translateY,s,u),function(t,e,n,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:ws(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,o.rotate,s,u),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:ws(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,o.skewX,s,u),function(t,e,n,r,a,o){if(t!==n||e!==r){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:ws(t,n)},{i:s-2,x:ws(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,u),a=o=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 Vs=Ns((function(t){return"none"===t?Rs:(Cs||(Cs=document.createElement("DIV"),Ds=document.documentElement,Ps=document.defaultView),Cs.style.transform=t,t=Ps.getComputedStyle(Ds.appendChild(Cs),null).getPropertyValue("transform"),Ds.removeChild(Cs),Is(+(t=t.slice(7,-1).split(","))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),Bs=Ns((function(t){return null==t?Rs:(ks||(ks=document.createElementNS("http://www.w3.org/2000/svg","g")),ks.setAttribute("transform",t),(t=ks.transform.baseVal.consolidate())?Is((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Rs)}),", ",")",")");function Gs(t){return+t}var Us=[0,1];function zs(t){return t}function Hs(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:function(t){return function(){return t}}(isNaN(e)?NaN:.5)}function Fs(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 js(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return i<r?(r=Hs(i,r),a=n(o,a)):(r=Hs(r,i),a=n(a,o)),function(t){return a(r(t))}}function Ws(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),a=new Array(r),o=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<r;)i[o]=Hs(t[o],t[o+1]),a[o]=n(e[o],e[o+1]);return function(e){var n=xo(t,e,1,r)-1;return a[n](i[n](e))}}function Ys(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Xs(){var t,e,n,r,i,a,o=Us,s=Us,u=Ms,l=zs;function c(){return r=Math.min(o.length,s.length)>2?Ws:js,i=a=null,h}function h(e){return isNaN(e=+e)?n:(i||(i=r(o.map(t),s,u)))(t(l(e)))}return h.invert=function(n){return l(e((a||(a=r(s,o.map(t),ws)))(n)))},h.domain=function(t){return arguments.length?(o=Ro.call(t,Gs),l===zs||(l=Fs(o)),c()):o.slice()},h.range=function(t){return arguments.length?(s=Io.call(t),c()):s.slice()},h.rangeRound=function(t){return s=Io.call(t),u=As,c()},h.clamp=function(t){return arguments.length?(l=t?Fs(o):zs,h):l!==zs},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 qs(t,e){return Xs()(t,e)}function Zs(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 Ks(t){return(t=Zs(Math.abs(t)))?t[1]:NaN}var $s,Qs=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Js(t){if(!(e=Qs.exec(t)))throw new Error("invalid format: "+t);var e;return new tu({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 tu(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 eu(t,e){var n=Zs(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")}Js.prototype=tu.prototype,tu.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 nu={"%":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 eu(100*t,e)},r:eu,s:function(t,e){var n=Zs(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-($s=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+Zs(t,Math.max(0,e+a-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function ru(t){return t}var iu,au,ou,su=Array.prototype.map,uu=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function lu(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?ru:(e=su.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,a=[],o=0,s=e[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),a.push(t.substring(i-=s,i+s)),!((u+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?ru:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(su.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=Js(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"):nu[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?a:/[%p]/.test(y)?u:"",x=nu[y],w=/[defgprs%]/.test(y);function O(t){var i,a,u,f=_,O=b;if("c"===y)O=x(t)+O,t="";else{var E=(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)),E&&0==+t&&(E=!1),f=(E?"("===h?h:l:"-"===h||"("===h?"":h)+f,O=("s"===y?uu[8+$s/3]:"")+O+(E&&"("===h?")":""),w)for(i=-1,a=t.length;++i<a;)if(48>(u=t.charCodeAt(i))||u>57){O=(46===u?o+t.slice(i+1):t.slice(i))+O,t=t.slice(0,i);break}}g&&!d&&(t=r(t,1/0));var S=f.length+t.length+O.length,T=S<p?new Array(p-S+1).join(e):"";switch(g&&d&&(t=r(T+t,T.length?p-O.length:1/0),T=""),n){case"<":t=f+t+O+T;break;case"=":t=f+T+t+O;break;case"^":t=T.slice(0,S=T.length>>1)+f+t+O+T.slice(S);break;default:t=T+f+t+O}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)),O.toString=function(){return t+""},O}return{format:h,formatPrefix:function(t,e){var n=h(((t=Js(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Ks(e)/3))),i=Math.pow(10,-r),a=uu[8+r/3];return function(t){return n(i*t)+a}}}}function cu(t,e,n,r){var i,a=Co(t,e,n);switch((r=Js(null==r?",f":r)).type){case"s":var o=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(Ks(e)/3)))-Ks(Math.abs(t)))}(a,o))||(r.precision=i),ou(r,o);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,Ks(e)-Ks(t))+1}(a,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,-Ks(Math.abs(t)))}(a))||(r.precision=i-2*("%"===r.type))}return au(r)}function hu(t){var e=t.domain;return t.ticks=function(t){var n=e();return Mo(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return cu(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i=e(),a=0,o=i.length-1,s=i[a],u=i[o];return u<s&&(r=s,s=u,u=r,r=a,a=o,o=r),(r=Ao(s,u,n))>0?r=Ao(s=Math.floor(s/r)*r,u=Math.ceil(u/r)*r,n):r<0&&(r=Ao(s=Math.ceil(s*r)/r,u=Math.floor(u*r)/r,n)),r>0?(i[a]=Math.floor(s/r)*r,i[o]=Math.ceil(u/r)*r,e(i)):r<0&&(i[a]=Math.ceil(s*r)/r,i[o]=Math.floor(u*r)/r,e(i)),t},t}function fu(){var t=qs(zs,zs);return t.copy=function(){return Ys(t,fu())},ko.apply(t,arguments),hu(t)}function du(t,e){var n,r=0,i=(t=t.slice()).length-1,a=t[r],o=t[i];return o<a&&(n=r,r=i,i=n,n=a,a=o,o=n),t[r]=e.floor(a),t[i]=e.ceil(o),t}function pu(t){return Math.log(t)}function gu(t){return Math.exp(t)}function vu(t){return-Math.log(-t)}function mu(t){return-Math.exp(-t)}function yu(t){return isFinite(t)?+("1e"+t):t<0?0:t}function _u(t){return function(e){return-t(-e)}}function bu(t){var e,n,r=t(pu,gu),i=r.domain,a=10;function o(){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})}(a),n=function(t){return 10===t?yu:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}(a),i()[0]<0?(e=_u(e),n=_u(n),t(vu,mu)):t(pu,gu),r}return r.base=function(t){return arguments.length?(a=+t,o()):a},r.domain=function(t){return arguments.length?(i(t),o()):i()},r.ticks=function(t){var r,o=i(),s=o[0],u=o[o.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(!(a%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<a;++c)if(!((h=l*c)<s)){if(h>u)break;g.push(h)}}else for(;f<d;++f)for(c=a-1,l=n(f);c>=1;--c)if(!((h=l*c)<s)){if(h>u)break;g.push(h)}}else g=Mo(f,d,Math.min(d-f,p)).map(n);return r?g.reverse():g},r.tickFormat=function(t,i){if(null==i&&(i=10===a?".0e":","),"function"!=typeof i&&(i=au(i)),t===1/0)return i;null==t&&(t=10);var o=Math.max(1,a*t/r.ticks().length);return function(t){var r=t/n(Math.round(e(t)));return r*a<a-.5&&(r*=a),r<=o?i(t):""}},r.nice=function(){return i(du(i(),{floor:function(t){return n(Math.floor(e(t)))},ceil:function(t){return n(Math.ceil(e(t)))}}))},r}iu=lu({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),au=iu.format,ou=iu.formatPrefix;var xu=new Date,wu=new Date;function Ou(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,a){var o,s=[];if(n=i.ceil(n),a=null==a?1:Math.floor(a),!(n<r&&a>0))return s;do{s.push(o=new Date(+n)),e(n,a),t(n)}while(o<n&&n<r);return s},i.filter=function(n){return Ou((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 xu.setTime(+e),wu.setTime(+r),t(xu),t(wu),Math.floor(n(xu,wu))},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 Eu=Ou((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));Eu.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?Ou((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):Eu:null};var Su=Ou((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()})),Tu=Ou((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()})),Mu=Ou((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()})),Au=Ou((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 Cu(t){return Ou((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 Du=Cu(0),Pu=Cu(1),ku=(Cu(2),Cu(3),Cu(4)),Lu=(Cu(5),Cu(6),Ou((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()}))),Ru=Ou((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()}));Ru.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Ou((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 Iu=Ou((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 Nu(t){return Ou((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 Vu=Nu(0),Bu=Nu(1),Gu=(Nu(2),Nu(3),Nu(4)),Uu=(Nu(5),Nu(6),Ou((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 zu(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 Hu(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 Fu(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}Uu.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Ou((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 ju,Wu,Yu={"-":"",_:" ",0:"0"},Xu=/^\s*\d+/,qu=/^%/,Zu=/[\\^$*+?|[\]().{}]/g;function Ku(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(e)+i:i)}function $u(t){return t.replace(Zu,"\\$&")}function Qu(t){return new RegExp("^(?:"+t.map($u).join("|")+")","i")}function Ju(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function tl(t,e,n){var r=Xu.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function el(t,e,n){var r=Xu.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function nl(t,e,n){var r=Xu.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function rl(t,e,n){var r=Xu.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function il(t,e,n){var r=Xu.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function al(t,e,n){var r=Xu.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function ol(t,e,n){var r=Xu.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function sl(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 ul(t,e,n){var r=Xu.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function ll(t,e,n){var r=Xu.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function cl(t,e,n){var r=Xu.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function hl(t,e,n){var r=Xu.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function fl(t,e,n){var r=Xu.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function dl(t,e,n){var r=Xu.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function pl(t,e,n){var r=Xu.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function gl(t,e,n){var r=Xu.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function vl(t,e,n){var r=Xu.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function ml(t,e,n){var r=qu.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function yl(t,e,n){var r=Xu.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function _l(t,e,n){var r=Xu.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function bl(t,e){return Ku(t.getDate(),e,2)}function xl(t,e){return Ku(t.getHours(),e,2)}function wl(t,e){return Ku(t.getHours()%12||12,e,2)}function Ol(t,e){return Ku(1+Au.count(Ru(t),t),e,3)}function El(t,e){return Ku(t.getMilliseconds(),e,3)}function Sl(t,e){return El(t,e)+"000"}function Tl(t,e){return Ku(t.getMonth()+1,e,2)}function Ml(t,e){return Ku(t.getMinutes(),e,2)}function Al(t,e){return Ku(t.getSeconds(),e,2)}function Cl(t){var e=t.getDay();return 0===e?7:e}function Dl(t,e){return Ku(Du.count(Ru(t)-1,t),e,2)}function Pl(t,e){var n=t.getDay();return t=n>=4||0===n?ku(t):ku.ceil(t),Ku(ku.count(Ru(t),t)+(4===Ru(t).getDay()),e,2)}function kl(t){return t.getDay()}function Ll(t,e){return Ku(Pu.count(Ru(t)-1,t),e,2)}function Rl(t,e){return Ku(t.getFullYear()%100,e,2)}function Il(t,e){return Ku(t.getFullYear()%1e4,e,4)}function Nl(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Ku(e/60|0,"0",2)+Ku(e%60,"0",2)}function Vl(t,e){return Ku(t.getUTCDate(),e,2)}function Bl(t,e){return Ku(t.getUTCHours(),e,2)}function Gl(t,e){return Ku(t.getUTCHours()%12||12,e,2)}function Ul(t,e){return Ku(1+Iu.count(Uu(t),t),e,3)}function zl(t,e){return Ku(t.getUTCMilliseconds(),e,3)}function Hl(t,e){return zl(t,e)+"000"}function Fl(t,e){return Ku(t.getUTCMonth()+1,e,2)}function jl(t,e){return Ku(t.getUTCMinutes(),e,2)}function Wl(t,e){return Ku(t.getUTCSeconds(),e,2)}function Yl(t){var e=t.getUTCDay();return 0===e?7:e}function Xl(t,e){return Ku(Vu.count(Uu(t)-1,t),e,2)}function ql(t,e){var n=t.getUTCDay();return t=n>=4||0===n?Gu(t):Gu.ceil(t),Ku(Gu.count(Uu(t),t)+(4===Uu(t).getUTCDay()),e,2)}function Zl(t){return t.getUTCDay()}function Kl(t,e){return Ku(Bu.count(Uu(t)-1,t),e,2)}function $l(t,e){return Ku(t.getUTCFullYear()%100,e,2)}function Ql(t,e){return Ku(t.getUTCFullYear()%1e4,e,4)}function Jl(){return"+0000"}function tc(){return"%"}function ec(t){return+t}function nc(t){return Math.floor(+t/1e3)}!function(t){ju=function(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,a=t.days,o=t.shortDays,s=t.months,u=t.shortMonths,l=Qu(i),c=Ju(i),h=Qu(a),f=Ju(a),d=Qu(o),p=Ju(o),g=Qu(s),v=Ju(s),m=Qu(u),y=Ju(u),_={a:function(t){return o[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return u[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:bl,e:bl,f:Sl,H:xl,I:wl,j:Ol,L:El,m:Tl,M:Ml,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:ec,s:nc,S:Al,u:Cl,U:Dl,V:Pl,w:kl,W:Ll,x:null,X:null,y:Rl,Y:Il,Z:Nl,"%":tc},b={a:function(t){return o[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return u[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:Vl,e:Vl,f:Hl,H:Bl,I:Gl,j:Ul,L:zl,m:Fl,M:jl,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:ec,s:nc,S:Wl,u:Yl,U:Xl,V:ql,w:Zl,W:Kl,x:null,X:null,y:$l,Y:Ql,Z:Jl,"%":tc},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:cl,e:cl,f:vl,H:fl,I:fl,j:hl,L:gl,m:ll,M:dl,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:ul,Q:yl,s:_l,S:pl,u:el,U:nl,V:rl,w:tl,W:il,x:function(t,e,r){return E(t,n,e,r)},X:function(t,e,n){return E(t,r,e,n)},y:ol,Y:al,Z:sl,"%":ml};function w(t,e){return function(n){var r,i,a,o=[],s=-1,u=0,l=t.length;for(n instanceof Date||(n=new Date(+n));++s<l;)37===t.charCodeAt(s)&&(o.push(t.slice(u,s)),null!=(i=Yu[r=t.charAt(++s)])?r=t.charAt(++s):i="e"===r?" ":"0",(a=e[r])&&(r=a(n,i)),o.push(r),u=s+1);return o.push(t.slice(u,s)),o.join("")}}function O(t,e){return function(n){var r,i,a=Fu(1900,void 0,1);if(E(a,t,n+="",0)!=n.length)return null;if("Q"in a)return new Date(a.Q);if("s"in a)return new Date(1e3*a.s+("L"in a?a.L:0));if(!e||"Z"in a||(a.Z=0),"p"in a&&(a.H=a.H%12+12*a.p),void 0===a.m&&(a.m="q"in a?a.q:0),"V"in a){if(a.V<1||a.V>53)return null;"w"in a||(a.w=1),"Z"in a?(i=(r=Hu(Fu(a.y,0,1))).getUTCDay(),r=i>4||0===i?Bu.ceil(r):Bu(r),r=Iu.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(i=(r=zu(Fu(a.y,0,1))).getDay(),r=i>4||0===i?Pu.ceil(r):Pu(r),r=Au.offset(r,7*(a.V-1)),a.y=r.getFullYear(),a.m=r.getMonth(),a.d=r.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?Hu(Fu(a.y,0,1)).getUTCDay():zu(Fu(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,Hu(a)):zu(a)}}function E(t,e,n,r){for(var i,a,o=0,s=e.length,u=n.length;o<s;){if(r>=u)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=x[i in Yu?e.charAt(o++):i])||(r=a(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=O(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=O(t+="",!0);return e.toString=function(){return t},e}})}(t),Wu=ju.format,ju.parse,ju.utcFormat,ju.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 rc(t){return new Date(t)}function ic(t){return t instanceof Date?+t:+new Date(+t)}function ac(t,e,n,r,i,a,o,s,u){var l=qs(zs,zs),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=[[o,1,1e3],[o,5,5e3],[o,15,15e3],[o,30,3e4],[a,1,6e4],[a,5,3e5],[a,15,9e5],[a,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(o(s)<s?f:a(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 a=Math.abs(r-n)/e,o=bo((function(t){return t[2]})).right(b,a);o===b.length?(i=Co(n/31536e6,r/31536e6,e),e=t):o?(i=(o=b[a/b[o-1][2]<b[o][2]/a?o-1:o])[1],e=o[0]):(i=Math.max(Co(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(Ro.call(t,ic)):h().map(rc)},l.ticks=function(t,e){var n,r=h(),i=r[0],a=r[r.length-1],o=a<i;return o&&(n=i,i=a,a=n),n=(n=w(t,i,a,e))?n.range(i,a+1):[],o?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(du(n,t)):l},l.copy=function(){return Ys(l,ac(t,e,n,r,i,a,o,s,u))},l}function oc(){return ko.apply(ac(Ru,Lu,Du,Au,Mu,Tu,Su,Eu,Wu).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var sc=Math.PI,uc=2*sc,lc=uc-1e-6;function cc(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function hc(){return new cc}function fc(t){return function(){return t}}cc.prototype=hc.prototype={constructor:cc,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,a){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var a=this._x1,o=this._y1,s=n-t,u=r-e,l=a-t,c=o-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-a,d=r-o,p=s*s+u*u,g=f*f+d*d,v=Math.sqrt(p),m=Math.sqrt(h),y=i*Math.tan((sc-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,a){t=+t,e=+e,a=!!a;var o=(n=+n)*Math.cos(r),s=n*Math.sin(r),u=t+o,l=e+s,c=1^a,h=a?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%uc+uc),h>lc?this._+="A"+n+","+n+",0,1,"+c+","+(t-o)+","+(e-s)+"A"+n+","+n+",0,1,"+c+","+(this._x1=u)+","+(this._y1=l):h>1e-6&&(this._+="A"+n+","+n+",0,"+ +(h>=sc)+","+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 dc=Math.abs,pc=Math.atan2,gc=Math.cos,vc=Math.max,mc=Math.min,yc=Math.sin,_c=Math.sqrt,bc=Math.PI,xc=bc/2,wc=2*bc;function Oc(t){return t>1?0:t<-1?bc:Math.acos(t)}function Ec(t){return t>=1?xc:t<=-1?-xc:Math.asin(t)}function Sc(t){return t.innerRadius}function Tc(t){return t.outerRadius}function Mc(t){return t.startAngle}function Ac(t){return t.endAngle}function Cc(t){return t&&t.padAngle}function Dc(t,e,n,r,i,a,o,s){var u=n-t,l=r-e,c=o-i,h=s-a,f=h*u-c*l;if(!(f*f<1e-12))return[t+(f=(c*(e-a)-h*(t-i))/f)*u,e+f*l]}function Pc(t,e,n,r,i,a,o){var s=t-n,u=e-r,l=(o?a:-a)/_c(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-a,w=f*g-p*d,O=(_<0?-1:1)*_c(vc(0,x*x*b-w*w)),E=(w*_-y*O)/b,S=(-w*y-_*O)/b,T=(w*_+y*O)/b,M=(-w*y+_*O)/b,A=E-v,C=S-m,D=T-v,P=M-m;return A*A+C*C>D*D+P*P&&(E=T,S=M),{cx:E,cy:S,x01:-c,y01:-h,x11:E*(i/x-1),y11:S*(i/x-1)}}function kc(){var t=Sc,e=Tc,n=fc(0),r=null,i=Mc,a=Ac,o=Cc,s=null;function u(){var u,l,c=+t.apply(this,arguments),h=+e.apply(this,arguments),f=i.apply(this,arguments)-xc,d=a.apply(this,arguments)-xc,p=dc(d-f),g=d>f;if(s||(s=u=hc()),h<c&&(l=h,h=c,c=l),h>1e-12)if(p>wc-1e-12)s.moveTo(h*gc(f),h*yc(f)),s.arc(0,0,h,f,d,!g),c>1e-12&&(s.moveTo(c*gc(d),c*yc(d)),s.arc(0,0,c,d,f,g));else{var v,m,y=f,_=d,b=f,x=d,w=p,O=p,E=o.apply(this,arguments)/2,S=E>1e-12&&(r?+r.apply(this,arguments):_c(c*c+h*h)),T=mc(dc(h-c)/2,+n.apply(this,arguments)),M=T,A=T;if(S>1e-12){var C=Ec(S/c*yc(E)),D=Ec(S/h*yc(E));(w-=2*C)>1e-12?(b+=C*=g?1:-1,x-=C):(w=0,b=x=(f+d)/2),(O-=2*D)>1e-12?(y+=D*=g?1:-1,_-=D):(O=0,y=_=(f+d)/2)}var P=h*gc(y),k=h*yc(y),L=c*gc(x),R=c*yc(x);if(T>1e-12){var I,N=h*gc(_),V=h*yc(_),B=c*gc(b),G=c*yc(b);if(p<bc&&(I=Dc(P,k,B,G,N,V,L,R))){var U=P-I[0],z=k-I[1],H=N-I[0],F=V-I[1],j=1/yc(Oc((U*H+z*F)/(_c(U*U+z*z)*_c(H*H+F*F)))/2),W=_c(I[0]*I[0]+I[1]*I[1]);M=mc(T,(c-W)/(j-1)),A=mc(T,(h-W)/(j+1))}}O>1e-12?A>1e-12?(v=Pc(B,G,P,k,h,A,g),m=Pc(N,V,L,R,h,A,g),s.moveTo(v.cx+v.x01,v.cy+v.y01),A<T?s.arc(v.cx,v.cy,A,pc(v.y01,v.x01),pc(m.y01,m.x01),!g):(s.arc(v.cx,v.cy,A,pc(v.y01,v.x01),pc(v.y11,v.x11),!g),s.arc(0,0,h,pc(v.cy+v.y11,v.cx+v.x11),pc(m.cy+m.y11,m.cx+m.x11),!g),s.arc(m.cx,m.cy,A,pc(m.y11,m.x11),pc(m.y01,m.x01),!g))):(s.moveTo(P,k),s.arc(0,0,h,y,_,!g)):s.moveTo(P,k),c>1e-12&&w>1e-12?M>1e-12?(v=Pc(L,R,N,V,c,-M,g),m=Pc(P,k,B,G,c,-M,g),s.lineTo(v.cx+v.x01,v.cy+v.y01),M<T?s.arc(v.cx,v.cy,M,pc(v.y01,v.x01),pc(m.y01,m.x01),!g):(s.arc(v.cx,v.cy,M,pc(v.y01,v.x01),pc(v.y11,v.x11),!g),s.arc(0,0,c,pc(v.cy+v.y11,v.cx+v.x11),pc(m.cy+m.y11,m.cx+m.x11),g),s.arc(m.cx,m.cy,M,pc(m.y11,m.x11),pc(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)+ +a.apply(this,arguments))/2-bc/2;return[gc(r)*n,yc(r)*n]},u.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:fc(+e),u):t},u.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:fc(+t),u):e},u.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:fc(+t),u):n},u.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:fc(+t),u):r},u.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:fc(+t),u):i},u.endAngle=function(t){return arguments.length?(a="function"==typeof t?t:fc(+t),u):a},u.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:fc(+t),u):o},u.context=function(t){return arguments.length?(s=null==t?null:t,u):s},u}function Lc(t){this._context=t}function Rc(t){return new Lc(t)}function Ic(t){return t[0]}function Nc(t){return t[1]}function Vc(){var t=Ic,e=Nc,n=fc(!0),r=null,i=Rc,a=null;function o(o){var s,u,l,c=o.length,h=!1;for(null==r&&(a=i(l=hc())),s=0;s<=c;++s)!(s<c&&n(u=o[s],s,o))===h&&((h=!h)?a.lineStart():a.lineEnd()),h&&a.point(+t(u,s,o),+e(u,s,o));if(l)return a=null,l+""||null}return o.x=function(e){return arguments.length?(t="function"==typeof e?e:fc(+e),o):t},o.y=function(t){return arguments.length?(e="function"==typeof t?t:fc(+t),o):e},o.defined=function(t){return arguments.length?(n="function"==typeof t?t:fc(!!t),o):n},o.curve=function(t){return arguments.length?(i=t,null!=r&&(a=i(r)),o):i},o.context=function(t){return arguments.length?(null==t?r=a=null:a=i(r=t),o):r},o}function Bc(){var t=Ic,e=null,n=fc(0),r=Nc,i=fc(!0),a=null,o=Rc,s=null;function u(u){var l,c,h,f,d,p=u.length,g=!1,v=new Array(p),m=new Array(p);for(null==a&&(s=o(d=hc())),l=0;l<=p;++l){if(!(l<p&&i(f=u[l],l,u))===g)if(g=!g)c=l,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),h=l-1;h>=c;--h)s.point(v[h],m[h]);s.lineEnd(),s.areaEnd()}g&&(v[l]=+t(f,l,u),m[l]=+n(f,l,u),s.point(e?+e(f,l,u):v[l],r?+r(f,l,u):m[l]))}if(d)return s=null,d+""||null}function l(){return Vc().defined(i).curve(o).context(a)}return u.x=function(n){return arguments.length?(t="function"==typeof n?n:fc(+n),e=null,u):t},u.x0=function(e){return arguments.length?(t="function"==typeof e?e:fc(+e),u):t},u.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:fc(+t),u):e},u.y=function(t){return arguments.length?(n="function"==typeof t?t:fc(+t),r=null,u):n},u.y0=function(t){return arguments.length?(n="function"==typeof t?t:fc(+t),u):n},u.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:fc(+t),u):r},u.lineX0=u.lineY0=function(){return l().x(t).y(n)},u.lineY1=function(){return l().x(t).y(r)},u.lineX1=function(){return l().x(e).y(n)},u.defined=function(t){return arguments.length?(i="function"==typeof t?t:fc(!!t),u):i},u.curve=function(t){return arguments.length?(o=t,null!=a&&(s=o(a)),u):o},u.context=function(t){return arguments.length?(null==t?a=s=null:s=o(a=t),u):a},u}function Gc(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function Uc(t){return t}Lc.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 zc=Fc(Rc);function Hc(t){this._curve=t}function Fc(t){function e(e){return new Hc(t(e))}return e._curve=t,e}function jc(){return t=Vc().curve(zc),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 Wc=Array.prototype.slice;function Yc(){}function Xc(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 qc(t){this._context=t}function Zc(t){return new qc(t)}function Kc(t){this._context=t}function $c(t){return new Kc(t)}function Qc(t){this._context=t}function Jc(t){return new Qc(t)}function th(t,e){this._basis=new qc(t),this._beta=e}qc.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:Xc(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:Xc(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Kc.prototype={areaStart:Yc,areaEnd:Yc,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:Xc(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Qc.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:Xc(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},th.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],a=e[0],o=t[n]-i,s=e[n]-a,u=-1;++u<=n;)r=u/n,this._basis.point(this._beta*t[u]+(1-this._beta)*(i+r*o),this._beta*e[u]+(1-this._beta)*(a+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var eh=function t(e){function n(t){return 1===e?new qc(t):new th(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function nh(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 rh(t,e){this._context=t,this._k=(1-e)/6}rh.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:nh(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:nh(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 ih=function t(e){function n(t){return new rh(t,e)}return n.tension=function(e){return t(+e)},n}(0);function ah(t,e){this._context=t,this._k=(1-e)/6}ah.prototype={areaStart:Yc,areaEnd:Yc,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:nh(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 oh=function t(e){function n(t){return new ah(t,e)}return n.tension=function(e){return t(+e)},n}(0);function sh(t,e){this._context=t,this._k=(1-e)/6}sh.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:nh(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 uh=function t(e){function n(t){return new sh(t,e)}return n.tension=function(e){return t(+e)},n}(0);function lh(t,e,n){var r=t._x1,i=t._y1,a=t._x2,o=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);a=(a*l+t._x1*t._l23_2a-e*t._l12_2a)/c,o=(o*l+t._y1*t._l23_2a-n*t._l12_2a)/c}t._context.bezierCurveTo(r,i,a,o,t._x2,t._y2)}function ch(t,e){this._context=t,this._alpha=e}ch.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._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:lh(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 hh=function t(e){function n(t){return e?new ch(t,e):new rh(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function fh(t,e){this._context=t,this._alpha=e}fh.prototype={areaStart:Yc,areaEnd:Yc,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:lh(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 dh=function t(e){function n(t){return e?new fh(t,e):new ah(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function ph(t,e){this._context=t,this._alpha=e}ph.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:lh(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 gh=function t(e){function n(t){return e?new ph(t,e):new sh(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function vh(t){this._context=t}function mh(t){return new vh(t)}function yh(t){return t<0?-1:1}function _h(t,e,n){var r=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(r||i<0&&-0),o=(n-t._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(yh(a)+yh(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function bh(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function xh(t,e,n){var r=t._x0,i=t._y0,a=t._x1,o=t._y1,s=(a-r)/3;t._context.bezierCurveTo(r+s,i+s*e,a-s,o-s*n,a,o)}function wh(t){this._context=t}function Oh(t){this._context=new Eh(t)}function Eh(t){this._context=t}function Sh(t){return new wh(t)}function Th(t){return new Oh(t)}function Mh(t){this._context=t}function Ah(t){var e,n,r=t.length-1,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,a[e]=4,o[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/a[e-1],a[e]-=n,o[e]-=n*o[e-1];for(i[r-1]=o[r-1]/a[r-1],e=r-2;e>=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)a[e]=2*t[e+1]-i[e+1];return[i,a]}function Ch(t){return new Mh(t)}function Dh(t,e){this._context=t,this._t=e}function Ph(t){return new Dh(t,.5)}function kh(t){return new Dh(t,0)}function Lh(t){return new Dh(t,1)}function Rh(t,e){if((i=t.length)>1)for(var n,r,i,a=1,o=t[e[0]],s=o.length;a<i;++a)for(r=o,o=t[e[a]],n=0;n<s;++n)o[n][1]+=o[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function Ih(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function Nh(t,e){return t[e]}vh.prototype={areaStart:Yc,areaEnd:Yc,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))}},wh.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:xh(this,this._t0,bh(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,xh(this,bh(this,n=_h(this,t,e)),n);break;default:xh(this,this._t0,n=_h(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(Oh.prototype=Object.create(wh.prototype)).point=function(t,e){wh.prototype.point.call(this,e,t)},Eh.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,a){this._context.bezierCurveTo(e,t,r,n,a,i)}},Mh.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=Ah(t),i=Ah(e),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],t[o],e[o]);(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)}},Dh.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 Vh=function(){function t(t){this.state={options:{}},this.colorScale={},this.colorClassNames={},this.services=t}return t.prototype.getAllDataFromDomain=function(){if(!this.get("data"))return null;var t=this.getDataGroups(),e=da.clone(this.get("data")),n=this.getOptions().data.groupMapsTo,r=this.getOptions().axes;return r&&Object.keys(r).forEach((function(t){var n=r[t].mapsTo,i=r[t].scaleType;if(i!==C.LINEAR&&i!==C.LOG||(e=e.map((function(t){var e;return x(x({},t),((e={})[n]=Number(t[n]),e))}))),r[t].mapsTo&&r[t].domain)if(i===C.LABELS)e=e.filter((function(e){return r[t].domain.includes(e[n])}));else{var a=r[t].domain,o=a[0],s=a[1];e=e.filter((function(t){return t[n]>=o&&t[n]<=s}))}})),e.filter((function(e){return t.find((function(t){return t.name===e[n]}))}))},t.prototype.getDisplayData=function(){if(!this.get("data"))return null;var t=Va.items.status.ACTIVE,e=this.getDataGroups(),n=this.getOptions().data.groupMapsTo;return this.getAllDataFromDomain().filter((function(r){return e.find((function(e){return e.name===r[n]&&e.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(da.clone(t)),n=this.generateDataGroups(e);return this.set({data:e,dataGroups:n}),e},t.prototype.getDataGroups=function(){return da.getProperty(this.getOptions(),"data","loading")?[]:this.get("dataGroups")},t.prototype.getActiveDataGroups=function(){var t=Va.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(),e=t.data.groupMapsTo,n=this.getDisplayData(),r=this.services.cartesianScales.getDomainIdentifier(),i=this.services.cartesianScales.getRangeIdentifier(),a=vo(n,(function(t){return t[r]})).keys(),o=this.services.cartesianScales.domainAxisPosition,s=t.axes[o].scaleType;s===C.TIME?a.sort((function(t,e){return new Date(t)-new Date(e)})):s!==C.LOG&&s!==C.LINEAR||a.sort((function(t,e){return t-e}));var u=this.getDataGroupNames();return a.map((function(t){var a={sharedStackKey:t};return u.forEach((function(o){var s=n.find((function(n){return n[e]===o&&n[r].toString()===t}));a[o]=s?s[i]:null})),a}))},t.prototype.getStackedData=function(t){var e=(void 0===t?{percentage:!1}:t).percentage,n=this.getOptions().data.groupMapsTo,r=this.getDataGroupNames(),i=this.getDataValuesGroupedByKeys();if(e){var a=da.fromPairs(i.map((function(t){return[t.sharedStackKey,0]})));i.forEach((function(t){r.forEach((function(e){a[t.sharedStackKey]+=t[e]}))})),i.forEach((function(t){r.forEach((function(e){a[t.sharedStackKey]?t[e]=t[e]/a[t.sharedStackKey]*100:t[e]=0}))}))}return function(){var t=fc([]),e=Ih,n=Rh,r=Nh;function i(i){var a,o,s=t.apply(this,arguments),u=i.length,l=s.length,c=new Array(l);for(a=0;a<l;++a){for(var h,f=s[a],d=c[a]=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(a=0,o=e(c);a<l;++a)c[o[a]].index=a;return n(c,o),c}return i.keys=function(e){return arguments.length?(t="function"==typeof e?e:fc(Wc.call(e)),i):t},i.value=function(t){return arguments.length?(r="function"==typeof t?t:fc(+t),i):r},i.order=function(t){return arguments.length?(e=null==t?Ih:"function"==typeof t?t:fc(Wc.call(t)),i):e},i.offset=function(t){return arguments.length?(n=null==t?Rh:t,i):n},i}().keys(r)(i).map((function(t,e){return Object.keys(t).filter((function(t){return!isNaN(t)})).map((function(i){var a=t[i];return a[n]=r[e],a}))}))},t.prototype.getOptions=function(){return this.state.options},t.prototype.set=function(t,e){this.state=Object.assign({},this.state,t);var n=Object.assign({skipUpdate:!1,animate:!0},e);n.skipUpdate||this.update(n.animate)},t.prototype.get=function(t){return t?this.state[t]:this.state},t.prototype.setOptions=function(t){this.set({options:da.merge(this.getOptions(),t)})},t.prototype.update=function(t){void 0===t&&(t=!0),this.getDisplayData()&&(this.updateAllDataGroups(),this.setCustomColorScale(),this.setColorClassNames(),this.services.events.dispatchEvent(j.Model.UPDATE,{animate:t}))},t.prototype.setUpdateCallback=function(t){this.updateCallback=t},t.prototype.toggleDataLabel=function(t){var e=Va.items.status,n=e.ACTIVE,r=e.DISABLED,i=this.getDataGroups(),a=i.some((function(t){return t.status===r})),o=i.filter((function(t){return t.status===n}));if(a)if(1===o.length&&o[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,a){i[a].status=e.name===t?n:r}));var u=i.filter((function(t){return t.status===n})),l=this.getOptions(),c=i.some((function(t){return t.status===r}));l.data.selectedGroups=c?u.map((function(t){return t.name})):[],this.services.events.dispatchEvent(j.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){if(!this.isUserProvidedColorScaleValid())return null;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){if(!this.isUserProvidedColorScaleValid())return null;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.isUserProvidedColorScaleValid=function(){var t=da.getProperty(this.getOptions(),"color","scale"),e=this.getDataGroups();return!(null==t||Object.keys(t).length<e.length)&&e.every((function(e){return Object.keys(t).includes(e.name)}))},t.prototype.getColorClassName=function(t){if(this.isUserProvidedColorScaleValid())return t.originalClassName;var e=this.colorClassNames(t.dataGroupName),n=t.originalClassName;return t.classNameTypes.forEach((function(r){return n=t.originalClassName?n+" "+r+"-"+e:r+"-"+e})),n},t.prototype.getStatus=function(){return null},t.prototype.getAllDataGroupsNames=function(){return this.allDataGroups},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 a,o=da.getProperty(t,"label");if(null===o){var s=da.getProperty(r,i);a=s||"Ungrouped"}else a=o;var u={group:a,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 t=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=Va.items.status,r=n.ACTIVE,i=n.DISABLED,a=this.getOptions(),o=vo(t,(function(t){return t[e]})).keys();a.data.selectedGroups.length&&(a.data.selectedGroups.every((function(t){return o.includes(t)}))||(a.data.selectedGroups=[]));var s=function(t){return!a.data.selectedGroups.length||a.data.selectedGroups.includes(t)?r:i};return o.map((function(t){return{name:t,status:s(t)}}))},t.prototype.setCustomColorScale=function(){var t=this;if(this.isUserProvidedColorScaleValid()){var e=this.getOptions(),n=da.getProperty(e,"color","scale");Object.keys(n).forEach((function(e){t.allDataGroups.includes(e)||console.warn('"'+e+'" does not exist in data groups.')}));var r=[];this.allDataGroups.forEach((function(t){n[t]&&r.push(n[t])})),this.colorScale=Vo().range(r).domain(this.allDataGroups)}},t.prototype.setColorClassNames=function(){var t=da.getProperty(this.getOptions(),"color","pairing"),e=da.getProperty(t,"numberOfVariants");(!e||e<this.allDataGroups.length)&&(e=this.allDataGroups.length);var n=da.getProperty(t,"option"),r=e>5?14:e;n=n<=Ra.pairingOptions[r+"-color"]?n:1;var i=this.allDataGroups.map((function(t,e){return r+"-"+n+"-"+(e%14+1)}));this.isUserProvidedColorScaleValid()||(this.colorClassNames=Vo().range(i).domain(this.allDataGroups))},t}(),Bh=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}(),Gh={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 "},Uh=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}()}(),zh="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,Hh="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),Fh="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(Hh):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)},jh=["top","right","bottom","left","width","height","size","weight"],Wh="undefined"!=typeof MutationObserver,Yh=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 a(){n&&(n=!1,t()),r&&s()}function o(){Fh(a)}function s(){var t=Date.now();if(n){if(t-i<2)return;r=!0}else n=!0,r=!1,setTimeout(o,e);i=t}return s}(this.refresh.bind(this),20)};Yh.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},Yh.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},Yh.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},Yh.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},Yh.prototype.connect_=function(){zh&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Wh?(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)},Yh.prototype.disconnect_=function(){zh&&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)},Yh.prototype.onTransitionEnd_=function(t){var e=t.propertyName;void 0===e&&(e=""),jh.some((function(t){return!!~e.indexOf(t)}))&&this.refresh()},Yh.getInstance=function(){return this.instance_||(this.instance_=new Yh),this.instance_},Yh.instance_=null;var Xh=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},qh=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||Hh},Zh=ef(0,0,0,0);function Kh(t){return parseFloat(t)||0}function $h(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];return e.reduce((function(e,n){return e+Kh(t["border-"+n+"-width"])}),0)}function Qh(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return Zh;var r=qh(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],a=t["padding-"+i];e[i]=Kh(a)}return e}(r),a=i.left+i.right,o=i.top+i.bottom,s=Kh(r.width),u=Kh(r.height);if("border-box"===r.boxSizing&&(Math.round(s+a)!==e&&(s-=$h(r,"left","right")+a),Math.round(u+o)!==n&&(u-=$h(r,"top","bottom")+o)),!function(t){return t===qh(t).document.documentElement}(t)){var l=Math.round(s+a)-e,c=Math.round(u+o)-n;1!==Math.abs(l)&&(s-=l),1!==Math.abs(c)&&(u-=c)}return ef(i.left,i.top,s,u)}var Jh="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof qh(t).SVGGraphicsElement}:function(t){return t instanceof qh(t).SVGElement&&"function"==typeof t.getBBox};function tf(t){return zh?Jh(t)?function(t){var e=t.getBBox();return ef(0,0,e.width,e.height)}(t):Qh(t):Zh}function ef(t,e,n,r){return{x:t,y:e,width:n,height:r}}var nf=function(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=ef(0,0,0,0),this.target=t};nf.prototype.isActive=function(){var t=tf(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},nf.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t};var rf=function(t,e){var n=function(t){var e=t.x,n=t.y,r=t.width,i=t.height,a="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,o=Object.create(a.prototype);return Xh(o,{x:e,y:n,width:r,height:i,top:n,right:e+r,bottom:i+n,left:e}),o}(e);Xh(this,{target:t,contentRect:n})},af=function(t,e,n){if(this.activeObservations_=[],this.observations_=new Uh,"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};af.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 qh(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new nf(t)),this.controller_.addObserver(this),this.controller_.refresh())}},af.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 qh(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))}},af.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},af.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},af.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new rf(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},af.prototype.clearActive=function(){this.activeObservations_.splice(0)},af.prototype.hasActive=function(){return this.activeObservations_.length>0};var of="undefined"!=typeof WeakMap?new WeakMap:new Uh,sf=function(t){if(!(this instanceof sf))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=Yh.getInstance(),n=new af(t,e,this);of.set(this,n)};["observe","unobserve","disconnect"].forEach((function(t){sf.prototype[t]=function(){return(e=of.get(this))[t].apply(e,arguments);var e}}));var uf=void 0!==Hh.ResizeObserver?Hh.ResizeObserver:sf,lf=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.getSVGElementSize=function(t,e){t.attr||(t=ma(t));var n,r,i,a,o={width:0,height:0},s=function(t){t&&Object.keys(o).forEach((function(e){if(t[e]){var n=t[e],r=parseFloat(n);n&&r>o[e]&&-1===(""+n).indexOf("%")&&(o[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{a={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),o.width>0&&o.height>0))return o;if(e.useClientDimensions&&(s(l),o.width>0&&o.height>0))return l;if(e.useBBox&&(s(r),o.width>0&&o.height>0))return r;if(e.useBoundingRect&&(s(a),o.width>0&&o.height>0))return a}try{s({width:da.getProperty(t.node(),"width","baseVal","value"),height:da.getProperty(t.node(),"height","baseVal","value")})}catch(t){s(l),s(r),s(u)}return o},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.getAlignmentOffset=function(t,n,r){var i=e.getSVGElementSize(n,{useBBox:!0}),a=e.getSVGElementSize(r,{useAttr:!0}).width,o=0;return t===P.CENTER?o=Math.floor((a-i.width)/2):t===P.RIGHT&&(o=a-i.width),o},e.prototype.init=function(){this.styleHolderElement(),this.addSVGElement(),this.verifyCSSStylesBeingApplied(),this.model.getOptions().resizable&&this.addResizeListener(),this.addHolderListeners()},e.prototype.update=function(){this.styleHolderElement()},e.prototype.styleHolderElement=function(){var t=this.getHolder();ma(this.getHolder()).classed(Gh.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=this.model.getOptions(),e=da.getProperty(t,"style","prefix"),n=ma(this.getHolder()).append("svg").classed(Gh.prefix+"--"+e+"--chart-svg",!0).attr("height","100%").attr("width","100%");n.append("g").attr("class","DONT_STYLE_ME_css_styles_verifier"),this.svg=n.node()},e.prototype.verifyCSSStylesBeingApplied=function(){var t=this;setTimeout((function(){var e=ma(t.svg).select("g.DONT_STYLE_ME_css_styles_verifier").node(),n=getComputedStyle(e);"hidden"===n.getPropertyValue("overflow")&&"0"===n.getPropertyValue("opacity")||console.error("Missing CSS styles for Carbon Charts. Please read the Carbon Charts getting started guide.")}))},e.prototype.setSVGMaxHeight=function(){if(!this.model.getOptions().height){var t=e.getSVGElementSize(ma(this.svg),{useBBox:!0}).height,n=ma(this.svg).attr("class"),r=ma(this.svg).selectAll("."+n+" > svg"),i=0;r.nodes().forEach((function(t){i+=Number(e.getSVGElementSize(ma(t),{useBBox:!0}).height)})),i<=t?ma(this.svg).attr("height",i):ma(this.svg).attr("height","100%")}},e.prototype.getMainSVG=function(){return this.svg},e.prototype.addHolderListeners=function(){var t=this,e=this.getHolder();e&&ma(e).on("mouseover",(function(){t.services.events.dispatchEvent(j.Chart.MOUSEOVER)})).on("mouseout",(function(){t.services.events.dispatchEvent(j.Chart.MOUSEOUT)}))},e.prototype.addResizeListener=function(){var t=this,e=this.getHolder();if(e){var n=e.clientWidth,r=e.clientHeight,i=da.debounce((function(i,a){e&&(Math.abs(n-e.clientWidth)>1||Math.abs(r-e.clientHeight)>1)&&(n=e.clientWidth,r=e.clientHeight,t.services.events.dispatchEvent(j.Chart.RESIZE))}),12.5);new uf(i).observe(e)}},e}(Bh),cf=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}(Bh),hf={value:function(){}};function ff(){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 df(r)}function df(t){this._=t}function pf(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 gf(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function vf(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=hf,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}df.prototype=ff.prototype={constructor:df,on:function(t,e){var n,r=this._,i=pf(t+"",r),a=-1,o=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<o;)if(n=(t=i[a]).type)r[n]=vf(r[n],t.name,e);else if(null==e)for(n in r)r[n]=vf(r[n],t.name,null);return this}for(;++a<o;)if((n=(t=i[a]).type)&&(n=gf(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new df(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].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,a=r.length;i<a;++i)r[i].value.apply(e,n)}};var mf,yf,_f=0,bf=0,xf=0,wf=0,Of=0,Ef=0,Sf="object"==typeof performance&&performance.now?performance:Date,Tf="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Mf(){return Of||(Tf(Af),Of=Sf.now()+Ef)}function Af(){Of=0}function Cf(){this._call=this._time=this._next=null}function Df(t,e,n){var r=new Cf;return r.restart(t,e,n),r}function Pf(){Of=(wf=Sf.now())+Ef,_f=bf=0;try{!function(){Mf(),++_f;for(var t,e=mf;e;)(t=Of-e._time)>=0&&e._call.call(null,t),e=e._next;--_f}()}finally{_f=0,function(){var t,e,n=mf,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:mf=e);yf=t,Lf(r)}(),Of=0}}function kf(){var t=Sf.now(),e=t-wf;e>1e3&&(Ef-=e,wf=t)}function Lf(t){_f||(bf&&(bf=clearTimeout(bf)),t-Of>24?(t<1/0&&(bf=setTimeout(Pf,t-Sf.now()-Ef)),xf&&(xf=clearInterval(xf))):(xf||(wf=Sf.now(),xf=setInterval(kf,1e3)),_f=1,Tf(Pf)))}function Rf(t,e,n){var r=new Cf;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}Cf.prototype=Df.prototype={constructor:Cf,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Mf():+n)+(null==e?0:+e),this._next||yf===this||(yf?yf._next=this:mf=this,yf=this),this._call=t,this._time=n,Lf()},stop:function(){this._call&&(this._call=null,this._time=1/0,Lf())}};var If=ff("start","end","cancel","interrupt"),Nf=[];function Vf(t,e,n,r,i,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function a(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 Rf(a);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(Rf((function(){3===n.state&&(n.state=4,n.timer.restart(o,n.delay,n.time),o(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 o(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(s),n.state=5,1),a=-1,o=r.length;++a<o;)r[a].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=Df((function(t){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=t&&a(t-n.delay)}),0,n.time)}(t,n,{name:e,index:r,group:i,on:If,tween:Nf,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function Bf(t,e){var n=Uf(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function Gf(t,e){var n=Uf(t,e);if(n.state>3)throw new Error("too late; already running");return n}function Uf(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function zf(t,e){var n,r,i,a=t.__transition,o=!0;if(a){for(i in e=null==e?null:e+"",a)(n=a[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 a[i]):o=!1;o&&delete t.__transition}}function Hf(t,e){var n,r;return function(){var i=Gf(this,t),a=i.tween;if(a!==n)for(var o=0,s=(r=n=a).length;o<s;++o)if(r[o].name===e){(r=r.slice()).splice(o,1);break}i.tween=r}}function Ff(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var a=Gf(this,t),o=a.tween;if(o!==r){i=(r=o).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)}a.tween=i}}function jf(t,e,n){var r=t._id;return t.each((function(){var t=Gf(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return Uf(t,r).value[e]}}function Wf(t,e){var n;return("number"==typeof e?ws:e instanceof es?ys:(n=es(e))?(e=n,ys):Ts)(t,e)}function Yf(t){return function(){this.removeAttribute(t)}}function Xf(t){return function(){this.removeAttributeNS(t.space,t.local)}}function qf(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttribute(t);return o===a?null:o===r?i:i=e(r=o,n)}}function Zf(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttributeNS(t.space,t.local);return o===a?null:o===r?i:i=e(r=o,n)}}function Kf(t,e,n){var r,i,a;return function(){var o,s,u=n(this);if(null!=u)return(o=this.getAttribute(t))===(s=u+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,u));this.removeAttribute(t)}}function $f(t,e,n){var r,i,a;return function(){var o,s,u=n(this);if(null!=u)return(o=this.getAttributeNS(t.space,t.local))===(s=u+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,u));this.removeAttributeNS(t.space,t.local)}}function Qf(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 td(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 ed(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&Qf(t,i)),n}return i._value=e,i}function nd(t,e){return function(){Bf(this,t).delay=+e.apply(this,arguments)}}function rd(t,e){return e=+e,function(){Bf(this,t).delay=e}}function id(t,e){return function(){Gf(this,t).duration=+e.apply(this,arguments)}}function ad(t,e){return e=+e,function(){Gf(this,t).duration=e}}function od(t,e){if("function"!=typeof e)throw new Error;return function(){Gf(this,t).ease=e}}function sd(t,e,n){var r,i,a=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)?Bf:Gf;return function(){var o=a(this,t),s=o.on;s!==r&&(i=(r=s).copy()).on(e,n),o.on=i}}var ud=va.prototype.constructor;function ld(t){return function(){this.style.removeProperty(t)}}function cd(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function hd(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&cd(t,a,n)),r}return a._value=e,a}function fd(t){return function(e){this.textContent=t.call(this,e)}}function dd(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&fd(r)),e}return r._value=t,r}var pd=0;function gd(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function vd(t){return va().transition(t)}function md(){return++pd}var yd=va.prototype;function _d(t){return+t}gd.prototype=vd.prototype={constructor:gd,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=pi(t));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var s,u,l=r[o],c=l.length,h=a[o]=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,Vf(h[f],e,n,f,h,Uf(s,n)));return new gd(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=vi(t));for(var r=this._groups,i=r.length,a=[],o=[],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=Uf(u,n),g=0,v=d.length;g<v;++g)(f=d[g])&&Vf(f,e,n,g,d,p);a.push(d),o.push(u)}return new gd(a,o,e,n)},filter:function(t){"function"!=typeof t&&(t=mi(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,u=r[i]=[],l=0;l<s;++l)(a=o[l])&&t.call(a,a.__data__,l,o)&&u.push(a);return new gd(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,a=Math.min(r,i),o=new Array(r),s=0;s<a;++s)for(var u,l=e[s],c=n[s],h=l.length,f=o[s]=new Array(h),d=0;d<h;++d)(u=l[d]||c[d])&&(f[d]=u);for(;s<r;++s)o[s]=e[s];return new gd(o,this._parents,this._name,this._id)},selection:function(){return new ud(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=md(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],u=s.length,l=0;l<u;++l)if(o=s[l]){var c=Uf(o,e);Vf(o,t,n,l,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new gd(r,this._parents,t,n)},call:yd.call,nodes:yd.nodes,node:yd.node,size:yd.size,empty:yd.empty,each:yd.each,on:function(t,e){var n=this._id;return arguments.length<2?Uf(this.node(),n).on.on(t):this.each(sd(n,t,e))},attr:function(t,e){var n=li(t),r="transform"===n?Bs:Wf;return this.attrTween(t,"function"==typeof e?(n.local?$f:Kf)(n,r,jf(this,"attr."+t,e)):null==e?(n.local?Xf:Yf)(n):(n.local?Zf:qf)(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=li(t);return this.tween(n,(r.local?td:ed)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?Vs:Wf;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var a=Li(this,t),o=(this.style.removeProperty(t),Li(this,t));return a===o?null:a===n&&o===r?i:i=e(n=a,r=o)}}(t,r)).on("end.style."+t,ld(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,a;return function(){var o=Li(this,t),s=n(this),u=s+"";return null==s&&(this.style.removeProperty(t),u=s=Li(this,t)),o===u?null:o===r&&u===i?a:(i=u,a=e(r=o,s))}}(t,r,jf(this,"style."+t,e))).each(function(t,e){var n,r,i,a,o="style."+e,s="end."+o;return function(){var u=Gf(this,t),l=u.on,c=null==u.value[o]?a||(a=ld(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,a=n+"";return function(){var o=Li(this,t);return o===a?null:o===r?i:i=e(r=o,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,hd(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}}(jf(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,dd(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=Uf(this.node(),n).tween,a=0,o=i.length;a<o;++a)if((r=i[a]).name===t)return r.value;return null}return this.each((null==e?Hf:Ff)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?nd:rd)(e,t)):Uf(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?id:ad)(e,t)):Uf(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(od(e,t)):Uf(this.node(),e).ease},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(a,o){var s={value:o},u={value:function(){0==--i&&a()}};n.each((function(){var n=Gf(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 bd={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function xd(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return bd.time=Mf(),bd;return n}va.prototype.interrupt=function(t){return this.each((function(){zf(this,t)}))},va.prototype.transition=function(t){var e,n;t instanceof gd?(e=t._id,t=t._name):(e=md(),(n=bd).time=Mf(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],u=s.length,l=0;l<u;++l)(o=s[l])&&Vf(o,t,e,l,s,n||xd(o,e));return new gd(r,this._parents,t,e)};var wd=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(j.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=vd(t).duration(da.getProperty(ja,t,"duration")||ja.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=vd(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}(Bh),Od=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.appendOrUpdateLinearGradient=function(t){var e=t.svg.select("defs linearGradient#"+t.id);e.empty()&&(e=t.svg.append("defs").append("linearGradient").attr("id",t.id).attr("x1",t.x1).attr("x2",t.x2).attr("y1",t.y1).attr("y2",t.y2)),e.selectAll("stop").data(t.stops).enter().append("stop").attr("offset",(function(t){return t.offset})).style("stop-color",(function(t){return t.color})).style("stop-opacity",(function(t){return t.opacity}))},e.getOffsetRatio=function(t){return(100*Math.abs(t[1])/Math.abs(t[0]-t[1])).toFixed(2)+"%"},e.getStops=function(t,n){var r=[{offset:"0%",color:n,opacity:"0.6"},{offset:"80%",color:n,opacity:"0"}];return t[0]<0&&t[1]>0&&(r=[{offset:"0%",color:n,opacity:"0.6"},{offset:e.getOffsetRatio(t),color:n,opacity:"0"},{offset:"100%",color:n,opacity:"0.6"}]),r},e}(Bh);function Ed(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 Td(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ed(t),r=Sd(e);return n.setDate(n.getDate()+r),n}function Md(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ed(t).getTime(),r=Sd(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=Sd(e);return Md(t,36e5*n)}function Cd(t){var e=new Date(t.getTime()),n=Math.ceil(e.getTimezoneOffset());return e.setSeconds(0,0),6e4*n+e.getTime()%6e4}function Dd(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Ed(t);return e.setHours(0,0,0,0),e}function Pd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Dd(t),r=Dd(e),i=n.getTime()-Cd(n),a=r.getTime()-Cd(r);return Math.round((i-a)/864e5)}function kd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Sd(e);return Md(t,6e4*n)}function Ld(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Ed(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 Rd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ed(t),r=Sd(e),i=n.getMonth()+r,a=new Date(0);a.setFullYear(n.getFullYear(),i,1),a.setHours(0,0,0,0);var o=Ld(a);return n.setMonth(i,Math.min(o,n.getDate())),n}function Id(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Sd(e);return Md(t,1e3*n)}function Nd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Sd(e);return Rd(t,12*n)}function Vd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ed(t),r=Ed(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=Ed(t);return!isNaN(e)}function Gd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ed(t),r=Ed(e),i=n.getFullYear()-r.getFullYear(),a=n.getMonth()-r.getMonth();return 12*i+a}function Ud(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ed(t),r=Ed(e);return n.getFullYear()-r.getFullYear()}function zd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ed(t),r=Ed(e);return n.getTime()-r.getTime()}function Hd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=zd(t,e)/6e4;return n>0?Math.floor(n):Math.ceil(n)}function Fd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=zd(t,e)/1e3;return n>0?Math.floor(n):Math.ceil(n)}var jd={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 Wd(t){return function(e){var n=e||{},r=n.width?String(n.width):t.defaultWidth;return t.formats[r]||t.formats[t.defaultWidth]}}var Yd={date:Wd({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Wd({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:Wd({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Xd={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function qd(t){return function(e,n){var r,i=n||{};if("formatting"===(i.context?String(i.context):"standalone")&&t.formattingValues){var a=t.defaultFormattingWidth||t.defaultWidth,o=i.width?String(i.width):a;r=t.formattingValues[o]||t.formattingValues[a]}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 Zd(t){return function(e,n){var r=String(e),i=n||{},a=i.width,o=a&&t.matchPatterns[a]||t.matchPatterns[t.defaultMatchWidth],s=r.match(o);if(!s)return null;var u,l=s[0],c=a&&t.parsePatterns[a]||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 Kd,$d={code:"en-US",formatDistance:function(t,e,n){var r;return n=n||{},r="string"==typeof jd[t]?jd[t]:1===e?jd[t].one:jd[t].other.replace("{{count}}",e),n.addSuffix?n.comparison>0?"in "+r:r+" ago":r},formatLong:Yd,formatRelative:function(t,e,n,r){return Xd[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:qd({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:qd({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:qd({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:qd({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:qd({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:(Kd={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(Kd.matchPattern);if(!i)return null;var a=i[0],o=n.match(Kd.parsePattern);if(!o)return null;var s=Kd.valueCallback?Kd.valueCallback(o[0]):o[0];return{value:s=r.valueCallback?r.valueCallback(s):s,rest:n.slice(a.length)}}),era:Zd({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:Zd({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:Zd({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:Zd({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:Zd({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 Qd(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 Jd(t,e){for(var n=t<0?"-":"",r=Math.abs(t).toString();r.length<e;)r="0"+r;return n+r}var tp=function(t,e){var n=t.getUTCFullYear(),r=n>0?n:1-n;return Jd("yy"===e?r%100:r,e.length)},ep=function(t,e){var n=t.getUTCMonth();return"M"===e?String(n+1):Jd(n+1,2)},np=function(t,e){return Jd(t.getUTCDate(),e.length)},rp=function(t,e){return Jd(t.getUTCHours()%12||12,e.length)},ip=function(t,e){return Jd(t.getUTCHours(),e.length)},ap=function(t,e){return Jd(t.getUTCMinutes(),e.length)},op=function(t,e){return Jd(t.getUTCSeconds(),e.length)},sp=function(t,e){var n=e.length,r=t.getUTCMilliseconds();return Jd(Math.floor(r*Math.pow(10,n-3)),e.length)};function up(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=1,n=Ed(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 lp(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Ed(t),n=e.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var i=up(r),a=new Date(0);a.setUTCFullYear(n,0,4),a.setUTCHours(0,0,0,0);var o=up(a);return e.getTime()>=i.getTime()?n+1:e.getTime()>=o.getTime()?n:n-1}function cp(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=lp(t),n=new Date(0);n.setUTCFullYear(e,0,4),n.setUTCHours(0,0,0,0);var r=up(n);return r}function hp(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,a=null==i?0:Sd(i),o=null==n.weekStartsOn?a:Sd(n.weekStartsOn);if(!(o>=0&&o<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=Ed(t),u=s.getUTCDay(),l=(u<o?7:0)+u-o;return s.setUTCDate(s.getUTCDate()-l),s.setUTCHours(0,0,0,0),s}function fp(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Ed(t,e),r=n.getUTCFullYear(),i=e||{},a=i.locale,o=a&&a.options&&a.options.firstWeekContainsDate,s=null==o?1:Sd(o),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=hp(l,e),h=new Date(0);h.setUTCFullYear(r,0,u),h.setUTCHours(0,0,0,0);var f=hp(h,e);return n.getTime()>=c.getTime()?r+1:n.getTime()>=f.getTime()?r:r-1}function dp(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,a=null==i?1:Sd(i),o=null==n.firstWeekContainsDate?a:Sd(n.firstWeekContainsDate),s=fp(t,e),u=new Date(0);u.setUTCFullYear(s,0,o),u.setUTCHours(0,0,0,0);var l=hp(u,e);return l}var pp="midnight",gp="noon",vp="morning",mp="afternoon",yp="evening",_p="night",bp={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 tp(t,e)},Y:function(t,e,n,r){var i=fp(t,r),a=i>0?i:1-i;return"YY"===e?Jd(a%100,2):"Yo"===e?n.ordinalNumber(a,{unit:"year"}):Jd(a,e.length)},R:function(t,e){return Jd(lp(t),e.length)},u:function(t,e){return Jd(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 Jd(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 Jd(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 ep(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 Jd(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=Ed(t),r=hp(n,e).getTime()-dp(n,e).getTime();return Math.round(r/6048e5)+1}(t,r);return"wo"===e?n.ordinalNumber(i,{unit:"week"}):Jd(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=Ed(t),n=up(e).getTime()-cp(e).getTime();return Math.round(n/6048e5)+1}(t);return"Io"===e?n.ordinalNumber(r,{unit:"week"}):Jd(r,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):np(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=Ed(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"}):Jd(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(),a=(i-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(a);case"ee":return Jd(a,2);case"eo":return n.ordinalNumber(a,{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(),a=(i-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(a);case"cc":return Jd(a,e.length);case"co":return n.ordinalNumber(a,{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 Jd(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?gp:0===i?pp: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?yp:i>=12?mp:i>=4?vp:_p,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 rp(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):ip(t,e)},K:function(t,e,n){var r=t.getUTCHours()%12;return"Ko"===e?n.ordinalNumber(r,{unit:"hour"}):Jd(r,e.length)},k:function(t,e,n){var r=t.getUTCHours();return 0===r&&(r=24),"ko"===e?n.ordinalNumber(r,{unit:"hour"}):Jd(r,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):ap(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):op(t,e)},S:function(t,e){return sp(t,e)},X:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();if(0===i)return"Z";switch(e){case"X":return wp(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 wp(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"+xp(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"+xp(i,":");case"zzzz":default:return"GMT"+Op(i,":")}},t:function(t,e,n,r){var i=r._originalDate||t;return Jd(Math.floor(i.getTime()/1e3),e.length)},T:function(t,e,n,r){return Jd((r._originalDate||t).getTime(),e.length)}};function xp(t,e){var n=t>0?"-":"+",r=Math.abs(t),i=Math.floor(r/60),a=r%60;if(0===a)return n+String(i);var o=e||"";return n+String(i)+o+Jd(a,2)}function wp(t,e){return t%60==0?(t>0?"-":"+")+Jd(Math.abs(t)/60,2):Op(t,e)}function Op(t,e){var n=e||"",r=t>0?"-":"+",i=Math.abs(t);return r+Jd(Math.floor(i/60),2)+n+Jd(i%60,2)}function Ep(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 Tp={p:Sp,P:function(t,e){var n,r=t.match(/(P+)(p+)?/),i=r[1],a=r[2];if(!a)return Ep(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}}",Ep(i,e)).replace("{{time}}",Sp(a,e))}},Mp=["D","DD"],Ap=["YY","YYYY"];function Cp(t){return-1!==Mp.indexOf(t)}function Dp(t){return-1!==Ap.indexOf(t)}function Pp(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 kp=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Lp=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Rp=/^'([^]*?)'?$/,Ip=/''/g,Np=/[a-zA-Z]/;function Vp(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=String(e),i=n||{},a=i.locale||$d,o=a.options&&a.options.firstWeekContainsDate,s=null==o?1:Sd(o),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=a.options&&a.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(!a.localize)throw new RangeError("locale must contain localize property");if(!a.formatLong)throw new RangeError("locale must contain formatLong property");var f=Ed(t);if(!Bd(f))throw new RangeError("Invalid time value");var d=Cd(f),p=Qd(f,d),g={firstWeekContainsDate:u,weekStartsOn:h,locale:a,_originalDate:f},v=r.match(Lp).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,Tp[e])(t,a.formatLong,g):t})).join("").match(kp).map((function(t){if("''"===t)return"'";var e=t[0];if("'"===e)return Bp(t);var n=bp[e];if(n)return!i.useAdditionalWeekYearTokens&&Dp(t)&&Pp(t),!i.useAdditionalDayOfYearTokens&&Cp(t)&&Pp(t),n(p,t,a.localize,g);if(e.match(Np))throw new RangeError("Format string contains an unescaped latin alphabet character `"+e+"`");return t})).join("");return v}function Bp(t){return t.match(Rp)[1].replace(Ip,"'")}function Gp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Sd(e);return Td(t,-n)}function Up(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Sd(e);return Ad(t,-n)}function zp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Sd(e);return kd(t,-n)}function Hp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Sd(e);return Rd(t,-n)}function Fp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Sd(e);return Id(t,-n)}function jp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Sd(e);return Nd(t,-n)}var Wp=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.getAxisOptions=function(t){return da.getProperty(this.model.getOptions(),"axes",t)},e.prototype.getDomainAxisOptions=function(){var t=this.getDomainAxisPosition();return this.getAxisOptions(t)},e.prototype.getRangeAxisOptions=function(){var t=this.getRangeAxisPosition();return this.getAxisOptions(t)},e.prototype.update=function(t){var e=this;this.findDomainAndRangeAxes(),this.determineOrientation(),Object.keys(S).map((function(t){return S[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!==S.LEFT&&this.rangeAxisPosition!==S.RIGHT||this.domainAxisPosition!==S.BOTTOM&&this.domainAxisPosition!==S.TOP?this.orientation=A.HORIZONTAL:this.orientation=A.VERTICAL},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.getDomainAxisScaleType=function(){var t=this.getDomainAxisPosition();return this.getScaleTypeByPosition(t)},e.prototype.getRangeAxisScaleType=function(){var t=this.getRangeAxisPosition();return this.getScaleTypeByPosition(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=[S.BOTTOM,S.TOP];return[this.domainAxisPosition,this.rangeAxisPosition].find((function(e){return t.indexOf(e)>-1}))},e.prototype.getMainYAxisPosition=function(){var t=[S.LEFT,S.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,r,i){var a,o=this.model.getOptions(),s=da.getProperty(o,"axes")[n].mapsTo,u=void 0!==r[s]?r[s]:r;switch(e){case C.LABELS:a=t(u)+t.step()/2;break;case C.TIME:a=t(new Date(u));break;default:a=t(u)}return a},e.prototype.getValueThroughAxisPosition=function(t,e,n){var r=this.scaleTypes[t],i=this.scales[t];return this.getValueFromScale(i,r,t,e,n)},e.prototype.getDomainValue=function(t,e){return this.getValueThroughAxisPosition(this.domainAxisPosition,t,e)},e.prototype.getRangeValue=function(t,e){return this.getValueThroughAxisPosition(this.rangeAxisPosition,t,e)},e.prototype.getMainXScaleType=function(){return this.getScaleTypeByPosition(this.getMainXAxisPosition())},e.prototype.getMainYScaleType=function(){return this.getScaleTypeByPosition(this.getMainYAxisPosition())},e.prototype.getDomainIdentifier=function(){var t=this.model.getOptions();return da.getProperty(t,"axes",this.domainAxisPosition).mapsTo},e.prototype.getRangeIdentifier=function(){var t=this.model.getOptions();return da.getProperty(t,"axes",this.rangeAxisPosition).mapsTo},e.prototype.extendsDomain=function(t,e){var n=this.model.getOptions();return da.getProperty(n,"axes",t).scaleType===C.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=Ed(t),r=Ed(e),i=Vd(n,r),a=Math.abs(Ud(n,r));n.setFullYear(n.getFullYear()-i*a);var o=Vd(n,r)===-i,s=i*(a-o);return 0===s?0:s}(r,n)>1)return[jp(n,e),Nd(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ed(t),r=Ed(e),i=Vd(n,r),a=Math.abs(Gd(n,r));n.setMonth(n.getMonth()-i*a);var o=Vd(n,r)===-i,s=i*(a-o);return 0===s?0:s}(r,n)>1)return[Hp(n,e),Rd(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ed(t),r=Ed(e),i=Vd(n,r),a=Math.abs(Pd(n,r));n.setDate(n.getDate()-i*a);var o=Vd(n,r)===-i,s=i*(a-o);return 0===s?0:s}(r,n)>1)return[Gp(n,e),Td(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=zd(t,e)/36e5;return n>0?Math.floor(n):Math.ceil(n)}(r,n)>1)return[Up(n,e),Ad(r,e)];if(Hd(r,n)>30)return[zp(n,30*e),kd(r,30*e)];if(Hd(r,n)>1)return[zp(n,e),kd(r,e)];if(Fd(r,n)>15)return[Fp(n,15*e),Id(r,15*e)];if(Fd(r,n)>1)return[Fp(n,e),Id(r,e)];return[n,r]}(e,da.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,Na.paddingRatio)},e.prototype.findMainVerticalAxisPosition=function(){var t=this.model.getOptions(),e=da.getProperty(t,"axes");return null===da.getProperty(e,S.LEFT)&&null!==da.getProperty(e,S.RIGHT)||!0===da.getProperty(e,S.RIGHT,"main")?S.RIGHT:S.LEFT},e.prototype.findMainHorizontalAxisPosition=function(){var t=this.model.getOptions(),e=da.getProperty(t,"axes");return null===da.getProperty(e,S.BOTTOM)&&null!==da.getProperty(e,S.TOP)||!0===da.getProperty(e,S.TOP,"main")?S.TOP:S.BOTTOM},e.prototype.findDomainAndRangeAxesPositions=function(t,e){var n=this.model.getOptions(),r=da.getProperty(n,"axes",t),i=da.getProperty(n,"axes",e),a=r.scaleType||C.LINEAR,o=i.scaleType||C.LINEAR,s={domainAxisPosition:null,rangeAxisPosition:null};return o===C.LABELS||o===C.TIME?(s.domainAxisPosition=e,s.rangeAxisPosition=t):a===C.LABELS||a===C.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=da.getProperty(e,"axes",t),r=n.includeZero,i=da.getProperty(n,"scaleType")||C.LINEAR;if(this.model.isDataEmpty())return[];var a,o,s=this.model.getDisplayData(),u=n.mapsTo,l=n.percentage;if(n.domain)return i===C.LABELS?n.domain:(i===C.TIME&&(n.domain=n.domain.map((function(t){return void 0===t.getTime?new Date(t):t}))),this.extendsDomain(t,n.domain));if(l)return[0,100];if(n&&i===C.LABELS)return vo(s,(function(t){return t[u]})).keys();n.stacked?o=this.services.zoom.filterDataForRangeAxis(this.model.getDataValuesGroupedByKeys(),{stacked:!0}).map((function(t){return Po(function(t){var e=[];for(var n in t)e.push(t[n]);return e}(t))})):o=i===C.TIME?s.map((function(t){return t[u]})):this.services.zoom.filterDataForRangeAxis(s).map((function(t){return t[u]}));return i!==C.TIME&&r&&o.push(0),a=wo(o),a=this.extendsDomain(t,a)},e.prototype.createScale=function(t){var e=this.model.getOptions(),n=da.getProperty(e,"axes",t);if(!n)return null;var r,i=da.getProperty(n,"scaleType")||C.LINEAR;return this.scaleTypes[t]=i,(r=i===C.TIME?oc():i===C.LOG?function t(){var e=bu(Xs()).domain([1,10]);return e.copy=function(){return Ys(e,t()).base(e.base())},ko.apply(e,arguments),e}().base(n.base||10):i===C.LABELS?Bo():fu()).domain(this.getScaleDomain(t)),r},e.prototype.getHighestDomainThreshold=function(){var t=da.getProperty(this.model.getOptions(),"axes"),e=this.getDomainAxisPosition(),n=t[e].thresholds;if(!n)return null;var r=this.getDomainScale(),i=n.sort((function(t,e){return e.value-t.value}))[0];return this.getScaleTypeByPosition(e)!==C.TIME||"string"!=typeof i.value&&void 0!==i.value.getTime||(i.value=new Date(i.value)),{threshold:i,scaleValue:r(i.value)}},e.prototype.getHighestRangeThreshold=function(){var t=da.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}(Bh);var Yp,Xp,qp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.curveTypes={curveLinear:Rc,curveLinearClosed:mh,curveBasis:Zc,curveBasisClosed:$c,curveBasisOpen:Jc,curveBundle:eh,curveCardinal:ih,curveCardinalClosed:oh,curveCardinalOpen:uh,curveCatmullRom:hh,curveCatmullRomClosed:dh,curveCatmullRomOpen:gh,curveMonotoneX:Sh,curveMonotoneY:Th,curveNatural:Ch,curveStep:Ph,curveStepAfter:Lh,curveStepBefore:kh},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}(Bh),Zp=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.isZoomBarEnabled=function(){if(!this.services.cartesianScales)return!1;if(!da.getProperty(this.model.getOptions(),"zoomBar","top","enabled"))return!1;this.services.cartesianScales.findDomainAndRangeAxes();var t=this.services.cartesianScales.getMainXAxisPosition(),e=da.getProperty(this.model.getOptions(),"axes",t,"scaleType");return t===S.BOTTOM&&e===C.TIME},e.prototype.getZoomBarData=function(){var t=this.model.getZoomBarData();return t&&t.length>1?t:this.model.getDisplayData()},e.prototype.getDefaultZoomBarDomain=function(t){var e=t||this.services.zoom.getZoomBarData(),n=this.services.cartesianScales,r=n.getMainXAxisPosition(),i=n.getDomainIdentifier();return n.extendsDomain(r,wo(e,(function(t){return t[i]})))},e.prototype.handleDomainChange=function(t,e){void 0===e&&(e={dispatchEvent:!0}),this.model.set({zoomDomain:t},{animate:!1}),e.dispatchEvent&&this.services.events.dispatchEvent(j.ZoomDomain.CHANGE,{newDomain:t})},e.prototype.getZoomRatio=function(){return da.getProperty(this.model.getOptions(),"zoomBar","zoomRatio")},e.prototype.filterDataForRangeAxis=function(t,e){var n=this.model.get("zoomDomain"),r=Object.assign({stacked:!1},e),i=da.getProperty(this.model.getOptions(),"zoomBar","updateRangeAxis");if(this.isZoomBarEnabled()&&i&&n){var a=r.stacked?"sharedStackKey":this.services.cartesianScales.getDomainIdentifier(),o=t.filter((function(t){return new Date(t[a])>=n[0]&&new Date(t[a])<=n[1]}));if(o.length>0)return o}return t},e.prototype.zoomIn=function(t){void 0===t&&(t=this.getZoomRatio());var e=this.model.get("zoomDomain"),n=Ya.handleWidth,r=this.services.cartesianScales.getMainXScale().copy();r.domain(this.getDefaultZoomBarDomain());var i=r(e[0]),a=r(e[1]);if(!(a-i<n+1)){var o=r.range(),s=a-i,u=Math.min((o[1]-o[0])/2*(t/2),s/2),l=i+u,c=a-u;l>=c&&(l=i+s/2-n/2,c=a-s/2+n/2);var h=[r.invert(l),r.invert(c)];e[0].valueOf()===h[0].valueOf()&&e[1].valueOf()===h[1].valueOf()||this.handleDomainChange(h)}},e.prototype.zoomOut=function(t){void 0===t&&(t=this.getZoomRatio());var e=this.model.get("zoomDomain"),n=this.services.cartesianScales.getMainXScale().copy();n.domain(this.getDefaultZoomBarDomain());var r=n(e[0]),i=n(e[1]),a=n.range(),o=(a[1]-a[0])/2*(t/2),s=Math.max(r-o,a[0]),u=Math.min(i+o,a[1]),l=[n.invert(s),n.invert(u)];e[0].valueOf()===l[0].valueOf()&&e[1].valueOf()===l[1].valueOf()||this.handleDomainChange(l)},e.prototype.resetZoomDomain=function(){var t=this.model.get("zoomDomain"),e=this.getDefaultZoomBarDomain();t[0].valueOf()===e[0].valueOf()&&t[1].valueOf()===e[1].valueOf()||this.handleDomainChange(e)},e.prototype.isMinZoomDomain=function(){var t=this.model.get("zoomDomain"),e=this.getDefaultZoomBarDomain();return!(!t||!e)&&(t[1].valueOf()-t[0].valueOf())/(e[1].valueOf()-e[0].valueOf())<da.getProperty(this.model.getOptions(),"zoomBar","minZoomRatio")},e.prototype.isMaxZoomDomain=function(){var t=this.model.get("zoomDomain"),e=this.getDefaultZoomBarDomain();return!(!t||!e||t[0].valueOf()!==e[0].valueOf()||t[1].valueOf()!==e[1].valueOf())},e.prototype.isEmptyState=function(){return 0===this.getZoomBarData().length},e.prototype.isZoomBarLoading=function(t){return da.getProperty(this.model.getOptions(),"zoomBar",t,"loading")},e.prototype.isZoomBarLocked=function(t){return da.getProperty(this.model.getOptions(),"zoomBar",t,"locked")},e}(Bh),Kp=function(){function t(t,e,n){this.configs={},this.model=t,this.services=e,n&&(this.configs=n),this.parent||this.setParent(ma(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=da.getProperty(this.model.getOptions(),"style","prefix");this.parent.classed(Gh.prefix+"--"+n+"--"+this.type,!0),e&&e.classed(Gh.prefix+"--"+n+"--"+this.type,!1)}},t.prototype.getParent=function(){return this.parent},t.prototype.getContainerSVG=function(t){if(void 0===t&&(t={withinChartClip:!1}),this.type){var e=da.getProperty(this.model.getOptions(),"style","prefix"),n=lf.appendOrSelect(this.parent,"g."+Gh.prefix+"--"+e+"--"+this.type);if(t.withinChartClip){var r=this.model.get("chartClipId");r&&n.attr("clip-path","url(#"+r+")")}return n}return this.parent},t}(),$p=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.GROUP).attr("data-name","legend-items"),n=this.model.getOptions(),i=da.getProperty(n,"legend"),a=this.model.getDataGroups(),o=da.getProperty(i,"order");o&&(a=this.sortDataGroups(a,o));var s=e.selectAll("g.legend-item").data(a,(function(t){return t.name})),u=s.enter().append("g").classed("legend-item",!0).classed("active",(function(t,e){return t.status===Va.items.status.ACTIVE})),l=Va.checkbox.radius,c=da.getProperty(i,"truncation","type"),h=da.getProperty(i,"truncation","threshold"),f=da.getProperty(i,"truncation","numCharacter"),d=da.getProperty(n,"color","pairing","option");u.append("rect").classed("checkbox",!0).merge(s.select("rect.checkbox")).attr("role",r.CHECKBOX).attr("tabindex",0).attr("aria-label",(function(t){return t.name})).attr("aria-checked",(function(t){return t.status===Va.items.status.ACTIVE})).attr("width",2*l).attr("height",2*l).attr("rx",1).attr("ry",1).attr("class",(function(e,n){if(d)return t.model.getColorClassName({classNameTypes:[E.FILL],dataGroupName:e.name,originalClassName:"checkbox"})})).style("fill",(function(e){return e.status===Va.items.status.ACTIVE?t.model.getFillColor(e.name):null})).classed("active",(function(t,e){return t.status===Va.items.status.ACTIVE}));var p=u.append("text").merge(s.select("text"));c!==M.NONE?p.html((function(t){return t.name.length>h?da.truncateLabel(t.name,c,f):t.name})):p.html((function(t){return t.name})),this.breakItemsIntoLines(u),s.exit().on("mouseover",null).on("click",null).on("mouseout",null).remove();var g=da.getProperty(this.model.getOptions(),"legend","clickable");e.classed("clickable",g),g&&u.size()>0&&this.addEventListeners();var v=da.getProperty(i,"alignment"),m=lf.getAlignmentOffset(v,e,this.getParent());e.attr("transform","translate("+m+", 0)")},e.prototype.sortDataGroups=function(t,e){if(t.sort((function(t,n){return e.indexOf(t.name)-e.indexOf(n.name)})),e.length<t.length){var n=t.length-e.length;return t.slice(n).concat(t.slice(0,n))}return t},e.prototype.breakItemsIntoLines=function(t){var e=this,n=this.getContainerSVG(),r=this.model.getOptions(),i=Va.checkbox.radius,a=Va.items.horizontalSpace,o=Va.items.verticalSpace,s=Va.items.textYOffset,u=2*i+Va.checkbox.spaceAfter,l=Va.items.status.DISABLED,c=this.model.getDataGroups().some((function(t){return t.status===l})),h=da.getProperty(r,"legend","orientation"),f=0,d=0,p=0;t.merge(n.selectAll("g.legend-item")).each((function(t,r){var l=ma(this),g=ma(n.selectAll("g.legend-item").nodes()[r-1]);if(0===p||g.empty()||h===k.VERTICAL)h===k.VERTICAL&&0!==r&&d++;else{var v=lf.getSVGElementSize(e.parent,{useAttr:!0}),m=lf.getSVGElementSize(ma(this).select("text"),{useBBox:!0}),y=lf.getSVGElementSize(g.select("text"),{useBBox:!0});(f=f+y.width+u+a)+u+m.width>v.width&&(d++,f=0,p=0)}l.select("rect.checkbox").attr("x",f).attr("y",0+d*o);var _=s+d*o;l.select("text").attr("x",f+u).attr("y",0+_+3);var b=(!h||h===k.HORIZONTAL)&&"0"===l.select("rect.checkbox").attr("y"),x=h===k.VERTICAL&&"0"===l.select("rect.checkbox").attr("x"),w=b||x;c&&l.select("g.check").empty()&&w?(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(),r=da.getProperty(n,"legend"),i=da.getProperty(r,"truncation","threshold");e.selectAll("g.legend-item").on("mouseover",(function(){t.services.events.dispatchEvent(j.Legend.ITEM_HOVER,{hoveredElement:ma(this)});var e=Va.checkbox.radius,n=ma(this);n.select("rect.checkbox").classed("hovered",!0),n.append("rect").classed("hover-stroke",!0).attr("x",parseFloat(n.select("rect.checkbox").attr("x"))-2).attr("y",parseFloat(n.select("rect.checkbox").attr("y"))-2).attr("width",2*e+4).attr("height",2*e+4).attr("rx",3).attr("ry",3).lower();var r=n.datum();r.name.length>i&&t.services.events.dispatchEvent(j.Tooltip.SHOW,{hoveredElement:n,content:r.name})})).on("mousemove",(function(){t.services.events.dispatchEvent(j.Tooltip.MOVE)})).on("click",(function(){t.services.events.dispatchEvent(j.Legend.ITEM_CLICK,{clickedElement:ma(this)});var e=ma(this).datum();t.model.toggleDataLabel(e.name)})).on("mouseout",(function(){var e=ma(this);e.select("rect.hover-stroke").remove(),e.select("rect.checkbox").classed("hovered",!1),t.services.events.dispatchEvent(j.Tooltip.HIDE),t.services.events.dispatchEvent(j.Legend.ITEM_MOUSEOUT,{hoveredElement:e})})),e.selectAll("g.legend-item rect.checkbox").on("keyup",(function(e){!ia.key||"Enter"!==ia.key&&" "!==ia.key||(ia.preventDefault(),t.model.toggleDataLabel(e.name))}))},e}(Kp);!function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(Xp||(Xp={}));var Qp=((Yp={})[Xp.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)}},Yp[Xp.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)}},Yp[Xp.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)}},Yp[Xp.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)}},Yp),Jp="undefined"!=typeof window?window:{innerHeight:0,scrollY:0,innerWidth:0,scrollX:0},tg=function(){function t(t){void 0===t&&(t={}),this.positions=Qp,this.positions=Object.assign({},Qp,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(),a=document.body.getBoundingClientRect();return{top:i.top-a.top+n.top,left:i.left-a.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),a=t.getBoundingClientRect();return this.calculatePosition(i,a,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 a=this;void 0===r&&(r=this.defaultContainerFunction),void 0===i&&(i=this.findPosition);var o=n.map((function(n){var o=i(t,e,n),s=a.getPlacementBox(e,o),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 o.sort((function(t,e){return e.weight-t.weight})),o[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:Jp.innerHeight-Jp.scrollY,height:Jp.innerWidth-Jp.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}(),eg=(new tg,[["15seconds",15e3],["minute",6e4],["30minutes",18e5],["hourly",36e5],["daily",864e5],["monthly",2592e6],["quarterly",7776e6],["yearly",31104e6]]);function ng(t,e,n,r){var i=0===e,a=2===Number(Vp(new Date(t),"c")),o=1===Number(Vp(new Date(t),"q"));switch(n){case"15seconds":case"minute":case"30minutes":case"hourly":return i||og(t)||sg(t)||ug(t);case"daily":return r?i||a||ug(t):i||sg(t)||ug(t);case"monthly":return i||ug(t);case"quarterly":return i||o;case"yearly":return!1;default:throw new Error(n+" is not a valid time interval.")}}function rg(t,e,n,r){var i=r.showDayName,a="daily"===n&&i?"weekly":n,o=new Date(t),s=da.getProperty(r,"timeIntervalFormats")[a],u=da.getProperty(s,"primary"),l=da.getProperty(s,"secondary");return Vp(o,ng(t,e,n,i)?u:l,{locale:r.localeObject})}function ig(t){var e=new Date(t);return{M:e.getMonth()+1,d:e.getDate(),H:e.getHours(),m:e.getMinutes(),s:e.getSeconds()}}function ag(t){return 1===t.length?"15seconds":function(t){var e=eg.reduce((function(e,n,r){n[0];var i=n[1],a=eg[e][1];return Math.abs(a-t)<Math.abs(i-t)?e:r}),0);return eg[e][0]}(function(t,e){var n,r,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(n=t[a])&&n>=n)for(r=n;++a<i;)null!=(n=t[a])&&r>n&&(r=n)}else for(;++a<i;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=n;++a<i;)null!=(n=e(t[a],a,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 og(t){var e=ig(t),n=e.s,r=e.m;return 0===e.H&&0===r&&0===n}function sg(t){var e=ig(t),n=e.d,r=e.s,i=e.m,a=e.H;return 1===n&&0===a&&0===i&&0===r}function ug(t){var e=ig(t),n=e.M,r=e.d,i=e.s,a=e.m,o=e.H;return 1===n&&1===r&&0===o&&0===a&&0===i}var lg=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="threshold",i.positionService=new tg,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,a=n.axisPosition,o=n.index,s=da.getProperty(this.model.getOptions(),"style","prefix");this.thresholdClass=Gh.prefix+"--"+s+"--threshold",this.thresholdIdentifierClass=a+"-"+o,this.threshold=lf.appendOrSelect(this.parent,"g."+this.thresholdClass+"."+this.thresholdIdentifierClass).raise();var u=lf.appendOrSelect(this.threshold,"rect.threshold-hoverable-area"),l=lf.appendOrSelect(this.threshold,"line.threshold-line");l.style("stroke",i);var c=this.services.cartesianScales.getScaleByPosition(a),h=this.services.cartesianScales.getScaleTypeByPosition(a),f=this.services.cartesianScales.getMainXScale(),d=this.services.cartesianScales.getMainYScale(),p=h===C.LABELS,g=f.range(),v=g[0],m=g[1],y=d.range(),_=y[0],b=y[1],x=this.services.cartesianScales,w=x.getOrientation(),O=da.flipDomainAndRangeBasedOnOrientation((function(t){return x.getDomainValue(t)}),(function(t){return x.getRangeValue(t)}),w),E=O[0],T=O[1];if(a===S.TOP||a===S.BOTTOM){var M=E(r)+(p?c.step()/2:0);this.threshold.transition(this.services.transitions.getTransition("threshold-update",t)).attr("transform","translate("+M+", "+b+")"),l.attr("y2",_-b),u.attr("width",_-b).classed("rotate",!0)}else{M=T(r)+(p?c.step()/2:0);this.threshold.transition(this.services.transitions.getTransition("threshold-update",t)).attr("transform","translate("+v+", "+M+")"),l.attr("x2",m-v),u.attr("width",m-v)}var A=this;this.services.events.addEventListener(j.Threshold.SHOW,(function(t){t.detail.hoveredElement.node()===A.threshold&&(e.setThresholdLabelPosition(),e.label.classed("hidden",!1))})),this.services.events.addEventListener(j.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)===C.TIME){var i=[S.LEFT,S.RIGHT].includes(n),a=this.services.cartesianScales.getMainXScale(),o=this.services.cartesianScales.getMainYScale(),s=i?o:a,u=da.getProperty(r,"timeScale");return rg(e,0,ag(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,a=void 0===i?"Threshold":i,o=ma(this.services.domUtils.getHolder()),s=n?n(e):this.getFormattedValue();this.label=lf.appendOrSelect(o,"div."+this.thresholdClass+"--label."+this.thresholdIdentifierClass),this.label.html(a+": "+s).classed("hidden",!0).style("background-color",r)},e.prototype.setThresholdLabelPosition=function(){var t=this.services.domUtils.getHolder(),e=this.label.node(),n=ba(t),r=this.positionService.findBestPlacementAt({left:n[0],top:n[1]},e,[Xp.RIGHT,Xp.LEFT,Xp.TOP,Xp.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;lf.appendOrSelect(this.threshold,"rect").on("mouseover mousemove",(function(){t.threshold.classed("active",!0),t.services.events.dispatchEvent(j.Threshold.SHOW,{hoveredElement:ma(t.threshold)})})).on("mouseout",(function(){t.threshold.classed("active",!1),t.services.events.dispatchEvent(j.Threshold.HIDE,{hoveredElement:ma(t.threshold)})}))},e}(Kp),cg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="title",e}return n(e,t),e.prototype.render=function(){var t=this.getContainerSVG(),e=t.selectAll("text.title").data([this.model.getOptions().title]);e.enter().append("text").classed("title",!0).merge(e).attr("x",0).attr("y","1em").html((function(t){return t}));var n=this.getMaxTitleWidth(),r=lf.appendOrSelect(t,"text.title");r.node().getComputedTextLength()>n&&n>0&&this.truncateTitle(r,n),e.exit().remove()},e.prototype.truncateTitle=function(t,e){if(!(e<=0)){var n=t.text();if(t.node().getComputedTextLength()>e){t.append("tspan").text("...");var r=lf.appendOrSelect(t,"tspan").node().getComputedTextLength(),i=t.text(),a=this.getSubstringIndex(t.node(),0,i.length-1,e-r);t.html(i.substring(0,a-1)).append("tspan").text("...");var o=this;t.on("mouseover",(function(){o.services.events.dispatchEvent(j.Tooltip.SHOW,{hoveredElement:t,content:n})})).on("mousemove",(function(){o.services.events.dispatchEvent(j.Tooltip.MOVE)})).on("mouseout",(function(){o.services.events.dispatchEvent(j.Tooltip.HIDE)}))}}},e.prototype.getMaxTitleWidth=function(){return lf.getSVGElementSize(this.parent.node(),{useAttr:!0}).width},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),hg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="meter-title",e}return n(e,t),e.prototype.render=function(){var t=this.model.getDisplayData(),e=this.model.getOptions(),n=this.getContainerSVG(),r=e.data.groupMapsTo,i=n.selectAll("text.meter-title").data([t[r]]);i.enter().append("text").classed("meter-title",!0).merge(i).attr("x",0).attr("y","1em").text((function(t){return t})),i.exit().remove(),this.appendPercentage(),this.displayStatus();var a=this.getMaxTitleWidth(),o=lf.appendOrSelect(n,"text.meter-title");a>0&&o.node().getComputedTextLength()>a&&this.truncateTitle(o,a)},e.prototype.displayStatus=function(){var t=this.getContainerSVG(),e=(this.model.getOptions(),lf.getSVGElementSize(this.services.domUtils.getMainSVG(),{useAttr:!0})),n=e.width?e.width:this.parent.node().getAttribute("width"),r=this.model.getStatus(),i=Ga.status.indicatorSize/2,a=lf.appendOrSelect(t,"g.status-indicator").attr("class",null!==r?"status-indicator status--"+r:"").attr("transform","translate("+(n-i)+", 0)"),o=r?[r]:[],s=a.selectAll("circle.status").data(o);s.enter().append("circle").merge(s).attr("class","status").attr("r",i).attr("cx",0).attr("cy","calc(1em / 2)");var u=a.selectAll("path.innerFill").data(o);u.enter().append("path").merge(u).attr("d",this.getStatusIconPathString(r)).attr("transform","translate(-"+i+", 0)").attr("class","innerFill"),u.exit().remove(),s.exit().remove()},e.prototype.appendPercentage=function(){var t=this.model.getDisplayData().value,e=this.getContainerSVG(),n=lf.appendOrSelect(e,"text.meter-title"),r=!0===da.getProperty(this.model.getOptions(),"meter","statusBar","percentageIndicator","enabled")?[t]:[],i=e.selectAll("text.percent-value").data(r),a=Ga.statusBar.paddingRight;i.enter().append("text").classed("percent-value",!0).merge(i).text((function(t){return t+"%"})).attr("x",+n.attr("x")+n.node().getComputedTextLength()+a).attr("y",n.attr("y")),i.exit().remove()},e.prototype.truncateTitle=function(e,n){t.prototype.truncateTitle.call(this,e,n);var r=lf.appendOrSelect(this.parent,"tspan"),i=Ga.statusBar.paddingRight,a=Math.ceil(r.node().getComputedTextLength());lf.appendOrSelect(this.parent,"text.percent-value").attr("x",+e.attr("x")+e.node().getComputedTextLength()+a+i)},e.prototype.getMaxTitleWidth=function(){var t=lf.getSVGElementSize(this.services.domUtils.getMainSVG(),{useAttr:!0}),e=t.width?t.width:this.parent.node().getAttribute("width"),n=lf.appendOrSelect(this.parent,"text.percent-value"),r=Ga.statusBar.paddingRight,i=n.node().getComputedTextLength(),a=lf.appendOrSelect(this.parent,"g.status-indicator").node();return e-i-r-(lf.getSVGElementSize(a,{useBBox:!0}).width+Ga.status.paddingLeft)},e.prototype.getStatusIconPathString=function(t){switch(t){case z.SUCCESS:return"M6.875 11.3125 3.75 8.1875 4.74375 7.25 6.875 9.34375 11.50625 4.75 12.5 5.7375 Z";case z.DANGER:return"M10.7 11.5 4.5 5.3 5.3 4.5 11.5 10.7 Z";case z.WARNING:return"M7.9375,11.125 C7.41973305,11.125 7,11.544733 7,12.0625 C7,12.580267 7.41973305,13 7.9375,13 C8.45526695,13 8.875,12.580267 8.875,12.0625 C8.875,11.544733 8.45526695,11.125 7.9375,11.125 M7.3125, 3 8.5625, 3 8.5625, 9.875 7.3125, 9.875, 7.3125, 3 Z"}},e}(cg),fg=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="tooltip",i.isEventListenerAdded=!1,i.positionService=new tg,i.handleShowTooltip=function(t){var e=t.detail.data||t.detail.items,n=i.getTooltipHTML(t),r=lf.appendOrSelect(i.tooltip,"div.content-box");if(da.getProperty(i.model.getOptions(),"tooltip","customHTML"))if(t.detail.content){var a='<div class="title-tooltip">'+t.detail.content+"</div>";r.html(a)}else r.html(i.model.getOptions().tooltip.customHTML(e,n));else r.html(n);i.positionTooltip(t),i.tooltip.classed("hidden",!1).attr("aria-hidden",!1)},i.handleHideTooltip=function(){i.tooltip.classed("hidden",!0).attr("aria-hidden",!0)},i.init(),i}return n(e,t),e.prototype.addTooltipEventListener=function(){var t=this;this.services.events.addEventListener(j.Tooltip.MOVE,(function(e){t.positionTooltip(e)})),this.services.events.addEventListener(j.Tooltip.SHOW,this.handleShowTooltip),this.services.events.addEventListener(j.Tooltip.HIDE,this.handleHideTooltip),this.services.events.addEventListener(j.Chart.MOUSEOUT,this.handleHideTooltip)},e.prototype.removeTooltipEventListener=function(){this.services.events.removeEventListener(j.Tooltip.MOVE,null),this.services.events.removeEventListener(j.Tooltip.SHOW,this.handleShowTooltip),this.services.events.removeEventListener(j.Tooltip.HIDE,this.handleHideTooltip),this.services.events.removeEventListener(j.Chart.MOUSEOUT,this.handleHideTooltip)},e.prototype.getItems=function(t){return t.detail.items?t.detail.items:[]},e.prototype.formatItems=function(t){var e=this,n=this.model.getOptions(),r=da.getProperty(n,"tooltip","truncation","type"),i=da.getProperty(n,"tooltip","truncation","threshold"),a=da.getProperty(n,"tooltip","truncation","numCharacter");return r!==M.NONE?t.map((function(t){return t.value=t.value?e.valueFormatter(t.value):t.value,t.label&&t.label.length>i&&(t.label=da.truncateLabel(t.label,r,a)),t.value&&t.value.length>i&&(t.value=da.truncateLabel(t.value,r,a)),t})):t},e.prototype.getTooltipHTML=function(t){var e;if(t.detail.content)e='<div class="title-tooltip">'+t.detail.content+"</div>";else{var n=this.getItems(t),r=this.formatItems(n),i=this.model.isUserProvidedColorScaleValid();e="<ul class='multi-tooltip'>"+r.map((function(t){var e=t.color||i;return'<li>\n\t\t\t\t\t\t\t<div class="datapoint-tooltip '+(t.bold?"bold":"")+'">\n\t\t\t\t\t\t\t\t'+(t.class&&!e?'<a class="tooltip-color '+t.class+'"></a>':"")+"\n\t\t\t\t\t\t\t\t"+(t.color&&e?'<a style="background-color: '+t.color+'" class="tooltip-color"></a>':"")+'\n\t\t\t\t\t\t\t\t<p class="label">'+(t.label||"")+'</p>\n\t\t\t\t\t\t\t\t<p class="value">'+(t.value||"")+"</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</li>"})).join("")+"</ul>"}return e},e.prototype.valueFormatter=function(t){var e=this.model.getOptions(),n=da.getProperty(e,"tooltip","valueFormatter");return n?n(t):t.toLocaleString()},e.prototype.render=function(){var t=this.model.getOptions(),e=da.getProperty(t,"tooltip","enabled");if(e){var n=ma(this.services.domUtils.getHolder()),r=da.getProperty(t,"style","prefix");this.tooltip=lf.appendOrSelect(n,"div."+Gh.prefix+"--"+r+"--tooltip"),this.tooltip.style("max-width",null),this.isEventListenerAdded||(this.addTooltipEventListener(),this.isEventListenerAdded=!0),this.tooltip.classed("hidden",!0)}else!e&&this.isEventListenerAdded&&(this.removeTooltipEventListener(),this.isEventListenerAdded=!1)},e.prototype.positionTooltip=function(t){var e,n=this.services.domUtils.getHolder(),r=this.tooltip.node(),i=this.model.getOptions(),a=da.getProperty(i,"zoomBar","top","enabled"),o=da.getProperty(t,"detail","mousePosition");if(o){var s=da.getProperty(i,"zoomBar","top","type"),u=Ya.height[s];a&&(o[1]+=u+Ya.spacerHeight)}else o=ba(n);var l=this.positionService.findBestPlacementAt({left:o[0],top:o[1]},r,[Xp.RIGHT,Xp.LEFT,Xp.TOP,Xp.BOTTOM],(function(){return{width:n.offsetWidth,height:n.offsetHeight}})),c=Fa.horizontalOffset;l===Xp.LEFT&&(c*=-1),e=this.positionService.findPositionAt({left:o[0]+c,top:o[1]},r,l),this.positionService.setElement(r,e)},e}(Kp),dg=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getItems=function(t){var e=this;if(t.detail.items)return t.detail.items;var n=t.detail.data;if(!n.length||!n[0])return[];var r=this.model.getOptions(),i=this.services.cartesianScales,a=i.getDomainAxisOptions(),o=i.getDomainIdentifier(),s=i.getDomainAxisScaleType(),u=i.getRangeAxisOptions(),l=i.getRangeIdentifier(),c=(i.getRangeAxisScaleType(),r.data.groupMapsTo),h=a.title;if(!h){var f=i.getDomainAxisPosition();h=f===S.BOTTOM||f===S.TOP?"x-value":"y-value"}var d,p=n[0][o];if(s===C.TIME?p=Vp(new Date(n[0][o]),"MMM d, yyyy"):s===C.LINEAR&&(p=p.toLocaleString()),1===n.length){var g=n[0],v=u.title;if(!v){var m=i.getRangeAxisPosition();v=m===S.LEFT||m===S.RIGHT?"y-value":"x-value"}d=[{label:h,value:p},{label:v,value:g[l]},{label:r.tooltip.groupLabel||"Group",value:g[c],color:this.model.getFillColor(g[c]),class:this.model.getColorClassName({classNameTypes:[E.TOOLTIP],dataGroupName:g[c]})}]}else n.length>1&&(d=(d=[{label:h,value:this.valueFormatter(p)}]).concat(n.map((function(t){return{label:t[c],value:e.valueFormatter(t[l]),color:e.model.getFillColor(t[c]),class:e.model.getColorClassName({classNameTypes:[E.TOOLTIP],dataGroupName:t[c]})}})).sort((function(t,e){return e.value-t.value}))),!0===da.getProperty(r,"tooltip","showTotal")&&d.push({label:r.tooltip.totalLabel||"Total",value:this.valueFormatter(n.reduce((function(t,e){return t+e[l]}),0)),bold:!0}));return d},e}(fg),pg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="area",e.gradient_id="gradient-id-"+Math.floor(99999999999*Math.random()),e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("path.area").transition(e.services.transitions.getTransition("legend-hover-area")).attr("opacity",(function(t){return t.name!==n.datum().name?Ia.opacity.unselected:Ia.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.area").transition(e.services.transitions.getTransition("legend-mouseout-area")).attr("opacity",Ia.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(j.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(j.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getContainerSVG({withinChartClip:!0}),r=[0,0],i=this.services.cartesianScales,a=i.getOrientation(),o=Bc().curve(this.services.curves.getD3Curve());a===A.VERTICAL?(o.x((function(t,e){return i.getDomainValue(t,e)})).y0(i.getRangeValue(0)).y1((function(t,e){return i.getRangeValue(t,e)})),r=this.services.cartesianScales.getMainYScale().domain()):(o.x0(i.getRangeValue(0)).x1((function(t,e){return i.getRangeValue(t,e)})).y((function(t,e){return i.getDomainValue(t,e)})),r=this.services.cartesianScales.getMainXScale().domain());var s=this.model.getGroupedData(),u=da.getProperty(this.model.getOptions(),"color","gradient","enabled"),l=s&&1===s.length&&u;s.length>1&&u&&console.error("Gradients can only be enabled when having 1 single dataset");var c=n.selectAll("path.area").data(s,(function(t){return t.name})),h=da.getProperty(this.model.getOptions(),"style","prefix"),f=lf.appendOrSelect(ma(this.services.domUtils.getHolder()),"svg."+Gh.prefix+"--"+h+"--chart-svg").select("path."+this.model.getColorClassName({classNameTypes:[E.STROKE],dataGroupName:s[0].name})).node(),d=f?getComputedStyle(f,null).getPropertyValue("stroke"):null;l&&d?Od.appendOrUpdateLinearGradient({svg:this.parent,id:s[0].name.replace(" ","")+"_"+this.gradient_id,x1:"0%",x2:"0%",y1:"0%",y2:"100%",stops:Od.getStops(r,d)}):this.parent.selectAll("defs linearGradient").empty()||this.parent.selectAll("defs linearGradient").each((function(){this.parentNode.remove()})),c.exit().attr("opacity",0).remove();var p=this,g=c.enter().append("path");l?g.merge(c).style("fill",(function(t){return"url(#"+t.name.replace(" ","")+"_"+e.gradient_id+")"})).attr("class","area").attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[E.FILL],dataGroupName:t.name,originalClassName:"area"})})).attr("d",(function(t){var e=t.data;return o(e)})):g.attr("opacity",0).merge(c).attr("class","area").attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[E.FILL],dataGroupName:t.name,originalClassName:"area"})})).attr("fill",(function(t){return p.model.getFillColor(t.name)})).transition(this.services.transitions.getTransition("area-update-enter",t)).attr("opacity",Ia.opacity.selected).attr("d",(function(t){var e=t.data;return o(e)}))},e.prototype.destroy=function(){this.parent.selectAll("path.area").on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(j.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(j.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Kp),gg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="area-stacked",e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.model.getOptions().data.groupMapsTo;e.parent.selectAll("path.area").transition(e.services.transitions.getTransition("legend-hover-area")).attr("opacity",(function(t){return t[0][r]!==n.datum().name?Ia.opacity.unselected:Ia.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.area").transition(e.services.transitions.getTransition("legend-mouseout-area")).attr("opacity",Ia.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(j.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(j.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getContainerSVG({withinChartClip:!0}),i=this,a=this.model.getOptions(),o=a.data.groupMapsTo,s=this.services.cartesianScales.getMainXScale(),u=this.services.cartesianScales.getMainYScale(),l=this.services.cartesianScales.getDomainAxisPosition();if(this.services.cartesianScales.getScaleTypeByPosition(l)===C.TIME){var c=Object.keys(a.axes).some((function(t){return a.axes[t].percentage})),h=this.model.getStackedData({percentage:c}),f=n.selectAll("path.area").data(h,(function(t){return t[0][o]}));this.areaGenerator=Bc().x((function(t){return s(new Date(t.data.sharedStackKey))})).y0((function(t){return u(t[0])})).y1((function(t){return u(t[1])})).curve(this.services.curves.getD3Curve()),f.exit().attr("opacity",0).remove(),f.enter().append("path").attr("opacity",0).merge(f).data(h,(function(t){return t[0][o]})).attr("class","area").attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[E.FILL],dataGroupName:t[0][o],originalClassName:"area"})})).attr("fill",(function(t){return i.model.getFillColor(t[0][o])})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","area").transition(this.services.transitions.getTransition("area-update-enter",t)).attr("opacity",Ia.opacity.selected).attr("d",this.areaGenerator)}},e.prototype.destroy=function(){this.parent.selectAll("path.area").on("mouseover",null).on("mousemove",null).on("mouseout",null)},e}(Kp),vg=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();if(e.bars.width)return e.bars.width;var n=this.model.getDisplayData().length,r=this.services.cartesianScales.getMainXScale(),i=lf.getSVGElementSize(this.parent,{useAttrs:!0}).width;return r.step?Math.min(e.bars.maxWidth,r.step()/2):Math.min(e.bars.maxWidth,.25*i/n)},e.prototype.isOutsideZoomedDomain=function(t,e){if(this.model.getDisplayData().length<=1)return!1;var n=this.model.get("zoomDomain");if(void 0!==n){var r=this.services.cartesianScales.getDomainScale();return t<r(n[0])||e>r(n[1])}return!1},e}(Kp),mg=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(j.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(j.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.model.getOptions().data.groupMapsTo,i=this.getContainerSVG({withinChartClip:!0}).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("class",(function(t){return e.model.getColorClassName({classNameTypes:[E.FILL],dataGroupName:t[n],originalClassName:"bar"})})).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,a=i+r,o=e.services.cartesianScales.getRangeValue(0),s=e.services.cartesianScales.getRangeValue(t,n);if(!e.isOutsideZoomedDomain(i,a))return da.generateSVGPathString({x0:i,x1:a,y0:o,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;this.parent.selectAll("path.bar").on("mouseover",(function(e){var n=ma(this);n.classed("hovered",!0),n.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")),t.services.events.dispatchEvent(j.Bar.BAR_MOUSEOVER,{element:n,datum:e}),t.services.events.dispatchEvent(j.Tooltip.SHOW,{hoveredElement:n,data:[e]})})).on("mousemove",(function(e){ma(this);t.services.events.dispatchEvent(j.Bar.BAR_MOUSEMOVE,{element:ma(this),datum:e}),t.services.events.dispatchEvent(j.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(j.Bar.BAR_CLICK,{element:ma(this),datum:e})})).on("mouseout",(function(e){var n=ma(this);n.classed("hovered",!1),n.transition(t.services.transitions.getTransition("graph_element_mouseout_fill_update")),t.services.events.dispatchEvent(j.Bar.BAR_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(j.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(j.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(j.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(vg),yg=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(j.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(j.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.model.getDisplayData(),i=this.model.getOptions().data.groupMapsTo,a=this.services.cartesianScales.getDomainIdentifier();this.setGroupScale();var o=this.getContainerSVG({withinChartClip:!0}),s=vo(n,(function(t){return t[a]})).keys(),u=o.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("data-name","bars").merge(u).attr("transform",(function(t,n){var r=e.services.cartesianScales.getDomainValue(t,n)-e.getGroupWidth()/2;return e.services.cartesianScales.getOrientation()===A.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("class",(function(t){return e.model.getColorClassName({classNameTypes:[E.FILL],dataGroupName:t[i],originalClassName:"bar"})})).attr("fill",(function(t){return e.model.getFillColor(t[i])})).attr("d",(function(t){var n=e.groupScale(t[i]),r=n,a=n+e.getBarWidth(),o=e.services.cartesianScales.getRangeValue(0),s=e.services.cartesianScales.getRangeValue(t.value);if(!e.isOutsideZoomedDomain(r,a))return da.generateSVGPathString({x0:r,x1:a,y0:o,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;this.parent.selectAll("path.bar").on("mouseover",(function(e){var n=ma(this);n.classed("hovered",!0),n.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")),t.services.events.dispatchEvent(j.Bar.BAR_MOUSEOVER,{element:n,datum:e}),t.services.events.dispatchEvent(j.Tooltip.SHOW,{hoveredElement:n,data:[e]})})).on("mousemove",(function(e){var n=ma(this);t.services.events.dispatchEvent(j.Bar.BAR_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(j.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(j.Bar.BAR_CLICK,{element:ma(this),datum:e})})).on("mouseout",(function(e){var n=ma(this);n.classed("hovered",!1),n.transition(t.services.transitions.getTransition("graph_element_mouseout_fill_update")),t.services.events.dispatchEvent(j.Bar.BAR_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(j.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(j.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(j.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=da.getProperty(t,"bars","width"),n=da.getProperty(t,"bars","maxWidth");if(null!==e&&(null===n||e<=n))return e;var r=this.model.getActiveDataGroupNames().length,i=this.getTotalGroupPadding(),a=this.services.cartesianScales.getDomainScale();return Math.min(n,(a.step()-i)/r)},e.prototype.setGroupScale=function(){this.groupScale=Bo().domain(this.model.getActiveDataGroupNames()).rangeRound([0,this.getGroupWidth()])},e}(vg),_g=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(j.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(j.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.getContainerSVG({withinChartClip:!0}),i=(this.model.getDisplayData(),this.model.getOptions()),a=i.data.groupMapsTo,o=(this.services.cartesianScales.getDomainIdentifier(),this.model.getStackedData()),s=n.selectAll("g.bars").data(o,(function(t){return t.key}));s.exit().attr("opacity",0).remove(),s.enter().append("g").classed("bars",!0).attr("role",r.GROUP).attr("data-name","bars");var u=n.selectAll("g.bars").selectAll("path.bar").data((function(t){return t}),(function(t){return t.data.sharedStackKey}));u.exit().remove(),u.enter().append("path").merge(u).classed("bar",!0).transition(this.services.transitions.getTransition("bar-update-enter",t)).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[E.FILL],dataGroupName:t[a],originalClassName:"bar"})})).attr("fill",(function(t){return e.model.getFillColor(t[a])})).attr("d",(function(t,n){var r=t.data.sharedStackKey,a=e.getBarWidth(),o=e.services.cartesianScales.getDomainValue(r,n)-a/2,s=o+a,u=e.services.cartesianScales.getRangeValue(t[0],n),l=e.services.cartesianScales.getRangeValue(t[1],n);if(!e.isOutsideZoomedDomain(o,s))return Math.abs(l-u)>0&&Math.abs(l-u)>i.bars.dividerSize&&(e.services.cartesianScales.getOrientation()===A.VERTICAL?l+=1:l-=1),da.generateSVGPathString({x0:o,x1:s,y0:u,y1:l},e.services.cartesianScales.getOrientation())})).attr("opacity",1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t[1]-t[0]})),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,i=ma(this);i.classed("hovered",!0),i.transition(e.services.transitions.getTransition("graph_element_mouseover_fill_update")),e.services.events.dispatchEvent(j.Bar.BAR_MOUSEOVER,{element:i,datum:n});var a=e.model.getDisplayData(),o=e.services.cartesianScales.getDomainIdentifier(),s=e.services.cartesianScales.getRangeIdentifier(),u=a.find((function(e){return e[s]===n.data[n.group]&&e[o].toString()===n.data.sharedStackKey&&e[t]===n.group}));void 0===u&&((r={})[o]=n.data.sharedStackKey,r[s]=n.data[n.group],r[t]=n.group,u=r),e.services.events.dispatchEvent(j.Tooltip.SHOW,{hoveredElement:i,data:[u]})})).on("mousemove",(function(t){var n=ma(this);e.services.events.dispatchEvent(j.Bar.BAR_MOUSEMOVE,{element:n,datum:t}),e.services.events.dispatchEvent(j.Tooltip.MOVE)})).on("click",(function(t){e.services.events.dispatchEvent(j.Bar.BAR_CLICK,{element:ma(this),datum:t})})).on("mouseout",(function(t){var n=ma(this);n.classed("hovered",!1),e.services.events.dispatchEvent(j.Bar.BAR_MOUSEOUT,{element:n,datum:t}),e.services.events.dispatchEvent(j.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(j.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(j.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(vg),bg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="scatter",e.handleChartHolderOnHover=function(t){e.parent.selectAll("circle.dot").transition(e.services.transitions.getTransition("chart-holder-hover-scatter")).attr("opacity",1)},e.handleChartHolderOnMouseOut=function(t){e.parent.selectAll("circle.dot").transition(e.services.transitions.getTransition("chart-holder-mouseout-scatter")).attr("opacity",0)},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(j.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(j.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),this.configs.fadeInOnChartHolderMouseover&&(t.addEventListener(j.Chart.MOUSEOVER,this.handleChartHolderOnHover),t.addEventListener(j.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut))},e.prototype.filterBasedOnZoomDomain=function(t){var e=this.services.cartesianScales.getDomainIdentifier(),n=this.model.get("zoomDomain");return void 0!==n?t.filter((function(t){return t[e].getTime()>n[0].getTime()&&t[e].getTime()<n[1].getTime()})):t},e.prototype.render=function(t){if(da.getProperty(this.model.getOptions(),"points","enabled")||da.getProperty(this.model.getOptions(),"bubble","enabled")){var e,n=this.getContainerSVG({withinChartClip:!0}),r=this.model.getOptions(),i=r.data.groupMapsTo,a=this.services.cartesianScales.getDomainIdentifier(),o=this.services.cartesianScales.getRangeIdentifier();if(this.configs.stacked){var s=Object.keys(r.axes).some((function(t){return r.axes[t].percentage}));e=this.model.getStackedData({percentage:s})}else e=this.model.getDisplayData().filter((function(t){return void 0!==t[o]&&null!==t[o]}));e=this.filterBasedOnZoomDomain(e);var u=n.selectAll("circle.dot").data(e,(function(t){return t[i]+"-"+t[a]}));u.exit().attr("opacity",0).remove();var l=u.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(u);this.styleCircles(l,t),this.addEventListeners()}},e.prototype.isDatapointThresholdAnomaly=function(t,e){if(!this.configs.handleThresholds)return!1;var n=this.services.cartesianScales,r=n.getOrientation(),i=da.flipDomainAndRangeBasedOnOrientation(this.services.cartesianScales.getHighestDomainThreshold(),this.services.cartesianScales.getHighestRangeThreshold(),r),a=i[0],o=i[1],s=da.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 o&&a?h<=o.scaleValue&&c>=a.scaleValue:o?h<=o.scaleValue:a?c>=a.scaleValue:void 0},e.prototype.styleCircles=function(t,e){var n=this,i=this.model.getOptions(),a=i.points,o=a.filled,s=a.fillOpacity,u=this.services,l=u.cartesianScales,c=u.transitions,h=i.data.groupMapsTo,f=l.getDomainIdentifier(),d=l.getRangeIdentifier(),p=da.flipDomainAndRangeBasedOnOrientation((function(t,e){return l.getDomainValue(t,e)}),(function(t,e){return l.getRangeValue(t,e)}),l.getOrientation()),g=p[0],v=p[1],m=this.configs.fadeInOnChartHolderMouseover;t.raise().classed("dot",!0).attr("class",(function(t){var e=n.model.getIsFilled(t[h],t[f],t,o)?[E.FILL,E.STROKE]:[E.STROKE];return n.model.getColorClassName({classNameTypes:e,dataGroupName:t[h],originalClassName:"dot"})})).classed("threshold-anomaly",(function(t,e){return n.isDatapointThresholdAnomaly(t,e)})).classed("filled",(function(t){return n.model.getIsFilled(t[h],t[f],t,o)})).classed("unfilled",(function(t){return!n.model.getIsFilled(t[h],t[f],t,o)})).transition(c.getTransition("scatter-update-enter",e)).attr("cx",g).attr("cy",v).attr("r",i.points.radius).attr("fill",(function(t){if(n.model.getIsFilled(t[h],t[f],t,o))return n.model.getFillColor(t[h],t[f],t)})).attr("fill-opacity",o?s:1).attr("stroke",(function(t){return n.model.getStrokeColor(t[h],t[f],t)})).attr("opacity",m?0:1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","point").attr("aria-label",(function(t){return t[d]})),this.addEventListeners()},e.prototype.getTooltipData=function(t,e){var n=this;return this.model.getDisplayData().filter((function(r){return t===n.services.cartesianScales.getDomainValue(r)&&e===n.services.cartesianScales.getRangeValue(r)}))},e.prototype.addEventListeners=function(){var t=this,e=t.model.getOptions().data.groupMapsTo,n=this.services.cartesianScales.getDomainIdentifier();this.parent.selectAll("circle").on("mouseover",(function(r){var i=ma(this);i.classed("hovered",!0).attr("class",(function(n){return t.model.getColorClassName({classNameTypes:[E.FILL],dataGroupName:n[e],originalClassName:i.attr("class")})})).style("fill",(function(r){return t.model.getFillColor(r[e],r[n],r)})).classed("unfilled",!1);var a=t.services.cartesianScales.getDomainValue(r),o=t.services.cartesianScales.getRangeValue(r),s=t.getTooltipData(a,o);t.services.events.dispatchEvent(j.Tooltip.SHOW,{hoveredElement:i,data:s}),t.services.events.dispatchEvent(j.Scatter.SCATTER_MOUSEOVER,{element:i,datum:r})})).on("mousemove",(function(e){var n=ma(this);t.services.events.dispatchEvent(j.Scatter.SCATTER_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(j.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(j.Scatter.SCATTER_CLICK,{element:ma(this),datum:e})})).on("mouseout",(function(e){var n=ma(this);n.classed("hovered",!1),t.configs.filled||"1"!==n.attr("fill-opacity")||(n.classed("unfilled",!0),n.style("fill",null)),t.services.events.dispatchEvent(j.Scatter.SCATTER_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(j.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(j.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(j.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),t.removeEventListener(j.Chart.MOUSEOVER,this.handleChartHolderOnHover),t.removeEventListener(j.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut)},e}(Kp),xg=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})),a=lf.getSVGElementSize(this.services.domUtils.getMainSVG(),{useAttr:!0}),o=i.length>0,s=o?wo(i):[1,1];return fu().domain(s).range(o?e.bubble.radiusRange(a,r):[4,4])},e.prototype.styleCircles=function(t,e){var n=this,i=this.model.getOptions(),a=i.bubble.radiusMapsTo,o=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 o(t[a]||1)})).attr("class",(function(t){return n.model.getColorClassName({classNameTypes:[E.FILL,E.STROKE],dataGroupName:t[s],originalClassName:"dot"})})).attr("fill",(function(t){return n.model.getFillColor(t[s],t[u],t)})).attr("stroke",(function(t){return n.model.getStrokeColor(t[s],t[u],t)})).attr("fill-opacity",i.bubble.fillOpacity).attr("opacity",1)},e}(bg),wg=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("path.line").transition(e.services.transitions.getTransition("legend-hover-line")).attr("opacity",(function(t){return t.name!==n.datum().name?Ba.opacity.unselected:Ba.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.line").transition(e.services.transitions.getTransition("legend-mouseout-line")).attr("opacity",Ba.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(j.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(j.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getContainerSVG({withinChartClip:!0}),i=this.services,a=i.cartesianScales,o=i.curves,s=da.flipDomainAndRangeBasedOnOrientation((function(t,e){return a.getDomainValue(t,e)}),(function(t,e){return a.getRangeValue(t,e)}),a.getOrientation()),u=s[0],l=s[1],c=this.model.getOptions(),h=Vc().x(u).y(l).curve(o.getD3Curve()).defined((function(t,e){var n=t[a.getRangeIdentifier()];return null!=n})),f=[];if(this.configs.stacked){var d=Object.keys(c.axes).some((function(t){return c.axes[t].percentage})),p=c.data.groupMapsTo,g=this.model.getStackedData({percentage:d}),v=this.services.cartesianScales.getDomainIdentifier(),m=this.services.cartesianScales.getRangeIdentifier();f=g.map((function(t){return{name:t[0][p],data:t.map((function(t){var e;return(e={})[v]=t.data.sharedStackKey,e[p]=t[p],e[m]=t[1],e})),hidden:!da.some(t,(function(t){return t[0]!==t[1]}))}}))}else f=this.model.getGroupedData();var y=n.selectAll("path.line").data(f,(function(t){return t.name}));y.exit().attr("opacity",0).remove(),y.enter().append("path").classed("line",!0).attr("opacity",0).merge(y).data(f,(function(t){return t.name})).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[E.STROKE],dataGroupName:t.name,originalClassName:"line"})})).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",(function(t){return t.hidden?0:1})).attr("stroke",(function(t){return e.model.getStrokeColor(t.name)})).attr("d",(function(t){var e=t.data;return h(e)}))},e.prototype.destroy=function(){this.parent.selectAll("path.line").on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(j.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(j.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Kp),Og=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="scatter-stacked",e}return n(e,t),e.prototype.render=function(t){if(da.getProperty(this.model.getOptions(),"points","enabled")){var e=this.getContainerSVG({withinChartClip:!0}),n=this.model.getOptions(),i=n.data.groupMapsTo,a=this.services.cartesianScales.getDomainIdentifier(),o=this.services.cartesianScales.getRangeIdentifier(),s=Object.keys(n.axes).some((function(t){return n.axes[t].percentage})),u=this.model.getStackedData({percentage:s}),l=e.selectAll("g.dots").data(u,(function(t){return t[0][i]}));l.exit().attr("opacity",0).remove();var c=l.enter().append("g").classed("dots",!0).attr("role",r.GROUP).merge(l).selectAll("circle.dot").data((function(t){return t}));c.exit().attr("opacity",0).remove();var h=c.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(c).datum((function(t){var e,n=t[i];return(e={})[i]=n,e[a]=t.data.sharedStackKey,e[o]=t[1],e}));this.styleCircles(h,t),this.addEventListeners()}},e.prototype.getTooltipData=function(t,e){var n=this,r=this.services.cartesianScales.getDomainIdentifier(),i=this.services.cartesianScales.getRangeIdentifier(),a=this.model.getOptions(),o=a.data.groupMapsTo,s=Object.keys(a.axes).some((function(t){return a.axes[t].percentage})),u=this.model.getStackedData({percentage:s}),l=[];return u.forEach((function(a,u){a.forEach((function(a,c){var h,f=a[o],d=a.data.sharedStackKey,p=a.data[f],g=a[1];null!=p&&t===n.services.cartesianScales.getDomainValue(d)&&e===n.services.cartesianScales.getRangeValue(g)&&(s&&(p=n.model.getStackedData()[u][c].data[f]),null!==p&&l.push(((h={})[o]=f,h[r]=d,h[i]=p,h)))}))})),this.model.getDisplayData().filter((function(t){return void 0!==l.find((function(e){return e[o]==t[o]&&e[r]==t[r]&&e[i]==t[i]}))}))},e}(bg);function Eg(t,e){var n=this,r=Ms(this._current,t);return function(t){return n._current=r(t),e(n._current)}}var Sg=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(j.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(j.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.getInnerRadius=function(){return Ua.innerRadius},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this,i=this.getContainerSVG(),a=this.model.getDisplayData(),o=this.model.getOptions(),s=o.data.groupMapsTo,u=this.computeRadius();this.arc=kc().innerRadius(this.getInnerRadius()).outerRadius(u),this.hoverArc=kc().innerRadius(this.getInnerRadius()).outerRadius(u+Ua.hoverArc.outerRadiusOffset);var l=function(){var t=Uc,e=Gc,n=null,r=fc(0),i=fc(wc),a=fc(0);function o(o){var s,u,l,c,h,f=o.length,d=0,p=new Array(f),g=new Array(f),v=+r.apply(this,arguments),m=Math.min(wc,Math.max(-wc,i.apply(this,arguments)-v)),y=Math.min(Math.abs(m)/f,a.apply(this,arguments)),_=y*(m<0?-1:1);for(s=0;s<f;++s)(h=g[p[s]=s]=+t(o[s],s,o))>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(o[t],o[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:o[u],index:s,value:h,startAngle:v,endAngle:c,padAngle:y};return g}return o.value=function(e){return arguments.length?(t="function"==typeof e?e:fc(+e),o):t},o.sortValues=function(t){return arguments.length?(e=t,n=null,o):e},o.sort=function(t){return arguments.length?(n=t,e=null,o):n},o.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:fc(+t),o):r},o.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:fc(+t),o):i},o.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:fc(+t),o):a},o}().value((function(t){return t.value})).sort(null).padAngle(Ua.padAngle)(a).sort((function(t,e){return t.index-e.index})),c=lf.appendOrSelect(i,"g.slices").attr("role",r.GROUP).attr("data-name","slices").selectAll("path.slice").data(l,(function(t){return t.data[s]}));c.exit().attr("opacity",0).remove(),c.enter().append("path").classed("slice",!0).attr("opacity",0).merge(c).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[E.FILL],dataGroupName:t.data[s],originalClassName:"slice"})})).attr("fill",(function(t){return n.model.getFillColor(t.data[s])})).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+", "+da.convertValueToPercentage(t.data.value,a)+"%"})).attrTween("d",(function(t){return Eg.bind(this)(t,n.arc)}));var h=l.filter((function(t){return t.value>0})),f=lf.appendOrSelect(i,"g.labels").attr("role",r.GROUP).attr("data-name","labels").selectAll("text.pie-label").data(h,(function(t){return t.data[s]}));f.exit().attr("opacity",0).remove();var d=f.enter().append("text").classed("pie-label",!0),p=[];d.merge(f).style("text-anchor","middle").text((function(t){return o.pie.labels.formatter?o.pie.labels.formatter(t):da.convertValueToPercentage(t.data.value,a)+"%"})).datum((function(t){var e=u+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=h.length,r=(t.endAngle-t.startAngle)*(180/Math.PI);if(e>=n-2&&r<Ua.callout.minSliceDegree){var i=void 0,a=void 0;return t.index===n-1?(i=t.xPosition+Ua.callout.offsetX+Ua.callout.textMargin+t.textOffsetX,a=t.yPosition-Ua.callout.offsetY,t.direction=I.RIGHT,p.push(t)):(i=t.xPosition-Ua.callout.offsetX-t.textOffsetX-Ua.callout.textMargin,a=t.yPosition-Ua.callout.offsetY,t.direction=I.LEFT,p.push(t)),"translate("+i+", "+a+")"}return"translate("+t.xPosition+", "+t.yPosition+")"})),this.renderCallouts(p);var g=da.getProperty(o,"donut")?"donut":"pie",v=da.getProperty(o,g,"alignment"),m=lf.getSVGElementSize(this.getParent(),{useAttr:!0}).width,y=u+Ua.xOffset;v===P.CENTER?y=m/2:v===P.RIGHT&&(y=m-u-Ua.xOffset);var _=u+Ua.yOffset;p.length>0&&(_+=Ua.yOffsetCallout),i.attr("transform","translate("+y+", "+_+")"),this.addEventListeners()},e.prototype.renderCallouts=function(t){var e=lf.appendOrSelect(this.getContainerSVG(),"g.callouts").attr("role",r.GROUP).attr("data-name","callouts"),n=e.selectAll("g.callout").data(t);n.exit().remove();var i=n.enter().append("g").classed("callout",!0).attr("role",r.GRAPHICS_SYMBOL+" "+r.GROUP).attr("aria-roledescription","label callout");i.merge(n).datum((function(t){var e=t.xPosition,n=t.yPosition;return t.direction===I.RIGHT?(t.startPos={x:e,y:n+t.textOffsetY},t.endPos={x:e+Ua.callout.offsetX,y:n-Ua.callout.offsetY+t.textOffsetY},t.intersectPointX=t.endPos.x-Ua.callout.horizontalLineLength):(t.startPos={x:e,y:n+t.textOffsetY},t.endPos={x:e-Ua.callout.offsetX,y:n-Ua.callout.offsetY+t.textOffsetY},t.intersectPointX=t.endPos.x+Ua.callout.horizontalLineLength),t})),i.append("line").classed("vertical-line",!0).merge(e.selectAll("line.vertical-line")).datum((function(t){return ma(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})),i.append("line").classed("horizontal-line",!0).merge(e.selectAll("line.horizontal-line")).datum((function(t){return ma(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){var n=ma(this);n.classed("hovered",!0).transition(t.services.transitions.getTransition("pie_slice_mouseover")).attr("d",t.hoverArc),t.services.events.dispatchEvent(j.Pie.SLICE_MOUSEOVER,{element:ma(this),datum:e});var r=t.model.getOptions().data.groupMapsTo;t.services.events.dispatchEvent(j.Tooltip.SHOW,{hoveredElement:n,items:[{label:e.data[r],value:e.data.value}]})})).on("mousemove",(function(e){var n=ma(this);t.services.events.dispatchEvent(j.Pie.SLICE_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(j.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(j.Pie.SLICE_CLICK,{element:ma(this),datum:e})})).on("mouseout",(function(e){var n=ma(this);n.classed("hovered",!1).transition(t.services.transitions.getTransition("pie_slice_mouseover")).attr("d",t.arc),t.services.events.dispatchEvent(j.Pie.SLICE_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(j.Tooltip.HIDE,{hoveredElement:n})}))},e.prototype.computeRadius=function(){var t=lf.getSVGElementSize(this.parent,{useAttrs:!0}),e=t.width,n=t.height;return Math.min(e,n)/2+Ua.radiusOffset},e}(Kp),Tg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="gauge",e}return n(e,t),e.prototype.init=function(){this.services.events},e.prototype.getValue=function(){var t,e;return null!=(e=null===(t=this.model.getData().find((function(t){return"value"===t.group})))||void 0===t?void 0:t.value)?e:null},e.prototype.getValueRatio=function(){return da.clamp(this.getValue(),0,100)/100},e.prototype.getDelta=function(){var t,e;return null!=(e=null===(t=this.model.getData().find((function(t){return"delta"===t.group})))||void 0===t?void 0:t.value)?e:null},e.prototype.getArcRatio=function(){var t=this.model.getOptions();return da.getProperty(t,"gauge","type")===G.FULL?1:.5},e.prototype.getArcSize=function(){return this.getArcRatio()*Math.PI*2},e.prototype.getStartAngle=function(){var t=this.getArcSize();return t===2*Math.PI?0:-t/2},e.prototype.getArrow=function(t){var e=this.model.getOptions();switch(da.getProperty(e,"gauge","deltaArrow","direction")){case U.UP:return"4,10 8,6 12,10";case U.DOWN:return"12,6 8,10 4,6";default:return t>0?"4,10 8,6 12,10":"12,6 8,10 4,6"}},e.prototype.render=function(t){var e=this,n=this.getContainerSVG(),i=this.model.getOptions(),a=i.data.groupMapsTo,o=this.getValue(),s=this.getValueRatio(),u=this.getArcSize(),l=this.getStartAngle(),c=l+s*u,h=l+u,f=this.computeRadius(),d=this.getInnerRadius();this.backgroundArc=kc().innerRadius(d).outerRadius(f).startAngle(c).endAngle(h),this.arc=kc().innerRadius(d).outerRadius(f).startAngle(l).endAngle(c),lf.appendOrSelect(n,"path.arc-background").attr("d",this.backgroundArc).attr("role",r.GROUP);var p=n.selectAll("path.arc-foreground").data([o]);p.enter().append("path").merge(p).attr("class",this.model.getColorClassName({classNameTypes:[E.FILL],dataGroupName:"value",originalClassName:"arc-foreground"})).attr("fill",(function(t){return e.model.getFillColor(t[a])})).attr("d",this.arc).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","value").attr("aria-label",(function(t){return t.value})),this.drawValueNumber(),this.drawDelta(),p.exit().remove();var g=da.getProperty(i,"gauge","alignment"),v=lf.getSVGElementSize(this.getParent(),{useAttr:!0}).width,m=f;g===P.CENTER?m=v/2:g===P.RIGHT&&(m=v-f),n.attr("transform","translate("+m+", "+f+")"),this.addEventListeners()},e.prototype.drawValueNumber=function(){var t=this.getContainerSVG(),e=this.model.getOptions(),n=da.getProperty(e,"gauge","type"),r=this.getValue(),i=this.getDelta(),a=this.computeRadius(),o=da.getProperty(e,"gauge","valueFontSize"),s=da.getProperty(e,"gauge","deltaFontSize"),u=da.getProperty(e,"gauge","numberSpacing"),l=0;n!==G.FULL||i?n===G.SEMI&&i&&(l=-(s(a)+u)):l=s(a);var c=lf.appendOrSelect(t,"g.gauge-numbers").attr("transform","translate(0, "+l+")"),h=lf.appendOrSelect(c,"g.gauge-value-number").attr("transform","translate(-10, 0)"),f=da.getProperty(e,"gauge","numberFormatter"),d=h.selectAll("text.gauge-value-number").data([r]);d.enter().append("text").attr("class","gauge-value-number").merge(d).style("font-size",o(a)+"px").attr("text-anchor","middle").text((function(t){return f(t)}));var p=lf.getSVGElementSize(lf.appendOrSelect(t,"text.gauge-value-number"),{useBBox:!0}).width;lf.appendOrSelect(h,"text.gauge-value-symbol").style("font-size",o(a)/2+"px").attr("x",p/2).text("%")},e.prototype.drawDelta=function(){var t=this.getContainerSVG(),e=this.model.getOptions(),n=this.getDelta(),r=this.computeRadius(),i=n?da.getProperty(e,"gauge","deltaFontSize"):function(){return 0},a=n?da.getProperty(e,"gauge","numberFormatter"):function(){return null},o=da.getProperty(e,"gauge","deltaArrow","size"),s=da.getProperty(e,"gauge","numberSpacing"),u=lf.appendOrSelect(t,"g.gauge-numbers"),l=lf.appendOrSelect(u,"g.gauge-delta").attr("transform","translate(0, "+(i(r)+s)+")"),c=lf.appendOrSelect(l,"text.gauge-delta-number");c.data(null===n?[]:[n]),c.enter().append("text").classed("gauge-delta-number",!0).merge(c).attr("text-anchor","middle").style("font-size",i(r)+"px").text((function(t){return a(t)+"%"}));var h=lf.getSVGElementSize(lf.appendOrSelect(t,".gauge-delta-number"),{useBBox:!0}).width,f=da.getProperty(e,"gauge","deltaArrow","enabled"),d=l.selectAll("svg.gauge-delta-arrow").data(null!==n&&f?[n]:[]);d.enter().append("svg").merge(d).attr("class","gauge-delta-arrow").attr("x",-o(r)-h/2).attr("y",-o(r)/2-.35*i(r)).attr("width",o(r)).attr("height",o(r)).attr("viewBox","0 0 16 16"),lf.appendOrSelect(d,"rect.gauge-delta-arrow-backdrop").attr("width","16").attr("height","16").attr("fill","none");var p=da.getProperty(e,"gauge","status");lf.appendOrSelect(d,"polygon.gauge-delta-arrow").attr("class",null!==p?"gauge-delta-arrow status--"+p:"").attr("fill",(function(){return null===p?"currentColor":null})).attr("points",this.getArrow(n)),d.exit().remove(),c.exit().remove()},e.prototype.getInnerRadius=function(){return this.computeRadius()-da.getProperty(this.model.getOptions(),"gauge","arcWidth")},e.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("path.arc-foreground").on("mouseover",(function(e){t.services.events.dispatchEvent(j.Gauge.ARC_MOUSEOVER,{element:ma(this),datum:e})})).on("mousemove",(function(e){var n=ma(this);t.services.events.dispatchEvent(j.Gauge.ARC_MOUSEMOVE,{element:n,datum:e})})).on("click",(function(e){t.services.events.dispatchEvent(j.Gauge.ARC_CLICK,{element:ma(this),datum:e})})).on("mouseout",(function(e){var n=ma(this);t.services.events.dispatchEvent(j.Gauge.ARC_MOUSEOUT,{element:n,datum:e})}))},e.prototype.computeRadius=function(){var t=this.model.getOptions(),e=da.getProperty(t,"gauge","type"),n=lf.getSVGElementSize(this.parent,{useAttrs:!0}),r=n.width,i=n.height;return e===G.SEMI?Math.min(r/2,i):Math.min(r/2,i/2)},e}(Kp),Mg=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=lf.appendOrSelect(this.getContainerSVG(),"g.center"),i=this.model.getOptions(),a=this.computeRadius();lf.appendOrSelect(r,"text.donut-figure").attr("text-anchor","middle").style("font-size",(function(){return i.donut.center.numberFontSize(a)})).transition(this.services.transitions.getTransition("donut-figure-enter-update",e)).tween("text",(function(){return n.centerNumberTween(ma(this))})),lf.appendOrSelect(r,"text.donut-title").attr("text-anchor","middle").style("font-size",(function(){return i.donut.center.titleFontSize(a)})).attr("y",i.donut.center.titleYPosition(a)).text(da.getProperty(i,"donut","center","label"))}},e.prototype.getInnerRadius=function(){return.75*this.computeRadius()},e.prototype.centerNumberTween=function(t){var e=this.model.getOptions(),n=da.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?As:ws)(r,n);return function(n){var r=e.donut.center.numberFormatter;t.text(r(i(n)))}},e}(Sg),Ag=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=lf.getSVGElementSize(e,{useAttrs:!0}),r=n.width,i=n.height;t.attr("width",r).attr("height",i);var a=da.getProperty(this.model.getOptions(),"data","loading");a?this.renderSkeleton(a):this.removeSkeleton()},e.prototype.renderSkeleton=function(t){if(this.configs.skeleton===N.GRID)this.renderGridSkeleton(t);else if(this.configs.skeleton===N.VERT_OR_HORIZ)this.renderVertOrHorizSkeleton(t);else if(this.configs.skeleton===N.PIE)this.renderPieSkeleton(t);else{if(this.configs.skeleton!==N.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===A.VERTICAL&&this.drawYGrid(t),e===A.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=fu().domain([0,1]).range(t),this.yScale=fu().domain([0,1]).range(e)},e.prototype.drawBackdrop=function(t){var e=this.parent,n=e.node().parentNode,r=lf.getSVGElementSize(n,{useAttrs:!0}),i=r.width,a=r.height;this.backdrop=lf.appendOrSelect(e,"svg.chart-skeleton.DAII").attr("width",i).attr("height",a);var o=lf.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop");o.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(o).attr("x",u).attr("y",c),o.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=da.getProperty(this.model.getOptions(),"grid","x","numberOfTicks"),i=this.xScale.ticks(r).map((function(t){return t*n})),a=lf.appendOrSelect(this.backdrop,"g.x.skeleton"),o=a.selectAll("line").data(i);o.enter().append("line").merge(o).attr("x1",(function(t){return t})).attr("x2",(function(t){return t})).attr("y1",0).attr("y2",e),a.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=da.getProperty(this.model.getOptions(),"grid","y","numberOfTicks"),i=this.xScale.ticks(r).map((function(t){return t*e})),a=lf.appendOrSelect(this.backdrop,"g.y.skeleton"),o=a.selectAll("line").data(i);o.enter().append("line").merge(o).attr("x1",0).attr("x2",n).attr("y1",(function(t){return t})).attr("y2",(function(t){return t})),a.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=lf.getSVGElementSize(r.node().parentNode,{useAttrs:!0}),a=i.width,o=i.height,s=lf.appendOrSelect(r,"svg.chart-skeleton").attr("width",a).attr("height",o),u=0===e?"pie":"donut",l=da.getProperty(this.model.getOptions(),u,"alignment");lf.appendOrSelect(s,"rect.chart-skeleton-area-container").attr("width",a).attr("height",o).attr("fill","none");var c=kc().innerRadius(e).outerRadius(t).startAngle(0).endAngle(2*Math.PI),h=t+Math.abs(Ua.radiusOffset),f=t+(Math.min(a,o)-2*t)/2,d=lf.appendOrSelect(s,"path").attr("class","skeleton-area-shape").attr("transform","translate("+h+", "+f+")").attr("d",c).classed("shimmer-effect-areas",n).classed("empty-state-areas",!n),p=t+Ua.xOffset;l===P.CENTER?p=a/2:l===P.RIGHT&&(p=a-t-Ua.xOffset);var g=t+Ua.yOffset;d.attr("transform","translate("+p+", "+g+")")},e.prototype.computeOuterRadius=function(){var t=lf.getSVGElementSize(this.parent.node().parentNode,{useAttrs:!0}),e=t.width,n=t.height;return Math.min(e,n)/2+Ua.radiusOffset},e.prototype.computeInnerRadius=function(){return.75*this.computeOuterRadius()},e.prototype.setShimmerEffect=function(t){var e=this.parent.select(".chart-skeleton"),n=lf.getSVGElementSize(this.parent,{useAttrs:!0}).width,r=n,i=lf.appendOrSelect(e,"defs").lower(),a=lf.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)");a.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(){a.attr("gradientTransform","translate("+(0-3*.2*n)+", 0)").transition().duration(2e3).delay(1e3).ease(_d).attr("gradientTransform","translate("+(r+3*.2*n)+", 0)").on("end",t)}()},e.prototype.removeSkeleton=function(){this.parent.select(".chart-skeleton").remove()},e}(Kp),Cg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="skeleton-lines",e}return n(e,t),e.prototype.render=function(){var e=this.parent,n=e.node().parentNode,r=lf.getSVGElementSize(n,{useAttrs:!0}),i=r.width,a=r.height;e.attr("width",i).attr("height",a);var o=da.getProperty(this.model.getOptions(),"data","loading"),s=!(da.getProperty(this.model.getOptions(),"grid","x","enabled")||da.getProperty(this.model.getOptions(),"grid","y","enabled")||da.getProperty(this.model.getOptions(),"axes","bottom","visible")||da.getProperty(this.model.getOptions(),"axes","left","visible"));o&&!s?t.prototype.renderGridSkeleton.call(this,o):o&&s?this.renderSparklineSkeleton(o):this.removeSkeleton()},e.prototype.renderSparklineSkeleton=function(t){this.setScales(),this.drawBackdrop(t),this.drawSparkline(t),this.updateBackdropStyle(),t&&this.setShimmerEffect("shimmer-lines")},e.prototype.drawSparkline=function(t){var e=this.backdrop.attr("width"),n=lf.appendOrSelect(this.backdrop,"g.y.skeleton"),r=n.selectAll("line").data([100]);r.enter().append("line").merge(r).attr("x1",0).attr("x2",e).attr("y1",(function(t){return t})).attr("y2",(function(t){return t})),n.selectAll("line").classed("shimmer-effect-lines",t).classed("empty-state-lines",!t)},e.prototype.updateBackdropStyle=function(){var t=this.parent;this.backdrop=lf.appendOrSelect(t,"svg.chart-skeleton.DAII");var e=lf.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop");e.classed("shimmer-effect-lines",!1),e.classed("shimmer-effect-sparkline",!0)},e}(Ag);function Dg(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 Pg(t,e){var n,r,i,a,o,s=new Ig(t),u=+t.value&&(s.value=t.value),l=[s];for(null==e&&(e=kg);n=l.pop();)if(u&&(n.value=+n.data.value),(i=e(n.data))&&(o=i.length))for(n.children=new Array(o),a=o-1;a>=0;--a)l.push(r=n.children[a]=new Ig(i[a])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(Rg)}function kg(t){return t.children}function Lg(t){t.data=t.data.data}function Rg(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function Ig(t){this.data=t,this.depth=this.height=0,this.parent=null}function Ng(t){if("function"!=typeof t)throw new Error;return t}function Vg(){return 0}function Bg(t){return function(){return t}}function Gg(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 Ug(t,e,n,r,i){for(var a,o=t.children,s=-1,u=o.length,l=t.value&&(r-e)/t.value;++s<u;)(a=o[s]).y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*l}function zg(t,e,n,r,i){for(var a,o=t.children,s=-1,u=o.length,l=t.value&&(i-n)/t.value;++s<u;)(a=o[s]).x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*l}Ig.prototype=Pg.prototype={constructor:Ig,count:function(){return this.eachAfter(Dg)},each:function(t){var e,n,r,i,a=this,o=[a];do{for(e=o.reverse(),o=[];a=e.pop();)if(t(a),n=a.children)for(r=0,i=n.length;r<i;++r)o.push(n[r])}while(o.length);return this},eachAfter:function(t){for(var e,n,r,i=this,a=[i],o=[];i=a.pop();)if(o.push(i),e=i.children)for(n=0,r=e.length;n<r;++n)a.push(e[n]);for(;i=o.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 Pg(this).eachBefore(Lg)}};var Hg=function t(e){function n(t,n,r,i,a){!function(t,e,n,r,i,a){for(var o,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=a-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(o={value:c,dice:u<l,children:y.slice(_,b)}),o.dice?Ug(o,n,r,i,w?r+=l*c/w:a):zg(o,n,r,w?n+=u*c/w:i,a),w-=c,_=b}}(e,t,n,r,i,a)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}((1+Math.sqrt(5))/2);function Fg(){var t=Hg,e=!1,n=1,r=1,i=[0],a=Vg,o=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(Gg),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]=a(e)/2,r+=l(e)-n,c+=o(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=Ng(e),c):t},c.padding=function(t){return arguments.length?c.paddingInner(t).paddingOuter(t):c.paddingInner()},c.paddingInner=function(t){return arguments.length?(a="function"==typeof t?t:Bg(+t),c):a},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?(o="function"==typeof t?t:Bg(+t),c):o},c.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:Bg(+t),c):s},c.paddingBottom=function(t){return arguments.length?(u="function"==typeof t?t:Bg(+t),c):u},c.paddingLeft=function(t){return arguments.length?(l="function"==typeof t?t:Bg(+t),c):l},c}var jg={black:{100:"#000000"},blue:{10:"#edf5ff",20:"#d0e2ff",30:"#a6c8ff",40:"#78a9ff",50:"#4589ff",60:"#0f62fe",70:"#0043ce",80:"#002d9c",90:"#001d6c",100:"#001141"},coolGray:{10:"#f2f4f8",20:"#dde1e6",30:"#c1c7cd",40:"#a2a9b0",50:"#878d96",60:"#697077",70:"#4d5358",80:"#343a3f",90:"#21272a",100:"#121619"},cyan:{10:"#e5f6ff",20:"#bae6ff",30:"#82cfff",40:"#33b1ff",50:"#1192e8",60:"#0072c3",70:"#00539a",80:"#003a6d",90:"#012749",100:"#061727"},gray:{10:"#f4f4f4",20:"#e0e0e0",30:"#c6c6c6",40:"#a8a8a8",50:"#8d8d8d",60:"#6f6f6f",70:"#525252",80:"#393939",90:"#262626",100:"#161616"},green:{10:"#defbe6",20:"#a7f0ba",30:"#6fdc8c",40:"#42be65",50:"#24a148",60:"#198038",70:"#0e6027",80:"#044317",90:"#022d0d",100:"#071908"},magenta:{10:"#fff0f7",20:"#ffd6e8",30:"#ffafd2",40:"#ff7eb6",50:"#ee5396",60:"#d02670",70:"#9f1853",80:"#740937",90:"#510224",100:"#2a0a18"},orange:{40:"#ff832b"},purple:{10:"#f6f2ff",20:"#e8daff",30:"#d4bbff",40:"#be95ff",50:"#a56eff",60:"#8a3ffc",70:"#6929c4",80:"#491d8b",90:"#31135e",100:"#1c0f30"},red:{10:"#fff1f1",20:"#ffd7d9",30:"#ffb3b8",40:"#ff8389",50:"#fa4d56",60:"#da1e28",70:"#a2191f",80:"#750e13",90:"#520408",100:"#2d0709"},teal:{10:"#d9fbfb",20:"#9ef0f0",30:"#3ddbd9",40:"#08bdba",50:"#009d9a",60:"#007d79",70:"#005d5d",80:"#004144",90:"#022b30",100:"#081a1c"},warmGray:{10:"#f7f3f2",20:"#e5e0df",30:"#cac5c4",40:"#ada8a8",50:"#8f8b8b",60:"#726e6e",70:"#565151",80:"#3c3838",90:"#272525",100:"#171414"},white:{0:"#ffffff"},yellow:{20:"#fdd13a",30:"#f1c21b"}},Wg=function(){var t,e=ma(this.parentNode).select("rect.leaf"),n=es(getComputedStyle(e.node(),null).getPropertyValue("fill"));if(n&&(t=function(t){if(!t)return null;for(var e=0,n=Object.keys(jg);e<n.length;e++)for(var r=n[e],i=jg[r],a=0,o=Object.keys(i);a<o.length;a++){var s=o[a];if(i[s]===t)return s}return null}(n?n.hex():null)),null==t){var r=fs(n).l;t=Math.abs(100*r-100)}return t>50?"white":"black"},Yg=0,Xg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="treemap",e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("g[data-name='leaf']").transition(e.services.transitions.getTransition("legend-hover-treemap")).attr("opacity",(function(t){return t.parent.data.name===n.datum().name?1:.3}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("g[data-name='leaf']").transition(e.services.transitions.getTransition("legend-mouseout-treemap")).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(j.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(j.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getContainerSVG(),r=this.model.getData(),i=this.model.getDisplayData(),a=this.model.getOptions(),o=da.getProperty(window,"location"),s=lf.getSVGElementSize(this.parent,{useAttrs:!0}),u=s.width,l=s.height,c=Pg({name:a.title||"Treemap",children:i}).sum((function(t){return t.value})).sort((function(t,e){return e.value-t.value})),h=(Po(r,(function(t){return Po(t.children,(function(t){return t.value}))})),Fg().size([u,l]).paddingInner(1).paddingOuter(0).round(!0)(c)),f=this.services.transitions,d=n.selectAll("g[data-name='leaf']").data(h.leaves(),(function(t){return t.data.name}));d.exit().attr("opacity",0).remove();var p=d.enter().append("g").attr("data-name","leaf").attr("data-uid",(function(){return Yg++})).merge(d);p.attr("data-name","leaf").transition(f.getTransition("treemap-group-update",t)).attr("transform",(function(t){return"translate("+t.x0+","+t.y0+")"}));var g=p.selectAll("rect.leaf").data((function(t){return[t]}));g.exit().attr("width",0).attr("height",0).remove(),g.enter().append("rect").classed("leaf",!0).merge(g).attr("width",0).attr("height",0).attr("id",(function(){var t=ma(this.parentNode).attr("data-uid");return a.style.prefix+"-leaf-"+t})).attr("class",(function(t){for(;t.depth>1;)t=t.parent;return e.model.getColorClassName({classNameTypes:[E.FILL],dataGroupName:t.data.name,originalClassName:"leaf"})})).transition(this.services.transitions.getTransition("treemap-leaf-update-enter",t)).attr("width",(function(t){return t.x1-t.x0})).attr("height",(function(t){return t.y1-t.y0})),p.selectAll("clipPath").data((function(t){return!0!==t.data.showLabel?[]:[1]}),(function(t){return t})).join((function(t){t.append("clipPath").attr("id",(function(){var t=ma(this.parentNode).attr("data-uid");return a.style.prefix+"-clip-"+t})).append("use").attr("xlink:href",(function(){var t=ma(this.parentNode.parentNode).attr("data-uid"),e=a.style.prefix+"-leaf-"+t;return new URL("#"+e,o)+""}))}),(function(t){return null}),(function(t){return t.remove()})),p.selectAll("text").data((function(t){if(!0!==t.data.showLabel)return[];for(var n=t;n.depth>1;)n=n.parent;var r=fs(e.model.getFillColor(n.data.name));return[{text:t.data.name,color:r.l<.5?"white":"black"}]}),(function(t){return t})).join((function(t){var e=t.append("text").text((function(t){return t.text})).style("fill",Wg).attr("x",7).attr("y",18);o&&e.attr("clip-path",(function(){var t=ma(this.parentNode).attr("data-uid"),e=a.style.prefix+"-clip-"+t;return"url("+new URL("#"+e,o)+")"}))}),(function(t){return t.text((function(t){return t.text})).style("fill",Wg)}),(function(t){return t.remove()})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("rect.leaf").on("mouseover",(function(e){for(var n=ma(this),r=getComputedStyle(this,null).getPropertyValue("fill"),i=e;i.depth>1;)i=i.parent;n.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")).style("fill",(function(t){return es(r).darker(.7).toString()})),t.services.events.dispatchEvent(j.Tooltip.SHOW,{hoveredElement:n,items:[{color:r,label:i.data.name,bold:!0},{label:e.data.name,value:e.data.value}]}),t.services.events.dispatchEvent(j.Treemap.LEAF_MOUSEOVER,{element:n,datum:e})})).on("mousemove",(function(e){var n=ma(this);t.services.events.dispatchEvent(j.Treemap.LEAF_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(j.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(j.Treemap.LEAF_CLICK,{element:ma(this),datum:e})})).on("mouseout",(function(e){var n=ma(this);n.classed("hovered",!1);for(var r=e;r.depth>1;)r=r.parent;n.transition(t.services.transitions.getTransition("graph_element_mouseout_fill_update")).style("fill",null),t.services.events.dispatchEvent(j.Treemap.LEAF_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(j.Tooltip.HIDE,{hoveredElement:n})}))},e}(Kp),qg=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(){lf.appendOrSelect(this.getContainerSVG(),"rect").attr("x",0).attr("y",0).attr("width",this.configs.size||Ha.default.size).attr("height",this.configs.size||Ha.default.size).attr("opacity",0)},e}(Kp),Zg=function(t){function e(n,r,i,a){var o=t.call(this,n,r,a)||this;return o.type="layout",o.configs=a,o.children=i,o._instanceID=e.instanceID++,(o.configs.direction===L.ROW_REVERSE||o.configs.direction===L.COLUMN_REVERSE)&&(o.children=o.children.reverse()),o.init(),o}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=da.getProperty(t,"data","growth","x");return e===R.PREFERRED||e===R.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 da.getProperty(t,"data","growth","x")===R.STRETCH})).size()},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.parent,r=lf.getSVGElementSize(n,{useAttrs:!0}),i=r.width,a=r.height,o=Pg({children:this.children}).sum((function(t){return t.size})),s=this.configs.direction===L.ROW||this.configs.direction===L.ROW_REVERSE?Ug:zg;Fg().tile(s).size([i,a])(o);var u=this.configs.direction===L.ROW||this.configs.direction===L.ROW_REVERSE,l=n.selectAll("svg.layout-child-"+this._instanceID).data(o.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(ma(n));var i=da.getProperty(e,"data","growth","x");i!==R.PREFERRED&&i!==R.FIXED||r.render(t)}))})),n.selectAll("svg.layout-child-"+this._instanceID).each((function(t){var e=da.getProperty(t,"data","growth","x"),n=lf.getSVGElementSize(ma(this),{useBBox:!0});if("legend"===t.data.id){var r=lf.getSVGElementSize(ma(this),{useAttrs:!0});r.height<40&&(n.height=r.height)}if(e===R.PREFERRED){var o=u?n.width:n.height,s=u?i:a;t.data.size=o/s*100}})),l.exit().remove(),this.children.filter((function(t){return da.getProperty(t,"growth","x")===R.STRETCH})).forEach((function(t,n){t.size=(100-+e.getPreferedAndFixedSizeSum())/+e.getNumOfStretchChildren()})),o=Pg({children:this.children}).sum((function(t){return t.size})),Fg().tile(s).size([i,a]).padding(0)(o),n.selectAll("svg.layout-child-"+this._instanceID).data(o.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){da.getProperty(e,"data","growth","x")===R.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),Kg=Array.prototype.slice;function $g(t){return t}function Qg(t){return"translate("+(t+.5)+",0)"}function Jg(t){return"translate(0,"+(t+.5)+")"}function tv(t){return function(e){return+t(e)}}function ev(t){var e=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}function nv(){return!this.__axis}function rv(t,e){var n=[],r=null,i=null,a=6,o=6,s=3,u=1===t||4===t?-1:1,l=4===t||2===t?"x":"y",c=1===t||3===t?Qg:Jg;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(a,0)+s,g=e.range(),v=+g[0]+.5,m=+g[g.length-1]+.5,y=(e.bandwidth?ev:tv)(e.copy()),_=h.selection?h.selection():h,b=_.selectAll(".domain").data([null]),x=_.selectAll(".tick").data(f,e).order(),w=x.exit(),O=x.enter().append("g").attr("class","tick"),E=x.select("line"),S=x.select("text");b=b.merge(b.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),x=x.merge(O),E=E.merge(O.append("line").attr("stroke","currentColor").attr(l+"2",u*a)),S=S.merge(O.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),E=E.transition(h),S=S.transition(h),w=w.transition(h).attr("opacity",1e-6).attr("transform",(function(t){return isFinite(t=y(t))?c(t):this.getAttribute("transform")})),O.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?o?"M"+u*o+","+v+"H0.5V"+m+"H"+u*o:"M0.5,"+v+"V"+m:o?"M"+v+","+u*o+"V0.5H"+m+"V"+u*o:"M"+v+",0.5H"+m),x.attr("opacity",1).attr("transform",(function(t){return c(y(t))})),E.attr(l+"2",u*a),S.attr(l,u*p).text(d),_.filter(nv).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=Kg.call(arguments),h},h.tickArguments=function(t){return arguments.length?(n=null==t?[]:Kg.call(t),h):n.slice()},h.tickValues=function(t){return arguments.length?(r=null==t?null:Kg.call(t),h):r&&r.slice()},h.tickFormat=function(t){return arguments.length?(i=t,h):i},h.tickSize=function(t){return arguments.length?(a=o=+t,h):a},h.tickSizeInner=function(t){return arguments.length?(a=+t,h):a},h.tickSizeOuter=function(t){return arguments.length?(o=+t,h):o},h.tickPadding=function(t){return arguments.length?(s=+t,h):s},h}function iv(t){return rv(1,t)}function av(t){return rv(2,t)}function ov(t){return rv(3,t)}function sv(t){return rv(4,t)}var uv=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,a=this.model.getOptions(),o=da.getProperty(a,"axes",i,"visible"),s=this.getContainerSVG(),u=lf.getSVGElementSize(this.parent,{useAttrs:!0}),l=u.width,c=u.height,h=lf.appendOrSelect(s,"g.axis."+i);i===S.BOTTOM||i===S.TOP?(e=this.configs.axes[S.LEFT]?this.margins.left:0,n=this.configs.axes[S.RIGHT]?l-this.margins.right:l):(e=c-this.margins.bottom,n=this.margins.top);var f,d=this.services.cartesianScales.getScaleByPosition(i);switch(this.scaleType===C.LABELS?d.rangeRound([e,n]):d.range([e,n]),i){case S.LEFT:f=sv;break;case S.BOTTOM:f=ov;break;case S.RIGHT:f=av;break;case S.TOP:f=iv}h.attr("aria-label",i+" axis");var p=!h.select("g.ticks").empty(),g=lf.appendOrSelect(h,"g.ticks");p||(g.attr("role",r.GRAPHICS_OBJECT+" "+r.GROUP),g.attr("aria-label",i+" ticks"));var v=lf.appendOrSelect(h,"g.ticks.invisible").style("opacity","0").style("pointer-events","none").attr("aria-hidden",!0).attr("aria-label","invisible "+i+" ticks"),m=da.getProperty(a,"axes",i),y=this.scaleType===C.TIME||m.scaleType===C.TIME,_=i===S.LEFT||i===S.RIGHT,b=this.model.get("zoomDomain");if(b&&y&&!_&&d.domain(b),o){var x=da.getProperty(m,"scaleType"),w=da.getProperty(a,"data","loading"),O=da.getProperty(m,"ticks","number"),E=da.getProperty(m,"ticks","values"),T=da.getProperty(m,"truncation","type"),A=da.getProperty(m,"truncation","threshold"),D=da.getProperty(m,"truncation","numCharacter"),P=null!==O,k=da.getProperty(a,"timeScale"),L=lf.appendOrSelect(v,"g.tick"),R=lf.appendOrSelect(L,"text").text("0"),I=lf.getSVGElementSize(R.node(),{useBBox:!0}).height;L.remove();var N,V=this.scaleType||m.scaleType||C.LINEAR,B=f(d).tickSizeOuter(0);if(d.ticks){var G=void 0;if(P?G=O:(G=Na.ticks.number,_&&(G=this.getNumberOfFittingTicks(c,I,Na.ticks.verticalSpaceRatio))),1===d.ticks().length&&0===d.ticks()[0]&&(G=0),B.ticks(G),y)if(d.ticks(G).length){var U=da.getProperty(a,"timeScale","addSpaceOnEdges"),z=da.getProperty(a,"axes",i,"domain"),F=void 0,j=d.copy();U&&!z&&j.nice(G),F=j.ticks(G),U&&F.length>2&&!z&&(F.splice(F.length-1,1),F.splice(0,1)),B.tickValues(F)}else B.tickValues([])}var W=da.getProperty(m,"ticks","formatter");if(y){var Y=ag(B.tickValues());N=null===W?function(t,e){return rg(t,e,Y,k)}:function(t,e){var n=rg(t,e,Y,k);return W(t,e,n)}}else null===W?V===C.LINEAR&&(N=function(t){return t.toLocaleString()}):N=W;B.tickFormat(N);var X,q=this.services.cartesianScales.getScaleByPosition(i).domain(),Z=q[0],K=q[1];if(E){if(y)E.forEach((function(t,e){void 0===t.getTime&&(E[e]=new Date(t))})),X=E.filter((function(t){var e=t.getTime();return e>=new Date(Z).getTime()&&e<=new Date(K).getTime()}));else if(x===C.LABELS){var $=this.services.cartesianScales.getScaleByPosition(i).domain();X=E.filter((function(t){return $.includes(t)}))}else X=E.filter((function(t){return t>=Z&&t<=K}));B.tickValues(X)}switch(i){case S.LEFT:g.attr("transform","translate("+this.margins.left+", 0)");break;case S.BOTTOM:g.attr("transform","translate(0, "+(c-this.margins.bottom)+")");break;case S.RIGHT:g.attr("transform","translate("+(l-this.margins.right)+", 0)");break;case S.TOP:g.attr("transform","translate(0, "+this.margins.top+")")}var Q=this.model.isDataEmpty();if(m.title){var J=lf.appendOrSelect(h,"text.axis-title").html(Q||w?"":m.title);switch(i){case S.LEFT:J.attr("transform","rotate(-90)").attr("y",0).attr("x",-d.range()[0]/2).attr("dy","1em").style("text-anchor","middle");break;case S.BOTTOM:J.attr("transform","translate("+(this.margins.left/2+d.range()[1]/2)+", "+c+")").style("text-anchor","middle");break;case S.RIGHT:J.attr("transform","rotate(90)").attr("y",-l).attr("x",d.range()[0]/2).attr("dy","1em").style("text-anchor","middle");break;case S.TOP:var tt=lf.getSVGElementSize(J,{useBBox:!0}).height;J.attr("transform","translate("+(this.margins.left/2+d.range()[1]/2)+", "+tt/2+")").style("text-anchor","middle")}}if(y){var et=ag(B.tickValues()),nt=k.showDayName,rt=g;t&&(g=g.transition(this.services.transitions.getTransition("axis-update",t))),g=g.call(B),rt.selectAll(".tick").data(B.tickValues(),d).order().select("text").style("font-weight",(function(t,e){return ng(t,e,et,nt)?"bold":"normal"}))}else g=t&&p?g.transition(this.services.transitions.getTransition("axis-update")).call(B):g.call(B);if(v.call(B),i===S.BOTTOM||i===S.TOP){var it=!1,at=da.getProperty(m,"ticks","rotation");if(at===H.ALWAYS)it=!0;else if(at===H.NEVER)it=!1;else if(!at||at===H.AUTO)if(d.step){it=v.selectAll("g.tick text").nodes().some((function(t){return lf.getSVGElementSize(t,{useBBox:!0}).width>=d.step()}))}else{var ot=da.getProperty(m,"ticks","rotateIfSmallerThan")||Na.ticks.rotateIfSmallerThan,st=l/(y?B.tickValues().length:d.ticks().length)/2;it=y?st<2*ot:st<ot}it?(P||(B.ticks(this.getNumberOfFittingTicks(l,I,Na.ticks.horizontalSpaceRatio)),v.call(B),g.call(B)),h.selectAll("g.ticks g.tick text").attr("transform","rotate(-45)").style("text-anchor",i===S.TOP?"start":"end")):h.selectAll("g.ticks g.tick text").attr("transform",null).style("text-anchor",null)}if(w?h.attr("opacity",0):h.attr("opacity",1),g.selectAll("g.tick").attr("aria-label",(function(t){return t})),v.selectAll("g.tick").attr("aria-label",(function(t){return t})),T!==M.NONE&&x===C.LABELS&&!E){var ut=this.model.getDataValuesGroupedByKeys();if(ut.length>0){var lt=ut.map((function(t){return t.sharedStackKey})),ct=s.select("g.axis."+i+" g.ticks g.tick").html();h.selectAll("g.ticks g.tick").html(ct),h.selectAll("g.tick text").data(lt).text((function(t){return t.length>A?da.truncateLabel(t,T,D):t})),this.getInvisibleAxisRef().selectAll("g.tick text").data(lt).text((function(t){return t.length>A?da.truncateLabel(t,T,D):t})),h.selectAll("g.ticks").html(this.getInvisibleAxisRef().html()),h.selectAll("g.tick text").data(lt)}}this.addEventListeners()}else g.attr("aria-hidden",!0)},e.prototype.addEventListeners=function(){var t=this.getContainerSVG(),e=this.configs.position,n=lf.appendOrSelect(t,"g.axis."+e),r=this.model.getOptions(),i=da.getProperty(r,"axes",e),a=da.getProperty(i,"scaleType"),o=da.getProperty(i,"truncation","threshold"),s=(this.scaleType===C.TIME||(i.scaleType,C.TIME),this);n.selectAll("g.tick text").on("mouseover",(function(t){s.services.events.dispatchEvent(j.Axis.LABEL_MOUSEOVER,{element:ma(this),datum:t}),a===C.LABELS&&t.length>o&&s.services.events.dispatchEvent(j.Tooltip.SHOW,{hoveredElement:ma(this),content:t})})).on("mousemove",(function(t){s.services.events.dispatchEvent(j.Axis.LABEL_MOUSEMOVE,{element:ma(this),datum:t}),a===C.LABELS&&t.length>o&&s.services.events.dispatchEvent(j.Tooltip.MOVE)})).on("click",(function(t){s.services.events.dispatchEvent(j.Axis.LABEL_CLICK,{element:ma(this),datum:t})})).on("mouseout",(function(t){s.services.events.dispatchEvent(j.Axis.LABEL_MOUSEOUT,{element:ma(this),datum:t}),a===C.LABELS&&s.services.events.dispatchEvent(j.Tooltip.HIDE)}))},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 da.clamp(r,2,Na.ticks.number)},e.prototype.destroy=function(){var t=this.getContainerSVG(),e=this.configs.position;lf.appendOrSelect(t,"g.axis."+e).selectAll("g.tick text").on("mouseover",null).on("mousemove",null).on("mouseout",null)},e}(Kp),lv=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(S),i=da.getProperty(this.model.getOptions(),"axes");r.forEach((function(t){i[S[t]]&&(n[S[t]]=!0)})),this.configs.axes=n,r.forEach((function(t){var n=S[t];if(e.configs.axes[n]&&!e.children[n]){var r=new uv(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 a={};Object.keys(this.children).forEach((function(n){var r,i=e.children[n],o=i.configs.position,s=i.getInvisibleAxisRef(),u=lf.getSVGElementSize(s,{useBBox:!0}),l=u.width,c=u.height;switch(i.getTitleRef().empty()?r=0:(r=lf.getSVGElementSize(i.getTitleRef(),{useBBox:!0}).height,o!==S.LEFT&&o!==S.RIGHT||(r+=5)),o){case S.TOP:a.top=c+r;break;case S.BOTTOM:a.bottom=c+r;break;case S.LEFT:a.left=l+r;break;case S.RIGHT:a.right=l+r}e.addAxisThresholds(t,o)})),Object.keys(a).some((function(t){return e.margins[t]!==a[t]}))&&(this.margins=Object.assign(this.margins,a),this.model.set({axesMargins:this.margins},{skipUpdate:!0}),this.services.events.dispatchEvent(j.ZoomBar.UPDATE),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=da.getProperty(this.model.getOptions(),"axes",e).thresholds;r&&(r.forEach((function(t,r){var i=new lg(n.model,n.services,x(x({},t),{axisPosition:e,index:r}));n.thresholds.push(i)})),this.thresholds.forEach((function(e){e.setParent(n.parent),e.render(t)})))},e}(Kp);function cv(){ia.preventDefault(),ia.stopImmediatePropagation()}function hv(t){var e=t.document.documentElement,n=ma(t).on("dragstart.drag",cv,!0);"onselectstart"in e?n.on("selectstart.drag",cv,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function fv(t,e){var n=t.document.documentElement,r=ma(t).on("dragstart.drag",null);e&&(r.on("click.drag",cv,!0),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function dv(t){return function(){return t}}function pv(t,e,n){this.target=t,this.type=e,this.selection=n}function gv(){ia.stopImmediatePropagation()}function vv(){ia.preventDefault(),ia.stopImmediatePropagation()}var mv={name:"drag"},yv={name:"space"},_v={name:"handle"},bv={name:"center"};function xv(t){return[+t[0],+t[1]]}function wv(t){return[xv(t[0]),xv(t[1])]}function Ov(t){return function(e){return function(t,e,n){arguments.length<3&&(n=e,e=ya().changedTouches);for(var r,i=0,a=e?e.length:0;i<a;++i)if((r=e[i]).identifier===n)return _a(t,r);return null}(e,ia.touches,t)}}var Ev={name:"x",handles:["w","e"].map(Pv),input:function(t,e){return null==t?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},Sv={name:"y",handles:["n","s"].map(Pv),input:function(t,e){return null==t?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},Tv={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Mv={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},Av={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},Cv={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},Dv={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Pv(t){return{type:t}}function kv(){return!ia.ctrlKey&&!ia.button}function Lv(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function Rv(){return navigator.maxTouchPoints||"ontouchstart"in this}function Iv(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function Nv(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function Vv(){return function(t){var e,n=Lv,r=kv,i=Rv,a=!0,o=ff("start","brush","end"),s=6;function u(e){var n=e.property("__brush",g).selectAll(".overlay").data([Pv("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Tv.overlay).merge(n).each((function(){var t=Iv(this).extent;ma(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])})),e.selectAll(".selection").data([Pv("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Tv.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=e.selectAll(".handle").data(t.handles,(function(t){return t.type}));r.exit().remove(),r.enter().append("rect").attr("class",(function(t){return"handle handle--"+t.type})).attr("cursor",(function(t){return Tv[t.type]})),e.each(l).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",f).filter(i).on("touchstart.brush",f).on("touchmove.brush",d).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function l(){var t=ma(this),e=Iv(this).selection;e?(t.selectAll(".selection").style("display",null).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1]),t.selectAll(".handle").style("display",null).attr("x",(function(t){return"e"===t.type[t.type.length-1]?e[1][0]-s/2:e[0][0]-s/2})).attr("y",(function(t){return"s"===t.type[0]?e[1][1]-s/2:e[0][1]-s/2})).attr("width",(function(t){return"n"===t.type||"s"===t.type?e[1][0]-e[0][0]+s:s})).attr("height",(function(t){return"e"===t.type||"w"===t.type?e[1][1]-e[0][1]+s:s}))):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function c(t,e,n){return!n&&t.__brush.emitter||new h(t,e)}function h(t,e){this.that=t,this.args=e,this.state=t.__brush,this.active=0}function f(){if((!e||ia.touches)&&r.apply(this,arguments)){var n,i,o,s,u,h,f,d,p,g,v,m=this,y=ia.target.__data__.type,_="selection"===(a&&ia.metaKey?y="overlay":y)?mv:a&&ia.altKey?bv:_v,b=t===Sv?null:Cv[y],x=t===Ev?null:Dv[y],w=Iv(m),O=w.extent,E=w.selection,S=O[0][0],T=O[0][1],M=O[1][0],A=O[1][1],C=0,D=0,P=b&&x&&a&&ia.shiftKey,k=ia.touches?Ov(ia.changedTouches[0].identifier):ba,L=k(m),R=L,I=c(m,arguments,!0).beforestart();"overlay"===y?(E&&(p=!0),w.selection=E=[[n=t===Sv?S:L[0],o=t===Ev?T:L[1]],[u=t===Sv?M:n,f=t===Ev?A:o]]):(n=E[0][0],o=E[0][1],u=E[1][0],f=E[1][1]),i=n,s=o,h=u,d=f;var N=ma(m).attr("pointer-events","none"),V=N.selectAll(".overlay").attr("cursor",Tv[y]);if(ia.touches)I.moved=G,I.ended=z;else{var B=ma(ia.view).on("mousemove.brush",G,!0).on("mouseup.brush",z,!0);a&&B.on("keydown.brush",H,!0).on("keyup.brush",F,!0),hv(ia.view)}gv(),zf(m),l.call(m),I.start()}function G(){var t=k(m);!P||g||v||(Math.abs(t[0]-R[0])>Math.abs(t[1]-R[1])?v=!0:g=!0),R=t,p=!0,vv(),U()}function U(){var t;switch(C=R[0]-L[0],D=R[1]-L[1],_){case yv:case mv:b&&(C=Math.max(S-n,Math.min(M-u,C)),i=n+C,h=u+C),x&&(D=Math.max(T-o,Math.min(A-f,D)),s=o+D,d=f+D);break;case _v:b<0?(C=Math.max(S-n,Math.min(M-n,C)),i=n+C,h=u):b>0&&(C=Math.max(S-u,Math.min(M-u,C)),i=n,h=u+C),x<0?(D=Math.max(T-o,Math.min(A-o,D)),s=o+D,d=f):x>0&&(D=Math.max(T-f,Math.min(A-f,D)),s=o,d=f+D);break;case bv:b&&(i=Math.max(S,Math.min(M,n-C*b)),h=Math.max(S,Math.min(M,u+C*b))),x&&(s=Math.max(T,Math.min(A,o-D*x)),d=Math.max(T,Math.min(A,f+D*x)))}h<i&&(b*=-1,t=n,n=u,u=t,t=i,i=h,h=t,y in Mv&&V.attr("cursor",Tv[y=Mv[y]])),d<s&&(x*=-1,t=o,o=f,f=t,t=s,s=d,d=t,y in Av&&V.attr("cursor",Tv[y=Av[y]])),w.selection&&(E=w.selection),g&&(i=E[0][0],h=E[1][0]),v&&(s=E[0][1],d=E[1][1]),E[0][0]===i&&E[0][1]===s&&E[1][0]===h&&E[1][1]===d||(w.selection=[[i,s],[h,d]],l.call(m),I.brush())}function z(){if(gv(),ia.touches){if(ia.touches.length)return;e&&clearTimeout(e),e=setTimeout((function(){e=null}),500)}else fv(ia.view,p),B.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);N.attr("pointer-events","all"),V.attr("cursor",Tv.overlay),w.selection&&(E=w.selection),Nv(E)&&(w.selection=null,l.call(m)),I.end()}function H(){switch(ia.keyCode){case 16:P=b&&x;break;case 18:_===_v&&(b&&(u=h-C*b,n=i+C*b),x&&(f=d-D*x,o=s+D*x),_=bv,U());break;case 32:_!==_v&&_!==bv||(b<0?u=h-C:b>0&&(n=i-C),x<0?f=d-D:x>0&&(o=s-D),_=yv,V.attr("cursor",Tv.selection),U());break;default:return}vv()}function F(){switch(ia.keyCode){case 16:P&&(g=v=P=!1,U());break;case 18:_===bv&&(b<0?u=h:b>0&&(n=i),x<0?f=d:x>0&&(o=s),_=_v,U());break;case 32:_===yv&&(ia.altKey?(b&&(u=h-C*b,n=i+C*b),x&&(f=d-D*x,o=s+D*x),_=bv):(b<0?u=h:b>0&&(n=i),x<0?f=d:x>0&&(o=s),_=_v),V.attr("cursor",Tv[y]),U());break;default:return}vv()}}function d(){c(this,arguments).moved()}function p(){c(this,arguments).ended()}function g(){var e=this.__brush||{selection:null};return e.extent=wv(n.apply(this,arguments)),e.dim=t,e}return u.move=function(e,n){e.selection?e.on("start.brush",(function(){c(this,arguments).beforestart().start()})).on("interrupt.brush end.brush",(function(){c(this,arguments).end()})).tween("brush",(function(){var e=this,r=e.__brush,i=c(e,arguments),a=r.selection,o=t.input("function"==typeof n?n.apply(this,arguments):n,r.extent),s=Ms(a,o);function u(t){r.selection=1===t&&null===o?null:s(t),l.call(e),i.brush()}return null!==a&&null!==o?u:u(1)})):e.each((function(){var e=this,r=arguments,i=e.__brush,a=t.input("function"==typeof n?n.apply(e,r):n,i.extent),o=c(e,r).beforestart();zf(e),i.selection=null===a?null:a,l.call(e),o.start().brush().end()}))},u.clear=function(t){u.move(t,null)},h.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting?(this.starting=!1,this.emit("start")):this.emit("brush"),this},brush:function(){return this.emit("brush"),this},end:function(){return 0==--this.active&&(delete this.state.emitter,this.emit("end")),this},emit:function(e){!function(t,e,n,r){var i=ia;t.sourceEvent=ia,ia=t;try{e.apply(n,r)}finally{ia=i}}(new pv(u,e,t.output(this.state.selection)),o.apply,o,[e,this.that,this.args])}},u.extent=function(t){return arguments.length?(n="function"==typeof t?t:dv(wv(t)),u):n},u.filter=function(t){return arguments.length?(r="function"==typeof t?t:dv(!!t),u):r},u.touchable=function(t){return arguments.length?(i="function"==typeof t?t:dv(!!t),u):i},u.handleSize=function(t){return arguments.length?(s=+t,u):s},u.keyModifiers=function(t){return arguments.length?(a=!!t,u):a},u.on=function(){var t=o.on.apply(o,arguments);return t===o?u:t},u}(Ev)}var Bv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grid-brush",e.selectionSelector="rect.selection",e.frontSelectionSelector="rect.frontSelection",e}return n(e,t),e.prototype.render=function(t){var n=this,r=this.parent,i=this.getContainerSVG(),a=lf.appendOrSelect(r,"svg.chart-grid-backdrop"),o=lf.appendOrSelect(a,"g."+this.type),s=lf.appendOrSelect(o,this.selectionSelector),u=lf.getSVGElementSize(a,{useAttrs:!0}),l=u.width,c=u.height,h=this.services.cartesianScales,f=h.getMainXScaleType(),d=h.getMainXScale(),p=d.range(),g=p[0];p[1];i.attr("transform","translate("+g+",0)");var v=lf.appendOrSelect(i,this.frontSelectionSelector);if(d&&f===C.TIME){var m=this.model.get("zoomDomain");void 0===m&&(m=this.services.zoom.getDefaultZoomBarDomain())&&this.model.set({zoomDomain:m},{animate:!1});var y=function(t,e){var r=oc().range([0,l]).domain(m),i=[r.invert(t),r.invert(e)];i[0].valueOf()===i[1].valueOf()&&(i=n.services.zoom.getDefaultZoomBarDomain()),m[0].valueOf()===i[0].valueOf()&&m[1].valueOf()===i[1].valueOf()||n.services.zoom.handleDomainChange(i)},_=Vv().extent([[0,0],[l-1,c]]).on("start brush end",(function(){var t=ia.selection;null!==t&&t[0]!==t[1]&&(v.attr("x",s.attr("x")).attr("y",s.attr("y")).attr("width",s.attr("width")).attr("height",s.attr("height")).style("cursor","pointer").style("display",null),function(t){for(var n=t[1]-t[0],r="0,"+n.toString(),i=Math.floor(c/e.DASH_LENGTH),a=i*e.DASH_LENGTH,o=0;o<i;o++)r+=","+e.DASH_LENGTH;r+=","+(c-a),i%2==1&&(r+=",0"),r+=","+n.toString(),r+=","+c.toString(),v.attr("stroke-dasharray",r)}(t))})).on("end.brushed",(function(){var t=ia.selection;null!==t&&(y(t[0],t[1]),o.call(_.move,null),v.style("display","none"))}));o.call(_);var b=this.services.zoom.getZoomRatio();a.on("click",(function(){if(ia.shiftKey){var t=ba(o.node())[0],e=t-l*b/2;e<0&&(e=0);var n=t+l*b/2;n>l&&(n=l),y(e,n)}}))}},e.DASH_LENGTH=4,e}(Kp),Gv=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="chart-clip",i.chartClipId="chart-clip-id-"+Math.floor(99999999999*Math.random()),i.init(),i}return n(e,t),e.prototype.init=function(){this.model.set({chartClipId:this.chartClipId},{skipUpdate:!0})},e.prototype.render=function(t){this.createClipPath()},e.prototype.createClipPath=function(){var t=this.parent,e=this.services.cartesianScales,n=e.getMainXScale(),r=e.getMainYScale(),i=n.range(),a=i[0],o=i[1],s=r.range(),u=s[0],l=s[1];this.chartClipPath=lf.appendOrSelect(t,"clipPath."+this.type).attr("id",this.chartClipId);var c=lf.appendOrSelect(this.chartClipPath,"rect."+this.type);c.attr("x",a).attr("y",l).attr("width",o-a).attr("height",u-l),this.chartClipPath.merge(c).lower()},e}(Kp),Uv=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);var e=da.getProperty(this.model.getOptions(),"grid","x","enabled"),n=da.getProperty(this.model.getOptions(),"grid","y","enabled");(e||n)&&(this.drawBackdrop(e,n),e&&(lf.appendOrSelect(this.backdrop,"g.x.grid"),this.drawXGrid(t)),n&&(lf.appendOrSelect(this.backdrop,"g.y.grid"),this.drawYGrid(t)))},e.prototype.drawXGrid=function(t){var e=this.parent,n=this.backdrop.attr("height"),r=ov(this.services.cartesianScales.getMainXScale()).tickSizeInner(-n).tickSizeOuter(0),i=da.getProperty(this.model.getOptions(),"grid","x","numberOfTicks");r.ticks(i);var a=e.select(".x.grid").attr("transform","translate("+-this.backdrop.attr("x")+", "+n+")");if(t){var o=this.services.transitions.getTransition("grid-update");a.transition(o).call(r)}else a.call(r);this.cleanGrid(a)},e.prototype.drawYGrid=function(t){var e=this.parent,n=this.backdrop.attr("width"),r=sv(this.services.cartesianScales.getMainYScale()).tickSizeInner(-n).tickSizeOuter(0),i=da.getProperty(this.model.getOptions(),"grid","y","numberOfTicks");r.ticks(i);var a=e.select(".y.grid").attr("transform","translate(0, "+-this.backdrop.attr("y")+")");if(t){var o=this.services.transitions.getTransition("grid-update");a.transition(o).call(r)}else a.call(r);this.cleanGrid(a)},e.prototype.getGridlineThreshold=function(t){var e,n=this.parent,r=n.selectAll(".x.grid .tick").nodes().sort((function(t,e){return Number(da.getTranslationValues(t).tx)-Number(da.getTranslationValues(e).tx)})),i=-1;if(r.length){r.forEach((function(e,n){t[0]>=+da.getTranslationValues(e).tx&&i++})),e=i+1<r.length?i+1:r.length;var a,o=r[i],s=r[e];if(o)if(s)a=+da.getTranslationValues(s).tx-+da.getTranslationValues(o).tx;else{var u=n.select("rect.chart-grid-backdrop").node();a=lf.getSVGElementSize(u).width-+da.getTranslationValues(o).tx}else a=+da.getTranslationValues(s).tx;return a*this.model.getOptions().tooltip.gridline.threshold}},e.prototype.getActiveGridline=function(t){var e=da.getProperty(this.model.getOptions,"tooltip","gridline","threshold"),n=e||this.getGridlineThreshold(t);return this.parent.selectAll(".x.grid .tick").filter((function(){var e=da.getTranslationValues(this),r=Number(e.tx)-n,i=Number(e.tx)+n;return r<=t[0]&&t[0]<=i}))},e.prototype.drawBackdrop=function(t,e){var n=this.parent,r=this.services.cartesianScales.getMainXScale(),i=this.services.cartesianScales.getMainYScale(),a=r.range(),o=a[0],s=a[1],u=i.range(),l=u[0],c=u[1];this.backdrop=lf.appendOrSelect(n,"svg.chart-grid-backdrop");var h=lf.appendOrSelect(this.backdrop,t||e?"rect.chart-grid-backdrop.stroked":"rect.chart-grid-backdrop");this.backdrop.merge(h).attr("x",o).attr("y",c).attr("width",s-o).attr("height",l-c).lower(),h.attr("width","100%").attr("height","100%")},e.prototype.cleanGrid=function(t){this.model.getOptions();t.selectAll("text").remove(),t.select(".domain").remove()},e}(Kp);var zv,Hv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="ruler",e.isXGridEnabled=da.getProperty(e.model.getOptions(),"grid","x","enabled"),e.isYGridEnabled=da.getProperty(e.model.getOptions(),"grid","y","enabled"),e.isEventListenerAdded=!1,e}return n(e,t),e.prototype.render=function(){var t=da.getProperty(this.model.getOptions(),"ruler","enabled");this.drawBackdrop(),t&&!this.isEventListenerAdded?this.addBackdropEventListeners():!t&&this.isEventListenerAdded&&this.removeBackdropEventListeners()},e.prototype.removeBackdropEventListeners=function(){this.isEventListenerAdded=!1,this.backdrop.on("mousemove mouseover mouseout",null)},e.prototype.formatTooltipData=function(t){return t},e.prototype.showRuler=function(t){var e=this,n=t[0],r=t[1],i=this.parent,a=this.services.cartesianScales.getOrientation(),o=a===A.HORIZONTAL?r:n,s=lf.appendOrSelect(i,"g.ruler").attr("aria-label","ruler"),u=lf.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,o)}));if(this.pointsWithinLine&&p.length===this.pointsWithinLine.length&&p.map((function(t){return t.domainValue})).join()===this.pointsWithinLine.map((function(t){return t.domainValue})).join())return this.pointsWithinLine=p,this.services.events.dispatchEvent(j.Tooltip.MOVE,{mousePosition:[n,r]});this.pointsWithinLine=p;var g=this.pointsWithinLine.reduce((function(t,e){if(0===t.length)return t.push(e),t;var n=t[0].domainValue,r=Math.abs(o-e.domainValue),i=Math.abs(o-n);return r>i?t:(r<i?t=[e]:t.push(e),t)}),[]);if(g.length>0){var v=this.services.cartesianScales.getRangeIdentifier(),m=g.map((function(t){return t.originalData})).filter((function(t){var e=t[v];return null!=e})),y=g.map((function(t){return t.domainValue})),_=l.filter((function(t){var n=e.services.cartesianScales.getDomainValue(t);return y.includes(n)}));this.elementsToHighlight&&this.elementsToHighlight.size()>0&&!da.isEqual(this.elementsToHighlight,_)&&this.hideRuler(),_.dispatch("mouseover"),this.elementsToHighlight=_,this.services.events.dispatchEvent(j.Tooltip.SHOW,{mousePosition:[n,r],hoveredElement:u,data:this.formatTooltipData(m)}),s.attr("opacity",1);var b=g[0];"horizontal"===a?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=lf.appendOrSelect(t,"g.ruler");t.selectAll("[role=graphics-symbol]").dispatch("mouseout"),this.services.events.dispatchEvent(j.Tooltip.HIDE),e.attr("opacity",0)},e.prototype.addBackdropEventListeners=function(){this.isEventListenerAdded=!0;var t=this,e=this.model.getDisplayData(),n=function(){var e=ba(t.parent.node());t.showRuler(e)};if(e.length>100){var r=e.length%50*12.5;n=da.debounceWithD3MousePosition((function(){var e=this.mousePosition;t.showRuler(e)}),r,this.parent.node())}this.backdrop.on("mousemove mouseover",n).on("mouseout",this.hideRuler.bind(this))},e.prototype.drawBackdrop=function(){var t=this.parent,e=this.services.cartesianScales.getMainXScale(),n=this.services.cartesianScales.getMainYScale(),r=e.range(),i=(r[0],r[1],n.range());i[0],i[1];this.backdrop=lf.appendOrSelect(t,"svg.chart-grid-backdrop");lf.appendOrSelect(this.backdrop,this.isXGridEnabled||this.isYGridEnabled?"rect.chart-grid-backdrop.stroked":"rect.chart-grid-backdrop")},e}(Kp),Fv=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.formatTooltipData=function(t){return t.reverse()},e.prototype.hideRuler=function(){var t=this.parent,e=lf.appendOrSelect(t,"g.ruler");this.services.events.dispatchEvent(j.Tooltip.HIDE),e.attr("opacity",0)},e}(Hv),jv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="toolbar",e.overflowMenuX=0,e.overflowMenuY=0,e.overflowMenuItemId=Math.floor(99999999999*Math.random()),e}return n(e,t),e.prototype.init=function(){var t=this,e=this.model.getOptions(),n=ma(this.services.domUtils.getHolder()),r=da.getProperty(e,"style","prefix");this.overflowMenu=lf.appendOrSelect(n,"div."+Gh.prefix+"--"+r+"--overflowMenu"),this.overflowMenu.style("max-width",null),this.services.events.addEventListener(j.Toolbar.SHOW_OVERFLOW_MENU,(function(){t.overflowMenu.html(t.getOverflowMenuHTML())})),this.services.events.addEventListener(j.Toolbar.HIDE_OVERFLOW_MENU,(function(){t.overflowMenu.html(null)})),document.body.addEventListener("click",(function(){return t.updateOverflowMenu(!1)}))},e.prototype.render=function(t){var e=da.getProperty(this.model.getOptions(),"data","loading"),n=Wa.buttonSize,i=parseFloat(this.parent.node().getAttribute("y")),a=this.getContainerSVG();a.attr("transform","translate(0, "+(i+-6)+")");var o=lf.getSVGElementSize(this.services.domUtils.getMainSVG(),{useAttrs:!0}).width;this.overflowMenuX=o-160,this.overflowMenuY=i+-6+n;var s=lf.appendOrSelect(a,"svg.toolbar-container").attr("width","100%").attr("height",Wa.height).attr("opacity",1);s.html(null);var u=this.getControlConfigs(),l=u.buttonList;if(u.overflowMenuItemList&&l.push(this.getOverflowButtonConfig()),e||0===l.length)lf.appendOrSelect(s,"svg.toolbar-loading-spacer").append("rect").attr("height",Wa.height).attr("width",3*n).attr("opacity",0);else{var c=0;l.forEach((function(t){var e=lf.appendOrSelect(s,"svg."+t.id).classed("toolbar-button",!0),i=lf.appendOrSelect(e,"rect.toolbar-button-background").attr("x",c).attr("y",0).attr("width",n).attr("height",n),a=lf.appendOrSelect(e,"svg.toolbar-button-icon").attr("x",c+Wa.iconPadding).attr("y",Wa.iconPadding).attr("width",Wa.iconSize).attr("height",Wa.iconSize).attr("viewBox","0 0 32 32").attr("role",r.IMG);a.html(t.iconSVGContent),t.shouldBeDisabled()?(e.classed("toolbar-button--disabled",!0).classed("toolbar-button--focusable",!1).attr("tabindex",-1).attr("role",null),a.classed("toolbar-button-icon--disabled",!0),i.classed("toolbar-button-background--disabled",!0),e.on("click",null).on("keyup",null)):(e.classed("toolbar-button--disabled",!1).classed("toolbar-button--focusable",!0).attr("tabindex",0).attr("role",r.BUTTON),a.classed("toolbar-button-icon--disabled",!1),i.classed("toolbar-button-background--disabled",!1),e.on("click",t.clickFunction).on("keyup",(function(){(ia.key&&"Enter"===ia.key||" "===ia.key)&&(ia.preventDefault(),t.clickFunction())}))),c+=n})),this.overflowButton=this.getContainerSVG().select("svg.toolbar-overflow-menu"),this.isOverflowMenuOpen()&&this.updateOverflowMenu(!0)}},e.prototype.isOverflowMenuOpen=function(){return this.overflowMenu.selectAll("ul.bx--overflow-menu-options--open").size()>0},e.prototype.updateOverflowMenu=function(t){this.overflowButton&&this.overflowButton.classed("toolbar-button--hovered",t),t?this.services.events.dispatchEvent(j.Toolbar.SHOW_OVERFLOW_MENU):this.services.events.dispatchEvent(j.Toolbar.HIDE_OVERFLOW_MENU)},e.prototype.focusOnPreviousEnabledMenuItem=function(t){for(var e=this.getOverflowMenuItems(),n=e.length,r=t-1;r>=0;r--){if(!e[r].shouldBeDisabled()){n=r;break}}if(n<e.length){var i=ma("#"+e[n].id+this.overflowMenuItemId).node();"focus"in i&&i.focus()}},e.prototype.focusOnNextEnabledMenuItem=function(t){for(var e=this.getOverflowMenuItems(),n=-1,r=t+1;r<e.length;r++){if(!e[r].shouldBeDisabled()){n=r;break}}if(n>-1){var i=ma("#"+e[n].id+this.overflowMenuItemId).node();"focus"in i&&i.focus()}},e.prototype.toggleOverflowMenu=function(){var t=this;if(this.isOverflowMenuOpen())this.updateOverflowMenu(!1);else{this.updateOverflowMenu(!0);var e=this;this.getOverflowMenuItems().forEach((function(n,r){var i=ma("#"+n.id+t.overflowMenuItemId);null!==i&&(i.on("click",(function(){n.clickFunction(),e.updateOverflowMenu(!1)})),i.on("keyup",(function(){"Enter"===ia.key?n.clickFunction():"ArrowUp"===ia.key?e.focusOnPreviousEnabledMenuItem(r):"ArrowDown"===ia.key&&e.focusOnNextEnabledMenuItem(r)})))})),e.focusOnNextEnabledMenuItem(-1)}ia.stopImmediatePropagation()},e.prototype.getOverflowMenuHTML=function(){var t,e=this,n=this.getOverflowMenuItems();return n&&0!==n.length?(t='<div data-floating-menu-container="true" data-floating-menu-direction="bottom" role="main">\n\t\t\t<ul class="bx--overflow-menu-options bx--overflow-menu--flip bx--overflow-menu-options--open"\n\t\t\t\ttabindex="-1" role="'+r.MENU+'" aria-label="Menu" data-floating-menu-direction="bottom"\n\t\t\t\tstyle="left:'+this.overflowMenuX+"px; top:"+this.overflowMenuY+'px;">',n.forEach((function(n,i){var a="bx--overflow-menu-options__option".concat(n.shouldBeDisabled()?" bx--overflow-menu-options__option--disabled":"");t+='<li class="'+a+'" role="'+r.MENU_ITEM+'">\n\t\t\t\t<button class="bx--overflow-menu-options__btn"\n\t\t\t\t\tdata-floating-menu-primary-focus="'+(0===i)+'"\n\t\t\t\t\ttabindex="-1" index="'+i+'" title="'+n.text+'"\n\t\t\t\t\tid="'+(n.id+e.overflowMenuItemId)+'">\n\t\t\t\t\t<div class="bx--overflow-menu-options__option-content">\n\t\t\t\t\t\t'+n.text+"\n\t\t\t\t\t</div>\n\t\t\t\t</button>\n\t\t\t</li>"})),t+="</ul></div>"):""},e.prototype.getControlConfigs=function(){var t=this,e=da.getProperty(this.model.getOptions(),"toolbar","numberOfIcons"),n=da.getProperty(this.model.getOptions(),"toolbar","controls"),r=[];return n.forEach((function(e){var n=t.getControlConfigByType(e.type);n&&(n.text=e.text?e.text:e.type,r.push(n))})),r.length<=e?{buttonList:r}:{buttonList:r.splice(0,e-1),overflowMenuItemList:r}},e.prototype.getOverflowMenuItems=function(){var t=this.getControlConfigs().overflowMenuItemList;return t||[]},e.prototype.getOverflowButtonConfig=function(){var t=this;return{id:"toolbar-overflow-menu",shouldBeDisabled:function(){return!1},iconSVGContent:'<circle cx="16" cy="8" r="2"></circle>\n\t\t\t\t\t\t\t <circle cx="16" cy="16" r="2"></circle>\n\t\t\t\t\t\t\t <circle cx="16" cy="24" r="2"></circle>',clickFunction:function(){return t.toggleOverflowMenu()}}},e.prototype.getControlConfigByType=function(t){var e,n=this,r=this.services.zoom.isZoomBarEnabled()&&!this.services.zoom.isEmptyState();switch(t){case F.ZOOM_IN:r&&(e={id:"toolbar-zoomIn",shouldBeDisabled:function(){return n.services.zoom.isMinZoomDomain()},iconSVGContent:this.getControlIconByType(t),clickFunction:function(){return n.services.zoom.zoomIn()}});break;case F.ZOOM_OUT:r&&(e={id:"toolbar-zoomOut",shouldBeDisabled:function(){return n.services.zoom.isMaxZoomDomain()},iconSVGContent:this.getControlIconByType(t),clickFunction:function(){return n.services.zoom.zoomOut()}});break;case F.RESET_ZOOM:r&&(e={id:"toolbar-resetZoom",shouldBeDisabled:function(){return n.services.zoom.isMaxZoomDomain()},iconSVGContent:this.getControlIconByType(t),clickFunction:function(){return n.services.zoom.resetZoomDomain()}});break;default:throw Error("Not supported toolbar control type: "+t)}return e},e.prototype.getControlIconByType=function(t){switch(t){case F.ZOOM_IN:return'<polygon points="19 13 15 13 15 9 13 9 13 13 9 13 9 15 13 15 13 19 15 19 15 15 19 15 19 13"/>\n \t\t\t\t\t<path d="M22.45,21A10.87,10.87,0,0,0,25,14,11,11,0,1,0,14,25a10.87,10.87,0,0,0,7-2.55L28.59,30,30,28.59ZM14,23a9,9,0,1,1,9-9A9,9,0,0,1,14,23Z"/>';case F.ZOOM_OUT:return'<rect x="9" y="13" width="10" height="2"/>\n\t\t\t\t\t\t<path d="M22.45,21A10.87,10.87,0,0,0,25,14,11,11,0,1,0,14,25a10.87,10.87,0,0,0,7-2.55L28.59,30,30,28.59ZM14,23a9,9,0,1,1,9-9A9,9,0,0,1,14,23Z"/>';case F.RESET_ZOOM:return'<path d="M22.4478,21A10.855,10.855,0,0,0,25,14,10.99,10.99,0,0,0,6,6.4658V2H4v8h8V8H7.332a8.9768,8.9768,0,1,1-2.1,8H3.1912A11.0118,11.0118,0,0,0,14,25a10.855,10.855,0,0,0,7-2.5522L28.5859,30,30,28.5859Z"/>';default:throw Error("Not supported toolbar control type: "+t)}},e}(Kp),Wv=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(),a=this.services.cartesianScales.getDomainScale().range(),o=a[0],s=a[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=da.flipSVGCoordinatesBasedOnOrientation({x0:o,x1:s,y0:u,y1:u},this.services.cartesianScales.getOrientation());lf.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),Yv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="zoom-bar",e.MIN_SELECTION_DIFF=9e-10,e.brushSelector="g.zoom-bar-brush",e.clipId="zoomBarClip-"+Math.floor(99999999999*Math.random()),e.brush=Vv(),e}return n(e,t),e.prototype.init=function(){this.services.events.addEventListener(j.ZoomBar.UPDATE,this.render.bind(this));var t=da.getProperty(this.model.getOptions(),"zoomBar",S.TOP,"data");this.model.setZoomBarData(t)},e.prototype.render=function(t){var e=this,n=this.getContainerSVG(),r=this.services.zoom.isZoomBarLoading(S.TOP),i=this.services.zoom.isZoomBarLocked(S.TOP),a=da.getProperty(this.model.getOptions(),"zoomBar",S.TOP,"type"),o=Ya.height[a],s=lf.getSVGElementSize(this.parent,{useAttrs:!0}).width,u=0,l=this.model.get("axesMargins");l&&l.left&&(u=l.left);var c=lf.appendOrSelect(n,"svg.zoom-container").attr("width","100%").attr("height",o).attr("opacity",1);lf.appendOrSelect(n,"rect.zoom-spacer").attr("x",0).attr("y",o).attr("width","100%").attr("height",Ya.spacerHeight).attr("opacity",1).attr("fill","none");if(a===T.GRAPH_VIEW?lf.appendOrSelect(c,"rect.zoom-bg").attr("x",u).attr("y",0).attr("width",s-u).attr("height","100%"):a===T.SLIDER_VIEW&&lf.appendOrSelect(c,"rect.zoom-slider-bg").attr("x",u).attr("y",o/2-1).attr("width",s-u).attr("height",2),!r){var h=this.services.cartesianScales,f=h.getMainXScale(),d=h.getMainYScale(),p=h.getMainXScaleType();if(f&&p===C.TIME){var g=this.services.zoom.getZoomBarData();if(da.isEmpty(g))return;this.xScale=f.copy(),this.yScale=d.copy();var v=this.services.zoom.getDefaultZoomBarDomain(g);g=this.compensateDataForDefaultDomain(g,v);var m=this.model.get("initialZoomDomain"),y=da.getProperty(this.model.getOptions(),"zoomBar",S.TOP,"initialZoomDomain");y&&y[0]&&y[1]&&(y[0]=new Date(y[0]),y[1]=new Date(y[1])),m===y||m&&y&&m[0].valueOf()===y[0].valueOf()&&m[1].valueOf()===y[1].valueOf()||this.model.set({initialZoomDomain:y,zoomDomain:y||v},{skipUpdate:!0}),this.xScale.range([u,s]).domain(v),this.maxSelectionRange=this.xScale.range(),this.yScale.range([0,o-6]).domain(wo(g,(function(t){return t.value})));var _=this.model.get("zoomDomain");if(a===T.GRAPH_VIEW){this.renderZoomBarArea(c,"path.zoom-graph-area-unselected",g,null),this.updateClipPath(n,this.clipId,0,0,0,0),this.renderZoomBarArea(c,"path.zoom-graph-area",g,this.clipId);var b=Vc()([[u,o],[s,o]]);lf.appendOrSelect(c,"path.zoom-bg-baseline").attr("d",b)}this.addBrushEventListener(_,u,s);var x=lf.appendOrSelect(n,this.brushSelector).call(this.brush);if(void 0===_);else if(_[0].valueOf()===_[1].valueOf())x.call(this.brush.move,this.xScale.range()),this.updateBrushHandle(this.getContainerSVG(),this.xScale.range(),this.xScale.domain());else{var w=_.map((function(t){return e.xScale(t)}));w[1]-w[0]<this.MIN_SELECTION_DIFF||(x.call(this.brush.move,w),this.updateBrushHandle(this.getContainerSVG(),w,_))}i&&(this.brush.filter((function(){return!1})),x.selectAll("rect").attr("cursor","auto"))}}},e.prototype.addBrushEventListener=function(t,e,n){var r=this,i=da.getProperty(this.model.getOptions(),"zoomBar",S.TOP,"type"),a=Ya.height[i];this.brush.extent([[e,0],[n,a]]).on("start brush end",null).on("start brush end",(function(){var e=ia.selection;null===e?r.handleBrushedEvent(t,r.xScale,r.xScale.range()):e[0]===e[1]||r.handleBrushedEvent(t,r.xScale,e)}))},e.prototype.handleBrushedEvent=function(t,e,n){var r=[e.invert(n[0]),e.invert(n[1])];if(this.updateBrushHandle(this.getContainerSVG(),n,r),null!=ia.sourceEvent&&("mousemove"===ia.sourceEvent.type||"mouseup"===ia.sourceEvent.type||"mousedown"===ia.sourceEvent.type||"touchstart"===ia.sourceEvent.type||"touchmove"===ia.sourceEvent.type||"touchend"===ia.sourceEvent.type)){void 0!==t&&t[0]===r[0]&&t[1]===r[1]||this.services.zoom.handleDomainChange(r,{dispatchEvent:!1});var i=void 0;"start"===ia.type?i=j.ZoomBar.SELECTION_START:"brush"===ia.type?i=j.ZoomBar.SELECTION_IN_PROGRESS:"end"===ia.type&&(i=j.ZoomBar.SELECTION_END),this.services.events.dispatchEvent(i,{selection:n,newDomain:r})}},e.prototype.updateBrushHandle=function(t,e,n){var r=this,i=Ya.handleWidth,a=da.getProperty(this.model.getOptions(),"zoomBar",S.TOP,"type"),o=Ya.height[a],s=-i/2,u=Ya.handleBarWidth,l=a===T.GRAPH_VIEW?Ya.handleBarHeight:6,c=-u/2,h=(o-l)/2;t.select(this.brushSelector).selectAll("rect.handle").data([{type:"w"},{type:"e"}]).attr("x",(function(t){return"w"===t.type?Math.max(e[0]+s,r.maxSelectionRange[0]):"e"===t.type?Math.min(e[1]+s,r.maxSelectionRange[1]-i):void 0})).attr("y",0).attr("width",i).attr("height",o).attr("cursor","ew-resize").style("display",null);var f=t.select(this.brushSelector).selectAll("rect.handle-bar").data([{type:"w"},{type:"e"}]);f.enter().append("rect").attr("class",(function(t){return"handle-bar handle-bar--"+t.type})),f.attr("x",(function(t){return"w"===t.type?Math.max(e[0]+c,r.maxSelectionRange[0]-s+c):"e"===t.type?Math.min(e[1]+c,r.maxSelectionRange[1]+s+c):void 0})).attr("y",h).attr("width",u).attr("height",l).attr("cursor","ew-resize"),a===T.SLIDER_VIEW&&this.updateSliderSelectedArea(e),this.updateClipPath(t,this.clipId,e[0],0,e[1]-e[0],o)},e.prototype.updateSliderSelectedArea=function(t){var e=da.getProperty(this.model.getOptions(),"zoomBar",S.TOP,"type"),n=Ya.height[e],r=(lf.getSVGElementSize(this.parent,{useAttrs:!0}).width,this.model.get("axesMargins"));r&&r.left&&r.left;var i=this.getContainerSVG().select("svg.zoom-container");lf.appendOrSelect(i,"rect.zoom-slider-selected-area").attr("x",t[0]).attr("y",n/2-1).attr("width",t[1]-t[0]).attr("height",2)},e.prototype.renderZoomBarArea=function(t,e,n,r){var i=this.services.cartesianScales,a=i.getMainXAxisPosition(),o=i.getMainYAxisPosition(),s=i.getMainXScaleType(),u=i.getMainYScaleType(),l=function(t,e,n){return function(r,a){return i.getValueFromScale(t,e,n,r,a)}},c=l(this.xScale,s,a),h=l(this.yScale,u,o),f=da.getProperty(this.model.getOptions(),"zoomBar",S.TOP,"type"),d=Ya.height[f],p=Bc().x((function(t,e){return c(t,e)})).y0(d).y1((function(t,e){return d-h(t,e)})),g=lf.appendOrSelect(t,e).datum(n).attr("d",p);r&&g.attr("clip-path","url(#"+r+")")},e.prototype.updateClipPath=function(t,e,n,r,i,a){var o=lf.appendOrSelect(t,"clipPath").attr("id",e);lf.appendOrSelect(o,"rect").attr("x",n).attr("y",r).attr("width",i).attr("height",a)},e.prototype.compensateDataForDefaultDomain=function(t,e){if(t&&!(t.length<2)){var n,r=da.clone(t),i=this.services.cartesianScales.getDomainIdentifier(),a=this.services.cartesianScales.getRangeIdentifier();if(Number(e[0])<Number(r[0][i]))(n={})[i]=e[0],n[a]=0,r.unshift(n);if(Number(e[1])>Number(r[r.length-1][i]))(n={})[i]=e[1],n[a]=0,r.push(n);return r}},e.prototype.destroy=function(){this.brush.on("start brush end",null),this.services.events.removeEventListener(j.ZoomBar.UPDATE,this.render.bind(this))},e}(Kp),Xv=function(){function t(t,e){this.services={domUtils:lf,events:cf,gradientUtils:Od,transitions:wd},this.model=new Vh(this.services)}return t.prototype.init=function(t,e){var n=this;this.model.set({holder:t},{skipUpdate:!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(j.Model.UPDATE,(function(t){var e=!!da.getProperty(t,"detail","animate");n.update(e)})),this.model.setData(e.data),this.services.events.addEventListener(j.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(j.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},{skipUpdate:!0})},t.prototype.getChartComponents=function(t){var e={id:"title",components:[new cg(this.model,this.services)],growth:{x:R.PREFERRED,y:R.FIXED}},n={id:"legend",components:[new $p(this.model,this.services)],growth:{x:R.PREFERRED,y:R.FIXED}},r={id:"graph-frame",components:t,growth:{x:R.STRETCH,y:R.FIXED}},i=!1!==this.model.getOptions().legend.enabled,a=L.COLUMN;if(i){var o=da.getProperty(this.model.getOptions(),"legend","position");"left"===o?(a=L.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=k.VERTICAL)):"right"===o?(a=L.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=k.VERTICAL)):"bottom"===o&&(a=L.COLUMN_REVERSE)}var s={id:"spacer",components:[new qg(this.model,this.services)],growth:{x:R.PREFERRED,y:R.FIXED}},u={id:"full-frame",components:[new Zg(this.model,this.services,w(i?[n]:[],i?[s]:[],[r]),{direction:a})],growth:{x:R.STRETCH,y:R.FIXED}},l=[];if(this.model.getOptions().title){l.push(e);var c={id:"spacer",components:[new qg(this.model,this.services)],growth:{x:R.PREFERRED,y:R.FIXED}};l.push(c)}return l.push(u),[new fg(this.model,this.services),new Zg(this.model,this.services,l,{direction:L.COLUMN})]},t}(),qv=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.setData=function(e){var n;return e&&(n=t.prototype.setData.call(this,e),da.getProperty(this.getOptions(),"zoomBar","top","enabled")&&this.setZoomBarData()),n},e.prototype.setZoomBarData=function(t){var e=t?this.sanitize(da.clone(t)):this.getDisplayData(),n=e,r=this.services.cartesianScales;if(e&&r.domainAxisPosition&&r.rangeAxisPosition){var i=r.getDomainIdentifier(),a=r.getRangeIdentifier(),o=e.map((function(t){return t[i].getTime()}));n=(o=da.removeArrayDuplicates(o).sort()).map((function(t){var n=0,r={};return e.forEach((function(e){e[i].getTime()===t&&(n+=e[a])})),r[i]=new Date(t),r[a]=n,r}))}this.set({zoomBarData:n})},e.prototype.getZoomBarData=function(){return this.get("zoomBarData")},e.prototype.sanitizeDateValues=function(t){var e=this.getOptions();if(!e.axes)return t;var n=[];return Object.keys(S).forEach((function(t){var r=S[t],i=e.axes[r];if(i&&i.scaleType===C.TIME){var a=i.mapsTo;null===a&&void 0===a||n.push(a)}})),n.length>0&&t.forEach((function(t){n.forEach((function(e){null===da.getProperty(t,e,"getTime")&&(t[e]=new Date(t[e]))}))})),t},e.prototype.sanitize=function(e){return e=t.prototype.sanitize.call(this,e),e=this.sanitizeDateValues(e)},e}(Vh),Zv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.services=Object.assign(r.services,{cartesianScales:Wp,curves:qp,zoom:Zp}),r.model=new qv(r.services),r}return n(e,t),e.prototype.getAxisChartComponents=function(t){var e=da.getProperty(this.model.getOptions(),"zoomBar",S.TOP,"enabled"),n=da.getProperty(this.model.getOptions(),"toolbar","enabled");this.services.cartesianScales.findDomainAndRangeAxes();var r=this.services.cartesianScales.getMainXAxisPosition(),i=da.getProperty(this.model.getOptions(),"axes",r,"scaleType"),a=e&&r===S.BOTTOM&&i===C.TIME,o=this.services.zoom.isZoomBarLocked(S.TOP),s=!!this.model.getOptions().title,u={id:"title",components:[new cg(this.model,this.services)],growth:{x:R.STRETCH,y:R.FIXED}},l={id:"toolbar",components:[new jv(this.model,this.services)],growth:{x:R.PREFERRED,y:R.FIXED}},c={id:"header",components:[new Zg(this.model,this.services,w([u],n?[l]:[]),{direction:L.ROW})],growth:{x:R.PREFERRED,y:R.FIXED}},h={id:"legend",components:[new $p(this.model,this.services)],growth:{x:R.PREFERRED,y:R.FIXED}};a&&!o&&t.push(new Gv(this.model,this.services),new Bv(this.model,this.services));var f={id:"graph-frame",components:t,growth:{x:R.STRETCH,y:R.FIXED}},d=!1!==this.model.getOptions().legend.enabled,p=L.COLUMN;if(d){var g=da.getProperty(this.model.getOptions(),"legend","position");g===D.LEFT?(p=L.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=k.VERTICAL)):g===D.RIGHT?(p=L.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=k.VERTICAL)):g===D.BOTTOM&&(p=L.COLUMN_REVERSE)}var v={id:"spacer",components:[new qg(this.model,this.services)],growth:{x:R.PREFERRED,y:R.FIXED}},m={id:"full-frame",components:[new Zg(this.model,this.services,w(d?[h]:[],d?[v]:[],[f]),{direction:p})],growth:{x:R.STRETCH,y:R.FIXED}},y={id:"zoom-bar",components:[new Yv(this.model,this.services)],growth:{x:R.PREFERRED,y:R.FIXED}},_=[];if(s||n){_.push(c);var b={id:"spacer",components:[new qg(this.model,this.services,n?{size:15}:void 0)],growth:{x:R.PREFERRED,y:R.FIXED}};_.push(b)}return a&&_.push(y),_.push(m),[new dg(this.model,this.services),new Zg(this.model,this.services,_,{direction:L.COLUMN})]},e}(Xv),Kv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(da.mergeDefaultChartOptions(da.clone(fo.areaChart),n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new lv(this.model,this.services),new Uv(this.model,this.services),new Hv(this.model,this.services),new wg(this.model,this.services),new pg(this.model,this.services),new bg(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0})];return this.getAxisChartComponents(t)},e}(Zv),$v=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(da.mergeDefaultChartOptions(fo.stackedAreaChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new lv(this.model,this.services),new Uv(this.model,this.services),new Hv(this.model,this.services),new gg(this.model,this.services),new wg(this.model,this.services,{stacked:!0}),new Og(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0,stacked:!0})];return this.getAxisChartComponents(t)},e}(Zv),Qv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(da.mergeDefaultChartOptions(fo.simpleBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new lv(this.model,this.services),new Uv(this.model,this.services),new mg(this.model,this.services),new Wv(this.model,this.services),new Ag(this.model,this.services,{skeleton:N.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)},e}(Zv),Jv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(da.mergeDefaultChartOptions(fo.groupedBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new lv(this.model,this.services),new Uv(this.model,this.services),new yg(this.model,this.services),new Wv(this.model,this.services),new Ag(this.model,this.services,{skeleton:N.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)},e}(Zv),tm=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(da.mergeDefaultChartOptions(fo.stackedBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new lv(this.model,this.services),new Uv(this.model,this.services),new Fv(this.model,this.services),new _g(this.model,this.services),new Ag(this.model,this.services,{skeleton:N.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)},e}(Zv),em=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(da.mergeDefaultChartOptions(fo.bubbleChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new lv(this.model,this.services),new Uv(this.model,this.services),new Hv(this.model,this.services),new xg(this.model,this.services),new Ag(this.model,this.services,{skeleton:N.GRID})];return this.getAxisChartComponents(t)},e}(Zv),nm=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(da.mergeDefaultChartOptions(fo.lineChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new lv(this.model,this.services),new Uv(this.model,this.services),new Hv(this.model,this.services),new wg(this.model,this.services),new bg(this.model,this.services,{handleThresholds:!0}),new Cg(this.model,this.services)];return this.getAxisChartComponents(t)},e}(Zv),rm=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(da.mergeDefaultChartOptions(fo.scatterChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new lv(this.model,this.services),new Uv(this.model,this.services),new Hv(this.model,this.services),new bg(this.model,this.services),new Ag(this.model,this.services,{skeleton:N.GRID})];return this.getAxisChartComponents(t)},e}(Zv),im=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}(Vh),am=function(t){function e(e,n,r){void 0===r&&(r=!1);var i=t.call(this,e,n)||this;return i.model=new im(i.services),r?i:(i.model.setOptions(da.mergeDefaultChartOptions(fo.pieChart,n.options)),i.init(e,n),i)}return n(e,t),e.prototype.getComponents=function(){var t=[new Sg(this.model,this.services),new Ag(this.model,this.services,{skeleton:N.PIE})];return this.getChartComponents(t)},e}(Xv),om=function(t){function e(e,n){var r=t.call(this,e,n,!0)||this;return r.model.setOptions(da.mergeDefaultChartOptions(fo.donutChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Mg(this.model,this.services),new Ag(this.model,this.services,{skeleton:N.DONUT})];return this.getChartComponents(t)},e}(am),sm=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.generateDataLabels=function(t){var e={};return e[t.label]=Va.items.status.ACTIVE,e},e.prototype.getDisplayData=function(){return this.get("data")?this.get("data")[0]:null},e.prototype.getFillColor=function(e){var n=this.getOptions(),r=da.getProperty(n,"color","scale"),i=this.getStatus();return r||!i?t.prototype.getFillColor.call(this,e):null},e.prototype.getStatus=function(){var t=this.getOptions(),e=this.getDisplayData().value,n=e>100?100:e,r=da.getProperty(t,"meter","status","ranges");if(r){var i=r.filter((function(t){return t.range[0]<=n&&n<=t.range[1]}));if(i.length>0)return i[0].status}return null},e}(Vh),um=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="meter",e}return n(e,t),e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this,i=this.getContainerSVG(),a=this.model.getOptions(),o=this.model.getDisplayData(),s=this.model.getStatus(),u=lf.getSVGElementSize(this.parent,{useAttrs:!0}).width,l=a.data.groupMapsTo,c=fu().domain([0,100]).range([0,u]);lf.appendOrSelect(i,"rect.container").attr("x",0).attr("y",0).attr("width",u).attr("height",da.getProperty(a,"meter","height"));var h=o.value>=100,f=i.selectAll("rect.value").data([o]),d=null==s||n.model.isUserProvidedColorScaleValid()?"":"value status--"+s;f.enter().append("rect").classed("value",!0).merge(f).attr("x",0).attr("y",0).attr("height",da.getProperty(a,"meter","height")).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[E.FILL],dataGroupName:t[l],originalClassName:d})})).transition(this.services.transitions.getTransition("meter-bar-update",t)).attr("width",(function(t){return c(h?100:t.value)})).attr("fill",(function(t){return n.model.getFillColor(t[l])})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","value").attr("aria-label",(function(t){return t.value}));var p=da.getProperty(a,"meter","peak"),g=null!==p&&p<o.value?o.value:p,v=null===g||h?[]:[g],m=i.selectAll("line.peak").data(v);m.enter().append("line").classed("peak",!0).merge(m).attr("y1",0).attr("y2",da.getProperty(a,"meter","height")).transition(this.services.transitions.getTransition("peak-line-update",t)).attr("x1",(function(t){return c(t)})).attr("x2",(function(t){return c(t)})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","peak").attr("aria-label",(function(t){return t})),m.exit().remove(),this.services.domUtils.setSVGMaxHeight()},e}(Kp),lm=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new sm(r.services),r.model.setOptions(da.merge(da.clone(fo.meterChart),n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t={id:"meter-graph",components:[new um(this.model,this.services)],growth:{x:R.STRETCH,y:R.FIXED}},e={id:"title",components:[new hg(this.model,this.services)],growth:{x:R.PREFERRED,y:R.FIXED}},n={id:"spacer",components:[new qg(this.model,this.services,{size:8})],growth:{x:R.PREFERRED,y:R.FIXED}},r=[new Zg(this.model,this.services,[e,n,t],{direction:L.COLUMN})];return this.getChartComponents(r)},e}(Xv);function cm(t){var e,n=(fm(t)%(e=360)+e)%e;return hm(n,[0,10])||hm(n,[350,0])?{textAnchor:V.START,dominantBaseline:B.MIDDLE}:hm(n,[10,80])?{textAnchor:V.START,dominantBaseline:B.HANGING}:hm(n,[80,100])?{textAnchor:V.MIDDLE,dominantBaseline:B.HANGING}:hm(n,[100,170])?{textAnchor:V.END,dominantBaseline:B.HANGING}:hm(n,[170,190])?{textAnchor:V.END,dominantBaseline:B.MIDDLE}:hm(n,[190,260])?{textAnchor:V.END,dominantBaseline:B.BASELINE}:hm(n,[260,280])?{textAnchor:V.MIDDLE,dominantBaseline:B.BASELINE}:{textAnchor:V.START,dominantBaseline:B.BASELINE}}function hm(t,e){var n=e[0],r=e[1];return t>=n&&t<=r}function fm(t){return t*(180/Math.PI)}function dm(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 pm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="radar",e.getLabelDimensions=function(t){var n=lf.appendOrSelect(e.getContainerSVG(),"g.tmp-tick"),r=lf.appendOrSelect(n,"text").text(t),i=lf.getSVGElementSize(r.node(),{useBBox:!0}),a=i.width,o=i.height;return n.remove(),{width:a,height:o}},e.normalizeFlatData=function(t){var n=e.model.getOptions(),r=da.getProperty(n,"radar","axes"),i=r.angle,a=r.value,o=da.getProperty(n,"data","groupMapsTo"),s=da.flatMapDeep(e.uniqueKeys.map((function(t){return e.uniqueGroups.map((function(e){var n;return(n={})[i]=t,n[o]=e,n[a]=null,n}))})));return da.merge(s,t)},e.normalizeGroupedData=function(t){var n=e.model.getOptions(),r=da.getProperty(n,"radar","axes"),i=r.angle,a=r.value,o=da.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={})[o]=n,e[i]=t,e[a]=null,e}));return{name:n,data:da.merge(s,r)}}))},e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;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?za.opacity.unselected:za.opacity.selected})).style("stroke-opacity",(function(t){return t.name!==n.datum().name?za.opacity.unselected:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("g.blobs path").transition(e.services.transitions.getTransition("legend-mouseout-blob")).style("fill-opacity",za.opacity.selected).style("stroke-opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(j.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(j.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getContainerSVG(),i=lf.getSVGElementSize(this.parent,{useAttrs:!0}),a=i.width,o=i.height,s=this.model.getData(),u=this.model.getDisplayData(),l=this.model.getGroupedData(),c=this.model.getOptions(),h=da.getProperty(c,"radar","axes"),f=h.angle,d=h.value,p=da.getProperty(c,"data","groupMapsTo"),g=za.xLabelPadding,v=za.yLabelPadding,m=za.yTicksNumber,y=za.minRange,_=za.xAxisRectHeight;this.uniqueKeys=Array.from(new Set(s.map((function(t){return t[f]})))),this.uniqueGroups=Array.from(new Set(s.map((function(t){return t[p]})))),this.displayDataNormalized=this.normalizeFlatData(u),this.groupedDataNormalized=this.normalizeGroupedData(l);var b=2*(this.getLabelDimensions(this.uniqueKeys[0]).height+v),x=(Math.min(a,o)-b)/2;if(!(x<=0)){var w=Bo().domain(this.displayDataNormalized.map((function(t){return t[f]}))).range([0,2*Math.PI].map((function(t){return t-Math.PI/2}))),O=fu().domain([0,Do(this.displayDataNormalized.map((function(t){return t[d]})))]).range([y,x]).nice(m),S=O.ticks(m),T=function(t){return e.model.getFillColor(t)},M=jc().angle((function(t){return w(t[f])+Math.PI/2})).radius((function(t){return O(t[d])})).curve(mh),A=jc().angle(M.angle()).radius((function(t){return zv?zv(t[d]):y})).curve(M.curve()),C={x:Do(this.uniqueKeys.map((function(t){var n;return e.getLabelDimensions(t).width+(n=w(t),x*Math.sin(n-Math.PI/2))})))+g,y:o/2},D=lf.appendOrSelect(n,"g.y-axes").attr("role",r.GROUP).selectAll("path").data(S,(function(t){return t})),P=function(t){return e.uniqueKeys.map((function(e){var n;return(n={})[f]=e,n[d]=t,n}))};D.join((function(n){return n.append("path").attr("role",r.GRAPHICS_SYMBOL).attr("opacity",0).attr("transform","translate("+C.x+", "+C.y+")").attr("fill","none").attr("d",(function(t){return A(P(t))})).call((function(n){return n.transition(e.services.transitions.getTransition("radar_y_axes_enter",t)).attr("opacity",1).attr("d",(function(t){return M(P(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("+C.x+", "+C.y+")").attr("d",(function(t){return M(P(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 M(P(t))})).attr("opacity",0).remove()}))})),lf.appendOrSelect(n,"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-"+da.kebabCase(t)})).attr("stroke-dasharray","0").attr("x1",(function(t){return dm(w(t),0,C).x})).attr("y1",(function(t){return dm(w(t),0,C).y})).attr("x2",(function(t){return dm(w(t),0,C).x})).attr("y2",(function(t){return dm(w(t),0,C).y})).call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_axes_enter",t)).attr("opacity",1).attr("x1",(function(t){return dm(w(t),O.range()[0],C).x})).attr("y1",(function(t){return dm(w(t),O.range()[0],C).y})).attr("x2",(function(t){return dm(w(t),O.range()[1],C).x})).attr("y2",(function(t){return dm(w(t),O.range()[1],C).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 dm(w(t),O.range()[0],C).x})).attr("y1",(function(t){return dm(w(t),O.range()[0],C).y})).attr("x2",(function(t){return dm(w(t),O.range()[1],C).x})).attr("y2",(function(t){return dm(w(t),O.range()[1],C).y}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_axes_exit",t)).attr("opacity",0).remove()}))})),lf.appendOrSelect(n,"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 dm(w(t),O.range()[1]+g,C).x})).attr("y",(function(t){return dm(w(t),O.range()[1]+g,C).y})).style("text-anchor",(function(t){return cm(w(t)).textAnchor})).style("dominant-baseline",(function(t){return cm(w(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 dm(w(t),O.range()[1]+g,C).x})).attr("y",(function(t){return dm(w(t),O.range()[1]+g,C).y}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_labels_exit",t)).attr("opacity",0).remove()}))})),lf.appendOrSelect(n,"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",(function(t){return e.model.getColorClassName({classNameTypes:[E.FILL,E.STROKE],dataGroupName:t.name,originalClassName:"blob"})})).attr("role",r.GRAPHICS_SYMBOL).attr("opacity",0).attr("transform","translate("+C.x+", "+C.y+")").attr("fill",(function(t){return T(t.name)})).style("fill-opacity",za.opacity.selected).attr("stroke",(function(t){return T(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 M(t.data)}))}))}),(function(n){n.attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[E.FILL,E.STROKE],dataGroupName:t.name,originalClassName:"blob"})})).attr("fill",(function(t){return T(t.name)})).attr("stroke",(function(t){return T(t.name)})),n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_blobs_update",t)).attr("opacity",1).attr("transform","translate("+C.x+", "+C.y+")").attr("d",(function(t){return M(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 M(t.data)})).attr("opacity",0).remove()}))})),lf.appendOrSelect(n,"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 e.model.getColorClassName({classNameTypes:[E.FILL],dataGroupName:t[p],originalClassName:da.kebabCase(t[f])})})).attr("cx",(function(t){return dm(w(t[f]),O(t[d]),C).x})).attr("cy",(function(t){return dm(w(t[f]),O(t[d]),C).y})).attr("r",0).attr("opacity",0).attr("fill",(function(t){return T(t[p])})),lf.appendOrSelect(n,"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",C.x).attr("y",C.y-_/2).attr("width",O.range()[1]).attr("height",_).attr("fill","red").style("fill-opacity",0).attr("transform",(function(t){return"rotate("+fm(w(t))+", "+C.x+", "+C.y+")"})),lf.appendOrSelect(n,"g.y-labels").attr("role",r.GROUP).selectAll("text").data(wo(S)).join((function(n){return n.append("text").attr("opacity",0).text((function(t){return t})).attr("x",(function(t){return dm(-Math.PI/2,O(t),C).x+v})).attr("y",(function(t){return dm(-Math.PI/2,O(t),C).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 dm(-Math.PI/2,O(t),C).x+v})).attr("y",(function(t){return dm(-Math.PI/2,O(t),C).y}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_y_labels_exit",t)).attr("opacity",0).remove()}))}));var k=da.getProperty(c,"radar","alignment"),L=lf.getAlignmentOffset(k,n,this.getParent());n.attr("transform","translate("+L+", 0)"),this.addEventListeners(),zv=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(j.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(j.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.addEventListeners=function(){var t=this,e=da.getProperty(this.model.getOptions(),"radar").axes.angle;this.parent.selectAll(".x-axes-rect > rect").on("mouseover",(function(n){var r=ma(this);t.services.events.dispatchEvent(j.Radar.X_AXIS_MOUSEOVER,{element:r,datum:n});var i=t.parent.select(".x-axes .x-axis-"+da.kebabCase(n)),a=t.parent.selectAll(".dots circle."+da.kebabCase(n));i.classed("hovered",!0).attr("stroke-dasharray","4 4"),a.classed("hovered",!0).attr("opacity",1).attr("r",za.dotsRadius);var o=t.displayDataNormalized.filter((function(t){return t[e]===n})),s=t.model.getOptions(),u=s.data.groupMapsTo,l=da.getProperty(s,"radar","axes","value");t.services.events.dispatchEvent(j.Tooltip.SHOW,{hoveredElement:r,items:o.filter((function(t){return"number"==typeof t[l]})).map((function(e){return{label:e[u],value:e[l],color:t.model.getFillColor(e[u]),class:t.model.getColorClassName({classNameTypes:[E.TOOLTIP],dataGroupName:e[u]})}}))})})).on("mousemove",(function(e){var n=ma(this);t.services.events.dispatchEvent(j.Radar.X_AXIS_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(j.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(j.Radar.X_AXIS_CLICK,{element:ma(this),datum:e})})).on("mouseout",(function(e){var n=ma(this),r=t.parent.select(".x-axes .x-axis-"+da.kebabCase(e)),i=t.parent.selectAll(".dots circle."+da.kebabCase(e));r.classed("hovered",!1).attr("stroke-dasharray","0"),i.classed("hovered",!1).attr("opacity",0).attr("r",0),t.services.events.dispatchEvent(j.Radar.X_AXIS_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(j.Tooltip.HIDE)}))},e}(Kp),gm=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(da.mergeDefaultChartOptions(fo.radarChart,n.options)),i.init(e,n),i)}return n(e,t),e.prototype.getComponents=function(){var t=[new pm(this.model,this.services)];return this.getChartComponents(t)},e}(Xv),vm=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getDataGroups=function(){return t.prototype.getDataGroups.call(this).filter((function(t){return"delta"!==t.name}))},e}(Vh),mm=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new vm(r.services),r.model.setOptions(da.mergeDefaultChartOptions(fo.gaugeChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Tg(this.model,this.services)];return this.getChartComponents(t)},e}(Xv),ym=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(da.mergeDefaultChartOptions(fo.treemapChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Xg(this.model,this.services)];return this.getChartComponents(t)},e}(Xv);t.AreaChart=Kv,t.BubbleChart=em,t.DonutChart=om,t.GaugeChart=mm,t.GroupedBarChart=Jv,t.LineChart=nm,t.MeterChart=lm,t.PieChart=am,t.RadarChart=gm,t.ScatterChart=rm,t.SimpleBarChart=Qv,t.StackedAreaChart=$v,t.StackedBarChart=tm,t.TreemapChart=ym,t.configurations=po,t.interfaces=W,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,a,o,s,u,l,c,h,f,d,p,g,v,m,y,_,b,x=function(){return(x=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 w(){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 a=arguments[e],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r}!function(t){t.GRAPHICS_DOCUMENT="graphics-document",t.GRAPHICS_OBJECT="graphics-object",t.GRAPHICS_SYMBOL="graphics-symbol",t.GROUP="group",t.DOCUMENT="document",t.CHECKBOX="checkbox",t.BUTTON="button",t.MENU="menu",t.MENU_ITEM="menuitem",t.IMG="img"}(r||(r={})),function(t){t.RENDER_FINISHED="render-finished",t.RESIZE="chart-resize",t.MOUSEOVER="chart-mouseover",t.MOUSEOUT="chart-mouseout"}(i||(i={})),function(t){t.UPDATE="model-update"}(a||(a={})),function(t){t.SHOW_OVERFLOW_MENU="show-toolbar-overflow-menu",t.HIDE_OVERFLOW_MENU="hide-toolbar-overflow-menu"}(o||(o={})),function(t){t.UPDATE="zoom-bar-update",t.SELECTION_START="zoom-bar-selection-start",t.SELECTION_IN_PROGRESS="zoom-bar-selection-in-progress",t.SELECTION_END="zoom-bar-selection-end"}(s||(s={})),function(t){t.CHANGE="zoom-domain-change"}(u||(u={})),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"}(l||(l={})),function(t){t.AREA_MOUSEOVER="area-mouseover",t.AREA_MOUSEMOVE="area-mousemove",t.AREA_CLICK="area-click",t.AREA_MOUSEOUT="area-mouseout"}(c||(c={})),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"}(h||(h={})),function(t){t.ARC_MOUSEOVER="gauge-arc-mouseover",t.ARC_MOUSEMOVE="gauge-arc-mousemove",t.ARC_CLICK="gauge-arc-click",t.ARC_MOUSEOUT="gauge-arc-mouseout"}(f||(f={})),function(t){t.BAR_MOUSEOVER="bar-mouseover",t.BAR_MOUSEMOVE="bar-mousemove",t.BAR_CLICK="bar-click",t.BAR_MOUSEOUT="bar-mouseout"}(d||(d={})),function(t){t.SCATTER_MOUSEOVER="scatter-mouseover",t.SCATTER_MOUSEMOVE="scatter-mousemove",t.SCATTER_CLICK="scatter-click",t.SCATTER_MOUSEOUT="scatter-mouseout"}(p||(p={})),function(t){t.POINT_MOUSEOVER="scatter-mouseover",t.POINT_MOUSEMOVE="scatter-mousemove",t.POINT_CLICK="scatter-click",t.POINT_MOUSEOUT="scatter-mouseout"}(g||(g={})),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"}(v||(v={})),function(t){t.LEAF_MOUSEOVER="leaf-mouseover",t.LEAF_MOUSEMOVE="leaf-mousemove",t.LEAF_CLICK="leaf-click",t.LEAF_MOUSEOUT="leaf-mouseout"}(m||(m={})),function(t){t.SHOW="show-tooltip",t.MOVE="move-tooltip",t.HIDE="hide-tooltip"}(y||(y={})),function(t){t.SHOW="show-threshold",t.HIDE="hide-threshold"}(_||(_={})),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"}(b||(b={}));var O,E,S,T,M,A,C,D,P,k,L,R,I,N,G,B,V,U,z,H,F,j,W=Object.freeze({__proto__:null,get Chart(){return i},get Model(){return a},get Toolbar(){return o},get ZoomBar(){return s},get ZoomDomain(){return u},get Axis(){return l},get Area(){return c},get Pie(){return h},get Gauge(){return f},get Bar(){return d},get Scatter(){return p},get Line(){return g},get Radar(){return v},get Treemap(){return m},get Tooltip(){return y},get Threshold(){return _},get Legend(){return b}});!function(t){t.DEFAULT="default",t.G100="g100",t.G90="g90",t.G10="g10"}(O||(O={})),function(t){t.FILL="fill",t.STROKE="stroke",t.TOOLTIP="tooltip"}(E||(E={})),function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(S||(S={})),function(t){t.GRAPH_VIEW="graph_view",t.SLIDER_VIEW="slider_view"}(T||(T={})),function(t){t.END_LINE="end_line",t.MID_LINE="mid_line",t.FRONT_LINE="front_line",t.NONE="none"}(M||(M={})),function(t){t.VERTICAL="vertical",t.HORIZONTAL="horizontal"}(A||(A={})),function(t){t.TIME="time",t.LINEAR="linear",t.LOG="log",t.LABELS="labels"}(C||(C={})),function(t){t.RIGHT="right",t.LEFT="left",t.TOP="top",t.BOTTOM="bottom"}(D||(D={})),function(t){t.LEFT="left",t.CENTER="center",t.RIGHT="right"}(P||(P={})),function(t){t.HORIZONTAL="horizontal",t.VERTICAL="vertical"}(k||(k={})),function(t){t.ROW="row",t.COLUMN="column",t.ROW_REVERSE="row-reverse",t.COLUMN_REVERSE="column-reverse"}(L||(L={})),function(t){t.FIXED="fixed",t.PREFERRED="preferred",t.STRETCH="stretch"}(R||(R={})),function(t){t.LEFT="left",t.RIGHT="right"}(I||(I={})),function(t){t.GRID="grid",t.VERT_OR_HORIZ="vertOrHoriz",t.PIE="pie",t.DONUT="donut"}(N||(N={})),function(t){t.START="start",t.MIDDLE="middle",t.END="end"}(G||(G={})),function(t){t.BASELINE="baseline",t.MIDDLE="middle",t.HANGING="hanging"}(B||(B={})),function(t){t.SEMI="semi",t.FULL="full"}(V||(V={})),function(t){t.UP="up",t.DOWN="down"}(U||(U={})),function(t){t.SUCCESS="success",t.WARNING="warning",t.DANGER="danger"}(z||(z={})),function(t){t.ALWAYS="always",t.AUTO="auto",t.NEVER="never"}(H||(H={})),function(t){t.SCATTER="scatter",t.LINE="line",t.SIMPLE_BAR="simple-bar",t.STACKED_BAR="stacked-bar",t.GROUPED_BAR="grouped-bar",t.AREA="area",t.STACKED_AREA="stacked-area"}(F||(F={})),function(t){t.ZOOM_IN="Zoom in",t.ZOOM_OUT="Zoom out",t.RESET_ZOOM="Reset zoom"}(j||(j={}));var Y=Object.freeze({__proto__:null,get Roles(){return r},Events:W,get ChartTheme(){return O},get ColorClassNameTypes(){return E},get AxisPositions(){return S},get ZoomBarTypes(){return T},get TruncationTypes(){return M},get CartesianOrientations(){return A},get ScaleTypes(){return C},get LegendPositions(){return D},get Alignments(){return P},get LegendOrientations(){return k},get LayoutDirection(){return L},get LayoutGrowth(){return R},get CalloutDirections(){return I},get Skeletons(){return N},get TextAnchor(){return G},get DominantBaseline(){return B},get GaugeTypes(){return V},get ArrowDirections(){return U},get Statuses(){return z},get TickRotations(){return H},get ChartTypes(){return F},get ToolbarControlTypes(){return j}}),X="object"==typeof global&&global&&global.Object===Object&&global,q="object"==typeof self&&self&&self.Object===Object&&self,Z=X||q||Function("return this")(),K=Z.Symbol,$=Object.prototype,Q=$.hasOwnProperty,J=$.toString,tt=K?K.toStringTag:void 0;var et=Object.prototype.toString;var nt=K?K.toStringTag:void 0;function rt(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":nt&&nt in Object(t)?function(t){var e=Q.call(t,tt),n=t[tt];try{t[tt]=void 0;var r=!0}catch(t){}var i=J.call(t);return r&&(e?t[tt]=n:delete t[tt]),i}(t):function(t){return et.call(t)}(t)}function it(t){return null!=t&&"object"==typeof t}function at(t){return"symbol"==typeof t||it(t)&&"[object Symbol]"==rt(t)}function ot(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 st=Array.isArray,ut=K?K.prototype:void 0,lt=ut?ut.toString:void 0;function ct(t){if("string"==typeof t)return t;if(st(t))return ot(t,ct)+"";if(at(t))return lt?lt.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function ht(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var ft=/^\s+|\s+$/g,dt=/^[-+]0x[0-9a-f]+$/i,pt=/^0b[01]+$/i,gt=/^0o[0-7]+$/i,vt=parseInt;function mt(t){if("number"==typeof t)return t;if(at(t))return NaN;if(ht(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=ht(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(ft,"");var n=pt.test(t);return n||gt.test(t)?vt(t.slice(2),n?2:8):dt.test(t)?NaN:+t}function yt(t){return t}function _t(t){if(!ht(t))return!1;var e=rt(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var bt,xt=Z["__core-js_shared__"],wt=(bt=/[^.]+$/.exec(xt&&xt.keys&&xt.keys.IE_PROTO||""))?"Symbol(src)_1."+bt:"";var Ot=Function.prototype.toString;function Et(t){if(null!=t){try{return Ot.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var St=/^\[object .+?Constructor\]$/,Tt=Function.prototype,Mt=Object.prototype,At=Tt.toString,Ct=Mt.hasOwnProperty,Dt=RegExp("^"+At.call(Ct).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Pt(t){return!(!ht(t)||(e=t,wt&&wt in e))&&(_t(t)?Dt:St).test(Et(t));var e}function kt(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return Pt(n)?n:void 0}var Lt=kt(Z,"WeakMap"),Rt=Object.create,It=function(){function t(){}return function(e){if(!ht(e))return{};if(Rt)return Rt(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function Nt(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 Gt(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var Bt=Date.now;var Vt=function(){try{var t=kt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),Ut=function(t){var e=0,n=0;return function(){var r=Bt(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(Vt?function(t,e){return Vt(t,"toString",{configurable:!0,enumerable:!1,value:(n=e,function(){return n}),writable:!0});var n}:yt);function zt(t){return t!=t}function Ht(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,a=n+(r?1:-1);r?a--:++a<i;)if(e(t[a],a,t))return a;return-1}(t,zt,n)}(t,e,0)>-1}var Ft=/^(?:0|[1-9]\d*)$/;function jt(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&Ft.test(t))&&t>-1&&t%1==0&&t<e}function Wt(t,e,n){"__proto__"==e&&Vt?Vt(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Yt(t,e){return t===e||t!=t&&e!=e}var Xt=Object.prototype.hasOwnProperty;function qt(t,e,n){var r=t[e];Xt.call(t,e)&&Yt(r,n)&&(void 0!==n||e in t)||Wt(t,e,n)}function Zt(t,e,n,r){var i=!n;n||(n={});for(var a=-1,o=e.length;++a<o;){var s=e[a],u=r?r(n[s],t[s],s,n,t):void 0;void 0===u&&(u=t[s]),i?Wt(n,s,u):qt(n,s,u)}return n}var Kt=Math.max;function $t(t,e){return Ut(function(t,e,n){return e=Kt(void 0===e?t.length-1:e,0),function(){for(var r=arguments,i=-1,a=Kt(r.length-e,0),o=Array(a);++i<a;)o[i]=r[e+i];i=-1;for(var s=Array(e+1);++i<e;)s[i]=r[i];return s[e]=n(o),Nt(t,this,s)}}(t,e,yt),t+"")}function Qt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function Jt(t){return null!=t&&Qt(t.length)&&!_t(t)}function te(t,e,n){if(!ht(n))return!1;var r=typeof e;return!!("number"==r?Jt(n)&&jt(e,n.length):"string"==r&&e in n)&&Yt(n[e],t)}var ee=Object.prototype;function ne(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||ee)}function re(t){return it(t)&&"[object Arguments]"==rt(t)}var ie=Object.prototype,ae=ie.hasOwnProperty,oe=ie.propertyIsEnumerable,se=re(function(){return arguments}())?re:function(t){return it(t)&&ae.call(t,"callee")&&!oe.call(t,"callee")};var ue="object"==typeof t&&t&&!t.nodeType&&t,le=ue&&"object"==typeof module&&module&&!module.nodeType&&module,ce=le&&le.exports===ue?Z.Buffer:void 0,he=(ce?ce.isBuffer:void 0)||function(){return!1},fe={};function de(t){return function(e){return t(e)}}fe["[object Float32Array]"]=fe["[object Float64Array]"]=fe["[object Int8Array]"]=fe["[object Int16Array]"]=fe["[object Int32Array]"]=fe["[object Uint8Array]"]=fe["[object Uint8ClampedArray]"]=fe["[object Uint16Array]"]=fe["[object Uint32Array]"]=!0,fe["[object Arguments]"]=fe["[object Array]"]=fe["[object ArrayBuffer]"]=fe["[object Boolean]"]=fe["[object DataView]"]=fe["[object Date]"]=fe["[object Error]"]=fe["[object Function]"]=fe["[object Map]"]=fe["[object Number]"]=fe["[object Object]"]=fe["[object RegExp]"]=fe["[object Set]"]=fe["[object String]"]=fe["[object WeakMap]"]=!1;var pe="object"==typeof t&&t&&!t.nodeType&&t,ge=pe&&"object"==typeof module&&module&&!module.nodeType&&module,ve=ge&&ge.exports===pe&&X.process,me=function(){try{var t=ge&&ge.require&&ge.require("util").types;return t||ve&&ve.binding&&ve.binding("util")}catch(t){}}(),ye=me&&me.isTypedArray,_e=ye?de(ye):function(t){return it(t)&&Qt(t.length)&&!!fe[rt(t)]},be=Object.prototype.hasOwnProperty;function xe(t,e){var n=st(t),r=!n&&se(t),i=!n&&!r&&he(t),a=!n&&!r&&!i&&_e(t),o=n||r||i||a,s=o?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&&!be.call(t,l)||o&&("length"==l||i&&("offset"==l||"parent"==l)||a&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||jt(l,u))||s.push(l);return s}function we(t,e){return function(n){return t(e(n))}}var Oe=we(Object.keys,Object),Ee=Object.prototype.hasOwnProperty;function Se(t){if(!ne(t))return Oe(t);var e=[];for(var n in Object(t))Ee.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Te(t){return Jt(t)?xe(t):Se(t)}var Me=Object.prototype.hasOwnProperty;function Ae(t){if(!ht(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=ne(t),n=[];for(var r in t)("constructor"!=r||!e&&Me.call(t,r))&&n.push(r);return n}function Ce(t){return Jt(t)?xe(t,!0):Ae(t)}var De=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Pe=/^\w*$/;function ke(t,e){if(st(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!at(t))||(Pe.test(t)||!De.test(t)||null!=e&&t in Object(e))}var Le=kt(Object,"create");var Re=Object.prototype.hasOwnProperty;var Ie=Object.prototype.hasOwnProperty;function Ne(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Ge(t,e){for(var n=t.length;n--;)if(Yt(t[n][0],e))return n;return-1}Ne.prototype.clear=function(){this.__data__=Le?Le(null):{},this.size=0},Ne.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Ne.prototype.get=function(t){var e=this.__data__;if(Le){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return Re.call(e,t)?e[t]:void 0},Ne.prototype.has=function(t){var e=this.__data__;return Le?void 0!==e[t]:Ie.call(e,t)},Ne.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Le&&void 0===e?"__lodash_hash_undefined__":e,this};var Be=Array.prototype.splice;function Ve(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])}}Ve.prototype.clear=function(){this.__data__=[],this.size=0},Ve.prototype.delete=function(t){var e=this.__data__,n=Ge(e,t);return!(n<0)&&(n==e.length-1?e.pop():Be.call(e,n,1),--this.size,!0)},Ve.prototype.get=function(t){var e=this.__data__,n=Ge(e,t);return n<0?void 0:e[n][1]},Ve.prototype.has=function(t){return Ge(this.__data__,t)>-1},Ve.prototype.set=function(t,e){var n=this.__data__,r=Ge(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var Ue=kt(Z,"Map");function ze(t,e){var n=t.__data__;return function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}(e)?n["string"==typeof e?"string":"hash"]:n.map}function He(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])}}He.prototype.clear=function(){this.size=0,this.__data__={hash:new Ne,map:new(Ue||Ve),string:new Ne}},He.prototype.delete=function(t){var e=ze(this,t).delete(t);return this.size-=e?1:0,e},He.prototype.get=function(t){return ze(this,t).get(t)},He.prototype.has=function(t){return ze(this,t).has(t)},He.prototype.set=function(t,e){var n=ze(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function Fe(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],a=n.cache;if(a.has(i))return a.get(i);var o=t.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(Fe.Cache||He),n}Fe.Cache=He;var je=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,We=/\\(\\)?/g,Ye=function(t){var e=Fe(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(je,(function(t,n,r,i){e.push(r?i.replace(We,"$1"):n||t)})),e}));function Xe(t){return null==t?"":ct(t)}function qe(t,e){return st(t)?t:ke(t,e)?[t]:Ye(Xe(t))}function Ze(t){if("string"==typeof t||at(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Ke(t,e){for(var n=0,r=(e=qe(e,t)).length;null!=t&&n<r;)t=t[Ze(e[n++])];return n&&n==r?t:void 0}function $e(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var Qe=K?K.isConcatSpreadable:void 0;function Je(t){return st(t)||se(t)||!!(Qe&&t&&t[Qe])}function tn(t,e,n,r,i){var a=-1,o=t.length;for(n||(n=Je),i||(i=[]);++a<o;){var s=t[a];e>0&&n(s)?e>1?tn(s,e-1,n,r,i):$e(i,s):r||(i[i.length]=s)}return i}function en(t){return(null==t?0:t.length)?tn(t,1):[]}var nn=we(Object.getPrototypeOf,Object),rn=Function.prototype,an=Object.prototype,on=rn.toString,sn=an.hasOwnProperty,un=on.call(Object);function ln(t,e,n){var r=t.length;return n=void 0===n?r:n,!e&&n>=r?t:function(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var a=Array(i);++r<i;)a[r]=t[r+e];return a}(t,e,n)}var cn=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function hn(t){return cn.test(t)}var fn="[\\ud800-\\udfff]",dn="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",pn="\\ud83c[\\udffb-\\udfff]",gn="[^\\ud800-\\udfff]",vn="(?:\\ud83c[\\udde6-\\uddff]){2}",mn="[\\ud800-\\udbff][\\udc00-\\udfff]",yn="(?:"+dn+"|"+pn+")"+"?",_n="[\\ufe0e\\ufe0f]?"+yn+("(?:\\u200d(?:"+[gn,vn,mn].join("|")+")[\\ufe0e\\ufe0f]?"+yn+")*"),bn="(?:"+[gn+dn+"?",dn,vn,mn,fn].join("|")+")",xn=RegExp(pn+"(?="+pn+")|"+bn+_n,"g");function wn(t){return hn(t)?function(t){return t.match(xn)||[]}(t):function(t){return t.split("")}(t)}var On,En=(On="toUpperCase",function(t){var e=hn(t=Xe(t))?wn(t):void 0,n=e?e[0]:t.charAt(0),r=e?ln(e,1).join(""):t.slice(1);return n[On]()+r});var Sn=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"}),Tn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Mn=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var An=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var Cn=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var Dn="\\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",Pn="["+Dn+"]",kn="\\d+",Ln="[\\u2700-\\u27bf]",Rn="[a-z\\xdf-\\xf6\\xf8-\\xff]",In="[^\\ud800-\\udfff"+Dn+kn+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",Nn="(?:\\ud83c[\\udde6-\\uddff]){2}",Gn="[\\ud800-\\udbff][\\udc00-\\udfff]",Bn="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Vn="(?:"+Rn+"|"+In+")",Un="(?:"+Bn+"|"+In+")",zn="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",Hn="[\\ufe0e\\ufe0f]?"+zn+("(?:\\u200d(?:"+["[^\\ud800-\\udfff]",Nn,Gn].join("|")+")[\\ufe0e\\ufe0f]?"+zn+")*"),Fn="(?:"+[Ln,Nn,Gn].join("|")+")"+Hn,jn=RegExp([Bn+"?"+Rn+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[Pn,Bn,"$"].join("|")+")",Un+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[Pn,Bn+Vn,"$"].join("|")+")",Bn+"?"+Vn+"+(?:['’](?:d|ll|m|re|s|t|ve))?",Bn+"+(?:['’](?: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_])",kn,Fn].join("|"),"g");function Wn(t,e,n){return t=Xe(t),void 0===(e=n?void 0:e)?function(t){return Cn.test(t)}(t)?function(t){return t.match(jn)||[]}(t):function(t){return t.match(An)||[]}(t):t.match(e)||[]}var Yn=RegExp("['’]","g");function Xn(t){return function(e){return function(t,e,n,r){var i=-1,a=null==t?0:t.length;for(r&&a&&(n=t[++i]);++i<a;)n=e(n,t[i],i,t);return n}(Wn(function(t){return(t=Xe(t))&&t.replace(Tn,Sn).replace(Mn,"")}(e).replace(Yn,"")),t,"")}}var qn=Xn((function(t,e,n){return e=e.toLowerCase(),t+(n?En(Xe(e).toLowerCase()):e)}));function Zn(t,e,n){return void 0===n&&(n=e,e=void 0),void 0!==n&&(n=(n=mt(n))==n?n:0),void 0!==e&&(e=(e=mt(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}(mt(t),e,n)}function Kn(t){var e=this.__data__=new Ve(t);this.size=e.size}Kn.prototype.clear=function(){this.__data__=new Ve,this.size=0},Kn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Kn.prototype.get=function(t){return this.__data__.get(t)},Kn.prototype.has=function(t){return this.__data__.has(t)},Kn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Ve){var r=n.__data__;if(!Ue||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new He(r)}return n.set(t,e),this.size=n.size,this};var $n="object"==typeof t&&t&&!t.nodeType&&t,Qn=$n&&"object"==typeof module&&module&&!module.nodeType&&module,Jn=Qn&&Qn.exports===$n?Z.Buffer:void 0,tr=Jn?Jn.allocUnsafe:void 0;function er(t,e){if(e)return t.slice();var n=t.length,r=tr?tr(n):new t.constructor(n);return t.copy(r),r}function nr(){return[]}var rr=Object.prototype.propertyIsEnumerable,ir=Object.getOwnPropertySymbols,ar=ir?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,a=[];++n<r;){var o=t[n];e(o,n,t)&&(a[i++]=o)}return a}(ir(t),(function(e){return rr.call(t,e)})))}:nr;var or=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)$e(e,ar(t)),t=nn(t);return e}:nr;function sr(t,e,n){var r=e(t);return st(t)?r:$e(r,n(t))}function ur(t){return sr(t,Te,ar)}function lr(t){return sr(t,Ce,or)}var cr=kt(Z,"DataView"),hr=kt(Z,"Promise"),fr=kt(Z,"Set"),dr=Et(cr),pr=Et(Ue),gr=Et(hr),vr=Et(fr),mr=Et(Lt),yr=rt;(cr&&"[object DataView]"!=yr(new cr(new ArrayBuffer(1)))||Ue&&"[object Map]"!=yr(new Ue)||hr&&"[object Promise]"!=yr(hr.resolve())||fr&&"[object Set]"!=yr(new fr)||Lt&&"[object WeakMap]"!=yr(new Lt))&&(yr=function(t){var e=rt(t),n="[object Object]"==e?t.constructor:void 0,r=n?Et(n):"";if(r)switch(r){case dr:return"[object DataView]";case pr:return"[object Map]";case gr:return"[object Promise]";case vr:return"[object Set]";case mr:return"[object WeakMap]"}return e});var _r=yr,br=Object.prototype.hasOwnProperty;var xr=Z.Uint8Array;function wr(t){var e=new t.constructor(t.byteLength);return new xr(e).set(new xr(t)),e}var Or=/\w*$/;var Er=K?K.prototype:void 0,Sr=Er?Er.valueOf:void 0;function Tr(t,e){var n=e?wr(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Mr(t,e,n){var r,i,a,o=t.constructor;switch(e){case"[object ArrayBuffer]":return wr(t);case"[object Boolean]":case"[object Date]":return new o(+t);case"[object DataView]":return function(t,e){var n=e?wr(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 Tr(t,n);case"[object Map]":return new o;case"[object Number]":case"[object String]":return new o(t);case"[object RegExp]":return(a=new(i=t).constructor(i.source,Or.exec(i))).lastIndex=i.lastIndex,a;case"[object Set]":return new o;case"[object Symbol]":return r=t,Sr?Object(Sr.call(r)):{}}}function Ar(t){return"function"!=typeof t.constructor||ne(t)?{}:It(nn(t))}var Cr=me&&me.isMap,Dr=Cr?de(Cr):function(t){return it(t)&&"[object Map]"==_r(t)};var Pr=me&&me.isSet,kr=Pr?de(Pr):function(t){return it(t)&&"[object Set]"==_r(t)},Lr={};function Rr(t,e,n,r,i,a){var o,s=1&e,u=2&e,l=4&e;if(n&&(o=i?n(t,r,i,a):n(t)),void 0!==o)return o;if(!ht(t))return t;var c=st(t);if(c){if(o=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&br.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!s)return Gt(t,o)}else{var h=_r(t),f="[object Function]"==h||"[object GeneratorFunction]"==h;if(he(t))return er(t,s);if("[object Object]"==h||"[object Arguments]"==h||f&&!i){if(o=u||f?{}:Ar(t),!s)return u?function(t,e){return Zt(t,or(t),e)}(t,function(t,e){return t&&Zt(e,Ce(e),t)}(o,t)):function(t,e){return Zt(t,ar(t),e)}(t,function(t,e){return t&&Zt(e,Te(e),t)}(o,t))}else{if(!Lr[h])return i?t:{};o=Mr(t,h,s)}}a||(a=new Kn);var d=a.get(t);if(d)return d;a.set(t,o),kr(t)?t.forEach((function(r){o.add(Rr(r,e,n,r,t,a))})):Dr(t)&&t.forEach((function(r,i){o.set(i,Rr(r,e,n,i,t,a))}));var p=l?u?lr:ur:u?keysIn:Te,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]),qt(o,i,Rr(r,e,n,i,t,a))})),o}Lr["[object Arguments]"]=Lr["[object Array]"]=Lr["[object ArrayBuffer]"]=Lr["[object DataView]"]=Lr["[object Boolean]"]=Lr["[object Date]"]=Lr["[object Float32Array]"]=Lr["[object Float64Array]"]=Lr["[object Int8Array]"]=Lr["[object Int16Array]"]=Lr["[object Int32Array]"]=Lr["[object Map]"]=Lr["[object Number]"]=Lr["[object Object]"]=Lr["[object RegExp]"]=Lr["[object Set]"]=Lr["[object String]"]=Lr["[object Symbol]"]=Lr["[object Uint8Array]"]=Lr["[object Uint8ClampedArray]"]=Lr["[object Uint16Array]"]=Lr["[object Uint32Array]"]=!0,Lr["[object Error]"]=Lr["[object Function]"]=Lr["[object WeakMap]"]=!1;function Ir(t){return Rr(t,5)}function Nr(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new He;++e<n;)this.add(t[e])}function Gr(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 Br(t,e){return t.has(e)}Nr.prototype.add=Nr.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Nr.prototype.has=function(t){return this.__data__.has(t)};function Vr(t,e,n,r,i,a){var o=1&n,s=t.length,u=e.length;if(s!=u&&!(o&&u>s))return!1;var l=a.get(t);if(l&&a.get(e))return l==e;var c=-1,h=!0,f=2&n?new Nr:void 0;for(a.set(t,e),a.set(e,t);++c<s;){var d=t[c],p=e[c];if(r)var g=o?r(p,d,c,e,t,a):r(d,p,c,t,e,a);if(void 0!==g){if(g)continue;h=!1;break}if(f){if(!Gr(e,(function(t,e){if(!Br(f,e)&&(d===t||i(d,t,n,r,a)))return f.push(e)}))){h=!1;break}}else if(d!==p&&!i(d,p,n,r,a)){h=!1;break}}return a.delete(t),a.delete(e),h}function Ur(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function zr(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}var Hr=K?K.prototype:void 0,Fr=Hr?Hr.valueOf:void 0;var jr=Object.prototype.hasOwnProperty;var Wr=Object.prototype.hasOwnProperty;function Yr(t,e,n,r,i,a){var o=st(t),s=st(e),u=o?"[object Array]":_r(t),l=s?"[object Array]":_r(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&&he(t)){if(!he(e))return!1;o=!0,c=!1}if(f&&!c)return a||(a=new Kn),o||_e(t)?Vr(t,e,n,r,i,a):function(t,e,n,r,i,a,o){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||!a(new xr(t),new xr(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Yt(+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=Ur;case"[object Set]":var u=1&r;if(s||(s=zr),t.size!=e.size&&!u)return!1;var l=o.get(t);if(l)return l==e;r|=2,o.set(t,e);var c=Vr(s(t),s(e),r,i,a,o);return o.delete(t),c;case"[object Symbol]":if(Fr)return Fr.call(t)==Fr.call(e)}return!1}(t,e,u,n,r,i,a);if(!(1&n)){var d=c&&Wr.call(t,"__wrapped__"),p=h&&Wr.call(e,"__wrapped__");if(d||p){var g=d?t.value():t,v=p?e.value():e;return a||(a=new Kn),i(g,v,n,r,a)}}return!!f&&(a||(a=new Kn),function(t,e,n,r,i,a){var o=1&n,s=ur(t),u=s.length;if(u!=ur(e).length&&!o)return!1;for(var l=u;l--;){var c=s[l];if(!(o?c in e:jr.call(e,c)))return!1}var h=a.get(t);if(h&&a.get(e))return h==e;var f=!0;a.set(t,e),a.set(e,t);for(var d=o;++l<u;){var p=t[c=s[l]],g=e[c];if(r)var v=o?r(g,p,c,e,t,a):r(p,g,c,t,e,a);if(!(void 0===v?p===g||i(p,g,n,r,a):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 a.delete(t),a.delete(e),f}(t,e,n,r,i,a))}function Xr(t,e,n,r,i){return t===e||(null==t||null==e||!it(t)&&!it(e)?t!=t&&e!=e:Yr(t,e,n,r,Xr,i))}function qr(t){return t==t&&!ht(t)}function Zr(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}}function Kr(t){var e=function(t){for(var e=Te(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,qr(i)]}return e}(t);return 1==e.length&&e[0][2]?Zr(e[0][0],e[0][1]):function(n){return n===t||function(t,e,n,r){var i=n.length,a=i,o=!r;if(null==t)return!a;for(t=Object(t);i--;){var s=n[i];if(o&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++i<a;){var u=(s=n[i])[0],l=t[u],c=s[1];if(o&&s[2]){if(void 0===l&&!(u in t))return!1}else{var h=new Kn;if(r)var f=r(l,c,u,t,e,h);if(!(void 0===f?Xr(c,l,3,r,h):f))return!1}}return!0}(n,t,e)}}function $r(t,e){return null!=t&&e in Object(t)}function Qr(t,e){return null!=t&&function(t,e,n){for(var r=-1,i=(e=qe(e,t)).length,a=!1;++r<i;){var o=Ze(e[r]);if(!(a=null!=t&&n(t,o)))break;t=t[o]}return a||++r!=i?a:!!(i=null==t?0:t.length)&&Qt(i)&&jt(o,i)&&(st(t)||se(t))}(t,e,$r)}function Jr(t,e){return ke(t)&&qr(e)?Zr(Ze(t),e):function(n){var r=function(t,e,n){var r=null==t?void 0:Ke(t,e);return void 0===r?n:r}(n,t);return void 0===r&&r===e?Qr(n,t):Xr(e,r,3)}}function ti(t){return ke(t)?(e=Ze(t),function(t){return null==t?void 0:t[e]}):function(t){return function(e){return Ke(e,t)}}(t);var e}function ei(t){return"function"==typeof t?t:null==t?yt:"object"==typeof t?st(t)?Jr(t[0],t[1]):Kr(t):ti(t)}var ni,ri=function(t,e,n){for(var r=-1,i=Object(t),a=n(t),o=a.length;o--;){var s=a[ni?o:++r];if(!1===e(i[s],s,i))break}return t};var ii=function(t,e){return function(n,r){if(null==n)return n;if(!Jt(n))return t(n,r);for(var i=n.length,a=e?i:-1,o=Object(n);(e?a--:++a<i)&&!1!==r(o[a],a,o););return n}}((function(t,e){return t&&ri(t,e,Te)})),ai=function(){return Z.Date.now()},oi=Math.max,si=Math.min;function ui(t,e,n){var r,i,a,o,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,a=i;return r=i=void 0,l=e,o=t.apply(a,n)}function p(t){return l=t,s=setTimeout(v,e),c?d(t):o}function g(t){var n=t-u;return void 0===u||n>=e||n<0||h&&t-l>=a}function v(){var t=ai();if(g(t))return m(t);s=setTimeout(v,function(t){var n=e-(t-u);return h?si(n,a-(t-l)):n}(t))}function m(t){return s=void 0,f&&r?d(t):(r=i=void 0,o)}function y(){var t=ai(),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)),o}return e=mt(e)||0,ht(n)&&(c=!!n.leading,a=(h="maxWait"in n)?oi(mt(n.maxWait)||0,e):a,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?o:m(ai())},y}function li(t,e,n){(void 0===n||Yt(t[e],n))&&(void 0!==n||e in t)||Wt(t,e,n)}function ci(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}function hi(t,e,n,r,i,a,o){var s=ci(t,n),u=ci(e,n),l=o.get(u);if(l)li(t,n,l);else{var c,h=a?a(s,u,n+"",t,e,o):void 0,f=void 0===h;if(f){var d=st(u),p=!d&&he(u),g=!d&&!p&&_e(u);h=u,d||p||g?st(s)?h=s:it(c=s)&&Jt(c)?h=Gt(s):p?(f=!1,h=er(u,!0)):g?(f=!1,h=Tr(u,!0)):h=[]:function(t){if(!it(t)||"[object Object]"!=rt(t))return!1;var e=nn(t);if(null===e)return!0;var n=sn.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&on.call(n)==un}(u)||se(u)?(h=s,se(s)?h=function(t){return Zt(t,Ce(t))}(s):ht(s)&&!_t(s)||(h=Ar(u))):f=!1}f&&(o.set(u,h),i(h,u,r,a,o),o.delete(u)),li(t,n,h)}}function fi(t,e,n,r,i){t!==e&&ri(e,(function(a,o){if(i||(i=new Kn),ht(a))hi(t,e,o,n,fi,r,i);else{var s=r?r(ci(t,o),a,o+"",t,e,i):void 0;void 0===s&&(s=a),li(t,o,s)}}),Ce)}function di(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 pi(t,e){var n=-1,r=Jt(t)?Array(t.length):[];return ii(t,(function(t,i,a){r[++n]=e(t,i,a)})),r}function gi(t,e){return tn(function(t,e){return(st(t)?ot:pi)(t,ei(e))}(t,e),1/0)}function vi(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r}var mi=Object.prototype.hasOwnProperty;function yi(t){if(null==t)return!0;if(Jt(t)&&(st(t)||"string"==typeof t||"function"==typeof t.splice||he(t)||_e(t)||se(t)))return!t.length;var e=_r(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(ne(t))return!Se(t).length;for(var n in t)if(mi.call(t,n))return!1;return!0}function _i(t,e){return Xr(t,e)}var bi,xi=Xn((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),wi=(bi=function(t,e,n){fi(t,e,n)},$t((function(t,e){var n=-1,r=e.length,i=r>1?e[r-1]:void 0,a=r>2?e[2]:void 0;for(i=bi.length>3&&"function"==typeof i?(r--,i):void 0,a&&te(e[0],e[1],a)&&(i=r<3?void 0:i,r=1),t=Object(t);++n<r;){var o=e[n];o&&bi(t,o,n,i)}return t})));function Oi(t,e){var n;return ii(t,(function(t,r,i){return!(n=e(t,r,i))})),!!n}function Ei(t,e,n){var r=st(t)?Gr:Oi;return n&&te(t,e,n)&&(e=void 0),r(t,ei(e))}var Si=fr&&1/zr(new fr([,-0]))[1]==1/0?function(t){return new fr(t)}:function(){};function Ti(t){return t&&t.length?function(t,e,n){var r=-1,i=Ht,a=t.length,o=!0,s=[],u=s;if(n)o=!1,i=di;else if(a>=200){var l=e?null:Si(t);if(l)return zr(l);o=!1,i=Br,u=new Nr}else u=e?[]:s;t:for(;++r<a;){var c=t[r],h=e?e(c):c;if(c=n||0!==c?c:0,o&&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):[]}var Mi="http://www.w3.org/1999/xhtml",Ai={svg:"http://www.w3.org/2000/svg",xhtml:Mi,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ci(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),Ai.hasOwnProperty(e)?{space:Ai[e],local:t}:t}function Di(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Mi&&e.documentElement.namespaceURI===Mi?e.createElement(t):e.createElementNS(n,t)}}function Pi(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function ki(t){var e=Ci(t);return(e.local?Pi:Di)(e)}function Li(){}function Ri(t){return null==t?Li:function(){return this.querySelector(t)}}function Ii(){return[]}function Ni(t){return null==t?Ii:function(){return this.querySelectorAll(t)}}function Gi(t){return function(){return this.matches(t)}}function Bi(t){return new Array(t.length)}function Vi(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Vi.prototype={constructor:Vi,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 Ui(t,e,n,r,i,a){for(var o,s=0,u=e.length,l=a.length;s<l;++s)(o=e[s])?(o.__data__=a[s],r[s]=o):n[s]=new Vi(t,a[s]);for(;s<u;++s)(o=e[s])&&(i[s]=o)}function zi(t,e,n,r,i,a,o){var s,u,l,c={},h=e.length,f=a.length,d=new Array(h);for(s=0;s<h;++s)(u=e[s])&&(d[s]=l="$"+o.call(u,u.__data__,s,e),l in c?i[s]=u:c[l]=u);for(s=0;s<f;++s)(u=c[l="$"+o.call(t,a[s],s,a)])?(r[s]=u,u.__data__=a[s],c[l]=null):n[s]=new Vi(t,a[s]);for(s=0;s<h;++s)(u=e[s])&&c[d[s]]===u&&(i[s]=u)}function Hi(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Fi(t){return function(){this.removeAttribute(t)}}function ji(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Wi(t,e){return function(){this.setAttribute(t,e)}}function Yi(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Xi(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function qi(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 Zi(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Ki(t){return function(){this.style.removeProperty(t)}}function $i(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Qi(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Ji(t,e){return t.style.getPropertyValue(e)||Zi(t).getComputedStyle(t,null).getPropertyValue(e)}function ta(t){return function(){delete this[t]}}function ea(t,e){return function(){this[t]=e}}function na(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function ra(t){return t.trim().split(/^|\s+/)}function ia(t){return t.classList||new aa(t)}function aa(t){this._node=t,this._names=ra(t.getAttribute("class")||"")}function oa(t,e){for(var n=ia(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function sa(t,e){for(var n=ia(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function ua(t){return function(){oa(this,t)}}function la(t){return function(){sa(this,t)}}function ca(t,e){return function(){(e.apply(this,arguments)?oa:sa)(this,t)}}function ha(){this.textContent=""}function fa(t){return function(){this.textContent=t}}function da(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function pa(){this.innerHTML=""}function ga(t){return function(){this.innerHTML=t}}function va(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function ma(){this.nextSibling&&this.parentNode.appendChild(this)}function ya(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function _a(){return null}function ba(){var t=this.parentNode;t&&t.removeChild(this)}function xa(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function wa(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}aa.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 Oa={},Ea=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(Oa={mouseenter:"mouseover",mouseleave:"mouseout"}));function Sa(t,e,n){return t=Ta(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function Ta(t,e,n){return function(r){var i=Ea;Ea=r;try{t.call(this,this.__data__,e,n)}finally{Ea=i}}}function Ma(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 Aa(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r<a;++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 Ca(t,e,n){var r=Oa.hasOwnProperty(t.type)?Sa:Ta;return function(i,a,o){var s,u=this.__on,l=r(e,a,o);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 Da(t,e,n){var r=Zi(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 Pa(t,e){return function(){return Da(this,t,e)}}function ka(t,e){return function(){return Da(this,t,e.apply(this,arguments))}}var La,Ra=[null];function Ia(t,e){this._groups=t,this._parents=e}function Na(){return new Ia([[document.documentElement]],Ra)}function Ga(t){return"string"==typeof t?new Ia([[document.querySelector(t)]],[document.documentElement]):new Ia([[t]],Ra)}function Ba(){for(var t,e=Ea;t=e.sourceEvent;)e=t;return e}function Va(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]}function Ua(t){var e=Ba();return e.changedTouches&&(e=e.changedTouches[0]),Va(t,e)}function za(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Ha(t,e){return t(e={exports:{}},e.exports),e.exports}Ia.prototype=Na.prototype={constructor:Ia,select:function(t){"function"!=typeof t&&(t=Ri(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o,s=e[i],u=s.length,l=r[i]=new Array(u),c=0;c<u;++c)(a=s[c])&&(o=t.call(a,a.__data__,c,s))&&("__data__"in a&&(o.__data__=a.__data__),l[c]=o);return new Ia(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=Ni(t));for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var o,s=e[a],u=s.length,l=0;l<u;++l)(o=s[l])&&(r.push(t.call(o,o.__data__,l,s)),i.push(o));return new Ia(r,i)},filter:function(t){"function"!=typeof t&&(t=Gi(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,u=r[i]=[],l=0;l<s;++l)(a=o[l])&&t.call(a,a.__data__,l,o)&&u.push(a);return new Ia(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?zi:Ui,r=this._parents,i=this._groups;"function"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var a=i.length,o=new Array(a),s=new Array(a),u=new Array(a),l=0;l<a;++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=o[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(o=new Ia(o,r))._enter=s,o._exit=u,o},enter:function(){return new Ia(this._enter||this._groups.map(Bi),this._parents)},exit:function(){return new Ia(this._exit||this._groups.map(Bi),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,a=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=e&&(i=e(i)),null==n?a.remove():n(a),r&&i?r.merge(i).order():i},merge:function(t){for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),s=0;s<a;++s)for(var u,l=e[s],c=n[s],h=l.length,f=o[s]=new Array(h),d=0;d<h;++d)(u=l[d]||c[d])&&(f[d]=u);for(;s<r;++s)o[s]=e[s];return new Ia(o,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],a=i.length-1,o=i[a];--a>=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=Hi);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o,s=n[a],u=s.length,l=i[a]=new Array(u),c=0;c<u;++c)(o=s[c])&&(l[c]=o);l.sort(e)}return new Ia(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,a=r.length;i<a;++i){var o=r[i];if(o)return o}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,a=e[n],o=0,s=a.length;o<s;++o)(i=a[o])&&t.call(i,i.__data__,o,a);return this},attr:function(t,e){var n=Ci(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?ji:Fi:"function"==typeof e?n.local?qi:Xi:n.local?Yi:Wi)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?Ki:"function"==typeof e?Qi:$i)(t,e,null==n?"":n)):Ji(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?ta:"function"==typeof e?na:ea)(t,e)):this.node()[t]},classed:function(t,e){var n=ra(t+"");if(arguments.length<2){for(var r=ia(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?ca:e?ua:la)(n,e))},text:function(t){return arguments.length?this.each(null==t?ha:("function"==typeof t?da:fa)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?pa:("function"==typeof t?va:ga)(t)):this.node().innerHTML},raise:function(){return this.each(ma)},lower:function(){return this.each(ya)},append:function(t){var e="function"==typeof t?t:ki(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:ki(t),r=null==e?_a:"function"==typeof e?e:Ri(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(ba)},clone:function(t){return this.select(t?wa:xa)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,a=Ma(t+""),o=a.length;if(!(arguments.length<2)){for(s=e?Ca:Aa,null==n&&(n=!1),r=0;r<o;++r)this.each(s(a[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<o;++r)if((i=a[r]).type===u.type&&i.name===u.name)return u.value},dispatch:function(t,e){return this.each(("function"==typeof e?ka:Pa)(t,e))}},function(t){t.debounce=ui,t.clone=Ir,t.merge=wi,t.removeArrayDuplicates=Ti,t.clamp=Zn,t.flatten=en,t.camelCase=qn,t.isEmpty=yi,t.isEqual=_i,t.flatMapDeep=gi,t.kebabCase=xi,t.fromPairs=vi,t.some=Ei,t.debounceWithD3MousePosition=function(t,e,n){var r=null;return function(){var i=this,a=arguments;i.mousePosition=Ua(n),clearTimeout(r),r=setTimeout((function(){t.apply(i,a)}),e)}},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 a=n.axes[i];(a.primary||a.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 o=a.mapsTo;if(null==o){var s=a.scaleType;null==s?a.mapsTo="value":s===C.TIME?a.mapsTo="date":s===C.LABELS&&(a.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.truncateLabel=function(t,e,n){return n>t.length?t:e===M.MID_LINE?t.substr(0,n/2)+"..."+t.substr(-n/2):e===M.FRONT_LINE?"..."+t.substr(-n):e===M.END_LINE?t.substr(0,n)+"...":void 0},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,a=e;i<a.length;i++){var o=a[i];if(null===r[o]||void 0===r[o])return null;r=r[o]}return r}return null},t.flipSVGCoordinatesBasedOnOrientation=function(t,e){return e===A.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,a=r.x1,o=r.y0,s=r.y1;return"M"+i+","+o+"L"+i+","+s+"L"+a+","+s+"L"+a+","+o+"L"+i+","+o},t.flipDomainAndRangeBasedOnOrientation=function(t,e,n){return n===A.VERTICAL?[t,e]:[e,t]},t.compareNumeric=function(t,e){return Number(t)===Number(e)}}(La||(La={}));var Fa=Ha((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}));za(Fa);var ja=Ha((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}));za(ja);var Wa=Ha((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,r=(n=ja)&&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}));za(Wa);var Ya=Ha((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}));za(Ya);var Xa=Ha((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 a=t.defaultFormattingWidth||t.defaultWidth,o=i.width?String(i.width):a;r=t.formattingValues[o]||t.formattingValues[a]}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}));za(Xa);var qa=Ha((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,r=(n=Xa)&&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}));za(qa);var Za=Ha((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e,n){var r=String(e),i=n||{},a=r.match(t.matchPattern);if(!a)return null;var o=a[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(o.length)}}},t.exports=e.default}));za(Za);var Ka=Ha((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e,n){var r=String(e),i=n||{},a=i.width,o=a&&t.matchPatterns[a]||t.matchPatterns[t.defaultMatchWidth],s=r.match(o);if(!s)return null;var u,l=s[0],c=a&&t.parsePatterns[a]||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}));za(Ka);var $a=Ha((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i(Za),r=i(Ka);function i(t){return t&&t.__esModule?t:{default:t}}var a={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=a,t.exports=e.default}));za($a);var Qa,Ja=za(Ha((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=s(Fa),r=s(Wa),i=s(Ya),a=s(qa),o=s($a);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:a.default,match:o.default,options:{weekStartsOn:0,firstWeekContainsDate:1}};e.default=u,t.exports=e.default}))),to={pairingOptions:{"1-color":4,"2-color":5,"3-color":5,"4-color":3,"5-color":2,"14-color":1}},eo={opacity:{unselected:0,selected:.4}},no={ticks:{number:7,rotateIfSmallerThan:30,verticalSpaceRatio:2.5,horizontalSpaceRatio:3.5},paddingRatio:.1},ro={items:{status:{ACTIVE:1,DISABLED:0},horizontalSpace:12,verticalSpace:24,textYOffset:8},checkbox:{radius:6.5,spaceAfter:4}},io={opacity:{unselected:.3,selected:1}},ao={statusBar:{paddingRight:5},status:{indicatorSize:16,paddingLeft:15}},oo={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}},so={opacity:{unselected:.1,selected:.3},xLabelPadding:10,yLabelPadding:8,yTicksNumber:4,minRange:10,xAxisRectHeight:50,dotsRadius:5},uo={default:{size:24}},lo={horizontalOffset:10},co={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}},ho={buttonSize:32,iconSize:20,height:32,spacerHeight:10,iconPadding:6},fo={height:(Qa={},Qa[T.GRAPH_VIEW]=32,Qa[T.SLIDER_VIEW]=10,Qa),spacerHeight:8,handleWidth:5,handleBarWidth:1,handleBarHeight:12},po={type:M.END_LINE,threshold:16,numCharacter:14},go={x:{enabled:!0,numberOfTicks:15},y:{enabled:!0,numberOfTicks:5}},vo={enabled:!0},mo={enabled:!0,showTotal:!0,valueFormatter:function(t){return t.toLocaleString()},truncation:po},yo={top:{visible:!0,includeZero:!0,truncation:po},bottom:{visible:!0,includeZero:!0,truncation:po},left:{visible:!0,includeZero:!0,truncation:po},right:{visible:!0,includeZero:!0,truncation:po}},_o={addSpaceOnEdges:1,showDayName:!1,localeObject:Ja,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"}}},bo={width:null,height:null,resizable:!0,tooltip:mo,legend:{enabled:!0,position:D.BOTTOM,clickable:!0,truncation:po,alignment:P.LEFT,order:null},style:{prefix:"cc"},data:{groupMapsTo:"group",loading:!1,selectedGroups:[]},color:{scale:null,pairing:{numberOfVariants:null,option:1},gradient:{enabled:!1}}},xo=La.merge({},bo,{axes:yo,timeScale:_o,grid:go,ruler:vo,zoomBar:{zoomRatio:.4,minZoomRatio:.01,top:{enabled:!1,type:T.GRAPH_VIEW}},toolbar:{enabled:!1,numberOfIcons:3,controls:[]}}),wo=La.merge({},xo,{bars:{maxWidth:16},timeScale:La.merge(_o,{addSpaceOnEdges:1})}),Oo=La.merge({},wo,{}),Eo=La.merge({},wo,{}),So=La.merge({},wo,{bars:La.merge({},wo.bars,{dividerSize:1.5})}),To=La.merge({},xo,{points:{radius:4,fillOpacity:.3,filled:!0,enabled:!0}}),Mo=La.merge({},To,{points:{radius:3,filled:!1,enabled:!0}}),Ao=La.merge({},Mo,{timeScale:La.merge(_o,{addSpaceOnEdges:0})}),Co=Ao,Do=La.merge({},xo,{bubble:{radiusMapsTo:"radius",radiusRange:function(t,e){var n=Math.min(t.width,t.height);return[3*n/400,25*n/400]},fillOpacity:.2,enabled:!0}}),Po=La.merge({},bo,{pie:{labels:{formatter:null},alignment:P.LEFT}}),ko=La.merge({},bo,{legend:{enabled:!1},gauge:{type:V.SEMI,arcWidth:16,deltaArrow:{size:function(t){return t/8},enabled:!0},status:null,numberSpacing:10,deltaFontSize:function(t){return t/8},valueFontSize:function(t){return t/2.5},numberFormatter:function(t){return t.toFixed(2)%1!=0?t.toFixed(2).toLocaleString():t.toFixed().toLocaleString()},alignment:P.LEFT}}),Lo={chart:bo,axisChart:xo,simpleBarChart:Oo,groupedBarChart:Eo,stackedBarChart:So,bubbleChart:Do,lineChart:Mo,areaChart:Ao,stackedAreaChart:Co,scatterChart:To,pieChart:Po,donutChart:La.merge({},Po,{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()}},alignment:P.LEFT}}),meterChart:La.merge({},bo,{legend:{enabled:!1},meter:{height:8,statusBar:{percentageIndicator:{enabled:!0}}}}),radarChart:La.merge({},bo,{radar:{axes:{angle:"key",value:"value"},alignment:P.LEFT},tooltip:{gridline:{enabled:!0},valueFormatter:function(t){return null!=t?t:"N/A"}}}),gaugeChart:ko,comboChart:wo,treemapChart:La.merge({},bo,{data:La.merge(bo.data,{groupMapsTo:"name"})})},Ro=Object.freeze({__proto__:null,grid:go,ruler:vo,baseTooltip:mo,timeScale:_o,options:Lo,color:to,area:eo,axis:no,legend:ro,lines:io,meter:ao,pie:oo,radar:so,spacers:uo,tooltips:lo,transitions:co,toolbar:ho,zoomBar:fo});function Io(){}function No(t,e){var n=new Io;if(t instanceof Io)t.each((function(t,e){n.set(e,t)}));else if(Array.isArray(t)){var r,i=-1,a=t.length;if(null==e)for(;++i<a;)n.set(i,t[i]);else for(;++i<a;)n.set(e(r=t[i],i,t),r)}else if(t)for(var o in t)n.set(o,t[o]);return n}function Go(){}Io.prototype=No.prototype={constructor:Io,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 Bo=No.prototype;function Vo(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Uo(t){var e;return 1===t.length&&(e=t,t=function(t,n){return Vo(e(t),n)}),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)<0?r=a+1:i=a}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)>0?i=a:r=a+1}return r}}}Go.prototype=function(t,e){var n=new Go;if(t instanceof Go)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:Go,has:Bo.has,add:function(t){return this["$"+(t+="")]=t,this},remove:Bo.remove,clear:Bo.clear,values:Bo.keys,size:Bo.size,empty:Bo.empty,each:Bo.each};var zo=Uo(Vo).right;function Ho(t,e){var n,r,i,a=t.length,o=-1;if(null==e){for(;++o<a;)if(null!=(n=t[o])&&n>=n)for(r=i=n;++o<a;)null!=(n=t[o])&&(r>n&&(r=n),i<n&&(i=n))}else for(;++o<a;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=i=n;++o<a;)null!=(n=e(t[o],o,t))&&(r>n&&(r=n),i<n&&(i=n));return[r,i]}function Fo(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)),a=new Array(i);++r<i;)a[r]=t+r*n;return a}var jo=Math.sqrt(50),Wo=Math.sqrt(10),Yo=Math.sqrt(2);function Xo(t,e,n){var r,i,a,o,s=-1;if(n=+n,(t=+t)===(e=+e)&&n>0)return[t];if((r=e<t)&&(i=t,t=e,e=i),0===(o=qo(t,e,n))||!isFinite(o))return[];if(o>0)for(t=Math.ceil(t/o),e=Math.floor(e/o),a=new Array(i=Math.ceil(e-t+1));++s<i;)a[s]=(t+s)*o;else for(t=Math.floor(t*o),e=Math.ceil(e*o),a=new Array(i=Math.ceil(t-e+1));++s<i;)a[s]=(t-s)/o;return r&&a.reverse(),a}function qo(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),a=r/Math.pow(10,i);return i>=0?(a>=jo?10:a>=Wo?5:a>=Yo?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=jo?10:a>=Wo?5:a>=Yo?2:1)}function Zo(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=jo?i*=10:a>=Wo?i*=5:a>=Yo&&(i*=2),e<t?-i:i}function Ko(t,e){var n,r,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(n=t[a])&&n>=n)for(r=n;++a<i;)null!=(n=t[a])&&n>r&&(r=n)}else for(;++a<i;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=n;++a<i;)null!=(n=e(t[a],a,t))&&n>r&&(r=n);return r}function $o(t,e){var n,r=t.length,i=-1,a=0;if(null==e)for(;++i<r;)(n=+t[i])&&(a+=n);else for(;++i<r;)(n=+e(t[i],i,t))&&(a+=n);return a}function Qo(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}var Jo=Array.prototype,ts=Jo.map,es=Jo.slice,ns={name:"implicit"};function rs(){var t=No(),e=[],n=[],r=ns;function i(i){var a=i+"",o=t.get(a);if(!o){if(r!==ns)return r;t.set(a,o=e.push(i))}return n[(o-1)%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=No();for(var r,a,o=-1,s=n.length;++o<s;)t.has(a=(r=n[o])+"")||t.set(a,e.push(r));return i},i.range=function(t){return arguments.length?(n=es.call(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return rs(e,n).unknown(r)},Qo.apply(i,arguments),i}function is(){var t,e,n=rs().unknown(void 0),r=n.domain,i=n.range,a=[0,1],o=!1,s=0,u=0,l=.5;function c(){var n=r().length,c=a[1]<a[0],h=a[c-0],f=a[1-c];t=(f-h)/Math.max(1,n-s+2*u),o&&(t=Math.floor(t)),h+=(f-h-t*(n-s))*l,e=t*(1-s),o&&(h=Math.round(h),e=Math.round(e));var d=Fo(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?(a=[+t[0],+t[1]],c()):a.slice()},n.rangeRound=function(t){return a=[+t[0],+t[1]],o=!0,c()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(o=!!t,c()):o},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 is(r(),a).round(o).paddingInner(s).paddingOuter(u).align(l)},Qo.apply(c(),arguments)}function as(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function os(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function ss(){}var us="\\s*([+-]?\\d+)\\s*",ls="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",cs="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",hs=/^#([0-9a-f]{3,8})$/,fs=new RegExp("^rgb\\("+[us,us,us]+"\\)$"),ds=new RegExp("^rgb\\("+[cs,cs,cs]+"\\)$"),ps=new RegExp("^rgba\\("+[us,us,us,ls]+"\\)$"),gs=new RegExp("^rgba\\("+[cs,cs,cs,ls]+"\\)$"),vs=new RegExp("^hsl\\("+[ls,cs,cs]+"\\)$"),ms=new RegExp("^hsla\\("+[ls,cs,cs,ls]+"\\)$"),ys={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 _s(){return this.rgb().formatHex()}function bs(){return this.rgb().formatRgb()}function xs(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=hs.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?ws(e):3===n?new Ts(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?new Ts(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?new Ts(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=fs.exec(t))?new Ts(e[1],e[2],e[3],1):(e=ds.exec(t))?new Ts(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=ps.exec(t))?Os(e[1],e[2],e[3],e[4]):(e=gs.exec(t))?Os(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=vs.exec(t))?Ds(e[1],e[2]/100,e[3]/100,1):(e=ms.exec(t))?Ds(e[1],e[2]/100,e[3]/100,e[4]):ys.hasOwnProperty(t)?ws(ys[t]):"transparent"===t?new Ts(NaN,NaN,NaN,0):null}function ws(t){return new Ts(t>>16&255,t>>8&255,255&t,1)}function Os(t,e,n,r){return r<=0&&(t=e=n=NaN),new Ts(t,e,n,r)}function Es(t){return t instanceof ss||(t=xs(t)),t?new Ts((t=t.rgb()).r,t.g,t.b,t.opacity):new Ts}function Ss(t,e,n,r){return 1===arguments.length?Es(t):new Ts(t,e,n,null==r?1:r)}function Ts(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Ms(){return"#"+Cs(this.r)+Cs(this.g)+Cs(this.b)}function As(){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 Cs(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Ds(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Ls(t,e,n,r)}function Ps(t){if(t instanceof Ls)return new Ls(t.h,t.s,t.l,t.opacity);if(t instanceof ss||(t=xs(t)),!t)return new Ls;if(t instanceof Ls)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,s=a-i,u=(a+i)/2;return s?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=u<.5?a+i:2-a-i,o*=60):s=u>0&&u<1?0:o,new Ls(o,s,u,t.opacity)}function ks(t,e,n,r){return 1===arguments.length?Ps(t):new Ls(t,e,n,null==r?1:r)}function Ls(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Rs(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 Is(t){return function(){return t}}function Ns(t){return 1==(t=+t)?Gs: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):Is(isNaN(e)?n:e)}}function Gs(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):Is(isNaN(t)?e:t)}as(ss,xs,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:_s,formatHex:_s,formatHsl:function(){return Ps(this).formatHsl()},formatRgb:bs,toString:bs}),as(Ts,Ss,os(ss,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Ts(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Ts(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:Ms,formatHex:Ms,formatRgb:As,toString:As})),as(Ls,ks,os(ss,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Ls(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Ls(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 Ts(Rs(t>=240?t-240:t+120,i,r),Rs(t,i,r),Rs(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 Bs=function t(e){var n=Ns(e);function r(t,e){var r=n((t=Ss(t)).r,(e=Ss(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=Gs(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function Vs(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(a){for(n=0;n<r;++n)i[n]=t[n]*(1-a)+e[n]*a;return i}}function Us(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,a=new Array(i),o=new Array(r);for(n=0;n<i;++n)a[n]=Xs(t[n],e[n]);for(;n<r;++n)o[n]=e[n];return function(t){for(n=0;n<i;++n)o[n]=a[n](t);return o}}function zs(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function Hs(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Fs(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]=Xs(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}var js=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ws=new RegExp(js.source,"g");function Ys(t,e){var n,r,i,a=js.lastIndex=Ws.lastIndex=0,o=-1,s=[],u=[];for(t+="",e+="";(n=js.exec(t))&&(r=Ws.exec(e));)(i=r.index)>a&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,u.push({i:o,x:Hs(n,r)})),a=Ws.lastIndex;return a<e.length&&(i=e.slice(a),s[o]?s[o]+=i:s[++o]=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 Xs(t,e){var n,r=typeof e;return null==e||"boolean"===r?Is(e):("number"===r?Hs:"string"===r?(n=xs(e))?(e=n,Bs):Ys:e instanceof xs?Bs:e instanceof Date?zs:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(e)?Vs:Array.isArray(e)?Us:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?Fs:Hs)(t,e)}function qs(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var Zs,Ks,$s,Qs,Js=180/Math.PI,tu={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function eu(t,e,n,r,i,a){var o,s,u;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(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,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*Js,skewX:Math.atan(u)*Js,scaleX:o,scaleY:s}}function nu(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(a,o){var s=[],u=[];return a=t(a),o=t(o),function(t,r,i,a,o,s){if(t!==i||r!==a){var u=o.push("translate(",null,e,null,n);s.push({i:u-4,x:Hs(t,i)},{i:u-2,x:Hs(r,a)})}else(i||a)&&o.push("translate("+i+e+a+n)}(a.translateX,a.translateY,o.translateX,o.translateY,s,u),function(t,e,n,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:Hs(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,o.rotate,s,u),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:Hs(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,o.skewX,s,u),function(t,e,n,r,a,o){if(t!==n||e!==r){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:Hs(t,n)},{i:s-2,x:Hs(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,u),a=o=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 ru=nu((function(t){return"none"===t?tu:(Zs||(Zs=document.createElement("DIV"),Ks=document.documentElement,$s=document.defaultView),Zs.style.transform=t,t=$s.getComputedStyle(Ks.appendChild(Zs),null).getPropertyValue("transform"),Ks.removeChild(Zs),eu(+(t=t.slice(7,-1).split(","))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),iu=nu((function(t){return null==t?tu:(Qs||(Qs=document.createElementNS("http://www.w3.org/2000/svg","g")),Qs.setAttribute("transform",t),(t=Qs.transform.baseVal.consolidate())?eu((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):tu)}),", ",")",")");function au(t){return+t}var ou=[0,1];function su(t){return t}function uu(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:function(t){return function(){return t}}(isNaN(e)?NaN:.5)}function lu(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 cu(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return i<r?(r=uu(i,r),a=n(o,a)):(r=uu(r,i),a=n(a,o)),function(t){return a(r(t))}}function hu(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),a=new Array(r),o=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<r;)i[o]=uu(t[o],t[o+1]),a[o]=n(e[o],e[o+1]);return function(e){var n=zo(t,e,1,r)-1;return a[n](i[n](e))}}function fu(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function du(){var t,e,n,r,i,a,o=ou,s=ou,u=Xs,l=su;function c(){return r=Math.min(o.length,s.length)>2?hu:cu,i=a=null,h}function h(e){return isNaN(e=+e)?n:(i||(i=r(o.map(t),s,u)))(t(l(e)))}return h.invert=function(n){return l(e((a||(a=r(s,o.map(t),Hs)))(n)))},h.domain=function(t){return arguments.length?(o=ts.call(t,au),l===su||(l=lu(o)),c()):o.slice()},h.range=function(t){return arguments.length?(s=es.call(t),c()):s.slice()},h.rangeRound=function(t){return s=es.call(t),u=qs,c()},h.clamp=function(t){return arguments.length?(l=t?lu(o):su,h):l!==su},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 pu(t,e){return du()(t,e)}function gu(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 vu(t){return(t=gu(Math.abs(t)))?t[1]:NaN}var mu,yu=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function _u(t){if(!(e=yu.exec(t)))throw new Error("invalid format: "+t);var e;return new bu({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 bu(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 xu(t,e){var n=gu(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")}_u.prototype=bu.prototype,bu.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 wu={"%":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 xu(100*t,e)},r:xu,s:function(t,e){var n=gu(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(mu=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+gu(t,Math.max(0,e+a-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function Ou(t){return t}var Eu,Su,Tu,Mu=Array.prototype.map,Au=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Cu(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?Ou:(e=Mu.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,a=[],o=0,s=e[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),a.push(t.substring(i-=s,i+s)),!((u+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?Ou:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(Mu.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=_u(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"):wu[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?a:/[%p]/.test(y)?u:"",x=wu[y],w=/[defgprs%]/.test(y);function O(t){var i,a,u,f=_,O=b;if("c"===y)O=x(t)+O,t="";else{var E=(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)),E&&0==+t&&(E=!1),f=(E?"("===h?h:l:"-"===h||"("===h?"":h)+f,O=("s"===y?Au[8+mu/3]:"")+O+(E&&"("===h?")":""),w)for(i=-1,a=t.length;++i<a;)if(48>(u=t.charCodeAt(i))||u>57){O=(46===u?o+t.slice(i+1):t.slice(i))+O,t=t.slice(0,i);break}}g&&!d&&(t=r(t,1/0));var S=f.length+t.length+O.length,T=S<p?new Array(p-S+1).join(e):"";switch(g&&d&&(t=r(T+t,T.length?p-O.length:1/0),T=""),n){case"<":t=f+t+O+T;break;case"=":t=f+T+t+O;break;case"^":t=T.slice(0,S=T.length>>1)+f+t+O+T.slice(S);break;default:t=T+f+t+O}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)),O.toString=function(){return t+""},O}return{format:h,formatPrefix:function(t,e){var n=h(((t=_u(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(vu(e)/3))),i=Math.pow(10,-r),a=Au[8+r/3];return function(t){return n(i*t)+a}}}}function Du(t,e,n,r){var i,a=Zo(t,e,n);switch((r=_u(null==r?",f":r)).type){case"s":var o=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(vu(e)/3)))-vu(Math.abs(t)))}(a,o))||(r.precision=i),Tu(r,o);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,vu(e)-vu(t))+1}(a,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,-vu(Math.abs(t)))}(a))||(r.precision=i-2*("%"===r.type))}return Su(r)}function Pu(t){var e=t.domain;return t.ticks=function(t){var n=e();return Xo(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return Du(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i=e(),a=0,o=i.length-1,s=i[a],u=i[o];return u<s&&(r=s,s=u,u=r,r=a,a=o,o=r),(r=qo(s,u,n))>0?r=qo(s=Math.floor(s/r)*r,u=Math.ceil(u/r)*r,n):r<0&&(r=qo(s=Math.ceil(s*r)/r,u=Math.floor(u*r)/r,n)),r>0?(i[a]=Math.floor(s/r)*r,i[o]=Math.ceil(u/r)*r,e(i)):r<0&&(i[a]=Math.ceil(s*r)/r,i[o]=Math.floor(u*r)/r,e(i)),t},t}function ku(){var t=pu(su,su);return t.copy=function(){return fu(t,ku())},Qo.apply(t,arguments),Pu(t)}function Lu(t,e){var n,r=0,i=(t=t.slice()).length-1,a=t[r],o=t[i];return o<a&&(n=r,r=i,i=n,n=a,a=o,o=n),t[r]=e.floor(a),t[i]=e.ceil(o),t}function Ru(t){return Math.log(t)}function Iu(t){return Math.exp(t)}function Nu(t){return-Math.log(-t)}function Gu(t){return-Math.exp(-t)}function Bu(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Vu(t){return function(e){return-t(-e)}}function Uu(t){var e,n,r=t(Ru,Iu),i=r.domain,a=10;function o(){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})}(a),n=function(t){return 10===t?Bu:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}(a),i()[0]<0?(e=Vu(e),n=Vu(n),t(Nu,Gu)):t(Ru,Iu),r}return r.base=function(t){return arguments.length?(a=+t,o()):a},r.domain=function(t){return arguments.length?(i(t),o()):i()},r.ticks=function(t){var r,o=i(),s=o[0],u=o[o.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(!(a%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<a;++c)if(!((h=l*c)<s)){if(h>u)break;g.push(h)}}else for(;f<d;++f)for(c=a-1,l=n(f);c>=1;--c)if(!((h=l*c)<s)){if(h>u)break;g.push(h)}}else g=Xo(f,d,Math.min(d-f,p)).map(n);return r?g.reverse():g},r.tickFormat=function(t,i){if(null==i&&(i=10===a?".0e":","),"function"!=typeof i&&(i=Su(i)),t===1/0)return i;null==t&&(t=10);var o=Math.max(1,a*t/r.ticks().length);return function(t){var r=t/n(Math.round(e(t)));return r*a<a-.5&&(r*=a),r<=o?i(t):""}},r.nice=function(){return i(Lu(i(),{floor:function(t){return n(Math.floor(e(t)))},ceil:function(t){return n(Math.ceil(e(t)))}}))},r}Eu=Cu({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),Su=Eu.format,Tu=Eu.formatPrefix;var zu=new Date,Hu=new Date;function Fu(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,a){var o,s=[];if(n=i.ceil(n),a=null==a?1:Math.floor(a),!(n<r&&a>0))return s;do{s.push(o=new Date(+n)),e(n,a),t(n)}while(o<n&&n<r);return s},i.filter=function(n){return Fu((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 zu.setTime(+e),Hu.setTime(+r),t(zu),t(Hu),Math.floor(n(zu,Hu))},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 ju=Fu((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));ju.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?Fu((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):ju:null};var Wu=Fu((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()})),Yu=Fu((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()})),Xu=Fu((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()})),qu=Fu((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 Zu(t){return Fu((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 Ku=Zu(0),$u=Zu(1),Qu=(Zu(2),Zu(3),Zu(4)),Ju=(Zu(5),Zu(6),Fu((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()}))),tl=Fu((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()}));tl.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Fu((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 el=Fu((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 nl(t){return Fu((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 rl=nl(0),il=nl(1),al=(nl(2),nl(3),nl(4)),ol=(nl(5),nl(6),Fu((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 sl(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 ul(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 ll(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}ol.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Fu((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 cl,hl,fl={"-":"",_:" ",0:"0"},dl=/^\s*\d+/,pl=/^%/,gl=/[\\^$*+?|[\]().{}]/g;function vl(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(e)+i:i)}function ml(t){return t.replace(gl,"\\$&")}function yl(t){return new RegExp("^(?:"+t.map(ml).join("|")+")","i")}function _l(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function bl(t,e,n){var r=dl.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function xl(t,e,n){var r=dl.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function wl(t,e,n){var r=dl.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Ol(t,e,n){var r=dl.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function El(t,e,n){var r=dl.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Sl(t,e,n){var r=dl.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Tl(t,e,n){var r=dl.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Ml(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 Al(t,e,n){var r=dl.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function Cl(t,e,n){var r=dl.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Dl(t,e,n){var r=dl.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Pl(t,e,n){var r=dl.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function kl(t,e,n){var r=dl.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Ll(t,e,n){var r=dl.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Rl(t,e,n){var r=dl.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Il(t,e,n){var r=dl.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Nl(t,e,n){var r=dl.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Gl(t,e,n){var r=pl.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Bl(t,e,n){var r=dl.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Vl(t,e,n){var r=dl.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Ul(t,e){return vl(t.getDate(),e,2)}function zl(t,e){return vl(t.getHours(),e,2)}function Hl(t,e){return vl(t.getHours()%12||12,e,2)}function Fl(t,e){return vl(1+qu.count(tl(t),t),e,3)}function jl(t,e){return vl(t.getMilliseconds(),e,3)}function Wl(t,e){return jl(t,e)+"000"}function Yl(t,e){return vl(t.getMonth()+1,e,2)}function Xl(t,e){return vl(t.getMinutes(),e,2)}function ql(t,e){return vl(t.getSeconds(),e,2)}function Zl(t){var e=t.getDay();return 0===e?7:e}function Kl(t,e){return vl(Ku.count(tl(t)-1,t),e,2)}function $l(t,e){var n=t.getDay();return t=n>=4||0===n?Qu(t):Qu.ceil(t),vl(Qu.count(tl(t),t)+(4===tl(t).getDay()),e,2)}function Ql(t){return t.getDay()}function Jl(t,e){return vl($u.count(tl(t)-1,t),e,2)}function tc(t,e){return vl(t.getFullYear()%100,e,2)}function ec(t,e){return vl(t.getFullYear()%1e4,e,4)}function nc(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+vl(e/60|0,"0",2)+vl(e%60,"0",2)}function rc(t,e){return vl(t.getUTCDate(),e,2)}function ic(t,e){return vl(t.getUTCHours(),e,2)}function ac(t,e){return vl(t.getUTCHours()%12||12,e,2)}function oc(t,e){return vl(1+el.count(ol(t),t),e,3)}function sc(t,e){return vl(t.getUTCMilliseconds(),e,3)}function uc(t,e){return sc(t,e)+"000"}function lc(t,e){return vl(t.getUTCMonth()+1,e,2)}function cc(t,e){return vl(t.getUTCMinutes(),e,2)}function hc(t,e){return vl(t.getUTCSeconds(),e,2)}function fc(t){var e=t.getUTCDay();return 0===e?7:e}function dc(t,e){return vl(rl.count(ol(t)-1,t),e,2)}function pc(t,e){var n=t.getUTCDay();return t=n>=4||0===n?al(t):al.ceil(t),vl(al.count(ol(t),t)+(4===ol(t).getUTCDay()),e,2)}function gc(t){return t.getUTCDay()}function vc(t,e){return vl(il.count(ol(t)-1,t),e,2)}function mc(t,e){return vl(t.getUTCFullYear()%100,e,2)}function yc(t,e){return vl(t.getUTCFullYear()%1e4,e,4)}function _c(){return"+0000"}function bc(){return"%"}function xc(t){return+t}function wc(t){return Math.floor(+t/1e3)}!function(t){cl=function(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,a=t.days,o=t.shortDays,s=t.months,u=t.shortMonths,l=yl(i),c=_l(i),h=yl(a),f=_l(a),d=yl(o),p=_l(o),g=yl(s),v=_l(s),m=yl(u),y=_l(u),_={a:function(t){return o[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return u[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:Ul,e:Ul,f:Wl,H:zl,I:Hl,j:Fl,L:jl,m:Yl,M:Xl,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:xc,s:wc,S:ql,u:Zl,U:Kl,V:$l,w:Ql,W:Jl,x:null,X:null,y:tc,Y:ec,Z:nc,"%":bc},b={a:function(t){return o[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return u[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:rc,e:rc,f:uc,H:ic,I:ac,j:oc,L:sc,m:lc,M:cc,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:xc,s:wc,S:hc,u:fc,U:dc,V:pc,w:gc,W:vc,x:null,X:null,y:mc,Y:yc,Z:_c,"%":bc},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:Dl,e:Dl,f:Nl,H:kl,I:kl,j:Pl,L:Il,m:Cl,M:Ll,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:Al,Q:Bl,s:Vl,S:Rl,u:xl,U:wl,V:Ol,w:bl,W:El,x:function(t,e,r){return E(t,n,e,r)},X:function(t,e,n){return E(t,r,e,n)},y:Tl,Y:Sl,Z:Ml,"%":Gl};function w(t,e){return function(n){var r,i,a,o=[],s=-1,u=0,l=t.length;for(n instanceof Date||(n=new Date(+n));++s<l;)37===t.charCodeAt(s)&&(o.push(t.slice(u,s)),null!=(i=fl[r=t.charAt(++s)])?r=t.charAt(++s):i="e"===r?" ":"0",(a=e[r])&&(r=a(n,i)),o.push(r),u=s+1);return o.push(t.slice(u,s)),o.join("")}}function O(t,e){return function(n){var r,i,a=ll(1900,void 0,1);if(E(a,t,n+="",0)!=n.length)return null;if("Q"in a)return new Date(a.Q);if("s"in a)return new Date(1e3*a.s+("L"in a?a.L:0));if(!e||"Z"in a||(a.Z=0),"p"in a&&(a.H=a.H%12+12*a.p),void 0===a.m&&(a.m="q"in a?a.q:0),"V"in a){if(a.V<1||a.V>53)return null;"w"in a||(a.w=1),"Z"in a?(i=(r=ul(ll(a.y,0,1))).getUTCDay(),r=i>4||0===i?il.ceil(r):il(r),r=el.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(i=(r=sl(ll(a.y,0,1))).getDay(),r=i>4||0===i?$u.ceil(r):$u(r),r=qu.offset(r,7*(a.V-1)),a.y=r.getFullYear(),a.m=r.getMonth(),a.d=r.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?ul(ll(a.y,0,1)).getUTCDay():sl(ll(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,ul(a)):sl(a)}}function E(t,e,n,r){for(var i,a,o=0,s=e.length,u=n.length;o<s;){if(r>=u)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=x[i in fl?e.charAt(o++):i])||(r=a(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=O(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=O(t+="",!0);return e.toString=function(){return t},e}})}(t),hl=cl.format,cl.parse,cl.utcFormat,cl.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 Oc(t){return new Date(t)}function Ec(t){return t instanceof Date?+t:+new Date(+t)}function Sc(t,e,n,r,i,a,o,s,u){var l=pu(su,su),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=[[o,1,1e3],[o,5,5e3],[o,15,15e3],[o,30,3e4],[a,1,6e4],[a,5,3e5],[a,15,9e5],[a,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(o(s)<s?f:a(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 a=Math.abs(r-n)/e,o=Uo((function(t){return t[2]})).right(b,a);o===b.length?(i=Zo(n/31536e6,r/31536e6,e),e=t):o?(i=(o=b[a/b[o-1][2]<b[o][2]/a?o-1:o])[1],e=o[0]):(i=Math.max(Zo(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(ts.call(t,Ec)):h().map(Oc)},l.ticks=function(t,e){var n,r=h(),i=r[0],a=r[r.length-1],o=a<i;return o&&(n=i,i=a,a=n),n=(n=w(t,i,a,e))?n.range(i,a+1):[],o?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(Lu(n,t)):l},l.copy=function(){return fu(l,Sc(t,e,n,r,i,a,o,s,u))},l}function Tc(){return Qo.apply(Sc(tl,Ju,Ku,qu,Xu,Yu,Wu,ju,hl).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var Mc=Math.PI,Ac=2*Mc,Cc=Ac-1e-6;function Dc(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Pc(){return new Dc}function kc(t){return function(){return t}}Dc.prototype=Pc.prototype={constructor:Dc,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,a){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var a=this._x1,o=this._y1,s=n-t,u=r-e,l=a-t,c=o-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-a,d=r-o,p=s*s+u*u,g=f*f+d*d,v=Math.sqrt(p),m=Math.sqrt(h),y=i*Math.tan((Mc-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,a){t=+t,e=+e,a=!!a;var o=(n=+n)*Math.cos(r),s=n*Math.sin(r),u=t+o,l=e+s,c=1^a,h=a?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%Ac+Ac),h>Cc?this._+="A"+n+","+n+",0,1,"+c+","+(t-o)+","+(e-s)+"A"+n+","+n+",0,1,"+c+","+(this._x1=u)+","+(this._y1=l):h>1e-6&&(this._+="A"+n+","+n+",0,"+ +(h>=Mc)+","+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 Lc=Math.abs,Rc=Math.atan2,Ic=Math.cos,Nc=Math.max,Gc=Math.min,Bc=Math.sin,Vc=Math.sqrt,Uc=Math.PI,zc=Uc/2,Hc=2*Uc;function Fc(t){return t>1?0:t<-1?Uc:Math.acos(t)}function jc(t){return t>=1?zc:t<=-1?-zc:Math.asin(t)}function Wc(t){return t.innerRadius}function Yc(t){return t.outerRadius}function Xc(t){return t.startAngle}function qc(t){return t.endAngle}function Zc(t){return t&&t.padAngle}function Kc(t,e,n,r,i,a,o,s){var u=n-t,l=r-e,c=o-i,h=s-a,f=h*u-c*l;if(!(f*f<1e-12))return[t+(f=(c*(e-a)-h*(t-i))/f)*u,e+f*l]}function $c(t,e,n,r,i,a,o){var s=t-n,u=e-r,l=(o?a:-a)/Vc(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-a,w=f*g-p*d,O=(_<0?-1:1)*Vc(Nc(0,x*x*b-w*w)),E=(w*_-y*O)/b,S=(-w*y-_*O)/b,T=(w*_+y*O)/b,M=(-w*y+_*O)/b,A=E-v,C=S-m,D=T-v,P=M-m;return A*A+C*C>D*D+P*P&&(E=T,S=M),{cx:E,cy:S,x01:-c,y01:-h,x11:E*(i/x-1),y11:S*(i/x-1)}}function Qc(){var t=Wc,e=Yc,n=kc(0),r=null,i=Xc,a=qc,o=Zc,s=null;function u(){var u,l,c=+t.apply(this,arguments),h=+e.apply(this,arguments),f=i.apply(this,arguments)-zc,d=a.apply(this,arguments)-zc,p=Lc(d-f),g=d>f;if(s||(s=u=Pc()),h<c&&(l=h,h=c,c=l),h>1e-12)if(p>Hc-1e-12)s.moveTo(h*Ic(f),h*Bc(f)),s.arc(0,0,h,f,d,!g),c>1e-12&&(s.moveTo(c*Ic(d),c*Bc(d)),s.arc(0,0,c,d,f,g));else{var v,m,y=f,_=d,b=f,x=d,w=p,O=p,E=o.apply(this,arguments)/2,S=E>1e-12&&(r?+r.apply(this,arguments):Vc(c*c+h*h)),T=Gc(Lc(h-c)/2,+n.apply(this,arguments)),M=T,A=T;if(S>1e-12){var C=jc(S/c*Bc(E)),D=jc(S/h*Bc(E));(w-=2*C)>1e-12?(b+=C*=g?1:-1,x-=C):(w=0,b=x=(f+d)/2),(O-=2*D)>1e-12?(y+=D*=g?1:-1,_-=D):(O=0,y=_=(f+d)/2)}var P=h*Ic(y),k=h*Bc(y),L=c*Ic(x),R=c*Bc(x);if(T>1e-12){var I,N=h*Ic(_),G=h*Bc(_),B=c*Ic(b),V=c*Bc(b);if(p<Uc&&(I=Kc(P,k,B,V,N,G,L,R))){var U=P-I[0],z=k-I[1],H=N-I[0],F=G-I[1],j=1/Bc(Fc((U*H+z*F)/(Vc(U*U+z*z)*Vc(H*H+F*F)))/2),W=Vc(I[0]*I[0]+I[1]*I[1]);M=Gc(T,(c-W)/(j-1)),A=Gc(T,(h-W)/(j+1))}}O>1e-12?A>1e-12?(v=$c(B,V,P,k,h,A,g),m=$c(N,G,L,R,h,A,g),s.moveTo(v.cx+v.x01,v.cy+v.y01),A<T?s.arc(v.cx,v.cy,A,Rc(v.y01,v.x01),Rc(m.y01,m.x01),!g):(s.arc(v.cx,v.cy,A,Rc(v.y01,v.x01),Rc(v.y11,v.x11),!g),s.arc(0,0,h,Rc(v.cy+v.y11,v.cx+v.x11),Rc(m.cy+m.y11,m.cx+m.x11),!g),s.arc(m.cx,m.cy,A,Rc(m.y11,m.x11),Rc(m.y01,m.x01),!g))):(s.moveTo(P,k),s.arc(0,0,h,y,_,!g)):s.moveTo(P,k),c>1e-12&&w>1e-12?M>1e-12?(v=$c(L,R,N,G,c,-M,g),m=$c(P,k,B,V,c,-M,g),s.lineTo(v.cx+v.x01,v.cy+v.y01),M<T?s.arc(v.cx,v.cy,M,Rc(v.y01,v.x01),Rc(m.y01,m.x01),!g):(s.arc(v.cx,v.cy,M,Rc(v.y01,v.x01),Rc(v.y11,v.x11),!g),s.arc(0,0,c,Rc(v.cy+v.y11,v.cx+v.x11),Rc(m.cy+m.y11,m.cx+m.x11),g),s.arc(m.cx,m.cy,M,Rc(m.y11,m.x11),Rc(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)+ +a.apply(this,arguments))/2-Uc/2;return[Ic(r)*n,Bc(r)*n]},u.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:kc(+e),u):t},u.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:kc(+t),u):e},u.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:kc(+t),u):n},u.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:kc(+t),u):r},u.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:kc(+t),u):i},u.endAngle=function(t){return arguments.length?(a="function"==typeof t?t:kc(+t),u):a},u.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:kc(+t),u):o},u.context=function(t){return arguments.length?(s=null==t?null:t,u):s},u}function Jc(t){this._context=t}function th(t){return new Jc(t)}function eh(t){return t[0]}function nh(t){return t[1]}function rh(){var t=eh,e=nh,n=kc(!0),r=null,i=th,a=null;function o(o){var s,u,l,c=o.length,h=!1;for(null==r&&(a=i(l=Pc())),s=0;s<=c;++s)!(s<c&&n(u=o[s],s,o))===h&&((h=!h)?a.lineStart():a.lineEnd()),h&&a.point(+t(u,s,o),+e(u,s,o));if(l)return a=null,l+""||null}return o.x=function(e){return arguments.length?(t="function"==typeof e?e:kc(+e),o):t},o.y=function(t){return arguments.length?(e="function"==typeof t?t:kc(+t),o):e},o.defined=function(t){return arguments.length?(n="function"==typeof t?t:kc(!!t),o):n},o.curve=function(t){return arguments.length?(i=t,null!=r&&(a=i(r)),o):i},o.context=function(t){return arguments.length?(null==t?r=a=null:a=i(r=t),o):r},o}function ih(){var t=eh,e=null,n=kc(0),r=nh,i=kc(!0),a=null,o=th,s=null;function u(u){var l,c,h,f,d,p=u.length,g=!1,v=new Array(p),m=new Array(p);for(null==a&&(s=o(d=Pc())),l=0;l<=p;++l){if(!(l<p&&i(f=u[l],l,u))===g)if(g=!g)c=l,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),h=l-1;h>=c;--h)s.point(v[h],m[h]);s.lineEnd(),s.areaEnd()}g&&(v[l]=+t(f,l,u),m[l]=+n(f,l,u),s.point(e?+e(f,l,u):v[l],r?+r(f,l,u):m[l]))}if(d)return s=null,d+""||null}function l(){return rh().defined(i).curve(o).context(a)}return u.x=function(n){return arguments.length?(t="function"==typeof n?n:kc(+n),e=null,u):t},u.x0=function(e){return arguments.length?(t="function"==typeof e?e:kc(+e),u):t},u.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:kc(+t),u):e},u.y=function(t){return arguments.length?(n="function"==typeof t?t:kc(+t),r=null,u):n},u.y0=function(t){return arguments.length?(n="function"==typeof t?t:kc(+t),u):n},u.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:kc(+t),u):r},u.lineX0=u.lineY0=function(){return l().x(t).y(n)},u.lineY1=function(){return l().x(t).y(r)},u.lineX1=function(){return l().x(e).y(n)},u.defined=function(t){return arguments.length?(i="function"==typeof t?t:kc(!!t),u):i},u.curve=function(t){return arguments.length?(o=t,null!=a&&(s=o(a)),u):o},u.context=function(t){return arguments.length?(null==t?a=s=null:s=o(a=t),u):a},u}function ah(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function oh(t){return t}Jc.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 sh=lh(th);function uh(t){this._curve=t}function lh(t){function e(e){return new uh(t(e))}return e._curve=t,e}function ch(){return t=rh().curve(sh),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(lh(t)):e()._curve},t;var t,e}uh.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 hh=Array.prototype.slice;function fh(){}function dh(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 ph(t){this._context=t}function gh(t){return new ph(t)}function vh(t){this._context=t}function mh(t){return new vh(t)}function yh(t){this._context=t}function _h(t){return new yh(t)}function bh(t,e){this._basis=new ph(t),this._beta=e}ph.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:dh(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:dh(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},vh.prototype={areaStart:fh,areaEnd:fh,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:dh(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},yh.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:dh(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},bh.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],a=e[0],o=t[n]-i,s=e[n]-a,u=-1;++u<=n;)r=u/n,this._basis.point(this._beta*t[u]+(1-this._beta)*(i+r*o),this._beta*e[u]+(1-this._beta)*(a+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var xh=function t(e){function n(t){return 1===e?new ph(t):new bh(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function wh(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 Oh(t,e){this._context=t,this._k=(1-e)/6}Oh.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:wh(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:wh(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 Eh=function t(e){function n(t){return new Oh(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Sh(t,e){this._context=t,this._k=(1-e)/6}Sh.prototype={areaStart:fh,areaEnd:fh,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:wh(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 Th=function t(e){function n(t){return new Sh(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Mh(t,e){this._context=t,this._k=(1-e)/6}Mh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._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:wh(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 Ah=function t(e){function n(t){return new Mh(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Ch(t,e,n){var r=t._x1,i=t._y1,a=t._x2,o=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);a=(a*l+t._x1*t._l23_2a-e*t._l12_2a)/c,o=(o*l+t._y1*t._l23_2a-n*t._l12_2a)/c}t._context.bezierCurveTo(r,i,a,o,t._x2,t._y2)}function Dh(t,e){this._context=t,this._alpha=e}Dh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._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:Ch(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 Ph=function t(e){function n(t){return e?new Dh(t,e):new Oh(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function kh(t,e){this._context=t,this._alpha=e}kh.prototype={areaStart:fh,areaEnd:fh,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:Ch(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 Lh=function t(e){function n(t){return e?new kh(t,e):new Sh(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Rh(t,e){this._context=t,this._alpha=e}Rh.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:Ch(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 Ih=function t(e){function n(t){return e?new Rh(t,e):new Mh(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Nh(t){this._context=t}function Gh(t){return new Nh(t)}function Bh(t){return t<0?-1:1}function Vh(t,e,n){var r=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(r||i<0&&-0),o=(n-t._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(Bh(a)+Bh(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Uh(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function zh(t,e,n){var r=t._x0,i=t._y0,a=t._x1,o=t._y1,s=(a-r)/3;t._context.bezierCurveTo(r+s,i+s*e,a-s,o-s*n,a,o)}function Hh(t){this._context=t}function Fh(t){this._context=new jh(t)}function jh(t){this._context=t}function Wh(t){return new Hh(t)}function Yh(t){return new Fh(t)}function Xh(t){this._context=t}function qh(t){var e,n,r=t.length-1,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,a[e]=4,o[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/a[e-1],a[e]-=n,o[e]-=n*o[e-1];for(i[r-1]=o[r-1]/a[r-1],e=r-2;e>=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)a[e]=2*t[e+1]-i[e+1];return[i,a]}function Zh(t){return new Xh(t)}function Kh(t,e){this._context=t,this._t=e}function $h(t){return new Kh(t,.5)}function Qh(t){return new Kh(t,0)}function Jh(t){return new Kh(t,1)}function tf(t,e){if((i=t.length)>1)for(var n,r,i,a=1,o=t[e[0]],s=o.length;a<i;++a)for(r=o,o=t[e[a]],n=0;n<s;++n)o[n][1]+=o[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function ef(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function nf(t,e){return t[e]}Nh.prototype={areaStart:fh,areaEnd:fh,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))}},Hh.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:zh(this,this._t0,Uh(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,zh(this,Uh(this,n=Vh(this,t,e)),n);break;default:zh(this,this._t0,n=Vh(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(Fh.prototype=Object.create(Hh.prototype)).point=function(t,e){Hh.prototype.point.call(this,e,t)},jh.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,a){this._context.bezierCurveTo(e,t,r,n,a,i)}},Xh.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=qh(t),i=qh(e),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],t[o],e[o]);(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)}},Kh.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 rf=function(){function t(t){this.state={options:{}},this.colorScale={},this.colorClassNames={},this.services=t}return t.prototype.getAllDataFromDomain=function(t){if(!this.getData())return null;var e=this.getOptions(),n=this.getData(),r=this.getDataGroups(),i=La.getProperty(e,"data").groupMapsTo,a=La.getProperty(e,"axes");return t&&(n=n.filter((function(e){return t.includes(e.group)}))),a&&Object.keys(a).forEach((function(t){var e=a[t].mapsTo,r=a[t].scaleType;if(r!==C.LINEAR&&r!==C.LOG||(n=n.map((function(t){var n;return x(x({},t),((n={})[e]=Number(t[e]),n))}))),e&&a[t].domain)if(r===C.LABELS)n=n.filter((function(n){return a[t].domain.includes(n[e])}));else{var i=a[t].domain,o=i[0],s=i[1];n=n.filter((function(t){return t[e]>=o&&t[e]<=s}))}})),n.filter((function(t){return r.find((function(e){return e.name===t[i]}))}))},t.prototype.getDisplayData=function(t){if(!this.get("data"))return null;var e=ro.items.status.ACTIVE,n=this.getDataGroups(t),r=this.getOptions().data.groupMapsTo;return this.getAllDataFromDomain(t).filter((function(t){return n.find((function(n){return n.name===t[r]&&n.status===e}))}))},t.prototype.setStackedGroups=function(t){this.set({stackedGroups:t})},t.prototype.getStackedGroups=function(){return this.get("stackedGroups")},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(La.clone(t)),n=this.generateDataGroups(e);return this.set({data:e,dataGroups:n}),e},t.prototype.getDataGroups=function(t){return La.getProperty(this.getOptions(),"data","loading")?[]:t?this.get("dataGroups").filter((function(e){return t.includes(e.name)})):this.get("dataGroups")},t.prototype.getActiveDataGroups=function(t){var e=ro.items.status.ACTIVE;return this.getDataGroups(t).filter((function(t){return t.status===e}))},t.prototype.getDataGroupNames=function(t){return this.getDataGroups(t).map((function(t){return t.name}))},t.prototype.getActiveDataGroupNames=function(t){return this.getActiveDataGroups(t).map((function(t){return t.name}))},t.prototype.getGroupedData=function(t){var e=this.getDisplayData(t),n={},r=this.getOptions().data.groupMapsTo;return e.map((function(t){var e=t[r];null!==n[e]&&void 0!==n[e]?n[e].push(t):n[e]=[t]})),Object.keys(n).map((function(t){return{name:t,data:n[t]}}))},t.prototype.getDataValuesGroupedByKeys=function(t){var e=this,n=this.getOptions(),r=n.data.groupMapsTo,i=this.getDisplayData(t),a=No(i,(function(t){return t[e.services.cartesianScales.getDomainIdentifier(t)]})).keys(),o=this.services.cartesianScales.domainAxisPosition,s=n.axes[o].scaleType;s===C.TIME?a.sort((function(t,e){return new Date(t)-new Date(e)})):s!==C.LOG&&s!==C.LINEAR||a.sort((function(t,e){return t-e}));var u=this.getDataGroupNames();return a.map((function(t){var n={sharedStackKey:t};return u.forEach((function(a){var o=i.find((function(n){var i=e.services.cartesianScales.getDomainIdentifier(n);return n[r]===a&&n[i].toString()===t})),s=e.services.cartesianScales.getRangeIdentifier(n);n[a]=o?o[s]:null})),n}))},t.prototype.getStackedData=function(t){var e=t.percentage,n=void 0!==e&&e,r=t.groups,i=void 0===r?null:r,a=this.getOptions().data.groupMapsTo,o=this.getDataGroupNames(i),s=this.getDataValuesGroupedByKeys(i);if(n){var u=La.fromPairs(s.map((function(t){return[t.sharedStackKey,0]})));s.forEach((function(t){o.forEach((function(e){u[t.sharedStackKey]+=t[e]}))})),s.forEach((function(t){o.forEach((function(e){u[t.sharedStackKey]?t[e]=t[e]/u[t.sharedStackKey]*100:t[e]=0}))}))}return function(){var t=kc([]),e=ef,n=tf,r=nf;function i(i){var a,o,s=t.apply(this,arguments),u=i.length,l=s.length,c=new Array(l);for(a=0;a<l;++a){for(var h,f=s[a],d=c[a]=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(a=0,o=e(c);a<l;++a)c[o[a]].index=a;return n(c,o),c}return i.keys=function(e){return arguments.length?(t="function"==typeof e?e:kc(hh.call(e)),i):t},i.value=function(t){return arguments.length?(r="function"==typeof t?t:kc(+t),i):r},i.order=function(t){return arguments.length?(e=null==t?ef:"function"==typeof t?t:kc(hh.call(t)),i):e},i.offset=function(t){return arguments.length?(n=null==t?tf:t,i):n},i}().keys(o)(s).map((function(t,e){return Object.keys(t).filter((function(t){return!isNaN(t)})).map((function(n){var r=t[n];return r[a]=o[e],r}))}))},t.prototype.getOptions=function(){return this.state.options},t.prototype.set=function(t,e){this.state=Object.assign({},this.state,t);var n=Object.assign({skipUpdate:!1,animate:!0},e);n.skipUpdate||this.update(n.animate)},t.prototype.get=function(t){return t?this.state[t]:this.state},t.prototype.setOptions=function(t){this.set({options:La.merge(this.getOptions(),t)})},t.prototype.update=function(t){void 0===t&&(t=!0),this.getDisplayData()&&(this.updateAllDataGroups(),this.setCustomColorScale(),this.setColorClassNames(),this.services.events.dispatchEvent(W.Model.UPDATE,{animate:t}))},t.prototype.setUpdateCallback=function(t){this.updateCallback=t},t.prototype.toggleDataLabel=function(t){var e=ro.items.status,n=e.ACTIVE,r=e.DISABLED,i=this.getDataGroups(),a=i.some((function(t){return t.status===r})),o=i.filter((function(t){return t.status===n}));if(a)if(1===o.length&&o[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,a){i[a].status=e.name===t?n:r}));var u=i.filter((function(t){return t.status===n})),l=this.getOptions(),c=i.some((function(t){return t.status===r}));l.data.selectedGroups=c?u.map((function(t){return t.name})):[],this.services.events.dispatchEvent(W.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){if(!this.isUserProvidedColorScaleValid())return null;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){if(!this.isUserProvidedColorScaleValid())return null;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.isUserProvidedColorScaleValid=function(){var t=La.getProperty(this.getOptions(),"color","scale"),e=this.getDataGroups();return!(null==t||Object.keys(t).length<e.length)&&e.every((function(e){return Object.keys(t).includes(e.name)}))},t.prototype.getColorClassName=function(t){if(this.isUserProvidedColorScaleValid())return t.originalClassName;var e=this.colorClassNames(t.dataGroupName),n=t.originalClassName;return t.classNameTypes.forEach((function(r){return n=t.originalClassName?n+" "+r+"-"+e:r+"-"+e})),n},t.prototype.getStatus=function(){return null},t.prototype.getAllDataGroupsNames=function(){return this.allDataGroups},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 a,o=La.getProperty(t,"label");if(null===o){var s=La.getProperty(r,i);a=s||"Ungrouped"}else a=o;var u={group:a,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 t=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=ro.items.status,r=n.ACTIVE,i=n.DISABLED,a=this.getOptions(),o=No(t,(function(t){return t[e]})).keys();a.data.selectedGroups.length&&(a.data.selectedGroups.every((function(t){return o.includes(t)}))||(a.data.selectedGroups=[]));var s=function(t){return!a.data.selectedGroups.length||a.data.selectedGroups.includes(t)?r:i};return o.map((function(t){return{name:t,status:s(t)}}))},t.prototype.setCustomColorScale=function(){var t=this;if(this.isUserProvidedColorScaleValid()){var e=this.getOptions(),n=La.getProperty(e,"color","scale");Object.keys(n).forEach((function(e){t.allDataGroups.includes(e)||console.warn('"'+e+'" does not exist in data groups.')}));var r=[];this.allDataGroups.forEach((function(t){n[t]&&r.push(n[t])})),this.colorScale=rs().range(r).domain(this.allDataGroups)}},t.prototype.setColorClassNames=function(){var t=La.getProperty(this.getOptions(),"color","pairing"),e=La.getProperty(t,"numberOfVariants");(!e||e<this.allDataGroups.length)&&(e=this.allDataGroups.length);var n=La.getProperty(t,"option"),r=e>5?14:e;n=n<=to.pairingOptions[r+"-color"]?n:1;var i=this.allDataGroups.map((function(t,e){return r+"-"+n+"-"+(e%14+1)}));this.isUserProvidedColorScaleValid()||(this.colorClassNames=rs().range(i).domain(this.allDataGroups))},t}(),af=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}(),of={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 "},sf=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}()}(),uf="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,lf="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),cf="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(lf):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)},hf=["top","right","bottom","left","width","height","size","weight"],ff="undefined"!=typeof MutationObserver,df=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 a(){n&&(n=!1,t()),r&&s()}function o(){cf(a)}function s(){var t=Date.now();if(n){if(t-i<2)return;r=!0}else n=!0,r=!1,setTimeout(o,e);i=t}return s}(this.refresh.bind(this),20)};df.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},df.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},df.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},df.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},df.prototype.connect_=function(){uf&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),ff?(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)},df.prototype.disconnect_=function(){uf&&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)},df.prototype.onTransitionEnd_=function(t){var e=t.propertyName;void 0===e&&(e=""),hf.some((function(t){return!!~e.indexOf(t)}))&&this.refresh()},df.getInstance=function(){return this.instance_||(this.instance_=new df),this.instance_},df.instance_=null;var pf=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},gf=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||lf},vf=wf(0,0,0,0);function mf(t){return parseFloat(t)||0}function yf(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];return e.reduce((function(e,n){return e+mf(t["border-"+n+"-width"])}),0)}function _f(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return vf;var r=gf(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],a=t["padding-"+i];e[i]=mf(a)}return e}(r),a=i.left+i.right,o=i.top+i.bottom,s=mf(r.width),u=mf(r.height);if("border-box"===r.boxSizing&&(Math.round(s+a)!==e&&(s-=yf(r,"left","right")+a),Math.round(u+o)!==n&&(u-=yf(r,"top","bottom")+o)),!function(t){return t===gf(t).document.documentElement}(t)){var l=Math.round(s+a)-e,c=Math.round(u+o)-n;1!==Math.abs(l)&&(s-=l),1!==Math.abs(c)&&(u-=c)}return wf(i.left,i.top,s,u)}var bf="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof gf(t).SVGGraphicsElement}:function(t){return t instanceof gf(t).SVGElement&&"function"==typeof t.getBBox};function xf(t){return uf?bf(t)?function(t){var e=t.getBBox();return wf(0,0,e.width,e.height)}(t):_f(t):vf}function wf(t,e,n,r){return{x:t,y:e,width:n,height:r}}var Of=function(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=wf(0,0,0,0),this.target=t};Of.prototype.isActive=function(){var t=xf(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},Of.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t};var Ef=function(t,e){var n=function(t){var e=t.x,n=t.y,r=t.width,i=t.height,a="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,o=Object.create(a.prototype);return pf(o,{x:e,y:n,width:r,height:i,top:n,right:e+r,bottom:i+n,left:e}),o}(e);pf(this,{target:t,contentRect:n})},Sf=function(t,e,n){if(this.activeObservations_=[],this.observations_=new sf,"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};Sf.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 gf(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new Of(t)),this.controller_.addObserver(this),this.controller_.refresh())}},Sf.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 gf(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))}},Sf.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},Sf.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},Sf.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new Ef(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},Sf.prototype.clearActive=function(){this.activeObservations_.splice(0)},Sf.prototype.hasActive=function(){return this.activeObservations_.length>0};var Tf="undefined"!=typeof WeakMap?new WeakMap:new sf,Mf=function(t){if(!(this instanceof Mf))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=df.getInstance(),n=new Sf(t,e,this);Tf.set(this,n)};["observe","unobserve","disconnect"].forEach((function(t){Mf.prototype[t]=function(){return(e=Tf.get(this))[t].apply(e,arguments);var e}}));var Af=void 0!==lf.ResizeObserver?lf.ResizeObserver:Mf,Cf=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.getSVGElementSize=function(t,e){t.attr||(t=Ga(t));var n,r,i,a,o={width:0,height:0},s=function(t){t&&Object.keys(o).forEach((function(e){if(t[e]){var n=t[e],r=parseFloat(n);n&&r>o[e]&&-1===(""+n).indexOf("%")&&(o[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{a={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),o.width>0&&o.height>0))return o;if(e.useClientDimensions&&(s(l),o.width>0&&o.height>0))return l;if(e.useBBox&&(s(r),o.width>0&&o.height>0))return r;if(e.useBoundingRect&&(s(a),o.width>0&&o.height>0))return a}try{s({width:La.getProperty(t.node(),"width","baseVal","value"),height:La.getProperty(t.node(),"height","baseVal","value")})}catch(t){s(l),s(r),s(u)}return o},e.appendOrSelect=function(t,e){var n=t.select(""+e);if(n.empty()){var r=e.split("#"),i=void 0,a=void 0;return 2===r.length?(i=r[0],a=(r=r[1].split("."))[0]):i=(r=e.split("."))[0],t.append(i).attr("id",a).attr("class",r.slice(1).join(" "))}return n},e.getAlignmentOffset=function(t,n,r){var i=e.getSVGElementSize(n,{useBBox:!0}),a=e.getSVGElementSize(r,{useAttr:!0}).width,o=0;return t===P.CENTER?o=Math.floor((a-i.width)/2):t===P.RIGHT&&(o=a-i.width),o},e.prototype.init=function(){this.styleHolderElement(),this.addSVGElement(),this.verifyCSSStylesBeingApplied(),this.model.getOptions().resizable&&this.addResizeListener(),this.addHolderListeners()},e.prototype.update=function(){this.styleHolderElement()},e.prototype.styleHolderElement=function(){var t=this.getHolder();Ga(this.getHolder()).classed(of.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=this.model.getOptions(),e=La.getProperty(t,"style","prefix"),n=Ga(this.getHolder()).append("svg").classed(of.prefix+"--"+e+"--chart-svg",!0).attr("height","100%").attr("width","100%");n.append("g").attr("class","DONT_STYLE_ME_css_styles_verifier"),this.svg=n.node()},e.prototype.verifyCSSStylesBeingApplied=function(){var t=this;setTimeout((function(){var e=Ga(t.svg).select("g.DONT_STYLE_ME_css_styles_verifier").node(),n=getComputedStyle(e);"hidden"===n.getPropertyValue("overflow")&&"0"===n.getPropertyValue("opacity")||console.error("Missing CSS styles for Carbon Charts. Please read the Carbon Charts getting started guide.")}))},e.prototype.setSVGMaxHeight=function(){if(!this.model.getOptions().height){var t=e.getSVGElementSize(Ga(this.svg),{useBBox:!0}).height,n=Ga(this.svg).attr("class"),r=Ga(this.svg).selectAll("."+n+" > svg"),i=0;r.nodes().forEach((function(t){i+=Number(e.getSVGElementSize(Ga(t),{useBBox:!0}).height)})),i<=t?Ga(this.svg).attr("height",i):Ga(this.svg).attr("height","100%")}},e.prototype.getMainSVG=function(){return this.svg},e.prototype.addHolderListeners=function(){var t=this,e=this.getHolder();e&&Ga(e).on("mouseover",(function(){t.services.events.dispatchEvent(W.Chart.MOUSEOVER)})).on("mouseout",(function(){t.services.events.dispatchEvent(W.Chart.MOUSEOUT)}))},e.prototype.addResizeListener=function(){var t=this,e=this.getHolder();if(e){var n=e.clientWidth,r=e.clientHeight,i=La.debounce((function(i,a){e&&(Math.abs(n-e.clientWidth)>1||Math.abs(r-e.clientHeight)>1)&&(n=e.clientWidth,r=e.clientHeight,t.services.events.dispatchEvent(W.Chart.RESIZE))}),12.5);new Af(i).observe(e)}},e}(af),Df=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}(af),Pf={value:function(){}};function kf(){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 Lf(r)}function Lf(t){this._=t}function Rf(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 If(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function Nf(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Pf,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}Lf.prototype=kf.prototype={constructor:Lf,on:function(t,e){var n,r=this._,i=Rf(t+"",r),a=-1,o=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<o;)if(n=(t=i[a]).type)r[n]=Nf(r[n],t.name,e);else if(null==e)for(n in r)r[n]=Nf(r[n],t.name,null);return this}for(;++a<o;)if((n=(t=i[a]).type)&&(n=If(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Lf(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].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,a=r.length;i<a;++i)r[i].value.apply(e,n)}};var Gf,Bf,Vf=0,Uf=0,zf=0,Hf=0,Ff=0,jf=0,Wf="object"==typeof performance&&performance.now?performance:Date,Yf="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Xf(){return Ff||(Yf(qf),Ff=Wf.now()+jf)}function qf(){Ff=0}function Zf(){this._call=this._time=this._next=null}function Kf(t,e,n){var r=new Zf;return r.restart(t,e,n),r}function $f(){Ff=(Hf=Wf.now())+jf,Vf=Uf=0;try{!function(){Xf(),++Vf;for(var t,e=Gf;e;)(t=Ff-e._time)>=0&&e._call.call(null,t),e=e._next;--Vf}()}finally{Vf=0,function(){var t,e,n=Gf,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:Gf=e);Bf=t,Jf(r)}(),Ff=0}}function Qf(){var t=Wf.now(),e=t-Hf;e>1e3&&(jf-=e,Hf=t)}function Jf(t){Vf||(Uf&&(Uf=clearTimeout(Uf)),t-Ff>24?(t<1/0&&(Uf=setTimeout($f,t-Wf.now()-jf)),zf&&(zf=clearInterval(zf))):(zf||(Hf=Wf.now(),zf=setInterval(Qf,1e3)),Vf=1,Yf($f)))}function td(t,e,n){var r=new Zf;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}Zf.prototype=Kf.prototype={constructor:Zf,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Xf():+n)+(null==e?0:+e),this._next||Bf===this||(Bf?Bf._next=this:Gf=this,Bf=this),this._call=t,this._time=n,Jf()},stop:function(){this._call&&(this._call=null,this._time=1/0,Jf())}};var ed=kf("start","end","cancel","interrupt"),nd=[];function rd(t,e,n,r,i,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function a(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 td(a);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(td((function(){3===n.state&&(n.state=4,n.timer.restart(o,n.delay,n.time),o(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 o(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(s),n.state=5,1),a=-1,o=r.length;++a<o;)r[a].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=Kf((function(t){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=t&&a(t-n.delay)}),0,n.time)}(t,n,{name:e,index:r,group:i,on:ed,tween:nd,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function id(t,e){var n=od(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function ad(t,e){var n=od(t,e);if(n.state>3)throw new Error("too late; already running");return n}function od(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function sd(t,e){var n,r,i,a=t.__transition,o=!0;if(a){for(i in e=null==e?null:e+"",a)(n=a[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 a[i]):o=!1;o&&delete t.__transition}}function ud(t,e){var n,r;return function(){var i=ad(this,t),a=i.tween;if(a!==n)for(var o=0,s=(r=n=a).length;o<s;++o)if(r[o].name===e){(r=r.slice()).splice(o,1);break}i.tween=r}}function ld(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var a=ad(this,t),o=a.tween;if(o!==r){i=(r=o).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)}a.tween=i}}function cd(t,e,n){var r=t._id;return t.each((function(){var t=ad(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return od(t,r).value[e]}}function hd(t,e){var n;return("number"==typeof e?Hs:e instanceof xs?Bs:(n=xs(e))?(e=n,Bs):Ys)(t,e)}function fd(t){return function(){this.removeAttribute(t)}}function dd(t){return function(){this.removeAttributeNS(t.space,t.local)}}function pd(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttribute(t);return o===a?null:o===r?i:i=e(r=o,n)}}function gd(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttributeNS(t.space,t.local);return o===a?null:o===r?i:i=e(r=o,n)}}function vd(t,e,n){var r,i,a;return function(){var o,s,u=n(this);if(null!=u)return(o=this.getAttribute(t))===(s=u+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,u));this.removeAttribute(t)}}function md(t,e,n){var r,i,a;return function(){var o,s,u=n(this);if(null!=u)return(o=this.getAttributeNS(t.space,t.local))===(s=u+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,u));this.removeAttributeNS(t.space,t.local)}}function yd(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function _d(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function bd(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&_d(t,i)),n}return i._value=e,i}function xd(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&yd(t,i)),n}return i._value=e,i}function wd(t,e){return function(){id(this,t).delay=+e.apply(this,arguments)}}function Od(t,e){return e=+e,function(){id(this,t).delay=e}}function Ed(t,e){return function(){ad(this,t).duration=+e.apply(this,arguments)}}function Sd(t,e){return e=+e,function(){ad(this,t).duration=e}}function Td(t,e){if("function"!=typeof e)throw new Error;return function(){ad(this,t).ease=e}}function Md(t,e,n){var r,i,a=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)?id:ad;return function(){var o=a(this,t),s=o.on;s!==r&&(i=(r=s).copy()).on(e,n),o.on=i}}var Ad=Na.prototype.constructor;function Cd(t){return function(){this.style.removeProperty(t)}}function Dd(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function Pd(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&Dd(t,a,n)),r}return a._value=e,a}function kd(t){return function(e){this.textContent=t.call(this,e)}}function Ld(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&kd(r)),e}return r._value=t,r}var Rd=0;function Id(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Nd(t){return Na().transition(t)}function Gd(){return++Rd}var Bd=Na.prototype;function Vd(t){return+t}Id.prototype=Nd.prototype={constructor:Id,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Ri(t));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var s,u,l=r[o],c=l.length,h=a[o]=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,rd(h[f],e,n,f,h,od(s,n)));return new Id(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Ni(t));for(var r=this._groups,i=r.length,a=[],o=[],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=od(u,n),g=0,v=d.length;g<v;++g)(f=d[g])&&rd(f,e,n,g,d,p);a.push(d),o.push(u)}return new Id(a,o,e,n)},filter:function(t){"function"!=typeof t&&(t=Gi(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,u=r[i]=[],l=0;l<s;++l)(a=o[l])&&t.call(a,a.__data__,l,o)&&u.push(a);return new Id(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,a=Math.min(r,i),o=new Array(r),s=0;s<a;++s)for(var u,l=e[s],c=n[s],h=l.length,f=o[s]=new Array(h),d=0;d<h;++d)(u=l[d]||c[d])&&(f[d]=u);for(;s<r;++s)o[s]=e[s];return new Id(o,this._parents,this._name,this._id)},selection:function(){return new Ad(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Gd(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],u=s.length,l=0;l<u;++l)if(o=s[l]){var c=od(o,e);rd(o,t,n,l,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Id(r,this._parents,t,n)},call:Bd.call,nodes:Bd.nodes,node:Bd.node,size:Bd.size,empty:Bd.empty,each:Bd.each,on:function(t,e){var n=this._id;return arguments.length<2?od(this.node(),n).on.on(t):this.each(Md(n,t,e))},attr:function(t,e){var n=Ci(t),r="transform"===n?iu:hd;return this.attrTween(t,"function"==typeof e?(n.local?md:vd)(n,r,cd(this,"attr."+t,e)):null==e?(n.local?dd:fd)(n):(n.local?gd:pd)(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=Ci(t);return this.tween(n,(r.local?bd:xd)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?ru:hd;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var a=Ji(this,t),o=(this.style.removeProperty(t),Ji(this,t));return a===o?null:a===n&&o===r?i:i=e(n=a,r=o)}}(t,r)).on("end.style."+t,Cd(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,a;return function(){var o=Ji(this,t),s=n(this),u=s+"";return null==s&&(this.style.removeProperty(t),u=s=Ji(this,t)),o===u?null:o===r&&u===i?a:(i=u,a=e(r=o,s))}}(t,r,cd(this,"style."+t,e))).each(function(t,e){var n,r,i,a,o="style."+e,s="end."+o;return function(){var u=ad(this,t),l=u.on,c=null==u.value[o]?a||(a=Cd(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,a=n+"";return function(){var o=Ji(this,t);return o===a?null:o===r?i:i=e(r=o,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,Pd(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}}(cd(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,Ld(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=od(this.node(),n).tween,a=0,o=i.length;a<o;++a)if((r=i[a]).name===t)return r.value;return null}return this.each((null==e?ud:ld)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?wd:Od)(e,t)):od(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Ed:Sd)(e,t)):od(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(Td(e,t)):od(this.node(),e).ease},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(a,o){var s={value:o},u={value:function(){0==--i&&a()}};n.each((function(){var n=ad(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 Ud={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function zd(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return Ud.time=Xf(),Ud;return n}Na.prototype.interrupt=function(t){return this.each((function(){sd(this,t)}))},Na.prototype.transition=function(t){var e,n;t instanceof Id?(e=t._id,t=t._name):(e=Gd(),(n=Ud).time=Xf(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],u=s.length,l=0;l<u;++l)(o=s[l])&&rd(o,t,e,l,s,n||zd(o,e));return new Id(r,this._parents,t,e)};var Hd=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(W.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=Nd(t).duration(La.getProperty(co,t,"duration")||co.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=Nd(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}(af),Fd=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.appendOrUpdateLinearGradient=function(t){var e=t.svg.select("defs linearGradient#"+t.id);e.empty()&&(e=t.svg.append("defs").append("linearGradient").attr("id",t.id).attr("x1",t.x1).attr("x2",t.x2).attr("y1",t.y1).attr("y2",t.y2)),e.selectAll("stop").data(t.stops).enter().append("stop").attr("offset",(function(t){return t.offset})).style("stop-color",(function(t){return t.color})).style("stop-opacity",(function(t){return t.opacity}))},e.getOffsetRatio=function(t){return(100*Math.abs(t[1])/Math.abs(t[0]-t[1])).toFixed(2)+"%"},e.getStops=function(t,n){var r=[{offset:"0%",color:n,opacity:"0.6"},{offset:"80%",color:n,opacity:"0"}];return t[0]<0&&t[1]>0&&(r=[{offset:"0%",color:n,opacity:"0.6"},{offset:e.getOffsetRatio(t),color:n,opacity:"0"},{offset:"100%",color:n,opacity:"0.6"}]),r},e}(af);function jd(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 Wd(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 Yd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=jd(t),r=Wd(e);return n.setDate(n.getDate()+r),n}function Xd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=jd(t).getTime(),r=Wd(e);return new Date(n+r)}function qd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Wd(e);return Xd(t,36e5*n)}function Zd(t){var e=new Date(t.getTime()),n=Math.ceil(e.getTimezoneOffset());return e.setSeconds(0,0),6e4*n+e.getTime()%6e4}function Kd(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=jd(t);return e.setHours(0,0,0,0),e}function $d(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Kd(t),r=Kd(e),i=n.getTime()-Zd(n),a=r.getTime()-Zd(r);return Math.round((i-a)/864e5)}function Qd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Wd(e);return Xd(t,6e4*n)}function Jd(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=jd(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 tp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=jd(t),r=Wd(e),i=n.getMonth()+r,a=new Date(0);a.setFullYear(n.getFullYear(),i,1),a.setHours(0,0,0,0);var o=Jd(a);return n.setMonth(i,Math.min(o,n.getDate())),n}function ep(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Wd(e);return Xd(t,1e3*n)}function np(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Wd(e);return tp(t,12*n)}function rp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=jd(t),r=jd(e),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}function ip(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=jd(t);return!isNaN(e)}function ap(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=jd(t),r=jd(e),i=n.getFullYear()-r.getFullYear(),a=n.getMonth()-r.getMonth();return 12*i+a}function op(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=jd(t),r=jd(e);return n.getFullYear()-r.getFullYear()}function sp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=jd(t),r=jd(e);return n.getTime()-r.getTime()}function up(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=sp(t,e)/6e4;return n>0?Math.floor(n):Math.ceil(n)}function lp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=sp(t,e)/1e3;return n>0?Math.floor(n):Math.ceil(n)}var cp={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 hp(t){return function(e){var n=e||{},r=n.width?String(n.width):t.defaultWidth;return t.formats[r]||t.formats[t.defaultWidth]}}var fp={date:hp({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:hp({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:hp({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},dp={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function pp(t){return function(e,n){var r,i=n||{};if("formatting"===(i.context?String(i.context):"standalone")&&t.formattingValues){var a=t.defaultFormattingWidth||t.defaultWidth,o=i.width?String(i.width):a;r=t.formattingValues[o]||t.formattingValues[a]}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 gp(t){return function(e,n){var r=String(e),i=n||{},a=i.width,o=a&&t.matchPatterns[a]||t.matchPatterns[t.defaultMatchWidth],s=r.match(o);if(!s)return null;var u,l=s[0],c=a&&t.parsePatterns[a]||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 vp,mp={code:"en-US",formatDistance:function(t,e,n){var r;return n=n||{},r="string"==typeof cp[t]?cp[t]:1===e?cp[t].one:cp[t].other.replace("{{count}}",e),n.addSuffix?n.comparison>0?"in "+r:r+" ago":r},formatLong:fp,formatRelative:function(t,e,n,r){return dp[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:pp({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:pp({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:pp({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:pp({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:pp({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:(vp={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(vp.matchPattern);if(!i)return null;var a=i[0],o=n.match(vp.parsePattern);if(!o)return null;var s=vp.valueCallback?vp.valueCallback(o[0]):o[0];return{value:s=r.valueCallback?r.valueCallback(s):s,rest:n.slice(a.length)}}),era:gp({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:gp({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:gp({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:gp({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:gp({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 yp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Wd(e);return Xd(t,-n)}function _p(t,e){for(var n=t<0?"-":"",r=Math.abs(t).toString();r.length<e;)r="0"+r;return n+r}var bp=function(t,e){var n=t.getUTCFullYear(),r=n>0?n:1-n;return _p("yy"===e?r%100:r,e.length)},xp=function(t,e){var n=t.getUTCMonth();return"M"===e?String(n+1):_p(n+1,2)},wp=function(t,e){return _p(t.getUTCDate(),e.length)},Op=function(t,e){return _p(t.getUTCHours()%12||12,e.length)},Ep=function(t,e){return _p(t.getUTCHours(),e.length)},Sp=function(t,e){return _p(t.getUTCMinutes(),e.length)},Tp=function(t,e){return _p(t.getUTCSeconds(),e.length)},Mp=function(t,e){var n=e.length,r=t.getUTCMilliseconds();return _p(Math.floor(r*Math.pow(10,n-3)),e.length)};function Ap(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=1,n=jd(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 Cp(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=jd(t),n=e.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var i=Ap(r),a=new Date(0);a.setUTCFullYear(n,0,4),a.setUTCHours(0,0,0,0);var o=Ap(a);return e.getTime()>=i.getTime()?n+1:e.getTime()>=o.getTime()?n:n-1}function Dp(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Cp(t),n=new Date(0);n.setUTCFullYear(e,0,4),n.setUTCHours(0,0,0,0);var r=Ap(n);return r}function Pp(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,a=null==i?0:Wd(i),o=null==n.weekStartsOn?a:Wd(n.weekStartsOn);if(!(o>=0&&o<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=jd(t),u=s.getUTCDay(),l=(u<o?7:0)+u-o;return s.setUTCDate(s.getUTCDate()-l),s.setUTCHours(0,0,0,0),s}function kp(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=jd(t,e),r=n.getUTCFullYear(),i=e||{},a=i.locale,o=a&&a.options&&a.options.firstWeekContainsDate,s=null==o?1:Wd(o),u=null==i.firstWeekContainsDate?s:Wd(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=Pp(l,e),h=new Date(0);h.setUTCFullYear(r,0,u),h.setUTCHours(0,0,0,0);var f=Pp(h,e);return n.getTime()>=c.getTime()?r+1:n.getTime()>=f.getTime()?r:r-1}function Lp(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,a=null==i?1:Wd(i),o=null==n.firstWeekContainsDate?a:Wd(n.firstWeekContainsDate),s=kp(t,e),u=new Date(0);u.setUTCFullYear(s,0,o),u.setUTCHours(0,0,0,0);var l=Pp(u,e);return l}var Rp="midnight",Ip="noon",Np="morning",Gp="afternoon",Bp="evening",Vp="night",Up={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 bp(t,e)},Y:function(t,e,n,r){var i=kp(t,r),a=i>0?i:1-i;return"YY"===e?_p(a%100,2):"Yo"===e?n.ordinalNumber(a,{unit:"year"}):_p(a,e.length)},R:function(t,e){return _p(Cp(t),e.length)},u:function(t,e){return _p(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 _p(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 _p(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 xp(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 _p(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=jd(t),r=Pp(n,e).getTime()-Lp(n,e).getTime();return Math.round(r/6048e5)+1}(t,r);return"wo"===e?n.ordinalNumber(i,{unit:"week"}):_p(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=jd(t),n=Ap(e).getTime()-Dp(e).getTime();return Math.round(n/6048e5)+1}(t);return"Io"===e?n.ordinalNumber(r,{unit:"week"}):_p(r,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):wp(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=jd(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"}):_p(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(),a=(i-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(a);case"ee":return _p(a,2);case"eo":return n.ordinalNumber(a,{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(),a=(i-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(a);case"cc":return _p(a,e.length);case"co":return n.ordinalNumber(a,{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 _p(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?Ip:0===i?Rp: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?Bp:i>=12?Gp:i>=4?Np:Vp,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 Op(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):Ep(t,e)},K:function(t,e,n){var r=t.getUTCHours()%12;return"Ko"===e?n.ordinalNumber(r,{unit:"hour"}):_p(r,e.length)},k:function(t,e,n){var r=t.getUTCHours();return 0===r&&(r=24),"ko"===e?n.ordinalNumber(r,{unit:"hour"}):_p(r,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):Sp(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):Tp(t,e)},S:function(t,e){return Mp(t,e)},X:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();if(0===i)return"Z";switch(e){case"X":return Hp(i);case"XXXX":case"XX":return Fp(i);case"XXXXX":case"XXX":default:return Fp(i,":")}},x:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"x":return Hp(i);case"xxxx":case"xx":return Fp(i);case"xxxxx":case"xxx":default:return Fp(i,":")}},O:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+zp(i,":");case"OOOO":default:return"GMT"+Fp(i,":")}},z:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+zp(i,":");case"zzzz":default:return"GMT"+Fp(i,":")}},t:function(t,e,n,r){var i=r._originalDate||t;return _p(Math.floor(i.getTime()/1e3),e.length)},T:function(t,e,n,r){return _p((r._originalDate||t).getTime(),e.length)}};function zp(t,e){var n=t>0?"-":"+",r=Math.abs(t),i=Math.floor(r/60),a=r%60;if(0===a)return n+String(i);var o=e||"";return n+String(i)+o+_p(a,2)}function Hp(t,e){return t%60==0?(t>0?"-":"+")+_p(Math.abs(t)/60,2):Fp(t,e)}function Fp(t,e){var n=e||"",r=t>0?"-":"+",i=Math.abs(t);return r+_p(Math.floor(i/60),2)+n+_p(i%60,2)}function jp(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 Wp(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 Yp={p:Wp,P:function(t,e){var n,r=t.match(/(P+)(p+)?/),i=r[1],a=r[2];if(!a)return jp(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}}",jp(i,e)).replace("{{time}}",Wp(a,e))}},Xp=["D","DD"],qp=["YY","YYYY"];function Zp(t){return-1!==Xp.indexOf(t)}function Kp(t){return-1!==qp.indexOf(t)}function $p(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 Qp=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Jp=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,tg=/^'([^]*?)'?$/,eg=/''/g,ng=/[a-zA-Z]/;function rg(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=String(e),i=n||{},a=i.locale||mp,o=a.options&&a.options.firstWeekContainsDate,s=null==o?1:Wd(o),u=null==i.firstWeekContainsDate?s:Wd(i.firstWeekContainsDate);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var l=a.options&&a.options.weekStartsOn,c=null==l?0:Wd(l),h=null==i.weekStartsOn?c:Wd(i.weekStartsOn);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!a.localize)throw new RangeError("locale must contain localize property");if(!a.formatLong)throw new RangeError("locale must contain formatLong property");var f=jd(t);if(!ip(f))throw new RangeError("Invalid time value");var d=Zd(f),p=yp(f,d),g={firstWeekContainsDate:u,weekStartsOn:h,locale:a,_originalDate:f},v=r.match(Jp).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,Yp[e])(t,a.formatLong,g):t})).join("").match(Qp).map((function(t){if("''"===t)return"'";var e=t[0];if("'"===e)return ig(t);var n=Up[e];if(n)return!i.useAdditionalWeekYearTokens&&Kp(t)&&$p(t),!i.useAdditionalDayOfYearTokens&&Zp(t)&&$p(t),n(p,t,a.localize,g);if(e.match(ng))throw new RangeError("Format string contains an unescaped latin alphabet character `"+e+"`");return t})).join("");return v}function ig(t){return t.match(tg)[1].replace(eg,"'")}function ag(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Wd(e);return Yd(t,-n)}function og(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Wd(e);return qd(t,-n)}function sg(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Wd(e);return Qd(t,-n)}function ug(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Wd(e);return tp(t,-n)}function lg(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Wd(e);return ep(t,-n)}function cg(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Wd(e);return np(t,-n)}var hg=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(t){var e,n=(void 0===t?{}:t).datum,r=void 0===n?null:n;if(this.dualAxes&&r){var i=this.model.getOptions(),a=i.data.groupMapsTo,o=La.getProperty(i,"axes",this.secondaryDomainAxisPosition),s=r[a];if((null===(e=o)||void 0===e?void 0:e.correspondingDatasets)&&o.correspondingDatasets.includes(s))return this.secondaryDomainAxisPosition}return this.domainAxisPosition},e.prototype.getRangeAxisPosition=function(t){var e,n=void 0===t?{}:t,r=n.datum,i=void 0===r?null:r,a=n.groups,o=void 0===a?null:a;if(this.dualAxes){var s=this.model.getOptions(),u=s.data.groupMapsTo,l=La.getProperty(s,"axes",this.secondaryRangeAxisPosition),c=void 0;if(null!==i?c=i[u]:o&&o.length>0&&(c=o[0]),(null===(e=l)||void 0===e?void 0:e.correspondingDatasets)&&l.correspondingDatasets.includes(c))return this.secondaryRangeAxisPosition}return this.rangeAxisPosition},e.prototype.getAxisOptions=function(t){return La.getProperty(this.model.getOptions(),"axes",t)},e.prototype.getDomainAxisOptions=function(){var t=this.getDomainAxisPosition();return this.getAxisOptions(t)},e.prototype.getRangeAxisOptions=function(){var t=this.getRangeAxisPosition();return this.getAxisOptions(t)},e.prototype.update=function(t){var e=this;this.determineAxisDuality(),this.findDomainAndRangeAxes(),this.determineOrientation(),Object.keys(S).map((function(t){return S[t]})).forEach((function(t){e.scales[t]=e.createScale(t)}))},e.prototype.findDomainAndRangeAxes=function(){var t=this.findVerticalAxesPositions(),e=this.findHorizontalAxesPositions(),n=this.findDomainAndRangeAxesPositions(t,e);this.domainAxisPosition=n.primaryDomainAxisPosition,this.rangeAxisPosition=n.primaryRangeAxisPosition,this.isDualAxes()&&(this.secondaryDomainAxisPosition=n.secondaryDomainAxisPosition,this.secondaryRangeAxisPosition=n.secondaryRangeAxisPosition)},e.prototype.determineOrientation=function(){this.rangeAxisPosition!==S.LEFT&&this.rangeAxisPosition!==S.RIGHT||this.domainAxisPosition!==S.BOTTOM&&this.domainAxisPosition!==S.TOP?this.orientation=A.HORIZONTAL:this.orientation=A.VERTICAL},e.prototype.isDualAxes=function(){return this.dualAxes},e.prototype.determineAxisDuality=function(){var t,e,n,r,i=this.model.getOptions(),a=La.getProperty(i,"axes");((null===(t=a[S.LEFT])||void 0===t?void 0:t.correspondingDatasets)&&a[S.RIGHT]||(null===(e=a[S.RIGHT])||void 0===e?void 0:e.correspondingDatasets)&&a[S.LEFT]||(null===(n=a[S.TOP])||void 0===n?void 0:n.correspondingDatasets)&&a[S.BOTTOM]||(null===(r=a[S.BOTTOM])||void 0===r?void 0:r.correspondingDatasets)&&a[S.TOP])&&(this.dualAxes=!0)},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.getDomainAxisScaleType=function(){var t=this.getDomainAxisPosition();return this.getScaleTypeByPosition(t)},e.prototype.getRangeAxisScaleType=function(){var t=this.getRangeAxisPosition();return this.getScaleTypeByPosition(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=[S.BOTTOM,S.TOP];return[this.domainAxisPosition,this.rangeAxisPosition].find((function(e){return t.indexOf(e)>-1}))},e.prototype.getMainYAxisPosition=function(){var t=[S.LEFT,S.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,r,i){var a,o=this.model.getOptions(),s=La.getProperty(o,"axes")[n].mapsTo,u=void 0!==r[s]?r[s]:r;switch(e){case C.LABELS:a=t(u)+t.step()/2;break;case C.TIME:a=t(new Date(u));break;default:a=t(u)}return a},e.prototype.getValueThroughAxisPosition=function(t,e,n){var r=this.scaleTypes[t],i=this.scales[t];return this.getValueFromScale(i,r,t,e,n)},e.prototype.getDomainValue=function(t,e){var n=this.getDomainAxisPosition({datum:t});return this.getValueThroughAxisPosition(n,t,e)},e.prototype.getRangeValue=function(t,e){var n=this.getRangeAxisPosition({datum:t});return this.getValueThroughAxisPosition(n,t,e)},e.prototype.getMainXScaleType=function(){return this.getScaleTypeByPosition(this.getMainXAxisPosition())},e.prototype.getMainYScaleType=function(){return this.getScaleTypeByPosition(this.getMainYAxisPosition())},e.prototype.getDomainIdentifier=function(t){var e=this.model.getOptions();return La.getProperty(e,"axes",this.getDomainAxisPosition({datum:t}),"mapsTo")},e.prototype.getRangeIdentifier=function(t){var e=this.model.getOptions();return La.getProperty(e,"axes",this.getRangeAxisPosition({datum:t}),"mapsTo")},e.prototype.extendsDomain=function(t,e){var n=this.model.getOptions();return La.getProperty(n,"axes",t).scaleType===C.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=jd(t),r=jd(e),i=rp(n,r),a=Math.abs(op(n,r));n.setFullYear(n.getFullYear()-i*a);var o=rp(n,r)===-i,s=i*(a-o);return 0===s?0:s}(r,n)>1)return[cg(n,e),np(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=jd(t),r=jd(e),i=rp(n,r),a=Math.abs(ap(n,r));n.setMonth(n.getMonth()-i*a);var o=rp(n,r)===-i,s=i*(a-o);return 0===s?0:s}(r,n)>1)return[ug(n,e),tp(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=jd(t),r=jd(e),i=rp(n,r),a=Math.abs($d(n,r));n.setDate(n.getDate()-i*a);var o=rp(n,r)===-i,s=i*(a-o);return 0===s?0:s}(r,n)>1)return[ag(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=sp(t,e)/36e5;return n>0?Math.floor(n):Math.ceil(n)}(r,n)>1)return[og(n,e),qd(r,e)];if(up(r,n)>30)return[sg(n,30*e),Qd(r,30*e)];if(up(r,n)>1)return[sg(n,e),Qd(r,e)];if(lp(r,n)>15)return[lg(n,15*e),ep(r,15*e)];if(lp(r,n)>1)return[lg(n,e),ep(r,e)];return[n,r]}(e,La.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,no.paddingRatio)},e.prototype.findVerticalAxesPositions=function(){var t=this.model.getOptions(),e=La.getProperty(t,"axes"),n=this.isDualAxes();return null===La.getProperty(e,S.LEFT)&&null!==La.getProperty(e,S.RIGHT)||!0===La.getProperty(e,S.RIGHT,"main")||n&&La.getProperty(e,S.LEFT,"correspondingDatasets")?{primary:S.RIGHT,secondary:S.LEFT}:{primary:S.LEFT,secondary:S.RIGHT}},e.prototype.findHorizontalAxesPositions=function(){var t=this.model.getOptions(),e=La.getProperty(t,"axes"),n=this.isDualAxes();return null===La.getProperty(e,S.BOTTOM)&&null!==La.getProperty(e,S.TOP)||!0===La.getProperty(e,S.TOP,"main")||n&&La.getProperty(e,S.BOTTOM,"correspondingDatasets")?{primary:S.TOP,secondary:S.BOTTOM}:{primary:S.BOTTOM,secondary:S.TOP}},e.prototype.findDomainAndRangeAxesPositions=function(t,e){var n=this.model.getOptions(),r=La.getProperty(n,"axes",t.primary),i=La.getProperty(n,"axes",e.primary),a=r.scaleType||C.LINEAR,o=i.scaleType||C.LINEAR,s={primaryDomainAxisPosition:null,secondaryDomainAxisPosition:null,primaryRangeAxisPosition:null,secondaryRangeAxisPosition:null};return s.primaryDomainAxisPosition=e.primary,s.primaryRangeAxisPosition=t.primary,s.secondaryDomainAxisPosition=e.secondary,s.secondaryRangeAxisPosition=t.secondary,(o!==C.LABELS&&o!==C.TIME&&a===C.LABELS||a===C.TIME)&&(s.primaryDomainAxisPosition=t.primary,s.primaryRangeAxisPosition=e.primary,s.secondaryDomainAxisPosition=t.secondary,s.secondaryRangeAxisPosition=e.secondary),s},e.prototype.getScaleDomain=function(t){var e=this.model.getOptions(),n=La.getProperty(e,"axes",t),r=n.includeZero,i=La.getProperty(n,"scaleType")||C.LINEAR;if(this.model.isDataEmpty())return[];var a,o,s=this.model.getDisplayData(),u=n.mapsTo,l=n.percentage;if(n.domain)return i===C.LABELS?n.domain:(i===C.TIME&&(n.domain=n.domain.map((function(t){return void 0===t.getTime?new Date(t):t}))),this.extendsDomain(t,n.domain));if(l)return[0,100];if(n&&i===C.LABELS)return No(s,(function(t){return t[u]})).keys();var c=this.model.getStackedGroups();if(i===C.TIME)o=s.map((function(t){return+new Date(t[u])}));else if(c&&t===this.getRangeAxisPosition()){var h=e.data.groupMapsTo,f=this.model.getDataValuesGroupedByKeys(c),d=s.filter((function(t){return!c.includes(t[h])}));o=w(f.map((function(t){t.sharedStackKey;return $o(function(t){var e=[];for(var n in t)e.push(t[n]);return e}(function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}(t,["sharedStackKey"])))})),d.map((function(t){return t[u]})))}else o=s.map((function(t){return t[u]}));return i!==C.TIME&&r&&o.push(0),a=Ho(o),a=this.extendsDomain(t,a)},e.prototype.createScale=function(t){var e=this.model.getOptions(),n=La.getProperty(e,"axes",t);if(!n)return null;var r,i=La.getProperty(n,"scaleType")||C.LINEAR;return this.scaleTypes[t]=i,(r=i===C.TIME?Tc():i===C.LOG?function t(){var e=Uu(du()).domain([1,10]);return e.copy=function(){return fu(e,t()).base(e.base())},Qo.apply(e,arguments),e}().base(n.base||10):i===C.LABELS?is():ku()).domain(this.getScaleDomain(t)),r},e.prototype.getHighestDomainThreshold=function(){var t=La.getProperty(this.model.getOptions(),"axes"),e=this.getDomainAxisPosition(),n=t[e].thresholds;if(!n)return null;var r=this.getDomainScale(),i=n.sort((function(t,e){return e.value-t.value}))[0];return this.getScaleTypeByPosition(e)!==C.TIME||"string"!=typeof i.value&&void 0!==i.value.getTime||(i.value=new Date(i.value)),{threshold:i,scaleValue:r(i.value)}},e.prototype.getHighestRangeThreshold=function(){var t=La.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}(af);var fg,dg,pg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.curveTypes={curveLinear:th,curveLinearClosed:Gh,curveBasis:gh,curveBasisClosed:mh,curveBasisOpen:_h,curveBundle:xh,curveCardinal:Eh,curveCardinalClosed:Th,curveCardinalOpen:Ah,curveCatmullRom:Ph,curveCatmullRomClosed:Lh,curveCatmullRomOpen:Ih,curveMonotoneX:Wh,curveMonotoneY:Yh,curveNatural:Zh,curveStep:$h,curveStepAfter:Jh,curveStepBefore:Qh},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}(af),gg=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.isZoomBarEnabled=function(){if(!this.services.cartesianScales)return!1;if(!La.getProperty(this.model.getOptions(),"zoomBar","top","enabled"))return!1;this.services.cartesianScales.findDomainAndRangeAxes();var t=this.services.cartesianScales.getMainXAxisPosition(),e=La.getProperty(this.model.getOptions(),"axes",t,"scaleType");return t===S.BOTTOM&&e===C.TIME},e.prototype.getZoomBarData=function(){var t=this.model.getZoomBarData();return t&&t.length>1?t:this.model.getDisplayData()},e.prototype.getDefaultZoomBarDomain=function(t){var e=t||this.services.zoom.getZoomBarData(),n=this.services.cartesianScales,r=n.getMainXAxisPosition(),i=n.getDomainIdentifier();return n.extendsDomain(r,Ho(e,(function(t){return t[i]})))},e.prototype.handleDomainChange=function(t,e){void 0===e&&(e={dispatchEvent:!0}),this.model.set({zoomDomain:t},{animate:!1}),e.dispatchEvent&&this.services.events.dispatchEvent(W.ZoomDomain.CHANGE,{newDomain:t})},e.prototype.getZoomRatio=function(){return La.getProperty(this.model.getOptions(),"zoomBar","zoomRatio")},e.prototype.filterDataForRangeAxis=function(t,e){var n=this.model.get("zoomDomain"),r=Object.assign({stacked:!1},e),i=La.getProperty(this.model.getOptions(),"zoomBar","updateRangeAxis");if(this.isZoomBarEnabled()&&i&&n){var a=r.stacked?"sharedStackKey":this.services.cartesianScales.getDomainIdentifier(),o=t.filter((function(t){return new Date(t[a])>=n[0]&&new Date(t[a])<=n[1]}));if(o.length>0)return o}return t},e.prototype.zoomIn=function(t){void 0===t&&(t=this.getZoomRatio());var e=this.model.get("zoomDomain"),n=fo.handleWidth,r=this.services.cartesianScales.getMainXScale().copy();r.domain(this.getDefaultZoomBarDomain());var i=r(e[0]),a=r(e[1]);if(!(a-i<n+1)){var o=r.range(),s=a-i,u=Math.min((o[1]-o[0])/2*(t/2),s/2),l=i+u,c=a-u;l>=c&&(l=i+s/2-n/2,c=a-s/2+n/2);var h=[r.invert(l),r.invert(c)];e[0].valueOf()===h[0].valueOf()&&e[1].valueOf()===h[1].valueOf()||this.handleDomainChange(h)}},e.prototype.zoomOut=function(t){void 0===t&&(t=this.getZoomRatio());var e=this.model.get("zoomDomain"),n=this.services.cartesianScales.getMainXScale().copy();n.domain(this.getDefaultZoomBarDomain());var r=n(e[0]),i=n(e[1]),a=n.range(),o=(a[1]-a[0])/2*(t/2),s=Math.max(r-o,a[0]),u=Math.min(i+o,a[1]),l=[n.invert(s),n.invert(u)];e[0].valueOf()===l[0].valueOf()&&e[1].valueOf()===l[1].valueOf()||this.handleDomainChange(l)},e.prototype.resetZoomDomain=function(){var t=this.model.get("zoomDomain"),e=this.getDefaultZoomBarDomain();t[0].valueOf()===e[0].valueOf()&&t[1].valueOf()===e[1].valueOf()||this.handleDomainChange(e)},e.prototype.isMinZoomDomain=function(){var t=this.model.get("zoomDomain"),e=this.getDefaultZoomBarDomain();return!(!t||!e)&&(t[1].valueOf()-t[0].valueOf())/(e[1].valueOf()-e[0].valueOf())<La.getProperty(this.model.getOptions(),"zoomBar","minZoomRatio")},e.prototype.isMaxZoomDomain=function(){var t=this.model.get("zoomDomain"),e=this.getDefaultZoomBarDomain();return!(!t||!e||t[0].valueOf()!==e[0].valueOf()||t[1].valueOf()!==e[1].valueOf())},e.prototype.isEmptyState=function(){return 0===this.getZoomBarData().length},e.prototype.isZoomBarLoading=function(t){return La.getProperty(this.model.getOptions(),"zoomBar",t,"loading")},e.prototype.isZoomBarLocked=function(t){return La.getProperty(this.model.getOptions(),"zoomBar",t,"locked")},e}(af),vg=function(){function t(t,e,n){if(this.configs={},this.model=t,this.services=e,n&&(this.configs=n,this.configs.id)){var r=La.getProperty(this.model.getOptions(),"style","prefix");this.id=r+"--"+this.configs.id}this.parent||this.setParent(Ga(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=La.getProperty(this.model.getOptions(),"style","prefix");this.parent.classed(of.prefix+"--"+n+"--"+this.type,!0).attr("id",this.id),e&&e.classed(of.prefix+"--"+n+"--"+this.type,!1).attr("id",this.id)}},t.prototype.getParent=function(){return this.parent},t.prototype.getContainerSVG=function(t){if(void 0===t&&(t={withinChartClip:!1}),this.type){var e=La.getProperty(this.model.getOptions(),"style","prefix"),n=this.id?"#"+this.id:"",r=Cf.appendOrSelect(this.parent,"g"+n+"."+of.prefix+"--"+e+"--"+this.type);if(t.withinChartClip){var i=this.model.get("chartClipId");i&&r.attr("clip-path","url(#"+i+")")}return r}return this.parent},t.prototype.getOptions=function(){return this.configs.options?La.merge({},this.model.getOptions(),this.configs.options):this.model.getOptions()},t}(),mg=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.GROUP).attr("data-name","legend-items"),n=this.getOptions(),i=La.getProperty(n,"legend"),a=this.model.getDataGroups(),o=La.getProperty(i,"order");o&&(a=this.sortDataGroups(a,o));var s=e.selectAll("g.legend-item").data(a,(function(t){return t.name})),u=s.enter().append("g").classed("legend-item",!0).classed("active",(function(t,e){return t.status===ro.items.status.ACTIVE})),l=ro.checkbox.radius,c=La.getProperty(i,"truncation","type"),h=La.getProperty(i,"truncation","threshold"),f=La.getProperty(i,"truncation","numCharacter"),d=La.getProperty(n,"color","pairing","option");u.append("rect").classed("checkbox",!0).merge(s.select("rect.checkbox")).attr("role",r.CHECKBOX).attr("tabindex",0).attr("aria-label",(function(t){return t.name})).attr("aria-checked",(function(t){return t.status===ro.items.status.ACTIVE})).attr("width",2*l).attr("height",2*l).attr("rx",1).attr("ry",1).attr("class",(function(e,n){if(d)return t.model.getColorClassName({classNameTypes:[E.FILL],dataGroupName:e.name,originalClassName:"checkbox"})})).style("fill",(function(e){return e.status===ro.items.status.ACTIVE?t.model.getFillColor(e.name):null})).classed("active",(function(t,e){return t.status===ro.items.status.ACTIVE}));var p=u.append("text").merge(s.select("text"));c!==M.NONE?p.html((function(t){return t.name.length>h?La.truncateLabel(t.name,c,f):t.name})):p.html((function(t){return t.name})),this.breakItemsIntoLines(u),s.exit().on("mouseover",null).on("click",null).on("mouseout",null).remove();var g=La.getProperty(this.getOptions(),"legend","clickable");e.classed("clickable",g),g&&u.size()>0&&this.addEventListeners();var v=La.getProperty(i,"alignment"),m=Cf.getAlignmentOffset(v,e,this.getParent());e.attr("transform","translate("+m+", 0)")},e.prototype.sortDataGroups=function(t,e){if(t.sort((function(t,n){return e.indexOf(t.name)-e.indexOf(n.name)})),e.length<t.length){var n=t.length-e.length;return t.slice(n).concat(t.slice(0,n))}return t},e.prototype.breakItemsIntoLines=function(t){var e=this,n=this.getContainerSVG(),r=this.getOptions(),i=ro.checkbox.radius,a=ro.items.horizontalSpace,o=ro.items.verticalSpace,s=ro.items.textYOffset,u=2*i+ro.checkbox.spaceAfter,l=ro.items.status.DISABLED,c=this.model.getDataGroups().some((function(t){return t.status===l})),h=La.getProperty(r,"legend","orientation"),f=0,d=0,p=0;t.merge(n.selectAll("g.legend-item")).each((function(t,r){var l=Ga(this),g=Ga(n.selectAll("g.legend-item").nodes()[r-1]);if(0===p||g.empty()||h===k.VERTICAL)h===k.VERTICAL&&0!==r&&d++;else{var v=Cf.getSVGElementSize(e.parent,{useAttr:!0}),m=Cf.getSVGElementSize(Ga(this).select("text"),{useBBox:!0}),y=Cf.getSVGElementSize(g.select("text"),{useBBox:!0});(f=f+y.width+u+a)+u+m.width>v.width&&(d++,f=0,p=0)}l.select("rect.checkbox").attr("x",f).attr("y",0+d*o);var _=s+d*o;l.select("text").attr("x",f+u).attr("y",0+_+3);var b=(!h||h===k.HORIZONTAL)&&"0"===l.select("rect.checkbox").attr("y"),x=h===k.VERTICAL&&"0"===l.select("rect.checkbox").attr("x"),w=b||x;c&&l.select("g.check").empty()&&w?(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.getOptions(),r=La.getProperty(n,"legend"),i=La.getProperty(r,"truncation","threshold");e.selectAll("g.legend-item").on("mouseover",(function(){t.services.events.dispatchEvent(W.Legend.ITEM_HOVER,{hoveredElement:Ga(this)});var e=ro.checkbox.radius,n=Ga(this);n.select("rect.checkbox").classed("hovered",!0),n.append("rect").classed("hover-stroke",!0).attr("x",parseFloat(n.select("rect.checkbox").attr("x"))-2).attr("y",parseFloat(n.select("rect.checkbox").attr("y"))-2).attr("width",2*e+4).attr("height",2*e+4).attr("rx",3).attr("ry",3).lower();var r=n.datum();r.name.length>i&&t.services.events.dispatchEvent(W.Tooltip.SHOW,{hoveredElement:n,content:r.name})})).on("mousemove",(function(){t.services.events.dispatchEvent(W.Tooltip.MOVE)})).on("click",(function(){t.services.events.dispatchEvent(W.Legend.ITEM_CLICK,{clickedElement:Ga(this)});var e=Ga(this).datum();t.model.toggleDataLabel(e.name)})).on("mouseout",(function(){var e=Ga(this);e.select("rect.hover-stroke").remove(),e.select("rect.checkbox").classed("hovered",!1),t.services.events.dispatchEvent(W.Tooltip.HIDE),t.services.events.dispatchEvent(W.Legend.ITEM_MOUSEOUT,{hoveredElement:e})})),e.selectAll("g.legend-item rect.checkbox").on("keyup",(function(e){!Ea.key||"Enter"!==Ea.key&&" "!==Ea.key||(Ea.preventDefault(),t.model.toggleDataLabel(e.name))}))},e}(vg);!function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(dg||(dg={}));var yg=((fg={})[dg.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)}},fg[dg.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)}},fg[dg.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)}},fg[dg.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)}},fg),_g="undefined"!=typeof window?window:{innerHeight:0,scrollY:0,innerWidth:0,scrollX:0},bg=function(){function t(t){void 0===t&&(t={}),this.positions=yg,this.positions=Object.assign({},yg,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(),a=document.body.getBoundingClientRect();return{top:i.top-a.top+n.top,left:i.left-a.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),a=t.getBoundingClientRect();return this.calculatePosition(i,a,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 a=this;void 0===r&&(r=this.defaultContainerFunction),void 0===i&&(i=this.findPosition);var o=n.map((function(n){var o=i(t,e,n),s=a.getPlacementBox(e,o),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 o.sort((function(t,e){return e.weight-t.weight})),o[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:_g.innerHeight-_g.scrollY,height:_g.innerWidth-_g.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}(),xg=(new bg,[["15seconds",15e3],["minute",6e4],["30minutes",18e5],["hourly",36e5],["daily",864e5],["monthly",2592e6],["quarterly",7776e6],["yearly",31104e6]]);function wg(t,e,n,r){var i=0===e,a=2===Number(rg(new Date(t),"c")),o=1===Number(rg(new Date(t),"q"));switch(n){case"15seconds":case"minute":case"30minutes":case"hourly":return i||Tg(t)||Mg(t)||Ag(t);case"daily":return r?i||a||Ag(t):i||Mg(t)||Ag(t);case"monthly":return i||Ag(t);case"quarterly":return i||o;case"yearly":return!1;default:throw new Error(n+" is not a valid time interval.")}}function Og(t,e,n,r){var i=r.showDayName,a="daily"===n&&i?"weekly":n,o=new Date(t),s=La.getProperty(r,"timeIntervalFormats")[a],u=La.getProperty(s,"primary"),l=La.getProperty(s,"secondary");return rg(o,wg(t,e,n,i)?u:l,{locale:r.localeObject})}function Eg(t){var e=new Date(t);return{M:e.getMonth()+1,d:e.getDate(),H:e.getHours(),m:e.getMinutes(),s:e.getSeconds()}}function Sg(t){return 1===t.length?"15seconds":function(t){var e=xg.reduce((function(e,n,r){n[0];var i=n[1],a=xg[e][1];return Math.abs(a-t)<Math.abs(i-t)?e:r}),0);return xg[e][0]}(function(t,e){var n,r,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(n=t[a])&&n>=n)for(r=n;++a<i;)null!=(n=t[a])&&r>n&&(r=n)}else for(;++a<i;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=n;++a<i;)null!=(n=e(t[a],a,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 Tg(t){var e=Eg(t),n=e.s,r=e.m;return 0===e.H&&0===r&&0===n}function Mg(t){var e=Eg(t),n=e.d,r=e.s,i=e.m,a=e.H;return 1===n&&0===a&&0===i&&0===r}function Ag(t){var e=Eg(t),n=e.M,r=e.d,i=e.s,a=e.m,o=e.H;return 1===n&&1===r&&0===o&&0===a&&0===i}var Cg=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="threshold",i.positionService=new bg,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,a=n.axisPosition,o=n.index,s=La.getProperty(this.getOptions(),"style","prefix");this.thresholdClass=of.prefix+"--"+s+"--threshold",this.thresholdIdentifierClass=a+"-"+o,this.threshold=Cf.appendOrSelect(this.parent,"g."+this.thresholdClass+"."+this.thresholdIdentifierClass).raise();var u=Cf.appendOrSelect(this.threshold,"rect.threshold-hoverable-area"),l=Cf.appendOrSelect(this.threshold,"line.threshold-line");l.style("stroke",i);var c=this.services.cartesianScales.getScaleByPosition(a),h=this.services.cartesianScales.getScaleTypeByPosition(a),f=this.services.cartesianScales.getMainXScale(),d=this.services.cartesianScales.getMainYScale(),p=h===C.LABELS,g=f.range(),v=g[0],m=g[1],y=d.range(),_=y[0],b=y[1],x=this.services.cartesianScales,w=x.getOrientation(),O=La.flipDomainAndRangeBasedOnOrientation((function(t){return x.getDomainValue(t)}),(function(t){return x.getRangeValue(t)}),w),E=O[0],T=O[1];if(a===S.TOP||a===S.BOTTOM){var M=E(r)+(p?c.step()/2:0);this.threshold.transition(this.services.transitions.getTransition("threshold-update",t)).attr("transform","translate("+M+", "+b+")"),l.attr("y2",_-b),u.attr("width",Math.abs(_-b)).classed("rotate",!0)}else{M=T(r)+(p?c.step()/2:0);this.threshold.transition(this.services.transitions.getTransition("threshold-update",t)).attr("transform","translate("+v+", "+M+")"),l.attr("x2",m-v),u.attr("width",Math.abs(m-v))}var A=this;this.services.events.addEventListener(W.Threshold.SHOW,(function(t){t.detail.hoveredElement.node()===A.threshold&&(e.setThresholdLabelPosition(),e.label.classed("hidden",!1))})),this.services.events.addEventListener(W.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.getOptions();if(this.services.cartesianScales.getScaleTypeByPosition(n)===C.TIME){var i=[S.LEFT,S.RIGHT].includes(n),a=this.services.cartesianScales.getMainXScale(),o=this.services.cartesianScales.getMainYScale(),s=i?o:a,u=La.getProperty(r,"timeScale");return Og(e,0,Sg(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,a=void 0===i?"Threshold":i,o=Ga(this.services.domUtils.getHolder()),s=n?n(e):this.getFormattedValue();this.label=Cf.appendOrSelect(o,"div."+this.thresholdClass+"--label."+this.thresholdIdentifierClass),this.label.html(a+": "+s).classed("hidden",!0).style("background-color",r)},e.prototype.setThresholdLabelPosition=function(){var t=this.services.domUtils.getHolder(),e=this.label.node(),n=Ua(t),r=this.positionService.findBestPlacementAt({left:n[0],top:n[1]},e,[dg.RIGHT,dg.LEFT,dg.TOP,dg.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;Cf.appendOrSelect(this.threshold,"rect").on("mouseover mousemove",(function(){t.threshold.classed("active",!0),t.services.events.dispatchEvent(W.Threshold.SHOW,{hoveredElement:Ga(t.threshold)})})).on("mouseout",(function(){t.threshold.classed("active",!1),t.services.events.dispatchEvent(W.Threshold.HIDE,{hoveredElement:Ga(t.threshold)})}))},e}(vg),Dg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="title",e}return n(e,t),e.prototype.render=function(){var t=this.getContainerSVG(),e=t.selectAll("text.title").data([this.getOptions().title]);e.enter().append("text").classed("title",!0).merge(e).attr("x",0).attr("y","1em").html((function(t){return t}));var n=this.getMaxTitleWidth(),r=Cf.appendOrSelect(t,"text.title");r.node().getComputedTextLength()>n&&n>0&&this.truncateTitle(r,n),e.exit().remove()},e.prototype.truncateTitle=function(t,e){if(!(e<=0)){var n=t.text();if(t.node().getComputedTextLength()>e){t.append("tspan").text("...");var r=Cf.appendOrSelect(t,"tspan").node().getComputedTextLength(),i=t.text(),a=this.getSubstringIndex(t.node(),0,i.length-1,e-r);t.html(i.substring(0,a-1)).append("tspan").text("...");var o=this;t.on("mouseover",(function(){o.services.events.dispatchEvent(W.Tooltip.SHOW,{hoveredElement:t,content:n})})).on("mousemove",(function(){o.services.events.dispatchEvent(W.Tooltip.MOVE)})).on("mouseout",(function(){o.services.events.dispatchEvent(W.Tooltip.HIDE)}))}}},e.prototype.getMaxTitleWidth=function(){return Cf.getSVGElementSize(this.parent.node(),{useAttr:!0}).width},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}(vg),Pg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="meter-title",e}return n(e,t),e.prototype.render=function(){var t=this.model.getDisplayData(),e=this.getOptions(),n=this.getContainerSVG(),r=e.data.groupMapsTo,i=n.selectAll("text.meter-title").data([t[r]]);i.enter().append("text").classed("meter-title",!0).merge(i).attr("x",0).attr("y","1em").text((function(t){return t})),i.exit().remove(),this.appendPercentage(),this.displayStatus();var a=this.getMaxTitleWidth(),o=Cf.appendOrSelect(n,"text.meter-title");a>0&&o.node().getComputedTextLength()>a&&this.truncateTitle(o,a)},e.prototype.displayStatus=function(){var t=this.getContainerSVG(),e=(this.getOptions(),Cf.getSVGElementSize(this.services.domUtils.getMainSVG(),{useAttr:!0})),n=e.width?e.width:this.parent.node().getAttribute("width"),r=this.model.getStatus(),i=ao.status.indicatorSize/2,a=Cf.appendOrSelect(t,"g.status-indicator").attr("class",null!==r?"status-indicator status--"+r:"").attr("transform","translate("+(n-i)+", 0)"),o=r?[r]:[],s=a.selectAll("circle.status").data(o);s.enter().append("circle").merge(s).attr("class","status").attr("r",i).attr("cx",0).attr("cy","calc(1em / 2)");var u=a.selectAll("path.innerFill").data(o);u.enter().append("path").merge(u).attr("d",this.getStatusIconPathString(r)).attr("transform","translate(-"+i+", 0)").attr("class","innerFill"),u.exit().remove(),s.exit().remove()},e.prototype.appendPercentage=function(){var t=this.model.getDisplayData().value,e=this.getContainerSVG(),n=Cf.appendOrSelect(e,"text.meter-title"),r=!0===La.getProperty(this.getOptions(),"meter","statusBar","percentageIndicator","enabled")?[t]:[],i=e.selectAll("text.percent-value").data(r),a=ao.statusBar.paddingRight;i.enter().append("text").classed("percent-value",!0).merge(i).text((function(t){return t+"%"})).attr("x",+n.attr("x")+n.node().getComputedTextLength()+a).attr("y",n.attr("y")),i.exit().remove()},e.prototype.truncateTitle=function(e,n){t.prototype.truncateTitle.call(this,e,n);var r=Cf.appendOrSelect(this.parent,"tspan"),i=ao.statusBar.paddingRight,a=Math.ceil(r.node().getComputedTextLength());Cf.appendOrSelect(this.parent,"text.percent-value").attr("x",+e.attr("x")+e.node().getComputedTextLength()+a+i)},e.prototype.getMaxTitleWidth=function(){var t=Cf.getSVGElementSize(this.services.domUtils.getMainSVG(),{useAttr:!0}),e=t.width?t.width:this.parent.node().getAttribute("width"),n=Cf.appendOrSelect(this.parent,"text.percent-value"),r=ao.statusBar.paddingRight,i=n.node().getComputedTextLength(),a=Cf.appendOrSelect(this.parent,"g.status-indicator").node();return e-i-r-(Cf.getSVGElementSize(a,{useBBox:!0}).width+ao.status.paddingLeft)},e.prototype.getStatusIconPathString=function(t){switch(t){case z.SUCCESS:return"M6.875 11.3125 3.75 8.1875 4.74375 7.25 6.875 9.34375 11.50625 4.75 12.5 5.7375 Z";case z.DANGER:return"M10.7 11.5 4.5 5.3 5.3 4.5 11.5 10.7 Z";case z.WARNING:return"M7.9375,11.125 C7.41973305,11.125 7,11.544733 7,12.0625 C7,12.580267 7.41973305,13 7.9375,13 C8.45526695,13 8.875,12.580267 8.875,12.0625 C8.875,11.544733 8.45526695,11.125 7.9375,11.125 M7.3125, 3 8.5625, 3 8.5625, 9.875 7.3125, 9.875, 7.3125, 3 Z"}},e}(Dg),kg=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="tooltip",i.isEventListenerAdded=!1,i.positionService=new bg,i.handleShowTooltip=function(t){var e=t.detail.data||t.detail.items,n=i.getTooltipHTML(t),r=Cf.appendOrSelect(i.tooltip,"div.content-box");if(La.getProperty(i.getOptions(),"tooltip","customHTML"))if(t.detail.content){var a='<div class="title-tooltip">'+t.detail.content+"</div>";r.html(a)}else r.html(i.model.getOptions().tooltip.customHTML(e,n));else r.html(n);i.positionTooltip(t),i.tooltip.classed("hidden",!1).attr("aria-hidden",!1)},i.handleHideTooltip=function(){i.tooltip.classed("hidden",!0).attr("aria-hidden",!0)},i.init(),i}return n(e,t),e.prototype.addTooltipEventListener=function(){var t=this;this.services.events.addEventListener(W.Tooltip.MOVE,(function(e){t.positionTooltip(e)})),this.services.events.addEventListener(W.Tooltip.SHOW,this.handleShowTooltip),this.services.events.addEventListener(W.Tooltip.HIDE,this.handleHideTooltip),this.services.events.addEventListener(W.Chart.MOUSEOUT,this.handleHideTooltip)},e.prototype.removeTooltipEventListener=function(){this.services.events.removeEventListener(W.Tooltip.MOVE,null),this.services.events.removeEventListener(W.Tooltip.SHOW,this.handleShowTooltip),this.services.events.removeEventListener(W.Tooltip.HIDE,this.handleHideTooltip),this.services.events.removeEventListener(W.Chart.MOUSEOUT,this.handleHideTooltip)},e.prototype.getItems=function(t){return t.detail.items?t.detail.items:[]},e.prototype.formatItems=function(t){var e=this,n=this.getOptions(),r=La.getProperty(n,"tooltip","truncation","type"),i=La.getProperty(n,"tooltip","truncation","threshold"),a=La.getProperty(n,"tooltip","truncation","numCharacter");return r!==M.NONE?t.map((function(t){return t.value=t.value?e.valueFormatter(t.value):t.value,t.label&&t.label.length>i&&(t.label=La.truncateLabel(t.label,r,a)),t.value&&t.value.length>i&&(t.value=La.truncateLabel(t.value,r,a)),t})):t},e.prototype.getTooltipHTML=function(t){var e;if(t.detail.content)e='<div class="title-tooltip">'+t.detail.content+"</div>";else{var n=this.getItems(t),r=this.formatItems(n),i=this.model.isUserProvidedColorScaleValid();e="<ul class='multi-tooltip'>"+r.map((function(t){var e=t.color||i;return'<li>\n\t\t\t\t\t\t\t<div class="datapoint-tooltip '+(t.bold?"bold":"")+'">\n\t\t\t\t\t\t\t\t'+(t.class&&!e?'<a class="tooltip-color '+t.class+'"></a>':"")+"\n\t\t\t\t\t\t\t\t"+(t.color&&e?'<a style="background-color: '+t.color+'" class="tooltip-color"></a>':"")+'\n\t\t\t\t\t\t\t\t<p class="label">'+(t.label||"")+'</p>\n\t\t\t\t\t\t\t\t<p class="value">'+(t.value||"")+"</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</li>"})).join("")+"</ul>"}return e},e.prototype.valueFormatter=function(t){var e=this.getOptions(),n=La.getProperty(e,"tooltip","valueFormatter");return n?n(t):t.toLocaleString()},e.prototype.render=function(){var t=this.getOptions(),e=La.getProperty(t,"tooltip","enabled");if(e){var n=Ga(this.services.domUtils.getHolder()),r=La.getProperty(t,"style","prefix");this.tooltip=Cf.appendOrSelect(n,"div."+of.prefix+"--"+r+"--tooltip"),this.tooltip.style("max-width",null),this.isEventListenerAdded||(this.addTooltipEventListener(),this.isEventListenerAdded=!0),this.tooltip.classed("hidden",!0)}else!e&&this.isEventListenerAdded&&(this.removeTooltipEventListener(),this.isEventListenerAdded=!1)},e.prototype.positionTooltip=function(t){var e,n=this.services.domUtils.getHolder(),r=this.tooltip.node(),i=this.getOptions(),a=La.getProperty(i,"zoomBar","top","enabled"),o=La.getProperty(t,"detail","mousePosition");if(o){var s=La.getProperty(i,"zoomBar","top","type"),u=fo.height[s];a&&(o[1]+=u+fo.spacerHeight)}else o=Ua(n);var l=this.positionService.findBestPlacementAt({left:o[0],top:o[1]},r,[dg.RIGHT,dg.LEFT,dg.TOP,dg.BOTTOM],(function(){return{width:n.offsetWidth,height:n.offsetHeight}})),c=lo.horizontalOffset;l===dg.LEFT&&(c*=-1),e=this.positionService.findPositionAt({left:o[0]+c,top:o[1]},r,l),this.positionService.setElement(r,e)},e}(vg),Lg=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getItems=function(t){var e=this;if(t.detail.items)return t.detail.items;var n=t.detail.data;if(!n.length||!n[0])return[];var r=this.getOptions(),i=this.services.cartesianScales,a=i.getDomainAxisOptions(),o=i.getDomainIdentifier(),s=i.getDomainAxisScaleType(),u=r.data.groupMapsTo,l=a.title;if(!l){var c=i.getDomainAxisPosition();l=c===S.BOTTOM||c===S.TOP?"x-value":"y-value"}var h,f=n[0][o];if(s===C.TIME?f=rg(new Date(n[0][o]),"MMM d, yyyy"):s===C.LINEAR&&(f=f.toLocaleString()),1===n.length){var d=n[0],p=i.getRangeAxisPosition({datum:d}),g=i.getRangeIdentifier(d),v=i.getAxisOptions(p).title;v||(v=p===S.LEFT||p===S.RIGHT?"y-value":"x-value"),h=[{label:l,value:f},{label:v,value:d[g]},{label:r.tooltip.groupLabel||"Group",value:d[u],color:this.model.getFillColor(d[u]),class:this.model.getColorClassName({classNameTypes:[E.TOOLTIP],dataGroupName:d[u]})}]}else if(n.length>1){if(h=(h=[{label:l,value:this.valueFormatter(f)}]).concat(n.map((function(t){return{label:t[u],value:e.valueFormatter(t[i.getRangeIdentifier(t)]),color:e.model.getFillColor(t[u]),class:e.model.getColorClassName({classNameTypes:[E.TOOLTIP],dataGroupName:t[u]})}})).sort((function(t,e){return e.value-t.value}))),!i.isDualAxes()&&!0===La.getProperty(r,"tooltip","showTotal")){var m=i.getRangeIdentifier();h.push({label:r.tooltip.totalLabel||"Total",value:this.valueFormatter(n.reduce((function(t,e){return t+e[m]}),0)),bold:!0})}}return h},e}(kg),Rg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="area",e.gradient_id="gradient-id-"+Math.floor(99999999999*Math.random()),e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("path.area").transition(e.services.transitions.getTransition("legend-hover-area")).attr("opacity",(function(t){return t.name!==n.datum().name?eo.opacity.unselected:eo.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.area").transition(e.services.transitions.getTransition("legend-mouseout-area")).attr("opacity",eo.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(W.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(W.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getContainerSVG({withinChartClip:!0}),r=[0,0],i=this.services.cartesianScales,a=i.getOrientation(),o=ih().curve(this.services.curves.getD3Curve());a===A.VERTICAL?(r=this.services.cartesianScales.getMainYScale().domain(),o.x((function(t,e){return i.getDomainValue(t,e)})).y0(i.getRangeValue(0)).y1((function(t,e){return i.getRangeValue(t,e)}))):(r=this.services.cartesianScales.getMainXScale().domain(),o.x0(i.getRangeValue(0)).x1((function(t,e){return i.getRangeValue(t,e)})).y((function(t,e){return i.getDomainValue(t,e)})));var s=this.model.getGroupedData(this.configs.groups),u=La.getProperty(this.getOptions(),"color","gradient","enabled"),l=s&&1===s.length&&u;s.length>1&&u&&console.error("Gradients can only be enabled when having 1 single dataset");var c=n.selectAll("path.area").data(s),h=La.getProperty(this.getOptions(),"style","prefix"),f=Cf.appendOrSelect(Ga(this.services.domUtils.getHolder()),"svg."+of.prefix+"--"+h+"--chart-svg");if(c.exit().attr("opacity",0).remove(),s.length){var d=f.select("path."+this.model.getColorClassName({classNameTypes:[E.STROKE],dataGroupName:s[0].name})).node(),p=d?getComputedStyle(d,null).getPropertyValue("stroke"):null;l&&p?Fd.appendOrUpdateLinearGradient({svg:this.parent,id:s[0].name.replace(" ","")+"_"+this.gradient_id,x1:"0%",x2:"0%",y1:"0%",y2:"100%",stops:Fd.getStops(r,p)}):this.parent.selectAll("defs linearGradient").empty()||this.parent.selectAll("defs linearGradient").each((function(){this.parentNode.remove()}));var g=this,v=c.enter().append("path");l?v.merge(c).style("fill",(function(t){return"url(#"+t.name.replace(" ","")+"_"+e.gradient_id+")"})).attr("class","area").attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[E.FILL],dataGroupName:t.name,originalClassName:"area"})})).attr("d",(function(t){var e=t.data;return o(e)})):v.attr("opacity",0).merge(c).attr("class","area").attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[E.FILL],dataGroupName:t.name,originalClassName:"area"})})).attr("fill",(function(t){return g.model.getFillColor(t.name)})).transition(this.services.transitions.getTransition("area-update-enter",t)).attr("opacity",eo.opacity.selected).attr("d",(function(t){var e=t.data;return o(e)}))}},e.prototype.destroy=function(){this.parent.selectAll("path.area").on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(W.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(W.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(vg),Ig=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="area-stacked",e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.getOptions().data.groupMapsTo;e.parent.selectAll("path.area").transition(e.services.transitions.getTransition("legend-hover-area")).attr("opacity",(function(t){return t[0][r]!==n.datum().name?eo.opacity.unselected:eo.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.area").transition(e.services.transitions.getTransition("legend-mouseout-area")).attr("opacity",eo.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;this.model.setStackedGroups(this.model.getDataGroupNames()),t.addEventListener(W.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(W.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getContainerSVG({withinChartClip:!0}),i=this,a=this.getOptions(),o=a.data.groupMapsTo,s=Object.keys(a.axes).some((function(t){return a.axes[t].percentage})),u=this.model.getStackedData({percentage:s,groups:this.configs.groups}),l=this.services.cartesianScales.getDomainAxisPosition({datum:u[0][0]}),c=this.services.cartesianScales.getRangeAxisPosition({datum:u[0][0]}),h=this.services.cartesianScales.getScaleByPosition(c),f=n.selectAll("path.area").data(u,(function(t){return t[0][o]}));this.areaGenerator=ih().x((function(t,n){return e.services.cartesianScales.getValueThroughAxisPosition(l,t.data.sharedStackKey,n)})).y0((function(t){return h(t[0])})).y1((function(t){return h(t[1])})).curve(this.services.curves.getD3Curve()),f.exit().attr("opacity",0).remove(),f.enter().append("path").attr("opacity",0).merge(f).data(u,(function(t){return t[0][o]})).attr("class","area").attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[E.FILL],dataGroupName:t[0][o],originalClassName:"area"})})).attr("fill",(function(t){return i.model.getFillColor(t[0][o])})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","area").transition(this.services.transitions.getTransition("area-update-enter",t)).attr("opacity",eo.opacity.selected).attr("d",this.areaGenerator)},e.prototype.destroy=function(){this.parent.selectAll("path.area").on("mouseover",null).on("mousemove",null).on("mouseout",null)},e}(vg),Ng=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getBarWidth=function(t){var e=this.getOptions();if(e.bars.width)return e.bars.width;var n=this.model.getDisplayData().length,r=this.services.cartesianScales.getMainXScale(),i=Cf.getSVGElementSize(this.parent,{useAttrs:!0}).width;return r.step?Math.min(e.bars.maxWidth,r.step()/2):Math.min(e.bars.maxWidth,.25*i/n)},e.prototype.isOutsideZoomedDomain=function(t,e){if(this.model.getDisplayData().length<=1)return!1;var n=this.model.get("zoomDomain");if(void 0!==n){var r=this.services.cartesianScales.getDomainScale();return t<r(n[0])||e>r(n[1])}return!1},e}(vg),Gg=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.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(W.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(W.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.getOptions().data.groupMapsTo,i=this.getContainerSVG({withinChartClip:!0}),a=this.model.getDisplayData(this.configs.groups),o=i.selectAll("path.bar").data(a,(function(t){return t[n]}));o.exit().attr("opacity",0).remove(),o.enter().append("path").attr("opacity",0).merge(o).classed("bar",!0).attr("width",this.getBarWidth.bind(this)).transition(this.services.transitions.getTransition("bar-update-enter",t)).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[E.FILL],dataGroupName:t[n],originalClassName:"bar"})})).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,a=i+r,o=e.services.cartesianScales.getRangeValue(0),s=e.services.cartesianScales.getRangeValue(t,n);if(!e.isOutsideZoomedDomain(i,a))return La.generateSVGPathString({x0:i,x1:a,y0:o,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;this.parent.selectAll("path.bar").on("mouseover",(function(e){var n=Ga(this);n.classed("hovered",!0),n.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")),t.services.events.dispatchEvent(W.Bar.BAR_MOUSEOVER,{element:n,datum:e}),t.services.events.dispatchEvent(W.Tooltip.SHOW,{hoveredElement:n,data:[e]})})).on("mousemove",(function(e){Ga(this);t.services.events.dispatchEvent(W.Bar.BAR_MOUSEMOVE,{element:Ga(this),datum:e}),t.services.events.dispatchEvent(W.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(W.Bar.BAR_CLICK,{element:Ga(this),datum:e})})).on("mouseout",(function(e){var n=Ga(this);n.classed("hovered",!1),n.transition(t.services.transitions.getTransition("graph_element_mouseout_fill_update")),t.services.events.dispatchEvent(W.Bar.BAR_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(W.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(W.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(W.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Ng),Bg=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.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(W.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(W.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.model.getDisplayData(this.configs.groups),i=this.getOptions().data.groupMapsTo;this.setGroupScale();var a=this.getContainerSVG({withinChartClip:!0}),o=No(n,(function(t){return t[e.services.cartesianScales.getDomainIdentifier(t)]})).keys(),s=a.selectAll("g.bars").data(o,(function(t){return t}));s.exit().attr("opacity",0).remove();var u=s.enter().append("g").classed("bars",!0).attr("role",r.GROUP).attr("data-name","bars").merge(s).attr("transform",(function(t,n){var r=e.services.cartesianScales.getDomainValue(t,n)-e.getGroupWidth()/2;return e.services.cartesianScales.getOrientation()===A.VERTICAL?"translate("+r+", 0)":"translate(0, "+r+")"})).selectAll("path.bar").data((function(t){return e.getDataCorrespondingToLabel(t)}));u.exit().attr("opacity",0).remove(),u.enter().append("path").attr("opacity",0).merge(u).classed("bar",!0).transition(this.services.transitions.getTransition("bar-update-enter",t)).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[E.FILL],dataGroupName:t[i],originalClassName:"bar"})})).attr("fill",(function(t){return e.model.getFillColor(t[i])})).attr("d",(function(t){var n=e.groupScale(t[i]),r=n,a=n+e.getBarWidth(),o=e.services.cartesianScales.getRangeAxisPosition({datum:t}),s=e.services.cartesianScales.getValueThroughAxisPosition(o,0),u=e.services.cartesianScales.getRangeValue(t);if(!e.isOutsideZoomedDomain(r,a))return La.generateSVGPathString({x0:r,x1:a,y0:s,y1:u},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;this.parent.selectAll("path.bar").on("mouseover",(function(e){var n=Ga(this);n.classed("hovered",!0),n.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")),t.services.events.dispatchEvent(W.Bar.BAR_MOUSEOVER,{element:n,datum:e}),t.services.events.dispatchEvent(W.Tooltip.SHOW,{hoveredElement:n,data:[e]})})).on("mousemove",(function(e){var n=Ga(this);t.services.events.dispatchEvent(W.Bar.BAR_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(W.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(W.Bar.BAR_CLICK,{element:Ga(this),datum:e})})).on("mouseout",(function(e){var n=Ga(this);n.classed("hovered",!1),n.transition(t.services.transitions.getTransition("graph_element_mouseout_fill_update")),t.services.events.dispatchEvent(W.Bar.BAR_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(W.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(W.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(W.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.getDataCorrespondingToLabel=function(t){var e=this;return this.model.getDisplayData(this.configs.groups).filter((function(n){return n[e.services.cartesianScales.getDomainIdentifier(n)]===t}))},e.prototype.getGroupWidth=function(){var t=this.model.getGroupedData(this.configs.groups),e=this.getTotalGroupPadding();return this.getBarWidth()*t.length+e},e.prototype.getTotalGroupPadding=function(){var t=this.model.getGroupedData(this.configs.groups);if(1===t.length)return 0;var e=this.services.cartesianScales.getDomainScale();return Math.min(5,e.step()/70*5)*(t.length-1)},e.prototype.getBarWidth=function(){var t=this.getOptions(),e=La.getProperty(t,"bars","width"),n=La.getProperty(t,"bars","maxWidth");if(null!==e&&(null===n||e<=n))return e;var r=this.model.getGroupedData(this.configs.groups).length,i=this.getTotalGroupPadding(),a=this.services.cartesianScales.getDomainScale();return Math.min(n,(a.step()-i)/r)},e.prototype.setGroupScale=function(){var t=this.model.getActiveDataGroupNames(this.configs.groups);this.groupScale=is().domain(t).rangeRound([0,this.getGroupWidth()])},e}(Ng),Vg=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;this.model.setStackedGroups(this.model.getDataGroupNames()),t.addEventListener(W.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(W.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.getContainerSVG({withinChartClip:!0}),i=this.getOptions(),a=i.data.groupMapsTo,o=this.model.getStackedData({groups:this.configs.groups}),s=n.selectAll("g.bars").data(o,(function(t){return t.key}));s.exit().attr("opacity",0).remove(),s.enter().append("g").classed("bars",!0).attr("role",r.GROUP).attr("data-name","bars");var u=n.selectAll("g.bars").selectAll("path.bar").data((function(t){return t}),(function(t){return t.data.sharedStackKey}));u.exit().remove(),u.enter().append("path").merge(u).classed("bar",!0).transition(this.services.transitions.getTransition("bar-update-enter",t)).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[E.FILL],dataGroupName:t[a],originalClassName:"bar"})})).attr("fill",(function(t){return e.model.getFillColor(t[a])})).attr("d",(function(t,n){var r=t.data.sharedStackKey,a=e.getBarWidth(),o=e.services.cartesianScales.getDomainValue(r,n)-a/2,s=o+a,u=e.services.cartesianScales.getRangeValue(t[0],n),l=e.services.cartesianScales.getRangeValue(t[1],n);if(!e.isOutsideZoomedDomain(o,s))return Math.abs(l-u)>0&&Math.abs(l-u)>i.bars.dividerSize&&(e.services.cartesianScales.getOrientation()===A.VERTICAL?l+=1:l-=1),La.generateSVGPathString({x0:o,x1:s,y0:u,y1:l},e.services.cartesianScales.getOrientation())})).attr("opacity",1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t[1]-t[0]})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this.getOptions().data.groupMapsTo,e=this;this.parent.selectAll("path.bar").on("mouseover",(function(n){var r,i=Ga(this);i.classed("hovered",!0),i.transition(e.services.transitions.getTransition("graph_element_mouseover_fill_update")),e.services.events.dispatchEvent(W.Bar.BAR_MOUSEOVER,{element:i,datum:n});var a=e.model.getDisplayData(e.configs.groups).find((function(r){var i=e.services.cartesianScales.getDomainIdentifier(r);return r[e.services.cartesianScales.getRangeIdentifier(r)]===n.data[n.group]&&r[i].toString()===n.data.sharedStackKey&&r[t]===n.group}));if(void 0===a){var o=e.services.cartesianScales.getDomainIdentifier(),s=e.services.cartesianScales.getRangeIdentifier();(r={})[o]=n.data.sharedStackKey,r[s]=n.data[n.group],r[t]=n.group,a=r}e.services.events.dispatchEvent(W.Tooltip.SHOW,{hoveredElement:i,data:[a]})})).on("mousemove",(function(t){var n=Ga(this);e.services.events.dispatchEvent(W.Bar.BAR_MOUSEMOVE,{element:n,datum:t}),e.services.events.dispatchEvent(W.Tooltip.MOVE)})).on("click",(function(t){e.services.events.dispatchEvent(W.Bar.BAR_CLICK,{element:Ga(this),datum:t})})).on("mouseout",(function(t){var n=Ga(this);n.classed("hovered",!1),e.services.events.dispatchEvent(W.Bar.BAR_MOUSEOUT,{element:n,datum:t}),e.services.events.dispatchEvent(W.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(W.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(W.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Ng),Ug=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="scatter",e.handleChartHolderOnHover=function(t){e.parent.selectAll("circle.dot").transition(e.services.transitions.getTransition("chart-holder-hover-scatter")).attr("opacity",1)},e.handleChartHolderOnMouseOut=function(t){e.parent.selectAll("circle.dot").transition(e.services.transitions.getTransition("chart-holder-mouseout-scatter")).attr("opacity",0)},e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.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(W.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(W.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),this.configs.fadeInOnChartHolderMouseover&&(t.addEventListener(W.Chart.MOUSEOVER,this.handleChartHolderOnHover),t.addEventListener(W.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut))},e.prototype.filterBasedOnZoomDomain=function(t){var e=this.services.cartesianScales.getDomainIdentifier(t),n=this.model.get("zoomDomain");return void 0!==n?t.filter((function(t){return t[e].getTime()>n[0].getTime()&&t[e].getTime()<n[1].getTime()})):t},e.prototype.render=function(t){var e=this;if(La.getProperty(this.getOptions(),"points","enabled")||La.getProperty(this.getOptions(),"bubble","enabled")){var n,r=this.getContainerSVG({withinChartClip:!0}),i=this.getOptions();i.data.groupMapsTo;if(this.configs.stacked){var a=Object.keys(i.axes).some((function(t){return i.axes[t].percentage}));n=this.model.getStackedData({groups:this.configs.groups,percentage:a})}else n=this.model.getDisplayData(this.configs.groups).filter((function(t){var n=e.services.cartesianScales.getRangeIdentifier(t);return void 0!==t[n]&&null!==t[n]}));n=this.filterBasedOnZoomDomain(n);var o=r.selectAll("circle.dot").data(n);o.exit().attr("opacity",0).remove();var s=o.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(o);this.styleCircles(s,t),this.addEventListeners()}},e.prototype.isDatapointThresholdAnomaly=function(t,e){var n=this;if(!this.configs.handleThresholds)return!1;var r=this.services.cartesianScales.getOrientation(),i=La.flipDomainAndRangeBasedOnOrientation(this.services.cartesianScales.getHighestDomainThreshold(),this.services.cartesianScales.getHighestRangeThreshold(),r),a=i[0],o=i[1],s=La.flipDomainAndRangeBasedOnOrientation((function(t,e){return n.services.cartesianScales.getDomainValue(t,e)}),(function(t,e){return n.services.cartesianScales.getRangeValue(t,e)}),r),u=s[0],l=s[1],c=u(t,e),h=l(t,e);return o&&a?h<=o.scaleValue&&c>=a.scaleValue:o?h<=o.scaleValue:a?c>=a.scaleValue:void 0},e.prototype.styleCircles=function(t,e){var n=this,i=this.getOptions(),a=i.points,o=a.filled,s=a.fillOpacity,u=this.services,l=u.cartesianScales,c=u.transitions,h=i.data.groupMapsTo,f=La.flipDomainAndRangeBasedOnOrientation((function(t,e){return l.getDomainValue(t,e)}),(function(t,e){return l.getRangeValue(t,e)}),l.getOrientation()),d=f[0],p=f[1],g=this.configs.fadeInOnChartHolderMouseover;t.raise().classed("dot",!0).attr("class",(function(t){var e=l.getDomainIdentifier(t),r=n.model.getIsFilled(t[h],t[e],t,o)?[E.FILL,E.STROKE]:[E.STROKE];return n.model.getColorClassName({classNameTypes:r,dataGroupName:t[h],originalClassName:"dot"})})).classed("threshold-anomaly",(function(t,e){return n.isDatapointThresholdAnomaly(t,e)})).classed("filled",(function(t){var e=l.getDomainIdentifier(t);return n.model.getIsFilled(t[h],t[e],t,o)})).classed("unfilled",(function(t){var e=l.getDomainIdentifier(t);return!n.model.getIsFilled(t[h],t[e],t,o)})).transition(c.getTransition("scatter-update-enter",e)).attr("cx",d).attr("cy",p).attr("r",i.points.radius).attr("fill",(function(t){var e=l.getDomainIdentifier(t);if(n.model.getIsFilled(t[h],t[e],t,o))return n.model.getFillColor(t[h],t[e],t)})).attr("fill-opacity",o?s:1).attr("stroke",(function(t){var e=l.getDomainIdentifier(t);return n.model.getStrokeColor(t[h],t[e],t)})).attr("opacity",g?0:1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","point").attr("aria-label",(function(t){return t[l.getRangeIdentifier(t)]})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this,e=t.getOptions().data.groupMapsTo;this.parent.selectAll("circle").on("mouseover",(function(n){var r=Ga(this);r.classed("hovered",!0).attr("class",(function(n){return t.model.getColorClassName({classNameTypes:[E.FILL],dataGroupName:n[e],originalClassName:r.attr("class")})})).style("fill",(function(n){var r=t.services.cartesianScales.getDomainIdentifier(n);return t.model.getFillColor(n[e],n[r],n)})).classed("unfilled",!1),t.services.events.dispatchEvent(W.Tooltip.SHOW,{hoveredElement:r,data:[n]}),t.services.events.dispatchEvent(W.Scatter.SCATTER_MOUSEOVER,{element:r,datum:n})})).on("mousemove",(function(e){var n=Ga(this);t.services.events.dispatchEvent(W.Scatter.SCATTER_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(W.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(W.Scatter.SCATTER_CLICK,{element:Ga(this),datum:e})})).on("mouseout",(function(e){var n=Ga(this);n.classed("hovered",!1),t.configs.filled||"1"!==n.attr("fill-opacity")||(n.classed("unfilled",!0),n.style("fill",null)),t.services.events.dispatchEvent(W.Scatter.SCATTER_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(W.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(W.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(W.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),t.removeEventListener(W.Chart.MOUSEOVER,this.handleChartHolderOnHover),t.removeEventListener(W.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut)},e}(vg),zg=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.getOptions(),n=e.bubble.radiusMapsTo,r=t.data(),i=r.map((function(t){return t[n]})).filter((function(t){return t})),a=Cf.getSVGElementSize(this.services.domUtils.getMainSVG(),{useAttr:!0}),o=i.length>0,s=o?Ho(i):[1,1];return ku().domain(s).range(o?e.bubble.radiusRange(a,r):[4,4])},e.prototype.styleCircles=function(t,e){var n=this,i=this.getOptions(),a=i.bubble.radiusMapsTo,o=this.getRadiusScale(t),s=i.data.groupMapsTo;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 o(t[a]||1)})).attr("class",(function(t){return n.model.getColorClassName({classNameTypes:[E.FILL,E.STROKE],dataGroupName:t[s],originalClassName:"dot"})})).attr("fill",(function(t){var e=n.services.cartesianScales.getDomainIdentifier(t);return n.model.getFillColor(t[s],t[e],t)})).attr("stroke",(function(t){var e=n.services.cartesianScales.getDomainIdentifier(t);return n.model.getStrokeColor(t[s],t[e],t)})).attr("fill-opacity",i.bubble.fillOpacity).attr("opacity",1)},e}(Ug),Hg=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("path.line").transition(e.services.transitions.getTransition("legend-hover-line")).attr("opacity",(function(t){return t.name!==n.datum().name?io.opacity.unselected:io.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.line").transition(e.services.transitions.getTransition("legend-mouseout-line")).attr("opacity",io.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(W.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(W.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getContainerSVG({withinChartClip:!0}),i=this.services,a=i.cartesianScales,o=i.curves,s=La.flipDomainAndRangeBasedOnOrientation((function(t,e){return a.getDomainValue(t,e)}),(function(t,e){return a.getRangeValue(t,e)}),a.getOrientation()),u=s[0],l=s[1],c=this.getOptions(),h=rh().x(u).y(l).curve(o.getD3Curve()).defined((function(t,e){var n=t[a.getRangeIdentifier(t)];return null!=n})),f=[];if(this.configs.stacked){var d=Object.keys(c.axes).some((function(t){return c.axes[t].percentage})),p=c.data.groupMapsTo;f=this.model.getStackedData({groups:this.configs.groups,percentage:d}).map((function(t){var n=e.services.cartesianScales.getDomainIdentifier(t),r=e.services.cartesianScales.getRangeIdentifier(t);return{name:t[0][p],data:t.map((function(t){var e;return(e={})[n]=t.data.sharedStackKey,e[p]=t[p],e[r]=t[1],e})),hidden:!La.some(t,(function(t){return t[0]!==t[1]}))}}))}else f=this.model.getGroupedData(this.configs.groups);var g=n.selectAll("path.line").data(f,(function(t){return t.name}));g.exit().attr("opacity",0).remove(),g.enter().append("path").classed("line",!0).attr("opacity",0).merge(g).data(f,(function(t){return t.name})).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[E.STROKE],dataGroupName:t.name,originalClassName:"line"})})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","line").attr("aria-label",(function(t){return t.data.map((function(t){return t[e.services.cartesianScales.getRangeIdentifier(t)]})).join(",")})).transition(this.services.transitions.getTransition("line-update-enter",t)).attr("opacity",(function(t){return t.hidden?0:1})).attr("stroke",(function(t){return e.model.getStrokeColor(t.name)})).attr("d",(function(t){var e=t.data;return h(e)}))},e.prototype.destroy=function(){this.parent.selectAll("path.line").on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(W.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(W.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(vg),Fg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="scatter-stacked",e}return n(e,t),e.prototype.render=function(t){var e=this;if(La.getProperty(this.getOptions(),"points","enabled")){var n=this.getContainerSVG({withinChartClip:!0}),i=this.getOptions(),a=i.data.groupMapsTo,o=Object.keys(i.axes).some((function(t){return i.axes[t].percentage})),s=this.model.getStackedData({groups:this.configs.groups,percentage:o}),u=n.selectAll("g.dots").data(s,(function(t){return t[0][a]}));u.exit().attr("opacity",0).remove();var l=u.enter().append("g").classed("dots",!0).attr("role",r.GROUP).merge(u).selectAll("circle.dot").data((function(t){return t}));l.exit().attr("opacity",0).remove();var c=l.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(l).datum((function(t){var n,r=t[a],i=e.services.cartesianScales.getDomainIdentifier(t),o=e.services.cartesianScales.getRangeIdentifier(t);return(n={})[a]=r,n[i]=t.data.sharedStackKey,n[o]=t[1],n}));this.styleCircles(c,t),this.addEventListeners()}},e.prototype.getTooltipData=function(t,e){var n=this,r=this.getOptions(),i=r.data.groupMapsTo,a=Object.keys(r.axes).some((function(t){return r.axes[t].percentage})),o=this.model.getStackedData({groups:this.configs.groups,percentage:a}),s=[];return o.forEach((function(r,o){r.forEach((function(r,u){var l,c=r[i],h=r.data.sharedStackKey,f=r.data[c],d=r[1],p=n.services.cartesianScales.getDomainIdentifier(r),g=n.services.cartesianScales.getRangeIdentifier(r);null!=f&&t===n.services.cartesianScales.getDomainValue(h)&&e===n.services.cartesianScales.getRangeValue(d)&&(a&&(f=n.model.getStackedData({groups:n.configs.groups})[o][u].data[c]),null!==f&&s.push(((l={})[i]=c,l[p]=h,l[g]=f,l)))}))})),this.model.getDisplayData(this.configs.groups).filter((function(t){var e=n.services.cartesianScales.getDomainIdentifier(t),r=n.services.cartesianScales.getRangeIdentifier(t);return void 0!==s.find((function(n){return n[i]==t[i]&&n[e]==t[e]&&n[r]==t[r]}))}))},e}(Ug);function jg(t,e){var n=this,r=Xs(this._current,t);return function(t){return n._current=r(t),e(n._current)}}var Wg=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.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(W.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(W.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.getInnerRadius=function(){return oo.innerRadius},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this,i=this.getContainerSVG(),a=this.model.getDisplayData(),o=this.getOptions(),s=o.data.groupMapsTo,u=this.computeRadius();this.arc=Qc().innerRadius(this.getInnerRadius()).outerRadius(u),this.hoverArc=Qc().innerRadius(this.getInnerRadius()).outerRadius(u+oo.hoverArc.outerRadiusOffset);var l=function(){var t=oh,e=ah,n=null,r=kc(0),i=kc(Hc),a=kc(0);function o(o){var s,u,l,c,h,f=o.length,d=0,p=new Array(f),g=new Array(f),v=+r.apply(this,arguments),m=Math.min(Hc,Math.max(-Hc,i.apply(this,arguments)-v)),y=Math.min(Math.abs(m)/f,a.apply(this,arguments)),_=y*(m<0?-1:1);for(s=0;s<f;++s)(h=g[p[s]=s]=+t(o[s],s,o))>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(o[t],o[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:o[u],index:s,value:h,startAngle:v,endAngle:c,padAngle:y};return g}return o.value=function(e){return arguments.length?(t="function"==typeof e?e:kc(+e),o):t},o.sortValues=function(t){return arguments.length?(e=t,n=null,o):e},o.sort=function(t){return arguments.length?(n=t,e=null,o):n},o.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:kc(+t),o):r},o.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:kc(+t),o):i},o.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:kc(+t),o):a},o}().value((function(t){return t.value})).sort(null).padAngle(oo.padAngle)(a).sort((function(t,e){return t.index-e.index})),c=Cf.appendOrSelect(i,"g.slices").attr("role",r.GROUP).attr("data-name","slices").selectAll("path.slice").data(l,(function(t){return t.data[s]}));c.exit().attr("opacity",0).remove(),c.enter().append("path").classed("slice",!0).attr("opacity",0).merge(c).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[E.FILL],dataGroupName:t.data[s],originalClassName:"slice"})})).attr("fill",(function(t){return n.model.getFillColor(t.data[s])})).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+", "+La.convertValueToPercentage(t.data.value,a)+"%"})).attrTween("d",(function(t){return jg.bind(this)(t,n.arc)}));var h=l.filter((function(t){return t.value>0})),f=Cf.appendOrSelect(i,"g.labels").attr("role",r.GROUP).attr("data-name","labels").selectAll("text.pie-label").data(h,(function(t){return t.data[s]}));f.exit().attr("opacity",0).remove();var d=f.enter().append("text").classed("pie-label",!0),p=[];d.merge(f).style("text-anchor","middle").text((function(t){return o.pie.labels.formatter?o.pie.labels.formatter(t):La.convertValueToPercentage(t.data.value,a)+"%"})).datum((function(t){var e=u+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=h.length,r=(t.endAngle-t.startAngle)*(180/Math.PI);if(e>=n-2&&r<oo.callout.minSliceDegree){var i=void 0,a=void 0;return t.index===n-1?(i=t.xPosition+oo.callout.offsetX+oo.callout.textMargin+t.textOffsetX,a=t.yPosition-oo.callout.offsetY,t.direction=I.RIGHT,p.push(t)):(i=t.xPosition-oo.callout.offsetX-t.textOffsetX-oo.callout.textMargin,a=t.yPosition-oo.callout.offsetY,t.direction=I.LEFT,p.push(t)),"translate("+i+", "+a+")"}return"translate("+t.xPosition+", "+t.yPosition+")"})),this.renderCallouts(p);var g=La.getProperty(o,"donut")?"donut":"pie",v=La.getProperty(o,g,"alignment"),m=Cf.getSVGElementSize(this.getParent(),{useAttr:!0}).width,y=u+oo.xOffset;v===P.CENTER?y=m/2:v===P.RIGHT&&(y=m-u-oo.xOffset);var _=u+oo.yOffset;p.length>0&&(_+=oo.yOffsetCallout),i.attr("transform","translate("+y+", "+_+")"),this.addEventListeners()},e.prototype.renderCallouts=function(t){var e=Cf.appendOrSelect(this.getContainerSVG(),"g.callouts").attr("role",r.GROUP).attr("data-name","callouts"),n=e.selectAll("g.callout").data(t);n.exit().remove();var i=n.enter().append("g").classed("callout",!0).attr("role",r.GRAPHICS_SYMBOL+" "+r.GROUP).attr("aria-roledescription","label callout");i.merge(n).datum((function(t){var e=t.xPosition,n=t.yPosition;return t.direction===I.RIGHT?(t.startPos={x:e,y:n+t.textOffsetY},t.endPos={x:e+oo.callout.offsetX,y:n-oo.callout.offsetY+t.textOffsetY},t.intersectPointX=t.endPos.x-oo.callout.horizontalLineLength):(t.startPos={x:e,y:n+t.textOffsetY},t.endPos={x:e-oo.callout.offsetX,y:n-oo.callout.offsetY+t.textOffsetY},t.intersectPointX=t.endPos.x+oo.callout.horizontalLineLength),t})),i.append("line").classed("vertical-line",!0).merge(e.selectAll("line.vertical-line")).datum((function(t){return Ga(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})),i.append("line").classed("horizontal-line",!0).merge(e.selectAll("line.horizontal-line")).datum((function(t){return Ga(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){var n=Ga(this);n.classed("hovered",!0).transition(t.services.transitions.getTransition("pie_slice_mouseover")).attr("d",t.hoverArc),t.services.events.dispatchEvent(W.Pie.SLICE_MOUSEOVER,{element:Ga(this),datum:e});var r=t.getOptions().data.groupMapsTo;t.services.events.dispatchEvent(W.Tooltip.SHOW,{hoveredElement:n,items:[{label:e.data[r],value:e.data.value}]})})).on("mousemove",(function(e){var n=Ga(this);t.services.events.dispatchEvent(W.Pie.SLICE_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(W.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(W.Pie.SLICE_CLICK,{element:Ga(this),datum:e})})).on("mouseout",(function(e){var n=Ga(this);n.classed("hovered",!1).transition(t.services.transitions.getTransition("pie_slice_mouseover")).attr("d",t.arc),t.services.events.dispatchEvent(W.Pie.SLICE_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(W.Tooltip.HIDE,{hoveredElement:n})}))},e.prototype.computeRadius=function(){var t=Cf.getSVGElementSize(this.parent,{useAttrs:!0}),e=t.width,n=t.height;return Math.min(e,n)/2+oo.radiusOffset},e}(vg),Yg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="gauge",e}return n(e,t),e.prototype.init=function(){this.services.events},e.prototype.getValue=function(){var t,e;return null!=(e=null===(t=this.model.getData().find((function(t){return"value"===t.group})))||void 0===t?void 0:t.value)?e:null},e.prototype.getValueRatio=function(){return La.clamp(this.getValue(),0,100)/100},e.prototype.getDelta=function(){var t,e;return null!=(e=null===(t=this.model.getData().find((function(t){return"delta"===t.group})))||void 0===t?void 0:t.value)?e:null},e.prototype.getArcRatio=function(){var t=this.getOptions();return La.getProperty(t,"gauge","type")===V.FULL?1:.5},e.prototype.getArcSize=function(){return this.getArcRatio()*Math.PI*2},e.prototype.getStartAngle=function(){var t=this.getArcSize();return t===2*Math.PI?0:-t/2},e.prototype.getArrow=function(t){var e=this.getOptions();switch(La.getProperty(e,"gauge","deltaArrow","direction")){case U.UP:return"4,10 8,6 12,10";case U.DOWN:return"12,6 8,10 4,6";default:return t>0?"4,10 8,6 12,10":"12,6 8,10 4,6"}},e.prototype.render=function(t){var e=this,n=this.getContainerSVG(),i=this.getOptions(),a=i.data.groupMapsTo,o=this.getValue(),s=this.getValueRatio(),u=this.getArcSize(),l=this.getStartAngle(),c=l+s*u,h=l+u,f=this.computeRadius(),d=this.getInnerRadius();this.backgroundArc=Qc().innerRadius(d).outerRadius(f).startAngle(c).endAngle(h),this.arc=Qc().innerRadius(d).outerRadius(f).startAngle(l).endAngle(c),Cf.appendOrSelect(n,"path.arc-background").attr("d",this.backgroundArc).attr("role",r.GROUP);var p=n.selectAll("path.arc-foreground").data([o]);p.enter().append("path").merge(p).attr("class",this.model.getColorClassName({classNameTypes:[E.FILL],dataGroupName:"value",originalClassName:"arc-foreground"})).attr("fill",(function(t){return e.model.getFillColor(t[a])})).attr("d",this.arc).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","value").attr("aria-label",(function(t){return t.value})),this.drawValueNumber(),this.drawDelta(),p.exit().remove();var g=La.getProperty(i,"gauge","alignment"),v=Cf.getSVGElementSize(this.getParent(),{useAttr:!0}).width,m=f;g===P.CENTER?m=v/2:g===P.RIGHT&&(m=v-f),n.attr("transform","translate("+m+", "+f+")"),this.addEventListeners()},e.prototype.drawValueNumber=function(){var t=this.getContainerSVG(),e=this.getOptions(),n=La.getProperty(e,"gauge","type"),r=this.getValue(),i=this.getDelta(),a=this.computeRadius(),o=La.getProperty(e,"gauge","valueFontSize"),s=La.getProperty(e,"gauge","deltaFontSize"),u=La.getProperty(e,"gauge","numberSpacing"),l=0;n!==V.FULL||i?n===V.SEMI&&i&&(l=-(s(a)+u)):l=s(a);var c=Cf.appendOrSelect(t,"g.gauge-numbers").attr("transform","translate(0, "+l+")"),h=Cf.appendOrSelect(c,"g.gauge-value-number").attr("transform","translate(-10, 0)"),f=La.getProperty(e,"gauge","numberFormatter"),d=h.selectAll("text.gauge-value-number").data([r]);d.enter().append("text").attr("class","gauge-value-number").merge(d).style("font-size",o(a)+"px").attr("text-anchor","middle").text((function(t){return f(t)}));var p=Cf.getSVGElementSize(Cf.appendOrSelect(t,"text.gauge-value-number"),{useBBox:!0}).width;Cf.appendOrSelect(h,"text.gauge-value-symbol").style("font-size",o(a)/2+"px").attr("x",p/2).text("%")},e.prototype.drawDelta=function(){var t=this.getContainerSVG(),e=this.getOptions(),n=this.getDelta(),r=this.computeRadius(),i=n?La.getProperty(e,"gauge","deltaFontSize"):function(){return 0},a=n?La.getProperty(e,"gauge","numberFormatter"):function(){return null},o=La.getProperty(e,"gauge","deltaArrow","size"),s=La.getProperty(e,"gauge","numberSpacing"),u=Cf.appendOrSelect(t,"g.gauge-numbers"),l=Cf.appendOrSelect(u,"g.gauge-delta").attr("transform","translate(0, "+(i(r)+s)+")"),c=Cf.appendOrSelect(l,"text.gauge-delta-number");c.data(null===n?[]:[n]),c.enter().append("text").classed("gauge-delta-number",!0).merge(c).attr("text-anchor","middle").style("font-size",i(r)+"px").text((function(t){return a(t)+"%"}));var h=Cf.getSVGElementSize(Cf.appendOrSelect(t,".gauge-delta-number"),{useBBox:!0}).width,f=La.getProperty(e,"gauge","deltaArrow","enabled"),d=l.selectAll("svg.gauge-delta-arrow").data(null!==n&&f?[n]:[]);d.enter().append("svg").merge(d).attr("class","gauge-delta-arrow").attr("x",-o(r)-h/2).attr("y",-o(r)/2-.35*i(r)).attr("width",o(r)).attr("height",o(r)).attr("viewBox","0 0 16 16"),Cf.appendOrSelect(d,"rect.gauge-delta-arrow-backdrop").attr("width","16").attr("height","16").attr("fill","none");var p=La.getProperty(e,"gauge","status");Cf.appendOrSelect(d,"polygon.gauge-delta-arrow").attr("class",null!==p?"gauge-delta-arrow status--"+p:"").attr("fill",(function(){return null===p?"currentColor":null})).attr("points",this.getArrow(n)),d.exit().remove(),c.exit().remove()},e.prototype.getInnerRadius=function(){return this.computeRadius()-La.getProperty(this.getOptions(),"gauge","arcWidth")},e.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("path.arc-foreground").on("mouseover",(function(e){t.services.events.dispatchEvent(W.Gauge.ARC_MOUSEOVER,{element:Ga(this),datum:e})})).on("mousemove",(function(e){var n=Ga(this);t.services.events.dispatchEvent(W.Gauge.ARC_MOUSEMOVE,{element:n,datum:e})})).on("click",(function(e){t.services.events.dispatchEvent(W.Gauge.ARC_CLICK,{element:Ga(this),datum:e})})).on("mouseout",(function(e){var n=Ga(this);t.services.events.dispatchEvent(W.Gauge.ARC_MOUSEOUT,{element:n,datum:e})}))},e.prototype.computeRadius=function(){var t=this.getOptions(),e=La.getProperty(t,"gauge","type"),n=Cf.getSVGElementSize(this.parent,{useAttrs:!0}),r=n.width,i=n.height;return e===V.SEMI?Math.min(r/2,i):Math.min(r/2,i/2)},e}(vg),Xg=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=Cf.appendOrSelect(this.getContainerSVG(),"g.center"),i=this.getOptions(),a=this.computeRadius();Cf.appendOrSelect(r,"text.donut-figure").attr("text-anchor","middle").style("font-size",(function(){return i.donut.center.numberFontSize(a)})).transition(this.services.transitions.getTransition("donut-figure-enter-update",e)).tween("text",(function(){return n.centerNumberTween(Ga(this))})),Cf.appendOrSelect(r,"text.donut-title").attr("text-anchor","middle").style("font-size",(function(){return i.donut.center.titleFontSize(a)})).attr("y",i.donut.center.titleYPosition(a)).text(La.getProperty(i,"donut","center","label"))}},e.prototype.getInnerRadius=function(){return.75*this.computeRadius()},e.prototype.centerNumberTween=function(t){var e=this.getOptions(),n=La.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?qs:Hs)(r,n);return function(n){var r=e.donut.center.numberFormatter;t.text(r(i(n)))}},e}(Wg),qg=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=Cf.getSVGElementSize(e,{useAttrs:!0}),r=n.width,i=n.height;t.attr("width",r).attr("height",i);var a=La.getProperty(this.getOptions(),"data","loading");a?this.renderSkeleton(a):this.removeSkeleton()},e.prototype.renderSkeleton=function(t){if(this.configs.skeleton===N.GRID)this.renderGridSkeleton(t);else if(this.configs.skeleton===N.VERT_OR_HORIZ)this.renderVertOrHorizSkeleton(t);else if(this.configs.skeleton===N.PIE)this.renderPieSkeleton(t);else{if(this.configs.skeleton!==N.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===A.VERTICAL&&this.drawYGrid(t),e===A.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=ku().domain([0,1]).range(t),this.yScale=ku().domain([0,1]).range(e)},e.prototype.drawBackdrop=function(t){var e=this.parent,n=e.node().parentNode,r=Cf.getSVGElementSize(n,{useAttrs:!0}),i=r.width,a=r.height;this.backdrop=Cf.appendOrSelect(e,"svg.chart-skeleton.DAII").attr("width",i).attr("height",a);var o=Cf.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop");o.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(o).attr("x",u).attr("y",c),o.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=La.getProperty(this.getOptions(),"grid","x","numberOfTicks"),i=this.xScale.ticks(r).map((function(t){return t*n})),a=Cf.appendOrSelect(this.backdrop,"g.x.skeleton"),o=a.selectAll("line").data(i);o.enter().append("line").merge(o).attr("x1",(function(t){return t})).attr("x2",(function(t){return t})).attr("y1",0).attr("y2",e),a.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=La.getProperty(this.getOptions(),"grid","y","numberOfTicks"),i=this.xScale.ticks(r).map((function(t){return t*e})),a=Cf.appendOrSelect(this.backdrop,"g.y.skeleton"),o=a.selectAll("line").data(i);o.enter().append("line").merge(o).attr("x1",0).attr("x2",n).attr("y1",(function(t){return t})).attr("y2",(function(t){return t})),a.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=Cf.getSVGElementSize(r.node().parentNode,{useAttrs:!0}),a=i.width,o=i.height,s=Cf.appendOrSelect(r,"svg.chart-skeleton").attr("width",a).attr("height",o),u=0===e?"pie":"donut",l=La.getProperty(this.getOptions(),u,"alignment");Cf.appendOrSelect(s,"rect.chart-skeleton-area-container").attr("width",a).attr("height",o).attr("fill","none");var c=Qc().innerRadius(e).outerRadius(t).startAngle(0).endAngle(2*Math.PI),h=t+Math.abs(oo.radiusOffset),f=t+(Math.min(a,o)-2*t)/2,d=Cf.appendOrSelect(s,"path").attr("class","skeleton-area-shape").attr("transform","translate("+h+", "+f+")").attr("d",c).classed("shimmer-effect-areas",n).classed("empty-state-areas",!n),p=t+oo.xOffset;l===P.CENTER?p=a/2:l===P.RIGHT&&(p=a-t-oo.xOffset);var g=t+oo.yOffset;d.attr("transform","translate("+p+", "+g+")")},e.prototype.computeOuterRadius=function(){var t=Cf.getSVGElementSize(this.parent.node().parentNode,{useAttrs:!0}),e=t.width,n=t.height;return Math.min(e,n)/2+oo.radiusOffset},e.prototype.computeInnerRadius=function(){return.75*this.computeOuterRadius()},e.prototype.setShimmerEffect=function(t){var e=this.parent.select(".chart-skeleton"),n=Cf.getSVGElementSize(this.parent,{useAttrs:!0}).width,r=n,i=Cf.appendOrSelect(e,"defs").lower(),a=Cf.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)");a.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(){a.attr("gradientTransform","translate("+(0-3*.2*n)+", 0)").transition().duration(2e3).delay(1e3).ease(Vd).attr("gradientTransform","translate("+(r+3*.2*n)+", 0)").on("end",t)}()},e.prototype.removeSkeleton=function(){this.parent.select(".chart-skeleton").remove()},e}(vg),Zg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="skeleton-lines",e}return n(e,t),e.prototype.render=function(){var e=this.parent,n=e.node().parentNode,r=Cf.getSVGElementSize(n,{useAttrs:!0}),i=r.width,a=r.height;e.attr("width",i).attr("height",a);var o=La.getProperty(this.getOptions(),"data","loading"),s=!(La.getProperty(this.getOptions(),"grid","x","enabled")||La.getProperty(this.getOptions(),"grid","y","enabled")||La.getProperty(this.getOptions(),"axes","bottom","visible")||La.getProperty(this.getOptions(),"axes","left","visible"));o&&!s?t.prototype.renderGridSkeleton.call(this,o):o&&s?this.renderSparklineSkeleton(o):this.removeSkeleton()},e.prototype.renderSparklineSkeleton=function(t){this.setScales(),this.drawBackdrop(t),this.drawSparkline(t),this.updateBackdropStyle(),t&&this.setShimmerEffect("shimmer-lines")},e.prototype.drawSparkline=function(t){var e=this.backdrop.attr("width"),n=Cf.appendOrSelect(this.backdrop,"g.y.skeleton"),r=n.selectAll("line").data([100]);r.enter().append("line").merge(r).attr("x1",0).attr("x2",e).attr("y1",(function(t){return t})).attr("y2",(function(t){return t})),n.selectAll("line").classed("shimmer-effect-lines",t).classed("empty-state-lines",!t)},e.prototype.updateBackdropStyle=function(){var t=this.parent;this.backdrop=Cf.appendOrSelect(t,"svg.chart-skeleton.DAII");var e=Cf.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop");e.classed("shimmer-effect-lines",!1),e.classed("shimmer-effect-sparkline",!0)},e}(qg);function Kg(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 $g(t,e){var n,r,i,a,o,s=new ev(t),u=+t.value&&(s.value=t.value),l=[s];for(null==e&&(e=Qg);n=l.pop();)if(u&&(n.value=+n.data.value),(i=e(n.data))&&(o=i.length))for(n.children=new Array(o),a=o-1;a>=0;--a)l.push(r=n.children[a]=new ev(i[a])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(tv)}function Qg(t){return t.children}function Jg(t){t.data=t.data.data}function tv(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function ev(t){this.data=t,this.depth=this.height=0,this.parent=null}function nv(t){if("function"!=typeof t)throw new Error;return t}function rv(){return 0}function iv(t){return function(){return t}}function av(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 ov(t,e,n,r,i){for(var a,o=t.children,s=-1,u=o.length,l=t.value&&(r-e)/t.value;++s<u;)(a=o[s]).y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*l}function sv(t,e,n,r,i){for(var a,o=t.children,s=-1,u=o.length,l=t.value&&(i-n)/t.value;++s<u;)(a=o[s]).x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*l}ev.prototype=$g.prototype={constructor:ev,count:function(){return this.eachAfter(Kg)},each:function(t){var e,n,r,i,a=this,o=[a];do{for(e=o.reverse(),o=[];a=e.pop();)if(t(a),n=a.children)for(r=0,i=n.length;r<i;++r)o.push(n[r])}while(o.length);return this},eachAfter:function(t){for(var e,n,r,i=this,a=[i],o=[];i=a.pop();)if(o.push(i),e=i.children)for(n=0,r=e.length;n<r;++n)a.push(e[n]);for(;i=o.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 $g(this).eachBefore(Jg)}};var uv=function t(e){function n(t,n,r,i,a){!function(t,e,n,r,i,a){for(var o,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=a-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(o={value:c,dice:u<l,children:y.slice(_,b)}),o.dice?ov(o,n,r,i,w?r+=l*c/w:a):sv(o,n,r,w?n+=u*c/w:i,a),w-=c,_=b}}(e,t,n,r,i,a)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}((1+Math.sqrt(5))/2);function lv(){var t=uv,e=!1,n=1,r=1,i=[0],a=rv,o=rv,s=rv,u=rv,l=rv;function c(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(h),i=[0],e&&t.eachBefore(av),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]=a(e)/2,r+=l(e)-n,c+=o(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=nv(e),c):t},c.padding=function(t){return arguments.length?c.paddingInner(t).paddingOuter(t):c.paddingInner()},c.paddingInner=function(t){return arguments.length?(a="function"==typeof t?t:iv(+t),c):a},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?(o="function"==typeof t?t:iv(+t),c):o},c.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:iv(+t),c):s},c.paddingBottom=function(t){return arguments.length?(u="function"==typeof t?t:iv(+t),c):u},c.paddingLeft=function(t){return arguments.length?(l="function"==typeof t?t:iv(+t),c):l},c}var cv,hv={black:{100:"#000000"},blue:{10:"#edf5ff",20:"#d0e2ff",30:"#a6c8ff",40:"#78a9ff",50:"#4589ff",60:"#0f62fe",70:"#0043ce",80:"#002d9c",90:"#001d6c",100:"#001141"},coolGray:{10:"#f2f4f8",20:"#dde1e6",30:"#c1c7cd",40:"#a2a9b0",50:"#878d96",60:"#697077",70:"#4d5358",80:"#343a3f",90:"#21272a",100:"#121619"},cyan:{10:"#e5f6ff",20:"#bae6ff",30:"#82cfff",40:"#33b1ff",50:"#1192e8",60:"#0072c3",70:"#00539a",80:"#003a6d",90:"#012749",100:"#061727"},gray:{10:"#f4f4f4",20:"#e0e0e0",30:"#c6c6c6",40:"#a8a8a8",50:"#8d8d8d",60:"#6f6f6f",70:"#525252",80:"#393939",90:"#262626",100:"#161616"},green:{10:"#defbe6",20:"#a7f0ba",30:"#6fdc8c",40:"#42be65",50:"#24a148",60:"#198038",70:"#0e6027",80:"#044317",90:"#022d0d",100:"#071908"},magenta:{10:"#fff0f7",20:"#ffd6e8",30:"#ffafd2",40:"#ff7eb6",50:"#ee5396",60:"#d02670",70:"#9f1853",80:"#740937",90:"#510224",100:"#2a0a18"},orange:{40:"#ff832b"},purple:{10:"#f6f2ff",20:"#e8daff",30:"#d4bbff",40:"#be95ff",50:"#a56eff",60:"#8a3ffc",70:"#6929c4",80:"#491d8b",90:"#31135e",100:"#1c0f30"},red:{10:"#fff1f1",20:"#ffd7d9",30:"#ffb3b8",40:"#ff8389",50:"#fa4d56",60:"#da1e28",70:"#a2191f",80:"#750e13",90:"#520408",100:"#2d0709"},teal:{10:"#d9fbfb",20:"#9ef0f0",30:"#3ddbd9",40:"#08bdba",50:"#009d9a",60:"#007d79",70:"#005d5d",80:"#004144",90:"#022b30",100:"#081a1c"},warmGray:{10:"#f7f3f2",20:"#e5e0df",30:"#cac5c4",40:"#ada8a8",50:"#8f8b8b",60:"#726e6e",70:"#565151",80:"#3c3838",90:"#272525",100:"#171414"},white:{0:"#ffffff"},yellow:{20:"#fdd13a",30:"#f1c21b"}},fv=function(){var t,e=Ga(this.parentNode).select("rect.leaf"),n=xs(getComputedStyle(e.node(),null).getPropertyValue("fill"));if(n&&(t=function(t){if(!t)return null;for(var e=0,n=Object.keys(hv);e<n.length;e++)for(var r=n[e],i=hv[r],a=0,o=Object.keys(i);a<o.length;a++){var s=o[a];if(i[s]===t)return s}return null}(n?n.hex():null)),null==t){var r=ks(n).l;t=Math.abs(100*r-100)}return t>50?"white":"black"},dv=0,pv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="treemap",e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("g[data-name='leaf']").transition(e.services.transitions.getTransition("legend-hover-treemap")).attr("opacity",(function(t){return t.parent.data.name===n.datum().name?1:.3}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("g[data-name='leaf']").transition(e.services.transitions.getTransition("legend-mouseout-treemap")).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(W.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(W.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getContainerSVG(),r=this.model.getData(),i=this.model.getDisplayData(),a=this.model.getOptions(),o=La.getProperty(window,"location"),s=Cf.getSVGElementSize(this.parent,{useAttrs:!0}),u=s.width,l=s.height,c=$g({name:a.title||"Treemap",children:i}).sum((function(t){return t.value})).sort((function(t,e){return e.value-t.value})),h=($o(r,(function(t){return $o(t.children,(function(t){return t.value}))})),lv().size([u,l]).paddingInner(1).paddingOuter(0).round(!0)(c)),f=this.services.transitions,d=n.selectAll("g[data-name='leaf']").data(h.leaves(),(function(t){return t.data.name}));d.exit().attr("opacity",0).remove();var p=d.enter().append("g").attr("data-name","leaf").attr("data-uid",(function(){return dv++})).merge(d);p.attr("data-name","leaf").transition(f.getTransition("treemap-group-update",t)).attr("transform",(function(t){return"translate("+t.x0+","+t.y0+")"}));var g=p.selectAll("rect.leaf").data((function(t){return[t]}));g.exit().attr("width",0).attr("height",0).remove(),g.enter().append("rect").classed("leaf",!0).merge(g).attr("width",0).attr("height",0).attr("id",(function(){var t=Ga(this.parentNode).attr("data-uid");return a.style.prefix+"-leaf-"+t})).attr("class",(function(t){for(;t.depth>1;)t=t.parent;return e.model.getColorClassName({classNameTypes:[E.FILL],dataGroupName:t.data.name,originalClassName:"leaf"})})).transition(this.services.transitions.getTransition("treemap-leaf-update-enter",t)).attr("width",(function(t){return t.x1-t.x0})).attr("height",(function(t){return t.y1-t.y0})),p.selectAll("clipPath").data((function(t){return!0!==t.data.showLabel?[]:[1]}),(function(t){return t})).join((function(t){t.append("clipPath").attr("id",(function(){var t=Ga(this.parentNode).attr("data-uid");return a.style.prefix+"-clip-"+t})).append("use").attr("xlink:href",(function(){var t=Ga(this.parentNode.parentNode).attr("data-uid"),e=a.style.prefix+"-leaf-"+t;return new URL("#"+e,o)+""}))}),(function(t){return null}),(function(t){return t.remove()})),p.selectAll("text").data((function(t){if(!0!==t.data.showLabel)return[];for(var n=t;n.depth>1;)n=n.parent;var r=ks(e.model.getFillColor(n.data.name));return[{text:t.data.name,color:r.l<.5?"white":"black"}]}),(function(t){return t})).join((function(t){var e=t.append("text").text((function(t){return t.text})).style("fill",fv).attr("x",7).attr("y",18);o&&e.attr("clip-path",(function(){var t=Ga(this.parentNode).attr("data-uid"),e=a.style.prefix+"-clip-"+t;return"url("+new URL("#"+e,o)+")"}))}),(function(t){return t.text((function(t){return t.text})).style("fill",fv)}),(function(t){return t.remove()})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("rect.leaf").on("mouseover",(function(e){for(var n=Ga(this),r=getComputedStyle(this,null).getPropertyValue("fill"),i=e;i.depth>1;)i=i.parent;n.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")).style("fill",(function(t){return xs(r).darker(.7).toString()})),t.services.events.dispatchEvent(W.Tooltip.SHOW,{hoveredElement:n,items:[{color:r,label:i.data.name,bold:!0},{label:e.data.name,value:e.data.value}]}),t.services.events.dispatchEvent(W.Treemap.LEAF_MOUSEOVER,{element:n,datum:e})})).on("mousemove",(function(e){var n=Ga(this);t.services.events.dispatchEvent(W.Treemap.LEAF_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(W.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(W.Treemap.LEAF_CLICK,{element:Ga(this),datum:e})})).on("mouseout",(function(e){var n=Ga(this);n.classed("hovered",!1);for(var r=e;r.depth>1;)r=r.parent;n.transition(t.services.transitions.getTransition("graph_element_mouseout_fill_update")).style("fill",null),t.services.events.dispatchEvent(W.Treemap.LEAF_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(W.Tooltip.HIDE,{hoveredElement:n})}))},e}(vg);function gv(t){var e,n=(mv(t)%(e=360)+e)%e;return vv(n,[0,10])||vv(n,[350,0])?{textAnchor:G.START,dominantBaseline:B.MIDDLE}:vv(n,[10,80])?{textAnchor:G.START,dominantBaseline:B.HANGING}:vv(n,[80,100])?{textAnchor:G.MIDDLE,dominantBaseline:B.HANGING}:vv(n,[100,170])?{textAnchor:G.END,dominantBaseline:B.HANGING}:vv(n,[170,190])?{textAnchor:G.END,dominantBaseline:B.MIDDLE}:vv(n,[190,260])?{textAnchor:G.END,dominantBaseline:B.BASELINE}:vv(n,[260,280])?{textAnchor:G.MIDDLE,dominantBaseline:B.BASELINE}:{textAnchor:G.START,dominantBaseline:B.BASELINE}}function vv(t,e){var n=e[0],r=e[1];return t>=n&&t<=r}function mv(t){return t*(180/Math.PI)}function yv(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 _v=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="radar",e.getLabelDimensions=function(t){var n=Cf.appendOrSelect(e.getContainerSVG(),"g.tmp-tick"),r=Cf.appendOrSelect(n,"text").text(t),i=Cf.getSVGElementSize(r.node(),{useBBox:!0}),a=i.width,o=i.height;return n.remove(),{width:a,height:o}},e.normalizeFlatData=function(t){var n=e.getOptions(),r=La.getProperty(n,"radar","axes"),i=r.angle,a=r.value,o=La.getProperty(n,"data","groupMapsTo"),s=La.flatMapDeep(e.uniqueKeys.map((function(t){return e.uniqueGroups.map((function(e){var n;return(n={})[i]=t,n[o]=e,n[a]=null,n}))})));return La.merge(s,t)},e.normalizeGroupedData=function(t){var n=e.getOptions(),r=La.getProperty(n,"radar","axes"),i=r.angle,a=r.value,o=La.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={})[o]=n,e[i]=t,e[a]=null,e}));return{name:n,data:La.merge(s,r)}}))},e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;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?so.opacity.unselected:so.opacity.selected})).style("stroke-opacity",(function(t){return t.name!==n.datum().name?so.opacity.unselected:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("g.blobs path").transition(e.services.transitions.getTransition("legend-mouseout-blob")).style("fill-opacity",so.opacity.selected).style("stroke-opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(W.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(W.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getContainerSVG(),i=Cf.getSVGElementSize(this.parent,{useAttrs:!0}),a=i.width,o=i.height,s=this.model.getData(),u=this.model.getDisplayData(),l=this.model.getGroupedData(),c=this.getOptions(),h=La.getProperty(c,"radar","axes"),f=h.angle,d=h.value,p=La.getProperty(c,"data","groupMapsTo"),g=so.xLabelPadding,v=so.yLabelPadding,m=so.yTicksNumber,y=so.minRange,_=so.xAxisRectHeight;this.uniqueKeys=Array.from(new Set(s.map((function(t){return t[f]})))),this.uniqueGroups=Array.from(new Set(s.map((function(t){return t[p]})))),this.displayDataNormalized=this.normalizeFlatData(u),this.groupedDataNormalized=this.normalizeGroupedData(l);var b=2*(this.getLabelDimensions(this.uniqueKeys[0]).height+v),x=(Math.min(a,o)-b)/2;if(!(x<=0)){var w=is().domain(this.displayDataNormalized.map((function(t){return t[f]}))).range([0,2*Math.PI].map((function(t){return t-Math.PI/2}))),O=ku().domain([0,Ko(this.displayDataNormalized.map((function(t){return t[d]})))]).range([y,x]).nice(m),S=O.ticks(m),T=function(t){return e.model.getFillColor(t)},M=ch().angle((function(t){return w(t[f])+Math.PI/2})).radius((function(t){return O(t[d])})).curve(Gh),A=ch().angle(M.angle()).radius((function(t){return cv?cv(t[d]):y})).curve(M.curve()),C={x:Ko(this.uniqueKeys.map((function(t){var n;return e.getLabelDimensions(t).width+(n=w(t),x*Math.sin(n-Math.PI/2))})))+g,y:o/2},D=Cf.appendOrSelect(n,"g.y-axes").attr("role",r.GROUP).selectAll("path").data(S,(function(t){return t})),P=function(t){return e.uniqueKeys.map((function(e){var n;return(n={})[f]=e,n[d]=t,n}))};D.join((function(n){return n.append("path").attr("role",r.GRAPHICS_SYMBOL).attr("opacity",0).attr("transform","translate("+C.x+", "+C.y+")").attr("fill","none").attr("d",(function(t){return A(P(t))})).call((function(n){return n.transition(e.services.transitions.getTransition("radar_y_axes_enter",t)).attr("opacity",1).attr("d",(function(t){return M(P(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("+C.x+", "+C.y+")").attr("d",(function(t){return M(P(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 M(P(t))})).attr("opacity",0).remove()}))})),Cf.appendOrSelect(n,"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-"+La.kebabCase(t)})).attr("stroke-dasharray","0").attr("x1",(function(t){return yv(w(t),0,C).x})).attr("y1",(function(t){return yv(w(t),0,C).y})).attr("x2",(function(t){return yv(w(t),0,C).x})).attr("y2",(function(t){return yv(w(t),0,C).y})).call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_axes_enter",t)).attr("opacity",1).attr("x1",(function(t){return yv(w(t),O.range()[0],C).x})).attr("y1",(function(t){return yv(w(t),O.range()[0],C).y})).attr("x2",(function(t){return yv(w(t),O.range()[1],C).x})).attr("y2",(function(t){return yv(w(t),O.range()[1],C).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 yv(w(t),O.range()[0],C).x})).attr("y1",(function(t){return yv(w(t),O.range()[0],C).y})).attr("x2",(function(t){return yv(w(t),O.range()[1],C).x})).attr("y2",(function(t){return yv(w(t),O.range()[1],C).y}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_axes_exit",t)).attr("opacity",0).remove()}))})),Cf.appendOrSelect(n,"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 yv(w(t),O.range()[1]+g,C).x})).attr("y",(function(t){return yv(w(t),O.range()[1]+g,C).y})).style("text-anchor",(function(t){return gv(w(t)).textAnchor})).style("dominant-baseline",(function(t){return gv(w(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 yv(w(t),O.range()[1]+g,C).x})).attr("y",(function(t){return yv(w(t),O.range()[1]+g,C).y}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_labels_exit",t)).attr("opacity",0).remove()}))})),Cf.appendOrSelect(n,"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",(function(t){return e.model.getColorClassName({classNameTypes:[E.FILL,E.STROKE],dataGroupName:t.name,originalClassName:"blob"})})).attr("role",r.GRAPHICS_SYMBOL).attr("opacity",0).attr("transform","translate("+C.x+", "+C.y+")").attr("fill",(function(t){return T(t.name)})).style("fill-opacity",so.opacity.selected).attr("stroke",(function(t){return T(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 M(t.data)}))}))}),(function(n){n.attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[E.FILL,E.STROKE],dataGroupName:t.name,originalClassName:"blob"})})).attr("fill",(function(t){return T(t.name)})).attr("stroke",(function(t){return T(t.name)})),n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_blobs_update",t)).attr("opacity",1).attr("transform","translate("+C.x+", "+C.y+")").attr("d",(function(t){return M(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 M(t.data)})).attr("opacity",0).remove()}))})),Cf.appendOrSelect(n,"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 e.model.getColorClassName({classNameTypes:[E.FILL],dataGroupName:t[p],originalClassName:La.kebabCase(t[f])})})).attr("cx",(function(t){return yv(w(t[f]),O(t[d]),C).x})).attr("cy",(function(t){return yv(w(t[f]),O(t[d]),C).y})).attr("r",0).attr("opacity",0).attr("fill",(function(t){return T(t[p])})),Cf.appendOrSelect(n,"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",C.x).attr("y",C.y-_/2).attr("width",O.range()[1]).attr("height",_).attr("fill","red").style("fill-opacity",0).attr("transform",(function(t){return"rotate("+mv(w(t))+", "+C.x+", "+C.y+")"})),Cf.appendOrSelect(n,"g.y-labels").attr("role",r.GROUP).selectAll("text").data(Ho(S)).join((function(n){return n.append("text").attr("opacity",0).text((function(t){return t})).attr("x",(function(t){return yv(-Math.PI/2,O(t),C).x+v})).attr("y",(function(t){return yv(-Math.PI/2,O(t),C).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 yv(-Math.PI/2,O(t),C).x+v})).attr("y",(function(t){return yv(-Math.PI/2,O(t),C).y}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_y_labels_exit",t)).attr("opacity",0).remove()}))}));var k=La.getProperty(c,"radar","alignment"),L=Cf.getAlignmentOffset(k,n,this.getParent());n.attr("transform","translate("+L+", 0)"),this.addEventListeners(),cv=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(W.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(W.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.addEventListeners=function(){var t=this,e=La.getProperty(this.getOptions(),"radar").axes.angle;this.parent.selectAll(".x-axes-rect > rect").on("mouseover",(function(n){var r=Ga(this);t.services.events.dispatchEvent(W.Radar.X_AXIS_MOUSEOVER,{element:r,datum:n});var i=t.parent.select(".x-axes .x-axis-"+La.kebabCase(n)),a=t.parent.selectAll(".dots circle."+La.kebabCase(n));i.classed("hovered",!0).attr("stroke-dasharray","4 4"),a.classed("hovered",!0).attr("opacity",1).attr("r",so.dotsRadius);var o=t.displayDataNormalized.filter((function(t){return t[e]===n})),s=t.getOptions(),u=s.data.groupMapsTo,l=La.getProperty(s,"radar","axes","value");t.services.events.dispatchEvent(W.Tooltip.SHOW,{hoveredElement:r,items:o.filter((function(t){return"number"==typeof t[l]})).map((function(e){return{label:e[u],value:e[l],color:t.model.getFillColor(e[u]),class:t.model.getColorClassName({classNameTypes:[E.TOOLTIP],dataGroupName:e[u]})}}))})})).on("mousemove",(function(e){var n=Ga(this);t.services.events.dispatchEvent(W.Radar.X_AXIS_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(W.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(W.Radar.X_AXIS_CLICK,{element:Ga(this),datum:e})})).on("mouseout",(function(e){var n=Ga(this),r=t.parent.select(".x-axes .x-axis-"+La.kebabCase(e)),i=t.parent.selectAll(".dots circle."+La.kebabCase(e));r.classed("hovered",!1).attr("stroke-dasharray","0"),i.classed("hovered",!1).attr("opacity",0).attr("r",0),t.services.events.dispatchEvent(W.Radar.X_AXIS_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(W.Tooltip.HIDE)}))},e}(vg),bv=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(){Cf.appendOrSelect(this.getContainerSVG(),"rect").attr("x",0).attr("y",0).attr("width",this.configs.size||uo.default.size).attr("height",this.configs.size||uo.default.size).attr("opacity",0)},e}(vg),xv=function(t){function e(n,r,i,a){var o=t.call(this,n,r,a)||this;return o.type="layout",o.configs=a,o.children=i,o._instanceID=e.instanceID++,(o.configs.direction===L.ROW_REVERSE||o.configs.direction===L.COLUMN_REVERSE)&&(o.children=o.children.reverse()),o.init(),o}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=La.getProperty(t,"data","growth","x");return e===R.PREFERRED||e===R.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 La.getProperty(t,"data","growth","x")===R.STRETCH})).size()},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.parent,r=Cf.getSVGElementSize(n,{useAttrs:!0}),i=r.width,a=r.height,o=$g({children:this.children}).sum((function(t){return t.size})),s=this.configs.direction===L.ROW||this.configs.direction===L.ROW_REVERSE?ov:sv;lv().tile(s).size([i,a])(o);var u=this.configs.direction===L.ROW||this.configs.direction===L.ROW_REVERSE,l=n.selectAll("svg.layout-child-"+this._instanceID).data(o.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(Ga(n));var i=La.getProperty(e,"data","growth","x");i!==R.PREFERRED&&i!==R.FIXED||r.render(t)}))})),n.selectAll("svg.layout-child-"+this._instanceID).each((function(t){var e=La.getProperty(t,"data","growth","x"),n=Cf.getSVGElementSize(Ga(this),{useBBox:!0});if("legend"===t.data.id){var r=Cf.getSVGElementSize(Ga(this),{useAttrs:!0});r.height<40&&(n.height=r.height)}if(e===R.PREFERRED){var o=u?n.width:n.height,s=u?i:a;t.data.size=o/s*100}})),l.exit().remove(),this.children.filter((function(t){return La.getProperty(t,"growth","x")===R.STRETCH})).forEach((function(t,n){t.size=(100-+e.getPreferedAndFixedSizeSum())/+e.getNumOfStretchChildren()})),o=$g({children:this.children}).sum((function(t){return t.size})),lv().tile(s).size([i,a]).padding(0)(o),n.selectAll("svg.layout-child-"+this._instanceID).data(o.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){La.getProperty(e,"data","growth","x")===R.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}(vg),wv=Array.prototype.slice;function Ov(t){return t}function Ev(t){return"translate("+(t+.5)+",0)"}function Sv(t){return"translate(0,"+(t+.5)+")"}function Tv(t){return function(e){return+t(e)}}function Mv(t){var e=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}function Av(){return!this.__axis}function Cv(t,e){var n=[],r=null,i=null,a=6,o=6,s=3,u=1===t||4===t?-1:1,l=4===t||2===t?"x":"y",c=1===t||3===t?Ev:Sv;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):Ov:i,p=Math.max(a,0)+s,g=e.range(),v=+g[0]+.5,m=+g[g.length-1]+.5,y=(e.bandwidth?Mv:Tv)(e.copy()),_=h.selection?h.selection():h,b=_.selectAll(".domain").data([null]),x=_.selectAll(".tick").data(f,e).order(),w=x.exit(),O=x.enter().append("g").attr("class","tick"),E=x.select("line"),S=x.select("text");b=b.merge(b.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),x=x.merge(O),E=E.merge(O.append("line").attr("stroke","currentColor").attr(l+"2",u*a)),S=S.merge(O.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),E=E.transition(h),S=S.transition(h),w=w.transition(h).attr("opacity",1e-6).attr("transform",(function(t){return isFinite(t=y(t))?c(t):this.getAttribute("transform")})),O.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?o?"M"+u*o+","+v+"H0.5V"+m+"H"+u*o:"M0.5,"+v+"V"+m:o?"M"+v+","+u*o+"V0.5H"+m+"V"+u*o:"M"+v+",0.5H"+m),x.attr("opacity",1).attr("transform",(function(t){return c(y(t))})),E.attr(l+"2",u*a),S.attr(l,u*p).text(d),_.filter(Av).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=wv.call(arguments),h},h.tickArguments=function(t){return arguments.length?(n=null==t?[]:wv.call(t),h):n.slice()},h.tickValues=function(t){return arguments.length?(r=null==t?null:wv.call(t),h):r&&r.slice()},h.tickFormat=function(t){return arguments.length?(i=t,h):i},h.tickSize=function(t){return arguments.length?(a=o=+t,h):a},h.tickSizeInner=function(t){return arguments.length?(a=+t,h):a},h.tickSizeOuter=function(t){return arguments.length?(o=+t,h):o},h.tickPadding=function(t){return arguments.length?(s=+t,h):s},h}function Dv(t){return Cv(1,t)}function Pv(t){return Cv(2,t)}function kv(t){return Cv(3,t)}function Lv(t){return Cv(4,t)}var Rv=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,a=this.getOptions(),o=La.getProperty(a,"axes",i,"visible"),s=this.getContainerSVG(),u=Cf.getSVGElementSize(this.parent,{useAttrs:!0}),l=u.width,c=u.height,h=Cf.appendOrSelect(s,"g.axis."+i);i===S.BOTTOM||i===S.TOP?(e=this.configs.axes[S.LEFT]?this.margins.left:0,n=this.configs.axes[S.RIGHT]?l-this.margins.right:l):(e=c-this.margins.bottom,n=this.margins.top);var f,d=this.services.cartesianScales.getScaleByPosition(i);switch(this.scaleType===C.LABELS?d.rangeRound([e,n]):d.range([e,n]),i){case S.LEFT:f=Lv;break;case S.BOTTOM:f=kv;break;case S.RIGHT:f=Pv;break;case S.TOP:f=Dv}h.attr("aria-label",i+" axis");var p=!h.select("g.ticks").empty(),g=Cf.appendOrSelect(h,"g.ticks");p||(g.attr("role",r.GRAPHICS_OBJECT+" "+r.GROUP),g.attr("aria-label",i+" ticks"));var v=Cf.appendOrSelect(h,"g.ticks.invisible").style("opacity","0").style("pointer-events","none").attr("aria-hidden",!0).attr("aria-label","invisible "+i+" ticks"),m=La.getProperty(a,"axes",i),y=this.scaleType===C.TIME||m.scaleType===C.TIME,_=i===S.LEFT||i===S.RIGHT,b=this.model.get("zoomDomain");if(b&&y&&!_&&d.domain(b),o){var x=La.getProperty(m,"scaleType"),w=La.getProperty(a,"data","loading"),O=La.getProperty(m,"ticks","number"),E=La.getProperty(m,"ticks","values"),T=La.getProperty(m,"truncation","type"),A=La.getProperty(m,"truncation","threshold"),D=La.getProperty(m,"truncation","numCharacter"),P=null!==O,k=La.getProperty(a,"timeScale"),L=Cf.appendOrSelect(v,"g.tick"),R=Cf.appendOrSelect(L,"text").text("0"),I=Cf.getSVGElementSize(R.node(),{useBBox:!0}).height;L.remove();var N,G=this.scaleType||m.scaleType||C.LINEAR,B=f(d).tickSizeOuter(0);if(d.ticks){var V=void 0;if(P?V=O:(V=no.ticks.number,_&&(V=this.getNumberOfFittingTicks(c,I,no.ticks.verticalSpaceRatio))),1===d.ticks().length&&0===d.ticks()[0]&&(V=0),B.ticks(V),y)if(d.ticks(V).length){var U=La.getProperty(a,"timeScale","addSpaceOnEdges"),z=La.getProperty(a,"axes",i,"domain"),F=void 0,j=d.copy();U&&!z&&j.nice(V),F=j.ticks(V),U&&F.length>2&&!z&&(F.splice(F.length-1,1),F.splice(0,1)),B.tickValues(F)}else B.tickValues([])}var W=La.getProperty(m,"ticks","formatter");if(y){var Y=Sg(B.tickValues());N=null===W?function(t,e){return Og(t,e,Y,k)}:function(t,e){var n=Og(t,e,Y,k);return W(t,e,n)}}else null===W?G===C.LINEAR&&(N=function(t){return t.toLocaleString()}):N=W;B.tickFormat(N);var X,q=this.services.cartesianScales.getScaleByPosition(i).domain(),Z=q[0],K=q[1];if(E){if(y)E.forEach((function(t,e){void 0===t.getTime&&(E[e]=new Date(t))})),X=E.filter((function(t){var e=t.getTime();return e>=new Date(Z).getTime()&&e<=new Date(K).getTime()}));else if(x===C.LABELS){var $=this.services.cartesianScales.getScaleByPosition(i).domain();X=E.filter((function(t){return $.includes(t)}))}else X=E.filter((function(t){return t>=Z&&t<=K}));B.tickValues(X)}switch(i){case S.LEFT:g.attr("transform","translate("+this.margins.left+", 0)");break;case S.BOTTOM:g.attr("transform","translate(0, "+(c-this.margins.bottom)+")");break;case S.RIGHT:g.attr("transform","translate("+(l-this.margins.right)+", 0)");break;case S.TOP:g.attr("transform","translate(0, "+this.margins.top+")")}var Q=this.model.isDataEmpty();if(m.title){var J=Cf.appendOrSelect(h,"text.axis-title").html(Q||w?"":m.title);switch(i){case S.LEFT:J.attr("transform","rotate(-90)").attr("y",0).attr("x",-d.range()[0]/2).attr("dy","1em").style("text-anchor","middle");break;case S.BOTTOM:J.attr("transform","translate("+(this.margins.left/2+d.range()[1]/2)+", "+c+")").style("text-anchor","middle");break;case S.RIGHT:J.attr("transform","rotate(90)").attr("y",-l).attr("x",d.range()[0]/2).attr("dy","1em").style("text-anchor","middle");break;case S.TOP:var tt=Cf.getSVGElementSize(J,{useBBox:!0}).height;J.attr("transform","translate("+(this.margins.left/2+d.range()[1]/2)+", "+tt/2+")").style("text-anchor","middle")}}if(y){var et=Sg(B.tickValues()),nt=k.showDayName,rt=g;t&&(g=g.transition(this.services.transitions.getTransition("axis-update",t))),g=g.call(B),rt.selectAll(".tick").data(B.tickValues(),d).order().select("text").style("font-weight",(function(t,e){return wg(t,e,et,nt)?"bold":"normal"}))}else g=t&&p?g.transition(this.services.transitions.getTransition("axis-update")).call(B):g.call(B);if(v.call(B),i===S.BOTTOM||i===S.TOP){var it=!1,at=La.getProperty(m,"ticks","rotation");if(at===H.ALWAYS)it=!0;else if(at===H.NEVER)it=!1;else if(!at||at===H.AUTO)if(d.step){it=v.selectAll("g.tick text").nodes().some((function(t){return Cf.getSVGElementSize(t,{useBBox:!0}).width>=d.step()}))}else{var ot=La.getProperty(m,"ticks","rotateIfSmallerThan")||no.ticks.rotateIfSmallerThan,st=l/(y?B.tickValues().length:d.ticks().length)/2;it=y?st<2*ot:st<ot}it?(P||(B.ticks(this.getNumberOfFittingTicks(l,I,no.ticks.horizontalSpaceRatio)),v.call(B),g.call(B)),h.selectAll("g.ticks g.tick text").attr("transform","rotate(-45)").style("text-anchor",i===S.TOP?"start":"end")):h.selectAll("g.ticks g.tick text").attr("transform",null).style("text-anchor",null)}if(w?h.attr("opacity",0):h.attr("opacity",1),g.selectAll("g.tick").attr("aria-label",(function(t){return t})),v.selectAll("g.tick").attr("aria-label",(function(t){return t})),T!==M.NONE&&x===C.LABELS&&!E){var ut=this.services.cartesianScales.getScaleDomain(i);if(ut.length>0){var lt=s.select("g.axis."+i+" g.ticks g.tick").html();h.selectAll("g.ticks g.tick").html(lt),h.selectAll("g.tick text").data(ut).text((function(t){return t.length>A?La.truncateLabel(t,T,D):t})),this.getInvisibleAxisRef().selectAll("g.tick text").data(ut).text((function(t){return t.length>A?La.truncateLabel(t,T,D):t})),h.selectAll("g.ticks").html(this.getInvisibleAxisRef().html()),h.selectAll("g.tick text").data(ut)}}this.addEventListeners()}else g.attr("aria-hidden",!0)},e.prototype.addEventListeners=function(){var t=this.getContainerSVG(),e=this.configs.position,n=Cf.appendOrSelect(t,"g.axis."+e),r=this.getOptions(),i=La.getProperty(r,"axes",e),a=La.getProperty(i,"scaleType"),o=La.getProperty(i,"truncation","threshold"),s=(this.scaleType===C.TIME||(i.scaleType,C.TIME),this);n.selectAll("g.tick text").on("mouseover",(function(t){s.services.events.dispatchEvent(W.Axis.LABEL_MOUSEOVER,{element:Ga(this),datum:t}),a===C.LABELS&&t.length>o&&s.services.events.dispatchEvent(W.Tooltip.SHOW,{hoveredElement:Ga(this),content:t})})).on("mousemove",(function(t){s.services.events.dispatchEvent(W.Axis.LABEL_MOUSEMOVE,{element:Ga(this),datum:t}),a===C.LABELS&&t.length>o&&s.services.events.dispatchEvent(W.Tooltip.MOVE)})).on("click",(function(t){s.services.events.dispatchEvent(W.Axis.LABEL_CLICK,{element:Ga(this),datum:t})})).on("mouseout",(function(t){s.services.events.dispatchEvent(W.Axis.LABEL_MOUSEOUT,{element:Ga(this),datum:t}),a===C.LABELS&&s.services.events.dispatchEvent(W.Tooltip.HIDE)}))},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 La.clamp(r,2,no.ticks.number)},e.prototype.destroy=function(){var t=this.getContainerSVG(),e=this.configs.position;Cf.appendOrSelect(t,"g.axis."+e).selectAll("g.tick text").on("mouseover",null).on("mousemove",null).on("mouseout",null)},e}(vg),Iv=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(S),i=La.getProperty(this.getOptions(),"axes");r.forEach((function(t){i[S[t]]&&(n[S[t]]=!0)})),this.configs.axes=n,r.forEach((function(t){var n=S[t];if(e.configs.axes[n]&&!e.children[n]){var r=new Rv(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 a={};Object.keys(this.children).forEach((function(n){var r,i=e.children[n],o=i.configs.position,s=i.getInvisibleAxisRef(),u=Cf.getSVGElementSize(s,{useBBox:!0}),l=u.width,c=u.height;switch(i.getTitleRef().empty()?r=0:(r=Cf.getSVGElementSize(i.getTitleRef(),{useBBox:!0}).height,o!==S.LEFT&&o!==S.RIGHT||(r+=5)),o){case S.TOP:a.top=c+r;break;case S.BOTTOM:a.bottom=c+r;break;case S.LEFT:a.left=l+r;break;case S.RIGHT:a.right=l+r}e.addAxisThresholds(t,o)})),Object.keys(a).some((function(t){return e.margins[t]!==a[t]}))&&(this.margins=Object.assign(this.margins,a),this.model.set({axesMargins:this.margins},{skipUpdate:!0}),this.services.events.dispatchEvent(W.ZoomBar.UPDATE),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=La.getProperty(this.getOptions(),"axes",e).thresholds;r&&(r.forEach((function(t,r){var i=new Cg(n.model,n.services,x(x({},t),{axisPosition:e,index:r}));n.thresholds.push(i)})),this.thresholds.forEach((function(e){e.setParent(n.parent),e.render(t)})))},e}(vg);function Nv(){Ea.preventDefault(),Ea.stopImmediatePropagation()}function Gv(t){var e=t.document.documentElement,n=Ga(t).on("dragstart.drag",Nv,!0);"onselectstart"in e?n.on("selectstart.drag",Nv,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Bv(t,e){var n=t.document.documentElement,r=Ga(t).on("dragstart.drag",null);e&&(r.on("click.drag",Nv,!0),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function Vv(t){return function(){return t}}function Uv(t,e,n){this.target=t,this.type=e,this.selection=n}function zv(){Ea.stopImmediatePropagation()}function Hv(){Ea.preventDefault(),Ea.stopImmediatePropagation()}var Fv={name:"drag"},jv={name:"space"},Wv={name:"handle"},Yv={name:"center"};function Xv(t){return[+t[0],+t[1]]}function qv(t){return[Xv(t[0]),Xv(t[1])]}function Zv(t){return function(e){return function(t,e,n){arguments.length<3&&(n=e,e=Ba().changedTouches);for(var r,i=0,a=e?e.length:0;i<a;++i)if((r=e[i]).identifier===n)return Va(t,r);return null}(e,Ea.touches,t)}}var Kv={name:"x",handles:["w","e"].map(rm),input:function(t,e){return null==t?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},$v={name:"y",handles:["n","s"].map(rm),input:function(t,e){return null==t?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},Qv={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Jv={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},tm={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},em={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},nm={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function rm(t){return{type:t}}function im(){return!Ea.ctrlKey&&!Ea.button}function am(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function om(){return navigator.maxTouchPoints||"ontouchstart"in this}function sm(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function um(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function lm(){return function(t){var e,n=am,r=im,i=om,a=!0,o=kf("start","brush","end"),s=6;function u(e){var n=e.property("__brush",g).selectAll(".overlay").data([rm("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Qv.overlay).merge(n).each((function(){var t=sm(this).extent;Ga(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])})),e.selectAll(".selection").data([rm("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Qv.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=e.selectAll(".handle").data(t.handles,(function(t){return t.type}));r.exit().remove(),r.enter().append("rect").attr("class",(function(t){return"handle handle--"+t.type})).attr("cursor",(function(t){return Qv[t.type]})),e.each(l).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",f).filter(i).on("touchstart.brush",f).on("touchmove.brush",d).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function l(){var t=Ga(this),e=sm(this).selection;e?(t.selectAll(".selection").style("display",null).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1]),t.selectAll(".handle").style("display",null).attr("x",(function(t){return"e"===t.type[t.type.length-1]?e[1][0]-s/2:e[0][0]-s/2})).attr("y",(function(t){return"s"===t.type[0]?e[1][1]-s/2:e[0][1]-s/2})).attr("width",(function(t){return"n"===t.type||"s"===t.type?e[1][0]-e[0][0]+s:s})).attr("height",(function(t){return"e"===t.type||"w"===t.type?e[1][1]-e[0][1]+s:s}))):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function c(t,e,n){return!n&&t.__brush.emitter||new h(t,e)}function h(t,e){this.that=t,this.args=e,this.state=t.__brush,this.active=0}function f(){if((!e||Ea.touches)&&r.apply(this,arguments)){var n,i,o,s,u,h,f,d,p,g,v,m=this,y=Ea.target.__data__.type,_="selection"===(a&&Ea.metaKey?y="overlay":y)?Fv:a&&Ea.altKey?Yv:Wv,b=t===$v?null:em[y],x=t===Kv?null:nm[y],w=sm(m),O=w.extent,E=w.selection,S=O[0][0],T=O[0][1],M=O[1][0],A=O[1][1],C=0,D=0,P=b&&x&&a&&Ea.shiftKey,k=Ea.touches?Zv(Ea.changedTouches[0].identifier):Ua,L=k(m),R=L,I=c(m,arguments,!0).beforestart();"overlay"===y?(E&&(p=!0),w.selection=E=[[n=t===$v?S:L[0],o=t===Kv?T:L[1]],[u=t===$v?M:n,f=t===Kv?A:o]]):(n=E[0][0],o=E[0][1],u=E[1][0],f=E[1][1]),i=n,s=o,h=u,d=f;var N=Ga(m).attr("pointer-events","none"),G=N.selectAll(".overlay").attr("cursor",Qv[y]);if(Ea.touches)I.moved=V,I.ended=z;else{var B=Ga(Ea.view).on("mousemove.brush",V,!0).on("mouseup.brush",z,!0);a&&B.on("keydown.brush",H,!0).on("keyup.brush",F,!0),Gv(Ea.view)}zv(),sd(m),l.call(m),I.start()}function V(){var t=k(m);!P||g||v||(Math.abs(t[0]-R[0])>Math.abs(t[1]-R[1])?v=!0:g=!0),R=t,p=!0,Hv(),U()}function U(){var t;switch(C=R[0]-L[0],D=R[1]-L[1],_){case jv:case Fv:b&&(C=Math.max(S-n,Math.min(M-u,C)),i=n+C,h=u+C),x&&(D=Math.max(T-o,Math.min(A-f,D)),s=o+D,d=f+D);break;case Wv:b<0?(C=Math.max(S-n,Math.min(M-n,C)),i=n+C,h=u):b>0&&(C=Math.max(S-u,Math.min(M-u,C)),i=n,h=u+C),x<0?(D=Math.max(T-o,Math.min(A-o,D)),s=o+D,d=f):x>0&&(D=Math.max(T-f,Math.min(A-f,D)),s=o,d=f+D);break;case Yv:b&&(i=Math.max(S,Math.min(M,n-C*b)),h=Math.max(S,Math.min(M,u+C*b))),x&&(s=Math.max(T,Math.min(A,o-D*x)),d=Math.max(T,Math.min(A,f+D*x)))}h<i&&(b*=-1,t=n,n=u,u=t,t=i,i=h,h=t,y in Jv&&G.attr("cursor",Qv[y=Jv[y]])),d<s&&(x*=-1,t=o,o=f,f=t,t=s,s=d,d=t,y in tm&&G.attr("cursor",Qv[y=tm[y]])),w.selection&&(E=w.selection),g&&(i=E[0][0],h=E[1][0]),v&&(s=E[0][1],d=E[1][1]),E[0][0]===i&&E[0][1]===s&&E[1][0]===h&&E[1][1]===d||(w.selection=[[i,s],[h,d]],l.call(m),I.brush())}function z(){if(zv(),Ea.touches){if(Ea.touches.length)return;e&&clearTimeout(e),e=setTimeout((function(){e=null}),500)}else Bv(Ea.view,p),B.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);N.attr("pointer-events","all"),G.attr("cursor",Qv.overlay),w.selection&&(E=w.selection),um(E)&&(w.selection=null,l.call(m)),I.end()}function H(){switch(Ea.keyCode){case 16:P=b&&x;break;case 18:_===Wv&&(b&&(u=h-C*b,n=i+C*b),x&&(f=d-D*x,o=s+D*x),_=Yv,U());break;case 32:_!==Wv&&_!==Yv||(b<0?u=h-C:b>0&&(n=i-C),x<0?f=d-D:x>0&&(o=s-D),_=jv,G.attr("cursor",Qv.selection),U());break;default:return}Hv()}function F(){switch(Ea.keyCode){case 16:P&&(g=v=P=!1,U());break;case 18:_===Yv&&(b<0?u=h:b>0&&(n=i),x<0?f=d:x>0&&(o=s),_=Wv,U());break;case 32:_===jv&&(Ea.altKey?(b&&(u=h-C*b,n=i+C*b),x&&(f=d-D*x,o=s+D*x),_=Yv):(b<0?u=h:b>0&&(n=i),x<0?f=d:x>0&&(o=s),_=Wv),G.attr("cursor",Qv[y]),U());break;default:return}Hv()}}function d(){c(this,arguments).moved()}function p(){c(this,arguments).ended()}function g(){var e=this.__brush||{selection:null};return e.extent=qv(n.apply(this,arguments)),e.dim=t,e}return u.move=function(e,n){e.selection?e.on("start.brush",(function(){c(this,arguments).beforestart().start()})).on("interrupt.brush end.brush",(function(){c(this,arguments).end()})).tween("brush",(function(){var e=this,r=e.__brush,i=c(e,arguments),a=r.selection,o=t.input("function"==typeof n?n.apply(this,arguments):n,r.extent),s=Xs(a,o);function u(t){r.selection=1===t&&null===o?null:s(t),l.call(e),i.brush()}return null!==a&&null!==o?u:u(1)})):e.each((function(){var e=this,r=arguments,i=e.__brush,a=t.input("function"==typeof n?n.apply(e,r):n,i.extent),o=c(e,r).beforestart();sd(e),i.selection=null===a?null:a,l.call(e),o.start().brush().end()}))},u.clear=function(t){u.move(t,null)},h.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting?(this.starting=!1,this.emit("start")):this.emit("brush"),this},brush:function(){return this.emit("brush"),this},end:function(){return 0==--this.active&&(delete this.state.emitter,this.emit("end")),this},emit:function(e){!function(t,e,n,r){var i=Ea;t.sourceEvent=Ea,Ea=t;try{e.apply(n,r)}finally{Ea=i}}(new Uv(u,e,t.output(this.state.selection)),o.apply,o,[e,this.that,this.args])}},u.extent=function(t){return arguments.length?(n="function"==typeof t?t:Vv(qv(t)),u):n},u.filter=function(t){return arguments.length?(r="function"==typeof t?t:Vv(!!t),u):r},u.touchable=function(t){return arguments.length?(i="function"==typeof t?t:Vv(!!t),u):i},u.handleSize=function(t){return arguments.length?(s=+t,u):s},u.keyModifiers=function(t){return arguments.length?(a=!!t,u):a},u.on=function(){var t=o.on.apply(o,arguments);return t===o?u:t},u}(Kv)}var cm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grid-brush",e.selectionSelector="rect.selection",e.frontSelectionSelector="rect.frontSelection",e}return n(e,t),e.prototype.render=function(t){var n=this,r=this.parent,i=this.getContainerSVG(),a=Cf.appendOrSelect(r,"svg.chart-grid-backdrop"),o=Cf.appendOrSelect(a,"g."+this.type),s=Cf.appendOrSelect(o,this.selectionSelector),u=Cf.getSVGElementSize(a,{useAttrs:!0}),l=u.width,c=u.height,h=this.services.cartesianScales,f=h.getMainXScaleType(),d=h.getMainXScale(),p=d.range(),g=p[0];p[1];i.attr("transform","translate("+g+",0)");var v=Cf.appendOrSelect(i,this.frontSelectionSelector);if(d&&f===C.TIME){var m=this.model.get("zoomDomain");void 0===m&&(m=this.services.zoom.getDefaultZoomBarDomain())&&this.model.set({zoomDomain:m},{animate:!1});var y=function(t,e){var r=Tc().range([0,l]).domain(m),i=[r.invert(t),r.invert(e)];i[0].valueOf()===i[1].valueOf()&&(i=n.services.zoom.getDefaultZoomBarDomain()),m[0].valueOf()===i[0].valueOf()&&m[1].valueOf()===i[1].valueOf()||n.services.zoom.handleDomainChange(i)},_=lm().extent([[0,0],[l-1,c]]).on("start brush end",(function(){var t=Ea.selection;null!==t&&t[0]!==t[1]&&(v.attr("x",s.attr("x")).attr("y",s.attr("y")).attr("width",s.attr("width")).attr("height",s.attr("height")).style("cursor","pointer").style("display",null),function(t){for(var n=t[1]-t[0],r="0,"+n.toString(),i=Math.floor(c/e.DASH_LENGTH),a=i*e.DASH_LENGTH,o=0;o<i;o++)r+=","+e.DASH_LENGTH;r+=","+(c-a),i%2==1&&(r+=",0"),r+=","+n.toString(),r+=","+c.toString(),v.attr("stroke-dasharray",r)}(t))})).on("end.brushed",(function(){var t=Ea.selection;null!==t&&(y(t[0],t[1]),o.call(_.move,null),v.style("display","none"))}));o.call(_);var b=this.services.zoom.getZoomRatio();a.on("click",(function(){if(Ea.shiftKey){var t=Ua(o.node())[0],e=t-l*b/2;e<0&&(e=0);var n=t+l*b/2;n>l&&(n=l),y(e,n)}}))}},e.DASH_LENGTH=4,e}(vg),hm=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="chart-clip",i.chartClipId="chart-clip-id-"+Math.floor(99999999999*Math.random()),i.init(),i}return n(e,t),e.prototype.init=function(){this.model.set({chartClipId:this.chartClipId},{skipUpdate:!0})},e.prototype.render=function(t){this.createClipPath()},e.prototype.createClipPath=function(){var t=this.parent,e=this.services.cartesianScales,n=e.getMainXScale(),r=e.getMainYScale(),i=n.range(),a=i[0],o=i[1],s=r.range(),u=s[0],l=s[1];this.chartClipPath=Cf.appendOrSelect(t,"clipPath."+this.type).attr("id",this.chartClipId);var c=Cf.appendOrSelect(this.chartClipPath,"rect."+this.type);c.attr("x",a).attr("y",l).attr("width",o-a).attr("height",u-l),this.chartClipPath.merge(c).lower()},e}(vg),fm=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);var e=La.getProperty(this.getOptions(),"grid","x","enabled"),n=La.getProperty(this.getOptions(),"grid","y","enabled");(e||n)&&(this.drawBackdrop(e,n),e&&(Cf.appendOrSelect(this.backdrop,"g.x.grid"),this.drawXGrid(t)),n&&(Cf.appendOrSelect(this.backdrop,"g.y.grid"),this.drawYGrid(t)))},e.prototype.drawXGrid=function(t){var e=this.parent,n=this.backdrop.attr("height"),r=kv(this.services.cartesianScales.getMainXScale()).tickSizeInner(-n).tickSizeOuter(0),i=La.getProperty(this.getOptions(),"grid","x","numberOfTicks");r.ticks(i);var a=e.select(".x.grid").attr("transform","translate("+-this.backdrop.attr("x")+", "+n+")");if(t){var o=this.services.transitions.getTransition("grid-update");a.transition(o).call(r)}else a.call(r);this.cleanGrid(a)},e.prototype.drawYGrid=function(t){var e=this.parent,n=this.backdrop.attr("width"),r=Lv(this.services.cartesianScales.getMainYScale()).tickSizeInner(-n).tickSizeOuter(0),i=La.getProperty(this.getOptions(),"grid","y","numberOfTicks");r.ticks(i);var a=e.select(".y.grid").attr("transform","translate(0, "+-this.backdrop.attr("y")+")");if(t){var o=this.services.transitions.getTransition("grid-update");a.transition(o).call(r)}else a.call(r);this.cleanGrid(a)},e.prototype.getGridlineThreshold=function(t){var e,n=this.parent,r=n.selectAll(".x.grid .tick").nodes().sort((function(t,e){return Number(La.getTranslationValues(t).tx)-Number(La.getTranslationValues(e).tx)})),i=-1;if(r.length){r.forEach((function(e,n){t[0]>=+La.getTranslationValues(e).tx&&i++})),e=i+1<r.length?i+1:r.length;var a,o=r[i],s=r[e];if(o)if(s)a=+La.getTranslationValues(s).tx-+La.getTranslationValues(o).tx;else{var u=n.select("rect.chart-grid-backdrop").node();a=Cf.getSVGElementSize(u).width-+La.getTranslationValues(o).tx}else a=+La.getTranslationValues(s).tx;return a*this.getOptions().tooltip.gridline.threshold}},e.prototype.getActiveGridline=function(t){var e=La.getProperty(this.getOptions,"tooltip","gridline","threshold"),n=e||this.getGridlineThreshold(t);return this.parent.selectAll(".x.grid .tick").filter((function(){var e=La.getTranslationValues(this),r=Number(e.tx)-n,i=Number(e.tx)+n;return r<=t[0]&&t[0]<=i}))},e.prototype.drawBackdrop=function(t,e){var n=this.parent,r=this.services.cartesianScales.getMainXScale(),i=this.services.cartesianScales.getMainYScale(),a=r.range(),o=a[0],s=a[1],u=i.range(),l=u[0],c=u[1];this.backdrop=Cf.appendOrSelect(n,"svg.chart-grid-backdrop");var h=Cf.appendOrSelect(this.backdrop,t||e?"rect.chart-grid-backdrop.stroked":"rect.chart-grid-backdrop");this.backdrop.merge(h).attr("x",o).attr("y",c).attr("width",Math.abs(s-o)).attr("height",Math.abs(l-c)).lower(),h.attr("width","100%").attr("height","100%")},e.prototype.cleanGrid=function(t){t.selectAll("text").remove(),t.select(".domain").remove()},e}(vg);var dm,pm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="ruler",e.isXGridEnabled=La.getProperty(e.getOptions(),"grid","x","enabled"),e.isYGridEnabled=La.getProperty(e.getOptions(),"grid","y","enabled"),e.isEventListenerAdded=!1,e}return n(e,t),e.prototype.render=function(){var t=La.getProperty(this.getOptions(),"ruler","enabled");this.drawBackdrop(),t&&!this.isEventListenerAdded?this.addBackdropEventListeners():!t&&this.isEventListenerAdded&&this.removeBackdropEventListeners()},e.prototype.removeBackdropEventListeners=function(){this.isEventListenerAdded=!1,this.backdrop.on("mousemove mouseover mouseout",null)},e.prototype.formatTooltipData=function(t){return t},e.prototype.showRuler=function(t){var e=this,n=t[0],r=t[1],i=this.parent,a=this.services.cartesianScales.getOrientation(),o=a===A.HORIZONTAL?r:n,s=Cf.appendOrSelect(i,"g.ruler").attr("aria-label","ruler"),u=Cf.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,o)}));if(this.pointsWithinLine&&p.length===this.pointsWithinLine.length&&p.map((function(t){return t.domainValue})).join()===this.pointsWithinLine.map((function(t){return t.domainValue})).join())return this.pointsWithinLine=p,this.services.events.dispatchEvent(W.Tooltip.MOVE,{mousePosition:[n,r]});this.pointsWithinLine=p;var g=this.pointsWithinLine.reduce((function(t,e){if(0===t.length)return t.push(e),t;var n=t[0].domainValue,r=Math.abs(o-e.domainValue),i=Math.abs(o-n);return r>i?t:(r<i?t=[e]:t.push(e),t)}),[]);if(g.length>0){var v=g.map((function(t){return t.originalData})).filter((function(t){var n=t[e.services.cartesianScales.getRangeIdentifier(t)];return null!=n})),m=g.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&&!La.isEqual(this.elementsToHighlight,y)&&this.hideRuler(),y.dispatch("mouseover"),this.elementsToHighlight=y,this.services.events.dispatchEvent(W.Tooltip.SHOW,{mousePosition:[n,r],hoveredElement:u,data:this.formatTooltipData(v)}),s.attr("opacity",1);var _=g[0];"horizontal"===a?u.attr("x1",d).attr("x2",f).attr("y1",_.domainValue).attr("y2",_.domainValue):u.attr("y1",d).attr("y2",f).attr("x1",_.domainValue).attr("x2",_.domainValue)}else this.hideRuler()},e.prototype.hideRuler=function(){var t=this.parent,e=Cf.appendOrSelect(t,"g.ruler");t.selectAll("[role=graphics-symbol]").dispatch("mouseout"),this.services.events.dispatchEvent(W.Tooltip.HIDE),e.attr("opacity",0)},e.prototype.addBackdropEventListeners=function(){this.isEventListenerAdded=!0;var t=this,e=this.model.getDisplayData(),n=function(){var e=Ua(t.parent.node());t.showRuler(e)};if(e.length>100){var r=e.length%50*12.5;n=La.debounceWithD3MousePosition((function(){var e=this.mousePosition;t.showRuler(e)}),r,this.parent.node())}this.backdrop.on("mousemove mouseover",n).on("mouseout",this.hideRuler.bind(this))},e.prototype.drawBackdrop=function(){var t=this.parent,e=this.services.cartesianScales.getMainXScale(),n=this.services.cartesianScales.getMainYScale(),r=e.range(),i=(r[0],r[1],n.range());i[0],i[1];this.backdrop=Cf.appendOrSelect(t,"svg.chart-grid-backdrop");Cf.appendOrSelect(this.backdrop,this.isXGridEnabled||this.isYGridEnabled?"rect.chart-grid-backdrop.stroked":"rect.chart-grid-backdrop")},e}(vg),gm=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.formatTooltipData=function(t){return t.reverse()},e.prototype.hideRuler=function(){var t=this.parent,e=Cf.appendOrSelect(t,"g.ruler");this.services.events.dispatchEvent(W.Tooltip.HIDE),e.attr("opacity",0)},e}(pm),vm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="toolbar",e.overflowMenuX=0,e.overflowMenuY=0,e.overflowMenuItemId=Math.floor(99999999999*Math.random()),e}return n(e,t),e.prototype.init=function(){var t=this,e=this.getOptions(),n=Ga(this.services.domUtils.getHolder()),r=La.getProperty(e,"style","prefix");this.overflowMenu=Cf.appendOrSelect(n,"div."+of.prefix+"--"+r+"--overflowMenu"),this.overflowMenu.style("max-width",null),this.services.events.addEventListener(W.Toolbar.SHOW_OVERFLOW_MENU,(function(){t.overflowMenu.html(t.getOverflowMenuHTML())})),this.services.events.addEventListener(W.Toolbar.HIDE_OVERFLOW_MENU,(function(){t.overflowMenu.html(null)})),document.body.addEventListener("click",(function(){return t.updateOverflowMenu(!1)}))},e.prototype.render=function(t){var e=La.getProperty(this.getOptions(),"data","loading"),n=ho.buttonSize,i=parseFloat(this.parent.node().getAttribute("y")),a=this.getContainerSVG();a.attr("transform","translate(0, "+(i+-6)+")");var o=Cf.getSVGElementSize(this.services.domUtils.getMainSVG(),{useAttrs:!0}).width;this.overflowMenuX=o-160,this.overflowMenuY=i+-6+n;var s=Cf.appendOrSelect(a,"svg.toolbar-container").attr("width","100%").attr("height",ho.height).attr("opacity",1);s.html(null);var u=this.getControlConfigs(),l=u.buttonList;if(u.overflowMenuItemList&&l.push(this.getOverflowButtonConfig()),e||0===l.length)Cf.appendOrSelect(s,"svg.toolbar-loading-spacer").append("rect").attr("height",ho.height).attr("width",3*n).attr("opacity",0);else{var c=0;l.forEach((function(t){var e=Cf.appendOrSelect(s,"svg."+t.id).classed("toolbar-button",!0),i=Cf.appendOrSelect(e,"rect.toolbar-button-background").attr("x",c).attr("y",0).attr("width",n).attr("height",n),a=Cf.appendOrSelect(e,"svg.toolbar-button-icon").attr("x",c+ho.iconPadding).attr("y",ho.iconPadding).attr("width",ho.iconSize).attr("height",ho.iconSize).attr("viewBox","0 0 32 32").attr("role",r.IMG);a.html(t.iconSVGContent),t.shouldBeDisabled()?(e.classed("toolbar-button--disabled",!0).classed("toolbar-button--focusable",!1).attr("tabindex",-1).attr("role",null),a.classed("toolbar-button-icon--disabled",!0),i.classed("toolbar-button-background--disabled",!0),e.on("click",null).on("keyup",null)):(e.classed("toolbar-button--disabled",!1).classed("toolbar-button--focusable",!0).attr("tabindex",0).attr("role",r.BUTTON),a.classed("toolbar-button-icon--disabled",!1),i.classed("toolbar-button-background--disabled",!1),e.on("click",t.clickFunction).on("keyup",(function(){(Ea.key&&"Enter"===Ea.key||" "===Ea.key)&&(Ea.preventDefault(),t.clickFunction())}))),c+=n})),this.overflowButton=this.getContainerSVG().select("svg.toolbar-overflow-menu"),this.isOverflowMenuOpen()&&this.updateOverflowMenu(!0)}},e.prototype.isOverflowMenuOpen=function(){return this.overflowMenu.selectAll("ul.bx--overflow-menu-options--open").size()>0},e.prototype.updateOverflowMenu=function(t){this.overflowButton&&this.overflowButton.classed("toolbar-button--hovered",t),t?this.services.events.dispatchEvent(W.Toolbar.SHOW_OVERFLOW_MENU):this.services.events.dispatchEvent(W.Toolbar.HIDE_OVERFLOW_MENU)},e.prototype.focusOnPreviousEnabledMenuItem=function(t){for(var e=this.getOverflowMenuItems(),n=e.length,r=t-1;r>=0;r--){if(!e[r].shouldBeDisabled()){n=r;break}}if(n<e.length){var i=Ga("#"+e[n].id+this.overflowMenuItemId).node();"focus"in i&&i.focus()}},e.prototype.focusOnNextEnabledMenuItem=function(t){for(var e=this.getOverflowMenuItems(),n=-1,r=t+1;r<e.length;r++){if(!e[r].shouldBeDisabled()){n=r;break}}if(n>-1){var i=Ga("#"+e[n].id+this.overflowMenuItemId).node();"focus"in i&&i.focus()}},e.prototype.toggleOverflowMenu=function(){var t=this;if(this.isOverflowMenuOpen())this.updateOverflowMenu(!1);else{this.updateOverflowMenu(!0);var e=this;this.getOverflowMenuItems().forEach((function(n,r){var i=Ga("#"+n.id+t.overflowMenuItemId);null!==i&&(i.on("click",(function(){n.clickFunction(),e.updateOverflowMenu(!1)})),i.on("keyup",(function(){"Enter"===Ea.key?n.clickFunction():"ArrowUp"===Ea.key?e.focusOnPreviousEnabledMenuItem(r):"ArrowDown"===Ea.key&&e.focusOnNextEnabledMenuItem(r)})))})),e.focusOnNextEnabledMenuItem(-1)}Ea.stopImmediatePropagation()},e.prototype.getOverflowMenuHTML=function(){var t,e=this,n=this.getOverflowMenuItems();return n&&0!==n.length?(t='<div data-floating-menu-container="true" data-floating-menu-direction="bottom" role="main">\n\t\t\t<ul class="bx--overflow-menu-options bx--overflow-menu--flip bx--overflow-menu-options--open"\n\t\t\t\ttabindex="-1" role="'+r.MENU+'" aria-label="Menu" data-floating-menu-direction="bottom"\n\t\t\t\tstyle="left:'+this.overflowMenuX+"px; top:"+this.overflowMenuY+'px;">',n.forEach((function(n,i){var a="bx--overflow-menu-options__option".concat(n.shouldBeDisabled()?" bx--overflow-menu-options__option--disabled":"");t+='<li class="'+a+'" role="'+r.MENU_ITEM+'">\n\t\t\t\t<button class="bx--overflow-menu-options__btn"\n\t\t\t\t\tdata-floating-menu-primary-focus="'+(0===i)+'"\n\t\t\t\t\ttabindex="-1" index="'+i+'" title="'+n.text+'"\n\t\t\t\t\tid="'+(n.id+e.overflowMenuItemId)+'">\n\t\t\t\t\t<div class="bx--overflow-menu-options__option-content">\n\t\t\t\t\t\t'+n.text+"\n\t\t\t\t\t</div>\n\t\t\t\t</button>\n\t\t\t</li>"})),t+="</ul></div>"):""},e.prototype.getControlConfigs=function(){var t=this,e=La.getProperty(this.getOptions(),"toolbar","numberOfIcons"),n=La.getProperty(this.getOptions(),"toolbar","controls"),r=[];return n.forEach((function(e){var n=t.getControlConfigByType(e.type);n&&(n.text=e.text?e.text:e.type,r.push(n))})),r.length<=e?{buttonList:r}:{buttonList:r.splice(0,e-1),overflowMenuItemList:r}},e.prototype.getOverflowMenuItems=function(){var t=this.getControlConfigs().overflowMenuItemList;return t||[]},e.prototype.getOverflowButtonConfig=function(){var t=this;return{id:"toolbar-overflow-menu",shouldBeDisabled:function(){return!1},iconSVGContent:'<circle cx="16" cy="8" r="2"></circle>\n\t\t\t\t\t\t\t <circle cx="16" cy="16" r="2"></circle>\n\t\t\t\t\t\t\t <circle cx="16" cy="24" r="2"></circle>',clickFunction:function(){return t.toggleOverflowMenu()}}},e.prototype.getControlConfigByType=function(t){var e,n=this,r=this.services.zoom.isZoomBarEnabled()&&!this.services.zoom.isEmptyState();switch(t){case j.ZOOM_IN:r&&(e={id:"toolbar-zoomIn",shouldBeDisabled:function(){return n.services.zoom.isMinZoomDomain()},iconSVGContent:this.getControlIconByType(t),clickFunction:function(){return n.services.zoom.zoomIn()}});break;case j.ZOOM_OUT:r&&(e={id:"toolbar-zoomOut",shouldBeDisabled:function(){return n.services.zoom.isMaxZoomDomain()},iconSVGContent:this.getControlIconByType(t),clickFunction:function(){return n.services.zoom.zoomOut()}});break;case j.RESET_ZOOM:r&&(e={id:"toolbar-resetZoom",shouldBeDisabled:function(){return n.services.zoom.isMaxZoomDomain()},iconSVGContent:this.getControlIconByType(t),clickFunction:function(){return n.services.zoom.resetZoomDomain()}});break;default:throw Error("Not supported toolbar control type: "+t)}return e},e.prototype.getControlIconByType=function(t){switch(t){case j.ZOOM_IN:return'<polygon points="19 13 15 13 15 9 13 9 13 13 9 13 9 15 13 15 13 19 15 19 15 15 19 15 19 13"/>\n \t\t\t\t\t<path d="M22.45,21A10.87,10.87,0,0,0,25,14,11,11,0,1,0,14,25a10.87,10.87,0,0,0,7-2.55L28.59,30,30,28.59ZM14,23a9,9,0,1,1,9-9A9,9,0,0,1,14,23Z"/>';case j.ZOOM_OUT:return'<rect x="9" y="13" width="10" height="2"/>\n\t\t\t\t\t\t<path d="M22.45,21A10.87,10.87,0,0,0,25,14,11,11,0,1,0,14,25a10.87,10.87,0,0,0,7-2.55L28.59,30,30,28.59ZM14,23a9,9,0,1,1,9-9A9,9,0,0,1,14,23Z"/>';case j.RESET_ZOOM:return'<path d="M22.4478,21A10.855,10.855,0,0,0,25,14,10.99,10.99,0,0,0,6,6.4658V2H4v8h8V8H7.332a8.9768,8.9768,0,1,1-2.1,8H3.1912A11.0118,11.0118,0,0,0,14,25a10.855,10.855,0,0,0,7-2.5522L28.5859,30,30,28.5859Z"/>';default:throw Error("Not supported toolbar control type: "+t)}},e}(vg),mm=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.getRangeAxisPosition({groups:this.configs.groups}),n=this.services.cartesianScales.getScaleByPosition(e),r=n.domain(),i=r[0],a=r[1],o=i>0&&a<0||i<0&&a>0,s=this.getContainerSVG();if(o){var u=this.services.cartesianScales.getDomainScale().range(),l=u[0],c=u[1],h=+n(0)+.5;h||(h=n.range()[0]);var f=La.flipSVGCoordinatesBasedOnOrientation({x0:l,x1:c,y0:h,y1:h},this.services.cartesianScales.getOrientation());Cf.appendOrSelect(s,"line.domain").transition(this.services.transitions.getTransition("zero-line-update",t)).attr("y1",f.y0).attr("y2",f.y1).attr("x1",f.x0).attr("x2",f.x1)}else s.selectAll("line.domain").remove()},e}(vg),ym=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="zoom-bar",e.MIN_SELECTION_DIFF=9e-10,e.brushSelector="g.zoom-bar-brush",e.clipId="zoomBarClip-"+Math.floor(99999999999*Math.random()),e.brush=lm(),e}return n(e,t),e.prototype.init=function(){this.services.events.addEventListener(W.ZoomBar.UPDATE,this.render.bind(this));var t=La.getProperty(this.getOptions(),"zoomBar",S.TOP,"data");this.model.setZoomBarData(t)},e.prototype.render=function(t){var e=this,n=this.getContainerSVG(),r=this.services.zoom.isZoomBarLoading(S.TOP),i=this.services.zoom.isZoomBarLocked(S.TOP),a=La.getProperty(this.getOptions(),"zoomBar",S.TOP,"type"),o=fo.height[a],s=Cf.getSVGElementSize(this.parent,{useAttrs:!0}).width,u=0,l=this.model.get("axesMargins");l&&l.left&&(u=l.left);var c=Cf.appendOrSelect(n,"svg.zoom-container").attr("width","100%").attr("height",o).attr("opacity",1);Cf.appendOrSelect(n,"rect.zoom-spacer").attr("x",0).attr("y",o).attr("width","100%").attr("height",fo.spacerHeight).attr("opacity",1).attr("fill","none");if(a===T.GRAPH_VIEW?Cf.appendOrSelect(c,"rect.zoom-bg").attr("x",u).attr("y",0).attr("width",s-u).attr("height","100%"):a===T.SLIDER_VIEW&&Cf.appendOrSelect(c,"rect.zoom-slider-bg").attr("x",u).attr("y",o/2-1).attr("width",s-u).attr("height",2),!r){var h=this.services.cartesianScales,f=h.getMainXScale(),d=h.getMainYScale(),p=h.getMainXScaleType();if(f&&p===C.TIME){var g=this.services.zoom.getZoomBarData();if(La.isEmpty(g))return;this.xScale=f.copy(),this.yScale=d.copy();var v=this.services.zoom.getDefaultZoomBarDomain(g);g=this.compensateDataForDefaultDomain(g,v);var m=this.model.get("initialZoomDomain"),y=La.getProperty(this.getOptions(),"zoomBar",S.TOP,"initialZoomDomain");y&&y[0]&&y[1]&&(y[0]=new Date(y[0]),y[1]=new Date(y[1])),m===y||m&&y&&m[0].valueOf()===y[0].valueOf()&&m[1].valueOf()===y[1].valueOf()||this.model.set({initialZoomDomain:y,zoomDomain:y||v},{skipUpdate:!0}),this.xScale.range([u,s]).domain(v),this.maxSelectionRange=this.xScale.range(),this.yScale.range([0,o-6]).domain(Ho(g,(function(t){return t.value})));var _=this.model.get("zoomDomain");if(a===T.GRAPH_VIEW){this.renderZoomBarArea(c,"path.zoom-graph-area-unselected",g,null),this.updateClipPath(n,this.clipId,0,0,0,0),this.renderZoomBarArea(c,"path.zoom-graph-area",g,this.clipId);var b=rh()([[u,o],[s,o]]);Cf.appendOrSelect(c,"path.zoom-bg-baseline").attr("d",b)}this.addBrushEventListener(_,u,s);var x=Cf.appendOrSelect(n,this.brushSelector).call(this.brush);if(void 0===_);else if(_[0].valueOf()===_[1].valueOf())x.call(this.brush.move,this.xScale.range()),this.updateBrushHandle(this.getContainerSVG(),this.xScale.range(),this.xScale.domain());else{var w=_.map((function(t){return e.xScale(t)}));w[1]-w[0]<this.MIN_SELECTION_DIFF||(x.call(this.brush.move,w),this.updateBrushHandle(this.getContainerSVG(),w,_))}i&&(this.brush.filter((function(){return!1})),x.selectAll("rect").attr("cursor","auto"))}}},e.prototype.addBrushEventListener=function(t,e,n){var r=this,i=La.getProperty(this.getOptions(),"zoomBar",S.TOP,"type"),a=fo.height[i];this.brush.extent([[e,0],[n,a]]).on("start brush end",null).on("start brush end",(function(){var e=Ea.selection;null===e?r.handleBrushedEvent(t,r.xScale,r.xScale.range()):e[0]===e[1]||r.handleBrushedEvent(t,r.xScale,e)}))},e.prototype.handleBrushedEvent=function(t,e,n){var r=[e.invert(n[0]),e.invert(n[1])];if(this.updateBrushHandle(this.getContainerSVG(),n,r),null!=Ea.sourceEvent&&("mousemove"===Ea.sourceEvent.type||"mouseup"===Ea.sourceEvent.type||"mousedown"===Ea.sourceEvent.type||"touchstart"===Ea.sourceEvent.type||"touchmove"===Ea.sourceEvent.type||"touchend"===Ea.sourceEvent.type)){void 0!==t&&t[0]===r[0]&&t[1]===r[1]||this.services.zoom.handleDomainChange(r,{dispatchEvent:!1});var i=void 0;"start"===Ea.type?i=W.ZoomBar.SELECTION_START:"brush"===Ea.type?i=W.ZoomBar.SELECTION_IN_PROGRESS:"end"===Ea.type&&(i=W.ZoomBar.SELECTION_END),this.services.events.dispatchEvent(i,{selection:n,newDomain:r})}},e.prototype.updateBrushHandle=function(t,e,n){var r=this,i=fo.handleWidth,a=La.getProperty(this.getOptions(),"zoomBar",S.TOP,"type"),o=fo.height[a],s=-i/2,u=fo.handleBarWidth,l=a===T.GRAPH_VIEW?fo.handleBarHeight:6,c=-u/2,h=(o-l)/2;t.select(this.brushSelector).selectAll("rect.handle").data([{type:"w"},{type:"e"}]).attr("x",(function(t){return"w"===t.type?Math.max(e[0]+s,r.maxSelectionRange[0]):"e"===t.type?Math.min(e[1]+s,r.maxSelectionRange[1]-i):void 0})).attr("y",0).attr("width",i).attr("height",o).attr("cursor","ew-resize").style("display",null);var f=t.select(this.brushSelector).selectAll("rect.handle-bar").data([{type:"w"},{type:"e"}]);f.enter().append("rect").attr("class",(function(t){return"handle-bar handle-bar--"+t.type})),f.attr("x",(function(t){return"w"===t.type?Math.max(e[0]+c,r.maxSelectionRange[0]-s+c):"e"===t.type?Math.min(e[1]+c,r.maxSelectionRange[1]+s+c):void 0})).attr("y",h).attr("width",u).attr("height",l).attr("cursor","ew-resize"),a===T.SLIDER_VIEW&&this.updateSliderSelectedArea(e),this.updateClipPath(t,this.clipId,e[0],0,e[1]-e[0],o)},e.prototype.updateSliderSelectedArea=function(t){var e=La.getProperty(this.getOptions(),"zoomBar",S.TOP,"type"),n=fo.height[e],r=(Cf.getSVGElementSize(this.parent,{useAttrs:!0}).width,this.model.get("axesMargins"));r&&r.left&&r.left;var i=this.getContainerSVG().select("svg.zoom-container");Cf.appendOrSelect(i,"rect.zoom-slider-selected-area").attr("x",t[0]).attr("y",n/2-1).attr("width",t[1]-t[0]).attr("height",2)},e.prototype.renderZoomBarArea=function(t,e,n,r){var i=this.services.cartesianScales,a=i.getMainXAxisPosition(),o=i.getMainYAxisPosition(),s=i.getMainXScaleType(),u=i.getMainYScaleType(),l=function(t,e,n){return function(r,a){return i.getValueFromScale(t,e,n,r,a)}},c=l(this.xScale,s,a),h=l(this.yScale,u,o),f=La.getProperty(this.getOptions(),"zoomBar",S.TOP,"type"),d=fo.height[f],p=ih().x((function(t,e){return c(t,e)})).y0(d).y1((function(t,e){return d-h(t,e)})),g=Cf.appendOrSelect(t,e).datum(n).attr("d",p);r&&g.attr("clip-path","url(#"+r+")")},e.prototype.updateClipPath=function(t,e,n,r,i,a){var o=Cf.appendOrSelect(t,"clipPath").attr("id",e);Cf.appendOrSelect(o,"rect").attr("x",n).attr("y",r).attr("width",i).attr("height",a)},e.prototype.compensateDataForDefaultDomain=function(t,e){if(t&&!(t.length<2)){var n,r=La.clone(t),i=this.services.cartesianScales.getDomainIdentifier(),a=this.services.cartesianScales.getRangeIdentifier();if(Number(e[0])<Number(r[0][i]))(n={})[i]=e[0],n[a]=0,r.unshift(n);if(Number(e[1])>Number(r[r.length-1][i]))(n={})[i]=e[1],n[a]=0,r.push(n);return r}},e.prototype.destroy=function(){this.brush.on("start brush end",null),this.services.events.removeEventListener(W.ZoomBar.UPDATE,this.render.bind(this))},e}(vg),_m=function(){function t(t,e){this.services={domUtils:Cf,events:Df,gradientUtils:Fd,transitions:Hd},this.model=new rf(this.services)}return t.prototype.init=function(t,e){var n=this;this.model.set({holder:t},{skipUpdate:!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(W.Model.UPDATE,(function(t){var e=!!La.getProperty(t,"detail","animate");n.update(e)})),this.model.setData(e.data),this.services.events.addEventListener(W.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(W.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},{skipUpdate:!0})},t.prototype.getChartComponents=function(t){var e={id:"title",components:[new Dg(this.model,this.services)],growth:{x:R.PREFERRED,y:R.FIXED}},n={id:"legend",components:[new mg(this.model,this.services)],growth:{x:R.PREFERRED,y:R.FIXED}},r={id:"graph-frame",components:t,growth:{x:R.STRETCH,y:R.FIXED}},i=!1!==this.model.getOptions().legend.enabled,a=L.COLUMN;if(i){var o=La.getProperty(this.model.getOptions(),"legend","position");"left"===o?(a=L.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=k.VERTICAL)):"right"===o?(a=L.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=k.VERTICAL)):"bottom"===o&&(a=L.COLUMN_REVERSE)}var s={id:"spacer",components:[new bv(this.model,this.services)],growth:{x:R.PREFERRED,y:R.FIXED}},u={id:"full-frame",components:[new xv(this.model,this.services,w(i?[n]:[],i?[s]:[],[r]),{direction:a})],growth:{x:R.STRETCH,y:R.FIXED}},l=[];if(this.model.getOptions().title){l.push(e);var c={id:"spacer",components:[new bv(this.model,this.services)],growth:{x:R.PREFERRED,y:R.FIXED}};l.push(c)}return l.push(u),[new kg(this.model,this.services),new xv(this.model,this.services,l,{direction:L.COLUMN})]},t}(),bm=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.setData=function(e){var n;return e&&(n=t.prototype.setData.call(this,e),La.getProperty(this.getOptions(),"zoomBar","top","enabled")&&this.setZoomBarData()),n},e.prototype.setZoomBarData=function(t){var e=t?this.sanitize(La.clone(t)):this.getDisplayData(),n=e,r=this.services.cartesianScales;if(e&&r.domainAxisPosition&&r.rangeAxisPosition){var i=r.getDomainIdentifier(),a=r.getRangeIdentifier(),o=e.map((function(t){return t[i].getTime()}));n=(o=La.removeArrayDuplicates(o).sort()).map((function(t){var n=0,r={};return e.forEach((function(e){e[i].getTime()===t&&(n+=e[a])})),r[i]=new Date(t),r[a]=n,r}))}this.set({zoomBarData:n})},e.prototype.getZoomBarData=function(){return this.get("zoomBarData")},e.prototype.sanitizeDateValues=function(t){var e=this.getOptions();if(!e.axes)return t;var n=[];return Object.keys(S).forEach((function(t){var r=S[t],i=e.axes[r];if(i&&i.scaleType===C.TIME){var a=i.mapsTo;null===a&&void 0===a||n.push(a)}})),n.length>0&&t.forEach((function(t){n.forEach((function(e){null===La.getProperty(t,e,"getTime")&&(t[e]=new Date(t[e]))}))})),t},e.prototype.sanitize=function(e){return e=t.prototype.sanitize.call(this,e),e=this.sanitizeDateValues(e)},e}(rf),xm=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.services=Object.assign(r.services,{cartesianScales:hg,curves:pg,zoom:gg}),r.model=new bm(r.services),r}return n(e,t),e.prototype.getAxisChartComponents=function(t){var e=La.getProperty(this.model.getOptions(),"zoomBar",S.TOP,"enabled"),n=La.getProperty(this.model.getOptions(),"toolbar","enabled");this.services.cartesianScales.determineAxisDuality(),this.services.cartesianScales.findDomainAndRangeAxes(),this.services.cartesianScales.determineOrientation();var r=this.services.cartesianScales.getMainXAxisPosition(),i=La.getProperty(this.model.getOptions(),"axes",r,"scaleType"),a=e&&r===S.BOTTOM&&i===C.TIME,o=this.services.zoom.isZoomBarLocked(S.TOP),s=!!this.model.getOptions().title,u={id:"title",components:[new Dg(this.model,this.services)],growth:{x:R.STRETCH,y:R.FIXED}},l={id:"toolbar",components:[new vm(this.model,this.services)],growth:{x:R.PREFERRED,y:R.FIXED}},c={id:"header",components:[new xv(this.model,this.services,w([u],n?[l]:[]),{direction:L.ROW})],growth:{x:R.PREFERRED,y:R.FIXED}},h={id:"legend",components:[new mg(this.model,this.services)],growth:{x:R.PREFERRED,y:R.FIXED}};a&&!o&&t.push(new hm(this.model,this.services),new cm(this.model,this.services));var f={id:"graph-frame",components:t,growth:{x:R.STRETCH,y:R.FIXED}},d=!1!==this.model.getOptions().legend.enabled,p=L.COLUMN;if(d){var g=La.getProperty(this.model.getOptions(),"legend","position");g===D.LEFT?(p=L.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=k.VERTICAL)):g===D.RIGHT?(p=L.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=k.VERTICAL)):g===D.BOTTOM&&(p=L.COLUMN_REVERSE)}var v={id:"spacer",components:[new bv(this.model,this.services)],growth:{x:R.PREFERRED,y:R.FIXED}},m={id:"full-frame",components:[new xv(this.model,this.services,w(d?[h]:[],d?[v]:[],[f]),{direction:p})],growth:{x:R.STRETCH,y:R.FIXED}},y={id:"zoom-bar",components:[new ym(this.model,this.services)],growth:{x:R.PREFERRED,y:R.FIXED}},_=[];if(s||n){_.push(c);var b={id:"spacer",components:[new bv(this.model,this.services,n?{size:15}:void 0)],growth:{x:R.PREFERRED,y:R.FIXED}};_.push(b)}return a&&_.push(y),_.push(m),[new Lg(this.model,this.services),new xv(this.model,this.services,_,{direction:L.COLUMN})]},e}(_m),wm=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(La.mergeDefaultChartOptions(La.clone(Lo.areaChart),n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Iv(this.model,this.services),new fm(this.model,this.services),new pm(this.model,this.services),new Hg(this.model,this.services),new Rg(this.model,this.services),new Ug(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0})];return this.getAxisChartComponents(t)},e}(xm),Om=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(La.mergeDefaultChartOptions(Lo.stackedAreaChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Iv(this.model,this.services),new fm(this.model,this.services),new gm(this.model,this.services),new Ig(this.model,this.services),new Hg(this.model,this.services,{stacked:!0}),new Fg(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0,stacked:!0})];return this.getAxisChartComponents(t)},e}(xm),Em=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(La.mergeDefaultChartOptions(Lo.simpleBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Iv(this.model,this.services),new fm(this.model,this.services),new Gg(this.model,this.services),new mm(this.model,this.services),new qg(this.model,this.services,{skeleton:N.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)},e}(xm),Sm=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(La.mergeDefaultChartOptions(Lo.groupedBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Iv(this.model,this.services),new fm(this.model,this.services),new Bg(this.model,this.services),new mm(this.model,this.services),new qg(this.model,this.services,{skeleton:N.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)},e}(xm),Tm=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(La.mergeDefaultChartOptions(Lo.stackedBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Iv(this.model,this.services),new fm(this.model,this.services),new gm(this.model,this.services),new Vg(this.model,this.services),new qg(this.model,this.services,{skeleton:N.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)},e}(xm),Mm=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(La.mergeDefaultChartOptions(Lo.bubbleChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Iv(this.model,this.services),new fm(this.model,this.services),new pm(this.model,this.services),new zg(this.model,this.services),new qg(this.model,this.services,{skeleton:N.GRID})];return this.getAxisChartComponents(t)},e}(xm),Am=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(La.mergeDefaultChartOptions(Lo.lineChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Iv(this.model,this.services),new fm(this.model,this.services),new pm(this.model,this.services),new Hg(this.model,this.services),new Ug(this.model,this.services,{handleThresholds:!0}),new Zg(this.model,this.services)];return this.getAxisChartComponents(t)},e}(xm),Cm=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(La.mergeDefaultChartOptions(Lo.scatterChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Iv(this.model,this.services),new fm(this.model,this.services),new pm(this.model,this.services),new Ug(this.model,this.services),new qg(this.model,this.services,{skeleton:N.GRID})];return this.getAxisChartComponents(t)},e}(xm),Dm=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}(rf),Pm=function(t){function e(e,n,r){void 0===r&&(r=!1);var i=t.call(this,e,n)||this;return i.model=new Dm(i.services),r?i:(i.model.setOptions(La.mergeDefaultChartOptions(Lo.pieChart,n.options)),i.init(e,n),i)}return n(e,t),e.prototype.getComponents=function(){var t=[new Wg(this.model,this.services),new qg(this.model,this.services,{skeleton:N.PIE})];return this.getChartComponents(t)},e}(_m),km=function(t){function e(e,n){var r=t.call(this,e,n,!0)||this;return r.model.setOptions(La.mergeDefaultChartOptions(Lo.donutChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Xg(this.model,this.services),new qg(this.model,this.services,{skeleton:N.DONUT})];return this.getChartComponents(t)},e}(Pm),Lm=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.generateDataLabels=function(t){var e={};return e[t.label]=ro.items.status.ACTIVE,e},e.prototype.getDisplayData=function(){return this.get("data")?this.get("data")[0]:null},e.prototype.getFillColor=function(e){var n=this.getOptions(),r=La.getProperty(n,"color","scale"),i=this.getStatus();return r||!i?t.prototype.getFillColor.call(this,e):null},e.prototype.getStatus=function(){var t=this.getOptions(),e=this.getDisplayData().value,n=e>100?100:e,r=La.getProperty(t,"meter","status","ranges");if(r){var i=r.filter((function(t){return t.range[0]<=n&&n<=t.range[1]}));if(i.length>0)return i[0].status}return null},e}(rf),Rm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="meter",e}return n(e,t),e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this,i=this.getContainerSVG(),a=this.getOptions(),o=this.model.getDisplayData(),s=this.model.getStatus(),u=Cf.getSVGElementSize(this.parent,{useAttrs:!0}).width,l=a.data.groupMapsTo,c=ku().domain([0,100]).range([0,u]);Cf.appendOrSelect(i,"rect.container").attr("x",0).attr("y",0).attr("width",u).attr("height",La.getProperty(a,"meter","height"));var h=o.value>=100,f=i.selectAll("rect.value").data([o]),d=null==s||n.model.isUserProvidedColorScaleValid()?"":"value status--"+s;f.enter().append("rect").classed("value",!0).merge(f).attr("x",0).attr("y",0).attr("height",La.getProperty(a,"meter","height")).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[E.FILL],dataGroupName:t[l],originalClassName:d})})).transition(this.services.transitions.getTransition("meter-bar-update",t)).attr("width",(function(t){return c(h?100:t.value)})).attr("fill",(function(t){return n.model.getFillColor(t[l])})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","value").attr("aria-label",(function(t){return t.value}));var p=La.getProperty(a,"meter","peak"),g=null!==p&&p<o.value?o.value:p,v=null===g||h?[]:[g],m=i.selectAll("line.peak").data(v);m.enter().append("line").classed("peak",!0).merge(m).attr("y1",0).attr("y2",La.getProperty(a,"meter","height")).transition(this.services.transitions.getTransition("peak-line-update",t)).attr("x1",(function(t){return c(t)})).attr("x2",(function(t){return c(t)})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","peak").attr("aria-label",(function(t){return t})),m.exit().remove(),this.services.domUtils.setSVGMaxHeight()},e}(vg),Im=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new Lm(r.services),r.model.setOptions(La.merge(La.clone(Lo.meterChart),n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t={id:"meter-graph",components:[new Rm(this.model,this.services)],growth:{x:R.STRETCH,y:R.FIXED}},e={id:"title",components:[new Pg(this.model,this.services)],growth:{x:R.PREFERRED,y:R.FIXED}},n={id:"spacer",components:[new bv(this.model,this.services,{size:8})],growth:{x:R.PREFERRED,y:R.FIXED}},r=[new xv(this.model,this.services,[e,n,t],{direction:L.COLUMN})];return this.getChartComponents(r)},e}(_m),Nm=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(La.mergeDefaultChartOptions(Lo.radarChart,n.options)),i.init(e,n),i)}return n(e,t),e.prototype.getComponents=function(){var t=[new _v(this.model,this.services)];return this.getChartComponents(t)},e}(_m),Gm=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getDataGroups=function(){return t.prototype.getDataGroups.call(this).filter((function(t){return"delta"!==t.name}))},e}(rf),Bm=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new Gm(r.services),r.model.setOptions(La.mergeDefaultChartOptions(Lo.gaugeChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Yg(this.model,this.services)];return this.getChartComponents(t)},e}(_m),Vm=((dm={})[F.LINE]=[Hg,Ug],dm[F.SCATTER]=[Ug],dm[F.AREA]=[Rg,Hg,Ug],dm[F.STACKED_AREA]=[Ig,Hg,Fg,gm],dm[F.SIMPLE_BAR]=[Gg],dm[F.GROUPED_BAR]=[Bg,mm],dm[F.STACKED_BAR]=[Vg,gm],dm),Um=function(t){function e(e,n){var r=t.call(this,e,n)||this,i=La.mergeDefaultChartOptions(Lo.comboChart,n.options);return n.options.comboChartTypes||(console.error("No comboChartTypes defined for the Combo Chart!"),i.comboChartTypes=[{type:F.LINE,correspondingDatasets:[]}]),r.model.setOptions(i),r.init(e,n),r}return n(e,t),e.prototype.getGraphComponents=function(){var t=this,e=this.model.getOptions().comboChartTypes,n=0,r=e.map((function(e){var r,i,a=e.type;return"string"==typeof e.type?Object.keys(Vm).includes(e.type)?(r=La.merge({},Lo[La.camelCase(e.type)+"Chart"],t.model.getOptions(),e.options),e.type===F.STACKED_AREA&&(i=!0),Vm[e.type].map((function(a,o){return new a(t.model,t.services,{groups:e.correspondingDatasets,id:n++,options:r,stacked:i})}))):(console.error('Invalid chart type "'+e.type+'" specified for combo chart. Please refer to the ComboChart tutorial for more guidance.'),null):(r=La.merge({},t.model.getOptions(),e.options),new a(t.model,t.services,{groups:e.correspondingDatasets,id:n++,options:r}))})).filter((function(t){return null!==t}));return La.flatten(r)},e.prototype.getComponents=function(){var t=this.model.getOptions().comboChartTypes.some((function(t){return t.type===F.STACKED_BAR||t.type===F.STACKED_AREA})),e=w([new Iv(this.model,this.services),new fm(this.model,this.services),new qg(this.model,this.services,{skeleton:N.GRID})],t?[]:[new pm(this.model,this.services)],this.getGraphComponents());return this.getAxisChartComponents(e)},e}(xm),zm=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(La.mergeDefaultChartOptions(Lo.treemapChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new pv(this.model,this.services)];return this.getChartComponents(t)},e}(_m);t.AreaChart=wm,t.BubbleChart=Mm,t.ComboChart=Um,t.DonutChart=km,t.GaugeChart=Bm,t.GroupedBarChart=Sm,t.LineChart=Am,t.MeterChart=Im,t.PieChart=Pm,t.RadarChart=Nm,t.ScatterChart=Cm,t.SimpleBarChart=Em,t.StackedAreaChart=Om,t.StackedBarChart=Tm,t.TreemapChart=zm,t.configurations=Ro,t.interfaces=Y,Object.defineProperty(t,"__esModule",{value:!0})}));
|