@carbon/charts 0.32.10 → 0.33.1

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.
Files changed (141) hide show
  1. package/CHANGELOG.md +333 -147
  2. package/README.md +18 -8
  3. package/axis-chart.js +20 -20
  4. package/axis-chart.js.map +1 -1
  5. package/build/demo/data/area.d.ts +17 -0
  6. package/build/demo/data/bar.d.ts +32 -48
  7. package/build/demo/data/line.d.ts +29 -0
  8. package/build/src/interfaces/charts.d.ts +5 -0
  9. package/build/src/model.d.ts +1 -0
  10. package/build/src/services/scales-cartesian.d.ts +1 -1
  11. package/build/src/tools.d.ts +7 -7
  12. package/bundle.js +1 -1
  13. package/charts/area-stacked.js +3 -3
  14. package/charts/area-stacked.js.map +1 -1
  15. package/charts/area.js +3 -3
  16. package/charts/area.js.map +1 -1
  17. package/charts/bar-grouped.js +3 -3
  18. package/charts/bar-grouped.js.map +1 -1
  19. package/charts/bar-simple.js +3 -3
  20. package/charts/bar-simple.js.map +1 -1
  21. package/charts/bar-stacked.js +3 -3
  22. package/charts/bar-stacked.js.map +1 -1
  23. package/charts/bubble.js +3 -3
  24. package/charts/bubble.js.map +1 -1
  25. package/charts/donut.js +3 -3
  26. package/charts/donut.js.map +1 -1
  27. package/charts/gauge.js +2 -1
  28. package/charts/gauge.js.map +1 -1
  29. package/charts/line.js +3 -3
  30. package/charts/line.js.map +1 -1
  31. package/charts/pie.js +3 -3
  32. package/charts/pie.js.map +1 -1
  33. package/charts/radar.js +1 -1
  34. package/charts/radar.js.map +1 -1
  35. package/charts/scatter.js +3 -3
  36. package/charts/scatter.js.map +1 -1
  37. package/components/axes/axis.js +25 -23
  38. package/components/axes/axis.js.map +1 -1
  39. package/components/axes/grid.js +1 -1
  40. package/components/axes/grid.js.map +1 -1
  41. package/components/axes/ruler.js +2 -2
  42. package/components/axes/ruler.js.map +1 -1
  43. package/components/axes/two-dimensional-axes.js +3 -3
  44. package/components/axes/two-dimensional-axes.js.map +1 -1
  45. package/components/axes/zero-line.js +1 -1
  46. package/components/axes/zero-line.js.map +1 -1
  47. package/components/essentials/legend.js +20 -11
  48. package/components/essentials/legend.js.map +1 -1
  49. package/components/essentials/threshold.js +9 -9
  50. package/components/essentials/threshold.js.map +1 -1
  51. package/components/essentials/title.js +2 -2
  52. package/components/essentials/title.js.map +1 -1
  53. package/components/essentials/tooltip-bar.js +9 -7
  54. package/components/essentials/tooltip-bar.js.map +1 -1
  55. package/components/essentials/tooltip.js +7 -7
  56. package/components/essentials/tooltip.js.map +1 -1
  57. package/components/graphs/area-stacked.js +8 -7
  58. package/components/graphs/area-stacked.js.map +1 -1
  59. package/components/graphs/bar-grouped.js +7 -7
  60. package/components/graphs/bar-grouped.js.map +1 -1
  61. package/components/graphs/bar-simple.js +6 -6
  62. package/components/graphs/bar-simple.js.map +1 -1
  63. package/components/graphs/bar-stacked.js +6 -6
  64. package/components/graphs/bar-stacked.js.map +1 -1
  65. package/components/graphs/gauge.js +4 -3
  66. package/components/graphs/gauge.js.map +1 -1
  67. package/components/graphs/line.js +14 -10
  68. package/components/graphs/line.js.map +1 -1
  69. package/components/graphs/pie.js +12 -12
  70. package/components/graphs/pie.js.map +1 -1
  71. package/components/graphs/radar.js +11 -11
  72. package/components/graphs/radar.js.map +1 -1
  73. package/components/graphs/scatter-stacked.js +2 -4
  74. package/components/graphs/scatter-stacked.js.map +1 -1
  75. package/components/graphs/scatter.js +6 -8
  76. package/components/graphs/scatter.js.map +1 -1
  77. package/components/graphs/skeleton.js +3 -3
  78. package/components/graphs/skeleton.js.map +1 -1
  79. package/components/layout/layout.js +10 -4
  80. package/components/layout/layout.js.map +1 -1
  81. package/configuration.js +14 -9
  82. package/configuration.js.map +1 -1
  83. package/demo/create-codesandbox.js +19 -19
  84. package/demo/create-codesandbox.js.map +1 -1
  85. package/demo/data/area.d.ts +17 -0
  86. package/demo/data/area.js +26 -0
  87. package/demo/data/area.js.map +1 -1
  88. package/demo/data/bar.d.ts +32 -48
  89. package/demo/data/bar.js +134 -141
  90. package/demo/data/bar.js.map +1 -1
  91. package/demo/data/bubble.js +29 -29
  92. package/demo/data/bubble.js.map +1 -1
  93. package/demo/data/bundle.js +1 -1
  94. package/demo/data/index.js +21 -5
  95. package/demo/data/index.js.map +1 -1
  96. package/demo/data/line.d.ts +29 -0
  97. package/demo/data/line.js +122 -60
  98. package/demo/data/line.js.map +1 -1
  99. package/demo/data/pie.js +5 -5
  100. package/demo/data/pie.js.map +1 -1
  101. package/demo/data/radar.js +12 -12
  102. package/demo/data/radar.js.map +1 -1
  103. package/demo/data/scatter.js +48 -32
  104. package/demo/data/scatter.js.map +1 -1
  105. package/demo/data/step.js +6 -6
  106. package/demo/data/step.js.map +1 -1
  107. package/demo/data/time-series-axis.js +107 -107
  108. package/demo/data/time-series-axis.js.map +1 -1
  109. package/demo/tsconfig.tsbuildinfo +20 -20
  110. package/interfaces/a11y.js.map +1 -1
  111. package/interfaces/charts.d.ts +5 -0
  112. package/interfaces/charts.js.map +1 -1
  113. package/interfaces/enums.js.map +1 -1
  114. package/interfaces/events.js.map +1 -1
  115. package/model.d.ts +1 -0
  116. package/model.js +61 -5
  117. package/model.js.map +1 -1
  118. package/package.json +1 -1
  119. package/polyfills.js +1 -1
  120. package/polyfills.js.map +1 -1
  121. package/services/angle-utils.js +8 -8
  122. package/services/angle-utils.js.map +1 -1
  123. package/services/colorPalettes.js +2 -2
  124. package/services/colorPalettes.js.map +1 -1
  125. package/services/colors.js +1 -1
  126. package/services/colors.js.map +1 -1
  127. package/services/curves.js +2 -2
  128. package/services/curves.js.map +1 -1
  129. package/services/essentials/dom-utils.js +6 -6
  130. package/services/essentials/dom-utils.js.map +1 -1
  131. package/services/essentials/events.js +1 -1
  132. package/services/essentials/events.js.map +1 -1
  133. package/services/scales-cartesian.d.ts +1 -1
  134. package/services/scales-cartesian.js +18 -18
  135. package/services/scales-cartesian.js.map +1 -1
  136. package/services/time-series.js +2 -2
  137. package/services/time-series.js.map +1 -1
  138. package/tools.d.ts +7 -7
  139. package/tools.js +16 -14
  140. package/tools.js.map +1 -1
  141. package/tsconfig.tsbuildinfo +55 -55
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,o,a,s,u,l,c,h,f,d,p,g,v,m=function(){return(m=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 y(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),i=0;for(e=0;e<n;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}!function(t){t.GRAPHICS_DOCUMENT="graphics-document",t.GRAPHICS_OBJECT="graphics-object",t.GRAPHICS_SYMBOL="graphics-symbol",t.GROUP="group"}(r||(r={})),function(t){t.RENDER_FINISHED="render-finished",t.RESIZE="chart-resize",t.MOUSEOVER="chart-mouseover",t.MOUSEOUT="chart-mouseout"}(i||(i={})),function(t){t.UPDATE="model-update"}(o||(o={})),function(t){t.LABEL_MOUSEOVER="axis-label-mouseover",t.LABEL_MOUSEMOVE="axis-label-mousemove",t.LABEL_CLICK="axis-label-click",t.LABEL_MOUSEOUT="axis-label-mouseout"}(a||(a={})),function(t){t.AREA_MOUSEOVER="area-mouseover",t.AREA_MOUSEMOVE="area-mousemove",t.AREA_CLICK="area-click",t.AREA_MOUSEOUT="area-mouseout"}(s||(s={})),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"}(u||(u={})),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"}(l||(l={})),function(t){t.BAR_MOUSEOVER="bar-mouseover",t.BAR_MOUSEMOVE="bar-mousemove",t.BAR_CLICK="bar-click",t.BAR_MOUSEOUT="bar-mouseout"}(c||(c={})),function(t){t.SCATTER_MOUSEOVER="scatter-mouseover",t.SCATTER_MOUSEMOVE="scatter-mousemove",t.SCATTER_CLICK="scatter-click",t.SCATTER_MOUSEOUT="scatter-mouseout"}(h||(h={})),function(t){t.POINT_MOUSEOVER="scatter-mouseover",t.POINT_MOUSEMOVE="scatter-mousemove",t.POINT_CLICK="scatter-click",t.POINT_MOUSEOUT="scatter-mouseout"}(f||(f={})),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"}(d||(d={})),function(t){t.SHOW="show-tooltip",t.HIDE="hide-tooltip"}(p||(p={})),function(t){t.SHOW="show-threshold",t.HIDE="hide-threshold"}(g||(g={})),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"}(v||(v={}));var _,b,x,w,E,T,O,S,M,A,C,P,k,L,D,R,I,N,U=Object.freeze({__proto__:null,get Chart(){return i},get Model(){return o},get Axis(){return a},get Area(){return s},get Pie(){return u},get Gauge(){return l},get Bar(){return c},get Scatter(){return h},get Line(){return f},get Radar(){return d},get Tooltip(){return p},get Threshold(){return g},get Legend(){return v}});!function(t){t.DEFAULT="default",t.G100="g100",t.G90="g90",t.G10="g10"}(_||(_={})),function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(b||(b={})),function(t){t.END_LINE="end_line",t.MID_LINE="mid_line",t.FRONT_LINE="front_line",t.NONE="none"}(x||(x={})),function(t){t.VERTICAL="vertical",t.HORIZONTAL="horizontal"}(w||(w={})),function(t){t.TIME="time",t.LINEAR="linear",t.LOG="log",t.LABELS="labels"}(E||(E={})),function(t){t.MOUSE="mouse",t.TOP="top",t.BOTTOM="bottom"}(T||(T={})),function(t){t.DATAPOINT="datapoint",t.GRIDLINE="gridline",t.TITLE="title",t.LEGEND="legend",t.AXISLABEL="axislabel"}(O||(O={})),function(t){t.RIGHT="right",t.LEFT="left",t.TOP="top",t.BOTTOM="bottom"}(S||(S={})),function(t){t.HORIZONTAL="horizontal",t.VERTICAL="vertical"}(M||(M={})),function(t){t.ROW="row",t.COLUMN="column",t.ROW_REVERSE="row-reverse",t.COLUMN_REVERSE="column-reverse"}(A||(A={})),function(t){t.FIXED="fixed",t.PREFERRED="preferred",t.STRETCH="stretch"}(C||(C={})),function(t){t.LEFT="left",t.RIGHT="right"}(P||(P={})),function(t){t.GRID="grid",t.VERT_OR_HORIZ="vertOrHoriz",t.PIE="pie",t.DONUT="donut"}(k||(k={})),function(t){t.START="start",t.MIDDLE="middle",t.END="end"}(L||(L={})),function(t){t.BASELINE="baseline",t.MIDDLE="middle",t.HANGING="hanging"}(D||(D={})),function(t){t.SEMI="semi",t.FULL="full"}(R||(R={})),function(t){t.UP="up",t.DOWN="down"}(I||(I={})),function(t){t.SUCCESS="success",t.WARNING="warning",t.DANGER="danger"}(N||(N={}));var j=Object.freeze({__proto__:null,get Roles(){return r},Events:U,get ChartTheme(){return _},get AxisPositions(){return b},get TruncationTypes(){return x},get CartesianOrientations(){return w},get ScaleTypes(){return E},get TooltipPosition(){return T},get TooltipTypes(){return O},get LegendPositions(){return S},get LegendOrientations(){return M},get LayoutDirection(){return A},get LayoutGrowth(){return C},get CalloutDirections(){return P},get Skeletons(){return k},get TextAnchor(){return L},get DominantBaseline(){return D},get GaugeTypes(){return R},get ArrowDirections(){return I},get Statuses(){return N}}),H="object"==typeof global&&global&&global.Object===Object&&global,V="object"==typeof self&&self&&self.Object===Object&&self,G=H||V||Function("return this")(),B=G.Symbol,F=Object.prototype,z=F.hasOwnProperty,W=F.toString,Y=B?B.toStringTag:void 0;var q=Object.prototype.toString;var X=B?B.toStringTag:void 0;function $(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":X&&X in Object(t)?function(t){var e=z.call(t,Y),n=t[Y];try{t[Y]=void 0;var r=!0}catch(t){}var i=W.call(t);return r&&(e?t[Y]=n:delete t[Y]),i}(t):function(t){return q.call(t)}(t)}function Z(t){return null!=t&&"object"==typeof t}function K(t){return"symbol"==typeof t||Z(t)&&"[object Symbol]"==$(t)}function Q(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 J=Array.isArray,tt=B?B.prototype:void 0,et=tt?tt.toString:void 0;function nt(t){if("string"==typeof t)return t;if(J(t))return Q(t,nt)+"";if(K(t))return et?et.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function rt(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var it=/^\s+|\s+$/g,ot=/^[-+]0x[0-9a-f]+$/i,at=/^0b[01]+$/i,st=/^0o[0-7]+$/i,ut=parseInt;function lt(t){if("number"==typeof t)return t;if(K(t))return NaN;if(rt(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=rt(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(it,"");var n=at.test(t);return n||st.test(t)?ut(t.slice(2),n?2:8):ot.test(t)?NaN:+t}function ct(t){return t}function ht(t){if(!rt(t))return!1;var e=$(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var ft,dt=G["__core-js_shared__"],pt=(ft=/[^.]+$/.exec(dt&&dt.keys&&dt.keys.IE_PROTO||""))?"Symbol(src)_1."+ft:"";var gt=Function.prototype.toString;function vt(t){if(null!=t){try{return gt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var mt=/^\[object .+?Constructor\]$/,yt=Function.prototype,_t=Object.prototype,bt=yt.toString,xt=_t.hasOwnProperty,wt=RegExp("^"+bt.call(xt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Et(t){return!(!rt(t)||(e=t,pt&&pt in e))&&(ht(t)?wt:mt).test(vt(t));var e}function Tt(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return Et(n)?n:void 0}var Ot=Tt(G,"WeakMap"),St=Object.create,Mt=function(){function t(){}return function(e){if(!rt(e))return{};if(St)return St(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function At(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 Ct(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var Pt=Date.now;var kt=function(){try{var t=Tt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),Lt=function(t){var e=0,n=0;return function(){var r=Pt(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(kt?function(t,e){return kt(t,"toString",{configurable:!0,enumerable:!1,value:(n=e,function(){return n}),writable:!0});var n}:ct);function Dt(t){return t!=t}function Rt(t,e){return!!(null==t?0:t.length)&&function(t,e,n){return e==e?function(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):function(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}(t,Dt,n)}(t,e,0)>-1}var It=/^(?:0|[1-9]\d*)$/;function Nt(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&It.test(t))&&t>-1&&t%1==0&&t<e}function Ut(t,e,n){"__proto__"==e&&kt?kt(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function jt(t,e){return t===e||t!=t&&e!=e}var Ht=Object.prototype.hasOwnProperty;function Vt(t,e,n){var r=t[e];Ht.call(t,e)&&jt(r,n)&&(void 0!==n||e in t)||Ut(t,e,n)}function Gt(t,e,n,r){var i=!n;n||(n={});for(var o=-1,a=e.length;++o<a;){var s=e[o],u=r?r(n[s],t[s],s,n,t):void 0;void 0===u&&(u=t[s]),i?Ut(n,s,u):Vt(n,s,u)}return n}var Bt=Math.max;function Ft(t,e){return Lt(function(t,e,n){return e=Bt(void 0===e?t.length-1:e,0),function(){for(var r=arguments,i=-1,o=Bt(r.length-e,0),a=Array(o);++i<o;)a[i]=r[e+i];i=-1;for(var s=Array(e+1);++i<e;)s[i]=r[i];return s[e]=n(a),At(t,this,s)}}(t,e,ct),t+"")}function zt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function Wt(t){return null!=t&&zt(t.length)&&!ht(t)}function Yt(t,e,n){if(!rt(n))return!1;var r=typeof e;return!!("number"==r?Wt(n)&&Nt(e,n.length):"string"==r&&e in n)&&jt(n[e],t)}var qt=Object.prototype;function Xt(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||qt)}function $t(t){return Z(t)&&"[object Arguments]"==$(t)}var Zt=Object.prototype,Kt=Zt.hasOwnProperty,Qt=Zt.propertyIsEnumerable,Jt=$t(function(){return arguments}())?$t:function(t){return Z(t)&&Kt.call(t,"callee")&&!Qt.call(t,"callee")};var te="object"==typeof t&&t&&!t.nodeType&&t,ee=te&&"object"==typeof module&&module&&!module.nodeType&&module,ne=ee&&ee.exports===te?G.Buffer:void 0,re=(ne?ne.isBuffer:void 0)||function(){return!1},ie={};function oe(t){return function(e){return t(e)}}ie["[object Float32Array]"]=ie["[object Float64Array]"]=ie["[object Int8Array]"]=ie["[object Int16Array]"]=ie["[object Int32Array]"]=ie["[object Uint8Array]"]=ie["[object Uint8ClampedArray]"]=ie["[object Uint16Array]"]=ie["[object Uint32Array]"]=!0,ie["[object Arguments]"]=ie["[object Array]"]=ie["[object ArrayBuffer]"]=ie["[object Boolean]"]=ie["[object DataView]"]=ie["[object Date]"]=ie["[object Error]"]=ie["[object Function]"]=ie["[object Map]"]=ie["[object Number]"]=ie["[object Object]"]=ie["[object RegExp]"]=ie["[object Set]"]=ie["[object String]"]=ie["[object WeakMap]"]=!1;var ae="object"==typeof t&&t&&!t.nodeType&&t,se=ae&&"object"==typeof module&&module&&!module.nodeType&&module,ue=se&&se.exports===ae&&H.process,le=function(){try{var t=se&&se.require&&se.require("util").types;return t||ue&&ue.binding&&ue.binding("util")}catch(t){}}(),ce=le&&le.isTypedArray,he=ce?oe(ce):function(t){return Z(t)&&zt(t.length)&&!!ie[$(t)]},fe=Object.prototype.hasOwnProperty;function de(t,e){var n=J(t),r=!n&&Jt(t),i=!n&&!r&&re(t),o=!n&&!r&&!i&&he(t),a=n||r||i||o,s=a?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],u=s.length;for(var l in t)!e&&!fe.call(t,l)||a&&("length"==l||i&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Nt(l,u))||s.push(l);return s}function pe(t,e){return function(n){return t(e(n))}}var ge=pe(Object.keys,Object),ve=Object.prototype.hasOwnProperty;function me(t){return Wt(t)?de(t):function(t){if(!Xt(t))return ge(t);var e=[];for(var n in Object(t))ve.call(t,n)&&"constructor"!=n&&e.push(n);return e}(t)}var ye=Object.prototype.hasOwnProperty;function _e(t){if(!rt(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=Xt(t),n=[];for(var r in t)("constructor"!=r||!e&&ye.call(t,r))&&n.push(r);return n}function be(t){return Wt(t)?de(t,!0):_e(t)}var xe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,we=/^\w*$/;function Ee(t,e){if(J(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!K(t))||(we.test(t)||!xe.test(t)||null!=e&&t in Object(e))}var Te=Tt(Object,"create");var Oe=Object.prototype.hasOwnProperty;var Se=Object.prototype.hasOwnProperty;function Me(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Ae(t,e){for(var n=t.length;n--;)if(jt(t[n][0],e))return n;return-1}Me.prototype.clear=function(){this.__data__=Te?Te(null):{},this.size=0},Me.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Me.prototype.get=function(t){var e=this.__data__;if(Te){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return Oe.call(e,t)?e[t]:void 0},Me.prototype.has=function(t){var e=this.__data__;return Te?void 0!==e[t]:Se.call(e,t)},Me.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Te&&void 0===e?"__lodash_hash_undefined__":e,this};var Ce=Array.prototype.splice;function Pe(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])}}Pe.prototype.clear=function(){this.__data__=[],this.size=0},Pe.prototype.delete=function(t){var e=this.__data__,n=Ae(e,t);return!(n<0)&&(n==e.length-1?e.pop():Ce.call(e,n,1),--this.size,!0)},Pe.prototype.get=function(t){var e=this.__data__,n=Ae(e,t);return n<0?void 0:e[n][1]},Pe.prototype.has=function(t){return Ae(this.__data__,t)>-1},Pe.prototype.set=function(t,e){var n=this.__data__,r=Ae(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var ke=Tt(G,"Map");function Le(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function De(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])}}De.prototype.clear=function(){this.size=0,this.__data__={hash:new Me,map:new(ke||Pe),string:new Me}},De.prototype.delete=function(t){var e=Le(this,t).delete(t);return this.size-=e?1:0,e},De.prototype.get=function(t){return Le(this,t).get(t)},De.prototype.has=function(t){return Le(this,t).has(t)},De.prototype.set=function(t,e){var n=Le(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function Re(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Re.Cache||De),n}Re.Cache=De;var Ie=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ne=/\\(\\)?/g,Ue=function(t){var e=Re(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(Ie,(function(t,n,r,i){e.push(r?i.replace(Ne,"$1"):n||t)})),e}));function je(t){return null==t?"":nt(t)}function He(t,e){return J(t)?t:Ee(t,e)?[t]:Ue(je(t))}function Ve(t){if("string"==typeof t||K(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Ge(t,e){for(var n=0,r=(e=He(e,t)).length;null!=t&&n<r;)t=t[Ve(e[n++])];return n&&n==r?t:void 0}function Be(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var Fe=B?B.isConcatSpreadable:void 0;function ze(t){return J(t)||Jt(t)||!!(Fe&&t&&t[Fe])}var We=pe(Object.getPrototypeOf,Object),Ye=Function.prototype,qe=Object.prototype,Xe=Ye.toString,$e=qe.hasOwnProperty,Ze=Xe.call(Object);var Ke=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"}),Qe=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Je=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var tn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var en=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var nn="\\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",rn="["+nn+"]",on="\\d+",an="[\\u2700-\\u27bf]",sn="[a-z\\xdf-\\xf6\\xf8-\\xff]",un="[^\\ud800-\\udfff"+nn+on+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",ln="(?:\\ud83c[\\udde6-\\uddff]){2}",cn="[\\ud800-\\udbff][\\udc00-\\udfff]",hn="[A-Z\\xc0-\\xd6\\xd8-\\xde]",fn="(?:"+sn+"|"+un+")",dn="(?:"+hn+"|"+un+")",pn="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",gn="[\\ufe0e\\ufe0f]?"+pn+("(?:\\u200d(?:"+["[^\\ud800-\\udfff]",ln,cn].join("|")+")[\\ufe0e\\ufe0f]?"+pn+")*"),vn="(?:"+[an,ln,cn].join("|")+")"+gn,mn=RegExp([hn+"?"+sn+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[rn,hn,"$"].join("|")+")",dn+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[rn,hn+fn,"$"].join("|")+")",hn+"?"+fn+"+(?:['’](?:d|ll|m|re|s|t|ve))?",hn+"+(?:['’](?: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_])",on,vn].join("|"),"g");function yn(t,e,n){return t=je(t),void 0===(e=n?void 0:e)?function(t){return en.test(t)}(t)?function(t){return t.match(mn)||[]}(t):function(t){return t.match(tn)||[]}(t):t.match(e)||[]}var _n=RegExp("['’]","g");function bn(t,e,n){return void 0===n&&(n=e,e=void 0),void 0!==n&&(n=(n=lt(n))==n?n:0),void 0!==e&&(e=(e=lt(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}(lt(t),e,n)}function xn(t){var e=this.__data__=new Pe(t);this.size=e.size}xn.prototype.clear=function(){this.__data__=new Pe,this.size=0},xn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},xn.prototype.get=function(t){return this.__data__.get(t)},xn.prototype.has=function(t){return this.__data__.has(t)},xn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Pe){var r=n.__data__;if(!ke||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new De(r)}return n.set(t,e),this.size=n.size,this};var wn="object"==typeof t&&t&&!t.nodeType&&t,En=wn&&"object"==typeof module&&module&&!module.nodeType&&module,Tn=En&&En.exports===wn?G.Buffer:void 0,On=Tn?Tn.allocUnsafe:void 0;function Sn(t,e){if(e)return t.slice();var n=t.length,r=On?On(n):new t.constructor(n);return t.copy(r),r}function Mn(){return[]}var An=Object.prototype.propertyIsEnumerable,Cn=Object.getOwnPropertySymbols,Pn=Cn?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}(Cn(t),(function(e){return An.call(t,e)})))}:Mn;var kn=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)Be(e,Pn(t)),t=We(t);return e}:Mn;function Ln(t,e,n){var r=e(t);return J(t)?r:Be(r,n(t))}function Dn(t){return Ln(t,me,Pn)}function Rn(t){return Ln(t,be,kn)}var In=Tt(G,"DataView"),Nn=Tt(G,"Promise"),Un=Tt(G,"Set"),jn=vt(In),Hn=vt(ke),Vn=vt(Nn),Gn=vt(Un),Bn=vt(Ot),Fn=$;(In&&"[object DataView]"!=Fn(new In(new ArrayBuffer(1)))||ke&&"[object Map]"!=Fn(new ke)||Nn&&"[object Promise]"!=Fn(Nn.resolve())||Un&&"[object Set]"!=Fn(new Un)||Ot&&"[object WeakMap]"!=Fn(new Ot))&&(Fn=function(t){var e=$(t),n="[object Object]"==e?t.constructor:void 0,r=n?vt(n):"";if(r)switch(r){case jn:return"[object DataView]";case Hn:return"[object Map]";case Vn:return"[object Promise]";case Gn:return"[object Set]";case Bn:return"[object WeakMap]"}return e});var zn=Fn,Wn=Object.prototype.hasOwnProperty;var Yn=G.Uint8Array;function qn(t){var e=new t.constructor(t.byteLength);return new Yn(e).set(new Yn(t)),e}var Xn=/\w*$/;var $n=B?B.prototype:void 0,Zn=$n?$n.valueOf:void 0;function Kn(t,e){var n=e?qn(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Qn(t,e,n){var r,i,o,a=t.constructor;switch(e){case"[object ArrayBuffer]":return qn(t);case"[object Boolean]":case"[object Date]":return new a(+t);case"[object DataView]":return function(t,e){var n=e?qn(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 Kn(t,n);case"[object Map]":return new a;case"[object Number]":case"[object String]":return new a(t);case"[object RegExp]":return(o=new(i=t).constructor(i.source,Xn.exec(i))).lastIndex=i.lastIndex,o;case"[object Set]":return new a;case"[object Symbol]":return r=t,Zn?Object(Zn.call(r)):{}}}function Jn(t){return"function"!=typeof t.constructor||Xt(t)?{}:Mt(We(t))}var tr=le&&le.isMap,er=tr?oe(tr):function(t){return Z(t)&&"[object Map]"==zn(t)};var nr=le&&le.isSet,rr=nr?oe(nr):function(t){return Z(t)&&"[object Set]"==zn(t)},ir={};function or(t,e,n,r,i,o){var a,s=1&e,u=2&e,l=4&e;if(n&&(a=i?n(t,r,i,o):n(t)),void 0!==a)return a;if(!rt(t))return t;var c=J(t);if(c){if(a=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&Wn.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!s)return Ct(t,a)}else{var h=zn(t),f="[object Function]"==h||"[object GeneratorFunction]"==h;if(re(t))return Sn(t,s);if("[object Object]"==h||"[object Arguments]"==h||f&&!i){if(a=u||f?{}:Jn(t),!s)return u?function(t,e){return Gt(t,kn(t),e)}(t,function(t,e){return t&&Gt(e,be(e),t)}(a,t)):function(t,e){return Gt(t,Pn(t),e)}(t,function(t,e){return t&&Gt(e,me(e),t)}(a,t))}else{if(!ir[h])return i?t:{};a=Qn(t,h,s)}}o||(o=new xn);var d=o.get(t);if(d)return d;o.set(t,a),rr(t)?t.forEach((function(r){a.add(or(r,e,n,r,t,o))})):er(t)&&t.forEach((function(r,i){a.set(i,or(r,e,n,i,t,o))}));var p=l?u?Rn:Dn:u?keysIn:me,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]),Vt(a,i,or(r,e,n,i,t,o))})),a}ir["[object Arguments]"]=ir["[object Array]"]=ir["[object ArrayBuffer]"]=ir["[object DataView]"]=ir["[object Boolean]"]=ir["[object Date]"]=ir["[object Float32Array]"]=ir["[object Float64Array]"]=ir["[object Int8Array]"]=ir["[object Int16Array]"]=ir["[object Int32Array]"]=ir["[object Map]"]=ir["[object Number]"]=ir["[object Object]"]=ir["[object RegExp]"]=ir["[object Set]"]=ir["[object String]"]=ir["[object Symbol]"]=ir["[object Uint8Array]"]=ir["[object Uint8ClampedArray]"]=ir["[object Uint16Array]"]=ir["[object Uint32Array]"]=!0,ir["[object Error]"]=ir["[object Function]"]=ir["[object WeakMap]"]=!1;function ar(t){return or(t,5)}function sr(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new De;++e<n;)this.add(t[e])}function ur(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 lr(t,e){return t.has(e)}sr.prototype.add=sr.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},sr.prototype.has=function(t){return this.__data__.has(t)};function cr(t,e,n,r,i,o){var a=1&n,s=t.length,u=e.length;if(s!=u&&!(a&&u>s))return!1;var l=o.get(t);if(l&&o.get(e))return l==e;var c=-1,h=!0,f=2&n?new sr:void 0;for(o.set(t,e),o.set(e,t);++c<s;){var d=t[c],p=e[c];if(r)var g=a?r(p,d,c,e,t,o):r(d,p,c,t,e,o);if(void 0!==g){if(g)continue;h=!1;break}if(f){if(!ur(e,(function(t,e){if(!lr(f,e)&&(d===t||i(d,t,n,r,o)))return f.push(e)}))){h=!1;break}}else if(d!==p&&!i(d,p,n,r,o)){h=!1;break}}return o.delete(t),o.delete(e),h}function hr(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function fr(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}var dr=B?B.prototype:void 0,pr=dr?dr.valueOf:void 0;var gr=Object.prototype.hasOwnProperty;var vr=Object.prototype.hasOwnProperty;function mr(t,e,n,r,i,o){var a=J(t),s=J(e),u=a?"[object Array]":zn(t),l=s?"[object Array]":zn(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&&re(t)){if(!re(e))return!1;a=!0,c=!1}if(f&&!c)return o||(o=new xn),a||he(t)?cr(t,e,n,r,i,o):function(t,e,n,r,i,o,a){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!o(new Yn(t),new Yn(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return jt(+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=hr;case"[object Set]":var u=1&r;if(s||(s=fr),t.size!=e.size&&!u)return!1;var l=a.get(t);if(l)return l==e;r|=2,a.set(t,e);var c=cr(s(t),s(e),r,i,o,a);return a.delete(t),c;case"[object Symbol]":if(pr)return pr.call(t)==pr.call(e)}return!1}(t,e,u,n,r,i,o);if(!(1&n)){var d=c&&vr.call(t,"__wrapped__"),p=h&&vr.call(e,"__wrapped__");if(d||p){var g=d?t.value():t,v=p?e.value():e;return o||(o=new xn),i(g,v,n,r,o)}}return!!f&&(o||(o=new xn),function(t,e,n,r,i,o){var a=1&n,s=Dn(t),u=s.length;if(u!=Dn(e).length&&!a)return!1;for(var l=u;l--;){var c=s[l];if(!(a?c in e:gr.call(e,c)))return!1}var h=o.get(t);if(h&&o.get(e))return h==e;var f=!0;o.set(t,e),o.set(e,t);for(var d=a;++l<u;){var p=t[c=s[l]],g=e[c];if(r)var v=a?r(g,p,c,e,t,o):r(p,g,c,t,e,o);if(!(void 0===v?p===g||i(p,g,n,r,o):v)){f=!1;break}d||(d="constructor"==c)}if(f&&!d){var m=t.constructor,y=e.constructor;m!=y&&"constructor"in t&&"constructor"in e&&!("function"==typeof m&&m instanceof m&&"function"==typeof y&&y instanceof y)&&(f=!1)}return o.delete(t),o.delete(e),f}(t,e,n,r,i,o))}function yr(t,e,n,r,i){return t===e||(null==t||null==e||!Z(t)&&!Z(e)?t!=t&&e!=e:mr(t,e,n,r,yr,i))}function _r(t){return t==t&&!rt(t)}function br(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}}function xr(t){var e=function(t){for(var e=me(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,_r(i)]}return e}(t);return 1==e.length&&e[0][2]?br(e[0][0],e[0][1]):function(n){return n===t||function(t,e,n,r){var i=n.length,o=i,a=!r;if(null==t)return!o;for(t=Object(t);i--;){var s=n[i];if(a&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++i<o;){var u=(s=n[i])[0],l=t[u],c=s[1];if(a&&s[2]){if(void 0===l&&!(u in t))return!1}else{var h=new xn;if(r)var f=r(l,c,u,t,e,h);if(!(void 0===f?yr(c,l,3,r,h):f))return!1}}return!0}(n,t,e)}}function wr(t,e){return null!=t&&e in Object(t)}function Er(t,e){return null!=t&&function(t,e,n){for(var r=-1,i=(e=He(e,t)).length,o=!1;++r<i;){var a=Ve(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&zt(i)&&Nt(a,i)&&(J(t)||Jt(t))}(t,e,wr)}function Tr(t,e){return Ee(t)&&_r(e)?br(Ve(t),e):function(n){var r=function(t,e,n){var r=null==t?void 0:Ge(t,e);return void 0===r?n:r}(n,t);return void 0===r&&r===e?Er(n,t):yr(e,r,3)}}function Or(t){return Ee(t)?(e=Ve(t),function(t){return null==t?void 0:t[e]}):function(t){return function(e){return Ge(e,t)}}(t);var e}function Sr(t){return"function"==typeof t?t:null==t?ct:"object"==typeof t?J(t)?Tr(t[0],t[1]):xr(t):Or(t)}var Mr,Ar=function(t,e,n){for(var r=-1,i=Object(t),o=n(t),a=o.length;a--;){var s=o[Mr?a:++r];if(!1===e(i[s],s,i))break}return t};var Cr=function(t,e){return function(n,r){if(null==n)return n;if(!Wt(n))return t(n,r);for(var i=n.length,o=e?i:-1,a=Object(n);(e?o--:++o<i)&&!1!==r(a[o],o,a););return n}}((function(t,e){return t&&Ar(t,e,me)})),Pr=function(){return G.Date.now()},kr=Math.max,Lr=Math.min;function Dr(t,e,n){var r,i,o,a,s,u,l=0,c=!1,h=!1,f=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function d(e){var n=r,o=i;return r=i=void 0,l=e,a=t.apply(o,n)}function p(t){return l=t,s=setTimeout(v,e),c?d(t):a}function g(t){var n=t-u;return void 0===u||n>=e||n<0||h&&t-l>=o}function v(){var t=Pr();if(g(t))return m(t);s=setTimeout(v,function(t){var n=e-(t-u);return h?Lr(n,o-(t-l)):n}(t))}function m(t){return s=void 0,f&&r?d(t):(r=i=void 0,a)}function y(){var t=Pr(),n=g(t);if(r=arguments,i=this,u=t,n){if(void 0===s)return p(u);if(h)return clearTimeout(s),s=setTimeout(v,e),d(u)}return void 0===s&&(s=setTimeout(v,e)),a}return e=lt(e)||0,rt(n)&&(c=!!n.leading,o=(h="maxWait"in n)?kr(lt(n.maxWait)||0,e):o,f="trailing"in n?!!n.trailing:f),y.cancel=function(){void 0!==s&&clearTimeout(s),l=0,r=u=i=s=void 0},y.flush=function(){return void 0===s?a:m(Pr())},y}function Rr(t,e,n){(void 0===n||jt(t[e],n))&&(void 0!==n||e in t)||Ut(t,e,n)}function Ir(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}function Nr(t,e,n,r,i,o,a){var s=Ir(t,n),u=Ir(e,n),l=a.get(u);if(l)Rr(t,n,l);else{var c,h=o?o(s,u,n+"",t,e,a):void 0,f=void 0===h;if(f){var d=J(u),p=!d&&re(u),g=!d&&!p&&he(u);h=u,d||p||g?J(s)?h=s:Z(c=s)&&Wt(c)?h=Ct(s):p?(f=!1,h=Sn(u,!0)):g?(f=!1,h=Kn(u,!0)):h=[]:function(t){if(!Z(t)||"[object Object]"!=$(t))return!1;var e=We(t);if(null===e)return!0;var n=$e.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Xe.call(n)==Ze}(u)||Jt(u)?(h=s,Jt(s)?h=function(t){return Gt(t,be(t))}(s):rt(s)&&!ht(s)||(h=Jn(u))):f=!1}f&&(a.set(u,h),i(h,u,r,o,a),a.delete(u)),Rr(t,n,h)}}function Ur(t,e,n,r,i){t!==e&&Ar(e,(function(o,a){if(i||(i=new xn),rt(o))Nr(t,e,a,n,Ur,r,i);else{var s=r?r(Ir(t,a),o,a+"",t,e,i):void 0;void 0===s&&(s=o),Rr(t,a,s)}}),be)}function jr(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 Hr(t,e){var n=-1,r=Wt(t)?Array(t.length):[];return Cr(t,(function(t,i,o){r[++n]=e(t,i,o)})),r}function Vr(t,e){return function t(e,n,r,i,o){var a=-1,s=e.length;for(r||(r=ze),o||(o=[]);++a<s;){var u=e[a];n>0&&r(u)?n>1?t(u,n-1,r,i,o):Be(o,u):i||(o[o.length]=u)}return o}(function(t,e){return(J(t)?Q:Hr)(t,Sr(e))}(t,e),1/0)}function Gr(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}function Br(t,e){return yr(t,e)}var Fr,zr,Wr=(Fr=function(t,e,n){return t+(n?"-":"")+e.toLowerCase()},function(t){return function(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}(yn(function(t){return(t=je(t))&&t.replace(Qe,Ke).replace(Je,"")}(t).replace(_n,"")),Fr,"")}),Yr=(zr=function(t,e,n){Ur(t,e,n)},Ft((function(t,e){var n=-1,r=e.length,i=r>1?e[r-1]:void 0,o=r>2?e[2]:void 0;for(i=zr.length>3&&"function"==typeof i?(r--,i):void 0,o&&Yt(e[0],e[1],o)&&(i=r<3?void 0:i,r=1),t=Object(t);++n<r;){var a=e[n];a&&zr(t,a,n,i)}return t})));function qr(t,e){var n;return Cr(t,(function(t,r,i){return!(n=e(t,r,i))})),!!n}function Xr(t,e,n){var r=J(t)?ur:qr;return n&&Yt(t,e,n)&&(e=void 0),r(t,Sr(e))}var $r,Zr=Un&&1/fr(new Un([,-0]))[1]==1/0?function(t){return new Un(t)}:function(){};function Kr(t){return t&&t.length?function(t,e,n){var r=-1,i=Rt,o=t.length,a=!0,s=[],u=s;if(n)a=!1,i=jr;else if(o>=200){var l=e?null:Zr(t);if(l)return fr(l);a=!1,i=lr,u=new sr}else u=e?[]:s;t:for(;++r<o;){var c=t[r],h=e?e(c):c;if(c=n||0!==c?c:0,a&&h==h){for(var f=u.length;f--;)if(u[f]===h)continue t;e&&u.push(h),s.push(c)}else i(u,h,n)||(u!==s&&u.push(h),s.push(c))}return s}(t):[]}function Qr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Jr(t,e){return t(e={exports:{}},e.exports),e.exports}!function(t){t.debounce=Dr,t.clone=ar,t.merge=Yr,t.removeArrayDuplicates=Kr,t.clamp=bn,t.isEqual=Br,t.flatMapDeep=Vr,t.kebabCase=Wr,t.fromPairs=Gr,t.some=Xr,t.mergeDefaultChartOptions=function(e,n){e=t.clone(e);var r=Object.keys(n.axes||{});for(var i in 0===r.length&&delete e.axes,e.axes)if(r.includes(i)){var o=n.axes[i];(o.primary||o.secondary)&&console.warn("`primary` & `secondary` are no longer needed for axis configurations. Read more here https://carbon-design-system.github.io/carbon-charts/?path=/story/tutorials--tabular-data-format");var a=o.mapsTo;if(null==a){var s=o.scaleType;null==s?o.mapsTo="value":s===E.TIME?o.mapsTo="date":s===E.LABELS&&(o.mapsTo="key")}}else delete e.axes[i];return t.merge(e,n)},t.getDimensions=function(t){return{width:parseFloat(t.style.width.replace("px","")||t.offsetWidth),height:parseFloat(t.style.height.replace("px","")||t.offsetHeight)}},t.getTranslationValues=function(t){if(t){var e=t.getAttribute("transform").match(/translate\([0-9]+\.?[0-9]*,[0-9]+\.?[0-9]*\)/);if(!e)return null;if(e[0]){var n=e[0].replace(/translate\(/,"").replace(/\)/,"").split(",");return{tx:n[0],ty:n[1]}}return null}},t.getTranformOffsets=function(t){var e=/\(([^)]+)\)/.exec(t)[1].split(",");return{x:parseFloat(e[0]),y:parseFloat(e[1])}},t.formatWidthHeightValues=function(t){var e=t.toString();return e.match(/[a-z]/i)?e:e+"px"},t.capitalizeFirstLetter=function(t){return t[0].toUpperCase()+t.slice(1)},t.convertValueToPercentage=function(t,e){var n=t/e.reduce((function(t,e){return t+e.value}),0)*100;return n%1!=0?parseFloat(n.toFixed(1)):n},t.truncateLabel=function(t,e,n){return n>t.length?t:e===x.MID_LINE?t.substr(0,n/2)+"..."+t.substr(-n/2):e===x.FRONT_LINE?"..."+t.substr(-n):e===x.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,o=e;i<o.length;i++){var a=o[i];if(null===r[a]||void 0===r[a])return null;r=r[a]}return r}return null},t.flipSVGCoordinatesBasedOnOrientation=function(t,e){return e===w.HORIZONTAL?{y0:t.x0,y1:t.x1,x0:t.y0,x1:t.y1}:t},t.generateSVGPathString=function(e,n){var r=t.flipSVGCoordinatesBasedOnOrientation(e,n),i=r.x0,o=r.x1,a=r.y0,s=r.y1;return"M"+i+","+a+"L"+i+","+s+"L"+o+","+s+"L"+o+","+a+"L"+i+","+a},t.flipDomainAndRangeBasedOnOrientation=function(t,e,n){return n===w.VERTICAL?[t,e]:[e,t]},t.compareNumeric=function(t,e){return Number(t)===Number(e)}}($r||($r={}));var ti=Jr((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}));Qr(ti);var ei=Jr((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}));Qr(ei);var ni=Jr((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,r=(n=ei)&&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}));Qr(ni);var ri=Jr((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}));Qr(ri);var ii=Jr((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e,n){var r,i=n||{};if("formatting"===(i.context?String(i.context):"standalone")&&t.formattingValues){var o=t.defaultFormattingWidth||t.defaultWidth,a=i.width?String(i.width):o;r=t.formattingValues[a]||t.formattingValues[o]}else{var s=t.defaultWidth,u=i.width?String(i.width):t.defaultWidth;r=t.values[u]||t.values[s]}return r[t.argumentCallback?t.argumentCallback(e):e]}},t.exports=e.default}));Qr(ii);var oi=Jr((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,r=(n=ii)&&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}));Qr(oi);var ai=Jr((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e,n){var r=String(e),i=n||{},o=r.match(t.matchPattern);if(!o)return null;var a=o[0],s=r.match(t.parsePattern);if(!s)return null;var u=t.valueCallback?t.valueCallback(s[0]):s[0];return{value:u=i.valueCallback?i.valueCallback(u):u,rest:r.slice(a.length)}}},t.exports=e.default}));Qr(ai);var si=Jr((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e,n){var r=String(e),i=n||{},o=i.width,a=o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth],s=r.match(a);if(!s)return null;var u,l=s[0],c=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth];return u="[object Array]"===Object.prototype.toString.call(c)?function(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return n}(c,(function(t){return t.test(r)})):function(t,e){for(var n in t)if(t.hasOwnProperty(n)&&e(t[n]))return n}(c,(function(t){return t.test(r)})),u=t.valueCallback?t.valueCallback(u):u,{value:u=i.valueCallback?i.valueCallback(u):u,rest:r.slice(l.length)}}},t.exports=e.default}));Qr(si);var ui=Jr((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i(ai),r=i(si);function i(t){return t&&t.__esModule?t:{default:t}}var o={ordinalNumber:(0,n.default)({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}}),era:(0,r.default)({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:(0,r.default)({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:(0,r.default)({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:(0,r.default)({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:(0,r.default)({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};e.default=o,t.exports=e.default}));Qr(ui);var li=Qr(Jr((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=s(ti),r=s(ni),i=s(ri),o=s(oi),a=s(ui);function s(t){return t&&t.__esModule?t:{default:t}}var u={code:"en-US",formatDistance:n.default,formatLong:r.default,formatRelative:i.default,localize:o.default,match:a.default,options:{weekStartsOn:0,firstWeekContainsDate:1}};e.default=u,t.exports=e.default}))),ci={type:x.END_LINE,threshold:16,numCharacter:14},hi={position:S.BOTTOM,clickable:!0,enabled:!0,items:{status:{ACTIVE:1,DISABLED:0},horizontalSpace:12,verticalSpace:24,textYOffset:8},checkbox:{radius:6.5,spaceAfter:4},truncation:ci},fi={x:{numberOfTicks:5},y:{numberOfTicks:5}},di={datapoint:{horizontalOffset:10,enabled:!0},title:{verticalOffset:.75,width:.4}},pi=$r.merge({},di,{gridline:{enabled:!0,threshold:.02}}),gi=$r.merge({},pi,{datapoint:{verticalOffset:4},gridline:{enabled:!1}}),vi={top:{includeZero:!0,truncation:ci},bottom:{includeZero:!0,truncation:ci},left:{includeZero:!0,truncation:ci},right:{includeZero:!0,truncation:ci}},mi={addSpaceOnEdges:1,showDayName:!1,localeObject:li,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"}}},yi={width:null,height:null,resizable:!0,tooltip:di,legend:hi,style:{prefix:"cc"},data:{groupMapsTo:"group",loading:!1},color:{scale:null}},_i=$r.merge({},yi,{axes:vi,timeScale:mi,grid:fi,tooltip:pi}),bi=$r.merge({},_i,{bars:{maxWidth:16},timeScale:$r.merge(mi,{addSpaceOnEdges:1}),tooltip:gi}),xi=$r.merge({},bi,{}),wi=$r.merge({},bi,{}),Ei=$r.merge({},bi,{bars:$r.merge({},bi.bars,{dividerSize:1.5})}),Ti=$r.merge({},_i,{points:{radius:3,filled:!1}}),Oi=$r.merge({},Ti,{timeScale:$r.merge(mi,{addSpaceOnEdges:0})}),Si=Oi,Mi=$r.merge({},_i,{points:{radius:4,fillOpacity:.3,filled:!0}}),Ai=$r.merge({},_i,{bubble:{radiusMapsTo:"radius",radiusRange:function(t,e){var n=Math.min(t.width,t.height);return[3*n/400,25*n/400]},fillOpacity:.2}}),Ci=$r.merge({},yi,{pie:{radiusOffset:-15,innerRadius:2,padAngle:.007,hoverArc:{outerRadiusOffset:3},xOffset:30,yOffset:20,yOffsetCallout:10,callout:{minSliceDegree:5,offsetX:15,offsetY:12,horizontalLineLength:8,textMargin:2},labels:{formatter:null}}}),Pi=$r.merge({},yi,{legend:{enabled:!1},gauge:{type:R.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()}}}),ki={chart:yi,axisChart:_i,simpleBarChart:xi,groupedBarChart:wi,stackedBarChart:Ei,bubbleChart:Ai,lineChart:Ti,areaChart:Oi,stackedAreaChart:Si,scatterChart:Mi,pieChart:Ci,donutChart:$r.merge({},Ci,{donut:{center:{numberFontSize:function(t){return Math.min(t/100*24,24)+"px"},titleFontSize:function(t){return Math.min(t/100*15,15)+"px"},titleYPosition:function(t){return Math.min(t/80*20,20)},numberFormatter:function(t){return Math.floor(t).toLocaleString()}}}}),radarChart:$r.merge({},yi,{radar:{axes:{angle:"key",value:"value"},opacity:{unselected:.1,selected:.3},xLabelPadding:10,yLabelPadding:8,yTicksNumber:4,minRange:10,xAxisRectHeight:50,dotsRadius:5},tooltip:{gridline:{enabled:!0},valueFormatter:function(t){return null!=t?t:"N/A"}}}),gaugeChart:Pi},Li={opacity:{unselected:.3,selected:1}},Di={opacity:{unselected:0,selected:.4}},Ri={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}},Ii={ticks:{number:7,rotateIfSmallerThan:30},paddingRatio:.1},Ni={default:{size:24}},Ui=Object.freeze({__proto__:null,legend:hi,grid:fi,baseTooltip:di,axisChartTooltip:pi,barChartTooltip:gi,timeScale:mi,options:ki,lines:Li,area:Di,areas:{opacity:{unselected:.3,selected:1}},transitions:Ri,axis:Ii,spacers:Ni,tickSpaceRatioVertical:2.5,tickSpaceRatioHorizontal:3.5}),ji={10:"#fff0f1",20:"#fcd0d3",30:"#ffa4a9",40:"#ff767c",50:"#fb4b53",60:"#da1e28",70:"#a51920",80:"#750e13",90:"#570408",100:"#2c080a"},Hi={10:"#fff0f6",20:"#ffcfe1",30:"#ffa0c2",40:"#fa75a6",50:"#ee538b",60:"#d12765",70:"#a11950",80:"#760a3a",90:"#57002b",100:"#2a0a16"},Vi={10:"#f7f1ff",20:"#e6d6ff",30:"#d0b0ff",40:"#bb8eff",50:"#a66efa",60:"#8a3ffc",70:"#6e32c9",80:"#4f2196",90:"#38146b",100:"#1e1033"},Gi={10:"#edf4ff",20:"#c9deff",30:"#97c1ff",40:"#6ea6ff",50:"#408bfc",60:"#0062ff",70:"#054ada",80:"#0530ad",90:"#061f80",100:"#051243"},Bi={10:"#e3f6ff",20:"#b3e6ff",30:"#6ccaff",40:"#30b0ff",50:"#1191e6",60:"#0072c3",70:"#0058a1",80:"#003d73",90:"#002b50",100:"#07192b"},Fi={10:"#dbfbfb",20:"#92eeee",30:"#20d5d2",40:"#00bab6",50:"#009c98",60:"#007d79",70:"#006161",80:"#004548",90:"#003137",100:"#081a1c"},zi={10:"#dafbe4",20:"#9deeb2",30:"#56d679",40:"#3dbb61",50:"#24a148",60:"#198038",70:"#10642a",80:"#054719",90:"#01330f",100:"#081b09"},Wi=function(t,e){return t[e]},Yi=function(t){return Wi(Gi,t)},qi=function(t){return Wi(Bi,t)},Xi=function(t){return Wi(zi,t)},$i=function(t){return Wi(Hi,t)},Zi=function(t){return Wi(Vi,t)},Ki=function(t){return Wi(ji,t)},Qi=function(t){return Wi(Fi,t)},Ji=[Zi(70),qi(50),Qi(70),$i(70),Ki(50),Ki(90),Xi(60),Yi(80),$i(50),"#b28600",Qi(50),qi(90),"#8a3800",Zi(50)],to=[Zi(60),qi(40),Qi(60),$i(40),Ki(50),Ki(10),Xi(30),Yi(50),$i(60),"#d2a106",Qi(40),qi(20),"#ba4e00",Zi(30)],eo=Ji,no=to,ro=to,io=Ji,oo=Object.freeze({__proto__:null,WHITE:Ji,DARK:to,G10:eo,G90:no,G100:ro,DEFAULT:io});function ao(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function so(t){var e;return 1===t.length&&(e=t,t=function(t,n){return ao(e(t),n)}),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var o=r+i>>>1;t(e[o],n)<0?r=o+1:i=o}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var o=r+i>>>1;t(e[o],n)>0?i=o:r=o+1}return r}}}var uo=so(ao).right;function lo(t,e){var n,r,i,o=t.length,a=-1;if(null==e){for(;++a<o;)if(null!=(n=t[a])&&n>=n)for(r=i=n;++a<o;)null!=(n=t[a])&&(r>n&&(r=n),i<n&&(i=n))}else for(;++a<o;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=i=n;++a<o;)null!=(n=e(t[a],a,t))&&(r>n&&(r=n),i<n&&(i=n));return[r,i]}function co(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),o=new Array(i);++r<i;)o[r]=t+r*n;return o}var ho=Math.sqrt(50),fo=Math.sqrt(10),po=Math.sqrt(2);function go(t,e,n){var r,i,o,a,s=-1;if(n=+n,(t=+t)===(e=+e)&&n>0)return[t];if((r=e<t)&&(i=t,t=e,e=i),0===(a=vo(t,e,n))||!isFinite(a))return[];if(a>0)for(t=Math.ceil(t/a),e=Math.floor(e/a),o=new Array(i=Math.ceil(e-t+1));++s<i;)o[s]=(t+s)*a;else for(t=Math.floor(t*a),e=Math.ceil(e*a),o=new Array(i=Math.ceil(t-e+1));++s<i;)o[s]=(t-s)/a;return r&&o.reverse(),o}function vo(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=ho?10:o>=fo?5:o>=po?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=ho?10:o>=fo?5:o>=po?2:1)}function mo(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=ho?i*=10:o>=fo?i*=5:o>=po&&(i*=2),e<t?-i:i}function yo(t,e){var n,r,i=t.length,o=-1;if(null==e){for(;++o<i;)if(null!=(n=t[o])&&n>=n)for(r=n;++o<i;)null!=(n=t[o])&&n>r&&(r=n)}else for(;++o<i;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=n;++o<i;)null!=(n=e(t[o],o,t))&&n>r&&(r=n);return r}function _o(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function bo(){}function xo(t,e){var n=new bo;if(t instanceof bo)t.each((function(t,e){n.set(e,t)}));else if(Array.isArray(t)){var r,i=-1,o=t.length;if(null==e)for(;++i<o;)n.set(i,t[i]);else for(;++i<o;)n.set(e(r=t[i],i,t),r)}else if(t)for(var a in t)n.set(a,t[a]);return n}function wo(){}bo.prototype=xo.prototype={constructor:bo,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 Eo=xo.prototype;wo.prototype=function(t,e){var n=new wo;if(t instanceof wo)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:wo,has:Eo.has,add:function(t){return this["$"+(t+="")]=t,this},remove:Eo.remove,clear:Eo.clear,values:Eo.keys,size:Eo.size,empty:Eo.empty,each:Eo.each};var To=Array.prototype,Oo=To.map,So=To.slice,Mo={name:"implicit"};function Ao(){var t=xo(),e=[],n=[],r=Mo;function i(i){var o=i+"",a=t.get(o);if(!a){if(r!==Mo)return r;t.set(o,a=e.push(i))}return n[(a-1)%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=xo();for(var r,o,a=-1,s=n.length;++a<s;)t.has(o=(r=n[a])+"")||t.set(o,e.push(r));return i},i.range=function(t){return arguments.length?(n=So.call(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return Ao(e,n).unknown(r)},_o.apply(i,arguments),i}function Co(){var t,e,n=Ao().unknown(void 0),r=n.domain,i=n.range,o=[0,1],a=!1,s=0,u=0,l=.5;function c(){var n=r().length,c=o[1]<o[0],h=o[c-0],f=o[1-c];t=(f-h)/Math.max(1,n-s+2*u),a&&(t=Math.floor(t)),h+=(f-h-t*(n-s))*l,e=t*(1-s),a&&(h=Math.round(h),e=Math.round(e));var d=co(n).map((function(e){return h+t*e}));return i(c?d.reverse():d)}return delete n.unknown,n.domain=function(t){return arguments.length?(r(t),c()):r()},n.range=function(t){return arguments.length?(o=[+t[0],+t[1]],c()):o.slice()},n.rangeRound=function(t){return o=[+t[0],+t[1]],a=!0,c()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(a=!!t,c()):a},n.padding=function(t){return arguments.length?(s=Math.min(1,u=+t),c()):s},n.paddingInner=function(t){return arguments.length?(s=Math.min(1,t),c()):s},n.paddingOuter=function(t){return arguments.length?(u=+t,c()):u},n.align=function(t){return arguments.length?(l=Math.max(0,Math.min(1,t)),c()):l},n.copy=function(){return Co(r(),o).round(a).paddingInner(s).paddingOuter(u).align(l)},_o.apply(c(),arguments)}function Po(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function ko(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Lo(){}var Do="\\s*([+-]?\\d+)\\s*",Ro="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Io="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",No=/^#([0-9a-f]{3,8})$/,Uo=new RegExp("^rgb\\("+[Do,Do,Do]+"\\)$"),jo=new RegExp("^rgb\\("+[Io,Io,Io]+"\\)$"),Ho=new RegExp("^rgba\\("+[Do,Do,Do,Ro]+"\\)$"),Vo=new RegExp("^rgba\\("+[Io,Io,Io,Ro]+"\\)$"),Go=new RegExp("^hsl\\("+[Ro,Io,Io]+"\\)$"),Bo=new RegExp("^hsla\\("+[Ro,Io,Io,Ro]+"\\)$"),Fo={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 zo(){return this.rgb().formatHex()}function Wo(){return this.rgb().formatRgb()}function Yo(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=No.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?qo(e):3===n?new Ko(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?new Ko(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?new Ko(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Uo.exec(t))?new Ko(e[1],e[2],e[3],1):(e=jo.exec(t))?new Ko(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Ho.exec(t))?Xo(e[1],e[2],e[3],e[4]):(e=Vo.exec(t))?Xo(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Go.exec(t))?ea(e[1],e[2]/100,e[3]/100,1):(e=Bo.exec(t))?ea(e[1],e[2]/100,e[3]/100,e[4]):Fo.hasOwnProperty(t)?qo(Fo[t]):"transparent"===t?new Ko(NaN,NaN,NaN,0):null}function qo(t){return new Ko(t>>16&255,t>>8&255,255&t,1)}function Xo(t,e,n,r){return r<=0&&(t=e=n=NaN),new Ko(t,e,n,r)}function $o(t){return t instanceof Lo||(t=Yo(t)),t?new Ko((t=t.rgb()).r,t.g,t.b,t.opacity):new Ko}function Zo(t,e,n,r){return 1===arguments.length?$o(t):new Ko(t,e,n,null==r?1:r)}function Ko(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Qo(){return"#"+ta(this.r)+ta(this.g)+ta(this.b)}function Jo(){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 ta(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function ea(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new ra(t,e,n,r)}function na(t){if(t instanceof ra)return new ra(t.h,t.s,t.l,t.opacity);if(t instanceof Lo||(t=Yo(t)),!t)return new ra;if(t instanceof ra)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(a=e===o?(n-r)/s+6*(n<r):n===o?(r-e)/s+2:(e-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new ra(a,s,u,t.opacity)}function ra(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function ia(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 oa(t){return function(){return t}}function aa(t){return 1==(t=+t)?sa: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):oa(isNaN(e)?n:e)}}function sa(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):oa(isNaN(t)?e:t)}Po(Lo,Yo,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:zo,formatHex:zo,formatHsl:function(){return na(this).formatHsl()},formatRgb:Wo,toString:Wo}),Po(Ko,Zo,ko(Lo,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Ko(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Ko(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Qo,formatHex:Qo,formatRgb:Jo,toString:Jo})),Po(ra,(function(t,e,n,r){return 1===arguments.length?na(t):new ra(t,e,n,null==r?1:r)}),ko(Lo,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new ra(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new ra(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Ko(ia(t>=240?t-240:t+120,i,r),ia(t,i,r),ia(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 ua=function t(e){var n=aa(e);function r(t,e){var r=n((t=Zo(t)).r,(e=Zo(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=sa(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=o(e),t.opacity=a(e),t+""}}return r.gamma=t,r}(1);function la(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(o){for(n=0;n<r;++n)i[n]=t[n]*(1-o)+e[n]*o;return i}}function ca(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=ma(t[n],e[n]);for(;n<r;++n)a[n]=e[n];return function(t){for(n=0;n<i;++n)a[n]=o[n](t);return a}}function ha(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function fa(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function da(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]=ma(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}var pa=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ga=new RegExp(pa.source,"g");function va(t,e){var n,r,i,o=pa.lastIndex=ga.lastIndex=0,a=-1,s=[],u=[];for(t+="",e+="";(n=pa.exec(t))&&(r=ga.exec(e));)(i=r.index)>o&&(i=e.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,u.push({i:a,x:fa(n,r)})),o=ga.lastIndex;return o<e.length&&(i=e.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?u[0]?function(t){return function(e){return t(e)+""}}(u[0].x):function(t){return function(){return t}}(e):(e=u.length,function(t){for(var n,r=0;r<e;++r)s[(n=u[r]).i]=n.x(t);return s.join("")})}function ma(t,e){var n,r=typeof e;return null==e||"boolean"===r?oa(e):("number"===r?fa:"string"===r?(n=Yo(e))?(e=n,ua):va:e instanceof Yo?ua:e instanceof Date?ha:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(e)?la:Array.isArray(e)?ca:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?da:fa)(t,e)}function ya(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var _a,ba,xa,wa,Ea=180/Math.PI,Ta={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Oa(t,e,n,r,i,o){var a,s,u;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,u/=s),t*r<e*n&&(t=-t,e=-e,u=-u,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*Ea,skewX:Math.atan(u)*Ea,scaleX:a,scaleY:s}}function Sa(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(o,a){var s=[],u=[];return o=t(o),a=t(a),function(t,r,i,o,a,s){if(t!==i||r!==o){var u=a.push("translate(",null,e,null,n);s.push({i:u-4,x:fa(t,i)},{i:u-2,x:fa(r,o)})}else(i||o)&&a.push("translate("+i+e+o+n)}(o.translateX,o.translateY,a.translateX,a.translateY,s,u),function(t,e,n,o){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:fa(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(o.rotate,a.rotate,s,u),function(t,e,n,o){t!==e?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:fa(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(o.skewX,a.skewX,s,u),function(t,e,n,r,o,a){if(t!==n||e!==r){var s=o.push(i(o)+"scale(",null,",",null,")");a.push({i:s-4,x:fa(t,n)},{i:s-2,x:fa(e,r)})}else 1===n&&1===r||o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,s,u),o=a=null,function(t){for(var e,n=-1,r=u.length;++n<r;)s[(e=u[n]).i]=e.x(t);return s.join("")}}}var Ma=Sa((function(t){return"none"===t?Ta:(_a||(_a=document.createElement("DIV"),ba=document.documentElement,xa=document.defaultView),_a.style.transform=t,t=xa.getComputedStyle(ba.appendChild(_a),null).getPropertyValue("transform"),ba.removeChild(_a),Oa(+(t=t.slice(7,-1).split(","))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),Aa=Sa((function(t){return null==t?Ta:(wa||(wa=document.createElementNS("http://www.w3.org/2000/svg","g")),wa.setAttribute("transform",t),(t=wa.transform.baseVal.consolidate())?Oa((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Ta)}),", ",")",")");function Ca(t){return+t}var Pa=[0,1];function ka(t){return t}function La(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:function(t){return function(){return t}}(isNaN(e)?NaN:.5)}function Da(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 Ra(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=La(i,r),o=n(a,o)):(r=La(r,i),o=n(o,a)),function(t){return o(r(t))}}function Ia(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<r;)i[a]=La(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(e){var n=uo(t,e,1,r)-1;return o[n](i[n](e))}}function Na(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Ua(){var t,e,n,r,i,o,a=Pa,s=Pa,u=ma,l=ka;function c(){return r=Math.min(a.length,s.length)>2?Ia:Ra,i=o=null,h}function h(e){return isNaN(e=+e)?n:(i||(i=r(a.map(t),s,u)))(t(l(e)))}return h.invert=function(n){return l(e((o||(o=r(s,a.map(t),fa)))(n)))},h.domain=function(t){return arguments.length?(a=Oo.call(t,Ca),l===ka||(l=Da(a)),c()):a.slice()},h.range=function(t){return arguments.length?(s=So.call(t),c()):s.slice()},h.rangeRound=function(t){return s=So.call(t),u=ya,c()},h.clamp=function(t){return arguments.length?(l=t?Da(a):ka,h):l!==ka},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 ja(t,e){return Ua()(t,e)}function Ha(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 Va(t){return(t=Ha(Math.abs(t)))?t[1]:NaN}var Ga,Ba=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Fa(t){if(!(e=Ba.exec(t)))throw new Error("invalid format: "+t);var e;return new za({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 za(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 Wa(t,e){var n=Ha(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")}Fa.prototype=za.prototype,za.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 Ya={"%":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 Wa(100*t,e)},r:Wa,s:function(t,e){var n=Ha(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(Ga=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Ha(t,Math.max(0,e+o-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function qa(t){return t}var Xa,$a,Za,Ka=Array.prototype.map,Qa=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Ja(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?qa:(e=Ka.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,o=[],a=0,s=e[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),o.push(t.substring(i-=s,i+s)),!((u+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",a=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?qa:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(Ka.call(t.numerals,String)),u=void 0===t.percent?"%":t.percent+"",l=void 0===t.minus?"-":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=Fa(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"):Ya[y]||(void 0===v&&(v=12),m=!0,y="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var _="$"===f?i:"#"===f&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",b="$"===f?o:/[%p]/.test(y)?u:"",x=Ya[y],w=/[defgprs%]/.test(y);function E(t){var i,o,u,f=_,E=b;if("c"===y)E=x(t)+E,t="";else{var T=(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)),T&&0==+t&&(T=!1),f=(T?"("===h?h:l:"-"===h||"("===h?"":h)+f,E=("s"===y?Qa[8+Ga/3]:"")+E+(T&&"("===h?")":""),w)for(i=-1,o=t.length;++i<o;)if(48>(u=t.charCodeAt(i))||u>57){E=(46===u?a+t.slice(i+1):t.slice(i))+E,t=t.slice(0,i);break}}g&&!d&&(t=r(t,1/0));var O=f.length+t.length+E.length,S=O<p?new Array(p-O+1).join(e):"";switch(g&&d&&(t=r(S+t,S.length?p-E.length:1/0),S=""),n){case"<":t=f+t+E+S;break;case"=":t=f+S+t+E;break;case"^":t=S.slice(0,O=S.length>>1)+f+t+E+S.slice(O);break;default:t=S+f+t+E}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)),E.toString=function(){return t+""},E}return{format:h,formatPrefix:function(t,e){var n=h(((t=Fa(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Va(e)/3))),i=Math.pow(10,-r),o=Qa[8+r/3];return function(t){return n(i*t)+o}}}}function ts(t,e,n,r){var i,o=mo(t,e,n);switch((r=Fa(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Va(e)/3)))-Va(Math.abs(t)))}(o,a))||(r.precision=i),Za(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Va(e)-Va(t))+1}(o,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(t){return Math.max(0,-Va(Math.abs(t)))}(o))||(r.precision=i-2*("%"===r.type))}return $a(r)}function es(t){var e=t.domain;return t.ticks=function(t){var n=e();return go(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return ts(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i=e(),o=0,a=i.length-1,s=i[o],u=i[a];return u<s&&(r=s,s=u,u=r,r=o,o=a,a=r),(r=vo(s,u,n))>0?r=vo(s=Math.floor(s/r)*r,u=Math.ceil(u/r)*r,n):r<0&&(r=vo(s=Math.ceil(s*r)/r,u=Math.floor(u*r)/r,n)),r>0?(i[o]=Math.floor(s/r)*r,i[a]=Math.ceil(u/r)*r,e(i)):r<0&&(i[o]=Math.ceil(s*r)/r,i[a]=Math.floor(u*r)/r,e(i)),t},t}function ns(){var t=ja(ka,ka);return t.copy=function(){return Na(t,ns())},_o.apply(t,arguments),es(t)}function rs(t,e){var n,r=0,i=(t=t.slice()).length-1,o=t[r],a=t[i];return a<o&&(n=r,r=i,i=n,n=o,o=a,a=n),t[r]=e.floor(o),t[i]=e.ceil(a),t}function is(t){return Math.log(t)}function os(t){return Math.exp(t)}function as(t){return-Math.log(-t)}function ss(t){return-Math.exp(-t)}function us(t){return isFinite(t)?+("1e"+t):t<0?0:t}function ls(t){return function(e){return-t(-e)}}function cs(t){var e,n,r=t(is,os),i=r.domain,o=10;function a(){return e=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),function(e){return Math.log(e)/t})}(o),n=function(t){return 10===t?us:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}(o),i()[0]<0?(e=ls(e),n=ls(n),t(as,ss)):t(is,os),r}return r.base=function(t){return arguments.length?(o=+t,a()):o},r.domain=function(t){return arguments.length?(i(t),a()):i()},r.ticks=function(t){var r,a=i(),s=a[0],u=a[a.length-1];(r=u<s)&&(f=s,s=u,u=f);var l,c,h,f=e(s),d=e(u),p=null==t?10:+t,g=[];if(!(o%1)&&d-f<p){if(f=Math.round(f)-1,d=Math.round(d)+1,s>0){for(;f<d;++f)for(c=1,l=n(f);c<o;++c)if(!((h=l*c)<s)){if(h>u)break;g.push(h)}}else for(;f<d;++f)for(c=o-1,l=n(f);c>=1;--c)if(!((h=l*c)<s)){if(h>u)break;g.push(h)}}else g=go(f,d,Math.min(d-f,p)).map(n);return r?g.reverse():g},r.tickFormat=function(t,i){if(null==i&&(i=10===o?".0e":","),"function"!=typeof i&&(i=$a(i)),t===1/0)return i;null==t&&(t=10);var a=Math.max(1,o*t/r.ticks().length);return function(t){var r=t/n(Math.round(e(t)));return r*o<o-.5&&(r*=o),r<=a?i(t):""}},r.nice=function(){return i(rs(i(),{floor:function(t){return n(Math.floor(e(t)))},ceil:function(t){return n(Math.ceil(e(t)))}}))},r}Xa=Ja({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),$a=Xa.format,Za=Xa.formatPrefix;var hs=new Date,fs=new Date;function ds(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=function(e){return t(e=new Date(+e)),e},i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e<n-t?e:n},i.offset=function(t,n){return e(t=new Date(+t),null==n?1:Math.floor(n)),t},i.range=function(n,r,o){var a,s=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return s;do{s.push(a=new Date(+n)),e(n,o),t(n)}while(a<n&&n<r);return s},i.filter=function(n){return ds((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 hs.setTime(+e),fs.setTime(+r),t(hs),t(fs),Math.floor(n(hs,fs))},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 ps=ds((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));ps.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?ds((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):ps:null};var gs=ds((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()})),vs=ds((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()})),ms=ds((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()})),ys=ds((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 _s(t){return ds((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 bs=_s(0),xs=_s(1),ws=(_s(2),_s(3),_s(4)),Es=(_s(5),_s(6),ds((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()}))),Ts=ds((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()}));Ts.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ds((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 Os=ds((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/864e5}),(function(t){return t.getUTCDate()-1}));function Ss(t){return ds((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 Ms=Ss(0),As=Ss(1),Cs=(Ss(2),Ss(3),Ss(4)),Ps=(Ss(5),Ss(6),ds((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 ks(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 Ls(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 Ds(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}Ps.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ds((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 Rs,Is,Ns={"-":"",_:" ",0:"0"},Us=/^\s*\d+/,js=/^%/,Hs=/[\\^$*+?|[\]().{}]/g;function Vs(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(e)+i:i)}function Gs(t){return t.replace(Hs,"\\$&")}function Bs(t){return new RegExp("^(?:"+t.map(Gs).join("|")+")","i")}function Fs(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function zs(t,e,n){var r=Us.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Ws(t,e,n){var r=Us.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Ys(t,e,n){var r=Us.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function qs(t,e,n){var r=Us.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Xs(t,e,n){var r=Us.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function $s(t,e,n){var r=Us.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Zs(t,e,n){var r=Us.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Ks(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Qs(t,e,n){var r=Us.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function Js(t,e,n){var r=Us.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function tu(t,e,n){var r=Us.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function eu(t,e,n){var r=Us.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function nu(t,e,n){var r=Us.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function ru(t,e,n){var r=Us.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function iu(t,e,n){var r=Us.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function ou(t,e,n){var r=Us.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function au(t,e,n){var r=Us.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function su(t,e,n){var r=js.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function uu(t,e,n){var r=Us.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function lu(t,e,n){var r=Us.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function cu(t,e){return Vs(t.getDate(),e,2)}function hu(t,e){return Vs(t.getHours(),e,2)}function fu(t,e){return Vs(t.getHours()%12||12,e,2)}function du(t,e){return Vs(1+ys.count(Ts(t),t),e,3)}function pu(t,e){return Vs(t.getMilliseconds(),e,3)}function gu(t,e){return pu(t,e)+"000"}function vu(t,e){return Vs(t.getMonth()+1,e,2)}function mu(t,e){return Vs(t.getMinutes(),e,2)}function yu(t,e){return Vs(t.getSeconds(),e,2)}function _u(t){var e=t.getDay();return 0===e?7:e}function bu(t,e){return Vs(bs.count(Ts(t)-1,t),e,2)}function xu(t,e){var n=t.getDay();return t=n>=4||0===n?ws(t):ws.ceil(t),Vs(ws.count(Ts(t),t)+(4===Ts(t).getDay()),e,2)}function wu(t){return t.getDay()}function Eu(t,e){return Vs(xs.count(Ts(t)-1,t),e,2)}function Tu(t,e){return Vs(t.getFullYear()%100,e,2)}function Ou(t,e){return Vs(t.getFullYear()%1e4,e,4)}function Su(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Vs(e/60|0,"0",2)+Vs(e%60,"0",2)}function Mu(t,e){return Vs(t.getUTCDate(),e,2)}function Au(t,e){return Vs(t.getUTCHours(),e,2)}function Cu(t,e){return Vs(t.getUTCHours()%12||12,e,2)}function Pu(t,e){return Vs(1+Os.count(Ps(t),t),e,3)}function ku(t,e){return Vs(t.getUTCMilliseconds(),e,3)}function Lu(t,e){return ku(t,e)+"000"}function Du(t,e){return Vs(t.getUTCMonth()+1,e,2)}function Ru(t,e){return Vs(t.getUTCMinutes(),e,2)}function Iu(t,e){return Vs(t.getUTCSeconds(),e,2)}function Nu(t){var e=t.getUTCDay();return 0===e?7:e}function Uu(t,e){return Vs(Ms.count(Ps(t)-1,t),e,2)}function ju(t,e){var n=t.getUTCDay();return t=n>=4||0===n?Cs(t):Cs.ceil(t),Vs(Cs.count(Ps(t),t)+(4===Ps(t).getUTCDay()),e,2)}function Hu(t){return t.getUTCDay()}function Vu(t,e){return Vs(As.count(Ps(t)-1,t),e,2)}function Gu(t,e){return Vs(t.getUTCFullYear()%100,e,2)}function Bu(t,e){return Vs(t.getUTCFullYear()%1e4,e,4)}function Fu(){return"+0000"}function zu(){return"%"}function Wu(t){return+t}function Yu(t){return Math.floor(+t/1e3)}!function(t){Rs=function(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,o=t.days,a=t.shortDays,s=t.months,u=t.shortMonths,l=Bs(i),c=Fs(i),h=Bs(o),f=Fs(o),d=Bs(a),p=Fs(a),g=Bs(s),v=Fs(s),m=Bs(u),y=Fs(u),_={a:function(t){return a[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return u[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:cu,e:cu,f:gu,H:hu,I:fu,j:du,L:pu,m:vu,M:mu,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Wu,s:Yu,S:yu,u:_u,U:bu,V:xu,w:wu,W:Eu,x:null,X:null,y:Tu,Y:Ou,Z:Su,"%":zu},b={a:function(t){return a[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return u[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:Mu,e:Mu,f:Lu,H:Au,I:Cu,j:Pu,L:ku,m:Du,M:Ru,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Wu,s:Yu,S:Iu,u:Nu,U:Uu,V:ju,w:Hu,W:Vu,x:null,X:null,y:Gu,Y:Bu,Z:Fu,"%":zu},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 T(t,e,n,r)},d:tu,e:tu,f:au,H:nu,I:nu,j:eu,L:ou,m:Js,M:ru,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:Qs,Q:uu,s:lu,S:iu,u:Ws,U:Ys,V:qs,w:zs,W:Xs,x:function(t,e,r){return T(t,n,e,r)},X:function(t,e,n){return T(t,r,e,n)},y:Zs,Y:$s,Z:Ks,"%":su};function w(t,e){return function(n){var r,i,o,a=[],s=-1,u=0,l=t.length;for(n instanceof Date||(n=new Date(+n));++s<l;)37===t.charCodeAt(s)&&(a.push(t.slice(u,s)),null!=(i=Ns[r=t.charAt(++s)])?r=t.charAt(++s):i="e"===r?" ":"0",(o=e[r])&&(r=o(n,i)),a.push(r),u=s+1);return a.push(t.slice(u,s)),a.join("")}}function E(t,e){return function(n){var r,i,o=Ds(1900,void 0,1);if(T(o,t,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(!e||"Z"in o||(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=Ls(Ds(o.y,0,1))).getUTCDay(),r=i>4||0===i?As.ceil(r):As(r),r=Os.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=ks(Ds(o.y,0,1))).getDay(),r=i>4||0===i?xs.ceil(r):xs(r),r=ys.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?Ls(Ds(o.y,0,1)).getUTCDay():ks(Ds(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,Ls(o)):ks(o)}}function T(t,e,n,r){for(var i,o,a=0,s=e.length,u=n.length;a<s;){if(r>=u)return-1;if(37===(i=e.charCodeAt(a++))){if(i=e.charAt(a++),!(o=x[i in Ns?e.charAt(a++):i])||(r=o(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return(_.x=w(n,_),_.X=w(r,_),_.c=w(e,_),b.x=w(n,b),b.X=w(r,b),b.c=w(e,b),{format:function(t){var e=w(t+="",_);return e.toString=function(){return t},e},parse:function(t){var e=E(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=E(t+="",!0);return e.toString=function(){return t},e}})}(t),Is=Rs.format,Rs.parse,Rs.utcFormat,Rs.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 qu(t){return new Date(t)}function Xu(t){return t instanceof Date?+t:+new Date(+t)}function $u(t,e,n,r,i,o,a,s,u){var l=ja(ka,ka),c=l.invert,h=l.domain,f=u(".%L"),d=u(":%S"),p=u("%I:%M"),g=u("%I %p"),v=u("%a %d"),m=u("%b %d"),y=u("%B"),_=u("%Y"),b=[[a,1,1e3],[a,5,5e3],[a,15,15e3],[a,30,3e4],[o,1,6e4],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,36e5],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,864e5],[r,2,1728e5],[n,1,6048e5],[e,1,2592e6],[e,3,7776e6],[t,1,31536e6]];function x(s){return(a(s)<s?f:o(s)<s?d:i(s)<s?p:r(s)<s?g:e(s)<s?n(s)<s?v:m:t(s)<s?y:_)(s)}function w(e,n,r,i){if(null==e&&(e=10),"number"==typeof e){var o=Math.abs(r-n)/e,a=so((function(t){return t[2]})).right(b,o);a===b.length?(i=mo(n/31536e6,r/31536e6,e),e=t):a?(i=(a=b[o/b[a-1][2]<b[a][2]/o?a-1:a])[1],e=a[0]):(i=Math.max(mo(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(Oo.call(t,Xu)):h().map(qu)},l.ticks=function(t,e){var n,r=h(),i=r[0],o=r[r.length-1],a=o<i;return a&&(n=i,i=o,o=n),n=(n=w(t,i,o,e))?n.range(i,o+1):[],a?n.reverse():n},l.tickFormat=function(t,e){return null==e?x:u(e)},l.nice=function(t,e){var n=h();return(t=w(t,n[0],n[n.length-1],e))?h(rs(n,t)):l},l.copy=function(){return Na(l,$u(t,e,n,r,i,o,a,s,u))},l}var Zu=Math.PI,Ku=2*Zu,Qu=Ku-1e-6;function Ju(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function tl(){return new Ju}function el(t){return function(){return t}}Ju.prototype=tl.prototype={constructor:Ju,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,o){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var o=this._x1,a=this._y1,s=n-t,u=r-e,l=o-t,c=a-e,h=l*l+c*c;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>1e-6)if(Math.abs(c*s-u*l)>1e-6&&i){var f=n-o,d=r-a,p=s*s+u*u,g=f*f+d*d,v=Math.sqrt(p),m=Math.sqrt(h),y=i*Math.tan((Zu-Math.acos((p+h-g)/(2*v*m)))/2),_=y/m,b=y/v;Math.abs(_-1)>1e-6&&(this._+="L"+(t+_*l)+","+(e+_*c)),this._+="A"+i+","+i+",0,0,"+ +(c*f>l*d)+","+(this._x1=t+b*s)+","+(this._y1=e+b*u)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,r,i,o){t=+t,e=+e,o=!!o;var a=(n=+n)*Math.cos(r),s=n*Math.sin(r),u=t+a,l=e+s,c=1^o,h=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+u+","+l:(Math.abs(this._x1-u)>1e-6||Math.abs(this._y1-l)>1e-6)&&(this._+="L"+u+","+l),n&&(h<0&&(h=h%Ku+Ku),h>Qu?this._+="A"+n+","+n+",0,1,"+c+","+(t-a)+","+(e-s)+"A"+n+","+n+",0,1,"+c+","+(this._x1=u)+","+(this._y1=l):h>1e-6&&(this._+="A"+n+","+n+",0,"+ +(h>=Zu)+","+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 nl=Math.abs,rl=Math.atan2,il=Math.cos,ol=Math.max,al=Math.min,sl=Math.sin,ul=Math.sqrt,ll=Math.PI,cl=ll/2,hl=2*ll;function fl(t){return t>1?0:t<-1?ll:Math.acos(t)}function dl(t){return t>=1?cl:t<=-1?-cl:Math.asin(t)}function pl(t){return t.innerRadius}function gl(t){return t.outerRadius}function vl(t){return t.startAngle}function ml(t){return t.endAngle}function yl(t){return t&&t.padAngle}function _l(t,e,n,r,i,o,a,s){var u=n-t,l=r-e,c=a-i,h=s-o,f=h*u-c*l;if(!(f*f<1e-12))return[t+(f=(c*(e-o)-h*(t-i))/f)*u,e+f*l]}function bl(t,e,n,r,i,o,a){var s=t-n,u=e-r,l=(a?o:-o)/ul(s*s+u*u),c=l*u,h=-l*s,f=t+c,d=e+h,p=n+c,g=r+h,v=(f+p)/2,m=(d+g)/2,y=p-f,_=g-d,b=y*y+_*_,x=i-o,w=f*g-p*d,E=(_<0?-1:1)*ul(ol(0,x*x*b-w*w)),T=(w*_-y*E)/b,O=(-w*y-_*E)/b,S=(w*_+y*E)/b,M=(-w*y+_*E)/b,A=T-v,C=O-m,P=S-v,k=M-m;return A*A+C*C>P*P+k*k&&(T=S,O=M),{cx:T,cy:O,x01:-c,y01:-h,x11:T*(i/x-1),y11:O*(i/x-1)}}function xl(){var t=pl,e=gl,n=el(0),r=null,i=vl,o=ml,a=yl,s=null;function u(){var u,l,c=+t.apply(this,arguments),h=+e.apply(this,arguments),f=i.apply(this,arguments)-cl,d=o.apply(this,arguments)-cl,p=nl(d-f),g=d>f;if(s||(s=u=tl()),h<c&&(l=h,h=c,c=l),h>1e-12)if(p>hl-1e-12)s.moveTo(h*il(f),h*sl(f)),s.arc(0,0,h,f,d,!g),c>1e-12&&(s.moveTo(c*il(d),c*sl(d)),s.arc(0,0,c,d,f,g));else{var v,m,y=f,_=d,b=f,x=d,w=p,E=p,T=a.apply(this,arguments)/2,O=T>1e-12&&(r?+r.apply(this,arguments):ul(c*c+h*h)),S=al(nl(h-c)/2,+n.apply(this,arguments)),M=S,A=S;if(O>1e-12){var C=dl(O/c*sl(T)),P=dl(O/h*sl(T));(w-=2*C)>1e-12?(b+=C*=g?1:-1,x-=C):(w=0,b=x=(f+d)/2),(E-=2*P)>1e-12?(y+=P*=g?1:-1,_-=P):(E=0,y=_=(f+d)/2)}var k=h*il(y),L=h*sl(y),D=c*il(x),R=c*sl(x);if(S>1e-12){var I,N=h*il(_),U=h*sl(_),j=c*il(b),H=c*sl(b);if(p<ll&&(I=_l(k,L,j,H,N,U,D,R))){var V=k-I[0],G=L-I[1],B=N-I[0],F=U-I[1],z=1/sl(fl((V*B+G*F)/(ul(V*V+G*G)*ul(B*B+F*F)))/2),W=ul(I[0]*I[0]+I[1]*I[1]);M=al(S,(c-W)/(z-1)),A=al(S,(h-W)/(z+1))}}E>1e-12?A>1e-12?(v=bl(j,H,k,L,h,A,g),m=bl(N,U,D,R,h,A,g),s.moveTo(v.cx+v.x01,v.cy+v.y01),A<S?s.arc(v.cx,v.cy,A,rl(v.y01,v.x01),rl(m.y01,m.x01),!g):(s.arc(v.cx,v.cy,A,rl(v.y01,v.x01),rl(v.y11,v.x11),!g),s.arc(0,0,h,rl(v.cy+v.y11,v.cx+v.x11),rl(m.cy+m.y11,m.cx+m.x11),!g),s.arc(m.cx,m.cy,A,rl(m.y11,m.x11),rl(m.y01,m.x01),!g))):(s.moveTo(k,L),s.arc(0,0,h,y,_,!g)):s.moveTo(k,L),c>1e-12&&w>1e-12?M>1e-12?(v=bl(D,R,N,U,c,-M,g),m=bl(k,L,j,H,c,-M,g),s.lineTo(v.cx+v.x01,v.cy+v.y01),M<S?s.arc(v.cx,v.cy,M,rl(v.y01,v.x01),rl(m.y01,m.x01),!g):(s.arc(v.cx,v.cy,M,rl(v.y01,v.x01),rl(v.y11,v.x11),!g),s.arc(0,0,c,rl(v.cy+v.y11,v.cx+v.x11),rl(m.cy+m.y11,m.cx+m.x11),g),s.arc(m.cx,m.cy,M,rl(m.y11,m.x11),rl(m.y01,m.x01),!g))):s.arc(0,0,c,x,b,g):s.lineTo(D,R)}else s.moveTo(0,0);if(s.closePath(),u)return s=null,u+""||null}return u.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-ll/2;return[il(r)*n,sl(r)*n]},u.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:el(+e),u):t},u.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:el(+t),u):e},u.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:el(+t),u):n},u.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:el(+t),u):r},u.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:el(+t),u):i},u.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:el(+t),u):o},u.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:el(+t),u):a},u.context=function(t){return arguments.length?(s=null==t?null:t,u):s},u}function wl(t){this._context=t}function El(t){return new wl(t)}function Tl(t){return t[0]}function Ol(t){return t[1]}function Sl(){var t=Tl,e=Ol,n=el(!0),r=null,i=El,o=null;function a(a){var s,u,l,c=a.length,h=!1;for(null==r&&(o=i(l=tl())),s=0;s<=c;++s)!(s<c&&n(u=a[s],s,a))===h&&((h=!h)?o.lineStart():o.lineEnd()),h&&o.point(+t(u,s,a),+e(u,s,a));if(l)return o=null,l+""||null}return a.x=function(e){return arguments.length?(t="function"==typeof e?e:el(+e),a):t},a.y=function(t){return arguments.length?(e="function"==typeof t?t:el(+t),a):e},a.defined=function(t){return arguments.length?(n="function"==typeof t?t:el(!!t),a):n},a.curve=function(t){return arguments.length?(i=t,null!=r&&(o=i(r)),a):i},a.context=function(t){return arguments.length?(null==t?r=o=null:o=i(r=t),a):r},a}function Ml(){var t=Tl,e=null,n=el(0),r=Ol,i=el(!0),o=null,a=El,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==o&&(s=a(d=tl())),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 Sl().defined(i).curve(a).context(o)}return u.x=function(n){return arguments.length?(t="function"==typeof n?n:el(+n),e=null,u):t},u.x0=function(e){return arguments.length?(t="function"==typeof e?e:el(+e),u):t},u.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:el(+t),u):e},u.y=function(t){return arguments.length?(n="function"==typeof t?t:el(+t),r=null,u):n},u.y0=function(t){return arguments.length?(n="function"==typeof t?t:el(+t),u):n},u.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:el(+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:el(!!t),u):i},u.curve=function(t){return arguments.length?(a=t,null!=o&&(s=a(o)),u):a},u.context=function(t){return arguments.length?(null==t?o=s=null:s=a(o=t),u):o},u}function Al(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function Cl(t){return t}wl.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 Pl=Ll(El);function kl(t){this._curve=t}function Ll(t){function e(e){return new kl(t(e))}return e._curve=t,e}function Dl(){return t=Sl().curve(Pl),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(Ll(t)):e()._curve},t;var t,e}kl.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 Rl=Array.prototype.slice;function Il(){}function Nl(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 Ul(t){this._context=t}function jl(t){return new Ul(t)}function Hl(t){this._context=t}function Vl(t){return new Hl(t)}function Gl(t){this._context=t}function Bl(t){return new Gl(t)}function Fl(t,e){this._basis=new Ul(t),this._beta=e}Ul.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:Nl(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:Nl(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Hl.prototype={areaStart:Il,areaEnd:Il,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:Nl(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Gl.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:Nl(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Fl.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r,i=t[0],o=e[0],a=t[n]-i,s=e[n]-o,u=-1;++u<=n;)r=u/n,this._basis.point(this._beta*t[u]+(1-this._beta)*(i+r*a),this._beta*e[u]+(1-this._beta)*(o+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var zl=function t(e){function n(t){return 1===e?new Ul(t):new Fl(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function Wl(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 Yl(t,e){this._context=t,this._k=(1-e)/6}Yl.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:Wl(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:Wl(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 ql=function t(e){function n(t){return new Yl(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Xl(t,e){this._context=t,this._k=(1-e)/6}Xl.prototype={areaStart:Il,areaEnd:Il,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:Wl(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 $l=function t(e){function n(t){return new Xl(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Zl(t,e){this._context=t,this._k=(1-e)/6}Zl.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:Wl(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 Kl=function t(e){function n(t){return new Zl(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Ql(t,e,n){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>1e-12){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,u=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/u,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/u}if(t._l23_a>1e-12){var l=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,c=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*l+t._x1*t._l23_2a-e*t._l12_2a)/c,a=(a*l+t._y1*t._l23_2a-n*t._l12_2a)/c}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function Jl(t,e){this._context=t,this._alpha=e}Jl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:Ql(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 tc=function t(e){function n(t){return e?new Jl(t,e):new Yl(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function ec(t,e){this._context=t,this._alpha=e}ec.prototype={areaStart:Il,areaEnd:Il,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:Ql(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 nc=function t(e){function n(t){return e?new ec(t,e):new Xl(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function rc(t,e){this._context=t,this._alpha=e}rc.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:Ql(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 ic=function t(e){function n(t){return e?new rc(t,e):new Zl(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function oc(t){this._context=t}function ac(t){return new oc(t)}function sc(t){return t<0?-1:1}function uc(t,e,n){var r=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),a=(n-t._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(sc(o)+sc(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function lc(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function cc(t,e,n){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,s=(o-r)/3;t._context.bezierCurveTo(r+s,i+s*e,o-s,a-s*n,o,a)}function hc(t){this._context=t}function fc(t){this._context=new dc(t)}function dc(t){this._context=t}function pc(t){return new hc(t)}function gc(t){return new fc(t)}function vc(t){this._context=t}function mc(t){var e,n,r=t.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,o[e]=4,a[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,o[r-1]=7,a[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/o[e-1],o[e]-=n,a[e]-=n*a[e-1];for(i[r-1]=a[r-1]/o[r-1],e=r-2;e>=0;--e)i[e]=(a[e]-i[e+1])/o[e];for(o[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)o[e]=2*t[e+1]-i[e+1];return[i,o]}function yc(t){return new vc(t)}function _c(t,e){this._context=t,this._t=e}function bc(t){return new _c(t,.5)}function xc(t){return new _c(t,0)}function wc(t){return new _c(t,1)}function Ec(t,e){if((i=t.length)>1)for(var n,r,i,o=1,a=t[e[0]],s=a.length;o<i;++o)for(r=a,a=t[e[o]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function Tc(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function Oc(t,e){return t[e]}oc.prototype={areaStart:Il,areaEnd:Il,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))}},hc.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:cc(this,this._t0,lc(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,cc(this,lc(this,n=uc(this,t,e)),n);break;default:cc(this,this._t0,n=uc(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(fc.prototype=Object.create(hc.prototype)).point=function(t,e){hc.prototype.point.call(this,e,t)},dc.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,o){this._context.bezierCurveTo(e,t,r,n,o,i)}},vc.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=mc(t),i=mc(e),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],t[a],e[a]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}},_c.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 Sc=function(){function t(t){this.state={options:{}},this.colorScale={},this.services=t}return t.prototype.getDisplayData=function(){if(!this.get("data"))return null;var t=hi.items.status.ACTIVE,e=this.getDataGroups(),n=$r.clone(this.get("data")),r=this.getOptions().data.groupMapsTo,i=this.getOptions().axes;return i&&Object.keys(i).forEach((function(t){if(i[t].mapsTo&&i[t].domain){var e=i[t].mapsTo;if(i[t].scaleType===E.LABELS)n=n.filter((function(n){return i[t].domain.includes(n[e])}));else{var r=i[t].domain,o=r[0],a=r[1];n=n.filter((function(t){return t[e]>=o&&t[e]<=a}))}}})),n.filter((function(n){return e.find((function(t){return t.name===n[r]})).status===t}))},t.prototype.getData=function(){return this.get("data")},t.prototype.isDataEmpty=function(){return!this.getData().length},t.prototype.setData=function(t){var e=this.sanitize($r.clone(t)),n=this.generateDataGroups(e);return this.set({data:e,dataGroups:n}),e},t.prototype.getDataGroups=function(){return this.get("dataGroups")},t.prototype.getActiveDataGroups=function(){var t=hi.items.status.ACTIVE;return this.getDataGroups().filter((function(e){return e.status===t}))},t.prototype.getDataGroupNames=function(){return this.getDataGroups().map((function(t){return t.name}))},t.prototype.getActiveDataGroupNames=function(){return this.getActiveDataGroups().map((function(t){return t.name}))},t.prototype.getGroupedData=function(){var t=this.getDisplayData(),e={},n=this.getOptions().data.groupMapsTo;return t.map((function(t){var r=t[n];null!==e[r]&&void 0!==e[r]?e[r].push(t):e[r]=[t]})),Object.keys(e).map((function(t){return{name:t,data:e[t]}}))},t.prototype.getDataValuesGroupedByKeys=function(){var t=this.getOptions().data.groupMapsTo,e=this.getDisplayData(),n=this.services.cartesianScales.getDomainIdentifier(),r=this.services.cartesianScales.getRangeIdentifier(),i=xo(e,(function(t){return t[n]})).keys(),o=this.getDataGroupNames();return i.map((function(i){var a={sharedStackKey:i};return o.forEach((function(o){var s=e.find((function(e){return e[t]===o&&e[n].toString()===i}));a[o]=s?s[r]:null})),a}))},t.prototype.getStackedData=function(t){var e=(void 0===t?{percentage:!1}:t).percentage,n=this.getOptions().data.groupMapsTo,r=this.getDataGroupNames(),i=this.getDataValuesGroupedByKeys();if(e){var o=$r.fromPairs(i.map((function(t){return[t.sharedStackKey,0]})));i.forEach((function(t){r.forEach((function(e){o[t.sharedStackKey]+=t[e]}))})),i.forEach((function(t){r.forEach((function(e){t[e]=t[e]/o[t.sharedStackKey]*100}))}))}return function(){var t=el([]),e=Tc,n=Ec,r=Oc;function i(i){var o,a,s=t.apply(this,arguments),u=i.length,l=s.length,c=new Array(l);for(o=0;o<l;++o){for(var h,f=s[o],d=c[o]=new Array(u),p=0;p<u;++p)d[p]=h=[0,+r(i[p],f,p,i)],h.data=i[p];d.key=f}for(o=0,a=e(c);o<l;++o)c[a[o]].index=o;return n(c,a),c}return i.keys=function(e){return arguments.length?(t="function"==typeof e?e:el(Rl.call(e)),i):t},i.value=function(t){return arguments.length?(r="function"==typeof t?t:el(+t),i):r},i.order=function(t){return arguments.length?(e=null==t?Tc:"function"==typeof t?t:el(Rl.call(t)),i):e},i.offset=function(t){return arguments.length?(n=null==t?Ec: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 o=t[i];return o[n]=r[e],o}))}))},t.prototype.getOptions=function(){return this.state.options},t.prototype.set=function(t,e){void 0===e&&(e=!1),this.state=Object.assign({},this.state,t),e||this.update()},t.prototype.get=function(t){return t?this.state[t]:this.state},t.prototype.setOptions=function(t){this.set({options:$r.merge(this.getOptions(),t)})},t.prototype.update=function(){this.getDisplayData()&&(this.updateAllDataGroups(),this.setColorScale(),this.services.events.dispatchEvent(U.Model.UPDATE))},t.prototype.setUpdateCallback=function(t){this.updateCallback=t},t.prototype.toggleDataLabel=function(t){var e=hi.items.status,n=e.ACTIVE,r=e.DISABLED,i=this.getDataGroups(),o=i.some((function(t){return t.status===r})),a=i.filter((function(t){return t.status===n}));if(o)if(1===a.length&&a[0].name===t)i.forEach((function(t,e){i[e].status=n}));else{var s=i.findIndex((function(e){return e.name===t}));i[s].status=i[s].status===r?n:r}else i.forEach((function(e,o){i[o].status=e.name===t?n:r}));this.services.events.dispatchEvent(U.Legend.ITEMS_UPDATE,{dataGroups:i}),this.set({dataGroups:i})},t.prototype.getIsFilled=function(t,e,n,r){var i=this.getOptions();return i.getIsFilled?i.getIsFilled(t,e,n,r):r},t.prototype.getFillColor=function(t,e,n){var r=this.getOptions(),i=this.getFillScale()(t);return r.getFillColor?r.getFillColor(t,e,n,i):i},t.prototype.getStrokeColor=function(t,e,n){var r=this.getOptions(),i=this.colorScale(t);return r.getStrokeColor?r.getStrokeColor(t,e,n,i):i},t.prototype.getFillScale=function(){return this.colorScale},t.prototype.transformToTabularData=function(t){console.warn("We've updated the charting data format to be tabular by default. The current format you're using is deprecated and will be removed in v1.0, read more here https://carbon-design-system.github.io/carbon-charts/?path=/story/tutorials--tabular-data-format");var e=[],n=t.datasets,r=t.labels;return n.forEach((function(t){t.data.forEach((function(n,i){var o,a=$r.getProperty(t,"label");if(null===a){var s=$r.getProperty(r,i);o=s||"Ungrouped"}else o=a;var u={group:o,key:r[i]};isNaN(n)?(u.value=n.value,u.date=n.date):u.value=n,e.push(u)}))})),e},t.prototype.getTabularData=function(t){return Array.isArray(t)?t:this.transformToTabularData(t)},t.prototype.sanitize=function(t){return this.getTabularData(t)},t.prototype.updateAllDataGroups=function(){var t=this;this.allDataGroups?this.getDataGroupNames().forEach((function(e){-1===t.allDataGroups.indexOf(e)&&t.allDataGroups.push(e)})):this.allDataGroups=this.getDataGroupNames()},t.prototype.generateDataGroups=function(t){var e=this.getOptions().data.groupMapsTo,n=hi.items.status.ACTIVE;return xo(t,(function(t){return t[e]})).keys().map((function(t){return{name:t,status:n}}))},t.prototype.setColorScale=function(){var t=io,e=this.getOptions(),n=$r.getProperty(e,"color","scale");if(null!==n&&0!==Object.keys(n).length){var r=[],i=0;this.allDataGroups.forEach((function(e){n[e]?r.push(n[e]):r.push(t[i]),i===t.length-1?i=0:i++})),this.colorScale=Ao().range(r).domain(this.allDataGroups)}else this.colorScale=Ao().range(t).domain(this.allDataGroups)},t}(),Mc=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}(),Ac="http://www.w3.org/1999/xhtml",Cc={svg:"http://www.w3.org/2000/svg",xhtml:Ac,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Pc(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),Cc.hasOwnProperty(e)?{space:Cc[e],local:t}:t}function kc(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Ac&&e.documentElement.namespaceURI===Ac?e.createElement(t):e.createElementNS(n,t)}}function Lc(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Dc(t){var e=Pc(t);return(e.local?Lc:kc)(e)}function Rc(){}function Ic(t){return null==t?Rc:function(){return this.querySelector(t)}}function Nc(){return[]}function Uc(t){return null==t?Nc:function(){return this.querySelectorAll(t)}}function jc(t){return function(){return this.matches(t)}}function Hc(t){return new Array(t.length)}function Vc(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Vc.prototype={constructor:Vc,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 Gc(t,e,n,r,i,o){for(var a,s=0,u=e.length,l=o.length;s<l;++s)(a=e[s])?(a.__data__=o[s],r[s]=a):n[s]=new Vc(t,o[s]);for(;s<u;++s)(a=e[s])&&(i[s]=a)}function Bc(t,e,n,r,i,o,a){var s,u,l,c={},h=e.length,f=o.length,d=new Array(h);for(s=0;s<h;++s)(u=e[s])&&(d[s]=l="$"+a.call(u,u.__data__,s,e),l in c?i[s]=u:c[l]=u);for(s=0;s<f;++s)(u=c[l="$"+a.call(t,o[s],s,o)])?(r[s]=u,u.__data__=o[s],c[l]=null):n[s]=new Vc(t,o[s]);for(s=0;s<h;++s)(u=e[s])&&c[d[s]]===u&&(i[s]=u)}function Fc(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function zc(t){return function(){this.removeAttribute(t)}}function Wc(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Yc(t,e){return function(){this.setAttribute(t,e)}}function qc(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Xc(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function $c(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 Zc(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Kc(t){return function(){this.style.removeProperty(t)}}function Qc(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Jc(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function th(t,e){return t.style.getPropertyValue(e)||Zc(t).getComputedStyle(t,null).getPropertyValue(e)}function eh(t){return function(){delete this[t]}}function nh(t,e){return function(){this[t]=e}}function rh(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function ih(t){return t.trim().split(/^|\s+/)}function oh(t){return t.classList||new ah(t)}function ah(t){this._node=t,this._names=ih(t.getAttribute("class")||"")}function sh(t,e){for(var n=oh(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function uh(t,e){for(var n=oh(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function lh(t){return function(){sh(this,t)}}function ch(t){return function(){uh(this,t)}}function hh(t,e){return function(){(e.apply(this,arguments)?sh:uh)(this,t)}}function fh(){this.textContent=""}function dh(t){return function(){this.textContent=t}}function ph(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function gh(){this.innerHTML=""}function vh(t){return function(){this.innerHTML=t}}function mh(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function yh(){this.nextSibling&&this.parentNode.appendChild(this)}function _h(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function bh(){return null}function xh(){var t=this.parentNode;t&&t.removeChild(this)}function wh(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Eh(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}ah.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 Th={},Oh=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(Th={mouseenter:"mouseover",mouseleave:"mouseout"}));function Sh(t,e,n){return t=Mh(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function Mh(t,e,n){return function(r){var i=Oh;Oh=r;try{t.call(this,this.__data__,e,n)}finally{Oh=i}}}function Ah(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function Ch(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,o=e.length;r<o;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.capture);++i?e.length=i:delete this.__on}}}function Ph(t,e,n){var r=Th.hasOwnProperty(t.type)?Sh:Mh;return function(i,o,a){var s,u=this.__on,l=r(e,o,a);if(u)for(var c=0,h=u.length;c<h;++c)if((s=u[c]).type===t.type&&s.name===t.name)return this.removeEventListener(s.type,s.listener,s.capture),this.addEventListener(s.type,s.listener=l,s.capture=n),void(s.value=e);this.addEventListener(t.type,l,n),s={type:t.type,name:t.name,value:e,listener:l,capture:n},u?u.push(s):this.__on=[s]}}function kh(t,e,n){var r=Zc(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 Lh(t,e){return function(){return kh(this,t,e)}}function Dh(t,e){return function(){return kh(this,t,e.apply(this,arguments))}}var Rh=[null];function Ih(t,e){this._groups=t,this._parents=e}function Nh(){return new Ih([[document.documentElement]],Rh)}function Uh(t){return"string"==typeof t?new Ih([[document.querySelector(t)]],[document.documentElement]):new Ih([[t]],Rh)}function jh(){for(var t,e=Oh;t=e.sourceEvent;)e=t;return e}function Hh(t){var e=jh();return e.changedTouches&&(e=e.changedTouches[0]),function(t,e){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}(t,e)}Ih.prototype=Nh.prototype={constructor:Ih,select:function(t){"function"!=typeof t&&(t=Ic(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a,s=e[i],u=s.length,l=r[i]=new Array(u),c=0;c<u;++c)(o=s[c])&&(a=t.call(o,o.__data__,c,s))&&("__data__"in o&&(a.__data__=o.__data__),l[c]=a);return new Ih(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=Uc(t));for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a,s=e[o],u=s.length,l=0;l<u;++l)(a=s[l])&&(r.push(t.call(a,a.__data__,l,s)),i.push(a));return new Ih(r,i)},filter:function(t){"function"!=typeof t&&(t=jc(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a=e[i],s=a.length,u=r[i]=[],l=0;l<s;++l)(o=a[l])&&t.call(o,o.__data__,l,a)&&u.push(o);return new Ih(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?Bc:Gc,r=this._parents,i=this._groups;"function"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var o=i.length,a=new Array(o),s=new Array(o),u=new Array(o),l=0;l<o;++l){var c=r[l],h=i[l],f=h.length,d=t.call(c,c&&c.__data__,l,r),p=d.length,g=s[l]=new Array(p),v=a[l]=new Array(p);n(c,h,g,v,u[l]=new Array(f),d,e);for(var m,y,_=0,b=0;_<p;++_)if(m=g[_]){for(_>=b&&(b=_+1);!(y=v[b])&&++b<p;);m._next=y||null}}return(a=new Ih(a,r))._enter=s,a._exit=u,a},enter:function(){return new Ih(this._enter||this._groups.map(Hc),this._parents)},exit:function(){return new Ih(this._exit||this._groups.map(Hc),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,o=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=e&&(i=e(i)),null==n?o.remove():n(o),r&&i?r.merge(i).order():i},merge:function(t){for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u,l=e[s],c=n[s],h=l.length,f=a[s]=new Array(h),d=0;d<h;++d)(u=l[d]||c[d])&&(f[d]=u);for(;s<r;++s)a[s]=e[s];return new Ih(a,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=Fc);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a,s=n[o],u=s.length,l=i[o]=new Array(u),c=0;c<u;++c)(a=s[c])&&(l[c]=a);l.sort(e)}return new Ih(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),e=-1;return this.each((function(){t[++e]=this})),t},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null},size:function(){var t=0;return this.each((function(){++t})),t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,o=e[n],a=0,s=o.length;a<s;++a)(i=o[a])&&t.call(i,i.__data__,a,o);return this},attr:function(t,e){var n=Pc(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?Wc:zc:"function"==typeof e?n.local?$c:Xc:n.local?qc:Yc)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?Kc:"function"==typeof e?Jc:Qc)(t,e,null==n?"":n)):th(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?eh:"function"==typeof e?rh:nh)(t,e)):this.node()[t]},classed:function(t,e){var n=ih(t+"");if(arguments.length<2){for(var r=oh(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?hh:e?lh:ch)(n,e))},text:function(t){return arguments.length?this.each(null==t?fh:("function"==typeof t?ph:dh)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?gh:("function"==typeof t?mh:vh)(t)):this.node().innerHTML},raise:function(){return this.each(yh)},lower:function(){return this.each(_h)},append:function(t){var e="function"==typeof t?t:Dc(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:Dc(t),r=null==e?bh:"function"==typeof e?e:Ic(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(xh)},clone:function(t){return this.select(t?Eh:wh)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,o=Ah(t+""),a=o.length;if(!(arguments.length<2)){for(s=e?Ph:Ch,null==n&&(n=!1),r=0;r<a;++r)this.each(s(o[r],e,n));return this}var s=this.node().__on;if(s)for(var u,l=0,c=s.length;l<c;++l)for(r=0,u=s[l];r<a;++r)if((i=o[r]).type===u.type&&i.name===u.name)return u.value},dispatch:function(t,e){return this.each(("function"==typeof e?Dh:Lh)(t,e))}};var Vh={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 "},Gh=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}()}(),Bh="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,Fh="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),zh="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(Fh):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)},Wh=["top","right","bottom","left","width","height","size","weight"],Yh="undefined"!=typeof MutationObserver,qh=function(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var n=!1,r=!1,i=0;function o(){n&&(n=!1,t()),r&&s()}function a(){zh(o)}function s(){var t=Date.now();if(n){if(t-i<2)return;r=!0}else n=!0,r=!1,setTimeout(a,e);i=t}return s}(this.refresh.bind(this),20)};qh.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},qh.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},qh.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},qh.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},qh.prototype.connect_=function(){Bh&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Yh?(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)},qh.prototype.disconnect_=function(){Bh&&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)},qh.prototype.onTransitionEnd_=function(t){var e=t.propertyName;void 0===e&&(e=""),Wh.some((function(t){return!!~e.indexOf(t)}))&&this.refresh()},qh.getInstance=function(){return this.instance_||(this.instance_=new qh),this.instance_},qh.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},$h=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||Fh},Zh=nf(0,0,0,0);function Kh(t){return parseFloat(t)||0}function Qh(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 Jh(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return Zh;var r=$h(t).getComputedStyle(t),i=function(t){for(var e={},n=0,r=["top","right","bottom","left"];n<r.length;n+=1){var i=r[n],o=t["padding-"+i];e[i]=Kh(o)}return e}(r),o=i.left+i.right,a=i.top+i.bottom,s=Kh(r.width),u=Kh(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==e&&(s-=Qh(r,"left","right")+o),Math.round(u+a)!==n&&(u-=Qh(r,"top","bottom")+a)),!function(t){return t===$h(t).document.documentElement}(t)){var l=Math.round(s+o)-e,c=Math.round(u+a)-n;1!==Math.abs(l)&&(s-=l),1!==Math.abs(c)&&(u-=c)}return nf(i.left,i.top,s,u)}var tf="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof $h(t).SVGGraphicsElement}:function(t){return t instanceof $h(t).SVGElement&&"function"==typeof t.getBBox};function ef(t){return Bh?tf(t)?function(t){var e=t.getBBox();return nf(0,0,e.width,e.height)}(t):Jh(t):Zh}function nf(t,e,n,r){return{x:t,y:e,width:n,height:r}}var rf=function(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=nf(0,0,0,0),this.target=t};rf.prototype.isActive=function(){var t=ef(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},rf.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t};var of=function(t,e){var n=function(t){var e=t.x,n=t.y,r=t.width,i=t.height,o="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,a=Object.create(o.prototype);return Xh(a,{x:e,y:n,width:r,height:i,top:n,right:e+r,bottom:i+n,left:e}),a}(e);Xh(this,{target:t,contentRect:n})},af=function(t,e,n){if(this.activeObservations_=[],this.observations_=new Gh,"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 $h(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new rf(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 $h(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 of(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 sf="undefined"!=typeof WeakMap?new WeakMap:new Gh,uf=function(t){if(!(this instanceof uf))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=qh.getInstance(),n=new af(t,e,this);sf.set(this,n)};["observe","unobserve","disconnect"].forEach((function(t){uf.prototype[t]=function(){return(e=sf.get(this))[t].apply(e,arguments);var e}}));var lf=void 0!==Fh.ResizeObserver?Fh.ResizeObserver:uf,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=Uh(t));var n,r,i,o,a={width:0,height:0},s=function(t){t&&Object.keys(a).forEach((function(e){if(t[e]){var n=t[e],r=parseFloat(n);n&&r>a[e]&&-1===(""+n).indexOf("%")&&(a[e]=r)}}))},u={width:t.attr("width"),height:t.attr("height")};try{r={width:(n=t.node().getBBox()).width,height:n.height}}catch(t){}try{o={width:(i=t.node().getBoundingClientRect()).width,height:i.height}}catch(t){}var l={width:t.node().clientWidth,height:t.node().clientHeight};if(e){if(e.useAttrs&&(s(u),a.width>0&&a.height>0))return a;if(e.useClientDimensions&&(s(l),a.width>0&&a.height>0))return l;if(e.useBBox&&(s(r),a.width>0&&a.height>0))return r;if(e.useBoundingRect&&(s(o),a.width>0&&a.height>0))return o}try{s({width:$r.getProperty(t.node(),"width","baseVal","value"),height:$r.getProperty(t.node(),"height","baseVal","value")})}catch(t){s(l),s(r),s(u)}return a},e.appendOrSelect=function(t,e){var n=e.split("."),r=n[0],i=t.select(e);return i.empty()?t.append(r).attr("class",n.slice(1).join(" ")):i},e.prototype.init=function(){this.styleHolderElement(),this.addSVGElement(),this.model.getOptions().resizable&&this.addResizeListener(),this.addHolderListeners()},e.prototype.update=function(){this.styleHolderElement()},e.prototype.styleHolderElement=function(){var t=this.getHolder();Uh(this.getHolder()).classed(Vh.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=$r.getProperty(this.model.getOptions(),"style","prefix"),e=Uh(this.getHolder()).append("svg").classed(Vh.prefix+"--"+t+"--chart-svg",!0).attr("height","100%").attr("width","100%");this.svg=e.node()},e.prototype.getMainSVG=function(){return this.svg},e.prototype.addHolderListeners=function(){var t=this,e=this.getHolder();e&&Uh(e).on("mouseover",(function(){t.services.events.dispatchEvent(U.Chart.MOUSEOVER)})).on("mouseout",(function(){t.services.events.dispatchEvent(U.Chart.MOUSEOUT)}))},e.prototype.addResizeListener=function(){var t=this,e=this.getHolder();if(e){var n=e.clientWidth,r=e.clientHeight,i=$r.debounce((function(i,o){e&&(Math.abs(n-e.clientWidth)>1||Math.abs(r-e.clientHeight)>1)&&(n=e.clientWidth,r=e.clientHeight,t.services.events.dispatchEvent(U.Chart.RESIZE))}),12.5);new lf(i).observe(e)}},e}(Mc),hf=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}(Mc),ff={value:function(){}};function df(){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 pf(r)}function pf(t){this._=t}function gf(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 vf(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function mf(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=ff,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}pf.prototype=df.prototype={constructor:pf,on:function(t,e){var n,r=this._,i=gf(t+"",r),o=-1,a=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<a;)if(n=(t=i[o]).type)r[n]=mf(r[n],t.name,e);else if(null==e)for(n in r)r[n]=mf(r[n],t.name,null);return this}for(;++o<a;)if((n=(t=i[o]).type)&&(n=vf(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new pf(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,n=(r=this._[t]).length;o<n;++o)r[o].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};var yf,_f,bf=0,xf=0,wf=0,Ef=0,Tf=0,Of=0,Sf="object"==typeof performance&&performance.now?performance:Date,Mf="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Af(){return Tf||(Mf(Cf),Tf=Sf.now()+Of)}function Cf(){Tf=0}function Pf(){this._call=this._time=this._next=null}function kf(t,e,n){var r=new Pf;return r.restart(t,e,n),r}function Lf(){Tf=(Ef=Sf.now())+Of,bf=xf=0;try{!function(){Af(),++bf;for(var t,e=yf;e;)(t=Tf-e._time)>=0&&e._call.call(null,t),e=e._next;--bf}()}finally{bf=0,function(){var t,e,n=yf,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:yf=e);_f=t,Rf(r)}(),Tf=0}}function Df(){var t=Sf.now(),e=t-Ef;e>1e3&&(Of-=e,Ef=t)}function Rf(t){bf||(xf&&(xf=clearTimeout(xf)),t-Tf>24?(t<1/0&&(xf=setTimeout(Lf,t-Sf.now()-Of)),wf&&(wf=clearInterval(wf))):(wf||(Ef=Sf.now(),wf=setInterval(Df,1e3)),bf=1,Mf(Lf)))}function If(t,e,n){var r=new Pf;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}Pf.prototype=kf.prototype={constructor:Pf,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Af():+n)+(null==e?0:+e),this._next||_f===this||(_f?_f._next=this:yf=this,_f=this),this._call=t,this._time=n,Rf()},stop:function(){this._call&&(this._call=null,this._time=1/0,Rf())}};var Nf=df("start","end","cancel","interrupt"),Uf=[];function jf(t,e,n,r,i,o){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function o(u){var l,c,h,f;if(1!==n.state)return s();for(l in i)if((f=i[l]).name===n.name){if(3===f.state)return If(o);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[l]):+l<e&&(f.state=6,f.timer.stop(),f.on.call("cancel",t,t.__data__,f.index,f.group),delete i[l])}if(If((function(){3===n.state&&(n.state=4,n.timer.restart(a,n.delay,n.time),a(u))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(h=n.tween.length),l=0,c=-1;l<h;++l)(f=n.tween[l].value.call(t,t.__data__,n.index,n.group))&&(r[++c]=f);r.length=c+1}}function a(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(s),n.state=5,1),o=-1,a=r.length;++o<a;)r[o].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),s())}function s(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=kf((function(t){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=t&&o(t-n.delay)}),0,n.time)}(t,n,{name:e,index:r,group:i,on:Nf,tween:Uf,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function Hf(t,e){var n=Gf(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function Vf(t,e){var n=Gf(t,e);if(n.state>3)throw new Error("too late; already running");return n}function Gf(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Bf(t,e){var n,r;return function(){var i=Vf(this,t),o=i.tween;if(o!==n)for(var a=0,s=(r=n=o).length;a<s;++a)if(r[a].name===e){(r=r.slice()).splice(a,1);break}i.tween=r}}function Ff(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var o=Vf(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},u=0,l=i.length;u<l;++u)if(i[u].name===e){i[u]=s;break}u===l&&i.push(s)}o.tween=i}}function zf(t,e,n){var r=t._id;return t.each((function(){var t=Vf(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return Gf(t,r).value[e]}}function Wf(t,e){var n;return("number"==typeof e?fa:e instanceof Yo?ua:(n=Yo(e))?(e=n,ua):va)(t,e)}function Yf(t){return function(){this.removeAttribute(t)}}function qf(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Xf(t,e,n){var r,i,o=n+"";return function(){var a=this.getAttribute(t);return a===o?null:a===r?i:i=e(r=a,n)}}function $f(t,e,n){var r,i,o=n+"";return function(){var a=this.getAttributeNS(t.space,t.local);return a===o?null:a===r?i:i=e(r=a,n)}}function Zf(t,e,n){var r,i,o;return function(){var a,s,u=n(this);if(null!=u)return(a=this.getAttribute(t))===(s=u+"")?null:a===r&&s===i?o:(i=s,o=e(r=a,u));this.removeAttribute(t)}}function Kf(t,e,n){var r,i,o;return function(){var a,s,u=n(this);if(null!=u)return(a=this.getAttributeNS(t.space,t.local))===(s=u+"")?null:a===r&&s===i?o:(i=s,o=e(r=a,u));this.removeAttributeNS(t.space,t.local)}}function 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(){Hf(this,t).delay=+e.apply(this,arguments)}}function rd(t,e){return e=+e,function(){Hf(this,t).delay=e}}function id(t,e){return function(){Vf(this,t).duration=+e.apply(this,arguments)}}function od(t,e){return e=+e,function(){Vf(this,t).duration=e}}function ad(t,e){if("function"!=typeof e)throw new Error;return function(){Vf(this,t).ease=e}}function sd(t,e,n){var r,i,o=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?Hf:Vf;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}var ud=Nh.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 o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&cd(t,o,n)),r}return o._value=e,o}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 Nh().transition(t)}function md(){return++pd}var yd=Nh.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=Ic(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s,u,l=r[a],c=l.length,h=o[a]=new Array(c),f=0;f<c;++f)(s=l[f])&&(u=t.call(s,s.__data__,f,l))&&("__data__"in s&&(u.__data__=s.__data__),h[f]=u,jf(h[f],e,n,f,h,Gf(s,n)));return new gd(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Uc(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var u,l=r[s],c=l.length,h=0;h<c;++h)if(u=l[h]){for(var f,d=t.call(u,u.__data__,h,l),p=Gf(u,n),g=0,v=d.length;g<v;++g)(f=d[g])&&jf(f,e,n,g,d,p);o.push(d),a.push(u)}return new gd(o,a,e,n)},filter:function(t){"function"!=typeof t&&(t=jc(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a=e[i],s=a.length,u=r[i]=[],l=0;l<s;++l)(o=a[l])&&t.call(o,o.__data__,l,a)&&u.push(o);return new 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,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u,l=e[s],c=n[s],h=l.length,f=a[s]=new Array(h),d=0;d<h;++d)(u=l[d]||c[d])&&(f[d]=u);for(;s<r;++s)a[s]=e[s];return new gd(a,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,o=0;o<i;++o)for(var a,s=r[o],u=s.length,l=0;l<u;++l)if(a=s[l]){var c=Gf(a,e);jf(a,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?Gf(this.node(),n).on.on(t):this.each(sd(n,t,e))},attr:function(t,e){var n=Pc(t),r="transform"===n?Aa:Wf;return this.attrTween(t,"function"==typeof e?(n.local?Kf:Zf)(n,r,zf(this,"attr."+t,e)):null==e?(n.local?qf:Yf)(n):(n.local?$f:Xf)(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=Pc(t);return this.tween(n,(r.local?td:ed)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?Ma:Wf;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var o=th(this,t),a=(this.style.removeProperty(t),th(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}(t,r)).on("end.style."+t,ld(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,o;return function(){var a=th(this,t),s=n(this),u=s+"";return null==s&&(this.style.removeProperty(t),u=s=th(this,t)),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}(t,r,zf(this,"style."+t,e))).each(function(t,e){var n,r,i,o,a="style."+e,s="end."+a;return function(){var u=Vf(this,t),l=u.on,c=null==u.value[a]?o||(o=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,o=n+"";return function(){var a=th(this,t);return a===o?null:a===r?i:i=e(r=a,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,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}}(zf(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=Gf(this.node(),n).tween,o=0,a=i.length;o<a;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==e?Bf:Ff)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?nd:rd)(e,t)):Gf(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?id:od)(e,t)):Gf(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(ad(e,t)):Gf(this.node(),e).ease},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(o,a){var s={value:a},u={value:function(){0==--i&&o()}};n.each((function(){var n=Vf(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=Af(),bd;return n}Nh.prototype.interrupt=function(t){return this.each((function(){!function(t,e){var n,r,i,o=t.__transition,a=!0;if(o){for(i in e=null==e?null:e+"",o)(n=o[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete o[i]):a=!1;a&&delete t.__transition}}(this,t)}))},Nh.prototype.transition=function(t){var e,n;t instanceof gd?(e=t._id,t=t._name):(e=md(),(n=bd).time=Af(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],u=s.length,l=0;l<u;++l)(a=s[l])&&jf(a,t,e,l,s,n||xd(a,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(U.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($r.getProperty(Ri,t,"duration")||Ri.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}(Mc);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 Td(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 Od(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ed(t),r=Td(e);return n.setDate(n.getDate()+r),n}function Sd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ed(t).getTime(),r=Td(e);return new Date(n+r)}function Md(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Td(e);return Sd(t,36e5*n)}function Ad(t){var e=new Date(t.getTime()),n=Math.ceil(e.getTimezoneOffset());return e.setSeconds(0,0),6e4*n+e.getTime()%6e4}function Cd(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=Cd(t),r=Cd(e),i=n.getTime()-Ad(n),o=r.getTime()-Ad(r);return Math.round((i-o)/864e5)}function kd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Td(e);return Sd(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 Dd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ed(t),r=Td(e),i=n.getMonth()+r,o=new Date(0);o.setFullYear(n.getFullYear(),i,1),o.setHours(0,0,0,0);var a=Ld(o);return n.setMonth(i,Math.min(a,n.getDate())),n}function Rd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Td(e);return Sd(t,1e3*n)}function Id(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Td(e);return Dd(t,12*n)}function Nd(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 Ud(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Ed(t);return!isNaN(e)}function jd(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(),o=n.getMonth()-r.getMonth();return 12*i+o}function Hd(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 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);return n.getTime()-r.getTime()}function Gd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Vd(t,e)/6e4;return n>0?Math.floor(n):Math.ceil(n)}function Bd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Vd(t,e)/1e3;return n>0?Math.floor(n):Math.ceil(n)}var Fd={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 zd(t){return function(e){var n=e||{},r=n.width?String(n.width):t.defaultWidth;return t.formats[r]||t.formats[t.defaultWidth]}}var Wd={date:zd({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:zd({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:zd({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Yd={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 o=t.defaultFormattingWidth||t.defaultWidth,a=i.width?String(i.width):o;r=t.formattingValues[a]||t.formattingValues[o]}else{var s=t.defaultWidth,u=i.width?String(i.width):t.defaultWidth;r=t.values[u]||t.values[s]}return r[t.argumentCallback?t.argumentCallback(e):e]}}function Xd(t){return function(e,n){var r=String(e),i=n||{},o=i.width,a=o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth],s=r.match(a);if(!s)return null;var u,l=s[0],c=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth];return u="[object Array]"===Object.prototype.toString.call(c)?function(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return n}(c,(function(t){return t.test(r)})):function(t,e){for(var n in t)if(t.hasOwnProperty(n)&&e(t[n]))return n}(c,(function(t){return t.test(r)})),u=t.valueCallback?t.valueCallback(u):u,{value:u=i.valueCallback?i.valueCallback(u):u,rest:r.slice(l.length)}}}var $d,Zd={code:"en-US",formatDistance:function(t,e,n){var r;return n=n||{},r="string"==typeof Fd[t]?Fd[t]:1===e?Fd[t].one:Fd[t].other.replace("{{count}}",e),n.addSuffix?n.comparison>0?"in "+r:r+" ago":r},formatLong:Wd,formatRelative:function(t,e,n,r){return Yd[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:($d={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($d.matchPattern);if(!i)return null;var o=i[0],a=n.match($d.parsePattern);if(!a)return null;var s=$d.valueCallback?$d.valueCallback(a[0]):a[0];return{value:s=r.valueCallback?r.valueCallback(s):s,rest:n.slice(o.length)}}),era:Xd({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:Xd({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:Xd({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:Xd({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:Xd({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 Kd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Td(e);return Sd(t,-n)}function Qd(t,e){for(var n=t<0?"-":"",r=Math.abs(t).toString();r.length<e;)r="0"+r;return n+r}var Jd=function(t,e){var n=t.getUTCFullYear(),r=n>0?n:1-n;return Qd("yy"===e?r%100:r,e.length)},tp=function(t,e){var n=t.getUTCMonth();return"M"===e?String(n+1):Qd(n+1,2)},ep=function(t,e){return Qd(t.getUTCDate(),e.length)},np=function(t,e){return Qd(t.getUTCHours()%12||12,e.length)},rp=function(t,e){return Qd(t.getUTCHours(),e.length)},ip=function(t,e){return Qd(t.getUTCMinutes(),e.length)},op=function(t,e){return Qd(t.getUTCSeconds(),e.length)},ap=function(t,e){var n=e.length,r=t.getUTCMilliseconds();return Qd(Math.floor(r*Math.pow(10,n-3)),e.length)};function sp(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 up(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=sp(r),o=new Date(0);o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0);var a=sp(o);return e.getTime()>=i.getTime()?n+1:e.getTime()>=a.getTime()?n:n-1}function lp(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=up(t),n=new Date(0);n.setUTCFullYear(e,0,4),n.setUTCHours(0,0,0,0);var r=sp(n);return r}function cp(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=e||{},r=n.locale,i=r&&r.options&&r.options.weekStartsOn,o=null==i?0:Td(i),a=null==n.weekStartsOn?o:Td(n.weekStartsOn);if(!(a>=0&&a<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=Ed(t),u=s.getUTCDay(),l=(u<a?7:0)+u-a;return s.setUTCDate(s.getUTCDate()-l),s.setUTCHours(0,0,0,0),s}function hp(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||{},o=i.locale,a=o&&o.options&&o.options.firstWeekContainsDate,s=null==a?1:Td(a),u=null==i.firstWeekContainsDate?s:Td(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=cp(l,e),h=new Date(0);h.setUTCFullYear(r,0,u),h.setUTCHours(0,0,0,0);var f=cp(h,e);return n.getTime()>=c.getTime()?r+1:n.getTime()>=f.getTime()?r:r-1}function fp(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=e||{},r=n.locale,i=r&&r.options&&r.options.firstWeekContainsDate,o=null==i?1:Td(i),a=null==n.firstWeekContainsDate?o:Td(n.firstWeekContainsDate),s=hp(t,e),u=new Date(0);u.setUTCFullYear(s,0,a),u.setUTCHours(0,0,0,0);var l=cp(u,e);return l}var dp="midnight",pp="noon",gp="morning",vp="afternoon",mp="evening",yp="night",_p={G:function(t,e,n){var r=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if("yo"===e){var r=t.getUTCFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return Jd(t,e)},Y:function(t,e,n,r){var i=hp(t,r),o=i>0?i:1-i;return"YY"===e?Qd(o%100,2):"Yo"===e?n.ordinalNumber(o,{unit:"year"}):Qd(o,e.length)},R:function(t,e){return Qd(up(t),e.length)},u:function(t,e){return Qd(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 Qd(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 Qd(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 tp(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 Qd(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=cp(n,e).getTime()-fp(n,e).getTime();return Math.round(r/6048e5)+1}(t,r);return"wo"===e?n.ordinalNumber(i,{unit:"week"}):Qd(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=sp(e).getTime()-lp(e).getTime();return Math.round(n/6048e5)+1}(t);return"Io"===e?n.ordinalNumber(r,{unit:"week"}):Qd(r,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):ep(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"}):Qd(r,e.length)},E:function(t,e,n){var r=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){var i=t.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return Qd(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){var i=t.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return Qd(o,e.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(t,e,n){var r=t.getUTCDay(),i=0===r?7:r;switch(e){case"i":return String(i);case"ii":return Qd(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?pp:0===i?dp: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?mp:i>=12?vp:i>=4?gp:yp,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 np(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):rp(t,e)},K:function(t,e,n){var r=t.getUTCHours()%12;return"Ko"===e?n.ordinalNumber(r,{unit:"hour"}):Qd(r,e.length)},k:function(t,e,n){var r=t.getUTCHours();return 0===r&&(r=24),"ko"===e?n.ordinalNumber(r,{unit:"hour"}):Qd(r,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):ip(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):op(t,e)},S:function(t,e){return ap(t,e)},X:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();if(0===i)return"Z";switch(e){case"X":return xp(i);case"XXXX":case"XX":return wp(i);case"XXXXX":case"XXX":default:return wp(i,":")}},x:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"x":return xp(i);case"xxxx":case"xx":return wp(i);case"xxxxx":case"xxx":default:return wp(i,":")}},O:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+bp(i,":");case"OOOO":default:return"GMT"+wp(i,":")}},z:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+bp(i,":");case"zzzz":default:return"GMT"+wp(i,":")}},t:function(t,e,n,r){var i=r._originalDate||t;return Qd(Math.floor(i.getTime()/1e3),e.length)},T:function(t,e,n,r){return Qd((r._originalDate||t).getTime(),e.length)}};function bp(t,e){var n=t>0?"-":"+",r=Math.abs(t),i=Math.floor(r/60),o=r%60;if(0===o)return n+String(i);var a=e||"";return n+String(i)+a+Qd(o,2)}function xp(t,e){return t%60==0?(t>0?"-":"+")+Qd(Math.abs(t)/60,2):wp(t,e)}function wp(t,e){var n=e||"",r=t>0?"-":"+",i=Math.abs(t);return r+Qd(Math.floor(i/60),2)+n+Qd(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 Tp(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 Op={p:Tp,P:function(t,e){var n,r=t.match(/(P+)(p+)?/),i=r[1],o=r[2];if(!o)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}}",Tp(o,e))}},Sp=["D","DD"],Mp=["YY","YYYY"];function Ap(t){return-1!==Sp.indexOf(t)}function Cp(t){return-1!==Mp.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,Dp=/^'([^]*?)'?$/,Rp=/''/g,Ip=/[a-zA-Z]/;function Np(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=String(e),i=n||{},o=i.locale||Zd,a=o.options&&o.options.firstWeekContainsDate,s=null==a?1:Td(a),u=null==i.firstWeekContainsDate?s:Td(i.firstWeekContainsDate);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var l=o.options&&o.options.weekStartsOn,c=null==l?0:Td(l),h=null==i.weekStartsOn?c:Td(i.weekStartsOn);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!o.localize)throw new RangeError("locale must contain localize property");if(!o.formatLong)throw new RangeError("locale must contain formatLong property");var f=Ed(t);if(!Ud(f))throw new RangeError("Invalid time value");var d=Ad(f),p=Kd(f,d),g={firstWeekContainsDate:u,weekStartsOn:h,locale:o,_originalDate:f},v=r.match(Lp).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,Op[e])(t,o.formatLong,g):t})).join("").match(kp).map((function(t){if("''"===t)return"'";var e=t[0];if("'"===e)return Up(t);var n=_p[e];if(n)return!i.useAdditionalWeekYearTokens&&Cp(t)&&Pp(t),!i.useAdditionalDayOfYearTokens&&Ap(t)&&Pp(t),n(p,t,o.localize,g);if(e.match(Ip))throw new RangeError("Format string contains an unescaped latin alphabet character `"+e+"`");return t})).join("");return v}function Up(t){return t.match(Dp)[1].replace(Rp,"'")}function jp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Td(e);return Od(t,-n)}function Hp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Td(e);return Md(t,-n)}function Vp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Td(e);return kd(t,-n)}function Gp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Td(e);return Dd(t,-n)}function Bp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Td(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=Td(e);return Id(t,-n)}var zp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.scaleTypes={top:null,right:null,bottom:null,left:null},e.scales={top:null,right:null,bottom:null,left:null},e}return n(e,t),e.prototype.getDomainAxisPosition=function(){return this.domainAxisPosition},e.prototype.getRangeAxisPosition=function(){return this.rangeAxisPosition},e.prototype.update=function(t){var e=this;this.findDomainAndRangeAxes(),this.determineOrientation(),Object.keys(b).map((function(t){return b[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!==b.LEFT&&this.rangeAxisPosition!==b.RIGHT||this.domainAxisPosition!==b.BOTTOM&&this.domainAxisPosition!==b.TOP?this.orientation=w.HORIZONTAL:this.orientation=w.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.getDomainScale=function(){return this.scales[this.domainAxisPosition]},e.prototype.getRangeScale=function(){return this.scales[this.rangeAxisPosition]},e.prototype.getMainXAxisPosition=function(){var t=[b.BOTTOM,b.TOP];return[this.domainAxisPosition,this.rangeAxisPosition].find((function(e){return t.indexOf(e)>-1}))},e.prototype.getMainYAxisPosition=function(){var t=[b.LEFT,b.RIGHT];return[this.domainAxisPosition,this.rangeAxisPosition].find((function(e){return t.indexOf(e)>-1}))},e.prototype.getMainXScale=function(){return this.scales[this.getMainXAxisPosition()]},e.prototype.getMainYScale=function(){return this.scales[this.getMainYAxisPosition()]},e.prototype.getValueFromScale=function(t,e,n){var r=this.model.getOptions(),i=$r.getProperty(r,"axes",t),o=this.scaleTypes[t],a=this.scales[t],s=i.mapsTo,u=void 0!==e[s]?e[s]:e;return o===E.LABELS?a(u)+a.step()/2:o===E.TIME?a(new Date(u)):a(u)},e.prototype.getDomainValue=function(t,e){return this.getValueFromScale(this.domainAxisPosition,t,e)},e.prototype.getRangeValue=function(t,e){return this.getValueFromScale(this.rangeAxisPosition,t,e)},e.prototype.getDomainIdentifier=function(){var t=this.model.getOptions();return $r.getProperty(t,"axes",this.domainAxisPosition).mapsTo},e.prototype.getRangeIdentifier=function(){var t=this.model.getOptions();return $r.getProperty(t,"axes",this.rangeAxisPosition).mapsTo},e.prototype.getDataFromDomain=function(t){var e=this.model.getDisplayData(),n=this.getDomainIdentifier();return this.scaleTypes[this.domainAxisPosition]===E.TIME?e.filter((function(e){var r=e[n];return"string"!=typeof r&&void 0!==r.getTime||(r=new Date(r)),r.getTime()===t.getTime()})):e.filter((function(e){return e[n]===t}))},e.prototype.extendsDomain=function(t,e){var n=this.model.getOptions();return $r.getProperty(n,"axes",t).scaleType===E.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=Nd(n,r),o=Math.abs(Hd(n,r));n.setFullYear(n.getFullYear()-i*o);var a=Nd(n,r)===-i,s=i*(o-a);return 0===s?0:s}(r,n)>1)return[Fp(n,e),Id(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ed(t),r=Ed(e),i=Nd(n,r),o=Math.abs(jd(n,r));n.setMonth(n.getMonth()-i*o);var a=Nd(n,r)===-i,s=i*(o-a);return 0===s?0:s}(r,n)>1)return[Gp(n,e),Dd(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=Nd(n,r),o=Math.abs(Pd(n,r));n.setDate(n.getDate()-i*o);var a=Nd(n,r)===-i,s=i*(o-a);return 0===s?0:s}(r,n)>1)return[jp(n,e),Od(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Vd(t,e)/36e5;return n>0?Math.floor(n):Math.ceil(n)}(r,n)>1)return[Hp(n,e),Md(r,e)];if(Gd(r,n)>30)return[Vp(n,30*e),kd(r,30*e)];if(Gd(r,n)>1)return[Vp(n,e),kd(r,e)];if(Bd(r,n)>15)return[Bp(n,15*e),Rd(r,15*e)];if(Bd(r,n)>1)return[Bp(n,e),Rd(r,e)];return[n,r]}(e,$r.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,Ii.paddingRatio)},e.prototype.findMainVerticalAxisPosition=function(){var t=this.model.getOptions(),e=$r.getProperty(t,"axes");return null===$r.getProperty(e,b.LEFT)&&null!==$r.getProperty(e,b.RIGHT)||!0===$r.getProperty(e,b.RIGHT,"main")?b.RIGHT:b.LEFT},e.prototype.findMainHorizontalAxisPosition=function(){var t=this.model.getOptions(),e=$r.getProperty(t,"axes");return null===$r.getProperty(e,b.BOTTOM)&&null!==$r.getProperty(e,b.TOP)||!0===$r.getProperty(e,b.TOP,"main")?b.TOP:b.BOTTOM},e.prototype.findDomainAndRangeAxesPositions=function(t,e){var n=this.model.getOptions(),r=$r.getProperty(n,"axes",t),i=$r.getProperty(n,"axes",e),o=r.scaleType||E.LINEAR,a=i.scaleType||E.LINEAR,s={domainAxisPosition:null,rangeAxisPosition:null};return a===E.LABELS||a===E.TIME?(s.domainAxisPosition=e,s.rangeAxisPosition=t):o===E.LABELS||o===E.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=$r.getProperty(e,"axes",t),r=n.includeZero,i=$r.getProperty(n,"scaleType")||E.LINEAR;if(this.model.isDataEmpty())return[];var o,a,s=this.model.getDisplayData(),u=n.mapsTo,l=n.percentage;if(n.domain)return i===E.LABELS?n.domain:this.extendsDomain(t,n.domain);if(l)return[0,100];if(n&&i===E.LABELS)return xo(s,(function(t){return t[u]})).keys();n.stacked?a=this.model.getDataValuesGroupedByKeys().map((function(t){return function(t,e){var n,r=t.length,i=-1,o=0;if(null==e)for(;++i<r;)(n=+t[i])&&(o+=n);else for(;++i<r;)(n=+e(t[i],i,t))&&(o+=n);return o}(function(t){var e=[];for(var n in t)e.push(t[n]);return e}(t))})):a=s.map((function(t){return t[u]}));return i!==E.TIME&&r&&a.push(0),o=lo(a),o=this.extendsDomain(t,o)},e.prototype.createScale=function(t){var e=this.model.getOptions(),n=$r.getProperty(e,"axes",t);if(!n)return null;var r,i=$r.getProperty(n,"scaleType")||E.LINEAR;return this.scaleTypes[t]=i,(r=i===E.TIME?function(){return _o.apply($u(Ts,Es,bs,ys,ms,vs,gs,ps,Is).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}():i===E.LOG?function t(){var e=cs(Ua()).domain([1,10]);return e.copy=function(){return Na(e,t()).base(e.base())},_o.apply(e,arguments),e}().base(n.base||10):i===E.LABELS?Co():ns()).domain(this.getScaleDomain(t)),r},e.prototype.getHighestDomainThreshold=function(){var t=$r.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)!==E.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=$r.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}(Mc);var Wp,Yp,qp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.curveTypes={curveLinear:El,curveLinearClosed:ac,curveBasis:jl,curveBasisClosed:Vl,curveBasisOpen:Bl,curveBundle:zl,curveCardinal:ql,curveCardinalClosed:$l,curveCardinalOpen:Kl,curveCatmullRom:tc,curveCatmullRomClosed:nc,curveCatmullRomOpen:ic,curveMonotoneX:pc,curveMonotoneY:gc,curveNatural:yc,curveStep:bc,curveStepAfter:wc,curveStepBefore:xc},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}(Mc),Xp=function(){function t(t,e,n){this.configs={},this.model=t,this.services=e,n&&(this.configs=n),this.parent||this.setParent(Uh(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=$r.getProperty(this.model.getOptions(),"style","prefix");this.parent.classed(Vh.prefix+"--"+n+"--"+this.type,!0),e&&e.classed(Vh.prefix+"--"+n+"--"+this.type,!1)}},t.prototype.getParent=function(){return this.parent},t.prototype.getContainerSVG=function(){if(this.type){var t=$r.getProperty(this.model.getOptions(),"style","prefix");return cf.appendOrSelect(this.parent,"g."+Vh.prefix+"--"+t+"--"+this.type)}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.GRAPHICS_DOCUMENT),n=this.model.getOptions(),i=$r.getProperty(n,"legend"),o=e.selectAll("g.legend-item").data(this.model.getDataGroups(),(function(t){return t.name})),a=o.enter().append("g").classed("legend-item",!0),s=n.legend.checkbox.radius,u=$r.getProperty(i,"truncation","type"),l=$r.getProperty(i,"truncation","threshold"),c=$r.getProperty(i,"truncation","numCharacter");a.append("rect").classed("checkbox",!0).merge(o.select("rect.checkbox")).attr("width",2*s).attr("height",2*s).attr("rx",1).attr("ry",1).style("fill",(function(e){return e.status===n.legend.items.status.ACTIVE?t.model.getStrokeColor(e.name):null})).classed("active",(function(t,e){return t.status===n.legend.items.status.ACTIVE}));var h=a.append("text").merge(o.select("text"));u!==x.NONE?h.html((function(t){return t.name.length>l?$r.truncateLabel(t.name,u,c):t.name})):h.html((function(t){return t.name})),this.breakItemsIntoLines(a),o.exit().on("mouseover",null).on("click",null).on("mouseout",null).remove();var f=$r.getProperty(this.model.getOptions(),"legend","clickable");e.classed("clickable",f),f&&a.size()>0&&this.addEventListeners()},e.prototype.breakItemsIntoLines=function(t){var e=this,n=this.getContainerSVG(),r=this.model.getOptions(),i=r.legend.checkbox.radius,o=r.legend.items.horizontalSpace,a=r.legend.items.verticalSpace,s=r.legend.items.textYOffset,u=2*i+r.legend.checkbox.spaceAfter,l=r.legend.items.status.DISABLED,c=this.model.getDataGroups().some((function(t){return t.status===l})),h=$r.getProperty(r,"legend","orientation"),f=0,d=0,p=0;t.merge(n.selectAll("g.legend-item")).each((function(t,r){var l=Uh(this),g=Uh(n.selectAll("g.legend-item").nodes()[r-1]);if(0===p||g.empty()||h===M.VERTICAL)h===M.VERTICAL&&0!==r&&d++;else{var v=cf.getSVGElementSize(e.parent,{useAttr:!0}),m=cf.getSVGElementSize(Uh(this).select("text"),{useBBox:!0}),y=cf.getSVGElementSize(g.select("text"),{useBBox:!0});(f=f+y.width+u+o)+u+m.width>v.width&&(d++,f=0,p=0)}l.select("rect.checkbox").attr("x",f).attr("y",0+d*a);var _=s+d*a;l.select("text").attr("x",f+u).attr("y",0+_+2),c&&l.select("g.check").empty()?(l.append("g").classed("check",!0).html('\n\t\t\t\t\t\t\t<svg focusable="false" preserveAspectRatio="xMidYMid meet"\n\t\t\t\t\t\t\t\txmlns="http://www.w3.org/2000/svg" width="32" height="32"\n\t\t\t\t\t\t\t\tviewBox="0 0 32 32" aria-hidden="true"\n\t\t\t\t\t\t\t\tstyle="will-change: transform;">\n\t\t\t\t\t\t\t\t<path d="M13 21.2l-7.1-7.1-1.4 1.4 7.1 7.1L13 24 27.1 9.9l-1.4-1.5z"></path>\n\t\t\t\t\t\t\t\t<title>Checkmark</title>\n\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t'),l.select("g.check svg").attr("width",2*i-1).attr("height",2*i-1).attr("x",parseFloat(l.select("rect.checkbox").attr("x"))+.5).attr("y",parseFloat(l.select("rect.checkbox").attr("y"))+.5)):c||l.select("g.check").empty()||l.select("g.check").remove(),p++}))},e.prototype.addEventListeners=function(){var t=this,e=this.getContainerSVG(),n=this.model.getOptions(),r=$r.getProperty(n,"legend"),i=$r.getProperty(r,"truncation","threshold");e.selectAll("g.legend-item").on("mouseover",(function(){t.services.events.dispatchEvent(U.Legend.ITEM_HOVER,{hoveredElement:Uh(this)});var e=n.legend.checkbox.radius,r=Uh(this);r.append("rect").classed("hover-stroke",!0).attr("x",parseFloat(r.select("rect.checkbox").attr("x"))-2).attr("y",parseFloat(r.select("rect.checkbox").attr("y"))-2).attr("width",2*e+4).attr("height",2*e+4).attr("rx",3).attr("ry",3).lower()})).on("click",(function(){t.services.events.dispatchEvent(U.Legend.ITEM_CLICK,{clickedElement:Uh(this)});var e=Uh(this).datum();t.model.toggleDataLabel(e.name)})).on("mousemove",(function(){var e=Uh(this);e.datum().name.length>i&&t.services.events.dispatchEvent(U.Tooltip.SHOW,{hoveredElement:e,type:O.LEGEND})})).on("mouseout",(function(){var e=Uh(this);e.select("rect.hover-stroke").remove(),t.services.events.dispatchEvent(U.Tooltip.HIDE),t.services.events.dispatchEvent(U.Legend.ITEM_MOUSEOUT,{hoveredElement:e})}))},e}(Xp);!function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(Yp||(Yp={}));var Zp=((Wp={})[Yp.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)}},Wp[Yp.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)}},Wp[Yp.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)}},Wp[Yp.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)}},Wp),Kp="undefined"!=typeof window?window:{innerHeight:0,scrollY:0,innerWidth:0,scrollX:0},Qp=function(){function t(t){void 0===t&&(t={}),this.positions=Zp,this.positions=Object.assign({},Zp,t)}return t.prototype.getRelativeOffset=function(t){for(var e={left:t.offsetLeft,top:t.offsetTop};t.offsetParent&&"static"===getComputedStyle(t.offsetParent).position;)e.left+=t.offsetLeft,e.top+=t.offsetTop,t=t.offsetParent;return e},t.prototype.getAbsoluteOffset=function(t){for(var e=t,n={top:0,left:0};e.offsetParent;){var r=getComputedStyle(e.offsetParent);"static"===r.position&&r.marginLeft&&r.marginTop&&(parseInt(r.marginTop,10)&&(n.top+=parseInt(r.marginTop,10)),parseInt(r.marginLeft,10)&&(n.left+=parseInt(r.marginLeft,10))),e=e.offsetParent}var i=t.getBoundingClientRect(),o=document.body.getBoundingClientRect();return{top:i.top-o.top+n.top,left:i.left-o.left+n.left}},t.prototype.findRelative=function(t,e,n){var r=this.getRelativeOffset(t),i=t.getBoundingClientRect();return this.calculatePosition(r,i,e,n)},t.prototype.findAbsolute=function(t,e,n){var r=this.getAbsoluteOffset(t),i=t.getBoundingClientRect();return this.calculatePosition(r,i,e,n)},t.prototype.findPosition=function(t,e,n,r){void 0===r&&(r=this.getAbsoluteOffset);var i=r(t),o=t.getBoundingClientRect();return this.calculatePosition(i,o,e,n)},t.prototype.findPositionAt=function(t,e,n){return this.calculatePosition(t,{height:0,width:0},e,n)},t.prototype.getPlacementBox=function(t,e){var n=t.offsetHeight+e.top,r=t.offsetWidth+e.left;return{top:e.top,bottom:n,left:e.left,right:r}},t.prototype.addOffset=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),Object.assign({},t,{top:t.top+e,left:t.left+n})},t.prototype.setElement=function(t,e){t.style.top=e.top+"px",t.style.left=e.left+"px"},t.prototype.findBestPlacement=function(t,e,n,r,i){var o=this;void 0===r&&(r=this.defaultContainerFunction),void 0===i&&(i=this.findPosition);var a=n.map((function(n){var a=i(t,e,n),s=o.getPlacementBox(e,a),u=s.bottom-r().height,l=s.right-r().width;u=u<0?e.offsetHeight:u,l=l<0?e.offsetWidth:l;var c=e.offsetHeight*e.offsetWidth,h=c-u*l;return{placement:n,weight:(h=0===h?c:h)/c}}));return a.sort((function(t,e){return e.weight-t.weight})),a[0].placement},t.prototype.findBestPlacementAt=function(t,e,n,r){var i=this;void 0===r&&(r=this.defaultContainerFunction);return this.findBestPlacement(null,e,n,r,(function(e,n,r){return i.findPositionAt(t,n,r)}))},t.prototype.defaultContainerFunction=function(){return{width:Kp.innerHeight-Kp.scrollY,height:Kp.innerWidth-Kp.scrollX}},t.prototype.calculatePosition=function(t,e,n,r){return this.positions[r]?this.positions[r](t,n,e):(console.error("No function found for placement, defaulting to 0,0"),{left:0,top:0})},t}(),Jp=(new Qp,[["15seconds",15e3],["minute",6e4],["30minutes",18e5],["hourly",36e5],["daily",864e5],["monthly",2592e6],["quarterly",7776e6],["yearly",31104e6]]);function tg(t,e,n,r){var i=0===e,o=2===Number(Np(new Date(t),"c")),a=1===Number(Np(new Date(t),"q"));switch(n){case"15seconds":case"minute":case"30minutes":case"hourly":return i||ig(t)||og(t)||ag(t);case"daily":return r?i||o||ag(t):i||og(t)||ag(t);case"monthly":return i||ag(t);case"quarterly":return i||a;case"yearly":return!1;default:throw new Error(n+" is not a valid time interval.")}}function eg(t,e,n,r){var i=r.showDayName,o="daily"===n&&i?"weekly":n,a=new Date(t),s=$r.getProperty(r,"timeIntervalFormats")[o],u=$r.getProperty(s,"primary"),l=$r.getProperty(s,"secondary");return Np(a,tg(t,e,n,i)?u:l,{locale:r.localeObject})}function ng(t){var e=new Date(t);return{M:e.getMonth()+1,d:e.getDate(),H:e.getHours(),m:e.getMinutes(),s:e.getSeconds()}}function rg(t){return 1===t.length?"15seconds":function(t){var e=Jp.reduce((function(e,n,r){n[0];var i=n[1],o=Jp[e][1];return Math.abs(o-t)<Math.abs(i-t)?e:r}),0);return Jp[e][0]}(function(t,e){var n,r,i=t.length,o=-1;if(null==e){for(;++o<i;)if(null!=(n=t[o])&&n>=n)for(r=n;++o<i;)null!=(n=t[o])&&r>n&&(r=n)}else for(;++o<i;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=n;++o<i;)null!=(n=e(t[o],o,t))&&r>n&&(r=n);return r}(function(t){if(t)return t.slice(1).map((function(e,n){return e-t[n]}))}(t)))}function ig(t){var e=ng(t),n=e.s,r=e.m;return 0===e.H&&0===r&&0===n}function og(t){var e=ng(t),n=e.d,r=e.s,i=e.m,o=e.H;return 1===n&&0===o&&0===i&&0===r}function ag(t){var e=ng(t),n=e.M,r=e.d,i=e.s,o=e.m,a=e.H;return 1===n&&1===r&&0===a&&0===o&&0===i}var sg=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="threshold",i.positionService=new Qp,i}return n(e,t),e.prototype.render=function(t){var e=this;void 0===t&&(t=!1);var n=this.configs,r=n.value,i=n.fillColor,o=n.axisPosition,a=n.index,s=$r.getProperty(this.model.getOptions(),"style","prefix");this.thresholdClass=Vh.prefix+"--"+s+"--threshold",this.thresholdIdentifierClass=o+"-"+a,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(o),h=this.services.cartesianScales.getScaleTypeByPosition(o),f=this.services.cartesianScales.getMainXScale(),d=this.services.cartesianScales.getMainYScale(),p=h===E.LABELS,g=f.range(),v=g[0],m=g[1],y=d.range(),_=y[0],b=y[1],x=this.services.cartesianScales,T=x.getOrientation(),O=$r.flipDomainAndRangeBasedOnOrientation((function(t){return x.getDomainValue(t)}),(function(t){return x.getRangeValue(t)}),T),S=O[0],M=O[1];if(T===w.VERTICAL){var A=S(r)+(p?c.step()/2:0);this.threshold.transition(this.services.transitions.getTransition("threshold-update",t)).attr("transform","translate("+A+", "+b+")"),l.attr("y2",_-b),u.attr("width",_-b).classed("rotate",!0)}else{A=M(r)+(p?c.step()/2:0);this.threshold.transition(this.services.transitions.getTransition("threshold-update",t)).attr("transform","translate("+v+", "+A+")"),l.attr("x2",m-v),u.attr("width",m-v)}var C=this;this.services.events.addEventListener(U.Threshold.SHOW,(function(t){t.detail.hoveredElement.node()===C.threshold&&(e.setThresholdLabelPosition(),e.label.classed("hidden",!1))})),this.services.events.addEventListener(U.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)===E.TIME){var i=[b.LEFT,b.RIGHT].includes(n),o=this.services.cartesianScales.getMainXScale(),a=this.services.cartesianScales.getMainYScale(),s=i?a:o,u=$r.getProperty(r,"timeScale");return eg(e,0,rg(s.ticks()),u)}return e.toLocaleString("en")},e.prototype.appendThresholdLabel=function(){var t=this.configs,e=t.value,n=t.valueFormatter,r=t.fillColor,i=t.label,o=void 0===i?"Threshold":i,a=Uh(this.services.domUtils.getHolder()),s=n?n(e):this.getFormattedValue();this.label=cf.appendOrSelect(a,"div."+this.thresholdClass+"--label."+this.thresholdIdentifierClass),this.label.html(o+": "+s).classed("hidden",!0).style("background-color",r)},e.prototype.setThresholdLabelPosition=function(){var t=this.services.domUtils.getHolder(),e=this.label.node(),n=Hh(t),r=this.positionService.findBestPlacementAt({left:n[0],top:n[1]},e,[Yp.RIGHT,Yp.LEFT,Yp.TOP,Yp.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(U.Threshold.SHOW,{hoveredElement:Uh(t.threshold)})})).on("mouseout",(function(){t.threshold.classed("active",!1),t.services.events.dispatchEvent(U.Threshold.HIDE,{hoveredElement:Uh(t.threshold)})}))},e}(Xp),ug=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="title",e}return n(e,t),e.prototype.truncateTitle=function(){var t=cf.getSVGElementSize(this.services.domUtils.getMainSVG(),{useAttr:!0}).width,e=cf.appendOrSelect(this.parent,"text.title");if(!(t<=0)&&e.node().getComputedTextLength()>t){e.append("tspan").text("...");var n=cf.appendOrSelect(e,"tspan").node().getComputedTextLength(),r=Math.floor(t-n),i=this.model.getOptions().title,o=this.getSubstringIndex(e.node(),0,i.length-1,r);e.html(i.substring(0,o-1)).append("tspan").text("...");var a=this;e.on("mouseenter",(function(){a.services.events.dispatchEvent(U.Tooltip.SHOW,{hoveredElement:e,type:O.TITLE})})).on("mouseout",(function(){a.services.events.dispatchEvent(U.Tooltip.HIDE,{hoveredElement:e})}))}},e.prototype.render=function(){var t=this.getContainerSVG();cf.appendOrSelect(t,"text.title").attr("x",0).attr("y",20).html(this.model.getOptions().title),this.truncateTitle()},e.prototype.getSubstringIndex=function(t,e,n,r){var i=Math.floor((n+e)/2);return t.getSubStringLength(0,i)>r?this.getSubstringIndex(t,e,i,r):t.getSubStringLength(0,i)<r?t.getSubStringLength(0,i+1)>r?i:this.getSubstringIndex(t,i,n,r):i},e}(Xp),lg=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="tooltip",i.positionService=new Qp,i.init(),i}return n(e,t),e.prototype.init=function(){var t=this,e=Uh(this.services.domUtils.getHolder()),n=$r.getProperty(this.model.getOptions(),"style","prefix");this.tooltip=cf.appendOrSelect(e,"div."+Vh.prefix+"--"+n+"--tooltip");var r=cf.appendOrSelect(this.tooltip,"div.content-box");this.tooltip.style("max-width",null),this.services.events.addEventListener(U.Tooltip.SHOW,(function(i){if(i.detail.type===O.DATAPOINT&&$r.getProperty(t.model.getOptions(),"tooltip","datapoint","enabled")||i.detail.type===O.GRIDLINE&&$r.getProperty(t.model.getOptions(),"tooltip","gridline","enabled")||i.detail.type===O.LEGEND||i.detail.type===O.AXISLABEL){var o=Uh(Oh.target).datum(),a=void 0;i.detail.multidata?(o=i.detail.multidata,a=t.getMultilineTooltipHTML(o,i.detail.type)):a=t.getTooltipHTML(o,i.detail.type),$r.getProperty(t.model.getOptions(),"tooltip","customHTML")?r.html(t.model.getOptions().tooltip.customHTML(o,a)):r.html(a),t.positionTooltip()}else if(i.detail.type===O.TITLE){var s=cf.appendOrSelect(e,"svg."+Vh.prefix+"--"+n+"--chart-svg"),u=cf.getSVGElementSize(s).width*$r.getProperty(t.model.getOptions(),"tooltip","title","width");t.tooltip.style("max-width",u),r.html(t.getTooltipHTML(i.detail.hoveredElement,O.TITLE));var l=t.getTooltipPosition(i.detail.hoveredElement.node(),i.detail.type);t.positionTooltip(l)}t.tooltip.classed("hidden",!1)})),this.services.events.addEventListener(U.Tooltip.HIDE,(function(){t.tooltip.classed("hidden",!0)}))},e.prototype.getTooltipHTML=function(t,e){if(e===O.TITLE)return'<div class="title-tooltip"><text>'+this.model.getOptions().title+"</text></div>";if(e===O.LEGEND)return'<div class="legend-tooltip"><p class="label">'+t.name+"</p></div>";var n=$r.getProperty(t,"data")?t.data:t,r=this.model.getOptions().data.groupMapsTo,i=this.services.cartesianScales.getRangeIdentifier(),o=$r.getProperty(this.model.getOptions(),"tooltip","valueFormatter")?this.model.getOptions().tooltip.valueFormatter(n[i]):n[i].toLocaleString("en");return'<div class="datapoint-tooltip">\n\t\t\t\t\t<p class="label">'+n[r]+'</p>\n\t\t\t\t\t<p class="value">'+o+"</p>\n\t\t\t\t</div>"},e.prototype.getMultilineTooltipHTML=function(t,e){var n=this;t.sort((function(t,e){return e.value-t.value}));this.services.cartesianScales.getDomainScale().scaleType;return"<ul class='multi-tooltip'>"+t.map((function(t){var e=n.model.getOptions().data.groupMapsTo,r=n.services.cartesianScales.getRangeIdentifier(),i=$r.getProperty(n.model.getOptions(),"tooltip","valueFormatter"),o=i?i(t[r]):t[r].toLocaleString("en");return'\n\t\t\t\t<li>\n\t\t\t\t\t<div class="datapoint-tooltip">\n\t\t\t\t\t\t<a style="background-color:'+n.model.getStrokeColor(t[e])+'" class="tooltip-color"></a>\n\t\t\t\t\t\t<p class="label">'+t[e]+'</p>\n\t\t\t\t\t\t<p class="value">'+o+"</p>\n\t\t\t\t\t</div>\n\t\t\t\t</li>"})).join("")+"</ul>"},e.prototype.render=function(){this.tooltip.classed("hidden",!0)},e.prototype.getTooltipPosition=function(t,e){var n=Uh(this.services.domUtils.getHolder()).node().getBoundingClientRect(),r=t.getBoundingClientRect(),i=this.model.getOptions().tooltip.title.verticalOffset,o={left:r.left-n.left+r.width/2,top:r.top-n.top-i};return{placement:T.BOTTOM,position:o}},e.prototype.positionTooltip=function(t){var e,n=this.services.domUtils.getHolder(),r=this.tooltip.node(),i=Hh(n);if(t){var o=t.placement===T.TOP?Yp.TOP:Yp.BOTTOM;e=this.positionService.findPositionAt(t.position,r,o)}else{var a=this.positionService.findBestPlacementAt({left:i[0],top:i[1]},r,[Yp.RIGHT,Yp.LEFT,Yp.TOP,Yp.BOTTOM],(function(){return{width:n.offsetWidth,height:n.offsetHeight}})),s=this.model.getOptions().tooltip.datapoint.horizontalOffset;a===Yp.LEFT&&(s*=-1),e=this.positionService.findPositionAt({left:i[0]+s,top:i[1]},r,a)}this.positionService.setElement(r,e)},e}(Xp),cg=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.init=function(){var e=this,n=Uh(this.services.domUtils.getHolder()),r=$r.getProperty(this.model.getOptions(),"style","prefix");this.tooltip=cf.appendOrSelect(n,"div."+Vh.prefix+"--"+r+"--tooltip");var i=cf.appendOrSelect(this.tooltip,"div.content-box");this.tooltip.style("max-width",null),this.services.events.addEventListener(U.Tooltip.SHOW,(function(o){if(o.detail.type===O.DATAPOINT&&$r.getProperty(e.model.getOptions(),"tooltip","datapoint","enabled")||o.detail.type===O.GRIDLINE&&$r.getProperty(e.model.getOptions(),"tooltip","gridline","enabled")||o.detail.type===O.LEGEND||o.detail.type===O.AXISLABEL){var a=o.detail.hoveredElement.datum(),s=o.detail.hoveredElement.node(),u=void 0;if(o.detail.multidata?(a=o.detail.multidata,u=e.getMultilineTooltipHTML(a)):(a=o.detail.data?o.detail.data:o.detail.hoveredElement.datum(),u=e.getTooltipHTML(a,o.detail.type)),$r.getProperty(e.model.getOptions(),"tooltip","customHTML")?i.html(e.model.getOptions().tooltip.customHTML(a,u)):i.html(u),o.detail.type===O.LEGEND||o.detail.type===O.AXISLABEL)e.positionTooltip();else{var l=e.getTooltipPosition(s,a);e.positionTooltip(o.detail.multidata?void 0:l)}}else if(o.detail.type===O.TITLE){var c=cf.appendOrSelect(n,"svg."+Vh.prefix+"--"+r+"--chart-svg"),h=cf.getSVGElementSize(c).width*$r.getProperty(e.model.getOptions(),"tooltip","title","width");e.tooltip.style("max-width",h),i.html(t.prototype.getTooltipHTML.call(e,o.detail.hoveredElement,O.TITLE));l=t.prototype.getTooltipPosition.call(e,o.detail.hoveredElement.node(),o.detail.type);e.positionTooltip(l)}e.tooltip.classed("hidden",!1)})),this.services.events.addEventListener(U.Tooltip.HIDE,(function(){e.tooltip.classed("hidden",!0)}))},e.prototype.getTooltipPosition=function(t,e){void 0===e&&(e=Uh(t).datum());var n=Uh(this.services.domUtils.getHolder()).node().getBoundingClientRect(),r=t.getBoundingClientRect(),i=this.model.getOptions().tooltip.datapoint.verticalOffset;if(e.value<=0){var o={left:r.left-n.left+r.width/2,top:r.bottom-n.top+i};return{placement:T.BOTTOM,position:o}}o={left:r.left-n.left+r.width/2,top:r.top-n.top-i};return{placement:T.TOP,position:o}},e.prototype.getTooltipHTML=function(t,e){return e===O.LEGEND?'<div class="legend-tooltip"><p class="label">'+t.name+"</p></div>":e===O.AXISLABEL?'<div class="axis-tooltip"><p class="label">'+t+"</p></div>":'<div class="datapoint-tooltip"><p class="value">'+($r.getProperty(this.model.getOptions(),"tooltip","valueFormatter")?this.model.getOptions().tooltip.valueFormatter(t.value):t.value.toLocaleString("en"))+"</p></div>"},e.prototype.getMultilineTooltipHTML=function(t){var e=this,n=t;n.reverse(),this.services.cartesianScales.getOrientation()===w.VERTICAL&&n.reverse();var r=n.reduce((function(t,e){return t+e.value}),0);return r=$r.getProperty(this.model.getOptions(),"tooltip","valueFormatter")?this.model.getOptions().tooltip.valueFormatter(r):r.toLocaleString("en"),"<ul class='multi-tooltip'>"+n.map((function(t){var n=$r.getProperty(e.model.getOptions(),"tooltip","valueFormatter")?e.model.getOptions().tooltip.valueFormatter(t.value):t.value.toLocaleString("en");return'\n\t\t\t\t<li>\n\t\t\t\t\t<div class="datapoint-tooltip">\n\t\t\t\t\t\t<a style="background-color:'+e.model.getStrokeColor(t.datasetLabel,t.label)+'" class="tooltip-color"></a>\n\t\t\t\t\t\t<p class="label">'+t.datasetLabel+'</p>\n\t\t\t\t\t\t<p class="value">'+n+"</p>\n\t\t\t\t\t</div>\n\t\t\t\t</li>"})).join("")+"<li>\n\t\t\t\t\t<div class='total-val'>\n\t\t\t\t\t\t<p class='label'>Total</p>\n\t\t\t\t\t\t<p class='value'>"+r+"</p>\n\t\t\t\t\t</div>\n\t\t\t\t</li>\n\t\t\t</ul>"},e}(lg),hg=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getTooltipHTML=function(t,e){if(e===O.TITLE)return'<div class="title-tooltip"><text>'+this.model.getOptions().title+"</text></div>";if(e===O.LEGEND)return'<div class="legend-tooltip"><p class="label">'+t.name+"</p></div>";var n=t.data,r=this.model.getOptions().data.groupMapsTo,i=$r.getProperty(this.model.getOptions(),"tooltip","valueFormatter")?this.model.getOptions().tooltip.valueFormatter(n.value):n.value.toLocaleString("en");return'<div class="datapoint-tooltip">\n\t\t\t\t<p class="label">'+n[r]+'</p>\n\t\t\t\t<p class="value">'+i+"</p>\n\t\t\t</div>"},e}(lg),fg=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getTooltipHTML=function(e,n){if(n===O.TITLE)return t.prototype.getTooltipHTML.call(this,e,n);if(n===O.LEGEND)return'<div class="legend-tooltip"><p class="label">'+e.name+"</p></div>";if(n===O.AXISLABEL)return'<div class="axis-tooltip"><p class="label">'+e+"</p></div>";var r=this.model.getOptions().data.groupMapsTo,i=this.services.cartesianScales.getRangeIdentifier(),o=$r.getProperty(this.model.getOptions(),"tooltip","valueFormatter"),a=o?o(e[i]):e[i].toLocaleString("en");return'\n\t\t\t<div class="datapoint-tooltip">\n\t\t\t\t<a style="background-color:'+this.model.getStrokeColor(e[r])+'" class="tooltip-color"></a>\n\t\t\t\t<p class="label">'+e[r]+'</p>\n\t\t\t\t<p class="value">'+a+"</p>\n\t\t\t</div>"},e}(lg),dg=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getMultilineTooltipHTML=function(t,e){var n=this,r=this.model.getOptions(),i=r.data.groupMapsTo,o=r.radar.axes,a=(o.angle,o.value);return t.sort((function(t,e){return e[a]-t[a]})),"<ul class='multi-tooltip'>"+t.map((function(t){var e=$r.getProperty(r,"tooltip","valueFormatter"),o=e?e(t[a]):t[a];return'\n\t\t\t\t<li>\n\t\t\t\t\t<div class="datapoint-tooltip">\n\t\t\t\t\t\t<a style="background-color:'+n.model.getStrokeColor(t[i])+'" class="tooltip-color"></a>\n\t\t\t\t\t\t<p class="label">'+t[i]+'</p>\n\t\t\t\t\t\t<p class="value">'+o+"</p>\n\t\t\t\t\t</div>\n\t\t\t\t</li>"})).join("")+"</ul>"},e}(lg),pg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="area",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?Di.opacity.unselected:Di.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.area").transition(e.services.transitions.getTransition("legend-mouseout-area")).attr("opacity",Di.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(U.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(U.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getContainerSVG(),r=this.services.cartesianScales,i=r.getOrientation(),o=Ml().curve(this.services.curves.getD3Curve());i===w.VERTICAL?o.x((function(t,e){return r.getDomainValue(t,e)})).y0(r.getRangeValue(0)).y1((function(t,e){return r.getRangeValue(t,e)})):o.x0(r.getRangeValue(0)).x1((function(t,e){return r.getRangeValue(t,e)})).y((function(t,e){return r.getDomainValue(t,e)}));var a=this.model.getGroupedData(),s=n.selectAll("path.area").data(a,(function(t){return t.name}));s.exit().attr("opacity",0).remove(),s.enter().append("path").attr("opacity",0).merge(s).attr("fill",(function(t){return e.model.getFillColor(t.name)})).transition(this.services.transitions.getTransition("area-update-enter",t)).attr("opacity",Di.opacity.selected).attr("class","area").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(U.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(U.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Xp),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;e.parent.selectAll("path.area").transition(e.services.transitions.getTransition("legend-hover-area")).attr("opacity",(function(t){return t[0].group!==n.datum().name?Di.opacity.unselected:Di.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.area").transition(e.services.transitions.getTransition("legend-mouseout-area")).attr("opacity",Di.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(U.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(U.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){void 0===t&&(t=!0);var e=this.getContainerSVG(),n=this,i=this.model.getOptions(),o=this.services.cartesianScales.getMainXScale(),a=this.services.cartesianScales.getMainYScale(),s=this.services.cartesianScales.getDomainAxisPosition();if(this.services.cartesianScales.getScaleTypeByPosition(s)===E.TIME){var u=Object.keys(i.axes).some((function(t){return i.axes[t].percentage})),l=this.model.getStackedData({percentage:u}),c=e.selectAll("path.area").data(l,(function(t){return t[0].group}));this.areaGenerator=Ml().x((function(t){return o(new Date(t.data.sharedStackKey))})).y0((function(t){return a(t[0])})).y1((function(t){return a(t[1])})).curve(this.services.curves.getD3Curve()),c.exit().attr("opacity",0).remove(),c.enter().append("path").attr("opacity",0).merge(c).data(l,(function(t){return t[0].group})).attr("fill",(function(t){return n.model.getFillColor(t[0].group)})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","area").transition(this.services.transitions.getTransition("area-update-enter",t)).attr("opacity",Di.opacity.selected).attr("class","area").attr("d",this.areaGenerator)}},e.prototype.destroy=function(){this.parent.selectAll("path.area").on("mouseover",null).on("mousemove",null).on("mouseout",null)},e}(Xp),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(),n=this.services.cartesianScales.getMainXScale();return n.step?Math.min(e.bars.maxWidth,n.step()/2):Math.min(e.bars.maxWidth,5/n.ticks().length*e.bars.maxWidth)},e}(Xp),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(U.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(U.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.model.getOptions().data.groupMapsTo,i=this.getContainerSVG().selectAll("path.bar").data(this.model.getDisplayData(),(function(t){return t[n]}));i.exit().attr("opacity",0).remove(),i.enter().append("path").attr("opacity",0).merge(i).classed("bar",!0).attr("width",this.getBarWidth.bind(this)).transition(this.services.transitions.getTransition("bar-update-enter",t)).attr("fill",(function(t){return e.model.getFillColor(t[n])})).attr("d",(function(t,n){var r=e.getBarWidth(),i=e.services.cartesianScales.getDomainValue(t,n)-r/2,o=i+r,a=e.services.cartesianScales.getRangeValue(0),s=e.services.cartesianScales.getRangeValue(t,n);return $r.generateSVGPathString({x0:i,x1:o,y0:a,y1:s},e.services.cartesianScales.getOrientation())})).attr("opacity",1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t.value})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this.model.getOptions().data.groupMapsTo,e=this;this.parent.selectAll("path.bar").on("mouseover",(function(n){var r=Uh(this);r.classed("hovered",!0),r.transition(e.services.transitions.getTransition("graph_element_mouseover_fill_update")).attr("fill",(function(n){return Yo(e.model.getFillColor(n[t])).darker(.7).toString()})),e.services.events.dispatchEvent(U.Bar.BAR_MOUSEOVER,{element:r,datum:n}),e.services.events.dispatchEvent(U.Tooltip.SHOW,{hoveredElement:r,type:O.DATAPOINT})})).on("mousemove",(function(t){e.services.events.dispatchEvent(U.Bar.BAR_MOUSEMOVE,{element:Uh(this),datum:t})})).on("click",(function(t){e.services.events.dispatchEvent(U.Bar.BAR_CLICK,{element:Uh(this),datum:t})})).on("mouseout",(function(n){var r=Uh(this);r.classed("hovered",!1),r.transition(e.services.transitions.getTransition("graph_element_mouseout_fill_update")).attr("fill",(function(n){return e.model.getFillColor(n[t])})),e.services.events.dispatchEvent(U.Bar.BAR_MOUSEOUT,{element:r,datum:n}),e.services.events.dispatchEvent(U.Tooltip.HIDE,{hoveredElement:r})}))},e.prototype.destroy=function(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(U.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(U.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(U.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(U.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.model.getDisplayData(),i=this.model.getOptions().data.groupMapsTo,o=this.services.cartesianScales.getDomainIdentifier();this.setGroupScale();var a=this.getContainerSVG(),s=xo(n,(function(t){return t[o]})).keys(),u=a.selectAll("g.bars").data(s,(function(t){return t}));u.exit().attr("opacity",0).remove();var l=u.enter().append("g").classed("bars",!0).attr("role",r.GROUP).attr("aria-labelledby",(function(t){return t})).merge(u).attr("transform",(function(t,n){var r=e.services.cartesianScales.getDomainValue(t,n)-e.getGroupWidth()/2;return e.services.cartesianScales.getOrientation()===w.VERTICAL?"translate("+r+", 0)":"translate(0, "+r+")"})).selectAll("path.bar").data((function(t){return e.getDataCorrespondingToLabel(t)}));l.exit().attr("opacity",0).remove(),l.enter().append("path").attr("opacity",0).merge(l).classed("bar",!0).transition(this.services.transitions.getTransition("bar-update-enter",t)).attr("fill",(function(t){return e.model.getFillColor(t[i])})).attr("d",(function(t){var n=e.groupScale(t[i]),r=n,o=n+e.getBarWidth(),a=e.services.cartesianScales.getRangeValue(0),s=e.services.cartesianScales.getRangeValue(t.value);return $r.generateSVGPathString({x0:r,x1:o,y0:a,y1:s},e.services.cartesianScales.getOrientation())})).attr("opacity",1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t.value})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this,e=this.model.getOptions().data.groupMapsTo;this.parent.selectAll("path.bar").on("mouseover",(function(n){var r=Uh(this);r.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")).attr("fill",(function(n){return Yo(t.model.getFillColor(n[e])).darker(.7).toString()})),t.services.events.dispatchEvent(U.Bar.BAR_MOUSEOVER,{element:r,datum:n}),t.services.events.dispatchEvent(U.Tooltip.SHOW,{hoveredElement:r,type:O.DATAPOINT})})).on("mousemove",(function(e){t.services.events.dispatchEvent(U.Bar.BAR_MOUSEMOVE,{element:Uh(this),datum:e})})).on("click",(function(e){t.services.events.dispatchEvent(U.Bar.BAR_CLICK,{element:Uh(this),datum:e})})).on("mouseout",(function(e){var n=Uh(this);n.classed("hovered",!1);var r=t.model.getOptions().data.groupMapsTo;n.transition(t.services.transitions.getTransition("graph_element_mouseout_fill_update")).attr("fill",(function(e){return t.model.getFillColor(e[r])})),t.services.events.dispatchEvent(U.Bar.BAR_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(U.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(U.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(U.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=$r.getProperty(t,"bars","width"),n=$r.getProperty(t,"bars","maxWidth");if(null!==e){if(null===n)return e;if(e<=n)return e}var r=this.model.getActiveDataGroupNames().length,i=this.getTotalGroupPadding(),o=this.services.cartesianScales.getDomainScale();return Math.min(n,(o.step()-i)/r)},e.prototype.setGroupScale=function(){this.groupScale=Co().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(U.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(U.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.getContainerSVG(),i=this.model.getDisplayData(),o=this.model.getOptions(),a=o.data.groupMapsTo,s=this.services.cartesianScales.getDomainIdentifier(),u=xo(i,(function(t){return t[s]})).keys(),l=this.model.getStackedData(),c=n.selectAll("g.bars").data(l,(function(t){return t.key}));c.exit().attr("opacity",0).remove(),c.enter().append("g").classed("bars",!0).attr("role",r.GROUP);var h=n.selectAll("g.bars").selectAll("path.bar").data((function(t){return t}));h.exit().remove(),h.enter().append("path").merge(h).classed("bar",!0).transition(this.services.transitions.getTransition("bar-update-enter",t)).attr("fill",(function(t){return e.model.getFillColor(t[a])})).attr("d",(function(t,n){var r=u[n],i=e.getBarWidth(),a=e.services.cartesianScales.getDomainValue(r,n)-i/2,s=a+i,l=e.services.cartesianScales.getRangeValue(t[0],n),c=e.services.cartesianScales.getRangeValue(t[1],n);return Math.abs(c-l)>0&&Math.abs(c-l)>o.bars.dividerSize&&(e.services.cartesianScales.getOrientation()===w.VERTICAL?c+=1:c-=1),$r.generateSVGPathString({x0:a,x1:s,y0:l,y1:c},e.services.cartesianScales.getOrientation())})).attr("opacity",1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t.value})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this.model.getOptions().data.groupMapsTo,e=this;this.parent.selectAll("path.bar").on("mouseover",(function(n){var r=Uh(this);r.transition(e.services.transitions.getTransition("graph_element_mouseover_fill_update")).attr("fill",(function(n){return Yo(e.model.getFillColor(n[t])).darker(.7).toString()})),e.services.events.dispatchEvent(U.Bar.BAR_MOUSEOVER,{element:r,datum:n})})).on("mousemove",(function(t){var n,r=e.model.getDisplayData(),i=Uh(this),o=e.services.cartesianScales.getDomainIdentifier(),a=e.services.cartesianScales.getRangeIdentifier(),s=e.model.getOptions().data.groupMapsTo,u=r.find((function(e){return e[a]===t.data[t.group]&&e[o].toString()===t.data.sharedStackKey&&e[s]===t.group}));void 0===u&&((n={})[o]=t.data.sharedStackKey,n[a]=t.data[t.group],n[s]=t.group,u=n),e.services.events.dispatchEvent(U.Tooltip.SHOW,{hoveredElement:i,data:u,type:O.DATAPOINT})})).on("click",(function(t){e.services.events.dispatchEvent(U.Bar.BAR_CLICK,{element:Uh(this),datum:t})})).on("mouseout",(function(n){var r=Uh(this);r.classed("hovered",!1),r.transition(e.services.transitions.getTransition("graph_element_mouseout_fill_update")).attr("fill",(function(n){return e.model.getFillColor(n[t])})),e.services.events.dispatchEvent(U.Bar.BAR_MOUSEOUT,{element:r,datum:n}),e.services.events.dispatchEvent(U.Tooltip.HIDE,{hoveredElement:r})}))},e.prototype.destroy=function(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(U.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(U.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(U.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(U.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),this.configs.fadeInOnChartHolderMouseover&&(t.addEventListener(U.Chart.MOUSEOVER,this.handleChartHolderOnHover),t.addEventListener(U.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut))},e.prototype.render=function(t){var e,n=this.getContainerSVG(),r=this.model.getOptions(),i=r.data.groupMapsTo,o=this.services.cartesianScales.getDomainIdentifier(),a=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[a]&&null!==t[a]}));var u=n.selectAll("circle.dot").data(e,(function(t){return t[i]+"-"+t[o]}));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=$r.flipDomainAndRangeBasedOnOrientation(this.services.cartesianScales.getHighestDomainThreshold(),this.services.cartesianScales.getHighestRangeThreshold(),r),o=i[0],a=i[1],s=$r.flipDomainAndRangeBasedOnOrientation((function(t,e){return n.getDomainValue(t,e)}),(function(t,e){return n.getRangeValue(t,e)}),r),u=s[0],l=s[1],c=u(t,e),h=l(t,e);return a&&o?h<=a.scaleValue&&c>=o.scaleValue:a?h<=a.scaleValue:o?c>=o.scaleValue:void 0},e.prototype.styleCircles=function(t,e){var n=this,i=this.model.getOptions(),o=i.points.filled,a=this.services,s=a.cartesianScales,u=a.transitions,l=i.data.groupMapsTo,c=s.getDomainIdentifier(),h=s.getRangeIdentifier(),f=$r.flipDomainAndRangeBasedOnOrientation((function(t,e){return s.getDomainValue(t,e)}),(function(t,e){return s.getRangeValue(t,e)}),s.getOrientation()),d=f[0],p=f[1],g=this.configs.fadeInOnChartHolderMouseover;t.raise().classed("dot",!0).classed("threshold-anomaly",(function(t,e){return n.isDatapointThresholdAnomaly(t,e)})).classed("filled",(function(t){return n.model.getIsFilled(t[l],t[c],t,o)})).classed("unfilled",(function(t){return!n.model.getIsFilled(t[l],t[c],t,o)})).transition(u.getTransition("scatter-update-enter",e)).attr("cx",d).attr("cy",p).attr("r",i.points.radius).attr("fill",(function(t){if(n.model.getIsFilled(t[l],t[c],t,o))return n.model.getFillColor(t[l],t[c],t)})).attr("fill-opacity",o?.2:1).attr("stroke",(function(t){return n.model.getStrokeColor(t[l],t[c],t)})).attr("opacity",g?0:1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","point").attr("aria-label",(function(t){return t[h]})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this,e=this.model.getOptions().data.groupMapsTo,n=this.services.cartesianScales.getDomainIdentifier();this.parent.selectAll("circle").on("mouseover mousemove",(function(r){var i=Uh(this);i.classed("hovered",!0).style("fill",(function(r){return t.model.getFillColor(r[e],r[n],r)}));var o=t.services.cartesianScales.getDomainValue(r),a=t.services.cartesianScales.getRangeValue(r),s=t.model.getDisplayData().filter((function(e){return o===t.services.cartesianScales.getDomainValue(e)&&a===t.services.cartesianScales.getRangeValue(e)}));t.services.events.dispatchEvent(U.Tooltip.SHOW,{hoveredElement:i,multidata:s.length>1?s:null,type:O.DATAPOINT});var u="mouseover"===Oh.type?U.Scatter.SCATTER_MOUSEOVER:U.Scatter.SCATTER_MOUSEMOVE;t.services.events.dispatchEvent(u,{element:i,datum:r})})).on("click",(function(e){t.services.events.dispatchEvent(U.Scatter.SCATTER_CLICK,{element:Uh(this),datum:e})})).on("mouseout",(function(e){var n=Uh(this);n.classed("hovered",!1),t.configs.filled||n.style("fill",null),t.services.events.dispatchEvent(U.Scatter.SCATTER_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(U.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(U.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(U.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),t.removeEventListener(U.Chart.MOUSEOVER,this.handleChartHolderOnHover),t.removeEventListener(U.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut)},e}(Xp),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})),o=cf.getSVGElementSize(this.services.domUtils.getMainSVG(),{useAttr:!0}),a=i.length>0,s=a?lo(i):[1,1];return ns().domain(s).range(a?e.bubble.radiusRange(o,r):[4,4])},e.prototype.styleCircles=function(t,e){var n=this,i=this.model.getOptions(),o=i.bubble.radiusMapsTo,a=this.getRadiusScale(t),s=i.data.groupMapsTo,u=this.services.cartesianScales.getDomainIdentifier();t.raise().classed("dot",!0).attr("role",r.GRAPHICS_SYMBOL).attr("cx",(function(t,e){return n.services.cartesianScales.getDomainValue(t,e)})).transition(this.services.transitions.getTransition("bubble-update-enter",e)).attr("cy",(function(t,e){return n.services.cartesianScales.getRangeValue(t,e)})).attr("r",(function(t){return a(t[o]||1)})).attr("fill",(function(t){return n.model.getFillColor(t[s],t[u],t)})).attr("fill-opacity",i.bubble.fillOpacity).attr("stroke",(function(t){return n.model.getStrokeColor(t[s],t[u],t)})).attr("opacity",1)},e}(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?Li.opacity.unselected:Li.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.line").transition(e.services.transitions.getTransition("legend-mouseout-line")).attr("opacity",Li.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(U.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(U.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getContainerSVG(),i=this.services,o=i.cartesianScales,a=i.curves,s=$r.flipDomainAndRangeBasedOnOrientation((function(t,e){return o.getDomainValue(t,e)}),(function(t,e){return o.getRangeValue(t,e)}),o.getOrientation()),u=s[0],l=s[1],c=this.model.getOptions(),h=Sl().x(u).y(l).curve(a.getD3Curve()).defined((function(t,e){var n=t[o.getRangeIdentifier()];return null!=n})),f=[];if(this.configs.stacked){var d=Object.keys(c.axes).some((function(t){return c.axes[t].percentage}));f=this.model.getStackedData({percentage:d}).map((function(t){return{name:t[0].group,data:t.map((function(t){return{date:t.data.sharedStackKey,group:t.group,value:t[1]}})),hidden:!$r.some(t,(function(t){return t[0]!==t[1]}))}}))}else f=this.model.getGroupedData();var p=n.selectAll("path.line").data(f,(function(t){return t.name}));p.exit().attr("opacity",0).remove(),p.enter().append("path").classed("line",!0).attr("opacity",0).merge(p).data(f,(function(t){return t.name})).attr("stroke",(function(t,n){return e.model.getStrokeColor(t.name)})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","line").attr("aria-label",(function(t){var n=t.data,r=e.services.cartesianScales.getRangeIdentifier();return n.map((function(t){return t[r]})).join(",")})).transition(this.services.transitions.getTransition("line-update-enter",t)).attr("opacity",(function(t){return t.hidden?0:1})).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(U.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(U.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Xp),Eg=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.getContainerSVG(),n=this.model.getOptions(),i=n.data.groupMapsTo,o=this.services.cartesianScales.getDomainIdentifier(),a=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].group}));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[o]=t.data.sharedStackKey,e[a]=t[1],e}));this.styleCircles(h,t),this.addEventListeners()},e}(bg);function Tg(t,e){var n=this,r=ma(this._current,t);return function(t){return n._current=r(t),e(n._current)}}var Og=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="pie",e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.model.getOptions().data.groupMapsTo;e.parent.selectAll("path.slice").transition(e.services.transitions.getTransition("legend-hover-bar")).attr("opacity",(function(t){return t.data[r]!==n.datum().name?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.slice").transition(e.services.transitions.getTransition("legend-mouseout-bar")).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(U.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(U.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.getInnerRadius=function(){return this.model.getOptions().pie.innerRadius},e.prototype.render=function(t){void 0===t&&(t=!0);var e=this,n=this.getContainerSVG(),i=this.model.getDisplayData(),o=this.model.getOptions(),a=o.data.groupMapsTo,s=this.computeRadius();this.arc=xl().innerRadius(this.getInnerRadius()).outerRadius(s),this.hoverArc=xl().innerRadius(this.getInnerRadius()).outerRadius(s+o.pie.hoverArc.outerRadiusOffset);var u=function(){var t=Cl,e=Al,n=null,r=el(0),i=el(hl),o=el(0);function a(a){var s,u,l,c,h,f=a.length,d=0,p=new Array(f),g=new Array(f),v=+r.apply(this,arguments),m=Math.min(hl,Math.max(-hl,i.apply(this,arguments)-v)),y=Math.min(Math.abs(m)/f,o.apply(this,arguments)),_=y*(m<0?-1:1);for(s=0;s<f;++s)(h=g[p[s]=s]=+t(a[s],s,a))>0&&(d+=h);for(null!=e?p.sort((function(t,n){return e(g[t],g[n])})):null!=n&&p.sort((function(t,e){return n(a[t],a[e])})),s=0,l=d?(m-f*_)/d:0;s<f;++s,v=c)u=p[s],c=v+((h=g[u])>0?h*l:0)+_,g[u]={data:a[u],index:s,value:h,startAngle:v,endAngle:c,padAngle:y};return g}return a.value=function(e){return arguments.length?(t="function"==typeof e?e:el(+e),a):t},a.sortValues=function(t){return arguments.length?(e=t,n=null,a):e},a.sort=function(t){return arguments.length?(n=t,e=null,a):n},a.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:el(+t),a):r},a.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:el(+t),a):i},a.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:el(+t),a):o},a}().value((function(t){return t.value})).sort(null).padAngle(o.pie.padAngle)(i).sort((function(t,e){return t.index-e.index})),l=cf.appendOrSelect(n,"g.slices").attr("role",r.GROUP).selectAll("path.slice").data(u,(function(t){return t.data[a]}));l.exit().attr("opacity",0).remove(),l.enter().append("path").classed("slice",!0).attr("opacity",0).merge(l).attr("fill",(function(t){return e.model.getFillColor(t.data[a])})).attr("d",this.arc).transition(this.services.transitions.getTransition("pie-slice-enter-update",t)).attr("opacity",1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","slice").attr("aria-label",(function(t){return t.value+", "+$r.convertValueToPercentage(t.data.value,i)+"%"})).attrTween("d",(function(t){return Tg.bind(this)(t,e.arc)}));var c=u.filter((function(t){return t.value>0})),h=cf.appendOrSelect(n,"g.labels").attr("role",r.GROUP).selectAll("text.pie-label").data(c,(function(t){return t.data[a]}));h.exit().attr("opacity",0).remove();var f=h.enter().append("text").classed("pie-label",!0),d=[];f.merge(h).style("text-anchor","middle").text((function(t){return o.pie.labels.formatter?o.pie.labels.formatter(t):$r.convertValueToPercentage(t.data.value,i)+"%"})).datum((function(t){var e=s+7,n=(t.endAngle-t.startAngle)/2+t.startAngle,r=n/Math.PI*180,i=this.getComputedTextLength();return t.textOffsetX=i/2,t.textOffsetY=r>90&&r<270?10:0,t.xPosition=(t.textOffsetX+e)*Math.sin(n),t.yPosition=(t.textOffsetY+e)*-Math.cos(n),t})).attr("transform",(function(t,e){var n=c.length,r=(t.endAngle-t.startAngle)*(180/Math.PI);if(e>=n-2&&r<o.pie.callout.minSliceDegree){var i=void 0,a=void 0;return t.index===n-1?(i=t.xPosition+o.pie.callout.offsetX+o.pie.callout.textMargin+t.textOffsetX,a=t.yPosition-o.pie.callout.offsetY,t.direction=P.RIGHT,d.push(t)):(i=t.xPosition-o.pie.callout.offsetX-t.textOffsetX-o.pie.callout.textMargin,a=t.yPosition-o.pie.callout.offsetY,t.direction=P.LEFT,d.push(t)),"translate("+i+", "+a+")"}return"translate("+t.xPosition+", "+t.yPosition+")"})),this.renderCallouts(d);var p=s+o.pie.xOffset,g=s+o.pie.yOffset;d.length>0&&(g+=o.pie.yOffsetCallout),n.attr("transform","translate("+p+", "+g+")"),this.addEventListeners()},e.prototype.renderCallouts=function(t){var e=cf.appendOrSelect(this.getContainerSVG(),"g.callouts").attr("role",r.GROUP),n=this.model.getOptions(),i=e.selectAll("g.callout").data(t);i.exit().remove();var o=i.enter().append("g").classed("callout",!0).attr("role",r.GRAPHICS_SYMBOL+" "+r.GROUP).attr("aria-roledescription","label callout");o.merge(i).datum((function(t){var e=t.xPosition,r=t.yPosition;return t.direction===P.RIGHT?(t.startPos={x:e,y:r+t.textOffsetY},t.endPos={x:e+n.pie.callout.offsetX,y:r-n.pie.callout.offsetY+t.textOffsetY},t.intersectPointX=t.endPos.x-n.pie.callout.horizontalLineLength):(t.startPos={x:e,y:r+t.textOffsetY},t.endPos={x:e-n.pie.callout.offsetX,y:r-n.pie.callout.offsetY+t.textOffsetY},t.intersectPointX=t.endPos.x+n.pie.callout.horizontalLineLength),t})),o.append("line").classed("vertical-line",!0).merge(e.selectAll("line.vertical-line")).datum((function(t){return Uh(this.parentNode).datum()})).style("stroke-width","1px").attr("x1",(function(t){return t.startPos.x})).attr("y1",(function(t){return t.startPos.y})).attr("x2",(function(t){return t.intersectPointX})).attr("y2",(function(t){return t.endPos.y})),o.append("line").classed("horizontal-line",!0).merge(e.selectAll("line.horizontal-line")).datum((function(t){return Uh(this.parentNode).datum()})).style("stroke-width","1px").attr("x1",(function(t){return t.intersectPointX})).attr("y1",(function(t){return t.endPos.y})).attr("x2",(function(t){return t.endPos.x})).attr("y2",(function(t){return t.endPos.y}))},e.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("path.slice").on("mouseover",(function(e){t.services.events.dispatchEvent(U.Pie.SLICE_MOUSEOVER,{element:Uh(this),datum:e})})).on("mousemove",(function(e){var n=Uh(this);n.classed("hovered",!0).transition(t.services.transitions.getTransition("pie_slice_mouseover")).attr("d",t.hoverArc),t.services.events.dispatchEvent(U.Pie.SLICE_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(U.Tooltip.SHOW,{hoveredElement:n,type:O.DATAPOINT})})).on("click",(function(e){t.services.events.dispatchEvent(U.Pie.SLICE_CLICK,{element:Uh(this),datum:e})})).on("mouseout",(function(e){var n=Uh(this);n.classed("hovered",!1).transition(t.services.transitions.getTransition("pie_slice_mouseover")).attr("d",t.arc),t.services.events.dispatchEvent(U.Pie.SLICE_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(U.Tooltip.HIDE,{hoveredElement:n})}))},e.prototype.computeRadius=function(){var t=this.model.getOptions(),e=cf.getSVGElementSize(this.parent,{useAttrs:!0}),n=e.width,r=e.height;return Math.min(n,r)/2+t.pie.radiusOffset},e}(Xp),Sg=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 $r.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 $r.getProperty(t,"gauge","type")===R.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($r.getProperty(e,"gauge","deltaArrow","direction")){case I.UP:return"4,10 8,6 12,10";case I.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().data.groupMapsTo,o=this.getValue(),a=this.getValueRatio(),s=this.getArcSize(),u=this.getStartAngle(),l=u+a*s,c=u+s,h=this.computeRadius(),f=this.getInnerRadius();this.backgroundArc=xl().innerRadius(f).outerRadius(h).startAngle(l).endAngle(c),this.arc=xl().innerRadius(f).outerRadius(h).startAngle(u).endAngle(l),cf.appendOrSelect(n,"path.arc-background").attr("d",this.backgroundArc).attr("role",r.GROUP);var d=n.selectAll("path.arc-foreground").data([o]);d.enter().append("path").attr("class","arc-foreground").merge(d).attr("d",this.arc).attr("fill",(function(t){return e.model.getFillColor(t[i])})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","value").attr("aria-label",(function(t){return t.value})),n.attr("transform","translate("+h+", "+h+")"),this.drawValueNumber(),this.drawDelta(),d.exit().remove(),this.addEventListeners()},e.prototype.drawValueNumber=function(){var t=this.getContainerSVG(),e=this.model.getOptions(),n=$r.getProperty(e,"gauge","type"),r=this.getValue(),i=this.getDelta(),o=this.computeRadius(),a=$r.getProperty(e,"gauge","valueFontSize"),s=$r.getProperty(e,"gauge","deltaFontSize"),u=$r.getProperty(e,"gauge","numberSpacing"),l=0;n!==R.FULL||i?n===R.SEMI&&i&&(l=-(s(o)+u)):l=s(o);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=$r.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",a(o)+"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",a(o)/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?$r.getProperty(e,"gauge","deltaFontSize"):function(){return 0},o=n?$r.getProperty(e,"gauge","numberFormatter"):function(){return null},a=$r.getProperty(e,"gauge","deltaArrow","size"),s=$r.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 o(t)+"%"}));var h=cf.getSVGElementSize(cf.appendOrSelect(t,".gauge-delta-number"),{useBBox:!0}).width,f=$r.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",-a(r)-h/2).attr("y",-a(r)/2-.35*i(r)).attr("width",a(r)).attr("height",a(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=$r.getProperty(e,"gauge","status");cf.appendOrSelect(d,"polygon.gauge-delta-arrow").classed("status--"+p,null!==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()-$r.getProperty(this.model.getOptions(),"gauge","arcWidth")},e.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("path.arc").on("mouseover",(function(e){t.services.events.dispatchEvent(U.Gauge.ARC_MOUSEOVER,{element:Uh(this),datum:e})})).on("mousemove",(function(e){var n=Uh(this);t.services.events.dispatchEvent(U.Gauge.ARC_MOUSEMOVE,{element:n,datum:e})})).on("click",(function(e){t.services.events.dispatchEvent(U.Gauge.ARC_CLICK,{element:Uh(this),datum:e})})).on("mouseout",(function(e){var n=Uh(this);t.services.events.dispatchEvent(U.Gauge.ARC_MOUSEOUT,{element:n,datum:e})}))},e.prototype.computeRadius=function(){var t=this.model.getOptions(),e=$r.getProperty(t,"gauge","type"),n=cf.getSVGElementSize(this.parent,{useAttrs:!0}),r=n.width,i=n.height;return e===R.SEMI?Math.min(r/2,i):Math.min(r/2,i/2)},e}(Xp),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=cf.appendOrSelect(this.getContainerSVG(),"g.center"),i=this.model.getOptions(),o=this.computeRadius();cf.appendOrSelect(r,"text.donut-figure").attr("text-anchor","middle").style("font-size",(function(){return i.donut.center.numberFontSize(o)})).transition(this.services.transitions.getTransition("donut-figure-enter-update",e)).tween("text",(function(){return n.centerNumberTween(Uh(this))})),cf.appendOrSelect(r,"text.donut-title").attr("text-anchor","middle").style("font-size",(function(){return i.donut.center.titleFontSize(o)})).attr("y",i.donut.center.titleYPosition(o)).text($r.getProperty(i,"donut","center","label"))}},e.prototype.getInnerRadius=function(){return.75*this.computeRadius()},e.prototype.centerNumberTween=function(t){var e=this.model.getOptions(),n=$r.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?ya:fa)(r,n);return function(n){var r=e.donut.center.numberFormatter;t.text(r(i(n)))}},e}(Og),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=cf.getSVGElementSize(e,{useAttrs:!0}),r=n.width,i=n.height;t.attr("width",r).attr("height",i);var o=this.model.isDataEmpty(),a=$r.getProperty(this.model.getOptions(),"data","loading");if(o)this.renderSkeleton(a);else{if(!o&&a)throw new Error("Something went wrong. You can't provided non-empty data and data loading together.");this.removeSkeleton()}},e.prototype.renderSkeleton=function(t){if(this.configs.skeleton===k.GRID)this.renderGridSkeleton(t);else if(this.configs.skeleton===k.VERT_OR_HORIZ)this.renderVertOrHorizSkeleton(t);else if(this.configs.skeleton===k.PIE)this.renderPieSkeleton(t);else{if(this.configs.skeleton!==k.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===w.VERTICAL&&this.drawYGrid(t),e===w.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=ns().domain([0,1]).range(t),this.yScale=ns().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,o=r.height;this.backdrop=cf.appendOrSelect(e,"svg.chart-skeleton.DAII").attr("width",i).attr("height",o);var a=cf.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop");a.attr("width","100%").attr("height","100%");var s=this.xScale.range(),u=s[0],l=(s[1],this.yScale.range()),c=(l[0],l[1]);this.backdrop.merge(a).attr("x",u).attr("y",c),a.classed("shimmer-effect-lines",t).classed("empty-state-lines",!t)},e.prototype.drawXGrid=function(t){var e=this.backdrop.attr("height"),n=this.backdrop.attr("width"),r=$r.getProperty(this.model.getOptions(),"grid","x","numberOfTicks"),i=this.xScale.ticks(r).map((function(t){return t*n})),o=cf.appendOrSelect(this.backdrop,"g.x.skeleton"),a=o.selectAll("line").data(i);a.enter().append("line").merge(a).attr("x1",(function(t){return t})).attr("x2",(function(t){return t})).attr("y1",0).attr("y2",e),o.selectAll("line").classed("shimmer-effect-lines",t).classed("empty-state-lines",!t)},e.prototype.drawYGrid=function(t){var e=this.backdrop.attr("height"),n=this.backdrop.attr("width"),r=$r.getProperty(this.model.getOptions(),"grid","y","numberOfTicks"),i=this.xScale.ticks(r).map((function(t){return t*e})),o=cf.appendOrSelect(this.backdrop,"g.y.skeleton"),a=o.selectAll("line").data(i);a.enter().append("line").merge(a).attr("x1",0).attr("x2",n).attr("y1",(function(t){return t})).attr("y2",(function(t){return t})),o.selectAll("line").classed("shimmer-effect-lines",t).classed("empty-state-lines",!t)},e.prototype.drawRing=function(t,e,n){void 0===n&&(n=!0);var r=this.parent,i=cf.getSVGElementSize(r.node().parentNode,{useAttrs:!0}),o=i.width,a=i.height,s=cf.appendOrSelect(r,"svg.chart-skeleton").attr("width",o).attr("height",a),u=this.model.getOptions().pie,l=(cf.appendOrSelect(s,"rect.chart-skeleton-area-container").attr("width",o).attr("height",a).attr("fill","none"),xl().innerRadius(e).outerRadius(t).startAngle(0).endAngle(2*Math.PI)),c=t+Math.abs(u.radiusOffset),h=t+(Math.min(o,a)-2*t)/2;cf.appendOrSelect(s,"path").attr("class","skeleton-area-shape").attr("transform","translate("+c+", "+h+")").attr("d",l).classed("shimmer-effect-areas",n).classed("empty-state-areas",!n)},e.prototype.computeOuterRadius=function(){var t=this.model.getOptions(),e=cf.getSVGElementSize(this.parent.node().parentNode,{useAttrs:!0}),n=e.width,r=e.height;return Math.min(n,r)/2+t.pie.radiusOffset},e.prototype.computeInnerRadius=function(){return.75*this.computeOuterRadius()},e.prototype.setShimmerEffect=function(t){var e=this.parent.select(".chart-skeleton"),n=cf.getSVGElementSize(this.parent,{useAttrs:!0}).width,r=n,i=cf.appendOrSelect(e,"defs").lower(),o=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)");o.html('\n\t\t\t<stop class="stop-bg-shimmer" offset="0"></stop>\n\t\t\t<stop class="stop-shimmer" offset="0.2"></stop>\n\t\t\t<stop class="stop-bg-shimmer" offset="0.4"></stop>\n\t\t'),function t(){o.attr("gradientTransform","translate("+(0-3*.2*n)+", 0)").transition().duration(2e3).delay(1e3).ease(_d).attr("gradientTransform","translate("+(r+3*.2*n)+", 0)").on("end",t)}()},e.prototype.removeSkeleton=function(){this.parent.select(".chart-skeleton").remove()},e}(Xp),Cg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="spacer",e}return n(e,t),e.prototype.render=function(){this.getContainerSVG().append("rect").attr("x",0).attr("y",0).attr("width",this.configs.size||Ni.default.size).attr("height",this.configs.size||Ni.default.size).attr("opacity",0)},e}(Xp);function Pg(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 kg(t,e){var n,r,i,o,a,s=new Ig(t),u=+t.value&&(s.value=t.value),l=[s];for(null==e&&(e=Lg);n=l.pop();)if(u&&(n.value=+n.data.value),(i=e(n.data))&&(a=i.length))for(n.children=new Array(a),o=a-1;o>=0;--o)l.push(r=n.children[o]=new Ig(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(Rg)}function Lg(t){return t.children}function Dg(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 Ug(){return 0}function jg(t){return function(){return t}}function Hg(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 Vg(t,e,n,r,i){for(var o,a=t.children,s=-1,u=a.length,l=t.value&&(r-e)/t.value;++s<u;)(o=a[s]).y0=n,o.y1=i,o.x0=e,o.x1=e+=o.value*l}function Gg(t,e,n,r,i){for(var o,a=t.children,s=-1,u=a.length,l=t.value&&(i-n)/t.value;++s<u;)(o=a[s]).x0=e,o.x1=r,o.y0=n,o.y1=n+=o.value*l}Ig.prototype=kg.prototype={constructor:Ig,count:function(){return this.eachAfter(Pg)},each:function(t){var e,n,r,i,o=this,a=[o];do{for(e=a.reverse(),a=[];o=e.pop();)if(t(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r])}while(a.length);return this},eachAfter:function(t){for(var e,n,r,i=this,o=[i],a=[];i=o.pop();)if(a.push(i),e=i.children)for(n=0,r=e.length;n<r;++n)o.push(e[n]);for(;i=a.pop();)t(i);return this},eachBefore:function(t){for(var e,n,r=this,i=[r];r=i.pop();)if(t(r),e=r.children)for(n=e.length-1;n>=0;--n)i.push(e[n]);return this},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;t=n.pop(),e=r.pop();for(;t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){var t=[];return this.each((function(e){t.push(e)})),t},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return kg(this).eachBefore(Dg)}};var Bg=function t(e){function n(t,n,r,i,o){!function(t,e,n,r,i,o){for(var a,s,u,l,c,h,f,d,p,g,v,m=[],y=e.children,_=0,b=0,x=y.length,w=e.value;_<x;){u=i-n,l=o-r;do{c=y[b++].value}while(!c&&b<x);for(h=f=c,v=c*c*(g=Math.max(l/u,u/l)/(w*t)),p=Math.max(f/v,v/h);b<x;++b){if(c+=s=y[b].value,s<h&&(h=s),s>f&&(f=s),v=c*c*g,(d=Math.max(f/v,v/h))>p){c-=s;break}p=d}m.push(a={value:c,dice:u<l,children:y.slice(_,b)}),a.dice?Vg(a,n,r,i,w?r+=l*c/w:o):Gg(a,n,r,w?n+=u*c/w:i,o),w-=c,_=b}}(e,t,n,r,i,o)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}((1+Math.sqrt(5))/2);function Fg(){var t=Bg,e=!1,n=1,r=1,i=[0],o=Ug,a=Ug,s=Ug,u=Ug,l=Ug;function c(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(h),i=[0],e&&t.eachBefore(Hg),t}function h(e){var n=i[e.depth],r=e.x0+n,c=e.y0+n,h=e.x1-n,f=e.y1-n;h<r&&(r=h=(r+h)/2),f<c&&(c=f=(c+f)/2),e.x0=r,e.y0=c,e.x1=h,e.y1=f,e.children&&(n=i[e.depth+1]=o(e)/2,r+=l(e)-n,c+=a(e)-n,(h-=s(e)-n)<r&&(r=h=(r+h)/2),(f-=u(e)-n)<c&&(c=f=(c+f)/2),t(e,r,c,h,f))}return c.round=function(t){return arguments.length?(e=!!t,c):e},c.size=function(t){return arguments.length?(n=+t[0],r=+t[1],c):[n,r]},c.tile=function(e){return arguments.length?(t=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?(o="function"==typeof t?t:jg(+t),c):o},c.paddingOuter=function(t){return arguments.length?c.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):c.paddingTop()},c.paddingTop=function(t){return arguments.length?(a="function"==typeof t?t:jg(+t),c):a},c.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:jg(+t),c):s},c.paddingBottom=function(t){return arguments.length?(u="function"==typeof t?t:jg(+t),c):u},c.paddingLeft=function(t){return arguments.length?(l="function"==typeof t?t:jg(+t),c):l},c}var zg=function(t){function e(n,r,i,o){var a=t.call(this,n,r,o)||this;return a.type="layout",a.configs=o,a.children=i,a._instanceID=e.instanceID++,(a.configs.direction===A.ROW_REVERSE||a.configs.direction===A.COLUMN_REVERSE)&&(a.children=a.children.reverse()),a.init(),a}return n(e,t),e.prototype.init=function(){this.children.forEach((function(t){t.components.forEach((function(t){t.init()}))}))},e.prototype.getPreferedAndFixedSizeSum=function(){var t=this.parent,e=0;return t.selectAll("svg.layout-child-"+this._instanceID).filter((function(t){var e=$r.getProperty(t,"data","growth","x");return e===C.PREFERRED||e===C.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 $r.getProperty(t,"data","growth","x")===C.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,o=r.height,a=kg({children:this.children}).sum((function(t){return t.size})),s=this.configs.direction===A.ROW||this.configs.direction===A.ROW_REVERSE?Vg:Gg;Fg().tile(s).size([i,o])(a);var u=this.configs.direction===A.ROW||this.configs.direction===A.ROW_REVERSE,l=n.selectAll("svg.layout-child-"+this._instanceID).data(a.leaves(),(function(t){return t.data.id}));l.attr("width",(function(t){return t.x1-t.x0})).attr("height",(function(t){return t.y1-t.y0})),l.enter().append("svg").attr("class",(function(t){return"layout-child layout-child-"+e._instanceID+" "+t.data.id})).attr("x",(function(t){return t.x0})).attr("y",(function(t){return t.y0})).merge(n.selectAll("svg.layout-child-"+this._instanceID)).each((function(e){var n=this;e.data.components.forEach((function(r){r.setParent(Uh(n));var i=$r.getProperty(e,"data","growth","x");i!==C.PREFERRED&&i!==C.FIXED||r.render(t)}))})),n.selectAll("svg.layout-child-"+this._instanceID).each((function(t){var e=$r.getProperty(t,"data","growth","x"),n=cf.getSVGElementSize(Uh(this),{useBBox:!0});if(e===C.PREFERRED){var r=u?n.width:n.height,a=u?i:o;t.data.size=r/a*100}})),l.exit().remove(),this.children.filter((function(t){return $r.getProperty(t,"growth","x")===C.STRETCH})).forEach((function(t,n){t.size=(100-+e.getPreferedAndFixedSizeSum())/+e.getNumOfStretchChildren()})),a=kg({children:this.children}).sum((function(t){return t.size})),Fg().tile(s).size([i,o]).padding(0)(a),n.selectAll("svg.layout-child-"+this._instanceID).data(a.leaves(),(function(t){return t.data.id})).attr("x",(function(t){return t.x0})).attr("y",(function(t){return t.y0})).attr("width",(function(t){return t.x1-t.x0})).attr("height",(function(t){return t.y1-t.y0})).each((function(e,n){e.data.components.forEach((function(n){$r.getProperty(e,"data","growth","x")===C.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}(Xp),Wg=Array.prototype.slice;function Yg(t){return t}function qg(t){return"translate("+(t+.5)+",0)"}function Xg(t){return"translate(0,"+(t+.5)+")"}function $g(t){return function(e){return+t(e)}}function Zg(t){var e=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}function Kg(){return!this.__axis}function Qg(t,e){var n=[],r=null,i=null,o=6,a=6,s=3,u=1===t||4===t?-1:1,l=4===t||2===t?"x":"y",c=1===t||3===t?qg:Xg;function h(h){var f=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,d=null==i?e.tickFormat?e.tickFormat.apply(e,n):Yg:i,p=Math.max(o,0)+s,g=e.range(),v=+g[0]+.5,m=+g[g.length-1]+.5,y=(e.bandwidth?Zg:$g)(e.copy()),_=h.selection?h.selection():h,b=_.selectAll(".domain").data([null]),x=_.selectAll(".tick").data(f,e).order(),w=x.exit(),E=x.enter().append("g").attr("class","tick"),T=x.select("line"),O=x.select("text");b=b.merge(b.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),x=x.merge(E),T=T.merge(E.append("line").attr("stroke","currentColor").attr(l+"2",u*o)),O=O.merge(E.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),T=T.transition(h),O=O.transition(h),w=w.transition(h).attr("opacity",1e-6).attr("transform",(function(t){return isFinite(t=y(t))?c(t):this.getAttribute("transform")})),E.attr("opacity",1e-6).attr("transform",(function(t){var e=this.parentNode.__axis;return c(e&&isFinite(e=e(t))?e:y(t))}))),w.remove(),b.attr("d",4===t||2==t?a?"M"+u*a+","+v+"H0.5V"+m+"H"+u*a:"M0.5,"+v+"V"+m:a?"M"+v+","+u*a+"V0.5H"+m+"V"+u*a:"M"+v+",0.5H"+m),x.attr("opacity",1).attr("transform",(function(t){return c(y(t))})),T.attr(l+"2",u*o),O.attr(l,u*p).text(d),_.filter(Kg).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=Wg.call(arguments),h},h.tickArguments=function(t){return arguments.length?(n=null==t?[]:Wg.call(t),h):n.slice()},h.tickValues=function(t){return arguments.length?(r=null==t?null:Wg.call(t),h):r&&r.slice()},h.tickFormat=function(t){return arguments.length?(i=t,h):i},h.tickSize=function(t){return arguments.length?(o=a=+t,h):o},h.tickSizeInner=function(t){return arguments.length?(o=+t,h):o},h.tickSizeOuter=function(t){return arguments.length?(a=+t,h):a},h.tickPadding=function(t){return arguments.length?(s=+t,h):s},h}function Jg(t){return Qg(1,t)}function tv(t){return Qg(2,t)}function ev(t){return Qg(3,t)}function nv(t){return Qg(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,o=this.model.getOptions(),a=$r.getProperty(o,"axes",i),s=$r.getProperty(a,"scaleType"),u=$r.getProperty(a,"ticks","number"),l=$r.getProperty(a,"truncation","type"),c=$r.getProperty(a,"truncation","threshold"),h=$r.getProperty(a,"truncation","numCharacter"),f=null!==u,d=i===b.LEFT||i===b.RIGHT,p=$r.getProperty(o,"timeScale"),g=this.getContainerSVG(),v=cf.getSVGElementSize(this.parent,{useAttrs:!0}),m=v.width,y=v.height;i===b.BOTTOM||i===b.TOP?(e=this.configs.axes[b.LEFT]?this.margins.left:0,n=this.configs.axes[b.RIGHT]?m-this.margins.right:m):(e=y-this.margins.bottom,n=this.margins.top);var _,w=this.services.cartesianScales.getScaleByPosition(i);switch(this.scaleType===E.LABELS?w.rangeRound([e,n]):w.range([e,n]),i){case b.LEFT:_=nv;break;case b.BOTTOM:_=ev;break;case b.RIGHT:_=tv;break;case b.TOP:_=Jg}var T=cf.appendOrSelect(g,"g.axis."+i),O=!T.select("g.ticks").empty(),S=cf.appendOrSelect(T,"g.ticks");O||S.attr("role",r.GRAPHICS_OBJECT+" "+r.GROUP);var M=cf.appendOrSelect(T,"g.ticks.invisible").style("opacity","0").style("pointer-events","none").attr("aria-hidden",!0),A=cf.appendOrSelect(M,"g.tick"),C=cf.appendOrSelect(A,"text").text("0"),P=cf.getSVGElementSize(C.node(),{useBBox:!0}).height;A.remove();var k,L=this.scaleType===E.TIME||a.scaleType===E.TIME,D=this.scaleType||a.scaleType||E.LINEAR,R=_(w).tickSizeOuter(0);if(w.ticks){var I=void 0;if(f?I=u:(I=Ii.ticks.number,d&&(I=this.getNumberOfFittingTicks(y,P,2.5))),1===w.ticks().length&&0===w.ticks()[0]&&(I=0),R.ticks(I),L)if(w.ticks(I).length){var N=w.nice(I).ticks(I);$r.getProperty(o,"timeScale","addSpaceOnEdges")&&N.length>2&&(N.splice(N.length-1,1),N.splice(0,1)),R.tickValues(N)}else R.tickValues([])}var U=$r.getProperty(a,"ticks","formatter");if(L){var j=rg(R.tickValues());k=null===U?function(t,e){return eg(t,e,j,p)}:function(t,e){var n=eg(t,e,j,p);return U(t,e,n)}}else null===U?D===E.LINEAR&&(k=function(t){return t.toLocaleString()}):k=U;switch(R.tickFormat(k),i){case b.LEFT:S.attr("transform","translate("+this.margins.left+", 0)");break;case b.BOTTOM:S.attr("transform","translate(0, "+(y-this.margins.bottom)+")");break;case b.RIGHT:S.attr("transform","translate("+(m-this.margins.right)+", 0)");break;case b.TOP:S.attr("transform","translate(0, "+this.margins.top+")")}if(a.title){var H=cf.appendOrSelect(T,"text.axis-title").html(this.model.isDataEmpty()?"":a.title);switch(i){case b.LEFT:H.attr("transform","rotate(-90)").attr("y",0).attr("x",-w.range()[0]/2).attr("dy","1em").style("text-anchor","middle");break;case b.BOTTOM:H.attr("transform","translate("+(this.margins.left/2+w.range()[1]/2)+", "+y+")").style("text-anchor","middle");break;case b.RIGHT:H.attr("transform","rotate(90)").attr("y",-m).attr("x",w.range()[0]/2).attr("dy","1em").style("text-anchor","middle");break;case b.TOP:var V=cf.getSVGElementSize(H,{useBBox:!0}).height;H.attr("transform","translate("+(this.margins.left/2+w.range()[1]/2)+", "+V/2+")").style("text-anchor","middle")}}if(L){var G=rg(R.tickValues()),B=p.showDayName,F=S;t&&(S=S.transition(this.services.transitions.getTransition("axis-update",t))),S=S.call(R),F.selectAll(".tick").data(R.tickValues(),w).order().select("text").style("font-weight",(function(t,e){return tg(t,e,G,B)?"bold":"normal"}))}else S=t&&O?S.transition(this.services.transitions.getTransition("axis-update")).call(R):S.call(R);if(M.call(R),i===b.BOTTOM||i===b.TOP){var z=!1;if(w.step){z=M.selectAll("g.tick text").nodes().some((function(t){return cf.getSVGElementSize(t,{useBBox:!0}).width>=w.step()}))}else{var W=$r.getProperty(a,"ticks","rotateIfSmallerThan")||Ii.ticks.rotateIfSmallerThan;z=m/(L?R.tickValues().length:w.ticks().length)/2<W}z?(f||(R.ticks(this.getNumberOfFittingTicks(m,P,3.5)),M.call(R),S.call(R)),T.selectAll("g.ticks g.tick text").attr("transform","rotate(-45)").style("text-anchor",i===b.TOP?"start":"end")):T.selectAll("g.ticks g.tick text").attr("transform",null).style("text-anchor",null)}if(this.model.isDataEmpty()&&T.attr("opacity",0),l!==x.NONE&&s===E.LABELS){var Y=this.model.getDataValuesGroupedByKeys();if(Y.length>0){var q=Y.map((function(t){return t.sharedStackKey})),X=g.select("g.axis."+i+" g.ticks g.tick").html();T.selectAll("g.ticks g.tick").html(X),T.selectAll("g.tick text").data(q).text((function(t){return t.length>c?$r.truncateLabel(t,l,h):t})),this.getInvisibleAxisRef().selectAll("g.tick text").data(q).text((function(t){return t.length>c?$r.truncateLabel(t,l,h):t})),T.selectAll("g.ticks").html(this.getInvisibleAxisRef().html()),T.selectAll("g.tick text").data(q)}}this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this.getContainerSVG(),e=this.configs.position,n=cf.appendOrSelect(t,"g.axis."+e),r=this.model.getOptions(),i=$r.getProperty(r,"axes",e),o=$r.getProperty(i,"scaleType"),a=$r.getProperty(i,"truncation","threshold"),s=(this.scaleType===E.TIME||(i.scaleType,E.TIME),this);n.selectAll("g.tick text").on("mouseover",(function(t){s.services.events.dispatchEvent(U.Axis.LABEL_MOUSEOVER,{element:Uh(this),datum:t})})).on("mousemove",(function(t){s.services.events.dispatchEvent(U.Axis.LABEL_MOUSEMOVE,{element:Uh(this),datum:t}),o===E.LABELS&&t.length>a&&s.services.events.dispatchEvent(U.Tooltip.SHOW,{hoveredElement:Uh(this),type:O.AXISLABEL})})).on("click",(function(t){s.services.events.dispatchEvent(U.Axis.LABEL_CLICK,{element:Uh(this),datum:t})})).on("mouseout",(function(t){s.services.events.dispatchEvent(U.Axis.LABEL_MOUSEOUT,{element:Uh(this),datum:t}),o===E.LABELS&&s.services.events.dispatchEvent(U.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 $r.clamp(r,2,Ii.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}(Xp),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(b),i=$r.getProperty(this.model.getOptions(),"axes");r.forEach((function(t){i[b[t]]&&(n[b[t]]=!0)})),this.configs.axes=n,r.forEach((function(t){var n=b[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 o={};Object.keys(this.children).forEach((function(n){var r,i=e.children[n],a=i.configs.position,s=i.getInvisibleAxisRef(),u=cf.getSVGElementSize(s,{useBBox:!0}),l=u.width,c=u.height;switch(r=i.getTitleRef().empty()?0:cf.getSVGElementSize(i.getTitleRef(),{useBBox:!0}).height,a){case b.TOP:o.top=c+r;break;case b.BOTTOM:o.bottom=c+r;break;case b.LEFT:o.left=l+r;break;case b.RIGHT:o.right=l+r}e.addAxisThresholds(t,a)})),Object.keys(o).some((function(t){return e.margins[t]!==o[t]}))&&(this.margins=Object.assign(this.margins,o),Object.keys(this.children).forEach((function(t){e.children[t].margins=e.margins})),this.render(!0))},e.prototype.addAxisThresholds=function(t,e){var n=this,r=$r.getProperty(this.model.getOptions(),"axes",e).thresholds;r&&(r.forEach((function(t,r){var i=new sg(n.model,n.services,m(m({},t),{axisPosition:e,index:r}));n.thresholds.push(i)})),this.thresholds.forEach((function(e){e.setParent(n.parent),e.render(t)})))},e}(Xp),ov=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grid",e}return n(e,t),e.prototype.render=function(t){void 0===t&&(t=!0),this.drawBackdrop(),cf.appendOrSelect(this.backdrop,"g.x.grid"),cf.appendOrSelect(this.backdrop,"g.y.grid"),this.drawXGrid(t),this.drawYGrid(t)},e.prototype.drawXGrid=function(t){var e=this.parent,n=this.backdrop.attr("height"),r=ev(this.services.cartesianScales.getMainXScale()).tickSizeInner(-n).tickSizeOuter(0),i=$r.getProperty(this.model.getOptions(),"grid","x","numberOfTicks");r.ticks(i);var o=e.select(".x.grid").attr("transform","translate("+-this.backdrop.attr("x")+", "+n+")");if(t){var a=this.services.transitions.getTransition("grid-update");o.transition(a).call(r)}else o.call(r);this.cleanGrid(o)},e.prototype.drawYGrid=function(t){var e=this.parent,n=this.backdrop.attr("width"),r=nv(this.services.cartesianScales.getMainYScale()).tickSizeInner(-n).tickSizeOuter(0),i=$r.getProperty(this.model.getOptions(),"grid","y","numberOfTicks");r.ticks(i);var o=e.select(".y.grid").attr("transform","translate(0, "+-this.backdrop.attr("y")+")");if(t){var a=this.services.transitions.getTransition("grid-update");o.transition(a).call(r)}else o.call(r);this.cleanGrid(o)},e.prototype.getGridlineThreshold=function(t){var e,n=this.parent,r=n.selectAll(".x.grid .tick").nodes().sort((function(t,e){return Number($r.getTranslationValues(t).tx)-Number($r.getTranslationValues(e).tx)})),i=-1;if(r.length){r.forEach((function(e,n){t[0]>=+$r.getTranslationValues(e).tx&&i++})),e=i+1<r.length?i+1:r.length;var o,a=r[i],s=r[e];if(a)if(s)o=+$r.getTranslationValues(s).tx-+$r.getTranslationValues(a).tx;else{var u=n.select("rect.chart-grid-backdrop").node();o=cf.getSVGElementSize(u).width-+$r.getTranslationValues(a).tx}else o=+$r.getTranslationValues(s).tx;return o*this.model.getOptions().tooltip.gridline.threshold}},e.prototype.getActiveGridline=function(t){var e=$r.getProperty(this.model.getOptions,"tooltip","gridline","threshold"),n=e||this.getGridlineThreshold(t);return this.parent.selectAll(".x.grid .tick").filter((function(){var e=$r.getTranslationValues(this),r=Number(e.tx)-n,i=Number(e.tx)+n;return r<=t[0]&&t[0]<=i}))},e.prototype.drawBackdrop=function(){var t=this.parent,e=this.services.cartesianScales.getMainXScale(),n=this.services.cartesianScales.getMainYScale(),r=e.range(),i=r[0],o=r[1],a=n.range(),s=a[0],u=a[1];this.backdrop=cf.appendOrSelect(t,"svg.chart-grid-backdrop");var l=cf.appendOrSelect(this.backdrop,"rect.chart-grid-backdrop");this.backdrop.merge(l).attr("x",i).attr("y",u).attr("width",o-i).attr("height",s-u).lower(),l.attr("width","100%").attr("height","100%")},e.prototype.cleanGrid=function(t){var e=this.model.getOptions();t.selectAll("line").attr("stroke",e.grid.strokeColor),t.selectAll("text").remove(),t.select(".domain").remove()},e}(Xp);var av,sv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="ruler",e}return n(e,t),e.prototype.render=function(){this.drawBackdrop(),this.addBackdropEventListeners()},e.prototype.showRuler=function(t){var e=this,n=t[0],r=t[1],i=this.parent,o=this.services.cartesianScales.getOrientation(),a=o===w.HORIZONTAL?r:n,s=cf.appendOrSelect(i,"g.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,a)})).reduce((function(t,e){if(0===t.length)return t.push(e),t;var n=t[0].domainValue,r=Math.abs(a-e.domainValue),i=Math.abs(a-n);return r>i?t:(r<i?t=[e]:t.push(e),t)}),[]);if(p.length>0){var g=this.services.cartesianScales.getRangeIdentifier(),v=p.map((function(t){return t.originalData})).filter((function(t){var e=t[g];return null!=e})),m=p.map((function(t){return t.domainValue})),y=l.filter((function(t){var n=e.services.cartesianScales.getDomainValue(t);return m.includes(n)}));this.elementsToHighlight&&this.elementsToHighlight.size()>0&&!$r.isEqual(this.elementsToHighlight,y)&&this.hideRuler(),y.dispatch("mouseover"),this.elementsToHighlight=y,this.services.events.dispatchEvent("show-tooltip",{hoveredElement:u,multidata:v,type:O.GRIDLINE}),s.attr("opacity",1);var _=p[0];"horizontal"===o?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("hide-tooltip"),e.attr("opacity",0)},e.prototype.addBackdropEventListeners=function(){var t=this;this.backdrop.on("mousemove mouseover",(function(){var e=Hh(t.parent.node());t.showRuler(e)})).on("mouseout",(function(){t.hideRuler()}))},e.prototype.drawBackdrop=function(){var t=this.parent,e=this.services.cartesianScales.getMainXScale(),n=this.services.cartesianScales.getMainYScale(),r=e.range(),i=r[0],o=r[1],a=n.range(),s=a[0],u=a[1];this.backdrop=cf.appendOrSelect(t,"svg.chart-grid-backdrop");var l=cf.appendOrSelect(this.backdrop,"rect.chart-grid-backdrop");this.backdrop.merge(l).attr("x",i).attr("y",u).attr("width",o-i).attr("height",s-u).lower(),l.attr("width","100%").attr("height","100%")},e}(Xp),uv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="zero-line",e}return n(e,t),e.prototype.render=function(t){var e=this.services.cartesianScales.getRangeScale().domain(),n=e[0],r=e[1];if(n>0&&r<0||n<0&&r>0){var i=this.getContainerSVG(),o=this.services.cartesianScales.getDomainScale().range(),a=o[0],s=o[1],u=+this.services.cartesianScales.getRangeValue(0)+.5;if(!u){var l=this.services.cartesianScales.getRangeAxisPosition();u=this.services.cartesianScales.getScaleByPosition(l).range()[0]}var c=$r.flipSVGCoordinatesBasedOnOrientation({x0:a,x1:s,y0:u,y1:u},this.services.cartesianScales.getOrientation());cf.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}(Xp),lv=function(){function t(t,e){this.services={domUtils:cf,events:hf,transitions:wd},this.model=new Sc(this.services)}return t.prototype.init=function(t,e){var n=this;this.model.set({holder:t},!0),Object.keys(this.services).forEach((function(t){var e=n.services[t];n.services[t]=new e(n.model,n.services)})),this.services.events.addEventListener(U.Model.UPDATE,(function(){n.update(!0)})),this.model.setData(e.data),this.services.events.addEventListener(U.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(U.Chart.RENDER_FINISHED)}))}},t.prototype.destroy=function(){this.components.forEach((function(t){return t.destroy()})),this.services.domUtils.getHolder().remove(),this.model.set({destroyed:!0},!0)},t.prototype.getChartComponents=function(t){var e={id:"title",components:[new ug(this.model,this.services)],growth:{x:C.PREFERRED,y:C.FIXED}},n={id:"legend",components:[new $p(this.model,this.services)],growth:{x:C.PREFERRED,y:C.FIXED}},r={id:"graph-frame",components:t,growth:{x:C.STRETCH,y:C.FIXED}},i=!1!==this.model.getOptions().legend.enabled,o=A.COLUMN;if(i){var a=$r.getProperty(this.model.getOptions(),"legend","position");"left"===a?(o=A.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=M.VERTICAL)):"right"===a?(o=A.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=M.VERTICAL)):"bottom"===a&&(o=A.COLUMN_REVERSE)}var s={id:"spacer",components:[new Cg(this.model,this.services)],growth:{x:C.PREFERRED,y:C.FIXED}},u={id:"full-frame",components:[new zg(this.model,this.services,y(i?[n]:[],i?[s]:[],[r]),{direction:o})],growth:{x:C.STRETCH,y:C.FIXED}},l=[];if(this.model.getOptions().title){l.push(e);var c={id:"spacer",components:[new Cg(this.model,this.services)],growth:{x:C.PREFERRED,y:C.FIXED}};l.push(c)}return l.push(u),[new zg(this.model,this.services,l,{direction:A.COLUMN})]},t}(),cv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.services=Object.assign(r.services,{cartesianScales:zp,curves:qp}),r}return n(e,t),e.prototype.getAxisChartComponents=function(t){var e={id:"title",components:[new ug(this.model,this.services)],growth:{x:C.PREFERRED,y:C.FIXED}},n={id:"legend",components:[new $p(this.model,this.services)],growth:{x:C.PREFERRED,y:C.FIXED}},r={id:"graph-frame",components:t,growth:{x:C.STRETCH,y:C.FIXED}},i=!1!==this.model.getOptions().legend.enabled,o=A.COLUMN;if(i){var a=$r.getProperty(this.model.getOptions(),"legend","position");a===S.LEFT?(o=A.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=M.VERTICAL)):a===S.RIGHT?(o=A.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=M.VERTICAL)):a===S.BOTTOM&&(o=A.COLUMN_REVERSE)}var s={id:"spacer",components:[new Cg(this.model,this.services)],growth:{x:C.PREFERRED,y:C.FIXED}},u={id:"full-frame",components:[new zg(this.model,this.services,y(i?[n]:[],[s,r]),{direction:o})],growth:{x:C.STRETCH,y:C.FIXED}},l=[];if(this.model.getOptions().title){l.push(e);var c={id:"spacer",components:[new Cg(this.model,this.services)],growth:{x:C.PREFERRED,y:C.FIXED}};l.push(c)}return l.push(u),[new zg(this.model,this.services,l,{direction:A.COLUMN})]},e}(lv),hv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions($r.mergeDefaultChartOptions($r.clone(ki.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 ov(this.model,this.services),new sv(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})],e=this.getAxisChartComponents(t);return e.push(new fg(this.model,this.services)),e},e}(cv),fv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions($r.mergeDefaultChartOptions(ki.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 ov(this.model,this.services),new sv(this.model,this.services),new gg(this.model,this.services),new wg(this.model,this.services,{stacked:!0}),new Eg(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0,stacked:!0})],e=this.getAxisChartComponents(t);return e.push(new fg(this.model,this.services)),e},e}(cv),dv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions($r.mergeDefaultChartOptions(ki.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 ov(this.model,this.services),new mg(this.model,this.services),new uv(this.model,this.services),new Ag(this.model,this.services,{skeleton:k.VERT_OR_HORIZ})],e=this.getAxisChartComponents(t);return e.push(new cg(this.model,this.services)),e},e}(cv),pv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions($r.mergeDefaultChartOptions(ki.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 ov(this.model,this.services),new yg(this.model,this.services),new uv(this.model,this.services),new Ag(this.model,this.services,{skeleton:k.VERT_OR_HORIZ})],e=this.getAxisChartComponents(t);return e.push(new cg(this.model,this.services)),e},e}(cv),gv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions($r.mergeDefaultChartOptions(ki.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 ov(this.model,this.services),new _g(this.model,this.services),new Ag(this.model,this.services,{skeleton:k.VERT_OR_HORIZ})],e=this.getAxisChartComponents(t);return e.push(new cg(this.model,this.services)),e},e}(cv),vv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions($r.mergeDefaultChartOptions(ki.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 ov(this.model,this.services),new sv(this.model,this.services),new xg(this.model,this.services),new Ag(this.model,this.services,{skeleton:k.GRID})],e=this.getAxisChartComponents(t);return e.push(new fg(this.model,this.services)),e},e}(cv),mv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions($r.mergeDefaultChartOptions(ki.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 ov(this.model,this.services),new sv(this.model,this.services),new wg(this.model,this.services),new bg(this.model,this.services,{handleThresholds:!0}),new Ag(this.model,this.services,{skeleton:k.GRID})],e=this.getAxisChartComponents(t);return e.push(new fg(this.model,this.services)),e},e}(cv),yv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions($r.mergeDefaultChartOptions(ki.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 ov(this.model,this.services),new sv(this.model,this.services),new bg(this.model,this.services),new Ag(this.model,this.services,{skeleton:k.GRID})],e=this.getAxisChartComponents(t);return e.push(new fg(this.model,this.services)),e},e}(cv),_v=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}(Sc),bv=function(t){function e(e,n,r){void 0===r&&(r=!1);var i=t.call(this,e,n)||this;return i.model=new _v(i.services),r?i:(i.model.setOptions($r.mergeDefaultChartOptions(ki.pieChart,n.options)),i.init(e,n),i)}return n(e,t),e.prototype.getComponents=function(){var t=[new Og(this.model,this.services),new Ag(this.model,this.services,{skeleton:k.PIE})],e=this.getChartComponents(t);return e.push(new hg(this.model,this.services)),e},e}(lv),xv=function(t){function e(e,n){var r=t.call(this,e,n,!0)||this;return r.model.setOptions($r.mergeDefaultChartOptions(ki.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:k.DONUT})],e=this.getChartComponents(t);return e.push(new hg(this.model,this.services)),e},e}(bv);function wv(t){var e,n=(Tv(t)%(e=360)+e)%e;return Ev(n,[0,10])||Ev(n,[350,0])?{textAnchor:L.START,dominantBaseline:D.MIDDLE}:Ev(n,[10,80])?{textAnchor:L.START,dominantBaseline:D.HANGING}:Ev(n,[80,100])?{textAnchor:L.MIDDLE,dominantBaseline:D.HANGING}:Ev(n,[100,170])?{textAnchor:L.END,dominantBaseline:D.HANGING}:Ev(n,[170,190])?{textAnchor:L.END,dominantBaseline:D.MIDDLE}:Ev(n,[190,260])?{textAnchor:L.END,dominantBaseline:D.BASELINE}:Ev(n,[260,280])?{textAnchor:L.MIDDLE,dominantBaseline:D.BASELINE}:{textAnchor:L.START,dominantBaseline:D.BASELINE}}function Ev(t,e){var n=e[0],r=e[1];return t>=n&&t<=r}function Tv(t){return t*(180/Math.PI)}function Ov(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 Sv=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.svg,"g.tmp-tick"),r=cf.appendOrSelect(n,"text").text(t),i=cf.getSVGElementSize(r.node(),{useBBox:!0}),o=i.width,a=i.height;return n.remove(),{width:o,height:a}},e.normalizeFlatData=function(t){var n=e.model.getOptions(),r=$r.getProperty(n,"radar","axes"),i=r.angle,o=r.value,a=$r.getProperty(n,"data","groupMapsTo"),s=$r.flatMapDeep(e.uniqueKeys.map((function(t){return e.uniqueGroups.map((function(e){var n;return(n={})[i]=t,n[a]=e,n[o]=null,n}))})));return $r.merge(s,t)},e.normalizeGroupedData=function(t){var n=e.model.getOptions(),r=$r.getProperty(n,"radar","axes"),i=r.angle,o=r.value,a=$r.getProperty(n,"data","groupMapsTo");return t.map((function(t){var n=t.name,r=t.data,s=e.uniqueKeys.map((function(t){var e;return(e={})[a]=n,e[i]=t,e[o]=null,e}));return{name:n,data:$r.merge(s,r)}}))},e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=$r.getProperty(e.model.getOptions(),"radar","opacity");e.parent.selectAll("g.blobs path").transition(e.services.transitions.getTransition("legend-hover-blob")).style("fill-opacity",(function(t){return t.name!==n.datum().name?$r.getProperty(r,"unselected"):$r.getProperty(r,"selected")}))},e.handleLegendMouseOut=function(t){var n=$r.getProperty(e.model.getOptions(),"radar","opacity");e.parent.selectAll("g.blobs path").transition(e.services.transitions.getTransition("legend-mouseout-blob")).style("fill-opacity",$r.getProperty(n,"selected"))},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(U.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(U.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0),this.svg=this.getContainerSVG();var n=cf.getSVGElementSize(this.parent,{useAttrs:!0}),i=n.width,o=n.height,a=this.model.getData(),s=this.model.getDisplayData(),u=this.model.getGroupedData(),l=this.model.getOptions(),c=$r.getProperty(l,"radar","axes"),h=c.angle,f=c.value,d=$r.getProperty(l,"data","groupMapsTo"),p=$r.getProperty(l,"radar"),g=p.xLabelPadding,v=p.yLabelPadding,m=p.yTicksNumber,y=p.minRange,_=p.xAxisRectHeight,b=p.opacity;this.uniqueKeys=Array.from(new Set(a.map((function(t){return t[h]})))),this.uniqueGroups=Array.from(new Set(a.map((function(t){return t[d]})))),this.displayDataNormalized=this.normalizeFlatData(s),this.groupedDataNormalized=this.normalizeGroupedData(u);var x=2*(this.getLabelDimensions(this.uniqueKeys[0]).height+v),w=(Math.min(i,o)-x)/2;if(!(w<=0)){var E=Co().domain(this.displayDataNormalized.map((function(t){return t[h]}))).range([0,2*Math.PI].map((function(t){return t-Math.PI/2}))),T=ns().domain([0,yo(this.displayDataNormalized.map((function(t){return t[f]})))]).range([y,w]).nice(m),O=T.ticks(m),S=function(t){return e.model.getFillColor(t)},M=Dl().angle((function(t){return E(t[h])+Math.PI/2})).radius((function(t){return T(t[f])})).curve(ac),A=Dl().angle(M.angle()).radius((function(t){return av?av(t[f]):y})).curve(M.curve()),C={x:yo(this.uniqueKeys.map((function(t){var n;return e.getLabelDimensions(t).width+(n=E(t),w*Math.sin(n-Math.PI/2))})))+g,y:o/2},P=cf.appendOrSelect(this.svg,"g.y-axes").attr("role",r.GROUP).selectAll("path").data(O,(function(t){return t})),k=function(t){return e.uniqueKeys.map((function(e){var n;return(n={})[h]=e,n[f]=t,n}))};P.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(k(t))})).call((function(n){return n.transition(e.services.transitions.getTransition("radar_y_axes_enter",t)).attr("opacity",1).attr("d",(function(t){return M(k(t))}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_y_axes_update",t)).attr("opacity",1).attr("transform","translate("+C.x+", "+C.y+")").attr("d",(function(t){return M(k(t))}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_y_axes_exit",t)).attr("d",(function(t){return M(k(t))})).attr("opacity",0).remove()}))})),cf.appendOrSelect(this.svg,"g.y-labels").attr("role",r.GROUP).selectAll("text").data(lo(O)).join((function(n){return n.append("text").attr("opacity",0).text((function(t){return t})).attr("x",(function(t){return Ov(-Math.PI/2,T(t),C).x+v})).attr("y",(function(t){return Ov(-Math.PI/2,T(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 Ov(-Math.PI/2,T(t),C).x+v})).attr("y",(function(t){return Ov(-Math.PI/2,T(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()}))})),cf.appendOrSelect(this.svg,"g.x-axes").attr("role",r.GROUP).selectAll("line").data(this.uniqueKeys,(function(t){return t})).join((function(n){return n.append("line").attr("role",r.GRAPHICS_SYMBOL).attr("opacity",0).attr("class",(function(t){return"x-axis-"+$r.kebabCase(t)})).attr("stroke-dasharray","0").attr("x1",(function(t){return Ov(E(t),0,C).x})).attr("y1",(function(t){return Ov(E(t),0,C).y})).attr("x2",(function(t){return Ov(E(t),0,C).x})).attr("y2",(function(t){return Ov(E(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 Ov(E(t),T.range()[0],C).x})).attr("y1",(function(t){return Ov(E(t),T.range()[0],C).y})).attr("x2",(function(t){return Ov(E(t),T.range()[1],C).x})).attr("y2",(function(t){return Ov(E(t),T.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 Ov(E(t),T.range()[0],C).x})).attr("y1",(function(t){return Ov(E(t),T.range()[0],C).y})).attr("x2",(function(t){return Ov(E(t),T.range()[1],C).x})).attr("y2",(function(t){return Ov(E(t),T.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(this.svg,"g.x-labels").attr("role",r.GROUP).selectAll("text").data(this.uniqueKeys).join((function(n){return n.append("text").text((function(t){return t})).attr("opacity",0).attr("x",(function(t){return Ov(E(t),T.range()[1]+g,C).x})).attr("y",(function(t){return Ov(E(t),T.range()[1]+g,C).y})).style("text-anchor",(function(t){return wv(E(t)).textAnchor})).style("dominant-baseline",(function(t){return wv(E(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 Ov(E(t),T.range()[1]+g,C).x})).attr("y",(function(t){return Ov(E(t),T.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(this.svg,"g.blobs").attr("role",r.GROUP).selectAll("path").data(this.groupedDataNormalized,(function(t){return t.name})).join((function(n){return n.append("path").attr("class","blob").attr("role",r.GRAPHICS_SYMBOL).attr("opacity",0).attr("transform","translate("+C.x+", "+C.y+")").attr("fill",(function(t){return S(t.name)})).style("fill-opacity",b.selected).attr("stroke",(function(t){return S(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){return 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(this.svg,"g.dots").attr("role",r.GROUP).selectAll("circle").data(this.displayDataNormalized).join((function(t){return t.append("circle").attr("role",r.GRAPHICS_SYMBOL)}),(function(t){return t}),(function(t){return t.remove()})).attr("class",(function(t){return $r.kebabCase(t[h])})).attr("cx",(function(t){return Ov(E(t[h]),T(t[f]),C).x})).attr("cy",(function(t){return Ov(E(t[h]),T(t[f]),C).y})).attr("r",0).attr("opacity",0).attr("fill",(function(t){return S(t[d])})),cf.appendOrSelect(this.svg,"g.x-axes-rect").attr("role",r.GROUP).selectAll("rect").data(this.uniqueKeys).join((function(t){return t.append("rect").attr("role",r.GRAPHICS_SYMBOL)}),(function(t){return t}),(function(t){return t.remove()})).attr("x",C.x).attr("y",C.y-_/2).attr("width",T.range()[1]).attr("height",_).attr("fill","red").style("fill-opacity",0).attr("transform",(function(t){return"rotate("+Tv(E(t))+", "+C.x+", "+C.y+")"})),this.addEventListeners(),av=T}},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(U.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(U.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.addEventListeners=function(){var t=this,e=$r.getProperty(this.model.getOptions(),"radar"),n=e.axes.angle,r=e.dotsRadius;this.parent.selectAll(".x-axes-rect > rect").on("mouseover",(function(e){t.services.events.dispatchEvent(U.Radar.X_AXIS_MOUSEOVER,{element:Uh(this),datum:e})})).on("mousemove",(function(e){var i=Uh(this),o=t.parent.select(".x-axes .x-axis-"+$r.kebabCase(e)),a=t.parent.selectAll(".dots circle."+$r.kebabCase(e));o.classed("hovered",!0).attr("stroke-dasharray","4 4"),a.classed("hovered",!0).attr("opacity",1).attr("r",r),t.services.events.dispatchEvent(U.Radar.X_AXIS_MOUSEMOVE,{element:i,datum:e});var s=t.displayDataNormalized.filter((function(t){return t[n]===e}));t.services.events.dispatchEvent(U.Tooltip.SHOW,{hoveredElement:i,multidata:s,type:O.GRIDLINE})})).on("click",(function(e){t.services.events.dispatchEvent(U.Radar.X_AXIS_CLICK,{element:Uh(this),datum:e})})).on("mouseout",(function(e){var n=Uh(this),r=t.parent.select(".x-axes .x-axis-"+$r.kebabCase(e)),i=t.parent.selectAll(".dots circle."+$r.kebabCase(e));r.classed("hovered",!1).attr("stroke-dasharray","0"),i.classed("hovered",!1).attr("opacity",0).attr("r",0),t.services.events.dispatchEvent(U.Radar.X_AXIS_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent("hide-tooltip",{hoveredElement:n}),t.services.events.dispatchEvent(U.Tooltip.HIDE,{hoveredElement:n})}))},e}(Xp),Mv=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($r.mergeDefaultChartOptions(ki.radarChart,n.options)),i.init(e,n),i)}return n(e,t),e.prototype.getComponents=function(){var t=[new Sv(this.model,this.services)],e=this.getChartComponents(t);return e.push(new dg(this.model,this.services)),e},e}(lv),Av=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions($r.mergeDefaultChartOptions(ki.gaugeChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Sg(this.model,this.services)];return this.getChartComponents(t)},e}(lv),Cv=io;t.AreaChart=hv,t.BubbleChart=vv,t.DonutChart=xv,t.GaugeChart=Av,t.GroupedBarChart=pv,t.LineChart=mv,t.PieChart=bv,t.RadarChart=Mv,t.ScatterChart=yv,t.SimpleBarChart=dv,t.StackedAreaChart=fv,t.StackedBarChart=gv,t.colorPalettes=oo,t.configurations=Ui,t.defaultColors=Cv,t.interfaces=j,Object.defineProperty(t,"__esModule",{value:!0})}));
15
+ ***************************************************************************** */var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,n)};function n(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var r,i,o,a,s,u,l,c,h,f,d,p,g,v,m=function(){return(m=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 y(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),i=0;for(e=0;e<n;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}!function(t){t.GRAPHICS_DOCUMENT="graphics-document",t.GRAPHICS_OBJECT="graphics-object",t.GRAPHICS_SYMBOL="graphics-symbol",t.GROUP="group"}(r||(r={})),function(t){t.RENDER_FINISHED="render-finished",t.RESIZE="chart-resize",t.MOUSEOVER="chart-mouseover",t.MOUSEOUT="chart-mouseout"}(i||(i={})),function(t){t.UPDATE="model-update"}(o||(o={})),function(t){t.LABEL_MOUSEOVER="axis-label-mouseover",t.LABEL_MOUSEMOVE="axis-label-mousemove",t.LABEL_CLICK="axis-label-click",t.LABEL_MOUSEOUT="axis-label-mouseout"}(a||(a={})),function(t){t.AREA_MOUSEOVER="area-mouseover",t.AREA_MOUSEMOVE="area-mousemove",t.AREA_CLICK="area-click",t.AREA_MOUSEOUT="area-mouseout"}(s||(s={})),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"}(u||(u={})),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"}(l||(l={})),function(t){t.BAR_MOUSEOVER="bar-mouseover",t.BAR_MOUSEMOVE="bar-mousemove",t.BAR_CLICK="bar-click",t.BAR_MOUSEOUT="bar-mouseout"}(c||(c={})),function(t){t.SCATTER_MOUSEOVER="scatter-mouseover",t.SCATTER_MOUSEMOVE="scatter-mousemove",t.SCATTER_CLICK="scatter-click",t.SCATTER_MOUSEOUT="scatter-mouseout"}(h||(h={})),function(t){t.POINT_MOUSEOVER="scatter-mouseover",t.POINT_MOUSEMOVE="scatter-mousemove",t.POINT_CLICK="scatter-click",t.POINT_MOUSEOUT="scatter-mouseout"}(f||(f={})),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"}(d||(d={})),function(t){t.SHOW="show-tooltip",t.HIDE="hide-tooltip"}(p||(p={})),function(t){t.SHOW="show-threshold",t.HIDE="hide-threshold"}(g||(g={})),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"}(v||(v={}));var _,b,x,w,T,E,O,S,M,A,C,P,k,L,D,R,I,N,U=Object.freeze({__proto__:null,get Chart(){return i},get Model(){return o},get Axis(){return a},get Area(){return s},get Pie(){return u},get Gauge(){return l},get Bar(){return c},get Scatter(){return h},get Line(){return f},get Radar(){return d},get Tooltip(){return p},get Threshold(){return g},get Legend(){return v}});!function(t){t.DEFAULT="default",t.G100="g100",t.G90="g90",t.G10="g10"}(_||(_={})),function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(b||(b={})),function(t){t.END_LINE="end_line",t.MID_LINE="mid_line",t.FRONT_LINE="front_line",t.NONE="none"}(x||(x={})),function(t){t.VERTICAL="vertical",t.HORIZONTAL="horizontal"}(w||(w={})),function(t){t.TIME="time",t.LINEAR="linear",t.LOG="log",t.LABELS="labels"}(T||(T={})),function(t){t.MOUSE="mouse",t.TOP="top",t.BOTTOM="bottom"}(E||(E={})),function(t){t.DATAPOINT="datapoint",t.GRIDLINE="gridline",t.TITLE="title",t.LEGEND="legend",t.AXISLABEL="axislabel"}(O||(O={})),function(t){t.RIGHT="right",t.LEFT="left",t.TOP="top",t.BOTTOM="bottom"}(S||(S={})),function(t){t.HORIZONTAL="horizontal",t.VERTICAL="vertical"}(M||(M={})),function(t){t.ROW="row",t.COLUMN="column",t.ROW_REVERSE="row-reverse",t.COLUMN_REVERSE="column-reverse"}(A||(A={})),function(t){t.FIXED="fixed",t.PREFERRED="preferred",t.STRETCH="stretch"}(C||(C={})),function(t){t.LEFT="left",t.RIGHT="right"}(P||(P={})),function(t){t.GRID="grid",t.VERT_OR_HORIZ="vertOrHoriz",t.PIE="pie",t.DONUT="donut"}(k||(k={})),function(t){t.START="start",t.MIDDLE="middle",t.END="end"}(L||(L={})),function(t){t.BASELINE="baseline",t.MIDDLE="middle",t.HANGING="hanging"}(D||(D={})),function(t){t.SEMI="semi",t.FULL="full"}(R||(R={})),function(t){t.UP="up",t.DOWN="down"}(I||(I={})),function(t){t.SUCCESS="success",t.WARNING="warning",t.DANGER="danger"}(N||(N={}));var j=Object.freeze({__proto__:null,get Roles(){return r},Events:U,get ChartTheme(){return _},get AxisPositions(){return b},get TruncationTypes(){return x},get CartesianOrientations(){return w},get ScaleTypes(){return T},get TooltipPosition(){return E},get TooltipTypes(){return O},get LegendPositions(){return S},get LegendOrientations(){return M},get LayoutDirection(){return A},get LayoutGrowth(){return C},get CalloutDirections(){return P},get Skeletons(){return k},get TextAnchor(){return L},get DominantBaseline(){return D},get GaugeTypes(){return R},get ArrowDirections(){return I},get Statuses(){return N}}),H="object"==typeof global&&global&&global.Object===Object&&global,V="object"==typeof self&&self&&self.Object===Object&&self,G=H||V||Function("return this")(),B=G.Symbol,F=Object.prototype,z=F.hasOwnProperty,W=F.toString,Y=B?B.toStringTag:void 0;var q=Object.prototype.toString;var X=B?B.toStringTag:void 0;function Z(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":X&&X in Object(t)?function(t){var e=z.call(t,Y),n=t[Y];try{t[Y]=void 0;var r=!0}catch(t){}var i=W.call(t);return r&&(e?t[Y]=n:delete t[Y]),i}(t):function(t){return q.call(t)}(t)}function $(t){return null!=t&&"object"==typeof t}function K(t){return"symbol"==typeof t||$(t)&&"[object Symbol]"==Z(t)}function Q(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 J=Array.isArray,tt=B?B.prototype:void 0,et=tt?tt.toString:void 0;function nt(t){if("string"==typeof t)return t;if(J(t))return Q(t,nt)+"";if(K(t))return et?et.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function rt(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var it=/^\s+|\s+$/g,ot=/^[-+]0x[0-9a-f]+$/i,at=/^0b[01]+$/i,st=/^0o[0-7]+$/i,ut=parseInt;function lt(t){if("number"==typeof t)return t;if(K(t))return NaN;if(rt(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=rt(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(it,"");var n=at.test(t);return n||st.test(t)?ut(t.slice(2),n?2:8):ot.test(t)?NaN:+t}function ct(t){return t}function ht(t){if(!rt(t))return!1;var e=Z(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var ft,dt=G["__core-js_shared__"],pt=(ft=/[^.]+$/.exec(dt&&dt.keys&&dt.keys.IE_PROTO||""))?"Symbol(src)_1."+ft:"";var gt=Function.prototype.toString;function vt(t){if(null!=t){try{return gt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var mt=/^\[object .+?Constructor\]$/,yt=Function.prototype,_t=Object.prototype,bt=yt.toString,xt=_t.hasOwnProperty,wt=RegExp("^"+bt.call(xt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Tt(t){return!(!rt(t)||(e=t,pt&&pt in e))&&(ht(t)?wt:mt).test(vt(t));var e}function Et(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return Tt(n)?n:void 0}var Ot=Et(G,"WeakMap"),St=Object.create,Mt=function(){function t(){}return function(e){if(!rt(e))return{};if(St)return St(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function At(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 Ct(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var Pt=Date.now;var kt=function(){try{var t=Et(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),Lt=function(t){var e=0,n=0;return function(){var r=Pt(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(kt?function(t,e){return kt(t,"toString",{configurable:!0,enumerable:!1,value:(n=e,function(){return n}),writable:!0});var n}:ct);function Dt(t){return t!=t}function Rt(t,e){return!!(null==t?0:t.length)&&function(t,e,n){return e==e?function(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):function(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}(t,Dt,n)}(t,e,0)>-1}var It=/^(?:0|[1-9]\d*)$/;function Nt(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&It.test(t))&&t>-1&&t%1==0&&t<e}function Ut(t,e,n){"__proto__"==e&&kt?kt(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function jt(t,e){return t===e||t!=t&&e!=e}var Ht=Object.prototype.hasOwnProperty;function Vt(t,e,n){var r=t[e];Ht.call(t,e)&&jt(r,n)&&(void 0!==n||e in t)||Ut(t,e,n)}function Gt(t,e,n,r){var i=!n;n||(n={});for(var o=-1,a=e.length;++o<a;){var s=e[o],u=r?r(n[s],t[s],s,n,t):void 0;void 0===u&&(u=t[s]),i?Ut(n,s,u):Vt(n,s,u)}return n}var Bt=Math.max;function Ft(t,e){return Lt(function(t,e,n){return e=Bt(void 0===e?t.length-1:e,0),function(){for(var r=arguments,i=-1,o=Bt(r.length-e,0),a=Array(o);++i<o;)a[i]=r[e+i];i=-1;for(var s=Array(e+1);++i<e;)s[i]=r[i];return s[e]=n(a),At(t,this,s)}}(t,e,ct),t+"")}function zt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function Wt(t){return null!=t&&zt(t.length)&&!ht(t)}function Yt(t,e,n){if(!rt(n))return!1;var r=typeof e;return!!("number"==r?Wt(n)&&Nt(e,n.length):"string"==r&&e in n)&&jt(n[e],t)}var qt=Object.prototype;function Xt(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||qt)}function Zt(t){return $(t)&&"[object Arguments]"==Z(t)}var $t=Object.prototype,Kt=$t.hasOwnProperty,Qt=$t.propertyIsEnumerable,Jt=Zt(function(){return arguments}())?Zt:function(t){return $(t)&&Kt.call(t,"callee")&&!Qt.call(t,"callee")};var te="object"==typeof t&&t&&!t.nodeType&&t,ee=te&&"object"==typeof module&&module&&!module.nodeType&&module,ne=ee&&ee.exports===te?G.Buffer:void 0,re=(ne?ne.isBuffer:void 0)||function(){return!1},ie={};function oe(t){return function(e){return t(e)}}ie["[object Float32Array]"]=ie["[object Float64Array]"]=ie["[object Int8Array]"]=ie["[object Int16Array]"]=ie["[object Int32Array]"]=ie["[object Uint8Array]"]=ie["[object Uint8ClampedArray]"]=ie["[object Uint16Array]"]=ie["[object Uint32Array]"]=!0,ie["[object Arguments]"]=ie["[object Array]"]=ie["[object ArrayBuffer]"]=ie["[object Boolean]"]=ie["[object DataView]"]=ie["[object Date]"]=ie["[object Error]"]=ie["[object Function]"]=ie["[object Map]"]=ie["[object Number]"]=ie["[object Object]"]=ie["[object RegExp]"]=ie["[object Set]"]=ie["[object String]"]=ie["[object WeakMap]"]=!1;var ae="object"==typeof t&&t&&!t.nodeType&&t,se=ae&&"object"==typeof module&&module&&!module.nodeType&&module,ue=se&&se.exports===ae&&H.process,le=function(){try{var t=se&&se.require&&se.require("util").types;return t||ue&&ue.binding&&ue.binding("util")}catch(t){}}(),ce=le&&le.isTypedArray,he=ce?oe(ce):function(t){return $(t)&&zt(t.length)&&!!ie[Z(t)]},fe=Object.prototype.hasOwnProperty;function de(t,e){var n=J(t),r=!n&&Jt(t),i=!n&&!r&&re(t),o=!n&&!r&&!i&&he(t),a=n||r||i||o,s=a?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],u=s.length;for(var l in t)!e&&!fe.call(t,l)||a&&("length"==l||i&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Nt(l,u))||s.push(l);return s}function pe(t,e){return function(n){return t(e(n))}}var ge=pe(Object.keys,Object),ve=Object.prototype.hasOwnProperty;function me(t){return Wt(t)?de(t):function(t){if(!Xt(t))return ge(t);var e=[];for(var n in Object(t))ve.call(t,n)&&"constructor"!=n&&e.push(n);return e}(t)}var ye=Object.prototype.hasOwnProperty;function _e(t){if(!rt(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=Xt(t),n=[];for(var r in t)("constructor"!=r||!e&&ye.call(t,r))&&n.push(r);return n}function be(t){return Wt(t)?de(t,!0):_e(t)}var xe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,we=/^\w*$/;function Te(t,e){if(J(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!K(t))||(we.test(t)||!xe.test(t)||null!=e&&t in Object(e))}var Ee=Et(Object,"create");var Oe=Object.prototype.hasOwnProperty;var Se=Object.prototype.hasOwnProperty;function Me(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Ae(t,e){for(var n=t.length;n--;)if(jt(t[n][0],e))return n;return-1}Me.prototype.clear=function(){this.__data__=Ee?Ee(null):{},this.size=0},Me.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Me.prototype.get=function(t){var e=this.__data__;if(Ee){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return Oe.call(e,t)?e[t]:void 0},Me.prototype.has=function(t){var e=this.__data__;return Ee?void 0!==e[t]:Se.call(e,t)},Me.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Ee&&void 0===e?"__lodash_hash_undefined__":e,this};var Ce=Array.prototype.splice;function Pe(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])}}Pe.prototype.clear=function(){this.__data__=[],this.size=0},Pe.prototype.delete=function(t){var e=this.__data__,n=Ae(e,t);return!(n<0)&&(n==e.length-1?e.pop():Ce.call(e,n,1),--this.size,!0)},Pe.prototype.get=function(t){var e=this.__data__,n=Ae(e,t);return n<0?void 0:e[n][1]},Pe.prototype.has=function(t){return Ae(this.__data__,t)>-1},Pe.prototype.set=function(t,e){var n=this.__data__,r=Ae(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var ke=Et(G,"Map");function Le(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function De(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])}}De.prototype.clear=function(){this.size=0,this.__data__={hash:new Me,map:new(ke||Pe),string:new Me}},De.prototype.delete=function(t){var e=Le(this,t).delete(t);return this.size-=e?1:0,e},De.prototype.get=function(t){return Le(this,t).get(t)},De.prototype.has=function(t){return Le(this,t).has(t)},De.prototype.set=function(t,e){var n=Le(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function Re(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Re.Cache||De),n}Re.Cache=De;var Ie=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ne=/\\(\\)?/g,Ue=function(t){var e=Re(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(Ie,(function(t,n,r,i){e.push(r?i.replace(Ne,"$1"):n||t)})),e}));function je(t){return null==t?"":nt(t)}function He(t,e){return J(t)?t:Te(t,e)?[t]:Ue(je(t))}function Ve(t){if("string"==typeof t||K(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Ge(t,e){for(var n=0,r=(e=He(e,t)).length;null!=t&&n<r;)t=t[Ve(e[n++])];return n&&n==r?t:void 0}function Be(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var Fe=B?B.isConcatSpreadable:void 0;function ze(t){return J(t)||Jt(t)||!!(Fe&&t&&t[Fe])}var We=pe(Object.getPrototypeOf,Object),Ye=Function.prototype,qe=Object.prototype,Xe=Ye.toString,Ze=qe.hasOwnProperty,$e=Xe.call(Object);var Ke=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"}),Qe=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Je=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var tn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var en=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var nn="\\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",rn="["+nn+"]",on="\\d+",an="[\\u2700-\\u27bf]",sn="[a-z\\xdf-\\xf6\\xf8-\\xff]",un="[^\\ud800-\\udfff"+nn+on+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",ln="(?:\\ud83c[\\udde6-\\uddff]){2}",cn="[\\ud800-\\udbff][\\udc00-\\udfff]",hn="[A-Z\\xc0-\\xd6\\xd8-\\xde]",fn="(?:"+sn+"|"+un+")",dn="(?:"+hn+"|"+un+")",pn="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",gn="[\\ufe0e\\ufe0f]?"+pn+("(?:\\u200d(?:"+["[^\\ud800-\\udfff]",ln,cn].join("|")+")[\\ufe0e\\ufe0f]?"+pn+")*"),vn="(?:"+[an,ln,cn].join("|")+")"+gn,mn=RegExp([hn+"?"+sn+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[rn,hn,"$"].join("|")+")",dn+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[rn,hn+fn,"$"].join("|")+")",hn+"?"+fn+"+(?:['’](?:d|ll|m|re|s|t|ve))?",hn+"+(?:['’](?: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_])",on,vn].join("|"),"g");function yn(t,e,n){return t=je(t),void 0===(e=n?void 0:e)?function(t){return en.test(t)}(t)?function(t){return t.match(mn)||[]}(t):function(t){return t.match(tn)||[]}(t):t.match(e)||[]}var _n=RegExp("['’]","g");function bn(t,e,n){return void 0===n&&(n=e,e=void 0),void 0!==n&&(n=(n=lt(n))==n?n:0),void 0!==e&&(e=(e=lt(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}(lt(t),e,n)}function xn(t){var e=this.__data__=new Pe(t);this.size=e.size}xn.prototype.clear=function(){this.__data__=new Pe,this.size=0},xn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},xn.prototype.get=function(t){return this.__data__.get(t)},xn.prototype.has=function(t){return this.__data__.has(t)},xn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Pe){var r=n.__data__;if(!ke||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new De(r)}return n.set(t,e),this.size=n.size,this};var wn="object"==typeof t&&t&&!t.nodeType&&t,Tn=wn&&"object"==typeof module&&module&&!module.nodeType&&module,En=Tn&&Tn.exports===wn?G.Buffer:void 0,On=En?En.allocUnsafe:void 0;function Sn(t,e){if(e)return t.slice();var n=t.length,r=On?On(n):new t.constructor(n);return t.copy(r),r}function Mn(){return[]}var An=Object.prototype.propertyIsEnumerable,Cn=Object.getOwnPropertySymbols,Pn=Cn?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}(Cn(t),(function(e){return An.call(t,e)})))}:Mn;var kn=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)Be(e,Pn(t)),t=We(t);return e}:Mn;function Ln(t,e,n){var r=e(t);return J(t)?r:Be(r,n(t))}function Dn(t){return Ln(t,me,Pn)}function Rn(t){return Ln(t,be,kn)}var In=Et(G,"DataView"),Nn=Et(G,"Promise"),Un=Et(G,"Set"),jn=vt(In),Hn=vt(ke),Vn=vt(Nn),Gn=vt(Un),Bn=vt(Ot),Fn=Z;(In&&"[object DataView]"!=Fn(new In(new ArrayBuffer(1)))||ke&&"[object Map]"!=Fn(new ke)||Nn&&"[object Promise]"!=Fn(Nn.resolve())||Un&&"[object Set]"!=Fn(new Un)||Ot&&"[object WeakMap]"!=Fn(new Ot))&&(Fn=function(t){var e=Z(t),n="[object Object]"==e?t.constructor:void 0,r=n?vt(n):"";if(r)switch(r){case jn:return"[object DataView]";case Hn:return"[object Map]";case Vn:return"[object Promise]";case Gn:return"[object Set]";case Bn:return"[object WeakMap]"}return e});var zn=Fn,Wn=Object.prototype.hasOwnProperty;var Yn=G.Uint8Array;function qn(t){var e=new t.constructor(t.byteLength);return new Yn(e).set(new Yn(t)),e}var Xn=/\w*$/;var Zn=B?B.prototype:void 0,$n=Zn?Zn.valueOf:void 0;function Kn(t,e){var n=e?qn(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Qn(t,e,n){var r,i,o,a=t.constructor;switch(e){case"[object ArrayBuffer]":return qn(t);case"[object Boolean]":case"[object Date]":return new a(+t);case"[object DataView]":return function(t,e){var n=e?qn(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 Kn(t,n);case"[object Map]":return new a;case"[object Number]":case"[object String]":return new a(t);case"[object RegExp]":return(o=new(i=t).constructor(i.source,Xn.exec(i))).lastIndex=i.lastIndex,o;case"[object Set]":return new a;case"[object Symbol]":return r=t,$n?Object($n.call(r)):{}}}function Jn(t){return"function"!=typeof t.constructor||Xt(t)?{}:Mt(We(t))}var tr=le&&le.isMap,er=tr?oe(tr):function(t){return $(t)&&"[object Map]"==zn(t)};var nr=le&&le.isSet,rr=nr?oe(nr):function(t){return $(t)&&"[object Set]"==zn(t)},ir={};function or(t,e,n,r,i,o){var a,s=1&e,u=2&e,l=4&e;if(n&&(a=i?n(t,r,i,o):n(t)),void 0!==a)return a;if(!rt(t))return t;var c=J(t);if(c){if(a=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&Wn.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!s)return Ct(t,a)}else{var h=zn(t),f="[object Function]"==h||"[object GeneratorFunction]"==h;if(re(t))return Sn(t,s);if("[object Object]"==h||"[object Arguments]"==h||f&&!i){if(a=u||f?{}:Jn(t),!s)return u?function(t,e){return Gt(t,kn(t),e)}(t,function(t,e){return t&&Gt(e,be(e),t)}(a,t)):function(t,e){return Gt(t,Pn(t),e)}(t,function(t,e){return t&&Gt(e,me(e),t)}(a,t))}else{if(!ir[h])return i?t:{};a=Qn(t,h,s)}}o||(o=new xn);var d=o.get(t);if(d)return d;o.set(t,a),rr(t)?t.forEach((function(r){a.add(or(r,e,n,r,t,o))})):er(t)&&t.forEach((function(r,i){a.set(i,or(r,e,n,i,t,o))}));var p=l?u?Rn:Dn:u?keysIn:me,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]),Vt(a,i,or(r,e,n,i,t,o))})),a}ir["[object Arguments]"]=ir["[object Array]"]=ir["[object ArrayBuffer]"]=ir["[object DataView]"]=ir["[object Boolean]"]=ir["[object Date]"]=ir["[object Float32Array]"]=ir["[object Float64Array]"]=ir["[object Int8Array]"]=ir["[object Int16Array]"]=ir["[object Int32Array]"]=ir["[object Map]"]=ir["[object Number]"]=ir["[object Object]"]=ir["[object RegExp]"]=ir["[object Set]"]=ir["[object String]"]=ir["[object Symbol]"]=ir["[object Uint8Array]"]=ir["[object Uint8ClampedArray]"]=ir["[object Uint16Array]"]=ir["[object Uint32Array]"]=!0,ir["[object Error]"]=ir["[object Function]"]=ir["[object WeakMap]"]=!1;function ar(t){return or(t,5)}function sr(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new De;++e<n;)this.add(t[e])}function ur(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 lr(t,e){return t.has(e)}sr.prototype.add=sr.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},sr.prototype.has=function(t){return this.__data__.has(t)};function cr(t,e,n,r,i,o){var a=1&n,s=t.length,u=e.length;if(s!=u&&!(a&&u>s))return!1;var l=o.get(t);if(l&&o.get(e))return l==e;var c=-1,h=!0,f=2&n?new sr:void 0;for(o.set(t,e),o.set(e,t);++c<s;){var d=t[c],p=e[c];if(r)var g=a?r(p,d,c,e,t,o):r(d,p,c,t,e,o);if(void 0!==g){if(g)continue;h=!1;break}if(f){if(!ur(e,(function(t,e){if(!lr(f,e)&&(d===t||i(d,t,n,r,o)))return f.push(e)}))){h=!1;break}}else if(d!==p&&!i(d,p,n,r,o)){h=!1;break}}return o.delete(t),o.delete(e),h}function hr(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function fr(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}var dr=B?B.prototype:void 0,pr=dr?dr.valueOf:void 0;var gr=Object.prototype.hasOwnProperty;var vr=Object.prototype.hasOwnProperty;function mr(t,e,n,r,i,o){var a=J(t),s=J(e),u=a?"[object Array]":zn(t),l=s?"[object Array]":zn(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&&re(t)){if(!re(e))return!1;a=!0,c=!1}if(f&&!c)return o||(o=new xn),a||he(t)?cr(t,e,n,r,i,o):function(t,e,n,r,i,o,a){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!o(new Yn(t),new Yn(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return jt(+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=hr;case"[object Set]":var u=1&r;if(s||(s=fr),t.size!=e.size&&!u)return!1;var l=a.get(t);if(l)return l==e;r|=2,a.set(t,e);var c=cr(s(t),s(e),r,i,o,a);return a.delete(t),c;case"[object Symbol]":if(pr)return pr.call(t)==pr.call(e)}return!1}(t,e,u,n,r,i,o);if(!(1&n)){var d=c&&vr.call(t,"__wrapped__"),p=h&&vr.call(e,"__wrapped__");if(d||p){var g=d?t.value():t,v=p?e.value():e;return o||(o=new xn),i(g,v,n,r,o)}}return!!f&&(o||(o=new xn),function(t,e,n,r,i,o){var a=1&n,s=Dn(t),u=s.length;if(u!=Dn(e).length&&!a)return!1;for(var l=u;l--;){var c=s[l];if(!(a?c in e:gr.call(e,c)))return!1}var h=o.get(t);if(h&&o.get(e))return h==e;var f=!0;o.set(t,e),o.set(e,t);for(var d=a;++l<u;){var p=t[c=s[l]],g=e[c];if(r)var v=a?r(g,p,c,e,t,o):r(p,g,c,t,e,o);if(!(void 0===v?p===g||i(p,g,n,r,o):v)){f=!1;break}d||(d="constructor"==c)}if(f&&!d){var m=t.constructor,y=e.constructor;m!=y&&"constructor"in t&&"constructor"in e&&!("function"==typeof m&&m instanceof m&&"function"==typeof y&&y instanceof y)&&(f=!1)}return o.delete(t),o.delete(e),f}(t,e,n,r,i,o))}function yr(t,e,n,r,i){return t===e||(null==t||null==e||!$(t)&&!$(e)?t!=t&&e!=e:mr(t,e,n,r,yr,i))}function _r(t){return t==t&&!rt(t)}function br(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}}function xr(t){var e=function(t){for(var e=me(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,_r(i)]}return e}(t);return 1==e.length&&e[0][2]?br(e[0][0],e[0][1]):function(n){return n===t||function(t,e,n,r){var i=n.length,o=i,a=!r;if(null==t)return!o;for(t=Object(t);i--;){var s=n[i];if(a&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++i<o;){var u=(s=n[i])[0],l=t[u],c=s[1];if(a&&s[2]){if(void 0===l&&!(u in t))return!1}else{var h=new xn;if(r)var f=r(l,c,u,t,e,h);if(!(void 0===f?yr(c,l,3,r,h):f))return!1}}return!0}(n,t,e)}}function wr(t,e){return null!=t&&e in Object(t)}function Tr(t,e){return null!=t&&function(t,e,n){for(var r=-1,i=(e=He(e,t)).length,o=!1;++r<i;){var a=Ve(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&zt(i)&&Nt(a,i)&&(J(t)||Jt(t))}(t,e,wr)}function Er(t,e){return Te(t)&&_r(e)?br(Ve(t),e):function(n){var r=function(t,e,n){var r=null==t?void 0:Ge(t,e);return void 0===r?n:r}(n,t);return void 0===r&&r===e?Tr(n,t):yr(e,r,3)}}function Or(t){return Te(t)?(e=Ve(t),function(t){return null==t?void 0:t[e]}):function(t){return function(e){return Ge(e,t)}}(t);var e}function Sr(t){return"function"==typeof t?t:null==t?ct:"object"==typeof t?J(t)?Er(t[0],t[1]):xr(t):Or(t)}var Mr,Ar=function(t,e,n){for(var r=-1,i=Object(t),o=n(t),a=o.length;a--;){var s=o[Mr?a:++r];if(!1===e(i[s],s,i))break}return t};var Cr=function(t,e){return function(n,r){if(null==n)return n;if(!Wt(n))return t(n,r);for(var i=n.length,o=e?i:-1,a=Object(n);(e?o--:++o<i)&&!1!==r(a[o],o,a););return n}}((function(t,e){return t&&Ar(t,e,me)})),Pr=function(){return G.Date.now()},kr=Math.max,Lr=Math.min;function Dr(t,e,n){var r,i,o,a,s,u,l=0,c=!1,h=!1,f=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function d(e){var n=r,o=i;return r=i=void 0,l=e,a=t.apply(o,n)}function p(t){return l=t,s=setTimeout(v,e),c?d(t):a}function g(t){var n=t-u;return void 0===u||n>=e||n<0||h&&t-l>=o}function v(){var t=Pr();if(g(t))return m(t);s=setTimeout(v,function(t){var n=e-(t-u);return h?Lr(n,o-(t-l)):n}(t))}function m(t){return s=void 0,f&&r?d(t):(r=i=void 0,a)}function y(){var t=Pr(),n=g(t);if(r=arguments,i=this,u=t,n){if(void 0===s)return p(u);if(h)return clearTimeout(s),s=setTimeout(v,e),d(u)}return void 0===s&&(s=setTimeout(v,e)),a}return e=lt(e)||0,rt(n)&&(c=!!n.leading,o=(h="maxWait"in n)?kr(lt(n.maxWait)||0,e):o,f="trailing"in n?!!n.trailing:f),y.cancel=function(){void 0!==s&&clearTimeout(s),l=0,r=u=i=s=void 0},y.flush=function(){return void 0===s?a:m(Pr())},y}function Rr(t,e,n){(void 0===n||jt(t[e],n))&&(void 0!==n||e in t)||Ut(t,e,n)}function Ir(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}function Nr(t,e,n,r,i,o,a){var s=Ir(t,n),u=Ir(e,n),l=a.get(u);if(l)Rr(t,n,l);else{var c,h=o?o(s,u,n+"",t,e,a):void 0,f=void 0===h;if(f){var d=J(u),p=!d&&re(u),g=!d&&!p&&he(u);h=u,d||p||g?J(s)?h=s:$(c=s)&&Wt(c)?h=Ct(s):p?(f=!1,h=Sn(u,!0)):g?(f=!1,h=Kn(u,!0)):h=[]:function(t){if(!$(t)||"[object Object]"!=Z(t))return!1;var e=We(t);if(null===e)return!0;var n=Ze.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Xe.call(n)==$e}(u)||Jt(u)?(h=s,Jt(s)?h=function(t){return Gt(t,be(t))}(s):rt(s)&&!ht(s)||(h=Jn(u))):f=!1}f&&(a.set(u,h),i(h,u,r,o,a),a.delete(u)),Rr(t,n,h)}}function Ur(t,e,n,r,i){t!==e&&Ar(e,(function(o,a){if(i||(i=new xn),rt(o))Nr(t,e,a,n,Ur,r,i);else{var s=r?r(Ir(t,a),o,a+"",t,e,i):void 0;void 0===s&&(s=o),Rr(t,a,s)}}),be)}function jr(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 Hr(t,e){var n=-1,r=Wt(t)?Array(t.length):[];return Cr(t,(function(t,i,o){r[++n]=e(t,i,o)})),r}function Vr(t,e){return function t(e,n,r,i,o){var a=-1,s=e.length;for(r||(r=ze),o||(o=[]);++a<s;){var u=e[a];n>0&&r(u)?n>1?t(u,n-1,r,i,o):Be(o,u):i||(o[o.length]=u)}return o}(function(t,e){return(J(t)?Q:Hr)(t,Sr(e))}(t,e),1/0)}function Gr(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}function Br(t,e){return yr(t,e)}var Fr,zr,Wr=(Fr=function(t,e,n){return t+(n?"-":"")+e.toLowerCase()},function(t){return function(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}(yn(function(t){return(t=je(t))&&t.replace(Qe,Ke).replace(Je,"")}(t).replace(_n,"")),Fr,"")}),Yr=(zr=function(t,e,n){Ur(t,e,n)},Ft((function(t,e){var n=-1,r=e.length,i=r>1?e[r-1]:void 0,o=r>2?e[2]:void 0;for(i=zr.length>3&&"function"==typeof i?(r--,i):void 0,o&&Yt(e[0],e[1],o)&&(i=r<3?void 0:i,r=1),t=Object(t);++n<r;){var a=e[n];a&&zr(t,a,n,i)}return t})));function qr(t,e){var n;return Cr(t,(function(t,r,i){return!(n=e(t,r,i))})),!!n}function Xr(t,e,n){var r=J(t)?ur:qr;return n&&Yt(t,e,n)&&(e=void 0),r(t,Sr(e))}var Zr,$r=Un&&1/fr(new Un([,-0]))[1]==1/0?function(t){return new Un(t)}:function(){};function Kr(t){return t&&t.length?function(t,e,n){var r=-1,i=Rt,o=t.length,a=!0,s=[],u=s;if(n)a=!1,i=jr;else if(o>=200){var l=e?null:$r(t);if(l)return fr(l);a=!1,i=lr,u=new sr}else u=e?[]:s;t:for(;++r<o;){var c=t[r],h=e?e(c):c;if(c=n||0!==c?c:0,a&&h==h){for(var f=u.length;f--;)if(u[f]===h)continue t;e&&u.push(h),s.push(c)}else i(u,h,n)||(u!==s&&u.push(h),s.push(c))}return s}(t):[]}function Qr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Jr(t,e){return t(e={exports:{}},e.exports),e.exports}!function(t){t.debounce=Dr,t.clone=ar,t.merge=Yr,t.removeArrayDuplicates=Kr,t.clamp=bn,t.isEqual=Br,t.flatMapDeep=Vr,t.kebabCase=Wr,t.fromPairs=Gr,t.some=Xr,t.mergeDefaultChartOptions=function(e,n){e=t.clone(e);var r=Object.keys(n.axes||{});for(var i in 0===r.length&&delete e.axes,e.axes)if(r.includes(i)){var o=n.axes[i];(o.primary||o.secondary)&&console.warn("`primary` & `secondary` are no longer needed for axis configurations. Read more here https://carbon-design-system.github.io/carbon-charts/?path=/story/tutorials--tabular-data-format");var a=o.mapsTo;if(null==a){var s=o.scaleType;null==s?o.mapsTo="value":s===T.TIME?o.mapsTo="date":s===T.LABELS&&(o.mapsTo="key")}}else delete e.axes[i];return t.merge(e,n)},t.getDimensions=function(t){return{width:parseFloat(t.style.width.replace("px","")||t.offsetWidth),height:parseFloat(t.style.height.replace("px","")||t.offsetHeight)}},t.getTranslationValues=function(t){if(t){var e=t.getAttribute("transform").match(/translate\([0-9]+\.?[0-9]*,[0-9]+\.?[0-9]*\)/);if(!e)return null;if(e[0]){var n=e[0].replace(/translate\(/,"").replace(/\)/,"").split(",");return{tx:n[0],ty:n[1]}}return null}},t.getTranformOffsets=function(t){var e=/\(([^)]+)\)/.exec(t)[1].split(",");return{x:parseFloat(e[0]),y:parseFloat(e[1])}},t.formatWidthHeightValues=function(t){var e=t.toString();return e.match(/[a-z]/i)?e:e+"px"},t.capitalizeFirstLetter=function(t){return t[0].toUpperCase()+t.slice(1)},t.convertValueToPercentage=function(t,e){var n=t/e.reduce((function(t,e){return t+e.value}),0)*100;return n%1!=0?parseFloat(n.toFixed(1)):n},t.truncateLabel=function(t,e,n){return n>t.length?t:e===x.MID_LINE?t.substr(0,n/2)+"..."+t.substr(-n/2):e===x.FRONT_LINE?"..."+t.substr(-n):e===x.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,o=e;i<o.length;i++){var a=o[i];if(null===r[a]||void 0===r[a])return null;r=r[a]}return r}return null},t.flipSVGCoordinatesBasedOnOrientation=function(t,e){return e===w.HORIZONTAL?{y0:t.x0,y1:t.x1,x0:t.y0,x1:t.y1}:t},t.generateSVGPathString=function(e,n){var r=t.flipSVGCoordinatesBasedOnOrientation(e,n),i=r.x0,o=r.x1,a=r.y0,s=r.y1;return"M"+i+","+a+"L"+i+","+s+"L"+o+","+s+"L"+o+","+a+"L"+i+","+a},t.flipDomainAndRangeBasedOnOrientation=function(t,e,n){return n===w.VERTICAL?[t,e]:[e,t]},t.compareNumeric=function(t,e){return Number(t)===Number(e)}}(Zr||(Zr={}));var ti=Jr((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}));Qr(ti);var ei=Jr((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}));Qr(ei);var ni=Jr((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,r=(n=ei)&&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}));Qr(ni);var ri=Jr((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}));Qr(ri);var ii=Jr((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e,n){var r,i=n||{};if("formatting"===(i.context?String(i.context):"standalone")&&t.formattingValues){var o=t.defaultFormattingWidth||t.defaultWidth,a=i.width?String(i.width):o;r=t.formattingValues[a]||t.formattingValues[o]}else{var s=t.defaultWidth,u=i.width?String(i.width):t.defaultWidth;r=t.values[u]||t.values[s]}return r[t.argumentCallback?t.argumentCallback(e):e]}},t.exports=e.default}));Qr(ii);var oi=Jr((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,r=(n=ii)&&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}));Qr(oi);var ai=Jr((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e,n){var r=String(e),i=n||{},o=r.match(t.matchPattern);if(!o)return null;var a=o[0],s=r.match(t.parsePattern);if(!s)return null;var u=t.valueCallback?t.valueCallback(s[0]):s[0];return{value:u=i.valueCallback?i.valueCallback(u):u,rest:r.slice(a.length)}}},t.exports=e.default}));Qr(ai);var si=Jr((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e,n){var r=String(e),i=n||{},o=i.width,a=o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth],s=r.match(a);if(!s)return null;var u,l=s[0],c=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth];return u="[object Array]"===Object.prototype.toString.call(c)?function(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return n}(c,(function(t){return t.test(r)})):function(t,e){for(var n in t)if(t.hasOwnProperty(n)&&e(t[n]))return n}(c,(function(t){return t.test(r)})),u=t.valueCallback?t.valueCallback(u):u,{value:u=i.valueCallback?i.valueCallback(u):u,rest:r.slice(l.length)}}},t.exports=e.default}));Qr(si);var ui=Jr((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i(ai),r=i(si);function i(t){return t&&t.__esModule?t:{default:t}}var o={ordinalNumber:(0,n.default)({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}}),era:(0,r.default)({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:(0,r.default)({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:(0,r.default)({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:(0,r.default)({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:(0,r.default)({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};e.default=o,t.exports=e.default}));Qr(ui);var li=Qr(Jr((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=s(ti),r=s(ni),i=s(ri),o=s(oi),a=s(ui);function s(t){return t&&t.__esModule?t:{default:t}}var u={code:"en-US",formatDistance:n.default,formatLong:r.default,formatRelative:i.default,localize:o.default,match:a.default,options:{weekStartsOn:0,firstWeekContainsDate:1}};e.default=u,t.exports=e.default}))),ci={type:x.END_LINE,threshold:16,numCharacter:14},hi={position:S.BOTTOM,clickable:!0,enabled:!0,items:{status:{ACTIVE:1,DISABLED:0},horizontalSpace:12,verticalSpace:24,textYOffset:8},checkbox:{radius:6.5,spaceAfter:4},truncation:ci},fi={x:{numberOfTicks:5},y:{numberOfTicks:5}},di={datapoint:{horizontalOffset:10,enabled:!0},title:{verticalOffset:.75,width:.4}},pi=Zr.merge({},di,{gridline:{enabled:!0,threshold:.02}}),gi=Zr.merge({},pi,{datapoint:{verticalOffset:4},gridline:{enabled:!1}}),vi={top:{includeZero:!0,truncation:ci},bottom:{includeZero:!0,truncation:ci},left:{includeZero:!0,truncation:ci},right:{includeZero:!0,truncation:ci}},mi={addSpaceOnEdges:1,showDayName:!1,localeObject:li,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"}}},yi={width:null,height:null,resizable:!0,tooltip:di,legend:hi,style:{prefix:"cc"},data:{groupMapsTo:"group",loading:!1,selectedGroups:[]},color:{scale:null}},_i=Zr.merge({},yi,{axes:vi,timeScale:mi,grid:fi,tooltip:pi}),bi=Zr.merge({},_i,{bars:{maxWidth:16},timeScale:Zr.merge(mi,{addSpaceOnEdges:1}),tooltip:gi}),xi=Zr.merge({},bi,{}),wi=Zr.merge({},bi,{}),Ti=Zr.merge({},bi,{bars:Zr.merge({},bi.bars,{dividerSize:1.5})}),Ei=Zr.merge({},_i,{points:{radius:3,filled:!1}}),Oi=Zr.merge({},Ei,{timeScale:Zr.merge(mi,{addSpaceOnEdges:0})}),Si=Oi,Mi=Zr.merge({},_i,{points:{radius:4,fillOpacity:.3,filled:!0}}),Ai=Zr.merge({},_i,{bubble:{radiusMapsTo:"radius",radiusRange:function(t,e){var n=Math.min(t.width,t.height);return[3*n/400,25*n/400]},fillOpacity:.2}}),Ci=Zr.merge({},yi,{pie:{radiusOffset:-15,innerRadius:2,padAngle:.007,hoverArc:{outerRadiusOffset:3},xOffset:30,yOffset:20,yOffsetCallout:10,callout:{minSliceDegree:5,offsetX:15,offsetY:12,horizontalLineLength:8,textMargin:2},labels:{formatter:null}}}),Pi=Zr.merge({},yi,{legend:{enabled:!1},gauge:{type:R.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()}}}),ki={chart:yi,axisChart:_i,simpleBarChart:xi,groupedBarChart:wi,stackedBarChart:Ti,bubbleChart:Ai,lineChart:Ei,areaChart:Oi,stackedAreaChart:Si,scatterChart:Mi,pieChart:Ci,donutChart:Zr.merge({},Ci,{donut:{center:{numberFontSize:function(t){return Math.min(t/100*24,24)+"px"},titleFontSize:function(t){return Math.min(t/100*15,15)+"px"},titleYPosition:function(t){return Math.min(t/80*20,20)},numberFormatter:function(t){return Math.floor(t).toLocaleString()}}}}),radarChart:Zr.merge({},yi,{radar:{axes:{angle:"key",value:"value"},opacity:{unselected:.1,selected:.3},xLabelPadding:10,yLabelPadding:8,yTicksNumber:4,minRange:10,xAxisRectHeight:50,dotsRadius:5},tooltip:{gridline:{enabled:!0},valueFormatter:function(t){return null!=t?t:"N/A"}}}),gaugeChart:Pi},Li={opacity:{unselected:.3,selected:1}},Di={opacity:{unselected:0,selected:.4}},Ri={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}},Ii={ticks:{number:7,rotateIfSmallerThan:30},paddingRatio:.1},Ni={default:{size:24}},Ui=Object.freeze({__proto__:null,legend:hi,grid:fi,baseTooltip:di,axisChartTooltip:pi,barChartTooltip:gi,timeScale:mi,options:ki,lines:Li,area:Di,areas:{opacity:{unselected:.3,selected:1}},transitions:Ri,axis:Ii,spacers:Ni,tickSpaceRatioVertical:2.5,tickSpaceRatioHorizontal:3.5}),ji={10:"#fff0f1",20:"#fcd0d3",30:"#ffa4a9",40:"#ff767c",50:"#fb4b53",60:"#da1e28",70:"#a51920",80:"#750e13",90:"#570408",100:"#2c080a"},Hi={10:"#fff0f6",20:"#ffcfe1",30:"#ffa0c2",40:"#fa75a6",50:"#ee538b",60:"#d12765",70:"#a11950",80:"#760a3a",90:"#57002b",100:"#2a0a16"},Vi={10:"#f7f1ff",20:"#e6d6ff",30:"#d0b0ff",40:"#bb8eff",50:"#a66efa",60:"#8a3ffc",70:"#6e32c9",80:"#4f2196",90:"#38146b",100:"#1e1033"},Gi={10:"#edf4ff",20:"#c9deff",30:"#97c1ff",40:"#6ea6ff",50:"#408bfc",60:"#0062ff",70:"#054ada",80:"#0530ad",90:"#061f80",100:"#051243"},Bi={10:"#e3f6ff",20:"#b3e6ff",30:"#6ccaff",40:"#30b0ff",50:"#1191e6",60:"#0072c3",70:"#0058a1",80:"#003d73",90:"#002b50",100:"#07192b"},Fi={10:"#dbfbfb",20:"#92eeee",30:"#20d5d2",40:"#00bab6",50:"#009c98",60:"#007d79",70:"#006161",80:"#004548",90:"#003137",100:"#081a1c"},zi={10:"#dafbe4",20:"#9deeb2",30:"#56d679",40:"#3dbb61",50:"#24a148",60:"#198038",70:"#10642a",80:"#054719",90:"#01330f",100:"#081b09"},Wi=function(t,e){return t[e]},Yi=function(t){return Wi(Gi,t)},qi=function(t){return Wi(Bi,t)},Xi=function(t){return Wi(zi,t)},Zi=function(t){return Wi(Hi,t)},$i=function(t){return Wi(Vi,t)},Ki=function(t){return Wi(ji,t)},Qi=function(t){return Wi(Fi,t)},Ji=[$i(70),qi(50),Qi(70),Zi(70),Ki(50),Ki(90),Xi(60),Yi(80),Zi(50),"#b28600",Qi(50),qi(90),"#8a3800",$i(50)],to=[$i(60),qi(40),Qi(60),Zi(40),Ki(50),Ki(10),Xi(30),Yi(50),Zi(60),"#d2a106",Qi(40),qi(20),"#ba4e00",$i(30)],eo=Ji,no=to,ro=to,io=Ji,oo=Object.freeze({__proto__:null,WHITE:Ji,DARK:to,G10:eo,G90:no,G100:ro,DEFAULT:io});function ao(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function so(t){var e;return 1===t.length&&(e=t,t=function(t,n){return ao(e(t),n)}),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var o=r+i>>>1;t(e[o],n)<0?r=o+1:i=o}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var o=r+i>>>1;t(e[o],n)>0?i=o:r=o+1}return r}}}var uo=so(ao).right;function lo(t,e){var n,r,i,o=t.length,a=-1;if(null==e){for(;++a<o;)if(null!=(n=t[a])&&n>=n)for(r=i=n;++a<o;)null!=(n=t[a])&&(r>n&&(r=n),i<n&&(i=n))}else for(;++a<o;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=i=n;++a<o;)null!=(n=e(t[a],a,t))&&(r>n&&(r=n),i<n&&(i=n));return[r,i]}function co(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),o=new Array(i);++r<i;)o[r]=t+r*n;return o}var ho=Math.sqrt(50),fo=Math.sqrt(10),po=Math.sqrt(2);function go(t,e,n){var r,i,o,a,s=-1;if(n=+n,(t=+t)===(e=+e)&&n>0)return[t];if((r=e<t)&&(i=t,t=e,e=i),0===(a=vo(t,e,n))||!isFinite(a))return[];if(a>0)for(t=Math.ceil(t/a),e=Math.floor(e/a),o=new Array(i=Math.ceil(e-t+1));++s<i;)o[s]=(t+s)*a;else for(t=Math.floor(t*a),e=Math.ceil(e*a),o=new Array(i=Math.ceil(t-e+1));++s<i;)o[s]=(t-s)/a;return r&&o.reverse(),o}function vo(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=ho?10:o>=fo?5:o>=po?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=ho?10:o>=fo?5:o>=po?2:1)}function mo(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=ho?i*=10:o>=fo?i*=5:o>=po&&(i*=2),e<t?-i:i}function yo(t,e){var n,r,i=t.length,o=-1;if(null==e){for(;++o<i;)if(null!=(n=t[o])&&n>=n)for(r=n;++o<i;)null!=(n=t[o])&&n>r&&(r=n)}else for(;++o<i;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=n;++o<i;)null!=(n=e(t[o],o,t))&&n>r&&(r=n);return r}function _o(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function bo(){}function xo(t,e){var n=new bo;if(t instanceof bo)t.each((function(t,e){n.set(e,t)}));else if(Array.isArray(t)){var r,i=-1,o=t.length;if(null==e)for(;++i<o;)n.set(i,t[i]);else for(;++i<o;)n.set(e(r=t[i],i,t),r)}else if(t)for(var a in t)n.set(a,t[a]);return n}function wo(){}bo.prototype=xo.prototype={constructor:bo,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 To=xo.prototype;wo.prototype=function(t,e){var n=new wo;if(t instanceof wo)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:wo,has:To.has,add:function(t){return this["$"+(t+="")]=t,this},remove:To.remove,clear:To.clear,values:To.keys,size:To.size,empty:To.empty,each:To.each};var Eo=Array.prototype,Oo=Eo.map,So=Eo.slice,Mo={name:"implicit"};function Ao(){var t=xo(),e=[],n=[],r=Mo;function i(i){var o=i+"",a=t.get(o);if(!a){if(r!==Mo)return r;t.set(o,a=e.push(i))}return n[(a-1)%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=xo();for(var r,o,a=-1,s=n.length;++a<s;)t.has(o=(r=n[a])+"")||t.set(o,e.push(r));return i},i.range=function(t){return arguments.length?(n=So.call(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return Ao(e,n).unknown(r)},_o.apply(i,arguments),i}function Co(){var t,e,n=Ao().unknown(void 0),r=n.domain,i=n.range,o=[0,1],a=!1,s=0,u=0,l=.5;function c(){var n=r().length,c=o[1]<o[0],h=o[c-0],f=o[1-c];t=(f-h)/Math.max(1,n-s+2*u),a&&(t=Math.floor(t)),h+=(f-h-t*(n-s))*l,e=t*(1-s),a&&(h=Math.round(h),e=Math.round(e));var d=co(n).map((function(e){return h+t*e}));return i(c?d.reverse():d)}return delete n.unknown,n.domain=function(t){return arguments.length?(r(t),c()):r()},n.range=function(t){return arguments.length?(o=[+t[0],+t[1]],c()):o.slice()},n.rangeRound=function(t){return o=[+t[0],+t[1]],a=!0,c()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(a=!!t,c()):a},n.padding=function(t){return arguments.length?(s=Math.min(1,u=+t),c()):s},n.paddingInner=function(t){return arguments.length?(s=Math.min(1,t),c()):s},n.paddingOuter=function(t){return arguments.length?(u=+t,c()):u},n.align=function(t){return arguments.length?(l=Math.max(0,Math.min(1,t)),c()):l},n.copy=function(){return Co(r(),o).round(a).paddingInner(s).paddingOuter(u).align(l)},_o.apply(c(),arguments)}function Po(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function ko(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Lo(){}var Do="\\s*([+-]?\\d+)\\s*",Ro="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Io="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",No=/^#([0-9a-f]{3,8})$/,Uo=new RegExp("^rgb\\("+[Do,Do,Do]+"\\)$"),jo=new RegExp("^rgb\\("+[Io,Io,Io]+"\\)$"),Ho=new RegExp("^rgba\\("+[Do,Do,Do,Ro]+"\\)$"),Vo=new RegExp("^rgba\\("+[Io,Io,Io,Ro]+"\\)$"),Go=new RegExp("^hsl\\("+[Ro,Io,Io]+"\\)$"),Bo=new RegExp("^hsla\\("+[Ro,Io,Io,Ro]+"\\)$"),Fo={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 zo(){return this.rgb().formatHex()}function Wo(){return this.rgb().formatRgb()}function Yo(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=No.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?qo(e):3===n?new Ko(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?new Ko(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?new Ko(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Uo.exec(t))?new Ko(e[1],e[2],e[3],1):(e=jo.exec(t))?new Ko(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Ho.exec(t))?Xo(e[1],e[2],e[3],e[4]):(e=Vo.exec(t))?Xo(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Go.exec(t))?ea(e[1],e[2]/100,e[3]/100,1):(e=Bo.exec(t))?ea(e[1],e[2]/100,e[3]/100,e[4]):Fo.hasOwnProperty(t)?qo(Fo[t]):"transparent"===t?new Ko(NaN,NaN,NaN,0):null}function qo(t){return new Ko(t>>16&255,t>>8&255,255&t,1)}function Xo(t,e,n,r){return r<=0&&(t=e=n=NaN),new Ko(t,e,n,r)}function Zo(t){return t instanceof Lo||(t=Yo(t)),t?new Ko((t=t.rgb()).r,t.g,t.b,t.opacity):new Ko}function $o(t,e,n,r){return 1===arguments.length?Zo(t):new Ko(t,e,n,null==r?1:r)}function Ko(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Qo(){return"#"+ta(this.r)+ta(this.g)+ta(this.b)}function Jo(){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 ta(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function ea(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new ra(t,e,n,r)}function na(t){if(t instanceof ra)return new ra(t.h,t.s,t.l,t.opacity);if(t instanceof Lo||(t=Yo(t)),!t)return new ra;if(t instanceof ra)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(a=e===o?(n-r)/s+6*(n<r):n===o?(r-e)/s+2:(e-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new ra(a,s,u,t.opacity)}function ra(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function ia(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 oa(t){return function(){return t}}function aa(t){return 1==(t=+t)?sa: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):oa(isNaN(e)?n:e)}}function sa(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):oa(isNaN(t)?e:t)}Po(Lo,Yo,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:zo,formatHex:zo,formatHsl:function(){return na(this).formatHsl()},formatRgb:Wo,toString:Wo}),Po(Ko,$o,ko(Lo,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Ko(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Ko(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Qo,formatHex:Qo,formatRgb:Jo,toString:Jo})),Po(ra,(function(t,e,n,r){return 1===arguments.length?na(t):new ra(t,e,n,null==r?1:r)}),ko(Lo,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new ra(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new ra(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Ko(ia(t>=240?t-240:t+120,i,r),ia(t,i,r),ia(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 ua=function t(e){var n=aa(e);function r(t,e){var r=n((t=$o(t)).r,(e=$o(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=sa(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=o(e),t.opacity=a(e),t+""}}return r.gamma=t,r}(1);function la(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(o){for(n=0;n<r;++n)i[n]=t[n]*(1-o)+e[n]*o;return i}}function ca(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=ma(t[n],e[n]);for(;n<r;++n)a[n]=e[n];return function(t){for(n=0;n<i;++n)a[n]=o[n](t);return a}}function ha(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function fa(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function da(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]=ma(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}var pa=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ga=new RegExp(pa.source,"g");function va(t,e){var n,r,i,o=pa.lastIndex=ga.lastIndex=0,a=-1,s=[],u=[];for(t+="",e+="";(n=pa.exec(t))&&(r=ga.exec(e));)(i=r.index)>o&&(i=e.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,u.push({i:a,x:fa(n,r)})),o=ga.lastIndex;return o<e.length&&(i=e.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?u[0]?function(t){return function(e){return t(e)+""}}(u[0].x):function(t){return function(){return t}}(e):(e=u.length,function(t){for(var n,r=0;r<e;++r)s[(n=u[r]).i]=n.x(t);return s.join("")})}function ma(t,e){var n,r=typeof e;return null==e||"boolean"===r?oa(e):("number"===r?fa:"string"===r?(n=Yo(e))?(e=n,ua):va:e instanceof Yo?ua:e instanceof Date?ha:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(e)?la:Array.isArray(e)?ca:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?da:fa)(t,e)}function ya(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var _a,ba,xa,wa,Ta=180/Math.PI,Ea={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Oa(t,e,n,r,i,o){var a,s,u;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,u/=s),t*r<e*n&&(t=-t,e=-e,u=-u,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*Ta,skewX:Math.atan(u)*Ta,scaleX:a,scaleY:s}}function Sa(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(o,a){var s=[],u=[];return o=t(o),a=t(a),function(t,r,i,o,a,s){if(t!==i||r!==o){var u=a.push("translate(",null,e,null,n);s.push({i:u-4,x:fa(t,i)},{i:u-2,x:fa(r,o)})}else(i||o)&&a.push("translate("+i+e+o+n)}(o.translateX,o.translateY,a.translateX,a.translateY,s,u),function(t,e,n,o){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:fa(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(o.rotate,a.rotate,s,u),function(t,e,n,o){t!==e?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:fa(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(o.skewX,a.skewX,s,u),function(t,e,n,r,o,a){if(t!==n||e!==r){var s=o.push(i(o)+"scale(",null,",",null,")");a.push({i:s-4,x:fa(t,n)},{i:s-2,x:fa(e,r)})}else 1===n&&1===r||o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,s,u),o=a=null,function(t){for(var e,n=-1,r=u.length;++n<r;)s[(e=u[n]).i]=e.x(t);return s.join("")}}}var Ma=Sa((function(t){return"none"===t?Ea:(_a||(_a=document.createElement("DIV"),ba=document.documentElement,xa=document.defaultView),_a.style.transform=t,t=xa.getComputedStyle(ba.appendChild(_a),null).getPropertyValue("transform"),ba.removeChild(_a),Oa(+(t=t.slice(7,-1).split(","))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),Aa=Sa((function(t){return null==t?Ea:(wa||(wa=document.createElementNS("http://www.w3.org/2000/svg","g")),wa.setAttribute("transform",t),(t=wa.transform.baseVal.consolidate())?Oa((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Ea)}),", ",")",")");function Ca(t){return+t}var Pa=[0,1];function ka(t){return t}function La(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:function(t){return function(){return t}}(isNaN(e)?NaN:.5)}function Da(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 Ra(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=La(i,r),o=n(a,o)):(r=La(r,i),o=n(o,a)),function(t){return o(r(t))}}function Ia(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<r;)i[a]=La(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(e){var n=uo(t,e,1,r)-1;return o[n](i[n](e))}}function Na(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Ua(){var t,e,n,r,i,o,a=Pa,s=Pa,u=ma,l=ka;function c(){return r=Math.min(a.length,s.length)>2?Ia:Ra,i=o=null,h}function h(e){return isNaN(e=+e)?n:(i||(i=r(a.map(t),s,u)))(t(l(e)))}return h.invert=function(n){return l(e((o||(o=r(s,a.map(t),fa)))(n)))},h.domain=function(t){return arguments.length?(a=Oo.call(t,Ca),l===ka||(l=Da(a)),c()):a.slice()},h.range=function(t){return arguments.length?(s=So.call(t),c()):s.slice()},h.rangeRound=function(t){return s=So.call(t),u=ya,c()},h.clamp=function(t){return arguments.length?(l=t?Da(a):ka,h):l!==ka},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 ja(t,e){return Ua()(t,e)}function Ha(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 Va(t){return(t=Ha(Math.abs(t)))?t[1]:NaN}var Ga,Ba=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Fa(t){if(!(e=Ba.exec(t)))throw new Error("invalid format: "+t);var e;return new za({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 za(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 Wa(t,e){var n=Ha(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")}Fa.prototype=za.prototype,za.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 Ya={"%":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 Wa(100*t,e)},r:Wa,s:function(t,e){var n=Ha(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(Ga=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Ha(t,Math.max(0,e+o-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function qa(t){return t}var Xa,Za,$a,Ka=Array.prototype.map,Qa=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Ja(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?qa:(e=Ka.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,o=[],a=0,s=e[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),o.push(t.substring(i-=s,i+s)),!((u+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",a=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?qa:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(Ka.call(t.numerals,String)),u=void 0===t.percent?"%":t.percent+"",l=void 0===t.minus?"-":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=Fa(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"):Ya[y]||(void 0===v&&(v=12),m=!0,y="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var _="$"===f?i:"#"===f&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",b="$"===f?o:/[%p]/.test(y)?u:"",x=Ya[y],w=/[defgprs%]/.test(y);function T(t){var i,o,u,f=_,T=b;if("c"===y)T=x(t)+T,t="";else{var E=(t=+t)<0;if(t=isNaN(t)?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,T=("s"===y?Qa[8+Ga/3]:"")+T+(E&&"("===h?")":""),w)for(i=-1,o=t.length;++i<o;)if(48>(u=t.charCodeAt(i))||u>57){T=(46===u?a+t.slice(i+1):t.slice(i))+T,t=t.slice(0,i);break}}g&&!d&&(t=r(t,1/0));var O=f.length+t.length+T.length,S=O<p?new Array(p-O+1).join(e):"";switch(g&&d&&(t=r(S+t,S.length?p-T.length:1/0),S=""),n){case"<":t=f+t+T+S;break;case"=":t=f+S+t+T;break;case"^":t=S.slice(0,O=S.length>>1)+f+t+T+S.slice(O);break;default:t=S+f+t+T}return s(t)}return v=void 0===v?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v)),T.toString=function(){return t+""},T}return{format:h,formatPrefix:function(t,e){var n=h(((t=Fa(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Va(e)/3))),i=Math.pow(10,-r),o=Qa[8+r/3];return function(t){return n(i*t)+o}}}}function ts(t,e,n,r){var i,o=mo(t,e,n);switch((r=Fa(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Va(e)/3)))-Va(Math.abs(t)))}(o,a))||(r.precision=i),$a(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Va(e)-Va(t))+1}(o,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(t){return Math.max(0,-Va(Math.abs(t)))}(o))||(r.precision=i-2*("%"===r.type))}return Za(r)}function es(t){var e=t.domain;return t.ticks=function(t){var n=e();return go(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return ts(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i=e(),o=0,a=i.length-1,s=i[o],u=i[a];return u<s&&(r=s,s=u,u=r,r=o,o=a,a=r),(r=vo(s,u,n))>0?r=vo(s=Math.floor(s/r)*r,u=Math.ceil(u/r)*r,n):r<0&&(r=vo(s=Math.ceil(s*r)/r,u=Math.floor(u*r)/r,n)),r>0?(i[o]=Math.floor(s/r)*r,i[a]=Math.ceil(u/r)*r,e(i)):r<0&&(i[o]=Math.ceil(s*r)/r,i[a]=Math.floor(u*r)/r,e(i)),t},t}function ns(){var t=ja(ka,ka);return t.copy=function(){return Na(t,ns())},_o.apply(t,arguments),es(t)}function rs(t,e){var n,r=0,i=(t=t.slice()).length-1,o=t[r],a=t[i];return a<o&&(n=r,r=i,i=n,n=o,o=a,a=n),t[r]=e.floor(o),t[i]=e.ceil(a),t}function is(t){return Math.log(t)}function os(t){return Math.exp(t)}function as(t){return-Math.log(-t)}function ss(t){return-Math.exp(-t)}function us(t){return isFinite(t)?+("1e"+t):t<0?0:t}function ls(t){return function(e){return-t(-e)}}function cs(t){var e,n,r=t(is,os),i=r.domain,o=10;function a(){return e=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),function(e){return Math.log(e)/t})}(o),n=function(t){return 10===t?us:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}(o),i()[0]<0?(e=ls(e),n=ls(n),t(as,ss)):t(is,os),r}return r.base=function(t){return arguments.length?(o=+t,a()):o},r.domain=function(t){return arguments.length?(i(t),a()):i()},r.ticks=function(t){var r,a=i(),s=a[0],u=a[a.length-1];(r=u<s)&&(f=s,s=u,u=f);var l,c,h,f=e(s),d=e(u),p=null==t?10:+t,g=[];if(!(o%1)&&d-f<p){if(f=Math.round(f)-1,d=Math.round(d)+1,s>0){for(;f<d;++f)for(c=1,l=n(f);c<o;++c)if(!((h=l*c)<s)){if(h>u)break;g.push(h)}}else for(;f<d;++f)for(c=o-1,l=n(f);c>=1;--c)if(!((h=l*c)<s)){if(h>u)break;g.push(h)}}else g=go(f,d,Math.min(d-f,p)).map(n);return r?g.reverse():g},r.tickFormat=function(t,i){if(null==i&&(i=10===o?".0e":","),"function"!=typeof i&&(i=Za(i)),t===1/0)return i;null==t&&(t=10);var a=Math.max(1,o*t/r.ticks().length);return function(t){var r=t/n(Math.round(e(t)));return r*o<o-.5&&(r*=o),r<=a?i(t):""}},r.nice=function(){return i(rs(i(),{floor:function(t){return n(Math.floor(e(t)))},ceil:function(t){return n(Math.ceil(e(t)))}}))},r}Xa=Ja({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),Za=Xa.format,$a=Xa.formatPrefix;var hs=new Date,fs=new Date;function ds(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=function(e){return t(e=new Date(+e)),e},i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e<n-t?e:n},i.offset=function(t,n){return e(t=new Date(+t),null==n?1:Math.floor(n)),t},i.range=function(n,r,o){var a,s=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return s;do{s.push(a=new Date(+n)),e(n,o),t(n)}while(a<n&&n<r);return s},i.filter=function(n){return ds((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 hs.setTime(+e),fs.setTime(+r),t(hs),t(fs),Math.floor(n(hs,fs))},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 ps=ds((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));ps.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?ds((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):ps:null};var gs=ds((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()})),vs=ds((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()})),ms=ds((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()})),ys=ds((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 _s(t){return ds((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 bs=_s(0),xs=_s(1),ws=(_s(2),_s(3),_s(4)),Ts=(_s(5),_s(6),ds((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()}))),Es=ds((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()}));Es.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ds((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 Os=ds((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/864e5}),(function(t){return t.getUTCDate()-1}));function Ss(t){return ds((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 Ms=Ss(0),As=Ss(1),Cs=(Ss(2),Ss(3),Ss(4)),Ps=(Ss(5),Ss(6),ds((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 ks(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 Ls(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 Ds(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}Ps.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ds((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 Rs,Is,Ns={"-":"",_:" ",0:"0"},Us=/^\s*\d+/,js=/^%/,Hs=/[\\^$*+?|[\]().{}]/g;function Vs(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(e)+i:i)}function Gs(t){return t.replace(Hs,"\\$&")}function Bs(t){return new RegExp("^(?:"+t.map(Gs).join("|")+")","i")}function Fs(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function zs(t,e,n){var r=Us.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Ws(t,e,n){var r=Us.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Ys(t,e,n){var r=Us.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function qs(t,e,n){var r=Us.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Xs(t,e,n){var r=Us.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Zs(t,e,n){var r=Us.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function $s(t,e,n){var r=Us.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Ks(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Qs(t,e,n){var r=Us.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function Js(t,e,n){var r=Us.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function tu(t,e,n){var r=Us.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function eu(t,e,n){var r=Us.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function nu(t,e,n){var r=Us.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function ru(t,e,n){var r=Us.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function iu(t,e,n){var r=Us.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function ou(t,e,n){var r=Us.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function au(t,e,n){var r=Us.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function su(t,e,n){var r=js.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function uu(t,e,n){var r=Us.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function lu(t,e,n){var r=Us.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function cu(t,e){return Vs(t.getDate(),e,2)}function hu(t,e){return Vs(t.getHours(),e,2)}function fu(t,e){return Vs(t.getHours()%12||12,e,2)}function du(t,e){return Vs(1+ys.count(Es(t),t),e,3)}function pu(t,e){return Vs(t.getMilliseconds(),e,3)}function gu(t,e){return pu(t,e)+"000"}function vu(t,e){return Vs(t.getMonth()+1,e,2)}function mu(t,e){return Vs(t.getMinutes(),e,2)}function yu(t,e){return Vs(t.getSeconds(),e,2)}function _u(t){var e=t.getDay();return 0===e?7:e}function bu(t,e){return Vs(bs.count(Es(t)-1,t),e,2)}function xu(t,e){var n=t.getDay();return t=n>=4||0===n?ws(t):ws.ceil(t),Vs(ws.count(Es(t),t)+(4===Es(t).getDay()),e,2)}function wu(t){return t.getDay()}function Tu(t,e){return Vs(xs.count(Es(t)-1,t),e,2)}function Eu(t,e){return Vs(t.getFullYear()%100,e,2)}function Ou(t,e){return Vs(t.getFullYear()%1e4,e,4)}function Su(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Vs(e/60|0,"0",2)+Vs(e%60,"0",2)}function Mu(t,e){return Vs(t.getUTCDate(),e,2)}function Au(t,e){return Vs(t.getUTCHours(),e,2)}function Cu(t,e){return Vs(t.getUTCHours()%12||12,e,2)}function Pu(t,e){return Vs(1+Os.count(Ps(t),t),e,3)}function ku(t,e){return Vs(t.getUTCMilliseconds(),e,3)}function Lu(t,e){return ku(t,e)+"000"}function Du(t,e){return Vs(t.getUTCMonth()+1,e,2)}function Ru(t,e){return Vs(t.getUTCMinutes(),e,2)}function Iu(t,e){return Vs(t.getUTCSeconds(),e,2)}function Nu(t){var e=t.getUTCDay();return 0===e?7:e}function Uu(t,e){return Vs(Ms.count(Ps(t)-1,t),e,2)}function ju(t,e){var n=t.getUTCDay();return t=n>=4||0===n?Cs(t):Cs.ceil(t),Vs(Cs.count(Ps(t),t)+(4===Ps(t).getUTCDay()),e,2)}function Hu(t){return t.getUTCDay()}function Vu(t,e){return Vs(As.count(Ps(t)-1,t),e,2)}function Gu(t,e){return Vs(t.getUTCFullYear()%100,e,2)}function Bu(t,e){return Vs(t.getUTCFullYear()%1e4,e,4)}function Fu(){return"+0000"}function zu(){return"%"}function Wu(t){return+t}function Yu(t){return Math.floor(+t/1e3)}!function(t){Rs=function(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,o=t.days,a=t.shortDays,s=t.months,u=t.shortMonths,l=Bs(i),c=Fs(i),h=Bs(o),f=Fs(o),d=Bs(a),p=Fs(a),g=Bs(s),v=Fs(s),m=Bs(u),y=Fs(u),_={a:function(t){return a[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return u[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:cu,e:cu,f:gu,H:hu,I:fu,j:du,L:pu,m:vu,M:mu,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Wu,s:Yu,S:yu,u:_u,U:bu,V:xu,w:wu,W:Tu,x:null,X:null,y:Eu,Y:Ou,Z:Su,"%":zu},b={a:function(t){return a[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return u[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:Mu,e:Mu,f:Lu,H:Au,I:Cu,j:Pu,L:ku,m:Du,M:Ru,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Wu,s:Yu,S:Iu,u:Nu,U:Uu,V:ju,w:Hu,W:Vu,x:null,X:null,y:Gu,Y:Bu,Z:Fu,"%":zu},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:tu,e:tu,f:au,H:nu,I:nu,j:eu,L:ou,m:Js,M:ru,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:Qs,Q:uu,s:lu,S:iu,u:Ws,U:Ys,V:qs,w:zs,W:Xs,x:function(t,e,r){return E(t,n,e,r)},X:function(t,e,n){return E(t,r,e,n)},y:$s,Y:Zs,Z:Ks,"%":su};function w(t,e){return function(n){var r,i,o,a=[],s=-1,u=0,l=t.length;for(n instanceof Date||(n=new Date(+n));++s<l;)37===t.charCodeAt(s)&&(a.push(t.slice(u,s)),null!=(i=Ns[r=t.charAt(++s)])?r=t.charAt(++s):i="e"===r?" ":"0",(o=e[r])&&(r=o(n,i)),a.push(r),u=s+1);return a.push(t.slice(u,s)),a.join("")}}function T(t,e){return function(n){var r,i,o=Ds(1900,void 0,1);if(E(o,t,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(!e||"Z"in o||(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=Ls(Ds(o.y,0,1))).getUTCDay(),r=i>4||0===i?As.ceil(r):As(r),r=Os.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=ks(Ds(o.y,0,1))).getDay(),r=i>4||0===i?xs.ceil(r):xs(r),r=ys.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?Ls(Ds(o.y,0,1)).getUTCDay():ks(Ds(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,Ls(o)):ks(o)}}function E(t,e,n,r){for(var i,o,a=0,s=e.length,u=n.length;a<s;){if(r>=u)return-1;if(37===(i=e.charCodeAt(a++))){if(i=e.charAt(a++),!(o=x[i in Ns?e.charAt(a++):i])||(r=o(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return(_.x=w(n,_),_.X=w(r,_),_.c=w(e,_),b.x=w(n,b),b.X=w(r,b),b.c=w(e,b),{format:function(t){var e=w(t+="",_);return e.toString=function(){return t},e},parse:function(t){var e=T(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=w(t+="",b);return e.toString=function(){return t},e},utcParse:function(t){var e=T(t+="",!0);return e.toString=function(){return t},e}})}(t),Is=Rs.format,Rs.parse,Rs.utcFormat,Rs.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 qu(t){return new Date(t)}function Xu(t){return t instanceof Date?+t:+new Date(+t)}function Zu(t,e,n,r,i,o,a,s,u){var l=ja(ka,ka),c=l.invert,h=l.domain,f=u(".%L"),d=u(":%S"),p=u("%I:%M"),g=u("%I %p"),v=u("%a %d"),m=u("%b %d"),y=u("%B"),_=u("%Y"),b=[[a,1,1e3],[a,5,5e3],[a,15,15e3],[a,30,3e4],[o,1,6e4],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,36e5],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,864e5],[r,2,1728e5],[n,1,6048e5],[e,1,2592e6],[e,3,7776e6],[t,1,31536e6]];function x(s){return(a(s)<s?f:o(s)<s?d:i(s)<s?p:r(s)<s?g:e(s)<s?n(s)<s?v:m:t(s)<s?y:_)(s)}function w(e,n,r,i){if(null==e&&(e=10),"number"==typeof e){var o=Math.abs(r-n)/e,a=so((function(t){return t[2]})).right(b,o);a===b.length?(i=mo(n/31536e6,r/31536e6,e),e=t):a?(i=(a=b[o/b[a-1][2]<b[a][2]/o?a-1:a])[1],e=a[0]):(i=Math.max(mo(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(Oo.call(t,Xu)):h().map(qu)},l.ticks=function(t,e){var n,r=h(),i=r[0],o=r[r.length-1],a=o<i;return a&&(n=i,i=o,o=n),n=(n=w(t,i,o,e))?n.range(i,o+1):[],a?n.reverse():n},l.tickFormat=function(t,e){return null==e?x:u(e)},l.nice=function(t,e){var n=h();return(t=w(t,n[0],n[n.length-1],e))?h(rs(n,t)):l},l.copy=function(){return Na(l,Zu(t,e,n,r,i,o,a,s,u))},l}var $u=Math.PI,Ku=2*$u,Qu=Ku-1e-6;function Ju(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function tl(){return new Ju}function el(t){return function(){return t}}Ju.prototype=tl.prototype={constructor:Ju,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,o){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var o=this._x1,a=this._y1,s=n-t,u=r-e,l=o-t,c=a-e,h=l*l+c*c;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>1e-6)if(Math.abs(c*s-u*l)>1e-6&&i){var f=n-o,d=r-a,p=s*s+u*u,g=f*f+d*d,v=Math.sqrt(p),m=Math.sqrt(h),y=i*Math.tan(($u-Math.acos((p+h-g)/(2*v*m)))/2),_=y/m,b=y/v;Math.abs(_-1)>1e-6&&(this._+="L"+(t+_*l)+","+(e+_*c)),this._+="A"+i+","+i+",0,0,"+ +(c*f>l*d)+","+(this._x1=t+b*s)+","+(this._y1=e+b*u)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,r,i,o){t=+t,e=+e,o=!!o;var a=(n=+n)*Math.cos(r),s=n*Math.sin(r),u=t+a,l=e+s,c=1^o,h=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+u+","+l:(Math.abs(this._x1-u)>1e-6||Math.abs(this._y1-l)>1e-6)&&(this._+="L"+u+","+l),n&&(h<0&&(h=h%Ku+Ku),h>Qu?this._+="A"+n+","+n+",0,1,"+c+","+(t-a)+","+(e-s)+"A"+n+","+n+",0,1,"+c+","+(this._x1=u)+","+(this._y1=l):h>1e-6&&(this._+="A"+n+","+n+",0,"+ +(h>=$u)+","+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 nl=Math.abs,rl=Math.atan2,il=Math.cos,ol=Math.max,al=Math.min,sl=Math.sin,ul=Math.sqrt,ll=Math.PI,cl=ll/2,hl=2*ll;function fl(t){return t>1?0:t<-1?ll:Math.acos(t)}function dl(t){return t>=1?cl:t<=-1?-cl:Math.asin(t)}function pl(t){return t.innerRadius}function gl(t){return t.outerRadius}function vl(t){return t.startAngle}function ml(t){return t.endAngle}function yl(t){return t&&t.padAngle}function _l(t,e,n,r,i,o,a,s){var u=n-t,l=r-e,c=a-i,h=s-o,f=h*u-c*l;if(!(f*f<1e-12))return[t+(f=(c*(e-o)-h*(t-i))/f)*u,e+f*l]}function bl(t,e,n,r,i,o,a){var s=t-n,u=e-r,l=(a?o:-o)/ul(s*s+u*u),c=l*u,h=-l*s,f=t+c,d=e+h,p=n+c,g=r+h,v=(f+p)/2,m=(d+g)/2,y=p-f,_=g-d,b=y*y+_*_,x=i-o,w=f*g-p*d,T=(_<0?-1:1)*ul(ol(0,x*x*b-w*w)),E=(w*_-y*T)/b,O=(-w*y-_*T)/b,S=(w*_+y*T)/b,M=(-w*y+_*T)/b,A=E-v,C=O-m,P=S-v,k=M-m;return A*A+C*C>P*P+k*k&&(E=S,O=M),{cx:E,cy:O,x01:-c,y01:-h,x11:E*(i/x-1),y11:O*(i/x-1)}}function xl(){var t=pl,e=gl,n=el(0),r=null,i=vl,o=ml,a=yl,s=null;function u(){var u,l,c=+t.apply(this,arguments),h=+e.apply(this,arguments),f=i.apply(this,arguments)-cl,d=o.apply(this,arguments)-cl,p=nl(d-f),g=d>f;if(s||(s=u=tl()),h<c&&(l=h,h=c,c=l),h>1e-12)if(p>hl-1e-12)s.moveTo(h*il(f),h*sl(f)),s.arc(0,0,h,f,d,!g),c>1e-12&&(s.moveTo(c*il(d),c*sl(d)),s.arc(0,0,c,d,f,g));else{var v,m,y=f,_=d,b=f,x=d,w=p,T=p,E=a.apply(this,arguments)/2,O=E>1e-12&&(r?+r.apply(this,arguments):ul(c*c+h*h)),S=al(nl(h-c)/2,+n.apply(this,arguments)),M=S,A=S;if(O>1e-12){var C=dl(O/c*sl(E)),P=dl(O/h*sl(E));(w-=2*C)>1e-12?(b+=C*=g?1:-1,x-=C):(w=0,b=x=(f+d)/2),(T-=2*P)>1e-12?(y+=P*=g?1:-1,_-=P):(T=0,y=_=(f+d)/2)}var k=h*il(y),L=h*sl(y),D=c*il(x),R=c*sl(x);if(S>1e-12){var I,N=h*il(_),U=h*sl(_),j=c*il(b),H=c*sl(b);if(p<ll&&(I=_l(k,L,j,H,N,U,D,R))){var V=k-I[0],G=L-I[1],B=N-I[0],F=U-I[1],z=1/sl(fl((V*B+G*F)/(ul(V*V+G*G)*ul(B*B+F*F)))/2),W=ul(I[0]*I[0]+I[1]*I[1]);M=al(S,(c-W)/(z-1)),A=al(S,(h-W)/(z+1))}}T>1e-12?A>1e-12?(v=bl(j,H,k,L,h,A,g),m=bl(N,U,D,R,h,A,g),s.moveTo(v.cx+v.x01,v.cy+v.y01),A<S?s.arc(v.cx,v.cy,A,rl(v.y01,v.x01),rl(m.y01,m.x01),!g):(s.arc(v.cx,v.cy,A,rl(v.y01,v.x01),rl(v.y11,v.x11),!g),s.arc(0,0,h,rl(v.cy+v.y11,v.cx+v.x11),rl(m.cy+m.y11,m.cx+m.x11),!g),s.arc(m.cx,m.cy,A,rl(m.y11,m.x11),rl(m.y01,m.x01),!g))):(s.moveTo(k,L),s.arc(0,0,h,y,_,!g)):s.moveTo(k,L),c>1e-12&&w>1e-12?M>1e-12?(v=bl(D,R,N,U,c,-M,g),m=bl(k,L,j,H,c,-M,g),s.lineTo(v.cx+v.x01,v.cy+v.y01),M<S?s.arc(v.cx,v.cy,M,rl(v.y01,v.x01),rl(m.y01,m.x01),!g):(s.arc(v.cx,v.cy,M,rl(v.y01,v.x01),rl(v.y11,v.x11),!g),s.arc(0,0,c,rl(v.cy+v.y11,v.cx+v.x11),rl(m.cy+m.y11,m.cx+m.x11),g),s.arc(m.cx,m.cy,M,rl(m.y11,m.x11),rl(m.y01,m.x01),!g))):s.arc(0,0,c,x,b,g):s.lineTo(D,R)}else s.moveTo(0,0);if(s.closePath(),u)return s=null,u+""||null}return u.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-ll/2;return[il(r)*n,sl(r)*n]},u.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:el(+e),u):t},u.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:el(+t),u):e},u.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:el(+t),u):n},u.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:el(+t),u):r},u.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:el(+t),u):i},u.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:el(+t),u):o},u.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:el(+t),u):a},u.context=function(t){return arguments.length?(s=null==t?null:t,u):s},u}function wl(t){this._context=t}function Tl(t){return new wl(t)}function El(t){return t[0]}function Ol(t){return t[1]}function Sl(){var t=El,e=Ol,n=el(!0),r=null,i=Tl,o=null;function a(a){var s,u,l,c=a.length,h=!1;for(null==r&&(o=i(l=tl())),s=0;s<=c;++s)!(s<c&&n(u=a[s],s,a))===h&&((h=!h)?o.lineStart():o.lineEnd()),h&&o.point(+t(u,s,a),+e(u,s,a));if(l)return o=null,l+""||null}return a.x=function(e){return arguments.length?(t="function"==typeof e?e:el(+e),a):t},a.y=function(t){return arguments.length?(e="function"==typeof t?t:el(+t),a):e},a.defined=function(t){return arguments.length?(n="function"==typeof t?t:el(!!t),a):n},a.curve=function(t){return arguments.length?(i=t,null!=r&&(o=i(r)),a):i},a.context=function(t){return arguments.length?(null==t?r=o=null:o=i(r=t),a):r},a}function Ml(){var t=El,e=null,n=el(0),r=Ol,i=el(!0),o=null,a=Tl,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==o&&(s=a(d=tl())),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 Sl().defined(i).curve(a).context(o)}return u.x=function(n){return arguments.length?(t="function"==typeof n?n:el(+n),e=null,u):t},u.x0=function(e){return arguments.length?(t="function"==typeof e?e:el(+e),u):t},u.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:el(+t),u):e},u.y=function(t){return arguments.length?(n="function"==typeof t?t:el(+t),r=null,u):n},u.y0=function(t){return arguments.length?(n="function"==typeof t?t:el(+t),u):n},u.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:el(+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:el(!!t),u):i},u.curve=function(t){return arguments.length?(a=t,null!=o&&(s=a(o)),u):a},u.context=function(t){return arguments.length?(null==t?o=s=null:s=a(o=t),u):o},u}function Al(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function Cl(t){return t}wl.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 Pl=Ll(Tl);function kl(t){this._curve=t}function Ll(t){function e(e){return new kl(t(e))}return e._curve=t,e}function Dl(){return t=Sl().curve(Pl),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(Ll(t)):e()._curve},t;var t,e}kl.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 Rl=Array.prototype.slice;function Il(){}function Nl(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 Ul(t){this._context=t}function jl(t){return new Ul(t)}function Hl(t){this._context=t}function Vl(t){return new Hl(t)}function Gl(t){this._context=t}function Bl(t){return new Gl(t)}function Fl(t,e){this._basis=new Ul(t),this._beta=e}Ul.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:Nl(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:Nl(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Hl.prototype={areaStart:Il,areaEnd:Il,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:Nl(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Gl.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:Nl(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Fl.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r,i=t[0],o=e[0],a=t[n]-i,s=e[n]-o,u=-1;++u<=n;)r=u/n,this._basis.point(this._beta*t[u]+(1-this._beta)*(i+r*a),this._beta*e[u]+(1-this._beta)*(o+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var zl=function t(e){function n(t){return 1===e?new Ul(t):new Fl(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function Wl(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 Yl(t,e){this._context=t,this._k=(1-e)/6}Yl.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:Wl(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:Wl(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 ql=function t(e){function n(t){return new Yl(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Xl(t,e){this._context=t,this._k=(1-e)/6}Xl.prototype={areaStart:Il,areaEnd:Il,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:Wl(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 Zl=function t(e){function n(t){return new Xl(t,e)}return n.tension=function(e){return t(+e)},n}(0);function $l(t,e){this._context=t,this._k=(1-e)/6}$l.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:Wl(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 Kl=function t(e){function n(t){return new $l(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Ql(t,e,n){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>1e-12){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,u=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/u,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/u}if(t._l23_a>1e-12){var l=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,c=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*l+t._x1*t._l23_2a-e*t._l12_2a)/c,a=(a*l+t._y1*t._l23_2a-n*t._l12_2a)/c}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function Jl(t,e){this._context=t,this._alpha=e}Jl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:Ql(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 tc=function t(e){function n(t){return e?new Jl(t,e):new Yl(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function ec(t,e){this._context=t,this._alpha=e}ec.prototype={areaStart:Il,areaEnd:Il,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:Ql(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 nc=function t(e){function n(t){return e?new ec(t,e):new Xl(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function rc(t,e){this._context=t,this._alpha=e}rc.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:Ql(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 ic=function t(e){function n(t){return e?new rc(t,e):new $l(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function oc(t){this._context=t}function ac(t){return new oc(t)}function sc(t){return t<0?-1:1}function uc(t,e,n){var r=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),a=(n-t._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(sc(o)+sc(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function lc(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function cc(t,e,n){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,s=(o-r)/3;t._context.bezierCurveTo(r+s,i+s*e,o-s,a-s*n,o,a)}function hc(t){this._context=t}function fc(t){this._context=new dc(t)}function dc(t){this._context=t}function pc(t){return new hc(t)}function gc(t){return new fc(t)}function vc(t){this._context=t}function mc(t){var e,n,r=t.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,o[e]=4,a[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,o[r-1]=7,a[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/o[e-1],o[e]-=n,a[e]-=n*a[e-1];for(i[r-1]=a[r-1]/o[r-1],e=r-2;e>=0;--e)i[e]=(a[e]-i[e+1])/o[e];for(o[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)o[e]=2*t[e+1]-i[e+1];return[i,o]}function yc(t){return new vc(t)}function _c(t,e){this._context=t,this._t=e}function bc(t){return new _c(t,.5)}function xc(t){return new _c(t,0)}function wc(t){return new _c(t,1)}function Tc(t,e){if((i=t.length)>1)for(var n,r,i,o=1,a=t[e[0]],s=a.length;o<i;++o)for(r=a,a=t[e[o]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function Ec(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function Oc(t,e){return t[e]}oc.prototype={areaStart:Il,areaEnd:Il,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))}},hc.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:cc(this,this._t0,lc(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,cc(this,lc(this,n=uc(this,t,e)),n);break;default:cc(this,this._t0,n=uc(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(fc.prototype=Object.create(hc.prototype)).point=function(t,e){hc.prototype.point.call(this,e,t)},dc.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,o){this._context.bezierCurveTo(e,t,r,n,o,i)}},vc.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=mc(t),i=mc(e),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],t[a],e[a]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}},_c.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 Sc=function(){function t(t){this.state={options:{}},this.colorScale={},this.services=t}return t.prototype.getAllDataFromDomain=function(){if(!this.get("data"))return null;var t=this.getDataGroups(),e=Zr.clone(this.get("data")),n=this.getOptions().data.groupMapsTo,r=this.getOptions().axes;return r&&Object.keys(r).forEach((function(t){if(r[t].mapsTo&&r[t].domain){var n=r[t].mapsTo;if(r[t].scaleType===T.LABELS)e=e.filter((function(e){return r[t].domain.includes(e[n])}));else{var i=r[t].domain,o=i[0],a=i[1];e=e.filter((function(t){return t[n]>=o&&t[n]<=a}))}}})),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=hi.items.status.ACTIVE,e=this.getDataGroups(),n=this.getOptions().data.groupMapsTo;return this.getAllDataFromDomain().filter((function(r){return e.find((function(t){return t.name===r[n]})).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(Zr.clone(t)),n=this.generateDataGroups(e);return this.set({data:e,dataGroups:n}),e},t.prototype.getDataGroups=function(){return this.get("dataGroups")},t.prototype.getActiveDataGroups=function(){var t=hi.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(),o=xo(n,(function(t){return t[r]})).keys(),a=this.services.cartesianScales.domainAxisPosition,s=t.axes[a].scaleType;s===T.TIME?o.sort((function(t,e){return new Date(t)-new Date(e)})):s!==T.LOG&&s!==T.LINEAR||o.sort((function(t,e){return t-e}));var u=this.getDataGroupNames();return o.map((function(t){var o={sharedStackKey:t};return u.forEach((function(a){var s=n.find((function(n){return n[e]===a&&n[r].toString()===t}));o[a]=s?s[i]:null})),o}))},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 o=Zr.fromPairs(i.map((function(t){return[t.sharedStackKey,0]})));i.forEach((function(t){r.forEach((function(e){o[t.sharedStackKey]+=t[e]}))})),i.forEach((function(t){r.forEach((function(e){t[e]=t[e]/o[t.sharedStackKey]*100}))}))}return function(){var t=el([]),e=Ec,n=Tc,r=Oc;function i(i){var o,a,s=t.apply(this,arguments),u=i.length,l=s.length,c=new Array(l);for(o=0;o<l;++o){for(var h,f=s[o],d=c[o]=new Array(u),p=0;p<u;++p)d[p]=h=[0,+r(i[p],f,p,i)],h.data=i[p];d.key=f}for(o=0,a=e(c);o<l;++o)c[a[o]].index=o;return n(c,a),c}return i.keys=function(e){return arguments.length?(t="function"==typeof e?e:el(Rl.call(e)),i):t},i.value=function(t){return arguments.length?(r="function"==typeof t?t:el(+t),i):r},i.order=function(t){return arguments.length?(e=null==t?Ec:"function"==typeof t?t:el(Rl.call(t)),i):e},i.offset=function(t){return arguments.length?(n=null==t?Tc: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 o=t[i];return o[n]=r[e],o}))}))},t.prototype.getOptions=function(){return this.state.options},t.prototype.set=function(t,e){void 0===e&&(e=!1),this.state=Object.assign({},this.state,t),e||this.update()},t.prototype.get=function(t){return t?this.state[t]:this.state},t.prototype.setOptions=function(t){this.set({options:Zr.merge(this.getOptions(),t)})},t.prototype.update=function(){this.getDisplayData()&&(this.updateAllDataGroups(),this.setColorScale(),this.services.events.dispatchEvent(U.Model.UPDATE))},t.prototype.setUpdateCallback=function(t){this.updateCallback=t},t.prototype.toggleDataLabel=function(t){var e=hi.items.status,n=e.ACTIVE,r=e.DISABLED,i=this.getDataGroups(),o=i.some((function(t){return t.status===r})),a=i.filter((function(t){return t.status===n}));if(o)if(1===a.length&&a[0].name===t)i.forEach((function(t,e){i[e].status=n}));else{var s=i.findIndex((function(e){return e.name===t}));i[s].status=i[s].status===r?n:r}else i.forEach((function(e,o){i[o].status=e.name===t?n:r}));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(U.Legend.ITEMS_UPDATE,{dataGroups:i}),this.set({dataGroups:i})},t.prototype.getIsFilled=function(t,e,n,r){var i=this.getOptions();return i.getIsFilled?i.getIsFilled(t,e,n,r):r},t.prototype.getFillColor=function(t,e,n){var r=this.getOptions(),i=this.getFillScale()(t);return r.getFillColor?r.getFillColor(t,e,n,i):i},t.prototype.getStrokeColor=function(t,e,n){var r=this.getOptions(),i=this.colorScale(t);return r.getStrokeColor?r.getStrokeColor(t,e,n,i):i},t.prototype.getFillScale=function(){return this.colorScale},t.prototype.transformToTabularData=function(t){console.warn("We've updated the charting data format to be tabular by default. The current format you're using is deprecated and will be removed in v1.0, read more here https://carbon-design-system.github.io/carbon-charts/?path=/story/tutorials--tabular-data-format");var e=[],n=t.datasets,r=t.labels;return n.forEach((function(t){t.data.forEach((function(n,i){var o,a=Zr.getProperty(t,"label");if(null===a){var s=Zr.getProperty(r,i);o=s||"Ungrouped"}else o=a;var u={group:o,key:r[i]};isNaN(n)?(u.value=n.value,u.date=n.date):u.value=n,e.push(u)}))})),e},t.prototype.getTabularData=function(t){return Array.isArray(t)?t:this.transformToTabularData(t)},t.prototype.sanitize=function(t){return this.getTabularData(t)},t.prototype.updateAllDataGroups=function(){var t=this;this.allDataGroups?this.getDataGroupNames().forEach((function(e){-1===t.allDataGroups.indexOf(e)&&t.allDataGroups.push(e)})):this.allDataGroups=this.getDataGroupNames()},t.prototype.generateDataGroups=function(t){var e=this.getOptions().data.groupMapsTo,n=hi.items.status,r=n.ACTIVE,i=n.DISABLED,o=this.getOptions(),a=xo(t,(function(t){return t[e]})).keys();o.data.selectedGroups.length&&(o.data.selectedGroups.every((function(t){return a.includes(t)}))||(o.data.selectedGroups=[]));var s=function(t){return!o.data.selectedGroups.length||o.data.selectedGroups.includes(t)?r:i};return a.map((function(t){return{name:t,status:s(t)}}))},t.prototype.setColorScale=function(){var t=io,e=this.getOptions(),n=Zr.getProperty(e,"color","scale");if(null!==n&&0!==Object.keys(n).length){var r=[],i=0;this.allDataGroups.forEach((function(e){n[e]?r.push(n[e]):r.push(t[i]),i===t.length-1?i=0:i++})),this.colorScale=Ao().range(r).domain(this.allDataGroups)}else this.colorScale=Ao().range(t).domain(this.allDataGroups)},t}(),Mc=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}(),Ac="http://www.w3.org/1999/xhtml",Cc={svg:"http://www.w3.org/2000/svg",xhtml:Ac,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Pc(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),Cc.hasOwnProperty(e)?{space:Cc[e],local:t}:t}function kc(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Ac&&e.documentElement.namespaceURI===Ac?e.createElement(t):e.createElementNS(n,t)}}function Lc(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Dc(t){var e=Pc(t);return(e.local?Lc:kc)(e)}function Rc(){}function Ic(t){return null==t?Rc:function(){return this.querySelector(t)}}function Nc(){return[]}function Uc(t){return null==t?Nc:function(){return this.querySelectorAll(t)}}function jc(t){return function(){return this.matches(t)}}function Hc(t){return new Array(t.length)}function Vc(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Vc.prototype={constructor:Vc,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 Gc(t,e,n,r,i,o){for(var a,s=0,u=e.length,l=o.length;s<l;++s)(a=e[s])?(a.__data__=o[s],r[s]=a):n[s]=new Vc(t,o[s]);for(;s<u;++s)(a=e[s])&&(i[s]=a)}function Bc(t,e,n,r,i,o,a){var s,u,l,c={},h=e.length,f=o.length,d=new Array(h);for(s=0;s<h;++s)(u=e[s])&&(d[s]=l="$"+a.call(u,u.__data__,s,e),l in c?i[s]=u:c[l]=u);for(s=0;s<f;++s)(u=c[l="$"+a.call(t,o[s],s,o)])?(r[s]=u,u.__data__=o[s],c[l]=null):n[s]=new Vc(t,o[s]);for(s=0;s<h;++s)(u=e[s])&&c[d[s]]===u&&(i[s]=u)}function Fc(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function zc(t){return function(){this.removeAttribute(t)}}function Wc(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Yc(t,e){return function(){this.setAttribute(t,e)}}function qc(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Xc(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Zc(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 $c(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Kc(t){return function(){this.style.removeProperty(t)}}function Qc(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Jc(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function th(t,e){return t.style.getPropertyValue(e)||$c(t).getComputedStyle(t,null).getPropertyValue(e)}function eh(t){return function(){delete this[t]}}function nh(t,e){return function(){this[t]=e}}function rh(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function ih(t){return t.trim().split(/^|\s+/)}function oh(t){return t.classList||new ah(t)}function ah(t){this._node=t,this._names=ih(t.getAttribute("class")||"")}function sh(t,e){for(var n=oh(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function uh(t,e){for(var n=oh(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function lh(t){return function(){sh(this,t)}}function ch(t){return function(){uh(this,t)}}function hh(t,e){return function(){(e.apply(this,arguments)?sh:uh)(this,t)}}function fh(){this.textContent=""}function dh(t){return function(){this.textContent=t}}function ph(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function gh(){this.innerHTML=""}function vh(t){return function(){this.innerHTML=t}}function mh(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function yh(){this.nextSibling&&this.parentNode.appendChild(this)}function _h(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function bh(){return null}function xh(){var t=this.parentNode;t&&t.removeChild(this)}function wh(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Th(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}ah.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 Eh={},Oh=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(Eh={mouseenter:"mouseover",mouseleave:"mouseout"}));function Sh(t,e,n){return t=Mh(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function Mh(t,e,n){return function(r){var i=Oh;Oh=r;try{t.call(this,this.__data__,e,n)}finally{Oh=i}}}function Ah(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function Ch(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,o=e.length;r<o;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.capture);++i?e.length=i:delete this.__on}}}function Ph(t,e,n){var r=Eh.hasOwnProperty(t.type)?Sh:Mh;return function(i,o,a){var s,u=this.__on,l=r(e,o,a);if(u)for(var c=0,h=u.length;c<h;++c)if((s=u[c]).type===t.type&&s.name===t.name)return this.removeEventListener(s.type,s.listener,s.capture),this.addEventListener(s.type,s.listener=l,s.capture=n),void(s.value=e);this.addEventListener(t.type,l,n),s={type:t.type,name:t.name,value:e,listener:l,capture:n},u?u.push(s):this.__on=[s]}}function kh(t,e,n){var r=$c(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 Lh(t,e){return function(){return kh(this,t,e)}}function Dh(t,e){return function(){return kh(this,t,e.apply(this,arguments))}}var Rh=[null];function Ih(t,e){this._groups=t,this._parents=e}function Nh(){return new Ih([[document.documentElement]],Rh)}function Uh(t){return"string"==typeof t?new Ih([[document.querySelector(t)]],[document.documentElement]):new Ih([[t]],Rh)}function jh(){for(var t,e=Oh;t=e.sourceEvent;)e=t;return e}function Hh(t){var e=jh();return e.changedTouches&&(e=e.changedTouches[0]),function(t,e){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}(t,e)}Ih.prototype=Nh.prototype={constructor:Ih,select:function(t){"function"!=typeof t&&(t=Ic(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a,s=e[i],u=s.length,l=r[i]=new Array(u),c=0;c<u;++c)(o=s[c])&&(a=t.call(o,o.__data__,c,s))&&("__data__"in o&&(a.__data__=o.__data__),l[c]=a);return new Ih(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=Uc(t));for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a,s=e[o],u=s.length,l=0;l<u;++l)(a=s[l])&&(r.push(t.call(a,a.__data__,l,s)),i.push(a));return new Ih(r,i)},filter:function(t){"function"!=typeof t&&(t=jc(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a=e[i],s=a.length,u=r[i]=[],l=0;l<s;++l)(o=a[l])&&t.call(o,o.__data__,l,a)&&u.push(o);return new Ih(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?Bc:Gc,r=this._parents,i=this._groups;"function"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var o=i.length,a=new Array(o),s=new Array(o),u=new Array(o),l=0;l<o;++l){var c=r[l],h=i[l],f=h.length,d=t.call(c,c&&c.__data__,l,r),p=d.length,g=s[l]=new Array(p),v=a[l]=new Array(p);n(c,h,g,v,u[l]=new Array(f),d,e);for(var m,y,_=0,b=0;_<p;++_)if(m=g[_]){for(_>=b&&(b=_+1);!(y=v[b])&&++b<p;);m._next=y||null}}return(a=new Ih(a,r))._enter=s,a._exit=u,a},enter:function(){return new Ih(this._enter||this._groups.map(Hc),this._parents)},exit:function(){return new Ih(this._exit||this._groups.map(Hc),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,o=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=e&&(i=e(i)),null==n?o.remove():n(o),r&&i?r.merge(i).order():i},merge:function(t){for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u,l=e[s],c=n[s],h=l.length,f=a[s]=new Array(h),d=0;d<h;++d)(u=l[d]||c[d])&&(f[d]=u);for(;s<r;++s)a[s]=e[s];return new Ih(a,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=Fc);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a,s=n[o],u=s.length,l=i[o]=new Array(u),c=0;c<u;++c)(a=s[c])&&(l[c]=a);l.sort(e)}return new Ih(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),e=-1;return this.each((function(){t[++e]=this})),t},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null},size:function(){var t=0;return this.each((function(){++t})),t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,o=e[n],a=0,s=o.length;a<s;++a)(i=o[a])&&t.call(i,i.__data__,a,o);return this},attr:function(t,e){var n=Pc(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?Wc:zc:"function"==typeof e?n.local?Zc:Xc:n.local?qc:Yc)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?Kc:"function"==typeof e?Jc:Qc)(t,e,null==n?"":n)):th(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?eh:"function"==typeof e?rh:nh)(t,e)):this.node()[t]},classed:function(t,e){var n=ih(t+"");if(arguments.length<2){for(var r=oh(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?hh:e?lh:ch)(n,e))},text:function(t){return arguments.length?this.each(null==t?fh:("function"==typeof t?ph:dh)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?gh:("function"==typeof t?mh:vh)(t)):this.node().innerHTML},raise:function(){return this.each(yh)},lower:function(){return this.each(_h)},append:function(t){var e="function"==typeof t?t:Dc(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:Dc(t),r=null==e?bh:"function"==typeof e?e:Ic(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(xh)},clone:function(t){return this.select(t?Th:wh)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,o=Ah(t+""),a=o.length;if(!(arguments.length<2)){for(s=e?Ph:Ch,null==n&&(n=!1),r=0;r<a;++r)this.each(s(o[r],e,n));return this}var s=this.node().__on;if(s)for(var u,l=0,c=s.length;l<c;++l)for(r=0,u=s[l];r<a;++r)if((i=o[r]).type===u.type&&i.name===u.name)return u.value},dispatch:function(t,e){return this.each(("function"==typeof e?Dh:Lh)(t,e))}};var Vh={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 "},Gh=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}()}(),Bh="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,Fh="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),zh="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(Fh):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)},Wh=["top","right","bottom","left","width","height","size","weight"],Yh="undefined"!=typeof MutationObserver,qh=function(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var n=!1,r=!1,i=0;function o(){n&&(n=!1,t()),r&&s()}function a(){zh(o)}function s(){var t=Date.now();if(n){if(t-i<2)return;r=!0}else n=!0,r=!1,setTimeout(a,e);i=t}return s}(this.refresh.bind(this),20)};qh.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},qh.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},qh.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},qh.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},qh.prototype.connect_=function(){Bh&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Yh?(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)},qh.prototype.disconnect_=function(){Bh&&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)},qh.prototype.onTransitionEnd_=function(t){var e=t.propertyName;void 0===e&&(e=""),Wh.some((function(t){return!!~e.indexOf(t)}))&&this.refresh()},qh.getInstance=function(){return this.instance_||(this.instance_=new qh),this.instance_},qh.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},Zh=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||Fh},$h=nf(0,0,0,0);function Kh(t){return parseFloat(t)||0}function Qh(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 Jh(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return $h;var r=Zh(t).getComputedStyle(t),i=function(t){for(var e={},n=0,r=["top","right","bottom","left"];n<r.length;n+=1){var i=r[n],o=t["padding-"+i];e[i]=Kh(o)}return e}(r),o=i.left+i.right,a=i.top+i.bottom,s=Kh(r.width),u=Kh(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==e&&(s-=Qh(r,"left","right")+o),Math.round(u+a)!==n&&(u-=Qh(r,"top","bottom")+a)),!function(t){return t===Zh(t).document.documentElement}(t)){var l=Math.round(s+o)-e,c=Math.round(u+a)-n;1!==Math.abs(l)&&(s-=l),1!==Math.abs(c)&&(u-=c)}return nf(i.left,i.top,s,u)}var tf="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof Zh(t).SVGGraphicsElement}:function(t){return t instanceof Zh(t).SVGElement&&"function"==typeof t.getBBox};function ef(t){return Bh?tf(t)?function(t){var e=t.getBBox();return nf(0,0,e.width,e.height)}(t):Jh(t):$h}function nf(t,e,n,r){return{x:t,y:e,width:n,height:r}}var rf=function(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=nf(0,0,0,0),this.target=t};rf.prototype.isActive=function(){var t=ef(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},rf.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t};var of=function(t,e){var n=function(t){var e=t.x,n=t.y,r=t.width,i=t.height,o="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,a=Object.create(o.prototype);return Xh(a,{x:e,y:n,width:r,height:i,top:n,right:e+r,bottom:i+n,left:e}),a}(e);Xh(this,{target:t,contentRect:n})},af=function(t,e,n){if(this.activeObservations_=[],this.observations_=new Gh,"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 Zh(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new rf(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 Zh(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 of(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 sf="undefined"!=typeof WeakMap?new WeakMap:new Gh,uf=function(t){if(!(this instanceof uf))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=qh.getInstance(),n=new af(t,e,this);sf.set(this,n)};["observe","unobserve","disconnect"].forEach((function(t){uf.prototype[t]=function(){return(e=sf.get(this))[t].apply(e,arguments);var e}}));var lf=void 0!==Fh.ResizeObserver?Fh.ResizeObserver:uf,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=Uh(t));var n,r,i,o,a={width:0,height:0},s=function(t){t&&Object.keys(a).forEach((function(e){if(t[e]){var n=t[e],r=parseFloat(n);n&&r>a[e]&&-1===(""+n).indexOf("%")&&(a[e]=r)}}))},u={width:t.attr("width"),height:t.attr("height")};try{r={width:(n=t.node().getBBox()).width,height:n.height}}catch(t){}try{o={width:(i=t.node().getBoundingClientRect()).width,height:i.height}}catch(t){}var l={width:t.node().clientWidth,height:t.node().clientHeight};if(e){if(e.useAttrs&&(s(u),a.width>0&&a.height>0))return a;if(e.useClientDimensions&&(s(l),a.width>0&&a.height>0))return l;if(e.useBBox&&(s(r),a.width>0&&a.height>0))return r;if(e.useBoundingRect&&(s(o),a.width>0&&a.height>0))return o}try{s({width:Zr.getProperty(t.node(),"width","baseVal","value"),height:Zr.getProperty(t.node(),"height","baseVal","value")})}catch(t){s(l),s(r),s(u)}return a},e.appendOrSelect=function(t,e){var n=e.split("."),r=n[0],i=t.select(e);return i.empty()?t.append(r).attr("class",n.slice(1).join(" ")):i},e.prototype.init=function(){this.styleHolderElement(),this.addSVGElement(),this.model.getOptions().resizable&&this.addResizeListener(),this.addHolderListeners()},e.prototype.update=function(){this.styleHolderElement()},e.prototype.styleHolderElement=function(){var t=this.getHolder();Uh(this.getHolder()).classed(Vh.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=Zr.getProperty(this.model.getOptions(),"style","prefix"),e=Uh(this.getHolder()).append("svg").classed(Vh.prefix+"--"+t+"--chart-svg",!0).attr("height","100%").attr("width","100%");this.svg=e.node()},e.prototype.getMainSVG=function(){return this.svg},e.prototype.addHolderListeners=function(){var t=this,e=this.getHolder();e&&Uh(e).on("mouseover",(function(){t.services.events.dispatchEvent(U.Chart.MOUSEOVER)})).on("mouseout",(function(){t.services.events.dispatchEvent(U.Chart.MOUSEOUT)}))},e.prototype.addResizeListener=function(){var t=this,e=this.getHolder();if(e){var n=e.clientWidth,r=e.clientHeight,i=Zr.debounce((function(i,o){e&&(Math.abs(n-e.clientWidth)>1||Math.abs(r-e.clientHeight)>1)&&(n=e.clientWidth,r=e.clientHeight,t.services.events.dispatchEvent(U.Chart.RESIZE))}),12.5);new lf(i).observe(e)}},e}(Mc),hf=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}(Mc),ff={value:function(){}};function df(){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 pf(r)}function pf(t){this._=t}function gf(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 vf(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function mf(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=ff,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}pf.prototype=df.prototype={constructor:pf,on:function(t,e){var n,r=this._,i=gf(t+"",r),o=-1,a=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<a;)if(n=(t=i[o]).type)r[n]=mf(r[n],t.name,e);else if(null==e)for(n in r)r[n]=mf(r[n],t.name,null);return this}for(;++o<a;)if((n=(t=i[o]).type)&&(n=vf(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new pf(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,n=(r=this._[t]).length;o<n;++o)r[o].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};var yf,_f,bf=0,xf=0,wf=0,Tf=0,Ef=0,Of=0,Sf="object"==typeof performance&&performance.now?performance:Date,Mf="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Af(){return Ef||(Mf(Cf),Ef=Sf.now()+Of)}function Cf(){Ef=0}function Pf(){this._call=this._time=this._next=null}function kf(t,e,n){var r=new Pf;return r.restart(t,e,n),r}function Lf(){Ef=(Tf=Sf.now())+Of,bf=xf=0;try{!function(){Af(),++bf;for(var t,e=yf;e;)(t=Ef-e._time)>=0&&e._call.call(null,t),e=e._next;--bf}()}finally{bf=0,function(){var t,e,n=yf,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:yf=e);_f=t,Rf(r)}(),Ef=0}}function Df(){var t=Sf.now(),e=t-Tf;e>1e3&&(Of-=e,Tf=t)}function Rf(t){bf||(xf&&(xf=clearTimeout(xf)),t-Ef>24?(t<1/0&&(xf=setTimeout(Lf,t-Sf.now()-Of)),wf&&(wf=clearInterval(wf))):(wf||(Tf=Sf.now(),wf=setInterval(Df,1e3)),bf=1,Mf(Lf)))}function If(t,e,n){var r=new Pf;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}Pf.prototype=kf.prototype={constructor:Pf,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Af():+n)+(null==e?0:+e),this._next||_f===this||(_f?_f._next=this:yf=this,_f=this),this._call=t,this._time=n,Rf()},stop:function(){this._call&&(this._call=null,this._time=1/0,Rf())}};var Nf=df("start","end","cancel","interrupt"),Uf=[];function jf(t,e,n,r,i,o){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function o(u){var l,c,h,f;if(1!==n.state)return s();for(l in i)if((f=i[l]).name===n.name){if(3===f.state)return If(o);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[l]):+l<e&&(f.state=6,f.timer.stop(),f.on.call("cancel",t,t.__data__,f.index,f.group),delete i[l])}if(If((function(){3===n.state&&(n.state=4,n.timer.restart(a,n.delay,n.time),a(u))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(h=n.tween.length),l=0,c=-1;l<h;++l)(f=n.tween[l].value.call(t,t.__data__,n.index,n.group))&&(r[++c]=f);r.length=c+1}}function a(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(s),n.state=5,1),o=-1,a=r.length;++o<a;)r[o].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),s())}function s(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=kf((function(t){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=t&&o(t-n.delay)}),0,n.time)}(t,n,{name:e,index:r,group:i,on:Nf,tween:Uf,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function Hf(t,e){var n=Gf(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function Vf(t,e){var n=Gf(t,e);if(n.state>3)throw new Error("too late; already running");return n}function Gf(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Bf(t,e){var n,r;return function(){var i=Vf(this,t),o=i.tween;if(o!==n)for(var a=0,s=(r=n=o).length;a<s;++a)if(r[a].name===e){(r=r.slice()).splice(a,1);break}i.tween=r}}function Ff(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var o=Vf(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},u=0,l=i.length;u<l;++u)if(i[u].name===e){i[u]=s;break}u===l&&i.push(s)}o.tween=i}}function zf(t,e,n){var r=t._id;return t.each((function(){var t=Vf(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return Gf(t,r).value[e]}}function Wf(t,e){var n;return("number"==typeof e?fa:e instanceof Yo?ua:(n=Yo(e))?(e=n,ua):va)(t,e)}function Yf(t){return function(){this.removeAttribute(t)}}function qf(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Xf(t,e,n){var r,i,o=n+"";return function(){var a=this.getAttribute(t);return a===o?null:a===r?i:i=e(r=a,n)}}function Zf(t,e,n){var r,i,o=n+"";return function(){var a=this.getAttributeNS(t.space,t.local);return a===o?null:a===r?i:i=e(r=a,n)}}function $f(t,e,n){var r,i,o;return function(){var a,s,u=n(this);if(null!=u)return(a=this.getAttribute(t))===(s=u+"")?null:a===r&&s===i?o:(i=s,o=e(r=a,u));this.removeAttribute(t)}}function Kf(t,e,n){var r,i,o;return function(){var a,s,u=n(this);if(null!=u)return(a=this.getAttributeNS(t.space,t.local))===(s=u+"")?null:a===r&&s===i?o:(i=s,o=e(r=a,u));this.removeAttributeNS(t.space,t.local)}}function 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(){Hf(this,t).delay=+e.apply(this,arguments)}}function rd(t,e){return e=+e,function(){Hf(this,t).delay=e}}function id(t,e){return function(){Vf(this,t).duration=+e.apply(this,arguments)}}function od(t,e){return e=+e,function(){Vf(this,t).duration=e}}function ad(t,e){if("function"!=typeof e)throw new Error;return function(){Vf(this,t).ease=e}}function sd(t,e,n){var r,i,o=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?Hf:Vf;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}var ud=Nh.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 o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&cd(t,o,n)),r}return o._value=e,o}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 Nh().transition(t)}function md(){return++pd}var yd=Nh.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=Ic(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s,u,l=r[a],c=l.length,h=o[a]=new Array(c),f=0;f<c;++f)(s=l[f])&&(u=t.call(s,s.__data__,f,l))&&("__data__"in s&&(u.__data__=s.__data__),h[f]=u,jf(h[f],e,n,f,h,Gf(s,n)));return new gd(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Uc(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var u,l=r[s],c=l.length,h=0;h<c;++h)if(u=l[h]){for(var f,d=t.call(u,u.__data__,h,l),p=Gf(u,n),g=0,v=d.length;g<v;++g)(f=d[g])&&jf(f,e,n,g,d,p);o.push(d),a.push(u)}return new gd(o,a,e,n)},filter:function(t){"function"!=typeof t&&(t=jc(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a=e[i],s=a.length,u=r[i]=[],l=0;l<s;++l)(o=a[l])&&t.call(o,o.__data__,l,a)&&u.push(o);return new 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,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u,l=e[s],c=n[s],h=l.length,f=a[s]=new Array(h),d=0;d<h;++d)(u=l[d]||c[d])&&(f[d]=u);for(;s<r;++s)a[s]=e[s];return new gd(a,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,o=0;o<i;++o)for(var a,s=r[o],u=s.length,l=0;l<u;++l)if(a=s[l]){var c=Gf(a,e);jf(a,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?Gf(this.node(),n).on.on(t):this.each(sd(n,t,e))},attr:function(t,e){var n=Pc(t),r="transform"===n?Aa:Wf;return this.attrTween(t,"function"==typeof e?(n.local?Kf:$f)(n,r,zf(this,"attr."+t,e)):null==e?(n.local?qf:Yf)(n):(n.local?Zf:Xf)(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=Pc(t);return this.tween(n,(r.local?td:ed)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?Ma:Wf;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var o=th(this,t),a=(this.style.removeProperty(t),th(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}(t,r)).on("end.style."+t,ld(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,o;return function(){var a=th(this,t),s=n(this),u=s+"";return null==s&&(this.style.removeProperty(t),u=s=th(this,t)),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}(t,r,zf(this,"style."+t,e))).each(function(t,e){var n,r,i,o,a="style."+e,s="end."+a;return function(){var u=Vf(this,t),l=u.on,c=null==u.value[a]?o||(o=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,o=n+"";return function(){var a=th(this,t);return a===o?null:a===r?i:i=e(r=a,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,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}}(zf(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=Gf(this.node(),n).tween,o=0,a=i.length;o<a;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==e?Bf:Ff)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?nd:rd)(e,t)):Gf(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?id:od)(e,t)):Gf(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(ad(e,t)):Gf(this.node(),e).ease},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(o,a){var s={value:a},u={value:function(){0==--i&&o()}};n.each((function(){var n=Vf(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=Af(),bd;return n}Nh.prototype.interrupt=function(t){return this.each((function(){!function(t,e){var n,r,i,o=t.__transition,a=!0;if(o){for(i in e=null==e?null:e+"",o)(n=o[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete o[i]):a=!1;a&&delete t.__transition}}(this,t)}))},Nh.prototype.transition=function(t){var e,n;t instanceof gd?(e=t._id,t=t._name):(e=md(),(n=bd).time=Af(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],u=s.length,l=0;l<u;++l)(a=s[l])&&jf(a,t,e,l,s,n||xd(a,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(U.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(Zr.getProperty(Ri,t,"duration")||Ri.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}(Mc);function Td(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 Ed(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 Od(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Td(t),r=Ed(e);return n.setDate(n.getDate()+r),n}function Sd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Td(t).getTime(),r=Ed(e);return new Date(n+r)}function Md(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ed(e);return Sd(t,36e5*n)}function Ad(t){var e=new Date(t.getTime()),n=Math.ceil(e.getTimezoneOffset());return e.setSeconds(0,0),6e4*n+e.getTime()%6e4}function Cd(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Td(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=Cd(t),r=Cd(e),i=n.getTime()-Ad(n),o=r.getTime()-Ad(r);return Math.round((i-o)/864e5)}function kd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ed(e);return Sd(t,6e4*n)}function Ld(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Td(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 Dd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Td(t),r=Ed(e),i=n.getMonth()+r,o=new Date(0);o.setFullYear(n.getFullYear(),i,1),o.setHours(0,0,0,0);var a=Ld(o);return n.setMonth(i,Math.min(a,n.getDate())),n}function Rd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ed(e);return Sd(t,1e3*n)}function Id(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ed(e);return Dd(t,12*n)}function Nd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Td(t),r=Td(e),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}function Ud(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Td(t);return!isNaN(e)}function jd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Td(t),r=Td(e),i=n.getFullYear()-r.getFullYear(),o=n.getMonth()-r.getMonth();return 12*i+o}function Hd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Td(t),r=Td(e);return n.getFullYear()-r.getFullYear()}function Vd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Td(t),r=Td(e);return n.getTime()-r.getTime()}function Gd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Vd(t,e)/6e4;return n>0?Math.floor(n):Math.ceil(n)}function Bd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Vd(t,e)/1e3;return n>0?Math.floor(n):Math.ceil(n)}var Fd={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 zd(t){return function(e){var n=e||{},r=n.width?String(n.width):t.defaultWidth;return t.formats[r]||t.formats[t.defaultWidth]}}var Wd={date:zd({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:zd({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:zd({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Yd={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 o=t.defaultFormattingWidth||t.defaultWidth,a=i.width?String(i.width):o;r=t.formattingValues[a]||t.formattingValues[o]}else{var s=t.defaultWidth,u=i.width?String(i.width):t.defaultWidth;r=t.values[u]||t.values[s]}return r[t.argumentCallback?t.argumentCallback(e):e]}}function Xd(t){return function(e,n){var r=String(e),i=n||{},o=i.width,a=o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth],s=r.match(a);if(!s)return null;var u,l=s[0],c=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth];return u="[object Array]"===Object.prototype.toString.call(c)?function(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return n}(c,(function(t){return t.test(r)})):function(t,e){for(var n in t)if(t.hasOwnProperty(n)&&e(t[n]))return n}(c,(function(t){return t.test(r)})),u=t.valueCallback?t.valueCallback(u):u,{value:u=i.valueCallback?i.valueCallback(u):u,rest:r.slice(l.length)}}}var Zd,$d={code:"en-US",formatDistance:function(t,e,n){var r;return n=n||{},r="string"==typeof Fd[t]?Fd[t]:1===e?Fd[t].one:Fd[t].other.replace("{{count}}",e),n.addSuffix?n.comparison>0?"in "+r:r+" ago":r},formatLong:Wd,formatRelative:function(t,e,n,r){return Yd[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:(Zd={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(Zd.matchPattern);if(!i)return null;var o=i[0],a=n.match(Zd.parsePattern);if(!a)return null;var s=Zd.valueCallback?Zd.valueCallback(a[0]):a[0];return{value:s=r.valueCallback?r.valueCallback(s):s,rest:n.slice(o.length)}}),era:Xd({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:Xd({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:Xd({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:Xd({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:Xd({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 Kd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ed(e);return Sd(t,-n)}function Qd(t,e){for(var n=t<0?"-":"",r=Math.abs(t).toString();r.length<e;)r="0"+r;return n+r}var Jd=function(t,e){var n=t.getUTCFullYear(),r=n>0?n:1-n;return Qd("yy"===e?r%100:r,e.length)},tp=function(t,e){var n=t.getUTCMonth();return"M"===e?String(n+1):Qd(n+1,2)},ep=function(t,e){return Qd(t.getUTCDate(),e.length)},np=function(t,e){return Qd(t.getUTCHours()%12||12,e.length)},rp=function(t,e){return Qd(t.getUTCHours(),e.length)},ip=function(t,e){return Qd(t.getUTCMinutes(),e.length)},op=function(t,e){return Qd(t.getUTCSeconds(),e.length)},ap=function(t,e){var n=e.length,r=t.getUTCMilliseconds();return Qd(Math.floor(r*Math.pow(10,n-3)),e.length)};function sp(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=1,n=Td(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 up(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Td(t),n=e.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var i=sp(r),o=new Date(0);o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0);var a=sp(o);return e.getTime()>=i.getTime()?n+1:e.getTime()>=a.getTime()?n:n-1}function lp(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=up(t),n=new Date(0);n.setUTCFullYear(e,0,4),n.setUTCHours(0,0,0,0);var r=sp(n);return r}function cp(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=e||{},r=n.locale,i=r&&r.options&&r.options.weekStartsOn,o=null==i?0:Ed(i),a=null==n.weekStartsOn?o:Ed(n.weekStartsOn);if(!(a>=0&&a<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=Td(t),u=s.getUTCDay(),l=(u<a?7:0)+u-a;return s.setUTCDate(s.getUTCDate()-l),s.setUTCHours(0,0,0,0),s}function hp(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Td(t,e),r=n.getUTCFullYear(),i=e||{},o=i.locale,a=o&&o.options&&o.options.firstWeekContainsDate,s=null==a?1:Ed(a),u=null==i.firstWeekContainsDate?s:Ed(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=cp(l,e),h=new Date(0);h.setUTCFullYear(r,0,u),h.setUTCHours(0,0,0,0);var f=cp(h,e);return n.getTime()>=c.getTime()?r+1:n.getTime()>=f.getTime()?r:r-1}function fp(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=e||{},r=n.locale,i=r&&r.options&&r.options.firstWeekContainsDate,o=null==i?1:Ed(i),a=null==n.firstWeekContainsDate?o:Ed(n.firstWeekContainsDate),s=hp(t,e),u=new Date(0);u.setUTCFullYear(s,0,a),u.setUTCHours(0,0,0,0);var l=cp(u,e);return l}var dp="midnight",pp="noon",gp="morning",vp="afternoon",mp="evening",yp="night",_p={G:function(t,e,n){var r=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if("yo"===e){var r=t.getUTCFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return Jd(t,e)},Y:function(t,e,n,r){var i=hp(t,r),o=i>0?i:1-i;return"YY"===e?Qd(o%100,2):"Yo"===e?n.ordinalNumber(o,{unit:"year"}):Qd(o,e.length)},R:function(t,e){return Qd(up(t),e.length)},u:function(t,e){return Qd(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 Qd(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 Qd(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 tp(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 Qd(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=Td(t),r=cp(n,e).getTime()-fp(n,e).getTime();return Math.round(r/6048e5)+1}(t,r);return"wo"===e?n.ordinalNumber(i,{unit:"week"}):Qd(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=Td(t),n=sp(e).getTime()-lp(e).getTime();return Math.round(n/6048e5)+1}(t);return"Io"===e?n.ordinalNumber(r,{unit:"week"}):Qd(r,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):ep(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=Td(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"}):Qd(r,e.length)},E:function(t,e,n){var r=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){var i=t.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return Qd(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){var i=t.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return Qd(o,e.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(t,e,n){var r=t.getUTCDay(),i=0===r?7:r;switch(e){case"i":return String(i);case"ii":return Qd(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?pp:0===i?dp: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?mp:i>=12?vp:i>=4?gp:yp,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 np(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):rp(t,e)},K:function(t,e,n){var r=t.getUTCHours()%12;return"Ko"===e?n.ordinalNumber(r,{unit:"hour"}):Qd(r,e.length)},k:function(t,e,n){var r=t.getUTCHours();return 0===r&&(r=24),"ko"===e?n.ordinalNumber(r,{unit:"hour"}):Qd(r,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):ip(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):op(t,e)},S:function(t,e){return ap(t,e)},X:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();if(0===i)return"Z";switch(e){case"X":return xp(i);case"XXXX":case"XX":return wp(i);case"XXXXX":case"XXX":default:return wp(i,":")}},x:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"x":return xp(i);case"xxxx":case"xx":return wp(i);case"xxxxx":case"xxx":default:return wp(i,":")}},O:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+bp(i,":");case"OOOO":default:return"GMT"+wp(i,":")}},z:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+bp(i,":");case"zzzz":default:return"GMT"+wp(i,":")}},t:function(t,e,n,r){var i=r._originalDate||t;return Qd(Math.floor(i.getTime()/1e3),e.length)},T:function(t,e,n,r){return Qd((r._originalDate||t).getTime(),e.length)}};function bp(t,e){var n=t>0?"-":"+",r=Math.abs(t),i=Math.floor(r/60),o=r%60;if(0===o)return n+String(i);var a=e||"";return n+String(i)+a+Qd(o,2)}function xp(t,e){return t%60==0?(t>0?"-":"+")+Qd(Math.abs(t)/60,2):wp(t,e)}function wp(t,e){var n=e||"",r=t>0?"-":"+",i=Math.abs(t);return r+Qd(Math.floor(i/60),2)+n+Qd(i%60,2)}function Tp(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 Ep(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 Op={p:Ep,P:function(t,e){var n,r=t.match(/(P+)(p+)?/),i=r[1],o=r[2];if(!o)return Tp(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}}",Tp(i,e)).replace("{{time}}",Ep(o,e))}},Sp=["D","DD"],Mp=["YY","YYYY"];function Ap(t){return-1!==Sp.indexOf(t)}function Cp(t){return-1!==Mp.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,Dp=/^'([^]*?)'?$/,Rp=/''/g,Ip=/[a-zA-Z]/;function Np(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=String(e),i=n||{},o=i.locale||$d,a=o.options&&o.options.firstWeekContainsDate,s=null==a?1:Ed(a),u=null==i.firstWeekContainsDate?s:Ed(i.firstWeekContainsDate);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var l=o.options&&o.options.weekStartsOn,c=null==l?0:Ed(l),h=null==i.weekStartsOn?c:Ed(i.weekStartsOn);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!o.localize)throw new RangeError("locale must contain localize property");if(!o.formatLong)throw new RangeError("locale must contain formatLong property");var f=Td(t);if(!Ud(f))throw new RangeError("Invalid time value");var d=Ad(f),p=Kd(f,d),g={firstWeekContainsDate:u,weekStartsOn:h,locale:o,_originalDate:f},v=r.match(Lp).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,Op[e])(t,o.formatLong,g):t})).join("").match(kp).map((function(t){if("''"===t)return"'";var e=t[0];if("'"===e)return Up(t);var n=_p[e];if(n)return!i.useAdditionalWeekYearTokens&&Cp(t)&&Pp(t),!i.useAdditionalDayOfYearTokens&&Ap(t)&&Pp(t),n(p,t,o.localize,g);if(e.match(Ip))throw new RangeError("Format string contains an unescaped latin alphabet character `"+e+"`");return t})).join("");return v}function Up(t){return t.match(Dp)[1].replace(Rp,"'")}function jp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ed(e);return Od(t,-n)}function Hp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ed(e);return Md(t,-n)}function Vp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ed(e);return kd(t,-n)}function Gp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ed(e);return Dd(t,-n)}function Bp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ed(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=Ed(e);return Id(t,-n)}var zp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.scaleTypes={top:null,right:null,bottom:null,left:null},e.scales={top:null,right:null,bottom:null,left:null},e}return n(e,t),e.prototype.getDomainAxisPosition=function(){return this.domainAxisPosition},e.prototype.getRangeAxisPosition=function(){return this.rangeAxisPosition},e.prototype.update=function(t){var e=this;this.findDomainAndRangeAxes(),this.determineOrientation(),Object.keys(b).map((function(t){return b[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!==b.LEFT&&this.rangeAxisPosition!==b.RIGHT||this.domainAxisPosition!==b.BOTTOM&&this.domainAxisPosition!==b.TOP?this.orientation=w.HORIZONTAL:this.orientation=w.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.getDomainScale=function(){return this.scales[this.domainAxisPosition]},e.prototype.getRangeScale=function(){return this.scales[this.rangeAxisPosition]},e.prototype.getMainXAxisPosition=function(){var t=[b.BOTTOM,b.TOP];return[this.domainAxisPosition,this.rangeAxisPosition].find((function(e){return t.indexOf(e)>-1}))},e.prototype.getMainYAxisPosition=function(){var t=[b.LEFT,b.RIGHT];return[this.domainAxisPosition,this.rangeAxisPosition].find((function(e){return t.indexOf(e)>-1}))},e.prototype.getMainXScale=function(){return this.scales[this.getMainXAxisPosition()]},e.prototype.getMainYScale=function(){return this.scales[this.getMainYAxisPosition()]},e.prototype.getValueFromScale=function(t,e,n){var r=this.model.getOptions(),i=Zr.getProperty(r,"axes",t),o=this.scaleTypes[t],a=this.scales[t],s=i.mapsTo,u=void 0!==e[s]?e[s]:e;return o===T.LABELS?a(u)+a.step()/2:o===T.TIME?a(new Date(u)):a(u)},e.prototype.getDomainValue=function(t,e){return this.getValueFromScale(this.domainAxisPosition,t,e)},e.prototype.getRangeValue=function(t,e){return this.getValueFromScale(this.rangeAxisPosition,t,e)},e.prototype.getDomainIdentifier=function(){var t=this.model.getOptions();return Zr.getProperty(t,"axes",this.domainAxisPosition).mapsTo},e.prototype.getRangeIdentifier=function(){var t=this.model.getOptions();return Zr.getProperty(t,"axes",this.rangeAxisPosition).mapsTo},e.prototype.getDataFromDomain=function(t){var e=this.model.getDisplayData(),n=this.getDomainIdentifier();return this.scaleTypes[this.domainAxisPosition]===T.TIME?e.filter((function(e){var r=e[n];return"string"!=typeof r&&void 0!==r.getTime||(r=new Date(r)),r.getTime()===t.getTime()})):e.filter((function(e){return e[n]===t}))},e.prototype.extendsDomain=function(t,e){var n=this.model.getOptions();return Zr.getProperty(n,"axes",t).scaleType===T.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=Td(t),r=Td(e),i=Nd(n,r),o=Math.abs(Hd(n,r));n.setFullYear(n.getFullYear()-i*o);var a=Nd(n,r)===-i,s=i*(o-a);return 0===s?0:s}(r,n)>1)return[Fp(n,e),Id(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Td(t),r=Td(e),i=Nd(n,r),o=Math.abs(jd(n,r));n.setMonth(n.getMonth()-i*o);var a=Nd(n,r)===-i,s=i*(o-a);return 0===s?0:s}(r,n)>1)return[Gp(n,e),Dd(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Td(t),r=Td(e),i=Nd(n,r),o=Math.abs(Pd(n,r));n.setDate(n.getDate()-i*o);var a=Nd(n,r)===-i,s=i*(o-a);return 0===s?0:s}(r,n)>1)return[jp(n,e),Od(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Vd(t,e)/36e5;return n>0?Math.floor(n):Math.ceil(n)}(r,n)>1)return[Hp(n,e),Md(r,e)];if(Gd(r,n)>30)return[Vp(n,30*e),kd(r,30*e)];if(Gd(r,n)>1)return[Vp(n,e),kd(r,e)];if(Bd(r,n)>15)return[Bp(n,15*e),Rd(r,15*e)];if(Bd(r,n)>1)return[Bp(n,e),Rd(r,e)];return[n,r]}(e,Zr.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,Ii.paddingRatio)},e.prototype.findMainVerticalAxisPosition=function(){var t=this.model.getOptions(),e=Zr.getProperty(t,"axes");return null===Zr.getProperty(e,b.LEFT)&&null!==Zr.getProperty(e,b.RIGHT)||!0===Zr.getProperty(e,b.RIGHT,"main")?b.RIGHT:b.LEFT},e.prototype.findMainHorizontalAxisPosition=function(){var t=this.model.getOptions(),e=Zr.getProperty(t,"axes");return null===Zr.getProperty(e,b.BOTTOM)&&null!==Zr.getProperty(e,b.TOP)||!0===Zr.getProperty(e,b.TOP,"main")?b.TOP:b.BOTTOM},e.prototype.findDomainAndRangeAxesPositions=function(t,e){var n=this.model.getOptions(),r=Zr.getProperty(n,"axes",t),i=Zr.getProperty(n,"axes",e),o=r.scaleType||T.LINEAR,a=i.scaleType||T.LINEAR,s={domainAxisPosition:null,rangeAxisPosition:null};return a===T.LABELS||a===T.TIME?(s.domainAxisPosition=e,s.rangeAxisPosition=t):o===T.LABELS||o===T.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=Zr.getProperty(e,"axes",t),r=n.includeZero,i=Zr.getProperty(n,"scaleType")||T.LINEAR;if(this.model.isDataEmpty())return[];var o,a,s=this.model.getDisplayData(),u=n.mapsTo,l=n.percentage;if(n.domain)return i===T.LABELS?n.domain:this.extendsDomain(t,n.domain);if(l)return[0,100];if(n&&i===T.LABELS)return xo(s,(function(t){return t[u]})).keys();n.stacked?a=this.model.getDataValuesGroupedByKeys().map((function(t){return function(t,e){var n,r=t.length,i=-1,o=0;if(null==e)for(;++i<r;)(n=+t[i])&&(o+=n);else for(;++i<r;)(n=+e(t[i],i,t))&&(o+=n);return o}(function(t){var e=[];for(var n in t)e.push(t[n]);return e}(t))})):a=s.map((function(t){return t[u]}));return i!==T.TIME&&r&&a.push(0),o=lo(a),o=this.extendsDomain(t,o)},e.prototype.createScale=function(t){var e=this.model.getOptions(),n=Zr.getProperty(e,"axes",t);if(!n)return null;var r,i=Zr.getProperty(n,"scaleType")||T.LINEAR;return this.scaleTypes[t]=i,(r=i===T.TIME?function(){return _o.apply(Zu(Es,Ts,bs,ys,ms,vs,gs,ps,Is).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}():i===T.LOG?function t(){var e=cs(Ua()).domain([1,10]);return e.copy=function(){return Na(e,t()).base(e.base())},_o.apply(e,arguments),e}().base(n.base||10):i===T.LABELS?Co():ns()).domain(this.getScaleDomain(t)),r},e.prototype.getHighestDomainThreshold=function(){var t=Zr.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)!==T.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=Zr.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}(Mc);var Wp,Yp,qp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.curveTypes={curveLinear:Tl,curveLinearClosed:ac,curveBasis:jl,curveBasisClosed:Vl,curveBasisOpen:Bl,curveBundle:zl,curveCardinal:ql,curveCardinalClosed:Zl,curveCardinalOpen:Kl,curveCatmullRom:tc,curveCatmullRomClosed:nc,curveCatmullRomOpen:ic,curveMonotoneX:pc,curveMonotoneY:gc,curveNatural:yc,curveStep:bc,curveStepAfter:wc,curveStepBefore:xc},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}(Mc),Xp=function(){function t(t,e,n){this.configs={},this.model=t,this.services=e,n&&(this.configs=n),this.parent||this.setParent(Uh(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=Zr.getProperty(this.model.getOptions(),"style","prefix");this.parent.classed(Vh.prefix+"--"+n+"--"+this.type,!0),e&&e.classed(Vh.prefix+"--"+n+"--"+this.type,!1)}},t.prototype.getParent=function(){return this.parent},t.prototype.getContainerSVG=function(){if(this.type){var t=Zr.getProperty(this.model.getOptions(),"style","prefix");return cf.appendOrSelect(this.parent,"g."+Vh.prefix+"--"+t+"--"+this.type)}return this.parent},t}(),Zp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="legend",e}return n(e,t),e.prototype.render=function(){var t=this,e=this.getContainerSVG().attr("role",r.GRAPHICS_DOCUMENT),n=this.model.getOptions(),i=Zr.getProperty(n,"legend"),o=e.selectAll("g.legend-item").data(this.model.getDataGroups(),(function(t){return t.name})),a=o.enter().append("g").classed("legend-item",!0).classed("active",(function(t,e){return t.status===n.legend.items.status.ACTIVE})),s=n.legend.checkbox.radius,u=Zr.getProperty(i,"truncation","type"),l=Zr.getProperty(i,"truncation","threshold"),c=Zr.getProperty(i,"truncation","numCharacter");a.append("rect").classed("checkbox",!0).merge(o.select("rect.checkbox")).attr("width",2*s).attr("height",2*s).attr("rx",1).attr("ry",1).style("fill",(function(e){return e.status===n.legend.items.status.ACTIVE?t.model.getStrokeColor(e.name):null})).classed("active",(function(t,e){return t.status===n.legend.items.status.ACTIVE}));var h=a.append("text").merge(o.select("text"));u!==x.NONE?h.html((function(t){return t.name.length>l?Zr.truncateLabel(t.name,u,c):t.name})):h.html((function(t){return t.name})),this.breakItemsIntoLines(a),o.exit().on("mouseover",null).on("click",null).on("mouseout",null).remove();var f=Zr.getProperty(this.model.getOptions(),"legend","clickable");e.classed("clickable",f),f&&a.size()>0&&this.addEventListeners()},e.prototype.breakItemsIntoLines=function(t){var e=this,n=this.getContainerSVG(),r=this.model.getOptions(),i=r.legend.checkbox.radius,o=r.legend.items.horizontalSpace,a=r.legend.items.verticalSpace,s=r.legend.items.textYOffset,u=2*i+r.legend.checkbox.spaceAfter,l=r.legend.items.status.DISABLED,c=this.model.getDataGroups().some((function(t){return t.status===l})),h=Zr.getProperty(r,"legend","orientation"),f=0,d=0,p=0;t.merge(n.selectAll("g.legend-item")).each((function(t,r){var l=Uh(this),g=Uh(n.selectAll("g.legend-item").nodes()[r-1]);if(0===p||g.empty()||h===M.VERTICAL)h===M.VERTICAL&&0!==r&&d++;else{var v=cf.getSVGElementSize(e.parent,{useAttr:!0}),m=cf.getSVGElementSize(Uh(this).select("text"),{useBBox:!0}),y=cf.getSVGElementSize(g.select("text"),{useBBox:!0});(f=f+y.width+u+o)+u+m.width>v.width&&(d++,f=0,p=0)}l.select("rect.checkbox").attr("x",f).attr("y",0+d*a);var _=s+d*a;l.select("text").attr("x",f+u).attr("y",0+_+3);var b=(!h||h===M.HORIZONTAL)&&"0"===l.select("rect.checkbox").attr("y"),x=h===M.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=Zr.getProperty(n,"legend"),i=Zr.getProperty(r,"truncation","threshold");e.selectAll("g.legend-item").on("mouseover",(function(){t.services.events.dispatchEvent(U.Legend.ITEM_HOVER,{hoveredElement:Uh(this)});var e=n.legend.checkbox.radius,r=Uh(this);r.append("rect").classed("hover-stroke",!0).attr("x",parseFloat(r.select("rect.checkbox").attr("x"))-2).attr("y",parseFloat(r.select("rect.checkbox").attr("y"))-2).attr("width",2*e+4).attr("height",2*e+4).attr("rx",3).attr("ry",3).lower()})).on("click",(function(){t.services.events.dispatchEvent(U.Legend.ITEM_CLICK,{clickedElement:Uh(this)});var e=Uh(this).datum();t.model.toggleDataLabel(e.name)})).on("mousemove",(function(){var e=Uh(this);e.datum().name.length>i&&t.services.events.dispatchEvent(U.Tooltip.SHOW,{hoveredElement:e,type:O.LEGEND})})).on("mouseout",(function(){var e=Uh(this);e.select("rect.hover-stroke").remove(),t.services.events.dispatchEvent(U.Tooltip.HIDE),t.services.events.dispatchEvent(U.Legend.ITEM_MOUSEOUT,{hoveredElement:e})}))},e}(Xp);!function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(Yp||(Yp={}));var $p=((Wp={})[Yp.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)}},Wp[Yp.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)}},Wp[Yp.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)}},Wp[Yp.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)}},Wp),Kp="undefined"!=typeof window?window:{innerHeight:0,scrollY:0,innerWidth:0,scrollX:0},Qp=function(){function t(t){void 0===t&&(t={}),this.positions=$p,this.positions=Object.assign({},$p,t)}return t.prototype.getRelativeOffset=function(t){for(var e={left:t.offsetLeft,top:t.offsetTop};t.offsetParent&&"static"===getComputedStyle(t.offsetParent).position;)e.left+=t.offsetLeft,e.top+=t.offsetTop,t=t.offsetParent;return e},t.prototype.getAbsoluteOffset=function(t){for(var e=t,n={top:0,left:0};e.offsetParent;){var r=getComputedStyle(e.offsetParent);"static"===r.position&&r.marginLeft&&r.marginTop&&(parseInt(r.marginTop,10)&&(n.top+=parseInt(r.marginTop,10)),parseInt(r.marginLeft,10)&&(n.left+=parseInt(r.marginLeft,10))),e=e.offsetParent}var i=t.getBoundingClientRect(),o=document.body.getBoundingClientRect();return{top:i.top-o.top+n.top,left:i.left-o.left+n.left}},t.prototype.findRelative=function(t,e,n){var r=this.getRelativeOffset(t),i=t.getBoundingClientRect();return this.calculatePosition(r,i,e,n)},t.prototype.findAbsolute=function(t,e,n){var r=this.getAbsoluteOffset(t),i=t.getBoundingClientRect();return this.calculatePosition(r,i,e,n)},t.prototype.findPosition=function(t,e,n,r){void 0===r&&(r=this.getAbsoluteOffset);var i=r(t),o=t.getBoundingClientRect();return this.calculatePosition(i,o,e,n)},t.prototype.findPositionAt=function(t,e,n){return this.calculatePosition(t,{height:0,width:0},e,n)},t.prototype.getPlacementBox=function(t,e){var n=t.offsetHeight+e.top,r=t.offsetWidth+e.left;return{top:e.top,bottom:n,left:e.left,right:r}},t.prototype.addOffset=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),Object.assign({},t,{top:t.top+e,left:t.left+n})},t.prototype.setElement=function(t,e){t.style.top=e.top+"px",t.style.left=e.left+"px"},t.prototype.findBestPlacement=function(t,e,n,r,i){var o=this;void 0===r&&(r=this.defaultContainerFunction),void 0===i&&(i=this.findPosition);var a=n.map((function(n){var a=i(t,e,n),s=o.getPlacementBox(e,a),u=s.bottom-r().height,l=s.right-r().width;u=u<0?e.offsetHeight:u,l=l<0?e.offsetWidth:l;var c=e.offsetHeight*e.offsetWidth,h=c-u*l;return{placement:n,weight:(h=0===h?c:h)/c}}));return a.sort((function(t,e){return e.weight-t.weight})),a[0].placement},t.prototype.findBestPlacementAt=function(t,e,n,r){var i=this;void 0===r&&(r=this.defaultContainerFunction);return this.findBestPlacement(null,e,n,r,(function(e,n,r){return i.findPositionAt(t,n,r)}))},t.prototype.defaultContainerFunction=function(){return{width:Kp.innerHeight-Kp.scrollY,height:Kp.innerWidth-Kp.scrollX}},t.prototype.calculatePosition=function(t,e,n,r){return this.positions[r]?this.positions[r](t,n,e):(console.error("No function found for placement, defaulting to 0,0"),{left:0,top:0})},t}(),Jp=(new Qp,[["15seconds",15e3],["minute",6e4],["30minutes",18e5],["hourly",36e5],["daily",864e5],["monthly",2592e6],["quarterly",7776e6],["yearly",31104e6]]);function tg(t,e,n,r){var i=0===e,o=2===Number(Np(new Date(t),"c")),a=1===Number(Np(new Date(t),"q"));switch(n){case"15seconds":case"minute":case"30minutes":case"hourly":return i||ig(t)||og(t)||ag(t);case"daily":return r?i||o||ag(t):i||og(t)||ag(t);case"monthly":return i||ag(t);case"quarterly":return i||a;case"yearly":return!1;default:throw new Error(n+" is not a valid time interval.")}}function eg(t,e,n,r){var i=r.showDayName,o="daily"===n&&i?"weekly":n,a=new Date(t),s=Zr.getProperty(r,"timeIntervalFormats")[o],u=Zr.getProperty(s,"primary"),l=Zr.getProperty(s,"secondary");return Np(a,tg(t,e,n,i)?u:l,{locale:r.localeObject})}function ng(t){var e=new Date(t);return{M:e.getMonth()+1,d:e.getDate(),H:e.getHours(),m:e.getMinutes(),s:e.getSeconds()}}function rg(t){return 1===t.length?"15seconds":function(t){var e=Jp.reduce((function(e,n,r){n[0];var i=n[1],o=Jp[e][1];return Math.abs(o-t)<Math.abs(i-t)?e:r}),0);return Jp[e][0]}(function(t,e){var n,r,i=t.length,o=-1;if(null==e){for(;++o<i;)if(null!=(n=t[o])&&n>=n)for(r=n;++o<i;)null!=(n=t[o])&&r>n&&(r=n)}else for(;++o<i;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=n;++o<i;)null!=(n=e(t[o],o,t))&&r>n&&(r=n);return r}(function(t){if(t)return t.slice(1).map((function(e,n){return e-t[n]}))}(t)))}function ig(t){var e=ng(t),n=e.s,r=e.m;return 0===e.H&&0===r&&0===n}function og(t){var e=ng(t),n=e.d,r=e.s,i=e.m,o=e.H;return 1===n&&0===o&&0===i&&0===r}function ag(t){var e=ng(t),n=e.M,r=e.d,i=e.s,o=e.m,a=e.H;return 1===n&&1===r&&0===a&&0===o&&0===i}var sg=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="threshold",i.positionService=new Qp,i}return n(e,t),e.prototype.render=function(t){var e=this;void 0===t&&(t=!1);var n=this.configs,r=n.value,i=n.fillColor,o=n.axisPosition,a=n.index,s=Zr.getProperty(this.model.getOptions(),"style","prefix");this.thresholdClass=Vh.prefix+"--"+s+"--threshold",this.thresholdIdentifierClass=o+"-"+a,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(o),h=this.services.cartesianScales.getScaleTypeByPosition(o),f=this.services.cartesianScales.getMainXScale(),d=this.services.cartesianScales.getMainYScale(),p=h===T.LABELS,g=f.range(),v=g[0],m=g[1],y=d.range(),_=y[0],b=y[1],x=this.services.cartesianScales,E=x.getOrientation(),O=Zr.flipDomainAndRangeBasedOnOrientation((function(t){return x.getDomainValue(t)}),(function(t){return x.getRangeValue(t)}),E),S=O[0],M=O[1];if(E===w.VERTICAL){var A=S(r)+(p?c.step()/2:0);this.threshold.transition(this.services.transitions.getTransition("threshold-update",t)).attr("transform","translate("+A+", "+b+")"),l.attr("y2",_-b),u.attr("width",_-b).classed("rotate",!0)}else{A=M(r)+(p?c.step()/2:0);this.threshold.transition(this.services.transitions.getTransition("threshold-update",t)).attr("transform","translate("+v+", "+A+")"),l.attr("x2",m-v),u.attr("width",m-v)}var C=this;this.services.events.addEventListener(U.Threshold.SHOW,(function(t){t.detail.hoveredElement.node()===C.threshold&&(e.setThresholdLabelPosition(),e.label.classed("hidden",!1))})),this.services.events.addEventListener(U.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)===T.TIME){var i=[b.LEFT,b.RIGHT].includes(n),o=this.services.cartesianScales.getMainXScale(),a=this.services.cartesianScales.getMainYScale(),s=i?a:o,u=Zr.getProperty(r,"timeScale");return eg(e,0,rg(s.ticks()),u)}return e.toLocaleString("en")},e.prototype.appendThresholdLabel=function(){var t=this.configs,e=t.value,n=t.valueFormatter,r=t.fillColor,i=t.label,o=void 0===i?"Threshold":i,a=Uh(this.services.domUtils.getHolder()),s=n?n(e):this.getFormattedValue();this.label=cf.appendOrSelect(a,"div."+this.thresholdClass+"--label."+this.thresholdIdentifierClass),this.label.html(o+": "+s).classed("hidden",!0).style("background-color",r)},e.prototype.setThresholdLabelPosition=function(){var t=this.services.domUtils.getHolder(),e=this.label.node(),n=Hh(t),r=this.positionService.findBestPlacementAt({left:n[0],top:n[1]},e,[Yp.RIGHT,Yp.LEFT,Yp.TOP,Yp.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(U.Threshold.SHOW,{hoveredElement:Uh(t.threshold)})})).on("mouseout",(function(){t.threshold.classed("active",!1),t.services.events.dispatchEvent(U.Threshold.HIDE,{hoveredElement:Uh(t.threshold)})}))},e}(Xp),ug=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="title",e}return n(e,t),e.prototype.truncateTitle=function(){var t=cf.getSVGElementSize(this.services.domUtils.getMainSVG(),{useAttr:!0}).width,e=cf.appendOrSelect(this.parent,"text.title");if(!(t<=0)&&e.node().getComputedTextLength()>t){e.append("tspan").text("...");var n=cf.appendOrSelect(e,"tspan").node().getComputedTextLength(),r=Math.floor(t-n),i=this.model.getOptions().title,o=this.getSubstringIndex(e.node(),0,i.length-1,r);e.html(i.substring(0,o-1)).append("tspan").text("...");var a=this;e.on("mouseenter",(function(){a.services.events.dispatchEvent(U.Tooltip.SHOW,{hoveredElement:e,type:O.TITLE})})).on("mouseout",(function(){a.services.events.dispatchEvent(U.Tooltip.HIDE,{hoveredElement:e})}))}},e.prototype.render=function(){var t=this.getContainerSVG();cf.appendOrSelect(t,"text.title").attr("x",0).attr("y",20).html(this.model.getOptions().title),this.truncateTitle()},e.prototype.getSubstringIndex=function(t,e,n,r){var i=Math.floor((n+e)/2);return t.getSubStringLength(0,i)>r?this.getSubstringIndex(t,e,i,r):t.getSubStringLength(0,i)<r?t.getSubStringLength(0,i+1)>r?i:this.getSubstringIndex(t,i,n,r):i},e}(Xp),lg=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="tooltip",i.positionService=new Qp,i.init(),i}return n(e,t),e.prototype.init=function(){var t=this,e=Uh(this.services.domUtils.getHolder()),n=Zr.getProperty(this.model.getOptions(),"style","prefix");this.tooltip=cf.appendOrSelect(e,"div."+Vh.prefix+"--"+n+"--tooltip");var r=cf.appendOrSelect(this.tooltip,"div.content-box");this.tooltip.style("max-width",null),this.services.events.addEventListener(U.Tooltip.SHOW,(function(i){if(i.detail.type===O.DATAPOINT&&Zr.getProperty(t.model.getOptions(),"tooltip","datapoint","enabled")||i.detail.type===O.GRIDLINE&&Zr.getProperty(t.model.getOptions(),"tooltip","gridline","enabled")||i.detail.type===O.LEGEND||i.detail.type===O.AXISLABEL){var o=Uh(Oh.target).datum(),a=void 0;i.detail.multidata?(o=i.detail.multidata,a=t.getMultilineTooltipHTML(o,i.detail.type)):a=t.getTooltipHTML(o,i.detail.type),Zr.getProperty(t.model.getOptions(),"tooltip","customHTML")?r.html(t.model.getOptions().tooltip.customHTML(o,a)):r.html(a),t.positionTooltip()}else if(i.detail.type===O.TITLE){var s=cf.appendOrSelect(e,"svg."+Vh.prefix+"--"+n+"--chart-svg"),u=cf.getSVGElementSize(s).width*Zr.getProperty(t.model.getOptions(),"tooltip","title","width");t.tooltip.style("max-width",u),r.html(t.getTooltipHTML(i.detail.hoveredElement,O.TITLE));var l=t.getTooltipPosition(i.detail.hoveredElement.node(),i.detail.type);t.positionTooltip(l)}t.tooltip.classed("hidden",!1)})),this.services.events.addEventListener(U.Tooltip.HIDE,(function(){t.tooltip.classed("hidden",!0)}))},e.prototype.getTooltipHTML=function(t,e){if(e===O.TITLE)return'<div class="title-tooltip"><text>'+this.model.getOptions().title+"</text></div>";if(e===O.LEGEND)return'<div class="legend-tooltip"><p class="label">'+t.name+"</p></div>";var n=Zr.getProperty(t,"data")?t.data:t,r=this.model.getOptions().data.groupMapsTo,i=this.services.cartesianScales.getRangeIdentifier(),o=Zr.getProperty(this.model.getOptions(),"tooltip","valueFormatter")?this.model.getOptions().tooltip.valueFormatter(n[i]):n[i].toLocaleString("en");return'<div class="datapoint-tooltip">\n\t\t\t\t\t<p class="label">'+n[r]+'</p>\n\t\t\t\t\t<p class="value">'+o+"</p>\n\t\t\t\t</div>"},e.prototype.getMultilineTooltipHTML=function(t,e){var n=this;t.sort((function(t,e){return e.value-t.value}));this.services.cartesianScales.getDomainScale().scaleType;return"<ul class='multi-tooltip'>"+t.map((function(t){var e=n.model.getOptions().data.groupMapsTo,r=n.services.cartesianScales.getRangeIdentifier(),i=Zr.getProperty(n.model.getOptions(),"tooltip","valueFormatter"),o=i?i(t[r]):t[r].toLocaleString("en");return'\n\t\t\t\t<li>\n\t\t\t\t\t<div class="datapoint-tooltip">\n\t\t\t\t\t\t<a style="background-color:'+n.model.getStrokeColor(t[e])+'" class="tooltip-color"></a>\n\t\t\t\t\t\t<p class="label">'+t[e]+'</p>\n\t\t\t\t\t\t<p class="value">'+o+"</p>\n\t\t\t\t\t</div>\n\t\t\t\t</li>"})).join("")+"</ul>"},e.prototype.render=function(){this.tooltip.classed("hidden",!0)},e.prototype.getTooltipPosition=function(t,e){var n=Uh(this.services.domUtils.getHolder()).node().getBoundingClientRect(),r=t.getBoundingClientRect(),i=this.model.getOptions().tooltip.title.verticalOffset,o={left:r.left-n.left+r.width/2,top:r.top-n.top-i};return{placement:E.BOTTOM,position:o}},e.prototype.positionTooltip=function(t){var e,n=this.services.domUtils.getHolder(),r=this.tooltip.node(),i=Hh(n);if(t){var o=t.placement===E.TOP?Yp.TOP:Yp.BOTTOM;e=this.positionService.findPositionAt(t.position,r,o)}else{var a=this.positionService.findBestPlacementAt({left:i[0],top:i[1]},r,[Yp.RIGHT,Yp.LEFT,Yp.TOP,Yp.BOTTOM],(function(){return{width:n.offsetWidth,height:n.offsetHeight}})),s=this.model.getOptions().tooltip.datapoint.horizontalOffset;a===Yp.LEFT&&(s*=-1),e=this.positionService.findPositionAt({left:i[0]+s,top:i[1]},r,a)}this.positionService.setElement(r,e)},e}(Xp),cg=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.init=function(){var e=this,n=Uh(this.services.domUtils.getHolder()),r=Zr.getProperty(this.model.getOptions(),"style","prefix");this.tooltip=cf.appendOrSelect(n,"div."+Vh.prefix+"--"+r+"--tooltip");var i=cf.appendOrSelect(this.tooltip,"div.content-box");this.tooltip.style("max-width",null),this.services.events.addEventListener(U.Tooltip.SHOW,(function(o){if(o.detail.type===O.DATAPOINT&&Zr.getProperty(e.model.getOptions(),"tooltip","datapoint","enabled")||o.detail.type===O.GRIDLINE&&Zr.getProperty(e.model.getOptions(),"tooltip","gridline","enabled")||o.detail.type===O.LEGEND||o.detail.type===O.AXISLABEL){var a=o.detail.hoveredElement.datum(),s=o.detail.hoveredElement.node(),u=void 0;if(o.detail.multidata?(a=o.detail.multidata,u=e.getMultilineTooltipHTML(a)):(a=o.detail.data?o.detail.data:o.detail.hoveredElement.datum(),u=e.getTooltipHTML(a,o.detail.type)),Zr.getProperty(e.model.getOptions(),"tooltip","customHTML")?i.html(e.model.getOptions().tooltip.customHTML(a,u)):i.html(u),o.detail.type===O.LEGEND||o.detail.type===O.AXISLABEL)e.positionTooltip();else{var l=e.getTooltipPosition(s,a);e.positionTooltip(o.detail.multidata?void 0:l)}}else if(o.detail.type===O.TITLE){var c=cf.appendOrSelect(n,"svg."+Vh.prefix+"--"+r+"--chart-svg"),h=cf.getSVGElementSize(c).width*Zr.getProperty(e.model.getOptions(),"tooltip","title","width");e.tooltip.style("max-width",h),i.html(t.prototype.getTooltipHTML.call(e,o.detail.hoveredElement,O.TITLE));l=t.prototype.getTooltipPosition.call(e,o.detail.hoveredElement.node(),o.detail.type);e.positionTooltip(l)}e.tooltip.classed("hidden",!1)})),this.services.events.addEventListener(U.Tooltip.HIDE,(function(){e.tooltip.classed("hidden",!0)}))},e.prototype.getTooltipPosition=function(t,e){void 0===e&&(e=Uh(t).datum());var n=Uh(this.services.domUtils.getHolder()).node().getBoundingClientRect(),r=t.getBoundingClientRect(),i=this.model.getOptions().tooltip.datapoint.verticalOffset;if(e.value<=0){var o={left:r.left-n.left+r.width/2,top:r.bottom-n.top+i};return{placement:E.BOTTOM,position:o}}o={left:r.left-n.left+r.width/2,top:r.top-n.top-i};return{placement:E.TOP,position:o}},e.prototype.getTooltipHTML=function(t,e){if(e===O.LEGEND)return'<div class="legend-tooltip"><p class="label">'+t.name+"</p></div>";if(e===O.AXISLABEL)return'<div class="axis-tooltip"><p class="label">'+t+"</p></div>";var n=this.services.cartesianScales.getRangeIdentifier();return'<div class="datapoint-tooltip"><p class="value">'+(Zr.getProperty(this.model.getOptions(),"tooltip","valueFormatter")?this.model.getOptions().tooltip.valueFormatter(t.value):t[n].toLocaleString("en"))+"</p></div>"},e.prototype.getMultilineTooltipHTML=function(t){var e=this,n=t;n.reverse(),this.services.cartesianScales.getOrientation()===w.VERTICAL&&n.reverse();var r=n.reduce((function(t,e){return t+e.value}),0);return r=Zr.getProperty(this.model.getOptions(),"tooltip","valueFormatter")?this.model.getOptions().tooltip.valueFormatter(r):r.toLocaleString("en"),"<ul class='multi-tooltip'>"+n.map((function(t){var n=Zr.getProperty(e.model.getOptions(),"tooltip","valueFormatter")?e.model.getOptions().tooltip.valueFormatter(t.value):t.value.toLocaleString("en");return'\n\t\t\t\t<li>\n\t\t\t\t\t<div class="datapoint-tooltip">\n\t\t\t\t\t\t<a style="background-color:'+e.model.getStrokeColor(t.datasetLabel,t.label)+'" class="tooltip-color"></a>\n\t\t\t\t\t\t<p class="label">'+t.datasetLabel+'</p>\n\t\t\t\t\t\t<p class="value">'+n+"</p>\n\t\t\t\t\t</div>\n\t\t\t\t</li>"})).join("")+"<li>\n\t\t\t\t\t<div class='total-val'>\n\t\t\t\t\t\t<p class='label'>Total</p>\n\t\t\t\t\t\t<p class='value'>"+r+"</p>\n\t\t\t\t\t</div>\n\t\t\t\t</li>\n\t\t\t</ul>"},e}(lg),hg=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getTooltipHTML=function(t,e){if(e===O.TITLE)return'<div class="title-tooltip"><text>'+this.model.getOptions().title+"</text></div>";if(e===O.LEGEND)return'<div class="legend-tooltip"><p class="label">'+t.name+"</p></div>";var n=t.data,r=this.model.getOptions().data.groupMapsTo,i=Zr.getProperty(this.model.getOptions(),"tooltip","valueFormatter")?this.model.getOptions().tooltip.valueFormatter(n.value):n.value.toLocaleString("en");return'<div class="datapoint-tooltip">\n\t\t\t\t<p class="label">'+n[r]+'</p>\n\t\t\t\t<p class="value">'+i+"</p>\n\t\t\t</div>"},e}(lg),fg=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getTooltipHTML=function(e,n){if(n===O.TITLE)return t.prototype.getTooltipHTML.call(this,e,n);if(n===O.LEGEND)return'<div class="legend-tooltip"><p class="label">'+e.name+"</p></div>";if(n===O.AXISLABEL)return'<div class="axis-tooltip"><p class="label">'+e+"</p></div>";var r=this.model.getOptions().data.groupMapsTo,i=this.services.cartesianScales.getRangeIdentifier(),o=Zr.getProperty(this.model.getOptions(),"tooltip","valueFormatter"),a=o?o(e[i]):e[i].toLocaleString("en");return'\n\t\t\t<div class="datapoint-tooltip">\n\t\t\t\t<a style="background-color:'+this.model.getStrokeColor(e[r])+'" class="tooltip-color"></a>\n\t\t\t\t<p class="label">'+e[r]+'</p>\n\t\t\t\t<p class="value">'+a+"</p>\n\t\t\t</div>"},e}(lg),dg=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getMultilineTooltipHTML=function(t,e){var n=this,r=this.model.getOptions(),i=r.data.groupMapsTo,o=r.radar.axes,a=(o.angle,o.value);return t.sort((function(t,e){return e[a]-t[a]})),"<ul class='multi-tooltip'>"+t.map((function(t){var e=Zr.getProperty(r,"tooltip","valueFormatter"),o=e?e(t[a]):t[a];return'\n\t\t\t\t<li>\n\t\t\t\t\t<div class="datapoint-tooltip">\n\t\t\t\t\t\t<a style="background-color:'+n.model.getStrokeColor(t[i])+'" class="tooltip-color"></a>\n\t\t\t\t\t\t<p class="label">'+t[i]+'</p>\n\t\t\t\t\t\t<p class="value">'+o+"</p>\n\t\t\t\t\t</div>\n\t\t\t\t</li>"})).join("")+"</ul>"},e}(lg),pg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="area",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?Di.opacity.unselected:Di.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.area").transition(e.services.transitions.getTransition("legend-mouseout-area")).attr("opacity",Di.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(U.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(U.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getContainerSVG(),r=this.services.cartesianScales,i=r.getOrientation(),o=Ml().curve(this.services.curves.getD3Curve());i===w.VERTICAL?o.x((function(t,e){return r.getDomainValue(t,e)})).y0(r.getRangeValue(0)).y1((function(t,e){return r.getRangeValue(t,e)})):o.x0(r.getRangeValue(0)).x1((function(t,e){return r.getRangeValue(t,e)})).y((function(t,e){return r.getDomainValue(t,e)}));var a=this.model.getGroupedData(),s=n.selectAll("path.area").data(a,(function(t){return t.name}));s.exit().attr("opacity",0).remove(),s.enter().append("path").attr("opacity",0).merge(s).attr("fill",(function(t){return e.model.getFillColor(t.name)})).transition(this.services.transitions.getTransition("area-update-enter",t)).attr("opacity",Di.opacity.selected).attr("class","area").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(U.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(U.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Xp),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?Di.opacity.unselected:Di.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.area").transition(e.services.transitions.getTransition("legend-mouseout-area")).attr("opacity",Di.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(U.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(U.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){void 0===t&&(t=!0);var e=this.getContainerSVG(),n=this,i=this.model.getOptions(),o=i.data.groupMapsTo,a=this.services.cartesianScales.getMainXScale(),s=this.services.cartesianScales.getMainYScale(),u=this.services.cartesianScales.getDomainAxisPosition();if(this.services.cartesianScales.getScaleTypeByPosition(u)===T.TIME){var l=Object.keys(i.axes).some((function(t){return i.axes[t].percentage})),c=this.model.getStackedData({percentage:l}),h=e.selectAll("path.area").data(c,(function(t){return t[0][o]}));this.areaGenerator=Ml().x((function(t){return a(new Date(t.data.sharedStackKey))})).y0((function(t){return s(t[0])})).y1((function(t){return s(t[1])})).curve(this.services.curves.getD3Curve()),h.exit().attr("opacity",0).remove(),h.enter().append("path").attr("opacity",0).merge(h).data(c,(function(t){return t[0][o]})).attr("fill",(function(t){return n.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",Di.opacity.selected).attr("class","area").attr("d",this.areaGenerator)}},e.prototype.destroy=function(){this.parent.selectAll("path.area").on("mouseover",null).on("mousemove",null).on("mouseout",null)},e}(Xp),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(),n=this.services.cartesianScales.getMainXScale();return n.step?Math.min(e.bars.maxWidth,n.step()/2):Math.min(e.bars.maxWidth,5/n.ticks().length*e.bars.maxWidth)},e}(Xp),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(U.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(U.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.model.getOptions().data.groupMapsTo,i=this.getContainerSVG().selectAll("path.bar").data(this.model.getDisplayData(),(function(t){return t[n]}));i.exit().attr("opacity",0).remove(),i.enter().append("path").attr("opacity",0).merge(i).classed("bar",!0).attr("width",this.getBarWidth.bind(this)).transition(this.services.transitions.getTransition("bar-update-enter",t)).attr("fill",(function(t){return e.model.getFillColor(t[n])})).attr("d",(function(t,n){var r=e.getBarWidth(),i=e.services.cartesianScales.getDomainValue(t,n)-r/2,o=i+r,a=e.services.cartesianScales.getRangeValue(0),s=e.services.cartesianScales.getRangeValue(t,n);return Zr.generateSVGPathString({x0:i,x1:o,y0:a,y1:s},e.services.cartesianScales.getOrientation())})).attr("opacity",1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t.value})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this.model.getOptions().data.groupMapsTo,e=this;this.parent.selectAll("path.bar").on("mouseover",(function(n){var r=Uh(this);r.classed("hovered",!0),r.transition(e.services.transitions.getTransition("graph_element_mouseover_fill_update")).attr("fill",(function(n){return Yo(e.model.getFillColor(n[t])).darker(.7).toString()})),e.services.events.dispatchEvent(U.Bar.BAR_MOUSEOVER,{element:r,datum:n}),e.services.events.dispatchEvent(U.Tooltip.SHOW,{hoveredElement:r,type:O.DATAPOINT})})).on("mousemove",(function(t){e.services.events.dispatchEvent(U.Bar.BAR_MOUSEMOVE,{element:Uh(this),datum:t})})).on("click",(function(t){e.services.events.dispatchEvent(U.Bar.BAR_CLICK,{element:Uh(this),datum:t})})).on("mouseout",(function(n){var r=Uh(this);r.classed("hovered",!1),r.transition(e.services.transitions.getTransition("graph_element_mouseout_fill_update")).attr("fill",(function(n){return e.model.getFillColor(n[t])})),e.services.events.dispatchEvent(U.Bar.BAR_MOUSEOUT,{element:r,datum:n}),e.services.events.dispatchEvent(U.Tooltip.HIDE,{hoveredElement:r})}))},e.prototype.destroy=function(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(U.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(U.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(U.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(U.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.model.getDisplayData(),i=this.model.getOptions().data.groupMapsTo,o=this.services.cartesianScales.getDomainIdentifier();this.setGroupScale();var a=this.getContainerSVG(),s=xo(n,(function(t){return t[o]})).keys(),u=a.selectAll("g.bars").data(s,(function(t){return t}));u.exit().attr("opacity",0).remove();var l=u.enter().append("g").classed("bars",!0).attr("role",r.GROUP).attr("aria-labelledby",(function(t){return t})).merge(u).attr("transform",(function(t,n){var r=e.services.cartesianScales.getDomainValue(t,n)-e.getGroupWidth()/2;return e.services.cartesianScales.getOrientation()===w.VERTICAL?"translate("+r+", 0)":"translate(0, "+r+")"})).selectAll("path.bar").data((function(t){return e.getDataCorrespondingToLabel(t)}));l.exit().attr("opacity",0).remove(),l.enter().append("path").attr("opacity",0).merge(l).classed("bar",!0).transition(this.services.transitions.getTransition("bar-update-enter",t)).attr("fill",(function(t){return e.model.getFillColor(t[i])})).attr("d",(function(t){var n=e.groupScale(t[i]),r=n,o=n+e.getBarWidth(),a=e.services.cartesianScales.getRangeValue(0),s=e.services.cartesianScales.getRangeValue(t.value);return Zr.generateSVGPathString({x0:r,x1:o,y0:a,y1:s},e.services.cartesianScales.getOrientation())})).attr("opacity",1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t.value})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this,e=this.model.getOptions().data.groupMapsTo;this.parent.selectAll("path.bar").on("mouseover",(function(n){var r=Uh(this);r.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")).attr("fill",(function(n){return Yo(t.model.getFillColor(n[e])).darker(.7).toString()})),t.services.events.dispatchEvent(U.Bar.BAR_MOUSEOVER,{element:r,datum:n}),t.services.events.dispatchEvent(U.Tooltip.SHOW,{hoveredElement:r,type:O.DATAPOINT})})).on("mousemove",(function(e){t.services.events.dispatchEvent(U.Bar.BAR_MOUSEMOVE,{element:Uh(this),datum:e})})).on("click",(function(e){t.services.events.dispatchEvent(U.Bar.BAR_CLICK,{element:Uh(this),datum:e})})).on("mouseout",(function(e){var n=Uh(this);n.classed("hovered",!1);var r=t.model.getOptions().data.groupMapsTo;n.transition(t.services.transitions.getTransition("graph_element_mouseout_fill_update")).attr("fill",(function(e){return t.model.getFillColor(e[r])})),t.services.events.dispatchEvent(U.Bar.BAR_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(U.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(U.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(U.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=Zr.getProperty(t,"bars","width"),n=Zr.getProperty(t,"bars","maxWidth");if(null!==e){if(null===n)return e;if(e<=n)return e}var r=this.model.getActiveDataGroupNames().length,i=this.getTotalGroupPadding(),o=this.services.cartesianScales.getDomainScale();return Math.min(n,(o.step()-i)/r)},e.prototype.setGroupScale=function(){this.groupScale=Co().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(U.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(U.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.getContainerSVG(),i=this.model.getDisplayData(),o=this.model.getOptions(),a=o.data.groupMapsTo,s=this.services.cartesianScales.getDomainIdentifier(),u=xo(i,(function(t){return t[s]})).keys(),l=this.model.getStackedData(),c=n.selectAll("g.bars").data(l,(function(t){return t.key}));c.exit().attr("opacity",0).remove(),c.enter().append("g").classed("bars",!0).attr("role",r.GROUP);var h=n.selectAll("g.bars").selectAll("path.bar").data((function(t){return t}));h.exit().remove(),h.enter().append("path").merge(h).classed("bar",!0).transition(this.services.transitions.getTransition("bar-update-enter",t)).attr("fill",(function(t){return e.model.getFillColor(t[a])})).attr("d",(function(t,n){var r=u[n],i=e.getBarWidth(),a=e.services.cartesianScales.getDomainValue(r,n)-i/2,s=a+i,l=e.services.cartesianScales.getRangeValue(t[0],n),c=e.services.cartesianScales.getRangeValue(t[1],n);return Math.abs(c-l)>0&&Math.abs(c-l)>o.bars.dividerSize&&(e.services.cartesianScales.getOrientation()===w.VERTICAL?c+=1:c-=1),Zr.generateSVGPathString({x0:a,x1:s,y0:l,y1:c},e.services.cartesianScales.getOrientation())})).attr("opacity",1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t.value})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this.model.getOptions().data.groupMapsTo,e=this;this.parent.selectAll("path.bar").on("mouseover",(function(n){var r=Uh(this);r.transition(e.services.transitions.getTransition("graph_element_mouseover_fill_update")).attr("fill",(function(n){return Yo(e.model.getFillColor(n[t])).darker(.7).toString()})),e.services.events.dispatchEvent(U.Bar.BAR_MOUSEOVER,{element:r,datum:n})})).on("mousemove",(function(t){var n,r=e.model.getDisplayData(),i=Uh(this),o=e.services.cartesianScales.getDomainIdentifier(),a=e.services.cartesianScales.getRangeIdentifier(),s=e.model.getOptions().data.groupMapsTo,u=r.find((function(e){return e[a]===t.data[t.group]&&e[o].toString()===t.data.sharedStackKey&&e[s]===t.group}));void 0===u&&((n={})[o]=t.data.sharedStackKey,n[a]=t.data[t.group],n[s]=t.group,u=n),e.services.events.dispatchEvent(U.Tooltip.SHOW,{hoveredElement:i,data:u,type:O.DATAPOINT})})).on("click",(function(t){e.services.events.dispatchEvent(U.Bar.BAR_CLICK,{element:Uh(this),datum:t})})).on("mouseout",(function(n){var r=Uh(this);r.classed("hovered",!1),r.transition(e.services.transitions.getTransition("graph_element_mouseout_fill_update")).attr("fill",(function(n){return e.model.getFillColor(n[t])})),e.services.events.dispatchEvent(U.Bar.BAR_MOUSEOUT,{element:r,datum:n}),e.services.events.dispatchEvent(U.Tooltip.HIDE,{hoveredElement:r})}))},e.prototype.destroy=function(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(U.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(U.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(U.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(U.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),this.configs.fadeInOnChartHolderMouseover&&(t.addEventListener(U.Chart.MOUSEOVER,this.handleChartHolderOnHover),t.addEventListener(U.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut))},e.prototype.render=function(t){var e,n=this.getContainerSVG(),r=this.model.getOptions(),i=r.data.groupMapsTo,o=this.services.cartesianScales.getDomainIdentifier(),a=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[a]&&null!==t[a]}));var u=n.selectAll("circle.dot").data(e,(function(t){return t[i]+"-"+t[o]}));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=Zr.flipDomainAndRangeBasedOnOrientation(this.services.cartesianScales.getHighestDomainThreshold(),this.services.cartesianScales.getHighestRangeThreshold(),r),o=i[0],a=i[1],s=Zr.flipDomainAndRangeBasedOnOrientation((function(t,e){return n.getDomainValue(t,e)}),(function(t,e){return n.getRangeValue(t,e)}),r),u=s[0],l=s[1],c=u(t,e),h=l(t,e);return a&&o?h<=a.scaleValue&&c>=o.scaleValue:a?h<=a.scaleValue:o?c>=o.scaleValue:void 0},e.prototype.styleCircles=function(t,e){var n=this,i=this.model.getOptions(),o=i.points.filled,a=this.services,s=a.cartesianScales,u=a.transitions,l=i.data.groupMapsTo,c=s.getDomainIdentifier(),h=s.getRangeIdentifier(),f=Zr.flipDomainAndRangeBasedOnOrientation((function(t,e){return s.getDomainValue(t,e)}),(function(t,e){return s.getRangeValue(t,e)}),s.getOrientation()),d=f[0],p=f[1],g=this.configs.fadeInOnChartHolderMouseover;t.raise().classed("dot",!0).classed("threshold-anomaly",(function(t,e){return n.isDatapointThresholdAnomaly(t,e)})).classed("filled",(function(t){return n.model.getIsFilled(t[l],t[c],t,o)})).classed("unfilled",(function(t){return!n.model.getIsFilled(t[l],t[c],t,o)})).transition(u.getTransition("scatter-update-enter",e)).attr("cx",d).attr("cy",p).attr("r",i.points.radius).attr("fill",(function(t){if(n.model.getIsFilled(t[l],t[c],t,o))return n.model.getFillColor(t[l],t[c],t)})).attr("fill-opacity",o?.2:1).attr("stroke",(function(t){return n.model.getStrokeColor(t[l],t[c],t)})).attr("opacity",g?0:1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","point").attr("aria-label",(function(t){return t[h]})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this,e=this.model.getOptions().data.groupMapsTo,n=this.services.cartesianScales.getDomainIdentifier();this.parent.selectAll("circle").on("mouseover mousemove",(function(r){var i=Uh(this);i.classed("hovered",!0).style("fill",(function(r){return t.model.getFillColor(r[e],r[n],r)}));var o=t.services.cartesianScales.getDomainValue(r),a=t.services.cartesianScales.getRangeValue(r),s=t.model.getDisplayData().filter((function(e){return o===t.services.cartesianScales.getDomainValue(e)&&a===t.services.cartesianScales.getRangeValue(e)}));t.services.events.dispatchEvent(U.Tooltip.SHOW,{hoveredElement:i,multidata:s.length>1?s:null,type:O.DATAPOINT});var u="mouseover"===Oh.type?U.Scatter.SCATTER_MOUSEOVER:U.Scatter.SCATTER_MOUSEMOVE;t.services.events.dispatchEvent(u,{element:i,datum:r})})).on("click",(function(e){t.services.events.dispatchEvent(U.Scatter.SCATTER_CLICK,{element:Uh(this),datum:e})})).on("mouseout",(function(e){var n=Uh(this);n.classed("hovered",!1),t.configs.filled||n.style("fill",null),t.services.events.dispatchEvent(U.Scatter.SCATTER_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(U.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(U.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(U.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),t.removeEventListener(U.Chart.MOUSEOVER,this.handleChartHolderOnHover),t.removeEventListener(U.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut)},e}(Xp),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})),o=cf.getSVGElementSize(this.services.domUtils.getMainSVG(),{useAttr:!0}),a=i.length>0,s=a?lo(i):[1,1];return ns().domain(s).range(a?e.bubble.radiusRange(o,r):[4,4])},e.prototype.styleCircles=function(t,e){var n=this,i=this.model.getOptions(),o=i.bubble.radiusMapsTo,a=this.getRadiusScale(t),s=i.data.groupMapsTo,u=this.services.cartesianScales.getDomainIdentifier();t.raise().classed("dot",!0).attr("role",r.GRAPHICS_SYMBOL).attr("cx",(function(t,e){return n.services.cartesianScales.getDomainValue(t,e)})).transition(this.services.transitions.getTransition("bubble-update-enter",e)).attr("cy",(function(t,e){return n.services.cartesianScales.getRangeValue(t,e)})).attr("r",(function(t){return a(t[o]||1)})).attr("fill",(function(t){return n.model.getFillColor(t[s],t[u],t)})).attr("fill-opacity",i.bubble.fillOpacity).attr("stroke",(function(t){return n.model.getStrokeColor(t[s],t[u],t)})).attr("opacity",1)},e}(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?Li.opacity.unselected:Li.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.line").transition(e.services.transitions.getTransition("legend-mouseout-line")).attr("opacity",Li.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(U.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(U.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getContainerSVG(),i=this.services,o=i.cartesianScales,a=i.curves,s=Zr.flipDomainAndRangeBasedOnOrientation((function(t,e){return o.getDomainValue(t,e)}),(function(t,e){return o.getRangeValue(t,e)}),o.getOrientation()),u=s[0],l=s[1],c=this.model.getOptions(),h=Sl().x(u).y(l).curve(a.getD3Curve()).defined((function(t,e){var n=t[o.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:!Zr.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("stroke",(function(t,n){return e.model.getStrokeColor(t.name)})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","line").attr("aria-label",(function(t){var n=t.data,r=e.services.cartesianScales.getRangeIdentifier();return n.map((function(t){return t[r]})).join(",")})).transition(this.services.transitions.getTransition("line-update-enter",t)).attr("opacity",(function(t){return t.hidden?0:1})).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(U.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(U.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Xp),Tg=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.getContainerSVG(),n=this.model.getOptions(),i=n.data.groupMapsTo,o=this.services.cartesianScales.getDomainIdentifier(),a=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[o]=t.data.sharedStackKey,e[a]=t[1],e}));this.styleCircles(h,t),this.addEventListeners()},e}(bg);function Eg(t,e){var n=this,r=ma(this._current,t);return function(t){return n._current=r(t),e(n._current)}}var Og=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="pie",e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.model.getOptions().data.groupMapsTo;e.parent.selectAll("path.slice").transition(e.services.transitions.getTransition("legend-hover-bar")).attr("opacity",(function(t){return t.data[r]!==n.datum().name?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.slice").transition(e.services.transitions.getTransition("legend-mouseout-bar")).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(U.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(U.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.getInnerRadius=function(){return this.model.getOptions().pie.innerRadius},e.prototype.render=function(t){void 0===t&&(t=!0);var e=this,n=this.getContainerSVG(),i=this.model.getDisplayData(),o=this.model.getOptions(),a=o.data.groupMapsTo,s=this.computeRadius();this.arc=xl().innerRadius(this.getInnerRadius()).outerRadius(s),this.hoverArc=xl().innerRadius(this.getInnerRadius()).outerRadius(s+o.pie.hoverArc.outerRadiusOffset);var u=function(){var t=Cl,e=Al,n=null,r=el(0),i=el(hl),o=el(0);function a(a){var s,u,l,c,h,f=a.length,d=0,p=new Array(f),g=new Array(f),v=+r.apply(this,arguments),m=Math.min(hl,Math.max(-hl,i.apply(this,arguments)-v)),y=Math.min(Math.abs(m)/f,o.apply(this,arguments)),_=y*(m<0?-1:1);for(s=0;s<f;++s)(h=g[p[s]=s]=+t(a[s],s,a))>0&&(d+=h);for(null!=e?p.sort((function(t,n){return e(g[t],g[n])})):null!=n&&p.sort((function(t,e){return n(a[t],a[e])})),s=0,l=d?(m-f*_)/d:0;s<f;++s,v=c)u=p[s],c=v+((h=g[u])>0?h*l:0)+_,g[u]={data:a[u],index:s,value:h,startAngle:v,endAngle:c,padAngle:y};return g}return a.value=function(e){return arguments.length?(t="function"==typeof e?e:el(+e),a):t},a.sortValues=function(t){return arguments.length?(e=t,n=null,a):e},a.sort=function(t){return arguments.length?(n=t,e=null,a):n},a.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:el(+t),a):r},a.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:el(+t),a):i},a.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:el(+t),a):o},a}().value((function(t){return t.value})).sort(null).padAngle(o.pie.padAngle)(i).sort((function(t,e){return t.index-e.index})),l=cf.appendOrSelect(n,"g.slices").attr("role",r.GROUP).selectAll("path.slice").data(u,(function(t){return t.data[a]}));l.exit().attr("opacity",0).remove(),l.enter().append("path").classed("slice",!0).attr("opacity",0).merge(l).attr("fill",(function(t){return e.model.getFillColor(t.data[a])})).attr("d",this.arc).transition(this.services.transitions.getTransition("pie-slice-enter-update",t)).attr("opacity",1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","slice").attr("aria-label",(function(t){return t.value+", "+Zr.convertValueToPercentage(t.data.value,i)+"%"})).attrTween("d",(function(t){return Eg.bind(this)(t,e.arc)}));var c=u.filter((function(t){return t.value>0})),h=cf.appendOrSelect(n,"g.labels").attr("role",r.GROUP).selectAll("text.pie-label").data(c,(function(t){return t.data[a]}));h.exit().attr("opacity",0).remove();var f=h.enter().append("text").classed("pie-label",!0),d=[];f.merge(h).style("text-anchor","middle").text((function(t){return o.pie.labels.formatter?o.pie.labels.formatter(t):Zr.convertValueToPercentage(t.data.value,i)+"%"})).datum((function(t){var e=s+7,n=(t.endAngle-t.startAngle)/2+t.startAngle,r=n/Math.PI*180,i=this.getComputedTextLength();return t.textOffsetX=i/2,t.textOffsetY=r>90&&r<270?10:0,t.xPosition=(t.textOffsetX+e)*Math.sin(n),t.yPosition=(t.textOffsetY+e)*-Math.cos(n),t})).attr("transform",(function(t,e){var n=c.length,r=(t.endAngle-t.startAngle)*(180/Math.PI);if(e>=n-2&&r<o.pie.callout.minSliceDegree){var i=void 0,a=void 0;return t.index===n-1?(i=t.xPosition+o.pie.callout.offsetX+o.pie.callout.textMargin+t.textOffsetX,a=t.yPosition-o.pie.callout.offsetY,t.direction=P.RIGHT,d.push(t)):(i=t.xPosition-o.pie.callout.offsetX-t.textOffsetX-o.pie.callout.textMargin,a=t.yPosition-o.pie.callout.offsetY,t.direction=P.LEFT,d.push(t)),"translate("+i+", "+a+")"}return"translate("+t.xPosition+", "+t.yPosition+")"})),this.renderCallouts(d);var p=s+o.pie.xOffset,g=s+o.pie.yOffset;d.length>0&&(g+=o.pie.yOffsetCallout),n.attr("transform","translate("+p+", "+g+")"),this.addEventListeners()},e.prototype.renderCallouts=function(t){var e=cf.appendOrSelect(this.getContainerSVG(),"g.callouts").attr("role",r.GROUP),n=this.model.getOptions(),i=e.selectAll("g.callout").data(t);i.exit().remove();var o=i.enter().append("g").classed("callout",!0).attr("role",r.GRAPHICS_SYMBOL+" "+r.GROUP).attr("aria-roledescription","label callout");o.merge(i).datum((function(t){var e=t.xPosition,r=t.yPosition;return t.direction===P.RIGHT?(t.startPos={x:e,y:r+t.textOffsetY},t.endPos={x:e+n.pie.callout.offsetX,y:r-n.pie.callout.offsetY+t.textOffsetY},t.intersectPointX=t.endPos.x-n.pie.callout.horizontalLineLength):(t.startPos={x:e,y:r+t.textOffsetY},t.endPos={x:e-n.pie.callout.offsetX,y:r-n.pie.callout.offsetY+t.textOffsetY},t.intersectPointX=t.endPos.x+n.pie.callout.horizontalLineLength),t})),o.append("line").classed("vertical-line",!0).merge(e.selectAll("line.vertical-line")).datum((function(t){return Uh(this.parentNode).datum()})).style("stroke-width","1px").attr("x1",(function(t){return t.startPos.x})).attr("y1",(function(t){return t.startPos.y})).attr("x2",(function(t){return t.intersectPointX})).attr("y2",(function(t){return t.endPos.y})),o.append("line").classed("horizontal-line",!0).merge(e.selectAll("line.horizontal-line")).datum((function(t){return Uh(this.parentNode).datum()})).style("stroke-width","1px").attr("x1",(function(t){return t.intersectPointX})).attr("y1",(function(t){return t.endPos.y})).attr("x2",(function(t){return t.endPos.x})).attr("y2",(function(t){return t.endPos.y}))},e.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("path.slice").on("mouseover",(function(e){t.services.events.dispatchEvent(U.Pie.SLICE_MOUSEOVER,{element:Uh(this),datum:e})})).on("mousemove",(function(e){var n=Uh(this);n.classed("hovered",!0).transition(t.services.transitions.getTransition("pie_slice_mouseover")).attr("d",t.hoverArc),t.services.events.dispatchEvent(U.Pie.SLICE_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(U.Tooltip.SHOW,{hoveredElement:n,type:O.DATAPOINT})})).on("click",(function(e){t.services.events.dispatchEvent(U.Pie.SLICE_CLICK,{element:Uh(this),datum:e})})).on("mouseout",(function(e){var n=Uh(this);n.classed("hovered",!1).transition(t.services.transitions.getTransition("pie_slice_mouseover")).attr("d",t.arc),t.services.events.dispatchEvent(U.Pie.SLICE_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(U.Tooltip.HIDE,{hoveredElement:n})}))},e.prototype.computeRadius=function(){var t=this.model.getOptions(),e=cf.getSVGElementSize(this.parent,{useAttrs:!0}),n=e.width,r=e.height;return Math.min(n,r)/2+t.pie.radiusOffset},e}(Xp),Sg=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 Zr.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 Zr.getProperty(t,"gauge","type")===R.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(Zr.getProperty(e,"gauge","deltaArrow","direction")){case I.UP:return"4,10 8,6 12,10";case I.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().data.groupMapsTo,o=this.getValue(),a=this.getValueRatio(),s=this.getArcSize(),u=this.getStartAngle(),l=u+a*s,c=u+s,h=this.computeRadius(),f=this.getInnerRadius();this.backgroundArc=xl().innerRadius(f).outerRadius(h).startAngle(l).endAngle(c),this.arc=xl().innerRadius(f).outerRadius(h).startAngle(u).endAngle(l),cf.appendOrSelect(n,"path.arc-background").attr("d",this.backgroundArc).attr("role",r.GROUP);var d=n.selectAll("path.arc-foreground").data([o]);d.enter().append("path").attr("class","arc-foreground").merge(d).attr("d",this.arc).attr("fill",(function(t){return e.model.getFillColor(t[i])})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","value").attr("aria-label",(function(t){return t.value})),n.attr("transform","translate("+h+", "+h+")"),this.drawValueNumber(),this.drawDelta(),d.exit().remove(),this.addEventListeners()},e.prototype.drawValueNumber=function(){var t=this.getContainerSVG(),e=this.model.getOptions(),n=Zr.getProperty(e,"gauge","type"),r=this.getValue(),i=this.getDelta(),o=this.computeRadius(),a=Zr.getProperty(e,"gauge","valueFontSize"),s=Zr.getProperty(e,"gauge","deltaFontSize"),u=Zr.getProperty(e,"gauge","numberSpacing"),l=0;n!==R.FULL||i?n===R.SEMI&&i&&(l=-(s(o)+u)):l=s(o);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=Zr.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",a(o)+"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",a(o)/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?Zr.getProperty(e,"gauge","deltaFontSize"):function(){return 0},o=n?Zr.getProperty(e,"gauge","numberFormatter"):function(){return null},a=Zr.getProperty(e,"gauge","deltaArrow","size"),s=Zr.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 o(t)+"%"}));var h=cf.getSVGElementSize(cf.appendOrSelect(t,".gauge-delta-number"),{useBBox:!0}).width,f=Zr.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",-a(r)-h/2).attr("y",-a(r)/2-.35*i(r)).attr("width",a(r)).attr("height",a(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=Zr.getProperty(e,"gauge","status");cf.appendOrSelect(d,"polygon.gauge-delta-arrow").classed("status--"+p,null!==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()-Zr.getProperty(this.model.getOptions(),"gauge","arcWidth")},e.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("path.arc").on("mouseover",(function(e){t.services.events.dispatchEvent(U.Gauge.ARC_MOUSEOVER,{element:Uh(this),datum:e})})).on("mousemove",(function(e){var n=Uh(this);t.services.events.dispatchEvent(U.Gauge.ARC_MOUSEMOVE,{element:n,datum:e})})).on("click",(function(e){t.services.events.dispatchEvent(U.Gauge.ARC_CLICK,{element:Uh(this),datum:e})})).on("mouseout",(function(e){var n=Uh(this);t.services.events.dispatchEvent(U.Gauge.ARC_MOUSEOUT,{element:n,datum:e})}))},e.prototype.computeRadius=function(){var t=this.model.getOptions(),e=Zr.getProperty(t,"gauge","type"),n=cf.getSVGElementSize(this.parent,{useAttrs:!0}),r=n.width,i=n.height;return e===R.SEMI?Math.min(r/2,i):Math.min(r/2,i/2)},e}(Xp),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=cf.appendOrSelect(this.getContainerSVG(),"g.center"),i=this.model.getOptions(),o=this.computeRadius();cf.appendOrSelect(r,"text.donut-figure").attr("text-anchor","middle").style("font-size",(function(){return i.donut.center.numberFontSize(o)})).transition(this.services.transitions.getTransition("donut-figure-enter-update",e)).tween("text",(function(){return n.centerNumberTween(Uh(this))})),cf.appendOrSelect(r,"text.donut-title").attr("text-anchor","middle").style("font-size",(function(){return i.donut.center.titleFontSize(o)})).attr("y",i.donut.center.titleYPosition(o)).text(Zr.getProperty(i,"donut","center","label"))}},e.prototype.getInnerRadius=function(){return.75*this.computeRadius()},e.prototype.centerNumberTween=function(t){var e=this.model.getOptions(),n=Zr.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?ya:fa)(r,n);return function(n){var r=e.donut.center.numberFormatter;t.text(r(i(n)))}},e}(Og),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=cf.getSVGElementSize(e,{useAttrs:!0}),r=n.width,i=n.height;t.attr("width",r).attr("height",i);var o=this.model.isDataEmpty(),a=Zr.getProperty(this.model.getOptions(),"data","loading");if(o)this.renderSkeleton(a);else{if(!o&&a)throw new Error("Something went wrong. You can't provided non-empty data and data loading together.");this.removeSkeleton()}},e.prototype.renderSkeleton=function(t){if(this.configs.skeleton===k.GRID)this.renderGridSkeleton(t);else if(this.configs.skeleton===k.VERT_OR_HORIZ)this.renderVertOrHorizSkeleton(t);else if(this.configs.skeleton===k.PIE)this.renderPieSkeleton(t);else{if(this.configs.skeleton!==k.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===w.VERTICAL&&this.drawYGrid(t),e===w.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=ns().domain([0,1]).range(t),this.yScale=ns().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,o=r.height;this.backdrop=cf.appendOrSelect(e,"svg.chart-skeleton.DAII").attr("width",i).attr("height",o);var a=cf.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop");a.attr("width","100%").attr("height","100%");var s=this.xScale.range(),u=s[0],l=(s[1],this.yScale.range()),c=(l[0],l[1]);this.backdrop.merge(a).attr("x",u).attr("y",c),a.classed("shimmer-effect-lines",t).classed("empty-state-lines",!t)},e.prototype.drawXGrid=function(t){var e=this.backdrop.attr("height"),n=this.backdrop.attr("width"),r=Zr.getProperty(this.model.getOptions(),"grid","x","numberOfTicks"),i=this.xScale.ticks(r).map((function(t){return t*n})),o=cf.appendOrSelect(this.backdrop,"g.x.skeleton"),a=o.selectAll("line").data(i);a.enter().append("line").merge(a).attr("x1",(function(t){return t})).attr("x2",(function(t){return t})).attr("y1",0).attr("y2",e),o.selectAll("line").classed("shimmer-effect-lines",t).classed("empty-state-lines",!t)},e.prototype.drawYGrid=function(t){var e=this.backdrop.attr("height"),n=this.backdrop.attr("width"),r=Zr.getProperty(this.model.getOptions(),"grid","y","numberOfTicks"),i=this.xScale.ticks(r).map((function(t){return t*e})),o=cf.appendOrSelect(this.backdrop,"g.y.skeleton"),a=o.selectAll("line").data(i);a.enter().append("line").merge(a).attr("x1",0).attr("x2",n).attr("y1",(function(t){return t})).attr("y2",(function(t){return t})),o.selectAll("line").classed("shimmer-effect-lines",t).classed("empty-state-lines",!t)},e.prototype.drawRing=function(t,e,n){void 0===n&&(n=!0);var r=this.parent,i=cf.getSVGElementSize(r.node().parentNode,{useAttrs:!0}),o=i.width,a=i.height,s=cf.appendOrSelect(r,"svg.chart-skeleton").attr("width",o).attr("height",a),u=this.model.getOptions().pie,l=(cf.appendOrSelect(s,"rect.chart-skeleton-area-container").attr("width",o).attr("height",a).attr("fill","none"),xl().innerRadius(e).outerRadius(t).startAngle(0).endAngle(2*Math.PI)),c=t+Math.abs(u.radiusOffset),h=t+(Math.min(o,a)-2*t)/2;cf.appendOrSelect(s,"path").attr("class","skeleton-area-shape").attr("transform","translate("+c+", "+h+")").attr("d",l).classed("shimmer-effect-areas",n).classed("empty-state-areas",!n)},e.prototype.computeOuterRadius=function(){var t=this.model.getOptions(),e=cf.getSVGElementSize(this.parent.node().parentNode,{useAttrs:!0}),n=e.width,r=e.height;return Math.min(n,r)/2+t.pie.radiusOffset},e.prototype.computeInnerRadius=function(){return.75*this.computeOuterRadius()},e.prototype.setShimmerEffect=function(t){var e=this.parent.select(".chart-skeleton"),n=cf.getSVGElementSize(this.parent,{useAttrs:!0}).width,r=n,i=cf.appendOrSelect(e,"defs").lower(),o=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)");o.html('\n\t\t\t<stop class="stop-bg-shimmer" offset="0"></stop>\n\t\t\t<stop class="stop-shimmer" offset="0.2"></stop>\n\t\t\t<stop class="stop-bg-shimmer" offset="0.4"></stop>\n\t\t'),function t(){o.attr("gradientTransform","translate("+(0-3*.2*n)+", 0)").transition().duration(2e3).delay(1e3).ease(_d).attr("gradientTransform","translate("+(r+3*.2*n)+", 0)").on("end",t)}()},e.prototype.removeSkeleton=function(){this.parent.select(".chart-skeleton").remove()},e}(Xp),Cg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="spacer",e}return n(e,t),e.prototype.render=function(){this.getContainerSVG().append("rect").attr("x",0).attr("y",0).attr("width",this.configs.size||Ni.default.size).attr("height",this.configs.size||Ni.default.size).attr("opacity",0)},e}(Xp);function Pg(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 kg(t,e){var n,r,i,o,a,s=new Ig(t),u=+t.value&&(s.value=t.value),l=[s];for(null==e&&(e=Lg);n=l.pop();)if(u&&(n.value=+n.data.value),(i=e(n.data))&&(a=i.length))for(n.children=new Array(a),o=a-1;o>=0;--o)l.push(r=n.children[o]=new Ig(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(Rg)}function Lg(t){return t.children}function Dg(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 Ug(){return 0}function jg(t){return function(){return t}}function Hg(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 Vg(t,e,n,r,i){for(var o,a=t.children,s=-1,u=a.length,l=t.value&&(r-e)/t.value;++s<u;)(o=a[s]).y0=n,o.y1=i,o.x0=e,o.x1=e+=o.value*l}function Gg(t,e,n,r,i){for(var o,a=t.children,s=-1,u=a.length,l=t.value&&(i-n)/t.value;++s<u;)(o=a[s]).x0=e,o.x1=r,o.y0=n,o.y1=n+=o.value*l}Ig.prototype=kg.prototype={constructor:Ig,count:function(){return this.eachAfter(Pg)},each:function(t){var e,n,r,i,o=this,a=[o];do{for(e=a.reverse(),a=[];o=e.pop();)if(t(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r])}while(a.length);return this},eachAfter:function(t){for(var e,n,r,i=this,o=[i],a=[];i=o.pop();)if(a.push(i),e=i.children)for(n=0,r=e.length;n<r;++n)o.push(e[n]);for(;i=a.pop();)t(i);return this},eachBefore:function(t){for(var e,n,r=this,i=[r];r=i.pop();)if(t(r),e=r.children)for(n=e.length-1;n>=0;--n)i.push(e[n]);return this},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;t=n.pop(),e=r.pop();for(;t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){var t=[];return this.each((function(e){t.push(e)})),t},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return kg(this).eachBefore(Dg)}};var Bg=function t(e){function n(t,n,r,i,o){!function(t,e,n,r,i,o){for(var a,s,u,l,c,h,f,d,p,g,v,m=[],y=e.children,_=0,b=0,x=y.length,w=e.value;_<x;){u=i-n,l=o-r;do{c=y[b++].value}while(!c&&b<x);for(h=f=c,v=c*c*(g=Math.max(l/u,u/l)/(w*t)),p=Math.max(f/v,v/h);b<x;++b){if(c+=s=y[b].value,s<h&&(h=s),s>f&&(f=s),v=c*c*g,(d=Math.max(f/v,v/h))>p){c-=s;break}p=d}m.push(a={value:c,dice:u<l,children:y.slice(_,b)}),a.dice?Vg(a,n,r,i,w?r+=l*c/w:o):Gg(a,n,r,w?n+=u*c/w:i,o),w-=c,_=b}}(e,t,n,r,i,o)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}((1+Math.sqrt(5))/2);function Fg(){var t=Bg,e=!1,n=1,r=1,i=[0],o=Ug,a=Ug,s=Ug,u=Ug,l=Ug;function c(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(h),i=[0],e&&t.eachBefore(Hg),t}function h(e){var n=i[e.depth],r=e.x0+n,c=e.y0+n,h=e.x1-n,f=e.y1-n;h<r&&(r=h=(r+h)/2),f<c&&(c=f=(c+f)/2),e.x0=r,e.y0=c,e.x1=h,e.y1=f,e.children&&(n=i[e.depth+1]=o(e)/2,r+=l(e)-n,c+=a(e)-n,(h-=s(e)-n)<r&&(r=h=(r+h)/2),(f-=u(e)-n)<c&&(c=f=(c+f)/2),t(e,r,c,h,f))}return c.round=function(t){return arguments.length?(e=!!t,c):e},c.size=function(t){return arguments.length?(n=+t[0],r=+t[1],c):[n,r]},c.tile=function(e){return arguments.length?(t=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?(o="function"==typeof t?t:jg(+t),c):o},c.paddingOuter=function(t){return arguments.length?c.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):c.paddingTop()},c.paddingTop=function(t){return arguments.length?(a="function"==typeof t?t:jg(+t),c):a},c.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:jg(+t),c):s},c.paddingBottom=function(t){return arguments.length?(u="function"==typeof t?t:jg(+t),c):u},c.paddingLeft=function(t){return arguments.length?(l="function"==typeof t?t:jg(+t),c):l},c}var zg=function(t){function e(n,r,i,o){var a=t.call(this,n,r,o)||this;return a.type="layout",a.configs=o,a.children=i,a._instanceID=e.instanceID++,(a.configs.direction===A.ROW_REVERSE||a.configs.direction===A.COLUMN_REVERSE)&&(a.children=a.children.reverse()),a.init(),a}return n(e,t),e.prototype.init=function(){this.children.forEach((function(t){t.components.forEach((function(t){t.init()}))}))},e.prototype.getPreferedAndFixedSizeSum=function(){var t=this.parent,e=0;return t.selectAll("svg.layout-child-"+this._instanceID).filter((function(t){var e=Zr.getProperty(t,"data","growth","x");return e===C.PREFERRED||e===C.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 Zr.getProperty(t,"data","growth","x")===C.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,o=r.height,a=kg({children:this.children}).sum((function(t){return t.size})),s=this.configs.direction===A.ROW||this.configs.direction===A.ROW_REVERSE?Vg:Gg;Fg().tile(s).size([i,o])(a);var u=this.configs.direction===A.ROW||this.configs.direction===A.ROW_REVERSE,l=n.selectAll("svg.layout-child-"+this._instanceID).data(a.leaves(),(function(t){return t.data.id}));l.attr("width",(function(t){return t.x1-t.x0})).attr("height",(function(t){return t.y1-t.y0})),l.enter().append("svg").attr("class",(function(t){return"layout-child layout-child-"+e._instanceID+" "+t.data.id})).attr("x",(function(t){return t.x0})).attr("y",(function(t){return t.y0})).merge(n.selectAll("svg.layout-child-"+this._instanceID)).each((function(e){var n=this;e.data.components.forEach((function(r){r.setParent(Uh(n));var i=Zr.getProperty(e,"data","growth","x");i!==C.PREFERRED&&i!==C.FIXED||r.render(t)}))})),n.selectAll("svg.layout-child-"+this._instanceID).each((function(t){var e=Zr.getProperty(t,"data","growth","x"),n=cf.getSVGElementSize(Uh(this),{useBBox:!0});if("legend"===t.data.id){var r=cf.getSVGElementSize(Uh(this),{useAttrs:!0});r.height<40&&(n.height=r.height)}if(e===C.PREFERRED){var a=u?n.width:n.height,s=u?i:o;t.data.size=a/s*100}})),l.exit().remove(),this.children.filter((function(t){return Zr.getProperty(t,"growth","x")===C.STRETCH})).forEach((function(t,n){t.size=(100-+e.getPreferedAndFixedSizeSum())/+e.getNumOfStretchChildren()})),a=kg({children:this.children}).sum((function(t){return t.size})),Fg().tile(s).size([i,o]).padding(0)(a),n.selectAll("svg.layout-child-"+this._instanceID).data(a.leaves(),(function(t){return t.data.id})).attr("x",(function(t){return t.x0})).attr("y",(function(t){return t.y0})).attr("width",(function(t){return t.x1-t.x0})).attr("height",(function(t){return t.y1-t.y0})).each((function(e,n){e.data.components.forEach((function(n){Zr.getProperty(e,"data","growth","x")===C.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}(Xp),Wg=Array.prototype.slice;function Yg(t){return t}function qg(t){return"translate("+(t+.5)+",0)"}function Xg(t){return"translate(0,"+(t+.5)+")"}function Zg(t){return function(e){return+t(e)}}function $g(t){var e=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}function Kg(){return!this.__axis}function Qg(t,e){var n=[],r=null,i=null,o=6,a=6,s=3,u=1===t||4===t?-1:1,l=4===t||2===t?"x":"y",c=1===t||3===t?qg:Xg;function h(h){var f=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,d=null==i?e.tickFormat?e.tickFormat.apply(e,n):Yg:i,p=Math.max(o,0)+s,g=e.range(),v=+g[0]+.5,m=+g[g.length-1]+.5,y=(e.bandwidth?$g:Zg)(e.copy()),_=h.selection?h.selection():h,b=_.selectAll(".domain").data([null]),x=_.selectAll(".tick").data(f,e).order(),w=x.exit(),T=x.enter().append("g").attr("class","tick"),E=x.select("line"),O=x.select("text");b=b.merge(b.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),x=x.merge(T),E=E.merge(T.append("line").attr("stroke","currentColor").attr(l+"2",u*o)),O=O.merge(T.append("text").attr("fill","currentColor").attr(l,u*p).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),h!==_&&(b=b.transition(h),x=x.transition(h),E=E.transition(h),O=O.transition(h),w=w.transition(h).attr("opacity",1e-6).attr("transform",(function(t){return isFinite(t=y(t))?c(t):this.getAttribute("transform")})),T.attr("opacity",1e-6).attr("transform",(function(t){var e=this.parentNode.__axis;return c(e&&isFinite(e=e(t))?e:y(t))}))),w.remove(),b.attr("d",4===t||2==t?a?"M"+u*a+","+v+"H0.5V"+m+"H"+u*a:"M0.5,"+v+"V"+m:a?"M"+v+","+u*a+"V0.5H"+m+"V"+u*a:"M"+v+",0.5H"+m),x.attr("opacity",1).attr("transform",(function(t){return c(y(t))})),E.attr(l+"2",u*o),O.attr(l,u*p).text(d),_.filter(Kg).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=Wg.call(arguments),h},h.tickArguments=function(t){return arguments.length?(n=null==t?[]:Wg.call(t),h):n.slice()},h.tickValues=function(t){return arguments.length?(r=null==t?null:Wg.call(t),h):r&&r.slice()},h.tickFormat=function(t){return arguments.length?(i=t,h):i},h.tickSize=function(t){return arguments.length?(o=a=+t,h):o},h.tickSizeInner=function(t){return arguments.length?(o=+t,h):o},h.tickSizeOuter=function(t){return arguments.length?(a=+t,h):a},h.tickPadding=function(t){return arguments.length?(s=+t,h):s},h}function Jg(t){return Qg(1,t)}function tv(t){return Qg(2,t)}function ev(t){return Qg(3,t)}function nv(t){return Qg(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,o=this.model.getOptions(),a=Zr.getProperty(o,"axes",i),s=Zr.getProperty(a,"scaleType"),u=Zr.getProperty(a,"ticks","number"),l=Zr.getProperty(a,"truncation","type"),c=Zr.getProperty(a,"truncation","threshold"),h=Zr.getProperty(a,"truncation","numCharacter"),f=null!==u,d=i===b.LEFT||i===b.RIGHT,p=Zr.getProperty(o,"timeScale"),g=this.getContainerSVG(),v=cf.getSVGElementSize(this.parent,{useAttrs:!0}),m=v.width,y=v.height;i===b.BOTTOM||i===b.TOP?(e=this.configs.axes[b.LEFT]?this.margins.left:0,n=this.configs.axes[b.RIGHT]?m-this.margins.right:m):(e=y-this.margins.bottom,n=this.margins.top);var _,w=this.services.cartesianScales.getScaleByPosition(i);switch(this.scaleType===T.LABELS?w.rangeRound([e,n]):w.range([e,n]),i){case b.LEFT:_=nv;break;case b.BOTTOM:_=ev;break;case b.RIGHT:_=tv;break;case b.TOP:_=Jg}var E=cf.appendOrSelect(g,"g.axis."+i),O=!E.select("g.ticks").empty(),S=cf.appendOrSelect(E,"g.ticks");O||S.attr("role",r.GRAPHICS_OBJECT+" "+r.GROUP);var M=cf.appendOrSelect(E,"g.ticks.invisible").style("opacity","0").style("pointer-events","none").attr("aria-hidden",!0),A=cf.appendOrSelect(M,"g.tick"),C=cf.appendOrSelect(A,"text").text("0"),P=cf.getSVGElementSize(C.node(),{useBBox:!0}).height;A.remove();var k,L=this.scaleType===T.TIME||a.scaleType===T.TIME,D=this.scaleType||a.scaleType||T.LINEAR,R=_(w).tickSizeOuter(0);if(w.ticks){var I=void 0;if(f?I=u:(I=Ii.ticks.number,d&&(I=this.getNumberOfFittingTicks(y,P,2.5))),1===w.ticks().length&&0===w.ticks()[0]&&(I=0),R.ticks(I),L)if(w.ticks(I).length){var N=Zr.getProperty(o,"timeScale","addSpaceOnEdges"),U=void 0;N&&(U=w.nice(I)),U=w.ticks(I),N&&U.length>2&&(U.splice(U.length-1,1),U.splice(0,1)),R.tickValues(U)}else R.tickValues([])}var j=Zr.getProperty(a,"ticks","formatter");if(L){var H=rg(R.tickValues());k=null===j?function(t,e){return eg(t,e,H,p)}:function(t,e){var n=eg(t,e,H,p);return j(t,e,n)}}else null===j?D===T.LINEAR&&(k=function(t){return t.toLocaleString()}):k=j;switch(R.tickFormat(k),i){case b.LEFT:S.attr("transform","translate("+this.margins.left+", 0)");break;case b.BOTTOM:S.attr("transform","translate(0, "+(y-this.margins.bottom)+")");break;case b.RIGHT:S.attr("transform","translate("+(m-this.margins.right)+", 0)");break;case b.TOP:S.attr("transform","translate(0, "+this.margins.top+")")}if(a.title){var V=cf.appendOrSelect(E,"text.axis-title").html(this.model.isDataEmpty()?"":a.title);switch(i){case b.LEFT:V.attr("transform","rotate(-90)").attr("y",0).attr("x",-w.range()[0]/2).attr("dy","1em").style("text-anchor","middle");break;case b.BOTTOM:V.attr("transform","translate("+(this.margins.left/2+w.range()[1]/2)+", "+y+")").style("text-anchor","middle");break;case b.RIGHT:V.attr("transform","rotate(90)").attr("y",-m).attr("x",w.range()[0]/2).attr("dy","1em").style("text-anchor","middle");break;case b.TOP:var G=cf.getSVGElementSize(V,{useBBox:!0}).height;V.attr("transform","translate("+(this.margins.left/2+w.range()[1]/2)+", "+G/2+")").style("text-anchor","middle")}}if(L){var B=rg(R.tickValues()),F=p.showDayName,z=S;t&&(S=S.transition(this.services.transitions.getTransition("axis-update",t))),S=S.call(R),z.selectAll(".tick").data(R.tickValues(),w).order().select("text").style("font-weight",(function(t,e){return tg(t,e,B,F)?"bold":"normal"}))}else S=t&&O?S.transition(this.services.transitions.getTransition("axis-update")).call(R):S.call(R);if(M.call(R),i===b.BOTTOM||i===b.TOP){var W=!1;if(w.step){W=M.selectAll("g.tick text").nodes().some((function(t){return cf.getSVGElementSize(t,{useBBox:!0}).width>=w.step()}))}else{var Y=Zr.getProperty(a,"ticks","rotateIfSmallerThan")||Ii.ticks.rotateIfSmallerThan;W=m/(L?R.tickValues().length:w.ticks().length)/2<Y}W?(f||(R.ticks(this.getNumberOfFittingTicks(m,P,3.5)),M.call(R),S.call(R)),E.selectAll("g.ticks g.tick text").attr("transform","rotate(-45)").style("text-anchor",i===b.TOP?"start":"end")):E.selectAll("g.ticks g.tick text").attr("transform",null).style("text-anchor",null)}if(this.model.isDataEmpty()&&E.attr("opacity",0),l!==x.NONE&&s===T.LABELS){var q=this.model.getDataValuesGroupedByKeys();if(q.length>0){var X=q.map((function(t){return t.sharedStackKey})),Z=g.select("g.axis."+i+" g.ticks g.tick").html();E.selectAll("g.ticks g.tick").html(Z),E.selectAll("g.tick text").data(X).text((function(t){return t.length>c?Zr.truncateLabel(t,l,h):t})),this.getInvisibleAxisRef().selectAll("g.tick text").data(X).text((function(t){return t.length>c?Zr.truncateLabel(t,l,h):t})),E.selectAll("g.ticks").html(this.getInvisibleAxisRef().html()),E.selectAll("g.tick text").data(X)}}this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this.getContainerSVG(),e=this.configs.position,n=cf.appendOrSelect(t,"g.axis."+e),r=this.model.getOptions(),i=Zr.getProperty(r,"axes",e),o=Zr.getProperty(i,"scaleType"),a=Zr.getProperty(i,"truncation","threshold"),s=(this.scaleType===T.TIME||(i.scaleType,T.TIME),this);n.selectAll("g.tick text").on("mouseover",(function(t){s.services.events.dispatchEvent(U.Axis.LABEL_MOUSEOVER,{element:Uh(this),datum:t})})).on("mousemove",(function(t){s.services.events.dispatchEvent(U.Axis.LABEL_MOUSEMOVE,{element:Uh(this),datum:t}),o===T.LABELS&&t.length>a&&s.services.events.dispatchEvent(U.Tooltip.SHOW,{hoveredElement:Uh(this),type:O.AXISLABEL})})).on("click",(function(t){s.services.events.dispatchEvent(U.Axis.LABEL_CLICK,{element:Uh(this),datum:t})})).on("mouseout",(function(t){s.services.events.dispatchEvent(U.Axis.LABEL_MOUSEOUT,{element:Uh(this),datum:t}),o===T.LABELS&&s.services.events.dispatchEvent(U.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 Zr.clamp(r,2,Ii.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}(Xp),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(b),i=Zr.getProperty(this.model.getOptions(),"axes");r.forEach((function(t){i[b[t]]&&(n[b[t]]=!0)})),this.configs.axes=n,r.forEach((function(t){var n=b[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 o={};Object.keys(this.children).forEach((function(n){var r,i=e.children[n],a=i.configs.position,s=i.getInvisibleAxisRef(),u=cf.getSVGElementSize(s,{useBBox:!0}),l=u.width,c=u.height;switch(r=i.getTitleRef().empty()?0:cf.getSVGElementSize(i.getTitleRef(),{useBBox:!0}).height,a){case b.TOP:o.top=c+r;break;case b.BOTTOM:o.bottom=c+r;break;case b.LEFT:o.left=l+r;break;case b.RIGHT:o.right=l+r}e.addAxisThresholds(t,a)})),Object.keys(o).some((function(t){return e.margins[t]!==o[t]}))&&(this.margins=Object.assign(this.margins,o),Object.keys(this.children).forEach((function(t){e.children[t].margins=e.margins})),this.render(!0))},e.prototype.addAxisThresholds=function(t,e){var n=this,r=Zr.getProperty(this.model.getOptions(),"axes",e).thresholds;r&&(r.forEach((function(t,r){var i=new sg(n.model,n.services,m(m({},t),{axisPosition:e,index:r}));n.thresholds.push(i)})),this.thresholds.forEach((function(e){e.setParent(n.parent),e.render(t)})))},e}(Xp),ov=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grid",e}return n(e,t),e.prototype.render=function(t){void 0===t&&(t=!0),this.drawBackdrop(),cf.appendOrSelect(this.backdrop,"g.x.grid"),cf.appendOrSelect(this.backdrop,"g.y.grid"),this.drawXGrid(t),this.drawYGrid(t)},e.prototype.drawXGrid=function(t){var e=this.parent,n=this.backdrop.attr("height"),r=ev(this.services.cartesianScales.getMainXScale()).tickSizeInner(-n).tickSizeOuter(0),i=Zr.getProperty(this.model.getOptions(),"grid","x","numberOfTicks");r.ticks(i);var o=e.select(".x.grid").attr("transform","translate("+-this.backdrop.attr("x")+", "+n+")");if(t){var a=this.services.transitions.getTransition("grid-update");o.transition(a).call(r)}else o.call(r);this.cleanGrid(o)},e.prototype.drawYGrid=function(t){var e=this.parent,n=this.backdrop.attr("width"),r=nv(this.services.cartesianScales.getMainYScale()).tickSizeInner(-n).tickSizeOuter(0),i=Zr.getProperty(this.model.getOptions(),"grid","y","numberOfTicks");r.ticks(i);var o=e.select(".y.grid").attr("transform","translate(0, "+-this.backdrop.attr("y")+")");if(t){var a=this.services.transitions.getTransition("grid-update");o.transition(a).call(r)}else o.call(r);this.cleanGrid(o)},e.prototype.getGridlineThreshold=function(t){var e,n=this.parent,r=n.selectAll(".x.grid .tick").nodes().sort((function(t,e){return Number(Zr.getTranslationValues(t).tx)-Number(Zr.getTranslationValues(e).tx)})),i=-1;if(r.length){r.forEach((function(e,n){t[0]>=+Zr.getTranslationValues(e).tx&&i++})),e=i+1<r.length?i+1:r.length;var o,a=r[i],s=r[e];if(a)if(s)o=+Zr.getTranslationValues(s).tx-+Zr.getTranslationValues(a).tx;else{var u=n.select("rect.chart-grid-backdrop").node();o=cf.getSVGElementSize(u).width-+Zr.getTranslationValues(a).tx}else o=+Zr.getTranslationValues(s).tx;return o*this.model.getOptions().tooltip.gridline.threshold}},e.prototype.getActiveGridline=function(t){var e=Zr.getProperty(this.model.getOptions,"tooltip","gridline","threshold"),n=e||this.getGridlineThreshold(t);return this.parent.selectAll(".x.grid .tick").filter((function(){var e=Zr.getTranslationValues(this),r=Number(e.tx)-n,i=Number(e.tx)+n;return r<=t[0]&&t[0]<=i}))},e.prototype.drawBackdrop=function(){var t=this.parent,e=this.services.cartesianScales.getMainXScale(),n=this.services.cartesianScales.getMainYScale(),r=e.range(),i=r[0],o=r[1],a=n.range(),s=a[0],u=a[1];this.backdrop=cf.appendOrSelect(t,"svg.chart-grid-backdrop");var l=cf.appendOrSelect(this.backdrop,"rect.chart-grid-backdrop");this.backdrop.merge(l).attr("x",i).attr("y",u).attr("width",o-i).attr("height",s-u).lower(),l.attr("width","100%").attr("height","100%")},e.prototype.cleanGrid=function(t){var e=this.model.getOptions();t.selectAll("line").attr("stroke",e.grid.strokeColor),t.selectAll("text").remove(),t.select(".domain").remove()},e}(Xp);var av,sv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="ruler",e}return n(e,t),e.prototype.render=function(){this.drawBackdrop(),this.addBackdropEventListeners()},e.prototype.showRuler=function(t){var e=this,n=t[0],r=t[1],i=this.parent,o=this.services.cartesianScales.getOrientation(),a=o===w.HORIZONTAL?r:n,s=cf.appendOrSelect(i,"g.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,a)})).reduce((function(t,e){if(0===t.length)return t.push(e),t;var n=t[0].domainValue,r=Math.abs(a-e.domainValue),i=Math.abs(a-n);return r>i?t:(r<i?t=[e]:t.push(e),t)}),[]);if(p.length>0){var g=this.services.cartesianScales.getRangeIdentifier(),v=p.map((function(t){return t.originalData})).filter((function(t){var e=t[g];return null!=e})),m=p.map((function(t){return t.domainValue})),y=l.filter((function(t){var n=e.services.cartesianScales.getDomainValue(t);return m.includes(n)}));this.elementsToHighlight&&this.elementsToHighlight.size()>0&&!Zr.isEqual(this.elementsToHighlight,y)&&this.hideRuler(),y.dispatch("mouseover"),this.elementsToHighlight=y,this.services.events.dispatchEvent("show-tooltip",{hoveredElement:u,multidata:v,type:O.GRIDLINE}),s.attr("opacity",1);var _=p[0];"horizontal"===o?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("hide-tooltip"),e.attr("opacity",0)},e.prototype.addBackdropEventListeners=function(){var t=this;this.backdrop.on("mousemove mouseover",(function(){var e=Hh(t.parent.node());t.showRuler(e)})).on("mouseout",(function(){t.hideRuler()}))},e.prototype.drawBackdrop=function(){var t=this.parent,e=this.services.cartesianScales.getMainXScale(),n=this.services.cartesianScales.getMainYScale(),r=e.range(),i=r[0],o=r[1],a=n.range(),s=a[0],u=a[1];this.backdrop=cf.appendOrSelect(t,"svg.chart-grid-backdrop");var l=cf.appendOrSelect(this.backdrop,"rect.chart-grid-backdrop");this.backdrop.merge(l).attr("x",i).attr("y",u).attr("width",o-i).attr("height",s-u).lower(),l.attr("width","100%").attr("height","100%")},e}(Xp),uv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="zero-line",e}return n(e,t),e.prototype.render=function(t){var e=this.services.cartesianScales.getRangeScale().domain(),n=e[0],r=e[1];if(n>0&&r<0||n<0&&r>0){var i=this.getContainerSVG(),o=this.services.cartesianScales.getDomainScale().range(),a=o[0],s=o[1],u=+this.services.cartesianScales.getRangeValue(0)+.5;if(!u){var l=this.services.cartesianScales.getRangeAxisPosition();u=this.services.cartesianScales.getScaleByPosition(l).range()[0]}var c=Zr.flipSVGCoordinatesBasedOnOrientation({x0:a,x1:s,y0:u,y1:u},this.services.cartesianScales.getOrientation());cf.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}(Xp),lv=function(){function t(t,e){this.services={domUtils:cf,events:hf,transitions:wd},this.model=new Sc(this.services)}return t.prototype.init=function(t,e){var n=this;this.model.set({holder:t},!0),Object.keys(this.services).forEach((function(t){var e=n.services[t];n.services[t]=new e(n.model,n.services)})),this.services.events.addEventListener(U.Model.UPDATE,(function(){n.update(!0)})),this.model.setData(e.data),this.services.events.addEventListener(U.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(U.Chart.RENDER_FINISHED)}))}},t.prototype.destroy=function(){this.components.forEach((function(t){return t.destroy()})),this.services.domUtils.getHolder().remove(),this.model.set({destroyed:!0},!0)},t.prototype.getChartComponents=function(t){var e={id:"title",components:[new ug(this.model,this.services)],growth:{x:C.PREFERRED,y:C.FIXED}},n={id:"legend",components:[new Zp(this.model,this.services)],growth:{x:C.PREFERRED,y:C.FIXED}},r={id:"graph-frame",components:t,growth:{x:C.STRETCH,y:C.FIXED}},i=!1!==this.model.getOptions().legend.enabled,o=A.COLUMN;if(i){var a=Zr.getProperty(this.model.getOptions(),"legend","position");"left"===a?(o=A.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=M.VERTICAL)):"right"===a?(o=A.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=M.VERTICAL)):"bottom"===a&&(o=A.COLUMN_REVERSE)}var s={id:"spacer",components:[new Cg(this.model,this.services)],growth:{x:C.PREFERRED,y:C.FIXED}},u={id:"full-frame",components:[new zg(this.model,this.services,y(i?[n]:[],i?[s]:[],[r]),{direction:o})],growth:{x:C.STRETCH,y:C.FIXED}},l=[];if(this.model.getOptions().title){l.push(e);var c={id:"spacer",components:[new Cg(this.model,this.services)],growth:{x:C.PREFERRED,y:C.FIXED}};l.push(c)}return l.push(u),[new zg(this.model,this.services,l,{direction:A.COLUMN})]},t}(),cv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.services=Object.assign(r.services,{cartesianScales:zp,curves:qp}),r}return n(e,t),e.prototype.getAxisChartComponents=function(t){var e={id:"title",components:[new ug(this.model,this.services)],growth:{x:C.PREFERRED,y:C.FIXED}},n={id:"legend",components:[new Zp(this.model,this.services)],growth:{x:C.PREFERRED,y:C.FIXED}},r={id:"graph-frame",components:t,growth:{x:C.STRETCH,y:C.FIXED}},i=!1!==this.model.getOptions().legend.enabled,o=A.COLUMN;if(i){var a=Zr.getProperty(this.model.getOptions(),"legend","position");a===S.LEFT?(o=A.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=M.VERTICAL)):a===S.RIGHT?(o=A.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=M.VERTICAL)):a===S.BOTTOM&&(o=A.COLUMN_REVERSE)}var s={id:"spacer",components:[new Cg(this.model,this.services)],growth:{x:C.PREFERRED,y:C.FIXED}},u={id:"full-frame",components:[new zg(this.model,this.services,y(i?[n]:[],[s,r]),{direction:o})],growth:{x:C.STRETCH,y:C.FIXED}},l=[];if(this.model.getOptions().title){l.push(e);var c={id:"spacer",components:[new Cg(this.model,this.services)],growth:{x:C.PREFERRED,y:C.FIXED}};l.push(c)}return l.push(u),[new zg(this.model,this.services,l,{direction:A.COLUMN})]},e}(lv),hv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Zr.mergeDefaultChartOptions(Zr.clone(ki.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 ov(this.model,this.services),new sv(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})],e=this.getAxisChartComponents(t);return e.push(new fg(this.model,this.services)),e},e}(cv),fv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Zr.mergeDefaultChartOptions(ki.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 ov(this.model,this.services),new sv(this.model,this.services),new gg(this.model,this.services),new wg(this.model,this.services,{stacked:!0}),new Tg(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0,stacked:!0})],e=this.getAxisChartComponents(t);return e.push(new fg(this.model,this.services)),e},e}(cv),dv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Zr.mergeDefaultChartOptions(ki.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 ov(this.model,this.services),new mg(this.model,this.services),new uv(this.model,this.services),new Ag(this.model,this.services,{skeleton:k.VERT_OR_HORIZ})],e=this.getAxisChartComponents(t);return e.push(new cg(this.model,this.services)),e},e}(cv),pv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Zr.mergeDefaultChartOptions(ki.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 ov(this.model,this.services),new yg(this.model,this.services),new uv(this.model,this.services),new Ag(this.model,this.services,{skeleton:k.VERT_OR_HORIZ})],e=this.getAxisChartComponents(t);return e.push(new cg(this.model,this.services)),e},e}(cv),gv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Zr.mergeDefaultChartOptions(ki.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 ov(this.model,this.services),new _g(this.model,this.services),new Ag(this.model,this.services,{skeleton:k.VERT_OR_HORIZ})],e=this.getAxisChartComponents(t);return e.push(new cg(this.model,this.services)),e},e}(cv),vv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Zr.mergeDefaultChartOptions(ki.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 ov(this.model,this.services),new sv(this.model,this.services),new xg(this.model,this.services),new Ag(this.model,this.services,{skeleton:k.GRID})],e=this.getAxisChartComponents(t);return e.push(new fg(this.model,this.services)),e},e}(cv),mv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Zr.mergeDefaultChartOptions(ki.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 ov(this.model,this.services),new sv(this.model,this.services),new wg(this.model,this.services),new bg(this.model,this.services,{handleThresholds:!0}),new Ag(this.model,this.services,{skeleton:k.GRID})],e=this.getAxisChartComponents(t);return e.push(new fg(this.model,this.services)),e},e}(cv),yv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Zr.mergeDefaultChartOptions(ki.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 ov(this.model,this.services),new sv(this.model,this.services),new bg(this.model,this.services),new Ag(this.model,this.services,{skeleton:k.GRID})],e=this.getAxisChartComponents(t);return e.push(new fg(this.model,this.services)),e},e}(cv),_v=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}(Sc),bv=function(t){function e(e,n,r){void 0===r&&(r=!1);var i=t.call(this,e,n)||this;return i.model=new _v(i.services),r?i:(i.model.setOptions(Zr.mergeDefaultChartOptions(ki.pieChart,n.options)),i.init(e,n),i)}return n(e,t),e.prototype.getComponents=function(){var t=[new Og(this.model,this.services),new Ag(this.model,this.services,{skeleton:k.PIE})],e=this.getChartComponents(t);return e.push(new hg(this.model,this.services)),e},e}(lv),xv=function(t){function e(e,n){var r=t.call(this,e,n,!0)||this;return r.model.setOptions(Zr.mergeDefaultChartOptions(ki.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:k.DONUT})],e=this.getChartComponents(t);return e.push(new hg(this.model,this.services)),e},e}(bv);function wv(t){var e,n=(Ev(t)%(e=360)+e)%e;return Tv(n,[0,10])||Tv(n,[350,0])?{textAnchor:L.START,dominantBaseline:D.MIDDLE}:Tv(n,[10,80])?{textAnchor:L.START,dominantBaseline:D.HANGING}:Tv(n,[80,100])?{textAnchor:L.MIDDLE,dominantBaseline:D.HANGING}:Tv(n,[100,170])?{textAnchor:L.END,dominantBaseline:D.HANGING}:Tv(n,[170,190])?{textAnchor:L.END,dominantBaseline:D.MIDDLE}:Tv(n,[190,260])?{textAnchor:L.END,dominantBaseline:D.BASELINE}:Tv(n,[260,280])?{textAnchor:L.MIDDLE,dominantBaseline:D.BASELINE}:{textAnchor:L.START,dominantBaseline:D.BASELINE}}function Tv(t,e){var n=e[0],r=e[1];return t>=n&&t<=r}function Ev(t){return t*(180/Math.PI)}function Ov(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 Sv=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.svg,"g.tmp-tick"),r=cf.appendOrSelect(n,"text").text(t),i=cf.getSVGElementSize(r.node(),{useBBox:!0}),o=i.width,a=i.height;return n.remove(),{width:o,height:a}},e.normalizeFlatData=function(t){var n=e.model.getOptions(),r=Zr.getProperty(n,"radar","axes"),i=r.angle,o=r.value,a=Zr.getProperty(n,"data","groupMapsTo"),s=Zr.flatMapDeep(e.uniqueKeys.map((function(t){return e.uniqueGroups.map((function(e){var n;return(n={})[i]=t,n[a]=e,n[o]=null,n}))})));return Zr.merge(s,t)},e.normalizeGroupedData=function(t){var n=e.model.getOptions(),r=Zr.getProperty(n,"radar","axes"),i=r.angle,o=r.value,a=Zr.getProperty(n,"data","groupMapsTo");return t.map((function(t){var n=t.name,r=t.data,s=e.uniqueKeys.map((function(t){var e;return(e={})[a]=n,e[i]=t,e[o]=null,e}));return{name:n,data:Zr.merge(s,r)}}))},e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=Zr.getProperty(e.model.getOptions(),"radar","opacity");e.parent.selectAll("g.blobs path").transition(e.services.transitions.getTransition("legend-hover-blob")).style("fill-opacity",(function(t){return t.name!==n.datum().name?Zr.getProperty(r,"unselected"):Zr.getProperty(r,"selected")}))},e.handleLegendMouseOut=function(t){var n=Zr.getProperty(e.model.getOptions(),"radar","opacity");e.parent.selectAll("g.blobs path").transition(e.services.transitions.getTransition("legend-mouseout-blob")).style("fill-opacity",Zr.getProperty(n,"selected"))},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(U.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(U.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0),this.svg=this.getContainerSVG();var n=cf.getSVGElementSize(this.parent,{useAttrs:!0}),i=n.width,o=n.height,a=this.model.getData(),s=this.model.getDisplayData(),u=this.model.getGroupedData(),l=this.model.getOptions(),c=Zr.getProperty(l,"radar","axes"),h=c.angle,f=c.value,d=Zr.getProperty(l,"data","groupMapsTo"),p=Zr.getProperty(l,"radar"),g=p.xLabelPadding,v=p.yLabelPadding,m=p.yTicksNumber,y=p.minRange,_=p.xAxisRectHeight,b=p.opacity;this.uniqueKeys=Array.from(new Set(a.map((function(t){return t[h]})))),this.uniqueGroups=Array.from(new Set(a.map((function(t){return t[d]})))),this.displayDataNormalized=this.normalizeFlatData(s),this.groupedDataNormalized=this.normalizeGroupedData(u);var x=2*(this.getLabelDimensions(this.uniqueKeys[0]).height+v),w=(Math.min(i,o)-x)/2;if(!(w<=0)){var T=Co().domain(this.displayDataNormalized.map((function(t){return t[h]}))).range([0,2*Math.PI].map((function(t){return t-Math.PI/2}))),E=ns().domain([0,yo(this.displayDataNormalized.map((function(t){return t[f]})))]).range([y,w]).nice(m),O=E.ticks(m),S=function(t){return e.model.getFillColor(t)},M=Dl().angle((function(t){return T(t[h])+Math.PI/2})).radius((function(t){return E(t[f])})).curve(ac),A=Dl().angle(M.angle()).radius((function(t){return av?av(t[f]):y})).curve(M.curve()),C={x:yo(this.uniqueKeys.map((function(t){var n;return e.getLabelDimensions(t).width+(n=T(t),w*Math.sin(n-Math.PI/2))})))+g,y:o/2},P=cf.appendOrSelect(this.svg,"g.y-axes").attr("role",r.GROUP).selectAll("path").data(O,(function(t){return t})),k=function(t){return e.uniqueKeys.map((function(e){var n;return(n={})[h]=e,n[f]=t,n}))};P.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(k(t))})).call((function(n){return n.transition(e.services.transitions.getTransition("radar_y_axes_enter",t)).attr("opacity",1).attr("d",(function(t){return M(k(t))}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_y_axes_update",t)).attr("opacity",1).attr("transform","translate("+C.x+", "+C.y+")").attr("d",(function(t){return M(k(t))}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_y_axes_exit",t)).attr("d",(function(t){return M(k(t))})).attr("opacity",0).remove()}))})),cf.appendOrSelect(this.svg,"g.y-labels").attr("role",r.GROUP).selectAll("text").data(lo(O)).join((function(n){return n.append("text").attr("opacity",0).text((function(t){return t})).attr("x",(function(t){return Ov(-Math.PI/2,E(t),C).x+v})).attr("y",(function(t){return Ov(-Math.PI/2,E(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 Ov(-Math.PI/2,E(t),C).x+v})).attr("y",(function(t){return Ov(-Math.PI/2,E(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()}))})),cf.appendOrSelect(this.svg,"g.x-axes").attr("role",r.GROUP).selectAll("line").data(this.uniqueKeys,(function(t){return t})).join((function(n){return n.append("line").attr("role",r.GRAPHICS_SYMBOL).attr("opacity",0).attr("class",(function(t){return"x-axis-"+Zr.kebabCase(t)})).attr("stroke-dasharray","0").attr("x1",(function(t){return Ov(T(t),0,C).x})).attr("y1",(function(t){return Ov(T(t),0,C).y})).attr("x2",(function(t){return Ov(T(t),0,C).x})).attr("y2",(function(t){return Ov(T(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 Ov(T(t),E.range()[0],C).x})).attr("y1",(function(t){return Ov(T(t),E.range()[0],C).y})).attr("x2",(function(t){return Ov(T(t),E.range()[1],C).x})).attr("y2",(function(t){return Ov(T(t),E.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 Ov(T(t),E.range()[0],C).x})).attr("y1",(function(t){return Ov(T(t),E.range()[0],C).y})).attr("x2",(function(t){return Ov(T(t),E.range()[1],C).x})).attr("y2",(function(t){return Ov(T(t),E.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(this.svg,"g.x-labels").attr("role",r.GROUP).selectAll("text").data(this.uniqueKeys).join((function(n){return n.append("text").text((function(t){return t})).attr("opacity",0).attr("x",(function(t){return Ov(T(t),E.range()[1]+g,C).x})).attr("y",(function(t){return Ov(T(t),E.range()[1]+g,C).y})).style("text-anchor",(function(t){return wv(T(t)).textAnchor})).style("dominant-baseline",(function(t){return wv(T(t)).dominantBaseline})).call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_labels_enter",t)).attr("opacity",1)}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_labels_update",t)).attr("opacity",1).attr("x",(function(t){return Ov(T(t),E.range()[1]+g,C).x})).attr("y",(function(t){return Ov(T(t),E.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(this.svg,"g.blobs").attr("role",r.GROUP).selectAll("path").data(this.groupedDataNormalized,(function(t){return t.name})).join((function(n){return n.append("path").attr("class","blob").attr("role",r.GRAPHICS_SYMBOL).attr("opacity",0).attr("transform","translate("+C.x+", "+C.y+")").attr("fill",(function(t){return S(t.name)})).style("fill-opacity",b.selected).attr("stroke",(function(t){return S(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){return 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(this.svg,"g.dots").attr("role",r.GROUP).selectAll("circle").data(this.displayDataNormalized).join((function(t){return t.append("circle").attr("role",r.GRAPHICS_SYMBOL)}),(function(t){return t}),(function(t){return t.remove()})).attr("class",(function(t){return Zr.kebabCase(t[h])})).attr("cx",(function(t){return Ov(T(t[h]),E(t[f]),C).x})).attr("cy",(function(t){return Ov(T(t[h]),E(t[f]),C).y})).attr("r",0).attr("opacity",0).attr("fill",(function(t){return S(t[d])})),cf.appendOrSelect(this.svg,"g.x-axes-rect").attr("role",r.GROUP).selectAll("rect").data(this.uniqueKeys).join((function(t){return t.append("rect").attr("role",r.GRAPHICS_SYMBOL)}),(function(t){return t}),(function(t){return t.remove()})).attr("x",C.x).attr("y",C.y-_/2).attr("width",E.range()[1]).attr("height",_).attr("fill","red").style("fill-opacity",0).attr("transform",(function(t){return"rotate("+Ev(T(t))+", "+C.x+", "+C.y+")"})),this.addEventListeners(),av=E}},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(U.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(U.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.addEventListeners=function(){var t=this,e=Zr.getProperty(this.model.getOptions(),"radar"),n=e.axes.angle,r=e.dotsRadius;this.parent.selectAll(".x-axes-rect > rect").on("mouseover",(function(e){t.services.events.dispatchEvent(U.Radar.X_AXIS_MOUSEOVER,{element:Uh(this),datum:e})})).on("mousemove",(function(e){var i=Uh(this),o=t.parent.select(".x-axes .x-axis-"+Zr.kebabCase(e)),a=t.parent.selectAll(".dots circle."+Zr.kebabCase(e));o.classed("hovered",!0).attr("stroke-dasharray","4 4"),a.classed("hovered",!0).attr("opacity",1).attr("r",r),t.services.events.dispatchEvent(U.Radar.X_AXIS_MOUSEMOVE,{element:i,datum:e});var s=t.displayDataNormalized.filter((function(t){return t[n]===e}));t.services.events.dispatchEvent(U.Tooltip.SHOW,{hoveredElement:i,multidata:s,type:O.GRIDLINE})})).on("click",(function(e){t.services.events.dispatchEvent(U.Radar.X_AXIS_CLICK,{element:Uh(this),datum:e})})).on("mouseout",(function(e){var n=Uh(this),r=t.parent.select(".x-axes .x-axis-"+Zr.kebabCase(e)),i=t.parent.selectAll(".dots circle."+Zr.kebabCase(e));r.classed("hovered",!1).attr("stroke-dasharray","0"),i.classed("hovered",!1).attr("opacity",0).attr("r",0),t.services.events.dispatchEvent(U.Radar.X_AXIS_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent("hide-tooltip",{hoveredElement:n}),t.services.events.dispatchEvent(U.Tooltip.HIDE,{hoveredElement:n})}))},e}(Xp),Mv=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(Zr.mergeDefaultChartOptions(ki.radarChart,n.options)),i.init(e,n),i)}return n(e,t),e.prototype.getComponents=function(){var t=[new Sv(this.model,this.services)],e=this.getChartComponents(t);return e.push(new dg(this.model,this.services)),e},e}(lv),Av=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Zr.mergeDefaultChartOptions(ki.gaugeChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Sg(this.model,this.services)],e=this.getChartComponents(t);return e.push(new lg(this.model,this.services)),e},e}(lv),Cv=io;t.AreaChart=hv,t.BubbleChart=vv,t.DonutChart=xv,t.GaugeChart=Av,t.GroupedBarChart=pv,t.LineChart=mv,t.PieChart=bv,t.RadarChart=Mv,t.ScatterChart=yv,t.SimpleBarChart=dv,t.StackedAreaChart=fv,t.StackedBarChart=gv,t.colorPalettes=oo,t.configurations=Ui,t.defaultColors=Cv,t.interfaces=j,Object.defineProperty(t,"__esModule",{value:!0})}));